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.
403 lines
1.1 MiB
403 lines
1.1 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[241,5,7,8,9,11,16],{"+92d":function(Be,oe,M){Be.exports=M.p+"static/b1.8d46544a.svg"},"+GGh":function(Be,oe){Be.exports="data:image/png;base64,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"},"+oxA":function(Be,oe,M){Be.exports={flex_box_center:"flex_box_center___1SA8P",flex_space_between:"flex_space_between___3iSxN",flex_box_vertical_center:"flex_box_vertical_center___2JAtS",flex_box_center_end:"flex_box_center_end___2w-PB",flex_box_column:"flex_box_column___2s4Ak",head:"head___3iBvF",node:"node____ISDx"}},"+ua5":function(Be,oe,M){},"/cxE":function(Be,oe,M){"use strict";M.d(oe,"f",function(){return R}),M.d(oe,"g",function(){return B}),M.d(oe,"h",function(){return p}),M.d(oe,"e",function(){return H}),M.d(oe,"b",function(){return N}),M.d(oe,"c",function(){return e}),M.d(oe,"d",function(){return A}),M.d(oe,"a",function(){return g});class te{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(m){setTimeout(()=>{throw m.stack?new Error(m.message+`
|
|
|
|
`+m.stack):m},0)}}emit(m){this.listeners.forEach(u=>{u(m)})}onUnexpectedError(m){this.unexpectedErrorHandler(m),this.emit(m)}onUnexpectedExternalError(m){this.unexpectedErrorHandler(m)}}const k=new te;function R(m){H(m)||k.onUnexpectedError(m);return}function B(m){H(m)||k.onUnexpectedExternalError(m);return}function p(m){if(m instanceof Error){let{name:u,message:a}=m;const r=m.stacktrace||m.stack;return{$isError:!0,name:u,message:a,stack:r}}return m}const C="Canceled";function H(m){return m instanceof Error&&m.name===C&&m.message===C}function N(){const m=new Error(C);return m.name=m.message,m}function e(m){return m?new Error(`Illegal argument: ${m}`):new Error("Illegal argument")}function A(m){return m?new Error(`Illegal state: ${m}`):new Error("Illegal state")}class g extends Error{constructor(m){super("NotSupported");m&&(this.message=m)}}},"24hK":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return k});class te{constructor(R){this.element=R,this.next=te.Undefined,this.prev=te.Undefined}}te.Undefined=new te(void 0);class k{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===te.Undefined}clear(){let R=this._first;for(;R!==te.Undefined;){const B=R.next;R.prev=te.Undefined,R.next=te.Undefined,R=B}this._first=te.Undefined,this._last=te.Undefined,this._size=0}unshift(R){return this._insert(R,!1)}push(R){return this._insert(R,!0)}_insert(R,B){const p=new te(R);if(this._first===te.Undefined)this._first=p,this._last=p;else if(B){const H=this._last;this._last=p,p.prev=H,H.next=p}else{const H=this._first;this._first=p,p.next=H,H.prev=p}this._size+=1;let C=!1;return()=>{C||(C=!0,this._remove(p))}}shift(){if(this._first===te.Undefined)return;{const R=this._first.element;return this._remove(this._first),R}}pop(){if(this._last===te.Undefined)return;{const R=this._last.element;return this._remove(this._last),R}}_remove(R){if(R.prev!==te.Undefined&&R.next!==te.Undefined){const B=R.prev;B.next=R.next,R.next.prev=B}else R.prev===te.Undefined&&R.next===te.Undefined?(this._first=te.Undefined,this._last=te.Undefined):R.next===te.Undefined?(this._last=this._last.prev,this._last.next=te.Undefined):R.prev===te.Undefined&&(this._first=this._first.next,this._first.prev=te.Undefined);this._size-=1}*[Symbol.iterator](){let R=this._first;for(;R!==te.Undefined;)yield R.element,R=R.next}}},"3/fG":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return k});function te(R,B){let p;return B.length===0?p=R:p=R.replace(/\{(\d+)\}/g,function(C,H){const N=H[0];return typeof B[N]!="undefined"?B[N]:C}),p}function k(R,B,...p){return te(B,p)}},"5A5F":function(Be,oe,M){Be.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(Be,oe,M){"use strict";var te,k;function R(B,p,C){var H=function(N,e){return B.js_beautify(N,e)};return H.js=B.js_beautify,H.css=p.css_beautify,H.html=C.html_beautify,H.js_beautify=B.js_beautify,H.css_beautify=p.css_beautify,H.html_beautify=C.html_beautify,H}!(te=[M("6UM0"),M("TXwP"),M("psGv")],k=function(B,p,C){return R(B,p,C)}.apply(oe,te),k!==void 0&&(Be.exports=k))},"5Y4S":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return R});var te=M("MNsG");const k=te.b.performance&&typeof te.b.performance.now=="function";class R{constructor(B){this._highResolution=k&&B,this._startTime=this._now(),this._stopTime=-1}static create(B=!0){return new R(B)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?te.b.performance.now():Date.now()}}},"6+eU":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return v});var te=M("wx14"),k=M("rePB"),R=M("VTBJ"),B=M("1OyB"),p=M("vuIU"),C=M("Ji7U"),H=M("LK+K"),N=M("q1tI"),e=M.n(N),A=M("TSYQ"),g=M.n(A),m=function(E){var h,d="".concat(E.rootPrefixCls,"-item"),l=g()(d,"".concat(d,"-").concat(E.page),(h={},Object(k.a)(h,"".concat(d,"-active"),E.active),Object(k.a)(h,E.className,!!E.className),Object(k.a)(h,"".concat(d,"-disabled"),!E.page),h)),c=function(){E.onClick(E.page)},y=function(T){E.onKeyPress(T,E.onClick,E.page)};return e.a.createElement("li",{title:E.showTitle?E.page:null,className:l,onClick:c,onKeyPress:y,tabIndex:"0"},E.itemRender(E.page,"page",e.a.createElement("a",{rel:"nofollow"},E.page)))},u=m,a={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},r=function(x){Object(C.a)(h,x);var E=Object(H.a)(h);function h(){var d;Object(B.a)(this,h);for(var l=arguments.length,c=new Array(l),y=0;y<l;y++)c[y]=arguments[y];return d=E.call.apply(E,[this].concat(c)),d.state={goInputText:""},d.buildOptionText=function(f){return"".concat(f," ").concat(d.props.locale.items_per_page)},d.changeSize=function(f){d.props.changeSize(Number(f))},d.handleChange=function(f){d.setState({goInputText:f.target.value})},d.handleBlur=function(f){var T=d.props,I=T.goButton,P=T.quickGo,S=T.rootPrefixCls,w=d.state.goInputText;if(I||w==="")return;if(f.relatedTarget&&(f.relatedTarget.className.indexOf("".concat(S,"-prev"))>=0||f.relatedTarget.className.indexOf("".concat(S,"-next"))>=0))return;d.setState({goInputText:""}),P(d.getValidValue())},d.go=function(f){var T=d.state.goInputText;if(T==="")return;(f.keyCode===a.ENTER||f.type==="click")&&(d.setState({goInputText:""}),d.props.quickGo(d.getValidValue()))},d}return Object(p.a)(h,[{key:"getValidValue",value:function(){var l=this.state,c=l.goInputText,y=l.current;return!c||isNaN(c)?y:Number(c)}},{key:"getPageSizeOptions",value:function(){var l=this.props,c=l.pageSize,y=l.pageSizeOptions;return y.some(function(f){return f.toString()===c.toString()})?y:y.concat([c.toString()]).sort(function(f,T){var I=isNaN(Number(f))?0:Number(f),P=isNaN(Number(T))?0:Number(T);return I-P})}},{key:"render",value:function(){var l=this,c=this.props,y=c.pageSize,f=c.locale,T=c.rootPrefixCls,I=c.changeSize,P=c.quickGo,S=c.goButton,w=c.selectComponentClass,F=c.buildOptionText,L=c.selectPrefixCls,G=c.disabled,Z=this.state.goInputText,ue="".concat(T,"-options"),ce=w,Re=null,Ee=null,he=null;if(!I&&!P)return null;var we=this.getPageSizeOptions();if(I&&ce){var Pe=we.map(function(de,j){return e.a.createElement(ce.Option,{key:j,value:de.toString()},(F||l.buildOptionText)(de))});Re=e.a.createElement(ce,{disabled:G,prefixCls:L,showSearch:!1,className:"".concat(ue,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(y||we[0]).toString(),onChange:this.changeSize,getPopupContainer:function(j){return j.parentNode}},Pe)}return P&&(S&&(he=typeof S=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(ue,"-quick-jumper-button")},f.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},S)),Ee=e.a.createElement("div",{className:"".concat(ue,"-quick-jumper")},f.jump_to,e.a.createElement("input",{disabled:G,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),f.page,he)),e.a.createElement("li",{className:"".concat(ue)},Re,Ee)}}]),h}(e.a.Component);r.defaultProps={pageSizeOptions:["10","20","50","100"]};var o=r,s=M("N2Kk");function i(){}function n(x){return typeof x=="number"&&isFinite(x)&&Math.floor(x)===x}function t(x,E,h){return h}function _(x,E,h){var d=typeof x=="undefined"?E.pageSize:x;return Math.floor((h.total-1)/d)+1}var b=function(x){Object(C.a)(h,x);var E=Object(H.a)(h);function h(d){var l;Object(B.a)(this,h),l=E.call(this,d),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(_(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(I,P){var S=l.props.prefixCls,w=I||e.a.createElement("button",{type:"button","aria-label":P,className:"".concat(S,"-item-link")});return typeof I=="function"&&(w=e.a.createElement(I,Object(R.a)({},l.props))),w},l.savePaginationNode=function(I){l.paginationNode=I},l.isValid=function(I){return n(I)&&I!==l.state.current},l.shouldDisplayQuickJumper=function(){var I=l.props,P=I.showQuickJumper,S=I.pageSize,w=I.total;return w<=S?!1:P},l.handleKeyDown=function(I){(I.keyCode===a.ARROW_UP||I.keyCode===a.ARROW_DOWN)&&I.preventDefault()},l.handleKeyUp=function(I){var P=l.getValidValue(I),S=l.state.currentInputValue;P!==S&&l.setState({currentInputValue:P}),I.keyCode===a.ENTER?l.handleChange(P):I.keyCode===a.ARROW_UP?l.handleChange(P-1):I.keyCode===a.ARROW_DOWN&&l.handleChange(P+1)},l.changePageSize=function(I){var P=l.state.current,S=_(I,l.state,l.props);P=P>S?S:P,S===0&&(P=l.state.current),typeof I=="number"&&("pageSize"in l.props||l.setState({pageSize:I}),"current"in l.props||l.setState({current:P,currentInputValue:P})),l.props.onShowSizeChange(P,I),"onChange"in l.props&&l.props.onChange&&l.props.onChange(P,I)},l.handleChange=function(I){var P=l.props.disabled,S=I;if(l.isValid(S)&&!P){var w=_(void 0,l.state,l.props);S>w?S=w:S<1&&(S=1),"current"in l.props||l.setState({current:S,currentInputValue:S});var F=l.state.pageSize;return l.props.onChange(S,F),S}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current<_(void 0,l.state,l.props)},l.runIfEnter=function(I,P){if(I.key==="Enter"||I.charCode===13){for(var S=arguments.length,w=new Array(S>2?S-2:0),F=2;F<S;F++)w[F-2]=arguments[F];P.apply(void 0,w)}},l.runIfEnterPrev=function(I){l.runIfEnter(I,l.prev)},l.runIfEnterNext=function(I){l.runIfEnter(I,l.next)},l.runIfEnterJumpPrev=function(I){l.runIfEnter(I,l.jumpPrev)},l.runIfEnterJumpNext=function(I){l.runIfEnter(I,l.jumpNext)},l.handleGoTO=function(I){(I.keyCode===a.ENTER||I.type==="click")&&l.handleChange(l.state.currentInputValue)};var c=d.onChange!==i,y="current"in d;y&&!c&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var f=d.defaultCurrent;"current"in d&&(f=d.current);var T=d.defaultPageSize;return"pageSize"in d&&(T=d.pageSize),f=Math.min(f,_(T,void 0,d)),l.state={current:f,currentInputValue:f,pageSize:T},l}return Object(p.a)(h,[{key:"componentDidUpdate",value:function(l,c){var y=this.props.prefixCls;if(c.current!==this.state.current&&this.paginationNode){var f=this.paginationNode.querySelector(".".concat(y,"-item-").concat(c.current));f&&document.activeElement===f&&f.blur()}}},{key:"getValidValue",value:function(l){var c=l.target.value,y=_(void 0,this.state,this.props),f=this.state.currentInputValue,T;return c===""?T=c:isNaN(Number(c))?T=f:c>=y?T=y:T=Number(c),T}},{key:"getShowSizeChanger",value:function(){var l=this.props,c=l.showSizeChanger,y=l.total,f=l.totalBoundaryShowSizeChanger;return typeof c!="undefined"?c:y>f}},{key:"renderPrev",value:function(l){var c=this.props,y=c.prevIcon,f=c.itemRender,T=f(l,"prev",this.getItemIcon(y,"prev page")),I=!this.hasPrev();return Object(N.isValidElement)(T)?Object(N.cloneElement)(T,{disabled:I}):T}},{key:"renderNext",value:function(l){var c=this.props,y=c.nextIcon,f=c.itemRender,T=f(l,"next",this.getItemIcon(y,"next page")),I=!this.hasNext();return Object(N.isValidElement)(T)?Object(N.cloneElement)(T,{disabled:I}):T}},{key:"render",value:function(){var l=this,c=this.props,y=c.prefixCls,f=c.className,T=c.style,I=c.disabled,P=c.hideOnSinglePage,S=c.total,w=c.locale,F=c.showQuickJumper,L=c.showLessItems,G=c.showTitle,Z=c.showTotal,ue=c.simple,ce=c.itemRender,Re=c.showPrevNextJumpers,Ee=c.jumpPrevIcon,he=c.jumpNextIcon,we=c.selectComponentClass,Pe=c.selectPrefixCls,de=c.pageSizeOptions,j=this.state,O=j.current,D=j.pageSize,W=j.currentInputValue;if(P===!0&&S<=D)return null;var V=_(void 0,this.state,this.props),U=[],le=null,Oe=null,Me=null,ie=null,pe=null,_e=F&&F.goButton,Ae=L?1:2,Ke=O-1>0?O-1:0,ze=O+1<V?O+1:V,Ze=Object.keys(this.props).reduce(function(Y,J){return(J.substr(0,5)==="data-"||J.substr(0,5)==="aria-"||J==="role")&&(Y[J]=l.props[J]),Y},{});if(ue)return _e&&(typeof _e=="boolean"?pe=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},w.jump_to_confirm):pe=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},_e),pe=e.a.createElement("li",{title:G?"".concat(w.jump_to).concat(O,"/").concat(V):null,className:"".concat(y,"-simple-pager")},pe)),e.a.createElement("ul",Object(te.a)({className:g()(y,"".concat(y,"-simple"),Object(k.a)({},"".concat(y,"-disabled"),I),f),style:T,ref:this.savePaginationNode},Ze),e.a.createElement("li",{title:G?w.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:g()("".concat(y,"-prev"),Object(k.a)({},"".concat(y,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ke)),e.a.createElement("li",{title:G?"".concat(O,"/").concat(V):null,className:"".concat(y,"-simple-pager")},e.a.createElement("input",{type:"text",value:W,disabled:I,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(y,"-slash")},"/"),V),e.a.createElement("li",{title:G?w.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:g()("".concat(y,"-next"),Object(k.a)({},"".concat(y,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(ze)),pe);if(V<=3+Ae*2){var Ye={locale:w,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:ce};V||U.push(e.a.createElement(u,Object(te.a)({},Ye,{key:"noPager",page:V,className:"".concat(y,"-disabled")})));for(var it=1;it<=V;it+=1){var tt=O===it;U.push(e.a.createElement(u,Object(te.a)({},Ye,{key:it,page:it,active:tt})))}}else{var Te=L?w.prev_3:w.prev_5,Ie=L?w.next_3:w.next_5;Re&&(le=e.a.createElement("li",{title:G?Te:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:g()("".concat(y,"-jump-prev"),Object(k.a)({},"".concat(y,"-jump-prev-custom-icon"),!!Ee))},ce(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ee,"prev page"))),Oe=e.a.createElement("li",{title:G?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:g()("".concat(y,"-jump-next"),Object(k.a)({},"".concat(y,"-jump-next-custom-icon"),!!he))},ce(this.getJumpNextPage(),"jump-next",this.getItemIcon(he,"next page")))),ie=e.a.createElement(u,{locale:w,last:!0,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:V,page:V,active:!1,showTitle:G,itemRender:ce}),Me=e.a.createElement(u,{locale:w,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:ce});var ke=Math.max(1,O-Ae),We=Math.min(O+Ae,V);O-1<=Ae&&(We=1+Ae*2),V-O<=Ae&&(ke=V-Ae*2);for(var $=ke;$<=We;$+=1){var K=O===$;U.push(e.a.createElement(u,{locale:w,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:$,page:$,active:K,showTitle:G,itemRender:ce}))}O-1>=Ae*2&&O!==1+2&&(U[0]=Object(N.cloneElement)(U[0],{className:"".concat(y,"-item-after-jump-prev")}),U.unshift(le)),V-O>=Ae*2&&O!==V-2&&(U[U.length-1]=Object(N.cloneElement)(U[U.length-1],{className:"".concat(y,"-item-before-jump-next")}),U.push(Oe)),ke!==1&&U.unshift(Me),We!==V&&U.push(ie)}var z=null;Z&&(z=e.a.createElement("li",{className:"".concat(y,"-total-text")},Z(S,[S===0?0:(O-1)*D+1,O*D>S?S:O*D])));var X=!this.hasPrev()||!V,ee=!this.hasNext()||!V;return e.a.createElement("ul",Object(te.a)({className:g()(y,f,Object(k.a)({},"".concat(y,"-disabled"),I)),style:T,unselectable:"unselectable",ref:this.savePaginationNode},Ze),z,e.a.createElement("li",{title:G?w.prev_page:null,onClick:this.prev,tabIndex:X?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(y,"-prev"),Object(k.a)({},"".concat(y,"-disabled"),X)),"aria-disabled":X},this.renderPrev(Ke)),U,e.a.createElement("li",{title:G?w.next_page:null,onClick:this.next,tabIndex:ee?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(y,"-next"),Object(k.a)({},"".concat(y,"-disabled"),ee)),"aria-disabled":ee},this.renderNext(ze)),e.a.createElement(o,{disabled:I,locale:w,rootPrefixCls:y,selectComponentClass:we,selectPrefixCls:Pe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:O,pageSize:D,pageSizeOptions:de,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:_e}))}}],[{key:"getDerivedStateFromProps",value:function(l,c){var y={};if("current"in l&&(y.current=l.current,l.current!==c.current&&(y.currentInputValue=y.current)),"pageSize"in l&&l.pageSize!==c.pageSize){var f=c.current,T=_(l.pageSize,c,l);f=f>T?T:f,"current"in l||(y.current=f,y.currentInputValue=f),y.pageSize=l.pageSize}return y}}]),h}(e.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:s.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var v=b},"6RRn":function(Be,oe,M){"use strict";var te=M("wCXF"),k=M("n6Qo");M.d(oe,"b",function(){return k.a});var R=M("IBYe"),B=M("6eGT"),p=M("hW8S");M.d(oe,"a",function(){return p.a}),oe.c=te.b},"6UM0":function(Be,oe,M){var te,k;(function(){var R;(function(){"use strict";var p=[function(e,A,g){var m=g(1).Beautifier,u=g(5).Options;function a(r,o){var s=new m(r,o);return s.beautify()}e.exports=a,e.exports.defaultOptions=function(){return new u}},function(e,A,g){var m=g(2).Output,u=g(3).Token,a=g(4),r=g(5).Options,o=g(7).Tokenizer,s=g(7).line_starters,i=g(7).positionable_operators,n=g(7).TOKEN;function t(L,G){return G.indexOf(L)!==-1}function _(L){return L.replace(/^\s+/g,"")}function b(L){for(var G={},Z=0;Z<L.length;Z++)G[L[Z].replace(/-/g,"_")]=L[Z];return G}function v(L,G){return L&&L.type===n.RESERVED&&L.text===G}function x(L,G){return L&&L.type===n.RESERVED&&t(L.text,G)}var E=["case","return","do","if","throw","else","await","break","continue","async"],h=["before-newline","after-newline","preserve-newline"],d=b(h),l=[d.before_newline,d.preserve_newline],c={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function y(L,G){if(G.multiline_frame||G.mode===c.ForInitializer||G.mode===c.Conditional)return;L.remove_indent(G.start_line_index)}function f(L){L=L.replace(a.allLineBreaks,`
|
|
`);for(var G=[],Z=L.indexOf(`
|
|
`);Z!==-1;)G.push(L.substring(0,Z)),L=L.substring(Z+1),Z=L.indexOf(`
|
|
`);return L.length&&G.push(L),G}function T(L){return L===c.ArrayLiteral}function I(L){return t(L,[c.Expression,c.ForInitializer,c.Conditional])}function P(L,G){for(var Z=0;Z<L.length;Z++){var ue=L[Z].trim();if(ue.charAt(0)!==G)return!1}return!0}function S(L,G){for(var Z=0,ue=L.length,ce;Z<ue;Z++)if(ce=L[Z],ce&&ce.indexOf(G)!==0)return!1;return!0}function w(L,G){G=G||{},this._source_text=L||"",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 r(G)}w.prototype.create_flags=function(L,G){var Z=0;L&&(Z=L.indentation_level,!this._output.just_added_newline()&&L.line_indent_level>Z&&(Z=L.line_indent_level));var ue={mode:G,parent:L,last_token:L?L.last_token:new u(n.START_BLOCK,""),last_word:L?L.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:Z,alignment:0,line_indent_level:L?L.line_indent_level:Z,start_line_index:this._output.get_line_number(),ternary_depth:0};return ue},w.prototype._reset=function(L){var G=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new m(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var Z=new o(L,this._options);return this._tokens=Z.tokenize(),L},w.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,G=this._reset(this._source_text),Z=this._options.eol;this._options.eol==="auto"&&(Z=`
|
|
`,G&&a.lineBreak.test(G||"")&&(Z=G.match(a.lineBreak)[0]));for(var ue=this._tokens.next();ue;)this.handle_token(ue),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ue,ue=this._tokens.next();return L=this._output.get_code(Z),L},w.prototype.handle_token=function(L,G){L.type===n.START_EXPR?this.handle_start_expr(L):L.type===n.END_EXPR?this.handle_end_expr(L):L.type===n.START_BLOCK?this.handle_start_block(L):L.type===n.END_BLOCK?this.handle_end_block(L):L.type===n.WORD?this.handle_word(L):L.type===n.RESERVED?this.handle_word(L):L.type===n.SEMICOLON?this.handle_semicolon(L):L.type===n.STRING?this.handle_string(L):L.type===n.EQUALS?this.handle_equals(L):L.type===n.OPERATOR?this.handle_operator(L):L.type===n.COMMA?this.handle_comma(L):L.type===n.BLOCK_COMMENT?this.handle_block_comment(L,G):L.type===n.COMMENT?this.handle_comment(L,G):L.type===n.DOT?this.handle_dot(L):L.type===n.EOF?this.handle_eof(L):L.type===n.UNKNOWN?this.handle_unknown(L,G):this.handle_unknown(L,G)},w.prototype.handle_whitespace_and_comments=function(L,G){var Z=L.newlines,ue=this._options.keep_array_indentation&&T(this._flags.mode);if(L.comments_before)for(var ce=L.comments_before.next();ce;)this.handle_whitespace_and_comments(ce,G),this.handle_token(ce,G),ce=L.comments_before.next();if(ue)for(var Re=0;Re<Z;Re+=1)this.print_newline(Re>0,G);else if(this._options.max_preserve_newlines&&Z>this._options.max_preserve_newlines&&(Z=this._options.max_preserve_newlines),this._options.preserve_newlines&&Z>1){this.print_newline(!1,G);for(var Ee=1;Ee<Z;Ee+=1)this.print_newline(!0,G)}};var F=["async","break","continue","return","throw","yield"];w.prototype.allow_wrap_or_preserved_newline=function(L,G){if(G=G===void 0?!1:G,this._output.just_added_newline())return;var Z=this._options.preserve_newlines&&L.newlines||G,ue=t(this._flags.last_token.text,i)||t(L.text,i);if(ue){var ce=t(this._flags.last_token.text,i)&&t(this._options.operator_position,l)||t(L.text,i);Z=Z&&ce}if(Z)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(x(this._flags.last_token,F))return;this._output.set_wrap_point()}},w.prototype.print_newline=function(L,G){if(!G&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var Z=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&v(Z,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(L)&&(this._flags.multiline_frame=!0)},w.prototype.print_token_line_indentation=function(L){this._output.just_added_newline()&&(this._options.keep_array_indentation&&L.newlines&&(L.text==="["||T(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(L.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(L){if(this._output.raw){this._output.add_raw_token(L);return}if(this._options.comma_first&&L.previous&&L.previous.type===n.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var G=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(G),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(L),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(L),this._output.non_breaking_space=!0,this._output.add_token(L.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(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),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===c.Statement&&y(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===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},w.prototype.start_of_statement=function(L){var G=!1;return G=G||x(this._flags.last_token,["var","let","const"])&&L.type===n.WORD,G=G||v(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&x(this._flags.last_token,F)&&!L.newlines,G=G||v(this._flags.last_token,"else")&&!(v(L,"if")&&!L.comments_before),G=G||this._flags.last_token.type===n.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),G=G||this._flags.last_token.type===n.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==n.WORD&&L.type!==n.RESERVED,G=G||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),G?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,x(L,["do","for","if","while"])),!0):!1},w.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var G=c.Expression;if(L.text==="["){if(this._flags.last_token.type===n.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=c.ArrayLiteral,T(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())),t(this._flags.last_token.type,[n.START_EXPR,n.END_EXPR,n.WORD,n.OPERATOR,n.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===n.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,G=c.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=c.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(t(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===n.EQUALS||this._flags.last_token.type===n.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L);else if(this._flags.last_token.type===n.WORD){this._output.space_before_token=!1;var Z=this._tokens.peek(-3);if(this._options.space_after_named_function&&Z){var ue=this._tokens.peek(-4);x(Z,["async","function"])||Z.text==="*"&&x(ue,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?(Z.text==="{"||Z.text===","||Z.text==="*"&&(ue.text==="{"||ue.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(L);(this._flags.last_token.type===n.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(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===n.START_BLOCK?this.print_newline():(this._flags.last_token.type===n.END_EXPR||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===n.COMMA)&&this.allow_wrap_or_preserved_newline(L,L.newlines),this.print_token(L),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},w.prototype.handle_end_expr=function(L){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&T(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===n.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(L),this.restore_mode(),y(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},w.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var G=this._tokens.peek(),Z=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===n.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):Z&&(t(Z.text,[":",","])&&t(G.type,[n.STRING,n.WORD,n.RESERVED])||t(G.text,["get","set","..."])&&t(Z.type,[n.WORD,n.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(Z.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===n.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):t(this._flags.last_token.type,[n.EQUALS,n.START_EXPR,n.COMMA,n.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ue=!G.comments_before&&G.text==="}",ce=ue&&this._flags.last_word==="function"&&this._flags.last_token.type===n.END_EXPR;if(this._options.brace_preserve_inline){var Re=0,Ee=null;this._flags.inline_frame=!0;do if(Re+=1,Ee=this._tokens.peek(Re-1),Ee.newlines){this._flags.inline_frame=!1;break}while(Ee.type!==n.EOF&&!(Ee.type===n.END_BLOCK&&Ee.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==n.OPERATOR&&(ce||this._flags.last_token.type===n.EQUALS||x(this._flags.last_token,E)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(T(this._previous_flags.mode)&&(this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.COMMA)&&((this._flags.last_token.type===n.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(L),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==n.OPERATOR&&this._flags.last_token.type!==n.START_EXPR&&(this._flags.last_token.type===n.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(L),this.indent(),!ue&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},w.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===c.Statement;)this.restore_mode();var G=this._flags.last_token.type===n.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(T(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(L)},w.prototype.handle_word=function(L){if(L.type===n.RESERVED){if(t(L.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)L.type=n.WORD;else if(L.text==="import"&&t(this._tokens.peek().text,["(","."]))L.type=n.WORD;else if(t(L.text,["as","from"])&&!this._flags.import_block)L.type=n.WORD;else if(this._flags.mode===c.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(L.type=n.WORD)}}if(this.start_of_statement(L)?x(this._flags.last_token,["var","let","const"])&&L.type===n.WORD&&(this._flags.declaration_statement=!0):L.newlines&&!I(this._flags.mode)&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==n.EQUALS&&(this._options.preserve_newlines||!x(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(v(L,"while")){this._output.space_before_token=!0,this.print_token(L),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&&v(L,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(L,["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(L),this._flags.in_case=!0;return}if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L)),v(L,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===n.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,F)?this._output.space_before_token=!0:v(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===n.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(I(this._flags.mode)||T(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var Z="NONE";if(this._flags.last_token.type===n.END_BLOCK?this._previous_flags.inline_frame?Z="SPACE":x(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?Z="NEWLINE":(Z="SPACE",this._output.space_before_token=!0):Z="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&this._flags.mode===c.BlockStatement?Z="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&I(this._flags.mode)?Z="SPACE":this._flags.last_token.type===n.STRING?Z="NEWLINE":this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(this._last_last_text,["{",","]))?Z="SPACE":this._flags.last_token.type===n.START_BLOCK?this._flags.inline_frame?Z="SPACE":Z="NEWLINE":this._flags.last_token.type===n.END_EXPR&&(this._output.space_before_token=!0,Z="NEWLINE"),x(L,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Z="SPACE":Z="NEWLINE"),x(L,["else","catch","finally"]))if((!(this._flags.last_token.type===n.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ue=this._output.current_line;ue.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Z==="NEWLINE"?x(this._flags.last_token,E)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(L,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==n.END_EXPR?(this._flags.last_token.type!==n.START_EXPR||!x(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(v(L,"if")&&v(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(L,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&T(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Z==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===n.WORD||L.previous.type===n.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===n.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&v(L,"from")&&(this._flags.import_block=!1))},w.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var G=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&v(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},w.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===n.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L):L.text.startsWith("`")&&this._flags.last_token.type===n.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},w.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},w.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),this._output.space_before_token=!0,this._flags.declaration_statement?(I(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(L)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)},w.prototype.handle_operator=function(L){var G=L.text==="*"&&(x(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[n.START_BLOCK,n.COMMA,n.END_BLOCK,n.SEMICOLON])),Z=t(L.text,["-","+"])&&(t(this._flags.last_token.type,[n.START_BLOCK,n.START_EXPR,n.EQUALS,n.OPERATOR])||t(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var ue=!G;this.handle_whitespace_and_comments(L,ue)}if(L.text==="*"&&this._flags.last_token.type===n.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===n.OPERATOR&&t(this._options.operator_position,l)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==n.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 ce=!0,Re=!0,Ee=!1;if(L.text===":"?this._flags.ternary_depth===0?ce=!1:(this._flags.ternary_depth-=1,Ee=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!Z&&!G&&this._options.preserve_newlines&&t(L.text,i)){var he=L.text===":",we=he&&Ee,Pe=he&&!Ee;switch(this._options.operator_position){case d.before_newline:this._output.space_before_token=!Pe,this.print_token(L),(!he||we)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case d.after_newline:this._output.space_before_token=!0,!he||we?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case d.preserve_newline:Pe||this.allow_wrap_or_preserved_newline(L),ce=!(this._output.just_added_newline()||Pe),this._output.space_before_token=ce,this.print_token(L),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(L),ce=!1;var de=this._tokens.peek();Re=de&&t(de.type,[n.WORD,n.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),ce=this._flags.last_token.type===n.START_BLOCK,Re=!1;else if(t(L.text,["--","++","!","~"])||Z){if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),ce=!1,Re=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var j=x(this._flags.last_token,E)&&L.newlines;j&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(j,!0)}this._flags.last_token.text===";"&&I(this._flags.mode)&&(ce=!0),this._flags.last_token.type===n.RESERVED?ce=!0:this._flags.last_token.type===n.END_EXPR?ce=!(this._flags.last_token.text==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===n.OPERATOR&&(ce=t(L.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(L.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Re=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ce,this.print_token(L),this._output.space_before_token=Re},w.prototype.handle_block_comment=function(L,G){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,G),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,G)},w.prototype.print_block_commment=function(L,G){var Z=f(L.text),ue,ce=!1,Re=!1,Ee=L.whitespace_before,he=Ee.length;if(this.print_newline(!1,G),this.print_token_line_indentation(L),this._output.add_token(Z[0]),this.print_newline(!1,G),Z.length>1){for(Z=Z.slice(1),ce=P(Z,"*"),Re=S(Z,Ee),ce&&(this._flags.alignment=1),ue=0;ue<Z.length;ue++)ce?(this.print_token_line_indentation(L),this._output.add_token(_(Z[ue]))):Re&&Z[ue]?(this.print_token_line_indentation(L),this._output.add_token(Z[ue].substring(he))):(this._output.current_line.set_indent(-1),this._output.add_token(Z[ue])),this.print_newline(!1,G);this._flags.alignment=0}},w.prototype.handle_comment=function(L,G){L.newlines?this.print_newline(!1,G):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(L),this.print_newline(!1,G)},w.prototype.handle_dot=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),x(this._flags.last_token,E)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(L,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(L)},w.prototype.handle_unknown=function(L,G){this.print_token(L),L.text[L.text.length-1]===`
|
|
`&&this.print_newline(!1,G)},w.prototype.handle_eof=function(L){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L)},e.exports.Beautifier=w},function(e){function A(u){this.__parent=u,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 u=new A(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},A.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},A.prototype.has_match=function(u){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(u))return!0;return!1},A.prototype.set_indent=function(u,a){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=a||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 u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__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(u){this.__items.push(u);var a=u.lastIndexOf(`
|
|
`);a!==-1?this.__character_count=u.length-a:this.__character_count+=u.length},A.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},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 u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function g(u,a){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),a=a||"",u.indent_level>0&&(a=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}g.prototype.get_indent_size=function(u,a){var r=this.__base_string_length;return a=a||0,u<0&&(r=0),r+=u*this.__indent_size,r+=a,r},g.prototype.get_indent_string=function(u,a){var r=this.__base_string;return a=a||0,u<0&&(u=0,r=""),a+=u*this.__indent_size,this.__ensure_cache(a),r+=this.__cache[a],r},g.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var u=this.__cache.length,a=0,r="";this.__indent_size&&u>=this.__indent_size&&(a=Math.floor(u/this.__indent_size),u-=a*this.__indent_size,r=new Array(a+1).join(this.__indent_string)),u&&(r+=new Array(u+1).join(" ")),this.__cache.push(r)};function m(u,a){this.__indent_cache=new g(u,a),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.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()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(u,a){return this.__indent_cache.get_indent_string(u,a)},m.prototype.get_indent_size=function(u,a){return this.__indent_cache.get_indent_size(u,a)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(u){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 r=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(r=r.replace(/[\n]/g,u)),r},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(u,a){return u=u||0,a=a||0,this.next_line.set_indent(u,a),this.__lines.length>1?(this.current_line.set_indent(u,a),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(u){for(var a=0;a<u.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.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(" "))},m.prototype.remove_indent=function(u){for(var a=this.__lines.length;u<a;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&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},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(u,a){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(u)!==0&&o.item(-1)!==a){this.__lines.splice(r+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=m},function(e){function A(g,m,u,a){this.type=g,this.text=m,this.comments_before=null,this.newlines=u||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=A},function(e,A){var g="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",m="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",u="\\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",a="\\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",r="(?:\\\\u[0-9a-fA-F]{4}|["+g+u+"])",o="(?:\\\\u[0-9a-fA-F]{4}|["+m+u+a+"])*";A.identifier=new RegExp(r+o,"g"),A.identifierStart=new RegExp(r),A.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+m+u+a+"])+");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(e,A,g){var m=g(6).Options,u=["before-newline","after-newline","preserve-newline"];function a(r){m.call(this,r,"js");var o=this.raw_options.brace_style||null;o==="expand-strict"?this.raw_options.brace_style="expand":o==="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 i=0;i<s.length;i++)s[i]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[i];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",u),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}a.prototype=new m,e.exports.Options=a},function(e){function A(u,a){this.raw_options=g(u,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"])}A.prototype._get_array=function(u,a){var r=this.raw_options[u],o=a||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},A.prototype._get_boolean=function(u,a){var r=this.raw_options[u],o=r===void 0?!!a:!!r;return o},A.prototype._get_characters=function(u,a){var r=this.raw_options[u],o=a||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},A.prototype._get_number=function(u,a){var r=this.raw_options[u];a=parseInt(a,10),isNaN(a)&&(a=0);var o=parseInt(r,10);return isNaN(o)&&(o=a),o},A.prototype._get_selection=function(u,a,r){var o=this._get_selection_list(u,a,r);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[u]+"'");return o[0]},A.prototype._get_selection_list=function(u,a,r){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[a[0]],!this._is_valid_selection(r,a))throw new Error("Invalid Default Value!");var o=this._get_array(u,r);if(!this._is_valid_selection(o,a))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[u]+"'");return o},A.prototype._is_valid_selection=function(u,a){return u.length&&a.length&&!u.some(function(r){return a.indexOf(r)===-1})};function g(u,a){var r={};u=m(u);var o;for(o in u)o!==a&&(r[o]=u[o]);if(a&&u[a])for(o in u[a])r[o]=u[a][o];return r}function m(u){var a={},r;for(r in u){var o=r.replace(/-/g,"_");a[o]=u[r]}return a}e.exports.Options=A,e.exports.normalizeOpts=m,e.exports.mergeOpts=g},function(e,A,g){var m=g(8).InputScanner,u=g(9).Tokenizer,a=g(9).TOKEN,r=g(13).Directives,o=g(4),s=g(12).Pattern,i=g(14).TemplatablePattern;function n(P,S){return S.indexOf(P)!==-1}var t={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:a.START,RAW:a.RAW,EOF:a.EOF},_=new r(/\/\*/,/\*\//),b=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,v=/[0-9]/,x=/[^\d\.]/,E=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),h="\\?\\.(?!\\d) "+h,h=h.replace(/ /g,"|");var d=new RegExp(h),l="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+c.join("|")+")$"),f,T=function(P,S){u.call(this,P,S),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),F=new i(this._input).read_options(this._options);this.__patterns={template:F,identifier:F.starting_with(o.identifier).matching(o.identifierMatch),number:w.matching(b),punct:w.matching(d),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(o.lineBreak),shebang:w.starting_with(/#!/).until_after(o.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:F.until(/['\\\n\r\u2028\u2029]/),double_quote:F.until(/["\\\n\r\u2028\u2029]/),template_text:F.until(/[`\\$]/),template_expression:F.until(/[`}\\]/)}};T.prototype=new u,T.prototype._is_comment=function(P){return P.type===t.COMMENT||P.type===t.BLOCK_COMMENT||P.type===t.UNKNOWN},T.prototype._is_opening=function(P){return P.type===t.START_BLOCK||P.type===t.START_EXPR},T.prototype._is_closing=function(P,S){return(P.type===t.END_BLOCK||P.type===t.END_EXPR)&&S&&(P.text==="]"&&S.text==="["||P.text===")"&&S.text==="("||P.text==="}"&&S.text==="{")},T.prototype._reset=function(){f=!1},T.prototype._get_next_token=function(P,S){var w=null;this._readWhitespace();var F=this._input.peek();return F===null?this._create_token(t.EOF,""):(w=w||this._read_non_javascript(F),w=w||this._read_string(F),w=w||this._read_word(P),w=w||this._read_singles(F),w=w||this._read_comment(F),w=w||this._read_regexp(F,P),w=w||this._read_xml(F,P),w=w||this._read_punctuation(),w=w||this._create_token(t.UNKNOWN,this._input.next()),w)},T.prototype._read_word=function(P){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(o.allLineBreaks,`
|
|
`),!(P.type===t.DOT||P.type===t.RESERVED&&(P.text==="set"||P.text==="get"))&&y.test(S)?(S==="in"||S==="of")&&(P.type===t.WORD||P.type===t.STRING)?this._create_token(t.OPERATOR,S):this._create_token(t.RESERVED,S):this._create_token(t.WORD,S);if(S=this.__patterns.number.read(),S!=="")return this._create_token(t.WORD,S)},T.prototype._read_singles=function(P){var S=null;return P==="("||P==="["?S=this._create_token(t.START_EXPR,P):P===")"||P==="]"?S=this._create_token(t.END_EXPR,P):P==="{"?S=this._create_token(t.START_BLOCK,P):P==="}"?S=this._create_token(t.END_BLOCK,P):P===";"?S=this._create_token(t.SEMICOLON,P):P==="."&&x.test(this._input.peek(1))?S=this._create_token(t.DOT,P):P===","&&(S=this._create_token(t.COMMA,P)),S&&this._input.next(),S},T.prototype._read_punctuation=function(){var P=this.__patterns.punct.read();if(P!=="")return P==="="?this._create_token(t.EQUALS,P):P==="?."?this._create_token(t.DOT,P):this._create_token(t.OPERATOR,P)},T.prototype._read_non_javascript=function(P){var S="";if(P==="#"){if(this._is_first_token()&&(S=this.__patterns.shebang.read(),S))return this._create_token(t.UNKNOWN,S.trim()+`
|
|
`);if(S=this.__patterns.include.read(),S)return this._create_token(t.UNKNOWN,S.trim()+`
|
|
`);P=this._input.next();var w="#";if(this._input.hasNext()&&this._input.testChar(v)){do P=this._input.next(),w+=P;while(this._input.hasNext()&&P!=="#"&&P!=="=");return P==="#"||(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(t.WORD,w)}this._input.back()}else if(P==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)S+=this._input.next();return f=!0,this._create_token(t.COMMENT,S)}}else if(f&&P==="-"&&(S=this.__patterns.html_comment_end.read(),S))return f=!1,this._create_token(t.COMMENT,S);return null},T.prototype._read_comment=function(P){var S=null;if(P==="/"){var w="";if(this._input.peek(1)==="*"){w=this.__patterns.block_comment.read();var F=_.get_directives(w);F&&F.ignore==="start"&&(w+=_.readIgnored(this._input)),w=w.replace(o.allLineBreaks,`
|
|
`),S=this._create_token(t.BLOCK_COMMENT,w),S.directives=F}else this._input.peek(1)==="/"&&(w=this.__patterns.comment.read(),S=this._create_token(t.COMMENT,w))}return S},T.prototype._read_string=function(P){if(P==="`"||P==="'"||P==='"'){var S=this._input.next();return this.has_char_escapes=!1,P==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(P),this.has_char_escapes&&this._options.unescape_strings&&(S=I(S)),this._input.peek()===P&&(S+=this._input.next()),S=S.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,S)}return null},T.prototype._allow_regexp_or_xml=function(P){return P.type===t.RESERVED&&n(P.text,["return","case","throw","else","do","typeof","yield"])||P.type===t.END_EXPR&&P.text===")"&&P.opened.previous.type===t.RESERVED&&n(P.opened.previous.text,["if","while","for"])||n(P.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},T.prototype._read_regexp=function(P,S){if(P==="/"&&this._allow_regexp_or_xml(S)){for(var w=this._input.next(),F=!1,L=!1;this._input.hasNext()&&(F||L||this._input.peek()!==P)&&!this._input.testChar(o.newline);)w+=this._input.peek(),F?F=!1:(F=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===P&&(w+=this._input.next(),w+=this._input.read(o.identifier)),this._create_token(t.STRING,w)}return null},T.prototype._read_xml=function(P,S){if(this._options.e4x&&P==="<"&&this._allow_regexp_or_xml(S)){var w="",F=this.__patterns.xml.read_match();if(F){for(var L=F[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=L.indexOf("{")===0,Z=0;F;){var ue=!!F[1],ce=F[2],Re=!!F[F.length-1]||ce.slice(0,8)==="![CDATA[";if(!Re&&(ce===L||G&&ce.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ue?--Z:++Z),w+=F[0],Z<=0)break;F=this.__patterns.xml.read_match()}return F||(w+=this._input.match(/[\s\S]*/g)[0]),w=w.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,w)}}return null};function I(P){for(var S="",w=0,F=new m(P),L=null;F.hasNext();)if(L=F.match(/([\s]|[^\\]|\\\\)+/g),L&&(S+=L[0]),F.peek()==="\\"){if(F.next(),F.peek()==="x")L=F.match(/x([0-9A-Fa-f]{2})/g);else if(F.peek()==="u")L=F.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",F.hasNext()&&(S+=F.next());continue}if(!L)return P;if(w=parseInt(L[1],16),w>126&&w<=255&&L[0].indexOf("x")===0)return P;if(w>=0&&w<32){S+="\\"+L[0];continue}else w===34||w===39||w===92?S+="\\"+String.fromCharCode(w):S+=String.fromCharCode(w)}return S}T.prototype._read_string_recursive=function(P,S,w){var F,L;P==="'"?L=this.__patterns.single_quote:P==='"'?L=this.__patterns.double_quote:P==="`"?L=this.__patterns.template_text:P==="}"&&(L=this.__patterns.template_expression);for(var G=L.read(),Z="";this._input.hasNext();){if(Z=this._input.next(),Z===P||!S&&o.newline.test(Z)){this._input.back();break}else Z==="\\"&&this._input.hasNext()?(F=this._input.peek(),F==="x"||F==="u"?this.has_char_escapes=!0:F==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),Z+=this._input.next()):w&&(w==="${"&&Z==="$"&&this._input.peek()==="{"&&(Z+=this._input.next()),w===Z&&(P==="`"?Z+=this._read_string_recursive("}",S,"`"):Z+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(Z+=this._input.next())));Z+=L.read(),G+=Z}return G},e.exports.Tokenizer=T,e.exports.TOKEN=t,e.exports.positionable_operators=E.slice(),e.exports.line_starters=l.slice()},function(e){var A=RegExp.prototype.hasOwnProperty("sticky");function g(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},g.prototype.peek=function(m){var u=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(u=this.__input.charAt(m)),u},g.prototype.__match=function(m,u){m.lastIndex=u;var a=m.exec(this.__input);return a&&!(A&&m.sticky)&&(a.index!==u&&(a=null)),a},g.prototype.test=function(m,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(m,u):!1},g.prototype.testChar=function(m,u){var a=this.peek(u);return m.lastIndex=0,a!==null&&m.test(a)},g.prototype.match=function(m){var u=this.__match(m,this.__position);return u?this.__position+=u[0].length:u=null,u},g.prototype.read=function(m,u,a){var r="",o;return m&&(o=this.match(m),o&&(r+=o[0])),u&&(o||!m)&&(r+=this.readUntil(u,a)),r},g.prototype.readUntil=function(m,u){var a="",r=this.__position;m.lastIndex=this.__position;var o=m.exec(this.__input);return o?(r=o.index,u&&(r+=o[0].length)):r=this.__input_length,a=this.__input.substring(this.__position,r),this.__position=r,a},g.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},g.prototype.get_regexp=function(m,u){var a=null,r="g";return u&&A&&(r="y"),typeof m=="string"&&m!==""?a=new RegExp(m,r):m&&(a=new RegExp(m.source,r)),a},g.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(m){var u=this.__position,a=this.readUntilAfter(m);return this.__position=u,a},g.prototype.lookBack=function(m){var u=this.__position-1;return u>=m.length&&this.__input.substring(u-m.length,u).toLowerCase()===m},e.exports.InputScanner=g},function(e,A,g){var m=g(8).InputScanner,u=g(3).Token,a=g(10).TokenStream,r=g(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(i,n){this._input=new m(i),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var i,n=new u(o.START,""),t=null,_=[],b=new a;n.type!==o.EOF;){for(i=this._get_next_token(n,t);this._is_comment(i);)b.add(i),i=this._get_next_token(n,t);b.isEmpty()||(i.comments_before=b,b=new a),i.parent=t,this._is_opening(i)?(_.push(t),t=i):t&&this._is_closing(i,t)&&(i.opened=t,t.closed=i,t=_.pop(),i.parent=t),i.previous=n,n.next=i,this.__tokens.add(i),n=i}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(i,n){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(o.RAW,t):this._create_token(o.EOF,"")},s.prototype._is_comment=function(i){return!1},s.prototype._is_opening=function(i){return!1},s.prototype._is_closing=function(i,n){return!1},s.prototype._create_token=function(i,n){var t=new u(i,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=s,e.exports.TOKEN=o},function(e){function A(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}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 g=null;return this.hasNext()&&(g=this.__tokens[this.__position],this.__position+=1),g},A.prototype.peek=function(g){var m=null;return g=g||0,g+=this.__position,g>=0&&g<this.__tokens_length&&(m=this.__tokens[g]),m},A.prototype.add=function(g){this.__parent_token&&(g.parent=this.__parent_token),this.__tokens.push(g),this.__tokens_length+=1},e.exports.TokenStream=A},function(e,A,g){var m=g(12).Pattern;function u(a,r){m.call(this,a,r),r?this._line_regexp=this._input.get_regexp(r._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}u.prototype=new m,u.prototype.__set_whitespace_patterns=function(a,r){a+="\\t ",r+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+r+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+r+"]")},u.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 r=this.__split(this._newline_regexp,a);this.newline_count=r.length-1,this.whitespace_before_token=r[this.newline_count]}return a},u.prototype.matching=function(a,r){var o=this._create();return o.__set_whitespace_patterns(a,r),o._update(),o},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(a,r){a.lastIndex=0;for(var o=0,s=[],i=a.exec(r);i;)s.push(r.substring(o,i.index)),o=i.index+i[0].length,i=a.exec(r);return o<r.length?s.push(r.substring(o,r.length)):s.push(""),s},e.exports.WhitespacePattern=u},function(e){function A(g,m){this._input=g,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,m&&(this._starting_pattern=this._input.get_regexp(m._starting_pattern,!0),this._match_pattern=this._input.get_regexp(m._match_pattern,!0),this._until_pattern=this._input.get_regexp(m._until_pattern),this._until_after=m._until_after)}A.prototype.read=function(){var g=this._input.read(this._starting_pattern);return(!this._starting_pattern||g)&&(g+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),g},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(g){var m=this._create();return m._until_after=!0,m._until_pattern=this._input.get_regexp(g),m._update(),m},A.prototype.until=function(g){var m=this._create();return m._until_after=!1,m._until_pattern=this._input.get_regexp(g),m._update(),m},A.prototype.starting_with=function(g){var m=this._create();return m._starting_pattern=this._input.get_regexp(g,!0),m._update(),m},A.prototype.matching=function(g){var m=this._create();return m._match_pattern=this._input.get_regexp(g,!0),m._update(),m},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},e.exports.Pattern=A},function(e){function A(g,m){g=typeof g=="string"?g:g.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+m,"g")}A.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(g);u;)m[u[1]]=u[2],u=this.__directive_pattern.exec(g);return m},A.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=A},function(e,A,g){var m=g(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(r,o){m.call(this,r,o),this.__template_pattern=null,this._disabled=Object.assign({},u),this._excluded=Object.assign({},u),o&&(this.__template_pattern=this._input.get_regexp(o.__template_pattern),this._excluded=Object.assign(this._excluded,o._excluded),this._disabled=Object.assign(this._disabled,o._disabled));var s=new m(r);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}/)}}a.prototype=new m,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(r){var o=this._create();return o._disabled[r]=!0,o._update(),o},a.prototype.read_options=function(r){var o=this._create();for(var s in u)o._disabled[s]=r.templating.indexOf(s)===-1;return o._update(),o},a.prototype.exclude=function(r){var o=this._create();return o._excluded[r]=!0,o._update(),o},a.prototype.read=function(){var r="";this._match_pattern?r=this._input.read(this._starting_pattern):r=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),r+=o,o=this._read_template();return this._until_after&&(r+=this._input.readUntilAfter(this._until_pattern)),r},a.prototype.__set_templated_pattern=function(){var r=[];this._disabled.php||r.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||r.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||r.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(r.push(this.__patterns.django._starting_pattern.source),r.push(this.__patterns.django_value._starting_pattern.source),r.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||r.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&r.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+r.join("|")+")")},a.prototype._read_template=function(){var r="",o=this._input.peek();if(o==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(r=r||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(r=r||this.__patterns.handlebars_comment.read(),r=r||this.__patterns.handlebars_unescaped.read(),r=r||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(r=r||this.__patterns.django_value.read()),this._excluded.django||(r=r||this.__patterns.django_comment.read(),r=r||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(r=r||this.__patterns.smarty_comment.read(),r=r||this.__patterns.smarty_literal.read(),r=r||this.__patterns.smarty.read()));return r},e.exports.TemplatablePattern=a}],C={};function H(e){var A=C[e];if(A!==void 0)return A.exports;var g=C[e]={exports:{}};return p[e](g,g.exports,H),g.exports}var N=H(0);R=N})();var B=R;!(te=[],k=function(){return{js_beautify:B}}.apply(oe,te),k!==void 0&&(Be.exports=k))})()},"6eGT":function(Be,oe,M){"use strict";function te(k){return null}oe.a=te},"6nfa":function(Be,oe,M){Be.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"}},"746U":function(Be,oe,M){"use strict";M.d(oe,"f",function(){return te}),M.d(oe,"l",function(){return k}),M.d(oe,"k",function(){return R}),M.d(oe,"j",function(){return B}),M.d(oe,"g",function(){return p}),M.d(oe,"m",function(){return C}),M.d(oe,"h",function(){return H}),M.d(oe,"n",function(){return N}),M.d(oe,"c",function(){return e}),M.d(oe,"a",function(){return A}),M.d(oe,"i",function(){return g}),M.d(oe,"o",function(){return m}),M.d(oe,"e",function(){return r}),M.d(oe,"d",function(){return o}),M.d(oe,"p",function(){return s}),M.d(oe,"b",function(){return i});function te(n){return Array.isArray(n)}function k(n){return typeof n=="string"}function R(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function B(n){return typeof n=="number"&&!isNaN(n)}function p(n){return n===!0||n===!1}function C(n){return typeof n=="undefined"}function H(n){return!N(n)}function N(n){return C(n)||n===null}function e(n,t){if(!n)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function A(n){if(N(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function g(n){return typeof n=="function"}function m(n,t){const _=Math.min(n.length,t.length);for(let b=0;b<_;b++)u(n[b],t[b])}function u(n,t){if(k(t)){if(typeof n!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(g(t)){try{if(n instanceof t)return}catch(_){}if(!N(n)&&n.constructor===t)return;if(t.length===1&&t.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function a(n){let t=[],_=Object.getPrototypeOf(n);for(;Object.prototype!==_;)t=t.concat(Object.getOwnPropertyNames(_)),_=Object.getPrototypeOf(_);return t}function r(n){const t=[];for(const _ of a(n))typeof n[_]=="function"&&t.push(_);return t}function o(n,t){const _=v=>function(){const x=Array.prototype.slice.call(arguments,0);return t(v,x)};let b={};for(const v of n)b[v]=_(v);return b}function s(n){return n===null?void 0:n}function i(n,t="Unreachable"){throw new Error(t)}},"815F":function(Be,oe,M){"use strict";M.d(oe,"e",function(){return H}),M.d(oe,"c",function(){return e}),M.d(oe,"d",function(){return A}),M.d(oe,"a",function(){return m}),M.d(oe,"f",function(){return u}),M.d(oe,"b",function(){return a});var te=M("KQm4"),k=M("VTBJ"),R=M("Ff2n"),B=M("Zm9Q"),p=M("Kwbf"),C=M("OZM5");function H(r,o){return r!=null?r:o}function N(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=new Map;function s(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(t){var _=t.key,b=t.children;Object(p.a)(_!=null,"Tree node must have a certain key: [".concat(n).concat(_,"]"));var v=String(_);Object(p.a)(!o.has(v)||_===null||_===void 0,"Same 'key' exist in the Tree: ".concat(v)),o.set(v,!0),s(b,"".concat(n).concat(v," > "))})}s(r)}function e(r){function o(s){var i=Object(B.a)(s);return i.map(function(n){if(!Object(C.i)(n))return Object(p.a)(!n,"Tree/TreeNode can only accept TreeNode as children."),null;var t=n.key,_=n.props,b=_.children,v=Object(R.a)(_,["children"]),x=Object(k.a)({key:t},v),E=o(b);return E.length&&(x.children=E),x}).filter(function(n){return n})}return o(r)}function A(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(o===!0?[]:o),i=[];function n(t){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(b,v){var x=Object(C.h)(_?_.pos:"0",v),E=H(b.key,x),h=Object(k.a)(Object(k.a)({},b),{},{parent:_,pos:x,children:null,data:b,isStart:[].concat(Object(te.a)(_?_.isStart:[]),[v===0]),isEnd:[].concat(Object(te.a)(_?_.isEnd:[]),[v===t.length-1])});return i.push(h),o===!0||s.has(E)?h.children=n(b.children||[],h):h.children=[],h})}return n(r),i}function g(r,o,s){var i;s?typeof s=="string"?i=function(_){return _[s]}:typeof s=="function"&&(i=function(_){return s(_)}):i=function(_,b){return H(_.key,b)};function n(t,_,b){var v=t?t.children:r,x=t?Object(C.h)(b.pos,_):"0";if(t){var E=i(t,x),h={node:t,index:_,pos:x,key:E,parentPos:b.node?b.pos:null,level:b.level+1};o(h)}v&&v.forEach(function(d,l){n(d,l,{node:t,pos:x,level:b?b.level+1:-1})})}n(null)}function m(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.initWrapper,i=o.processEntity,n=o.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,_={},b={},v={posEntities:_,keyEntities:b};return s&&(v=s(v)||v),g(r,function(x){var E=x.node,h=x.index,d=x.pos,l=x.key,c=x.parentPos,y=x.level,f={node:E,index:h,key:l,pos:d,level:y},T=H(l,d);_[d]=f,b[T]=f,f.parent=_[c],f.parent&&(f.parent.children=f.parent.children||[],f.parent.children.push(f)),i&&i(f,v)},t),n&&n(v),v}function u(r,o){var s=o.expandedKeys,i=o.selectedKeys,n=o.loadedKeys,t=o.loadingKeys,_=o.checkedKeys,b=o.halfCheckedKeys,v=o.dragOverNodeKey,x=o.dropPosition,E=o.keyEntities,h=E[r],d={eventKey:r,expanded:s.indexOf(r)!==-1,selected:i.indexOf(r)!==-1,loaded:n.indexOf(r)!==-1,loading:t.indexOf(r)!==-1,checked:_.indexOf(r)!==-1,halfChecked:b.indexOf(r)!==-1,pos:String(h?h.pos:""),dragOver:v===r&&x===0,dragOverGapTop:v===r&&x===-1,dragOverGapBottom:v===r&&x===1};return d}function a(r){var o=r.data,s=r.expanded,i=r.selected,n=r.checked,t=r.loaded,_=r.loading,b=r.halfChecked,v=r.dragOver,x=r.dragOverGapTop,E=r.dragOverGapBottom,h=r.pos,d=r.active,l=Object(k.a)(Object(k.a)({},o),{},{expanded:s,selected:i,checked:n,loaded:t,loading:_,halfChecked:b,dragOver:v,dragOverGapTop:x,dragOverGapBottom:E,pos:h,active:d});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(p.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),r}}),l}},"8HAY":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return p}),M.d(oe,"b",function(){return C}),M.d(oe,"d",function(){return H}),M.d(oe,"e",function(){return N}),M.d(oe,"c",function(){return e});var te=M("MI8n"),k=M("pmY6"),R=M("3/fG"),B=function(A,g,m,u){function a(r){return r instanceof m?r:new m(function(o){o(r)})}return new(m||(m=Promise))(function(r,o){function s(t){try{n(u.next(t))}catch(_){o(_)}}function i(t){try{n(u.throw(t))}catch(_){o(_)}}function n(t){t.done?r(t.value):a(t.value).then(s,i)}n((u=u.apply(A,g||[])).next())})};class p extends k.a{constructor(A,g="",m="",u=!0,a){super();this._onDidChange=this._register(new te.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=A,this._label=g,this._cssClass=m,this._enabled=u,this._actionCallback=a}get id(){return this._id}get label(){return this._label}set label(A){this._setLabel(A)}_setLabel(A){this._label!==A&&(this._label=A,this._onDidChange.fire({label:A}))}get tooltip(){return this._tooltip||""}set tooltip(A){this._setTooltip(A)}_setTooltip(A){this._tooltip!==A&&(this._tooltip=A,this._onDidChange.fire({tooltip:A}))}get class(){return this._cssClass}set class(A){this._setClass(A)}_setClass(A){this._cssClass!==A&&(this._cssClass=A,this._onDidChange.fire({class:A}))}get enabled(){return this._enabled}set enabled(A){this._setEnabled(A)}_setEnabled(A){this._enabled!==A&&(this._enabled=A,this._onDidChange.fire({enabled:A}))}get checked(){return this._checked}set checked(A){this._setChecked(A)}_setChecked(A){this._checked!==A&&(this._checked=A,this._onDidChange.fire({checked:A}))}run(A,g){return B(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(A))})}}class C extends k.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new te.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new te.b),this.onDidRun=this._onDidRun.event}run(A,g){return B(this,void 0,void 0,function*(){if(!A.enabled)return;this._onBeforeRun.fire({action:A});let m;try{yield this.runAction(A,g)}catch(u){m=u}this._onDidRun.fire({action:A,error:m})})}runAction(A,g){return B(this,void 0,void 0,function*(){yield A.run(g)})}}class H extends p{constructor(A){super(H.ID,A,A?"separator text":"separator");this.checked=!1,this.enabled=!1}}H.ID="vs.actions.separator";class N{constructor(A,g,m,u){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=A,this.label=g,this.class=u,this._actions=m}get actions(){return this._actions}dispose(){}run(){return B(this,void 0,void 0,function*(){})}}class e extends p{constructor(){super(e.ID,R.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8WcF":function(Be,oe,M){Be.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(Be,oe,M){Be.exports={button:"button___1wy9m"}},"8mKB":function(Be,oe,M){"use strict";var te=M("rePB"),k=M("1OyB"),R=M("vuIU"),B=M("Ji7U"),p=M("md7G"),C=M("foSv"),H=M("q1tI"),N=M.n(H),e=M("m+aA"),A=M("TSYQ"),g=M.n(A),m=M("4IlW");function u(d){var l=d.pageXOffset,c="scrollLeft";if(typeof l!="number"){var y=d.document;l=y.documentElement[c],typeof l!="number"&&(l=y.body[c])}return l}function a(d){var l,c,y=d.ownerDocument,f=y.body,T=y&&y.documentElement,I=d.getBoundingClientRect();return l=I.left,c=I.top,l-=T.clientLeft||f.clientLeft||0,c-=T.clientTop||f.clientTop||0,{left:l,top:c}}function r(d){var l=a(d),c=d.ownerDocument,y=c.defaultView||c.parentWindow;return l.left+=u(y),l.left}function o(d){var l=s();return function(){var y=Object(C.a)(d),f;if(l){var T=Object(C.a)(this).constructor;f=Reflect.construct(y,arguments,T)}else f=y.apply(this,arguments);return Object(p.a)(this,f)}}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(d){return!1}}var i=function(d){Object(B.a)(c,d);var l=o(c);function c(){var y;return Object(k.a)(this,c),y=l.apply(this,arguments),y.onHover=function(f){var T=y.props,I=T.onHover,P=T.index;I(f,P)},y.onClick=function(f){var T=y.props,I=T.onClick,P=T.index;I(f,P)},y.onKeyDown=function(f){var T=y.props,I=T.onClick,P=T.index;f.keyCode===13&&I(f,P)},y}return Object(R.a)(c,[{key:"getClassName",value:function(){var f=this.props,T=f.prefixCls,I=f.index,P=f.value,S=f.allowHalf,w=f.focused,F=I+1,L=T;return P===0&&I===0&&w?L+=" ".concat(T,"-focused"):S&&P+.5>=F&&P<F?(L+=" ".concat(T,"-half ").concat(T,"-active"),w&&(L+=" ".concat(T,"-focused"))):(L+=F<=P?" ".concat(T,"-full"):" ".concat(T,"-zero"),F===P&&w&&(L+=" ".concat(T,"-focused"))),L}},{key:"render",value:function(){var f=this.onHover,T=this.onClick,I=this.onKeyDown,P=this.props,S=P.disabled,w=P.prefixCls,F=P.character,L=P.characterRender,G=P.index,Z=P.count,ue=P.value,ce=typeof F=="function"?F(this.props):F,Re=N.a.createElement("li",{className:this.getClassName()},N.a.createElement("div",{onClick:S?null:T,onKeyDown:S?null:I,onMouseMove:S?null:f,role:"radio","aria-checked":ue>G?"true":"false","aria-posinset":G+1,"aria-setsize":Z,tabIndex:S?-1:0},N.a.createElement("div",{className:"".concat(w,"-first")},ce),N.a.createElement("div",{className:"".concat(w,"-second")},ce)));return L&&(Re=L(Re,this.props)),Re}}]),c}(N.a.Component);function n(d,l){var c=Object.keys(d);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(d);l&&(y=y.filter(function(f){return Object.getOwnPropertyDescriptor(d,f).enumerable})),c.push.apply(c,y)}return c}function t(d){for(var l=1;l<arguments.length;l++){var c=arguments[l]!=null?arguments[l]:{};l%2?n(Object(c),!0).forEach(function(y){Object(te.a)(d,y,c[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(c)):n(Object(c)).forEach(function(y){Object.defineProperty(d,y,Object.getOwnPropertyDescriptor(c,y))})}return d}function _(d){var l=b();return function(){var y=Object(C.a)(d),f;if(l){var T=Object(C.a)(this).constructor;f=Reflect.construct(y,arguments,T)}else f=y.apply(this,arguments);return Object(p.a)(this,f)}}function b(){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(d){return!1}}function v(){}var x=function(d){Object(B.a)(c,d);var l=_(c);function c(y){var f;Object(k.a)(this,c),f=l.call(this,y),f.onHover=function(I,P){var S=f.props.onHoverChange,w=f.getStarValue(P,I.pageX),F=f.state.cleanedValue;w!==F&&f.setState({hoverValue:w,cleanedValue:null}),S(w)},f.onMouseLeave=function(){var I=f.props.onHoverChange;f.setState({hoverValue:void 0,cleanedValue:null}),I(void 0)},f.onClick=function(I,P){var S=f.props.allowClear,w=f.state.value,F=f.getStarValue(P,I.pageX),L=!1;S&&(L=F===w),f.onMouseLeave(),f.changeValue(L?0:F),f.setState({cleanedValue:L?F:null})},f.onFocus=function(){var I=f.props.onFocus;f.setState({focused:!0}),I&&I()},f.onBlur=function(){var I=f.props.onBlur;f.setState({focused:!1}),I&&I()},f.onKeyDown=function(I){var P=I.keyCode,S=f.props,w=S.count,F=S.allowHalf,L=S.onKeyDown,G=S.direction,Z=G==="rtl",ue=f.state.value;P===m.a.RIGHT&&ue<w&&!Z?(F?ue+=.5:ue+=1,f.changeValue(ue),I.preventDefault()):P===m.a.LEFT&&ue>0&&!Z||P===m.a.RIGHT&&ue>0&&Z?(F?ue-=.5:ue-=1,f.changeValue(ue),I.preventDefault()):P===m.a.LEFT&&ue<w&&Z&&(F?ue+=.5:ue+=1,f.changeValue(ue),I.preventDefault()),L&&L(I)},f.saveRef=function(I){return function(P){f.stars[I]=P}},f.saveRate=function(I){f.rate=I};var T=y.value;return T===void 0&&(T=y.defaultValue),f.stars={},f.state={value:T,focused:!1,cleanedValue:null},f}return Object(R.a)(c,[{key:"componentDidMount",value:function(){var f=this.props,T=f.autoFocus,I=f.disabled;T&&!I&&this.focus()}},{key:"getStarDOM",value:function(f){return Object(e.a)(this.stars[f])}},{key:"getStarValue",value:function(f,T){var I=this.props,P=I.allowHalf,S=I.direction,w=S==="rtl",F=f+1;if(P){var L=this.getStarDOM(f),G=r(L),Z=L.clientWidth;(w&&T-G>Z/2||!w&&T-G<Z/2)&&(F-=.5)}return F}},{key:"focus",value:function(){var f=this.props.disabled;f||this.rate.focus()}},{key:"blur",value:function(){var f=this.props.disabled;f||this.rate.blur()}},{key:"changeValue",value:function(f){var T=this.props.onChange;"value"in this.props||this.setState({value:f}),T(f)}},{key:"render",value:function(){for(var f=this.props,T=f.count,I=f.allowHalf,P=f.style,S=f.prefixCls,w=f.disabled,F=f.className,L=f.character,G=f.characterRender,Z=f.tabIndex,ue=f.direction,ce=this.state,Re=ce.value,Ee=ce.hoverValue,he=ce.focused,we=[],Pe=w?"".concat(S,"-disabled"):"",de=0;de<T;de+=1)we.push(N.a.createElement(i,{ref:this.saveRef(de),index:de,count:T,disabled:w,prefixCls:"".concat(S,"-star"),allowHalf:I,value:Ee===void 0?Re:Ee,onClick:this.onClick,onHover:this.onHover,key:de,character:L,characterRender:G,focused:he}));var j=g()(S,Pe,F,Object(te.a)({},"".concat(S,"-rtl"),ue==="rtl"));return N.a.createElement("ul",{className:j,style:P,onMouseLeave:w?null:this.onMouseLeave,tabIndex:w?-1:Z,onFocus:w?null:this.onFocus,onBlur:w?null:this.onBlur,onKeyDown:w?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},we)}}],[{key:"getDerivedStateFromProps",value:function(f,T){return"value"in f&&f.value!==void 0?t(t({},T),{},{value:f.value}):T}}]),c}(N.a.Component);x.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:v,character:"\u2605",onHoverChange:v,tabIndex:0,direction:"ltr"};var E=x,h=oe.a=E},"9Bee":function(Be,oe,M){"use strict";var te=M("DYRE"),k=M("zeV3"),R=M("+L6B"),B=M("2/Rp"),p=M("k1fw"),C=M("9og8"),H=M("tJVT"),N=M("WmNS"),e=M.n(N),A=M("q1tI"),g=M.n(A),m=M("vg9a"),u=M("DlQD"),a=M.n(u),r=M("rUJ1");function o($,K){var z=$.match(/^(\s+)(?:```)/);if(z===null)return K;var X=z[1];return K.split(`
|
|
`).map(function(ee){var Y=ee.match(/^\s+/);if(Y===null)return ee;var J=Object(H.a)(Y,1),ne=J[0];return ne.length>=X.length?ee.slice(X.length):ee}).join(`
|
|
`)}var s=[],i=["<ul>"],n=new a.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){s.length=0,i=["<ul>"]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v($,K,z,X){if(K>=$.length||$[K].level<=z)return K;var ee=$[K];X.push("<li><a href='#"+ee.anchor+"'>"+ee.text+"</a>"),K++;var Y=[];return K=v($,K,ee.level,Y),Y.length>0&&(X.push("<ul>"),Y.forEach(function(J){X.push(J)}),X.push("</ul>")),X.push("</li>"),K=v($,K,z,X),K}function x(){return v(s,0,0,i),i.push("</ul>"),i.join("")}var E={heading:function(K){var z=t.exec(K);if(z)return{type:"heading",raw:z[0],depth:z[1].length,text:z[2]}},fences:function(K){var z=this.rules.block.fences.exec(K);if(z){var X=z[0],ee=o(X,z[3]||""),Y=z[2]?z[2].trim():z[2];if(["latex","katex","math"].indexOf(Y)>=0){var J=l(),ne=ee;ee=J,c[J]={type:"block",expression:ne}}return{type:"code",raw:X,lang:Y,text:ee}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,d=0,l=function(){return"__special_katext_id_".concat(d++,"__")},c={};function y(){return c}function f(){d=0,c={}}function T($){return $=$.replace(h,function(K,z){var X=l();return c[X]={type:"inline",expression:z},X}),$}var I=n.listitem;n.listitem=function($){return I(T($))};var P=n.paragraph;n.paragraph=function($){return P(T($))};var S=n.tablecell;n.tablecell=function($,K){return S(T($),K)},n.code=function($,K,z){var X=(K||"").match(/\S*/)[0];return X?["latex","katex","math"].indexOf(X)>=0?"<p class='editormd-tex'>".concat($,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(K,'">').concat(z?$:Object(r.escape)($,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(z?$:Object(r.escape)($,!0))+"</code></pre>"},n.heading=function($,K,z){var X=this.options.headerPrefix+z.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:X,level:K,text:$}),"<h"+K+' id="'+X+'">'+$+"</h"+K+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:E,renderer:n});var w=a.a,F=M("SJMd"),L=M("ulZh"),G=M.n(L),Z=M("m3rI"),ue=M("Oy/b"),ce=M("p5ED"),Re=M("ErOA"),Ee=M("STEk");/* **********************************
|
|
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 he=function($,K){return(he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,X){z.__proto__=X}||function(z,X){for(var ee in X)Object.prototype.hasOwnProperty.call(X,ee)&&(z[ee]=X[ee])})($,K)};function we($,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function z(){this.constructor=$}he($,K),$.prototype=K===null?Object.create(K):(z.prototype=K.prototype,new z)}function Pe($,K,z,X){return new(z||(z=Promise))(function(ee,Y){function J(ye){try{re(X.next(ye))}catch(be){Y(be)}}function ne(ye){try{re(X.throw(ye))}catch(be){Y(be)}}function re(ye){var be;ye.done?ee(ye.value):(be=ye.value,be instanceof z?be:new z(function(Ne){Ne(be)})).then(J,ne)}re((X=X.apply($,K||[])).next())})}function de($,K){var z,X,ee,Y,J={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return Y={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ne(re){return function(ye){return function(be){if(z)throw new TypeError("Generator is already executing.");for(;J;)try{if(z=1,X&&(ee=2&be[0]?X.return:be[0]?X.throw||((ee=X.return)&&ee.call(X),0):X.next)&&!(ee=ee.call(X,be[1])).done)return ee;switch(X=0,ee&&(be=[2&be[0],ee.value]),be[0]){case 0:case 1:ee=be;break;case 4:return J.label++,{value:be[1],done:!1};case 5:J.label++,X=be[1],be=[0];continue;case 7:be=J.ops.pop(),J.trys.pop();continue;default:if(!(ee=J.trys,(ee=ee.length>0&&ee[ee.length-1])||be[0]!==6&&be[0]!==2)){J=0;continue}if(be[0]===3&&(!ee||be[1]>ee[0]&&be[1]<ee[3])){J.label=be[1];break}if(be[0]===6&&J.label<ee[1]){J.label=ee[1],ee=be;break}if(ee&&J.label<ee[2]){J.label=ee[2],J.ops.push(be);break}ee[2]&&J.ops.pop(),J.trys.pop();continue}be=K.call($,J)}catch(Ne){be=[6,Ne],X=0}finally{z=ee=0}if(5&be[0])throw be[1];return{value:be[0]?be[1]:void 0,done:!0}}([re,ye])}}}var j=function(){function $(){}return $.addKey=function(K){$.key=K},Object.defineProperty($,"isLicensed",{get:function(){return!!$.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test($.key)},enumerable:!1,configurable:!0}),$}(),O=function(){function $(){}return $.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},$.setAttributes=function(K,z){for(var X=0,ee=z;X<ee.length;X++){var Y=ee[X],J=Y[0],ne=Y[1];K.setAttribute(J,ne)}},$.createRect=function(K,z,X){var ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return ee.setAttribute("width",K.toString()),ee.setAttribute("height",z.toString()),X&&$.setAttributes(ee,X),ee},$.createLine=function(K,z,X,ee,Y){var J=document.createElementNS("http://www.w3.org/2000/svg","line");return J.setAttribute("x1",K.toString()),J.setAttribute("y1",z.toString()),J.setAttribute("x2",X.toString()),J.setAttribute("y2",ee.toString()),Y&&$.setAttributes(J,Y),J},$.createPolygon=function(K,z){var X=document.createElementNS("http://www.w3.org/2000/svg","polygon");return X.setAttribute("points",K),z&&$.setAttributes(X,z),X},$.createCircle=function(K,z){var X=document.createElementNS("http://www.w3.org/2000/svg","circle");return X.setAttribute("cx",(K/2).toString()),X.setAttribute("cy",(K/2).toString()),X.setAttribute("r",K.toString()),z&&$.setAttributes(X,z),X},$.createEllipse=function(K,z,X){var ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ee.setAttribute("cx",(K/2).toString()),ee.setAttribute("cy",(z/2).toString()),ee.setAttribute("rx",(K/2).toString()),ee.setAttribute("ry",(z/2).toString()),X&&$.setAttributes(ee,X),ee},$.createGroup=function(K){var z=document.createElementNS("http://www.w3.org/2000/svg","g");return K&&$.setAttributes(z,K),z},$.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},$.createMarker=function(K,z,X,ee,Y,J,ne){var re=document.createElementNS("http://www.w3.org/2000/svg","marker");return $.setAttributes(re,[["id",K],["orient",z],["markerWidth",X.toString()],["markerHeight",ee.toString()],["refX",Y.toString()],["refY",J.toString()]]),re.appendChild(ne),re},$.createText=function(K){var z=document.createElementNS("http://www.w3.org/2000/svg","text");return z.setAttribute("x","0"),z.setAttribute("y","0"),K&&$.setAttributes(z,K),z},$.createTSpan=function(K,z){var X=document.createElementNS("http://www.w3.org/2000/svg","tspan");return X.textContent=K,z&&$.setAttributes(X,z),X},$.createImage=function(K){var z=document.createElementNS("http://www.w3.org/2000/svg","image");return K&&$.setAttributes(z,K),z},$.createPoint=function(K,z){var X=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return X.x=K,X.y=z,X},$.createPath=function(K,z){var X=document.createElementNS("http://www.w3.org/2000/svg","path");return X.setAttribute("d",K),z&&$.setAttributes(X,z),X},$.createElement=function(K,z){var X=document.createElementNS("http://www.w3.org/2000/svg",K);return z&&$.setAttributes(X,z),X},$.getHollowRectanglePath=function(K,z,X,ee,Y,J,ne,re){return"M"+K+","+z+"V"+(z+ee)+"H"+(K+X)+"V"+z+"H"+Y+"V"+J+"H"+(Y+ne)+"V"+(J+re)+"H"+Y+"V"+z+"Z"},$}(),D=function(){function $(K){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+K+"_"}return Object.defineProperty($.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty($.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($.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),$.prototype.addClass=function(K){return this.styleSheet===void 0&&this.addStyleSheet(),K.name=""+this.classNamePrefix+K.localName,this.classes.push(K),this.styleSheet.sheet.insertRule("."+K.name+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length),K},$.prototype.addRule=function(K){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(K),this.styleSheet.sheet.insertRule(K.selector+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length)},$.prototype.addStyleSheet=function(){var K;this.styleSheet=document.createElement("style"),((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).appendChild(this.styleSheet),this.addRule(new W("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new W("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new W("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new V("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new V("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},$.prototype.removeStyleSheet=function(){var K;this.styleSheet&&(((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},$}(),W=function($,K){this.selector=$,this.style=K},V=function($,K){this.localName=$,this.style=K},U=function(){function $(){this.blocks=[],this.display=""}return $.prototype.addButtonBlock=function(K){K.className=this.blockClassName,K.buttonClassName=this.buttonClassName,K.buttonColorsClassName=this.buttonColorsClassName,K.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(K)},$.prototype.addElementBlock=function(K){K.className===void 0&&(K.className=this.blockClassName),this.blocks.push(K)},$.prototype.getUI=function(){var K=document.createElement("div");return K.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,K.style.display=this.display,this.blocks.forEach(function(z){return K.appendChild(z.getUI())}),K},$}(),le=function(){function $(){}return $.prototype.getUI=function(){var K=document.createElement("div");if(K.className=this.className,this.minWidth!==void 0&&(K.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":K.style.justifyContent="flex-start";break;case"center":K.style.justifyContent="center";break;case"end":K.style.justifyContent="flex-end"}return K.style.whiteSpace="nowrap",K},$}(),Oe=function($){function K(){var z=$!==null&&$.apply(this,arguments)||this;return z.buttons=[],z}return we(K,$),K.prototype.addButton=function(z){z.className=this.buttonClassName,z.colorsClassName=this.buttonColorsClassName,z.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(z)},K.prototype.getUI=function(){var z=$.prototype.getUI.call(this);return this.buttons.forEach(function(X){return z.appendChild(X.getUI())}),z},K}(le),Me=function(){function $(K,z){this._isActive=!1,this._isHidden=!1,this._icon=K,this.title=z,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty($.prototype,"icon",{get:function(){return this._icon},set:function(K){this._icon=K,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isActive",{get:function(){return this._isActive},set:function(K){this._isActive=K,this.adjustClassName()},enumerable:!1,configurable:!0}),$.prototype.getUI=function(){var K=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 K.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},$.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,"")))},$.prototype.hide=function(){this._isHidden=!0},$}(),ie=function($){function K(){var z=$!==null&&$.apply(this,arguments)||this;return z.elements=[],z}return we(K,$),K.prototype.addElement=function(z){this.elements.push(z)},K.prototype.getUI=function(){var z=$.prototype.getUI.call(this);return this.elements.forEach(function(X){return z.appendChild(X)}),z},K}(le),pe=function(){function $(K,z){this.horizontal=K,this.vertical=z}return Object.defineProperty($.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),$.prototype.getVerticalLength=function(K){return K/this.ratio},$.prototype.getHorizontalLength=function(K){return K*this.ratio},$}(),_e=function(){function $(){}return $.getIcon=function(K,z){if(K>0&&z>0){var X=new pe(K,z),ee=X.ratio>=1?20:X.getHorizontalLength(20),Y=X.ratio<1?20:X.getVerticalLength(20),J=document.createElementNS("http://www.w3.org/2000/svg","svg");J.setAttribute("xmlns","http://www.w3.org/2000/svg"),J.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(J);var ne=O.createDefs();J.appendChild(ne);var re=O.createElement("clipPath",[["id","text-bg-clip"]]);ne.appendChild(re);var ye=O.createPath(O.getHollowRectanglePath((24-ee)/2,(24-Y)/2,ee,Y,(24-ee)/2+2,(24-Y)/2+2,ee-4,Y-4));J.appendChild(ye);var be=O.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);be.appendChild(O.createTSpan(K+":"+z)),J.appendChild(be);var Ne=be.getBBox();O.setAttributes(be,[["x",((24-Ne.width)/2).toString()],["y",((24-Ne.height)/2-Ne.y).toString()]]);var Ve=O.createPath(O.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ne.width))/2,(24-Math.ceil(Ne.height))/2,Math.ceil(Ne.width),Math.ceil(Ne.height)));return re.appendChild(Ve),O.setAttributes(ye,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(J),J.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>'},$}(),Ae=function($){function K(z,X,ee){var Y=$.call(this,z,X)||this;return Y.isDropdownOpen=!1,Y.onClick=Y.dropdownButtonClicked,Y.dropdownButtons=ee,Y}return we(K,$),K.prototype.setupDropdown=function(){var z=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(X){X.className=z.className,X.colorsClassName=z.colorsClassName,z.dropdownBlock.appendChild(X.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},K.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},K.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},K.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},K.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},K.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},K}(Me),Ke=function(){function $(K,z){this.GRIP_SIZE=10,this.color=K,this.fillColor=z,this.visual=O.createGroup(),this.visual.appendChild(O.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(O.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return $.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},$.prototype.setCenter=function(K,z){this.visual.childNodes.forEach(function(X){return O.setAttributes(X,[["cx",K.toString()],["cy",z.toString()]])})},$}(),ze=function(){function $(K,z,X,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=K,this.canvasHeight=z,this.margin=X,this.container=ee,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($.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(K){this._aspectRatio=K,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.gridContainer&&O.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(K){this._zoomFactor=K,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),$.prototype.open=function(){var K=this;this.cropShadeElement=O.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=O.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var z=0;z<this.numberOfGridLines;z++)this.horizontalGridLines.push(O.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(O.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(X){return K.gridContainer.appendChild(X)}),this.verticalGridLines.forEach(function(X){return K.gridContainer.appendChild(X)}),this.cropRectElement=O.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},$.prototype.setCropRectangle=function(K){this.cropRect=K;var z=Object.assign({},this.cropRect);this.zoomFactor!==1&&(z.width=this.cropRect.width*this.zoomFactor,z.height=this.cropRect.height*this.zoomFactor,z.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-z.width/2,z.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-z.height/2),O.setAttributes(this.cropRectElement,[["x",z.x.toString()],["y",z.y.toString()],["width",z.width.toString()],["height",z.height.toString()]]);var X=z.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Y,J){var ne=z.y+X*(J+1);O.setAttributes(Y,[["x1",""+z.x],["y1",""+ne],["x2",""+(z.x+z.width)],["y2",""+ne]])});var ee=z.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Y,J){var ne=z.x+ee*(J+1);O.setAttributes(Y,[["x1",""+ne],["y1",""+z.y],["x2",""+ne],["y2",""+(z.y+z.height)]])}),O.setAttributes(this.cropShadeElement,[["d",O.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,z.x,z.y,z.width,z.height)]]),this.topLeftGrip.setCenter(z.x,z.y),this.topRightGrip.setCenter(z.x+z.width,z.y),this.bottomLeftGrip.setCenter(z.x,z.y+z.height),this.bottomRightGrip.setCenter(z.x+z.width,z.y+z.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},$.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)},$.prototype.clientToLocalCoordinates=function(K,z){var X=this.container.getBoundingClientRect();return{x:K-X.left+this.margin,y:z-X.top+this.margin}},$.prototype.onPointerDown=function(K){this.container.setPointerCapture(K.pointerId),this.previousPoint=this.clientToLocalCoordinates(K.clientX,K.clientY),this.cropRectElement===K.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(K.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(K.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(K.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(K.target)&&(this.activeGrip=this.bottomRightGrip)},$.prototype.onPointerMove=function(K){if(this.isMoving)this.move(this.clientToLocalCoordinates(K.clientX,K.clientY));else if(this.activeGrip){var z=this.clientToLocalCoordinates(K.clientX,K.clientY);this.resize(z)}K.preventDefault()},$.prototype.onPointerUp=function(K){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(K.pointerId)},$.prototype.move=function(K){var z=K.x-this.previousPoint.x,X=K.y-this.previousPoint.y;this.zoomFactor!==1&&(z=-z/this.zoomFactor,X=-X/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+z),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+X),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=K},$.prototype.resize=function(K){var z=Object.assign({},this.cropRect),X=K.x-this.previousPoint.x,ee=K.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:z.x+X<this.margin&&(X=this.margin-z.x),z.x+=X,z.width=this.cropRect.x+this.cropRect.width-z.x;break;case this.bottomRightGrip:case this.topRightGrip:z.width+X>this.canvasWidth*this.zoomFactor&&(X=this.canvasWidth*this.zoomFactor-z.width),z.width+=X}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(z.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(X),z.height=this.aspectRatio.getVerticalLength(z.width)):(z.y+=ee,z.height=this.cropRect.y+this.cropRect.height-z.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?z.height=this.aspectRatio.getVerticalLength(z.width):z.height+=ee}z.width<10&&(z.x=this.cropRect.x,z.width=10),z.height<10&&(z.y=this.cropRect.y,z.height=10),this.previousPoint=K,z.x>=this.margin&&z.y>=this.margin&&z.x-this.margin+z.width<=this.canvasWidth&&z.y-this.margin+z.height<=this.canvasHeight&&(this.cropRect=z,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},$.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var K=this.cropRect.x+this.cropRect.width/2,z=this.cropRect.y+this.cropRect.height/2,X=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);X/this.canvasWidth<ee/this.canvasHeight?this.cropRect.width=X:this.cropRect.height=ee,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=K-this.cropRect.width/2,this.cropRect.y=z-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)}},$.prototype.getRescaledRect=function(K,z,X,ee,Y,J){var ne=X/K,re=ee/z;return{x:(Y.x-J)*ne+J,y:(Y.y-J)*re+J,width:Y.width*ne,height:Y.height*re}},$.prototype.scaleCanvas=function(K,z){var X=this.getRescaledRect(this.canvasWidth,this.canvasHeight,K,z,this.cropRect,this.margin);this.canvasWidth=K,this.canvasHeight=z,this.onCropChange&&this.onCropChange(X),this.setCropRectangle(X)},$}(),Ze=function(){function $(K){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=K,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($.prototype,"angle",{get:function(){return this._angle},set:function(K){this._angle=K,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),$.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},$.prototype.onPointerDown=function(K){this.controlContainer.setPointerCapture(K.pointerId),this.isDragging=!0,this.previousPoint={x:K.clientX,y:K.clientY}},$.prototype.onPointerMove=function(K){this.isDragging&&(this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.previousPoint.x=K.clientX)},$.prototype.onPointerUp=function(K){this.isDragging&&this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(K.pointerId)},$.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var K=this.angleLabelText.getBBox();O.setAttributes(this.angleLabelElement,[["x",((this.width-K.width)/2).toString()],["y",(this.height/2).toString()]])}},$.prototype.positionScaleShape=function(){if(this.scaleShape){var K=this.scaleShape.transform.baseVal.getItem(0);K.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(K,0)}},$.prototype.getVisual=function(){var K=document.createElementNS("http://www.w3.org/2000/svg","svg");K.setAttribute("xmlns","http://www.w3.org/2000/svg"),K.setAttribute("width",this.width+"px"),K.setAttribute("height",this.height+"px"),K.setAttribute("viewBox","0 0 "+this.width+" "+this.height),K.style.flexShrink="0",document.body.appendChild(K);for(var z="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,X=1;X<=this.width/5+10;X++){var ee=X%5==0?this.height/3:this.height/6;z+="h4v"+-ee+"h1v"+ee}z+="v1H0Z",this.scaleShape=O.createPath(z);var Y=O.createTransform();this.scaleShape.transform.baseVal.appendItem(Y),K.appendChild(this.scaleShape),this.angleLabelElement=O.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=O.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var J=O.createTSpan("");return J.innerHTML="°",this.angleLabelElement.appendChild(J),K.appendChild(this.angleLabelElement),document.body.removeChild(K),K},$}(),Ye=function(){function $(){this.naturalSize=!1,this.imageType="image/png"}return $.prototype.rasterize=function(K,z,X,ee,Y,J,ne){var re=this;return new Promise(function(ye){var be=document.createElement("canvas");be.width=K.width.baseVal.value-2*ee,be.height=K.height.baseVal.value-2*ee;var Ne=1,Ve=1;re.naturalSize===!0?(Ne=z.naturalWidth/(K.width.baseVal.value-2*ee)/J,Ve=z.naturalHeight/(K.height.baseVal.value-2*ee)/ne,be.width=z.naturalWidth/J,be.height=z.naturalHeight/ne):re.width!==void 0&&re.height!==void 0&&(Ne=re.width/X.width,Ve=re.height/X.height,be.width*=Ne,be.height*=Ve);var $e=be.getContext("2d");$e.translate(be.width/2,be.height/2),$e.rotate(Y*Math.PI/180),$e.scale(J,ne),$e.translate(-be.width/2,-be.height/2),$e.drawImage(z,0,0,be.width,be.height);var Je=document.createElement("canvas");Je.width=X.width*Ne,Je.height=X.height*Ve,Je.getContext("2d").putImageData($e.getImageData((X.x-ee)*Ne,(X.y-ee)*Ve,X.width*Ne,X.height*Ve),0,0),ye(Je.toDataURL(re.imageType,re.imageQuality))})},$}(),it=function(){function $(K){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=$.instanceCounter++,this.styles=new D(this.instanceNo),this.target=K,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($.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(K){this._zoomToCropEnabled=K,K?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"gridLines",{get:function(){return this._gridLines},set:function(K){this._gridLines=K,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(K){this._rotationAngle=K,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"aspectRatio",{get:function(){var K;return(K=this._aspectRatio)!==null&&K!==void 0?K:this.aspectRatios[0]},set:function(K){this._aspectRatio=K},enumerable:!1,configurable:!0}),$.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},$.prototype.show=function(){this.showUI(),this.open()},$.prototype.close=function(K){K===void 0&&(K=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),K||this.closeEventListeners.forEach(function(z){return z()}),this._isOpen=!1)},$.prototype.addRenderEventListener=function(K){this.renderEventListeners.push(K)},$.prototype.removeRenderEventListener=function(K){this.renderEventListeners.indexOf(K)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(K),1)},$.prototype.addCloseEventListener=function(K){this.closeEventListeners.push(K)},$.prototype.removeCloseEventListener=function(K){this.closeEventListeners.indexOf(K)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(K),1)},$.prototype.setupResizeObserver=function(){var K=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){K.resize(K.target.clientWidth,K.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))},$.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var K=1*this.target.clientWidth/this.target.clientHeight,z=this.contentDiv.clientWidth/K>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*K:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,X=z+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/K;this.resize(z,X)}},$.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},$.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",O.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},$.prototype.resize=function(K,z){this.imageWidth=Math.round(K),this.imageHeight=Math.round(z),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()},$.prototype.setEditingTarget=function(){var K=document.createElement("canvas");K.width=this.target.naturalWidth,K.height=this.target.naturalHeight,K.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var z=K.toDataURL();O.setAttributes(this.editingTarget,[["href",z]]),this.setEditingTargetSize()},$.prototype.setTopLeft=function(){var K=this.target.getBoundingClientRect(),z=this.editorCanvas.getBoundingClientRect();this.left=K.left-z.left-this.CANVAS_MARGIN,this.top=K.top-z.top-this.CANVAS_MARGIN},$.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=O.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=O.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=O.createGroup(),this.editingTargetRotationScaleContainer=O.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var K=O.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(K);var z=O.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(z),this.editingTargetContainer=O.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)},$.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},$.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=O.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new ze(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()},$.prototype.zoomToCrop=function(){if(this.cropRect){var K=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,z=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=K+"px "+z+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-K+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-z+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},$.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)},$.prototype.cropRectChanged=function(K){this.cropRect=K,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},$.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},$.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"},$.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},$.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 K=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,z=this.target.offsetTop>K+this.CANVAS_MARGIN?this.target.offsetTop-(K+this.CANVAS_MARGIN):0;this.coverDiv.style.top=z+"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},$.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},$.prototype.addTopToolbar=function(){var K=this;this.topToolbar=new U,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 z=new Oe;z.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(z);var X=[];this.aspectRatios.forEach(function(Ve){var $e=new Me(_e.getIcon(Ve.horizontal,Ve.vertical),Ve.horizontal===0&&Ve.vertical===0?"FREE":Ve.horizontal+":"+Ve.vertical);$e.onClick=function(){return K.ratioButtonClicked(Ve)},X.push($e)}),this.aspectRatioButton=new Ae(_e.getIcon(0,0),"Aspect ratio",X),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,z.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new Me('<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");ee.isActive=this.isGridVisible,ee.onClick=function(){K.isGridVisible=!K.isGridVisible,ee.isActive=K.isGridVisible},z.addButton(ee);var Y=new Me('<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(Y.isActive=this.zoomToCropEnabled,Y.onClick=function(){K.zoomToCropEnabled=!K.zoomToCropEnabled,Y.isActive=K.zoomToCropEnabled},z.addButton(Y),!j.isLicensed){var J=new ie;this.topToolbar.addElementBlock(J);var ne=document.createElement("div");ne.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var re=document.createElement("a");re.style.color="currentColor",re.href="https://markerjs.com/products/cropro",re.target="_blank",re.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>',ne.appendChild(re),J.addElement(ne)}var ye=new Oe;ye.minWidth=3*this.toolbarHeight+"px",ye.contentAlign="end",this.topToolbar.addButtonBlock(ye);var be=new Me('<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");be.onClick=this.startRenderAndClose,ye.addButton(be),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(be.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ne=new Me('<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");Ne.onClick=this.close,ye.addButton(Ne),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ne.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},$.prototype.addBottomToolbar=function(){var K=this;this.bottomToolbar=new U,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 z=new Oe;z.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(z);var X=new Me('<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");X.onClick=this.rotateLeftButtonClicked,z.addButton(X);var ee=new Me('<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");ee.onClick=this.rotateRightButtonClicked,z.addButton(ee);var Y=new ie;Y.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Y),this.straightener=new Ze("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(ye){K.rotateBy(ye),K.straightener.angle=K.rotationAngle},Y.addElement(this.straightener.getUI());var J=new Oe;J.minWidth=2*this.toolbarHeight+"px",J.contentAlign="end",this.bottomToolbar.addButtonBlock(J);var ne=new Me('<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");ne.onClick=this.flipHorizontallyButtonClicked,J.addButton(ne);var re=new Me('<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");re.onClick=this.flipVerticallyButtonClicked,J.addButton(re)},$.prototype.ratioButtonClicked=function(K){this.aspectRatio=K,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},$.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=_e.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},$.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new pe(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},$.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},$.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},$.prototype.restoreState=function(K){if(K){var z=this.cropLayer.getRescaledRect(K.width,K.height,this.imageWidth,this.imageHeight,K.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(z),this.cropRectChanged(z),this.flippedHorizontally=K.flippedHorizontally,this.flippedVertically=K.flippedVertically,this.applyFlip(),this.rotationAngle=K.rotationAngle,this.applyRotation()}},$.prototype.clientToLocalCoordinates=function(K,z){var X=this.cropImage.getBoundingClientRect();return{x:K-X.left,y:z-X.top}},$.prototype.onWindowResize=function(){this.positionUI()},$.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var K=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=K+"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()},$.prototype.rotateLeftButtonClicked=function(){var K=this.rotationAngle-90;this.rotationAngle%90!=0&&(K+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(K)},$.prototype.rotateRightButtonClicked=function(){var K=this.rotationAngle+90;this.rotationAngle%90!=0&&(K-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(K)},$.prototype.rotateTo=function(K){K=(K=K>180?K-360:K)<=-180?K+360:K,this.rotationAngle=K,this.applyRotation()},$.prototype.rotateBy=function(K){this.rotateTo((this.rotationAngle+K)%360)},$.prototype.applyRotation=function(){var K=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var z=this.editingTargetRotationContainer.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(z,0);var X=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/X.width,this.imageHeight/X.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=K},$.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},$.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},$.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},$.prototype.startRenderAndClose=function(){return Pe(this,void 0,void 0,function(){var K,z;return de(this,function(X){switch(X.label){case 0:return[4,this.render()];case 1:return K=X.sent(),z=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(K,z)}),this.close(!0),[2]}})})},$.prototype.render=function(){return Pe(this,void 0,void 0,function(){var K;return de(this,function(z){switch(z.label){case 0:return(K=new Ye).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.width=this.renderWidth,K.height=this.renderHeight,this.unzoomFromCrop(),O.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,K.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 z.sent(),[4,K.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,z.sent()]}})})},$.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new V("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 V("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new V("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var K=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new V("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*K)+`px;
|
|
height: `+(this.toolbarHeight-2*K)+`px;
|
|
padding: `+K+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new V("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new V("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new W("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new W("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new V("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 V("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new V("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 V("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*K)+`px;
|
|
padding: `+K+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new V("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},$.instanceCounter=0,$}(),tt=M("8hTe"),Te=M.n(tt),Ie=/<pre[^>]*>/g;function ke($){var K=document.createElement("div");return K.innerHTML=$,K.childNodes.length===0?"":K.childNodes[0].nodeValue}var We=oe.a=function($){var K=$.value,z=K===void 0?"":K,X=$.edit,ee=X===void 0?!1:X,Y=$.className,J=$.showTextOnly,ne=$.showLines,re=$.replaces,ye=$.zoomImg,be=$.hasMask,Ne=$.style,Ve=Ne===void 0?{}:Ne,$e=$.stylesPrev,Je=$e===void 0?{}:$e,Ct=String(z),dt=Object(A.useRef)(),rt=Object(A.useRef)(),Dt=Object(A.useState)(""),Ot=Object(H.a)(Dt,2),St=Ot[0],Kt=Ot[1],gt=Object(A.useState)("office"),Lt=Object(H.a)(gt,2),Pt=Lt[0],bt=Lt[1],Qt=function(){var st=new it(rt.current);st.displayMode="popup",st.addRenderEventListener(function(){var ut=Object(C.a)(e.a.mark(function ct(vt){var ft;return e.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return dt.current.style.display="none",Rt.next=3,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:vt}});case 3:ft=Rt.sent,ft!=null&&ft.id&&re(rt.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(ft==null?void 0:ft.id,"?type=").concat(ft.content_type));case 5:case"end":return Rt.stop()}},ct)}));return function(ct){return ut.apply(this,arguments)}}()),st.show()},at=function(){var st=new Ee.a(rt.current);st.settings.displayMode="popup",st.addEventListener("render",function(){var ut=Object(C.a)(e.a.mark(function ct(vt){var ft;return e.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:if(dt.current.style.display="none",!rt.current){Rt.next=6;break}return Rt.next=4,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:vt.dataUrl}});case 4:ft=Rt.sent,ft!=null&&ft.id&&re(rt.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(ft==null?void 0:ft.id,"?type=").concat(ft.content_type));case 6:case"end":return Rt.stop()}},ct)}));return function(ct){return ut.apply(this,arguments)}}()),st.show(),window.markerArea=st},Le=Object(A.useMemo)(function(){dt.current&&(dt.current.style.zIndex=-1);try{var ht=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,st=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ut=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ct=Ct.replace(ht,"("+Z.a.API_SERVER+"/api/attachments/").replace(st,'"'+Z.a.API_SERVER+"/api/attachments/").replace(ut,'"'+Z.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(It){}var ct=w(Ct),vt=y();if(Ct.match(/\[TOC\]/)&&(ct=ct.replace("<p>[TOC]</p>",x()),_()),ct=ct.replace(/(__special_katext_id_\d+__)/g,function(It,Rt){var Zt=vt[Rt],sn=Zt.type,mt=Zt.expression;return Object(ue.renderToString)(ke(mt)||"",{displayMode:sn==="block",throwOnError:!1,output:"html"})}),ct=ct.replace(/▁/g,"\u2581\u2581\u2581"),f(),J){var ft=document.createElement("div");return ft.innerHTML=ct,ft.innerText}return setTimeout(function(){return _t()},500),ct},[Ct]),qe=Object(A.useRef)();b.WebkitLineClamp=ne,ne&&(Ve=Object(p.a)(Object(p.a)({},Ve),b));function lt(ht){var st=ht.target;if(st.tagName.toUpperCase()==="IMG"){if(ye){var ut=st.getAttribute("src");Kt(ut),bt("image")}}else if(st.tagName.toUpperCase()==="A"){var ct=st.getAttribute("href");if(ct.indexOf("office")>-1)ht.preventDefault(),Kt(ct),bt("office");else if(ct.indexOf("application/pdf")>-1)ht.preventDefault(),Kt(ct),bt("pdf");else if(ct.indexOf("text/html")>-1)ht.preventDefault(),Kt(ct),bt("html");else if(ct.startsWith("#")){ht.preventDefault();var vt=document.getElementById(ct.replace("#",""));vt&&vt.scrollIntoView(!0)}}}var _t=function(){var st,ut=(st=qe.current)===null||st===void 0?void 0:st.querySelectorAll("video");ut==null||ut.forEach(function(ct){if(ct.oncontextmenu=function(){return!1},ct.src.indexOf(".m3u8")>-1&&!ct.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var vt=new G.a;vt.loadSource(ct.src),vt.attachMedia(ct)}}})};Object(A.useEffect)(function(){if(qe.current&&Le&&(Le.match(Ie)&&window.PR.prettyPrint()),qe.current)return qe.current.addEventListener("click",lt),function(){qe.current.removeEventListener("click",lt),f(),_()}},[Le,qe.current,lt]);var At=function(st){if(!ee)return;st.target.nodeName==="IMG"?(dt.current.style.zIndex=1,dt.current.style.display="flex",dt.current.style.width=st.target.clientWidth+"px",dt.current.style.height=st.target.clientHeight+"px",dt.current.style.top=st.target.offsetTop+"px",dt.current.style.left=st.target.offsetLeft+"px",rt.current.src=st.target.getAttribute("src")):dt.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:qe,style:Object(p.a)({},Ve),className:"".concat(Y||""," markdown-body ").concat(Te.a.mdBody),onMouseOver:At,dangerouslySetInnerHTML:{__html:Le}}),g.a.createElement("div",{ref:dt,className:Te.a.button},g.a.createElement(k.a,null,g.a.createElement(B.a,{onClick:function(){return Qt()}},"\u88C1\u526A"),g.a.createElement(B.a,{onClick:function(){return at()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:rt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(ce.a,{close:!0,data:St,type:St!=null&&St.length?Pt:"",style:Object(p.a)({},Je),onClose:function(){return Kt("")}}))}},"9JIy":function(Be,oe,M){Be.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(Be,oe){var M=function(te){return te.replace(/[A-Z]/g,function(k){return"-"+k.toLowerCase()}).toLowerCase()};Be.exports=M},BU3w:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return C});var te=M("MNnm"),k="rc-util-key";function R(H){if(H.attachTo)return H.attachTo;var N=document.querySelector("head");return N||document.body}function B(H){var N,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(te.a)())return null;var A=document.createElement("style");if((N=e.csp)===null||N===void 0?void 0:N.nonce){var g;A.nonce=(g=e.csp)===null||g===void 0?void 0:g.nonce}A.innerHTML=H;var m=R(e),u=m.firstChild;return e.prepend&&m.prepend?m.prepend(A):e.prepend&&u?m.insertBefore(A,u):m.appendChild(A),A}var p=new Map;function C(H,N){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},A=R(e);if(!p.has(A)){var g=B("",e),m=g.parentNode;p.set(A,m),m.removeChild(g)}var u=Array.from(p.get(A).children).find(function(i){return i.tagName==="STYLE"&&i[k]===N});if(u){var a,r;if(((a=e.csp)===null||a===void 0?void 0:a.nonce)&&u.nonce!==((r=e.csp)===null||r===void 0?void 0:r.nonce)){var o;u.nonce=(o=e.csp)===null||o===void 0?void 0:o.nonce}return u.innerHTML!==H&&(u.innerHTML=H),u}var s=B(H,e);return s[k]=N,s}},BdwD:function(Be,oe,M){"use strict";var te=M("+L6B"),k=M("2/Rp"),R=M("0Owb"),B=M("k1fw"),p=M("q1tI"),C=M.n(p),H=M("FOrL"),N=M.n(H),e=function(g){var m=g.buttonProps,u=m===void 0?{}:m,a=g.styles,r=a===void 0?{}:a,o=g.imgStyles,s=o===void 0?{}:o,i=g.customText,n=g.ButtonText,t=g.ButtonClick,_=g.Buttonclass,b=g.ButtonTwo;return C.a.createElement("section",{className:"tc animated fadeIn",style:Object(B.a)(Object(B.a)({},{color:"#999",margin:"0 auto",padding:"100px 0"}),r)},C.a.createElement("img",{src:N.a,style:Object(B.a)(Object(B.a)({},{width:"200px",height:"150px"}),s)}),C.a.createElement("p",{className:"mt10 font14"},i||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),n&&C.a.createElement(k.a,Object(R.a)({className:_,onClick:t},u),n),b&&b)};oe.a=e},Bq7L:function(Be,oe){Be.exports="data:image/png;base64,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"},"C/vA":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return te});function te(k){const R=this;let B=!1,p;return function(){return B||(B=!0,p=k.apply(R,arguments)),p}}},"Cg/j":function(Be,oe,M){"use strict";M.d(oe,"b",function(){return te}),M.d(oe,"a",function(){return k}),M.d(oe,"c",function(){return B}),M.d(oe,"d",function(){return p});var te;(function(C){C.serviceIds=new Map,C.DI_TARGET="$di$target",C.DI_DEPENDENCIES="$di$dependencies";function H(N){return N[C.DI_DEPENDENCIES]||[]}C.getServiceDependencies=H})(te||(te={}));const k=B("instantiationService");function R(C,H,N,e){H[te.DI_TARGET]===H?H[te.DI_DEPENDENCIES].push({id:C,index:N,optional:e}):(H[te.DI_DEPENDENCIES]=[{id:C,index:N,optional:e}],H[te.DI_TARGET]=H)}function B(C){if(te.serviceIds.has(C))return te.serviceIds.get(C);const H=function(N,e,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");R(H,N,A,!1)};return H.toString=()=>C,te.serviceIds.set(C,H),H}function p(C){return function(H,N,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");R(C,H,e,!0)}}},DlQD:function(Be,oe,M){(function(te,k){Be.exports=k()})(this,function(){"use strict";function te(z,X){for(var ee=0;ee<X.length;ee++){var Y=X[ee];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(z,Y.key,Y)}}function k(z,X,ee){return X&&te(z.prototype,X),ee&&te(z,ee),z}function R(z,X){if(!z)return;if(typeof z=="string")return B(z,X);var ee=Object.prototype.toString.call(z).slice(8,-1);if(ee==="Object"&&z.constructor&&(ee=z.constructor.name),ee==="Map"||ee==="Set")return Array.from(z);if(ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ee))return B(z,X)}function B(z,X){(X==null||X>z.length)&&(X=z.length);for(var ee=0,Y=new Array(X);ee<X;ee++)Y[ee]=z[ee];return Y}function p(z,X){var ee;if(typeof Symbol=="undefined"||z[Symbol.iterator]==null){if(Array.isArray(z)||(ee=R(z))||X&&z&&typeof z.length=="number"){ee&&(z=ee);var Y=0;return function(){return Y>=z.length?{done:!0}:{done:!1,value:z[Y++]}}}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 ee=z[Symbol.iterator](),ee.next.bind(ee)}function C(z,X){return X={exports:{}},z(X,X.exports),X.exports}var H=C(function(z){function X(){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 ee(Y){z.exports.defaults=Y}z.exports={defaults:X(),getDefaults:X,changeDefaults:ee}}),N=H.defaults,e=H.getDefaults,A=H.changeDefaults,g=/[&<>"']/,m=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,r={"&":"&","<":"<",">":">",'"':""","'":"'"},o=function(X){return r[X]};function s(z,X){if(X){if(g.test(z))return z.replace(m,o)}else if(u.test(z))return z.replace(a,o);return z}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(z){return z.replace(i,function(X,ee){return ee=ee.toLowerCase(),ee==="colon"?":":ee.charAt(0)==="#"?ee.charAt(1)==="x"?String.fromCharCode(parseInt(ee.substring(2),16)):String.fromCharCode(+ee.substring(1)):""})}var t=/(^|[^\[])\^/g;function _(z,X){z=z.source||z,X=X||"";var ee={replace:function(J,ne){return ne=ne.source||ne,ne=ne.replace(t,"$1"),z=z.replace(J,ne),ee},getRegex:function(){return new RegExp(z,X)}};return ee}var b=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(z,X,ee){if(z){var Y;try{Y=decodeURIComponent(n(ee)).replace(b,"").toLowerCase()}catch(J){return null}if(Y.indexOf("javascript:")===0||Y.indexOf("vbscript:")===0||Y.indexOf("data:")===0)return null}X&&!v.test(ee)&&(ee=c(X,ee));try{ee=encodeURI(ee).replace(/%25/g,"%")}catch(J){return null}return ee}var E={},h=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(z,X){E[" "+z]||(h.test(z)?E[" "+z]=z+"/":E[" "+z]=I(z,"/",!0)),z=E[" "+z];var ee=z.indexOf(":")===-1;return X.substring(0,2)==="//"?ee?X:z.replace(d,"$1")+X:X.charAt(0)==="/"?ee?X:z.replace(l,"$1")+X:z+X}var y={exec:function(){}};function f(z){for(var X=1,ee,Y;X<arguments.length;X++){ee=arguments[X];for(Y in ee)Object.prototype.hasOwnProperty.call(ee,Y)&&(z[Y]=ee[Y])}return z}function T(z,X){var ee=z.replace(/\|/g,function(ne,re,ye){for(var be=!1,Ne=re;--Ne>=0&&ye[Ne]==="\\";)be=!be;return be?"|":" |"}),Y=ee.split(/ \|/),J=0;if(Y.length>X)Y.splice(X);else for(;Y.length<X;)Y.push("");for(;J<Y.length;J++)Y[J]=Y[J].trim().replace(/\\\|/g,"|");return Y}function I(z,X,ee){var Y=z.length;if(Y===0)return"";for(var J=0;J<Y;){var ne=z.charAt(Y-J-1);if(ne===X&&!ee)J++;else if(ne!==X&&ee)J++;else break}return z.substr(0,Y-J)}function P(z,X){if(z.indexOf(X[1])===-1)return-1;for(var ee=z.length,Y=0,J=0;J<ee;J++)if(z[J]==="\\")J++;else if(z[J]===X[0])Y++;else if(z[J]===X[1]&&(Y--,Y<0))return J;return-1}function S(z){z&&z.sanitize&&!z.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:n,edit:_,cleanUrl:x,resolveUrl:c,noopTest:y,merge:f,splitCells:T,rtrim:I,findClosingBracket:P,checkSanitizeDeprecation:S},F=H.defaults,L=w.rtrim,G=w.splitCells,Z=w.escape,ue=w.findClosingBracket;function ce(z,X,ee){var Y=X.href,J=X.title?Z(X.title):null,ne=z[1].replace(/\\([\[\]])/g,"$1");return z[0].charAt(0)!=="!"?{type:"link",raw:ee,href:Y,title:J,text:ne}:{type:"image",raw:ee,href:Y,title:J,text:Z(ne)}}function Re(z,X){var ee=z.match(/^(\s+)(?:```)/);if(ee===null)return X;var Y=ee[1];return X.split(`
|
|
`).map(function(J){var ne=J.match(/^\s+/);if(ne===null)return J;var re=ne[0];return re.length>=Y.length?J.slice(Y.length):J}).join(`
|
|
`)}var Ee=function(){function z(ee){this.options=ee||F}var X=z.prototype;return X.space=function(Y){var J=this.rules.block.newline.exec(Y);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
|
|
`}},X.code=function(Y,J){var ne=this.rules.block.code.exec(Y);if(ne){var re=J[J.length-1];if(re&&re.type==="paragraph")return{raw:ne[0],text:ne[0].trimRight()};var ye=ne[0].replace(/^ {4}/gm,"");return{type:"code",raw:ne[0],codeBlockStyle:"indented",text:this.options.pedantic?ye:L(ye,`
|
|
`)}}},X.fences=function(Y){var J=this.rules.block.fences.exec(Y);if(J){var ne=J[0],re=Re(ne,J[3]||"");return{type:"code",raw:ne,lang:J[2]?J[2].trim():J[2],text:re}}},X.heading=function(Y){var J=this.rules.block.heading.exec(Y);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},X.nptable=function(Y){var J=this.rules.block.nptable.exec(Y);if(J){var ne={type:"table",header:G(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[],raw:J[0]};if(ne.header.length===ne.align.length){var re=ne.align.length,ye;for(ye=0;ye<re;ye++)/^ *-+: *$/.test(ne.align[ye])?ne.align[ye]="right":/^ *:-+: *$/.test(ne.align[ye])?ne.align[ye]="center":/^ *:-+ *$/.test(ne.align[ye])?ne.align[ye]="left":ne.align[ye]=null;for(re=ne.cells.length,ye=0;ye<re;ye++)ne.cells[ye]=G(ne.cells[ye],ne.header.length);return ne}}},X.hr=function(Y){var J=this.rules.block.hr.exec(Y);if(J)return{type:"hr",raw:J[0]}},X.blockquote=function(Y){var J=this.rules.block.blockquote.exec(Y);if(J){var ne=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:ne}}},X.list=function(Y){var J=this.rules.block.list.exec(Y);if(J){for(var ne=J[0],re=J[2],ye=re.length>1,be=re[re.length-1]===")",Ne={type:"list",raw:ne,ordered:ye,start:ye?+re.slice(0,-1):"",loose:!1,items:[]},Ve=J[0].match(this.rules.block.item),$e=!1,Je,Ct,dt,rt,Dt,Ot,St,Kt=Ve.length,gt=0;gt<Kt;gt++)Je=Ve[gt],ne=Je,Ct=Je.length,Je=Je.replace(/^ *([*+-]|\d+[.)]) */,""),~Je.indexOf(`
|
|
`)&&(Ct-=Je.length,Je=this.options.pedantic?Je.replace(/^ {1,4}/gm,""):Je.replace(new RegExp("^ {1,"+Ct+"}","gm"),"")),gt!==Kt-1&&(dt=this.rules.block.bullet.exec(Ve[gt+1])[0],(ye?dt.length===1||!be&&dt[dt.length-1]===")":dt.length>1||this.options.smartLists&&dt!==re)&&(rt=Ve.slice(gt+1).join(`
|
|
`),Ne.raw=Ne.raw.substring(0,Ne.raw.length-rt.length),gt=Kt-1)),Dt=$e||/\n\n(?!\s*$)/.test(Je),gt!==Kt-1&&($e=Je.charAt(Je.length-1)===`
|
|
`,Dt||(Dt=$e)),Dt&&(Ne.loose=!0),Ot=/^\[[ xX]\] /.test(Je),St=void 0,Ot&&(St=Je[1]!==" ",Je=Je.replace(/^\[[ xX]\] +/,"")),Ne.items.push({type:"list_item",raw:ne,task:Ot,checked:St,loose:Dt,text:Je});return Ne}},X.html=function(Y){var J=this.rules.block.html.exec(Y);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):Z(J[0]):J[0]}},X.def=function(Y){var J=this.rules.block.def.exec(Y);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var ne=J[1].toLowerCase().replace(/\s+/g," ");return{tag:ne,raw:J[0],href:J[2],title:J[3]}}},X.table=function(Y){var J=this.rules.block.table.exec(Y);if(J){var ne={type:"table",header:G(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[]};if(ne.header.length===ne.align.length){ne.raw=J[0];var re=ne.align.length,ye;for(ye=0;ye<re;ye++)/^ *-+: *$/.test(ne.align[ye])?ne.align[ye]="right":/^ *:-+: *$/.test(ne.align[ye])?ne.align[ye]="center":/^ *:-+ *$/.test(ne.align[ye])?ne.align[ye]="left":ne.align[ye]=null;for(re=ne.cells.length,ye=0;ye<re;ye++)ne.cells[ye]=G(ne.cells[ye].replace(/^ *\| *| *\| *$/g,""),ne.header.length);return ne}}},X.lheading=function(Y){var J=this.rules.block.lheading.exec(Y);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},X.paragraph=function(Y){var J=this.rules.block.paragraph.exec(Y);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
|
|
`?J[1].slice(0,-1):J[1]}},X.text=function(Y,J){var ne=this.rules.block.text.exec(Y);if(ne){var re=J[J.length-1];return re&&re.type==="text"?{raw:ne[0],text:ne[0]}:{type:"text",raw:ne[0],text:ne[0]}}},X.escape=function(Y){var J=this.rules.inline.escape.exec(Y);if(J)return{type:"escape",raw:J[0],text:Z(J[1])}},X.tag=function(Y,J,ne){var re=this.rules.inline.tag.exec(Y);if(re)return!J&&/^<a /i.test(re[0])?J=!0:J&&/^<\/a>/i.test(re[0])&&(J=!1),!ne&&/^<(pre|code|kbd|script)(\s|>)/i.test(re[0])?ne=!0:ne&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(re[0])&&(ne=!1),{type:this.options.sanitize?"text":"html",raw:re[0],inLink:J,inRawBlock:ne,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):Z(re[0]):re[0]}},X.link=function(Y){var J=this.rules.inline.link.exec(Y);if(J){var ne=ue(J[2],"()");if(ne>-1){var re=J[0].indexOf("!")===0?5:4,ye=re+J[1].length+ne;J[2]=J[2].substring(0,ne),J[0]=J[0].substring(0,ye).trim(),J[3]=""}var be=J[2],Ne="";if(this.options.pedantic){var Ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(be);Ve?(be=Ve[1],Ne=Ve[3]):Ne=""}else Ne=J[3]?J[3].slice(1,-1):"";be=be.trim().replace(/^<([\s\S]*)>$/,"$1");var $e=ce(J,{href:be&&be.replace(this.rules.inline._escapes,"$1"),title:Ne&&Ne.replace(this.rules.inline._escapes,"$1")},J[0]);return $e}},X.reflink=function(Y,J){var ne;if((ne=this.rules.inline.reflink.exec(Y))||(ne=this.rules.inline.nolink.exec(Y))){var re=(ne[2]||ne[1]).replace(/\s+/g," ");if(re=J[re.toLowerCase()],!re||!re.href){var ye=ne[0].charAt(0);return{type:"text",raw:ye,text:ye}}var be=ce(ne,re,ne[0]);return be}},X.strong=function(Y,J,ne){ne===void 0&&(ne="");var re=this.rules.inline.strong.start.exec(Y);if(re&&(!re[1]||re[1]&&(ne===""||this.rules.inline.punctuation.exec(ne)))){J=J.slice(-1*Y.length);var ye=re[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ye.lastIndex=0;for(var be;(re=ye.exec(J))!=null;)if(be=this.rules.inline.strong.middle.exec(J.slice(0,re.index+3)),be)return{type:"strong",raw:Y.slice(0,be[0].length),text:Y.slice(2,be[0].length-2)}}},X.em=function(Y,J,ne){ne===void 0&&(ne="");var re=this.rules.inline.em.start.exec(Y);if(re&&(!re[1]||re[1]&&(ne===""||this.rules.inline.punctuation.exec(ne)))){J=J.slice(-1*Y.length);var ye=re[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ye.lastIndex=0;for(var be;(re=ye.exec(J))!=null;)if(be=this.rules.inline.em.middle.exec(J.slice(0,re.index+2)),be)return{type:"em",raw:Y.slice(0,be[0].length),text:Y.slice(1,be[0].length-1)}}},X.codespan=function(Y){var J=this.rules.inline.code.exec(Y);if(J){var ne=J[2].replace(/\n/g," "),re=/[^ ]/.test(ne),ye=ne.startsWith(" ")&&ne.endsWith(" ");return re&&ye&&(ne=ne.substring(1,ne.length-1)),ne=Z(ne,!0),{type:"codespan",raw:J[0],text:ne}}},X.br=function(Y){var J=this.rules.inline.br.exec(Y);if(J)return{type:"br",raw:J[0]}},X.del=function(Y){var J=this.rules.inline.del.exec(Y);if(J)return{type:"del",raw:J[0],text:J[1]}},X.autolink=function(Y,J){var ne=this.rules.inline.autolink.exec(Y);if(ne){var re,ye;return ne[2]==="@"?(re=Z(this.options.mangle?J(ne[1]):ne[1]),ye="mailto:"+re):(re=Z(ne[1]),ye=re),{type:"link",raw:ne[0],text:re,href:ye,tokens:[{type:"text",raw:re,text:re}]}}},X.url=function(Y,J){var ne;if(ne=this.rules.inline.url.exec(Y)){var re,ye;if(ne[2]==="@")re=Z(this.options.mangle?J(ne[0]):ne[0]),ye="mailto:"+re;else{var be;do be=ne[0],ne[0]=this.rules.inline._backpedal.exec(ne[0])[0];while(be!==ne[0]);re=Z(ne[0]),ne[1]==="www."?ye="http://"+re:ye=re}return{type:"link",raw:ne[0],text:re,href:ye,tokens:[{type:"text",raw:re,text:re}]}}},X.inlineText=function(Y,J,ne){var re=this.rules.inline.text.exec(Y);if(re){var ye;return J?ye=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(re[0]):Z(re[0]):re[0]:ye=Z(this.options.smartypants?ne(re[0]):re[0]),{type:"text",raw:re[0],text:ye}}},z}(),he=w.noopTest,we=w.edit,Pe=w.merge,de={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:he,table:he,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};de._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,de._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,de.def=we(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,de.item=we(de.item,"gm").replace(/bull/g,de.bullet).getRegex(),de.list=we(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._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",de._comment=/<!--(?!-?>)[\s\S]*?-->/,de.html=we(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=we(de._paragraph).replace("hr",de.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",de._tag).getRegex(),de.blockquote=we(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=Pe({},de),de.gfm=Pe({},de.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*|$)"}),de.gfm.nptable=we(de.gfm.nptable).replace("hr",de.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",de._tag).getRegex(),de.gfm.table=we(de.gfm.table).replace("hr",de.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",de._tag).getRegex(),de.pedantic=Pe({},de.normal,{html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de._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:he,paragraph:we(de.normal._paragraph).replace("hr",de.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var j={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:he,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:he,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};j._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",j.punctuation=we(j.punctuation).replace(/punctuation/g,j._punctuation).getRegex(),j._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",j._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",j.em.start=we(j.em.start).replace(/punctuation/g,j._punctuation).getRegex(),j.em.middle=we(j.em.middle).replace(/punctuation/g,j._punctuation).replace(/overlapSkip/g,j._overlapSkip).getRegex(),j.em.endAst=we(j.em.endAst,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.em.endUnd=we(j.em.endUnd,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.strong.start=we(j.strong.start).replace(/punctuation/g,j._punctuation).getRegex(),j.strong.middle=we(j.strong.middle).replace(/punctuation/g,j._punctuation).replace(/blockSkip/g,j._blockSkip).getRegex(),j.strong.endAst=we(j.strong.endAst,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.strong.endUnd=we(j.strong.endUnd,"g").replace(/punctuation/g,j._punctuation).getRegex(),j.blockSkip=we(j._blockSkip,"g").getRegex(),j.overlapSkip=we(j._overlapSkip,"g").getRegex(),j._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,j._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,j._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,j.autolink=we(j.autolink).replace("scheme",j._scheme).replace("email",j._email).getRegex(),j._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,j.tag=we(j.tag).replace("comment",de._comment).replace("attribute",j._attribute).getRegex(),j._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,j._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,j._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,j.link=we(j.link).replace("label",j._label).replace("href",j._href).replace("title",j._title).getRegex(),j.reflink=we(j.reflink).replace("label",j._label).getRegex(),j.reflinkSearch=we(j.reflinkSearch,"g").replace("reflink",j.reflink).replace("nolink",j.nolink).getRegex(),j.normal=Pe({},j),j.pedantic=Pe({},j.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",j._label).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j._label).getRegex()}),j.gfm=Pe({},j.normal,{escape:we(j.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),j.gfm.url=we(j.gfm.url,"i").replace("email",j.gfm._extended_email).getRegex(),j.breaks=Pe({},j.gfm,{br:we(j.br).replace("{2,}","*").getRegex(),text:we(j.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var O={block:de,inline:j},D=H.defaults,W=O.block,V=O.inline;function U(z){return z.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 le(z){var X="",ee,Y,J=z.length;for(ee=0;ee<J;ee++)Y=z.charCodeAt(ee),Math.random()>.5&&(Y="x"+Y.toString(16)),X+="&#"+Y+";";return X}var Oe=function(){function z(ee){this.tokens=[],this.tokens.links=Object.create(null),this.options=ee||D,this.options.tokenizer=this.options.tokenizer||new Ee,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Y={block:W.normal,inline:V.normal};this.options.pedantic?(Y.block=W.pedantic,Y.inline=V.pedantic):this.options.gfm&&(Y.block=W.gfm,this.options.breaks?Y.inline=V.breaks:Y.inline=V.gfm),this.tokenizer.rules=Y}z.lex=function(Y,J){var ne=new z(J);return ne.lex(Y)};var X=z.prototype;return X.lex=function(Y){return Y=Y.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(Y,this.tokens,!0),this.inline(this.tokens),this.tokens},X.blockTokens=function(Y,J,ne){J===void 0&&(J=[]),ne===void 0&&(ne=!0),Y=Y.replace(/^ +$/gm,"");for(var re,ye,be,Ne;Y;){if(re=this.tokenizer.space(Y)){Y=Y.substring(re.raw.length),re.type&&J.push(re);continue}if(re=this.tokenizer.code(Y,J)){Y=Y.substring(re.raw.length),re.type?J.push(re):(Ne=J[J.length-1],Ne.raw+=`
|
|
`+re.raw,Ne.text+=`
|
|
`+re.text);continue}if(re=this.tokenizer.fences(Y)){Y=Y.substring(re.raw.length),J.push(re);continue}if(re=this.tokenizer.heading(Y)){Y=Y.substring(re.raw.length),J.push(re);continue}if(re=this.tokenizer.nptable(Y)){Y=Y.substring(re.raw.length),J.push(re);continue}if(re=this.tokenizer.hr(Y)){Y=Y.substring(re.raw.length),J.push(re);continue}if(re=this.tokenizer.blockquote(Y)){Y=Y.substring(re.raw.length),re.tokens=this.blockTokens(re.text,[],ne),J.push(re);continue}if(re=this.tokenizer.list(Y)){for(Y=Y.substring(re.raw.length),be=re.items.length,ye=0;ye<be;ye++)re.items[ye].tokens=this.blockTokens(re.items[ye].text,[],!1);J.push(re);continue}if(re=this.tokenizer.html(Y)){Y=Y.substring(re.raw.length),J.push(re);continue}if(ne&&(re=this.tokenizer.def(Y))){Y=Y.substring(re.raw.length),this.tokens.links[re.tag]||(this.tokens.links[re.tag]={href:re.href,title:re.title});continue}if(re=this.tokenizer.table(Y)){Y=Y.substring(re.raw.length),J.push(re);continue}if(re=this.tokenizer.lheading(Y)){Y=Y.substring(re.raw.length),J.push(re);continue}if(ne&&(re=this.tokenizer.paragraph(Y))){Y=Y.substring(re.raw.length),J.push(re);continue}if(re=this.tokenizer.text(Y,J)){Y=Y.substring(re.raw.length),re.type?J.push(re):(Ne=J[J.length-1],Ne.raw+=`
|
|
`+re.raw,Ne.text+=`
|
|
`+re.text);continue}if(Y){var Ve="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(Ve);break}else throw new Error(Ve)}}return J},X.inline=function(Y){var J,ne,re,ye,be,Ne,Ve=Y.length;for(J=0;J<Ve;J++){Ne=Y[J];switch(Ne.type){case"paragraph":case"text":case"heading":{Ne.tokens=[],this.inlineTokens(Ne.text,Ne.tokens);break}case"table":{for(Ne.tokens={header:[],cells:[]},ye=Ne.header.length,ne=0;ne<ye;ne++)Ne.tokens.header[ne]=[],this.inlineTokens(Ne.header[ne],Ne.tokens.header[ne]);for(ye=Ne.cells.length,ne=0;ne<ye;ne++)for(be=Ne.cells[ne],Ne.tokens.cells[ne]=[],re=0;re<be.length;re++)Ne.tokens.cells[ne][re]=[],this.inlineTokens(be[re],Ne.tokens.cells[ne][re]);break}case"blockquote":{this.inline(Ne.tokens);break}case"list":{for(ye=Ne.items.length,ne=0;ne<ye;ne++)this.inline(Ne.items[ne].tokens);break}}}return Y},X.inlineTokens=function(Y,J,ne,re,ye){J===void 0&&(J=[]),ne===void 0&&(ne=!1),re===void 0&&(re=!1),ye===void 0&&(ye="");var be,Ne=Y,Ve;if(this.tokens.links){var $e=Object.keys(this.tokens.links);if($e.length>0)for(;(Ve=this.tokenizer.rules.inline.reflinkSearch.exec(Ne))!=null;)$e.includes(Ve[0].slice(Ve[0].lastIndexOf("[")+1,-1))&&(Ne=Ne.slice(0,Ve.index)+"["+"a".repeat(Ve[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ve=this.tokenizer.rules.inline.blockSkip.exec(Ne))!=null;)Ne=Ne.slice(0,Ve.index)+"["+"a".repeat(Ve[0].length-2)+"]"+Ne.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Y;){if(be=this.tokenizer.escape(Y)){Y=Y.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.tag(Y,ne,re)){Y=Y.substring(be.raw.length),ne=be.inLink,re=be.inRawBlock,J.push(be);continue}if(be=this.tokenizer.link(Y)){Y=Y.substring(be.raw.length),be.type==="link"&&(be.tokens=this.inlineTokens(be.text,[],!0,re)),J.push(be);continue}if(be=this.tokenizer.reflink(Y,this.tokens.links)){Y=Y.substring(be.raw.length),be.type==="link"&&(be.tokens=this.inlineTokens(be.text,[],!0,re)),J.push(be);continue}if(be=this.tokenizer.strong(Y,Ne,ye)){Y=Y.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],ne,re),J.push(be);continue}if(be=this.tokenizer.em(Y,Ne,ye)){Y=Y.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],ne,re),J.push(be);continue}if(be=this.tokenizer.codespan(Y)){Y=Y.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.br(Y)){Y=Y.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.del(Y)){Y=Y.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],ne,re),J.push(be);continue}if(be=this.tokenizer.autolink(Y,le)){Y=Y.substring(be.raw.length),J.push(be);continue}if(!ne&&(be=this.tokenizer.url(Y,le))){Y=Y.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.inlineText(Y,re,U)){Y=Y.substring(be.raw.length),ye=be.raw.slice(-1),J.push(be);continue}if(Y){var Je="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(Je);break}else throw new Error(Je)}}return J},k(z,null,[{key:"rules",get:function(){return{block:W,inline:V}}}]),z}(),Me=H.defaults,ie=w.cleanUrl,pe=w.escape,_e=function(){function z(ee){this.options=ee||Me}var X=z.prototype;return X.code=function(Y,J,ne){var re=(J||"").match(/\S*/)[0];if(this.options.highlight){var ye=this.options.highlight(Y,re);ye!=null&&ye!==Y&&(ne=!0,Y=ye)}return re?'<pre><code class="'+this.options.langPrefix+pe(re,!0)+'">'+(ne?Y:pe(Y,!0))+`</code></pre>
|
|
`:"<pre><code>"+(ne?Y:pe(Y,!0))+`</code></pre>
|
|
`},X.blockquote=function(Y){return`<blockquote>
|
|
`+Y+`</blockquote>
|
|
`},X.html=function(Y){return Y},X.heading=function(Y,J,ne,re){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+re.slug(ne)+'">'+Y+"</h"+J+`>
|
|
`:"<h"+J+">"+Y+"</h"+J+`>
|
|
`},X.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},X.list=function(Y,J,ne){var re=J?"ol":"ul",ye=J&&ne!==1?' start="'+ne+'"':"";return"<"+re+ye+`>
|
|
`+Y+"</"+re+`>
|
|
`},X.listitem=function(Y){return"<li>"+Y+`</li>
|
|
`},X.checkbox=function(Y){return"<input "+(Y?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},X.paragraph=function(Y){return"<p>"+Y+`</p>
|
|
`},X.table=function(Y,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
|
|
<thead>
|
|
`+Y+`</thead>
|
|
`+J+`</table>
|
|
`},X.tablerow=function(Y){return`<tr>
|
|
`+Y+`</tr>
|
|
`},X.tablecell=function(Y,J){var ne=J.header?"th":"td",re=J.align?"<"+ne+' align="'+J.align+'">':"<"+ne+">";return re+Y+"</"+ne+`>
|
|
`},X.strong=function(Y){return"<strong>"+Y+"</strong>"},X.em=function(Y){return"<em>"+Y+"</em>"},X.codespan=function(Y){return"<code>"+Y+"</code>"},X.br=function(){return this.options.xhtml?"<br/>":"<br>"},X.del=function(Y){return"<del>"+Y+"</del>"},X.link=function(Y,J,ne){if(Y=ie(this.options.sanitize,this.options.baseUrl,Y),Y===null)return ne;var re='<a href="'+pe(Y)+'"';return J&&(re+=' title="'+J+'"'),re+=">"+ne+"</a>",re},X.image=function(Y,J,ne){if(Y=ie(this.options.sanitize,this.options.baseUrl,Y),Y===null)return ne;var re='<img src="'+Y+'" alt="'+ne+'"';return J&&(re+=' title="'+J+'"'),re+=this.options.xhtml?"/>":">",re},X.text=function(Y){return Y},z}(),Ae=function(){function z(){}var X=z.prototype;return X.strong=function(Y){return Y},X.em=function(Y){return Y},X.codespan=function(Y){return Y},X.del=function(Y){return Y},X.html=function(Y){return Y},X.text=function(Y){return Y},X.link=function(Y,J,ne){return""+ne},X.image=function(Y,J,ne){return""+ne},X.br=function(){return""},z}(),Ke=function(){function z(){this.seen={}}var X=z.prototype;return X.slug=function(Y){var J=Y.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(J)){var ne=J;do this.seen[ne]++,J=ne+"-"+this.seen[ne];while(this.seen.hasOwnProperty(J))}return this.seen[J]=0,J},z}(),ze=H.defaults,Ze=w.unescape,Ye=function(){function z(ee){this.options=ee||ze,this.options.renderer=this.options.renderer||new _e,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ae,this.slugger=new Ke}z.parse=function(Y,J){var ne=new z(J);return ne.parse(Y)};var X=z.prototype;return X.parse=function(Y,J){J===void 0&&(J=!0);var ne="",re,ye,be,Ne,Ve,$e,Je,Ct,dt,rt,Dt,Ot,St,Kt,gt,Lt,Pt,bt,Qt=Y.length;for(re=0;re<Qt;re++){rt=Y[re];switch(rt.type){case"space":continue;case"hr":{ne+=this.renderer.hr();continue}case"heading":{ne+=this.renderer.heading(this.parseInline(rt.tokens),rt.depth,Ze(this.parseInline(rt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ne+=this.renderer.code(rt.text,rt.lang,rt.escaped);continue}case"table":{for(Ct="",Je="",Ne=rt.header.length,ye=0;ye<Ne;ye++)Je+=this.renderer.tablecell(this.parseInline(rt.tokens.header[ye]),{header:!0,align:rt.align[ye]});for(Ct+=this.renderer.tablerow(Je),dt="",Ne=rt.cells.length,ye=0;ye<Ne;ye++){for($e=rt.tokens.cells[ye],Je="",Ve=$e.length,be=0;be<Ve;be++)Je+=this.renderer.tablecell(this.parseInline($e[be]),{header:!1,align:rt.align[be]});dt+=this.renderer.tablerow(Je)}ne+=this.renderer.table(Ct,dt);continue}case"blockquote":{dt=this.parse(rt.tokens),ne+=this.renderer.blockquote(dt);continue}case"list":{for(Dt=rt.ordered,Ot=rt.start,St=rt.loose,Ne=rt.items.length,dt="",ye=0;ye<Ne;ye++)gt=rt.items[ye],Lt=gt.checked,Pt=gt.task,Kt="",gt.task&&(bt=this.renderer.checkbox(Lt),St?gt.tokens.length>0&>.tokens[0].type==="text"?(gt.tokens[0].text=bt+" "+gt.tokens[0].text,gt.tokens[0].tokens&>.tokens[0].tokens.length>0&>.tokens[0].tokens[0].type==="text"&&(gt.tokens[0].tokens[0].text=bt+" "+gt.tokens[0].tokens[0].text)):gt.tokens.unshift({type:"text",text:bt}):Kt+=bt),Kt+=this.parse(gt.tokens,St),dt+=this.renderer.listitem(Kt,Pt,Lt);ne+=this.renderer.list(dt,Dt,Ot);continue}case"html":{ne+=this.renderer.html(rt.text);continue}case"paragraph":{ne+=this.renderer.paragraph(this.parseInline(rt.tokens));continue}case"text":{for(dt=rt.tokens?this.parseInline(rt.tokens):rt.text;re+1<Qt&&Y[re+1].type==="text";)rt=Y[++re],dt+=`
|
|
`+(rt.tokens?this.parseInline(rt.tokens):rt.text);ne+=J?this.renderer.paragraph(dt):dt;continue}default:{var at='Token with "'+rt.type+'" type was not found.';if(this.options.silent){console.error(at);return}else throw new Error(at)}}}return ne},X.parseInline=function(Y,J){J=J||this.renderer;var ne="",re,ye,be=Y.length;for(re=0;re<be;re++){ye=Y[re];switch(ye.type){case"escape":{ne+=J.text(ye.text);break}case"html":{ne+=J.html(ye.text);break}case"link":{ne+=J.link(ye.href,ye.title,this.parseInline(ye.tokens,J));break}case"image":{ne+=J.image(ye.href,ye.title,ye.text);break}case"strong":{ne+=J.strong(this.parseInline(ye.tokens,J));break}case"em":{ne+=J.em(this.parseInline(ye.tokens,J));break}case"codespan":{ne+=J.codespan(ye.text);break}case"br":{ne+=J.br();break}case"del":{ne+=J.del(this.parseInline(ye.tokens,J));break}case"text":{ne+=J.text(ye.text);break}default:{var Ne='Token with "'+ye.type+'" type was not found.';if(this.options.silent){console.error(Ne);return}else throw new Error(Ne)}}}return ne},z}(),it=w.merge,tt=w.checkSanitizeDeprecation,Te=w.escape,Ie=H.getDefaults,ke=H.changeDefaults,We=H.defaults;function $(z,X,ee){if(typeof z=="undefined"||z===null)throw new Error("marked(): input parameter is undefined or null");if(typeof z!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(z)+", string expected");if(typeof X=="function"&&(ee=X,X=null),X=it({},$.defaults,X||{}),tt(X),ee){var Y=X.highlight,J;try{J=Oe.lex(z,X)}catch(be){return ee(be)}var ne=function(Ne){var Ve;if(!Ne)try{Ve=Ye.parse(J,X)}catch($e){Ne=$e}return X.highlight=Y,Ne?ee(Ne):ee(null,Ve)};if(!Y||Y.length<3)return ne();if(delete X.highlight,!J.length)return ne();var re=0;$.walkTokens(J,function(be){be.type==="code"&&(re++,setTimeout(function(){Y(be.text,be.lang,function(Ne,Ve){if(Ne)return ne(Ne);Ve!=null&&Ve!==be.text&&(be.text=Ve,be.escaped=!0),re--,re===0&&ne()})},0))}),re===0&&ne();return}try{var ye=Oe.lex(z,X);return X.walkTokens&&$.walkTokens(ye,X.walkTokens),Ye.parse(ye,X)}catch(be){if(be.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,X.silent)return"<p>An error occurred:</p><pre>"+Te(be.message+"",!0)+"</pre>";throw be}}$.options=$.setOptions=function(z){return it($.defaults,z),ke($.defaults),$},$.getDefaults=Ie,$.defaults=We,$.use=function(z){var X=it({},z);if(z.renderer&&function(){var Y=$.defaults.renderer||new _e,J=function(ye){var be=Y[ye];Y[ye]=function(){for(var Ne=arguments.length,Ve=new Array(Ne),$e=0;$e<Ne;$e++)Ve[$e]=arguments[$e];var Je=z.renderer[ye].apply(Y,Ve);return Je===!1&&(Je=be.apply(Y,Ve)),Je}};for(var ne in z.renderer)J(ne);X.renderer=Y}(),z.tokenizer&&function(){var Y=$.defaults.tokenizer||new Ee,J=function(ye){var be=Y[ye];Y[ye]=function(){for(var Ne=arguments.length,Ve=new Array(Ne),$e=0;$e<Ne;$e++)Ve[$e]=arguments[$e];var Je=z.tokenizer[ye].apply(Y,Ve);return Je===!1&&(Je=be.apply(Y,Ve)),Je}};for(var ne in z.tokenizer)J(ne);X.tokenizer=Y}(),z.walkTokens){var ee=$.defaults.walkTokens;X.walkTokens=function(Y){z.walkTokens(Y),ee&&ee(Y)}}$.setOptions(X)},$.walkTokens=function(z,X){for(var ee=p(z),Y;!(Y=ee()).done;){var J=Y.value;X(J);switch(J.type){case"table":{for(var ne=p(J.tokens.header),re;!(re=ne()).done;){var ye=re.value;$.walkTokens(ye,X)}for(var be=p(J.tokens.cells),Ne;!(Ne=be()).done;)for(var Ve=Ne.value,$e=p(Ve),Je;!(Je=$e()).done;){var Ct=Je.value;$.walkTokens(Ct,X)}break}case"list":{$.walkTokens(J.items,X);break}default:J.tokens&&$.walkTokens(J.tokens,X)}}},$.Parser=Ye,$.parser=Ye.parse,$.Renderer=_e,$.TextRenderer=Ae,$.Lexer=Oe,$.lexer=Oe.lex,$.Tokenizer=Ee,$.Slugger=Ke,$.parse=$;var K=$;return K})},FOrL:function(Be,oe,M){Be.exports=M.p+"static/nodata.a6b3f948.png"},FWmy:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return te});function te(k,R){if(!k)throw new Error(R?`Assertion failed (${R})`:"Assertion Failed")}},IBYe:function(Be,oe,M){"use strict";function te(k){return null}oe.a=te},JAbv:function(Be,oe){Be.exports="data:image/png;base64,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"},JYp7:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return te});var te;(function(k){function R(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}k.is=R;const B=Object.freeze([]);function p(){return B}k.empty=p;function*C(t){yield t}k.single=C;function H(t){return t||B}k.from=H;function N(t){return!t||t[Symbol.iterator]().next().done===!0}k.isEmpty=N;function e(t){return t[Symbol.iterator]().next().value}k.first=e;function A(t,_){for(const b of t)if(_(b))return!0;return!1}k.some=A;function g(t,_){for(const b of t)if(_(b))return b;return}k.find=g;function*m(t,_){for(const b of t)_(b)&&(yield b)}k.filter=m;function*u(t,_){let b=0;for(const v of t)yield _(v,b++)}k.map=u;function*a(...t){for(const _ of t)for(const b of _)yield b}k.concat=a;function*r(t){for(const _ of t)for(const b of _)yield b}k.concatNested=r;function o(t,_,b){let v=b;for(const x of t)v=_(v,x);return v}k.reduce=o;function*s(t,_,b=t.length){for(_<0&&(_+=t.length),b<0?b+=t.length:b>t.length&&(b=t.length);_<b;_++)yield t[_]}k.slice=s;function i(t,_=Number.POSITIVE_INFINITY){const b=[];if(_===0)return[b,t];const v=t[Symbol.iterator]();for(let x=0;x<_;x++){const E=v.next();if(E.done)return[b,k.empty()];b.push(E.value)}return[b,{[Symbol.iterator](){return v}}]}k.consume=i;function n(t,_,b=(v,x)=>v===x){const v=t[Symbol.iterator](),x=_[Symbol.iterator]();for(;;){const E=v.next(),h=x.next();if(E.done!==h.done)return!1;if(E.done)return!0;if(!b(E.value,h.value))return!1}}k.equals=n})(te||(te={}))},KOXS:function(Be,oe,M){Be.exports={flex_box_center:"flex_box_center___4BHX-",flex_space_between:"flex_space_between___fH2oM",flex_box_vertical_center:"flex_box_vertical_center___TgSS9",flex_box_center_end:"flex_box_center_end___1vKaD",flex_box_column:"flex_box_column___1kCgI",input:"input___2mV-b",dropdown:"dropdown___1QKW2",menu:"menu___37CBn",text:"text___159fF",b1:"b1___2uGyF",b2:"b2___2DXw1"}},LdHM:function(Be,oe,M){"use strict";M.d(oe,"b",function(){return t}),M.d(oe,"a",function(){return b});var te=M("1OyB"),k=M("vuIU"),R=M("Ji7U"),B=M("LK+K"),p=M("q1tI"),C=M("rePB"),H=M("Ff2n"),N=M("ODXe"),e=M("4IlW"),A=M("bX4T"),g=M("YrtM"),m=M("TSYQ"),u=M.n(m),a=M("+nKL"),r=M("8OUc"),o=function(G,Z){var ue=G.prefixCls,ce=G.id,Re=G.flattenOptions,Ee=G.childrenAsData,he=G.values,we=G.searchValue,Pe=G.multiple,de=G.defaultActiveFirstOption,j=G.height,O=G.itemHeight,D=G.notFoundContent,W=G.open,V=G.menuItemSelectedIcon,U=G.virtual,le=G.onSelect,Oe=G.onToggleOpen,Me=G.onActiveValue,ie=G.onScroll,pe=G.onMouseEnter,_e="".concat(ue,"-item"),Ae=Object(g.a)(function(){return Re},[W,Re],function(K,z){return z[0]&&K[1]!==z[1]}),Ke=p.useRef(null),ze=function(z){z.preventDefault()},Ze=function(z){Ke.current&&Ke.current.scrollTo({index:z})},Ye=function(z){for(var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ee=Ae.length,Y=0;Y<ee;Y+=1){var J=(z+Y*X+ee)%ee,ne=Ae[J],re=ne.group,ye=ne.data;if(!re&&!ye.disabled)return J}return-1},it=p.useState(function(){return Ye(0)}),tt=Object(N.a)(it,2),Te=tt[0],Ie=tt[1],ke=function(z){Ie(z);var X=Ae[z];if(!X){Me(null,-1);return}Me(X.data.value,z)};p.useEffect(function(){ke(de!==!1?Ye(0):-1)},[Ae.length,we]),p.useEffect(function(){var K=setTimeout(function(){if(!Pe&&W&&he.size===1){var z=Array.from(he)[0],X=Ae.findIndex(function(ee){var Y=ee.data;return Y.value===z});ke(X),Ze(X)}});return function(){return clearTimeout(K)}},[W]);var We=function(z){z!==void 0&&le(z,{selected:!he.has(z)}),Pe||Oe(!1)};if(p.useImperativeHandle(Z,function(){return{onKeyDown:function(z){var X=z.which;switch(X){case e.a.UP:case e.a.DOWN:{var ee=0;if(X===e.a.UP?ee=-1:X===e.a.DOWN&&(ee=1),ee!==0){var Y=Ye(Te+ee,ee);Ze(Y),ke(Y)}break}case e.a.ENTER:{var J=Ae[Te];J&&!J.data.disabled?We(J.data.value):We(void 0),W&&z.preventDefault();break}case e.a.ESC:Oe(!1)}},onKeyUp:function(){},scrollTo:function(z){Ze(z)}}}),Ae.length===0)return p.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),className:"".concat(_e,"-empty"),onMouseDown:ze},D);function $(K){var z=Ae[K];if(!z)return null;var X=z.data||{},ee=X.value,Y=X.label,J=X.children,ne=Object(A.a)(X,!0),re=Ee?J:Y;return z?p.createElement("div",Object.assign({"aria-label":typeof re=="string"?re:null},ne,{key:K,role:"option",id:"".concat(ce,"_list_").concat(K),"aria-selected":he.has(ee)}),ee):null}return p.createElement(p.Fragment,null,p.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),style:{height:0,width:0,overflow:"hidden"}},$(Te-1),$(Te),$(Te+1)),p.createElement(a.a,{itemKey:"key",ref:Ke,data:Ae,height:j,itemHeight:O,fullHeight:!1,onMouseDown:ze,onScroll:ie,virtual:U,onMouseEnter:pe},function(K,z){var X,ee=K.group,Y=K.groupOption,J=K.data,ne=J.label,re=J.key;if(ee)return p.createElement("div",{className:u()(_e,"".concat(_e,"-group"))},ne!==void 0?ne:re);var ye=J.disabled,be=J.value,Ne=J.title,Ve=J.children,$e=J.style,Je=J.className,Ct=Object(H.a)(J,["disabled","value","title","children","style","className"]),dt=he.has(be),rt="".concat(_e,"-option"),Dt=u()(_e,rt,Je,(X={},Object(C.a)(X,"".concat(rt,"-grouped"),Y),Object(C.a)(X,"".concat(rt,"-active"),Te===z&&!ye),Object(C.a)(X,"".concat(rt,"-disabled"),ye),Object(C.a)(X,"".concat(rt,"-selected"),dt),X)),Ot=Ee?Ve:ne,St=!V||typeof V=="function"||dt;return p.createElement("div",Object.assign({},Ct,{"aria-selected":dt,className:Dt,title:Ne,onMouseMove:function(){if(Te===z||ye)return;ke(z)},onClick:function(){ye||We(be)},style:$e}),p.createElement("div",{className:"".concat(rt,"-content")},Ot||be),p.isValidElement(V)||dt,St&&p.createElement(r.a,{className:"".concat(_e,"-option-state"),customizeIcon:V,customizeIconProps:{isSelected:dt}},dt?"\u2713":null))}))},s=p.forwardRef(o);s.displayName="OptionList";var i=s,n=function(){return null};n.isSelectOption=!0;var t=n,_=function(){return null};_.isSelectOptGroup=!0;var b=_,v=M("VTBJ"),x=M("Zm9Q");function E(L){var G=L.key,Z=L.props,ue=Z.children,ce=Z.value,Re=Object(H.a)(Z,["children","value"]);return Object(v.a)({key:G,value:ce!==void 0?ce:G,children:ue},Re)}function h(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(L).map(function(Z,ue){if(!p.isValidElement(Z)||!Z.type)return null;var ce=Z.type.isSelectOptGroup,Re=Z.key,Ee=Z.props,he=Ee.children,we=Object(H.a)(Ee,["children"]);return G||!ce?E(Z):Object(v.a)(Object(v.a)({key:"__RC_SELECT_GRP__".concat(Re===null?ue:Re,"__"),label:Re},we),{},{options:h(he)})}).filter(function(Z){return Z})}var d=M("2Qr1"),l=M("qNPg"),c=M("U8pU"),y=M("Kwbf"),f=M("WKfj");function T(L){var G=L.mode,Z=L.options,ue=L.children,ce=L.backfill,Re=L.allowClear,Ee=L.placeholder,he=L.getInputElement,we=L.showSearch,Pe=L.onSearch,de=L.defaultOpen,j=L.autoFocus,O=L.labelInValue,D=L.value,W=L.inputValue,V=L.optionLabelProp,U=G==="multiple"||G==="tags",le=we!==void 0?we:U||G==="combobox",Oe=Z||h(ue);if(Object(y.a)(G!=="tags"||Oe.every(function(_e){return!_e.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var Me=Oe.some(function(_e){return _e.options?_e.options.some(function(Ae){return typeof("value"in Ae?Ae.value:Ae.key)=="number"}):typeof("value"in _e?_e.value:_e.key)=="number"});Object(y.a)(!Me,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(y.a)(G!=="combobox"||!V,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(y.a)(G==="combobox"||!ce,"`backfill` only works with `combobox` mode."),Object(y.a)(G==="combobox"||!he,"`getInputElement` only work with `combobox` mode."),Object(y.b)(G!=="combobox"||!he||!Re||!Ee,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Pe&&!le&&G!=="combobox"&&G!=="tags"&&Object(y.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(y.b)(!de||j,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),D!=null){var ie=Object(f.d)(D);Object(y.a)(!O||ie.every(function(_e){return Object(c.a)(_e)==="object"&&("key"in _e||"value"in _e)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(y.a)(!U||Array.isArray(D),"`value` should be array when `mode` is `multiple` or `tags`")}if(ue){var pe=null;Object(x.a)(ue).some(function(_e){if(!p.isValidElement(_e)||!_e.type)return!1;var Ae=_e.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var Ke=Object(x.a)(_e.props.children).every(function(ze){return!p.isValidElement(ze)||!_e.type||ze.type.isSelectOption?!0:(pe=ze.type,!1)});return!Ke}return pe=Ae,!0}),pe&&Object(y.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(pe.displayName||pe.name||pe,"`.")),Object(y.a)(W===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=T,P=Object(l.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:h,flattenOptions:d.d,getLabeledValue:d.e,filterOptions:d.b,isValueDisabled:d.g,findValueOption:d.c,warningProps:I,fillOptionsWithMissingValue:d.a}),S=function(L){Object(R.a)(Z,L);var G=Object(B.a)(Z);function Z(){var ue;return Object(te.a)(this,Z),ue=G.apply(this,arguments),ue.selectRef=p.createRef(),ue.focus=function(){ue.selectRef.current.focus()},ue.blur=function(){ue.selectRef.current.blur()},ue}return Object(k.a)(Z,[{key:"render",value:function(){return p.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),Z}(p.Component);S.Option=t,S.OptGroup=b;var w=S,F=oe.c=w},MEgm:function(Be,oe){Be.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+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="},MI8n:function(Be,oe,M){"use strict";M.d(oe,"c",function(){return p}),M.d(oe,"b",function(){return e}),M.d(oe,"e",function(){return A}),M.d(oe,"a",function(){return g}),M.d(oe,"d",function(){return m}),M.d(oe,"f",function(){return u});var te=M("/cxE"),k=M("pmY6"),R=M("24hK"),B=M("5Y4S"),p;(function(a){a.None=()=>k.a.None;function r(T){return(I,P=null,S)=>{let w=!1,F;return F=T(L=>w?void 0:(F?F.dispose():w=!0,I.call(P,L)),null,S),w&&F.dispose(),F}}a.once=r;function o(T,I){return b((P,S=null,w)=>T(F=>P.call(S,I(F)),null,w))}a.map=o;function s(T,I){return b((P,S=null,w)=>T(F=>{I(F),P.call(S,F)},null,w))}a.forEach=s;function i(T,I){return b((P,S=null,w)=>T(F=>I(F)&&P.call(S,F),null,w))}a.filter=i;function n(T){return T}a.signal=n;function t(...T){return(I,P=null,S)=>Object(k.e)(...T.map(w=>w(F=>I.call(P,F),null,S)))}a.any=t;function _(T,I,P){let S=P;return o(T,w=>(S=I(S,w),S))}a.reduce=_;function b(T){let I;const P=new e({onFirstListenerAdd(){I=T(P.fire,P)},onLastListenerRemove(){I.dispose()}});return P.event}function v(T,I,P=100,S=!1,w){let F,L,G,Z=0;const ue=new e({leakWarningThreshold:w,onFirstListenerAdd(){F=T(ce=>{Z++,L=I(L,ce),S&&!G&&(ue.fire(L),L=void 0),clearTimeout(G),G=setTimeout(()=>{const Re=L;L=void 0,G=void 0,(!S||Z>1)&&ue.fire(Re),Z=0},P)})},onLastListenerRemove(){F.dispose()}});return ue.event}a.debounce=v;function x(T,I=(P,S)=>P===S){let P=!0,S;return i(T,w=>{const F=P||!I(w,S);return P=!1,S=w,F})}a.latch=x;function E(T,I){return[a.filter(T,I),a.filter(T,P=>!I(P))]}a.split=E;function h(T,I=!1,P=[]){let S=P.slice(),w=T(G=>{S?S.push(G):L.fire(G)});const F=()=>{S&&S.forEach(G=>L.fire(G)),S=null},L=new e({onFirstListenerAdd(){w||(w=T(G=>L.fire(G)))},onFirstListenerDidAdd(){S&&(I?setTimeout(F):F())},onLastListenerRemove(){w&&w.dispose(),w=null}});return L.event}a.buffer=h;class d{constructor(T){this.event=T}map(T){return new d(o(this.event,T))}forEach(T){return new d(s(this.event,T))}filter(T){return new d(i(this.event,T))}reduce(T,I){return new d(_(this.event,T,I))}latch(){return new d(x(this.event))}debounce(T,I=100,P=!1,S){return new d(v(this.event,T,I,P,S))}on(T,I,P){return this.event(T,I,P)}once(T,I,P){return r(this.event)(T,I,P)}}function l(T){return new d(T)}a.chain=l;function c(T,I,P=S=>S){const S=(...G)=>L.fire(P(...G)),w=()=>T.on(I,S),F=()=>T.removeListener(I,S),L=new e({onFirstListenerAdd:w,onLastListenerRemove:F});return L.event}a.fromNodeEventEmitter=c;function y(T,I,P=S=>S){const S=(...G)=>L.fire(P(...G)),w=()=>T.addEventListener(I,S),F=()=>T.removeEventListener(I,S),L=new e({onFirstListenerAdd:w,onLastListenerRemove:F});return L.event}a.fromDOMEventEmitter=y;function f(T){return new Promise(I=>r(T)(I))}a.toPromise=f})(p||(p={}));class C{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${C._idPool++}`}start(a){this._stopWatch=new B.a(!0),this._listenerCount=a}stop(){if(this._stopWatch){const a=this._stopWatch.elapsed();this._elapsedOverall+=a,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${a.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}C._idPool=0;let H=-1;class N{constructor(a,r=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=r,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let r=H;if(typeof this.customThreshold=="number"&&(r=this.customThreshold),r<=0||a<r)return;this._stacks||(this._stacks=new Map);const o=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),s=this._stacks.get(o)||0;if(this._stacks.set(o,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let i,n=0;for(const[t,_]of this._stacks)(!i||n<_)&&(i=t,n=_);console.warn(`[${this.name}] potential listener LEAK detected, having ${a} listeners already. MOST frequent listener (${n}):`),console.warn(i)}return()=>{const i=this._stacks.get(o)||0;this._stacks.set(o,i-1)}}}class e{constructor(a){var r;this._disposed=!1,this._options=a,this._leakageMon=H>0?new N(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new C(this._options._profName):void 0}get event(){return this._event||(this._event=(a,r,o)=>{var s;this._listeners||(this._listeners=new R.a);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const n=this._listeners.push(r?[a,r]:a);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,r);const t=(s=this._leakageMon)===null||s===void 0?void 0:s.check(this._listeners.size),_=Object(k.i)(()=>{if(t&&t(),!this._disposed&&(n(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return o instanceof k.b?o.add(_):Array.isArray(o)&&o.push(_),_}),this._event}fire(a){var r,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new R.a);for(let s of this._listeners)this._deliveryQueue.push([s,a]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,i]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,i):s[0].call(s[1],i)}catch(n){Object(te.f)(n)}}(o=this._perfMon)===null||o===void 0||o.stop()}}dispose(){var a,r,o,s,i;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(s=(o=this._options)===null||o===void 0?void 0:o.onLastListenerRemove)===null||s===void 0||s.call(o),(i=this._leakageMon)===null||i===void 0||i.dispose())}}class A extends e{constructor(a){super(a);this._isPaused=0,this._eventQueue=new R.a,this._mergeFn=a==null?void 0:a.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const a=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(a))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(a){this._listeners&&(this._isPaused!==0?this._eventQueue.push(a):super.fire(a))}}class g extends A{constructor(a){var r;super(a);this._delay=(r=a.delay)!==null&&r!==void 0?r:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}class m{constructor(){this.buffers=[]}wrapEvent(a){return(r,o,s)=>a(i=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>r.call(o,i)):r.call(o,i)},void 0,s)}bufferEvents(a){const r=[];this.buffers.push(r);const o=a();return this.buffers.pop(),r.forEach(s=>s()),o}}class u{constructor(){this.listening=!1,this.inputEvent=p.None,this.inputEventListener=k.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Be,oe,M){"use strict";(function(te,k){M.d(oe,"b",function(){return o}),M.d(oe,"i",function(){return t}),M.d(oe,"f",function(){return _}),M.d(oe,"d",function(){return b}),M.d(oe,"g",function(){return v}),M.d(oe,"h",function(){return x}),M.d(oe,"c",function(){return E}),M.d(oe,"k",function(){return h}),M.d(oe,"j",function(){return d}),M.d(oe,"a",function(){return l}),M.d(oe,"e",function(){return f});var R;const B="en";let p=!1,C=!1,H=!1,N=!1,e=!1,A=!1,g=!1,m,u=B,a,r;const o=typeof self=="object"?self:typeof te=="object"?te:{};let s;typeof o.vscode!="undefined"&&typeof o.vscode.process!="undefined"?s=o.vscode.process:typeof k!="undefined"&&(s=k);const i=typeof((R=s==null?void 0:s.versions)===null||R===void 0?void 0:R.electron)=="string"&&s.type==="renderer";if(typeof navigator=="object"&&!i)r=navigator.userAgent,p=r.indexOf("Windows")>=0,C=r.indexOf("Macintosh")>=0,g=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=r.indexOf("Linux")>=0,A=!0,m=navigator.language,u=m;else if(typeof s=="object"){p=s.platform==="win32",C=s.platform==="darwin",H=s.platform==="linux",N=H&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,m=B,u=B;const T=s.env.VSCODE_NLS_CONFIG;if(T)try{const I=JSON.parse(T),P=I.availableLanguages["*"];m=I.locale,u=P||B,a=I._translationsConfigFile}catch(I){}e=!0}else console.error("Unable to resolve platform.");let n=0;C?n=1:p?n=3:H&&(n=2);const t=p,_=C,b=H,v=e,x=A,E=g,h=r,d=function(){if(o.setImmediate)return o.setImmediate.bind(o);if(typeof o.postMessage=="function"&&!o.importScripts){let P=[];o.addEventListener("message",w=>{if(w.data&&w.data.vscodeSetImmediateId)for(let F=0,L=P.length;F<L;F++){const G=P[F];if(G.id===w.data.vscodeSetImmediateId){P.splice(F,1),G.callback();return}}});let S=0;return w=>{const F=++S;P.push({id:F,callback:w}),o.postMessage({vscodeSetImmediateId:F},"*")}}if(typeof(s==null?void 0:s.nextTick)=="function")return s.nextTick.bind(s);const I=Promise.resolve();return P=>I.then(P)}(),l=C||g?2:p?1:3;let c=!0,y=!1;function f(){if(!y){y=!0;const T=new Uint8Array(2);T[0]=1,T[1]=2;const I=new Uint16Array(T.buffer);c=I[0]===(2<<8)+1}return c}}).call(this,M("IyRk"),M("Q2Ig"))},N0LK:function(Be,oe,M){"use strict";M.d(oe,"C",function(){return te}),M.d(oe,"v",function(){return R}),M.d(oe,"s",function(){return B}),M.d(oe,"t",function(){return p}),M.d(oe,"U",function(){return C}),M.d(oe,"J",function(){return H}),M.d(oe,"O",function(){return N}),M.d(oe,"p",function(){return e}),M.d(oe,"T",function(){return A}),M.d(oe,"q",function(){return g}),M.d(oe,"N",function(){return m}),M.d(oe,"M",function(){return u}),M.d(oe,"Q",function(){return a}),M.d(oe,"u",function(){return r}),M.d(oe,"x",function(){return o}),M.d(oe,"I",function(){return s}),M.d(oe,"f",function(){return i}),M.d(oe,"h",function(){return n}),M.d(oe,"g",function(){return t}),M.d(oe,"i",function(){return _}),M.d(oe,"G",function(){return b}),M.d(oe,"H",function(){return v}),M.d(oe,"r",function(){return x}),M.d(oe,"R",function(){return E}),M.d(oe,"d",function(){return h}),M.d(oe,"e",function(){return d}),M.d(oe,"E",function(){return l}),M.d(oe,"F",function(){return c}),M.d(oe,"j",function(){return y}),M.d(oe,"z",function(){return f}),M.d(oe,"K",function(){return I}),M.d(oe,"L",function(){return P}),M.d(oe,"m",function(){return w}),M.d(oe,"k",function(){return L}),M.d(oe,"A",function(){return Z}),M.d(oe,"a",function(){return ue}),M.d(oe,"n",function(){return ce}),M.d(oe,"l",function(){return Re}),M.d(oe,"D",function(){return Ee}),M.d(oe,"B",function(){return he}),M.d(oe,"b",function(){return we}),M.d(oe,"S",function(){return Pe}),M.d(oe,"o",function(){return de}),M.d(oe,"P",function(){return j}),M.d(oe,"w",function(){return O}),M.d(oe,"c",function(){return D}),M.d(oe,"y",function(){return U});function te(ie){return!ie||typeof ie!="string"?!0:ie.trim().length===0}const k=/{(\d+)}/g;function R(ie,...pe){return pe.length===0?ie:ie.replace(k,function(_e,Ae){const Ke=parseInt(Ae,10);return isNaN(Ke)||Ke<0||Ke>=pe.length?_e:pe[Ke]})}function B(ie){return ie.replace(/[<>&]/g,function(pe){switch(pe){case"<":return"<";case">":return">";case"&":return"&";default:return pe}})}function p(ie){return ie.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function C(ie,pe=" "){const _e=H(ie,pe);return N(_e,pe)}function H(ie,pe){if(!ie||!pe)return ie;const _e=pe.length;if(_e===0||ie.length===0)return ie;let Ae=0;for(;ie.indexOf(pe,Ae)===Ae;)Ae=Ae+_e;return ie.substring(Ae)}function N(ie,pe){if(!ie||!pe)return ie;const _e=pe.length,Ae=ie.length;if(_e===0||Ae===0)return ie;let Ke=Ae,ze=-1;for(;!(ze=ie.lastIndexOf(pe,Ke-1),ze===-1||ze+_e!==Ke);){if(ze===0)return"";Ke=ze}return ie.substring(0,Ke)}function e(ie){return ie.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function A(ie){return ie.replace(/\*/g,"")}function g(ie,pe,_e={}){if(!ie)throw new Error("Cannot create regex from empty string");pe||(ie=p(ie)),_e.wholeWord&&(/\B/.test(ie.charAt(0))||(ie="\\b"+ie),/\B/.test(ie.charAt(ie.length-1))||(ie=ie+"\\b"));let Ae="";return _e.global&&(Ae+="g"),_e.matchCase||(Ae+="i"),_e.multiline&&(Ae+="m"),_e.unicode&&(Ae+="u"),new RegExp(ie,Ae)}function m(ie){if(ie.source==="^"||ie.source==="^$"||ie.source==="$"||ie.source==="^\\s*$")return!1;const pe=ie.exec("");return!!(pe&&ie.lastIndex===0)}function u(ie){return(ie.global?"g":"")+(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")}function a(ie){return ie.split(/\r\n|\r|\n/)}function r(ie){for(let pe=0,_e=ie.length;pe<_e;pe++){const Ae=ie.charCodeAt(pe);if(Ae!==32&&Ae!==9)return pe}return-1}function o(ie,pe=0,_e=ie.length){for(let Ae=pe;Ae<_e;Ae++){const Ke=ie.charCodeAt(Ae);if(Ke!==32&&Ke!==9)return ie.substring(pe,Ae)}return ie.substring(pe,_e)}function s(ie,pe=ie.length-1){for(let _e=pe;_e>=0;_e--){const Ae=ie.charCodeAt(_e);if(Ae!==32&&Ae!==9)return _e}return-1}function i(ie,pe){return ie<pe?-1:ie>pe?1:0}function n(ie,pe,_e=0,Ae=ie.length,Ke=0,ze=pe.length){for(;_e<Ae&&Ke<ze;_e++,Ke++){let it=ie.charCodeAt(_e),tt=pe.charCodeAt(Ke);if(it<tt)return-1;if(it>tt)return 1}const Ze=Ae-_e,Ye=ze-Ke;return Ze<Ye?-1:Ze>Ye?1:0}function t(ie,pe){return _(ie,pe,0,ie.length,0,pe.length)}function _(ie,pe,_e=0,Ae=ie.length,Ke=0,ze=pe.length){for(;_e<Ae&&Ke<ze;_e++,Ke++){let it=ie.charCodeAt(_e),tt=pe.charCodeAt(Ke);if(it===tt)continue;if(it>=128||tt>=128)return n(ie.toLowerCase(),pe.toLowerCase(),_e,Ae,Ke,ze);b(it)&&(it-=32),b(tt)&&(tt-=32);const Te=it-tt;if(Te===0)continue;return Te}const Ze=Ae-_e,Ye=ze-Ke;return Ze<Ye?-1:Ze>Ye?1:0}function b(ie){return ie>=97&&ie<=122}function v(ie){return ie>=65&&ie<=90}function x(ie,pe){return ie.length===pe.length&&_(ie,pe)===0}function E(ie,pe){const _e=pe.length;return pe.length>ie.length?!1:_(ie,pe,0,_e)===0}function h(ie,pe){let _e,Ae=Math.min(ie.length,pe.length);for(_e=0;_e<Ae;_e++)if(ie.charCodeAt(_e)!==pe.charCodeAt(_e))return _e;return Ae}function d(ie,pe){let _e,Ae=Math.min(ie.length,pe.length);const Ke=ie.length-1,ze=pe.length-1;for(_e=0;_e<Ae;_e++)if(ie.charCodeAt(Ke-_e)!==pe.charCodeAt(ze-_e))return _e;return Ae}function l(ie){return 55296<=ie&&ie<=56319}function c(ie){return 56320<=ie&&ie<=57343}function y(ie,pe){return(ie-55296<<10)+(pe-56320)+65536}function f(ie,pe,_e){const Ae=ie.charCodeAt(_e);if(l(Ae)&&_e+1<pe){const Ke=ie.charCodeAt(_e+1);if(c(Ke))return y(Ae,Ke)}return Ae}function T(ie,pe){const _e=ie.charCodeAt(pe-1);if(c(_e)&&pe>1){const Ae=ie.charCodeAt(pe-2);if(l(Ae))return y(Ae,_e)}return _e}function I(ie,pe){const _e=W.getInstance(),Ae=pe,Ke=ie.length,ze=f(ie,Ke,pe);pe+=ze>=65536?2:1;let Ze=_e.getGraphemeBreakType(ze);for(;pe<Ke;){const Ye=f(ie,Ke,pe),it=_e.getGraphemeBreakType(Ye);if(D(Ze,it))break;pe+=Ye>=65536?2:1,Ze=it}return pe-Ae}function P(ie,pe){const _e=W.getInstance(),Ae=pe,Ke=T(ie,pe);pe-=Ke>=65536?2:1;let ze=_e.getGraphemeBreakType(Ke);for(;pe>0;){const Ze=T(ie,pe),Ye=_e.getGraphemeBreakType(Ze);if(D(Ye,ze))break;pe-=Ze>=65536?2:1,ze=Ye}return Ae-pe}const S=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function w(ie){return S.test(ie)}const F=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L(ie){return F.test(ie)}const G=/^[\t\n\r\x20-\x7E]*$/;function Z(ie){return G.test(ie)}const ue=/[\u2028\u2029]/;function ce(ie){return ue.test(ie)}function Re(ie){for(let pe=0,_e=ie.length;pe<_e;pe++)if(Ee(ie.charCodeAt(pe)))return!0;return!1}function Ee(ie){return ie=+ie,ie>=11904&&ie<=55215||ie>=63744&&ie<=64255||ie>=65281&&ie<=65374}function he(ie){return ie>=127462&&ie<=127487||ie===8986||ie===8987||ie===9200||ie===9203||ie>=9728&&ie<=10175||ie===11088||ie===11093||ie>=127744&&ie<=128591||ie>=128640&&ie<=128764||ie>=128992&&ie<=129003||ie>=129280&&ie<=129535||ie>=129648&&ie<=129750}const we=String.fromCharCode(65279);function Pe(ie){return!!(ie&&ie.length>0&&ie.charCodeAt(0)===65279)}function de(ie,pe=!1){return ie?(pe&&(ie=ie.replace(/\\./g,"")),ie.toLowerCase()!==ie):!1}function j(ie){const pe=90-65+1;return ie=ie%(2*pe),ie<pe?String.fromCharCode(97+ie):String.fromCharCode(65+ie-pe)}function O(ie){const pe=W.getInstance();return pe.getGraphemeBreakType(ie)}function D(ie,pe){return ie===0?pe!==5&&pe!==7:ie===2&&pe===3?!1:ie===4||ie===2||ie===3||(pe===4||pe===2||pe===3)?!0:ie===8&&(pe===8||pe===9||pe===11||pe===12)||((ie===11||ie===9)&&(pe===9||pe===10)||((ie===12||ie===10)&&pe===10||(pe===5||pe===13||(pe===7||(ie===1||ie===13&&pe===14)))))?!1:!(ie===6&&pe===6)}class W{constructor(){this._data=V()}static getInstance(){return W._INSTANCE||(W._INSTANCE=new W),W._INSTANCE}getGraphemeBreakType(ie){if(ie<32)return ie===10?3:ie===13?2:4;if(ie<127)return 0;const pe=this._data,_e=pe.length/3;let Ae=1;for(;Ae<=_e;)if(ie<pe[3*Ae])Ae=2*Ae;else if(ie>pe[3*Ae+1])Ae=2*Ae+1;else return pe[3*Ae+2];return 0}}W._INSTANCE=null;function V(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function U(ie,pe){if(ie===0)return 0;const _e=le(ie,pe);if(_e!==void 0)return _e;const Ae=T(pe,ie);return ie-=Oe(Ae),ie}function le(ie,pe){let _e=T(pe,ie);for(ie-=Oe(_e);Me(_e)||_e===65039||_e===8419;){if(ie===0)return;_e=T(pe,ie),ie-=Oe(_e)}if(!he(_e))return;if(ie>=0){const Ae=T(pe,ie);Ae===8205&&(ie-=Oe(Ae))}return ie}function Oe(ie){return ie>=65536?2:1}function Me(ie){return 127995<=ie&&ie<=127999}},NQs2:function(Be,oe,M){Be.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",img_noactive:"img_noactive___s1naU",img_active:"img_active___11s7p",input_warp:"input_warp___3Y7JU"}},Nf5h:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return e}),M.d(oe,"i",function(){return r}),M.d(oe,"l",function(){return n}),M.d(oe,"f",function(){return v}),M.d(oe,"j",function(){return d}),M.d(oe,"d",function(){return Oe}),M.d(oe,"b",function(){return Ae}),M.d(oe,"h",function(){return Ye}),M.d(oe,"g",function(){return Ie}),M.d(oe,"k",function(){return J}),M.d(oe,"e",function(){return Dt}),M.d(oe,"c",function(){return Qt});var te=M("5NDa"),k=M("5rEg"),R=M("tJVT"),B=M("q1tI"),p=M.n(B),C=M("NQs2"),H=M.n(C),N=function(Le){var qe=Le.dataSource,lt=qe===void 0?[]:qe,_t=Le.bannerImg,At=Le.img,ht=Le.imgWidth,st=ht===void 0?346:ht,ut=Le.title,ct=Le.sunTitle,vt=Le.bannerExtraContent,ft=Le.placeholder,It=Le.onChange,Rt=Object(B.useState)(""),Zt=Object(R.a)(Rt,2),sn=Zt[0],mt=Zt[1];return p.a.createElement("div",{className:H.a.banner,style:{backgroundImage:"url('".concat(_t,"')"),backgroundPosition:"center",backgroundSize:"cover"}},p.a.createElement("div",{className:H.a.content},p.a.createElement("aside",null,p.a.createElement("p",{style:{marginBottom:"".concat(lt.length==0?"0":"")}},p.a.createElement("b",null,ut),p.a.createElement("span",null,ct)),lt.length>0&&p.a.createElement("div",{className:H.a.btns},lt.map(function(ot,on){return ot.buttonShow&&p.a.createElement(p.a.Fragment,null,ot.Button?ot.Button:p.a.createElement("div",{key:on,onClick:ot.click},p.a.createElement("img",{src:ot.img,className:H.a.img_noactive}),p.a.createElement("img",{src:ot.img_active,className:H.a.img_active}),ot.name))})),vt),lt.length>0&&p.a.createElement("div",{className:H.a.input_warp},p.a.createElement(k.a,{value:sn,onChange:function(on){mt(on.target.value)},placeholder:ft,onPressEnter:function(){return It(sn)},color:"#fff"}),p.a.createElement("i",{onClick:function(){return It(sn)},className:"iconfont icon-sousuo9 font14 pl10 current"}))))},e=N,A=M("6nfa"),g=M.n(A),m=M("TSYQ"),u=M.n(m),a=function(Le){var qe=Le.dataSource,lt=qe===void 0?[]:qe,_t=Le.value,At=Le.onChange,ht=Le.className,st=Le.title,ut=Le.titleWidth,ct=ut===void 0?56:ut,vt=Le.style,ft=vt===void 0?{}:vt,It=Le.fontColor,Rt=It===void 0?"#6A7283":It,Zt=Le.isId,sn=Zt===void 0?!1:Zt,mt=Object(B.useState)(0),ot=Object(R.a)(mt,2),on=ot[0],an=ot[1],Vt=Object(B.useState)(!1),Bt=Object(R.a)(Vt,2),Gt=Bt[0],en=Bt[1],qt=Object(B.useRef)(null);return Object(B.useEffect)(function(){if(lt.length!==0){var Mt;(qt==null||((Mt=qt.current)===null||Mt===void 0)?void 0:Mt.clientHeight)>98?an(1):an(0)}lt.length===0&&an(0)},[lt]),p.a.createElement("div",{className:u()(g.a.row,ht),style:ft},p.a.createElement("div",{style:{width:ct,marginTop:Gt?12:4},className:g.a.title},st),p.a.createElement("div",{className:Gt?"".concat(g.a.tagsWrap," ").concat(g.a.tagsBorderWrap):g.a.tagsWrap},p.a.createElement("div",{className:g.a.bar,style:on>0?{height:on===1?100:"auto",overflow:on===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},p.a.createElement("div",{className:g.a.name,ref:qt},lt==null?void 0:lt.map(function(Mt){return p.a.createElement("span",{onClick:function(){return At(sn?Mt.id:Mt.name)},key:sn?Mt.id:Mt.name,title:Mt.name,style:{color:Rt},className:_t===(sn?Mt.id:Mt.name)?g.a.active:""},Mt.name)}))),!!on&&p.a.createElement(B.Fragment,null,on===1?p.a.createElement("div",{onClick:function(){var An;an(2),(qt==null||((An=qt.current)===null||An===void 0)?void 0:An.clientHeight)>205?en(!0):en(!1)},className:g.a.action},"\u5C55\u5F00",p.a.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):p.a.createElement("div",{onClick:function(){an(1),en(!1)},className:g.a.action},"\u6536\u8D77",p.a.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},r=a,o=M("cz0n"),s=M.n(o),i=function(Le){var qe=Le.dataSource,lt=qe===void 0?[]:qe,_t=Le.value,At=Le.onChange,ht=Le.className;return p.a.createElement("div",{className:u()(s.a.tabs,ht)},lt.map(function(st){return p.a.createElement("span",{onClick:function(){return At(st.id)},className:_t===st.id?s.a.active:"",key:st.id},st.name)}))},n=i,t=M("KOXS"),_=M.n(t),b=function(Le){var qe,lt=Le.dataSource,_t=lt===void 0?[]:lt,At=Le.value,ht=Le.onChange,st=Le.className,ut=Le.style,ct=ut===void 0?{}:ut,vt=Le.placeholder,ft=Object(B.useState)(""),It=Object(R.a)(ft,2),Rt=It[0],Zt=It[1],sn=Object(B.useState)(""),mt=Object(R.a)(sn,2),ot=mt[0],on=mt[1];Object(B.useEffect)(function(){var Bt;(Bt=JSON.stringify(At))!==null&&Bt!==void 0&&Bt.includes("{")?(Zt(At.id),on(At.value)):on(At)},[At]);var an=function(){ht(ot||null,Rt||"")},Vt=function(Gt){if(Gt===Rt)return;Zt(Gt),ht(ot,Gt)};return p.a.createElement("div",{className:u()(_.a.input,st),style:ct},!!_t.length&&p.a.createElement("div",{className:_.a.dropdown},p.a.createElement("div",{className:_.a.text},(qe=_t.find(function(Bt){return Bt.id===Rt}))===null||qe===void 0?void 0:qe.name,p.a.createElement("i",{className:"iconfont icon-zhankai4"}),p.a.createElement("b",{className:_.a.b1}),p.a.createElement("b",{className:_.a.b2})),p.a.createElement("div",{className:_.a.menu},_t.map(function(Bt,Gt){return p.a.createElement("div",{key:Gt,onClick:function(){return Vt(Bt.id)}},Bt.name)}))),p.a.createElement(k.a,{onPressEnter:an,value:ot,onChange:function(Gt){return on(Gt.target.value||"")},bordered:!1,placeholder:vt}),p.a.createElement("i",{onClick:an,className:"iconfont icon-sousuo9 font14 pl10 current"}))},v=b,x=M("f9pc"),E=M.n(x),h=function(Le){var qe=Le.value,lt=Le.onChange,_t=Le.className,At=Le.total,ht=Le.pageSize,st=Le.style,ut=st===void 0?{}:st,ct=qe<2,vt=qe>=Math.ceil(At/ht);return At<=ht?p.a.createElement(p.a.Fragment,null):p.a.createElement("div",{className:u()(E.a.quickPager,_t),style:ut},p.a.createElement("div",{onClick:function(){ct||lt(qe-1,"prev")},className:ct?E.a.disabled:""},"\u4E0A\u4E00\u9875"),p.a.createElement("div",{onClick:function(){vt||lt(qe+1,"next")},className:vt?E.a.disabled:""},"\u4E0B\u4E00\u9875"))},d=h,l=M("T2oS"),c=M("W9HT"),y=M("pC0b"),f=M("GzdX"),T=M("5Dmo"),I=M("3S7+"),P=M("Oe0F"),S=M.n(P),w=M("m3rI"),F=M("1vsH"),L=M("JAbv"),G=M.n(L),Z=M("Bq7L"),ue=M.n(Z),ce=M("MEgm"),Re=M.n(ce),Ee=M("BdwD"),he=function(Le){var qe=Le.className,lt=Le.dataSource,_t=lt===void 0?[]:lt,At=Le.col,ht=At===void 0?4:At,st=Le.right,ut=Le.bottom,ct=ut===void 0?23:ut,vt=Le.precision,ft=vt===void 0?0:vt,It=Le.wrapWidth,Rt=It===void 0?1200:It,Zt=Le.trackEventItems,sn=Le.loading,mt=Math.floor((Rt-(ht-1)*st)/ht);return p.a.createElement(c.a,{spinning:sn},p.a.createElement("div",{className:u()(S.a.list,qe)},!!_t.length&&_t.map(function(ot,on){var an=ot.name,Vt=ot.id,Bt=ot.identifier,Gt=ot.power,en=ot.cover_image_id,qt=ot.pic;return p.a.createElement("div",{className:S.a.wrap,key:Vt,style:{width:mt,marginRight:(1+on)%ht===0?0:st+ft,marginBottom:ct}},p.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(Bt,"/challenges"),className:S.a.li,onClick:function(An){An.preventDefault(),Zt&&Object(F.db)([Zt]),Gt&&Object(F.S)("/shixuns/".concat(Bt,"/challenges"))}},p.a.createElement("div",{className:S.a.img},p.a.createElement("img",{className:S.a.cover,src:en?"".concat(w.a.API_SERVER,"/api/attachments/").concat(en):"".concat(w.a.IMG_SERVER,"/").concat(qt)}),ot.is_jupyter&&p.a.createElement("img",{className:S.a.sign,src:G.a}),ot.is_jupyter_lab&&p.a.createElement("img",{className:S.a.sign,src:ue.a}),ot.is_unity_3d&&p.a.createElement("img",{className:S.a.sign,src:Re.a})),p.a.createElement("div",{className:S.a.name},p.a.createElement(I.a,{title:an||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},p.a.createElement("span",{className:S.a.e},an||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),p.a.createElement("div",{className:S.a.tags},p.a.createElement(I.a,{placement:"bottom",title:"\u5173\u5361\u6570"},p.a.createElement("span",null,p.a.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr3"}),p.a.createElement("span",null,ot.challenges_count))),!!ot.myshixuns_count&&p.a.createElement(I.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},p.a.createElement("span",null,p.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),p.a.createElement("span",null,ot.myshixuns_count))),p.a.createElement(I.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},p.a.createElement("span",null,p.a.createElement("span",null,ot.level))),p.a.createElement("div",{className:S.a.rate},p.a.createElement(f.a,{allowHalf:!0,disabled:!0,defaultValue:ot.score_info}),p.a.createElement("span",null,"\xA0",ot.score_info?"".concat(ot.score_info,"\u5206"):"5\u5206")))),!Gt&&p.a.createElement("div",{className:S.a.lockWrap},p.a.createElement("img",{src:"".concat(w.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),p.a.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!_t.length&&p.a.createElement(Ee.a,null)))},we=he,Pe=M("ZJlW"),de=M.n(Pe),j=M("z4EP"),O=M.n(j),D=M("+GGh"),W=M.n(D),V=M("cFMs"),U=M.n(V),le=function(Le){var qe=Le.className,lt=Le.dataSource,_t=lt===void 0?[]:lt,At=Le.col,ht=At===void 0?4:At,st=Le.right,ut=Le.bottom,ct=ut===void 0?23:ut,vt=Le.precision,ft=vt===void 0?0:vt,It=Le.wrapWidth,Rt=It===void 0?1200:It,Zt=Le.trackEventItems,sn=Le.loading,mt=Math.floor((Rt-(ht-1)*st)/ht);return p.a.createElement(c.a,{spinning:sn},p.a.createElement("div",{className:u()(de.a.list,qe)},!!_t.length&&_t.map(function(ot,on){var an=ot.name,Vt=ot.id,Bt=ot.identifier,Gt=ot.featured,en=ot.school_name,qt=ot.image_url,Mt=ot.excellent;return p.a.createElement("div",{key:Vt,className:de.a.wrap,style:{width:mt,marginRight:(1+on)%ht===0?0:st+ft,marginBottom:ct}},p.a.createElement("a",{target:"_blank",href:"/paths/".concat(Bt),className:de.a.li,onClick:function(jn){jn.preventDefault(),Zt&&Object(F.db)([Zt]),Object(F.S)("/paths/".concat(Bt))}},p.a.createElement("div",{className:de.a.img},p.a.createElement("img",{className:de.a.cover,src:"".concat(w.a.IMG_SERVER,"/").concat(qt)}),Gt===1&&p.a.createElement("img",{className:de.a.sign,src:O.a}),Gt===2&&p.a.createElement("img",{className:de.a.sign,src:""}),Gt===3&&p.a.createElement("img",{className:de.a.sign,src:W.a}),Gt===4&&p.a.createElement("img",{className:de.a.sign,src:""}),Gt===5&&p.a.createElement("img",{className:de.a.sign,src:U.a})),p.a.createElement("div",{className:de.a.name},p.a.createElement(I.a,{title:an},p.a.createElement("span",{className:de.a.e},an))),p.a.createElement(I.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat(en)},p.a.createElement("div",{className:de.a.unit},p.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),en)),p.a.createElement("div",{className:de.a.tags},p.a.createElement(I.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},p.a.createElement("span",null,p.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),p.a.createElement("span",null,ot.stages_count))),p.a.createElement(I.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},p.a.createElement("span",null,p.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),p.a.createElement("span",null,ot.members_count))),Mt&&p.a.createElement("div",{className:de.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!_t.length&&p.a.createElement(Ee.a,null)))},Oe=le,Me=M("iL++"),ie=M.n(Me),pe=M("xiVL"),_e=function(Le){var qe=Le.className,lt=Le.dataSource,_t=lt===void 0?[]:lt,At=Le.col,ht=At===void 0?4:At,st=Le.right,ut=Le.bottom,ct=ut===void 0?23:ut,vt=Le.precision,ft=vt===void 0?0:vt,It=Le.wrapWidth,Rt=It===void 0?1200:It,Zt=Le.trackEventItems,sn=Le.loading,mt=Math.floor((Rt-(ht-1)*st)/ht);return p.a.createElement(c.a,{spinning:sn},p.a.createElement("div",{className:u()(ie.a.list,qe)},!!_t.length&&_t.map(function(ot,on){var an=ot.subject_identifier,Vt=ot.id,Bt=ot.identifier,Gt=ot.power,en=ot.is_public!=0&&ot.is_public;return p.a.createElement("div",{className:ie.a.wrap,key:Vt,style:{width:mt,marginRight:(1+on)%ht===0?0:st+ft,marginBottom:ct}},p.a.createElement("a",{className:ie.a.li,onClick:function(Mt){Mt.preventDefault()}},p.a.createElement("div",{className:ie.a.top},p.a.createElement(I.a,{title:ot.name},p.a.createElement("div",{className:ie.a.name},ot.name)),p.a.createElement("img",{className:ie.a.img,src:w.a.IMG_SERVER+"/images/"+ot.avatar_url}),p.a.createElement("div",{className:ie.a.text},ot.creator),an&&p.a.createElement("div",{className:ie.a.btns},p.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),p.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),en&&p.a.createElement("div",{className:ie.a.sign},"\u516C\u5F00")),p.a.createElement("div",{className:ie.a.bottom},ot.visits>0&&p.a.createElement(I.a,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},p.a.createElement("span",null,p.a.createElement("i",{className:"iconfont icon-liulanyan"}),p.a.createElement("span",null,ot.visits))),ot.course_members_count>0&&p.a.createElement(I.a,{title:"\u6210\u5458",placement:"bottom"},p.a.createElement("span",null,p.a.createElement("i",{className:"iconfont icon-chengyuan"}),ot.course_members_count)),ot.tasks_count>0&&p.a.createElement(I.a,{title:"\u4F5C\u4E1A",placement:"bottom"},p.a.createElement("span",null,p.a.createElement("i",{className:"iconfont icon-zuoye"}),ot.tasks_count)),ot.is_end?p.a.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):p.a.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),p.a.createElement("div",{className:ie.a.lockWrap},ot.is_accessible?p.a.createElement(p.a.Fragment,null,an&&p.a.createElement("div",{onClick:function(){return Object(F.S)("/paths/".concat(an))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),p.a.createElement("div",{onClick:function(Mt){Zt&&Object(F.db)([Zt]),Object(F.S)(ot.first_category_url)}},"\u8FDB\u5165\u6559\u5B66\u8BFE\u5802")):p.a.createElement(p.a.Fragment,null,p.a.createElement("img",{src:"".concat(w.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),p.a.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165"))))}),!_t.length&&p.a.createElement(Ee.a,null)))},Ae=_e,Ke=M("f0W+"),ze=M.n(Ke),Ze=function(Le){var qe=Le.dataSource,lt=qe===void 0?[]:qe,_t=Le.value,At=Le.onChange,ht=Le.className,st=Le.style,ut=st===void 0?{}:st,ct=Le.tabBarExtraContent;return p.a.createElement("div",{className:u()(ze.a.tabs,ht),style:ut},p.a.createElement("div",{className:ze.a.tabsWrap},lt.map(function(vt,ft){return p.a.createElement("div",{onClick:function(){return At(vt.id)},className:_t===vt.id?ze.a.active:"",key:ft},vt.name)})),p.a.createElement("div",{className:ze.a.tabBar},ct))},Ye=Ze,it=M("9JIy"),tt=M.n(it),Te=function(Le){var qe=Le.className,lt=Le.style,_t=lt===void 0?{}:lt,At=Le.children;return p.a.createElement("div",{className:u()(tt.a.table,qe),style:_t},At)},Ie=Te,ke=M("qVdP"),We=M("jsC+"),$=M("lUTK"),K=M("BvKs"),z=M("8WcF"),X=M.n(z),ee=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],Y=function(Le){var qe,lt=Le.sortValue,_t=Le.dropValue,At=Le.className,ht=Le.onSort,st=Le.onDrop,ut=Le.dataSource,ct=ut===void 0?ee:ut;return p.a.createElement("div",{className:u()(X.a.orderWrap,At)},p.a.createElement(We.a,{overlay:p.a.createElement(K.a,null,ct.map(function(vt,ft){return p.a.createElement(K.a.Item,{key:ft,onClick:function(){return st(vt.id)}},vt.name)}))},p.a.createElement("span",{className:X.a.orderTextWrap},(qe=ct.find(function(vt){return _t===vt.id}))===null||qe===void 0?void 0:qe.name)),p.a.createElement("span",{className:X.a.orderIconWrap},p.a.createElement("span",{className:X.a.orderAsc},p.a.createElement("i",{className:lt==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(X.a.cursorPointer," ").concat(X.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(X.a.cursorPointer),onClick:function(){return ht(lt==="asc"?"desc":"asc")}})),p.a.createElement("span",{className:X.a.orderDesc},p.a.createElement("i",{className:lt==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(X.a.cursorPointer," ").concat(X.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(X.a.cursorPointer),onClick:function(){return ht(lt==="asc"?"desc":"asc")}}))))},J=Y,ne=M("+L6B"),re=M("2/Rp"),ye=M("0Owb"),be=M("9og8"),Ne=M("PpiC"),Ve=M("WmNS"),$e=M.n(Ve),Je=M("siWv"),Ct=M.n(Je),dt=M("LvDl"),rt=function(Le){var qe=Le.className,lt=Le.style,_t=Le.children,At=Le.loading,ht=At===void 0?!1:At,st=Le.openLoading,ut=Le.onClick,ct=ut===void 0?function(){}:ut,vt=Le.size,ft=vt===void 0?"middle":vt,It=Le.shape,Rt=It===void 0?"round":It,Zt=Le.type,sn=Zt===void 0?"default":Zt,mt=Object(Ne.a)(Le,["className","style","children","loading","openLoading","onClick","size","shape","type"]),ot=Object(B.useState)(!1),on=Object(R.a)(ot,2),an=on[0],Vt=on[1];return p.a.createElement(re.a,Object(ye.a)({onClick:Object(dt.throttle)(function(){var Bt=Object(be.a)($e.a.mark(function Gt(en){return $e.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return st&&Vt(!0),Mt.prev=1,Mt.next=4,ct(en);case 4:Mt.next=9;break;case 6:Mt.prev=6,Mt.t0=Mt.catch(1),console.log("error",Mt.t0);case 9:st&&Vt(!1);case 10:case"end":return Mt.stop()}},Gt,null,[[1,6]])}));return function(Gt){return Bt.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:u()(Ct.a.btn,Ct.a["".concat(ft,"-").concat(Rt)],qe),style:lt,size:ft,shape:Rt,type:sn,loading:an||ht},mt),_t)},Dt=rt,Ot=M("+oxA"),St=M.n(Ot),Kt=function(Le){var qe=Le.className,lt=Le.style,_t=Le.children,At=_t===void 0?null:_t,ht=Le.onClick,st=Le.title;return p.a.createElement("div",{className:u()(St.a.head,qe),style:lt},p.a.createElement("span",{className:"primary-hover",onClick:ht},p.a.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),p.a.createElement("b",{title:st},st),p.a.createElement("div",{className:St.a.node},At))},gt=Kt,Lt=M("fgAr"),Pt=M.n(Lt),bt=function(Le){var qe=Le.confirmShow,lt=qe===void 0?!0:qe,_t=Le.confirmTitle,At=Le.confirmClick,ht=Le.cancelShow,st=ht===void 0?!0:ht,ut=Le.cancelTitle,ct=Le.cancelClick,vt=Le.className,ft=Le.style,It=Le.confirmLoading,Rt=It===void 0?!1:It;return p.a.createElement("div",{className:u()(Pt.a.btns,vt),style:ft},lt&&p.a.createElement(re.a,{loading:Rt,onClick:At,type:"primary",className:Pt.a.confirm},_t),st&&p.a.createElement(re.a,{onClick:ct,className:Pt.a.cancel},ut))},Qt=bt},NvD2:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return C});var te=M("Kwbf");function k(H,N){var e=new Set;return H.forEach(function(A){N.has(A)||e.add(A)}),e}function R(H){var N=H||{},e=N.disabled,A=N.disableCheckbox,g=N.checkable;return!!(e||A)||g===!1}function B(H,N,e,A){for(var g=new Set(H),m=new Set,u=0;u<=e;u+=1){var a=N.get(u)||new Set;a.forEach(function(i){var n=i.key,t=i.node,_=i.children,b=_===void 0?[]:_;g.has(n)&&!A(t)&&b.filter(function(v){return!A(v.node)}).forEach(function(v){g.add(v.key)})})}for(var r=new Set,o=e;o>=0;o-=1){var s=N.get(o)||new Set;s.forEach(function(i){var n=i.parent,t=i.node;if(A(t)||!i.parent||r.has(i.parent.key))return;if(A(i.parent.node)){r.add(n.key);return}var _=!0,b=!1;(n.children||[]).filter(function(v){return!A(v.node)}).forEach(function(v){var x=v.key,E=g.has(x);_&&!E&&(_=!1),!b&&(E||m.has(x))&&(b=!0)}),_&&g.add(n.key),b&&m.add(n.key),r.add(n.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(k(m,g))}}function p(H,N,e,A,g){for(var m=new Set(H),u=new Set(N),a=0;a<=A;a+=1){var r=e.get(a)||new Set;r.forEach(function(n){var t=n.key,_=n.node,b=n.children,v=b===void 0?[]:b;!m.has(t)&&!u.has(t)&&!g(_)&&v.filter(function(x){return!g(x.node)}).forEach(function(x){m.delete(x.key)})})}u=new Set;for(var o=new Set,s=A;s>=0;s-=1){var i=e.get(s)||new Set;i.forEach(function(n){var t=n.parent,_=n.node;if(g(_)||!n.parent||o.has(n.parent.key))return;if(g(n.parent.node)){o.add(t.key);return}var b=!0,v=!1;(t.children||[]).filter(function(x){return!g(x.node)}).forEach(function(x){var E=x.key,h=m.has(E);b&&!h&&(b=!1),!v&&(h||u.has(E))&&(v=!0)}),b||m.delete(t.key),v&&u.add(t.key),o.add(t.key)})}return{checkedKeys:Array.from(m),halfCheckedKeys:Array.from(k(u,m))}}function C(H,N,e,A){var g=[],m;A?m=A:m=R;var u=new Set(H.filter(function(s){var i=!!e[s];return i||g.push(s),i})),a=new Map,r=0;Object.keys(e).forEach(function(s){var i=e[s],n=i.level,t=a.get(n);t||(t=new Set,a.set(n,t)),t.add(i),r=Math.max(r,n)}),Object(te.a)(!g.length,"Tree missing follow keys: ".concat(g.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var o;return N===!0?o=B(u,a,r,m):o=p(u,N.halfCheckedKeys,a,r,m),o}},OZM5:function(Be,oe,M){"use strict";M.d(oe,"b",function(){return A}),M.d(oe,"a",function(){return g}),M.d(oe,"k",function(){return m}),M.d(oe,"h",function(){return u}),M.d(oe,"i",function(){return a}),M.d(oe,"g",function(){return r}),M.d(oe,"c",function(){return o}),M.d(oe,"d",function(){return s}),M.d(oe,"j",function(){return t}),M.d(oe,"e",function(){return _}),M.d(oe,"f",function(){return b});var te=M("KQm4"),k=M("U8pU"),R=M("Ff2n"),B=M("q1tI"),p=M.n(B),C=M("Kwbf"),H=M("WaYH"),N=.25,e=2;function A(v,x){var E=v.slice(),h=E.indexOf(x);return h>=0&&E.splice(h,1),E}function g(v,x){var E=v.slice();return E.indexOf(x)===-1&&E.push(x),E}function m(v){return v.split("-")}function u(v,x){return"".concat(v,"-").concat(x)}function a(v){return v&&v.type&&v.type.isTreeNode}function r(v,x){var E=[v],h=x[v];function d(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(c){var y=c.key,f=c.children;E.push(y),d(f)})}return d(h.children),E}function o(v,x){var E=v.clientY,h=x.selectHandle.getBoundingClientRect(),d=h.top,l=h.bottom,c=h.height,y=Math.max(c*N,e);return E<=d+y?-1:E>=l-y?1:0}function s(v,x){if(!v)return;var E=x.multiple;return E?v.slice():v.length?[v[0]]:v}var i=function(x){return x};function n(v,x){if(!v)return[];var E=x||{},h=E.processProps,d=h===void 0?i:h,l=Array.isArray(v)?v:[v];return l.map(function(c){var y=c.children,f=Object(R.a)(c,["children"]),T=n(y,x);return p.a.createElement(H.a,Object.assign({},d(f)),T)})}function t(v){if(!v)return null;var x;if(Array.isArray(v))x={checkedKeys:v,halfCheckedKeys:void 0};else if(Object(k.a)(v)==="object")x={checkedKeys:v.checked||void 0,halfCheckedKeys:v.halfChecked||void 0};else return Object(C.a)(!1,"`checkedKeys` is not an array or an object"),null;return x}function _(v,x){var E=new Set;function h(d){if(E.has(d))return;var l=x[d];if(!l)return;E.add(d);var c=l.parent,y=l.node;if(y.disabled)return;c&&h(c.key)}return(v||[]).forEach(function(d){h(d)}),Object(te.a)(E)}function b(v){var x={};return Object.keys(v).forEach(function(E){(E.startsWith("data-")||E.startsWith("aria-"))&&(x[E]=v[E])}),x}},Oe0F:function(Be,oe,M){Be.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(Be,oe,M){var te=M("wTVA"),k=M("EbDI"),R=M("ZhPi"),B=M("wkBT");function p(C){return te(C)||k(C)||R(C)||B()}Be.exports=p,Be.exports.__esModule=!0,Be.exports.default=Be.exports},SJMd:function(Be,oe){/**
|
|
* @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 M,te,k,R=!1,B,p;window.PR_SHOULD_USE_CONTINUATION=!0;var C,H;(function(){var N=window,e=["break,continue,do,else,for,if,return,while"],A=[e,"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"],g=[A,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],m=[g,"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"],u=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[g,"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"],r="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",o=[g,"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",i=[e,"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"],n=[e,"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"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],_=[m,a,u,o,s,i,n,t],b=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,v="str",x="kwd",E="com",h="typ",d="lit",l="pun",c="pln",y="tag",f="dec",T="src",I="atn",P="atv",S="nocode",w="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(le){for(var Oe=0,Me=!1,ie=!1,pe=0,_e=le.length;pe<_e;++pe){var Ae=le[pe];if(Ae.ignoreCase)ie=!0;else if(/[a-z]/i.test(Ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Me=!0,ie=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function ze(Te){var Ie=Te.charCodeAt(0);if(Ie!==92)return Ie;var ke=Te.charAt(1);return Ie=Ke[ke],Ie||("0"<=ke&&ke<="7"?parseInt(Te.substring(1),8):ke==="u"||ke==="x"?parseInt(Te.substring(2),16):Te.charCodeAt(1))}function Ze(Te){if(Te<32)return(Te<16?"\\x0":"\\x")+Te.toString(16);var Ie=String.fromCharCode(Te);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function Ye(Te){var Ie=Te.substring(1,Te.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")),ke=[],We=Ie[0]==="^",$=["["];We&&$.push("^");for(var K=We?1:0,z=Ie.length;K<z;++K){var X=Ie[K];if(/\\[bdsw]/i.test(X))$.push(X);else{var ee=ze(X),Y;K+2<z&&Ie[K+1]==="-"?(Y=ze(Ie[K+2]),K+=2):Y=ee,ke.push([ee,Y]),Y<65||ee>122||(Y<65||ee>90||ke.push([Math.max(65,ee)|32,Math.min(Y,90)|32]),Y<97||ee>122||ke.push([Math.max(97,ee)&~32,Math.min(Y,122)&~32]))}}ke.sort(function(ye,be){return ye[0]-be[0]||be[1]-ye[1]});for(var J=[],ne=[],K=0;K<ke.length;++K){var re=ke[K];re[0]<=ne[1]+1?ne[1]=Math.max(ne[1],re[1]):J.push(ne=re)}for(var K=0;K<J.length;++K){var re=J[K];$.push(Ze(re[0])),re[1]>re[0]&&(re[1]+1>re[0]&&$.push("-"),$.push(Ze(re[1])))}return $.push("]"),$.join("")}function it(Te){for(var Ie=Te.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")),ke=Ie.length,We=[],$=0,K=0;$<ke;++$){var z=Ie[$];if(z==="(")++K;else if(z.charAt(0)==="\\"){var X=+z.substring(1);X&&(X<=K?We[X]=-1:Ie[$]=Ze(X))}}for(var $=1;$<We.length;++$)We[$]===-1&&(We[$]=++Oe);for(var $=0,K=0;$<ke;++$){var z=Ie[$];if(z==="(")++K,We[K]||(Ie[$]="(?:");else if(z.charAt(0)==="\\"){var X=+z.substring(1);X&&X<=K&&(Ie[$]="\\"+We[X])}}for(var $=0;$<ke;++$)Ie[$]==="^"&&Ie[$+1]!=="^"&&(Ie[$]="");if(Te.ignoreCase&&Me)for(var $=0;$<ke;++$){var z=Ie[$],ee=z.charAt(0);z.length>=2&&ee==="["?Ie[$]=Ye(z):ee!=="\\"&&(Ie[$]=z.replace(/[a-zA-Z]/g,function(ne){var re=ne.charCodeAt(0);return"["+String.fromCharCode(re&~32,re|32)+"]"}))}return Ie.join("")}for(var tt=[],pe=0,_e=le.length;pe<_e;++pe){var Ae=le[pe];if(Ae.global||Ae.multiline)throw new Error(""+Ae);tt.push("(?:"+it(Ae)+")")}return new RegExp(tt.join("|"),ie?"gi":"g")}function L(le,Oe){var Me=/(?:^|\s)nocode(?:\s|$)/,ie=[],pe=0,_e=[],Ae=0;function Ke(ze){var Ze=ze.nodeType;if(Ze==1){if(Me.test(ze.className))return;for(var Ye=ze.firstChild;Ye;Ye=Ye.nextSibling)Ke(Ye);var it=ze.nodeName.toLowerCase();(it==="br"||it==="li")&&(ie[Ae]=`
|
|
`,_e[Ae<<1]=pe++,_e[Ae++<<1|1]=ze)}else if(Ze==3||Ze==4){var tt=ze.nodeValue;tt.length&&(Oe?tt=tt.replace(/\r\n?/g,`
|
|
`):tt=tt.replace(/[ \t\r\n]+/g," "),ie[Ae]=tt,_e[Ae<<1]=pe,pe+=tt.length,_e[Ae++<<1|1]=ze)}}return Ke(le),{sourceCode:ie.join("").replace(/\n$/,""),spans:_e}}function G(le,Oe,Me,ie,pe){if(!Me)return;var _e={sourceNode:le,pre:1,langExtension:null,numberLines:null,sourceCode:Me,spans:null,basePos:Oe,decorations:null};ie(_e),pe.push.apply(pe,_e.decorations)}var Z=/\S/;function ue(le){for(var Oe=void 0,Me=le.firstChild;Me;Me=Me.nextSibling){var ie=Me.nodeType;Oe=ie===1?Oe?le:Me:ie===3&&Z.test(Me.nodeValue)?le:Oe}return Oe===le?void 0:Oe}function ce(le,Oe){var Me={},ie;(function(){for(var Ae=le.concat(Oe),Ke=[],ze={},Ze=0,Ye=Ae.length;Ze<Ye;++Ze){var it=Ae[Ze],tt=it[3];if(tt)for(var Te=tt.length;--Te>=0;)Me[tt.charAt(Te)]=it;var Ie=it[1],ke=""+Ie;ze.hasOwnProperty(ke)||(Ke.push(Ie),ze[ke]=null)}Ke.push(/[\0-\uffff]/),ie=F(Ke)})();var pe=Oe.length,_e=function(Ae){for(var Ke=Ae.sourceCode,ze=Ae.basePos,Ze=Ae.sourceNode,Ye=[ze,c],it=0,tt=Ke.match(ie)||[],Te={},Ie=0,ke=tt.length;Ie<ke;++Ie){var We=tt[Ie],$=Te[We],K=void 0,z;if(typeof $=="string")z=!1;else{var X=Me[We.charAt(0)];if(X)K=We.match(X[1]),$=X[0];else{for(var ee=0;ee<pe;++ee)if(X=Oe[ee],K=We.match(X[1]),K){$=X[0];break}K||($=c)}z=$.length>=5&&$.substring(0,5)==="lang-",z&&!(K&&typeof K[1]=="string")&&(z=!1,$=T),z||(Te[We]=$)}var Y=it;if(it+=We.length,!z)Ye.push(ze+Y,$);else{var J=K[1],ne=We.indexOf(J),re=ne+J.length;K[2]&&(re=We.length-K[2].length,ne=re-J.length);var ye=$.substring(5);G(Ze,ze+Y,We.substring(0,ne),_e,Ye),G(Ze,ze+Y+ne,J,j(ye,J),Ye),G(Ze,ze+Y+re,We.substring(re),_e,Ye)}}Ae.decorations=Ye};return _e}function Re(le){var Oe=[],Me=[];le.tripleQuotedStrings?Oe.push([v,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):le.multiLineStrings?Oe.push([v,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Oe.push([v,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),le.verbatimStrings&&Me.push([v,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ie=le.hashComments;ie&&(le.cStyleComments?(ie>1?Oe.push([E,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Oe.push([E,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Me.push([v,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Oe.push([E,/^#[^\r\n]*/,null,"#"])),le.cStyleComments&&(Me.push([E,/^\/\/[^\r\n]*/,null]),Me.push([E,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var pe=le.regexLiterals;if(pe){var _e=pe>1?"":`
|
|
\r`,Ae=_e?".":"[\\S\\s]",Ke="/(?=[^/*"+_e+"])(?:[^/\\x5B\\x5C"+_e+"]|\\x5C"+Ae+"|\\x5B(?:[^\\x5C\\x5D"+_e+"]|\\x5C"+Ae+")*(?:\\x5D|$))+/";Me.push(["lang-regex",RegExp("^"+w+"("+Ke+")")])}var ze=le.types;ze&&Me.push([h,ze]);var Ze=(""+le.keywords).replace(/^ | $/g,"");Ze.length&&Me.push([x,new RegExp("^(?:"+Ze.replace(/[\s,]+/g,"|")+")\\b"),null]),Oe.push([c,/^\s+/,null,` \r
|
|
\xA0`]);var Ye="^.[^\\s\\w.$@'\"`/\\\\]*";return le.regexLiterals&&(Ye+="(?!s*/)"),Me.push([d,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[d,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[l,new RegExp(Ye),null]),ce(Oe,Me)}var Ee=Re({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function he(le,Oe,Me){for(var ie=/(?:^|\s)nocode(?:\s|$)/,pe=/\r\n?|\n/,_e=le.ownerDocument,Ae=_e.createElement("li");le.firstChild;)Ae.appendChild(le.firstChild);var Ke=[Ae];function ze(Ie){var ke=Ie.nodeType;if(ke==1&&!ie.test(Ie.className))if(Ie.nodeName==="br")Ze(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var We=Ie.firstChild;We;We=We.nextSibling)ze(We);else if((ke==3||ke==4)&&Me){var $=Ie.nodeValue,K=$.match(pe);if(K){var z=$.substring(0,K.index);Ie.nodeValue=z;var X=$.substring(K.index+K[0].length);if(X){var ee=Ie.parentNode;ee.insertBefore(_e.createTextNode(X),Ie.nextSibling)}Ze(Ie),z||Ie.parentNode.removeChild(Ie)}}}function Ze(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function ke(K,z){var X=z?K.cloneNode(!1):K,ee=K.parentNode;if(ee){var Y=ke(ee,1),J=K.nextSibling;Y.appendChild(X);for(var ne=J;ne;ne=J)J=ne.nextSibling,Y.appendChild(ne)}return X}for(var We=ke(Ie.nextSibling,0),$;($=We.parentNode)&&$.nodeType===1;)We=$;Ke.push(We)}for(var Ye=0;Ye<Ke.length;++Ye)ze(Ke[Ye]);Oe===(Oe|0)&&Ke[0].setAttribute("value",Oe);var it=_e.createElement("ol");it.className="linenums";for(var tt=Math.max(0,Oe-1|0)||0,Ye=0,Te=Ke.length;Ye<Te;++Ye)Ae=Ke[Ye],Ae.className="L"+(Ye+tt)%10,Ae.firstChild||Ae.appendChild(_e.createTextNode("\xA0")),it.appendChild(Ae);le.appendChild(it)}function we(le){var Oe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Oe=Oe&&+Oe[1]<=8;var Me=/\n/g,ie=le.sourceCode,pe=ie.length,_e=0,Ae=le.spans,Ke=Ae.length,ze=0,Ze=le.decorations,Ye=Ze.length,it=0;Ze[Ye]=pe;var tt,Te;for(Te=tt=0;Te<Ye;)Ze[Te]!==Ze[Te+2]?(Ze[tt++]=Ze[Te++],Ze[tt++]=Ze[Te++]):Te+=2;for(Ye=tt,Te=tt=0;Te<Ye;){for(var Ie=Ze[Te],ke=Ze[Te+1],We=Te+2;We+2<=Ye&&Ze[We+1]===ke;)We+=2;Ze[tt++]=Ie,Ze[tt++]=ke,Te=We}Ye=Ze.length=tt;var $=le.sourceNode,K="";$&&(K=$.style.display,$.style.display="none");try{for(var z=null;ze<Ke;){var X=Ae[ze],ee=Ae[ze+2]||pe,Y=Ze[it+2]||pe,We=Math.min(ee,Y),J=Ae[ze+1],ne;if(J.nodeType!==1&&(ne=ie.substring(_e,We))){Oe&&(ne=ne.replace(Me,"\r")),J.nodeValue=ne;var re=J.ownerDocument,ye=re.createElement("span");ye.className=Ze[it+1];var be=J.parentNode;be.replaceChild(ye,J),ye.appendChild(J),_e<ee&&(Ae[ze+1]=J=re.createTextNode(ie.substring(We,ee)),be.insertBefore(J,ye.nextSibling))}_e=We,_e>=ee&&(ze+=2),_e>=Y&&(it+=2)}}finally{$&&($.style.display=K)}}var Pe={};function de(le,Oe){for(var Me=Oe.length;--Me>=0;){var ie=Oe[Me];Pe.hasOwnProperty(ie)?N.console&&console.warn("cannot override language handler %s",ie):Pe[ie]=le}}function j(le,Oe){return le&&Pe.hasOwnProperty(le)||(le=/^\s*</.test(Oe)?"default-markup":"default-code"),Pe[le]}de(Ee,["default-code"]),de(ce([],[[c,/^[^<?]+/],[f,/^<!\w[^>]*(?:>|$)/],[E,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["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"]),de(ce([[c,/^[\s]+/,null,` \r
|
|
`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[y,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[l,/^[=<>\/]+/],["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"]),de(ce([],[[P,/^[\s\S]+/]]),["uq.val"]),de(Re({keywords:m,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),de(Re({keywords:"null,true,false"}),["json"]),de(Re({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),de(Re({keywords:u,cStyleComments:!0}),["java"]),de(Re({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),de(Re({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),de(Re({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),de(Re({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),de(Re({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),de(Re({keywords:r,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),de(ce([],[[v,/^[\s\S]+/]]),["regex"]);function O(le){var Oe=le.langExtension;try{var Me=L(le.sourceNode,le.pre),ie=Me.sourceCode;le.sourceCode=ie,le.spans=Me.spans,le.basePos=0,j(Oe,ie)(le),we(le)}catch(pe){N.console&&console.log(pe&&pe.stack||pe)}}function D(le,Oe,Me){var ie=Me||!1,pe=Oe||null,_e=document.createElement("div");_e.innerHTML="<pre>"+le+"</pre>",_e=_e.firstChild,ie&&he(_e,ie,!0);var Ae={langExtension:pe,numberLines:ie,sourceNode:_e,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return O(Ae),_e.innerHTML}function W(le,Oe){var Me=Oe||document.body,ie=Me.ownerDocument||document;function pe(X){return Me.getElementsByTagName(X)}for(var _e=[pe("pre"),pe("code"),pe("xmp")],Ae=[],Ke=0;Ke<_e.length;++Ke)for(var ze=0,Ze=_e[Ke].length;ze<Ze;++ze)Ae.push(_e[Ke][ze]);_e=null;var Ye=Date;Ye.now||(Ye={now:function(){return+new Date}});var it=0,tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Te=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,ke=/pre|xmp/i,We=/^code$/i,$=/^(?:pre|code|xmp)$/i,K={};function z(){for(var X=N.PR_SHOULD_USE_CONTINUATION?Ye.now()+250:Infinity;it<Ae.length&&Ye.now()<X;it++){for(var ee=Ae[it],Y=K,J=ee;J=J.previousSibling;){var ne=J.nodeType,re=(ne===7||ne===8)&&J.nodeValue;if(re?!/^\??prettify\b/.test(re):ne!==3||/\S/.test(J.nodeValue))break;if(re){Y={},re.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Kt,gt,Lt){Y[gt]=Lt});break}}var ye=ee.className;if((Y!==K||Te.test(ye))&&!Ie.test(ye)){for(var be=!1,Ne=ee.parentNode;Ne;Ne=Ne.parentNode){var Ve=Ne.tagName;if($.test(Ve)&&Ne.className&&Te.test(Ne.className)){be=!0;break}}if(!be){ee.className+=" prettyprinted";var $e=Y.lang;if(!$e){$e=ye.match(tt);var Je;!$e&&(Je=ue(ee))&&We.test(Je.tagName)&&($e=Je.className.match(tt)),$e&&($e=$e[1])}var Ct;if(ke.test(ee.tagName))Ct=1;else{var dt=ee.currentStyle,rt=ie.defaultView,Dt=dt?dt.whiteSpace:rt&&rt.getComputedStyle?rt.getComputedStyle(ee,null).getPropertyValue("white-space"):0;Ct=Dt&&Dt.substring(0,3)==="pre"}var Ot=Y.linenums;(Ot=Ot==="true"||+Ot)||(Ot=ye.match(/\blinenums\b(?::(\d+))?/),Ot=Ot?Ot[1]&&Ot[1].length?+Ot[1]:!0:!1),Ot&&he(ee,Ot,Ct);var St={langExtension:$e,sourceNode:ee,numberLines:Ot,pre:Ct,sourceCode:null,basePos:null,spans:null,decorations:null};O(St)}}}it<Ae.length?N.setTimeout(z,250):typeof le=="function"&&le()}z()}var V=N.PR={createSimpleLexer:ce,registerLangHandler:de,sourceDecorator:Re,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:P,PR_COMMENT:E,PR_DECLARATION:f,PR_KEYWORD:x,PR_LITERAL:d,PR_NOCODE:S,PR_PLAIN:c,PR_PUNCTUATION:l,PR_SOURCE:T,PR_STRING:v,PR_TAG:y,PR_TYPE:h,prettyPrintOne:R?N.prettyPrintOne=D:C=D,prettyPrint:H=R?N.prettyPrint=W:H=W},U=N.define;typeof U=="function"&&U.amd&&U("google-code-prettify",[],function(){return V})})()},STEk:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return de});/*! *****************************************************************************
|
|
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 te=function(j,O){return(te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,W){D.__proto__=W}||function(D,W){for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(D[V]=W[V])})(j,O)};function k(j,O){function D(){this.constructor=j}te(j,O),j.prototype=O===null?Object.create(O):(D.prototype=O.prototype,new D)}function R(j,O,D,W){return new(D||(D=Promise))(function(V,U){function le(ie){try{Me(W.next(ie))}catch(pe){U(pe)}}function Oe(ie){try{Me(W.throw(ie))}catch(pe){U(pe)}}function Me(ie){var pe;ie.done?V(ie.value):(pe=ie.value,pe instanceof D?pe:new D(function(_e){_e(pe)})).then(le,Oe)}Me((W=W.apply(j,O||[])).next())})}function B(j,O){var D,W,V,U,le={label:0,sent:function(){if(1&V[0])throw V[1];return V[1]},trys:[],ops:[]};return U={next:Oe(0),throw:Oe(1),return:Oe(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function Oe(Me){return function(ie){return function(pe){if(D)throw new TypeError("Generator is already executing.");for(;le;)try{if(D=1,W&&(V=2&pe[0]?W.return:pe[0]?W.throw||((V=W.return)&&V.call(W),0):W.next)&&!(V=V.call(W,pe[1])).done)return V;switch(W=0,V&&(pe=[2&pe[0],V.value]),pe[0]){case 0:case 1:V=pe;break;case 4:return le.label++,{value:pe[1],done:!1};case 5:le.label++,W=pe[1],pe=[0];continue;case 7:pe=le.ops.pop(),le.trys.pop();continue;default:if(!(V=le.trys,(V=V.length>0&&V[V.length-1])||pe[0]!==6&&pe[0]!==2)){le=0;continue}if(pe[0]===3&&(!V||pe[1]>V[0]&&pe[1]<V[3])){le.label=pe[1];break}if(pe[0]===6&&le.label<V[1]){le.label=V[1],V=pe;break}if(V&&le.label<V[2]){le.label=V[2],le.ops.push(pe);break}V[2]&&le.ops.pop(),le.trys.pop();continue}pe=O.call(j,le)}catch(_e){pe=[6,_e],W=0}finally{D=V=0}if(5&pe[0])throw pe[1];return{value:pe[0]?pe[1]:void 0,done:!0}}([Me,ie])}}}function p(){for(var j=0,O=0,D=arguments.length;O<D;O++)j+=arguments[O].length;var W=Array(j),V=0;for(O=0;O<D;O++)for(var U=arguments[O],le=0,Oe=U.length;le<Oe;le++,V++)W[V]=U[le];return W}var C=function(){function j(){}return j.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},j.setAttributes=function(O,D){for(var W=0,V=D;W<V.length;W++){var U=V[W],le=U[0],Oe=U[1];O.setAttribute(le,Oe)}},j.createRect=function(O,D,W){var V=document.createElementNS("http://www.w3.org/2000/svg","rect");return V.setAttribute("width",O.toString()),V.setAttribute("height",D.toString()),W&&j.setAttributes(V,W),V},j.createLine=function(O,D,W,V,U){var le=document.createElementNS("http://www.w3.org/2000/svg","line");return le.setAttribute("x1",O.toString()),le.setAttribute("y1",D.toString()),le.setAttribute("x2",W.toString()),le.setAttribute("y2",V.toString()),U&&j.setAttributes(le,U),le},j.createPolygon=function(O,D){var W=document.createElementNS("http://www.w3.org/2000/svg","polygon");return W.setAttribute("points",O),D&&j.setAttributes(W,D),W},j.createCircle=function(O,D){var W=document.createElementNS("http://www.w3.org/2000/svg","circle");return W.setAttribute("cx",(O/2).toString()),W.setAttribute("cy",(O/2).toString()),W.setAttribute("r",O.toString()),D&&j.setAttributes(W,D),W},j.createEllipse=function(O,D,W){var V=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return V.setAttribute("cx",(O/2).toString()),V.setAttribute("cy",(D/2).toString()),V.setAttribute("rx",(O/2).toString()),V.setAttribute("ry",(D/2).toString()),W&&j.setAttributes(V,W),V},j.createGroup=function(O){var D=document.createElementNS("http://www.w3.org/2000/svg","g");return O&&j.setAttributes(D,O),D},j.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},j.createMarker=function(O,D,W,V,U,le,Oe){var Me=document.createElementNS("http://www.w3.org/2000/svg","marker");return j.setAttributes(Me,[["id",O],["orient",D],["markerWidth",W.toString()],["markerHeight",V.toString()],["refX",U.toString()],["refY",le.toString()]]),Me.appendChild(Oe),Me},j.createText=function(O){var D=document.createElementNS("http://www.w3.org/2000/svg","text");return D.setAttribute("x","0"),D.setAttribute("y","0"),O&&j.setAttributes(D,O),D},j.createTSpan=function(O,D){var W=document.createElementNS("http://www.w3.org/2000/svg","tspan");return W.textContent=O,D&&j.setAttributes(W,D),W},j.createImage=function(O){var D=document.createElementNS("http://www.w3.org/2000/svg","image");return O&&j.setAttributes(D,O),D},j.createPoint=function(O,D){var W=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return W.x=O,W.y=D,W},j.createPath=function(O,D){var W=document.createElementNS("http://www.w3.org/2000/svg","path");return W.setAttribute("d",O),D&&j.setAttributes(W,D),W},j}(),H=function(){function j(){}return j.addKey=function(O){j.key=O},Object.defineProperty(j,"isLicensed",{get:function(){return!!j.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(j.key)},enumerable:!1,configurable:!0}),j}(),N=function(){function j(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return j.prototype.rasterize=function(O,D,W){var V=this;return new Promise(function(U){var le=W!==void 0?W:document.createElement("canvas");O===null&&(V.markersOnly=!0,V.naturalSize=!1);var Oe=document.createElementNS("http://www.w3.org/2000/svg","svg");Oe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Oe.setAttribute("width",D.width.baseVal.valueAsString),Oe.setAttribute("height",D.height.baseVal.valueAsString),Oe.setAttribute("viewBox","0 0 "+D.viewBox.baseVal.width.toString()+" "+D.viewBox.baseVal.height.toString()),Oe.innerHTML=D.innerHTML,V.naturalSize===!0?(Oe.width.baseVal.value=O.naturalWidth,Oe.height.baseVal.value=O.naturalHeight):V.width!==void 0&&V.height!==void 0&&(Oe.width.baseVal.value=V.width,Oe.height.baseVal.value=V.height),le.width=Oe.width.baseVal.value,le.height=Oe.height.baseVal.value;var Me=Oe.outerHTML,ie=le.getContext("2d");V.markersOnly!==!0&&ie.drawImage(O,0,0,le.width,le.height);var pe=window.URL,_e=new Image(le.width,le.height);_e.setAttribute("crossOrigin","anonymous");var Ae=new Blob([Me],{type:"image/svg+xml"}),Ke=pe.createObjectURL(Ae);_e.onload=function(){ie.drawImage(_e,0,0),pe.revokeObjectURL(Ke);var ze=le.toDataURL(V.imageType,V.imageQuality);U(ze)},_e.src=Ke})},j}(),e=function(){},A=function(){function j(O){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+O+"_"}return Object.defineProperty(j.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(j.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(j.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),j.prototype.addClass=function(O){return this.styleSheet===void 0&&this.addStyleSheet(),O.name=""+this.classNamePrefix+O.localName,this.classes.push(O),this.styleSheet.sheet.insertRule("."+O.name+" {"+O.style+"}",this.styleSheet.sheet.cssRules.length),O},j.prototype.addRule=function(O){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(O),this.styleSheet.sheet.insertRule(O.selector+" {"+O.style+"}",this.styleSheet.sheet.cssRules.length)},j.prototype.addStyleSheet=function(){var O;this.styleSheet=document.createElement("style"),((O=this.styleSheetRoot)!==null&&O!==void 0?O:document.head).appendChild(this.styleSheet),this.addRule(new g("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new g("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new g("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new m("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new m("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},j.prototype.removeStyleSheet=function(){var O;this.styleSheet&&(((O=this.styleSheetRoot)!==null&&O!==void 0?O:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},j}(),g=function(j,O){this.selector=j,this.style=O},m=function(j,O){this.localName=j,this.style=O},u=function(){function j(O,D,W,V,U){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=O,this.displayMode=D,this.markerItems=W,this.uiStyleSettings=V,this.styles=U,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return j.prototype.show=function(O){var D=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=O,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var W=document.createElement("div");W.className=this.toolbarBlockStyleClass.name,W.style.whiteSpace="nowrap",this.uiContainer.appendChild(W),this.addActionButton(W,'<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(W,'<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(W,'<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(W,'<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(W,'<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(W,'<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(W,'<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(W,'<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(U){var le=document.createElement("div");le.className=""+D.toolbarButtonStyleClass.name,le.setAttribute("data-type-name",U.typeName),le.innerHTML=U.icon,le.addEventListener("click",function(){D.markerToolbarButtonClicked(le,U)}),D.buttons.push(le),D.markerButtons.push(le)}),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 V=document.createElement("div");V.className=this.toolbarBlockStyleClass.name,V.style.whiteSpace="nowrap",V.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(V),this.addActionButton(V,'<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(V,'<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()},j.prototype.addButtonClickListener=function(O){this.buttonClickListeners.push(O)},j.prototype.removeButtonClickListener=function(O){this.buttonClickListeners.indexOf(O)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(O),1)},j.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},j.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var O=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var D=0;D<this.markerButtons.length;D++)D<O||D===O&&this.markerButtons.length-1===O?this.markerButtonBlock.appendChild(this.markerButtons[D]):(D===O&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[D]))}},j.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")},j.prototype.resetButtonStyles=function(){var O=this;this.buttons.forEach(function(D){D.className=D.className.replace(O.uiStyleSettings.toolbarButtonStyleColorsClassName?O.uiStyleSettings.toolbarButtonStyleColorsClassName:O.toolbarButtonStyleColorsClass.name,"").trim(),D.className=D.className.replace(O.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?O.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:O.toolbarActiveButtonStyleColorsClass.name,"").trim(),D.className+=" "+(O.uiStyleSettings.toolbarButtonStyleColorsClassName?O.uiStyleSettings.toolbarButtonStyleColorsClassName:O.toolbarButtonStyleColorsClass.name)})},j.prototype.addActionButton=function(O,D,W){var V=this,U=document.createElement("div");switch(U.className=""+this.toolbarButtonStyleClass.name,U.innerHTML=D,U.setAttribute("data-action",W),U.addEventListener("click",function(){V.actionToolbarButtonClicked(U,W)}),W){case"select":U.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":U.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":U.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":U.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":U.style.fill=this.uiStyleSettings.closeButtonColor}O.appendChild(U),this.buttons.push(U)},j.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new m("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 m("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new m("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new m("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 m("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var O=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new m("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*O)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*O)+`px;
|
|
padding: `+O+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new m("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new m("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new g("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new g("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},j.prototype.markerToolbarButtonClicked=function(O,D){this.setActiveButton(O),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(W){return W("marker",D)}),this.markerButtonOverflowBlock.style.display="none"},j.prototype.actionToolbarButtonClicked=function(O,D){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(W){return W("action",D)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},j.prototype.setActiveButton=function(O){this.resetButtonStyles(),O.className=O.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),O.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},j.prototype.setActiveMarkerButton=function(O){var D=this.markerButtons.find(function(W){return W.getAttribute("data-type-name")===O});D&&this.setActiveButton(D)},j.prototype.setCurrentMarker=function(O){var D=this;this.currentMarker=O,this.buttons.filter(function(W){return/delete|notes/.test(W.getAttribute("data-action"))}).forEach(function(W){D.currentMarker===void 0?(W.style.fillOpacity="0.4",W.style.pointerEvents="none"):(W.style.fillOpacity="1",W.style.pointerEvents="all")})},j}(),a=function(){function j(O,D,W,V){this.panels=[],this.panelButtons=[],this.markerjsContainer=O,this.displayMode=D,this.uiStyleSettings=W,this.styles=V,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return j.prototype.addStyles=function(){var O;this.toolboxStyleClass=this.styles.addClass(new m("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 m("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var D=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new m("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new m("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new m("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 m("toolbox-panel-row_colors",`
|
|
background-color: `+((O=this.uiStyleSettings.toolboxBackgroundColor)!==null&&O!==void 0?O:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new m("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*D)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*D)+`px;
|
|
padding: `+D+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new m("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new m("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new g("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new g("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},j.prototype.show=function(O){var D;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=O,this.uiContainer.className=this.toolboxStyleClass.name+" "+((D=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&D!==void 0?D:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},j.prototype.setPanelButtons=function(O){var D,W,V=this;this.panels=O,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((D=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&D!==void 0?D:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((W=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&W!==void 0?W:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(U){var le;U.uiStyleSettings=V.uiStyleSettings;var Oe=document.createElement("div");Oe.className=V.toolboxButtonStyleClass.name+" "+((le=V.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&le!==void 0?le:V.toolboxButtonStyleColorsClass.name),Oe.innerHTML=U.icon,Oe.title=U.title,Oe.addEventListener("click",function(){V.panelButtonClick(U)}),V.panelButtons.push(Oe),V.buttonRow.appendChild(Oe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},j.prototype.panelButtonClick=function(O){var D=this,W=-1;if(O!==this.activePanel){W=this.panels.indexOf(O),this.panelRow.innerHTML="";var V=O.getUi();V.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(V),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=O}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){D.displayMode==="inline"?D.panelRow.style.display="none":D.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(U,le){var Oe,Me;U.className=D.toolboxButtonStyleClass.name+" "+(le===W?""+((Oe=D.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Oe!==void 0?Oe:D.toolboxActiveButtonStyleColorsClass.name):""+((Me=D.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Me!==void 0?Me:D.toolboxButtonStyleColorsClass.name))})},j}(),r=function(j,O){this.title=j,this.icon=O},o=function(j){function O(D,W,V,U){var le=j.call(this,D,U||'<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 le.colors=[],le.addTransparent=!1,le.colorBoxes=[],le.colors=W,le.currentColor=V,le.setCurrentColor=le.setCurrentColor.bind(le),le.getColorBox=le.getColorBox.bind(le),le}return k(O,j),O.prototype.getUi=function(){var D=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.whiteSpace="nowrap",this.colors.forEach(function(V){var U=D.getColorBox(V);W.appendChild(U),D.colorBoxes.push(U)}),W},O.prototype.getColorBox=function(D){var W=this,V=this.uiStyleSettings.toolbarHeight/4,U=this.uiStyleSettings.toolbarHeight-V,le=document.createElement("div");le.style.display="inline-block",le.style.boxSizing="content-box",le.style.width=U-2+"px",le.style.height=U-2+"px",le.style.padding="1px",le.style.marginRight="2px",le.style.marginBottom="2px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderRadius=(U+2)/2+"px",le.style.borderColor=D===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){W.setCurrentColor(D,le)});var Oe=document.createElement("div");return Oe.style.display="inline-block",Oe.style.width=U-2+"px",Oe.style.height=U-2+"px",Oe.style.backgroundColor=D,Oe.style.borderRadius=U/2+"px",D==="transparent"&&(Oe.style.fill=this.uiStyleSettings.toolboxAccentColor,Oe.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>`),le.appendChild(Oe),le},O.prototype.setCurrentColor=function(D,W){var V=this;this.currentColor=D,this.colorBoxes.forEach(function(U){U.style.borderColor=U===W?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(D)},O}(r),s=function(){function j(O,D,W){this._state="new",this._isSelected=!1,this._container=O,this._overlayContainer=D,this.globalSettings=W,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(j.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),j.prototype.ownsTarget=function(O){return!1},Object.defineProperty(j.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),j.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},j.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},j.prototype.pointerDown=function(O,D){},j.prototype.dblClick=function(O,D){},j.prototype.manipulate=function(O){},j.prototype.pointerUp=function(O){this.stateChanged()},j.prototype.dispose=function(){},j.prototype.addMarkerVisualToContainer=function(O){this.container.childNodes.length>0?this.container.insertBefore(O,this.container.childNodes[0]):this.container.appendChild(O)},j.prototype.getState=function(){return{typeName:j.typeName,state:this.state,notes:this.notes}},j.prototype.restoreState=function(O){this._state=O.state,this.notes=O.notes},j.prototype.scale=function(O,D){},j.prototype.colorChanged=function(O){this.onColorChanged&&this.onColorChanged(O),this.stateChanged()},j.prototype.fillColorChanged=function(O){this.onFillColorChanged&&this.onFillColorChanged(O),this.stateChanged()},j.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var O=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),O.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(O)&&this.onStateChanged(this)}},j.typeName="MarkerBase",j}(),i=function(){function j(){this.findGripByVisual=this.findGripByVisual.bind(this)}return j.prototype.findGripByVisual=function(O){return this.topLeft.ownsTarget(O)?this.topLeft:this.topCenter.ownsTarget(O)?this.topCenter:this.topRight.ownsTarget(O)?this.topRight:this.centerLeft.ownsTarget(O)?this.centerLeft:this.centerRight.ownsTarget(O)?this.centerRight:this.bottomLeft.ownsTarget(O)?this.bottomLeft:this.bottomCenter.ownsTarget(O)?this.bottomCenter:this.bottomRight.ownsTarget(O)?this.bottomRight:void 0},j}(),n=function(){function j(){this.GRIP_SIZE=10,this.visual=C.createGroup(),this.visual.appendChild(C.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(C.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return j.prototype.ownsTarget=function(O){return O===this.visual||O===this.visual.childNodes[0]||O===this.visual.childNodes[1]},j}(),t=function(){function j(){}return j.toITransformMatrix=function(O){return{a:O.a,b:O.b,c:O.c,d:O.d,e:O.e,f:O.f}},j.toSVGMatrix=function(O,D){return O.a=D.a,O.b=D.b,O.c=D.c,O.d=D.d,O.e=D.e,O.f=D.f,O},j}(),_=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.left=0,U.top=0,U.width=0,U.height=0,U.defaultSize={x:50,y:20},U.offsetX=0,U.offsetY=0,U.rotationAngle=0,U.CB_DISTANCE=10,U._suppressMarkerCreateEvent=!1,U.container.transform.baseVal.appendItem(C.createTransform()),U.setupControlBox(),U}return k(O,j),Object.defineProperty(O.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"visual",{get:function(){return this._visual},set:function(D){this._visual=D;var W=C.createTransform();this._visual.transform.baseVal.appendItem(W)},enumerable:!1,configurable:!0}),O.prototype.ownsTarget=function(D){return!!j.prototype.ownsTarget.call(this,D)||!!(this.controlGrips.findGripByVisual(D)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(D))},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.state==="new"&&(this.left=D.x,this.top=D.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var V=this.unrotatePoint(D);if(this.manipulationStartX=V.x,this.manipulationStartY=V.y,this.offsetX=V.x-this.left,this.offsetY=V.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(W),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(W)){this.activeGrip=this.rotatorGrip;var U=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=U.x-this.width/2,this.top=U.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},O.prototype.pointerUp=function(D){var W=this.state;j.prototype.pointerUp.call(this,D),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(D),this._state="select",W==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},O.prototype.moveVisual=function(D){this.visual.style.transform="translate("+D.x+"px, "+D.y+"px)"},O.prototype.manipulate=function(D){var W=this.unrotatePoint(D);this.state==="creating"?this.resize(D):this.state==="move"?(this.left=this.manipulationStartLeft+(W.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(W.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(W):this.state==="rotate"&&this.rotate(D)},O.prototype.resize=function(D){var W=this.manipulationStartLeft,V=this.manipulationStartWidth,U=this.manipulationStartTop,le=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:W=this.manipulationStartLeft+D.x-this.manipulationStartX,V=this.manipulationStartWidth+this.manipulationStartLeft-W;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:V=this.manipulationStartWidth+D.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:U=this.manipulationStartTop+D.y-this.manipulationStartY,le=this.manipulationStartHeight+this.manipulationStartTop-U;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:le=this.manipulationStartHeight+D.y-this.manipulationStartY}V>=0?(this.left=W,this.width=V):(this.left=W+V,this.width=-V),le>=0?(this.top=U,this.height=le):(this.top=U+le,this.height=-le),this.setSize()},O.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},O.prototype.rotate=function(D){if(Math.abs(D.x-this.centerX)>.1){var W=Math.sign(D.x-this.centerX);this.rotationAngle=180*Math.atan((D.y-this.centerY)/(D.x-this.centerX))/Math.PI+90*W,this.applyRotation()}},O.prototype.applyRotation=function(){var D=this.container.transform.baseVal.getItem(0);D.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(D,0)},O.prototype.rotatePoint=function(D){if(this.rotationAngle===0)return D;var W=this.container.getCTM(),V=C.createPoint(D.x,D.y);return{x:(V=V.matrixTransform(W)).x,y:V.y}},O.prototype.unrotatePoint=function(D){if(this.rotationAngle===0)return D;var W=this.container.getCTM();W=W.inverse();var V=C.createPoint(D.x,D.y);return{x:(V=V.matrixTransform(W)).x,y:V.y}},O.prototype.select=function(){j.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},O.prototype.deselect=function(){j.prototype.deselect.call(this),this.controlBox.style.display="none"},O.prototype.setupControlBox=function(){this.controlBox=C.createGroup();var D=C.createTransform();D.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(D),this.container.appendChild(this.controlBox),this.controlRect=C.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=C.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 i,this.addControlGrips(),this.controlBox.style.display="none"},O.prototype.adjustControlBox=function(){var D=this.controlBox.transform.baseVal.getItem(0);D.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(D,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()},O.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()},O.prototype.createGrip=function(){var D=new n;return D.visual.transform.baseVal.appendItem(C.createTransform()),this.controlBox.appendChild(D.visual),D},O.prototype.positionGrips=function(){var D=this.controlGrips.topLeft.GRIP_SIZE,W=-D/2,V=W,U=(this.width+this.CB_DISTANCE)/2-D/2,le=(this.height+this.CB_DISTANCE)/2-D/2,Oe=this.height+this.CB_DISTANCE-D/2,Me=this.width+this.CB_DISTANCE-D/2;this.positionGrip(this.controlGrips.topLeft.visual,W,V),this.positionGrip(this.controlGrips.topCenter.visual,U,V),this.positionGrip(this.controlGrips.topRight.visual,Me,V),this.positionGrip(this.controlGrips.centerLeft.visual,W,le),this.positionGrip(this.controlGrips.centerRight.visual,Me,le),this.positionGrip(this.controlGrips.bottomLeft.visual,W,Oe),this.positionGrip(this.controlGrips.bottomCenter.visual,U,Oe),this.positionGrip(this.controlGrips.bottomRight.visual,Me,Oe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,U,V-3*this.CB_DISTANCE)},O.prototype.positionGrip=function(D,W,V){var U=D.transform.baseVal.getItem(0);U.setTranslate(W,V),D.transform.baseVal.replaceItem(U,0)},O.prototype.hideControlBox=function(){this.controlBox.style.display="none"},O.prototype.showControlBox=function(){this.controlBox.style.display=""},O.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},j.prototype.getState.call(this))},O.prototype.restoreState=function(D){j.prototype.restoreState.call(this,D);var W=D;this.left=W.left,this.top=W.top,this.width=W.width,this.height=W.height,this.rotationAngle=W.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,W.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,W.containerTransformMatrix))},O.prototype.scale=function(D,W){j.prototype.scale.call(this,D,W);var V=this.rotatePoint({x:this.left,y:this.top}),U=this.unrotatePoint({x:V.x*D,y:V.y*W});this.left=U.x,this.top=U.y,this.width=this.width*D,this.height=this.height*W,this.adjustControlBox()},O}(s),b=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.fillColor="transparent",U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.opacity=1,U.setStrokeColor=U.setStrokeColor.bind(U),U.setFillColor=U.setFillColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.createVisual=U.createVisual.bind(U),U}return k(O,j),O.prototype.ownsTarget=function(D){return!(!j.prototype.ownsTarget.call(this,D)&&D!==this.visual)},O.prototype.createVisual=function(){this.visual=C.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)},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.state==="new"&&(this.createVisual(),this.moveVisual(D),this._state="creating")},O.prototype.manipulate=function(D){j.prototype.manipulate.call(this,D)},O.prototype.resize=function(D){j.prototype.resize.call(this,D),this.setSize()},O.prototype.setSize=function(){j.prototype.setSize.call(this),C.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},O.prototype.pointerUp=function(D){j.prototype.pointerUp.call(this,D),this.setSize()},O.prototype.setStrokeColor=function(D){this.strokeColor=D,this.visual&&C.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(D),this.stateChanged()},O.prototype.setFillColor=function(D){this.fillColor=D,this.visual&&C.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},O.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.visual&&C.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},O.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.visual&&C.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},O.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},j.prototype.getState.call(this))},O.prototype.restoreState=function(D){var W=D;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),j.prototype.restoreState.call(this,D),this.setSize()},O.prototype.scale=function(D,W){j.prototype.scale.call(this,D,W),this.setSize()},O.title="Rectangle marker",O}(_),v=function(j){function O(D,W,V,U){var le=j.call(this,D,U||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return le.widths=[],le.widthBoxes=[],le.widths=W,le.currentWidth=V,le.setCurrentWidth=le.setCurrentWidth.bind(le),le}return k(O,j),O.prototype.getUi=function(){var D=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.widths.forEach(function(V){var U=document.createElement("div");U.style.display="flex",U.style.flexGrow="2",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.borderColor=V===D.currentWidth?D.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){D.setCurrentWidth(V,U)}),W.appendChild(U);var le=document.createElement("div");le.innerText=V.toString(),le.style.marginRight="5px",U.appendChild(le);var Oe=document.createElement("div");Oe.style.minHeight="20px",Oe.style.flexGrow="2",Oe.style.display="flex",Oe.style.alignItems="center";var Me=document.createElement("hr");Me.style.minWidth="20px",Me.style.border="0px",Me.style.borderTop=V+"px solid "+D.uiStyleSettings.toolboxColor,Me.style.flexGrow="2",Oe.appendChild(Me),U.appendChild(Oe),D.widthBoxes.push(U)}),W},O.prototype.setCurrentWidth=function(D,W){var V=this;this.currentWidth=D,this.widthBoxes.forEach(function(U){U.style.borderColor=U===W?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},O}(r),x=function(j){function O(D,W,V,U){var le=j.call(this,D,U||'<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 le.styles=[],le.styleBoxes=[],le.styles=W,le.currentStyle=V,le.setCurrentStyle=le.setCurrentStyle.bind(le),le}return k(O,j),O.prototype.getUi=function(){var D=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.styles.forEach(function(V){var U=document.createElement("div");U.style.display="flex",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.overflow="hidden",U.style.maxWidth=100/D.styles.length-5+"%",U.style.borderColor=V===D.currentStyle?D.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){D.setCurrentStyle(V,U)}),W.appendChild(U);var le=document.createElement("div");le.style.minHeight="20px",le.style.flexGrow="2",le.style.overflow="hidden";var Oe=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+D.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(V!==""?'stroke-dasharray="'+V+'"':"")+` />
|
|
</svg>`;le.innerHTML=Oe,U.appendChild(le),D.styleBoxes.push(U)}),W},O.prototype.setCurrentStyle=function(D,W){var V=this;this.currentStyle=D,this.styleBoxes.forEach(function(U){U.style.borderColor=U===W?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},O}(r),E=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.strokeColor=V.defaultColor,U.strokeWidth=V.defaultStrokeWidth,U.strokeDasharray=V.defaultStrokeDasharray,U.strokePanel=new o("Line color",V.defaultColorSet,V.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new v("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new x("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return k(O,j),Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=j.prototype.getState.call(this);return D.typeName=O.typeName,D},O.typeName="FrameMarker",O.title="Frame marker",O.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',O}(b),h=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},d=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.x1=0,U.y1=0,U.x2=0,U.y2=0,U.defaultLength=50,U.manipulationStartX=0,U.manipulationStartY=0,U.manipulationStartX1=0,U.manipulationStartY1=0,U.manipulationStartX2=0,U.manipulationStartY2=0,U.setupControlBox(),U}return k(O,j),O.prototype.ownsTarget=function(D){return!!j.prototype.ownsTarget.call(this,D)||!(!this.grip1.ownsTarget(D)&&!this.grip2.ownsTarget(D))},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.manipulationStartX=D.x,this.manipulationStartY=D.y,this.state==="new"&&(this.x1=D.x,this.y1=D.y,this.x2=D.x,this.y2=D.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(W)?this.activeGrip=this.grip1:this.grip2.ownsTarget(W)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},O.prototype.pointerUp=function(D){var W=this.state;j.prototype.pointerUp.call(this,D),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(D),this._state="select",W==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},O.prototype.adjustVisual=function(){},O.prototype.manipulate=function(D){this.state==="creating"?this.resize(D):this.state==="move"?(this.x1=this.manipulationStartX1+D.x-this.manipulationStartX,this.y1=this.manipulationStartY1+D.y-this.manipulationStartY,this.x2=this.manipulationStartX2+D.x-this.manipulationStartX,this.y2=this.manipulationStartY2+D.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(D)},O.prototype.resize=function(D){switch(this.activeGrip){case this.grip1:this.x1=D.x,this.y1=D.y;break;case this.grip2:case void 0:this.x2=D.x,this.y2=D.y}this.adjustVisual(),this.adjustControlBox()},O.prototype.select=function(){j.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},O.prototype.deselect=function(){j.prototype.deselect.call(this),this.controlBox.style.display="none"},O.prototype.setupControlBox=function(){this.controlBox=C.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},O.prototype.adjustControlBox=function(){this.positionGrips()},O.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},O.prototype.createGrip=function(){var D=new n;return D.visual.transform.baseVal.appendItem(C.createTransform()),this.controlBox.appendChild(D.visual),D},O.prototype.positionGrips=function(){var D=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-D/2,this.y1-D/2),this.positionGrip(this.grip2.visual,this.x2-D/2,this.y2-D/2)},O.prototype.positionGrip=function(D,W,V){var U=D.transform.baseVal.getItem(0);U.setTranslate(W,V),D.transform.baseVal.replaceItem(U,0)},O.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},j.prototype.getState.call(this))},O.prototype.restoreState=function(D){j.prototype.restoreState.call(this,D);var W=D;this.x1=W.x1,this.y1=W.y1,this.x2=W.x2,this.y2=W.y2},O.prototype.scale=function(D,W){j.prototype.scale.call(this,D,W),this.x1=this.x1*D,this.y1=this.y1*W,this.x2=this.x2*D,this.y2=this.y2*W,this.adjustVisual(),this.adjustControlBox()},O}(s),l=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.setStrokeColor=U.setStrokeColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.strokeColor=V.defaultColor,U.strokeWidth=V.defaultStrokeWidth,U.strokeDasharray=V.defaultStrokeDasharray,U.strokePanel=new o("Line color",V.defaultColorSet,V.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new v("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new x("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return k(O,j),O.prototype.ownsTarget=function(D){return!(!j.prototype.ownsTarget.call(this,D)&&D!==this.visual&&D!==this.selectorLine&&D!==this.visibleLine)},O.prototype.createVisual=function(){this.visual=C.createGroup(),this.selectorLine=C.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=C.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)},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},O.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()),C.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),C.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),C.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},O.prototype.setStrokeColor=function(D){this.strokeColor=D,this.adjustVisual(),this.colorChanged(D)},O.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.adjustVisual()},O.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.adjustVisual(),this.stateChanged()},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},j.prototype.getState.call(this));return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){j.prototype.restoreState.call(this,D);var W=D;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.createVisual(),this.adjustVisual()},O.typeName="LineMarker",O.title="Line marker",O.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',O}(d),c=function(j){function O(D,W,V,U){var le=j.call(this,D,U||'<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 le.fonts=[],le.fontBoxes=[],le.fonts=W,le.currentFont=V,le.setCurrentFont=le.setCurrentFont.bind(le),le}return k(O,j),O.prototype.getUi=function(){var D=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.flexGrow="2",this.fonts.forEach(function(V){var U=document.createElement("div");U.style.display="inline-block",U.style.alignItems="center",U.style.justifyContent="space-between",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.overflow="hidden",U.style.maxWidth=100/D.fonts.length-5+"%",U.style.borderColor=V===D.currentFont?D.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){D.setCurrentFont(V,U)}),W.appendChild(U);var le=document.createElement("div");le.style.display="flex",le.style.minHeight="20px",le.style.flexGrow="2",le.style.fontFamily=V,le.style.overflow="hidden";var Oe=document.createElement("div");Oe.style.whiteSpace="nowrap",Oe.style.overflow="hidden",Oe.style.textOverflow="ellipsis",Oe.innerHTML="The quick brown fox jumps over the lazy dog",le.appendChild(Oe),U.appendChild(le),D.fontBoxes.push(U)}),W},O.prototype.setCurrentFont=function(D,W){var V=this;this.currentFont=D,this.fontBoxes.forEach(function(U){U.style.borderColor=U===W?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},O}(r),y=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.color="transparent",U.padding=5,U.DEFAULT_TEXT="your text here",U.text=U.DEFAULT_TEXT,U.isMoved=!1,U.color=V.defaultColor,U.fontFamily=V.defaultFontFamily,U.defaultSize={x:100,y:30},U.setColor=U.setColor.bind(U),U.setFont=U.setFont.bind(U),U.renderText=U.renderText.bind(U),U.sizeText=U.sizeText.bind(U),U.textEditDivClicked=U.textEditDivClicked.bind(U),U.showTextEditor=U.showTextEditor.bind(U),U.setSize=U.setSize.bind(U),U.positionTextEditor=U.positionTextEditor.bind(U),U.colorPanel=new o("Color",V.defaultColorSet,V.defaultColor),U.colorPanel.onColorChanged=U.setColor,U.fontFamilyPanel=new c("Font",V.defaultFontFamilies,V.defaultFontFamily),U.fontFamilyPanel.onFontChanged=U.setFont,U}return k(O,j),O.prototype.ownsTarget=function(D){if(j.prototype.ownsTarget.call(this,D)||D===this.visual||D===this.textElement||D===this.bgRectangle)return!0;var W=!1;return this.textElement.childNodes.forEach(function(V){V===D&&(W=!0)}),W},O.prototype.createVisual=function(){this.visual=C.createGroup(),this.bgRectangle=C.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=C.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(C.createTransform()),this.textElement.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.isMoved=!1,this.pointerDownPoint=D,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(D),this._state="creating")},O.prototype.renderText=function(){var D=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(W){D.textElement.appendChild(C.createTSpan(W.trim()===""?" ":W.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},O.prototype.getTextScale=function(){var D=this.textElement.getBBox(),W=1;if(D.width>0&&D.height>0){var V=(1*this.width-this.width*this.padding*2/100)/D.width,U=(1*this.height-this.height*this.padding*2/100)/D.height;W=Math.min(V,U)}return W},O.prototype.getTextPosition=function(D){var W=this.textElement.getBBox(),V=0,U=0;return W.width>0&&W.height>0&&(V=(this.width-W.width*D)/2,U=this.height/2-W.height*D/2),{x:V,y:U}},O.prototype.sizeText=function(){var D=this.textElement.getBBox(),W=this.getTextScale(),V=this.getTextPosition(W);V.y-=D.y*W,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+V.x+"px, "+V.y+"px) scale("+W+", "+W+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(V.x,V.y),this.textElement.transform.baseVal.getItem(1).setScale(W,W))},O.prototype.manipulate=function(D){j.prototype.manipulate.call(this,D),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(D.x-this.pointerDownPoint.x)>5||Math.abs(D.y-this.pointerDownPoint.y)>5)},O.prototype.resize=function(D){j.prototype.resize.call(this,D),this.isMoved=!0,this.setSize(),this.sizeText()},O.prototype.setSize=function(){j.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(C.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),C.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},O.prototype.pointerUp=function(D){var W=this.state;W==="creating"&&(this._suppressMarkerCreateEvent=!0),j.prototype.pointerUp.call(this,D),this.setSize(),(W==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},O.prototype.showTextEditor=function(){var D=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(W){W.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var W=Number.parseFloat(D.textEditor.style.fontSize);D.textEditor.clientWidth>=Number.parseInt(D.textEditor.style.maxWidth)&&W>.9;)W-=.1,D.textEditor.style.fontSize=Math.max(W,.9)+"em"}),this.textEditor.addEventListener("keyup",function(W){W.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(W){if(W.clipboardData){var V=W.clipboardData.getData("text"),U=window.getSelection();if(!U.rangeCount)return!1;U.deleteFromDocument(),U.getRangeAt(0).insertNode(document.createTextNode(V)),W.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){D.textEditDivClicked(D.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},O.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var D=this.getTextScale(),W=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),V=this.textElement.getBBox(),U={x:V.width*D,y:V.height*D};W.x-=U.x/2,W.y-=U.y/2,this.textEditor.style.top=W.y+"px",this.textEditor.style.left=W.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-W.x+"px",this.textEditor.style.fontSize=Math.max(16*D,12)+"px",this.textElement.style.display="none"}},O.prototype.textEditDivClicked=function(D){this.text=D.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},O.prototype.select=function(){j.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},O.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),j.prototype.deselect.call(this)},O.prototype.dblClick=function(D,W){j.prototype.dblClick.call(this,D,W),this.showTextEditor()},O.prototype.setColor=function(D){this.textElement&&C.setAttributes(this.textElement,[["fill",D]]),this.color=D,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(D)},O.prototype.setFont=function(D){this.textElement&&C.setAttributes(this.textElement,[["font-family",D]]),this.fontFamily=D,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},O.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},O.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},j.prototype.getState.call(this));return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){var W=D;this.color=W.color,this.fontFamily=W.fontFamily,this.padding=W.padding,this.text=W.text,this.createVisual(),j.prototype.restoreState.call(this,D),this.setSize()},O.prototype.scale=function(D,W){j.prototype.scale.call(this,D,W),this.setSize(),this.sizeText(),this.positionTextEditor()},O.typeName="TextMarker",O.title="Text marker",O.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>',O}(_),f=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.color="transparent",U.lineWidth=3,U.drawing=!1,U.pixelRatio=1,U.color=V.defaultColor,U.lineWidth=V.defaultStrokeWidth,U.pixelRatio=V.freehandPixelRatio,U.setColor=U.setColor.bind(U),U.addCanvas=U.addCanvas.bind(U),U.finishCreation=U.finishCreation.bind(U),U.setLineWidth=U.setLineWidth.bind(U),U.colorPanel=new o("Color",V.defaultColorSet,V.defaultColor),U.colorPanel.onColorChanged=U.setColor,U.lineWidthPanel=new v("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),U.lineWidthPanel.onWidthChanged=U.setLineWidth,U}return k(O,j),O.prototype.ownsTarget=function(D){return!(!j.prototype.ownsTarget.call(this,D)&&D!==this.visual&&D!==this.drawingImage)},O.prototype.createVisual=function(){this.visual=C.createGroup(),this.drawingImage=C.createImage(),this.visual.appendChild(this.drawingImage);var D=C.createTransform();this.visual.transform.baseVal.appendItem(D),this.addMarkerVisualToContainer(this.visual)},O.prototype.pointerDown=function(D,W){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(D.x,D.y),this.drawing=!0):j.prototype.pointerDown.call(this,D,W)},O.prototype.manipulate=function(D){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(D.x,D.y),this.canvasContext.stroke()):j.prototype.manipulate.call(this,D)},O.prototype.resize=function(D){j.prototype.resize.call(this,D),C.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),C.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},O.prototype.pointerUp=function(D){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):j.prototype.pointerUp.call(this,D)},O.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)},O.prototype.select=function(){this.state==="creating"&&this.finishCreation(),j.prototype.select.call(this)},O.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),j.prototype.deselect.call(this)},O.prototype.finishCreation=function(){for(var D=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),W=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],V=W[0],U=W[1],le=W[2],Oe=W[3],Me=!1,ie=0;ie<this.canvasElement.height;ie++)for(var pe=0;pe<this.canvasElement.width;pe++)D.data[ie*this.canvasElement.width*4+4*pe+3]>0&&(Me=!0,ie<U&&(U=ie),pe<V&&(V=pe),ie>Oe&&(Oe=ie),pe>le&&(le=pe));if(Me){this.left=V/this.pixelRatio,this.top=U/this.pixelRatio,this.width=(le-V)/this.pixelRatio,this.height=(Oe-U)/this.pixelRatio;var _e=document.createElement("canvas");_e.width=le-V,_e.height=Oe-U,_e.getContext("2d").putImageData(this.canvasContext.getImageData(V,U,le-V,Oe-U),0,0),this.drawingImgUrl=_e.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},O.prototype.setDrawingImage=function(){C.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),C.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},O.prototype.setColor=function(D){this.color=D,this.colorChanged(D)},O.prototype.setLineWidth=function(D){this.lineWidth=D},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=Object.assign({drawingImgUrl:this.drawingImgUrl},j.prototype.getState.call(this));return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){this.createVisual(),j.prototype.restoreState.call(this,D),this.drawingImgUrl=D.drawingImgUrl,this.setDrawingImage()},O.prototype.scale=function(D,W){j.prototype.scale.call(this,D,W),this.setDrawingImage()},O.typeName="FreehandMarker",O.title="Freehand marker",O.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>',O}(_),T=function(j){function O(D,W,V){var U=j.call(this,D,V||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return U.typeBoxes=[],U.currentType=W,U.setCurrentType=U.setCurrentType.bind(U),U}return k(O,j),O.prototype.getUi=function(){var D=this,W=document.createElement("div");W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2";for(var V=function(Oe){var Me="both";switch(Oe){case 0:Me="both";break;case 1:Me="start";break;case 2:Me="end";break;case 3:Me="none"}var ie=document.createElement("div");if(ie.style.display="flex",ie.style.flexGrow="2",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=Me===U.currentType?U.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){D.setCurrentType(Me,ie)}),W.appendChild(ie),Me==="both"||Me==="start"){var pe=document.createElement("div");pe.style.display="flex",pe.style.alignItems="center",pe.style.minHeight="20px",pe.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="`+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,pe.style.marginLeft="5px",ie.appendChild(pe)}var _e=document.createElement("div");_e.style.display="flex",_e.style.alignItems="center",_e.style.minHeight="20px",_e.style.flexGrow="2";var Ae=document.createElement("hr");if(Ae.style.minWidth="20px",Ae.style.border="0px",Ae.style.borderTop="3px solid "+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee"),Ae.style.flexGrow="2",_e.appendChild(Ae),ie.appendChild(_e),Me==="both"||Me==="end"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(U.uiStyleSettings!==void 0?U.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ke.style.marginRight="5px",ie.appendChild(Ke)}U.typeBoxes.push(ie)},U=this,le=0;le<4;le++)V(le);return W},O.prototype.setCurrentType=function(D,W){var V=this;this.currentType=D,this.typeBoxes.forEach(function(U){U.style.borderColor=U===W?V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},O}(r),I=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.arrowType="end",U.arrowBaseHeight=10,U.arrowBaseWidth=10,U.getArrowPoints=U.getArrowPoints.bind(U),U.setArrowType=U.setArrowType.bind(U),U.arrowTypePanel=new T("Arrow type","end"),U.arrowTypePanel.onArrowTypeChanged=U.setArrowType,U}return k(O,j),O.prototype.ownsTarget=function(D){return!(!j.prototype.ownsTarget.call(this,D)&&D!==this.arrow1&&D!==this.arrow2)},O.prototype.getArrowPoints=function(D,W){var V=this.arrowBaseWidth+2*this.strokeWidth,U=this.arrowBaseHeight+2*this.strokeWidth;return D-V/2+","+(W+U/2)+" "+D+","+(W-U/2)+" "+(D+V/2)+","+(W+U/2)},O.prototype.createTips=function(){this.arrow1=C.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=C.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(C.createTransform()),this.visual.appendChild(this.arrow2)},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.state==="creating"&&this.createTips()},O.prototype.adjustVisual=function(){if(j.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",C.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),C.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var D=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.arrow1.transform.baseVal.getItem(0);W.setRotate(D,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(W,0);var V=this.arrow2.transform.baseVal.getItem(0);V.setRotate(D+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(V,0)}},O.prototype.setArrowType=function(D){this.arrowType=D,this.adjustVisual(),this.stateChanged()},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=Object.assign({arrowType:this.arrowType},j.prototype.getState.call(this));return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){j.prototype.restoreState.call(this,D);var W=D;this.arrowType=W.arrowType,this.createTips(),this.adjustVisual()},O.typeName="ArrowMarker",O.title="Arrow marker",O.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',O}(l),P=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.fillColor=V.defaultFillColor,U.strokeWidth=0,U.fillPanel=new o("Color",V.defaultColorSet,V.defaultFillColor),U.fillPanel.onColorChanged=U.setFillColor,U}return k(O,j),Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=j.prototype.getState.call(this);return D.typeName=O.typeName,D},O.typeName="CoverMarker",O.title="Cover marker",O.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',O}(b),S=function(j){function O(D,W,V,U){var le=j.call(this,D,U||'<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 le.opacities=[],le.opacityBoxes=[],le.opacities=W,le.currentOpacity=V,le.setCurrentOpacity=le.setCurrentOpacity.bind(le),le}return k(O,j),O.prototype.getUi=function(){var D=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",W.style.justifyContent="space-between",this.opacities.forEach(function(V){var U=document.createElement("div");U.style.display="flex",U.style.alignItems="center",U.style.justifyContent="center",U.style.padding="5px",U.style.borderWidth="2px",U.style.borderStyle="solid",U.style.borderColor=V===D.currentOpacity?D.uiStyleSettings.toolboxAccentColor:"transparent",U.addEventListener("click",function(){D.setCurrentOpacity(V,U)}),W.appendChild(U);var le=document.createElement("div");le.innerText=100*V+"%",U.appendChild(le),D.opacityBoxes.push(U)}),W},O.prototype.setCurrentOpacity=function(D,W){var V=this;this.currentOpacity=D,this.opacityBoxes.forEach(function(U){U.style.borderColor=U===W?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},O}(r),w=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.setOpacity=U.setOpacity.bind(U),U.fillColor=V.defaultHighlightColor,U.strokeWidth=0,U.opacity=V.defaultHighlightOpacity,U.fillPanel=new o("Color",V.defaultColorSet,U.fillColor),U.fillPanel.onColorChanged=U.setFillColor,U.opacityPanel=new S("Opacity",V.defaultOpacitySteps,U.opacity),U.opacityPanel.onOpacityChanged=U.setOpacity,U}return k(O,j),O.prototype.setOpacity=function(D){this.opacity=D,this.visual&&C.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=j.prototype.getState.call(this);return D.typeName=O.typeName,D},O.typeName="HighlightMarker",O.title="Highlight marker",O.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>',O}(P),F='<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>',L=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.bgColor="transparent",U.tipPosition={x:0,y:0},U.tipBase1Position={x:0,y:0},U.tipBase2Position={x:0,y:0},U.tipMoving=!1,U.color=V.defaultStrokeColor,U.bgColor=V.defaultFillColor,U.fontFamily=V.defaultFontFamily,U.defaultSize={x:100,y:30},U.setBgColor=U.setBgColor.bind(U),U.getTipPoints=U.getTipPoints.bind(U),U.positionTip=U.positionTip.bind(U),U.setTipPoints=U.setTipPoints.bind(U),U.colorPanel=new o("Text color",V.defaultColorSet,U.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>'),U.colorPanel.onColorChanged=U.setColor,U.bgColorPanel=new o("Fill color",V.defaultColorSet,U.bgColor,F),U.bgColorPanel.onColorChanged=U.setBgColor,U.fontFamilyPanel=new c("Font",V.defaultFontFamilies,V.defaultFontFamily),U.fontFamilyPanel.onFontChanged=U.setFont,U.tipGrip=new n,U.tipGrip.visual.transform.baseVal.appendItem(C.createTransform()),U.controlBox.appendChild(U.tipGrip.visual),U}return k(O,j),O.prototype.ownsTarget=function(D){return j.prototype.ownsTarget.call(this,D)||this.tipGrip.ownsTarget(D)||this.tip===D},O.prototype.createTip=function(){C.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=C.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},O.prototype.pointerDown=function(D,W){this.state==="new"&&j.prototype.pointerDown.call(this,D,W),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(W)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):j.prototype.pointerDown.call(this,D,W)},O.prototype.pointerUp=function(D){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,j.prototype.pointerUp.call(this,D);else{var W=this.state==="creating";j.prototype.pointerUp.call(this,D),this.setTipPoints(W),this.positionTip()}},O.prototype.manipulate=function(D){if(this.tipMoving){var W=this.unrotatePoint(D);this.tipPosition={x:W.x-this.manipulationStartLeft,y:W.y-this.manipulationStartTop},this.positionTip()}else j.prototype.manipulate.call(this,D)},O.prototype.setBgColor=function(D){this.bgRectangle&&this.tip&&(C.setAttributes(this.bgRectangle,[["fill",D]]),C.setAttributes(this.tip,[["fill",D]])),this.bgColor=D,this.fillColorChanged(D)},O.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},O.prototype.setTipPoints=function(D){D===void 0&&(D=!1);var W=Math.min(this.height/2,15),V=this.height/5;D&&(this.tipPosition={x:W+V/2,y:this.height+20});var U=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?U<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(V=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:W,y:0},this.tipBase2Position={x:W+V,y:0}):(this.tipBase1Position={x:0,y:W},this.tipBase2Position={x:0,y:W+V}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?U<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(V=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-W-V,y:0},this.tipBase2Position={x:this.width-W,y:0}):(this.tipBase1Position={x:this.width,y:W},this.tipBase2Position={x:this.width,y:W+V}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?U<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(V=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-W-V,y:this.height},this.tipBase2Position={x:this.width-W,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-W-V},this.tipBase2Position={x:this.width,y:this.height-W}):U<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(V=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:W,y:this.height},this.tipBase2Position={x:W+V,y:this.height}):(this.tipBase1Position={x:0,y:this.height-W},this.tipBase2Position={x:0,y:this.height-W-V})},O.prototype.resize=function(D){j.prototype.resize.call(this,D),this.positionTip()},O.prototype.positionTip=function(){C.setAttributes(this.tip,[["points",this.getTipPoints()]]);var D=this.tipGrip.visual.transform.baseVal.getItem(0);D.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(D,0)},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),O.prototype.select=function(){this.positionTip(),j.prototype.select.call(this)},O.prototype.getState=function(){var D=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},j.prototype.getState.call(this));return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){var W=D;this.bgColor=W.bgColor,this.tipPosition=W.tipPosition,j.prototype.restoreState.call(this,D),this.createTip(),this.setTipPoints()},O.prototype.scale=function(D,W){j.prototype.scale.call(this,D,W),this.tipPosition={x:this.tipPosition.x*D,y:this.tipPosition.y*W},this.positionTip()},O.typeName="CalloutMarker",O.title="Callout marker",O.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>',O}(y),G=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.fillColor="transparent",U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.opacity=1,U.strokeColor=V.defaultColor,U.strokeWidth=V.defaultStrokeWidth,U.strokeDasharray=V.defaultStrokeDasharray,U.fillColor=V.defaultFillColor,U.setStrokeColor=U.setStrokeColor.bind(U),U.setFillColor=U.setFillColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.setOpacity=U.setOpacity.bind(U),U.createVisual=U.createVisual.bind(U),U.strokePanel=new o("Line color",p(V.defaultColorSet,["transparent"]),V.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.fillPanel=new o("Fill color",p(V.defaultColorSet,["transparent"]),U.fillColor,F),U.fillPanel.onColorChanged=U.setFillColor,U.strokeWidthPanel=new v("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new x("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U.opacityPanel=new S("Opacity",V.defaultOpacitySteps,U.opacity),U.opacityPanel.onOpacityChanged=U.setOpacity,U}return k(O,j),O.prototype.ownsTarget=function(D){return!(!j.prototype.ownsTarget.call(this,D)&&D!==this.visual)},O.prototype.createVisual=function(){this.visual=C.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)},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.state==="new"&&(this.createVisual(),this.moveVisual(D),this._state="creating")},O.prototype.manipulate=function(D){j.prototype.manipulate.call(this,D)},O.prototype.resize=function(D){j.prototype.resize.call(this,D),this.setSize()},O.prototype.setSize=function(){j.prototype.setSize.call(this),C.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},O.prototype.pointerUp=function(D){j.prototype.pointerUp.call(this,D),this.setSize()},O.prototype.setStrokeColor=function(D){this.strokeColor=D,this.visual&&C.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(D),this.stateChanged()},O.prototype.setFillColor=function(D){this.fillColor=D,this.visual&&C.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(D),this.stateChanged()},O.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.visual&&C.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},O.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.visual&&C.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},O.prototype.setOpacity=function(D){this.opacity=D,this.visual&&C.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},j.prototype.getState.call(this));return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){var W=D;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),j.prototype.restoreState.call(this,D),this.setSize()},O.prototype.scale=function(D,W){j.prototype.scale.call(this,D,W),this.setSize()},O.typeName="EllipseMarker",O.title="Ellipse marker",O.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>',O}(_),Z=function(j){function O(D,W,V){return j.call(this,D,W,V)||this}return k(O,j),Object.defineProperty(O.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),O.prototype.ownsTarget=function(D){return!(!j.prototype.ownsTarget.call(this,D)&&D!==this.tip1&&D!==this.tip2)},O.prototype.createTips=function(){this.tip1=C.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(C.createTransform()),this.visual.appendChild(this.tip1),this.tip2=C.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(C.createTransform()),this.visual.appendChild(this.tip2)},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.state==="creating"&&this.createTips()},O.prototype.adjustVisual=function(){if(j.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(C.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()]]),C.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 D=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.tip1.transform.baseVal.getItem(0);W.setRotate(D,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(W,0);var V=this.tip2.transform.baseVal.getItem(0);V.setRotate(D+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(V,0)}},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=j.prototype.getState.call(this);return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){j.prototype.restoreState.call(this,D),this.createTips(),this.adjustVisual()},O.typeName="MeasurementMarker",O.title="Measurement marker",O.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>',O}(l),ue=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.strokePanel.colors=V.defaultColorSet,U.fillColor="transparent",U}return k(O,j),Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=j.prototype.getState.call(this);return D.typeName=O.typeName,D},O.typeName="EllipseFrameMarker",O.title="Ellipse frame marker",O.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>',O}(G),ce=function(){function j(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(j.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),j.prototype.addUndoStep=function(O){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(O)||(this.undoStack.push(O),JSON.stringify(this.lastRedoStep)!==JSON.stringify(O)&&this.redoStack.splice(0,this.redoStack.length))},j.prototype.replaceLastUndoStep=function(O){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=O)},j.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},j.prototype.undo=function(){if(this.undoStack.length>1){var O=this.undoStack.pop();return O!==void 0&&this.redoStack.push(O),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},j.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},j}(),Re=function(j){function O(D,W,V){var U=j.call(this,D,W,V)||this;return U.strokeColor="transparent",U.strokeWidth=0,U.strokeDasharray="",U.curveX=0,U.curveY=0,U.manipulationStartCurveX=0,U.manipulationStartCurveY=0,U.setStrokeColor=U.setStrokeColor.bind(U),U.setStrokeWidth=U.setStrokeWidth.bind(U),U.setStrokeDasharray=U.setStrokeDasharray.bind(U),U.positionGrips=U.positionGrips.bind(U),U.addControlGrips=U.addControlGrips.bind(U),U.adjustVisual=U.adjustVisual.bind(U),U.setupControlBox=U.setupControlBox.bind(U),U.resize=U.resize.bind(U),U.strokeColor=V.defaultColor,U.strokeWidth=V.defaultStrokeWidth,U.strokeDasharray=V.defaultStrokeDasharray,U.strokePanel=new o("Line color",V.defaultColorSet,V.defaultColor),U.strokePanel.onColorChanged=U.setStrokeColor,U.strokeWidthPanel=new v("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),U.strokeWidthPanel.onWidthChanged=U.setStrokeWidth,U.strokeStylePanel=new x("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),U.strokeStylePanel.onStyleChanged=U.setStrokeDasharray,U}return k(O,j),O.prototype.ownsTarget=function(D){return!(!j.prototype.ownsTarget.call(this,D)&&D!==this.visual&&D!==this.selectorCurve&&D!==this.visibleCurve&&!this.curveGrip.ownsTarget(D))},O.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},O.prototype.createVisual=function(){this.visual=C.createGroup(),this.selectorCurve=C.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=C.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)},O.prototype.pointerDown=function(D,W){j.prototype.pointerDown.call(this,D,W),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=D.x,this.curveY=D.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(W)&&(this.activeGrip=this.curveGrip,this._state="resize")},O.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),C.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),C.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),C.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},O.prototype.setupControlBox=function(){j.prototype.setupControlBox.call(this),this.curveControlLine1=C.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=C.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)},O.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,j.prototype.addControlGrips.call(this)},O.prototype.positionGrips=function(){j.prototype.positionGrips.call(this);var D=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-D/2,this.curveY-D/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()))},O.prototype.manipulate=function(D){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+D.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+D.y-this.manipulationStartY),j.prototype.manipulate.call(this,D)},O.prototype.resize=function(D){this.activeGrip===this.curveGrip&&(this.curveX=D.x,this.curveY=D.y),j.prototype.resize.call(this,D),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},O.prototype.setStrokeColor=function(D){this.strokeColor=D,this.adjustVisual(),this.colorChanged(D)},O.prototype.setStrokeWidth=function(D){this.strokeWidth=D,this.adjustVisual()},O.prototype.setStrokeDasharray=function(D){this.strokeDasharray=D,this.adjustVisual()},O.prototype.scale=function(D,W){this.curveX=this.curveX*D,this.curveY=this.curveY*W,j.prototype.scale.call(this,D,W)},Object.defineProperty(O.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),O.prototype.getState=function(){var D=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},j.prototype.getState.call(this));return D.typeName=O.typeName,D},O.prototype.restoreState=function(D){j.prototype.restoreState.call(this,D);var W=D;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.curveX=W.curveX,this.curveY=W.curveY,this.createVisual(),this.adjustVisual()},O.typeName="CurveMarker",O.title="Curve marker",O.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>',O}(d),Ee=function(){function j(O,D){D===void 0&&(D=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=O,this.cancelable=D}return Object.defineProperty(j.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),j.prototype.preventDefault=function(){this._defaultPrevented=!0},j}(),he=function(j){function O(D,W,V){var U=j.call(this,D,!1)||this;return U.dataUrl=W,U.state=V,U}return k(O,j),O}(Ee),we=function(j){function O(D,W,V){V===void 0&&(V=!1);var U=j.call(this,D,V)||this;return U.marker=W,U}return k(O,j),O}(Ee),Pe=function(){function j(){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 j.prototype.addEventListener=function(O,D){this[O].push(D)},j.prototype.removeEventListener=function(O,D){var W=this[O].indexOf(D);W>-1&&this[O].splice(W,1)},j}(),de=function(){function j(O){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new h,this._isOpen=!1,this.undoRedoManager=new ce,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 Pe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=j.instanceCounter++,this.styles=new A(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=O,this.targetRoot=document.body,this.width=O.clientWidth,this.height=O.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(j.prototype,"ALL_MARKER_TYPES",{get:function(){return[E,f,I,y,ue,G,w,L,Z,P,l,Re]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[E,f,I,y,G,w,L]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"BASIC_MARKER_TYPES",{get:function(){return[E,f,I,y,w]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(O){var D=this;this._availableMarkerTypes.splice(0),O.forEach(function(W){if(typeof W=="string"){var V=D.ALL_MARKER_TYPES.find(function(U){return U.typeName===W});V!==void 0&&D._availableMarkerTypes.push(V)}else D._availableMarkerTypes.push(W)})},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(O){this._zoomLevel=O,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(j.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),j.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),H.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},j.prototype.show=function(){var O=this;this.styles.styleSheetRoot===void 0&&e.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=e.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(D){return D(new Ee(O))})},j.prototype.render=function(){return R(this,void 0,void 0,function(){var O;return B(this,function(D){switch(D.label){case 0:return this.setCurrentMarker(),(O=new N).naturalSize=this.renderAtNaturalSize,O.imageType=this.renderImageType,O.imageQuality=this.renderImageQuality,O.markersOnly=this.renderMarkersOnly,O.width=this.renderWidth,O.height=this.renderHeight,[4,O.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return D.sent(),[4,O.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,D.sent()]}})})},j.prototype.close=function(O){var D=this;if(O===void 0&&(O=!1),this.isOpen){var W=!1;O||this.eventListeners.beforeclose.forEach(function(V){var U=new Ee(D,!0);V(U),U.defaultPrevented&&(W=!0)}),W||(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(V){return V(new Ee(D))}),this.detachEvents(),this._isOpen=!1)}},j.prototype.addMarkersToToolbar=function(){for(var O,D=[],W=0;W<arguments.length;W++)D[W]=arguments[W];(O=this._availableMarkerTypes).push.apply(O,D)},j.prototype.addRenderEventListener=function(O){this.addEventListener("render",function(D){O(D.dataUrl,D.state)})},j.prototype.removeRenderEventListener=function(O){},j.prototype.addCloseEventListener=function(O){this.addEventListener("close",function(){O()})},j.prototype.removeCloseEventListener=function(O){},j.prototype.setupResizeObserver=function(){var O=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){O.resize(O.target.clientWidth,O.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return O.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},j.prototype.onPopupTargetResize=function(){var O=1*this.target.clientWidth/this.target.clientHeight,D=this.editorCanvas.clientWidth/O>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*O:this.editorCanvas.clientWidth,W=D<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/O;this.resize(D,W)},j.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},j.prototype.resize=function(O,D){this._isResizing=!0;var W=O/this.imageWidth,V=D/this.imageHeight;this.imageWidth=Math.round(O),this.imageHeight=Math.round(D),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(W,V),this._isResizing=!1},j.prototype.scaleMarkers=function(O,D){var W,V=this;this._currentMarker&&this._currentMarker instanceof y?this._currentMarker.scale(O,D):(W=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(U){U!==V._currentMarker&&U.scale(O,D)}),W!==void 0&&this.setCurrentMarker(W)},j.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"},j.prototype.setTopLeft=function(){var O=this.editingTarget.getBoundingClientRect(),D=this.editorCanvas.getBoundingClientRect();this.left=O.left-D.left,this.top=O.top-D.top},j.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)},j.prototype.addDefs=function(){for(var O,D=[],W=0;W<arguments.length;W++)D[W]=arguments[W];this.defs=C.createDefs(),this.addDefsToImage(),(O=this.defs).append.apply(O,D)},j.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},j.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)},j.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},j.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},j.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)},j.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},j.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)},j.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 O=document.createElement("a");O.href="https://markerjs.com/",O.target="_blank",O.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>',O.title="Powered by marker.js",O.style.display="grid",O.style.alignItems="center",O.style.justifyItems="center",O.style.padding="3px",O.style.width="20px",O.style.height="20px",this.logoUI.appendChild(O),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},j.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")},j.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"},j.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},j.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 O=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=O+"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 u(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 a(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},j.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},j.prototype.removeMarker=function(O){this.markerImage.removeChild(O.container),this.markers.indexOf(O)>-1&&this.markers.splice(this.markers.indexOf(O),1),O.dispose()},j.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())},j.prototype.toolbarButtonClicked=function(O,D){if(O==="marker"&&D!==void 0)this.createNewMarker(D);else if(O==="action")switch(D){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()}},j.prototype.deleteSelectedMarker=function(){var O=this;if(this._currentMarker!==void 0){var D=!1;if(this.eventListeners.markerbeforedelete.forEach(function(V){var U=new we(O,O._currentMarker,!0);V(U),U.defaultPrevented&&(D=!0)}),!D){var W=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(V){return V(new we(O,W))})}}},j.prototype.clear=function(){var O=this,D=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(le){var Oe=new we(O,void 0,!0);le(Oe),Oe.defaultPrevented&&(D=!0)}),!D)){this.setCurrentMarker();for(var W=function(le){var Oe=V.markers[le];V.setCurrentMarker(V.markers[le]),V._currentMarker.dispose(),V.markerImage.removeChild(V._currentMarker.container),V.markers.splice(V.markers.indexOf(V._currentMarker),1),V.eventListeners.markerdelete.forEach(function(Me){return Me(new we(O,Oe))})},V=this,U=this.markers.length-1;U>=0;U--)W(U);this.addUndoStep()}},Object.defineProperty(j.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),j.prototype.showNotesEditor=function(){var O;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=(O=this._currentMarker.notes)!==null&&O!==void 0?O:"",this.overlayContainer.appendChild(this.notesArea))},j.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)},j.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},j.prototype.addUndoStep=function(){var O=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var D=this.getState(),W=this.undoRedoManager.getLastUndoStep();if(!W||W.width===D.width&&W.height===D.height){var V=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(D),V<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(U){return U(new Ee(O))})}else this.undoRedoManager.replaceLastUndoStep(D),this.eventListeners.statechange.forEach(function(U){return U(new Ee(O))})}},j.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},j.prototype.undoStep=function(){var O=this,D=this.undoRedoManager.undo();D!==void 0&&(this.restoreState(D),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(W){return W(new Ee(O))}))},j.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},j.prototype.redoStep=function(){var O=this,D=this.undoRedoManager.redo();D!==void 0&&(this.restoreState(D),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(W){return W(new Ee(O))}))},j.prototype.stepZoom=function(){var O=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=O<this.zoomSteps.length-1?this.zoomSteps[O+1]:this.zoomSteps[0]},j.prototype.panTo=function(O){this.contentDiv.scrollBy({left:this.prevPanPoint.x-O.x,top:this.prevPanPoint.y-O.y}),this.prevPanPoint=O},j.prototype.startRenderAndClose=function(){return R(this,void 0,void 0,function(){var O,D,W=this;return B(this,function(V){switch(V.label){case 0:return[4,this.render()];case 1:return O=V.sent(),D=this.getState(),this.eventListeners.render.forEach(function(U){return U(new he(W,O,D))}),this.close(!0),[2]}})})},j.prototype.getState=function(O){O===!0&&this.setCurrentMarker();var D={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(W){return D.markers.push(W.getState())}),D},j.prototype.restoreState=function(O){var D=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);O.markers.forEach(function(W){var V=D._availableMarkerTypes.find(function(le){return le.typeName===W.typeName});if(V!==void 0){var U=D.addNewMarker(V);U.restoreState(W),D.markers.push(U)}}),O.width&&O.height&&(O.width!==this.imageWidth||O.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/O.width,this.imageHeight/O.height),this.eventListeners.restorestate.forEach(function(W){return W(new Ee(D))})},j.prototype.addNewMarker=function(O){var D=C.createGroup();return this.markerImage.appendChild(D),new O(D,this.overlayContainer,this.settings)},j.prototype.createNewMarker=function(O){var D,W=this;(D=typeof O=="string"?this._availableMarkerTypes.find(function(V){return V.typeName===O}):O)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(D),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(D.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(V){return V(new we(W,W._currentMarker))}))},j.prototype.markerCreated=function(O){var D=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(O),this.setCurrentMarker(O),O instanceof f&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(f):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(W){return W(new we(D,D._currentMarker))})},j.prototype.colorChanged=function(O){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=O,this.settings.defaultStrokeColor=O)},j.prototype.fillColorChanged=function(O){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=O)},j.prototype.markerStateChanged=function(O){var D=this;this.eventListeners.markerchange.forEach(function(W){return W(new we(D,O))})},j.prototype.setCurrentMarker=function(O){var D=this;this._currentMarker!==O&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(W){return W(new we(D,D._currentMarker))})),this._currentMarker=O,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(W){return W(new we(D,D._currentMarker))}))},j.prototype.onPointerDown=function(O){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||O.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var D=this.markers.find(function(W){return W.ownsTarget(O.target)});D!==void 0?(this.setCurrentMarker(D),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(O.clientX,O.clientY),O.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:O.clientX,y:O.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(O.clientX,O.clientY))},j.prototype.onDblClick=function(O){if(this._isFocused||this.focus(),this.mode==="select"){var D=this.markers.find(function(W){return W.ownsTarget(O.target)});D!==void 0&&D!==this._currentMarker&&this.setCurrentMarker(D),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(O.clientX,O.clientY),O.target):this.setCurrentMarker()}},j.prototype.onPointerMove=function(O){this.touchPoints!==1&&O.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||O.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(O.clientX,O.clientY)):this.zoomLevel>1&&this.panTo({x:O.clientX,y:O.clientY}))},j.prototype.onPointerUp=function(O){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(O.clientX,O.clientY)),this.isDragging=!1,this.addUndoStep()},j.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},j.prototype.onKeyUp=function(O){this._currentMarker===void 0||this.notesArea!==void 0||O.key!=="Delete"&&O.key!=="Backspace"||this.deleteSelectedMarker()},j.prototype.clientToLocalCoordinates=function(O,D){var W=this.markerImage.getBoundingClientRect();return{x:(O-W.left)/this.zoomLevel,y:(D-W.top)/this.zoomLevel}},j.prototype.onWindowResize=function(){this.positionUI()},j.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var O=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=O+"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()},j.prototype.addLicenseKey=function(O){H.addKey(O)},j.prototype.addEventListener=function(O,D){this.eventListeners.addEventListener(O,D)},j.prototype.removeEventListener=function(O,D){this.eventListeners.removeEventListener(O,D)},j.prototype.renderState=function(O){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(O),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(j.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),j.prototype.focus=function(){var O=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(D){return D(new Ee(O))}))},j.prototype.blur=function(){var O=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(D){return D(new Ee(O))}))},j.instanceCounter=0,j}()},T8No:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return H}),M.d(oe,"e",function(){return N}),M.d(oe,"c",function(){return l}),M.d(oe,"b",function(){return c}),M.d(oe,"d",function(){return y}),M.d(oe,"f",function(){return I});var te=M("MNsG"),k=M("N0LK"),R=M("Cg/j");let B=te.k||"";const p=new Map;p.set("false",!1),p.set("true",!0),p.set("isMac",te.f),p.set("isLinux",te.d),p.set("isWindows",te.i),p.set("isWeb",te.h),p.set("isMacNative",te.f&&!te.h),p.set("isEdge",B.indexOf("Edg/")>=0),p.set("isFirefox",B.indexOf("Firefox")>=0),p.set("isChrome",B.indexOf("Chrome")>=0),p.set("isSafari",B.indexOf("Safari")>=0);const C=Object.prototype.hasOwnProperty;class H{static has(S){return m.create(S)}static equals(S,w){return u.create(S,w)}static regex(S,w){return v.create(S,w)}static not(S){return s.create(S)}static and(...S){return h.create(S,null)}static or(...S){return d.create(S,null,!0)}static deserialize(S,w=!1){return S?this._deserializeOrExpression(S,w):void 0}static _deserializeOrExpression(S,w){let F=S.split("||");return d.create(F.map(L=>this._deserializeAndExpression(L,w)),null,!0)}static _deserializeAndExpression(S,w){let F=S.split("&&");return h.create(F.map(L=>this._deserializeOne(L,w)),null)}static _deserializeOne(S,w){if(S=S.trim(),S.indexOf("!=")>=0){let F=S.split("!=");return o.create(F[0].trim(),this._deserializeValue(F[1],w))}if(S.indexOf("==")>=0){let F=S.split("==");return u.create(F[0].trim(),this._deserializeValue(F[1],w))}if(S.indexOf("=~")>=0){let F=S.split("=~");return v.create(F[0].trim(),this._deserializeRegexValue(F[1],w))}if(S.indexOf(" in ")>=0){let F=S.split(" in ");return a.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(S)){const F=S.split(">=");return t.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(S)){const F=S.split(">");return n.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(S)){const F=S.split("<=");return b.create(F[0].trim(),F[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(S)){const F=S.split("<");return _.create(F[0].trim(),F[1].trim())}return/^\!\s*/.test(S)?s.create(S.substr(1).trim()):m.create(S)}static _deserializeValue(S,w){if(S=S.trim(),S==="true")return!0;if(S==="false")return!1;let F=/^'([^']*)'$/.exec(S);return F?F[1].trim():S}static _deserializeRegexValue(S,w){if(Object(k.C)(S)){if(w)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let F=S.indexOf("/"),L=S.lastIndexOf("/");if(F===L||F<0){if(w)throw new Error(`bad regexp-value '${S}', missing /-enclosure`);return console.warn(`bad regexp-value '${S}', missing /-enclosure`),null}let G=S.slice(F+1,L),Z=S[L+1]==="i"?"i":"";try{return new RegExp(G,Z)}catch(ue){if(w)throw new Error(`bad regexp-value '${S}', parse error: ${ue}`);return console.warn(`bad regexp-value '${S}', parse error: ${ue}`),null}}}function N(S,w){const F=S?S.substituteConstants():void 0,L=w?w.substituteConstants():void 0;return!F&&!L?!0:!F||!L?!1:F.equals(L)}function e(S,w){return S.cmp(w)}class A{constructor(){this.type=0}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}A.INSTANCE=new A;class g{constructor(){this.type=1}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!0}serialize(){return"true"}keys(){return[]}negate(){return A.INSTANCE}}g.INSTANCE=new g;class m{constructor(S,w){this.key=S,this.negated=w,this.type=2}static create(S,w=null){const F=p.get(S);return typeof F=="boolean"?F?g.INSTANCE:A.INSTANCE:new m(S,w)}cmp(S){return S.type!==this.type?this.type-S.type:f(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=p.get(this.key);return typeof S=="boolean"?S?g.INSTANCE:A.INSTANCE:this}evaluate(S){return!!S.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this)),this.negated}}class u{constructor(S,w,F){this.key=S,this.value=w,this.negated=F,this.type=4}static create(S,w,F=null){if(typeof w=="boolean")return w?m.create(S,F):s.create(S,F);const L=p.get(S);if(typeof L=="boolean"){const G=L?"true":"false";return w===G?g.INSTANCE:A.INSTANCE}return new u(S,w,F)}cmp(S){return S.type!==this.type?this.type-S.type:T(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=p.get(this.key);if(typeof S=="boolean"){const w=S?"true":"false";return this.value===w?g.INSTANCE:A.INSTANCE}return this}evaluate(S){return S.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class a{constructor(S,w){this.key=S,this.valueKey=w,this.type=10,this.negated=null}static create(S,w){return new a(S,w)}cmp(S){return S.type!==this.type?this.type-S.type:T(this.key,this.valueKey,S.key,S.valueKey)}equals(S){return S.type===this.type?this.key===S.key&&this.valueKey===S.valueKey:!1}substituteConstants(){return this}evaluate(S){const w=S.getValue(this.valueKey),F=S.getValue(this.key);return Array.isArray(w)?w.indexOf(F)>=0:typeof F=="string"&&typeof w=="object"&&w!==null?C.call(w,F):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=r.create(this)),this.negated}}class r{constructor(S){this._actual=S,this.type=11}static create(S){return new r(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class o{constructor(S,w,F){this.key=S,this.value=w,this.negated=F,this.type=5}static create(S,w,F=null){if(typeof w=="boolean")return w?s.create(S,F):m.create(S,F);const L=p.get(S);if(typeof L=="boolean"){const G=L?"true":"false";return w===G?A.INSTANCE:g.INSTANCE}return new o(S,w,F)}cmp(S){return S.type!==this.type?this.type-S.type:T(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=p.get(this.key);if(typeof S=="boolean"){const w=S?"true":"false";return this.value===w?A.INSTANCE:g.INSTANCE}return this}evaluate(S){return S.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}class s{constructor(S,w){this.key=S,this.negated=w,this.type=3}static create(S,w=null){const F=p.get(S);return typeof F=="boolean"?F?A.INSTANCE:g.INSTANCE:new s(S,w)}cmp(S){return S.type!==this.type?this.type-S.type:f(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=p.get(this.key);return typeof S=="boolean"?S?A.INSTANCE:g.INSTANCE:this}evaluate(S){return!S.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this)),this.negated}}function i(S,w){if(typeof S=="string"){const F=parseFloat(S);isNaN(F)||(S=F)}return typeof S=="string"||typeof S=="number"?w(S):A.INSTANCE}class n{constructor(S,w,F){this.key=S,this.value=w,this.negated=F,this.type=12}static create(S,w,F=null){return i(w,L=>new n(S,L,F))}cmp(S){return S.type!==this.type?this.type-S.type:T(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class t{constructor(S,w,F){this.key=S,this.value=w,this.negated=F,this.type=13}static create(S,w,F=null){return i(w,L=>new t(S,L,F))}cmp(S){return S.type!==this.type?this.type-S.type:T(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this.value,this)),this.negated}}class _{constructor(S,w,F){this.key=S,this.value=w,this.negated=F,this.type=14}static create(S,w,F=null){return i(w,L=>new _(S,L,F))}cmp(S){return S.type!==this.type?this.type-S.type:T(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=t.create(this.key,this.value,this)),this.negated}}class b{constructor(S,w,F){this.key=S,this.value=w,this.negated=F,this.type=15}static create(S,w,F=null){return i(w,L=>new b(S,L,F))}cmp(S){return S.type!==this.type?this.type-S.type:T(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}class v{constructor(S,w){this.key=S,this.regexp=w,this.type=7,this.negated=null}static create(S,w){return new v(S,w)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.key<S.key)return-1;if(this.key>S.key)return 1;const w=this.regexp?this.regexp.source:"",F=S.regexp?S.regexp.source:"";return w<F?-1:w>F?1:0}equals(S){if(S.type===this.type){const w=this.regexp?this.regexp.source:"",F=S.regexp?S.regexp.source:"";return this.key===S.key&&w===F}return!1}substituteConstants(){return this}evaluate(S){let w=S.getValue(this.key);return this.regexp?this.regexp.test(w):!1}serialize(){const S=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${S}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}class x{constructor(S){this._actual=S,this.type=8}static create(S){return new x(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function E(S){let w=null;for(let F=0,L=S.length;F<L;F++){const G=S[F].substituteConstants();if(S[F]!==G&&w===null){w=[];for(let Z=0;Z<F;Z++)w[Z]=S[Z]}w!==null&&(w[F]=G)}return w===null?S:w}class h{constructor(S,w){this.expr=S,this.negated=w,this.type=6}static create(S,w){return h._normalizeArr(S,w)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let w=0,F=this.expr.length;w<F;w++){const L=e(this.expr[w],S.expr[w]);if(L!==0)return L}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let w=0,F=this.expr.length;w<F;w++)if(!this.expr[w].equals(S.expr[w]))return!1;return!0}return!1}substituteConstants(){const S=E(this.expr);return S===this.expr?this:h.create(S,this.negated)}evaluate(S){for(let w=0,F=this.expr.length;w<F;w++)if(!this.expr[w].evaluate(S))return!1;return!0}static _normalizeArr(S,w){const F=[];let L=!1;for(const G of S){if(!G)continue;if(G.type===1){L=!0;continue}if(G.type===0)return A.INSTANCE;if(G.type===6){F.push(...G.expr);continue}F.push(G)}if(F.length===0&&L)return g.INSTANCE;if(F.length===0)return;if(F.length===1)return F[0];F.sort(e);for(let G=1;G<F.length;G++)F[G-1].equals(F[G])&&(F.splice(G,1),G--);if(F.length===1)return F[0];for(;F.length>1;){const G=F[F.length-1];if(G.type!==9)break;F.pop();const Z=F.pop(),ue=F.length===0,ce=d.create(G.expr.map(Re=>h.create([Re,Z],null)),null,ue);ce&&(F.push(ce),F.sort(e))}return F.length===1?F[0]:new h(F,w)}serialize(){return this.expr.map(S=>S.serialize()).join(" && ")}keys(){const S=[];for(let w of this.expr)S.push(...w.keys());return S}negate(){if(!this.negated){const S=[];for(let w of this.expr)S.push(w.negate());this.negated=d.create(S,this,!0)}return this.negated}}class d{constructor(S,w){this.expr=S,this.negated=w,this.type=9}static create(S,w,F){return d._normalizeArr(S,w,F)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let w=0,F=this.expr.length;w<F;w++){const L=e(this.expr[w],S.expr[w]);if(L!==0)return L}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let w=0,F=this.expr.length;w<F;w++)if(!this.expr[w].equals(S.expr[w]))return!1;return!0}return!1}substituteConstants(){const S=E(this.expr);return S===this.expr?this:d.create(S,this.negated,!1)}evaluate(S){for(let w=0,F=this.expr.length;w<F;w++)if(this.expr[w].evaluate(S))return!0;return!1}static _normalizeArr(S,w,F){let L=[],G=!1;if(S){for(let Z=0,ue=S.length;Z<ue;Z++){const ce=S[Z];if(!ce)continue;if(ce.type===0){G=!0;continue}if(ce.type===1)return g.INSTANCE;if(ce.type===9){L=L.concat(ce.expr);continue}L.push(ce)}if(L.length===0&&G)return A.INSTANCE;L.sort(e)}if(L.length===0)return;if(L.length===1)return L[0];for(let Z=1;Z<L.length;Z++)L[Z-1].equals(L[Z])&&(L.splice(Z,1),Z--);if(L.length===1)return L[0];if(F){for(let Z=0;Z<L.length;Z++)for(let ue=Z+1;ue<L.length;ue++)I(L[Z],L[ue])&&(L.splice(ue,1),ue--);if(L.length===1)return L[0]}return new d(L,w)}serialize(){return this.expr.map(S=>S.serialize()).join(" || ")}keys(){const S=[];for(let w of this.expr)S.push(...w.keys());return S}negate(){if(!this.negated){let S=[];for(let w of this.expr)S.push(w.negate());for(;S.length>1;){const w=S.shift(),F=S.shift(),L=[];for(const Z of P(w))for(const ue of P(F))L.push(h.create([Z,ue],null));const G=S.length===0;S.unshift(d.create(L,null,G))}this.negated=S[0]}return this.negated}}class l extends m{constructor(S,w,F){super(S,null);this._defaultValue=w,typeof F=="object"?l._info.push(Object.assign(Object.assign({},F),{key:S})):F!==!0&&l._info.push({key:S,description:F,type:w!=null?typeof w:void 0})}static all(){return l._info.values()}bindTo(S){return S.createKey(this.key,this._defaultValue)}getValue(S){return S.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(S){return u.create(this.key,S)}}l._info=[];const c=Object(R.c)("contextKeyService"),y="setContext";function f(S,w){return S<w?-1:S>w?1:0}function T(S,w,F,L){return S<F?-1:S>F?1:w<L?-1:w>L?1:0}function I(S,w){if(w.type===6&&S.type!==9&&S.type!==6){for(const G of w.expr)if(S.equals(G))return!0}const F=S.negate(),L=P(F).concat(P(w));L.sort(e);for(let G=0;G<L.length;G++){const Z=L[G],ue=Z.negate();for(let ce=G+1;ce<L.length;ce++){const Re=L[ce];if(ue.equals(Re))return!0}}return!1}function P(S){return S.type===9?S.expr:[S]}},TXwP:function(Be,oe,M){var te,k;(function(){var R;(function(){"use strict";var p=[,,function(e){function A(u){this.__parent=u,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 u=new A(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},A.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},A.prototype.has_match=function(u){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(u))return!0;return!1},A.prototype.set_indent=function(u,a){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=a||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 u=this.__parent.current_line;return u.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),u.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),u.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,u.__items[0]===" "&&(u.__items.splice(0,1),u.__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(u){this.__items.push(u);var a=u.lastIndexOf(`
|
|
`);a!==-1?this.__character_count=u.length-a:this.__character_count+=u.length},A.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},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 u="";return this.is_empty()?this.__parent.indent_empty_lines&&(u=this.__parent.get_indent_string(this.__indent_count)):(u=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),u+=this.__items.join("")),u};function g(u,a){this.__cache=[""],this.__indent_size=u.indent_size,this.__indent_string=u.indent_char,u.indent_with_tabs||(this.__indent_string=new Array(u.indent_size+1).join(u.indent_char)),a=a||"",u.indent_level>0&&(a=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}g.prototype.get_indent_size=function(u,a){var r=this.__base_string_length;return a=a||0,u<0&&(r=0),r+=u*this.__indent_size,r+=a,r},g.prototype.get_indent_string=function(u,a){var r=this.__base_string;return a=a||0,u<0&&(u=0,r=""),a+=u*this.__indent_size,this.__ensure_cache(a),r+=this.__cache[a],r},g.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var u=this.__cache.length,a=0,r="";this.__indent_size&&u>=this.__indent_size&&(a=Math.floor(u/this.__indent_size),u-=a*this.__indent_size,r=new Array(a+1).join(this.__indent_string)),u&&(r+=new Array(u+1).join(" ")),this.__cache.push(r)};function m(u,a){this.__indent_cache=new g(u,a),this.raw=!1,this._end_with_newline=u.end_with_newline,this.indent_size=u.indent_size,this.wrap_line_length=u.wrap_line_length,this.indent_empty_lines=u.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()}m.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},m.prototype.get_line_number=function(){return this.__lines.length},m.prototype.get_indent_string=function(u,a){return this.__indent_cache.get_indent_string(u,a)},m.prototype.get_indent_size=function(u,a){return this.__indent_cache.get_indent_size(u,a)},m.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},m.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},m.prototype.get_code=function(u){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 r=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(r=r.replace(/[\n]/g,u)),r},m.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},m.prototype.set_indent=function(u,a){return u=u||0,a=a||0,this.next_line.set_indent(u,a),this.__lines.length>1?(this.current_line.set_indent(u,a),!0):(this.current_line.set_indent(),!1)},m.prototype.add_raw_token=function(u){for(var a=0;a<u.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(u.whitespace_before),this.current_line.push(u.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},m.prototype.add_token=function(u){this.__add_space_before_token(),this.current_line.push(u),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},m.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(" "))},m.prototype.remove_indent=function(u){for(var a=this.__lines.length;u<a;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},m.prototype.trim=function(u){for(u=u===void 0?!1:u,this.current_line.trim();u&&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},m.prototype.just_added_newline=function(){return this.current_line.is_empty()},m.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},m.prototype.ensure_empty_line_above=function(u,a){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(u)!==0&&o.item(-1)!==a){this.__lines.splice(r+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=m},,,,function(e){function A(u,a){this.raw_options=g(u,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"])}A.prototype._get_array=function(u,a){var r=this.raw_options[u],o=a||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},A.prototype._get_boolean=function(u,a){var r=this.raw_options[u],o=r===void 0?!!a:!!r;return o},A.prototype._get_characters=function(u,a){var r=this.raw_options[u],o=a||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},A.prototype._get_number=function(u,a){var r=this.raw_options[u];a=parseInt(a,10),isNaN(a)&&(a=0);var o=parseInt(r,10);return isNaN(o)&&(o=a),o},A.prototype._get_selection=function(u,a,r){var o=this._get_selection_list(u,a,r);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[u]+"'");return o[0]},A.prototype._get_selection_list=function(u,a,r){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[a[0]],!this._is_valid_selection(r,a))throw new Error("Invalid Default Value!");var o=this._get_array(u,r);if(!this._is_valid_selection(o,a))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[u]+"'");return o},A.prototype._is_valid_selection=function(u,a){return u.length&&a.length&&!u.some(function(r){return a.indexOf(r)===-1})};function g(u,a){var r={};u=m(u);var o;for(o in u)o!==a&&(r[o]=u[o]);if(a&&u[a])for(o in u[a])r[o]=u[a][o];return r}function m(u){var a={},r;for(r in u){var o=r.replace(/-/g,"_");a[o]=u[r]}return a}e.exports.Options=A,e.exports.normalizeOpts=m,e.exports.mergeOpts=g},,function(e){var A=RegExp.prototype.hasOwnProperty("sticky");function g(m){this.__input=m||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var m=null;return this.hasNext()&&(m=this.__input.charAt(this.__position),this.__position+=1),m},g.prototype.peek=function(m){var u=null;return m=m||0,m+=this.__position,m>=0&&m<this.__input_length&&(u=this.__input.charAt(m)),u},g.prototype.__match=function(m,u){m.lastIndex=u;var a=m.exec(this.__input);return a&&!(A&&m.sticky)&&(a.index!==u&&(a=null)),a},g.prototype.test=function(m,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(m,u):!1},g.prototype.testChar=function(m,u){var a=this.peek(u);return m.lastIndex=0,a!==null&&m.test(a)},g.prototype.match=function(m){var u=this.__match(m,this.__position);return u?this.__position+=u[0].length:u=null,u},g.prototype.read=function(m,u,a){var r="",o;return m&&(o=this.match(m),o&&(r+=o[0])),u&&(o||!m)&&(r+=this.readUntil(u,a)),r},g.prototype.readUntil=function(m,u){var a="",r=this.__position;m.lastIndex=this.__position;var o=m.exec(this.__input);return o?(r=o.index,u&&(r+=o[0].length)):r=this.__input_length,a=this.__input.substring(this.__position,r),this.__position=r,a},g.prototype.readUntilAfter=function(m){return this.readUntil(m,!0)},g.prototype.get_regexp=function(m,u){var a=null,r="g";return u&&A&&(r="y"),typeof m=="string"&&m!==""?a=new RegExp(m,r):m&&(a=new RegExp(m.source,r)),a},g.prototype.get_literal_regexp=function(m){return RegExp(m.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(m){var u=this.__position,a=this.readUntilAfter(m);return this.__position=u,a},g.prototype.lookBack=function(m){var u=this.__position-1;return u>=m.length&&this.__input.substring(u-m.length,u).toLowerCase()===m},e.exports.InputScanner=g},,,,,function(e){function A(g,m){g=typeof g=="string"?g:g.source,m=typeof m=="string"?m:m.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+m,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+m,"g")}A.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var m={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(g);u;)m[u[1]]=u[2],u=this.__directive_pattern.exec(g);return m},A.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=A},,function(e,A,g){var m=g(16).Beautifier,u=g(17).Options;function a(r,o){var s=new m(r,o);return s.beautify()}e.exports=a,e.exports.defaultOptions=function(){return new u}},function(e,A,g){var m=g(17).Options,u=g(2).Output,a=g(8).InputScanner,r=g(13).Directives,o=new r(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,n=/\s/,t=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,b=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function v(x,E){this._source_text=x||"",this._options=new m(E),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"]}v.prototype.eatString=function(x){var E="";for(this._ch=this._input.next();this._ch;){if(E+=this._ch,this._ch==="\\")E+=this._input.next();else if(x.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return E},v.prototype.eatWhitespace=function(x){for(var E=n.test(this._input.peek()),h=0;n.test(this._input.peek());)this._ch=this._input.next(),x&&this._ch===`
|
|
`&&((h===0||h<this._options.max_preserve_newlines)&&(h++,this._output.add_new_line(!0)));return E},v.prototype.foundNestedPseudoClass=function(){for(var x=0,E=1,h=this._input.peek(E);h;){if(h==="{")return!0;if(h==="(")x+=1;else if(h===")"){if(x===0)return!1;x-=1}else if(h===";"||h==="}")return!1;E++,h=this._input.peek(E)}return!1},v.prototype.print_string=function(x){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(x)},v.prototype.preserveSingleSpace=function(x){x&&(this._output.space_before_token=!0)},v.prototype.indent=function(){this._indentLevel++},v.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,E=this._options.eol;E==="auto"&&(E=`
|
|
`,x&&s.test(x||"")&&(E=x.match(s)[0])),x=x.replace(i,`
|
|
`);var h=x.match(/^[\t ]*/)[0];this._output=new u(this._options,h),this._input=new a(x),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var d=0,l=!1,c=!1,y=!1,f=!1,T=!1,I=!1,P=this._ch,S=!1,w,F,L;w=this._input.read(t),F=w!=="",L=P,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),P=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var G=this._input.read(_),Z=o.get_directives(G);Z&&Z.ignore==="start"&&(G+=o.readIgnored(this._input)),this.print_string(G),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(b)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(F),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s$/,""),this.print_string(ue),this._output.space_before_token=!0),ue=ue.replace(/\s$/,""),ue==="extend"?f=!0:ue==="import"&&(T=!0),ue in this.NESTED_AT_RULE?(this._nestedLevel+=1,ue in this.CONDITIONAL_GROUP_RULE&&(y=!0)):!l&&d===0&&ue.indexOf(":")!==-1&&(c=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(F),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")c&&(c=!1,this.outdent()),y?(y=!1,l=this._indentLevel>=this._nestedLevel):l=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&l&&(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)):(L==="("?this._output.space_before_token=!1:L!==","&&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(),L==="{"&&this._output.trim(!0),T=!1,f=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),l=!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 ce=0;ce<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ce++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ce])){S=!0;break}(l||y)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!f&&d===0?(this.print_string(":"),c||(c=!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 Re=L==='"'||L==="'";this.preserveSingleSpace(Re||F),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")S=!1,d===0?(c&&(this.outdent(),c=!1),f=!1,T=!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(),d++,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(")")),d&&(d--,this.outdent()));else{var Ee=!1;this._input.lookBack("with")&&(Ee=!0),this.preserveSingleSpace(F||Ee),this.print_string(this._ch),c&&L==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),I=!0):(this.eatWhitespace(),d++,this.indent())}else if(this._ch===")")d&&(d--,this.outdent()),I&&this._input.peek()===";"&&this._options.selector_separator_newline&&(I=!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&&(!c||I)&&d===0&&!T&&!f?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!c&&d===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&&n.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(F),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),n.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 he=L==='"'||L==="'";this.preserveSingleSpace(he||F),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&S&&this._output.add_new_line()}var we=this._output.get_code(E);return we},e.exports.Beautifier=v},function(e,A,g){var m=g(6).Options;function u(a){m.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var r=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||r;var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;s<o.length;s++)o[s]!=="expand"?this.brace_style="collapse":this.brace_style=o[s]}u.prototype=new m,e.exports.Options=u}],C={};function H(e){var A=C[e];if(A!==void 0)return A.exports;var g=C[e]={exports:{}};return p[e](g,g.exports,H),g.exports}var N=H(15);R=N})();var B=R;!(te=[],k=function(){return{css_beautify:B}}.apply(oe,te),k!==void 0&&(Be.exports=k))})()},Vhoy:function(Be,oe,M){"use strict";M.d(oe,"d",function(){return B}),M.d(oe,"e",function(){return p}),M.d(oe,"c",function(){return C}),M.d(oe,"b",function(){return H}),M.d(oe,"a",function(){return N});var te=M("MI8n");class k{constructor(){this._icons=new Map,this._onDidRegister=new te.b}add(e){const A=this._icons.get(e.id);A?e.description?A.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const R=new k,B=R;function p(e,A){return new H(e,A)}function C(e){return e?e.replace(/\$\((.*?)\)/g,(A,g)=>` ${g} `).trim():""}class H{constructor(e,A,g){this.id=e,this.definition=A,this.description=g,R.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var N;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const A=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function g(a){if(a instanceof H)return["codicon","codicon-"+a.id];const r=A.exec(a.id);if(!r)return g(H.error);let[,o,s]=r;const i=["codicon","codicon-"+o];return s&&i.push("codicon-modifier-"+s.substr(1)),i}e.asClassNameArray=g;function m(a){return g(a).join(" ")}e.asClassName=m;function u(a){return"."+g(a).join(".")}e.asCSSSelector=u})(N||(N={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(H||(H={}))},WaYH:function(Be,oe,M){"use strict";var te=M("rePB"),k=M("Ff2n"),R=M("VTBJ"),B=M("1OyB"),p=M("vuIU"),C=M("JX7q"),H=M("Ji7U"),N=M("LK+K"),e=M("q1tI"),A=M("TSYQ"),g=M.n(A),m=M("sboe"),u=M("OZM5"),a=function(x){var E=x.prefixCls,h=x.level,d=x.isStart,l=x.isEnd;if(!h)return null;for(var c="".concat(E,"-indent-unit"),y=[],f=0;f<h;f+=1){var T;y.push(e.createElement("span",{key:f,className:g()(c,(T={},Object(te.a)(T,"".concat(c,"-start"),d[f+1]),Object(te.a)(T,"".concat(c,"-end"),l[f+1]),Object(te.a)(T,"".concat(c,"-end-first-level"),!f&&l[0]),T))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(E,"-indent")},y)},r=a,o=M("815F"),s="open",i="close",n="---",t=function(v){Object(H.a)(E,v);var x=Object(N.a)(E);function E(){var h;return Object(B.a)(this,E),h=x.apply(this,arguments),h.state={dragNodeHighlight:!1},h.onSelectorClick=function(d){var l=h.props.context.onNodeClick;l(d,Object(o.b)(h.props)),h.isSelectable()?h.onSelect(d):h.onCheck(d)},h.onSelectorDoubleClick=function(d){var l=h.props.context.onNodeDoubleClick;l(d,Object(o.b)(h.props))},h.onSelect=function(d){if(h.isDisabled())return;var l=h.props.context.onNodeSelect;d.preventDefault(),l(d,Object(o.b)(h.props))},h.onCheck=function(d){if(h.isDisabled())return;var l=h.props,c=l.disableCheckbox,y=l.checked,f=h.props.context.onNodeCheck;if(!h.isCheckable()||c)return;d.preventDefault();var T=!y;f(d,Object(o.b)(h.props),T)},h.onMouseEnter=function(d){var l=h.props.context.onNodeMouseEnter;l(d,Object(o.b)(h.props))},h.onMouseLeave=function(d){var l=h.props.context.onNodeMouseLeave;l(d,Object(o.b)(h.props))},h.onContextMenu=function(d){var l=h.props.context.onNodeContextMenu;l(d,Object(o.b)(h.props))},h.onDragStart=function(d){var l=h.props.context.onNodeDragStart;d.stopPropagation(),h.setState({dragNodeHighlight:!0}),l(d,Object(C.a)(h));try{d.dataTransfer.setData("text/plain","")}catch(c){}},h.onDragEnter=function(d){var l=h.props.context.onNodeDragEnter;d.preventDefault(),d.stopPropagation(),l(d,Object(C.a)(h))},h.onDragOver=function(d){var l=h.props.context.onNodeDragOver;d.preventDefault(),d.stopPropagation(),l(d,Object(C.a)(h))},h.onDragLeave=function(d){var l=h.props.context.onNodeDragLeave;d.stopPropagation(),l(d,Object(C.a)(h))},h.onDragEnd=function(d){var l=h.props.context.onNodeDragEnd;d.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(d,Object(C.a)(h))},h.onDrop=function(d){var l=h.props.context.onNodeDrop;d.preventDefault(),d.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(d,Object(C.a)(h))},h.onExpand=function(d){var l=h.props.context.onNodeExpand;l(d,Object(o.b)(h.props))},h.setSelectHandle=function(d){h.selectHandle=d},h.getNodeState=function(){var d=h.props.expanded;return h.isLeaf()?null:d?s:i},h.hasChildren=function(){var d=h.props.eventKey,l=h.props.context.keyEntities,c=l[d]||{},y=c.children;return!!(y||[]).length},h.isLeaf=function(){var d=h.props,l=d.isLeaf,c=d.loaded,y=h.props.context.loadData,f=h.hasChildren();return l===!1?!1:l||!y&&!f||y&&c&&!f},h.isDisabled=function(){var d=h.props.disabled,l=h.props.context.disabled;return!!(l||d)},h.isCheckable=function(){var d=h.props.checkable,l=h.props.context.checkable;return!l||d===!1?!1:l},h.syncLoadData=function(d){var l=d.expanded,c=d.loading,y=d.loaded,f=h.props.context,T=f.loadData,I=f.onNodeLoad;if(c)return;T&&l&&!h.isLeaf()&&(!h.hasChildren()&&!y&&I(Object(o.b)(h.props)))},h.renderSwitcher=function(){var d=h.props,l=d.expanded,c=d.switcherIcon,y=h.props.context,f=y.prefixCls,T=y.switcherIcon,I=c||T;if(h.isLeaf())return e.createElement("span",{className:g()("".concat(f,"-switcher"),"".concat(f,"-switcher-noop"))},typeof I=="function"?I(Object(R.a)(Object(R.a)({},h.props),{},{isLeaf:!0})):I);var P=g()("".concat(f,"-switcher"),"".concat(f,"-switcher_").concat(l?s:i));return e.createElement("span",{onClick:h.onExpand,className:P},typeof I=="function"?I(Object(R.a)(Object(R.a)({},h.props),{},{isLeaf:!1})):I)},h.renderCheckbox=function(){var d=h.props,l=d.checked,c=d.halfChecked,y=d.disableCheckbox,f=h.props.context.prefixCls,T=h.isDisabled(),I=h.isCheckable();if(!I)return null;var P=typeof I!="boolean"?I:null;return e.createElement("span",{className:g()("".concat(f,"-checkbox"),l&&"".concat(f,"-checkbox-checked"),!l&&c&&"".concat(f,"-checkbox-indeterminate"),(T||y)&&"".concat(f,"-checkbox-disabled")),onClick:h.onCheck},P)},h.renderIcon=function(){var d=h.props.loading,l=h.props.context.prefixCls;return e.createElement("span",{className:g()("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(h.getNodeState()||"docu"),d&&"".concat(l,"-icon_loading"))})},h.renderSelector=function(){var d=h.state.dragNodeHighlight,l=h.props,c=l.title,y=l.selected,f=l.icon,T=l.loading,I=l.data,P=h.props.context,S=P.prefixCls,w=P.showIcon,F=P.icon,L=P.draggable,G=P.loadData,Z=P.titleRender,ue=h.isDisabled(),ce="".concat(S,"-node-content-wrapper"),Re;if(w){var Ee=f||F;Re=Ee?e.createElement("span",{className:g()("".concat(S,"-iconEle"),"".concat(S,"-icon__customize"))},typeof Ee=="function"?Ee(h.props):Ee):h.renderIcon()}else G&&T&&(Re=h.renderIcon());var he;typeof c=="function"?he=c(I):Z?he=Z(I):he=c;var we=e.createElement("span",{className:"".concat(S,"-title")},he);return e.createElement("span",{ref:h.setSelectHandle,title:typeof c=="string"?c:"",className:g()("".concat(ce),"".concat(ce,"-").concat(h.getNodeState()||"normal"),!ue&&(y||d)&&"".concat(S,"-node-selected"),!ue&&L&&"draggable"),draggable:!ue&&L||void 0,"aria-grabbed":!ue&&L||void 0,onMouseEnter:h.onMouseEnter,onMouseLeave:h.onMouseLeave,onContextMenu:h.onContextMenu,onClick:h.onSelectorClick,onDoubleClick:h.onSelectorDoubleClick,onDragStart:L?h.onDragStart:void 0},Re,we)},h}return Object(p.a)(E,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var d=this.props.selectable,l=this.props.context.selectable;return typeof d=="boolean"?d:l}},{key:"render",value:function(){var d,l=this.props,c=l.eventKey,y=l.className,f=l.style,T=l.dragOver,I=l.dragOverGapTop,P=l.dragOverGapBottom,S=l.isLeaf,w=l.isStart,F=l.isEnd,L=l.expanded,G=l.selected,Z=l.checked,ue=l.halfChecked,ce=l.loading,Re=l.domRef,Ee=l.active,he=l.onMouseMove,we=Object(k.a)(l,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Pe=this.props.context,de=Pe.prefixCls,j=Pe.filterTreeNode,O=Pe.draggable,D=Pe.keyEntities,W=this.isDisabled(),V=Object(u.f)(we),U=D[c]||{},le=U.level,Oe=F[F.length-1];return e.createElement("div",Object.assign({ref:Re,className:g()(y,"".concat(de,"-treenode"),(d={},Object(te.a)(d,"".concat(de,"-treenode-disabled"),W),Object(te.a)(d,"".concat(de,"-treenode-switcher-").concat(L?"open":"close"),!S),Object(te.a)(d,"".concat(de,"-treenode-checkbox-checked"),Z),Object(te.a)(d,"".concat(de,"-treenode-checkbox-indeterminate"),ue),Object(te.a)(d,"".concat(de,"-treenode-selected"),G),Object(te.a)(d,"".concat(de,"-treenode-loading"),ce),Object(te.a)(d,"".concat(de,"-treenode-active"),Ee),Object(te.a)(d,"".concat(de,"-treenode-leaf-last"),Oe),Object(te.a)(d,"drag-over",!W&&T),Object(te.a)(d,"drag-over-gap-top",!W&&I),Object(te.a)(d,"drag-over-gap-bottom",!W&&P),Object(te.a)(d,"filter-node",j&&j(Object(o.b)(this.props))),d)),style:f,onDragEnter:O?this.onDragEnter:void 0,onDragOver:O?this.onDragOver:void 0,onDragLeave:O?this.onDragLeave:void 0,onDrop:O?this.onDrop:void 0,onDragEnd:O?this.onDragEnd:void 0,onMouseMove:he},V),e.createElement(r,{prefixCls:de,level:le,isStart:w,isEnd:F}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),E}(e.Component),_=function(x){return e.createElement(m.a.Consumer,null,function(E){return e.createElement(t,Object.assign({},x,{context:E}))})};_.displayName="TreeNode",_.defaultProps={title:n},_.isTreeNode=1;var b=oe.a=_},Y1PL:function(Be,oe,M){"use strict";M.r(oe),M.d(oe,"ResizableTextArea",function(){return ue});var te=M("wx14"),k=M("1OyB"),R=M("vuIU"),B=M("Ji7U"),p=M("LK+K"),C=M("q1tI"),H=M("VTBJ"),N=M("rePB"),e=M("Zm9Q"),A=M("Kwbf"),g=M("c+Xe"),m=M("m+aA"),u=M("bdgK"),a=new Map;function r(Ee){Ee.forEach(function(he){var we,Pe=he.target;(we=a.get(Pe))===null||we===void 0||we.forEach(function(de){return de(Pe)})})}var o=new u.default(r),s=null,i=null;function n(Ee,he){a.has(Ee)||(a.set(Ee,new Set),o.observe(Ee)),a.get(Ee).add(he)}function t(Ee,he){a.has(Ee)&&(a.get(Ee).delete(he),a.get(Ee).size||(o.unobserve(Ee),a.delete(Ee)))}var _=function(Ee){Object(B.a)(we,Ee);var he=Object(p.a)(we);function we(){return Object(k.a)(this,we),he.apply(this,arguments)}return Object(R.a)(we,[{key:"render",value:function(){return this.props.children}}]),we}(C.Component),b=C.createContext(null);function v(Ee){var he=Ee.children,we=Ee.onBatchResize,Pe=C.useRef(0),de=C.useRef([]),j=C.useContext(b),O=C.useCallback(function(D,W,V){Pe.current+=1;var U=Pe.current;de.current.push({size:D,element:W,data:V}),Promise.resolve().then(function(){U===Pe.current&&(we==null||we(de.current),de.current=[])}),j==null||j(D,W,V)},[we,j]);return C.createElement(b.Provider,{value:O},he)}function x(Ee){var he=Ee.children,we=Ee.disabled,Pe=C.useRef(null),de=C.useRef(null),j=C.useContext(b),O=C.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),D=C.isValidElement(he)&&Object(g.c)(he),W=D?he.ref:null,V=C.useMemo(function(){return Object(g.a)(W,Pe)},[W,Pe]),U=C.useRef(Ee);U.current=Ee;var le=C.useCallback(function(Oe){var Me=U.current,ie=Me.onResize,pe=Me.data,_e=Oe.getBoundingClientRect(),Ae=_e.width,Ke=_e.height,ze=Oe.offsetWidth,Ze=Oe.offsetHeight,Ye=Math.floor(Ae),it=Math.floor(Ke);if(O.current.width!==Ye||O.current.height!==it||O.current.offsetWidth!==ze||O.current.offsetHeight!==Ze){var tt={width:Ye,height:it,offsetWidth:ze,offsetHeight:Ze};O.current=tt;var Te=ze===Math.round(Ae)?Ae:ze,Ie=Ze===Math.round(Ke)?Ke:Ze,ke=Object(H.a)(Object(H.a)({},tt),{},{offsetWidth:Te,offsetHeight:Ie});j==null||j(ke,Oe,pe),ie&&Promise.resolve().then(function(){ie(ke,Oe)})}},[]);return C.useEffect(function(){var Oe=Object(m.a)(Pe.current)||Object(m.a)(de.current);return Oe&&!we&&n(Oe,le),function(){return t(Oe,le)}},[Pe.current,we]),C.createElement(_,{ref:de},D?C.cloneElement(he,{ref:V}):he)}var E="rc-observer-key";function h(Ee){var he=Ee.children,we=Object(e.a)(he);return we.map(function(Pe,de){var j=(Pe==null?void 0:Pe.key)||"".concat(E,"-").concat(de);return C.createElement(x,Object(te.a)({},Ee,{key:j}),Pe)})}h.Collection=v;var d=h,l=M("bT9E"),c=M("TSYQ"),y=M.n(c),f=`
|
|
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
|
|
`,T=["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"],I={},P;function S(Ee){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,we=Ee.getAttribute("id")||Ee.getAttribute("data-reactid")||Ee.getAttribute("name");if(he&&I[we])return I[we];var Pe=window.getComputedStyle(Ee),de=Pe.getPropertyValue("box-sizing")||Pe.getPropertyValue("-moz-box-sizing")||Pe.getPropertyValue("-webkit-box-sizing"),j=parseFloat(Pe.getPropertyValue("padding-bottom"))+parseFloat(Pe.getPropertyValue("padding-top")),O=parseFloat(Pe.getPropertyValue("border-bottom-width"))+parseFloat(Pe.getPropertyValue("border-top-width")),D=T.map(function(V){return"".concat(V,":").concat(Pe.getPropertyValue(V))}).join(";"),W={sizingStyle:D,paddingSize:j,borderSize:O,boxSizing:de};return he&&we&&(I[we]=W),W}function w(Ee){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),document.body.appendChild(P)),Ee.getAttribute("wrap")?P.setAttribute("wrap",Ee.getAttribute("wrap")):P.removeAttribute("wrap");var de=S(Ee,he),j=de.paddingSize,O=de.borderSize,D=de.boxSizing,W=de.sizingStyle;P.setAttribute("style","".concat(W,";").concat(f)),P.value=Ee.value||Ee.placeholder||"";var V=Number.MIN_SAFE_INTEGER,U=Number.MAX_SAFE_INTEGER,le=P.scrollHeight,Oe;if(D==="border-box"?le+=O:D==="content-box"&&(le-=j),we!==null||Pe!==null){P.value=" ";var Me=P.scrollHeight-j;we!==null&&(V=Me*we,D==="border-box"&&(V=V+j+O),le=Math.max(V,le)),Pe!==null&&(U=Me*Pe,D==="border-box"&&(U=U+j+O),Oe=le>U?"":"hidden",le=Math.min(U,le))}return{height:le,minHeight:V,maxHeight:U,overflowY:Oe,resize:"none"}}var F=M("Gytx"),L=M.n(F),G;(function(Ee){Ee[Ee.NONE=0]="NONE",Ee[Ee.RESIZING=1]="RESIZING",Ee[Ee.RESIZED=2]="RESIZED"})(G||(G={}));var Z=function(Ee){Object(B.a)(we,Ee);var he=Object(p.a)(we);function we(Pe){var de;return Object(k.a)(this,we),de=he.call(this,Pe),de.nextFrameActionId=void 0,de.resizeFrameId=void 0,de.textArea=void 0,de.saveTextArea=function(j){de.textArea=j},de.handleResize=function(j){var O=de.state.resizeStatus,D=de.props,W=D.autoSize,V=D.onResize;if(O!==G.NONE)return;typeof V=="function"&&V(j),W&&de.resizeOnNextFrame()},de.resizeOnNextFrame=function(){cancelAnimationFrame(de.nextFrameActionId),de.nextFrameActionId=requestAnimationFrame(de.resizeTextarea)},de.resizeTextarea=function(){var j=de.props.autoSize;if(!j||!de.textArea)return;var O=j.minRows,D=j.maxRows,W=w(de.textArea,!1,O,D);de.setState({textareaStyles:W,resizeStatus:G.RESIZING},function(){cancelAnimationFrame(de.resizeFrameId),de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:G.RESIZED},function(){de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:G.NONE}),de.fixFirefoxAutoScroll()})})})})},de.renderTextArea=function(){var j=de.props,O=j.prefixCls,D=O===void 0?"rc-textarea":O,W=j.autoSize,V=j.onResize,U=j.className,le=j.disabled,Oe=de.state,Me=Oe.textareaStyles,ie=Oe.resizeStatus,pe=Object(l.a)(de.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),_e=y()(D,U,Object(N.a)({},"".concat(D,"-disabled"),le));"value"in pe&&(pe.value=pe.value||"");var Ae=Object(H.a)(Object(H.a)(Object(H.a)({},de.props.style),Me),ie===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return C.createElement(d,{onResize:de.handleResize,disabled:!(W||V)},C.createElement("textarea",Object(te.a)({},pe,{className:_e,style:Ae,ref:de.saveTextArea})))},de.state={textareaStyles:{},resizeStatus:G.NONE},de}return Object(R.a)(we,[{key:"componentDidUpdate",value:function(de){(de.value!==this.props.value||!L()(de.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 de=this.textArea.selectionStart,j=this.textArea.selectionEnd;this.textArea.setSelectionRange(de,j)}}catch(O){}}},{key:"render",value:function(){return this.renderTextArea()}}]),we}(C.Component),ue=Z,ce=function(Ee){Object(B.a)(we,Ee);var he=Object(p.a)(we);function we(Pe){var de;Object(k.a)(this,we),de=he.call(this,Pe),de.resizableTextArea=void 0,de.focus=function(){de.resizableTextArea.textArea.focus()},de.saveTextArea=function(O){de.resizableTextArea=O},de.handleChange=function(O){var D=de.props.onChange;de.setValue(O.target.value,function(){de.resizableTextArea.resizeTextarea()}),D&&D(O)},de.handleKeyDown=function(O){var D=de.props,W=D.onPressEnter,V=D.onKeyDown;O.keyCode===13&&W&&W(O),V&&V(O)};var j=typeof Pe.value=="undefined"||Pe.value===null?Pe.defaultValue:Pe.value;return de.state={value:j},de}return Object(R.a)(we,[{key:"setValue",value:function(de,j){"value"in this.props||this.setState({value:de},j)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return C.createElement(ue,Object(te.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(de){return"value"in de?{value:de.value}:null}}]),we}(C.Component),Re=oe.default=ce},ZJlW:function(Be,oe,M){Be.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(Be,oe,M){"use strict";M.d(oe,"a",function(){return F});var te=M("k1fw"),k=M("oBTY"),R=M("miYZ"),B=M("tsqr"),p=M("rAM+"),C=M("tJVT"),H=M("PpiC"),N=M("q1tI"),e=M.n(N),A=M("bdgK"),g=M("9og8"),m=M("WmNS"),u=M.n(m),a={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"]},r={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"]},o={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","friend","gcnew","generic","goto","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:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $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 <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].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(`
|
|
`)}]},i=M("5VLF"),n=M.n(i),t={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"]}},_=function(G,Z){return Z.map(function(ue){return{label:ue,kind:G.languages.CompletionItemKind.Keyword,insertText:ue}})},b=function(G){return Object.keys(t.tables).map(function(Z){return{label:Z,kind:G.languages.CompletionItemKind.Variable,insertText:Z}})},v=function(G,Z){var ue=t.tables[G];return ue?ue.map(function(ce){return{label:ce,kind:Z.languages.CompletionItemKind.Field,insertText:ce}}):[]};function x(L,G,Z,ue,ce){var Re=G.getWordUntilPosition(Z),Ee={startLineNumber:Z.lineNumber,endLineNumber:Z.lineNumber,startColumn:Re.startColumn,endColumn:Re.endColumn},he=ue.map(function(we){return{label:we,kind:L.languages.CompletionItemKind.Keyword,insertText:we,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ee}});return ce.map(function(we){he.push(Object(te.a)(Object(te.a)({},we),{},{range:Ee}))}),he}var E=function(L){t.languages.map(function(ce){return L.languages.registerDocumentFormattingEditProvider(ce,{provideDocumentFormattingEdits:function(Ee,he,we){return Object(g.a)(u.a.mark(function Pe(){var de;return u.a.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return de=n()(Ee.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),O.abrupt("return",[{range:Ee.getFullModelRange(),text:de}]);case 2:case"end":return O.stop()}},Pe)}))()}}),ce});var G=o.quickKey.map(function(ce){return{label:ce.label,kind:L.languages.CompletionItemKind.Method,insertText:ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Z=s.quickKey.map(function(ce){return{label:ce.label,kind:L.languages.CompletionItemKind.Method,insertText:ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ue=r.quickKey.map(function(ce){return{label:ce.label,kind:L.languages.CompletionItemKind.Method,insertText:ce.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Re,Ee){var he=Re.getWordUntilPosition(Ee),we={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Pe=Re.getLineContent(Ee.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[].concat(Object(k.a)(o.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}})),Object(k.a)(o.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Pe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Re,Ee){var he=Re.getWordUntilPosition(Ee),we={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn};return{suggestions:Object(k.a)(a.keywords.map(function(Pe){return{label:Pe,kind:L.languages.CompletionItemKind.Function,documentation:Pe,insertText:Pe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Re,Ee){var he=Re.getWordUntilPosition(Ee),we={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Pe=Re.getLineContent(Ee.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[].concat(Object(k.a)(r.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}})),Object(k.a)(r.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Pe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Re,Ee){var he=Re.getWordUntilPosition(Ee),we={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Pe=Re.getLineContent(Ee.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[].concat(Object(k.a)(s.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}})),Object(k.a)(s.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Pe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}})))}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",d=M("fjLI"),l=M("LvDl"),c=M("+ua5");function y(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function f(){}var T=!1,I={"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 P(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=L;if(Array.isArray(L)){for(var Z=0;Z<L.length;Z++){var ue=I[L[Z]];if(ue)return ue}return G[0]}return I[G]||G}var S=null,w=oe.b=function(L){var G=L.width,Z=G===void 0?"100%":G,ue=L.height,ce=ue===void 0?"100%":ue,Re=L.value,Ee=L.language,he=Ee===void 0?"javascript":Ee,we=L.style,Pe=we===void 0?{}:we,de=L.options,j=de===void 0?{}:de,O=L.overrideServices,D=O===void 0?{}:O,W=L.theme,V=W===void 0?"vs-dark":W,U=L.onEditBlur,le=L.onSave,Oe=L.autoHeight,Me=Oe===void 0?!1:Oe,ie=L.forbidCopy,pe=ie===void 0?!1:ie,_e=L.onChange,Ae=_e===void 0?f:_e,Ke=L.editorDidMount,ze=Ke===void 0?f:Ke,Ze=L.onFocus,Ye=Ze===void 0?f:Ze,it=L.filename,tt=it===void 0?"educoder.txt":it,Te=L.errorLine,Ie=L.errorContent,ke=Ie===void 0?"":Ie,We=Object(H.a)(L,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),$=Object(N.useRef)(),K=Object(N.useRef)({}),z=Object(N.useRef)(),X=Object(N.useRef)(),ee=Object(N.useRef)(!1),Y=Object(N.useRef)(),J=Object(N.useState)(!1),ne=Object(C.a)(J,2),re=ne[0],ye=ne[1];function be(){var at;return $.current&&(at=new A.default(function(Le){var qe=Object(p.a)(Le),lt;try{for(qe.s();!(lt=qe.n()).done;){var _t=lt.value;(_t.target.offsetHeight>0||_t.target.offsetWidth>0)&&K.current.instance.layout()}}catch(At){qe.e(At)}finally{qe.f()}}),at.observe($.current)),at}function Ne(){B.b.warn(decodeURIComponent(h))}var Ve=function(){var Le=K.current.instance;if(Re!=null&&Le&&re){var qe=Le.getModel();qe&&Re!==qe.getValue()&&(T=!0,qe.setValue(Re),Le.layout(),T=!1)}};Object(N.useEffect)(function(){X.current&&clearTimeout(X.current),X.current=setTimeout(function(){Ve()},500)},[Re,re,K.current]),Object(N.useEffect)(function(){if(Te&&K.current&&K.current.instance){var at=K.current.instance;at.changeViewZones(function(qe){var lt=document.createElement("div");lt.style.padding="10px 20px",lt.style.width="calc(100% - 20px)",lt.className="my-error-line-wrp",lt.innerHTML=ke,qe.addZone({afterLineNumber:Te||11,heightInLines:3,domNode:lt})});var Le={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}};at.addOverlayWidget(Le),at.revealPositionInCenter({lineNumber:20,column:1})}},[Te,K.current,re]);function $e(){var at=K.current.instance;if(at){var Le=at.getSelection(),qe=K.current.pastePos||{},lt=new S.Range(qe.startLineNumber||Le.endLineNumber,qe.startColumn||Le.endColumn,qe.endLineNumber||Le.endLineNumber,qe.endColumn||Le.endColumn);setTimeout(function(){at.executeEdits("",[{range:lt,text:""}])},300)}}function Je(at){(window.navigator.platform.match("Mac")?at.metaKey:at.ctrlKey)&&at.keyCode==83&&(at.preventDefault(),le())}var Ct=function(){if(Me&&K.current.instance){var Le=K.current.instance.getContentHeight();bt(Le<ce?ce:Le)}else bt(ce)};function dt(at){var Le=document.createEvent("MouseEvents");Le.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),at.dispatchEvent(Le)}function rt(at,Le){var qe=window.URL||window.webkitURL||window,lt=new Blob([Le]),_t=document.createElementNS("http://www.w3.org/1999/xhtml","a");_t.href=qe.createObjectURL(lt),_t.download=at,dt(_t)}Object(N.useEffect)(function(){Ct()},[Ct]),Object(N.useEffect)(function(){$.current&&!re&&Promise.all([M.e(18),M.e(29)]).then(M.t.bind(null,"M/lh",7)).then(function(at){try{S=at,K.current.instance=S.editor.create($.current,{value:Re,language:P(he),theme:V,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},D);var Le=K.current.instance,qe=d.d._menuItems,lt=Object(k.a)(qe).find(function(ut){return ut[0]._debugName=="EditorContext"}),_t=lt[1],At=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ht=function(ct,vt){var ft=ct._first;do{var It,Rt,Zt=vt.includes((It=ft.element)===null||It===void 0||((Rt=It.command)===null||Rt===void 0)?void 0:Rt.id);Zt&&ct._remove(ft)}while(ft=ft.next)};if(ze(Le,S),setTimeout(function(){Ct(),K.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){rt(tt||"educoder.txt",Le.getValue())}}),Le.getDomNode().addEventListener("input",function(){z.current.autoFormat&&Le.getAction("editor.action.formatDocument").run()})},500),K.current.subscription=Le.onDidChangeModelContent(function(ut){ee.current?clearTimeout(Y.current):(Ct(),Ae(Le.getValue(),ut)),Y.current=setTimeout(function(){ee.current=!1},500)}),window.Monaco||E(S,P(he)),pe&&(ht(_t,At),$.current.classList.add("noCopyPaste"),Le.onKeyDown(function(ut){var ct=ut.keyCode,vt=ut.ctrlKey,ft=ut.metaKey;(ct===33||ct===52)&&(ft||vt)&&(Ne(),ut.preventDefault())})),window.Monaco=S,U&&Le.onDidBlurEditorWidget(function(){U(Le.getValue())}),Ye&&Le.onDidFocusEditorText(function(){Ye(Le.getValue())}),pe){Le.addCommand(S.KeyMod.CtrlCmd|S.KeyCode.KEY_V,function(){return Ne(),null}),Le.onDidPaste(function(ut){K.current.pastePos=ut});try{window.addEventListener("paste",$e)}catch(ut){}}var st=be();return ye(!0),function(){var ut=K.current.instance;ut.dispose();var ct=ut.getModel();ct&&ct.dispose(),K.current.subscription&&K.current.subscription.dispose(),pe&&window.removeEventListener("paste",$e),st.unobserve($.current)}}catch(ut){}})},[]),Object(N.useEffect)(function(){var at=K.current.instance;if(at&&re)return document.addEventListener("keydown",Je,!1),function(){document.removeEventListener("keydown",Je)}},[le,re]),Object(N.useEffect)(function(){var at=K.current.instance;if(at&&re){var Le=P(he);S.editor.setModelLanguage(at.getModel(),Le),console.log("language:",he,at.getModel(),Le)}},[he,re]),Object(N.useEffect)(function(){var at=K.current.instance;at&&re&&S.editor.setTheme(V)},[V,re]),Object(N.useEffect)(function(){var at=K.current.instance;z.current=j,at&&re&&(at.updateOptions(Object(te.a)({},j)),setTimeout(function(){at.getModel().updateOptions(Object(te.a)({},j))},200))},[JSON.stringify(j),re]),Object(N.useEffect)(function(){var at=K.current.instance;at&&re&&at.layout()},[Z,ce,re]);var Dt=Object(N.useState)(y(Z)),Ot=Object(C.a)(Dt,2),St=Ot[0],Kt=Ot[1],gt=Object(N.useState)(y(ce)),Lt=Object(C.a)(gt,2),Pt=Lt[0],bt=Lt[1],Qt=Object(te.a)(Object(te.a)({},Pe),{},{width:St,height:Pt});return e.a.createElement("div",{className:"my-monaco-editor",ref:$,style:Qt})};function F(L){var G=L.width,Z=G===void 0?"100%":G,ue=L.height,ce=ue===void 0?"100%":ue,Re=L.original,Ee=L.modified,he=L.language,we=L.options,Pe=we===void 0?{}:we,de=Object(N.useRef)(),j=Object(N.useState)(null),O=Object(C.a)(j,2),D=O[0],W=O[1];function V(Me){var ie;return de.current&&(ie=new A.default(function(pe){var _e=Object(p.a)(pe),Ae;try{for(_e.s();!(Ae=_e.n()).done;){var Ke=Ae.value;(Ke.target.offsetHeight>0||Ke.target.offsetWidth>0)&&Me.layout()}}catch(ze){_e.e(ze)}finally{_e.f()}}),ie.observe(de.current)),ie}Object(N.useEffect)(function(){de.current&&Promise.all([M.e(18),M.e(29)]).then(M.t.bind(null,"M/lh",7)).then(function(Me){S=Me;var ie=S.editor.createDiffEditor(de.current,Object(te.a)(Object(te.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},Pe),{},{wordWrap:!0}));W(ie);var pe=V(ie);return function(){ie.dispose();var _e=ie.getModel();_e&&_e.dispose(),pe.unobserve(de.current)}})},[]),Object(N.useEffect)(function(){D&&D.setModel({original:S.editor.createModel(Re,he),modified:S.editor.createModel(Ee,he)})},[Re,Ee,he,D]);var U=y(Z),le=y(ce),Oe={width:U,height:le};return e.a.createElement("div",{className:"my-diff-editor",ref:de,style:Oe})}},a2OE:function(Be,oe){Be.exports="data:image/png;base64,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"},bT9E:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return k});var te=M("VTBJ");function k(R,B){var p=Object(te.a)({},R);return Array.isArray(B)&&B.forEach(function(C){delete p[C]}),p}},biw7:function(Be,oe,M){"use strict";var te=M("q1tI"),k=M.n(te),R=te.createContext(null);oe.a=R},cFMs:function(Be,oe){Be.exports="data:image/png;base64,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"},cz0n:function(Be,oe,M){Be.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(Be,oe,M){Be.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(Be,oe,M){Be.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"}},fgAr:function(Be,oe,M){Be.exports={flex_box_center:"flex_box_center___3W32R",flex_space_between:"flex_space_between___2uUoZ",flex_box_vertical_center:"flex_box_vertical_center___3Oxpz",flex_box_center_end:"flex_box_center_end___2tkyR",flex_box_column:"flex_box_column___2IFiF",btns:"btns___1c8D8",confirm:"confirm___2gIuB",cancel:"cancel___1ssuo"}},fjLI:function(Be,oe,M){"use strict";M.d(oe,"f",function(){return u}),M.d(oe,"b",function(){return a}),M.d(oe,"a",function(){return r}),M.d(oe,"d",function(){return o}),M.d(oe,"e",function(){return s}),M.d(oe,"c",function(){return i});var te=M("8HAY"),k=M("Vhoy"),R=M("MI8n"),B=M("JYp7"),p=M("pmY6"),C=M("24hK"),H=M("nnTU"),N=M("T8No"),e=M("Cg/j"),A=M("t9D7"),g=function(n,t,_,b){var v=arguments.length,x=v<3?t:b===null?b=Object.getOwnPropertyDescriptor(t,_):b,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(n,t,_,b);else for(var h=n.length-1;h>=0;h--)(E=n[h])&&(x=(v<3?E(x):v>3?E(t,_,x):E(t,_))||x);return v>3&&x&&Object.defineProperty(t,_,x),x},m=function(n,t){return function(_,b){t(_,b,n)}};function u(n){return n.command!==void 0}class a{constructor(n){this.id=a._idPool++,this._debugName=n}}a._idPool=0,a.CommandPalette=new a("CommandPalette"),a.EditorContext=new a("EditorContext"),a.SimpleEditorContext=new a("SimpleEditorContext"),a.EditorContextCopy=new a("EditorContextCopy"),a.EditorContextPeek=new a("EditorContextPeek"),a.MenubarEditMenu=new a("MenubarEditMenu"),a.MenubarCopy=new a("MenubarCopy"),a.MenubarGoMenu=new a("MenubarGoMenu"),a.MenubarSelectionMenu=new a("MenubarSelectionMenu"),a.InlineCompletionsActions=new a("InlineCompletionsActions");const r=Object(e.c)("menuService"),o=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new R.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:n=>n===a.CommandPalette}}addCommand(n){return this.addCommands(B.a.single(n))}addCommands(n){for(const t of n)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(p.i)(()=>{let t=!1;for(const _ of n)t=this._commands.delete(_.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(n){return this._commands.get(n)}getCommands(){const n=new Map;return this._commands.forEach((t,_)=>n.set(_,t)),n}appendMenuItem(n,t){return this.appendMenuItems(B.a.single({id:n,item:t}))}appendMenuItems(n){const t=new Set,_=new C.a;for(const{id:b,item:v}of n){let x=this._menuItems.get(b);x||(x=new C.a,this._menuItems.set(b,x)),_.push(x.push(v)),t.add(b)}return this._onDidChangeMenu.fire(t),Object(p.i)(()=>{if(_.size>0){for(let b of _)b();this._onDidChangeMenu.fire(t),_.clear()}})}getMenuItems(n){let t;return this._menuItems.has(n)?t=[...this._menuItems.get(n)]:t=[],n===a.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(n){const t=new Set;for(const _ of n)u(_)&&(t.add(_.command.id),_.alt&&t.add(_.alt.id));this._commands.forEach((_,b)=>{t.has(b)||n.push({command:_})})}};class s extends te.e{constructor(n,t,_,b){super(`submenuitem.${n.submenu.id}`,typeof n.title=="string"?n.title:n.title.value,[],"submenu");this.item=n,this._menuService=t,this._contextKeyService=_,this._options=b}get actions(){const n=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),_=t.getActions(this._options);t.dispose();for(const[,b]of _)b.length>0&&(n.push(...b),n.push(new te.d));return n.length&&n.pop(),n}}let i=class n{constructor(t,_,b,v,x){var E,h;if(this._commandService=x,this.id=t.id,this.label=(b==null?void 0:b.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(h=typeof t.tooltip=="string"?t.tooltip:(E=t.tooltip)===null||E===void 0?void 0:E.value)!==null&&h!==void 0?h:"",this.enabled=!t.precondition||v.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const d=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=v.contextMatchesRules(d.condition),this.checked&&d.tooltip&&(this.tooltip=typeof d.tooltip=="string"?d.tooltip:d.tooltip.value),d.title&&(this.label=typeof d.title=="string"?d.title:d.title.value)}this.item=t,this.alt=_?new n(_,void 0,b,v,x):void 0,this._options=b,A.d.isThemeIcon(t.icon)&&(this.class=k.a.asClassName(t.icon))}dispose(){}run(...t){var _,b;let v=[];return((_=this._options)===null||_===void 0?void 0:_.arg)&&(v=[...v,this._options.arg]),((b=this._options)===null||b===void 0?void 0:b.shouldForwardArgs)&&(v=[...v,...t]),this._commandService.executeCommand(this.id,...v)}};i=g([m(3,N.b),m(4,H.b)],i)},fyJ8:function(Be,oe,M){"use strict";var te=M("rePB"),k=M("VTBJ"),R=M("Ff2n"),B=M("U8pU"),p=M("q1tI"),C=M.n(p),H=M("TSYQ"),N=M.n(H),e=M("c+Xe"),A=M("sR1s");function g(o){return o&&Object(B.a)(o)==="object"&&!Array.isArray(o)&&!p.isValidElement(o)}function m(o){return typeof o=="string"?!0:Object(e.c)(o)}function u(o,s){var i,n=o.prefixCls,t=o.className,_=o.record,b=o.index,v=o.dataIndex,x=o.render,E=o.children,h=o.component,d=h===void 0?"td":h,l=o.colSpan,c=o.rowSpan,y=o.fixLeft,f=o.fixRight,T=o.firstFixLeft,I=o.lastFixLeft,P=o.firstFixRight,S=o.lastFixRight,w=o.appendNode,F=o.additionalProps,L=F===void 0?{}:F,G=o.ellipsis,Z=o.align,ue=o.rowType,ce=o.isSticky,Re="".concat(n,"-cell"),Ee,he;if(E)he=E;else{var we=Object(A.b)(_,v);if(he=we,x){var Pe=x(we,_,b);g(Pe)?(he=Pe.children,Ee=Pe.props):he=Pe}}Object(B.a)(he)==="object"&&!Array.isArray(he)&&!p.isValidElement(he)&&(he=null),G&&(I||P)&&(he=p.createElement("span",{className:"".concat(Re,"-content")},he));var de=Ee||{},j=de.colSpan,O=de.rowSpan,D=de.style,W=de.className,V=Object(R.a)(de,["colSpan","rowSpan","style","className"]),U=j!==void 0?j:l,le=O!==void 0?O:c;if(U===0||le===0)return null;var Oe={},Me=typeof y=="number",ie=typeof f=="number";Me&&(Oe.position="sticky",Oe.left=y),ie&&(Oe.position="sticky",Oe.right=f);var pe={};Z&&(pe.textAlign=Z);var _e,Ae=G===!0?{showTitle:!0}:G;Ae&&(Ae.showTitle||ue==="header")&&(typeof he=="string"||typeof he=="number"?_e=he.toString():p.isValidElement(he)&&typeof he.props.children=="string"&&(_e=he.props.children));var Ke=Object(k.a)(Object(k.a)(Object(k.a)({title:_e},V),L),{},{colSpan:U&&U!==1?U:null,rowSpan:le&&le!==1?le:null,className:N()(Re,t,(i={},Object(te.a)(i,"".concat(Re,"-fix-left"),Me),Object(te.a)(i,"".concat(Re,"-fix-left-first"),T),Object(te.a)(i,"".concat(Re,"-fix-left-last"),I),Object(te.a)(i,"".concat(Re,"-fix-right"),ie),Object(te.a)(i,"".concat(Re,"-fix-right-first"),P),Object(te.a)(i,"".concat(Re,"-fix-right-last"),S),Object(te.a)(i,"".concat(Re,"-ellipsis"),G),Object(te.a)(i,"".concat(Re,"-with-append"),w),Object(te.a)(i,"".concat(Re,"-fix-sticky"),(Me||ie)&&ce),i),L.className,W),style:Object(k.a)(Object(k.a)(Object(k.a)(Object(k.a)({},L.style),pe),Oe),D),ref:m(d)?s:null});return p.createElement(d,Object.assign({},Ke),w,he)}var a=p.forwardRef(u);a.displayName="Cell";var r=p.memo(a,function(o,s){return s.shouldCellUpdate?!s.shouldCellUpdate(s.record,o.record):!1});oe.a=r},hW8S:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return B}),M.d(oe,"c",function(){return p}),M.d(oe,"b",function(){return C});var te=M("VTBJ"),k=M("Ff2n"),R=M("Kwbf"),B="RC_TABLE_INTERNAL_COL_DEFINE";function p(H){var N=H.expandable,e=Object(k.a)(H,["expandable"]);return"expandable"in H?Object(te.a)(Object(te.a)({},e),N):e}function C(H){return Object.keys(H).reduce(function(N,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(N[e]=H[e]),N},{})}},"iL++":function(Be,oe,M){Be.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"}},ic2d:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return B});var te=M("FWmy"),k=M("746U");class R{constructor(){this.data=new Map}add(p,C){te.a(k.l(p)),te.a(k.k(C)),te.a(!this.data.has(p),"There is already an extension with this id"),this.data.set(p,C)}as(p){return this.data.get(p)||null}}const B=new R},k3GJ:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return He});var te=M("rePB"),k=M("ODXe"),R=M("Ff2n"),B=M("VTBJ"),p=M("q1tI"),C=M("TSYQ"),H=M.n(C),N=M("Zm9Q"),e=M("6cGi"),A=M("KQm4"),g=M("xEkU"),m=M.n(g),u=M("t23M");function a(se){var ve=Object(p.useRef)(),Se=Object(p.useRef)(!1);function fe(){for(var Q=arguments.length,ae=new Array(Q),q=0;q<Q;q++)ae[q]=arguments[q];Se.current||(m.a.cancel(ve.current),ve.current=m()(function(){se.apply(void 0,ae)}))}return Object(p.useEffect)(function(){return function(){Se.current=!0,m.a.cancel(ve.current)}},[]),fe}function r(se){var ve=Object(p.useRef)([]),Se=Object(p.useState)({}),fe=Object(k.a)(Se,2),Q=fe[1],ae=Object(p.useRef)(typeof se=="function"?se():se),q=a(function(){var ge=ae.current;ve.current.forEach(function(Ce){ge=Ce(ge)}),ve.current=[],ae.current=ge,Q({})});function me(ge){ve.current.push(ge),q()}return[ae.current,me]}var o=M("4IlW");function s(se,ve){var Se,fe=se.prefixCls,Q=se.id,ae=se.active,q=se.rtl,me=se.tab,ge=me.key,Ce=me.tab,xe=me.disabled,De=me.closeIcon,je=se.tabBarGutter,Qe=se.tabPosition,Xe=se.closable,et=se.renderWrapper,wt=se.removeAriaLabel,jt=se.editable,Nt=se.onClick,Wt=se.onRemove,Ft=se.onFocus,kt="".concat(fe,"-tab");p.useEffect(function(){return Wt},[]);var Ut={};Qe==="top"||Qe==="bottom"?Ut[q?"marginLeft":"marginRight"]=je:Ut.marginBottom=je;var tn=jt&&Xe!==!1&&!xe;function zt(Tt){if(xe)return;Nt(Tt)}function _n(Tt){Tt.preventDefault(),Tt.stopPropagation(),jt.onEdit("remove",{key:ge,event:Tt})}var un=p.createElement("div",{key:ge,ref:ve,className:H()(kt,(Se={},Object(te.a)(Se,"".concat(kt,"-with-remove"),tn),Object(te.a)(Se,"".concat(kt,"-active"),ae),Object(te.a)(Se,"".concat(kt,"-disabled"),xe),Se)),style:Ut,onClick:zt},p.createElement("div",{role:"tab","aria-selected":ae,id:Q&&"".concat(Q,"-tab-").concat(ge),className:"".concat(kt,"-btn"),"aria-controls":Q&&"".concat(Q,"-panel-").concat(ge),"aria-disabled":xe,tabIndex:xe?null:0,onClick:function(Et){Et.stopPropagation(),zt(Et)},onKeyDown:function(Et){[o.a.SPACE,o.a.ENTER].includes(Et.which)&&(Et.preventDefault(),zt(Et))},onFocus:Ft},Ce),tn&&p.createElement("button",{type:"button","aria-label":wt||"remove",tabIndex:0,className:"".concat(kt,"-remove"),onClick:function(Et){Et.stopPropagation(),_n(Et)}},De||jt.removeIcon||"\xD7"));return et&&(un=et(un)),un}var i=p.forwardRef(s),n={width:0,height:0,left:0,top:0};function t(se,ve,Se){return Object(p.useMemo)(function(){for(var fe,Q=new Map,ae=ve.get((fe=se[0])===null||fe===void 0?void 0:fe.key)||n,q=ae.left+ae.width,me=0;me<se.length;me+=1){var ge=se[me].key,Ce=ve.get(ge);if(!Ce){var xe;Ce=ve.get((xe=se[me-1])===null||xe===void 0?void 0:xe.key)||n}var De=Q.get(ge)||Object(B.a)({},Ce);De.right=q-De.left-De.width,Q.set(ge,De)}return Q},[se.map(function(fe){return fe.key}).join("_"),ve,Se])}var _={width:0,height:0,left:0,top:0,right:0};function b(se,ve,Se,fe,Q){var ae=Q.tabs,q=Q.tabPosition,me=Q.rtl,ge,Ce,xe;["top","bottom"].includes(q)?(ge="width",Ce=me?"right":"left",xe=Math.abs(ve.left)):(ge="height",Ce="top",xe=-ve.top);var De=ve[ge],je=Se[ge],Qe=fe[ge],Xe=De;return je+Qe>De&&(Xe=De-Qe),Object(p.useMemo)(function(){if(!ae.length)return[0,0];for(var et=ae.length,wt=et,jt=0;jt<et;jt+=1){var Nt=se.get(ae[jt].key)||_;if(Nt[Ce]+Nt[ge]>xe+Xe){wt=jt-1;break}}for(var Wt=0,Ft=et-1;Ft>=0;Ft-=1){var kt=se.get(ae[Ft].key)||_;if(kt[Ce]<xe){Wt=Ft+1;break}}return[Wt,wt]},[se,xe,Xe,q,ae.map(function(et){return et.key}).join("_"),me])}var v=M("wx14"),x=M("1OyB"),E=M("vuIU"),h=M("JX7q"),d=M("Ji7U"),l=M("LK+K"),c=M("I8Z2"),y=M("bT9E"),f=M("2GS6"),T=M("Gytx"),I=M.n(T),P=M("U8pU"),S=/iPhone/i,w=/iPod/i,F=/iPad/i,L=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,Z=/\bAndroid(?:.+)SD4930UR\b/i,ue=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,ce=/Windows Phone/i,Re=/\bWindows(?:.+)ARM\b/i,Ee=/BlackBerry/i,he=/BB10/i,we=/Opera Mini/i,Pe=/\b(CriOS|Chrome)(?:.+)Mobile/i,de=/Mobile(?:.+)Firefox\b/i;function j(se,ve){return se.test(ve)}function O(se){var ve=se||(typeof navigator!="undefined"?navigator.userAgent:""),Se=(ve||"").split("[FBAN");if(typeof Se[1]!="undefined"){var fe=Se,Q=Object(k.a)(fe,1);ve=Q[0]}if(Se=ve.split("Twitter"),typeof Se[1]!="undefined"){var ae=Se,q=Object(k.a)(ae,1);ve=q[0]}var me={apple:{phone:j(S,ve)&&!j(ce,ve),ipod:j(w,ve),tablet:!j(S,ve)&&j(F,ve)&&!j(ce,ve),device:(j(S,ve)||j(w,ve)||j(F,ve))&&!j(ce,ve)},amazon:{phone:j(Z,ve),tablet:!j(Z,ve)&&j(ue,ve),device:j(Z,ve)||j(ue,ve)},android:{phone:!j(ce,ve)&&j(Z,ve)||!j(ce,ve)&&j(L,ve),tablet:!j(ce,ve)&&!j(Z,ve)&&!j(L,ve)&&(j(ue,ve)||j(G,ve)),device:!j(ce,ve)&&(j(Z,ve)||j(ue,ve)||j(L,ve)||j(G,ve))||j(/\bokhttp\b/i,ve)},windows:{phone:j(ce,ve),tablet:j(Re,ve),device:j(ce,ve)||j(Re,ve)},other:{blackberry:j(Ee,ve),blackberry10:j(he,ve),opera:j(we,ve),firefox:j(de,ve),chrome:j(Pe,ve),device:j(Ee,ve)||j(he,ve)||j(we,ve)||j(de,ve)||j(Pe,ve)},any:null,phone:null,tablet:null};return me.any=me.apple.device||me.android.device||me.windows.device||me.other.device,me.phone=me.apple.phone||me.android.phone||me.windows.phone,me.tablet=me.apple.tablet||me.android.tablet||me.windows.tablet,me}var D=Object(B.a)(Object(B.a)({},O()),{},{isMobile:O}),W=D;function V(){}function U(se,ve,Se){var fe=ve||"";return se.key||"".concat(fe,"item_").concat(Se)}function le(se){return"".concat(se,"-menu-")}function Oe(se,ve){var Se=-1;p.Children.forEach(se,function(fe){Se+=1,fe&&fe.type&&fe.type.isMenuItemGroup?p.Children.forEach(fe.props.children,function(Q){Se+=1,ve(Q,Se)}):ve(fe,Se)})}function Me(se,ve,Se){if(!se||Se.find)return;p.Children.forEach(se,function(fe){if(fe){var Q=fe.type;if(!Q||!(Q.isSubMenu||Q.isMenuItem||Q.isMenuItemGroup))return;ve.indexOf(fe.key)!==-1?Se.find=!0:fe.props.children&&Me(fe.props.children,ve,Se)}})}var ie=["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"],pe=function(ve){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=ve&&typeof ve.getBoundingClientRect=="function"&&ve.getBoundingClientRect().width;if(fe){if(Se){var Q=getComputedStyle(ve),ae=Q.marginLeft,q=Q.marginRight;fe+=+ae.replace("px","")+ +q.replace("px","")}fe=+fe.toFixed(6)}return fe||0},_e=function(ve,Se,fe){ve&&Object(P.a)(ve.style)==="object"&&(ve.style[Se]=fe)},Ae=function(){return W.any},Ke=M("bdgK"),ze=M("i8i4"),Ze=M.n(ze),Ye=M("wgJM"),it=M("l4aY"),tt=M("m+aA"),Te=M("c+Xe"),Ie=M("zT1h"),ke=M("QC+M");function We(se,ve,Se){return Se?se[0]===ve[0]:se[0]===ve[0]&&se[1]===ve[1]}function $(se,ve,Se){var fe=se[ve]||{};return Object(B.a)(Object(B.a)({},fe),Se)}function K(se,ve,Se,fe){for(var Q=Se.points,ae=Object.keys(se),q=0;q<ae.length;q+=1){var me=ae[q];if(We(se[me].points,Q,fe))return"".concat(ve,"-placement-").concat(me)}return""}var z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var se=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(se)||/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(se==null?void 0:se.substr(0,4)))},X=M("MNnm");function ee(se,ve){var Se={};return Se[se.toLowerCase()]=ve.toLowerCase(),Se["Webkit".concat(se)]="webkit".concat(ve),Se["Moz".concat(se)]="moz".concat(ve),Se["ms".concat(se)]="MS".concat(ve),Se["O".concat(se)]="o".concat(ve.toLowerCase()),Se}function Y(se,ve){var Se={animationend:ee("Animation","AnimationEnd"),transitionend:ee("Transition","TransitionEnd")};return se&&("AnimationEvent"in ve||delete Se.animationend.animation,"TransitionEvent"in ve||delete Se.transitionend.transition),Se}var J=Y(Object(X.a)(),typeof window!="undefined"?window:{}),ne={};if(Object(X.a)()){var re=document.createElement("div");ne=re.style}var ye={};function be(se){if(ye[se])return ye[se];var ve=J[se];if(ve)for(var Se=Object.keys(ve),fe=Se.length,Q=0;Q<fe;Q+=1){var ae=Se[Q];if(Object.prototype.hasOwnProperty.call(ve,ae)&&ae in ne)return ye[se]=ve[ae],ye[se]}return""}var Ne=be("animationend"),Ve=be("transitionend"),$e=!!(Ne&&Ve),Je=Ne||"animationend",Ct=Ve||"transitionend";function dt(se,ve){if(!se)return null;if(Object(P.a)(se)==="object"){var Se=ve.replace(/-\w/g,function(fe){return fe[1].toUpperCase()});return se[Se]}return"".concat(se,"-").concat(ve)}var rt="none",Dt="appear",Ot="enter",St="leave",Kt="none",gt="prepare",Lt="start",Pt="active",bt="end";function Qt(se){var ve=Object(p.useRef)(!1),Se=Object(p.useState)(se),fe=Object(k.a)(Se,2),Q=fe[0],ae=fe[1];function q(me){ve.current||ae(me)}return Object(p.useEffect)(function(){return function(){ve.current=!0}},[]),[Q,q]}var at=Object(X.a)()?p.useLayoutEffect:p.useEffect,Le=at,qe=function(){var se=p.useRef(null);function ve(){Ye.a.cancel(se.current)}function Se(fe){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;ve();var ae=Object(Ye.a)(function(){Q<=1?fe({isCanceled:function(){return ae!==se.current}}):Se(fe,Q-1)});se.current=ae}return p.useEffect(function(){return function(){ve()}},[]),[Se,ve]},lt=[gt,Lt,Pt,bt],_t=!1,At=!0;function ht(se){return se===Pt||se===bt}var st=function(se,ve){var Se=p.useState(Kt),fe=Object(k.a)(Se,2),Q=fe[0],ae=fe[1],q=qe(),me=Object(k.a)(q,2),ge=me[0],Ce=me[1];function xe(){ae(gt)}return Le(function(){if(Q!==Kt&&Q!==bt){var De=lt.indexOf(Q),je=lt[De+1],Qe=ve(Q);Qe===_t?ae(je):ge(function(Xe){function et(){if(Xe.isCanceled())return;ae(je)}Qe===!0?et():Promise.resolve(Qe).then(et)})}},[se,Q]),p.useEffect(function(){return function(){Ce()}},[]),[xe,Q]},ut=function(se){var ve=Object(p.useRef)(),Se=Object(p.useRef)(se);Se.current=se;var fe=p.useCallback(function(q){Se.current(q)},[]);function Q(q){q&&(q.removeEventListener(Ct,fe),q.removeEventListener(Je,fe))}function ae(q){ve.current&&ve.current!==q&&Q(ve.current),q&&q!==ve.current&&(q.addEventListener(Ct,fe),q.addEventListener(Je,fe),ve.current=q)}return p.useEffect(function(){return function(){Q(ve.current)}},[]),[ae,Q]};function ct(se,ve,Se,fe){var Q=fe.motionEnter,ae=Q===void 0?!0:Q,q=fe.motionAppear,me=q===void 0?!0:q,ge=fe.motionLeave,Ce=ge===void 0?!0:ge,xe=fe.motionDeadline,De=fe.motionLeaveImmediately,je=fe.onAppearPrepare,Qe=fe.onEnterPrepare,Xe=fe.onLeavePrepare,et=fe.onAppearStart,wt=fe.onEnterStart,jt=fe.onLeaveStart,Nt=fe.onAppearActive,Wt=fe.onEnterActive,Ft=fe.onLeaveActive,kt=fe.onAppearEnd,Ut=fe.onEnterEnd,tn=fe.onLeaveEnd,zt=fe.onVisibleChanged,_n=Qt(),un=Object(k.a)(_n,2),Tt=un[0],Et=un[1],Xt=Qt(rt),$t=Object(k.a)(Xt,2),pt=$t[0],nn=$t[1],gn=Qt(null),rn=Object(k.a)(gn,2),hn=rn[0],yn=rn[1],Rn=Object(p.useRef)(!1),Un=Object(p.useRef)(null),En=Object(p.useRef)(!1),Bn=Object(p.useRef)(null);function ti(){var vn=Se();return vn||Bn.current}var Gn=Object(p.useRef)(!1);function zn(vn){var ln=ti();if(vn&&!vn.deadline&&vn.target!==ln)return;var Dn;pt===Dt&&Gn.current?Dn=kt==null?void 0:kt(ln,vn):pt===Ot&&Gn.current?Dn=Ut==null?void 0:Ut(ln,vn):pt===St&&Gn.current&&(Dn=tn==null?void 0:tn(ln,vn)),Dn!==!1&&!En.current&&(nn(rt),yn(null))}var Tn=ut(zn),Nn=Object(k.a)(Tn,1),In=Nn[0],Cn=p.useMemo(function(){var vn,ln,Dn;switch(pt){case"appear":return vn={},Object(te.a)(vn,gt,je),Object(te.a)(vn,Lt,et),Object(te.a)(vn,Pt,Nt),vn;case"enter":return ln={},Object(te.a)(ln,gt,Qe),Object(te.a)(ln,Lt,wt),Object(te.a)(ln,Pt,Wt),ln;case"leave":return Dn={},Object(te.a)(Dn,gt,Xe),Object(te.a)(Dn,Lt,jt),Object(te.a)(Dn,Pt,Ft),Dn;default:return{}}},[pt]),_i=st(pt,function(vn){if(vn===gt){var ln=Cn[gt];return ln?ln(ti()):_t}if(fn in Cn){var Dn;yn(((Dn=Cn[fn])===null||Dn===void 0?void 0:Dn.call(Cn,ti(),null))||null)}return fn===Pt&&(In(ti()),xe>0&&(clearTimeout(Un.current),Un.current=setTimeout(function(){zn({deadline:!0})},xe))),At}),Ei=Object(k.a)(_i,2),Di=Ei[0],fn=Ei[1],di=ht(fn);Gn.current=di,Le(function(){Et(ve);var vn=Rn.current;if(Rn.current=!0,!se)return;var ln;!vn&&ve&&me&&(ln=Dt),vn&&ve&&ae&&(ln=Ot),(vn&&!ve&&Ce||!vn&&De&&!ve&&Ce)&&(ln=St),ln&&(nn(ln),Di())},[ve]),Object(p.useEffect)(function(){(pt===Dt&&!me||pt===Ot&&!ae||pt===St&&!Ce)&&nn(rt)},[me,ae,Ce]),Object(p.useEffect)(function(){return function(){clearTimeout(Un.current),En.current=!0}},[]),Object(p.useEffect)(function(){Tt!==void 0&&pt===rt&&(zt==null||zt(Tt))},[Tt,pt]);var Li=hn;return Cn[gt]&&fn===Lt&&(Li=Object(B.a)({transition:"none"},Li)),[pt,fn,Li,Tt!=null?Tt:ve]}var vt=function(se){Object(d.a)(Se,se);var ve=Object(l.a)(Se);function Se(){return Object(x.a)(this,Se),ve.apply(this,arguments)}return Object(E.a)(Se,[{key:"render",value:function(){return this.props.children}}]),Se}(p.Component),ft=vt;function It(se){var ve=se;Object(P.a)(se)==="object"&&(ve=se.transitionSupport);function Se(Q){return!!(Q.motionName&&ve)}var fe=p.forwardRef(function(Q,ae){var q=Q.visible,me=q===void 0?!0:q,ge=Q.removeOnLeave,Ce=ge===void 0?!0:ge,xe=Q.forceRender,De=Q.children,je=Q.motionName,Qe=Q.leavedClassName,Xe=Q.eventProps,et=Se(Q),wt=Object(p.useRef)(),jt=Object(p.useRef)();function Nt(){try{return Object(tt.a)(wt.current||jt.current)}catch(nn){return null}}var Wt=ct(et,me,Nt,Q),Ft=Object(k.a)(Wt,4),kt=Ft[0],Ut=Ft[1],tn=Ft[2],zt=Ft[3],_n=p.useRef(zt);zt&&(_n.current=!0);var un=Object(p.useRef)(ae);un.current=ae;var Tt=p.useCallback(function(nn){wt.current=nn,Object(Te.b)(un.current,nn)},[]),Et,Xt=Object(B.a)(Object(B.a)({},Xe),{},{visible:me});if(!De)Et=null;else if(kt===rt||!Se(Q))zt?Et=De(Object(B.a)({},Xt),Tt):!Ce&&_n.current?Et=De(Object(B.a)(Object(B.a)({},Xt),{},{className:Qe}),Tt):xe?Et=De(Object(B.a)(Object(B.a)({},Xt),{},{style:{display:"none"}}),Tt):Et=null;else{var $t,pt;Ut===gt?pt="prepare":ht(Ut)?pt="active":Ut===Lt&&(pt="start"),Et=De(Object(B.a)(Object(B.a)({},Xt),{},{className:H()(dt(je,kt),($t={},Object(te.a)($t,dt(je,"".concat(kt,"-").concat(pt)),pt),Object(te.a)($t,je,typeof je=="string"),$t)),style:tn}),Tt)}return p.createElement(ft,{ref:jt},Et)});return fe.displayName="CSSMotion",fe}var Rt=It($e),Zt="add",sn="keep",mt="remove",ot="removed";function on(se){var ve;return se&&Object(P.a)(se)==="object"&&"key"in se?ve=se:ve={key:se},Object(B.a)(Object(B.a)({},ve),{},{key:String(ve.key)})}function an(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return se.map(on)}function Vt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Se=[],fe=0,Q=ve.length,ae=an(se),q=an(ve);ae.forEach(function(Ce){for(var xe=!1,De=fe;De<Q;De+=1){var je=q[De];if(je.key===Ce.key){fe<De&&(Se=Se.concat(q.slice(fe,De).map(function(Qe){return Object(B.a)(Object(B.a)({},Qe),{},{status:Zt})})),fe=De),Se.push(Object(B.a)(Object(B.a)({},je),{},{status:sn})),fe+=1,xe=!0;break}}xe||Se.push(Object(B.a)(Object(B.a)({},Ce),{},{status:mt}))}),fe<Q&&(Se=Se.concat(q.slice(fe).map(function(Ce){return Object(B.a)(Object(B.a)({},Ce),{},{status:Zt})})));var me={};Se.forEach(function(Ce){var xe=Ce.key;me[xe]=(me[xe]||0)+1});var ge=Object.keys(me).filter(function(Ce){return me[Ce]>1});return ge.forEach(function(Ce){Se=Se.filter(function(xe){var De=xe.key,je=xe.status;return De!==Ce||je!==mt}),Se.forEach(function(xe){xe.key===Ce&&(xe.status=sn)})}),Se}var Bt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Gt(se){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rt,Se=function(fe){Object(d.a)(ae,fe);var Q=Object(l.a)(ae);function ae(){var q;return Object(x.a)(this,ae),q=Q.apply(this,arguments),q.state={keyEntities:[]},q.removeKey=function(me){q.setState(function(ge){var Ce=ge.keyEntities;return{keyEntities:Ce.map(function(xe){return xe.key!==me?xe:Object(B.a)(Object(B.a)({},xe),{},{status:ot})})}})},q}return Object(E.a)(ae,[{key:"render",value:function(){var me=this,ge=this.state.keyEntities,Ce=this.props,xe=Ce.component,De=Ce.children,je=Ce.onVisibleChanged,Qe=Object(R.a)(Ce,["component","children","onVisibleChanged"]),Xe=xe||p.Fragment,et={};return Bt.forEach(function(wt){et[wt]=Qe[wt],delete Qe[wt]}),delete Qe.keys,p.createElement(Xe,Qe,ge.map(function(wt){var jt=wt.status,Nt=Object(R.a)(wt,["status"]),Wt=jt===Zt||jt===sn;return p.createElement(ve,Object(v.a)({},et,{key:Nt.key,visible:Wt,eventProps:Nt,onVisibleChanged:function(kt){je==null||je(kt,{key:Nt.key}),kt||me.removeKey(Nt.key)}}),De)}))}}],[{key:"getDerivedStateFromProps",value:function(me,ge){var Ce=me.keys,xe=ge.keyEntities,De=an(Ce),je=Vt(xe,De);return{keyEntities:je.filter(function(Qe){var Xe=xe.find(function(et){var wt=et.key;return Qe.key===wt});return!(Xe&&Xe.status===ot&&Qe.status===mt)})}}}]),ae}(p.Component);return Se.defaultProps={component:"div"},Se}var en=Gt($e),qt=Rt;function Mt(se){var ve=se.prefixCls,Se=se.motion,fe=se.animation,Q=se.transitionName;return Se||(fe?{motionName:"".concat(ve,"-").concat(fe)}:Q?{motionName:Q}:null)}function An(se){var ve=se.prefixCls,Se=se.visible,fe=se.zIndex,Q=se.mask,ae=se.maskMotion,q=se.maskAnimation,me=se.maskTransitionName;if(!Q)return null;var ge={};return(ae||me||q)&&(ge=Object(B.a)({motionAppear:!0},Mt({motion:ae,prefixCls:ve,transitionName:me,animation:q}))),p.createElement(qt,Object(v.a)({},ge,{visible:Se,removeOnLeave:!0}),function(Ce){var xe=Ce.className;return p.createElement("div",{style:{zIndex:fe},className:H()("".concat(ve,"-mask"),xe)})})}var jn=M("9mu1"),hi=M("o0o1"),Yn=M.n(hi),Pi=M("HaE+"),ni=["measure","align",null,"motion"],pn=function(se,ve){var Se=Object(p.useState)(null),fe=Object(k.a)(Se,2),Q=fe[0],ae=fe[1],q=Object(p.useRef)(),me=Object(p.useRef)(!1);function ge(De){me.current||ae(De)}function Ce(){Ye.a.cancel(q.current)}function xe(De){Ce(),q.current=Object(Ye.a)(function(){ge(function(je){switch(Q){case"align":return"motion";case"motion":return"stable";default:}return je}),De==null||De()})}return Object(p.useEffect)(function(){ge("measure")},[se]),Object(p.useEffect)(function(){switch(Q){case"measure":ve();break;default:}Q&&(q.current=Object(Ye.a)(Object(Pi.a)(Yn.a.mark(function De(){var je,Qe;return Yn.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:je=ni.indexOf(Q),Qe=ni[je+1],Qe&&je!==-1&&ge(Qe);case 3:case"end":return et.stop()}},De)}))))},[Q]),Object(p.useEffect)(function(){return function(){me.current=!0,Ce()}},[]),[Q,xe]},ii=function(se){var ve=p.useState({width:0,height:0}),Se=Object(k.a)(ve,2),fe=Se[0],Q=Se[1];function ae(me){Q({width:me.offsetWidth,height:me.offsetHeight})}var q=p.useMemo(function(){var me={};if(se){var ge=fe.width,Ce=fe.height;se.indexOf("height")!==-1&&Ce?me.height=Ce:se.indexOf("minHeight")!==-1&&Ce&&(me.minHeight=Ce),se.indexOf("width")!==-1&&ge?me.width=ge:se.indexOf("minWidth")!==-1&&ge&&(me.minWidth=ge)}return me},[se,fe]);return[q,ae]},fi=p.forwardRef(function(se,ve){var Se=se.visible,fe=se.prefixCls,Q=se.className,ae=se.style,q=se.children,me=se.zIndex,ge=se.stretch,Ce=se.destroyPopupOnHide,xe=se.forceRender,De=se.align,je=se.point,Qe=se.getRootDomNode,Xe=se.getClassNameFromAlign,et=se.onAlign,wt=se.onMouseEnter,jt=se.onMouseLeave,Nt=se.onMouseDown,Wt=se.onTouchStart,Ft=Object(p.useRef)(),kt=Object(p.useRef)(),Ut=Object(p.useState)(),tn=Object(k.a)(Ut,2),zt=tn[0],_n=tn[1],un=ii(ge),Tt=Object(k.a)(un,2),Et=Tt[0],Xt=Tt[1];function $t(){ge&&Xt(Qe())}var pt=pn(Se,$t),nn=Object(k.a)(pt,2),gn=nn[0],rn=nn[1],hn=Object(p.useRef)();function yn(){return je||Qe}function Rn(){var Tn;(Tn=Ft.current)===null||Tn===void 0||Tn.forceAlign()}function Un(Tn,Nn){var In=Xe(Nn);zt!==In&&_n(In),gn==="align"&&(zt!==In?Promise.resolve().then(function(){Rn()}):rn(function(){var Cn;(Cn=hn.current)===null||Cn===void 0||Cn.call(hn)}),et==null||et(Tn,Nn))}var En=Object(B.a)({},Mt(se));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Tn){var Nn=En[Tn];En[Tn]=function(In,Cn){return rn(),Nn==null?void 0:Nn(In,Cn)}});function Bn(){return new Promise(function(Tn){hn.current=Tn})}p.useEffect(function(){!En.motionName&&gn==="motion"&&rn()},[En.motionName,gn]),p.useImperativeHandle(ve,function(){return{forceAlign:Rn,getElement:function(){return kt.current}}});var ti=Object(B.a)(Object(B.a)({},Et),{},{zIndex:me,opacity:gn==="motion"||gn==="stable"||!Se?void 0:0,pointerEvents:gn==="stable"?void 0:"none"},ae),Gn=!0;(De==null?void 0:De.points)&&(gn==="align"||gn==="stable")&&(Gn=!1);var zn=q;return p.Children.count(q)>1&&(zn=p.createElement("div",{className:"".concat(fe,"-content")},q)),p.createElement(qt,Object(v.a)({visible:Se,ref:kt,leavedClassName:"".concat(fe,"-hidden")},En,{onAppearPrepare:Bn,onEnterPrepare:Bn,removeOnLeave:Ce,forceRender:xe}),function(Tn,Nn){var In=Tn.className,Cn=Tn.style,_i=H()(fe,Q,zt,In);return p.createElement(jn.a,{target:yn(),key:"popup",ref:Ft,monitorWindowResize:!0,disabled:Gn,align:De,onAlign:Un},p.createElement("div",{ref:Nn,className:_i,onMouseEnter:wt,onMouseLeave:jt,onMouseDownCapture:Nt,onTouchStartCapture:Wt,style:Object(B.a)(Object(B.a)({},Cn),ti)},zn))})});fi.displayName="PopupInner";var Ti=fi,Ue=p.forwardRef(function(se,ve){var Se=se.prefixCls,fe=se.visible,Q=se.zIndex,ae=se.children,q=se.mobile;q=q===void 0?{}:q;var me=q.popupClassName,ge=q.popupStyle,Ce=q.popupMotion,xe=Ce===void 0?{}:Ce,De=q.popupRender,je=p.useRef();p.useImperativeHandle(ve,function(){return{forceAlign:function(){},getElement:function(){return je.current}}});var Qe=Object(B.a)({zIndex:Q},ge),Xe=ae;return p.Children.count(ae)>1&&(Xe=p.createElement("div",{className:"".concat(Se,"-content")},ae)),De&&(Xe=De(Xe)),p.createElement(qt,Object(v.a)({visible:fe,ref:je,removeOnLeave:!0},xe),function(et,wt){var jt=et.className,Nt=et.style,Wt=H()(Se,me,jt);return p.createElement("div",{ref:wt,className:Wt,style:Object(B.a)(Object(B.a)({},Nt),Qe)},Xe)})});Ue.displayName="MobilePopupInner";var Fn=Ue,ri=["visible","mobile"],qn=p.forwardRef(function(se,ve){var Se=se.visible,fe=se.mobile,Q=Object(R.a)(se,ri),ae=Object(p.useState)(Se),q=Object(k.a)(ae,2),me=q[0],ge=q[1],Ce=Object(p.useState)(!1),xe=Object(k.a)(Ce,2),De=xe[0],je=xe[1],Qe=Object(B.a)(Object(B.a)({},Q),{},{visible:me});Object(p.useEffect)(function(){ge(Se),Se&&fe&&je(z())},[Se,fe]);var Xe=De?p.createElement(Fn,Object(v.a)({},Qe,{mobile:fe,ref:ve})):p.createElement(Ti,Object(v.a)({},Qe,{ref:ve}));return p.createElement("div",null,p.createElement(An,Qe),Xe)});qn.displayName="Popup";var Qi=qn,Mi=p.createContext(null),xn=Mi;function Xn(){}function ai(){return""}function Zi(se){return se?se.ownerDocument:window.document}var Si=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function qi(se){var ve=function(Se){Object(d.a)(Q,Se);var fe=Object(l.a)(Q);function Q(ae){var q;Object(x.a)(this,Q),q=fe.call(this,ae),q.popupRef=p.createRef(),q.triggerRef=p.createRef(),q.attachId=void 0,q.clickOutsideHandler=void 0,q.touchOutsideHandler=void 0,q.contextMenuOutsideHandler1=void 0,q.contextMenuOutsideHandler2=void 0,q.mouseDownTimeout=void 0,q.focusTime=void 0,q.preClickTime=void 0,q.preTouchTime=void 0,q.delayTimer=void 0,q.hasPopupMouseDown=void 0,q.onMouseEnter=function(ge){var Ce=q.props.mouseEnterDelay;q.fireEvents("onMouseEnter",ge),q.delaySetPopupVisible(!0,Ce,Ce?null:ge)},q.onMouseMove=function(ge){q.fireEvents("onMouseMove",ge),q.setPoint(ge)},q.onMouseLeave=function(ge){q.fireEvents("onMouseLeave",ge),q.delaySetPopupVisible(!1,q.props.mouseLeaveDelay)},q.onPopupMouseEnter=function(){q.clearDelayTimer()},q.onPopupMouseLeave=function(ge){var Ce;if(ge.relatedTarget&&!ge.relatedTarget.setTimeout&&Object(it.a)((Ce=q.popupRef.current)===null||Ce===void 0?void 0:Ce.getElement(),ge.relatedTarget))return;q.delaySetPopupVisible(!1,q.props.mouseLeaveDelay)},q.onFocus=function(ge){q.fireEvents("onFocus",ge),q.clearDelayTimer(),q.isFocusToShow()&&(q.focusTime=Date.now(),q.delaySetPopupVisible(!0,q.props.focusDelay))},q.onMouseDown=function(ge){q.fireEvents("onMouseDown",ge),q.preClickTime=Date.now()},q.onTouchStart=function(ge){q.fireEvents("onTouchStart",ge),q.preTouchTime=Date.now()},q.onBlur=function(ge){q.fireEvents("onBlur",ge),q.clearDelayTimer(),q.isBlurToHide()&&q.delaySetPopupVisible(!1,q.props.blurDelay)},q.onContextMenu=function(ge){ge.preventDefault(),q.fireEvents("onContextMenu",ge),q.setPopupVisible(!0,ge)},q.onContextMenuClose=function(){q.isContextMenuToShow()&&q.close()},q.onClick=function(ge){if(q.fireEvents("onClick",ge),q.focusTime){var Ce;if(q.preClickTime&&q.preTouchTime?Ce=Math.min(q.preClickTime,q.preTouchTime):q.preClickTime?Ce=q.preClickTime:q.preTouchTime&&(Ce=q.preTouchTime),Math.abs(Ce-q.focusTime)<20)return;q.focusTime=0}q.preClickTime=0,q.preTouchTime=0,q.isClickToShow()&&(q.isClickToHide()||q.isBlurToHide())&&ge&&ge.preventDefault&&ge.preventDefault();var xe=!q.state.popupVisible;(q.isClickToHide()&&!xe||xe&&q.isClickToShow())&&q.setPopupVisible(!q.state.popupVisible,ge)},q.onPopupMouseDown=function(){if(q.hasPopupMouseDown=!0,clearTimeout(q.mouseDownTimeout),q.mouseDownTimeout=window.setTimeout(function(){q.hasPopupMouseDown=!1},0),q.context){var ge;(ge=q.context).onPopupMouseDown.apply(ge,arguments)}},q.onDocumentClick=function(ge){if(q.props.mask&&!q.props.maskClosable)return;var Ce=ge.target,xe=q.getRootDomNode(),De=q.getPopupDomNode();(!Object(it.a)(xe,Ce)||q.isContextMenuOnly())&&!Object(it.a)(De,Ce)&&!q.hasPopupMouseDown&&q.close()},q.getRootDomNode=function(){var ge=q.props.getTriggerDOMNode;if(ge)return ge(q.triggerRef.current);try{var Ce=Object(tt.a)(q.triggerRef.current);if(Ce)return Ce}catch(xe){}return Ze.a.findDOMNode(Object(h.a)(q))},q.getPopupClassNameFromAlign=function(ge){var Ce=[],xe=q.props,De=xe.popupPlacement,je=xe.builtinPlacements,Qe=xe.prefixCls,Xe=xe.alignPoint,et=xe.getPopupClassNameFromAlign;return De&&je&&Ce.push(K(je,Qe,ge,Xe)),et&&Ce.push(et(ge)),Ce.join(" ")},q.getComponent=function(){var ge=q.props,Ce=ge.prefixCls,xe=ge.destroyPopupOnHide,De=ge.popupClassName,je=ge.onPopupAlign,Qe=ge.popupMotion,Xe=ge.popupAnimation,et=ge.popupTransitionName,wt=ge.popupStyle,jt=ge.mask,Nt=ge.maskAnimation,Wt=ge.maskTransitionName,Ft=ge.maskMotion,kt=ge.zIndex,Ut=ge.popup,tn=ge.stretch,zt=ge.alignPoint,_n=ge.mobile,un=ge.forceRender,Tt=q.state,Et=Tt.popupVisible,Xt=Tt.point,$t=q.getPopupAlign(),pt={};return q.isMouseEnterToShow()&&(pt.onMouseEnter=q.onPopupMouseEnter),q.isMouseLeaveToHide()&&(pt.onMouseLeave=q.onPopupMouseLeave),pt.onMouseDown=q.onPopupMouseDown,pt.onTouchStart=q.onPopupMouseDown,p.createElement(Qi,Object(v.a)({prefixCls:Ce,destroyPopupOnHide:xe,visible:Et,point:zt&&Xt,className:De,align:$t,onAlign:je,animation:Xe,getClassNameFromAlign:q.getPopupClassNameFromAlign},pt,{stretch:tn,getRootDomNode:q.getRootDomNode,style:wt,mask:jt,zIndex:kt,transitionName:et,maskAnimation:Nt,maskTransitionName:Wt,maskMotion:Ft,ref:q.popupRef,motion:Qe,mobile:_n,forceRender:un}),typeof Ut=="function"?Ut():Ut)},q.attachParent=function(ge){Ye.a.cancel(q.attachId);var Ce=q.props,xe=Ce.getPopupContainer,De=Ce.getDocument,je=q.getRootDomNode(),Qe;xe?(je||xe.length===0)&&(Qe=xe(je)):Qe=De(q.getRootDomNode()).body,Qe?Qe.appendChild(ge):q.attachId=Object(Ye.a)(function(){q.attachParent(ge)})},q.getContainer=function(){var ge=q.props.getDocument,Ce=ge(q.getRootDomNode()).createElement("div");return Ce.style.position="absolute",Ce.style.top="0",Ce.style.left="0",Ce.style.width="100%",q.attachParent(Ce),Ce},q.setPoint=function(ge){var Ce=q.props.alignPoint;if(!Ce||!ge)return;q.setState({point:{pageX:ge.pageX,pageY:ge.pageY}})},q.handlePortalUpdate=function(){q.state.prevPopupVisible!==q.state.popupVisible&&q.props.afterPopupVisibleChange(q.state.popupVisible)},q.triggerContextValue={onPopupMouseDown:q.onPopupMouseDown};var me;return"popupVisible"in ae?me=!!ae.popupVisible:me=!!ae.defaultPopupVisible,q.state={prevPopupVisible:me,popupVisible:me},Si.forEach(function(ge){q["fire".concat(ge)]=function(Ce){q.fireEvents(ge,Ce)}}),q}return Object(E.a)(Q,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var q=this.props,me=this.state;if(me.popupVisible){var ge;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(ge=q.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(ge,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(ge=ge||q.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(ge,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(ge=ge||q.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(ge,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ie.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ye.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var q;return((q=this.popupRef.current)===null||q===void 0?void 0:q.getElement())||null}},{key:"getPopupAlign",value:function(){var q=this.props,me=q.popupPlacement,ge=q.popupAlign,Ce=q.builtinPlacements;return me&&Ce?$(Ce,me,ge):ge}},{key:"setPopupVisible",value:function(q,me){var ge=this.props.alignPoint,Ce=this.state.popupVisible;this.clearDelayTimer(),Ce!==q&&("popupVisible"in this.props||this.setState({popupVisible:q,prevPopupVisible:Ce}),this.props.onPopupVisibleChange(q)),ge&&me&&q&&this.setPoint(me)}},{key:"delaySetPopupVisible",value:function(q,me,ge){var Ce=this,xe=me*1e3;if(this.clearDelayTimer(),xe){var De=ge?{pageX:ge.pageX,pageY:ge.pageY}:null;this.delayTimer=window.setTimeout(function(){Ce.setPopupVisible(q,De),Ce.clearDelayTimer()},xe)}else this.setPopupVisible(q,ge)}},{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(q){var me=this.props.children.props,ge=this.props;return me[q]&&ge[q]?this["fire".concat(q)]:me[q]||ge[q]}},{key:"isClickToShow",value:function(){var q=this.props,me=q.action,ge=q.showAction;return me.indexOf("click")!==-1||ge.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var q=this.props.action;return q==="contextMenu"||q.length===1&&q[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var q=this.props,me=q.action,ge=q.showAction;return me.indexOf("contextMenu")!==-1||ge.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var q=this.props,me=q.action,ge=q.hideAction;return me.indexOf("click")!==-1||ge.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var q=this.props,me=q.action,ge=q.showAction;return me.indexOf("hover")!==-1||ge.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var q=this.props,me=q.action,ge=q.hideAction;return me.indexOf("hover")!==-1||ge.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var q=this.props,me=q.action,ge=q.showAction;return me.indexOf("focus")!==-1||ge.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var q=this.props,me=q.action,ge=q.hideAction;return me.indexOf("focus")!==-1||ge.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var q;(q=this.popupRef.current)===null||q===void 0||q.forceAlign()}}},{key:"fireEvents",value:function(q,me){var ge=this.props.children.props[q];ge&&ge(me);var Ce=this.props[q];Ce&&Ce(me)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var q=this.state.popupVisible,me=this.props,ge=me.children,Ce=me.forceRender,xe=me.alignPoint,De=me.className,je=me.autoDestroy,Qe=p.Children.only(ge),Xe={key:"trigger"};this.isContextMenuToShow()?Xe.onContextMenu=this.onContextMenu:Xe.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Xe.onClick=this.onClick,Xe.onMouseDown=this.onMouseDown,Xe.onTouchStart=this.onTouchStart):(Xe.onClick=this.createTwoChains("onClick"),Xe.onMouseDown=this.createTwoChains("onMouseDown"),Xe.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Xe.onMouseEnter=this.onMouseEnter,xe&&(Xe.onMouseMove=this.onMouseMove)):Xe.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Xe.onMouseLeave=this.onMouseLeave:Xe.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Xe.onFocus=this.onFocus,Xe.onBlur=this.onBlur):(Xe.onFocus=this.createTwoChains("onFocus"),Xe.onBlur=this.createTwoChains("onBlur"));var et=H()(Qe&&Qe.props&&Qe.props.className,De);et&&(Xe.className=et);var wt=Object(B.a)({},Xe);Object(Te.c)(Qe)&&(wt.ref=Object(Te.a)(this.triggerRef,Qe.ref));var jt=p.cloneElement(Qe,wt),Nt;return(q||this.popupRef.current||Ce)&&(Nt=p.createElement(se,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!q&&je&&(Nt=null),p.createElement(xn.Provider,{value:this.triggerContextValue},jt,Nt)}}],[{key:"getDerivedStateFromProps",value:function(q,me){var ge=q.popupVisible,Ce={};return ge!==void 0&&me.popupVisible!==ge&&(Ce.popupVisible=ge,Ce.prevPopupVisible=me.popupVisible),Ce}}]),Q}(p.Component);return ve.contextType=xn,ve.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ai,getDocument:Zi,onPopupVisibleChange:Xn,afterPopupVisibleChange:Xn,onPopupAlign:Xn,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},ve}var Ni=qi(ke.a),Hn={adjustX:1,adjustY:1},pi={topLeft:{points:["bl","tl"],overflow:Hn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Hn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Hn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Hn,offset:[4,0]}},ki={topLeft:{points:["bl","tl"],overflow:Hn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Hn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Hn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Hn,offset:[4,0]}},mi=pi,Ln=0,Pn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},kn=function(ve,Se,fe){var Q=le(Se),ae=ve.getState();ve.setState({defaultActiveFirst:Object(B.a)(Object(B.a)({},ae.defaultActiveFirst),{},Object(te.a)({},Q,fe))})},Ci=function(se){Object(d.a)(Se,se);var ve=Object(l.a)(Se);function Se(fe){var Q;Object(x.a)(this,Se),Q=ve.call(this,fe),Q.onDestroy=function(xe){Q.props.onDestroy(xe)},Q.onKeyDown=function(xe){var De=xe.keyCode,je=Q.menuInstance,Qe=Q.props.store,Xe=Q.getVisible();if(De===o.a.ENTER)return Q.onTitleClick(xe),kn(Qe,Q.props.eventKey,!0),!0;if(De===o.a.RIGHT)return Xe?je.onKeyDown(xe):(Q.triggerOpenChange(!0),kn(Qe,Q.props.eventKey,!0)),!0;if(De===o.a.LEFT){var et;if(Xe)et=je.onKeyDown(xe);else return;return et||(Q.triggerOpenChange(!1),et=!0),et}return Xe&&(De===o.a.UP||De===o.a.DOWN)?je.onKeyDown(xe):void 0},Q.onOpenChange=function(xe){Q.props.onOpenChange(xe)},Q.onPopupVisibleChange=function(xe){Q.triggerOpenChange(xe,xe?"mouseenter":"mouseleave")},Q.onMouseEnter=function(xe){var De=Q.props,je=De.eventKey,Qe=De.onMouseEnter,Xe=De.store;kn(Xe,Q.props.eventKey,!1),Qe({key:je,domEvent:xe})},Q.onMouseLeave=function(xe){var De=Q.props,je=De.parentMenu,Qe=De.eventKey,Xe=De.onMouseLeave;je.subMenuInstance=Object(h.a)(Q),Xe({key:Qe,domEvent:xe})},Q.onTitleMouseEnter=function(xe){var De=Q.props,je=De.eventKey,Qe=De.onItemHover,Xe=De.onTitleMouseEnter;Qe({key:je,hover:!0}),Xe({key:je,domEvent:xe})},Q.onTitleMouseLeave=function(xe){var De=Q.props,je=De.parentMenu,Qe=De.eventKey,Xe=De.onItemHover,et=De.onTitleMouseLeave;je.subMenuInstance=Object(h.a)(Q),Xe({key:Qe,hover:!1}),et({key:Qe,domEvent:xe})},Q.onTitleClick=function(xe){var De=Object(h.a)(Q),je=De.props;if(je.onTitleClick({key:je.eventKey,domEvent:xe}),je.triggerSubMenuAction==="hover")return;Q.triggerOpenChange(!Q.getVisible(),"click"),kn(je.store,Q.props.eventKey,!1)},Q.onSubMenuClick=function(xe){typeof Q.props.onClick=="function"&&Q.props.onClick(Q.addKeyPath(xe))},Q.onSelect=function(xe){Q.props.onSelect(xe)},Q.onDeselect=function(xe){Q.props.onDeselect(xe)},Q.getPrefixCls=function(){return"".concat(Q.props.rootPrefixCls,"-submenu")},Q.getActiveClassName=function(){return"".concat(Q.getPrefixCls(),"-active")},Q.getDisabledClassName=function(){return"".concat(Q.getPrefixCls(),"-disabled")},Q.getSelectedClassName=function(){return"".concat(Q.getPrefixCls(),"-selected")},Q.getOpenClassName=function(){return"".concat(Q.props.rootPrefixCls,"-submenu-open")},Q.getVisible=function(){return Q.state.isOpen},Q.getMode=function(){return Q.state.mode},Q.saveMenuInstance=function(xe){Q.menuInstance=xe},Q.addKeyPath=function(xe){return Object(B.a)(Object(B.a)({},xe),{},{keyPath:(xe.keyPath||[]).concat(Q.props.eventKey)})},Q.triggerOpenChange=function(xe,De){var je=Q.props.eventKey,Qe=function(){Q.onOpenChange({key:je,item:Object(h.a)(Q),trigger:De,open:xe})};De==="mouseenter"?Q.mouseenterTimeout=setTimeout(function(){Qe()},0):Qe()},Q.isChildrenSelected=function(){var xe={find:!1};return Me(Q.props.children,Q.props.selectedKeys,xe),xe.find},Q.isInlineMode=function(){return Q.getMode()==="inline"},Q.adjustWidth=function(){if(!Q.subMenuTitle||!Q.menuInstance)return;var xe=ze.findDOMNode(Q.menuInstance);if(xe.offsetWidth>=Q.subMenuTitle.offsetWidth)return;xe.style.minWidth="".concat(Q.subMenuTitle.offsetWidth,"px")},Q.saveSubMenuTitle=function(xe){Q.subMenuTitle=xe},Q.getBaseProps=function(){var xe=Object(h.a)(Q),De=xe.props,je=Q.getMode();return{mode:je==="horizontal"?"vertical":je,visible:Q.getVisible(),level:De.level+1,inlineIndent:De.inlineIndent,focusable:!1,onClick:Q.onSubMenuClick,onSelect:Q.onSelect,onDeselect:Q.onDeselect,onDestroy:Q.onDestroy,selectedKeys:De.selectedKeys,eventKey:"".concat(De.eventKey,"-menu-"),openKeys:De.openKeys,motion:De.motion,onOpenChange:Q.onOpenChange,subMenuOpenDelay:De.subMenuOpenDelay,parentMenu:Object(h.a)(Q),subMenuCloseDelay:De.subMenuCloseDelay,forceSubMenuRender:De.forceSubMenuRender,triggerSubMenuAction:De.triggerSubMenuAction,builtinPlacements:De.builtinPlacements,defaultActiveFirst:De.store.getState().defaultActiveFirst[le(De.eventKey)],multiple:De.multiple,prefixCls:De.rootPrefixCls,id:Q.internalMenuId,manualRef:Q.saveMenuInstance,itemIcon:De.itemIcon,expandIcon:De.expandIcon,direction:De.direction}},Q.getMotion=function(xe,De){var je=Object(h.a)(Q),Qe=je.haveRendered,Xe=Q.props,et=Xe.motion,wt=Xe.rootPrefixCls,jt=Object(B.a)(Object(B.a)({},et),{},{leavedClassName:"".concat(wt,"-hidden"),removeOnLeave:!1,motionAppear:Qe||!De||xe!=="inline"});return jt};var ae=fe.store,q=fe.eventKey,me=ae.getState(),ge=me.defaultActiveFirst;Q.isRootMenu=!1;var Ce=!1;return ge&&(Ce=ge[q]),kn(ae,q,Ce),Q.state={mode:fe.mode,isOpen:fe.isOpen},Q}return Object(E.a)(Se,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Q=this,ae=this.props,q=ae.mode,me=ae.parentMenu,ge=ae.manualRef,Ce=ae.isOpen,xe=function(){Q.setState({mode:q,isOpen:Ce})},De=Ce!==this.state.isOpen,je=q!==this.state.mode;if((je||De)&&(Ye.a.cancel(this.updateStateRaf),je?this.updateStateRaf=Object(Ye.a)(xe):xe()),ge&&ge(this),q!=="horizontal"||!(me==null?void 0:me.isRootMenu)||!Ce)return;this.minWidthTimeout=setTimeout(function(){return Q.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Q=this.props,ae=Q.onDestroy,q=Q.eventKey;ae&&ae(q),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Ye.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Q,ae){var q=this.getBaseProps();return p.createElement(li,Object(v.a)({},q,{id:this.internalMenuId,className:Q,style:ae}),this.props.children)}},{key:"renderChildren",value:function(){var Q=this,ae=this.getBaseProps(),q=ae.mode,me=ae.visible,ge=ae.forceSubMenuRender,Ce=ae.direction,xe=this.getMotion(q,me);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||me||ge,!this.haveOpened)return p.createElement("div",null);var De=H()("".concat(ae.prefixCls,"-sub"),Object(te.a)({},"".concat(ae.prefixCls,"-rtl"),Ce==="rtl"));return this.isInlineMode()?p.createElement(qt,Object(v.a)({visible:ae.visible,forceRender:ge},xe),function(je){var Qe=je.className,Xe=je.style,et=H()(De,Qe);return Q.renderPopupMenu(et,Xe)}):this.renderPopupMenu(De)}},{key:"render",value:function(){var Q,ae,q,me=Object(B.a)({},this.props),ge=this.getVisible(),Ce=this.getPrefixCls(),xe=this.isInlineMode(),De=this.getMode(),je=H()(Ce,"".concat(Ce,"-").concat(De),(Q={},Object(te.a)(Q,me.className,!!me.className),Object(te.a)(Q,this.getOpenClassName(),ge),Object(te.a)(Q,this.getActiveClassName(),me.active||ge&&!xe),Object(te.a)(Q,this.getDisabledClassName(),me.disabled),Object(te.a)(Q,this.getSelectedClassName(),this.isChildrenSelected()),Q));this.internalMenuId||(me.eventKey?this.internalMenuId="".concat(me.eventKey,"$Menu"):(Ln+=1,this.internalMenuId="$__$".concat(Ln,"$Menu")));var Qe={},Xe={},et={};me.disabled||(Qe={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Xe={onClick:this.onTitleClick},et={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var wt={},jt=me.direction,Nt=jt==="rtl";xe&&(Nt?wt.paddingRight=me.inlineIndent*me.level:wt.paddingLeft=me.inlineIndent*me.level);var Wt={};this.getVisible()&&(Wt={"aria-owns":this.internalMenuId});var Ft=null;De!=="horizontal"&&(Ft=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Ft=p.createElement(this.props.expandIcon,Object(B.a)({},this.props))));var kt=p.createElement("div",Object(v.a)({ref:this.saveSubMenuTitle,style:wt,className:"".concat(Ce,"-title"),role:"button"},et,Xe,{"aria-expanded":ge},Wt,{"aria-haspopup":"true",title:typeof me.title=="string"?me.title:void 0}),me.title,Ft||p.createElement("i",{className:"".concat(Ce,"-arrow")})),Ut=this.renderChildren(),tn=((ae=me.parentMenu)===null||ae===void 0?void 0:ae.isRootMenu)?me.parentMenu.props.getPopupContainer:function(yn){return yn.parentNode},zt=Pn[De],_n=me.popupOffset?{offset:me.popupOffset}:{},un=H()((q={},Object(te.a)(q,me.popupClassName,me.popupClassName&&!xe),Object(te.a)(q,"".concat(Ce,"-rtl"),Nt),q)),Tt=me.disabled,Et=me.triggerSubMenuAction,Xt=me.subMenuOpenDelay,$t=me.forceSubMenuRender,pt=me.subMenuCloseDelay,nn=me.builtinPlacements;ie.forEach(function(yn){return delete me[yn]}),delete me.onClick;var gn=Nt?Object(B.a)(Object(B.a)({},ki),nn):Object(B.a)(Object(B.a)({},pi),nn);delete me.direction;var rn=this.getBaseProps(),hn=xe?null:this.getMotion(rn.mode,rn.visible);return p.createElement("li",Object(v.a)({},me,Qe,{className:je,role:"menuitem"}),p.createElement(Ni,{prefixCls:Ce,popupClassName:H()("".concat(Ce,"-popup"),un),getPopupContainer:tn,builtinPlacements:gn,popupPlacement:zt,popupVisible:xe?!1:ge,popupAlign:_n,popup:xe?null:Ut,action:Tt||xe?[]:[Et],mouseEnterDelay:Xt,mouseLeaveDelay:pt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:$t,popupMotion:hn},kt),xe?Ut:null)}}]),Se}(p.Component);Ci.defaultProps={onMouseEnter:V,onMouseLeave:V,onTitleMouseEnter:V,onTitleMouseLeave:V,onTitleClick:V,manualRef:V,mode:"vertical",title:""};var si=Object(c.b)(function(se,ve){var Se=se.openKeys,fe=se.activeKey,Q=se.selectedKeys,ae=ve.eventKey,q=ve.subMenuKey;return{isOpen:Se.indexOf(ae)>-1,active:fe[q]===ae,selectedKeys:Q}})(Ci);si.isSubMenu=!0;var $n=si,Ui="menuitem-overflowed",Bi=.5,ji=function(se){Object(d.a)(Se,se);var ve=Object(l.a)(Se);function Se(){var fe;return Object(x.a)(this,Se),fe=ve.apply(this,arguments),fe.resizeObserver=null,fe.mutationObserver=null,fe.originalTotalWidth=0,fe.overflowedItems=[],fe.menuItemSizes=[],fe.cancelFrameId=null,fe.state={lastVisibleIndex:void 0},fe.childRef=p.createRef(),fe.getMenuItemNodes=function(){var Q=fe.props.prefixCls,ae=fe.childRef.current;return ae?[].slice.call(ae.children).filter(function(q){return q.className.split(" ").indexOf("".concat(Q,"-overflowed-submenu"))<0}):[]},fe.getOverflowedSubMenuItem=function(Q,ae,q){var me=fe.props,ge=me.overflowedIndicator,Ce=me.level,xe=me.mode,De=me.prefixCls,je=me.theme;if(Ce!==1||xe!=="horizontal")return null;var Qe=fe.props.children[0],Xe=Qe.props,et=Xe.children,wt=Xe.title,jt=Xe.style,Nt=Object(R.a)(Xe,["children","title","style"]),Wt=Object(B.a)({},jt),Ft="".concat(Q,"-overflowed-indicator"),kt="".concat(Q,"-overflowed-indicator");ae.length===0&&q!==!0?Wt=Object(B.a)(Object(B.a)({},Wt),{},{display:"none"}):q&&(Wt=Object(B.a)(Object(B.a)({},Wt),{},{visibility:"hidden",position:"absolute"}),Ft="".concat(Ft,"-placeholder"),kt="".concat(kt,"-placeholder"));var Ut=je?"".concat(De,"-").concat(je):"",tn={};return ie.forEach(function(zt){Nt[zt]!==void 0&&(tn[zt]=Nt[zt])}),p.createElement($n,Object(v.a)({title:ge,className:"".concat(De,"-overflowed-submenu"),popupClassName:Ut},tn,{key:Ft,eventKey:kt,disabled:!1,style:Wt}),ae)},fe.setChildrenWidthAndResize=function(){if(fe.props.mode!=="horizontal")return;var Q=fe.childRef.current;if(!Q)return;var ae=Q.children;if(!ae||ae.length===0)return;var q=Q.children[ae.length-1];_e(q,"display","inline-block");var me=fe.getMenuItemNodes(),ge=me.filter(function(Ce){return Ce.className.split(" ").indexOf(Ui)>=0});ge.forEach(function(Ce){_e(Ce,"display","inline-block")}),fe.menuItemSizes=me.map(function(Ce){return pe(Ce,!0)}),ge.forEach(function(Ce){_e(Ce,"display","none")}),fe.overflowedIndicatorWidth=pe(Q.children[Q.children.length-1],!0),fe.originalTotalWidth=fe.menuItemSizes.reduce(function(Ce,xe){return Ce+xe},0),fe.handleResize(),_e(q,"display","none")},fe.handleResize=function(){if(fe.props.mode!=="horizontal")return;var Q=fe.childRef.current;if(!Q)return;var ae=pe(Q);fe.overflowedItems=[];var q=0,me;fe.originalTotalWidth>ae+Bi&&(me=-1,fe.menuItemSizes.forEach(function(ge){q+=ge,q+fe.overflowedIndicatorWidth<=ae&&(me+=1)})),fe.setState({lastVisibleIndex:me})},fe}return Object(E.a)(Se,[{key:"componentDidMount",value:function(){var Q=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ae=this.childRef.current;if(!ae)return;this.resizeObserver=new Ke.default(function(q){q.forEach(function(){var me=Q.cancelFrameId;cancelAnimationFrame(me),Q.cancelFrameId=requestAnimationFrame(Q.setChildrenWidthAndResize)})}),[].slice.call(ae.children).concat(ae).forEach(function(q){Q.resizeObserver.observe(q)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Q.resizeObserver.disconnect(),[].slice.call(ae.children).concat(ae).forEach(function(q){Q.resizeObserver.observe(q)}),Q.setChildrenWidthAndResize()}),this.mutationObserver.observe(ae,{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(Q){var ae=this,q=this.state.lastVisibleIndex;return(Q||[]).reduce(function(me,ge,Ce){var xe=ge;if(ae.props.mode==="horizontal"){var De=ae.getOverflowedSubMenuItem(ge.props.eventKey,[]);q!==void 0&&ae.props.className.indexOf("".concat(ae.props.prefixCls,"-root"))!==-1&&(Ce>q&&(xe=p.cloneElement(ge,{style:{display:"none"},eventKey:"".concat(ge.props.eventKey,"-hidden"),className:"".concat(Ui)})),Ce===q+1&&(ae.overflowedItems=Q.slice(q+1).map(function(Qe){return p.cloneElement(Qe,{key:Qe.props.eventKey,mode:"vertical-left"})}),De=ae.getOverflowedSubMenuItem(ge.props.eventKey,ae.overflowedItems)));var je=[].concat(Object(A.a)(me),[De,xe]);return Ce===Q.length-1&&je.push(ae.getOverflowedSubMenuItem(ge.props.eventKey,[],!0)),je}return[].concat(Object(A.a)(me),[xe])},[])}},{key:"render",value:function(){var Q=this.props,ae=Q.visible,q=Q.prefixCls,me=Q.overflowedIndicator,ge=Q.mode,Ce=Q.level,xe=Q.tag,De=Q.children,je=Q.theme,Qe=Object(R.a)(Q,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Xe=xe;return p.createElement(Xe,Object(v.a)({ref:this.childRef},Qe),this.renderChildren(De))}}]),Se}(p.Component);ji.defaultProps={tag:"div",className:""};var gi=ji;function vi(se){return se.length?se.every(function(ve){return!!ve.props.disabled}):!0}function Wn(se,ve,Se){var fe=se.getState();se.setState({activeKey:Object(B.a)(Object(B.a)({},fe.activeKey),{},Object(te.a)({},ve,Se))})}function Jn(se){return se.eventKey||"0-menu-"}function oi(se,ve){var Se=ve,fe=se.children,Q=se.eventKey;if(Se){var ae;if(Oe(fe,function(q,me){q&&q.props&&!q.props.disabled&&Se===U(q,Q,me)&&(ae=!0)}),ae)return Se}return Se=null,se.defaultActiveFirst&&Oe(fe,function(q,me){!Se&&q&&!q.props.disabled&&(Se=U(q,Q,me))}),Se}function Qn(se){if(!se)return;var ve=this.instanceArray.indexOf(se);ve!==-1?this.instanceArray[ve]=se:this.instanceArray.push(se)}var Fi=function(se){Object(d.a)(Se,se);var ve=Object(l.a)(Se);function Se(fe){var Q;return Object(x.a)(this,Se),Q=ve.call(this,fe),Q.onKeyDown=function(ae,q){var me=ae.keyCode,ge;if(Q.getFlatInstanceArray().forEach(function(xe){xe&&xe.props.active&&xe.onKeyDown&&(ge=xe.onKeyDown(ae))}),ge)return 1;var Ce=null;return(me===o.a.UP||me===o.a.DOWN)&&(Ce=Q.step(me===o.a.UP?-1:1)),Ce?(ae.preventDefault(),Wn(Q.props.store,Jn(Q.props),Ce.props.eventKey),typeof q=="function"&&q(Ce),1):void 0},Q.onItemHover=function(ae){var q=ae.key,me=ae.hover;Wn(Q.props.store,Jn(Q.props),me?q:null)},Q.onDeselect=function(ae){Q.props.onDeselect(ae)},Q.onSelect=function(ae){Q.props.onSelect(ae)},Q.onClick=function(ae){Q.props.onClick(ae)},Q.onOpenChange=function(ae){Q.props.onOpenChange(ae)},Q.onDestroy=function(ae){Q.props.onDestroy(ae)},Q.getFlatInstanceArray=function(){return Q.instanceArray},Q.step=function(ae){var q=Q.getFlatInstanceArray(),me=Q.props.store.getState().activeKey[Jn(Q.props)],ge=q.length;if(!ge)return null;ae<0&&(q=q.concat().reverse());var Ce=-1;if(q.every(function(Qe,Xe){return Qe&&Qe.props.eventKey===me?(Ce=Xe,!1):!0}),!Q.props.defaultActiveFirst&&Ce!==-1&&vi(q.slice(Ce,ge-1)))return;var xe=(Ce+1)%ge,De=xe;do{var je=q[De];if(!je||je.props.disabled)De=(De+1)%ge;else return je}while(De!==xe);return null},Q.renderCommonMenuItem=function(ae,q,me){var ge=Q.props.store.getState(),Ce=Object(h.a)(Q),xe=Ce.props,De=U(ae,xe.eventKey,q),je=ae.props;if(!je||typeof ae.type=="string")return ae;var Qe=De===ge.activeKey,Xe=Object(B.a)(Object(B.a)({mode:je.mode||xe.mode,level:xe.level,inlineIndent:xe.inlineIndent,renderMenuItem:Q.renderMenuItem,rootPrefixCls:xe.prefixCls,index:q,parentMenu:xe.parentMenu,manualRef:je.disabled?void 0:Object(f.a)(ae.ref,Qn.bind(Object(h.a)(Q))),eventKey:De,active:!je.disabled&&Qe,multiple:xe.multiple,onClick:function(wt){(je.onClick||V)(wt),Q.onClick(wt)},onItemHover:Q.onItemHover,motion:xe.motion,subMenuOpenDelay:xe.subMenuOpenDelay,subMenuCloseDelay:xe.subMenuCloseDelay,forceSubMenuRender:xe.forceSubMenuRender,onOpenChange:Q.onOpenChange,onDeselect:Q.onDeselect,onSelect:Q.onSelect,builtinPlacements:xe.builtinPlacements,itemIcon:je.itemIcon||Q.props.itemIcon,expandIcon:je.expandIcon||Q.props.expandIcon},me),{},{direction:xe.direction});return(xe.mode==="inline"||Ae())&&(Xe.triggerSubMenuAction="click"),p.cloneElement(ae,Object(B.a)(Object(B.a)({},Xe),{},{key:De||q}))},Q.renderMenuItem=function(ae,q,me){if(!ae)return null;var ge=Q.props.store.getState(),Ce={openKeys:ge.openKeys,selectedKeys:ge.selectedKeys,triggerSubMenuAction:Q.props.triggerSubMenuAction,subMenuKey:me};return Q.renderCommonMenuItem(ae,q,Ce)},fe.store.setState({activeKey:Object(B.a)(Object(B.a)({},fe.store.getState().activeKey),{},Object(te.a)({},fe.eventKey,oi(fe,fe.activeKey)))}),Q.instanceArray=[],Q}return Object(E.a)(Se,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Q){return this.props.visible||Q.visible||this.props.className!==Q.className||!I()(this.props.style,Q.style)}},{key:"componentDidUpdate",value:function(Q){var ae=this.props,q="activeKey"in ae?ae.activeKey:ae.store.getState().activeKey[Jn(ae)],me=oi(ae,q);if(me!==q)Wn(ae.store,Jn(ae),me);else if("activeKey"in Q){var ge=oi(Q,Q.activeKey);me!==ge&&Wn(ae.store,Jn(ae),me)}}},{key:"render",value:function(){var Q=this,ae=Object(v.a)({},this.props);this.instanceArray=[];var q=H()(ae.prefixCls,ae.className,"".concat(ae.prefixCls,"-").concat(ae.mode)),me={className:q,role:ae.role||"menu"};ae.id&&(me.id=ae.id),ae.focusable&&(me.tabIndex=0,me.onKeyDown=this.onKeyDown);var ge=ae.prefixCls,Ce=ae.eventKey,xe=ae.visible,De=ae.level,je=ae.mode,Qe=ae.overflowedIndicator,Xe=ae.theme;return ie.forEach(function(et){return delete ae[et]}),delete ae.onClick,p.createElement(gi,Object(v.a)({},ae,{prefixCls:ge,mode:je,tag:"ul",level:De,theme:Xe,visible:xe,overflowedIndicator:Qe},me),Object(N.a)(ae.children).map(function(et,wt){return Q.renderMenuItem(et,wt,Ce||"0-menu-")}))}}]),Se}(p.Component);Fi.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:V};var Hi=Object(c.b)()(Fi),li=Hi,Zn=M("Kwbf");function yi(se,ve,Se){var fe=se.prefixCls,Q=se.motion,ae=se.defaultMotions,q=ae===void 0?{}:ae,me=se.openAnimation,ge=se.openTransitionName,Ce=ve.switchingModeFromInline;if(Q)return Q;if(Object(P.a)(me)==="object"&&me)Object(Zn.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof me=="string")return{motionName:"".concat(fe,"-open-").concat(me)};if(ge)return{motionName:ge};var xe=q[Se];return xe||(Ce?null:q.other)}var Wi=function(se){Object(d.a)(Se,se);var ve=Object(l.a)(Se);function Se(fe){var Q;Object(x.a)(this,Se),Q=ve.call(this,fe),Q.onSelect=function(me){var ge=Object(h.a)(Q),Ce=ge.props;if(Ce.selectable){var xe=Q.store.getState(),De=xe.selectedKeys,je=me.key;Ce.multiple?De=De.concat([je]):De=[je],"selectedKeys"in Ce||Q.store.setState({selectedKeys:De}),Ce.onSelect(Object(B.a)(Object(B.a)({},me),{},{selectedKeys:De}))}},Q.onClick=function(me){var ge=Q.getRealMenuMode(),Ce=Object(h.a)(Q),xe=Ce.store,De=Ce.props.onOpenChange;ge!=="inline"&&!("openKeys"in Q.props)&&(xe.setState({openKeys:[]}),De([])),Q.props.onClick(me)},Q.onKeyDown=function(me,ge){Q.innerMenu.getWrappedInstance().onKeyDown(me,ge)},Q.onOpenChange=function(me){var ge=Object(h.a)(Q),Ce=ge.props,xe=Q.store.getState().openKeys.concat(),De=!1,je=function(Xe){var et=!1;if(Xe.open)et=xe.indexOf(Xe.key)===-1,et&&xe.push(Xe.key);else{var wt=xe.indexOf(Xe.key);et=wt!==-1,et&&xe.splice(wt,1)}De=De||et};Array.isArray(me)?me.forEach(je):je(me),De&&("openKeys"in Q.props||Q.store.setState({openKeys:xe}),Ce.onOpenChange(xe))},Q.onDeselect=function(me){var ge=Object(h.a)(Q),Ce=ge.props;if(Ce.selectable){var xe=Q.store.getState().selectedKeys.concat(),De=me.key,je=xe.indexOf(De);je!==-1&&xe.splice(je,1),"selectedKeys"in Ce||Q.store.setState({selectedKeys:xe}),Ce.onDeselect(Object(B.a)(Object(B.a)({},me),{},{selectedKeys:xe}))}},Q.onMouseEnter=function(me){Q.restoreModeVerticalFromInline();var ge=Q.props.onMouseEnter;ge&&ge(me)},Q.onTransitionEnd=function(me){var ge=me.propertyName==="width"&&me.target===me.currentTarget,Ce=me.target.className,xe=Object.prototype.toString.call(Ce)==="[object SVGAnimatedString]"?Ce.animVal:Ce,De=me.propertyName==="font-size"&&xe.indexOf("anticon")>=0;(ge||De)&&Q.restoreModeVerticalFromInline()},Q.setInnerMenu=function(me){Q.innerMenu=me},Q.isRootMenu=!0;var ae=fe.defaultSelectedKeys,q=fe.defaultOpenKeys;return"selectedKeys"in fe&&(ae=fe.selectedKeys||[]),"openKeys"in fe&&(q=fe.openKeys||[]),Q.store=Object(c.c)({selectedKeys:ae,openKeys:q,activeKey:{"0-menu-":oi(fe,fe.activeKey)}}),Q.state={switchingModeFromInline:!1,prevProps:fe,inlineOpenKeys:[],store:Q.store},Q}return Object(E.a)(Se,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Q){var ae=this.props,q=ae.siderCollapsed,me=ae.inlineCollapsed,ge=ae.onOpenChange;(!Q.inlineCollapsed&&me||!Q.siderCollapsed&&q)&&ge([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Q=this.props.collapsedWidth,ae=this.store,q=this.prevOpenKeys,me=this.getInlineCollapsed()&&(Q===0||Q==="0"||Q==="0px");me?(this.prevOpenKeys=ae.getState().openKeys.concat(),this.store.setState({openKeys:[]})):q&&(this.store.setState({openKeys:q}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Q=this.props.mode,ae=this.state.switchingModeFromInline,q=this.getInlineCollapsed();return ae&&q?"inline":q?"vertical":Q}},{key:"getInlineCollapsed",value:function(){var Q=this.props,ae=Q.inlineCollapsed,q=Q.siderCollapsed;return q!==void 0?q:ae}},{key:"restoreModeVerticalFromInline",value:function(){var Q=this.state.switchingModeFromInline;Q&&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 Q=Object(B.a)({},Object(y.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ae=this.getRealMenuMode();return Q.className+=" ".concat(Q.prefixCls,"-root"),Q.direction==="rtl"&&(Q.className+=" ".concat(Q.prefixCls,"-rtl")),Q=Object(B.a)(Object(B.a)({},Q),{},{mode:ae,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:yi(this.props,this.state,ae)}),delete Q.openAnimation,delete Q.openTransitionName,p.createElement(c.a,{store:this.store},p.createElement(li,Object(v.a)({},Q,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Q,ae){var q=ae.prevProps,me=ae.store,ge=me.getState(),Ce={},xe={prevProps:Q};return q.mode==="inline"&&Q.mode!=="inline"&&(xe.switchingModeFromInline=!0),"openKeys"in Q?Ce.openKeys=Q.openKeys||[]:((Q.inlineCollapsed&&!q.inlineCollapsed||Q.siderCollapsed&&!q.siderCollapsed)&&(xe.switchingModeFromInline=!0,xe.inlineOpenKeys=ge.openKeys,Ce.openKeys=[]),(!Q.inlineCollapsed&&q.inlineCollapsed||!Q.siderCollapsed&&q.siderCollapsed)&&(Ce.openKeys=ae.inlineOpenKeys,xe.inlineOpenKeys=[])),Object.keys(Ce).length&&me.setState(Ce),xe}}]),Se}(p.Component);Wi.defaultProps={selectable:!0,onClick:V,onSelect:V,onOpenChange:V,onDeselect:V,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:p.createElement("span",null,"\xB7\xB7\xB7")};var wi=Wi,ei=function(se){Object(d.a)(Se,se);var ve=Object(l.a)(Se);function Se(){var fe;return Object(x.a)(this,Se),fe=ve.apply(this,arguments),fe.onKeyDown=function(Q){var ae=Q.keyCode;return ae===o.a.ENTER?(fe.onClick(Q),!0):void 0},fe.onMouseLeave=function(Q){var ae=fe.props,q=ae.eventKey,me=ae.onItemHover,ge=ae.onMouseLeave;me({key:q,hover:!1}),ge({key:q,domEvent:Q})},fe.onMouseEnter=function(Q){var ae=fe.props,q=ae.eventKey,me=ae.onItemHover,ge=ae.onMouseEnter;me({key:q,hover:!0}),ge({key:q,domEvent:Q})},fe.onClick=function(Q){var ae=fe.props,q=ae.eventKey,me=ae.multiple,ge=ae.onClick,Ce=ae.onSelect,xe=ae.onDeselect,De=ae.isSelected,je={key:q,keyPath:[q],item:Object(h.a)(fe),domEvent:Q};ge(je),me?De?xe(je):Ce(je):De||Ce(je)},fe.saveNode=function(Q){fe.node=Q},fe}return Object(E.a)(Se,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Q=this.props;Q.onDestroy&&Q.onDestroy(Q.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 Q,ae=Object(B.a)({},this.props),q=H()(this.getPrefixCls(),ae.className,(Q={},Object(te.a)(Q,this.getActiveClassName(),!ae.disabled&&ae.active),Object(te.a)(Q,this.getSelectedClassName(),ae.isSelected),Object(te.a)(Q,this.getDisabledClassName(),ae.disabled),Q)),me=Object(B.a)(Object(B.a)({},ae.attribute),{},{title:typeof ae.title=="string"?ae.title:void 0,className:q,role:ae.role||"menuitem","aria-disabled":ae.disabled});ae.role==="option"?me=Object(B.a)(Object(B.a)({},me),{},{role:"option","aria-selected":ae.isSelected}):(ae.role===null||ae.role==="none")&&(me.role="none");var ge={onClick:ae.disabled?null:this.onClick,onMouseLeave:ae.disabled?null:this.onMouseLeave,onMouseEnter:ae.disabled?null:this.onMouseEnter},Ce=Object(B.a)({},ae.style);ae.mode==="inline"&&(ae.direction==="rtl"?Ce.paddingRight=ae.inlineIndent*ae.level:Ce.paddingLeft=ae.inlineIndent*ae.level),ie.forEach(function(De){return delete ae[De]}),delete ae.direction;var xe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(xe=p.createElement(this.props.itemIcon,this.props)),p.createElement("li",Object(v.a)({},Object(y.a)(ae,["onClick","onMouseEnter","onMouseLeave","onSelect"]),me,ge,{style:Ce,ref:this.saveNode}),ae.children,xe)}}]),Se}(p.Component);ei.isMenuItem=!0,ei.defaultProps={onSelect:V,onMouseEnter:V,onMouseLeave:V,manualRef:V};var ui=Object(c.b)(function(se,ve){var Se=se.activeKey,fe=se.selectedKeys,Q=ve.eventKey,ae=ve.subMenuKey;return{active:Se[ae]===Q,isSelected:Array.isArray(fe)?fe.indexOf(Q)!==-1:fe===Q}})(ei),Ai=ui,Kn=function(se){Object(d.a)(Se,se);var ve=Object(l.a)(Se);function Se(){var fe;return Object(x.a)(this,Se),fe=ve.apply(this,arguments),fe.renderInnerMenuItem=function(Q){var ae=fe.props,q=ae.renderMenuItem,me=ae.index;return q(Q,me,fe.props.subMenuKey)},fe}return Object(E.a)(Se,[{key:"render",value:function(){var Q=Object(v.a)({},this.props),ae=Q.className,q=ae===void 0?"":ae,me=Q.rootPrefixCls,ge="".concat(me,"-item-group-title"),Ce="".concat(me,"-item-group-list"),xe=Q.title,De=Q.children;return ie.forEach(function(je){return delete Q[je]}),delete Q.direction,p.createElement("li",Object(v.a)({},Q,{onClick:function(Qe){return Qe.stopPropagation()},className:"".concat(q," ").concat(me,"-item-group")}),p.createElement("div",{className:ge,title:typeof xe=="string"?xe:void 0},xe),p.createElement("ul",{className:Ce},p.Children.map(De,this.renderInnerMenuItem)))}}]),Se}(p.Component);Kn.isMenuItemGroup=!0,Kn.defaultProps={disabled:!0};var $i=Kn,Oi=function(ve){var Se=ve.className,fe=ve.rootPrefixCls,Q=ve.style;return p.createElement("li",{className:"".concat(Se," ").concat(fe,"-item-divider"),style:Q})};Oi.defaultProps={disabled:!0,className:"",style:{}};var er=Oi,Ki=wi,Ri=M("eDIo");function Mn(se,ve){var Se=se.prefixCls,fe=se.editable,Q=se.locale,ae=se.style;return!fe||fe.showAdd===!1?null:p.createElement("button",{ref:ve,type:"button",className:"".concat(Se,"-nav-add"),style:ae,"aria-label":(Q==null?void 0:Q.addAriaLabel)||"Add tab",onClick:function(me){fe.onEdit("add",{event:me})}},fe.addIcon||"+")}var ci=p.forwardRef(Mn);function Gi(se,ve){var Se=se.prefixCls,fe=se.id,Q=se.tabs,ae=se.locale,q=se.mobile,me=se.moreIcon,ge=me===void 0?"More":me,Ce=se.moreTransitionName,xe=se.style,De=se.className,je=se.editable,Qe=se.tabBarGutter,Xe=se.rtl,et=se.onTabClick,wt=Object(p.useState)(!1),jt=Object(k.a)(wt,2),Nt=jt[0],Wt=jt[1],Ft=Object(p.useState)(null),kt=Object(k.a)(Ft,2),Ut=kt[0],tn=kt[1],zt="".concat(fe,"-more-popup"),_n="".concat(Se,"-dropdown"),un=Ut!==null?"".concat(zt,"-").concat(Ut):null,Tt=ae==null?void 0:ae.dropdownAriaLabel,Et=p.createElement(Ki,{onClick:function(hn){var yn=hn.key,Rn=hn.domEvent;et(yn,Rn),Wt(!1)},id:zt,tabIndex:-1,role:"listbox","aria-activedescendant":un,selectedKeys:[Ut],"aria-label":Tt!==void 0?Tt:"expanded dropdown"},Q.map(function(rn){return p.createElement(Ai,{key:rn.key,id:"".concat(zt,"-").concat(rn.key),role:"option","aria-controls":fe&&"".concat(fe,"-panel-").concat(rn.key),disabled:rn.disabled},rn.tab)}));function Xt(rn){for(var hn=Q.filter(function(Bn){return!Bn.disabled}),yn=hn.findIndex(function(Bn){return Bn.key===Ut})||0,Rn=hn.length,Un=0;Un<Rn;Un+=1){yn=(yn+rn+Rn)%Rn;var En=hn[yn];if(!En.disabled){tn(En.key);return}}}function $t(rn){var hn=rn.which;if(!Nt){[o.a.DOWN,o.a.SPACE,o.a.ENTER].includes(hn)&&(Wt(!0),rn.preventDefault());return}switch(hn){case o.a.UP:Xt(-1),rn.preventDefault();break;case o.a.DOWN:Xt(1),rn.preventDefault();break;case o.a.ESC:Wt(!1);break;case o.a.SPACE:case o.a.ENTER:Ut!==null&&et(Ut,rn);break}}Object(p.useEffect)(function(){var rn=document.getElementById(un);rn&&rn.scrollIntoView&&rn.scrollIntoView(!1)},[Ut]),Object(p.useEffect)(function(){Nt||tn(null)},[Nt]);var pt=Object(te.a)({},Xe?"marginLeft":"marginRight",Qe);Q.length||(pt.visibility="hidden",pt.order=1);var nn=H()(Object(te.a)({},"".concat(_n,"-rtl"),Xe)),gn=q?null:p.createElement(Ri.a,{prefixCls:_n,overlay:Et,trigger:["hover"],visible:Nt,transitionName:Ce,onVisibleChange:Wt,overlayClassName:nn,mouseEnterDelay:.1,mouseLeaveDelay:.1},p.createElement("button",{type:"button",className:"".concat(Se,"-nav-more"),style:pt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":zt,id:"".concat(fe,"-more"),"aria-expanded":Nt,onKeyDown:$t},ge));return p.createElement("div",{className:H()("".concat(Se,"-nav-operations"),De),style:xe,ref:ve},gn,p.createElement(ci,{prefixCls:Se,locale:ae,editable:je}))}var tr=p.forwardRef(Gi),bi=Object(p.createContext)(null),Ht=.1,Yt=.01,mn=20,Sn=Math.pow(.995,mn);function On(){var se=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(se)||/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(se.substr(0,4)))}function zi(se,ve){var Se=Object(p.useState)(),fe=Object(k.a)(Se,2),Q=fe[0],ae=fe[1],q=Object(p.useState)(0),me=Object(k.a)(q,2),ge=me[0],Ce=me[1],xe=Object(p.useState)(0),De=Object(k.a)(xe,2),je=De[0],Qe=De[1],Xe=Object(p.useState)(),et=Object(k.a)(Xe,2),wt=et[0],jt=et[1],Nt=Object(p.useRef)();function Wt(Tt){var Et=Tt.touches[0],Xt=Et.screenX,$t=Et.screenY;ae({x:Xt,y:$t}),window.clearInterval(Nt.current)}function Ft(Tt){if(!Q)return;Tt.preventDefault();var Et=Tt.touches[0],Xt=Et.screenX,$t=Et.screenY;ae({x:Xt,y:$t});var pt=Xt-Q.x,nn=$t-Q.y;ve(pt,nn);var gn=Date.now();Ce(gn),Qe(gn-ge),jt({x:pt,y:nn})}function kt(){if(!Q)return;if(ae(null),jt(null),wt){var Tt=wt.x/je,Et=wt.y/je,Xt=Math.abs(Tt),$t=Math.abs(Et);if(Math.max(Xt,$t)<Ht)return;var pt=Tt,nn=Et;Nt.current=window.setInterval(function(){if(Math.abs(pt)<Yt&&Math.abs(nn)<Yt){window.clearInterval(Nt.current);return}pt*=Sn,nn*=Sn,ve(pt*mn,nn*mn)},mn)}}var Ut=Object(p.useRef)(0),tn=Object(p.useRef)(!1),zt=Object(p.useRef)();function _n(Tt){var Et=Tt.deltaX,Xt=Tt.deltaY,$t=0,pt=Math.abs(Et),nn=Math.abs(Xt);pt===nn?$t=zt.current==="x"?Et:Xt:pt>nn?($t=Et,zt.current="x"):($t=Xt,zt.current="y");var gn=Date.now();gn-Ut.current>100&&(tn.current=!1),(ve(-$t,-$t)||tn.current)&&(Tt.preventDefault(),tn.current=!0),Ut.current=gn}var un=Object(p.useRef)(null);un.current={onTouchStart:Wt,onTouchMove:Ft,onTouchEnd:kt,onWheel:_n},p.useEffect(function(){function Tt(pt){un.current.onTouchStart(pt)}function Et(pt){un.current.onTouchMove(pt)}function Xt(pt){un.current.onTouchEnd(pt)}function $t(pt){un.current.onWheel(pt)}return document.addEventListener("touchmove",Et,{passive:!1}),document.addEventListener("touchend",Xt,{passive:!1}),se.current.addEventListener("touchstart",Tt,{passive:!1}),se.current.addEventListener("wheel",$t),function(){document.removeEventListener("touchmove",Et),document.removeEventListener("touchend",Xt)}},[])}function Ii(){var se=Object(p.useRef)(new Map);function ve(fe){return se.current.has(fe)||se.current.set(fe,p.createRef()),se.current.get(fe)}function Se(fe){se.current.delete(fe)}return[ve,Se]}function Vi(se,ve){var Se=p.useRef(se),fe=p.useState({}),Q=Object(k.a)(fe,2),ae=Q[1];function q(me){var ge=typeof me=="function"?me(Se.current):me;ge!==Se.current&&ve(ge,Se.current),Se.current=ge,ae({})}return[Se.current,q]}var Yi=function(ve){var Se=ve.position,fe=ve.prefixCls,Q=ve.extra;if(!Q)return null;var ae,q=Q;return Se==="right"&&(ae=q.right||!q.left&&q||null),Se==="left"&&(ae=q.left||null),ae?p.createElement("div",{className:"".concat(fe,"-extra-content")},ae):null};function nr(se,ve){var Se,fe=p.useContext(bi),Q=fe.prefixCls,ae=fe.tabs,q=se.className,me=se.style,ge=se.id,Ce=se.animated,xe=se.activeKey,De=se.rtl,je=se.extra,Qe=se.editable,Xe=se.locale,et=se.tabPosition,wt=se.tabBarGutter,jt=se.children,Nt=se.onTabClick,Wt=se.onTabScroll,Ft=Object(p.useRef)(),kt=Object(p.useRef)(),Ut=Object(p.useRef)(),tn=Object(p.useRef)(),zt=Ii(),_n=Object(k.a)(zt,2),un=_n[0],Tt=_n[1],Et=et==="top"||et==="bottom",Xt=Vi(0,function(cn,Jt){Et&&Wt&&Wt({direction:cn>Jt?"left":"right"})}),$t=Object(k.a)(Xt,2),pt=$t[0],nn=$t[1],gn=Vi(0,function(cn,Jt){!Et&&Wt&&Wt({direction:cn>Jt?"top":"bottom"})}),rn=Object(k.a)(gn,2),hn=rn[0],yn=rn[1],Rn=Object(p.useState)(0),Un=Object(k.a)(Rn,2),En=Un[0],Bn=Un[1],ti=Object(p.useState)(0),Gn=Object(k.a)(ti,2),zn=Gn[0],Tn=Gn[1],Nn=Object(p.useState)(0),In=Object(k.a)(Nn,2),Cn=In[0],_i=In[1],Ei=Object(p.useState)(0),Di=Object(k.a)(Ei,2),fn=Di[0],di=Di[1],Li=Object(p.useState)(null),vn=Object(k.a)(Li,2),ln=vn[0],Dn=vn[1],Vr=Object(p.useState)(null),xr=Object(k.a)(Vr,2),Xi=xr[0],Yr=xr[1],Xr=Object(p.useState)(0),Tr=Object(k.a)(Xr,2),Jr=Tr[0],Qr=Tr[1],Zr=Object(p.useState)(0),Sr=Object(k.a)(Zr,2),qr=Sr[0],$r=Sr[1],ea=r(new Map),Cr=Object(k.a)(ea,2),ta=Cr[0],na=Cr[1],hr=t(ae,ta,En),wr="".concat(Q,"-nav-operations-hidden"),ir=0,rr=0;Et?De?(ir=0,rr=Math.max(0,En-ln)):(ir=Math.min(0,ln-En),rr=0):(ir=Math.min(0,Xi-zn),rr=0);function fr(cn){return cn<ir?[ir,!1]:cn>rr?[rr,!1]:[cn,!0]}var Ar=Object(p.useRef)(),ia=Object(p.useState)(),Or=Object(k.a)(ia,2),pr=Or[0],Rr=Or[1];function mr(){Rr(Date.now())}function gr(){window.clearTimeout(Ar.current)}zi(Ft,function(cn,Jt){var wn=!1;function Vn(sr,or){sr(function(lr){var ur=fr(lr+or),Ji=Object(k.a)(ur,2),_r=Ji[0],Er=Ji[1];return wn=Er,_r})}if(Et){if(ln>=En)return wn;Vn(nn,cn)}else{if(Xi>=zn)return wn;Vn(yn,Jt)}return gr(),mr(),wn}),Object(p.useEffect)(function(){return gr(),pr&&(Ar.current=window.setTimeout(function(){Rr(0)},100)),gr},[pr]);function Ir(){var cn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xe,Jt=hr.get(cn);if(!Jt)return;if(Et){var wn=pt;De?Jt.right<pt?wn=Jt.right:Jt.right+Jt.width>pt+ln&&(wn=Jt.right+Jt.width-ln):Jt.left<-pt?wn=-Jt.left:Jt.left+Jt.width>-pt+ln&&(wn=-(Jt.left+Jt.width-ln)),yn(0),nn(fr(wn)[0])}else{var Vn=hn;Jt.top<-hn?Vn=-Jt.top:Jt.top+Jt.height>-hn+Xi&&(Vn=-(Jt.top+Jt.height-Xi)),nn(0),yn(fr(Vn)[0])}}var ra=b(hr,{width:ln,height:Xi,left:pt,top:hn},{width:Cn,height:fn},{width:Jr,height:qr},Object(B.a)(Object(B.a)({},se),{},{tabs:ae})),Dr=Object(k.a)(ra,2),aa=Dr[0],sa=Dr[1],oa=ae.map(function(cn){var Jt=cn.key;return p.createElement(i,{id:ge,prefixCls:Q,key:Jt,rtl:De,tab:cn,closable:cn.closable,editable:Qe,active:Jt===xe,tabPosition:et,tabBarGutter:wt,renderWrapper:jt,removeAriaLabel:Xe==null?void 0:Xe.removeAriaLabel,ref:un(Jt),onClick:function(Vn){Nt(Jt,Vn)},onRemove:function(){Tt(Jt)},onFocus:function(){Ir(Jt),mr(),De||(Ft.current.scrollLeft=0),Ft.current.scrollTop=0}})}),vr=a(function(){var cn,Jt,wn,Vn,sr,or,lr,ur,Ji,_r=((cn=Ft.current)===null||cn===void 0?void 0:cn.offsetWidth)||0,Er=((Jt=Ft.current)===null||Jt===void 0?void 0:Jt.offsetHeight)||0,jr=((wn=tn.current)===null||wn===void 0?void 0:wn.offsetWidth)||0,Fr=((Vn=tn.current)===null||Vn===void 0?void 0:Vn.offsetHeight)||0,fa=((sr=Ut.current)===null||sr===void 0?void 0:sr.offsetWidth)||0,pa=((or=Ut.current)===null||or===void 0?void 0:or.offsetHeight)||0;Dn(_r),Yr(Er),Qr(jr),$r(Fr);var Hr=(((lr=kt.current)===null||lr===void 0?void 0:lr.offsetWidth)||0)-jr,Wr=(((ur=kt.current)===null||ur===void 0?void 0:ur.offsetHeight)||0)-Fr;Bn(Hr),Tn(Wr);var Kr=(Ji=Ut.current)===null||Ji===void 0?void 0:Ji.className.includes(wr);_i(Hr-(Kr?0:fa)),di(Wr-(Kr?0:pa)),na(function(){var Gr=new Map;return ae.forEach(function(ma){var zr=ma.key,cr=un(zr).current;cr&&Gr.set(zr,{width:cr.offsetWidth,height:cr.offsetHeight,left:cr.offsetLeft,top:cr.offsetTop})}),Gr})}),la=ae.slice(0,aa),ua=ae.slice(sa+1),Lr=[].concat(Object(A.a)(la),Object(A.a)(ua)),ca=Object(p.useState)(),Pr=Object(k.a)(ca,2),da=Pr[0],ha=Pr[1],xi=hr.get(xe),Mr=Object(p.useRef)();function Nr(){m.a.cancel(Mr.current)}Object(p.useEffect)(function(){var cn={};return xi&&(Et?(De?cn.right=xi.right:cn.left=xi.left,cn.width=xi.width):(cn.top=xi.top,cn.height=xi.height)),Nr(),Mr.current=m()(function(){ha(cn)}),Nr},[xi,Et,De]),Object(p.useEffect)(function(){Ir()},[xe,xi,hr,Et]),Object(p.useEffect)(function(){vr()},[De,wt,xe,ae.map(function(cn){return cn.key}).join("_")]);var kr=!!Lr.length,ar="".concat(Q,"-nav-wrap"),yr,br,Ur,Br;return Et?De?(br=pt>0,yr=pt+ln<En):(yr=pt<0,br=-pt+ln<En):(Ur=hn<0,Br=-hn+Xi<zn),p.createElement("div",{ref:ve,role:"tablist",className:H()("".concat(Q,"-nav"),q),style:me,onKeyDown:function(){mr()}},p.createElement(Yi,{position:"left",extra:je,prefixCls:Q}),p.createElement(u.a,{onResize:vr},p.createElement("div",{className:H()(ar,(Se={},Object(te.a)(Se,"".concat(ar,"-ping-left"),yr),Object(te.a)(Se,"".concat(ar,"-ping-right"),br),Object(te.a)(Se,"".concat(ar,"-ping-top"),Ur),Object(te.a)(Se,"".concat(ar,"-ping-bottom"),Br),Se)),ref:Ft},p.createElement(u.a,{onResize:vr},p.createElement("div",{ref:kt,className:"".concat(Q,"-nav-list"),style:{transform:"translate(".concat(pt,"px, ").concat(hn,"px)"),transition:pr?"none":void 0}},oa,p.createElement(ci,{ref:tn,prefixCls:Q,locale:Xe,editable:Qe,style:{visibility:kr?"hidden":null}}),p.createElement("div",{className:H()("".concat(Q,"-ink-bar"),Object(te.a)({},"".concat(Q,"-ink-bar-animated"),Ce.inkBar)),style:da}))))),p.createElement(tr,Object.assign({},se,{ref:Ut,prefixCls:Q,tabs:Lr,className:!kr&&wr})),p.createElement(Yi,{position:"right",extra:je,prefixCls:Q}))}var dr=p.forwardRef(nr);function Fe(se){var ve=se.id,Se=se.activeKey,fe=se.animated,Q=se.tabPosition,ae=se.rtl,q=se.destroyInactiveTabPane,me=p.useContext(bi),ge=me.prefixCls,Ce=me.tabs,xe=fe.tabPane,De=Ce.findIndex(function(je){return je.key===Se});return p.createElement("div",{className:H()("".concat(ge,"-content-holder"))},p.createElement("div",{className:H()("".concat(ge,"-content"),"".concat(ge,"-content-").concat(Q),Object(te.a)({},"".concat(ge,"-content-animated"),xe)),style:De&&xe?Object(te.a)({},ae?"marginRight":"marginLeft","-".concat(De,"00%")):null},Ce.map(function(je){return p.cloneElement(je.node,{key:je.key,prefixCls:ge,tabKey:je.key,id:ve,animated:xe,active:je.key===Se,destroyInactiveTabPane:q})})))}function He(se){var ve=se.prefixCls,Se=se.forceRender,fe=se.className,Q=se.style,ae=se.id,q=se.active,me=se.animated,ge=se.destroyInactiveTabPane,Ce=se.tabKey,xe=se.children,De=p.useState(Se),je=Object(k.a)(De,2),Qe=je[0],Xe=je[1];p.useEffect(function(){q?Xe(!0):ge&&Xe(!1)},[q,ge]);var et={};return q||(me?(et.visibility="hidden",et.height=0,et.overflowY="hidden"):et.display="none"),p.createElement("div",{id:ae&&"".concat(ae,"-panel-").concat(Ce),role:"tabpanel",tabIndex:q?0:-1,"aria-labelledby":ae&&"".concat(ae,"-tab-").concat(Ce),"aria-hidden":!q,style:Object(B.a)(Object(B.a)({},et),Q),className:H()("".concat(ve,"-tabpane"),q&&"".concat(ve,"-tabpane-active"),fe)},(q||Qe||Se)&&xe)}var Ge=0;function nt(se){return Object(N.a)(se).map(function(ve){if(p.isValidElement(ve)){var Se=ve.key!==void 0?String(ve.key):void 0;return Object(B.a)(Object(B.a)({key:Se},ve.props),{},{node:ve})}return null}).filter(function(ve){return ve})}function xt(se,ve){var Se,fe=se.id,Q=se.prefixCls,ae=Q===void 0?"rc-tabs":Q,q=se.className,me=se.children,ge=se.direction,Ce=se.activeKey,xe=se.defaultActiveKey,De=se.editable,je=se.animated,Qe=se.tabPosition,Xe=Qe===void 0?"top":Qe,et=se.tabBarGutter,wt=se.tabBarStyle,jt=se.tabBarExtraContent,Nt=se.locale,Wt=se.moreIcon,Ft=se.moreTransitionName,kt=se.destroyInactiveTabPane,Ut=se.renderTabBar,tn=se.onChange,zt=se.onTabClick,_n=se.onTabScroll,un=Object(R.a)(se,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Tt=nt(me),Et=ge==="rtl",Xt;je===!1?Xt={inkBar:!1,tabPane:!1}:Xt=Object(B.a)({inkBar:!0,tabPane:!1},je!==!0?je:null);var $t=Object(p.useState)(!1),pt=Object(k.a)($t,2),nn=pt[0],gn=pt[1];Object(p.useEffect)(function(){gn(On())},[]);var rn=Object(e.a)(function(){var fn;return(fn=Tt[0])===null||fn===void 0?void 0:fn.key},{value:Ce,defaultValue:xe}),hn=Object(k.a)(rn,2),yn=hn[0],Rn=hn[1],Un=Object(p.useState)(function(){return Tt.findIndex(function(fn){return fn.key===yn})}),En=Object(k.a)(Un,2),Bn=En[0],ti=En[1];Object(p.useEffect)(function(){var fn=Tt.findIndex(function(Li){return Li.key===yn});if(fn===-1){var di;fn=Math.max(0,Math.min(Bn,Tt.length-1)),Rn((di=Tt[fn])===null||di===void 0?void 0:di.key)}ti(fn)},[Tt.map(function(fn){return fn.key}).join("_"),yn,Bn]);var Gn=Object(e.a)(null,{value:fe}),zn=Object(k.a)(Gn,2),Tn=zn[0],Nn=zn[1],In=Xe;nn&&!["left","right"].includes(Xe)&&(In="top"),Object(p.useEffect)(function(){fe||(Nn("rc-tabs-".concat(Ge)),Ge+=1)},[]);function Cn(fn,di){zt==null||zt(fn,di),Rn(fn),tn==null||tn(fn)}var _i={id:Tn,activeKey:yn,animated:Xt,tabPosition:In,rtl:Et,mobile:nn},Ei,Di=Object(B.a)(Object(B.a)({},_i),{},{editable:De,locale:Nt,moreIcon:Wt,moreTransitionName:Ft,tabBarGutter:et,onTabClick:Cn,onTabScroll:_n,extra:jt,style:wt,panes:me});return Ut?Ei=Ut(Di,dr):Ei=p.createElement(dr,Object.assign({},Di)),p.createElement(bi.Provider,{value:{tabs:Tt,prefixCls:ae}},p.createElement("div",Object.assign({ref:ve,id:fe,className:H()(ae,"".concat(ae,"-").concat(In),(Se={},Object(te.a)(Se,"".concat(ae,"-mobile"),nn),Object(te.a)(Se,"".concat(ae,"-editable"),De),Object(te.a)(Se,"".concat(ae,"-rtl"),Et),Se),q)},un),Ei,p.createElement(Fe,Object.assign({destroyInactiveTabPane:kt},_i,{animated:Xt}))))}var yt=p.forwardRef(xt);yt.TabPane=He;var dn=yt,bn=oe.b=dn},n6Qo:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return N});var te=M("q1tI"),k=M("biw7"),R=M("fyJ8");function B(e){var A=e.className,g=e.index,m=e.children,u=e.colSpan,a=e.rowSpan,r=te.useContext(k.a),o=r.prefixCls,s=r.fixedInfoList,i=s[g];return te.createElement(R.a,Object.assign({className:A,index:g,component:"td",prefixCls:o,record:null,dataIndex:null,render:function(){return{children:m,props:{colSpan:u,rowSpan:a}}}},i))}function p(e){return te.createElement("tr",Object.assign({},e))}function C(e){var A=e.children,g=te.useContext(k.a),m=g.prefixCls;return te.createElement("tfoot",{className:"".concat(m,"-summary")},A)}var H=oe.b=C,N={Cell:B,Row:p}},nEHx:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return te});var te;(function(k){k.DARK="dark",k.LIGHT="light",k.HIGH_CONTRAST="hc"})(te||(te={}))},nnTU:function(Be,oe,M){"use strict";M.d(oe,"b",function(){return H}),M.d(oe,"a",function(){return N});var te=M("MI8n"),k=M("JYp7"),R=M("pmY6"),B=M("24hK"),p=M("746U"),C=M("Cg/j");const H=Object(C.c)("commandService"),N=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new te.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,A){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!A)throw new Error("invalid command");return this.registerCommand({id:e,handler:A})}if(e.description){const r=[];for(let s of e.description.args)r.push(s.constraint);const o=e.handler;e.handler=function(s,...i){return Object(p.o)(i,r),o(s,...i)}}const{id:g}=e;let m=this._commands.get(g);m||(m=new B.a,this._commands.set(g,m));let u=m.unshift(e),a=Object(R.i)(()=>{u();const r=this._commands.get(g);(r==null?void 0:r.isEmpty())&&this._commands.delete(g)});return this._onDidRegisterCommand.fire(g),a}registerCommandAlias(e,A){return N.registerCommand(e,(g,...m)=>g.get(H).executeCommand(A,...m))}getCommand(e){const A=this._commands.get(e);return!A||A.isEmpty()?void 0:k.a.first(A)}getCommands(){const e=new Map;for(const A of this._commands.keys()){const g=this.getCommand(A);g&&e.set(A,g)}return e}};N.registerCommand("noop",()=>{})},p5ED:function(Be,oe,M){"use strict";var te=M("+L6B"),k=M("2/Rp"),R=M("5Dmo"),B=M("3S7+"),p=M("k1fw"),C=M("9og8"),H=M("tJVT"),N=M("WmNS"),e=M.n(N),A=M("q1tI"),g=M.n(A),m=M("vHTk"),u=M.n(m),a=M("yEEn"),r=M("ZW9T"),o=M("1vsH"),s=M("V0Rq"),i=M("m3rI");oe.a=function(n){var t,_,b,v,x,E,h,d=n.editOffice,l=d===void 0?"view":d,c=n.data,y=n.theme,f=n.type,T=n.filename,I=n.monacoEditor,P=n.className,S=n.style,w=n.close,F=n.onClose,L=n.hasMask,G=n.disabledDownload,Z=Object(A.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ue=Object(H.a)(Z,2),ce=ue[0],Re=ue[1],Ee=Object(A.useState)(""),he=Object(H.a)(Ee,2),we=he[0],Pe=he[1],de=Object(A.useState)(),j=Object(H.a)(de,2),O=j[0],D=j[1],W=window.ENV==="build"?"/react/build":"",V=i.a.PROXY_SERVER||location.origin,U,le=1024*1024,Oe=10*le,Me=Object(A.useRef)();(t=c)!==null&&t!==void 0&&t.startsWith("/api")&&f!=="txt"&&(c=(i.a.API_SERVER||location.origin)+c),f==="office"&&(U=Object(o.T)(c).filesize,U>Oe&&(f="other")),T&&I&&(I.filename=T),Object(A.useEffect)(function(){var Ae,Ke,ze=(Ae=document.cookie)===null||Ae===void 0||((Ke=Ae.replace(/\s/g,""))===null||Ke===void 0)?void 0:Ke.split(";");ze==null||ze.map(function(Ze){var Ye=Ze.split("=");Ye[0]==="_educoder_session"&&Pe(Ye[1])})},[]),Object(A.useEffect)(function(){f==="office"&&ie()},[f,c]);var ie=function(){var Ae=Object(C.a)(e.a.mark(function Ke(){var ze,Ze,Ye;return e.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return console.log("data:",c),ze=c,c.startsWith("http")||(ze=location.origin+ze),Ze=new URL(ze).pathname.split("/").pop(),tt.next=6,Object(s.V)({attachment_id:Ze});case 6:Ye=tt.sent,D(Ye);case 8:case"end":return tt.stop()}},Ke)}));return function(){return Ae.apply(this,arguments)}}(),pe=function(){if(c.startsWith("http")||c.startsWith("blob:")){_e();return}Object(o.z)(T||"educoder",c,T)},_e=function(){Object(o.x)(T||"educoder",decodeURIComponent(c))};return g.a.createElement("div",{style:Object(p.a)({},S||{}),className:"".concat(L&&u.a.bgBlack," ").concat(f?u.a.wrp:"hide")},w&&g.a.createElement("div",{className:u.a.close,ref:Me},!G&&g.a.createElement(B.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Me.current}},g.a.createElement("span",{onClick:_e},g.a.createElement("i",{className:"icon-quxiaozhiding"}))),g.a.createElement(B.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Me.current}},g.a.createElement("span",{className:"",onClick:F},g.a.createElement("i",{className:"icon-guanbi1"})))),g.a.createElement("div",{className:"".concat(u.a[P]," ").concat(P," ").concat(u.a.monaco," ").concat(f==="txt"?"show":"hide")},f==="txt"&&g.a.createElement(r.b,I)),f==="audio"&&g.a.createElement("audio",{src:"".concat(((_=c)===null||_===void 0?void 0:_.indexOf("http://"))>-1||((b=c)===null||b===void 0?void 0:b.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(c),autoPlay:!0}),f==="video"&&g.a.createElement(g.a.Fragment,null,((v=c)===null||v===void 0?void 0:v.indexOf("http"))>-1?g.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):g.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),f==="office"&&O&&g.a.createElement("iframe",{src:"".concat(W,"/office.html?key=").concat(O.key,"&url=").concat(V+O.url,"&callbackUrl=").concat(V+O.callbackUrl,"&fileType=").concat(O.fileType,"&title=").concat(O.title,"&model=").concat(l,"&officeServer=").concat(i.a.OFFICE_SERVER,"&disabledDownload=").concat(!!G)}),f==="html"&&g.a.createElement("iframe",{src:c+"&disposition=inline"}),f==="pdf"&&g.a.createElement("iframe",{src:"".concat(W,"/js/pdfview/index.html?url=").concat(c,"&disabledDownload=").concat(!!G)}),f==="image"&&g.a.createElement("img",{src:"".concat(((x=c)===null||x===void 0?void 0:x.indexOf("http://"))>-1||((E=c)===null||E===void 0?void 0:E.indexOf("https://"))>-1||(h=c)!==null&&h!==void 0&&h.startsWith("/api")?"":"data:image/png;base64,").concat(c)}),f==="other"&&g.a.createElement("div",null,g.a.createElement(k.a,{type:"primary",size:"large",onClick:pe},g.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),f==="download"&&g.a.createElement(k.a,{type:"primary",size:"large",onClick:pe},g.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pIsd:function(Be,oe,M){var te=M("BJfS"),k=function(p){var C=/[height|width]$/;return C.test(p)},R=function(p){var C="",H=Object.keys(p);return H.forEach(function(N,e){var A=p[N];N=te(N),k(N)&&typeof A=="number"&&(A=A+"px"),A===!0?C+=N:A===!1?C+="not "+N:C+="("+N+": "+A+")",e<H.length-1&&(C+=" and ")}),C},B=function(p){var C="";return typeof p=="string"?p:p instanceof Array?(p.forEach(function(H,N){C+=R(H),N<p.length-1&&(C+=", ")}),C):R(p)};Be.exports=B},pmY6:function(Be,oe,M){"use strict";M.d(oe,"h",function(){return A}),M.d(oe,"g",function(){return m}),M.d(oe,"f",function(){return u}),M.d(oe,"e",function(){return a}),M.d(oe,"i",function(){return r}),M.d(oe,"b",function(){return o}),M.d(oe,"a",function(){return s}),M.d(oe,"d",function(){return i}),M.d(oe,"c",function(){return n});var te=M("C/vA"),k=M("JYp7");const R=!1;let B=null;function p(t){B=t}if(R){const t="__is_disposable_tracked__";p(new class{trackDisposable(_){const b=new Error("Potentially leaked disposable").stack;setTimeout(()=>{_[t]||console.log(b)},3e3)}setParent(_,b){if(_&&_!==s.None)try{_[t]=!0}catch(v){}}markAsDisposed(_){if(_&&_!==s.None)try{_[t]=!0}catch(b){}}markAsSingleton(_){}})}function C(t){return B==null||B.trackDisposable(t),t}function H(t){B==null||B.markAsDisposed(t)}function N(t,_){B==null||B.setParent(t,_)}function e(t,_){if(!B)return;for(const b of t)B.setParent(b,_)}function A(t){return B==null||B.markAsSingleton(t),t}class g extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function m(t){return typeof t.dispose=="function"&&t.dispose.length===0}function u(t){if(k.a.is(t)){let _=[];for(const b of t)if(b)try{b.dispose()}catch(v){_.push(v)}if(_.length===1)throw _[0];if(_.length>1)throw new g(_);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function a(...t){const _=r(()=>u(t));return e(t,_),_}function r(t){const _=C({dispose:Object(te.a)(()=>{H(_),t()})});return _}class o{constructor(){this._toDispose=new Set,this._isDisposed=!1,C(this)}dispose(){if(this._isDisposed)return;H(this),this._isDisposed=!0,this.clear()}clear(){try{u(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return N(t,this),this._isDisposed?o.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}o.DISABLE_DISPOSED_WARNING=!1;class s{constructor(){this._store=new o,C(this),N(this._store,this)}dispose(){H(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}s.None=Object.freeze({dispose(){}});class i{constructor(){this._isDisposed=!1,C(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var _;if(this._isDisposed||t===this._value)return;(_=this._value)===null||_===void 0||_.dispose(),t&&N(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,H(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&N(t,null),t}}class n{constructor(t){this.object=t}dispose(){}}},psGv:function(Be,oe,M){var te,k;(function(){var R;(function(){"use strict";var H=[,,function(g){function m(r){this.__parent=r,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=[]}m.prototype.clone_empty=function(){var r=new m(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},m.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},m.prototype.has_match=function(r){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(r))return!0;return!1},m.prototype.set_indent=function(r,o){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},m.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)},m.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},m.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},m.prototype.is_empty=function(){return this.__items.length===0},m.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},m.prototype.push=function(r){this.__items.push(r);var o=r.lastIndexOf(`
|
|
`);o!==-1?this.__character_count=r.length-o:this.__character_count+=r.length},m.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},m.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},m.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},m.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},m.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function u(r,o){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),o=o||"",r.indent_level>0&&(o=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}u.prototype.get_indent_size=function(r,o){var s=this.__base_string_length;return o=o||0,r<0&&(s=0),s+=r*this.__indent_size,s+=o,s},u.prototype.get_indent_string=function(r,o){var s=this.__base_string;return o=o||0,r<0&&(r=0,s=""),o+=r*this.__indent_size,this.__ensure_cache(o),s+=this.__cache[o],s},u.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var r=this.__cache.length,o=0,s="";this.__indent_size&&r>=this.__indent_size&&(o=Math.floor(r/this.__indent_size),r-=o*this.__indent_size,s=new Array(o+1).join(this.__indent_string)),r&&(s+=new Array(r+1).join(" ")),this.__cache.push(s)};function a(r,o){this.__indent_cache=new u(r,o),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new m(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(r,o){return this.__indent_cache.get_indent_string(r,o)},a.prototype.get_indent_size=function(r,o){return this.__indent_cache.get_indent_size(r,o)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(r){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 s=this.__lines.join(`
|
|
`);return r!==`
|
|
`&&(s=s.replace(/[\n]/g,r)),s},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(r,o){return r=r||0,o=o||0,this.next_line.set_indent(r,o),this.__lines.length>1?(this.current_line.set_indent(r,o),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(r){for(var o=0;o<r.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},a.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(" "))},a.prototype.remove_indent=function(r){for(var o=this.__lines.length;r<o;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&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},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(r,o){for(var s=this.__lines.length-2;s>=0;){var i=this.__lines[s];if(i.is_empty())break;if(i.item(0).indexOf(r)!==0&&i.item(-1)!==o){this.__lines.splice(s+1,0,new m(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},g.exports.Output=a},function(g){function m(u,a,r,o){this.type=u,this.text=a,this.comments_before=null,this.newlines=r||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}g.exports.Token=m},,,function(g){function m(r,o){this.raw_options=u(r,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"])}m.prototype._get_array=function(r,o){var s=this.raw_options[r],i=o||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(i=s.concat()):typeof s=="string"&&(i=s.split(/[^a-zA-Z0-9_\/\-]+/)),i},m.prototype._get_boolean=function(r,o){var s=this.raw_options[r],i=s===void 0?!!o:!!s;return i},m.prototype._get_characters=function(r,o){var s=this.raw_options[r],i=o||"";return typeof s=="string"&&(i=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),i},m.prototype._get_number=function(r,o){var s=this.raw_options[r];o=parseInt(o,10),isNaN(o)&&(o=0);var i=parseInt(s,10);return isNaN(i)&&(i=o),i},m.prototype._get_selection=function(r,o,s){var i=this._get_selection_list(r,o,s);if(i.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[r]+"'");return i[0]},m.prototype._get_selection_list=function(r,o,s){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[o[0]],!this._is_valid_selection(s,o))throw new Error("Invalid Default Value!");var i=this._get_array(r,s);if(!this._is_valid_selection(i,o))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[r]+"'");return i},m.prototype._is_valid_selection=function(r,o){return r.length&&o.length&&!r.some(function(s){return o.indexOf(s)===-1})};function u(r,o){var s={};r=a(r);var i;for(i in r)i!==o&&(s[i]=r[i]);if(o&&r[o])for(i in r[o])s[i]=r[o][i];return s}function a(r){var o={},s;for(s in r){var i=s.replace(/-/g,"_");o[i]=r[s]}return o}g.exports.Options=m,g.exports.normalizeOpts=a,g.exports.mergeOpts=u},,function(g){var m=RegExp.prototype.hasOwnProperty("sticky");function u(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}u.prototype.restart=function(){this.__position=0},u.prototype.back=function(){this.__position>0&&(this.__position-=1)},u.prototype.hasNext=function(){return this.__position<this.__input_length},u.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},u.prototype.peek=function(a){var r=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(r=this.__input.charAt(a)),r},u.prototype.__match=function(a,r){a.lastIndex=r;var o=a.exec(this.__input);return o&&!(m&&a.sticky)&&(o.index!==r&&(o=null)),o},u.prototype.test=function(a,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(a,r):!1},u.prototype.testChar=function(a,r){var o=this.peek(r);return a.lastIndex=0,o!==null&&a.test(o)},u.prototype.match=function(a){var r=this.__match(a,this.__position);return r?this.__position+=r[0].length:r=null,r},u.prototype.read=function(a,r,o){var s="",i;return a&&(i=this.match(a),i&&(s+=i[0])),r&&(i||!a)&&(s+=this.readUntil(r,o)),s},u.prototype.readUntil=function(a,r){var o="",s=this.__position;a.lastIndex=this.__position;var i=a.exec(this.__input);return i?(s=i.index,r&&(s+=i[0].length)):s=this.__input_length,o=this.__input.substring(this.__position,s),this.__position=s,o},u.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},u.prototype.get_regexp=function(a,r){var o=null,s="g";return r&&m&&(s="y"),typeof a=="string"&&a!==""?o=new RegExp(a,s):a&&(o=new RegExp(a.source,s)),o},u.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},u.prototype.peekUntilAfter=function(a){var r=this.__position,o=this.readUntilAfter(a);return this.__position=r,o},u.prototype.lookBack=function(a){var r=this.__position-1;return r>=a.length&&this.__input.substring(r-a.length,r).toLowerCase()===a},g.exports.InputScanner=u},function(g,m,u){var a=u(8).InputScanner,r=u(3).Token,o=u(10).TokenStream,s=u(11).WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(t,_){this._input=new a(t),this._options=_||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};n.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var t,_=new r(i.START,""),b=null,v=[],x=new o;_.type!==i.EOF;){for(t=this._get_next_token(_,b);this._is_comment(t);)x.add(t),t=this._get_next_token(_,b);x.isEmpty()||(t.comments_before=x,x=new o),t.parent=b,this._is_opening(t)?(v.push(b),b=t):b&&this._is_closing(t,b)&&(t.opened=b,b.closed=t,b=v.pop(),t.parent=b),t.previous=_,_.next=t,this.__tokens.add(t),_=t}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(t,_){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(i.RAW,b):this._create_token(i.EOF,"")},n.prototype._is_comment=function(t){return!1},n.prototype._is_opening=function(t){return!1},n.prototype._is_closing=function(t,_){return!1},n.prototype._create_token=function(t,_){var b=new r(t,_,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},g.exports.Tokenizer=n,g.exports.TOKEN=i},function(g){function m(u){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=u}m.prototype.restart=function(){this.__position=0},m.prototype.isEmpty=function(){return this.__tokens_length===0},m.prototype.hasNext=function(){return this.__position<this.__tokens_length},m.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__tokens[this.__position],this.__position+=1),u},m.prototype.peek=function(u){var a=null;return u=u||0,u+=this.__position,u>=0&&u<this.__tokens_length&&(a=this.__tokens[u]),a},m.prototype.add=function(u){this.__parent_token&&(u.parent=this.__parent_token),this.__tokens.push(u),this.__tokens_length+=1},g.exports.TokenStream=m},function(g,m,u){var a=u(12).Pattern;function r(o,s){a.call(this,o,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new a,r.prototype.__set_whitespace_patterns=function(o,s){o+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},r.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 s=this.__split(this._newline_regexp,o);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return o},r.prototype.matching=function(o,s){var i=this._create();return i.__set_whitespace_patterns(o,s),i._update(),i},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(o,s){o.lastIndex=0;for(var i=0,n=[],t=o.exec(s);t;)n.push(s.substring(i,t.index)),i=t.index+t[0].length,t=o.exec(s);return i<s.length?n.push(s.substring(i,s.length)):n.push(""),n},g.exports.WhitespacePattern=r},function(g){function m(u,a){this._input=u,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,a&&(this._starting_pattern=this._input.get_regexp(a._starting_pattern,!0),this._match_pattern=this._input.get_regexp(a._match_pattern,!0),this._until_pattern=this._input.get_regexp(a._until_pattern),this._until_after=a._until_after)}m.prototype.read=function(){var u=this._input.read(this._starting_pattern);return(!this._starting_pattern||u)&&(u+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),u},m.prototype.read_match=function(){return this._input.match(this._match_pattern)},m.prototype.until_after=function(u){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(u),a._update(),a},m.prototype.until=function(u){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(u),a._update(),a},m.prototype.starting_with=function(u){var a=this._create();return a._starting_pattern=this._input.get_regexp(u,!0),a._update(),a},m.prototype.matching=function(u){var a=this._create();return a._match_pattern=this._input.get_regexp(u,!0),a._update(),a},m.prototype._create=function(){return new m(this._input,this)},m.prototype._update=function(){},g.exports.Pattern=m},function(g){function m(u,a){u=typeof u=="string"?u:u.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(u+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(u+/\sbeautify\signore:end\s/.source+a,"g")}m.prototype.get_directives=function(u){if(!u.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(u);r;)a[r[1]]=r[2],r=this.__directive_pattern.exec(u);return a},m.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},g.exports.Directives=m},function(g,m,u){var a=u(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(s,i){a.call(this,s,i),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),i&&(this.__template_pattern=this._input.get_regexp(i.__template_pattern),this._excluded=Object.assign(this._excluded,i._excluded),this._disabled=Object.assign(this._disabled,i._disabled));var n=new a(s);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new a,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(s){var i=this._create();return i._disabled[s]=!0,i._update(),i},o.prototype.read_options=function(s){var i=this._create();for(var n in r)i._disabled[n]=s.templating.indexOf(n)===-1;return i._update(),i},o.prototype.exclude=function(s){var i=this._create();return i._excluded[s]=!0,i._update(),i},o.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 i=this._read_template();i;)this._match_pattern?i+=this._input.read(this._match_pattern):i+=this._input.readUntil(this.__template_pattern),s+=i,i=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},o.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("|")+")")},o.prototype._read_template=function(){var s="",i=this._input.peek();if(i==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(s=s||this.__patterns.erb.read())}else i==="{"&&(!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},g.exports.TemplatablePattern=o},,,,function(g,m,u){var a=u(19).Beautifier,r=u(20).Options;function o(s,i,n,t){var _=new a(s,i,n,t);return _.beautify()}g.exports=o,g.exports.defaultOptions=function(){return new r}},function(g,m,u){var a=u(20).Options,r=u(2).Output,o=u(21).Tokenizer,s=u(21).TOKEN,i=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,t=function(y,f){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=y.max_preserve_newlines,this.preserve_newlines=y.preserve_newlines,this._output=new r(y,f)};t.prototype.current_line_has_match=function(y){return this._output.current_line.has_match(y)},t.prototype.set_space_before_token=function(y,f){this._output.space_before_token=y,this._output.non_breaking_space=f},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(y){this._output.add_raw_token(y)},t.prototype.print_preserved_newlines=function(y){var f=0;y.type!==s.TEXT&&y.previous.type!==s.TEXT&&(f=y.newlines?1:0),this.preserve_newlines&&(f=y.newlines<this.max_preserve_newlines+1?y.newlines:this.max_preserve_newlines+1);for(var T=0;T<f;T++)this.print_newline(T>0);return f!==0},t.prototype.traverse_whitespace=function(y){return y.whitespace_before||y.newlines?(this.print_preserved_newlines(y)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(y){this._output.add_new_line(y)},t.prototype.print_token=function(y){y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(y.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(y){return y=this.indent_level+(y||0),y<1?"":this._output.get_indent_string(y)};var _=function(y){for(var f=null,T=y.next;T.type!==s.EOF&&y.closed!==T;){if(T.type===s.ATTRIBUTE&&T.text==="type"){T.next&&T.next.type===s.EQUALS&&T.next.next&&T.next.next.type===s.VALUE&&(f=T.next.next.text);break}T=T.next}return f},b=function(y,f){var T=null,I=null;return f.closed?(y==="script"?T="text/javascript":y==="style"&&(T="text/css"),T=_(f)||T,T.search("text/css")>-1?I="css":T.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?I="javascript":T.search(/(text|application|dojo)\/(x-)?(html)/)>-1?I="html":T.search(/test\/null/)>-1&&(I="null"),I):null};function v(y,f){return f.indexOf(y)!==-1}function x(y,f,T){this.parent=y||null,this.tag=f?f.tag_name:"",this.indent_level=T||0,this.parser_token=f||null}function E(y){this._printer=y,this._current_frame=null}E.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},E.prototype.record_tag=function(y){var f=new x(this._current_frame,y,this._printer.indent_level);this._current_frame=f},E.prototype._try_pop_frame=function(y){var f=null;return y&&(f=y.parser_token,this._printer.indent_level=y.indent_level,this._current_frame=y.parent),f},E.prototype._get_frame=function(y,f){for(var T=this._current_frame;T&&!(y.indexOf(T.tag)!==-1);){if(f&&f.indexOf(T.tag)!==-1){T=null;break}T=T.parent}return T},E.prototype.try_pop=function(y,f){var T=this._get_frame([y],f);return this._try_pop_frame(T)},E.prototype.indent_to_tag=function(y){var f=this._get_frame(y);f&&(this._printer.indent_level=f.indent_level)};function h(y,f,T,I){this._source_text=y||"",f=f||{},this._js_beautify=T,this._css_beautify=I,this._tag_stack=null;var P=new a(f,"html");this._options=P,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 y=this._source_text,f=this._options.eol;this._options.eol==="auto"&&(f=`
|
|
`,y&&i.test(y)&&(f=y.match(i)[0])),y=y.replace(n,`
|
|
`);var T=y.match(/^[\t ]*/)[0],I={text:"",type:""},P=new d,S=new t(this._options,T),w=new o(y,this._options).tokenize();this._tag_stack=new E(S);for(var F=null,L=w.next();L.type!==s.EOF;)L.type===s.TAG_OPEN||L.type===s.COMMENT?(F=this._handle_tag_open(S,L,P,I),P=F):L.type===s.ATTRIBUTE||L.type===s.EQUALS||L.type===s.VALUE||L.type===s.TEXT&&!P.tag_complete?F=this._handle_inside_tag(S,L,P,w):L.type===s.TAG_CLOSE?F=this._handle_tag_close(S,L,P):L.type===s.TEXT?F=this._handle_text(S,L,P):S.add_raw_token(L),I=F,L=w.next();var G=S._output.get_code(f);return G},h.prototype._handle_tag_close=function(y,f,T){var I={text:f.text,type:f.type};return y.alignment_size=0,T.tag_complete=!0,y.set_space_before_token(f.newlines||f.whitespace_before!=="",!0),T.is_unformatted?y.add_raw_token(f):(T.tag_start_char==="<"&&(y.set_space_before_token(f.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&T.has_wrapped_attrs&&y.print_newline(!1)),y.print_token(f)),T.indent_content&&!(T.is_unformatted||T.is_content_unformatted)&&(y.indent(),T.indent_content=!1),!T.is_inline_element&&!(T.is_unformatted||T.is_content_unformatted)&&y.set_wrap_point(),I},h.prototype._handle_inside_tag=function(y,f,T,I){var P=T.has_wrapped_attrs,S={text:f.text,type:f.type};if(y.set_space_before_token(f.newlines||f.whitespace_before!=="",!0),T.is_unformatted)y.add_raw_token(f);else if(T.tag_start_char==="{"&&f.type===s.TEXT)y.print_preserved_newlines(f)?(f.newlines=0,y.add_raw_token(f)):y.print_token(f);else{if(f.type===s.ATTRIBUTE?(y.set_space_before_token(!0),T.attr_count+=1):(f.type===s.EQUALS||f.type===s.VALUE&&f.previous.type===s.EQUALS)&&y.set_space_before_token(!1),f.type===s.ATTRIBUTE&&T.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(y.traverse_whitespace(f),P=P||f.newlines!==0),this._is_wrap_attributes_force)){var w=T.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&T.attr_count===1){var F=!0,L=0,G;do{if(G=I.peek(L),G.type===s.ATTRIBUTE){F=!1;break}L+=1}while(L<4&&G.type!==s.EOF&&G.type!==s.TAG_CLOSE);w=!F}w&&(y.print_newline(!1),P=!0)}y.print_token(f),P=P||y.previous_token_wrapped(),T.has_wrapped_attrs=P}return S},h.prototype._handle_text=function(y,f,T){var I={text:f.text,type:"TK_CONTENT"};return T.custom_beautifier_name?this._print_custom_beatifier_text(y,f,T):T.is_unformatted||T.is_content_unformatted?y.add_raw_token(f):(y.traverse_whitespace(f),y.print_token(f)),I},h.prototype._print_custom_beatifier_text=function(y,f,T){var I=this;if(f.text!==""){var P=f.text,S,w=1,F="",L="";T.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?S=this._js_beautify:T.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?S=this._css_beautify:T.custom_beautifier_name==="html"&&(S=function(Ee,he){var we=new h(Ee,he,I._js_beautify,I._css_beautify);return we.beautify()}),this._options.indent_scripts==="keep"?w=0:this._options.indent_scripts==="separate"&&(w=-y.indent_level);var G=y.get_full_indent(w);if(P=P.replace(/\n[ \t]*$/,""),T.custom_beautifier_name!=="html"&&P[0]==="<"&&P.match(/^(<!--|<!\[CDATA\[)/)){var Z=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(P);if(!Z){y.add_raw_token(f);return}F=G+Z[1]+`
|
|
`,P=Z[4],Z[5]&&(L=G+Z[5]),P=P.replace(/\n[ \t]*$/,""),(Z[2]||Z[3].indexOf(`
|
|
`)!==-1)&&(Z=Z[3].match(/[ \t]+$/),Z&&(f.whitespace_before=Z[0]))}if(P)if(S){var ue=function(){this.eol=`
|
|
`};ue.prototype=this._options.raw_options;var ce=new ue;P=S(G+P,ce)}else{var Re=f.whitespace_before;Re&&(P=P.replace(new RegExp(`
|
|
(`+Re+")?","g"),`
|
|
`)),P=G+P.replace(/\n/g,`
|
|
`+G)}F&&(P?P=F+P+`
|
|
`+L:P=F+L),y.print_newline(!1),P&&(f.text=P,f.whitespace_before="",f.newlines=0,y.add_raw_token(f),y.print_newline(!0))}},h.prototype._handle_tag_open=function(y,f,T,I){var P=this._get_tag_open_token(f);return(T.is_unformatted||T.is_content_unformatted)&&!T.is_empty_element&&f.type===s.TAG_OPEN&&f.text.indexOf("</")===0?(y.add_raw_token(f),P.start_tag_token=this._tag_stack.try_pop(P.tag_name)):(y.traverse_whitespace(f),this._set_tag_position(y,f,P,T,I),P.is_inline_element||y.set_wrap_point(),y.print_token(f)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(P.alignment_size=f.text.length+1),!P.tag_complete&&!P.is_unformatted&&(y.alignment_size=P.alignment_size),P};var d=function(y,f){if(this.parent=y||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="",!f)this.tag_complete=!0;else{var T;this.tag_start_char=f.text[0],this.text=f.text,this.tag_start_char==="<"?(T=f.text.match(/^<([^\s>]*)/),this.tag_check=T?T[1]:""):(T=f.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=T?T[1]:"",(f.text.startsWith("{{#>")||f.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&f.next!==null?this.tag_check=f.next.text.split(" ")[0]:this.tag_check=f.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),f.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||f.closed&&f.closed.text==="/>";var I=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(I=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(I)))}};h.prototype._get_tag_open_token=function(y){var f=new d(this._tag_stack.get_parser_token(),y);return f.alignment_size=this._options.wrap_attributes_indent_size,f.is_end_tag=f.is_end_tag||v(f.tag_check,this._options.void_elements),f.is_empty_element=f.tag_complete||f.is_start_tag&&f.is_end_tag,f.is_unformatted=!f.tag_complete&&v(f.tag_check,this._options.unformatted),f.is_content_unformatted=!f.is_empty_element&&v(f.tag_check,this._options.content_unformatted),f.is_inline_element=v(f.tag_name,this._options.inline)||f.tag_name.includes("-")||f.tag_start_char==="{",f},h.prototype._set_tag_position=function(y,f,T,I,P){if(T.is_empty_element||(T.is_end_tag?T.start_tag_token=this._tag_stack.try_pop(T.tag_name):(this._do_optional_end_element(T)&&(T.is_inline_element||y.print_newline(!1)),this._tag_stack.record_tag(T),(T.tag_name==="script"||T.tag_name==="style")&&!(T.is_unformatted||T.is_content_unformatted)&&(T.custom_beautifier_name=b(T.tag_check,f)))),v(T.tag_check,this._options.extra_liners)&&(y.print_newline(!1),y._output.just_added_blankline()||y.print_newline(!0)),T.is_empty_element){if(T.tag_start_char==="{"&&T.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),T.indent_content=!0;var S=y.current_line_has_match(/{{#if/);S||y.print_newline(!1)}T.tag_name==="!--"&&P.type===s.TAG_CLOSE&&I.is_end_tag&&T.text.indexOf(`
|
|
`)===-1||(T.is_inline_element||T.is_unformatted||y.print_newline(!1),this._calcluate_parent_multiline(y,T))}else if(T.is_end_tag){var w=!1;w=T.start_tag_token&&T.start_tag_token.multiline_content,w=w||!T.is_inline_element&&!(I.is_inline_element||I.is_unformatted)&&!(P.type===s.TAG_CLOSE&&T.start_tag_token===I)&&P.type!=="TK_CONTENT",(T.is_content_unformatted||T.is_unformatted)&&(w=!1),w&&y.print_newline(!1)}else T.indent_content=!T.custom_beautifier_name,T.tag_start_char==="<"&&(T.tag_name==="html"?T.indent_content=this._options.indent_inner_html:T.tag_name==="head"?T.indent_content=this._options.indent_head_inner_html:T.tag_name==="body"&&(T.indent_content=this._options.indent_body_inner_html)),!(T.is_inline_element||T.is_unformatted)&&(P.type!=="TK_CONTENT"||T.is_content_unformatted)&&y.print_newline(!1),this._calcluate_parent_multiline(y,T)},h.prototype._calcluate_parent_multiline=function(y,f){f.parent&&y._output.just_added_newline()&&!((f.is_inline_element||f.is_unformatted)&&f.parent.is_inline_element)&&(f.parent.multiline_content=!0)};var l=["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"],c=["a","audio","del","ins","map","noscript","video"];h.prototype._do_optional_end_element=function(y){var f=null;if(y.is_empty_element||!y.is_start_tag||!y.parent)return;if(y.tag_name==="body")f=f||this._tag_stack.try_pop("head");else if(y.tag_name==="li")f=f||this._tag_stack.try_pop("li",["ol","ul"]);else if(y.tag_name==="dd"||y.tag_name==="dt")f=f||this._tag_stack.try_pop("dt",["dl"]),f=f||this._tag_stack.try_pop("dd",["dl"]);else if(y.parent.tag_name==="p"&&l.indexOf(y.tag_name)!==-1){var T=y.parent.parent;(!T||c.indexOf(T.tag_name)===-1)&&(f=f||this._tag_stack.try_pop("p"))}else y.tag_name==="rp"||y.tag_name==="rt"?(f=f||this._tag_stack.try_pop("rt",["ruby","rtc"]),f=f||this._tag_stack.try_pop("rp",["ruby","rtc"])):y.tag_name==="optgroup"?f=f||this._tag_stack.try_pop("optgroup",["select"]):y.tag_name==="option"?f=f||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):y.tag_name==="colgroup"?f=f||this._tag_stack.try_pop("caption",["table"]):y.tag_name==="thead"?(f=f||this._tag_stack.try_pop("caption",["table"]),f=f||this._tag_stack.try_pop("colgroup",["table"])):y.tag_name==="tbody"||y.tag_name==="tfoot"?(f=f||this._tag_stack.try_pop("caption",["table"]),f=f||this._tag_stack.try_pop("colgroup",["table"]),f=f||this._tag_stack.try_pop("thead",["table"]),f=f||this._tag_stack.try_pop("tbody",["table"])):y.tag_name==="tr"?(f=f||this._tag_stack.try_pop("caption",["table"]),f=f||this._tag_stack.try_pop("colgroup",["table"]),f=f||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(y.tag_name==="th"||y.tag_name==="td")&&(f=f||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),f=f||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return y.parent=this._tag_stack.get_parser_token(),f},g.exports.Beautifier=h},function(g,m,u){var a=u(6).Options;function r(o){a.call(this,o,"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"])}r.prototype=new a,g.exports.Options=r},function(g,m,u){var a=u(9).Tokenizer,r=u(9).TOKEN,o=u(13).Directives,s=u(14).TemplatablePattern,i=u(12).Pattern,n={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:r.START,RAW:r.RAW,EOF:r.EOF},t=new o(/<\!--/,/-->/),_=function(b,v){a.call(this,b,v),this._current_tag_name="";var x=new s(this._input).read_options(this._options),E=new i(this._input);if(this.__patterns={word:x.until(/[\n\r\t <]/),single_quote:x.until_after(/'/),double_quote:x.until_after(/"/),attribute:x.until(/[\n\r\t =>]|\/>/),element_name:x.until(/[\n\r\t >\/]/),handlebars_comment:E.starting_with(/{{!--/).until_after(/--}}/),handlebars:E.starting_with(/{{/).until_after(/}}/),handlebars_open:E.until(/[\n\r\t }]/),handlebars_raw_close:E.until(/}}/),comment:E.starting_with(/<!--/).until_after(/-->/),cdata:E.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:E.starting_with(/<!\[/).until_after(/]>/),processing:E.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=E.matching(h).until_after(h)}};_.prototype=new a,_.prototype._is_comment=function(b){return!1},_.prototype._is_opening=function(b){return b.type===n.TAG_OPEN},_.prototype._is_closing=function(b,v){return b.type===n.TAG_CLOSE&&v&&((b.text===">"||b.text==="/>")&&v.text[0]==="<"||b.text==="}}"&&v.text[0]==="{"&&v.text[1]==="{")},_.prototype._reset=function(){this._current_tag_name=""},_.prototype._get_next_token=function(b,v){var x=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(n.EOF,""):(x=x||this._read_open_handlebars(E,v),x=x||this._read_attribute(E,b,v),x=x||this._read_close(E,v),x=x||this._read_raw_content(E,b,v),x=x||this._read_content_word(E),x=x||this._read_comment_or_cdata(E),x=x||this._read_processing(E),x=x||this._read_open(E,v),x=x||this._create_token(n.UNKNOWN,this._input.next()),x)},_.prototype._read_comment_or_cdata=function(b){var v=null,x=null,E=null;if(b==="<"){var h=this._input.peek(1);h==="!"&&(x=this.__patterns.comment.read(),x?(E=t.get_directives(x),E&&E.ignore==="start"&&(x+=t.readIgnored(this._input))):x=this.__patterns.cdata.read()),x&&(v=this._create_token(n.COMMENT,x),v.directives=E)}return v},_.prototype._read_processing=function(b){var v=null,x=null,E=null;if(b==="<"){var h=this._input.peek(1);(h==="!"||h==="?")&&(x=this.__patterns.conditional_comment.read(),x=x||this.__patterns.processing.read()),x&&(v=this._create_token(n.COMMENT,x),v.directives=E)}return v},_.prototype._read_open=function(b,v){var x=null,E=null;return v||b==="<"&&(x=this._input.next(),this._input.peek()==="/"&&(x+=this._input.next()),x+=this.__patterns.element_name.read(),E=this._create_token(n.TAG_OPEN,x)),E},_.prototype._read_open_handlebars=function(b,v){var x=null,E=null;return v||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(x=this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars.read(),E=this._create_token(n.COMMENT,x)):(x=this.__patterns.handlebars_open.read(),E=this._create_token(n.TAG_OPEN,x))),E},_.prototype._read_close=function(b,v){var x=null,E=null;return v&&(v.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(x=this._input.next(),b==="/"&&(x+=this._input.next()),E=this._create_token(n.TAG_CLOSE,x)):v.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),E=this._create_token(n.TAG_CLOSE,"}}"))),E},_.prototype._read_attribute=function(b,v,x){var E=null,h="";if(x&&x.text[0]==="<")if(b==="=")E=this._create_token(n.EQUALS,this._input.next());else if(b==='"'||b==="'"){var d=this._input.next();b==='"'?d+=this.__patterns.double_quote.read():d+=this.__patterns.single_quote.read(),E=this._create_token(n.VALUE,d)}else h=this.__patterns.attribute.read(),h&&(v.type===n.EQUALS?E=this._create_token(n.VALUE,h):E=this._create_token(n.ATTRIBUTE,h));return E},_.prototype._is_content_unformatted=function(b){return this._options.void_elements.indexOf(b)===-1&&(this._options.content_unformatted.indexOf(b)!==-1||this._options.unformatted.indexOf(b)!==-1)},_.prototype._read_raw_content=function(b,v,x){var E="";if(x&&x.text[0]==="{")E=this.__patterns.handlebars_raw_close.read();else if(v.type===n.TAG_CLOSE&&v.opened.text[0]==="<"&&v.text[0]!=="/"){var h=v.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var d=this._read_comment_or_cdata(b);if(d)return d.type=n.TEXT,d;E=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(h)&&(E=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig")))}return E?this._create_token(n.TEXT,E):null},_.prototype._read_content_word=function(b){var v="";if(this._options.unformatted_content_delimiter&&(b===this._options.unformatted_content_delimiter[0]&&(v=this.__patterns.unformatted_content_delimiter.read())),v||(v=this.__patterns.word.read()),v)return this._create_token(n.TEXT,v)},g.exports.Tokenizer=_,g.exports.TOKEN=n}],N={};function e(g){var m=N[g];if(m!==void 0)return m.exports;var u=N[g]={exports:{}};return H[g](u,u.exports,e),u.exports}var A=e(18);R=A})();var B=R;if(!0)!(te=[M,M("6UM0"),M("TXwP")],k=function(H){var N=M("6UM0"),e=M("TXwP");return{html_beautify:function(A,g){return B(A,g,N.js_beautify,e.css_beautify)}}}.apply(oe,te),k!==void 0&&(Be.exports=k));else var p,C})()},pxMS:function(Be,oe,M){Be.exports=M.p+"static/program-banner.03adba1e.png"},"rAM+":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return k});var te=M("Qw5x");function k(R,B){var p;if(typeof Symbol=="undefined"||R[Symbol.iterator]==null){if(Array.isArray(R)||(p=Object(te.a)(R))||B&&R&&typeof R.length=="number"){p&&(R=p);var C=0,H=function(){};return{s:H,n:function(){return C>=R.length?{done:!0}:{done:!1,value:R[C++]}},e:function(m){throw m},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 N=!0,e=!1,A;return{s:function(){p=R[Symbol.iterator]()},n:function(){var m=p.next();return N=m.done,m},e:function(m){e=!0,A=m},f:function(){try{!N&&p.return!=null&&p.return()}finally{if(e)throw A}}}}},rUJ1:function(Be,oe){const M=/[&<>"']/,te=/[&<>"']/g,k=/[<>"']|&(?!#?\w+;)/,R=/[<>"']|&(?!#?\w+;)/g,B={"&":"&","<":"<",">":">",'"':""","'":"'"},p=E=>B[E];function C(E,h){if(h){if(M.test(E))return E.replace(te,p)}else if(k.test(E))return E.replace(R,p);return E}const H=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function N(E){return E.replace(H,(h,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const e=/(^|[^\[])\^/g;function A(E,h){E=E.source||E,h=h||"";const d={replace:(l,c)=>(c=c.source||c,c=c.replace(e,"$1"),E=E.replace(l,c),d),getRegex:()=>new RegExp(E,h)};return d}const g=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(E,h,d){if(E){let l;try{l=decodeURIComponent(N(d)).replace(g,"").toLowerCase()}catch(c){return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}h&&!m.test(d)&&(d=i(h,d));try{d=encodeURI(d).replace(/%25/g,"%")}catch(l){return null}return d}const a={},r=/^[^:]+:\/*[^/]*$/,o=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(E,h){a[" "+E]||(r.test(E)?a[" "+E]=E+"/":a[" "+E]=b(E,"/",!0)),E=a[" "+E];const d=E.indexOf(":")===-1;return h.substring(0,2)==="//"?d?h:E.replace(o,"$1")+h:h.charAt(0)==="/"?d?h:E.replace(s,"$1")+h:E+h}const n={exec:function(){}};function t(E){let h=1,d,l;for(;h<arguments.length;h++){d=arguments[h];for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(E[l]=d[l])}return E}function _(E,h){const d=E.replace(/\|/g,(y,f,T)=>{let I=!1,P=f;for(;--P>=0&&T[P]==="\\";)I=!I;return I?"|":" |"}),l=d.split(/ \|/);let c=0;if(l.length>h)l.splice(h);else for(;l.length<h;)l.push("");for(;c<l.length;c++)l[c]=l[c].trim().replace(/\\\|/g,"|");return l}function b(E,h,d){const l=E.length;if(l===0)return"";let c=0;for(;c<l;){const y=E.charAt(l-c-1);if(y===h&&!d)c++;else if(y!==h&&d)c++;else break}return E.substr(0,l-c)}function v(E,h){if(E.indexOf(h[1])===-1)return-1;const d=E.length;let l=0,c=0;for(;c<d;c++)if(E[c]==="\\")c++;else if(E[c]===h[0])l++;else if(E[c]===h[1]&&(l--,l<0))return c;return-1}function x(E){E&&E.sanitize&&!E.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")}Be.exports={escape:C,unescape:N,edit:A,cleanUrl:u,resolveUrl:i,noopTest:n,merge:t,splitCells:_,rtrim:b,findClosingBracket:v,checkSanitizeDeprecation:x}},sR1s:function(Be,oe,M){"use strict";M.d(oe,"b",function(){return B}),M.d(oe,"a",function(){return p}),M.d(oe,"c",function(){return C}),M.d(oe,"d",function(){return H});var te=M("U8pU"),k="RC_TABLE_KEY";function R(N){return N==null?[]:Array.isArray(N)?N:[N]}function B(N,e){if(!e&&typeof e!="number")return N;for(var A=R(e),g=N,m=0;m<A.length;m+=1){if(!g)return null;var u=A[m];g=g[u]}return g}function p(N){var e=[],A={};return N.forEach(function(g){for(var m=g||{},u=m.key,a=m.dataIndex,r=u||R(a).join("-")||k;A[r];)r="".concat(r,"_next");A[r]=!0,e.push(r)}),e}function C(){var N={};function e(u,a){a&&Object.keys(a).forEach(function(r){var o=a[r];o&&Object(te.a)(o)==="object"?(u[r]=u[r]||{},e(u[r],o)):u[r]=o})}for(var A=arguments.length,g=new Array(A),m=0;m<A;m++)g[m]=arguments[m];return g.forEach(function(u){e(N,u)}),N}function H(N){return N!=null}},sboe:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return R});var te=M("q1tI"),k=M.n(te),R=te.createContext(null)},siWv:function(Be,oe,M){Be.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","mediacy-round":"mediacy-round___3vc8E","mediacy-default":"mediacy-default___2zIGi",default:"default___20Yio"}},t23M:function(Be,oe,M){"use strict";var te=M("VTBJ"),k=M("1OyB"),R=M("vuIU"),B=M("Ji7U"),p=M("LK+K"),C=M("q1tI"),H=M.n(C),N=M("m+aA"),e=M("Zm9Q"),A=M("Kwbf"),g=M("c+Xe"),m=M("bdgK"),u="rc-observer-key",a=function(r){Object(B.a)(s,r);var o=Object(p.a)(s);function s(){var i;return Object(k.a)(this,s),i=o.apply(this,arguments),i.resizeObserver=null,i.childNode=null,i.currentElement=null,i.state={width:0,height:0,offsetHeight:0,offsetWidth:0},i.onResize=function(n){var t=i.props.onResize,_=n[0].target,b=_.getBoundingClientRect(),v=b.width,x=b.height,E=_.offsetWidth,h=_.offsetHeight,d=Math.floor(v),l=Math.floor(x);if(i.state.width!==d||i.state.height!==l||i.state.offsetWidth!==E||i.state.offsetHeight!==h){var c={width:d,height:l,offsetWidth:E,offsetHeight:h};i.setState(c),t&&Promise.resolve().then(function(){t(Object(te.a)(Object(te.a)({},c),{},{offsetWidth:E,offsetHeight:h}))})}},i.setChildNode=function(n){i.childNode=n},i}return Object(R.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 n=this.props.disabled;if(n){this.destroyObserver();return}var t=Object(N.a)(this.childNode||this),_=t!==this.currentElement;_&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new m.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var n=this.props.children,t=Object(e.a)(n);if(t.length>1)Object(A.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(A.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var _=t[0];if(C.isValidElement(_)&&Object(g.c)(_)){var b=_.ref;t[0]=C.cloneElement(_,{ref:Object(g.a)(b,this.setChildNode)})}return t.length===1?t[0]:t.map(function(v,x){return!C.isValidElement(v)||"key"in v&&v.key!==null?v:C.cloneElement(v,{key:"".concat(u,"-").concat(x)})})}}]),s}(C.Component);a.displayName="ResizeObserver",oe.a=a},t9D7:function(Be,oe,M){"use strict";M.d(oe,"b",function(){return H}),M.d(oe,"g",function(){return e}),M.d(oe,"d",function(){return A}),M.d(oe,"e",function(){return g}),M.d(oe,"a",function(){return m}),M.d(oe,"f",function(){return r}),M.d(oe,"c",function(){return o});var te=M("Vhoy"),k=M("MI8n"),R=M("pmY6"),B=M("Cg/j"),p=M("ic2d"),C=M("nEHx");const H=Object(B.c)("themeService");var N;(function(s){function i(n){return n&&typeof n=="object"&&typeof n.id=="string"}s.isThemeColor=i})(N||(N={}));function e(s){return{id:s}}var A;(function(s){function i(x){return x&&typeof x=="object"&&typeof x.id=="string"&&(typeof x.color=="undefined"||N.isThemeColor(x.color))}s.isThemeIcon=i;const n=new RegExp(`^\\$\\((${te.a.iconNameExpression}(?:${te.a.iconModifierExpression})?)\\)$`);function t(x){const E=n.exec(x);if(!E)return;let[,h]=E;return{id:h}}s.fromString=t;function _(x,E){let h=x.id;const d=h.lastIndexOf("~");return d!==-1&&(h=h.substring(0,d)),E&&(h=`${h}~${E}`),{id:h}}s.modify=_;function b(x,E){var h,d;return x.id===E.id&&((h=x.color)===null||h===void 0?void 0:h.id)===((d=E.color)===null||d===void 0?void 0:d.id)}s.isEqual=b;function v(x,E){return{id:x.id,color:E?e(E):void 0}}s.asThemeIcon=v,s.asClassNameArray=te.a.asClassNameArray,s.asClassName=te.a.asClassName,s.asCSSSelector=te.a.asCSSSelector})(A||(A={}));function g(s){switch(s){case C.a.DARK:return"vs-dark";case C.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const m={ThemingContribution:"base.contributions.theming"};class u{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new k.b}onColorThemeChange(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),Object(R.i)(()=>{const i=this.themingParticipants.indexOf(s);this.themingParticipants.splice(i,1)})}getThemingParticipants(){return this.themingParticipants}}let a=new u;p.a.add(m.ThemingContribution,a);function r(s){return a.onColorThemeChange(s)}class o extends R.a{constructor(s){super();this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(i=>this.onThemeChange(i)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}}},ulZh:function(Be,oe,M){typeof window!="undefined"&&function(k,R){Be.exports=R()}(this,function(){return function(te){var k={};function R(B){if(k[B])return k[B].exports;var p=k[B]={i:B,l:!1,exports:{}};return te[B].call(p.exports,p,p.exports,R),p.l=!0,p.exports}return R.m=te,R.c=k,R.d=function(B,p,C){R.o(B,p)||Object.defineProperty(B,p,{enumerable:!0,get:C})},R.r=function(B){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},R.t=function(B,p){if(p&1&&(B=R(B)),p&8)return B;if(p&4&&typeof B=="object"&&B&&B.__esModule)return B;var C=Object.create(null);if(R.r(C),Object.defineProperty(C,"default",{enumerable:!0,value:B}),p&2&&typeof B!="string")for(var H in B)R.d(C,H,function(N){return B[N]}.bind(null,H));return C},R.n=function(B){var p=B&&B.__esModule?function(){return B.default}:function(){return B};return R.d(p,"a",p),p},R.o=function(B,p){return Object.prototype.hasOwnProperty.call(B,p)},R.p="/dist/",R(R.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(te,k,R){"use strict";var B=Object.prototype.hasOwnProperty,p="~";function C(){}Object.create&&(C.prototype=Object.create(null),new C().__proto__||(p=!1));function H(g,m,u){this.fn=g,this.context=m,this.once=u||!1}function N(g,m,u,a,r){if(typeof u!="function")throw new TypeError("The listener must be a function");var o=new H(u,a||g,r),s=p?p+m:m;return g._events[s]?g._events[s].fn?g._events[s]=[g._events[s],o]:g._events[s].push(o):(g._events[s]=o,g._eventsCount++),g}function e(g,m){--g._eventsCount===0?g._events=new C:delete g._events[m]}function A(){this._events=new C,this._eventsCount=0}A.prototype.eventNames=function(){var m=[],u,a;if(this._eventsCount===0)return m;for(a in u=this._events)B.call(u,a)&&m.push(p?a.slice(1):a);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(u)):m},A.prototype.listeners=function(m){var u=p?p+m:m,a=this._events[u];if(!a)return[];if(a.fn)return[a.fn];for(var r=0,o=a.length,s=new Array(o);r<o;r++)s[r]=a[r].fn;return s},A.prototype.listenerCount=function(m){var u=p?p+m:m,a=this._events[u];return a?a.fn?1:a.length:0},A.prototype.emit=function(m,u,a,r,o,s){var i=p?p+m:m;if(!this._events[i])return!1;var n=this._events[i],t=arguments.length,_,b;if(n.fn){n.once&&this.removeListener(m,n.fn,void 0,!0);switch(t){case 1:return n.fn.call(n.context),!0;case 2:return n.fn.call(n.context,u),!0;case 3:return n.fn.call(n.context,u,a),!0;case 4:return n.fn.call(n.context,u,a,r),!0;case 5:return n.fn.call(n.context,u,a,r,o),!0;case 6:return n.fn.call(n.context,u,a,r,o,s),!0}for(b=1,_=new Array(t-1);b<t;b++)_[b-1]=arguments[b];n.fn.apply(n.context,_)}else{var v=n.length,x;for(b=0;b<v;b++){n[b].once&&this.removeListener(m,n[b].fn,void 0,!0);switch(t){case 1:n[b].fn.call(n[b].context);break;case 2:n[b].fn.call(n[b].context,u);break;case 3:n[b].fn.call(n[b].context,u,a);break;case 4:n[b].fn.call(n[b].context,u,a,r);break;default:if(!_)for(x=1,_=new Array(t-1);x<t;x++)_[x-1]=arguments[x];n[b].fn.apply(n[b].context,_)}}}return!0},A.prototype.on=function(m,u,a){return N(this,m,u,a,!1)},A.prototype.once=function(m,u,a){return N(this,m,u,a,!0)},A.prototype.removeListener=function(m,u,a,r){var o=p?p+m:m;if(!this._events[o])return this;if(!u)return e(this,o),this;var s=this._events[o];if(s.fn)s.fn===u&&(!r||s.once)&&(!a||s.context===a)&&e(this,o);else{for(var i=0,n=[],t=s.length;i<t;i++)(s[i].fn!==u||r&&!s[i].once||a&&s[i].context!==a)&&n.push(s[i]);n.length?this._events[o]=n.length===1?n[0]:n:e(this,o)}return this},A.prototype.removeAllListeners=function(m){var u;return m?(u=p?p+m:m,this._events[u]&&e(this,u)):(this._events=new C,this._eventsCount=0),this},A.prototype.off=A.prototype.removeListener,A.prototype.addListener=A.prototype.on,A.prefixed=p,A.EventEmitter=A,te.exports=A},"./node_modules/url-toolkit/src/url-toolkit.js":function(te,k,R){(function(B){var p=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,C=/^([^\/?#]*)([^]*)$/,H=/(?:\/|^)\.(?=\/)/g,N=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(A,g,m){if(m=m||{},A=A.trim(),g=g.trim(),!g){if(!m.alwaysNormalize)return A;var u=e.parseURL(A);if(!u)throw new Error("Error trying to parse base URL.");return u.path=e.normalizePath(u.path),e.buildURLFromParts(u)}var a=e.parseURL(g);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return m.alwaysNormalize?(a.path=e.normalizePath(a.path),e.buildURLFromParts(a)):g;var r=e.parseURL(A);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&r.path[0]!=="/"){var o=C.exec(r.path);r.netLoc=o[1],r.path=o[2]}r.netLoc&&!r.path&&(r.path="/");var s={scheme:r.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(s.netLoc=r.netLoc,a.path[0]!=="/"))if(!a.path)s.path=r.path,a.params||(s.params=r.params,a.query||(s.query=r.query));else{var i=r.path,n=i.substring(0,i.lastIndexOf("/")+1)+a.path;s.path=e.normalizePath(n)}return s.path===null&&(s.path=m.alwaysNormalize?e.normalizePath(a.path):a.path),e.buildURLFromParts(s)},parseURL:function(A){var g=p.exec(A);return g?{scheme:g[1]||"",netLoc:g[2]||"",path:g[3]||"",params:g[4]||"",query:g[5]||"",fragment:g[6]||""}:null},normalizePath:function(A){for(A=A.split("").reverse().join("").replace(H,"");A.length!==(A=A.replace(N,"")).length;);return A.split("").reverse().join("")},buildURLFromParts:function(A){return A.scheme+A.netLoc+A.path+A.params+A.query+A.fragment}};te.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(te,k,R){function B(m){var u={};function a(o){if(u[o])return u[o].exports;var s=u[o]={i:o,l:!1,exports:{}};return m[o].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=m,a.c=u,a.i=function(o){return o},a.d=function(o,s,i){a.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:i})},a.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},a.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(s,"a",s),s},a.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},a.p="/",a.oe=function(o){throw console.error(o),o};var r=a(a.s=ENTRY_MODULE);return r.default||r}var p="[\\.|\\-|\\+|\\w|/|@]+",C="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+p+").*?\\)";function H(m){return(m+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function N(m){return!isNaN(1*m)}function e(m,u,a){var r={};r[a]=[];var o=u.toString(),s=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return r;for(var i=s[1],n=new RegExp("(\\\\n|\\W)"+H(i)+C,"g"),t;t=n.exec(o);){if(t[3]==="dll-reference")continue;r[a].push(t[3])}for(n=new RegExp("\\("+H(i)+'\\("(dll-reference\\s('+p+'))"\\)\\)'+C,"g");t=n.exec(o);)m[t[2]]||(r[a].push(t[1]),m[t[2]]=R(t[1]).m),r[t[2]]=r[t[2]]||[],r[t[2]].push(t[4]);for(var _=Object.keys(r),b=0;b<_.length;b++)for(var v=0;v<r[_[b]].length;v++)N(r[_[b]][v])&&(r[_[b]][v]=1*r[_[b]][v]);return r}function A(m){var u=Object.keys(m);return u.reduce(function(a,r){return a||m[r].length>0},!1)}function g(m,u){for(var a={main:[u]},r={main:[]},o={main:{}};A(a);)for(var s=Object.keys(a),i=0;i<s.length;i++){var n=s[i],t=a[n],_=t.pop();if(o[n]=o[n]||{},o[n][_]||!m[n][_])continue;o[n][_]=!0,r[n]=r[n]||[],r[n].push(_);for(var b=e(m,m[n][_],n),v=Object.keys(b),x=0;x<v.length;x++)a[v[x]]=a[v[x]]||[],a[v[x]]=a[v[x]].concat(b[v[x]])}return r}te.exports=function(m,u){u=u||{};var a={main:R.m},r=u.all?{main:Object.keys(a.main)}:g(a,m),o="";Object.keys(r).filter(function(_){return _!=="main"}).forEach(function(_){for(var b=0;r[_][b];)b++;r[_].push(b),a[_][b]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+_+" = ("+B.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+r[_].map(function(v){return""+JSON.stringify(v)+": "+a[_][v].toString()}).join(",")+`});
|
|
`}),o=o+"new (("+B.toString().replace("ENTRY_MODULE",JSON.stringify(m))+")({"+r.main.map(function(_){return""+JSON.stringify(_)+": "+a.main[_].toString()}).join(",")+"}))(self);";var s=new window.Blob([o],{type:"text/javascript"});if(u.bare)return s;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,n=i.createObjectURL(s),t=new window.Worker(n);return t.objectURL=n,t}},"./src/config.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"hlsDefaultConfig",function(){return x}),R.d(k,"mergeConfig",function(){return h}),R.d(k,"enableStreamingMode",function(){return d});var B=R("./src/controller/abr-controller.ts"),p=R("./src/controller/audio-stream-controller.ts"),C=R("./src/controller/audio-track-controller.ts"),H=R("./src/controller/subtitle-stream-controller.ts"),N=R("./src/controller/subtitle-track-controller.ts"),e=R("./src/controller/buffer-controller.ts"),A=R("./src/controller/timeline-controller.ts"),g=R("./src/controller/cap-level-controller.ts"),m=R("./src/controller/fps-controller.ts"),u=R("./src/controller/eme-controller.ts"),a=R("./src/controller/cmcd-controller.ts"),r=R("./src/utils/xhr-loader.ts"),o=R("./src/utils/fetch-loader.ts"),s=R("./src/utils/cues.ts"),i=R("./src/utils/mediakeys-helper.ts"),n=R("./src/utils/logger.ts");function t(){return t=Object.assign||function(l){for(var c=1;c<arguments.length;c++){var y=arguments[c];for(var f in y)Object.prototype.hasOwnProperty.call(y,f)&&(l[f]=y[f])}return l},t.apply(this,arguments)}function _(l,c){var y=Object.keys(l);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(l);c&&(f=f.filter(function(T){return Object.getOwnPropertyDescriptor(l,T).enumerable})),y.push.apply(y,f)}return y}function b(l){for(var c=1;c<arguments.length;c++){var y=arguments[c]!=null?arguments[c]:{};c%2?_(Object(y),!0).forEach(function(f){v(l,f,y[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(y)):_(Object(y)).forEach(function(f){Object.defineProperty(l,f,Object.getOwnPropertyDescriptor(y,f))})}return l}function v(l,c,y){return c in l?Object.defineProperty(l,c,{value:y,enumerable:!0,configurable:!0,writable:!0}):l[c]=y,l}var x=b(b({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:r.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:B.default,bufferController:e.default,capLevelController:g.default,fpsController:m.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:i.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},E()),{},{subtitleStreamController:H.SubtitleStreamController,subtitleTrackController:N.default,timelineController:A.TimelineController,audioStreamController:p.default,audioTrackController:C.default,emeController:u.default,cmcdController:a.default});function E(){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(l,c){if((c.liveSyncDurationCount||c.liveMaxLatencyDurationCount)&&(c.liveSyncDuration||c.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(c.liveMaxLatencyDurationCount!==void 0&&(c.liveSyncDurationCount===void 0||c.liveMaxLatencyDurationCount<=c.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(c.liveMaxLatencyDuration!==void 0&&(c.liveSyncDuration===void 0||c.liveMaxLatencyDuration<=c.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},l,c)}function d(l){var c=l.loader;if(c!==o.default&&c!==r.default)n.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),l.progressive=!1;else{var y=Object(o.fetchSupported)();y&&(l.loader=o.default,l.progressive=!0,l.enableSoftwareAES=!0,n.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/polyfills/number.ts"),p=R("./src/utils/ewma-bandwidth-estimator.ts"),C=R("./src/events.ts"),H=R("./src/utils/buffer-helper.ts"),N=R("./src/errors.ts"),e=R("./src/types/loader.ts"),A=R("./src/utils/logger.ts");function g(a,r){for(var o=0;o<r.length;o++){var s=r[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function m(a,r,o){return r&&g(a.prototype,r),o&&g(a,o),a}var u=function(){function a(o){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=o;var s=o.config;this.bwEstimator=new p.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var r=a.prototype;return r.registerListeners=function(){var s=this.hls;s.on(C.Events.FRAG_LOADING,this.onFragLoading,this),s.on(C.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(C.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var s=this.hls;s.off(C.Events.FRAG_LOADING,this.onFragLoading,this),s.off(C.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(C.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(s,i){var n=i.frag;if(n.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=n,this.partCurrent=(t=i.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},r.onLevelLoaded=function(s,i){var n=this.hls.config;i.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var s=this.fragCurrent,i=this.partCurrent,n=this.hls,t=n.autoLevelEnabled,_=n.config,b=n.media;if(!s||!b)return;var v=i?i.stats:s.stats,x=i?i.duration:s.duration;if(v.aborted){A.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||b.paused||!b.playbackRate||!b.readyState)return;var E=performance.now()-v.loading.start,h=Math.abs(b.playbackRate);if(E<=500*x/h)return;var d=n.levels,l=n.minAutoLevel,c=d[s.level],y=v.total||Math.max(v.loaded,Math.round(x*c.maxBitrate/8)),f=Math.max(1,v.bwEstimate?v.bwEstimate/8:v.loaded*1e3/E),T=(y-v.loaded)/f,I=b.currentTime,P=(H.BufferHelper.bufferInfo(b,I,_.maxBufferHole).end-I)/h;if(P>=2*x/h||T<=P)return;var S=Number.POSITIVE_INFINITY,w;for(w=s.level-1;w>l;w--){var F=d[w].maxBitrate;if(S=x*F/(8*.8*f),S<P)break}if(S>=T)return;var L=this.bwEstimator.getEstimate();A.logger.warn("Fragment "+s.sn+(i?" part "+i.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+w+`
|
|
Current BW estimate: `+(Object(B.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+T.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+S.toFixed(3)+` s
|
|
Time to underbuffer: `+P.toFixed(3)+" s"),n.nextLoadLevel=w,this.bwEstimator.sample(E,v.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),n.trigger(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:i,stats:v})},r.onFragLoaded=function(s,i){var n=i.frag,t=i.part;if(n.type===e.PlaylistLevelType.MAIN&&Object(B.isFiniteNumber)(n.sn)){var _=t?t.stats:n.stats,b=t?t.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var v=this.hls.levels[n.level],x=(v.loaded?v.loaded.bytes:0)+_.loaded,E=(v.loaded?v.loaded.duration:0)+b;v.loaded={bytes:x,duration:E},v.realBitrate=Math.round(8*x/E)}if(n.bitrateTest){var h={stats:_,frag:n,part:t,id:n.type};this.onFragBuffered(C.Events.FRAG_BUFFERED,h),n.bitrateTest=!1}}},r.onFragBuffered=function(s,i){var n=i.frag,t=i.part,_=t?t.stats:n.stats;if(_.aborted)return;if(n.type!==e.PlaylistLevelType.MAIN||n.sn==="initSegment")return;var b=_.parsing.end-_.loading.start;this.bwEstimator.sample(b,_.loaded),_.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},r.onError=function(s,i){switch(i.details){case N.ErrorDetails.FRAG_LOAD_ERROR:case N.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var s=this.fragCurrent,i=this.partCurrent,n=this.hls,t=n.maxAutoLevel,_=n.config,b=n.minAutoLevel,v=n.media,x=i?i.duration:s?s.duration:0,E=v?v.currentTime:0,h=v&&v.playbackRate!==0?Math.abs(v.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():_.abrEwmaDefaultEstimate,l=(H.BufferHelper.bufferInfo(v,E,_.maxBufferHole).end-E)/h,c=this.findBestLevel(d,b,t,l,_.abrBandWidthFactor,_.abrBandWidthUpFactor);if(c>=0)return c;A.logger.trace((l?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var y=x?Math.min(x,_.maxStarvationDelay):_.maxStarvationDelay,f=_.abrBandWidthFactor,T=_.abrBandWidthUpFactor;if(!l){var I=this.bitrateTestDelay;if(I){var P=x?Math.min(x,_.maxLoadingDelay):_.maxLoadingDelay;y=P-I,A.logger.trace("bitrate test took "+Math.round(1e3*I)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*y)+" ms"),f=T=1}}return c=this.findBestLevel(d,b,t,l+y,f,T),Math.max(c,0)},r.findBestLevel=function(s,i,n,t,_,b){for(var v,x=this.fragCurrent,E=this.partCurrent,h=this.lastLoadedFragLevel,d=this.hls.levels,l=d[h],c=!!(l!=null&&(v=l.details)!==null&&v!==void 0&&v.live),y=l==null?void 0:l.codecSet,f=E?E.duration:x?x.duration:0,T=n;T>=i;T--){var I=d[T];if(!I||y&&I.codecSet!==y)continue;var P=I.details,S=(E?P==null?void 0:P.partTarget:P==null?void 0:P.averagetargetduration)||f,w=void 0;T<=h?w=_*s:w=b*s;var F=d[T].maxBitrate,L=F*S/w;if(A.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+T+"/"+Math.round(w)+"/"+F+"/"+S+"/"+t+"/"+L),w>F&&(!L||c&&!this.bitrateTestDelay||L<t))return T}return-1},m(a,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,i=this.bwEstimator;if(s!==-1&&(!i||!i.canEstimate()))return s;var n=this.getNextABRAutoLevel();return s!==-1&&(n=Math.min(s,n)),n},set:function(s){this._nextAutoLevel=s}}]),a}();k.default=u},"./src/controller/audio-stream-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/polyfills/number.ts"),p=R("./src/controller/base-stream-controller.ts"),C=R("./src/events.ts"),H=R("./src/utils/buffer-helper.ts"),N=R("./src/controller/fragment-tracker.ts"),e=R("./src/types/level.ts"),A=R("./src/types/loader.ts"),g=R("./src/loader/fragment.ts"),m=R("./src/demux/chunk-cache.ts"),u=R("./src/demux/transmuxer-interface.ts"),a=R("./src/types/transmuxer.ts"),r=R("./src/controller/fragment-finders.ts"),o=R("./src/utils/discontinuities.ts"),s=R("./src/errors.ts"),i=R("./src/utils/logger.ts");function n(){return n=Object.assign||function(x){for(var E=1;E<arguments.length;E++){var h=arguments[E];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(x[d]=h[d])}return x},n.apply(this,arguments)}function t(x,E){x.prototype=Object.create(E.prototype),x.prototype.constructor=x,_(x,E)}function _(x,E){return _=Object.setPrototypeOf||function(d,l){return d.__proto__=l,d},_(x,E)}var b=100,v=function(x){t(E,x);function E(d,l){var c;return c=x.call(this,d,l,"[audio-stream-controller]")||this,c.videoBuffer=null,c.videoTrackCC=-1,c.waitingVideoCC=-1,c.audioSwitch=!1,c.trackId=-1,c.waitingData=null,c.mainDetails=null,c.bufferFlushed=!1,c._registerListeners(),c}var h=E.prototype;return h.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},h._registerListeners=function(){var l=this.hls;l.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(C.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.on(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.on(C.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(C.Events.ERROR,this.onError,this),l.on(C.Events.BUFFER_RESET,this.onBufferReset,this),l.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this),l.on(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.on(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h._unregisterListeners=function(){var l=this.hls;l.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(C.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.off(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.off(C.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(C.Events.ERROR,this.onError,this),l.off(C.Events.BUFFER_RESET,this.onBufferReset,this),l.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),l.off(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.off(C.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h.onInitPtsFound=function(l,c){var y=c.frag,f=c.id,T=c.initPTS;if(f==="main"){var I=y.cc;this.initPTS[y.cc]=T,this.log("InitPTS for cc: "+I+" found from main: "+T),this.videoTrackCC=I,this.state===p.State.WAITING_INIT_PTS&&this.tick()}},h.startLoad=function(l){if(!this.levels){this.startPosition=l,this.state=p.State.STOPPED;return}var c=this.lastCurrentTime;this.stopLoad(),this.setInterval(b),this.fragLoadError=0,c>0&&l===-1?(this.log("Override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=p.State.IDLE):(this.loadedmetadata=!1,this.state=p.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()},h.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_TRACK:{var l,c=this.levels,y=this.trackId,f=c==null||((l=c[y])===null||l===void 0)?void 0:l.details;if(f){if(this.waitForCdnTuneIn(f))break;this.state=p.State.WAITING_INIT_PTS}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var T,I=performance.now(),P=this.retryDate;(!P||I>=P||(T=this.media)!==null&&T!==void 0&&T.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=p.State.IDLE);break}case p.State.WAITING_INIT_PTS:{var S=this.waitingData;if(S){var w=S.frag,F=S.part,L=S.cache,G=S.complete;if(this.initPTS[w.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.FRAG_LOADING;var Z=L.flush(),ue={frag:w,part:F,payload:Z,networkDetails:null};this._handleFragmentLoadProgress(ue),G&&x.prototype._handleFragmentLoadComplete.call(this,ue)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+w.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ce=this.getLoadPosition(),Re=H.BufferHelper.bufferInfo(this.mediaBuffer,ce,this.config.maxBufferHole),Ee=Object(r.fragmentWithinToleranceTest)(Re.end,this.config.maxFragLookUpTolerance,w);Ee<0&&(i.logger.log("Waiting fragment cc ("+w.cc+") @ "+w.start+" cancelled because another fragment at "+Re.end+" is needed"),this.clearWaitingFragment())}}else this.state=p.State.IDLE}}this.onTickEnd()},h.clearWaitingFragment=function(){var l=this.waitingData;l&&(this.fragmentTracker.removeFragment(l.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.IDLE)},h.onTickEnd=function(){var l=this.media;if(!l||!l.readyState)return;var c=this.mediaBuffer?this.mediaBuffer:l,y=c.buffered;!this.loadedmetadata&&y.length&&(this.loadedmetadata=!0),this.lastCurrentTime=l.currentTime},h.doTickIdle=function(){var l,c,y=this.hls,f=this.levels,T=this.media,I=this.trackId,P=y.config;if(!f||!f[I])return;if(!T&&(this.startFragRequested||!P.startFragPrefetch))return;var S=f[I],w=S.details;if(!w||w.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(w)){this.state=p.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,g.ElementaryStreamTypes.AUDIO,A.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,A.PlaylistLevelType.AUDIO);if(F===null)return;var L=F.len,G=this.getMaxBufferLength(),Z=this.audioSwitch;if(L>=G&&!Z)return;if(!Z&&this._streamEnded(F,w)){y.trigger(C.Events.BUFFER_EOS,{type:"audio"}),this.state=p.State.ENDED;return}var ue=w.fragments,ce=ue[0].start,Re=F.end;if(Z){var Ee=this.getLoadPosition();Re=Ee,w.PTSKnown&&Ee<ce&&((F.end>ce||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),T.currentTime=ce+.05))}var he=this.getNextFragment(Re,w);if(!he){this.bufferFlushed=!0;return}((l=he.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((c=he.decryptdata)!==null&&c!==void 0&&c.key)?this.loadKey(he,w):this.loadFragment(he,w,Re)},h.getMaxBufferLength=function(){var l=x.prototype.getMaxBufferLength.call(this),c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,A.PlaylistLevelType.MAIN);return c===null?l:Math.max(l,c.len)},h.onMediaDetaching=function(){this.videoBuffer=null,x.prototype.onMediaDetaching.call(this)},h.onAudioTracksUpdated=function(l,c){var y=c.audioTracks;this.resetTransmuxer(),this.levels=y.map(function(f){return new e.Level(f)})},h.onAudioTrackSwitching=function(l,c){var y=!!c.url;this.trackId=c.id;var f=this.fragCurrent;f!=null&&f.loader&&f.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),y?this.setInterval(b):this.resetTransmuxer(),y?(this.audioSwitch=!0,this.state=p.State.IDLE):this.state=p.State.STOPPED,this.tick()},h.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},h.onLevelLoaded=function(l,c){this.mainDetails=c.details},h.onAudioTrackLoaded=function(l,c){var y,f=this.levels,T=c.details,I=c.id;if(!f){this.warn("Audio tracks were reset while loading level "+I);return}this.log("Track "+I+" loaded ["+T.startSN+","+T.endSN+"],duration:"+T.totalduration);var P=f[I],S=0;if(T.live||(y=P.details)!==null&&y!==void 0&&y.live){var w=this.mainDetails;if(T.fragments[0]||(T.deltaUpdateFailed=!0),T.deltaUpdateFailed||!w)return;!P.details&&T.hasProgramDateTime&&w.hasProgramDateTime?(Object(o.alignMediaPlaylistByPDT)(T,w),S=T.fragments[0].start):S=this.alignPlaylists(T,P.details)}P.details=T,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!T.live)&&this.setStartPosition(P.details,S),this.state===p.State.WAITING_TRACK&&!this.waitForCdnTuneIn(T)&&(this.state=p.State.IDLE),this.tick()},h._handleFragmentLoadProgress=function(l){var c,y=l.frag,f=l.part,T=l.payload,I=this.config,P=this.trackId,S=this.levels;if(!S){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+y.sn+" of level "+y.level+" will not be buffered");return}var w=S[P];console.assert(w,"Audio track is defined on fragment load progress");var F=w.details;console.assert(F,"Audio track details are defined on fragment load progress");var L=I.defaultAudioCodec||w.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new u.default(this.hls,A.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Z=this.initPTS[y.cc],ue=(c=y.initSegment)===null||c===void 0?void 0:c.data;if(Z!==void 0){var ce=!1,Re=f?f.index:-1,Ee=Re!==-1,he=new a.ChunkMetadata(y.level,y.sn,y.stats.chunkCount,T.byteLength,Re,Ee);G.push(T,ue,L,"",y,f,F.totalduration,ce,he,Z)}else{i.logger.log("Unknown video PTS for cc "+y.cc+", waiting for video PTS before demuxing audio frag "+y.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+P);var we=this.waitingData=this.waitingData||{frag:y,part:f,cache:new m.default,complete:!1},Pe=we.cache;Pe.push(new Uint8Array(T)),this.waitingVideoCC=this.videoTrackCC,this.state=p.State.WAITING_INIT_PTS}},h._handleFragmentLoadComplete=function(l){if(this.waitingData){this.waitingData.complete=!0;return}x.prototype._handleFragmentLoadComplete.call(this,l)},h.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},h.onBufferCreated=function(l,c){var y=c.tracks.audio;y&&(this.mediaBuffer=y.buffer),c.tracks.video&&(this.videoBuffer=c.tracks.video.buffer)},h.onFragBuffered=function(l,c){var y=c.frag,f=c.part;if(y.type!==A.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(y)){this.warn("Fragment "+y.sn+(f?" p: "+f.index:"")+" of level "+y.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}y.sn!=="initSegment"&&(this.fragPrevious=y,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(y,f)},h.onError=function(l,c){switch(c.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,c);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==p.State.ERROR&&this.state!==p.State.STOPPED&&(this.state=c.fatal?p.State.ERROR:p.State.IDLE,this.warn(c.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(c.parent==="audio"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var y=!0,f=this.getFwdBufferInfo(this.mediaBuffer,A.PlaylistLevelType.AUDIO);f&&f.len>.5&&(y=!this.reduceMaxBufferLength(f.len)),y&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},h.onBufferFlushed=function(l,c){var y=c.type;y===g.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},h._handleTransmuxComplete=function(l){var c,y="audio",f=this.hls,T=l.remuxResult,I=l.chunkMeta,P=this.getCurrentContext(I);if(!P){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var S=P.frag,w=P.part,F=T.audio,L=T.text,G=T.id3,Z=T.initSegment;if(this.fragContextChanged(S))return;if(this.state=p.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),Z!=null&&Z.tracks&&(this._bufferInitSegment(Z.tracks,S,I),f.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:S,id:y,tracks:Z.tracks})),F){var ue=F.startPTS,ce=F.endPTS,Re=F.startDTS,Ee=F.endDTS;w&&(w.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:ce,startDTS:Re,endDTS:Ee}),S.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,ue,ce,Re,Ee),this.bufferFragmentData(F,S,w,I)}if(G!=null&&(c=G.samples)!==null&&c!==void 0&&c.length){var he=n({frag:S,id:y},G);f.trigger(C.Events.FRAG_PARSING_METADATA,he)}if(L){var we=n({frag:S,id:y},L);f.trigger(C.Events.FRAG_PARSING_USERDATA,we)}},h._bufferInitSegment=function(l,c,y){if(this.state!==p.State.PARSING)return;l.video&&delete l.video;var f=l.audio;if(!f)return;f.levelCodec=f.codec,f.id="audio",this.log("Init audio buffer, container:"+f.container+", codecs[parsed]=["+f.codec+"]"),this.hls.trigger(C.Events.BUFFER_CODECS,l);var T=f.initSegment;if(T!=null&&T.byteLength){var I={type:"audio",frag:c,part:null,chunkMeta:y,parent:c.type,data:T};this.hls.trigger(C.Events.BUFFER_APPENDING,I)}this.tick()},h.loadFragment=function(l,c,y){var f=this.fragmentTracker.getState(l);this.fragCurrent=l,(this.audioSwitch||f===N.FragmentState.NOT_LOADED||f===N.FragmentState.PARTIAL)&&(l.sn==="initSegment"?this._loadInitSegment(l):c.live&&!Object(B.isFiniteNumber)(this.initPTS[l.cc])?(this.log("Waiting for video PTS in continuity counter "+l.cc+" of live stream before loading audio fragment "+l.sn+" of level "+this.trackId),this.state=p.State.WAITING_INIT_PTS):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,l,c,y)))},h.completeAudioSwitch=function(){var l=this.hls,c=this.media,y=this.trackId;c&&(this.log("Switching audio track : flushing all audio"),x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,l.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:y})},E}(p.default);k.default=v},"./src/controller/audio-track-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/events.ts"),p=R("./src/errors.ts"),C=R("./src/controller/base-playlist-controller.ts"),H=R("./src/types/loader.ts");function N(u,a){for(var r=0;r<a.length;r++){var o=a[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}function e(u,a,r){return a&&N(u.prototype,a),r&&N(u,r),u}function A(u,a){u.prototype=Object.create(a.prototype),u.prototype.constructor=u,g(u,a)}function g(u,a){return g=Object.setPrototypeOf||function(o,s){return o.__proto__=s,o},g(u,a)}var m=function(u){A(a,u);function a(o){var s;return s=u.call(this,o,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var r=a.prototype;return r.registerListeners=function(){var s=this.hls;s.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(B.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(B.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var s=this.hls;s.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(B.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(B.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(B.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,u.prototype.destroy.call(this)},r.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},r.onManifestParsed=function(s,i){this.tracks=i.audioTracks||[]},r.onAudioTrackLoaded=function(s,i){var n=i.id,t=i.details,_=this.tracksInGroup[n];if(!_){this.warn("Invalid audio track id "+n);return}var b=_.details;_.details=i.details,this.log("audioTrack "+n+" loaded ["+t.startSN+"-"+t.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,i,b))},r.onLevelLoading=function(s,i){this.switchLevel(i.level)},r.onLevelSwitching=function(s,i){this.switchLevel(i.level)},r.switchLevel=function(s){var i=this.hls.levels[s];if(!(i!=null&&i.audioGroupIds))return;var n=i.audioGroupIds[i.urlId];if(this.groupId!==n){this.groupId=n;var t=this.tracks.filter(function(b){return!n||b.groupId===n});this.selectDefaultTrack&&!t.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var _={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(B.Events.AUDIO_TRACKS_UPDATED,_),this.selectInitialTrack()}},r.onError=function(s,i){if(u.prototype.onError.call(this,s,i),i.fatal||!i.context)return;i.context.type===H.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},r.setAudioTrack=function(s){var i=this.tracksInGroup;if(s<0||s>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var n=i[this.trackId];this.log("Now switching to audio-track index "+s);var t=i[s],_=t.id,b=t.groupId,v=b===void 0?"":b,x=t.name,E=t.type,h=t.url;if(this.trackId=s,this.trackName=x,this.selectDefaultTrack=!1,this.hls.trigger(B.Events.AUDIO_TRACK_SWITCHING,{id:_,groupId:v,name:x,type:E,url:h}),t.details&&!t.details.live)return;var d=this.switchParams(t.url,n==null?void 0:n.details);this.loadPlaylist(d)},r.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,n=this.findTrackId(i)||this.findTrackId();n!==-1?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},r.findTrackId=function(s){for(var i=this.tracksInGroup,n=0;n<i.length;n++){var t=i[n];if((!this.selectDefaultTrack||t.default)&&(!s||s===t.name))return t.id}return-1},r.loadPlaylist=function(s){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var n=i.id,t=i.groupId,_=i.url;if(s)try{_=s.addDirectives(_)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(B.Events.AUDIO_TRACK_LOADING,{url:_,id:n,groupId:t,deliveryDirectives:s||null})}},e(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),a}(C.default);k.default=m},"./src/controller/base-playlist-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return e});var B=R("./src/polyfills/number.ts"),p=R("./src/types/level.ts"),C=R("./src/controller/level-helper.ts"),H=R("./src/utils/logger.ts"),N=R("./src/errors.ts"),e=function(){function A(m,u){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,u+":"),this.warn=H.logger.warn.bind(H.logger,u+":"),this.hls=m}var g=A.prototype;return g.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},g.onError=function(u,a){a.fatal&&a.type===N.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},g.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},g.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},g.stopLoad=function(){this.canLoad=!1,this.clearTimer()},g.switchParams=function(u,a){var r=a==null?void 0:a.renditionReports;if(r)for(var o=0;o<r.length;o++){var s=r[o],i=""+s.URI;if(i===u.substr(-i.length)){var n=parseInt(s["LAST-MSN"]),t=parseInt(s["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var _=Math.min(a.age-a.partTarget,a.targetduration);t!==void 0&&_>a.partTarget&&(t+=1)}if(Object(B.isFiniteNumber)(n))return new p.HlsUrlParameters(n,Object(B.isFiniteNumber)(t)?t:void 0,p.HlsSkip.No)}}},g.loadPlaylist=function(u){},g.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},g.playlistLoaded=function(u,a,r){var o=this,s=a.details,i=a.stats,n=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(s.advancedDateTime=Date.now()-n,s.live||r!=null&&r.live){if(s.reloaded(r),r&&this.log("live playlist "+u+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),r&&s.fragments.length>0&&Object(C.mergeDetails)(r,s),!this.canLoad||!s.live)return;var t,_=void 0,b=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var v=this.hls.config.lowLatencyMode,x=s.lastPartSn,E=s.endSN,h=s.lastPartIndex,d=h!==-1,l=x===E,c=v?0:h;d?(_=l?E+1:x,b=l?c:h+1):_=E+1;var y=s.age,f=y+s.ageHeader,T=Math.min(f-s.partTarget,s.targetduration*1.5);if(T>0){if(r&&T>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+T+" with playlist age: "+s.age),T=0;else{var I=Math.floor(T/s.targetduration);if(_+=I,b!==void 0){var P=Math.round(T%s.targetduration/s.partTarget);b+=P}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+y.toFixed(2)+"s goal: "+T+" skip sn "+I+" to part "+b)}s.tuneInGoal=T}if(t=this.getDeliveryDirectives(s,a.deliveryDirectives,_,b),v||!l){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(s,a.deliveryDirectives,_,b);var S=Object(C.computeReloadInterval)(s,i);_!==void 0&&s.canBlockReload&&(S-=s.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout(function(){return o.loadPlaylist(t)},S)}else this.clearTimer()},g.getDeliveryDirectives=function(u,a,r,o){var s=Object(p.getSkipValue)(u,r);return a!=null&&a.skip&&u.deltaUpdateFailed&&(r=a.msn,o=a.part,s=p.HlsSkip.No),new p.HlsUrlParameters(r,o,s)},g.retryLoadingOrFail=function(u){var a=this,r=this.hls.config,o=this.retryCount<r.levelLoadingMaxRetry;if(o){var s;if(this.retryCount++,u.details.indexOf("LoadTimeOut")>-1&&(s=u.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+u.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+u.details+'"')}}else this.warn('cannot recover from error "'+u.details+'"'),this.clearTimer(),u.fatal=!0;return o},A}()},"./src/controller/base-stream-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"State",function(){return E}),R.d(k,"default",function(){return h});var B=R("./src/polyfills/number.ts"),p=R("./src/task-loop.ts"),C=R("./src/controller/fragment-tracker.ts"),H=R("./src/utils/buffer-helper.ts"),N=R("./src/utils/logger.ts"),e=R("./src/events.ts"),A=R("./src/errors.ts"),g=R("./src/types/transmuxer.ts"),m=R("./src/utils/mp4-tools.ts"),u=R("./src/utils/discontinuities.ts"),a=R("./src/controller/fragment-finders.ts"),r=R("./src/controller/level-helper.ts"),o=R("./src/loader/fragment-loader.ts"),s=R("./src/crypt/decrypter.ts"),i=R("./src/utils/time-ranges.ts"),n=R("./src/types/loader.ts");function t(d,l){for(var c=0;c<l.length;c++){var y=l[c];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(d,y.key,y)}}function _(d,l,c){return l&&t(d.prototype,l),c&&t(d,c),d}function b(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function v(d,l){d.prototype=Object.create(l.prototype),d.prototype.constructor=d,x(d,l)}function x(d,l){return x=Object.setPrototypeOf||function(y,f){return y.__proto__=f,y},x(d,l)}var E={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(d){v(l,d);function l(y,f,T){var I;return I=d.call(this)||this,I.hls=void 0,I.fragPrevious=null,I.fragCurrent=null,I.fragmentTracker=void 0,I.transmuxer=null,I._state=E.STOPPED,I.media=void 0,I.mediaBuffer=void 0,I.config=void 0,I.bitrateTest=!1,I.lastCurrentTime=0,I.nextLoadPosition=0,I.startPosition=0,I.loadedmetadata=!1,I.fragLoadError=0,I.retryDate=0,I.levels=null,I.fragmentLoader=void 0,I.levelLastLoaded=null,I.startFragRequested=!1,I.decrypter=void 0,I.initPTS=[],I.onvseeking=null,I.onvended=null,I.logPrefix="",I.log=void 0,I.warn=void 0,I.logPrefix=T,I.log=N.logger.log.bind(N.logger,T+":"),I.warn=N.logger.warn.bind(N.logger,T+":"),I.hls=y,I.fragmentLoader=new o.default(y.config),I.fragmentTracker=f,I.config=y.config,I.decrypter=new s.default(y,y.config),y.on(e.Events.KEY_LOADED,I.onKeyLoaded,b(I)),I}var c=l.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(f){},c.stopLoad=function(){this.fragmentLoader.abort();var f=this.fragCurrent;f&&this.fragmentTracker.removeFragment(f),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=E.STOPPED},c._streamEnded=function(f,T){var I=this.fragCurrent,P=this.fragmentTracker;if(!T.live&&I&&I.sn===T.endSN&&!f.nextStart){var S=P.getState(I);return S===C.FragmentState.PARTIAL||S===C.FragmentState.OK}return!1},c.onMediaAttached=function(f,T){var I=this.media=this.mediaBuffer=T.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),I.addEventListener("seeking",this.onvseeking),I.addEventListener("ended",this.onvended);var P=this.config;this.levels&&P.autoStartLoad&&this.state===E.STOPPED&&this.startLoad(P.startPosition)},c.onMediaDetaching=function(){var f=this.media;f!=null&&f.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),f&&(f.removeEventListener("seeking",this.onvseeking),f.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var f=this.config,T=this.fragCurrent,I=this.media,P=this.mediaBuffer,S=this.state,w=I?I.currentTime:0,F=H.BufferHelper.bufferInfo(P||I,w,f.maxBufferHole);if(this.log("media seeking to "+(Object(B.isFiniteNumber)(w)?w.toFixed(3):w)+", state: "+S),S===E.ENDED)this.resetLoadingState();else if(T&&!F.len){var L=f.maxFragLookUpTolerance,G=T.start-L,Z=T.start+T.duration+L,ue=w>Z;(w<G||ue)&&(ue&&T.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),T.loader.abort()),this.resetLoadingState())}I&&(this.lastCurrentTime=w),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=w),this.tickImmediate()},c.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},c.onKeyLoaded=function(f,T){if(this.state!==E.KEY_LOADING||T.frag!==this.fragCurrent||!this.levels)return;this.state=E.IDLE;var I=this.levels[T.frag.level].details;I&&this.loadFragment(T.frag,I,T.frag.start)},c.onHandlerDestroying=function(){this.stopLoad(),d.prototype.onHandlerDestroying.call(this)},c.onHandlerDestroyed=function(){this.state=E.STOPPED,this.hls.off(e.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,d.prototype.onHandlerDestroyed.call(this)},c.loadKey=function(f,T){this.log("Loading key for "+f.sn+" of ["+T.startSN+"-"+T.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+f.level),this.state=E.KEY_LOADING,this.fragCurrent=f,this.hls.trigger(e.Events.KEY_LOADING,{frag:f})},c.loadFragment=function(f,T,I){this._loadFragForPlayback(f,T,I)},c._loadFragForPlayback=function(f,T,I){var P=this,S=function(F){if(P.fragContextChanged(f)){P.warn("Fragment "+f.sn+(F.part?" p: "+F.part.index:"")+" of level "+f.level+" was dropped during download."),P.fragmentTracker.removeFragment(f);return}f.stats.chunkCount++,P._handleFragmentLoadProgress(F)};this._doFragLoad(f,T,I,S).then(function(w){if(!w)return;P.fragLoadError=0;var F=P.state;if(P.fragContextChanged(f)){(F===E.FRAG_LOADING||F===E.BACKTRACKING||!P.fragCurrent&&F===E.PARSING)&&(P.fragmentTracker.removeFragment(f),P.state=E.IDLE);return}if("payload"in w&&(P.log("Loaded fragment "+f.sn+" of level "+f.level),P.hls.trigger(e.Events.FRAG_LOADED,w),P.state===E.BACKTRACKING)){P.fragmentTracker.backtrack(f,w),P.resetFragmentLoading(f);return}P._handleFragmentLoadComplete(w)}).catch(function(w){P.warn(w),P.resetFragmentLoading(f)})},c.flushMainBuffer=function(f,T,I){if(I===void 0&&(I=null),!(f-T))return;var P={startOffset:f,endOffset:T,type:I};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,P)},c._loadInitSegment=function(f){var T=this;this._doFragLoad(f).then(function(I){if(!I||T.fragContextChanged(f)||!T.levels)throw new Error("init load aborted");return I}).then(function(I){var P=T.hls,S=I.payload,w=f.decryptdata;if(S&&S.byteLength>0&&w&&w.key&&w.iv&&w.method==="AES-128"){var F=self.performance.now();return T.decrypter.webCryptoDecrypt(new Uint8Array(S),w.key.buffer,w.iv.buffer).then(function(L){var G=self.performance.now();return P.trigger(e.Events.FRAG_DECRYPTED,{frag:f,payload:L,stats:{tstart:F,tdecrypt:G}}),I.payload=L,I})}return I}).then(function(I){var P=T.fragCurrent,S=T.hls,w=T.levels;if(!w)throw new Error("init load aborted, missing levels");var F=w[f.level].details;console.assert(F,"Level details are defined when init segment is loaded");var L=f.stats;T.state=E.IDLE,T.fragLoadError=0,f.data=new Uint8Array(I.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),I.frag===P&&S.trigger(e.Events.FRAG_BUFFERED,{stats:L,frag:P,part:null,id:f.type}),T.tick()}).catch(function(I){T.warn(I),T.resetFragmentLoading(f)})},c.fragContextChanged=function(f){var T=this.fragCurrent;return!f||!T||f.level!==T.level||f.sn!==T.sn||f.urlId!==T.urlId},c.fragBufferedComplete=function(f,T){var I=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+f.type+" sn: "+f.sn+(T?" part: "+T.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+f.level+" "+i.default.toString(H.BufferHelper.getBuffered(I))),this.state=E.IDLE,this.tick()},c._handleFragmentLoadComplete=function(f){var T=this.transmuxer;if(!T)return;var I=f.frag,P=f.part,S=f.partsLoaded,w=!S||S.length===0||S.some(function(L){return!L}),F=new g.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,P?P.index:-1,!w);T.flush(F)},c._handleFragmentLoadProgress=function(f){},c._doFragLoad=function(f,T,I,P){var S=this;if(I===void 0&&(I=null),!this.levels)throw new Error("frag load aborted, missing levels");if(I=Math.max(f.start,I||0),this.config.lowLatencyMode&&T){var w=T.partList;if(w&&P){I>f.end&&T.fragmentHint&&(f=T.fragmentHint);var F=this.getNextPart(w,f,I);if(F>-1){var L=w[F];return this.log("Loading part sn: "+f.sn+" p: "+L.index+" cc: "+f.cc+" of playlist ["+T.startSN+"-"+T.endSN+"] parts [0-"+F+"-"+(w.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+f.level+", target: "+parseFloat(I.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=E.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:f,part:w[F],targetBufferTime:I}),this.doFragPartsLoad(f,w,F,P).catch(function(G){return S.handleFragLoadError(G)})}else if(!f.url||this.loadedEndOfParts(w,I))return Promise.resolve(null)}}return this.log("Loading fragment "+f.sn+" cc: "+f.cc+" "+(T?"of ["+T.startSN+"-"+T.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+f.level+", target: "+parseFloat(I.toFixed(3))),Object(B.isFiniteNumber)(f.sn)&&!this.bitrateTest&&(this.nextLoadPosition=f.start+f.duration),this.state=E.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:f,targetBufferTime:I}),this.fragmentLoader.load(f,P).catch(function(G){return S.handleFragLoadError(G)})},c.doFragPartsLoad=function(f,T,I,P){var S=this;return new Promise(function(w,F){var L=[],G=function Z(ue){var ce=T[ue];S.fragmentLoader.loadPart(f,ce,P).then(function(Re){L[ce.index]=Re;var Ee=Re.part;S.hls.trigger(e.Events.FRAG_LOADED,Re);var he=T[ue+1];if(he&&he.fragment===f)Z(ue+1);else return w({frag:f,part:Ee,partsLoaded:L})}).catch(F)};G(I)})},c.handleFragLoadError=function(f){var T=f.data;return T&&T.details===A.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(T.frag,T.part):this.hls.trigger(e.Events.ERROR,T),null},c._handleTransmuxerFlush=function(f){var T=this.getCurrentContext(f);if(!T||this.state!==E.PARSING){this.fragCurrent||(this.state=E.IDLE);return}var I=T.frag,P=T.part,S=T.level,w=self.performance.now();I.stats.parsing.end=w,P&&(P.stats.parsing.end=w),this.updateLevelTiming(I,P,S,f.partial)},c.getCurrentContext=function(f){var T=this.levels,I=f.level,P=f.sn,S=f.part;if(!T||!T[I])return this.warn("Levels object was unset while buffering fragment "+P+" of level "+I+". The current chunk will not be buffered."),null;var w=T[I],F=S>-1?Object(r.getPartWith)(w,P,S):null,L=F?F.fragment:Object(r.getFragmentWithSN)(w,P,this.fragCurrent);return L?{frag:L,part:F,level:w}:null},c.bufferFragmentData=function(f,T,I,P){if(!f||this.state!==E.PARSING)return;var S=f.data1,w=f.data2,F=S;if(S&&w&&(F=Object(m.appendUint8Array)(S,w)),!F||!F.length)return;var L={type:f.type,frag:T,part:I,chunkMeta:P,parent:T.type,data:F};this.hls.trigger(e.Events.BUFFER_APPENDING,L),f.dropped&&f.independent&&!I&&this.flushBufferGap(T)},c.flushBufferGap=function(f){var T=this.media;if(!T)return;if(!H.BufferHelper.isBuffered(T,T.currentTime)){this.flushMainBuffer(0,f.start);return}var I=T.currentTime,P=H.BufferHelper.bufferInfo(T,I,0),S=f.duration,w=Math.min(this.config.maxFragLookUpTolerance*2,S*.25),F=Math.max(Math.min(f.start-w,P.end-w),I+w);f.start-F>w&&this.flushMainBuffer(F,f.start)},c.getFwdBufferInfo=function(f,T){var I=this.config,P=this.getLoadPosition();if(!Object(B.isFiniteNumber)(P))return null;var S=H.BufferHelper.bufferInfo(f,P,I.maxBufferHole);if(S.len===0&&S.nextStart!==void 0){var w=this.fragmentTracker.getBufferedFrag(P,T);if(w&&S.nextStart<w.end)return H.BufferHelper.bufferInfo(f,P,Math.max(S.nextStart,I.maxBufferHole))}return S},c.getMaxBufferLength=function(f){var T=this.config,I;return f?I=Math.max(8*T.maxBufferSize/f,T.maxBufferLength):I=T.maxBufferLength,Math.min(I,T.maxMaxBufferLength)},c.reduceMaxBufferLength=function(f){var T=this.config,I=f||T.maxBufferLength;return T.maxMaxBufferLength>=I?(T.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+T.maxMaxBufferLength+"s"),!0):!1},c.getNextFragment=function(f,T){var I,P,S=T.fragments,w=S.length;if(!w)return null;var F=this.config,L=S[0].start,G;if(T.live){var Z=F.initialLiveManifestSize;if(w<Z)return this.warn("Not enough fragments to start playback (have: "+w+", need: "+Z+")"),null;!T.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(T,S),this.startPosition=G?this.hls.liveSyncPosition||G.start:f)}else f<=L&&(G=S[0]);if(!G){var ue=F.lowLatencyMode?T.partEnd:T.fragmentEnd;G=this.getFragmentAtPosition(f,ue,T)}return(I=G)!==null&&I!==void 0&&I.initSegment&&!((P=G)!==null&&P!==void 0&&P.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},c.getNextPart=function(f,T,I){for(var P=-1,S=!1,w=!0,F=0,L=f.length;F<L;F++){var G=f[F];if(w=w&&!G.independent,P>-1&&I<G.start)break;var Z=G.loaded;!Z&&(S||G.independent||w)&&G.fragment===T&&(P=F),S=Z}return P},c.loadedEndOfParts=function(f,T){var I=f[f.length-1];return I&&T>I.start&&I.loaded},c.getInitialLiveFragment=function(f,T){var I=this.fragPrevious,P=null;if(I){if(f.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+I.programDateTime),P=Object(a.findFragmentByPDT)(T,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!P){var S=I.sn+1;if(S>=f.startSN&&S<=f.endSN){var w=T[S-f.startSN];I.cc===w.cc&&(P=w,this.log("Live playlist, switching playlist, load frag with next SN: "+P.sn))}P||(P=Object(a.findFragWithCC)(T,I.cc),P&&this.log("Live playlist, switching playlist, load frag with same CC: "+P.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(P=this.getFragmentAtPosition(F,this.bitrateTest?f.fragmentEnd:f.edge,f))}return P},c.getFragmentAtPosition=function(f,T,I){var P=this.config,S=this.fragPrevious,w=I.fragments,F=I.endSN,L=I.fragmentHint,G=P.maxFragLookUpTolerance,Z=!!(P.lowLatencyMode&&I.partList&&L);Z&&L&&!this.bitrateTest&&(w=w.concat(L),F=L.sn);var ue;if(f<T){var ce=f>T-G?0:G;ue=Object(a.findFragmentByPTS)(S,w,f,ce)}else ue=w[w.length-1];if(ue){var Re=ue.sn-I.startSN,Ee=S&&ue.level===S.level,he=w[Re+1],we=this.fragmentTracker.getState(ue);if(we===C.FragmentState.BACKTRACKED){ue=null;for(var Pe=Re;w[Pe]&&this.fragmentTracker.getState(w[Pe])===C.FragmentState.BACKTRACKED;)S?ue=w[Pe--]:ue=w[--Pe];ue||(ue=he)}else S&&ue.sn===S.sn&&!Z&&(Ee&&(ue.sn<F&&this.fragmentTracker.getState(he)!==C.FragmentState.OK?(this.log("SN "+ue.sn+" just loaded, load next one: "+he.sn),ue=he):ue=null))}return ue},c.synchronizeToLiveEdge=function(f){var T=this.config,I=this.media;if(!I)return;var P=this.hls.liveSyncPosition,S=I.currentTime,w=f.fragments[0].start,F=f.edge,L=S>=w-T.maxFragLookUpTolerance&&S<=F;if(P!==null&&I.duration>P&&(S<P||!L)){var G=T.liveMaxLatencyDuration!==void 0?T.liveMaxLatencyDuration:T.liveMaxLatencyDurationCount*f.targetduration;(!L&&I.readyState<4||S<F-G)&&(this.loadedmetadata||(this.nextLoadPosition=P),I.readyState&&(this.warn("Playback: "+S.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+P.toFixed(3)),I.currentTime=P))}},c.alignPlaylists=function(f,T){var I=this.levels,P=this.levelLastLoaded,S=this.fragPrevious,w=P!==null?I[P]:null,F=f.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var L=f.fragments[0].start,G=!T,Z=f.alignedSliding&&Object(B.isFiniteNumber)(L);if(G||!Z&&!L){Object(u.alignStream)(S,w,f);var ue=f.fragments[0].start;return this.log("Live playlist sliding: "+ue.toFixed(2)+" start-sn: "+(T?T.startSN:"na")+"->"+f.startSN+" prev-sn: "+(S?S.sn:"na")+" fragments: "+F),ue}return L},c.waitForCdnTuneIn=function(f){var T=3;return f.live&&f.canBlockReload&&f.tuneInGoal>Math.max(f.partHoldBack,f.partTarget*T)},c.setStartPosition=function(f,T){var I=this.startPosition;if(I<T&&(I=-1),I===-1||this.lastCurrentTime===-1){var P=f.startTimeOffset;Object(B.isFiniteNumber)(P)?(I=T+P,P<0&&(I+=f.totalduration),I=Math.min(Math.max(T,I),T+f.totalduration),this.log("Start time offset "+P+" found in playlist, adjust startPosition to "+I),this.startPosition=I):f.live?I=this.hls.liveSyncPosition||T:this.startPosition=I=0,this.lastCurrentTime=I}this.nextLoadPosition=I},c.getLoadPosition=function(){var f=this.media,T=0;return this.loadedmetadata&&f?T=f.currentTime:this.nextLoadPosition&&(T=this.nextLoadPosition),T},c.handleFragLoadAborted=function(f,T){this.transmuxer&&f.sn!=="initSegment"&&f.stats.aborted&&(this.warn("Fragment "+f.sn+(T?" part"+T.index:"")+" of level "+f.level+" was aborted"),this.resetFragmentLoading(f))},c.resetFragmentLoading=function(f){(!this.fragCurrent||!this.fragContextChanged(f))&&(this.state=E.IDLE)},c.onFragmentOrKeyLoadError=function(f,T){if(T.fatal)return;var I=T.frag;if(!I||I.type!==f)return;var P=this.fragCurrent;console.assert(P&&I.sn===P.sn&&I.level===P.level&&I.urlId===P.urlId,"Frag load error must match current frag to retry");var S=this.config;if(this.fragLoadError+1<=S.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(I.level))return;var w=Math.min(Math.pow(2,this.fragLoadError)*S.fragLoadingRetryDelay,S.fragLoadingMaxRetryTimeout);this.warn("Fragment "+I.sn+" of "+f+" "+I.level+" failed to load, retrying in "+w+"ms"),this.retryDate=self.performance.now()+w,this.fragLoadError++,this.state=E.FRAG_LOADING_WAITING_RETRY}else T.levelRetry?(f===n.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=E.IDLE):(N.logger.error(T.details+" reaches max retry, redispatch as fatal ..."),T.fatal=!0,this.hls.stopLoad(),this.state=E.ERROR)},c.afterBufferFlushed=function(f,T,I){if(!f)return;var P=H.BufferHelper.getBuffered(f);this.fragmentTracker.detectEvictedFragments(T,P,I),this.state===E.ENDED&&this.resetLoadingState()},c.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=E.IDLE},c.resetLiveStartWhenNotLoaded=function(f){if(!this.loadedmetadata){this.startFragRequested=!1;var T=this.levels?this.levels[f].details:null;if(T!=null&&T.live)return this.startPosition=-1,this.setStartPosition(T,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},c.updateLevelTiming=function(f,T,I,P){var S=this,w=I.details;console.assert(!!w,"level.details must be defined");var F=Object.keys(f.elementaryStreams).reduce(function(L,G){var Z=f.elementaryStreams[G];if(Z){var ue=Z.endPTS-Z.startPTS;if(ue<=0)return S.warn("Could not parse fragment "+f.sn+" "+G+" duration reliably ("+ue+") resetting transmuxer to fallback to playlist timing"),S.resetTransmuxer(),L||!1;var ce=P?0:Object(r.updateFragPTSDTS)(w,f,Z.startPTS,Z.endPTS,Z.startDTS,Z.endDTS);return S.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:w,level:I,drift:ce,type:G,frag:f,start:Z.startPTS,end:Z.endPTS}),!0}return L},!1);F?(this.state=E.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:f,part:T})):this.resetLoadingState()},c.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},_(l,[{key:"state",get:function(){return this._state},set:function(f){var T=this._state;T!==f&&(this._state=f,this.log(T+"->"+f))}}]),l}(p.default)},"./src/controller/buffer-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return a});var B=R("./src/polyfills/number.ts"),p=R("./src/events.ts"),C=R("./src/utils/logger.ts"),H=R("./src/errors.ts"),N=R("./src/utils/buffer-helper.ts"),e=R("./src/utils/mediasource-helper.ts"),A=R("./src/loader/fragment.ts"),g=R("./src/controller/buffer-operation-queue.ts"),m=Object(e.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function r(s){var i=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 n=i.hls,t=i.media,_=i.mediaSource;C.logger.log("[buffer-controller]: Media source opened"),t&&(i.updateMediaElementDuration(),n.trigger(p.Events.MEDIA_ATTACHED,{media:t})),_&&_.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){C.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){C.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var o=r.prototype;return o.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},o.destroy=function(){this.unregisterListeners(),this.details=null},o.registerListeners=function(){var i=this.hls;i.on(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(p.Events.BUFFER_RESET,this.onBufferReset,this),i.on(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(p.Events.BUFFER_EOS,this.onBufferEos,this),i.on(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(p.Events.FRAG_PARSED,this.onFragParsed,this),i.on(p.Events.FRAG_CHANGED,this.onFragChanged,this)},o.unregisterListeners=function(){var i=this.hls;i.off(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(p.Events.BUFFER_RESET,this.onBufferReset,this),i.off(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(p.Events.BUFFER_EOS,this.onBufferEos,this),i.off(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(p.Events.FRAG_PARSED,this.onFragParsed,this),i.off(p.Events.FRAG_CHANGED,this.onFragChanged,this)},o._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new g.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},o.onManifestParsed=function(i,n){var t=2;(n.audio&&!n.video||!n.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,C.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},o.onMediaAttaching=function(i,n){var t=this.media=n.media;if(t&&m){var _=this.mediaSource=new m;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(_),this._objectUrl=t.src}},o.onMediaDetaching=function(){var i=this.media,n=this.mediaSource,t=this._objectUrl;if(n){if(C.logger.log("[buffer-controller]: media source detaching"),n.readyState==="open")try{n.endOfStream()}catch(_){C.logger.warn("[buffer-controller]: onMediaDetaching: "+_.message+" while calling endOfStream")}this.onBufferReset(),n.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("sourceended",this._onMediaSourceEnded),n.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(t&&self.URL.revokeObjectURL(t),i.src===t?(i.removeAttribute("src"),i.load()):C.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(p.Events.MEDIA_DETACHED,void 0)},o.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(n){var t=i.sourceBuffer[n];try{t&&(i.removeBufferListeners(n),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[n]=void 0)}catch(_){C.logger.warn("[buffer-controller]: Failed to reset the "+n+" buffer",_)}}),this._initSourceBuffer()},o.onBufferCodecs=function(i,n){var t=this,_=this.getSourceBufferTypes().length;if(Object.keys(n).forEach(function(b){if(_){var v=t.tracks[b];if(v&&typeof v.buffer.changeType=="function"){var x=n[b],E=x.codec,h=x.levelCodec,d=x.container,l=(v.levelCodec||v.codec).replace(u,"$1"),c=(h||E).replace(u,"$1");if(l!==c){var y=d+";codecs="+(h||E);t.appendChangeType(b,y)}}}else t.pendingTracks[b]=n[b]}),_)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},o.appendChangeType=function(i,n){var t=this,_=this.operationQueue,b={execute:function(){var x=t.sourceBuffer[i];x&&(C.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+n),x.changeType(n)),_.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(x){C.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",x)}};_.append(b,i)},o.onBufferAppending=function(i,n){var t=this,_=this.hls,b=this.operationQueue,v=this.tracks,x=n.data,E=n.type,h=n.frag,d=n.part,l=n.chunkMeta,c=l.buffering[E],y=self.performance.now();c.start=y;var f=h.stats.buffering,T=d?d.stats.buffering:null;f.start===0&&(f.start=y),T&&T.start===0&&(T.start=y);var I=v.audio,P=E==="audio"&&l.id===1&&(I==null?void 0:I.container)==="audio/mpeg",S={execute:function(){if(c.executeStart=self.performance.now(),P){var F=t.sourceBuffer[E];if(F){var L=h.start-F.timestampOffset;Math.abs(L)>=.1&&(C.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+L+") sn: "+h.sn+")"),F.timestampOffset=h.start)}}t.appendExecutor(x,E)},onStart:function(){},onComplete:function(){var F=self.performance.now();c.executeEnd=c.end=F,f.first===0&&(f.first=F),T&&T.first===0&&(T.first=F);var L=t.sourceBuffer,G={};for(var Z in L)G[Z]=N.BufferHelper.getBuffered(L[Z]);t.appendError=0,t.hls.trigger(p.Events.BUFFER_APPENDED,{type:E,frag:h,part:d,chunkMeta:l,parent:h.type,timeRanges:G})},onError:function(F){C.logger.error("[buffer-controller]: Error encountered while trying to append to the "+E+" SourceBuffer",F);var L={type:H.ErrorTypes.MEDIA_ERROR,parent:h.type,details:H.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=H.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,L.details=H.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>_.config.appendErrorMaxRetry&&(C.logger.error("[buffer-controller]: Failed "+_.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),_.trigger(p.Events.ERROR,L)}};b.append(S,E)},o.onBufferFlushing=function(i,n){var t=this,_=this.operationQueue,b=function(x){return{execute:t.removeExecutor.bind(t,x,n.startOffset,n.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(p.Events.BUFFER_FLUSHED,{type:x})},onError:function(h){C.logger.warn("[buffer-controller]: Failed to remove from "+x+" SourceBuffer",h)}}};n.type?_.append(b(n.type),n.type):this.getSourceBufferTypes().forEach(function(v){_.append(b(v),v)})},o.onFragParsed=function(i,n){var t=this,_=n.frag,b=n.part,v=[],x=b?b.elementaryStreams:_.elementaryStreams;x[A.ElementaryStreamTypes.AUDIOVIDEO]?v.push("audiovideo"):(x[A.ElementaryStreamTypes.AUDIO]&&v.push("audio"),x[A.ElementaryStreamTypes.VIDEO]&&v.push("video"));var E=function(){var d=self.performance.now();_.stats.buffering.end=d,b&&(b.stats.buffering.end=d);var l=b?b.stats:_.stats;t.hls.trigger(p.Events.FRAG_BUFFERED,{frag:_,part:b,stats:l,id:_.type})};v.length===0&&C.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+_.type+" level: "+_.level+" sn: "+_.sn),this.blockBuffers(E,v)},o.onFragChanged=function(i,n){this.flushBackBuffer()},o.onBufferEos=function(i,n){var t=this,_=this.getSourceBufferTypes().reduce(function(b,v){var x=t.sourceBuffer[v];return(!n.type||n.type===v)&&(x&&!x.ended&&(x.ended=!0,C.logger.log("[buffer-controller]: "+v+" sourceBuffer now EOS"))),b&&!!(!x||x.ended)},!0);_&&this.blockBuffers(function(){var b=t.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},o.onLevelUpdated=function(i,n){var t=n.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},o.flushBackBuffer=function(){var i=this.hls,n=this.details,t=this.media,_=this.sourceBuffer;if(!t||n===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var v=n.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(B.isFiniteNumber)(v)||v<0)return;var x=t.currentTime,E=n.levelTargetDuration,h=Math.max(v,E),d=Math.floor(x/E)*E-h;b.forEach(function(l){var c=_[l];if(c){var y=N.BufferHelper.getBuffered(c);y.length>0&&d>y.start(0)&&(i.trigger(p.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),n.live&&i.trigger(p.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),i.trigger(p.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:l}))}})},o.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,n=this.hls,t=this.media,_=this.mediaSource,b=i.fragments[0].start+i.totalduration,v=t.duration,x=Object(B.isFiniteNumber)(_.duration)?_.duration:0;i.live&&n.config.liveDurationInfinity?(C.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),_.duration=Infinity,this.updateSeekableRange(i)):(b>x&&b>v||!Object(B.isFiniteNumber)(v))&&(C.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),_.duration=b)},o.updateSeekableRange=function(i){var n=this.mediaSource,t=i.fragments,_=t.length;if(_&&i.live&&n!==null&&n!==void 0&&n.setLiveSeekableRange){var b=Math.max(0,t[0].start),v=Math.max(b,b+i.totalduration);n.setLiveSeekableRange(b,v)}},o.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,n=this.operationQueue,t=this.pendingTracks,_=Object.keys(t).length;if(_&&!i||_===2){this.createSourceBuffers(t),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(p.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}b.forEach(function(v){n.executeNext(v)})}},o.createSourceBuffers=function(i){var n=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var _=0;for(var b in i)if(!n[b]){var v=i[b];if(!v)throw Error("source buffer exists for track "+b+", however track does not");var x=v.levelCodec||v.codec,E=v.container+";codecs="+x;C.logger.log("[buffer-controller]: creating sourceBuffer("+E+")");try{var h=n[b]=t.addSourceBuffer(E),d=b;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[b]={buffer:h,codec:x,container:v.container,levelCodec:v.levelCodec,id:v.id},_++}catch(l){C.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+l.message),this.hls.trigger(p.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:E})}}_&&this.hls.trigger(p.Events.BUFFER_CREATED,{tracks:this.tracks})},o._onSBUpdateStart=function(i){var n=this.operationQueue,t=n.current(i);t.onStart()},o._onSBUpdateEnd=function(i){var n=this.operationQueue,t=n.current(i);t.onComplete(),n.shiftAndExecuteNext(i)},o._onSBUpdateError=function(i,n){C.logger.error("[buffer-controller]: "+i+" SourceBuffer error",n),this.hls.trigger(p.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(i);t&&t.onError(n)},o.removeExecutor=function(i,n,t){var _=this.media,b=this.mediaSource,v=this.operationQueue,x=this.sourceBuffer,E=x[i];if(!_||!b||!E){C.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),v.shiftAndExecuteNext(i);return}var h=Object(B.isFiniteNumber)(_.duration)?_.duration:Infinity,d=Object(B.isFiniteNumber)(b.duration)?b.duration:Infinity,l=Math.max(0,n),c=Math.min(t,h,d);c>l?(C.logger.log("[buffer-controller]: Removing ["+l+","+c+"] from the "+i+" SourceBuffer"),console.assert(!E.updating,i+" sourceBuffer must not be updating"),E.remove(l,c)):v.shiftAndExecuteNext(i)},o.appendExecutor=function(i,n){var t=this.operationQueue,_=this.sourceBuffer,b=_[n];if(!b){C.logger.warn("[buffer-controller]: Attempting to append to the "+n+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(n);return}b.ended=!1,console.assert(!b.updating,n+" sourceBuffer must not be updating"),b.appendBuffer(i)},o.blockBuffers=function(i,n){var t=this;if(n===void 0&&(n=this.getSourceBufferTypes()),!n.length){C.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var _=this.operationQueue,b=n.map(function(v){return _.appendBlocker(v)});Promise.all(b).then(function(){i(),n.forEach(function(v){var x=t.sourceBuffer[v];(!x||!x.updating)&&_.shiftAndExecuteNext(v)})})},o.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},o.addBufferListener=function(i,n,t){var _=this.sourceBuffer[i];if(!_)return;var b=t.bind(this,i);this.listeners[i].push({event:n,listener:b}),_.addEventListener(n,b)},o.removeBufferListeners=function(i){var n=this.sourceBuffer[i];if(!n)return;this.listeners[i].forEach(function(t){n.removeEventListener(t.event,t.listener)})},r}()},"./src/controller/buffer-operation-queue.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return p});var B=R("./src/utils/logger.ts"),p=function(){function C(N){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=N}var H=C.prototype;return H.append=function(e,A){var g=this.queues[A];g.push(e),g.length===1&&this.buffers[A]&&this.executeNext(A)},H.insertAbort=function(e,A){var g=this.queues[A];g.unshift(e),this.executeNext(A)},H.appendBlocker=function(e){var A,g=new Promise(function(u){A=u}),m={execute:A,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(m,e),g},H.executeNext=function(e){var A=this.buffers,g=this.queues,m=A[e],u=g[e];if(u.length){var a=u[0];try{a.execute()}catch(r){B.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(r),(!m||!m.updating)&&(u.shift(),this.executeNext(e))}}},H.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},H.current=function(e){return this.queues[e][0]},C}()},"./src/controller/cap-level-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/events.ts");function p(N,e){for(var A=0;A<e.length;A++){var g=e[A];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(N,g.key,g)}}function C(N,e,A){return e&&p(N.prototype,e),A&&p(N,A),N}var H=function(){function N(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 e=N.prototype;return e.setStreamController=function(g){this.streamController=g},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var g=this.hls;g.on(B.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),g.on(B.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.on(B.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var g=this.hls;g.off(B.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),g.off(B.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),g.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),g.off(B.Events.BUFFER_CODECS,this.onBufferCodecs,this),g.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(g,m){N.isLevelAllowed(m.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(m.droppedLevel)},e.onMediaAttaching=function(g,m){this.media=m.media instanceof HTMLVideoElement?m.media:null},e.onManifestParsed=function(g,m){var u=this.hls;this.restrictedLevels=[],this.firstLevel=m.firstLevel,u.config.capLevelToPlayerSize&&m.video&&this.startCapping()},e.onBufferCodecs=function(g,m){var u=this.hls;u.config.capLevelToPlayerSize&&m.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var g=this.hls.levels;if(g.length){var m=this.hls;m.autoLevelCapping=this.getMaxLevel(g.length-1),m.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=m.autoLevelCapping}}},e.getMaxLevel=function(g){var m=this,u=this.hls.levels;if(!u.length)return-1;var a=u.filter(function(r,o){return N.isLevelAllowed(o,m.restrictedLevels)&&o<=g});return this.clientRect=null,N.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},e.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()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var g=this.media,m={width:0,height:0};if(g){var u=g.getBoundingClientRect();m.width=u.width,m.height=u.height,!m.width&&!m.height&&(m.width=u.right-u.left||g.width||0,m.height=u.bottom-u.top||g.height||0)}return this.clientRect=m,m},N.isLevelAllowed=function(g,m){return m===void 0&&(m=[]),m.indexOf(g)===-1},N.getMaxLevelByMediaSize=function(g,m,u){if(!g||!g.length)return-1;for(var a=function(n,t){return t?n.width!==t.width||n.height!==t.height:!0},r=g.length-1,o=0;o<g.length;o+=1){var s=g[o];if((s.width>=m||s.height>=u)&&a(s,g[o+1])){r=o;break}}return r},C(N,[{key:"mediaWidth",get:function(){return this.getDimensions().width*N.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*N.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var g=1;try{g=self.devicePixelRatio}catch(m){}return g}}]),N}();k.default=H},"./src/controller/cmcd-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return a});var B=R("./src/events.ts"),p=R("./src/types/cmcd.ts"),C=R("./src/utils/buffer-helper.ts"),H=R("./src/utils/logger.ts");function N(r,o){for(var s=0;s<o.length;s++){var i=o[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function e(r,o,s){return o&&N(r.prototype,o),s&&N(r,s),r}function A(r,o){var s=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(s)return(s=s.call(r)).next.bind(s);if(Array.isArray(r)||(s=g(r))||o&&r&&typeof r.length=="number"){s&&(r=s);var i=0;return function(){return i>=r.length?{done:!0}:{done:!1,value:r[i++]}}}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 g(r,o){if(!r)return;if(typeof r=="string")return m(r,o);var s=Object.prototype.toString.call(r).slice(8,-1);if(s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set")return Array.from(r);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return m(r,o)}function m(r,o){(o==null||o>r.length)&&(o=r.length);for(var s=0,i=new Array(o);s<o;s++)i[s]=r[s];return i}function u(){return u=Object.assign||function(r){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])}return r},u.apply(this,arguments)}var a=function(){function r(s){var i=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(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(_){try{i.apply(_,{ot:p.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(b){H.logger.warn("Could not generate manifest CMCD data.",b)}},this.applyFragmentData=function(_){try{var b=_.frag,v=i.hls.levels[b.level],x=i.getObjectType(b),E={d:b.duration*1e3,ot:x};(x===p.CMCDObjectType.VIDEO||x===p.CMCDObjectType.AUDIO||x==p.CMCDObjectType.MUXED)&&(E.br=v.bitrate/1e3,E.tb=i.getTopBandwidth(x),E.bl=i.getBufferLength(x)),i.apply(_,E)}catch(h){H.logger.warn("Could not generate segment CMCD data.",h)}},this.hls=s;var n=this.config=s.config,t=n.cmcd;t!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||r.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var o=r.prototype;return o.registerListeners=function(){var i=this.hls;i.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(B.Events.BUFFER_CREATED,this.onBufferCreated,this)},o.unregisterListeners=function(){var i=this.hls;i.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(B.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},o.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},o.onMediaAttached=function(i,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},o.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},o.onBufferCreated=function(i,n){var t,_;this.audioBuffer=(t=n.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(_=n.tracks.video)===null||_===void 0?void 0:_.buffer},o.createData=function(){var i;return{v:p.CMCDVersion,sf:p.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(i=this.media)===null||i===void 0?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},o.apply=function(i,n){n===void 0&&(n={}),u(n,this.createData());var t=n.ot===p.CMCDObjectType.INIT||n.ot===p.CMCDObjectType.VIDEO||n.ot===p.CMCDObjectType.MUXED;if(this.starved&&t&&(n.bs=!0,n.su=!0,this.starved=!1),n.su==null&&(n.su=this.buffering),this.useHeaders){var _=r.toHeaders(n);if(!Object.keys(_).length)return;i.headers||(i.headers={}),u(i.headers,_)}else{var b=r.toQuery(n);if(!b)return;i.url=r.appendQueryToUri(i.url,b)}},o.getObjectType=function(i){var n=i.type;return n==="subtitle"?p.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?p.CMCDObjectType.INIT:n==="audio"?p.CMCDObjectType.AUDIO:n==="main"?this.hls.audioTracks.length?p.CMCDObjectType.VIDEO:p.CMCDObjectType.MUXED:void 0},o.getTopBandwidth=function(i){for(var n=0,t=i===p.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,_=A(t),b;!(b=_()).done;){var v=b.value;v.bitrate>n&&(n=v.bitrate)}return n>0?n:NaN},o.getBufferLength=function(i){var n=this.hls.media,t=i===p.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!n)return NaN;var _=C.BufferHelper.bufferInfo(t,n.currentTime,this.config.maxBufferHole);return _.len*1e3},o.createPlaylistLoader=function(){var i=this.config.pLoader,n=this.applyPlaylistData,t=i||this.config.loader;return function(){function _(v){this.loader=void 0,this.loader=new t(v)}var b=_.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(x,E,h){n(x),this.loader.load(x,E,h)},e(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},o.createFragmentLoader=function(){var i=this.config.fLoader,n=this.applyFragmentData,t=i||this.config.loader;return function(){function _(v){this.loader=void 0,this.loader=new t(v)}var b=_.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(x,E,h){n(x),this.loader.load(x,E,h)},e(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},r.uuid=function(){var i=URL.createObjectURL(new Blob),n=i.toString();return URL.revokeObjectURL(i),n.substr(n.lastIndexOf("/")+1)},r.serialize=function(i){for(var n=[],t=function(P){return!Number.isNaN(P)&&P!=null&&P!==""&&P!==!1},_=function(P){return Math.round(P)},b=function(P){return _(P/100)*100},v=function(P){return encodeURIComponent(P)},x={br:_,d:_,bl:b,dl:b,mtp:b,nor:v,rtp:b,tb:_},E=Object.keys(i||{}).sort(),h=A(E),d;!(d=h()).done;){var l=d.value,c=i[l];if(!t(c))continue;if(l==="v"&&c===1)continue;if(l=="pr"&&c===1)continue;var y=x[l];y&&(c=y(c));var f=typeof c,T=void 0;l==="ot"||l==="sf"||l==="st"?T=l+"="+c:f==="boolean"?T=l:f==="number"?T=l+"="+c:T=l+"="+JSON.stringify(c),n.push(T)}return n.join(",")},r.toHeaders=function(i){for(var n=Object.keys(i),t={},_=["Object","Request","Session","Status"],b=[{},{},{},{}],v={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},x=0,E=n;x<E.length;x++){var h=E[x],d=v[h]!=null?v[h]:1;b[d][h]=i[h]}for(var l=0;l<b.length;l++){var c=r.serialize(b[l]);c&&(t["CMCD-"+_[l]]=c)}return t},r.toQuery=function(i){return"CMCD="+encodeURIComponent(r.serialize(i))},r.appendQueryToUri=function(i,n){if(!n)return i;var t=i.includes("?")?"&":"?";return""+i+t+n},r}()},"./src/controller/eme-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/events.ts"),p=R("./src/errors.ts"),C=R("./src/utils/logger.ts"),H=R("./src/utils/mediakeys-helper.ts");function N(a,r){for(var o=0;o<r.length;o++){var s=r[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function e(a,r,o){return r&&N(a.prototype,r),o&&N(a,o),a}var A=3,g=function(r,o,s){var i={audioCapabilities:[],videoCapabilities:[]};return r.forEach(function(n){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+n+'"',robustness:s.audioRobustness||""})}),o.forEach(function(n){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+n+'"',robustness:s.videoRobustness||""})}),[i]},m=function(r,o,s,i){switch(r){case H.KeySystems.WIDEVINE:return g(o,s,i);default:throw new Error("Unknown key-system: "+r)}},u=function(){function a(o){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=o,this._config=o.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 r=a.prototype;return r.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},r._registerListeners=function(){this.hls.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r._unregisterListeners=function(){this.hls.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(B.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r.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+'"')},r._attemptKeySystemAccess=function(s,i,n){var t=this,_=m(s,i,n,this._drmSystemOptions);C.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(s,_);this.mediaKeysPromise=b.then(function(v){return t._onMediaKeySystemAccessObtained(s,v)}),b.catch(function(v){C.logger.error('Failed to obtain key-system "'+s+'" access:',v)})},r._onMediaKeySystemAccessObtained=function(s,i){var n=this;C.logger.log('Access for key-system "'+s+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:s};this._mediaKeysList.push(t);var _=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(b){return t.mediaKeys=b,C.logger.log('Media-keys created for key-system "'+s+'"'),n._onMediaKeysCreated(),b});return _.catch(function(b){C.logger.error("Failed to create media-keys:",b)}),_},r._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),s._onNewMediaKeySession(i.mediaKeysSession))})},r._onNewMediaKeySession=function(s){var i=this;C.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(n){i._onKeySessionMessage(s,n.message)},!1)},r._onKeySessionMessage=function(s,i){C.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(n){C.logger.log("Received license data (length: "+(n&&n.byteLength)+"), updating key-session"),s.update(n)})},r.onMediaEncrypted=function(s){var i=this;if(C.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){C.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var n=function(_){if(!i._media)return;i._attemptSetMediaKeys(_),i._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(n).catch(n)},r._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var i=this._mediaKeysList[0];if(!i||!i.mediaKeys){C.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}C.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},r._generateRequestWithPreferredKeySession=function(s,i){var n=this,t=this._mediaKeysList[0];if(!t){C.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){C.logger.warn("Key-Session already initialized but requested again");return}var _=t.mediaKeysSession;if(!_){C.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){C.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}C.logger.log('Generating key-session request for "'+s+'" init data type'),t.mediaKeysSessionInitialized=!0,_.generateRequest(s,i).then(function(){C.logger.debug("Key-session generation succeeded")}).catch(function(b){C.logger.error("Error generating key-session request:",b),n.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},r._createLicenseXhr=function(s,i,n){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,s,i,n);var _=this._licenseXhrSetup;if(_)try{_.call(this.hls,t,s),_=void 0}catch(b){C.logger.error(b)}try{t.readyState||t.open("POST",s,!0),_&&_.call(this.hls,t,s)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return t},r._onLicenseRequestReadyStageChange=function(s,i,n,t){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,C.logger.log("License request succeeded");var _=s.response,b=this._licenseResponseCallback;if(b)try{_=b.call(this.hls,s,i)}catch(x){C.logger.error(x)}t(_)}else{if(C.logger.error("License Request XHR failed ("+i+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>A){this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var v=A-this._requestLicenseFailureCount+1;C.logger.warn("Retrying license request, "+v+" attempts left"),this._requestLicense(n,t)}break}},r._generateLicenseRequestChallenge=function(s,i){switch(s.mediaKeySystemDomain){case H.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},r._requestLicense=function(s,i){C.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n){C.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(n.mediaKeySystemDomain),_=this._createLicenseXhr(t,s,i);C.logger.log("Sending license request to URL: "+t);var b=this._generateLicenseRequestChallenge(n,s);_.send(b)}catch(v){C.logger.error("Failure requesting DRM license: "+v),this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},r.onMediaAttached=function(s,i){if(!this._emeEnabled)return;var n=i.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)},r.onMediaDetached=function(){var s=this._media,i=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(n){if(n.mediaKeysSession)return n.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},r.onManifestParsed=function(s,i){if(!this._emeEnabled)return;var n=i.levels.map(function(_){return _.audioCodec}).filter(function(_){return!!_}),t=i.levels.map(function(_){return _.videoCodec}).filter(function(_){return!!_});this._attemptKeySystemAccess(H.KeySystems.WIDEVINE,n,t)},e(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();k.default=u},"./src/controller/fps-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/events.ts"),p=R("./src/utils/logger.ts"),C=function(){function H(e){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=e,this.registerListeners()}var N=H.prototype;return N.setStreamController=function(A){this.streamController=A},N.registerListeners=function(){this.hls.on(B.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},N.unregisterListeners=function(){this.hls.off(B.Events.MEDIA_ATTACHING,this.onMediaAttaching)},N.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},N.onMediaAttaching=function(A,g){var m=this.hls.config;if(m.capLevelOnFPSDrop){var u=g.media instanceof self.HTMLVideoElement?g.media:null;this.media=u,u&&typeof u.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),m.fpsDroppedMonitoringPeriod)}},N.checkFPS=function(A,g,m){var u=performance.now();if(g){if(this.lastTime){var a=u-this.lastTime,r=m-this.lastDroppedFrames,o=g-this.lastDecodedFrames,s=1e3*r/a,i=this.hls;if(i.trigger(B.Events.FPS_DROP,{currentDropped:r,currentDecoded:o,totalDroppedFrames:m}),s>0&&r>i.config.fpsDroppedMonitoringThreshold*o){var n=i.currentLevel;p.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+n),n>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=n)&&(n=n-1,i.trigger(B.Events.FPS_DROP_LEVEL_CAPPING,{level:n,droppedLevel:i.currentLevel}),i.autoLevelCapping=n,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=m,this.lastDecodedFrames=g}},N.checkFPSInterval=function(){var A=this.media;if(A)if(this.isVideoPlaybackQualityAvailable){var g=A.getVideoPlaybackQuality();this.checkFPS(A,g.totalVideoFrames,g.droppedVideoFrames)}else this.checkFPS(A,A.webkitDecodedFrameCount,A.webkitDroppedFrameCount)},H}();k.default=C},"./src/controller/fragment-finders.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"findFragmentByPDT",function(){return C}),R.d(k,"findFragmentByPTS",function(){return H}),R.d(k,"fragmentWithinToleranceTest",function(){return N}),R.d(k,"pdtWithinToleranceTest",function(){return e}),R.d(k,"findFragWithCC",function(){return A});var B=R("./src/polyfills/number.ts"),p=R("./src/utils/binary-search.ts");function C(g,m,u){if(m===null||!Array.isArray(g)||!g.length||!Object(B.isFiniteNumber)(m))return null;var a=g[0].programDateTime;if(m<(a||0))return null;var r=g[g.length-1].endProgramDateTime;if(m>=(r||0))return null;u=u||0;for(var o=0;o<g.length;++o){var s=g[o];if(e(m,u,s))return s}return null}function H(g,m,u,a){u===void 0&&(u=0),a===void 0&&(a=0);var r=null;if(g?r=m[g.sn-m[0].sn+1]||null:u===0&&m[0].start===0&&(r=m[0]),r&&N(u,a,r)===0)return r;var o=p.default.search(m,N.bind(null,u,a));return o||r}function N(g,m,u){g===void 0&&(g=0),m===void 0&&(m=0);var a=Math.min(m,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-a<=g?1:u.start-a>g&&u.start?-1:0}function e(g,m,u){var a=Math.min(m,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,r=u.endProgramDateTime||0;return r-a>g}function A(g,m){return p.default.search(g,function(u){return u.cc<m?1:u.cc>m?-1:0})}},"./src/controller/fragment-tracker.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"FragmentState",function(){return C}),R.d(k,"FragmentTracker",function(){return H});var B=R("./src/events.ts"),p=R("./src/types/loader.ts"),C;(function(A){A.NOT_LOADED="NOT_LOADED",A.BACKTRACKED="BACKTRACKED",A.APPENDING="APPENDING",A.PARTIAL="PARTIAL",A.OK="OK"})(C||(C={}));var H=function(){function A(m){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=m,this._registerListeners()}var g=A.prototype;return g._registerListeners=function(){var u=this.hls;u.on(B.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(B.Events.FRAG_LOADED,this.onFragLoaded,this)},g._unregisterListeners=function(){var u=this.hls;u.off(B.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(B.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(B.Events.FRAG_LOADED,this.onFragLoaded,this)},g.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},g.getAppendedFrag=function(u,a){if(a===p.PlaylistLevelType.MAIN){var r=this.activeFragment,o=this.activeParts;if(!r)return null;if(o)for(var s=o.length;s--;){var i=o[s],n=i?i.end:r.appendedPTS;if(i.start<=u&&n!==void 0&&u<=n)return s>9&&(this.activeParts=o.slice(s-9)),i}else if(r.start<=u&&r.appendedPTS!==void 0&&u<=r.appendedPTS)return r}return this.getBufferedFrag(u,a)},g.getBufferedFrag=function(u,a){for(var r=this.fragments,o=Object.keys(r),s=o.length;s--;){var i=r[o[s]];if((i==null?void 0:i.body.type)===a&&i.buffered){var n=i.body;if(n.start<=u&&u<=n.end)return n}}return null},g.detectEvictedFragments=function(u,a,r){var o=this;Object.keys(this.fragments).forEach(function(s){var i=o.fragments[s];if(!i)return;if(!i.buffered){i.body.type===r&&o.removeFragment(i.body);return}var n=i.range[u];if(!n)return;n.time.some(function(t){var _=!o.isTimeBuffered(t.startPTS,t.endPTS,a);return _&&o.removeFragment(i.body),_})})},g.detectPartialFragments=function(u){var a=this,r=this.timeRanges,o=u.frag,s=u.part;if(!r||o.sn==="initSegment")return;var i=e(o),n=this.fragments[i];if(!n)return;Object.keys(r).forEach(function(t){var _=o.elementaryStreams[t];if(!_)return;var b=r[t],v=s!==null||_.partial===!0;n.range[t]=a.getBufferedTimes(o,s,v,b)}),n.backtrack=n.loaded=null,Object.keys(n.range).length?n.buffered=!0:this.removeFragment(n.body)},g.fragBuffered=function(u){var a=e(u),r=this.fragments[a];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},g.getBufferedTimes=function(u,a,r,o){for(var s={time:[],partial:r},i=a?a.start:u.start,n=a?a.end:u.end,t=u.minEndPTS||n,_=u.maxStartPTS||i,b=0;b<o.length;b++){var v=o.start(b)-this.bufferPadding,x=o.end(b)+this.bufferPadding;if(_>=v&&t<=x){s.time.push({startPTS:Math.max(i,o.start(b)),endPTS:Math.min(n,o.end(b))});break}else if(i<x&&n>v)s.partial=!0,s.time.push({startPTS:Math.max(i,o.start(b)),endPTS:Math.min(n,o.end(b))});else if(n<=v)break}return s},g.getPartialFragment=function(u){var a=null,r,o,s,i=0,n=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(_){var b=t[_];if(!b)return;N(b)&&(o=b.body.start-n,s=b.body.end+n,u>=o&&u<=s&&(r=Math.min(u-o,s-u),i<=r&&(a=b.body,i=r)))}),a},g.getState=function(u){var a=e(u),r=this.fragments[a];return r?r.buffered?N(r)?C.PARTIAL:C.OK:r.backtrack?C.BACKTRACKED:C.APPENDING:C.NOT_LOADED},g.backtrack=function(u,a){var r=e(u),o=this.fragments[r];if(!o||o.backtrack)return null;var s=o.backtrack=a||o.loaded;return o.loaded=null,s},g.getBacktrackData=function(u){var a=e(u),r=this.fragments[a];if(r){var o,s=r.backtrack;if(s!=null&&(o=s.payload)!==null&&o!==void 0&&o.byteLength)return s;this.removeFragment(u)}return null},g.isTimeBuffered=function(u,a,r){for(var o,s,i=0;i<r.length;i++){if(o=r.start(i)-this.bufferPadding,s=r.end(i)+this.bufferPadding,u>=o&&a<=s)return!0;if(a<=o)return!1}return!1},g.onFragLoaded=function(u,a){var r=a.frag,o=a.part;if(r.sn==="initSegment"||r.bitrateTest||o)return;var s=e(r);this.fragments[s]={body:r,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},g.onBufferAppended=function(u,a){var r=this,o=a.frag,s=a.part,i=a.timeRanges;if(o.type===p.PlaylistLevelType.MAIN)if(this.activeFragment=o,s){var n=this.activeParts;n||(this.activeParts=n=[]),n.push(s)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(t){var _=i[t];if(r.detectEvictedFragments(t,_),!s)for(var b=0;b<_.length;b++)o.appendedPTS=Math.max(_.end(b),o.appendedPTS||0)})},g.onFragBuffered=function(u,a){this.detectPartialFragments(a)},g.hasFragment=function(u){var a=e(u);return!!this.fragments[a]},g.removeFragmentsInRange=function(u,a,r){var o=this;Object.keys(this.fragments).forEach(function(s){var i=o.fragments[s];if(!i)return;if(i.buffered){var n=i.body;n.type===r&&n.start<a&&n.end>u&&o.removeFragment(n)}})},g.removeFragment=function(u){var a=e(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[a]},g.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},A}();function N(A){var g,m;return A.buffered&&(((g=A.range.video)===null||g===void 0?void 0:g.partial)||((m=A.range.audio)===null||m===void 0?void 0:m.partial))}function e(A){return A.type+"_"+A.level+"_"+A.urlId+"_"+A.sn}},"./src/controller/gap-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"STALL_MINIMUM_DURATION_MS",function(){return N}),R.d(k,"MAX_START_GAP_JUMP",function(){return e}),R.d(k,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return A}),R.d(k,"SKIP_BUFFER_RANGE_START",function(){return g}),R.d(k,"default",function(){return m});var B=R("./src/utils/buffer-helper.ts"),p=R("./src/errors.ts"),C=R("./src/events.ts"),H=R("./src/utils/logger.ts"),N=250,e=2,A=.1,g=.05,m=function(){function u(r,o,s,i){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=r,this.media=o,this.fragmentTracker=s,this.hls=i}var a=u.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(o){var s=this.config,i=this.media,n=this.stalled,t=i.currentTime,_=i.seeking,b=this.seeking&&!_,v=!this.seeking&&_;if(this.seeking=_,t!==o){if(this.moved=!0,n!==null){if(this.stallReported){var x=self.performance.now()-n;H.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(x)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((v||b)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!B.BufferHelper.getBuffered(i).length)return;var E=B.BufferHelper.bufferInfo(i,t,0),h=E.len>0,d=E.nextStart||0;if(!h&&!d)return;if(_){var l=E.len>e,c=!d||d-t>e&&!this.fragmentTracker.getPartialFragment(t);if(l||c)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var y,f=Math.max(d,E.start||0)-t,T=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,I=T==null||((y=T.details)===null||y===void 0)?void 0:y.live,P=I?T.details.targetduration*2:e;if(f>0&&f<=P){this._trySkipBufferHole(null);return}}var S=self.performance.now();if(n===null){this.stalled=S;return}var w=S-n;!_&&w>=N&&this._reportStall(E.len);var F=B.BufferHelper.bufferInfo(i,t,s.maxBufferHole);this._tryFixBufferStall(F,w)},a._tryFixBufferStall=function(o,s){var i=this.config,n=this.fragmentTracker,t=this.media,_=t.currentTime,b=n.getPartialFragment(_);if(b){var v=this._trySkipBufferHole(b);if(v)return}o.len>i.maxBufferHole&&s>i.highBufferWatchdogPeriod*1e3&&(H.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(o){var s=this.hls,i=this.media,n=this.stallReported;n||(this.stallReported=!0,H.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+o+")"),s.trigger(C.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:o}))},a._trySkipBufferHole=function(o){for(var s=this.config,i=this.hls,n=this.media,t=n.currentTime,_=0,b=B.BufferHelper.getBuffered(n),v=0;v<b.length;v++){var x=b.start(v);if(t+s.maxBufferHole>=_&&t<x){var E=Math.max(x+g,n.currentTime+A);return H.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+E),this.moved=!0,this.stalled=null,n.currentTime=E,o&&i.trigger(C.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+E,frag:o}),E}_=b.end(v)}return 0},a._tryNudgeBuffer=function(){var o=this.config,s=this.hls,i=this.media,n=i.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<o.nudgeMaxRetry){var _=n+t*o.nudgeOffset;H.logger.warn("Nudging 'currentTime' from "+n+" to "+_),i.currentTime=_,s.trigger(C.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else H.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+o.nudgeMaxRetry+" nudges"),s.trigger(C.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},u}()},"./src/controller/id3-track-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/events.ts"),p=R("./src/utils/texttrack-utils.ts"),C=R("./src/demux/id3.ts"),H=.25,N=function(){function e(g){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=g,this._registerListeners()}var A=e.prototype;return A.destroy=function(){this._unregisterListeners()},A._registerListeners=function(){var m=this.hls;m.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.on(B.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.on(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A._unregisterListeners=function(){var m=this.hls;m.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),m.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(B.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),m.off(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A.onMediaAttached=function(m,u){this.media=u.media},A.onMediaDetaching=function(){if(!this.id3Track)return;Object(p.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},A.getID3Track=function(m){if(!this.media)return;for(var u=0;u<m.length;u++){var a=m[u];if(a.kind==="metadata"&&a.label==="id3")return Object(p.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},A.onFragParsingMetadata=function(m,u){if(!this.media)return;var a=u.frag,r=u.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var o=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<r.length;s++){var i=C.getID3Frames(r[s].data);if(i){var n=r[s].pts,t=s<r.length-1?r[s+1].pts:a.end,_=t-n;_<=0&&(t=n+H);for(var b=0;b<i.length;b++){var v=i[b];if(!C.isTimeStampFrame(v)){var x=new o(n,t,"");x.value=v,this.id3Track.addCue(x)}}}}},A.onBufferFlushing=function(m,u){var a=u.startOffset,r=u.endOffset,o=u.type;if(!o||o==="audio"){var s=this.id3Track;s&&Object(p.removeCuesInRange)(s,a,r)}},e}();k.default=N},"./src/controller/latency-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return e});var B=R("./src/errors.ts"),p=R("./src/events.ts"),C=R("./src/utils/logger.ts");function H(A,g){for(var m=0;m<g.length;m++){var u=g[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(A,u.key,u)}}function N(A,g,m){return g&&H(A.prototype,g),m&&H(A,m),A}var e=function(){function A(m){var u=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 u.timeupdate()},this.hls=m,this.config=m.config,this.registerListeners()}var g=A.prototype;return g.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},g.registerListeners=function(){this.hls.on(p.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(p.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){this.hls.off(p.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(p.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(p.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(p.Events.ERROR,this.onError)},g.onMediaAttached=function(u,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},g.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},g.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},g.onLevelUpdated=function(u,a){var r=a.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},g.onError=function(u,a){if(a.details!==B.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,C.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},g.timeupdate=function(){var u=this.media,a=this.levelDetails;if(!u||!a)return;this.currentTime=u.currentTime;var r=this.computeLatency();if(r===null)return;this._latency=r;var o=this.config,s=o.lowLatencyMode,i=o.maxLiveSyncPlaybackRate;if(!s||i===1)return;var n=this.targetLatency;if(n===null)return;var t=r-n,_=Math.min(this.maxLatency,n+a.targetduration),b=t<_;if(a.live&&b&&t>.05&&this.forwardBufferLength>1){var v=Math.min(2,Math.max(1,i)),x=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;u.playbackRate=Math.min(v,Math.max(1,x))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},g.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},g.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},N(A,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var u=this.config,a=this.levelDetails;return u.liveMaxLatencyDuration!==void 0?u.liveMaxLatencyDuration:a?u.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var u=this.levelDetails;if(u===null)return null;var a=u.holdBack,r=u.partHoldBack,o=u.targetduration,s=this.config,i=s.liveSyncDuration,n=s.liveSyncDurationCount,t=s.lowLatencyMode,_=this.hls.userConfig,b=t&&r||a;(_.liveSyncDuration||_.liveSyncDurationCount||b===0)&&(b=i!==void 0?i:n*o);var v=o,x=1;return b+Math.min(this.stallCount*x,v)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),a=this.targetLatency,r=this.levelDetails;if(u===null||a===null||r===null)return null;var o=r.edge,s=u-a-this.edgeStalled,i=o-r.totalduration,n=o-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(i,s),n)}},{key:"drift",get:function(){var u=this.levelDetails;return u===null?1:u.drift}},{key:"edgeStalled",get:function(){var u=this.levelDetails;if(u===null)return 0;var a=(this.config.lowLatencyMode&&u.partTarget||u.targetduration)*3;return Math.max(u.age-a,0)}},{key:"forwardBufferLength",get:function(){var u=this.media,a=this.levelDetails;if(!u||!a)return 0;var r=u.buffered.length;return r?u.buffered.end(r-1):a.edge-this.currentTime}}]),A}()},"./src/controller/level-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return s});var B=R("./src/types/level.ts"),p=R("./src/events.ts"),C=R("./src/errors.ts"),H=R("./src/utils/codecs.ts"),N=R("./src/controller/level-helper.ts"),e=R("./src/controller/base-playlist-controller.ts"),A=R("./src/types/loader.ts");function g(){return g=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var _ in t)Object.prototype.hasOwnProperty.call(t,_)&&(i[_]=t[_])}return i},g.apply(this,arguments)}function m(i,n){for(var t=0;t<n.length;t++){var _=n[t];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(i,_.key,_)}}function u(i,n,t){return n&&m(i.prototype,n),t&&m(i,t),i}function a(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,r(i,n)}function r(i,n){return r=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},r(i,n)}var o=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(i){a(n,i);function n(_){var b;return b=i.call(this,_,"[level-controller]")||this,b._levels=[],b._firstLevel=-1,b._startLevel=void 0,b.currentLevelIndex=-1,b.manualLevelIndex=-1,b.onParsedComplete=void 0,b._registerListeners(),b}var t=n.prototype;return t._registerListeners=function(){var b=this.hls;b.on(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.on(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(p.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(p.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(p.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var b=this.hls;b.off(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.off(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(p.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(p.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(p.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},t.startLoad=function(){var b=this._levels;b.forEach(function(v){v.loadError=0}),i.prototype.startLoad.call(this)},t.onManifestLoaded=function(b,v){var x=[],E=[],h=[],d,l={},c,y=!1,f=!1,T=!1;if(v.levels.forEach(function(w){var F=w.attrs;y=y||!!(w.width&&w.height),f=f||!!w.videoCodec,T=T||!!w.audioCodec,o&&w.audioCodec&&w.audioCodec.indexOf("mp4a.40.34")!==-1&&(w.audioCodec=void 0);var L=w.bitrate+"-"+w.attrs.RESOLUTION+"-"+w.attrs.CODECS;c=l[L],c?c.url.push(w.url):(c=new B.Level(w),l[L]=c,x.push(c)),F&&(F.AUDIO&&Object(N.addGroupId)(c,"audio",F.AUDIO),F.SUBTITLES&&Object(N.addGroupId)(c,"text",F.SUBTITLES))}),(y||f)&&T&&(x=x.filter(function(w){var F=w.videoCodec,L=w.width,G=w.height;return!!F||!!(L&&G)})),x=x.filter(function(w){var F=w.audioCodec,L=w.videoCodec;return(!F||Object(H.isCodecSupportedInMp4)(F,"audio"))&&(!L||Object(H.isCodecSupportedInMp4)(L,"video"))}),v.audioTracks&&(E=v.audioTracks.filter(function(w){return!w.audioCodec||Object(H.isCodecSupportedInMp4)(w.audioCodec,"audio")}),Object(N.assignTrackIdsByGroup)(E)),v.subtitles&&(h=v.subtitles,Object(N.assignTrackIdsByGroup)(h)),x.length>0){d=x[0].bitrate,x.sort(function(w,F){return w.bitrate-F.bitrate}),this._levels=x;for(var I=0;I<x.length;I++)if(x[I].bitrate===d){this._firstLevel=I,this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+d);break}var P=T&&!f,S={levels:x,audioTracks:E,subtitleTracks:h,firstLevel:this._firstLevel,stats:v.stats,audio:T,video:f,altAudio:!P&&E.some(function(w){return!!w.url})};this.hls.trigger(p.Events.MANIFEST_PARSED,S),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(p.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:v.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(b,v){if(i.prototype.onError.call(this,b,v),v.fatal)return;var x=v.context,E=this._levels[this.currentLevelIndex];if(x&&(x.type===A.PlaylistContextType.AUDIO_TRACK&&E.audioGroupIds&&x.groupId===E.audioGroupIds[E.urlId]||x.type===A.PlaylistContextType.SUBTITLE_TRACK&&E.textGroupIds&&x.groupId===E.textGroupIds[E.urlId])){this.redundantFailover(this.currentLevelIndex);return}var h=!1,d=!0,l;switch(v.details){case C.ErrorDetails.FRAG_LOAD_ERROR:case C.ErrorDetails.FRAG_LOAD_TIMEOUT:case C.ErrorDetails.KEY_LOAD_ERROR:case C.ErrorDetails.KEY_LOAD_TIMEOUT:if(v.frag){var c=this._levels[v.frag.level];c?(c.fragmentError++,c.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=v.frag.level)):l=v.frag.level}break;case C.ErrorDetails.LEVEL_LOAD_ERROR:case C.ErrorDetails.LEVEL_LOAD_TIMEOUT:x&&(x.deliveryDirectives&&(d=!1),l=x.level),h=!0;break;case C.ErrorDetails.REMUX_ALLOC_ERROR:l=v.level,h=!0;break}l!==void 0&&this.recoverLevel(v,l,h,d)},t.recoverLevel=function(b,v,x,E){var h=b.details,d=this._levels[v];if(d.loadError++,x){var l=this.retryLoadingOrFail(b);if(l)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(E){var c=d.url.length;if(c>1&&d.loadError<c)b.levelRetry=!0,this.redundantFailover(v);else if(this.manualLevelIndex===-1){var y=v===0?this._levels.length-1:v-1;this.currentLevelIndex!==y&&this._levels[y].loadError===0&&(this.warn(h+": switch to "+y),b.levelRetry=!0,this.hls.nextAutoLevel=y)}}},t.redundantFailover=function(b){var v=this._levels[b],x=v.url.length;if(x>1){var E=(v.urlId+1)%x;this.warn("Switching to redundant URL-id "+E),this._levels.forEach(function(h){h.urlId=E}),this.level=b}},t.onFragLoaded=function(b,v){var x=v.frag;if(x!==void 0&&x.type===A.PlaylistLevelType.MAIN){var E=this._levels[x.level];E!==void 0&&(E.fragmentError=0,E.loadError=0)}},t.onLevelLoaded=function(b,v){var x,E=v.level,h=v.details,d=this._levels[E];if(!d){var l;this.warn("Invalid level index "+E),(l=v.deliveryDirectives)!==null&&l!==void 0&&l.skip&&(h.deltaUpdateFailed=!0);return}E===this.currentLevelIndex?(d.fragmentError===0&&(d.loadError=0,this.retryCount=0),this.playlistLoaded(E,v,d.details)):(x=v.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(h.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(b,v){var x=this.hls.levels[this.currentLevelIndex];if(!x)return;if(x.audioGroupIds){for(var E=-1,h=this.hls.audioTracks[v.id].groupId,d=0;d<x.audioGroupIds.length;d++)if(x.audioGroupIds[d]===h){E=d;break}E!==x.urlId&&(x.urlId=E,this.startLoad())}},t.loadPlaylist=function(b){var v=this.currentLevelIndex,x=this._levels[v];if(this.canLoad&&x&&x.url.length>0){var E=x.urlId,h=x.url[E];if(b)try{h=b.addDirectives(h)}catch(d){this.warn("Could not construct new URL with HLS Delivery Directives: "+d)}this.log("Attempt loading level index "+v+(b?" at sn "+b.msn+" part "+b.part:"")+" with URL-id "+E+" "+h),this.clearTimer(),this.hls.trigger(p.Events.LEVEL_LOADING,{url:h,level:v,id:E,deliveryDirectives:b||null})}},t.removeLevel=function(b,v){var x=function(d,l){return l!==v},E=this._levels.filter(function(h,d){return d!==b?!0:h.url.length>1&&v!==void 0?(h.url=h.url.filter(x),h.audioGroupIds&&(h.audioGroupIds=h.audioGroupIds.filter(x)),h.textGroupIds&&(h.textGroupIds=h.textGroupIds.filter(x)),h.urlId=0,!0):!1}).map(function(h,d){var l=h.details;return l!=null&&l.fragments&&l.fragments.forEach(function(c){c.level=d}),h});this._levels=E,this.hls.trigger(p.Events.LEVELS_UPDATED,{levels:E})},u(n,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var v,x=this._levels;if(x.length===0)return;if(this.currentLevelIndex===b&&(v=x[b])!==null&&v!==void 0&&v.details)return;if(b<0||b>=x.length){var E=b<0;if(this.hls.trigger(p.Events.ERROR,{type:C.ErrorTypes.OTHER_ERROR,details:C.ErrorDetails.LEVEL_SWITCH_ERROR,level:b,fatal:E,reason:"invalid level idx"}),E)return;b=Math.min(b,x.length-1)}this.clearTimer();var h=this.currentLevelIndex,d=x[h],l=x[b];this.log("switching to level "+b+" from "+h),this.currentLevelIndex=b;var c=g({},l,{level:b,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(p.Events.LEVEL_SWITCHING,c);var y=l.details;if(!y||y.live){var f=this.switchParams(l.uri,d==null?void 0:d.details);this.loadPlaylist(f)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(b){this.manualLevelIndex=b,this._startLevel===void 0&&(this._startLevel=b),b!==-1&&(this.level=b)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(b){this._firstLevel=b}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var b=this.hls.config.startLevel;return b!==void 0?b:this._firstLevel}else return this._startLevel},set:function(b){this._startLevel=b}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(b){this.level=b,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=b)}}]),n}(e.default)},"./src/controller/level-helper.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"addGroupId",function(){return C}),R.d(k,"assignTrackIdsByGroup",function(){return H}),R.d(k,"updatePTS",function(){return N}),R.d(k,"updateFragPTSDTS",function(){return A}),R.d(k,"mergeDetails",function(){return g}),R.d(k,"mapPartIntersection",function(){return m}),R.d(k,"mapFragmentIntersection",function(){return u}),R.d(k,"adjustSliding",function(){return a}),R.d(k,"addSliding",function(){return r}),R.d(k,"computeReloadInterval",function(){return o}),R.d(k,"getFragmentWithSN",function(){return s}),R.d(k,"getPartWith",function(){return i});var B=R("./src/polyfills/number.ts"),p=R("./src/utils/logger.ts");function C(n,t,_){switch(t){case"audio":n.audioGroupIds||(n.audioGroupIds=[]),n.audioGroupIds.push(_);break;case"text":n.textGroupIds||(n.textGroupIds=[]),n.textGroupIds.push(_);break}}function H(n){var t={};n.forEach(function(_){var b=_.groupId||"";_.id=t[b]=t[b]||0,t[b]++})}function N(n,t,_){var b=n[t],v=n[_];e(b,v)}function e(n,t){var _=t.startPTS;if(Object(B.isFiniteNumber)(_)){var b=0,v;t.sn>n.sn?(b=_-n.start,v=n):(b=n.start-_,v=t),v.duration!==b&&(v.duration=b)}else if(t.sn>n.sn){var x=n.cc===t.cc;x&&n.minEndPTS?t.start=n.start+(n.minEndPTS-n.start):t.start=n.start+n.duration}else t.start=Math.max(n.start-t.duration,0)}function A(n,t,_,b,v,x){var E=b-_;E<=0&&(p.logger.warn("Fragment should have a positive duration",t),b=_+t.duration,x=v+t.duration);var h=_,d=b,l=t.startPTS,c=t.endPTS;if(Object(B.isFiniteNumber)(l)){var y=Math.abs(l-_);Object(B.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(y,t.deltaPTS):t.deltaPTS=y,h=Math.max(_,l),_=Math.min(_,l),v=Math.min(v,t.startDTS),d=Math.min(b,c),b=Math.max(b,c),x=Math.max(x,t.endDTS)}t.duration=b-_;var f=_-t.start;t.appendedPTS=b,t.start=t.startPTS=_,t.maxStartPTS=h,t.startDTS=v,t.endPTS=b,t.minEndPTS=d,t.endDTS=x;var T=t.sn;if(!n||T<n.startSN||T>n.endSN)return 0;var I,P=T-n.startSN,S=n.fragments;for(S[P]=t,I=P;I>0;I--)e(S[I],S[I-1]);for(I=P;I<S.length-1;I++)e(S[I],S[I+1]);return n.fragmentHint&&e(S[S.length-1],n.fragmentHint),n.PTSKnown=n.alignedSliding=!0,f}function g(n,t){for(var _=null,b=n.fragments,v=b.length-1;v>=0;v--){var x=b[v].initSegment;if(x){_=x;break}}n.fragmentHint&&delete n.fragmentHint.endPTS;var E=0,h;if(u(n,t,function(I,P){I.relurl&&(E=I.cc-P.cc),Object(B.isFiniteNumber)(I.startPTS)&&Object(B.isFiniteNumber)(I.endPTS)&&(P.start=P.startPTS=I.startPTS,P.startDTS=I.startDTS,P.appendedPTS=I.appendedPTS,P.maxStartPTS=I.maxStartPTS,P.endPTS=I.endPTS,P.endDTS=I.endDTS,P.minEndPTS=I.minEndPTS,P.duration=I.endPTS-I.startPTS,P.duration&&(h=P),t.PTSKnown=t.alignedSliding=!0),P.elementaryStreams=I.elementaryStreams,P.loader=I.loader,P.stats=I.stats,P.urlId=I.urlId,I.initSegment&&(P.initSegment=I.initSegment,_=I.initSegment)}),_){var d=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;d.forEach(function(I){var P;(!I.initSegment||I.initSegment.relurl===((P=_)===null||P===void 0?void 0:P.relurl))&&(I.initSegment=_)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(I){return!I}),t.deltaUpdateFailed)){p.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=t.skippedSegments;l--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var c=t.fragments;if(E){p.logger.warn("discontinuity sliding from playlist, take drift into account");for(var y=0;y<c.length;y++)c[y].cc+=E}t.skippedSegments&&(t.startCC=t.fragments[0].cc),m(n.partList,t.partList,function(I,P){P.elementaryStreams=I.elementaryStreams,P.stats=I.stats}),h?A(t,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):a(n,t),c.length&&(t.totalduration=t.edge-c[0].start),t.driftStartTime=n.driftStartTime,t.driftStart=n.driftStart;var f=t.advancedDateTime;if(t.advanced&&f){var T=t.edge;t.driftStart||(t.driftStartTime=f,t.driftStart=T),t.driftEndTime=f,t.driftEnd=T}else t.driftEndTime=n.driftEndTime,t.driftEnd=n.driftEnd,t.advancedDateTime=n.advancedDateTime}function m(n,t,_){if(n&&t)for(var b=0,v=0,x=n.length;v<=x;v++){var E=n[v],h=t[v+b];E&&h&&E.index===h.index&&E.fragment.sn===h.fragment.sn?_(E,h):b--}}function u(n,t,_){for(var b=t.skippedSegments,v=Math.max(n.startSN,t.startSN)-t.startSN,x=(n.fragmentHint?1:0)+(b?t.endSN:Math.min(n.endSN,t.endSN))-t.startSN,E=t.startSN-n.startSN,h=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,d=n.fragmentHint?n.fragments.concat(n.fragmentHint):n.fragments,l=v;l<=x;l++){var c=d[E+l],y=h[l];b&&!y&&l<b&&(y=t.fragments[l]=c),c&&y&&_(c,y)}}function a(n,t){var _=t.startSN+t.skippedSegments-n.startSN,b=n.fragments;if(_<0||_>=b.length)return;r(t,b[_].start)}function r(n,t){if(t){for(var _=n.fragments,b=n.skippedSegments;b<_.length;b++)_[b].start+=t;n.fragmentHint&&(n.fragmentHint.start+=t)}}function o(n,t){var _=1e3*n.levelTargetDuration,b=_/2,v=n.age,x=v>0&&v<_*3,E=t.loading.end-t.loading.start,h,d=n.availabilityDelay;if(n.updated===!1)if(x){var l=333*n.misses;h=Math.max(Math.min(b,E*2),l),n.availabilityDelay=(n.availabilityDelay||0)+h}else h=b;else x?(d=Math.min(d||_/2,v),n.availabilityDelay=d,h=d+_-v):h=_-E;return Math.round(h)}function s(n,t,_){if(!n||!n.details)return null;var b=n.details,v=b.fragments[t-b.startSN];return v||(v=b.fragmentHint,v&&v.sn===t?v:t<b.startSN&&_&&_.sn===t?_:null)}function i(n,t,_){if(!n||!n.details)return null;var b=n.details.partList;if(b)for(var v=b.length;v--;){var x=b[v];if(x.index===_&&x.fragment.sn===t)return x}return null}},"./src/controller/stream-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return b});var B=R("./src/polyfills/number.ts"),p=R("./src/controller/base-stream-controller.ts"),C=R("./src/is-supported.ts"),H=R("./src/events.ts"),N=R("./src/utils/buffer-helper.ts"),e=R("./src/controller/fragment-tracker.ts"),A=R("./src/types/loader.ts"),g=R("./src/loader/fragment.ts"),m=R("./src/demux/transmuxer-interface.ts"),u=R("./src/types/transmuxer.ts"),a=R("./src/controller/gap-controller.ts"),r=R("./src/errors.ts"),o=R("./src/utils/logger.ts");function s(v,x){for(var E=0;E<x.length;E++){var h=x[E];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}function i(v,x,E){return x&&s(v.prototype,x),E&&s(v,E),v}function n(v,x){v.prototype=Object.create(x.prototype),v.prototype.constructor=v,t(v,x)}function t(v,x){return t=Object.setPrototypeOf||function(h,d){return h.__proto__=d,h},t(v,x)}var _=100,b=function(v){n(x,v);function x(h,d){var l;return l=v.call(this,h,d,"[stream-controller]")||this,l.audioCodecSwap=!1,l.gapController=null,l.level=-1,l._forceStartLoad=!1,l.altAudio=!1,l.audioOnly=!1,l.fragPlaying=null,l.onvplaying=null,l.onvseeked=null,l.fragLastKbps=0,l.stalled=!1,l.couldBacktrack=!1,l.audioCodecSwitch=!1,l.videoBuffer=null,l._registerListeners(),l}var E=x.prototype;return E._registerListeners=function(){var d=this.hls;d.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(H.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.on(H.Events.ERROR,this.onError,this),d.on(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.on(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.on(H.Events.BUFFER_CREATED,this.onBufferCreated,this),d.on(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.on(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.on(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E._unregisterListeners=function(){var d=this.hls;d.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.off(H.Events.ERROR,this.onError,this),d.off(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.off(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.off(H.Events.BUFFER_CREATED,this.onBufferCreated,this),d.off(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.off(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.off(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},E.startLoad=function(d){if(this.levels){var l=this.lastCurrentTime,c=this.hls;if(this.stopLoad(),this.setInterval(_),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var y=c.startLevel;y===-1&&(c.config.testBandwidth?(y=0,this.bitrateTest=!0):y=c.nextAutoLevel),this.level=c.nextLoadLevel=y,this.loadedmetadata=!1}l>0&&d===-1&&(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),d=l),this.state=p.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=d,this.tick()}else this._forceStartLoad=!0,this.state=p.State.STOPPED},E.stopLoad=function(){this._forceStartLoad=!1,v.prototype.stopLoad.call(this)},E.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_LEVEL:{var d,l=this.levels,c=this.level,y=l==null||((d=l[c])===null||d===void 0)?void 0:d.details;if(y&&(!y.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(y))break;this.state=p.State.IDLE;break}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var f,T=self.performance.now(),I=this.retryDate;(!I||T>=I||(f=this.media)!==null&&f!==void 0&&f.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=p.State.IDLE)}break;default:break}this.onTickEnd()},E.onTickEnd=function(){v.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},E.doTickIdle=function(){var d,l,c=this.hls,y=this.levelLastLoaded,f=this.levels,T=this.media,I=c.config,P=c.nextLoadLevel;if(y===null||!T&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!f||!f[P])return;var S=f[P];this.level=c.nextLoadLevel=P;var w=S.details;if(!w||this.state===p.State.WAITING_LEVEL||w.live&&this.levelLastLoaded!==P){this.state=p.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:T,A.PlaylistLevelType.MAIN);if(F===null)return;var L=F.len,G=this.getMaxBufferLength(S.maxBitrate);if(L>=G)return;if(this._streamEnded(F,w)){var Z={};this.altAudio&&(Z.type="video"),this.hls.trigger(H.Events.BUFFER_EOS,Z),this.state=p.State.ENDED;return}var ue=F.end,ce=this.getNextFragment(ue,w);if(this.couldBacktrack&&!this.fragPrevious&&ce&&ce.sn!=="initSegment"){var Re=ce.sn-w.startSN;Re>1&&(ce=w.fragments[Re-1],this.fragmentTracker.removeFragment(ce))}if(ce&&this.fragmentTracker.getState(ce)===e.FragmentState.OK&&this.nextLoadPosition>ue){var Ee=this.audioOnly&&!this.altAudio?g.ElementaryStreamTypes.AUDIO:g.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(T,Ee,A.PlaylistLevelType.MAIN),ce=this.getNextFragment(this.nextLoadPosition,w)}if(!ce)return;ce.initSegment&&!ce.initSegment.data&&!this.bitrateTest&&(ce=ce.initSegment),((d=ce.decryptdata)===null||d===void 0?void 0:d.keyFormat)==="identity"&&!((l=ce.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(ce,w):this.loadFragment(ce,w,ue)},E.loadFragment=function(d,l,c){var y,f=this.fragmentTracker.getState(d);if(this.fragCurrent=d,f===e.FragmentState.BACKTRACKED){var T=this.fragmentTracker.getBacktrackData(d);if(T){this._handleFragmentLoadProgress(T),this._handleFragmentLoadComplete(T);return}else f=e.FragmentState.NOT_LOADED}f===e.FragmentState.NOT_LOADED||f===e.FragmentState.PARTIAL?d.sn==="initSegment"?this._loadInitSegment(d):this.bitrateTest?(d.bitrateTest=!0,this.log("Fragment "+d.sn+" of level "+d.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(d)):(this.startFragRequested=!0,v.prototype.loadFragment.call(this,d,l,c)):f===e.FragmentState.APPENDING?this.reduceMaxBufferLength(d.duration)&&this.fragmentTracker.removeFragment(d):((y=this.media)===null||y===void 0?void 0:y.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},E.getAppendedFrag=function(d){var l=this.fragmentTracker.getAppendedFrag(d,A.PlaylistLevelType.MAIN);return l&&"fragment"in l?l.fragment:l},E.getBufferedFrag=function(d){return this.fragmentTracker.getBufferedFrag(d,A.PlaylistLevelType.MAIN)},E.followingBufferedFrag=function(d){return d?this.getBufferedFrag(d.end+.5):null},E.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},E.nextLevelSwitch=function(){var d=this.levels,l=this.media;if(l!=null&&l.readyState){var c,y=this.getAppendedFrag(l.currentTime);if(y&&y.start>1&&this.flushMainBuffer(0,y.start-1),!l.paused&&d){var f=this.hls.nextLoadLevel,T=d[f],I=this.fragLastKbps;I&&this.fragCurrent?c=this.fragCurrent.duration*T.maxBitrate/(1e3*I)+1:c=0}else c=0;var P=this.getBufferedFrag(l.currentTime+c);if(P){var S=this.followingBufferedFrag(P);if(S){this.abortCurrentFrag();var w=S.maxStartPTS?S.maxStartPTS:S.start,F=S.duration,L=Math.max(P.end,w+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},E.abortCurrentFrag=function(){var d=this.fragCurrent;this.fragCurrent=null,d!=null&&d.loader&&d.loader.abort(),this.state===p.State.KEY_LOADING&&(this.state=p.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},E.flushMainBuffer=function(d,l){v.prototype.flushMainBuffer.call(this,d,l,this.altAudio?"video":null)},E.onMediaAttached=function(d,l){v.prototype.onMediaAttached.call(this,d,l);var c=l.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),c.addEventListener("playing",this.onvplaying),c.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,c,this.fragmentTracker,this.hls)},E.onMediaDetaching=function(){var d=this.media;d&&(d.removeEventListener("playing",this.onvplaying),d.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),v.prototype.onMediaDetaching.call(this)},E.onMediaPlaying=function(){this.tick()},E.onMediaSeeked=function(){var d=this.media,l=d?d.currentTime:null;Object(B.isFiniteNumber)(l)&&this.log("Media seeked to "+l.toFixed(3)),this.tick()},E.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},E.onManifestParsed=function(d,l){var c=!1,y=!1,f;l.levels.forEach(function(T){f=T.audioCodec,f&&(f.indexOf("mp4a.40.2")!==-1&&(c=!0),f.indexOf("mp4a.40.5")!==-1&&(y=!0))}),this.audioCodecSwitch=c&&y&&!Object(C.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=l.levels,this.startFragRequested=!1},E.onLevelLoading=function(d,l){var c=this.levels;if(!c||this.state!==p.State.IDLE)return;var y=c[l.level];(!y.details||y.details.live&&this.levelLastLoaded!==l.level||this.waitForCdnTuneIn(y.details))&&(this.state=p.State.WAITING_LEVEL)},E.onLevelLoaded=function(d,l){var c,y=this.levels,f=l.level,T=l.details,I=T.totalduration;if(!y){this.warn("Levels were reset while loading level "+f);return}this.log("Level "+f+" loaded ["+T.startSN+","+T.endSN+"], cc ["+T.startCC+", "+T.endCC+"] duration:"+I);var P=this.fragCurrent;P&&(this.state===p.State.FRAG_LOADING||this.state===p.State.FRAG_LOADING_WAITING_RETRY)&&(P.level!==l.level&&P.loader&&(this.state=p.State.IDLE,P.loader.abort()));var S=y[f],w=0;if(T.live||(c=S.details)!==null&&c!==void 0&&c.live){if(T.fragments[0]||(T.deltaUpdateFailed=!0),T.deltaUpdateFailed)return;w=this.alignPlaylists(T,S.details)}if(S.details=T,this.levelLastLoaded=f,this.hls.trigger(H.Events.LEVEL_UPDATED,{details:T,level:f}),this.state===p.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(T))return;this.state=p.State.IDLE}this.startFragRequested?T.live&&this.synchronizeToLiveEdge(T):this.setStartPosition(T,w),this.tick()},E._handleFragmentLoadProgress=function(d){var l,c=d.frag,y=d.part,f=d.payload,T=this.levels;if(!T){this.warn("Levels were reset while fragment load was in progress. Fragment "+c.sn+" of level "+c.level+" will not be buffered");return}var I=T[c.level],P=I.details;if(!P){this.warn("Dropping fragment "+c.sn+" of level "+c.level+" after level details were reset");return}var S=I.videoCodec,w=P.PTSKnown||!P.live,F=(l=c.initSegment)===null||l===void 0?void 0:l.data,L=this._getAudioCodec(I),G=this.transmuxer=this.transmuxer||new m.default(this.hls,A.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Z=y?y.index:-1,ue=Z!==-1,ce=new u.ChunkMetadata(c.level,c.sn,c.stats.chunkCount,f.byteLength,Z,ue),Re=this.initPTS[c.cc];G.push(f,F,L,S,c,y,P.totalduration,w,ce,Re)},E.onAudioTrackSwitching=function(d,l){var c=this.altAudio,y=!!l.url,f=l.id;if(!y){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var T=this.fragCurrent;T!=null&&T.loader&&(this.log("Switching to main audio track, cancel main fragment load"),T.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var I=this.hls;c&&I.trigger(H.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),I.trigger(H.Events.AUDIO_TRACK_SWITCHED,{id:f})}},E.onAudioTrackSwitched=function(d,l){var c=l.id,y=!!this.hls.audioTracks[c].url;if(y){var f=this.videoBuffer;f&&this.mediaBuffer!==f&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=f)}this.altAudio=y,this.tick()},E.onBufferCreated=function(d,l){var c=l.tracks,y,f,T=!1;for(var I in c){var P=c[I];if(P.id==="main"){if(f=I,y=P,I==="video"){var S=c[I];S&&(this.videoBuffer=S.buffer)}}else T=!0}T&&y?(this.log("Alternate track found, use "+f+".buffered to schedule main fragment loading"),this.mediaBuffer=y.buffer):this.mediaBuffer=this.media},E.onFragBuffered=function(d,l){var c=l.frag,y=l.part;if(c&&c.type!==A.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(c)){this.warn("Fragment "+c.sn+(y?" p: "+y.index:"")+" of level "+c.level+" finished buffering, but was aborted. state: "+this.state),this.state===p.State.PARSED&&(this.state=p.State.IDLE);return}var f=y?y.stats:c.stats;this.fragLastKbps=Math.round(8*f.total/(f.buffering.end-f.loading.first)),c.sn!=="initSegment"&&(this.fragPrevious=c),this.fragBufferedComplete(c,y)},E.onError=function(d,l){switch(l.details){case r.ErrorDetails.FRAG_LOAD_ERROR:case r.ErrorDetails.FRAG_LOAD_TIMEOUT:case r.ErrorDetails.KEY_LOAD_ERROR:case r.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(A.PlaylistLevelType.MAIN,l);break;case r.ErrorDetails.LEVEL_LOAD_ERROR:case r.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==p.State.ERROR&&(l.fatal?(this.warn(""+l.details),this.state=p.State.ERROR):!l.levelRetry&&this.state===p.State.WAITING_LEVEL&&(this.state=p.State.IDLE));break;case r.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="main"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var c=!0,y=this.getFwdBufferInfo(this.media,A.PlaylistLevelType.MAIN);y&&y.len>.5&&(c=!this.reduceMaxBufferLength(y.len)),c&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},E.checkBuffer=function(){var d=this.media,l=this.gapController;if(!d||!l||!d.readyState)return;var c=N.BufferHelper.getBuffered(d);!this.loadedmetadata&&c.length?(this.loadedmetadata=!0,this.seekToStartPos()):l.poll(this.lastCurrentTime),this.lastCurrentTime=d.currentTime},E.onFragLoadEmergencyAborted=function(){this.state=p.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},E.onBufferFlushed=function(d,l){var c=l.type;if(c!==g.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var y=(c===g.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(y,c,A.PlaylistLevelType.MAIN)}},E.onLevelsUpdated=function(d,l){this.levels=l.levels},E.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},E.seekToStartPos=function(){var d=this.media,l=d.currentTime,c=this.startPosition;if(c>=0&&l<c){if(d.seeking){o.logger.log("could not seek to "+c+", already seeking at "+l);return}var y=N.BufferHelper.getBuffered(d),f=y.length?y.start(0):0,T=f-c;T>0&&(T<this.config.maxBufferHole||T<this.config.maxFragLookUpTolerance)&&(o.logger.log("adjusting start position by "+T+" to match buffer start"),c+=T,this.startPosition=c),this.log("seek to target start position "+c+" from current time "+l),d.currentTime=c}},E._getAudioCodec=function(d){var l=this.config.defaultAudioCodec||d.audioCodec;return this.audioCodecSwap&&l&&(this.log("Swapping audio codec"),l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),l},E._loadBitrateTestFrag=function(d){var l=this;this._doFragLoad(d).then(function(c){var y=l.hls;if(!c||y.nextLoadLevel||l.fragContextChanged(d))return;l.fragLoadError=0,l.state=p.State.IDLE,l.startFragRequested=!1,l.bitrateTest=!1;var f=d.stats;f.parsing.start=f.parsing.end=f.buffering.start=f.buffering.end=self.performance.now(),y.trigger(H.Events.FRAG_LOADED,c)})},E._handleTransmuxComplete=function(d){var l,c="main",y=this.hls,f=d.remuxResult,T=d.chunkMeta,I=this.getCurrentContext(T);if(!I){this.warn("The loading context changed while buffering fragment "+T.sn+" of level "+T.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(T.level);return}var P=I.frag,S=I.part,w=I.level,F=f.video,L=f.text,G=f.id3,Z=f.initSegment,ue=this.altAudio?void 0:f.audio;if(this.fragContextChanged(P))return;if(this.state=p.State.PARSING,Z){Z.tracks&&(this._bufferInitSegment(w,Z.tracks,P,T),y.trigger(H.Events.FRAG_PARSING_INIT_SEGMENT,{frag:P,id:c,tracks:Z.tracks}));var ce=Z.initPTS,Re=Z.timescale;Object(B.isFiniteNumber)(ce)&&(this.initPTS[P.cc]=ce,y.trigger(H.Events.INIT_PTS_FOUND,{frag:P,id:c,initPTS:ce,timescale:Re}))}if(F&&f.independent!==!1){if(w.details){var Ee=F.startPTS,he=F.endPTS,we=F.startDTS,Pe=F.endDTS;if(S)S.elementaryStreams[F.type]={startPTS:Ee,endPTS:he,startDTS:we,endDTS:Pe};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var de=this.getLoadPosition()+this.config.maxBufferHole;if(de<Ee){this.backtrack(P);return}P.setElementaryStreamInfo(F.type,P.start,he,P.start,Pe,!0)}P.setElementaryStreamInfo(F.type,Ee,he,we,Pe),this.bufferFragmentData(F,P,S,T)}}else if(f.independent===!1){this.backtrack(P);return}if(ue){var j=ue.startPTS,O=ue.endPTS,D=ue.startDTS,W=ue.endDTS;S&&(S.elementaryStreams[g.ElementaryStreamTypes.AUDIO]={startPTS:j,endPTS:O,startDTS:D,endDTS:W}),P.setElementaryStreamInfo(g.ElementaryStreamTypes.AUDIO,j,O,D,W),this.bufferFragmentData(ue,P,S,T)}if(G!=null&&(l=G.samples)!==null&&l!==void 0&&l.length){var V={frag:P,id:c,samples:G.samples};y.trigger(H.Events.FRAG_PARSING_METADATA,V)}if(L){var U={frag:P,id:c,samples:L.samples};y.trigger(H.Events.FRAG_PARSING_USERDATA,U)}},E._bufferInitSegment=function(d,l,c,y){var f=this;if(this.state!==p.State.PARSING)return;this.audioOnly=!!l.audio&&!l.video,this.altAudio&&!this.audioOnly&&delete l.audio;var T=l.audio,I=l.video,P=l.audiovideo;if(T){var S=d.audioCodec,w=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(S&&(S.indexOf("mp4a.40.5")!==-1?S="mp4a.40.2":S="mp4a.40.5"),T.metadata.channelCount!==1&&w.indexOf("firefox")===-1&&(S="mp4a.40.5")),w.indexOf("android")!==-1&&T.container!=="audio/mpeg"&&(S="mp4a.40.2",this.log("Android: force audio codec to "+S)),d.audioCodec&&d.audioCodec!==S&&this.log('Swapping manifest audio codec "'+d.audioCodec+'" for "'+S+'"'),T.levelCodec=S,T.id="main",this.log("Init audio buffer, container:"+T.container+", codecs[selected/level/parsed]=["+(S||"")+"/"+(d.audioCodec||"")+"/"+T.codec+"]")}I&&(I.levelCodec=d.videoCodec,I.id="main",this.log("Init video buffer, container:"+I.container+", codecs[level/parsed]=["+(d.videoCodec||"")+"/"+I.codec+"]")),P&&this.log("Init audiovideo buffer, container:"+P.container+", codecs[level/parsed]=["+(d.attrs.CODECS||"")+"/"+P.codec+"]"),this.hls.trigger(H.Events.BUFFER_CODECS,l),Object.keys(l).forEach(function(F){var L=l[F],G=L.initSegment;G!=null&&G.byteLength&&f.hls.trigger(H.Events.BUFFER_APPENDING,{type:F,data:G,frag:c,part:null,chunkMeta:y,parent:c.type})}),this.tick()},E.backtrack=function(d){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(d);var l=this.fragmentTracker.backtrack(d);this.fragPrevious=null,this.nextLoadPosition=d.start,l?this.resetFragmentLoading(d):this.state=p.State.BACKTRACKING},E.checkFragmentChanged=function(){var d=this.media,l=null;if(d&&d.readyState>1&&d.seeking===!1){var c=d.currentTime;if(N.BufferHelper.isBuffered(d,c)?l=this.getAppendedFrag(c):N.BufferHelper.isBuffered(d,c+.1)&&(l=this.getAppendedFrag(c+.1)),l){var y=this.fragPlaying,f=l.level;(!y||l.sn!==y.sn||y.level!==f||l.urlId!==y.urlId)&&(this.hls.trigger(H.Events.FRAG_CHANGED,{frag:l}),(!y||y.level!==f)&&this.hls.trigger(H.Events.LEVEL_SWITCHED,{level:f}),this.fragPlaying=l)}}},i(x,[{key:"nextLevel",get:function(){var d=this.nextBufferedFrag;return d?d.level:-1}},{key:"currentLevel",get:function(){var d=this.media;if(d){var l=this.getAppendedFrag(d.currentTime);if(l)return l.level}return-1}},{key:"nextBufferedFrag",get:function(){var d=this.media;if(d){var l=this.getAppendedFrag(d.currentTime);return this.followingBufferedFrag(l)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),x}(p.default)},"./src/controller/subtitle-stream-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"SubtitleStreamController",function(){return n});var B=R("./src/events.ts"),p=R("./src/utils/logger.ts"),C=R("./src/utils/buffer-helper.ts"),H=R("./src/controller/fragment-finders.ts"),N=R("./src/utils/discontinuities.ts"),e=R("./src/controller/level-helper.ts"),A=R("./src/controller/fragment-tracker.ts"),g=R("./src/controller/base-stream-controller.ts"),m=R("./src/types/loader.ts"),u=R("./src/types/level.ts");function a(t,_){for(var b=0;b<_.length;b++){var v=_[b];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(t,v.key,v)}}function r(t,_,b){return _&&a(t.prototype,_),b&&a(t,b),t}function o(t,_){t.prototype=Object.create(_.prototype),t.prototype.constructor=t,s(t,_)}function s(t,_){return s=Object.setPrototypeOf||function(v,x){return v.__proto__=x,v},s(t,_)}var i=500,n=function(t){o(_,t);function _(v,x){var E;return E=t.call(this,v,x,"[subtitle-stream-controller]")||this,E.levels=[],E.currentTrackId=-1,E.tracksBuffered=[],E.mainDetails=null,E._registerListeners(),E}var b=_.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var x=this.hls;x.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(B.Events.ERROR,this.onError,this),x.on(B.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(B.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.on(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.on(B.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.on(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var x=this.hls;x.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(B.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(B.Events.ERROR,this.onError,this),x.off(B.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.off(B.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.off(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.off(B.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.off(B.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=g.State.IDLE,this.setInterval(i),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(x,E){this.mainDetails=E.details},b.onSubtitleFragProcessed=function(x,E){var h=E.frag,d=E.success;if(this.fragPrevious=h,this.state=g.State.IDLE,!d)return;var l=this.tracksBuffered[this.currentTrackId];if(!l)return;for(var c,y=h.start,f=0;f<l.length;f++)if(y>=l[f].start&&y<=l[f].end){c=l[f];break}var T=h.start+h.duration;c?c.end=T:(c={start:y,end:T},l.push(c)),this.fragmentTracker.fragBuffered(h)},b.onBufferFlushing=function(x,E){var h=E.startOffset,d=E.endOffset;if(h===0&&d!==Number.POSITIVE_INFINITY){var l=this.currentTrackId,c=this.levels;if(!c.length||!c[l]||!c[l].details)return;var y=c[l].details,f=y.targetduration,T=d-f;if(T<=0)return;E.endOffsetSubtitles=Math.max(0,T),this.tracksBuffered.forEach(function(I){for(var P=0;P<I.length;){if(I[P].end<=T){I.shift();continue}else if(I[P].start<T)I[P].start=T;else break;P++}}),this.fragmentTracker.removeFragmentsInRange(h,T,m.PlaylistLevelType.SUBTITLE)}},b.onError=function(x,E){var h,d=E.frag;if(!d||d.type!==m.PlaylistLevelType.SUBTITLE)return;(h=this.fragCurrent)!==null&&h!==void 0&&h.loader&&this.fragCurrent.loader.abort(),this.state=g.State.IDLE},b.onSubtitleTracksUpdated=function(x,E){var h=this,d=E.subtitleTracks;this.tracksBuffered=[],this.levels=d.map(function(l){return new u.Level(l)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(l){h.tracksBuffered[l.id]=[]}),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(x,E){if(this.currentTrackId=E.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(i)},b.onSubtitleTrackLoaded=function(x,E){var h,d=E.details,l=E.id,c=this.currentTrackId,y=this.levels;if(!y.length)return;var f=y[c];if(l>=y.length||l!==c||!f)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,d.live||(h=f.details)!==null&&h!==void 0&&h.live){var T=this.mainDetails;if(d.deltaUpdateFailed||!T)return;var I=T.fragments[0];if(!f.details)d.hasProgramDateTime&&T.hasProgramDateTime?Object(N.alignMediaPlaylistByPDT)(d,T):I&&Object(e.addSliding)(d,I.start);else{var P=this.alignPlaylists(d,f.details);P===0&&I&&Object(e.addSliding)(d,I.start)}}if(f.details=d,this.levelLastLoaded=l,this.tick(),d.live&&!this.fragCurrent&&this.media&&this.state===g.State.IDLE){var S=Object(H.findFragmentByPTS)(null,d.fragments,this.media.currentTime,0);S||(this.warn("Subtitle playlist not aligned with playback"),f.details=void 0)}},b._handleFragmentLoadComplete=function(x){var E=x.frag,h=x.payload,d=E.decryptdata,l=this.hls;if(this.fragContextChanged(E))return;if(h&&h.byteLength>0&&d&&d.key&&d.iv&&d.method==="AES-128"){var c=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(h),d.key.buffer,d.iv.buffer).then(function(y){var f=performance.now();l.trigger(B.Events.FRAG_DECRYPTED,{frag:E,payload:y,stats:{tstart:c,tdecrypt:f}})})}},b.doTick=function(){if(!this.media){this.state=g.State.IDLE;return}if(this.state===g.State.IDLE){var x,E=this.currentTrackId,h=this.levels;if(!h.length||!h[E]||!h[E].details)return;var d=h[E].details,l=d.targetduration,c=this.config,y=this.media,f=C.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,y.currentTime-l,c.maxBufferHole),T=f.end,I=f.len,P=this.getMaxBufferLength()+l;if(I>P)return;console.assert(d,"Subtitle track details are defined on idle subtitle stream controller tick");var S=d.fragments,w=S.length,F=d.edge,L,G=this.fragPrevious;if(T<F){var Z=c.maxFragLookUpTolerance;G&&d.hasProgramDateTime&&(L=Object(H.findFragmentByPDT)(S,G.endProgramDateTime,Z)),L||(L=Object(H.findFragmentByPTS)(G,S,T,Z),!L&&G&&G.start<S[0].start&&(L=S[0]))}else L=S[w-1];(x=L)!==null&&x!==void 0&&x.encrypted?(p.logger.log("Loading key for "+L.sn),this.state=g.State.KEY_LOADING,this.hls.trigger(B.Events.KEY_LOADING,{frag:L})):L&&this.fragmentTracker.getState(L)===A.FragmentState.NOT_LOADED&&this.loadFragment(L,d,T)}},b.loadFragment=function(x,E,h){this.fragCurrent=x,t.prototype.loadFragment.call(this,x,E,h)},r(_,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),_}(g.default)},"./src/controller/subtitle-track-controller.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/events.ts"),p=R("./src/utils/texttrack-utils.ts"),C=R("./src/controller/base-playlist-controller.ts"),H=R("./src/types/loader.ts");function N(a,r){for(var o=0;o<r.length;o++){var s=r[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function e(a,r,o){return r&&N(a.prototype,r),o&&N(a,o),a}function A(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,g(a,r)}function g(a,r){return g=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},g(a,r)}var m=function(a){A(r,a);function r(s){var i;return i=a.call(this,s,"[subtitle-track-controller]")||this,i.media=null,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.selectDefaultTrack=!0,i.queuedDefaultTrack=-1,i.trackChangeListener=function(){return i.onTextTracksChanged()},i.asyncPollTrackChange=function(){return i.pollTrackChange(0)},i.useTextTrackPolling=!1,i.subtitlePollingInterval=-1,i.subtitleDisplay=!0,i.registerListeners(),i}var o=r.prototype;return o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},o.registerListeners=function(){var i=this.hls;i.on(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(B.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(B.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var i=this.hls;i.off(B.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(B.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(B.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(B.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(B.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(B.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(B.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(B.Events.ERROR,this.onError,this)},o.onMediaAttached=function(i,n){if(this.media=n.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)},o.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},o.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 i=u(this.media.textTracks);i.forEach(function(n){Object(p.clearCurrentCues)(n)}),this.subtitleTrack=-1,this.media=null},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},o.onManifestParsed=function(i,n){this.tracks=n.subtitleTracks},o.onSubtitleTrackLoaded=function(i,n){var t=n.id,_=n.details,b=this.trackId,v=this.tracksInGroup[b];if(!v){this.warn("Invalid subtitle track id "+t);return}var x=v.details;v.details=n.details,this.log("subtitle track "+t+" loaded ["+_.startSN+"-"+_.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,x))},o.onLevelLoading=function(i,n){this.switchLevel(n.level)},o.onLevelSwitching=function(i,n){this.switchLevel(n.level)},o.switchLevel=function(i){var n=this.hls.levels[i];if(!(n!=null&&n.textGroupIds))return;var t=n.textGroupIds[n.urlId];if(this.groupId!==t){var _=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(E){return!t||E.groupId===t});this.tracksInGroup=b;var v=this.findTrackId(_==null?void 0:_.name)||this.findTrackId();this.groupId=t;var x={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(B.Events.SUBTITLE_TRACKS_UPDATED,x),v!==-1&&this.setSubtitleTrack(v,_)}},o.findTrackId=function(i){for(var n=this.tracksInGroup,t=0;t<n.length;t++){var _=n[t];if((!this.selectDefaultTrack||_.default)&&(!i||i===_.name))return _.id}return-1},o.onError=function(i,n){if(a.prototype.onError.call(this,i,n),n.fatal||!n.context)return;n.context.type===H.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},o.loadPlaylist=function(i){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,_=n.groupId,b=n.url;if(i)try{b=i.addDirectives(b)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(B.Events.SUBTITLE_TRACK_LOADING,{url:b,id:t,groupId:_,deliveryDirectives:i||null})}},o.toggleTrackModes=function(i){var n=this,t=this.media,_=this.subtitleDisplay,b=this.trackId;if(!t)return;var v=u(t.textTracks),x=v.filter(function(d){return d.groupId===n.groupId});if(i===-1)[].slice.call(v).forEach(function(d){d.mode="disabled"});else{var E=x[b];E&&(E.mode="disabled")}var h=x[i];h&&(h.mode=_?"showing":"hidden")},o.setSubtitleTrack=function(i,n){var t,_=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(t=_[i])!==null&&t!==void 0&&t.details)||i<-1||i>=_.length)return;this.clearTimer();var b=_[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,b){var v=b.id,x=b.groupId,E=x===void 0?"":x,h=b.name,d=b.type,l=b.url;this.hls.trigger(B.Events.SUBTITLE_TRACK_SWITCH,{id:v,groupId:E,name:h,type:d,url:l});var c=this.switchParams(b.url,n==null?void 0:n.details);this.loadPlaylist(c)}else this.hls.trigger(B.Events.SUBTITLE_TRACK_SWITCH,{id:i})},o.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,n=u(this.media.textTracks),t=0;t<n.length;t++)if(n[t].mode==="hidden")i=t;else if(n[t].mode==="showing"){i=t;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},e(r,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,n)}}]),r}(C.default);function u(a){for(var r=[],o=0;o<a.length;o++){var s=a[o];s.kind==="subtitles"&&s.label&&r.push(a[o])}return r}k.default=m},"./src/controller/timeline-controller.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"TimelineController",function(){return u});var B=R("./src/polyfills/number.ts"),p=R("./src/events.ts"),C=R("./src/utils/cea-608-parser.ts"),H=R("./src/utils/output-filter.ts"),N=R("./src/utils/webvtt-parser.ts"),e=R("./src/utils/texttrack-utils.ts"),A=R("./src/utils/imsc1-ttml-parser.ts"),g=R("./src/types/loader.ts"),m=R("./src/utils/logger.ts"),u=function(){function s(n){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=o(),this.captionsProperties=void 0,this.hls=n,this.config=n.config,this.Cues=n.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 t=new H.default(this,"textTrack1"),_=new H.default(this,"textTrack2"),b=new H.default(this,"textTrack3"),v=new H.default(this,"textTrack4");this.cea608Parser1=new C.default(1,t,_),this.cea608Parser2=new C.default(3,b,v)}n.on(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),n.on(p.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),n.on(p.Events.FRAG_LOADING,this.onFragLoading,this),n.on(p.Events.FRAG_LOADED,this.onFragLoaded,this),n.on(p.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),n.on(p.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),n.on(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(p.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),n.on(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=s.prototype;return i.destroy=function(){var t=this.hls;t.off(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(p.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(p.Events.FRAG_LOADING,this.onFragLoading,this),t.off(p.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(p.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(p.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(p.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(t,_,b,v,x){for(var E=!1,h=x.length;h--;){var d=x[h],l=r(d[0],d[1],_,b);if(l>=0&&(d[0]=Math.min(d[0],_),d[1]=Math.max(d[1],b),E=!0,l/(b-_)>.5))return}if(E||x.push([_,b]),this.config.renderTextTracksNatively){var c=this.captionsTracks[t];this.Cues.newCue(c,_,b,v)}else{var y=this.Cues.newCue(null,_,b,v);this.hls.trigger(p.Events.CUES_PARSED,{type:"captions",cues:y,track:t})}},i.onInitPtsFound=function(t,_){var b=this,v=_.frag,x=_.id,E=_.initPTS,h=_.timescale,d=this.unparsedVttFrags;x==="main"&&(this.initPTS[v.cc]=E,this.timescale[v.cc]=h),d.length&&(this.unparsedVttFrags=[],d.forEach(function(l){b.onFragLoaded(p.Events.FRAG_LOADED,l)}))},i.getExistingTrack=function(t){var _=this.media;if(_)for(var b=0;b<_.textTracks.length;b++){var v=_.textTracks[b];if(v[t])return v}return null},i.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},i.createNativeTrack=function(t){if(this.captionsTracks[t])return;var _=this.captionsProperties,b=this.captionsTracks,v=this.media,x=_[t],E=x.label,h=x.languageCode,d=this.getExistingTrack(t);if(d)b[t]=d,Object(e.clearCurrentCues)(b[t]),Object(e.sendAddTrackEvent)(b[t],v);else{var l=this.createTextTrack("captions",E,h);l&&(l[t]=!0,b[t]=l)}},i.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var _=this.captionsProperties[t];if(!_)return;var b=_.label,v={_id:t,label:b,kind:"captions",default:_.media?!!_.media.default:!1,closedCaptions:_.media};this.nonNativeCaptionsTracks[t]=v,this.hls.trigger(p.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[v]})},i.createTextTrack=function(t,_,b){var v=this.media;return v?v.addTextTrack(t,_,b):void 0},i.onMediaAttaching=function(t,_){this.media=_.media,this._cleanTracks()},i.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(_){Object(e.clearCurrentCues)(t[_]),delete t[_]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),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())},i._cleanTracks=function(){var t=this.media;if(!t)return;var _=t.textTracks;if(_)for(var b=0;b<_.length;b++)Object(e.clearCurrentCues)(_[b])},i.onSubtitleTracksUpdated=function(t,_){var b=this;this.textTracks=[];var v=_.subtitleTracks||[],x=v.some(function(l){return l.textCodec===A.IMSC1_CODEC});if(this.config.enableWebVTT||x&&this.config.enableIMSC1){var E=this.tracks&&v&&this.tracks.length===v.length;if(this.tracks=v||[],this.config.renderTextTracksNatively){var h=this.media?this.media.textTracks:[];this.tracks.forEach(function(l,c){var y;if(c<h.length){for(var f=null,T=0;T<h.length;T++)if(a(h[T],l)){f=h[T];break}f&&(y=f)}y?Object(e.clearCurrentCues)(y):(y=b.createTextTrack("subtitles",l.name,l.lang),y&&(y.mode="disabled")),y&&(y.groupId=l.groupId,b.textTracks.push(y))})}else if(!E&&this.tracks&&this.tracks.length){var d=this.tracks.map(function(l){return{label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}});this.hls.trigger(p.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:d})}}},i.onManifestLoaded=function(t,_){var b=this;this.config.enableCEA708Captions&&_.captions&&_.captions.forEach(function(v){var x=/(?:CC|SERVICE)([1-4])/.exec(v.instreamId);if(!x)return;var E="textTrack"+x[1],h=b.captionsProperties[E];if(!h)return;h.label=v.name,v.lang&&(h.languageCode=v.lang),h.media=v})},i.onFragLoading=function(t,_){var b=this.cea608Parser1,v=this.cea608Parser2,x=this.lastSn,E=this.lastPartIndex;if(!this.enabled||!(b&&v))return;if(_.frag.type===g.PlaylistLevelType.MAIN){var h,d,l=_.frag.sn,c=(h=_==null||((d=_.part)===null||d===void 0)?void 0:d.index)!=null?h:-1;l===x+1||l===x&&c===E+1||(b.reset(),v.reset()),this.lastSn=l,this.lastPartIndex=c}},i.onFragLoaded=function(t,_){var b=_.frag,v=_.payload,x=this.initPTS,E=this.unparsedVttFrags;if(b.type===g.PlaylistLevelType.SUBTITLE)if(v.byteLength){if(!Object(B.isFiniteNumber)(x[b.cc])){E.push(_),x.length&&this.hls.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Missing initial subtitle PTS")});return}var h=b.decryptdata;if(h==null||h.key==null||h.method!=="AES-128"){var d=this.tracks[b.level],l=this.vttCCs;l[b.cc]||(l[b.cc]={start:b.start,prevCC:this.prevCC,new:!0},this.prevCC=b.cc),d&&d.textCodec===A.IMSC1_CODEC?this._parseIMSC1(b,v):this._parseVTTs(b,v,l)}}else this.hls.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(t,_){var b=this,v=this.hls;Object(A.parseIMSC1)(_,this.initPTS[t.cc],this.timescale[t.cc],function(x){b._appendCues(x,t.level),v.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(x){m.logger.log("Failed to parse IMSC1: "+x),v.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:x})})},i._parseVTTs=function(t,_,b){var v=this,x=this.hls;Object(N.parseWebVTT)(_,this.initPTS[t.cc],this.timescale[t.cc],b,t.cc,t.start,function(E){v._appendCues(E,t.level),x.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(E){v._fallbackToIMSC1(t,_),m.logger.log("Failed to parse VTT cue: "+E),x.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:E})})},i._fallbackToIMSC1=function(t,_){var b=this,v=this.tracks[t.level];v.textCodec||Object(A.parseIMSC1)(_,this.initPTS[t.cc],this.timescale[t.cc],function(){v.textCodec=A.IMSC1_CODEC,b._parseIMSC1(t,_)},function(){v.textCodec="wvtt"})},i._appendCues=function(t,_){var b=this.hls;if(this.config.renderTextTracksNatively){var v=this.textTracks[_];if(v.mode==="disabled")return;t.forEach(function(h){return Object(e.addCueToTrack)(v,h)})}else{var x=this.tracks[_],E=x.default?"default":"subtitles"+_;b.trigger(p.Events.CUES_PARSED,{type:"subtitles",cues:t,track:E})}},i.onFragDecrypted=function(t,_){var b=_.frag;if(b.type===g.PlaylistLevelType.SUBTITLE){if(!Object(B.isFiniteNumber)(this.initPTS[b.cc])){this.unparsedVttFrags.push(_);return}this.onFragLoaded(p.Events.FRAG_LOADED,_)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(t,_){var b=this.cea608Parser1,v=this.cea608Parser2;if(!this.enabled||!(b&&v))return;for(var x=0;x<_.samples.length;x++){var E=_.samples[x].bytes;if(E){var h=this.extractCea608Data(E);b.addData(_.samples[x].pts,h[0]),v.addData(_.samples[x].pts,h[1])}}},i.onBufferFlushing=function(t,_){var b=_.startOffset,v=_.endOffset,x=_.endOffsetSubtitles,E=_.type,h=this.media;if(!h||h.currentTime<v)return;if(!E||E==="video"){var d=this.captionsTracks;Object.keys(d).forEach(function(c){return Object(e.removeCuesInRange)(d[c],b,v)})}if(this.config.renderTextTracksNatively&&(b===0&&x!==void 0)){var l=this.textTracks;Object.keys(l).forEach(function(c){return Object(e.removeCuesInRange)(l[c],b,x)})}},i.extractCea608Data=function(t){for(var _=t[0]&31,b=2,v=[[],[]],x=0;x<_;x++){var E=t[b++],h=127&t[b++],d=127&t[b++],l=(4&E)!==0,c=3&E;if(h===0&&d===0)continue;l&&((c===0||c===1)&&(v[c].push(h),v[c].push(d)))}return v},s}();function a(s,i){return s&&s.label===i.name&&!(s.textTrack1||s.textTrack2)}function r(s,i,n,t){return Math.min(i,t)-Math.max(s,n)}function o(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return B});var B=function(){function p(H,N){this.subtle=void 0,this.aesIV=void 0,this.subtle=H,this.aesIV=N}var C=p.prototype;return C.decrypt=function(N,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,N)},p}()},"./src/crypt/aes-decryptor.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"removePadding",function(){return p}),R.d(k,"default",function(){return C});var B=R("./src/utils/typed-array.ts");function p(H){var N=H.byteLength,e=N&&new DataView(H.buffer).getUint8(N-1);return e?Object(B.sliceUint8)(H,0,N-e):H}var C=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 N=H.prototype;return N.uint8ArrayToUint32Array_=function(A){for(var g=new DataView(A),m=new Uint32Array(4),u=0;u<4;u++)m[u]=g.getUint32(u*4);return m},N.initTable=function(){var A=this.sBox,g=this.invSBox,m=this.subMix,u=m[0],a=m[1],r=m[2],o=m[3],s=this.invSubMix,i=s[0],n=s[1],t=s[2],_=s[3],b=new Uint32Array(256),v=0,x=0,E=0;for(E=0;E<256;E++)E<128?b[E]=E<<1:b[E]=E<<1^283;for(E=0;E<256;E++){var h=x^x<<1^x<<2^x<<3^x<<4;h=h>>>8^h&255^99,A[v]=h,g[h]=v;var d=b[v],l=b[d],c=b[l],y=b[h]*257^h*16843008;u[v]=y<<24|y>>>8,a[v]=y<<16|y>>>16,r[v]=y<<8|y>>>24,o[v]=y,y=c*16843009^l*65537^d*257^v*16843008,i[h]=y<<24|y>>>8,n[h]=y<<16|y>>>16,t[h]=y<<8|y>>>24,_[h]=y,v?(v=d^b[b[b[c^d]]],x^=b[b[x]]):v=x=1}},N.expandKey=function(A){for(var g=this.uint8ArrayToUint32Array_(A),m=!0,u=0;u<g.length&&m;)m=g[u]===this.key[u],u++;if(m)return;this.key=g;var a=this.keySize=g.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var r=this.ksRows=(a+6+1)*4,o,s,i=this.keySchedule=new Uint32Array(r),n=this.invKeySchedule=new Uint32Array(r),t=this.sBox,_=this.rcon,b=this.invSubMix,v=b[0],x=b[1],E=b[2],h=b[3],d,l;for(o=0;o<r;o++){if(o<a){d=i[o]=g[o];continue}l=d,o%a===0?(l=l<<8|l>>>24,l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255],l^=_[o/a|0]<<24):a>6&&o%a===4&&(l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255]),i[o]=d=(i[o-a]^l)>>>0}for(s=0;s<r;s++)o=r-s,s&3?l=i[o]:l=i[o-4],s<4||o<=4?n[s]=l:n[s]=v[t[l>>>24]]^x[t[l>>>16&255]]^E[t[l>>>8&255]]^h[t[l&255]],n[s]=n[s]>>>0},N.networkToHostOrderSwap=function(A){return A<<24|(A&65280)<<8|(A&16711680)>>8|A>>>24},N.decrypt=function(A,g,m){for(var u=this.keySize+6,a=this.invKeySchedule,r=this.invSBox,o=this.invSubMix,s=o[0],i=o[1],n=o[2],t=o[3],_=this.uint8ArrayToUint32Array_(m),b=_[0],v=_[1],x=_[2],E=_[3],h=new Int32Array(A),d=new Int32Array(h.length),l,c,y,f,T,I,P,S,w,F,L,G,Z,ue,ce=this.networkToHostOrderSwap;g<h.length;){for(w=ce(h[g]),F=ce(h[g+1]),L=ce(h[g+2]),G=ce(h[g+3]),T=w^a[0],I=G^a[1],P=L^a[2],S=F^a[3],Z=4,ue=1;ue<u;ue++)l=s[T>>>24]^i[I>>16&255]^n[P>>8&255]^t[S&255]^a[Z],c=s[I>>>24]^i[P>>16&255]^n[S>>8&255]^t[T&255]^a[Z+1],y=s[P>>>24]^i[S>>16&255]^n[T>>8&255]^t[I&255]^a[Z+2],f=s[S>>>24]^i[T>>16&255]^n[I>>8&255]^t[P&255]^a[Z+3],T=l,I=c,P=y,S=f,Z=Z+4;l=r[T>>>24]<<24^r[I>>16&255]<<16^r[P>>8&255]<<8^r[S&255]^a[Z],c=r[I>>>24]<<24^r[P>>16&255]<<16^r[S>>8&255]<<8^r[T&255]^a[Z+1],y=r[P>>>24]<<24^r[S>>16&255]<<16^r[T>>8&255]<<8^r[I&255]^a[Z+2],f=r[S>>>24]<<24^r[T>>16&255]<<16^r[I>>8&255]<<8^r[P&255]^a[Z+3],d[g]=ce(l^b),d[g+1]=ce(f^v),d[g+2]=ce(y^x),d[g+3]=ce(c^E),b=w,v=F,x=L,E=G,g=g+4}return d.buffer},H}()},"./src/crypt/decrypter.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return g});var B=R("./src/crypt/aes-crypto.ts"),p=R("./src/crypt/fast-aes-key.ts"),C=R("./src/crypt/aes-decryptor.ts"),H=R("./src/utils/logger.ts"),N=R("./src/utils/mp4-tools.ts"),e=R("./src/utils/typed-array.ts"),A=16,g=function(){function m(a,r,o){var s=o===void 0?{}:o,i=s.removePKCS7Padding,n=i===void 0?!0:i;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=a,this.config=r,this.removePKCS7Padding=n,n)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(_){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var u=m.prototype;return u.destroy=function(){this.observer=null},u.isSync=function(){return this.config.enableSoftwareAES},u.flush=function(){var r=this.currentResult;if(!r){this.reset();return}var o=new Uint8Array(r);return this.reset(),this.removePKCS7Padding?Object(C.removePadding)(o):o},u.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},u.decrypt=function(r,o,s,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(r),o,s);var n=this.flush();n&&i(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(r),o,s).then(i)},u.softwareDecrypt=function(r,o,s){var i=this.currentIV,n=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(r=Object(N.appendUint8Array)(t,r),this.remainderData=null);var _=this.getValidChunk(r);if(!_.length)return null;i&&(s=i);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new C.default),b.expandKey(o);var v=n;return this.currentResult=b.decrypt(_.buffer,0,s),this.currentIV=Object(e.sliceUint8)(_,-16).buffer,v||null},u.webCryptoDecrypt=function(r,o,s){var i=this,n=this.subtle;return(this.key!==o||!this.fastAesKey)&&(this.key=o,this.fastAesKey=new p.default(n,o)),this.fastAesKey.expandKey().then(function(t){if(!n)return Promise.reject(new Error("web crypto not initialized"));var _=new B.default(n,s);return _.decrypt(r.buffer,t)}).catch(function(t){return i.onWebCryptoError(t,r,o,s)})},u.onWebCryptoError=function(r,o,s,i){return H.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",r),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(o,s,i)},u.getValidChunk=function(r){var o=r,s=r.length-r.length%A;return s!==r.length&&(o=Object(e.sliceUint8)(r,0,s),this.remainderData=Object(e.sliceUint8)(r,s)),o},u.logOnce=function(r){if(!this.logEnabled)return;H.logger.log("[decrypter.ts]: "+r),this.logEnabled=!1},m}()},"./src/crypt/fast-aes-key.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return B});var B=function(){function p(H,N){this.subtle=void 0,this.key=void 0,this.subtle=H,this.key=N}var C=p.prototype;return C.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},p}()},"./src/demux/aacdemuxer.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/demux/base-audio-demuxer.ts"),p=R("./src/demux/adts.ts"),C=R("./src/utils/logger.ts"),H=R("./src/demux/id3.ts");function N(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,e(g,m)}function e(g,m){return e=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},e(g,m)}var A=function(g){N(m,g);function m(a,r){var o;return o=g.call(this)||this,o.observer=void 0,o.config=void 0,o.observer=a,o.config=r,o}var u=m.prototype;return u.resetInitSegment=function(r,o,s){g.prototype.resetInitSegment.call(this,r,o,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:r,duration:s,inputTimeScale:9e4,dropped:0}},m.probe=function(r){if(!r)return!1;for(var o=H.getID3Data(r,0)||[],s=o.length,i=r.length;s<i;s++)if(p.probe(r,s))return C.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(r,o){return p.canParse(r,o)},u.appendFrame=function(r,o,s){p.initTrackConfig(r,this.observer,o,s,r.manifestCodec);var i=p.appendFrame(r,o,s,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},m}(B.default);A.minProbeByteLength=9,k.default=A},"./src/demux/adts.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"getAudioConfig",function(){return H}),R.d(k,"isHeaderPattern",function(){return N}),R.d(k,"getHeaderLength",function(){return e}),R.d(k,"getFullFrameLength",function(){return A}),R.d(k,"canGetFrameLength",function(){return g}),R.d(k,"isHeader",function(){return m}),R.d(k,"canParse",function(){return u}),R.d(k,"probe",function(){return a}),R.d(k,"initTrackConfig",function(){return r}),R.d(k,"getFrameDuration",function(){return o}),R.d(k,"parseFrameHeader",function(){return s}),R.d(k,"appendFrame",function(){return i});var B=R("./src/utils/logger.ts"),p=R("./src/errors.ts"),C=R("./src/events.ts");function H(n,t,_,b){var v,x,E,h,d=navigator.userAgent.toLowerCase(),l=b,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];v=((t[_+2]&192)>>>6)+1;var y=(t[_+2]&60)>>>2;if(y>c.length-1){n.trigger(C.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+y});return}return E=(t[_+2]&1)<<2,E|=(t[_+3]&192)>>>6,B.logger.log("manifest codec:"+b+", ADTS type:"+v+", samplingIndex:"+y),/firefox/i.test(d)?y>=6?(v=5,h=new Array(4),x=y-3):(v=2,h=new Array(2),x=y):d.indexOf("android")!==-1?(v=2,h=new Array(2),x=y):(v=5,h=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&y>=6?x=y-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(y>=6&&E===1||/vivaldi/i.test(d))||!b&&E===1)&&(v=2,h=new Array(2)),x=y)),h[0]=v<<3,h[0]|=(y&14)>>1,h[1]|=(y&1)<<7,h[1]|=E<<3,v===5&&(h[1]|=(x&14)>>1,h[2]=(x&1)<<7,h[2]|=2<<2,h[3]=0),{config:h,samplerate:c[y],channelCount:E,codec:"mp4a.40."+v,manifestCodec:l}}function N(n,t){return n[t]===255&&(n[t+1]&246)===240}function e(n,t){return n[t+1]&1?7:9}function A(n,t){return(n[t+3]&3)<<11|n[t+4]<<3|(n[t+5]&224)>>>5}function g(n,t){return t+5<n.length}function m(n,t){return t+1<n.length&&N(n,t)}function u(n,t){return g(n,t)&&N(n,t)&&A(n,t)<=n.length-t}function a(n,t){if(m(n,t)){var _=e(n,t);if(t+_>=n.length)return!1;var b=A(n,t);if(b<=_)return!1;var v=t+b;return v===n.length||m(n,v)}return!1}function r(n,t,_,b,v){if(!n.samplerate){var x=H(t,_,b,v);if(!x)return;n.config=x.config,n.samplerate=x.samplerate,n.channelCount=x.channelCount,n.codec=x.codec,n.manifestCodec=x.manifestCodec,B.logger.log("parsed codec:"+n.codec+", rate:"+x.samplerate+", channels:"+x.channelCount)}}function o(n){return 1024*9e4/n}function s(n,t,_,b,v){var x=e(n,t),E=A(n,t);if(E-=x,E>0){var h=_+b*v;return{headerLength:x,frameLength:E,stamp:h}}}function i(n,t,_,b,v){var x=o(n.samplerate),E=s(t,_,b,v,x);if(E){var h=E.frameLength,d=E.headerLength,l=E.stamp,c=d+h,y=Math.max(0,_+c-t.length),f;y?(f=new Uint8Array(c-d),f.set(t.subarray(_+d,t.length),0)):f=t.subarray(_+d,_+c);var T={unit:f,pts:l};return y||n.samples.push(T),{sample:T,length:c,missing:y}}}},"./src/demux/base-audio-demuxer.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"initPTSFn",function(){return A});var B=R("./src/polyfills/number.ts"),p=R("./src/demux/id3.ts"),C=R("./src/demux/dummy-demuxed-track.ts"),H=R("./src/utils/mp4-tools.ts"),N=R("./src/utils/typed-array.ts"),e=function(){function g(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var m=g.prototype;return m.resetInitSegment=function(a,r,o){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},m.resetTimeStamp=function(){},m.resetContiguity=function(){},m.canParse=function(a,r){return!1},m.appendFrame=function(a,r,o){},m.demux=function(a,r){this.cachedData&&(a=Object(H.appendUint8Array)(this.cachedData,a),this.cachedData=null);var o=p.getID3Data(a,0),s=o?o.length:0,i,n,t=this._audioTrack,_=this._id3Track,b=o?p.getTimeStamp(o):void 0,v=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=A(b,r)),o&&o.length>0&&_.samples.push({pts:this.initPTS,dts:this.initPTS,data:o}),n=this.initPTS;s<v;){if(this.canParse(a,s)){var x=this.appendFrame(t,a,s);x?(this.frameIndex++,n=x.sample.pts,s+=x.length,i=s):s=v}else p.canParse(a,s)?(o=p.getID3Data(a,s),_.samples.push({pts:n,dts:n,data:o}),s+=o.length,i=s):s++;if(s===v&&i!==v){var E=Object(N.sliceUint8)(a,i);this.cachedData?this.cachedData=Object(H.appendUint8Array)(this.cachedData,E):this.cachedData=E}}return{audioTrack:t,avcTrack:Object(C.dummyTrack)(),id3Track:_,textTrack:Object(C.dummyTrack)()}},m.demuxSampleAes=function(a,r,o){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},m.flush=function(a){var r=this.cachedData;return r&&(this.cachedData=null,this.demux(r,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(C.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(C.dummyTrack)()}},m.destroy=function(){},g}(),A=function(m,u){return Object(B.isFiniteNumber)(m)?m*90:u*9e4};k.default=e},"./src/demux/chunk-cache.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return B});var B=function(){function C(){this.chunks=[],this.dataLength=0}var H=C.prototype;return H.push=function(e){this.chunks.push(e),this.dataLength+=e.length},H.flush=function(){var e=this.chunks,A=this.dataLength,g;if(e.length)e.length===1?g=e[0]:g=p(e,A);else return new Uint8Array(0);return this.reset(),g},H.reset=function(){this.chunks.length=0,this.dataLength=0},C}();function p(C,H){for(var N=new Uint8Array(H),e=0,A=0;A<C.length;A++){var g=C[A];N.set(g,e),e+=g.length}return N}},"./src/demux/dummy-demuxed-track.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"dummyTrack",function(){return B});function B(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/utils/logger.ts"),p=function(){function C(N){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=N,this.bytesAvailable=N.byteLength,this.word=0,this.bitsAvailable=0}var H=C.prototype;return H.loadWord=function(){var e=this.data,A=this.bytesAvailable,g=e.byteLength-A,m=new Uint8Array(4),u=Math.min(4,A);if(u===0)throw new Error("no bytes available");m.set(e.subarray(g,g+u)),this.word=new DataView(m.buffer).getUint32(0),this.bitsAvailable=u*8,this.bytesAvailable-=u},H.skipBits=function(e){var A;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,A=e>>3,e-=A>>3,this.bytesAvailable-=A,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},H.readBits=function(e){var A=Math.min(this.bitsAvailable,e),g=this.word>>>32-A;return e>32&&B.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=e-A,A>0&&this.bitsAvailable?g<<A|this.readBits(A):g},H.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},H.skipUEG=function(){this.skipBits(1+this.skipLZ())},H.skipEG=function(){this.skipBits(1+this.skipLZ())},H.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},H.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>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(e){for(var A=8,g=8,m,u=0;u<e;u++)g!==0&&(m=this.readEG(),g=(A+m+256)%256),A=g===0?A:g},H.readSPS=function(){var e=0,A=0,g=0,m=0,u,a,r,o=this.readUByte.bind(this),s=this.readBits.bind(this),i=this.readUEG.bind(this),n=this.readBoolean.bind(this),t=this.skipBits.bind(this),_=this.skipEG.bind(this),b=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);o();var x=o();if(s(5),t(3),o(),b(),x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128){var E=i();if(E===3&&t(1),b(),b(),t(1),n())for(a=E!==3?8:12,r=0;r<a;r++)n()&&(r<6?v(16):v(64))}b();var h=i();if(h===0)i();else if(h===1)for(t(1),_(),_(),u=i(),r=0;r<u;r++)_();b(),t(1);var d=i(),l=i(),c=s(1);c===0&&t(1),t(1),n()&&(e=i(),A=i(),g=i(),m=i());var y=[1,1];if(n()&&n()){var f=o();switch(f){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:{y=[o()<<8|o(),o()<<8|o()];break}}}return{width:Math.ceil((d+1)*16-e*2-A*2),height:(2-c)*(l+1)*16-(c?2:4)*(g+m),pixelRatio:y}},H.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},C}();k.default=p},"./src/demux/id3.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"isHeader",function(){return B}),R.d(k,"isFooter",function(){return p}),R.d(k,"getID3Data",function(){return C}),R.d(k,"canParse",function(){return N}),R.d(k,"getTimeStamp",function(){return e}),R.d(k,"isTimeStampFrame",function(){return A}),R.d(k,"getID3Frames",function(){return m}),R.d(k,"decodeFrame",function(){return u}),R.d(k,"utf8ArrayToStr",function(){return i}),R.d(k,"testables",function(){return n});var B=function(v,x){return x+10<=v.length&&(v[x]===73&&v[x+1]===68&&v[x+2]===51&&(v[x+3]<255&&v[x+4]<255&&(v[x+6]<128&&v[x+7]<128&&v[x+8]<128&&v[x+9]<128)))},p=function(v,x){return x+10<=v.length&&(v[x]===51&&v[x+1]===68&&v[x+2]===73&&(v[x+3]<255&&v[x+4]<255&&(v[x+6]<128&&v[x+7]<128&&v[x+8]<128&&v[x+9]<128)))},C=function(v,x){for(var E=x,h=0;B(v,x);){h+=10;var d=H(v,x+6);h+=d,p(v,x+10)&&(h+=10),x+=h}return h>0?v.subarray(E,E+h):void 0},H=function(v,x){var E=0;return E=(v[x]&127)<<21,E|=(v[x+1]&127)<<14,E|=(v[x+2]&127)<<7,E|=v[x+3]&127,E},N=function(v,x){return B(v,x)&&H(v,x+6)+10<=v.length-x},e=function(v){for(var x=m(v),E=0;E<x.length;E++){var h=x[E];if(A(h))return s(h)}return},A=function(v){return v&&v.key==="PRIV"&&v.info==="com.apple.streaming.transportStreamTimestamp"},g=function(v){var x=String.fromCharCode(v[0],v[1],v[2],v[3]),E=H(v,4),h=10;return{type:x,size:E,data:v.subarray(h,h+E)}},m=function(v){for(var x=0,E=[];B(v,x);){var h=H(v,x+6);x+=10;for(var d=x+h;x+8<d;){var l=g(v.subarray(x)),c=u(l);c&&E.push(c),x+=l.size+10}p(v,x)&&(x+=10)}return E},u=function(v){return v.type==="PRIV"?a(v):v.type[0]==="W"?o(v):r(v)},a=function(v){if(v.size<2)return;var x=i(v.data,!0),E=new Uint8Array(v.data.subarray(x.length+1));return{key:v.type,info:x,data:E.buffer}},r=function(v){if(v.size<2)return;if(v.type==="TXXX"){var x=1,E=i(v.data.subarray(x),!0);x+=E.length+1;var h=i(v.data.subarray(x));return{key:v.type,info:E,data:h}}var d=i(v.data.subarray(1));return{key:v.type,data:d}},o=function(v){if(v.type==="WXXX"){if(v.size<2)return;var x=1,E=i(v.data.subarray(x),!0);x+=E.length+1;var h=i(v.data.subarray(x));return{key:v.type,info:E,data:h}}var d=i(v.data);return{key:v.type,data:d}},s=function(v){if(v.data.byteLength===8){var x=new Uint8Array(v.data),E=x[3]&1,h=(x[4]<<23)+(x[5]<<15)+(x[6]<<7)+x[7];return h/=45,E&&(h+=4772185884e-2),Math.round(h)}return},i=function(v,x){x===void 0&&(x=!1);var E=_();if(E){var h=E.decode(v);if(x){var d=h.indexOf("\0");return d!==-1?h.substring(0,d):h}return h.replace(/\0/g,"")}for(var l=v.length,c,y,f,T="",I=0;I<l;){if(c=v[I++],c===0&&x)return T;if(c===0||c===3)continue;switch(c>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:T+=String.fromCharCode(c);break;case 12:case 13:y=v[I++],T+=String.fromCharCode((c&31)<<6|y&63);break;case 14:y=v[I++],f=v[I++],T+=String.fromCharCode((c&15)<<12|(y&63)<<6|(f&63)<<0);break;default:}}return T},n={decodeTextFrame:r},t;function _(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/demux/base-audio-demuxer.ts"),p=R("./src/demux/id3.ts"),C=R("./src/utils/logger.ts"),H=R("./src/demux/mpegaudio.ts");function N(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,e(g,m)}function e(g,m){return e=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},e(g,m)}var A=function(g){N(m,g);function m(){return g.apply(this,arguments)||this}var u=m.prototype;return u.resetInitSegment=function(r,o,s){g.prototype.resetInitSegment.call(this,r,o,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:r,duration:s,inputTimeScale:9e4,dropped:0}},m.probe=function(r){if(!r)return!1;for(var o=p.getID3Data(r,0)||[],s=o.length,i=r.length;s<i;s++)if(H.probe(r,s))return C.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(r,o){return H.canParse(r,o)},u.appendFrame=function(r,o,s){return this.initPTS===null?void 0:H.appendFrame(r,o,s,this.initPTS,this.frameIndex)},m}(B.default);A.minProbeByteLength=4,k.default=A},"./src/demux/mp4demuxer.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/utils/mp4-tools.ts"),p=R("./src/demux/dummy-demuxed-track.ts"),C=function(){function H(e,A){this.remainderData=null,this.config=void 0,this.config=A}var N=H.prototype;return N.resetTimeStamp=function(){},N.resetInitSegment=function(){},N.resetContiguity=function(){},H.probe=function(A){return Object(B.findBox)({data:A,start:0,end:Math.min(A.length,16384)},["moof"]).length>0},N.demux=function(A){var g=A,m=Object(p.dummyTrack)();if(this.config.progressive){this.remainderData&&(g=Object(B.appendUint8Array)(this.remainderData,A));var u=Object(B.segmentValidRange)(g);this.remainderData=u.remainder,m.samples=u.valid||new Uint8Array}else m.samples=g;return{audioTrack:Object(p.dummyTrack)(),avcTrack:m,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},N.flush=function(){var A=Object(p.dummyTrack)();return A.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(p.dummyTrack)(),avcTrack:A,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},N.demuxSampleAes=function(A,g,m){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},N.destroy=function(){},H}();C.minProbeByteLength=1024,k.default=C},"./src/demux/mpegaudio.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"appendFrame",function(){return e}),R.d(k,"parseHeader",function(){return A}),R.d(k,"isHeaderPattern",function(){return g}),R.d(k,"isHeader",function(){return m}),R.d(k,"canParse",function(){return u}),R.d(k,"probe",function(){return a});var B=null,p=[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],C=[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]],N=[0,1,1,4];function e(r,o,s,i,n){if(s+24>o.length)return;var t=A(o,s);if(t&&s+t.frameLength<=o.length){var _=t.samplesPerFrame*9e4/t.sampleRate,b=i+n*_,v={unit:o.subarray(s,s+t.frameLength),pts:b,dts:b};return r.config=[],r.channelCount=t.channelCount,r.samplerate=t.sampleRate,r.samples.push(v),{sample:v,length:t.frameLength,missing:0}}}function A(r,o){var s=r[o+1]>>3&3,i=r[o+1]>>1&3,n=r[o+2]>>4&15,t=r[o+2]>>2&3;if(s!==1&&n!==0&&n!==15&&t!==3){var _=r[o+2]>>1&1,b=r[o+3]>>6,v=s===3?3-i:i===3?3:4,x=p[v*14+n-1]*1e3,E=s===3?0:s===2?1:2,h=C[E*3+t],d=b===3?1:2,l=H[s][i],c=N[i],y=l*8*c,f=Math.floor(l*x/h+_)*c;if(B===null){var T=navigator.userAgent||"",I=T.match(/Chrome\/(\d+)/i);B=I?parseInt(I[1]):0}var P=!!B&&B<=87;return P&&i===2&&x>=224e3&&b===0&&(r[o+3]=r[o+3]|128),{sampleRate:h,channelCount:d,frameLength:f,samplesPerFrame:y}}}function g(r,o){return r[o]===255&&(r[o+1]&224)===224&&(r[o+1]&6)!==0}function m(r,o){return o+1<r.length&&g(r,o)}function u(r,o){var s=4;return g(r,o)&&s<=r.length-o}function a(r,o){if(o+1<r.length&&g(r,o)){var s=4,i=A(r,o),n=s;i!=null&&i.frameLength&&(n=i.frameLength);var t=o+n;return t===r.length||m(r,t)}return!1}},"./src/demux/sample-aes.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/crypt/decrypter.ts"),p=R("./src/demux/tsdemuxer.ts"),C=function(){function H(e,A,g){this.keyData=void 0,this.decrypter=void 0,this.keyData=g,this.decrypter=new B.default(e,A,{removePKCS7Padding:!1})}var N=H.prototype;return N.decryptBuffer=function(A,g){this.decrypter.decrypt(A,this.keyData.key.buffer,this.keyData.iv.buffer,g)},N.decryptAacSample=function(A,g,m,u){var a=A[g].unit,r=a.subarray(16,a.length-a.length%16),o=r.buffer.slice(r.byteOffset,r.byteOffset+r.length),s=this;this.decryptBuffer(o,function(i){var n=new Uint8Array(i);a.set(n,16),u||s.decryptAacSamples(A,g+1,m)})},N.decryptAacSamples=function(A,g,m){for(;;g++){if(g>=A.length){m();return}if(A[g].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(A,g,m,u),!u)return}},N.getAvcEncryptedData=function(A){for(var g=Math.floor((A.length-48)/160)*16+16,m=new Int8Array(g),u=0,a=32;a<=A.length-16;a+=160,u+=16)m.set(A.subarray(a,a+16),u);return m},N.getAvcDecryptedUnit=function(A,g){for(var m=new Uint8Array(g),u=0,a=32;a<=A.length-16;a+=160,u+=16)A.set(m.subarray(u,u+16),a);return A},N.decryptAvcSample=function(A,g,m,u,a,r){var o=Object(p.discardEPB)(a.data),s=this.getAvcEncryptedData(o),i=this;this.decryptBuffer(s.buffer,function(n){a.data=i.getAvcDecryptedUnit(o,n),r||i.decryptAvcSamples(A,g,m+1,u)})},N.decryptAvcSamples=function(A,g,m,u){if(A instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;g++,m=0){if(g>=A.length){u();return}for(var a=A[g].units;!(m>=a.length);m++){var r=a[m];if(r.data.length<=48||r.type!==1&&r.type!==5)continue;var o=this.decrypter.isSync();if(this.decryptAvcSample(A,g,m,u,r,o),!o)return}}},H}();k.default=C},"./src/demux/transmuxer-interface.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return a});var B=R("./node_modules/webworkify-webpack/index.js"),p=R.n(B),C=R("./src/events.ts"),H=R("./src/demux/transmuxer.ts"),N=R("./src/utils/logger.ts"),e=R("./src/errors.ts"),A=R("./src/utils/mediasource-helper.ts"),g=R("./node_modules/eventemitter3/index.js"),m=R.n(g),u=Object(A.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function r(s,i,n,t){var _=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=i,this.onTransmuxComplete=n,this.onFlush=t;var b=s.config,v=function(l,c){c=c||{},c.frag=_.frag,c.id=_.id,s.trigger(l,c)};this.observer=new g.EventEmitter,this.observer.on(C.Events.FRAG_DECRYPTED,v),this.observer.on(C.Events.ERROR,v);var x={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},E=navigator.vendor;if(b.enableWorker&&typeof Worker!="undefined"){N.logger.log("demuxing in webworker");var h;try{h=this.worker=B("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),h.addEventListener("message",this.onwmsg),h.onerror=function(d){s.trigger(C.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(d.message+" ("+d.filename+":"+d.lineno+")")})},h.postMessage({cmd:"init",typeSupported:x,vendor:E,id:i,config:JSON.stringify(b)})}catch(d){N.logger.warn("Error in worker:",d),N.logger.error("Error while initializing DemuxerWorker, fallback to inline"),h&&self.URL.revokeObjectURL(h.objectURL),this.transmuxer=new H.default(this.observer,x,b,E,i),this.worker=null}}else this.transmuxer=new H.default(this.observer,x,b,E,i)}var o=r.prototype;return o.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var n=this.transmuxer;n&&(n.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},o.push=function(i,n,t,_,b,v,x,E,h,d){var l=this;h.transmuxing.start=self.performance.now();var c=this.transmuxer,y=this.worker,f=v?v.start:b.start,T=b.decryptdata,I=this.frag,P=!(I&&b.cc===I.cc),S=!(I&&h.level===I.level),w=I?h.sn-I.sn:-1,F=this.part?h.part-this.part.index:1,L=!S&&(w===1||w===0&&F===1),G=self.performance.now();(S||w||b.stats.parsing.start===0)&&(b.stats.parsing.start=G),v&&(F||!L)&&(v.stats.parsing.start=G);var Z=new H.TransmuxState(P,L,E,S,f);if(!L||P){N.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+`
|
|
discontinuity: `+P+`
|
|
trackSwitch: `+S+`
|
|
contiguous: `+L+`
|
|
accurateTimeOffset: `+E+`
|
|
timeOffset: `+f);var ue=new H.TransmuxConfig(t,_,n,x,d);this.configureTransmuxer(ue)}if(this.frag=b,this.part=v,y)y.postMessage({cmd:"demux",data:i,decryptdata:T,chunkMeta:h,state:Z},i instanceof ArrayBuffer?[i]:[]);else if(c){var ce=c.push(i,T,h,Z);Object(H.isPromise)(ce)?ce.then(function(Re){l.handleTransmuxComplete(Re)}):this.handleTransmuxComplete(ce)}},o.flush=function(i){var n=this;i.transmuxing.start=self.performance.now();var t=this.transmuxer,_=this.worker;if(_)_.postMessage({cmd:"flush",chunkMeta:i});else if(t){var b=t.flush(i);Object(H.isPromise)(b)?b.then(function(v){n.handleFlushResult(v,i)}):this.handleFlushResult(b,i)}},o.handleFlushResult=function(i,n){var t=this;i.forEach(function(_){t.handleTransmuxComplete(_)}),this.onFlush(n)},o.onWorkerMessage=function(i){var n=i.data,t=this.hls;switch(n.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(n.data);break}case"flush":{this.onFlush(n.data);break}default:{n.data=n.data||{},n.data.frag=this.frag,n.data.id=this.id,t.trigger(n.event,n.data);break}}},o.configureTransmuxer=function(i){var n=this.worker,t=this.transmuxer;n?n.postMessage({cmd:"configure",config:i}):t&&t.configure(i)},o.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},r}()},"./src/demux/transmuxer-worker.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return e});var B=R("./src/demux/transmuxer.ts"),p=R("./src/events.ts"),C=R("./src/utils/logger.ts"),H=R("./node_modules/eventemitter3/index.js"),N=R.n(H);function e(a){var r=new H.EventEmitter,o=function(i,n){a.postMessage({event:i,data:n})};r.on(p.Events.FRAG_DECRYPTED,o),r.on(p.Events.ERROR,o),a.addEventListener("message",function(s){var i=s.data;switch(i.cmd){case"init":{var n=JSON.parse(i.config);a.transmuxer=new B.default(r,i.typeSupported,n,i.vendor,i.id),Object(C.enableLogs)(n.debug),o("init",null);break}case"configure":{a.transmuxer.configure(i.config);break}case"demux":{var t=a.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(B.isPromise)(t)?t.then(function(v){A(a,v)}):A(a,t);break}case"flush":{var _=i.chunkMeta,b=a.transmuxer.flush(_);Object(B.isPromise)(b)?b.then(function(v){m(a,v,_)}):m(a,b,_);break}default:break}})}function A(a,r){if(u(r.remuxResult))return;var o=[],s=r.remuxResult,i=s.audio,n=s.video;i&&g(o,i),n&&g(o,n),a.postMessage({event:"transmuxComplete",data:r},o)}function g(a,r){r.data1&&a.push(r.data1.buffer),r.data2&&a.push(r.data2.buffer)}function m(a,r,o){r.forEach(function(s){A(a,s)}),a.postMessage({event:"flush",data:o})}function u(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return n}),R.d(k,"isPromise",function(){return b}),R.d(k,"TransmuxConfig",function(){return v}),R.d(k,"TransmuxState",function(){return x});var B=R("./src/events.ts"),p=R("./src/errors.ts"),C=R("./src/crypt/decrypter.ts"),H=R("./src/demux/aacdemuxer.ts"),N=R("./src/demux/mp4demuxer.ts"),e=R("./src/demux/tsdemuxer.ts"),A=R("./src/demux/mp3demuxer.ts"),g=R("./src/remux/mp4-remuxer.ts"),m=R("./src/remux/passthrough-remuxer.ts"),u=R("./src/demux/chunk-cache.ts"),a=R("./src/utils/mp4-tools.ts"),r=R("./src/utils/logger.ts"),o;try{o=self.performance.now.bind(self.performance)}catch(E){r.logger.debug("Unable to use Performance API on this environment"),o=self.Date.now}var s=[{demux:e.default,remux:g.default},{demux:N.default,remux:m.default},{demux:H.default,remux:g.default},{demux:A.default,remux:g.default}],i=1024;s.forEach(function(E){var h=E.demux;i=Math.max(i,h.minProbeByteLength)});var n=function(){function E(d,l,c,y,f){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 u.default,this.observer=d,this.typeSupported=l,this.config=c,this.vendor=y,this.id=f}var h=E.prototype;return h.configure=function(l){this.transmuxConfig=l,this.decrypter&&this.decrypter.reset()},h.push=function(l,c,y,f){var T=this,I=y.transmuxing;I.executeStart=o();var P=new Uint8Array(l),S=this.cache,w=this.config,F=this.currentTransmuxState,L=this.transmuxConfig;f&&(this.currentTransmuxState=f);var G=t(P,c);if(G&&G.method==="AES-128"){var Z=this.getDecrypter();if(w.enableSoftwareAES){var ue=Z.softwareDecrypt(P,G.key.buffer,G.iv.buffer);if(!ue)return I.executeEnd=o(),_(y);P=new Uint8Array(ue)}else return this.decryptionPromise=Z.webCryptoDecrypt(P,G.key.buffer,G.iv.buffer).then(function(Oe){var Me=T.push(Oe,null,y);return T.decryptionPromise=null,Me}),this.decryptionPromise}var ce=f||F,Re=ce.contiguous,Ee=ce.discontinuity,he=ce.trackSwitch,we=ce.accurateTimeOffset,Pe=ce.timeOffset,de=L.audioCodec,j=L.videoCodec,O=L.defaultInitPts,D=L.duration,W=L.initSegmentData;if((Ee||he)&&this.resetInitSegment(W,de,j,D),Ee&&this.resetInitialTimestamp(O),Re||this.resetContiguity(),this.needsProbing(P,Ee,he)){if(S.dataLength){var V=S.flush();P=Object(a.appendUint8Array)(V,P)}this.configureTransmuxer(P,L)}var U=this.transmux(P,G,Pe,we,y),le=this.currentTransmuxState;return le.contiguous=!0,le.discontinuity=!1,le.trackSwitch=!1,I.executeEnd=o(),U},h.flush=function(l){var c=this,y=l.transmuxing;y.executeStart=o();var f=this.decrypter,T=this.cache,I=this.currentTransmuxState,P=this.decryptionPromise;if(P)return P.then(function(){return c.flush(l)});var S=[],w=I.timeOffset;if(f){var F=f.flush();F&&S.push(this.push(F,null,l))}var L=T.dataLength;T.reset();var G=this.demuxer,Z=this.remuxer;if(!G||!Z)return L>=i&&this.observer.emit(B.Events.ERROR,B.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),y.executeEnd=o(),[_(l)];var ue=G.flush(w);return b(ue)?ue.then(function(ce){return c.flushRemux(S,ce,l),S}):(this.flushRemux(S,ue,l),S)},h.flushRemux=function(l,c,y){var f=c.audioTrack,T=c.avcTrack,I=c.id3Track,P=c.textTrack,S=this.currentTransmuxState,w=S.accurateTimeOffset,F=S.timeOffset;r.logger.log("[transmuxer.ts]: Flushed fragment "+y.sn+(y.part>-1?" p: "+y.part:"")+" of level "+y.level);var L=this.remuxer.remux(f,T,I,P,F,w,!0,this.id);l.push({remuxResult:L,chunkMeta:y}),y.transmuxing.executeEnd=o()},h.resetInitialTimestamp=function(l){var c=this.demuxer,y=this.remuxer;if(!c||!y)return;c.resetTimeStamp(l),y.resetTimeStamp(l)},h.resetContiguity=function(){var l=this.demuxer,c=this.remuxer;if(!l||!c)return;l.resetContiguity(),c.resetNextTimestamp()},h.resetInitSegment=function(l,c,y,f){var T=this.demuxer,I=this.remuxer;if(!T||!I)return;T.resetInitSegment(c,y,f),I.resetInitSegment(l,c,y)},h.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},h.transmux=function(l,c,y,f,T){var I;return c&&c.method==="SAMPLE-AES"?I=this.transmuxSampleAes(l,c,y,f,T):I=this.transmuxUnencrypted(l,y,f,T),I},h.transmuxUnencrypted=function(l,c,y,f){var T=this.demuxer.demux(l,c,!1,!this.config.progressive),I=T.audioTrack,P=T.avcTrack,S=T.id3Track,w=T.textTrack,F=this.remuxer.remux(I,P,S,w,c,y,!1,this.id);return{remuxResult:F,chunkMeta:f}},h.transmuxSampleAes=function(l,c,y,f,T){var I=this;return this.demuxer.demuxSampleAes(l,c,y).then(function(P){var S=I.remuxer.remux(P.audioTrack,P.avcTrack,P.id3Track,P.textTrack,y,f,!1,I.id);return{remuxResult:S,chunkMeta:T}})},h.configureTransmuxer=function(l,c){for(var y=this.config,f=this.observer,T=this.typeSupported,I=this.vendor,P=c.audioCodec,S=c.defaultInitPts,w=c.duration,F=c.initSegmentData,L=c.videoCodec,G,Z=0,ue=s.length;Z<ue;Z++)if(s[Z].demux.probe(l)){G=s[Z];break}G||(r.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),G={demux:N.default,remux:m.default});var ce=this.demuxer,Re=this.remuxer,Ee=G.remux,he=G.demux;(!Re||!(Re instanceof Ee))&&(this.remuxer=new Ee(f,y,T,I)),(!ce||!(ce instanceof he))&&(this.demuxer=new he(f,y,T),this.probe=he.probe),this.resetInitSegment(F,P,L,w),this.resetInitialTimestamp(S)},h.needsProbing=function(l,c,y){return!this.demuxer||!this.remuxer||c||y},h.getDecrypter=function(){var l=this.decrypter;return l||(l=this.decrypter=new C.default(this.observer,this.config)),l},E}();function t(E,h){var d=null;return E.byteLength>0&&h!=null&&h.key!=null&&h.iv!==null&&h.method!=null&&(d=h),d}var _=function(h){return{remuxResult:{},chunkMeta:h}};function b(E){return"then"in E&&E.then instanceof Function}var v=function(h,d,l,c,y){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=d,this.initSegmentData=l,this.duration=c,this.defaultInitPts=y},x=function(h,d,l,c,y){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=d,this.accurateTimeOffset=l,this.trackSwitch=c,this.timeOffset=y}},"./src/demux/tsdemuxer.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"discardEPB",function(){return _});var B=R("./src/demux/adts.ts"),p=R("./src/demux/mpegaudio.ts"),C=R("./src/demux/exp-golomb.ts"),H=R("./src/demux/id3.ts"),N=R("./src/demux/sample-aes.ts"),e=R("./src/events.ts"),A=R("./src/utils/mp4-tools.ts"),g=R("./src/utils/logger.ts"),m=R("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},a=function(){function b(x,E,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=x,this.config=E,this.typeSupported=h}b.probe=function(E){var h=b.syncOffset(E);return h<0?!1:(h&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+h+", junk ahead ?"),!0)},b.syncOffset=function(E){for(var h=Math.min(1e3,E.length-3*188),d=0;d<h;){if(E[d]===71&&E[d+188]===71&&E[d+2*188]===71)return d;d++}return-1},b.createTrack=function(E,h){return{container:E==="video"||E==="audio"?"video/mp2t":void 0,type:E,id:u[E],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:E==="audio"?h:void 0}};var v=b.prototype;return v.resetInitSegment=function(E,h,d){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=b.createTrack("video",d),this._audioTrack=b.createTrack("audio",d),this._id3Track=b.createTrack("id3",d),this._txtTrack=b.createTrack("text",d),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=E,this.videoCodec=h,this._duration=d},v.resetTimeStamp=function(){},v.resetContiguity=function(){var E=this._audioTrack,h=this._avcTrack,d=this._id3Track;E&&(E.pesData=null),h&&(h.pesData=null),d&&(d.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},v.demux=function(E,h,d,l){d===void 0&&(d=!1),l===void 0&&(l=!1),d||(this.sampleAes=null);var c,y=this._avcTrack,f=this._audioTrack,T=this._id3Track,I=y.pid,P=y.pesData,S=f.pid,w=T.pid,F=f.pesData,L=T.pesData,G=!1,Z=this.pmtParsed,ue=this._pmtId,ce=E.length;if(this.remainderData&&(E=Object(A.appendUint8Array)(this.remainderData,E),ce=E.length,this.remainderData=null),ce<188&&!l)return this.remainderData=E,{audioTrack:f,avcTrack:y,id3Track:T,textTrack:this._txtTrack};var Re=Math.max(0,b.syncOffset(E));ce-=(ce+Re)%188,ce<E.byteLength&&!l&&(this.remainderData=new Uint8Array(E.buffer,ce,E.buffer.byteLength-ce));for(var Ee=Re;Ee<ce;Ee+=188)if(E[Ee]===71){var he=!!(E[Ee+1]&64),we=((E[Ee+1]&31)<<8)+E[Ee+2],Pe=(E[Ee+3]&48)>>4,de=void 0;if(Pe>1){if(de=Ee+5+E[Ee+4],de===Ee+188)continue}else de=Ee+4;switch(we){case I:he&&(P&&(c=i(P))&&this.parseAVCPES(c,!1),P={data:[],size:0}),P&&(P.data.push(E.subarray(de,Ee+188)),P.size+=Ee+188-de);break;case S:he&&(F&&(c=i(F))&&(f.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),F={data:[],size:0}),F&&(F.data.push(E.subarray(de,Ee+188)),F.size+=Ee+188-de);break;case w:he&&(L&&(c=i(L))&&this.parseID3PES(c),L={data:[],size:0}),L&&(L.data.push(E.subarray(de,Ee+188)),L.size+=Ee+188-de);break;case 0:he&&(de+=E[de]+1),ue=this._pmtId=o(E,de);break;case ue:{he&&(de+=E[de]+1);var j=s(E,de,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,d);I=j.avc,I>0&&(y.pid=I),S=j.audio,S>0&&(f.pid=S,f.isAAC=j.isAAC),w=j.id3,w>0&&(T.pid=w),G&&!Z&&(g.logger.log("reparse from beginning"),G=!1,Ee=Re-188),Z=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});y.pesData=P,f.pesData=F,T.pesData=L;var O={audioTrack:f,avcTrack:y,id3Track:T,textTrack:this._txtTrack};return l&&this.extractRemainingSamples(O),O},v.flush=function(){var E=this.remainderData;this.remainderData=null;var h;return E?h=this.demux(E,-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},v.extractRemainingSamples=function(E){var h=E.audioTrack,d=E.avcTrack,l=E.id3Track,c=d.pesData,y=h.pesData,f=l.pesData,T;c&&(T=i(c))?(this.parseAVCPES(T,!0),d.pesData=null):d.pesData=c,y&&(T=i(y))?(h.isAAC?this.parseAACPES(T):this.parseMPEGPES(T),h.pesData=null):(y!=null&&y.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),h.pesData=y),f&&(T=i(f))?(this.parseID3PES(T),l.pesData=null):l.pesData=f},v.demuxSampleAes=function(E,h,d){var l=this.demux(E,d,!0,!this.config.progressive),c=this.sampleAes=new N.default(this.observer,this.config,h);return this.decrypt(l,c)},v.decrypt=function(E,h){return new Promise(function(d){var l=E.audioTrack,c=E.avcTrack;l.samples&&l.isAAC?h.decryptAacSamples(l.samples,0,function(){c.samples?h.decryptAvcSamples(c.samples,0,0,function(){d(E)}):d(E)}):c.samples&&h.decryptAvcSamples(c.samples,0,0,function(){d(E)})})},v.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},v.parseAVCPES=function(E,h){var d=this,l=this._avcTrack,c=this.parseAVCNALu(E.data),y=!1,f=this.avcSample,T,I=!1;E.data=null,f&&c.length&&!l.audFound&&(n(f,l),f=this.avcSample=r(!1,E.pts,E.dts,"")),c.forEach(function(P){switch(P.type){case 1:{T=!0,f||(f=d.avcSample=r(!0,E.pts,E.dts,"")),y&&(f.debug+="NDR "),f.frame=!0;var S=P.data;if(I&&S.length>4){var w=new C.default(S).readSliceType();(w===2||w===4||w===7||w===9)&&(f.key=!0)}break}case 5:T=!0,f||(f=d.avcSample=r(!0,E.pts,E.dts,"")),y&&(f.debug+="IDR "),f.key=!0,f.frame=!0;break;case 6:{T=!0,y&&f&&(f.debug+="SEI ");var F=new C.default(_(P.data));F.readUByte();for(var L=0,G=0,Z=!1,ue=0;!Z&&F.bytesAvailable>1;){L=0;do ue=F.readUByte(),L+=ue;while(ue===255);G=0;do ue=F.readUByte(),G+=ue;while(ue===255);if(L===4&&F.bytesAvailable!==0){Z=!0;var ce=F.readUByte();if(ce===181){var Re=F.readUShort();if(Re===49){var Ee=F.readUInt();if(Ee===1195456820){var he=F.readUByte();if(he===3){for(var we=F.readUByte(),Pe=F.readUByte(),de=31&we,j=[we,Pe],O=0;O<de;O++)j.push(F.readUByte()),j.push(F.readUByte()),j.push(F.readUByte());t(d._txtTrack.samples,{type:3,pts:E.pts,bytes:j})}}}}}else if(L===5&&F.bytesAvailable!==0){if(Z=!0,G>16){for(var D=[],W=0;W<16;W++)D.push(F.readUByte().toString(16)),(W===3||W===5||W===7||W===9)&&D.push("-");for(var V=G-16,U=new Uint8Array(V),le=0;le<V;le++)U[le]=F.readUByte();t(d._txtTrack.samples,{pts:E.pts,payloadType:L,uuid:D.join(""),userData:Object(H.utf8ArrayToStr)(U),userDataBytes:U})}}else if(G<F.bytesAvailable)for(var Oe=0;Oe<G;Oe++)F.readUByte()}break}case 7:if(T=!0,I=!0,y&&f&&(f.debug+="SPS "),!l.sps){var Me=new C.default(P.data),ie=Me.readSPS();l.width=ie.width,l.height=ie.height,l.pixelRatio=ie.pixelRatio,l.sps=[P.data],l.duration=d._duration;for(var pe=P.data.subarray(1,4),_e="avc1.",Ae=0;Ae<3;Ae++){var Ke=pe[Ae].toString(16);Ke.length<2&&(Ke="0"+Ke),_e+=Ke}l.codec=_e}break;case 8:T=!0,y&&f&&(f.debug+="PPS "),l.pps||(l.pps=[P.data]);break;case 9:T=!1,l.audFound=!0,f&&n(f,l),f=d.avcSample=r(!1,E.pts,E.dts,y?"AUD ":"");break;case 12:T=!1;break;default:T=!1,f&&(f.debug+="unknown NAL "+P.type+" ");break}if(f&&T){var ze=f.units;ze.push(P)}}),h&&f&&(n(f,l),this.avcSample=null)},v.getLastNalUnit=function(){var E,h=this.avcSample,d;if(!h||h.units.length===0){var l=this._avcTrack.samples;h=l[l.length-1]}if((E=h)!==null&&E!==void 0&&E.units){var c=h.units;d=c[c.length-1]}return d},v.parseAVCNALu=function(E){var h=E.byteLength,d=this._avcTrack,l=d.naluState||0,c=l,y=[],f=0,T,I,P,S=-1,w=0;for(l===-1&&(S=0,w=E[0]&31,l=0,f=1);f<h;){if(T=E[f++],!l){l=T?0:1;continue}if(l===1){l=T?0:2;continue}if(!T)l=3;else if(T===1){if(S>=0){var F={data:E.subarray(S,f-l-1),type:w};y.push(F)}else{var L=this.getLastNalUnit();if(L&&(c&&f<=4-c&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-c))),I=f-l-1,I>0)){var G=new Uint8Array(L.data.byteLength+I);G.set(L.data,0),G.set(E.subarray(0,I),L.data.byteLength),L.data=G,L.state=0}}f<h?(P=E[f]&31,S=f,w=P,l=0):l=-1}else l=0}if(S>=0&&l>=0){var Z={data:E.subarray(S,h),type:w,state:l};y.push(Z)}if(y.length===0){var ue=this.getLastNalUnit();if(ue){var ce=new Uint8Array(ue.data.byteLength+E.byteLength);ce.set(ue.data,0),ce.set(E,ue.data.byteLength),ue.data=ce}}return d.naluState=l,y},v.parseAACPES=function(E){var h=0,d=this._audioTrack,l=this.aacOverFlow,c=E.data;if(l){this.aacOverFlow=null;var y=l.sample.unit.byteLength,f=Math.min(l.missing,y),T=y-f;l.sample.unit.set(c.subarray(0,f),T),d.samples.push(l.sample),h=l.missing}var I,P;for(I=h,P=c.length;I<P-1&&!B.isHeader(c,I);I++);if(I!==h){var S,w;if(I<P-1?(S="AAC PES did not start with ADTS header,offset:"+I,w=!1):(S="no ADTS header found in AAC PES",w=!0),g.logger.warn("parsing error:"+S),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:w,reason:S}),w)return}B.initTrackConfig(d,this.observer,c,I,this.audioCodec);var F;if(E.pts!==void 0)F=E.pts;else if(l){var L=B.getFrameDuration(d.samplerate);F=l.sample.pts+L}else{g.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;I<P;)if(B.isHeader(c,I)){if(I+5<P){var Z=B.appendFrame(d,c,I,F,G);if(Z)if(Z.missing)this.aacOverFlow=Z;else{I+=Z.length,G++;continue}}break}else I++},v.parseMPEGPES=function(E){var h=E.data,d=h.length,l=0,c=0,y=E.pts;if(y===void 0){g.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;c<d;)if(p.isHeader(h,c)){var f=p.appendFrame(this._audioTrack,h,c,y,l);if(f)c+=f.length,l++;else break}else c++},v.parseID3PES=function(E){if(E.pts===void 0){g.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(E)},b}();a.minProbeByteLength=188;function r(b,v,x,E){return{key:b,frame:!1,pts:v,dts:x,units:[],debug:E,length:0}}function o(b,v){return(b[v+10]&31)<<8|b[v+11]}function s(b,v,x,E){var h={audio:-1,avc:-1,id3:-1,isAAC:!0},d=(b[v+1]&15)<<8|b[v+2],l=v+3+d-4,c=(b[v+10]&15)<<8|b[v+11];for(v+=12+c;v<l;){var y=(b[v+1]&31)<<8|b[v+2];switch(b[v]){case 207:if(!E){g.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:h.audio===-1&&(h.audio=y);break;case 21:h.id3===-1&&(h.id3=y);break;case 219:if(!E){g.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:h.avc===-1&&(h.avc=y);break;case 3:case 4:x?h.audio===-1&&(h.audio=y,h.isAAC=!1):g.logger.log("MPEG audio found, not supported in this browser");break;case 36:g.logger.warn("Unsupported HEVC stream type found");break;default:break}v+=((b[v+3]&15)<<8|b[v+4])+5}return h}function i(b){var v=0,x,E,h,d,l,c=b.data;if(!b||b.size===0)return null;for(;c[0].length<19&&c.length>1;){var y=new Uint8Array(c[0].length+c[1].length);y.set(c[0]),y.set(c[1],c[0].length),c[0]=y,c.splice(1,1)}x=c[0];var f=(x[0]<<16)+(x[1]<<8)+x[2];if(f===1){if(E=(x[4]<<8)+x[5],E&&E>b.size-6)return null;var T=x[7];T&192&&(d=(x[9]&14)*536870912+(x[10]&255)*4194304+(x[11]&254)*16384+(x[12]&255)*128+(x[13]&254)/2,T&64?(l=(x[14]&14)*536870912+(x[15]&255)*4194304+(x[16]&254)*16384+(x[17]&255)*128+(x[18]&254)/2,d-l>60*9e4&&(g.logger.warn(Math.round((d-l)/9e4)+"s delta between PTS and DTS, align them"),d=l)):l=d),h=x[8];var I=h+9;if(b.size<=I)return null;b.size-=I;for(var P=new Uint8Array(b.size),S=0,w=c.length;S<w;S++){x=c[S];var F=x.byteLength;if(I)if(I>F){I-=F;continue}else x=x.subarray(I),F-=I,I=0;P.set(x,v),v+=F}return E&&(E-=h+3),{data:P,pts:d,dts:l,len:E}}return null}function n(b,v){if(b.units.length&&b.frame){if(b.pts===void 0){var x=v.samples,E=x.length;if(E){var h=x[E-1];b.pts=h.pts,b.dts=h.dts}else{v.dropped++;return}}v.samples.push(b)}b.debug.length&&g.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function t(b,v){var x=b.length;if(x>0){if(v.pts>=b[x-1].pts)b.push(v);else for(var E=x-1;E>=0;E--)if(v.pts<b[E].pts){b.splice(E,0,v);break}}else b.push(v)}function _(b){for(var v=b.byteLength,x=[],E=1;E<v-2;)b[E]===0&&b[E+1]===0&&b[E+2]===3?(x.push(E+2),E+=2):E++;if(x.length===0)return b;var h=v-x.length,d=new Uint8Array(h),l=0;for(E=0;E<h;l++,E++)l===x[0]&&(l++,x.shift()),d[E]=b[l];return d}k.default=a},"./src/errors.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"ErrorTypes",function(){return B}),R.d(k,"ErrorDetails",function(){return p});var B;(function(C){C.NETWORK_ERROR="networkError",C.MEDIA_ERROR="mediaError",C.KEY_SYSTEM_ERROR="keySystemError",C.MUX_ERROR="muxError",C.OTHER_ERROR="otherError"})(B||(B={}));var p;(function(C){C.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",C.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",C.KEY_SYSTEM_NO_SESSION="keySystemNoSession",C.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",C.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",C.MANIFEST_LOAD_ERROR="manifestLoadError",C.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",C.MANIFEST_PARSING_ERROR="manifestParsingError",C.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",C.LEVEL_EMPTY_ERROR="levelEmptyError",C.LEVEL_LOAD_ERROR="levelLoadError",C.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",C.LEVEL_SWITCH_ERROR="levelSwitchError",C.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",C.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",C.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",C.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",C.FRAG_LOAD_ERROR="fragLoadError",C.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",C.FRAG_DECRYPT_ERROR="fragDecryptError",C.FRAG_PARSING_ERROR="fragParsingError",C.REMUX_ALLOC_ERROR="remuxAllocError",C.KEY_LOAD_ERROR="keyLoadError",C.KEY_LOAD_TIMEOUT="keyLoadTimeOut",C.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",C.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",C.BUFFER_APPEND_ERROR="bufferAppendError",C.BUFFER_APPENDING_ERROR="bufferAppendingError",C.BUFFER_STALLED_ERROR="bufferStalledError",C.BUFFER_FULL_ERROR="bufferFullError",C.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",C.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",C.INTERNAL_EXCEPTION="internalException",C.INTERNAL_ABORTED="aborted",C.UNKNOWN="unknown"})(p||(p={}))},"./src/events.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"Events",function(){return B});var B;(function(p){p.MEDIA_ATTACHING="hlsMediaAttaching",p.MEDIA_ATTACHED="hlsMediaAttached",p.MEDIA_DETACHING="hlsMediaDetaching",p.MEDIA_DETACHED="hlsMediaDetached",p.BUFFER_RESET="hlsBufferReset",p.BUFFER_CODECS="hlsBufferCodecs",p.BUFFER_CREATED="hlsBufferCreated",p.BUFFER_APPENDING="hlsBufferAppending",p.BUFFER_APPENDED="hlsBufferAppended",p.BUFFER_EOS="hlsBufferEos",p.BUFFER_FLUSHING="hlsBufferFlushing",p.BUFFER_FLUSHED="hlsBufferFlushed",p.MANIFEST_LOADING="hlsManifestLoading",p.MANIFEST_LOADED="hlsManifestLoaded",p.MANIFEST_PARSED="hlsManifestParsed",p.LEVEL_SWITCHING="hlsLevelSwitching",p.LEVEL_SWITCHED="hlsLevelSwitched",p.LEVEL_LOADING="hlsLevelLoading",p.LEVEL_LOADED="hlsLevelLoaded",p.LEVEL_UPDATED="hlsLevelUpdated",p.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",p.LEVELS_UPDATED="hlsLevelsUpdated",p.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",p.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",p.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",p.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",p.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",p.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",p.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",p.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",p.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",p.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",p.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",p.CUES_PARSED="hlsCuesParsed",p.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",p.INIT_PTS_FOUND="hlsInitPtsFound",p.FRAG_LOADING="hlsFragLoading",p.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",p.FRAG_LOADED="hlsFragLoaded",p.FRAG_DECRYPTED="hlsFragDecrypted",p.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",p.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",p.FRAG_PARSING_METADATA="hlsFragParsingMetadata",p.FRAG_PARSED="hlsFragParsed",p.FRAG_BUFFERED="hlsFragBuffered",p.FRAG_CHANGED="hlsFragChanged",p.FPS_DROP="hlsFpsDrop",p.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",p.ERROR="hlsError",p.DESTROYING="hlsDestroying",p.KEY_LOADING="hlsKeyLoading",p.KEY_LOADED="hlsKeyLoaded",p.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",p.BACK_BUFFER_REACHED="hlsBackBufferReached"})(B||(B={}))},"./src/hls.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return b});var B=R("./node_modules/url-toolkit/src/url-toolkit.js"),p=R.n(B),C=R("./src/loader/playlist-loader.ts"),H=R("./src/loader/key-loader.ts"),N=R("./src/controller/id3-track-controller.ts"),e=R("./src/controller/latency-controller.ts"),A=R("./src/controller/level-controller.ts"),g=R("./src/controller/fragment-tracker.ts"),m=R("./src/controller/stream-controller.ts"),u=R("./src/is-supported.ts"),a=R("./src/utils/logger.ts"),r=R("./src/config.ts"),o=R("./node_modules/eventemitter3/index.js"),s=R.n(o),i=R("./src/events.ts"),n=R("./src/errors.ts");function t(v,x){for(var E=0;E<x.length;E++){var h=x[E];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}function _(v,x,E){return x&&t(v.prototype,x),E&&t(v,E),v}var b=function(){v.isSupported=function(){return Object(u.isSupported)()};function v(E){E===void 0&&(E={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new o.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(r.mergeConfig)(v.DefaultConfig,E);this.userConfig=E,Object(a.enableLogs)(h.debug),this._autoLevelCapping=-1,h.progressive&&Object(r.enableStreamingMode)(h);var d=h.abrController,l=h.bufferController,c=h.capLevelController,y=h.fpsController,f=this.abrController=new d(this),T=this.bufferController=new l(this),I=this.capLevelController=new c(this),P=new y(this),S=new C.default(this),w=new H.default(this),F=new N.default(this),L=this.levelController=new A.default(this),G=new g.FragmentTracker(this),Z=this.streamController=new m.default(this,G);I.setStreamController(Z),P.setStreamController(Z);var ue=[L,Z];this.networkControllers=ue;var ce=[S,w,f,T,I,P,F,G];this.audioTrackController=this.createController(h.audioTrackController,null,ue),this.createController(h.audioStreamController,G,ue),this.subtitleTrackController=this.createController(h.subtitleTrackController,null,ue),this.createController(h.subtitleStreamController,G,ue),this.createController(h.timelineController,null,ce),this.emeController=this.createController(h.emeController,null,ce),this.cmcdController=this.createController(h.cmcdController,null,ce),this.latencyController=this.createController(e.default,null,ce),this.coreComponents=ce}var x=v.prototype;return x.createController=function(h,d,l){if(h){var c=d?new h(this,d):new h(this);return l&&l.push(c),c}return null},x.on=function(h,d,l){l===void 0&&(l=this),this._emitter.on(h,d,l)},x.once=function(h,d,l){l===void 0&&(l=this),this._emitter.once(h,d,l)},x.removeAllListeners=function(h){this._emitter.removeAllListeners(h)},x.off=function(h,d,l,c){l===void 0&&(l=this),this._emitter.off(h,d,l,c)},x.listeners=function(h){return this._emitter.listeners(h)},x.emit=function(h,d,l){return this._emitter.emit(h,d,l)},x.trigger=function(h,d){if(this.config.debug)return this.emit(h,h,d);try{return this.emit(h,h,d)}catch(l){a.logger.error("An internal error happened while handling event "+h+'. Error message: "'+l.message+'". Here is a stacktrace:',l),this.trigger(i.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:h,error:l})}return!1},x.listenerCount=function(h){return this._emitter.listenerCount(h)},x.destroy=function(){a.logger.log("destroy"),this.trigger(i.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},x.attachMedia=function(h){a.logger.log("attachMedia"),this._media=h,this.trigger(i.Events.MEDIA_ATTACHING,{media:h})},x.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},x.loadSource=function(h){this.stopLoad();var d=this.media,l=this.url,c=this.url=B.buildAbsoluteURL(self.location.href,h,{alwaysNormalize:!0});a.logger.log("loadSource:"+c),d&&l&&l!==c&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(d)),this.trigger(i.Events.MANIFEST_LOADING,{url:h})},x.startLoad=function(h){h===void 0&&(h=-1),a.logger.log("startLoad("+h+")"),this.networkControllers.forEach(function(d){d.startLoad(h)})},x.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(h){h.stopLoad()})},x.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},x.recoverMediaError=function(){a.logger.log("recoverMediaError");var h=this._media;this.detachMedia(),h&&this.attachMedia(h)},x.removeLevel=function(h,d){d===void 0&&(d=0),this.levelController.removeLevel(h,d)},_(v,[{key:"levels",get:function(){var h=this.levelController.levels;return h||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(h){a.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){a.logger.log("set nextLevel:"+h),this.levelController.manualLevel=h,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(h){a.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){a.logger.log("set firstLevel:"+h),this.levelController.firstLevel=h}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(h){a.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 d=!!h;d!==this.config.capLevelToPlayerSize&&(d?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=d)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(h){this._autoLevelCapping!==h&&(a.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,d=this.config.minAutoBitrate;if(!h)return 0;for(var l=h.length,c=0;c<l;c++)if(h[c].maxBitrate>d)return c;return 0}},{key:"maxAutoLevel",get:function(){var h=this.levels,d=this.autoLevelCapping,l;return d===-1&&h&&h.length?l=h.length-1:l=d,l}},{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 d=this.audioTrackController;d&&(d.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 d=this.subtitleTrackController;d&&(d.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 d=this.subtitleTrackController;d&&(d.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 i.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return v.defaultConfig?v.defaultConfig:r.hlsDefaultConfig},set:function(h){v.defaultConfig=h}}]),v}();b.defaultConfig=void 0},"./src/is-supported.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"isSupported",function(){return C}),R.d(k,"changeTypeSupported",function(){return H});var B=R("./src/utils/mediasource-helper.ts");function p(){return self.SourceBuffer||self.WebKitSourceBuffer}function C(){var N=Object(B.getMediaSource)();if(!N)return!1;var e=p(),A=N&&typeof N.isTypeSupported=="function"&&N.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),g=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!A&&!!g}function H(){var N,e=p();return typeof(e==null||((N=e.prototype)===null||N===void 0)?void 0:N.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return a}),R.d(k,"LoadError",function(){return o});var B=R("./src/polyfills/number.ts"),p=R("./src/errors.ts");function C(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,g(s,i)}function H(s){var i=typeof Map=="function"?new Map:void 0;return H=function(t){if(t===null||!A(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(t))return i.get(t);i.set(t,_)}function _(){return N(t,arguments,m(this).constructor)}return _.prototype=Object.create(t.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),g(_,t)},H(s)}function N(s,i,n){return e()?N=Reflect.construct:N=function(_,b,v){var x=[null];x.push.apply(x,b);var E=Function.bind.apply(_,x),h=new E;return v&&g(h,v.prototype),h},N.apply(null,arguments)}function e(){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 g(s,i){return g=Object.setPrototypeOf||function(t,_){return t.__proto__=_,t},g(s,i)}function m(s){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},m(s)}var u=Math.pow(2,17),a=function(){function s(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var i=s.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(t,_){var b=this,v=t.url;if(!v)return Promise.reject(new o({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(v?"part list":"url")));this.abort();var x=this.config,E=x.fLoader,h=x.loader;return new Promise(function(d,l){b.loader&&b.loader.destroy();var c=b.loader=t.loader=E?new E(x):new h(x),y=r(t),f={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=c.stats,c.load(y,f,{onSuccess:function(I,P,S,w){b.resetLoader(t,c),d({frag:t,part:null,payload:I.data,networkDetails:w})},onError:function(I,P,S){b.resetLoader(t,c),l(new o({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:I,networkDetails:S}))},onAbort:function(I,P,S){b.resetLoader(t,c),l(new o({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:S}))},onTimeout:function(I,P,S){b.resetLoader(t,c),l(new o({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:S}))},onProgress:function(I,P,S,w){_&&_({frag:t,part:null,payload:S,networkDetails:w})}})})},i.loadPart=function(t,_,b){var v=this;this.abort();var x=this.config,E=x.fLoader,h=x.loader;return new Promise(function(d,l){v.loader&&v.loader.destroy();var c=v.loader=t.loader=E?new E(x):new h(x),y=r(t,_),f={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};_.stats=c.stats,c.load(y,f,{onSuccess:function(I,P,S,w){v.resetLoader(t,c),v.updateStatsFromPart(t,_);var F={frag:t,part:_,payload:I.data,networkDetails:w};b(F),d(F)},onError:function(I,P,S){v.resetLoader(t,c),l(new o({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:_,response:I,networkDetails:S}))},onAbort:function(I,P,S){t.stats.aborted=_.stats.aborted,v.resetLoader(t,c),l(new o({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:_,networkDetails:S}))},onTimeout:function(I,P,S){v.resetLoader(t,c),l(new o({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:_,networkDetails:S}))}})})},i.updateStatsFromPart=function(t,_){var b=t.stats,v=_.stats,x=v.total;if(b.loaded+=v.loaded,x){var E=Math.round(t.duration/_.duration),h=Math.min(Math.round(b.loaded/x),E),d=E-h,l=d*Math.round(b.loaded/h);b.total=b.loaded+l}else b.total=Math.max(b.loaded,b.total);var c=b.loading,y=v.loading;c.start?c.first+=y.first-y.start:(c.start=y.start,c.first=y.first),c.end=y.end},i.resetLoader=function(t,_){t.loader=null,this.loader===_&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),_.destroy()},s}();function r(s,i){i===void 0&&(i=null);var n=i||s,t={frag:s,part:i,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},_=n.byteRangeStartOffset,b=n.byteRangeEndOffset;return Object(B.isFiniteNumber)(_)&&Object(B.isFiniteNumber)(b)&&(t.rangeStart=_,t.rangeEnd=b),t}var o=function(s){C(i,s);function i(n){for(var t,_=arguments.length,b=new Array(_>1?_-1:0),v=1;v<_;v++)b[v-1]=arguments[v];return t=s.call.apply(s,[this].concat(b))||this,t.data=void 0,t.data=n,t}return i}(H(Error))},"./src/loader/fragment.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"ElementaryStreamTypes",function(){return a}),R.d(k,"BaseSegment",function(){return r}),R.d(k,"Fragment",function(){return o}),R.d(k,"Part",function(){return s});var B=R("./src/polyfills/number.ts"),p=R("./node_modules/url-toolkit/src/url-toolkit.js"),C=R.n(p),H=R("./src/utils/logger.ts"),N=R("./src/loader/level-key.ts"),e=R("./src/loader/load-stats.ts");function A(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,g(i,n)}function g(i,n){return g=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},g(i,n)}function m(i,n){for(var t=0;t<n.length;t++){var _=n[t];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(i,_.key,_)}}function u(i,n,t){return n&&m(i.prototype,n),t&&m(i,t),i}var a;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(a||(a={}));var r=function(){function i(t){var _;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(_={},_[a.AUDIO]=null,_[a.VIDEO]=null,_[a.AUDIOVIDEO]=null,_),this.baseurl=t}var n=i.prototype;return n.setByteRange=function(_,b){var v=_.split("@",2),x=[];v.length===1?x[0]=b?b.byteRangeEndOffset:0:x[0]=parseInt(v[1]),x[1]=parseInt(v[0])+x[0],this._byteRange=x},u(i,[{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(p.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(_){this._url=_}}]),i}(),o=function(i){A(n,i);function n(_,b){var v;return v=i.call(this,b)||this,v._decryptdata=null,v.rawProgramDateTime=null,v.programDateTime=null,v.tagList=[],v.duration=0,v.sn=0,v.levelkey=void 0,v.type=void 0,v.loader=null,v.level=-1,v.cc=0,v.startPTS=void 0,v.endPTS=void 0,v.appendedPTS=void 0,v.startDTS=void 0,v.endDTS=void 0,v.start=0,v.deltaPTS=void 0,v.maxStartPTS=void 0,v.minEndPTS=void 0,v.stats=new e.LoadStats,v.urlId=0,v.data=void 0,v.bitrateTest=!1,v.title=null,v.initSegment=null,v.type=_,v}var t=n.prototype;return t.createInitializationVector=function(b){for(var v=new Uint8Array(16),x=12;x<16;x++)v[x]=b>>8*(15-x)&255;return v},t.setDecryptDataFromLevelKey=function(b,v){var x=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(x=N.LevelKey.fromURI(b.uri),x.method=b.method,x.iv=this.createInitializationVector(v),x.keyFormat="identity"),x},t.setElementaryStreamInfo=function(b,v,x,E,h,d){d===void 0&&(d=!1);var l=this.elementaryStreams,c=l[b];if(!c){l[b]={startPTS:v,endPTS:x,startDTS:E,endDTS:h,partial:d};return}c.startPTS=Math.min(c.startPTS,v),c.endPTS=Math.max(c.endPTS,x),c.startDTS=Math.min(c.startDTS,E),c.endDTS=Math.max(c.endDTS,h)},t.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[a.AUDIO]=null,b[a.VIDEO]=null,b[a.AUDIOVIDEO]=null},u(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var b=this.sn;typeof b!="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'),b=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,b)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(B.isFiniteNumber)(this.programDateTime))return null;var b=Object(B.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+b*1e3}},{key:"encrypted",get:function(){var b;return!!((b=this.decryptdata)!==null&&b!==void 0&&b.keyFormat&&this.decryptdata.uri)}}]),n}(r),s=function(i){A(n,i);function n(t,_,b,v,x){var E;E=i.call(this,b)||this,E.fragOffset=0,E.duration=0,E.gap=!1,E.independent=!1,E.relurl=void 0,E.fragment=void 0,E.index=void 0,E.stats=new e.LoadStats,E.duration=t.decimalFloatingPoint("DURATION"),E.gap=t.bool("GAP"),E.independent=t.bool("INDEPENDENT"),E.relurl=t.enumeratedString("URI"),E.fragment=_,E.index=v;var h=t.enumeratedString("BYTERANGE");return h&&E.setByteRange(h,x),x&&(E.fragOffset=x.fragOffset+x.duration),E}return u(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var _=this.elementaryStreams;return!!(_.audio||_.video||_.audiovideo)}}]),n}(r)},"./src/loader/key-loader.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return H});var B=R("./src/events.ts"),p=R("./src/errors.ts"),C=R("./src/utils/logger.ts"),H=function(){function N(A){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=A,this._registerListeners()}var e=N.prototype;return e._registerListeners=function(){this.hls.on(B.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(B.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var g in this.loaders){var m=this.loaders[g];m&&m.destroy()}this.loaders={}},e.onKeyLoading=function(g,m){var u=m.frag,a=u.type,r=this.loaders[a];if(!u.decryptdata){C.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var o=u.decryptdata.uri;if(o!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(r&&(C.logger.warn("abort previous key loader for type:"+a),r.abort()),!o){C.logger.warn("key uri is falsy");return}var i=s.loader,n=u.loader=this.loaders[a]=new i(s);this.decrypturl=o,this.decryptkey=null;var t={url:o,frag:u,responseType:"arraybuffer"},_={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(t,_,b)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(B.Events.KEY_LOADED,{frag:u}))},e.loadsuccess=function(g,m,u){var a=u.frag;if(!a.decryptdata){C.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(g.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(B.Events.KEY_LOADED,{frag:a})},e.loaderror=function(g,m){var u=m.frag,a=u.loader;a&&a.abort(),delete this.loaders[u.type],this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:g})},e.loadtimeout=function(g,m){var u=m.frag,a=u.loader;a&&a.abort(),delete this.loaders[u.type],this.hls.trigger(B.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},N}()},"./src/loader/level-details.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"LevelDetails",function(){return N});var B=R("./src/polyfills/number.ts");function p(e,A){for(var g=0;g<A.length;g++){var m=A[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(e,m.key,m)}}function C(e,A,g){return A&&p(e.prototype,A),g&&p(e,g),e}var H=10,N=function(){function e(g){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=g}var A=e.prototype;return A.reloaded=function(m){if(!m){this.advanced=!0,this.updated=!0;return}var u=this.lastPartSn-m.lastPartSn,a=this.lastPartIndex-m.lastPartIndex;this.updated=this.endSN!==m.endSN||!!a||!!u,this.advanced=this.endSN>m.endSN||u>0||u===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(m.misses*.6):this.misses=m.misses+1,this.availabilityDelay=m.availabilityDelay},C(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(B.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||H}},{key:"drift",get:function(){var m=this.driftEndTime-this.driftStartTime;if(m>0){var u=this.driftEnd-this.driftStart;return u*1e3/m}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var m;return(m=this.fragments)!==null&&m!==void 0&&m.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 m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var m;return(m=this.partList)!==null&&m!==void 0&&m.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"LevelKey",function(){return N});var B=R("./node_modules/url-toolkit/src/url-toolkit.js"),p=R.n(B);function C(e,A){for(var g=0;g<A.length;g++){var m=A[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(e,m.key,m)}}function H(e,A,g){return A&&C(e.prototype,A),g&&C(e,g),e}var N=function(){e.fromURL=function(g,m){return new e(g,m)},e.fromURI=function(g){return new e(g)};function e(A,g){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,g?this._uri=Object(B.buildAbsoluteURL)(A,g,{alwaysNormalize:!0}):this._uri=A}return H(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"LoadStats",function(){return B});var B=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(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return n});var B=R("./src/polyfills/number.ts"),p=R("./node_modules/url-toolkit/src/url-toolkit.js"),C=R.n(p),H=R("./src/loader/fragment.ts"),N=R("./src/loader/level-details.ts"),e=R("./src/loader/level-key.ts"),A=R("./src/utils/attr-list.ts"),g=R("./src/utils/logger.ts"),m=R("./src/utils/codecs.ts"),u=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,a=/#EXT-X-MEDIA:(.*)/g,r=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),o=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 i(x){var E,h;return s.test((E=(h=p.parseURL(x))===null||h===void 0?void 0:h.path)!=null?E:"")}var n=function(){function x(){}return x.findGroup=function(h,d){for(var l=0;l<h.length;l++){var c=h[l];if(c.id===d)return c}},x.convertAVC1ToAVCOTI=function(h){var d=h.split(".");if(d.length>2){var l=d.shift()+".";return l+=parseInt(d.shift()).toString(16),l+=("000"+parseInt(d.shift()).toString(16)).substr(-4),l}return h},x.resolve=function(h,d){return p.buildAbsoluteURL(d,h,{alwaysNormalize:!0})},x.parseMasterPlaylist=function(h,d){var l=[],c={},y=!1;u.lastIndex=0;for(var f;(f=u.exec(h))!=null;)if(f[1]){var T=new A.AttrList(f[1]),I={attrs:T,bitrate:T.decimalInteger("AVERAGE-BANDWIDTH")||T.decimalInteger("BANDWIDTH"),name:T.NAME,url:x.resolve(f[2],d)},P=T.decimalResolution("RESOLUTION");P&&(I.width=P.width,I.height=P.height),t((T.CODECS||"").split(/[ ,]+/).filter(function(w){return w}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=x.convertAVC1ToAVCOTI(I.videoCodec)),l.push(I)}else if(f[3]){var S=new A.AttrList(f[3]);S["DATA-ID"]&&(y=!0,c[S["DATA-ID"]]=S)}return{levels:l,sessionData:y?c:null}},x.parseMasterPlaylistMedia=function(h,d,l,c){c===void 0&&(c=[]);var y,f=[],T=0;for(a.lastIndex=0;(y=a.exec(h))!==null;){var I=new A.AttrList(y[1]);if(I.TYPE===l){var P={attrs:I,bitrate:0,id:T++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:l,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?x.resolve(I.URI,d):""};if(c.length){var S=x.findGroup(c,P.groupId)||c[0];_(P,S,"audioCodec"),_(P,S,"textCodec")}f.push(P)}}return f},x.parseLevelPlaylist=function(h,d,l,c,y){var f=new N.LevelDetails(d),T=f.fragments,I=null,P=0,S=0,w=0,F=0,L=null,G=new H.Fragment(c,d),Z,ue,ce,Re=-1,Ee=!1;for(r.lastIndex=0,f.m3u8=h;(Z=r.exec(h))!==null;){Ee&&(Ee=!1,G=new H.Fragment(c,d),G.start=w,G.sn=P,G.cc=F,G.level=l,I&&(G.initSegment=I,G.rawProgramDateTime=I.rawProgramDateTime));var he=Z[1];if(he){G.duration=parseFloat(he);var we=(" "+Z[2]).slice(1);G.title=we||null,G.tagList.push(we?["INF",he,we]:["INF",he])}else if(Z[3])Object(B.isFiniteNumber)(G.duration)&&(G.start=w,ce&&(G.levelkey=ce),G.sn=P,G.level=l,G.cc=F,G.urlId=y,T.push(G),G.relurl=(" "+Z[3]).slice(1),v(G,L),L=G,w+=G.duration,P++,S=0,Ee=!0);else if(Z[4]){var Pe=(" "+Z[4]).slice(1);L?G.setByteRange(Pe,L):G.setByteRange(Pe)}else if(Z[5])G.rawProgramDateTime=(" "+Z[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),Re===-1&&(Re=T.length);else{if(Z=Z[0].match(o),!Z){g.logger.warn("No matches on slow regex match for level playlist!");continue}for(ue=1;ue<Z.length&&!(typeof Z[ue]!="undefined");ue++);var de=(" "+Z[ue]).slice(1),j=(" "+Z[ue+1]).slice(1),O=Z[ue+2]?(" "+Z[ue+2]).slice(1):"";switch(de){case"PLAYLIST-TYPE":f.type=j.toUpperCase();break;case"MEDIA-SEQUENCE":P=f.startSN=parseInt(j);break;case"SKIP":{var D=new A.AttrList(j),W=D.decimalInteger("SKIPPED-SEGMENTS");if(Object(B.isFiniteNumber)(W)){f.skippedSegments=W;for(var V=W;V--;)T.unshift(null);P+=W}var U=D.enumeratedString("RECENTLY-REMOVED-DATERANGES");U&&(f.recentlyRemovedDateranges=U.split(" "));break}case"TARGETDURATION":f.targetduration=parseFloat(j);break;case"VERSION":f.version=parseInt(j);break;case"EXTM3U":break;case"ENDLIST":f.live=!1;break;case"#":(j||O)&&G.tagList.push(O?[j,O]:[j]);break;case"DIS":F++;case"GAP":G.tagList.push([de]);break;case"BITRATE":G.tagList.push([de,j]);break;case"DISCONTINUITY-SEQ":F=parseInt(j);break;case"KEY":{var le,Oe=new A.AttrList(j),Me=Oe.enumeratedString("METHOD"),ie=Oe.URI,pe=Oe.hexadecimalInteger("IV"),_e=Oe.enumeratedString("KEYFORMATVERSIONS"),Ae=Oe.enumeratedString("KEYID"),Ke=(le=Oe.enumeratedString("KEYFORMAT"))!=null?le:"identity",ze=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ze.indexOf(Ke)>-1){g.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;Me&&(ce=e.LevelKey.fromURL(d,ie),ie&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Me)>=0&&(ce.method=Me,ce.keyFormat=Ke,Ae&&(ce.keyID=Ae),_e&&(ce.keyFormatVersions=_e),ce.iv=pe));break}case"START":{var Ze=new A.AttrList(j),Ye=Ze.decimalFloatingPoint("TIME-OFFSET");Object(B.isFiniteNumber)(Ye)&&(f.startTimeOffset=Ye);break}case"MAP":{var it=new A.AttrList(j);G.relurl=it.URI,it.BYTERANGE&&G.setByteRange(it.BYTERANGE),G.level=l,G.sn="initSegment",ce&&(G.levelkey=ce),G.initSegment=null,I=G,Ee=!0;break}case"SERVER-CONTROL":{var tt=new A.AttrList(j);f.canBlockReload=tt.bool("CAN-BLOCK-RELOAD"),f.canSkipUntil=tt.optionalFloat("CAN-SKIP-UNTIL",0),f.canSkipDateRanges=f.canSkipUntil>0&&tt.bool("CAN-SKIP-DATERANGES"),f.partHoldBack=tt.optionalFloat("PART-HOLD-BACK",0),f.holdBack=tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Te=new A.AttrList(j);f.partTarget=Te.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=f.partList;Ie||(Ie=f.partList=[]);var ke=S>0?Ie[Ie.length-1]:void 0,We=S++,$=new H.Part(new A.AttrList(j),G,d,We,ke);Ie.push($),G.duration+=$.duration;break}case"PRELOAD-HINT":{var K=new A.AttrList(j);f.preloadHint=K;break}case"RENDITION-REPORT":{var z=new A.AttrList(j);f.renditionReports=f.renditionReports||[],f.renditionReports.push(z);break}default:g.logger.warn("line parsed but not handled: "+Z);break}}}L&&!L.relurl?(T.pop(),w-=L.duration,f.partList&&(f.fragmentHint=L)):f.partList&&(v(G,L),G.cc=F,f.fragmentHint=G);var X=T.length,ee=T[0],Y=T[X-1];if(w+=f.skippedSegments*f.targetduration,w>0&&X&&Y){f.averagetargetduration=w/X;var J=Y.sn;f.endSN=J!=="initSegment"?J:0,ee&&(f.startCC=ee.cc,ee.initSegment||f.fragments.every(function(ne){return ne.relurl&&i(ne.relurl)})&&(g.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new H.Fragment(c,d),G.relurl=Y.relurl,G.level=l,G.sn="initSegment",ee.initSegment=G,f.needSidxRanges=!0))}else f.endSN=0,f.startCC=0;return f.fragmentHint&&(w+=f.fragmentHint.duration),f.totalduration=w,f.endCC=F,Re>0&&b(T,Re),f},x}();function t(x,E){["video","audio","text"].forEach(function(h){var d=x.filter(function(c){return Object(m.isCodecType)(c,h)});if(d.length){var l=d.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});E[h+"Codec"]=l.length>0?l[0]:d[0],x=x.filter(function(c){return d.indexOf(c)===-1})}}),E.unknownCodecs=x}function _(x,E,h){var d=E[h];d&&(x[h]=d)}function b(x,E){for(var h=x[E],d=E;d--;){var l=x[d];if(!l)return;l.programDateTime=h.programDateTime-l.duration*1e3,h=l}}function v(x,E){x.rawProgramDateTime?x.programDateTime=Date.parse(x.rawProgramDateTime):E!=null&&E.programDateTime&&(x.programDateTime=E.endProgramDateTime),Object(B.isFiniteNumber)(x.programDateTime)||(x.programDateTime=null,x.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/polyfills/number.ts"),p=R("./src/events.ts"),C=R("./src/errors.ts"),H=R("./src/utils/logger.ts"),N=R("./src/utils/mp4-tools.ts"),e=R("./src/loader/m3u8-parser.ts"),A=R("./src/types/loader.ts"),g=R("./src/utils/attr-list.ts");function m(r){var o=r.type;switch(o){case A.PlaylistContextType.AUDIO_TRACK:return A.PlaylistLevelType.AUDIO;case A.PlaylistContextType.SUBTITLE_TRACK:return A.PlaylistLevelType.SUBTITLE;default:return A.PlaylistLevelType.MAIN}}function u(r,o){var s=r.url;return(s===void 0||s.indexOf("data:")===0)&&(s=o.url),s}var a=function(){function r(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var o=r.prototype;return o.registerListeners=function(){var i=this.hls;i.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(p.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.unregisterListeners=function(){var i=this.hls;i.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(p.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.createInternalLoader=function(i){var n=this.hls.config,t=n.pLoader,_=n.loader,b=t||_,v=new b(n);return i.loader=v,this.loaders[i.type]=v,v},o.getInternalLoader=function(i){return this.loaders[i.type]},o.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},o.destroyInternalLoaders=function(){for(var i in this.loaders){var n=this.loaders[i];n&&n.destroy(),this.resetInternalLoader(i)}},o.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},o.onManifestLoading=function(i,n){var t=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:A.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},o.onLevelLoading=function(i,n){var t=n.id,_=n.level,b=n.url,v=n.deliveryDirectives;this.load({id:t,groupId:null,level:_,responseType:"text",type:A.PlaylistContextType.LEVEL,url:b,deliveryDirectives:v})},o.onAudioTrackLoading=function(i,n){var t=n.id,_=n.groupId,b=n.url,v=n.deliveryDirectives;this.load({id:t,groupId:_,level:null,responseType:"text",type:A.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:v})},o.onSubtitleTrackLoading=function(i,n){var t=n.id,_=n.groupId,b=n.url,v=n.deliveryDirectives;this.load({id:t,groupId:_,level:null,responseType:"text",type:A.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:v})},o.load=function(i){var n,t=this.hls.config,_=this.getInternalLoader(i);if(_){var b=_.context;if(b&&b.url===i.url){H.logger.trace("[playlist-loader]: playlist request ongoing");return}H.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),_.abort()}var v,x,E,h;switch(i.type){case A.PlaylistContextType.MANIFEST:v=t.manifestLoadingMaxRetry,x=t.manifestLoadingTimeOut,E=t.manifestLoadingRetryDelay,h=t.manifestLoadingMaxRetryTimeout;break;case A.PlaylistContextType.LEVEL:case A.PlaylistContextType.AUDIO_TRACK:case A.PlaylistContextType.SUBTITLE_TRACK:v=0,x=t.levelLoadingTimeOut;break;default:v=t.levelLoadingMaxRetry,x=t.levelLoadingTimeOut,E=t.levelLoadingRetryDelay,h=t.levelLoadingMaxRetryTimeout;break}if(_=this.createInternalLoader(i),(n=i.deliveryDirectives)!==null&&n!==void 0&&n.part){var d;if(i.type===A.PlaylistContextType.LEVEL&&i.level!==null?d=this.hls.levels[i.level].details:i.type===A.PlaylistContextType.AUDIO_TRACK&&i.id!==null?d=this.hls.audioTracks[i.id].details:i.type===A.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(d=this.hls.subtitleTracks[i.id].details),d){var l=d.partTarget,c=d.targetduration;l&&c&&(x=Math.min(Math.max(l*3,c*.8)*1e3,x))}}var y={timeout:x,maxRetry:v,retryDelay:E,maxRetryDelay:h,highWaterMark:0},f={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};_.load(i,y,f)},o.loadsuccess=function(i,n,t,_){if(_===void 0&&(_=null),t.isSidxRequest){this.handleSidxRequest(i,t),this.handlePlaylistLoaded(i,n,t,_);return}this.resetInternalLoader(t.type);var b=i.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,t,"no EXTM3U delimiter",_);return}n.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,n,t,_):this.handleMasterPlaylist(i,n,t,_)},o.loaderror=function(i,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!1,i)},o.loadtimeout=function(i,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!0)},o.handleMasterPlaylist=function(i,n,t,_){var b=this.hls,v=i.data,x=u(i,t),E=e.default.parseMasterPlaylist(v,x),h=E.levels,d=E.sessionData;if(!h.length){this.handleManifestParsingError(i,t,"no level found in manifest",_);return}var l=h.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),c=h.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),y=e.default.parseMasterPlaylistMedia(v,x,"AUDIO",l),f=e.default.parseMasterPlaylistMedia(v,x,"SUBTITLES",c),T=e.default.parseMasterPlaylistMedia(v,x,"CLOSED-CAPTIONS");if(y.length){var I=y.some(function(P){return!P.url});!I&&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"),y.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new g.AttrList({}),bitrate:0,url:""}))}b.trigger(p.Events.MANIFEST_LOADED,{levels:h,audioTracks:y,subtitles:f,captions:T,url:x,stats:n,networkDetails:_,sessionData:d})},o.handleTrackOrLevelPlaylist=function(i,n,t,_){var b=this.hls,v=t.id,x=t.level,E=t.type,h=u(i,t),d=Object(B.isFiniteNumber)(v)?v:0,l=Object(B.isFiniteNumber)(x)?x:d,c=m(t),y=e.default.parseLevelPlaylist(i.data,h,l,c,d);if(!y.fragments.length){b.trigger(p.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(E===A.PlaylistContextType.MANIFEST){var f={attrs:new g.AttrList({}),bitrate:0,details:y,name:"",url:h};b.trigger(p.Events.MANIFEST_LOADED,{levels:[f],audioTracks:[],url:h,stats:n,networkDetails:_,sessionData:null})}if(n.parsing.end=performance.now(),y.needSidxRanges){var T,I=(T=y.fragments[0].initSegment)===null||T===void 0?void 0:T.url;this.load({url:I,isSidxRequest:!0,type:E,level:x,levelDetails:y,id:v,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=y,this.handlePlaylistLoaded(i,n,t,_)},o.handleSidxRequest=function(i,n){var t=Object(N.parseSegmentIndex)(new Uint8Array(i.data));if(!t)return;var _=t.references,b=n.levelDetails;_.forEach(function(v,x){var E=v.info,h=b.fragments[x];h.byteRange.length===0&&h.setByteRange(String(1+E.end-E.start)+"@"+String(E.start)),h.initSegment&&h.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},o.handleManifestParsingError=function(i,n,t,_){this.hls.trigger(p.Events.ERROR,{type:C.ErrorTypes.NETWORK_ERROR,details:C.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===A.PlaylistContextType.MANIFEST,url:i.url,reason:t,response:i,context:n,networkDetails:_})},o.handleNetworkError=function(i,n,t,_){t===void 0&&(t=!1),H.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var b=C.ErrorDetails.UNKNOWN,v=!1,x=this.getInternalLoader(i);switch(i.type){case A.PlaylistContextType.MANIFEST:b=t?C.ErrorDetails.MANIFEST_LOAD_TIMEOUT:C.ErrorDetails.MANIFEST_LOAD_ERROR,v=!0;break;case A.PlaylistContextType.LEVEL:b=t?C.ErrorDetails.LEVEL_LOAD_TIMEOUT:C.ErrorDetails.LEVEL_LOAD_ERROR,v=!1;break;case A.PlaylistContextType.AUDIO_TRACK:b=t?C.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:C.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,v=!1;break;case A.PlaylistContextType.SUBTITLE_TRACK:b=t?C.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:C.ErrorDetails.SUBTITLE_LOAD_ERROR,v=!1;break}x&&this.resetInternalLoader(i.type);var E={type:C.ErrorTypes.NETWORK_ERROR,details:b,fatal:v,url:i.url,loader:x,context:i,networkDetails:n};_&&(E.response=_),this.hls.trigger(p.Events.ERROR,E)},o.handlePlaylistLoaded=function(i,n,t,_){var b=t.type,v=t.level,x=t.id,E=t.groupId,h=t.loader,d=t.levelDetails,l=t.deliveryDirectives;if(!(d!=null&&d.targetduration)){this.handleManifestParsingError(i,t,"invalid target duration",_);return}if(!h)return;d.live&&(h.getCacheAge&&(d.ageHeader=h.getCacheAge()||0),(!h.getCacheAge||isNaN(d.ageHeader))&&(d.ageHeader=0));switch(b){case A.PlaylistContextType.MANIFEST:case A.PlaylistContextType.LEVEL:this.hls.trigger(p.Events.LEVEL_LOADED,{details:d,level:v||0,id:x||0,stats:n,networkDetails:_,deliveryDirectives:l});break;case A.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(p.Events.AUDIO_TRACK_LOADED,{details:d,id:x||0,groupId:E||"",stats:n,networkDetails:_,deliveryDirectives:l});break;case A.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(p.Events.SUBTITLE_TRACK_LOADED,{details:d,id:x||0,groupId:E||"",stats:n,networkDetails:_,deliveryDirectives:l});break}},r}();k.default=a},"./src/polyfills/number.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"isFiniteNumber",function(){return B}),R.d(k,"MAX_SAFE_INTEGER",function(){return p});var B=Number.isFinite||function(C){return typeof C=="number"&&isFinite(C)},p=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(te,k,R){"use strict";R.r(k);var B=function(){function p(){}return p.getSilentFrame=function(H,N){switch(H){case"mp4a.40.2":if(N===1)return new Uint8Array([0,200,0,128,35,128]);if(N===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(N===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(N===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(N===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(N===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(N===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(N===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(N===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},p}();k.default=B},"./src/remux/mp4-generator.ts":function(te,k,R){"use strict";R.r(k);var B=Math.pow(2,32)-1,p=function(){function C(){}return C.init=function(){C.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 N;for(N in C.types)C.types.hasOwnProperty(N)&&(C.types[N]=[N.charCodeAt(0),N.charCodeAt(1),N.charCodeAt(2),N.charCodeAt(3)]);var e=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]);C.HDLR_TYPES={video:e,audio:A};var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),m=new Uint8Array([0,0,0,0,0,0,0,0]);C.STTS=C.STSC=C.STCO=m,C.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),C.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),C.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),C.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);C.FTYP=C.box(C.types.ftyp,u,r,u,a),C.DINF=C.box(C.types.dinf,C.box(C.types.dref,g))},C.box=function(N){for(var e=8,A=arguments.length,g=new Array(A>1?A-1:0),m=1;m<A;m++)g[m-1]=arguments[m];for(var u=g.length,a=u;u--;)e+=g[u].byteLength;var r=new Uint8Array(e);for(r[0]=e>>24&255,r[1]=e>>16&255,r[2]=e>>8&255,r[3]=e&255,r.set(N,4),u=0,e=8;u<a;u++)r.set(g[u],e),e+=g[u].byteLength;return r},C.hdlr=function(N){return C.box(C.types.hdlr,C.HDLR_TYPES[N])},C.mdat=function(N){return C.box(C.types.mdat,N)},C.mdhd=function(N,e){e*=N;var A=Math.floor(e/(B+1)),g=Math.floor(e%(B+1));return C.box(C.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,N>>24&255,N>>16&255,N>>8&255,N&255,A>>24,A>>16&255,A>>8&255,A&255,g>>24,g>>16&255,g>>8&255,g&255,85,196,0,0]))},C.mdia=function(N){return C.box(C.types.mdia,C.mdhd(N.timescale,N.duration),C.hdlr(N.type),C.minf(N))},C.mfhd=function(N){return C.box(C.types.mfhd,new Uint8Array([0,0,0,0,N>>24,N>>16&255,N>>8&255,N&255]))},C.minf=function(N){return N.type==="audio"?C.box(C.types.minf,C.box(C.types.smhd,C.SMHD),C.DINF,C.stbl(N)):C.box(C.types.minf,C.box(C.types.vmhd,C.VMHD),C.DINF,C.stbl(N))},C.moof=function(N,e,A){return C.box(C.types.moof,C.mfhd(N),C.traf(A,e))},C.moov=function(N){for(var e=N.length,A=[];e--;)A[e]=C.trak(N[e]);return C.box.apply(null,[C.types.moov,C.mvhd(N[0].timescale,N[0].duration)].concat(A).concat(C.mvex(N)))},C.mvex=function(N){for(var e=N.length,A=[];e--;)A[e]=C.trex(N[e]);return C.box.apply(null,[C.types.mvex].concat(A))},C.mvhd=function(N,e){e*=N;var A=Math.floor(e/(B+1)),g=Math.floor(e%(B+1)),m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,N>>24&255,N>>16&255,N>>8&255,N&255,A>>24,A>>16&255,A>>8&255,A&255,g>>24,g>>16&255,g>>8&255,g&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 C.box(C.types.mvhd,m)},C.sdtp=function(N){var e=N.samples||[],A=new Uint8Array(4+e.length),g,m;for(g=0;g<e.length;g++)m=e[g].flags,A[g+4]=m.dependsOn<<4|m.isDependedOn<<2|m.hasRedundancy;return C.box(C.types.sdtp,A)},C.stbl=function(N){return C.box(C.types.stbl,C.stsd(N),C.box(C.types.stts,C.STTS),C.box(C.types.stsc,C.STSC),C.box(C.types.stsz,C.STSZ),C.box(C.types.stco,C.STCO))},C.avc1=function(N){var e=[],A=[],g,m,u;for(g=0;g<N.sps.length;g++)m=N.sps[g],u=m.byteLength,e.push(u>>>8&255),e.push(u&255),e=e.concat(Array.prototype.slice.call(m));for(g=0;g<N.pps.length;g++)m=N.pps[g],u=m.byteLength,A.push(u>>>8&255),A.push(u&255),A=A.concat(Array.prototype.slice.call(m));var a=C.box(C.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|N.sps.length].concat(e).concat([N.pps.length]).concat(A))),r=N.width,o=N.height,s=N.pixelRatio[0],i=N.pixelRatio[1];return C.box(C.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,r>>8&255,r&255,o>>8&255,o&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]),a,C.box(C.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),C.box(C.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,i>>24,i>>16&255,i>>8&255,i&255])))},C.esds=function(N){var e=N.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(N.config).concat([6,1,2]))},C.mp4a=function(N){var e=N.samplerate;return C.box(C.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,N.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),C.box(C.types.esds,C.esds(N)))},C.mp3=function(N){var e=N.samplerate;return C.box(C.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,N.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},C.stsd=function(N){return N.type==="audio"?!N.isAAC&&N.codec==="mp3"?C.box(C.types.stsd,C.STSD,C.mp3(N)):C.box(C.types.stsd,C.STSD,C.mp4a(N)):C.box(C.types.stsd,C.STSD,C.avc1(N))},C.tkhd=function(N){var e=N.id,A=N.duration*N.timescale,g=N.width,m=N.height,u=Math.floor(A/(B+1)),a=Math.floor(A%(B+1));return C.box(C.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,a>>24,a>>16&255,a>>8&255,a&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,g>>8&255,g&255,0,0,m>>8&255,m&255,0,0]))},C.traf=function(N,e){var A=C.sdtp(N),g=N.id,m=Math.floor(e/(B+1)),u=Math.floor(e%(B+1));return C.box(C.types.traf,C.box(C.types.tfhd,new Uint8Array([0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255])),C.box(C.types.tfdt,new Uint8Array([1,0,0,0,m>>24,m>>16&255,m>>8&255,m&255,u>>24,u>>16&255,u>>8&255,u&255])),C.trun(N,A.length+16+20+8+16+8+8),A)},C.trak=function(N){return N.duration=N.duration||4294967295,C.box(C.types.trak,C.tkhd(N),C.mdia(N))},C.trex=function(N){var e=N.id;return C.box(C.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},C.trun=function(N,e){var A=N.samples||[],g=A.length,m=12+16*g,u=new Uint8Array(m),a,r,o,s,i,n;for(e+=8+m,u.set([0,0,15,1,g>>>24&255,g>>>16&255,g>>>8&255,g&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),a=0;a<g;a++)r=A[a],o=r.duration,s=r.size,i=r.flags,n=r.cts,u.set([o>>>24&255,o>>>16&255,o>>>8&255,o&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*a);return C.box(C.types.trun,u)},C.initSegment=function(N){C.types||C.init();var e=C.moov(N),A=new Uint8Array(C.FTYP.byteLength+e.byteLength);return A.set(C.FTYP),A.set(e,C.FTYP.byteLength),A},C}();p.types=void 0,p.HDLR_TYPES=void 0,p.STTS=void 0,p.STSC=void 0,p.STCO=void 0,p.STSZ=void 0,p.VMHD=void 0,p.SMHD=void 0,p.STSD=void 0,p.FTYP=void 0,p.DINF=void 0,k.default=p},"./src/remux/mp4-remuxer.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return n}),R.d(k,"normalizePts",function(){return t});var B=R("./src/polyfills/number.ts"),p=R("./src/remux/aac-helper.ts"),C=R("./src/remux/mp4-generator.ts"),H=R("./src/events.ts"),N=R("./src/errors.ts"),e=R("./src/utils/logger.ts"),A=R("./src/types/loader.ts"),g=R("./src/utils/timescale-conversion.ts");function m(){return m=Object.assign||function(x){for(var E=1;E<arguments.length;E++){var h=arguments[E];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(x[d]=h[d])}return x},m.apply(this,arguments)}var u=10*1e3,a=1024,r=1152,o=null,s=null,i=!1,n=function(){function x(h,d,l,c){if(c===void 0&&(c=""),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=d,this.typeSupported=l,this.ISGenerated=!1,o===null){var y=navigator.userAgent||"",f=y.match(/Chrome\/(\d+)/i);o=f?parseInt(f[1]):0}if(s===null){var T=navigator.userAgent.match(/Safari\/(\d+)/i);s=T?parseInt(T[1]):0}i=!!o&&o<75||!!s&&s<600}var E=x.prototype;return E.destroy=function(){},E.resetTimeStamp=function(d){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=d},E.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},E.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},E.getVideoStartPts=function(d){var l=!1,c=d.reduce(function(y,f){var T=f.pts-y;return T<-4294967296?(l=!0,t(y,f.pts)):T>0?y:f.pts},d[0].pts);return l&&e.logger.debug("PTS rollover detected"),c},E.remux=function(d,l,c,y,f,T,I,P){var S,w,F,L,G,Z,ue=f,ce=f,Re=d.pid>-1,Ee=l.pid>-1,he=l.samples.length,we=d.samples.length>0,Pe=he>1,de=(!Re||we)&&(!Ee||Pe)||this.ISGenerated||I;if(de){this.ISGenerated||(F=this.generateIS(d,l,f));var j=this.isVideoContiguous,O=-1;if(Pe&&(O=_(l.samples),!j&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,O>0){e.logger.warn("[mp4-remuxer]: Dropped "+O+" out of "+he+" video samples due to a missing keyframe");var D=this.getVideoStartPts(l.samples);l.samples=l.samples.slice(O),l.dropped+=O,ce+=(l.samples[0].pts-D)/(l.timescale||9e4)}else O===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+he+" video samples"),Z=!1);if(this.ISGenerated){if(we&&Pe){var W=this.getVideoStartPts(l.samples),V=t(d.samples[0].pts,W)-W,U=V/l.inputTimeScale;ue+=Math.max(0,U),ce+=Math.max(0,-U)}if(we){if(d.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(d,l,f)),w=this.remuxAudio(d,ue,this.isAudioContiguous,T,Ee||Pe||P===A.PlaylistLevelType.AUDIO?ce:void 0),Pe){var le=w?w.endPTS-w.startPTS:0;l.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(d,l,f)),S=this.remuxVideo(l,ce,j,le)}}else Pe&&(S=this.remuxVideo(l,ce,j,0));S&&(S.firstKeyFrame=O,S.independent=O!==-1)}}return this.ISGenerated&&(c.samples.length&&(G=this.remuxID3(c,f)),y.samples.length&&(L=this.remuxText(y,f))),{audio:w,video:S,initSegment:F,independent:Z,text:L,id3:G}},E.generateIS=function(d,l,c){var y=d.samples,f=l.samples,T=this.typeSupported,I={},P=!Object(B.isFiniteNumber)(this._initPTS),S="audio/mp4",w,F,L;if(P&&(w=F=Infinity),d.config&&y.length&&(d.timescale=d.samplerate,d.isAAC||(T.mpeg?(S="audio/mpeg",d.codec=""):T.mp3&&(d.codec="mp3")),I.audio={id:"audio",container:S,codec:d.codec,initSegment:!d.isAAC&&T.mpeg?new Uint8Array(0):C.default.initSegment([d]),metadata:{channelCount:d.channelCount}},P&&(L=d.inputTimeScale,w=F=y[0].pts-Math.round(L*c))),l.sps&&l.pps&&f.length&&(l.timescale=l.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:l.codec,initSegment:C.default.initSegment([l]),metadata:{width:l.width,height:l.height}},P)){L=l.inputTimeScale;var G=this.getVideoStartPts(f),Z=Math.round(L*c);F=Math.min(F,t(f[0].dts,G)-Z),w=Math.min(w,G-Z)}if(Object.keys(I).length)return this.ISGenerated=!0,P&&(this._initPTS=w,this._initDTS=F),{tracks:I,initPTS:w,timescale:L}},E.remuxVideo=function(d,l,c,y){var f=d.inputTimeScale,T=d.samples,I=[],P=T.length,S=this._initPTS,w=this.nextAvcDts,F=8,L,G,Z,ue=Number.POSITIVE_INFINITY,ce=Number.NEGATIVE_INFINITY,Re=0,Ee=!1;if(!c||w===null){var he=l*f,we=T[0].pts-t(T[0].dts,T[0].pts);w=he-we}for(var Pe=0;Pe<P;Pe++){var de=T[Pe];if(de.pts=t(de.pts-S,w),de.dts=t(de.dts-S,w),de.dts>de.pts){var j=9e4*.2;Re=Math.max(Math.min(Re,de.pts-de.dts),-1*j)}de.dts<T[Pe>0?Pe-1:Pe].dts&&(Ee=!0)}Ee&&T.sort(function(Ct,dt){var rt=Ct.dts-dt.dts,Dt=Ct.pts-dt.pts;return rt||Dt}),G=T[0].dts,Z=T[T.length-1].dts;var O=Math.round((Z-G)/(P-1));if(Re<0){if(Re<O*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(g.toMsFromMpegTsClock)(-O,!0)+" ms");for(var D=Re,W=0;W<P;W++)T[W].dts=D=Math.max(D,T[W].pts-O),T[W].pts=Math.max(D,T[W].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(g.toMsFromMpegTsClock)(Re,!0)+" ms to overcome this issue");for(var V=0;V<P;V++)T[V].dts=T[V].dts+Re}G=T[0].dts}if(c){var U=G-w,le=U>O,Oe=U<-1;if(le||Oe){le?e.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(U,!0)+" ms ("+U+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(g.toMsFromMpegTsClock)(-U,!0)+" ms ("+U+"dts) overlapping between fragments detected"),G=w;var Me=T[0].pts-U;T[0].dts=G,T[0].pts=Me,e.logger.log("Video: First PTS/DTS adjusted: "+Object(g.toMsFromMpegTsClock)(Me,!0)+"/"+Object(g.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(g.toMsFromMpegTsClock)(U,!0)+" ms")}}i&&(G=Math.max(0,G));for(var ie=0,pe=0,_e=0;_e<P;_e++){for(var Ae=T[_e],Ke=Ae.units,ze=Ke.length,Ze=0,Ye=0;Ye<ze;Ye++)Ze+=Ke[Ye].data.length;pe+=Ze,ie+=ze,Ae.length=Ze,Ae.dts=Math.max(Ae.dts,G),Ae.pts=Math.max(Ae.pts,Ae.dts,0),ue=Math.min(Ae.pts,ue),ce=Math.max(Ae.pts,ce)}Z=T[P-1].dts;var it=pe+4*ie+8,tt;try{tt=new Uint8Array(it)}catch(Ct){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:N.ErrorTypes.MUX_ERROR,details:N.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:it,reason:"fail allocating video mdat "+it});return}var Te=new DataView(tt.buffer);Te.setUint32(0,it),tt.set(C.default.types.mdat,4);for(var Ie=0;Ie<P;Ie++){for(var ke=T[Ie],We=ke.units,$=0,K=0,z=We.length;K<z;K++){var X=We[K],ee=X.data,Y=X.data.byteLength;Te.setUint32(F,Y),F+=4,tt.set(ee,F),F+=Y,$+=4+Y}if(Ie<P-1)L=T[Ie+1].dts-ke.dts;else{var J=this.config,ne=ke.dts-T[Ie>0?Ie-1:Ie].dts;if(J.stretchShortVideoTrack&&this.nextAudioPts!==null){var re=Math.floor(J.maxBufferHole*f),ye=(y?ue+y*f:this.nextAudioPts)-ke.pts;ye>re?(L=ye-ne,L<0&&(L=ne),e.logger.log("[mp4-remuxer]: It is approximately "+ye/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=ne}else L=ne}var be=Math.round(ke.pts-ke.dts);I.push(new b(ke.key,L,$,be))}if(I.length&&o&&o<70){var Ne=I[0].flags;Ne.dependsOn=2,Ne.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=w=Z+L,this.isVideoContiguous=!0;var Ve=C.default.moof(d.sequenceNumber++,G,m({},d,{samples:I})),$e="video",Je={data1:Ve,data2:tt,startPTS:ue/f,endPTS:(ce+L)/f,startDTS:G/f,endDTS:w/f,type:$e,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:d.dropped};return d.samples=[],d.dropped=0,console.assert(tt.length,"MDAT length must not be zero"),Je},E.remuxAudio=function(d,l,c,y,f){var T=d.inputTimeScale,I=d.samplerate?d.samplerate:T,P=T/I,S=d.isAAC?a:r,w=S*P,F=this._initPTS,L=!d.isAAC&&this.typeSupported.mpeg,G=[],Z=d.samples,ue=L?0:8,ce=this.nextAudioPts||-1,Re=l*T;if(this.isAudioContiguous=c=c||Z.length&&ce>0&&(y&&Math.abs(Re-ce)<9e3||Math.abs(t(Z[0].pts-F,Re)-ce)<20*w),Z.forEach(function(ee){ee.pts=t(ee.pts-F,Re)}),!c||ce<0){if(Z=Z.filter(function(ee){return ee.pts>=0}),!Z.length)return;f===0?ce=0:y?ce=Math.max(0,Re):ce=Z[0].pts}if(d.isAAC)for(var Ee=f!==void 0,he=this.config.maxAudioFramesDrift,we=0,Pe=ce;we<Z.length;we++){var de=Z[we],j=de.pts,O=j-Pe,D=Math.abs(1e3*O/T);if(O<=-he*w&&Ee)we===0&&(e.logger.warn("Audio frame @ "+(j/T).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*O/T)+" ms."),this.nextAudioPts=ce=Pe=j);else if(O>=he*w&&D<u&&Ee){var W=Math.round(O/w);Pe=j-W*w,Pe<0&&(W--,Pe+=w),we===0&&(this.nextAudioPts=ce=Pe),e.logger.warn("[mp4-remuxer]: Injecting "+W+" audio frame @ "+(Pe/T).toFixed(3)+"s due to "+Math.round(1e3*O/T)+" ms gap.");for(var V=0;V<W;V++){var U=Math.max(Pe,0),le=p.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);le||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),le=de.unit.subarray()),Z.splice(we,0,{unit:le,pts:U}),Pe+=w,we++}}de.pts=Pe,Pe+=w}for(var Oe=null,Me=null,ie,pe=0,_e=Z.length;_e--;)pe+=Z[_e].unit.byteLength;for(var Ae=0,Ke=Z.length;Ae<Ke;Ae++){var ze=Z[Ae],Ze=ze.unit,Ye=ze.pts;if(Me!==null){var it=G[Ae-1];it.duration=Math.round((Ye-Me)/P)}else if(c&&d.isAAC&&(Ye=ce),Oe=Ye,pe>0){pe+=ue;try{ie=new Uint8Array(pe)}catch(ee){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:N.ErrorTypes.MUX_ERROR,details:N.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:pe,reason:"fail allocating audio mdat "+pe});return}if(!L){var tt=new DataView(ie.buffer);tt.setUint32(0,pe),ie.set(C.default.types.mdat,4)}}else return;ie.set(Ze,ue);var Te=Ze.byteLength;ue+=Te,G.push(new b(!0,S,Te,0)),Me=Ye}var Ie=G.length;if(!Ie)return;var ke=G[G.length-1];this.nextAudioPts=ce=Me+P*ke.duration;var We=L?new Uint8Array(0):C.default.moof(d.sequenceNumber++,Oe/P,m({},d,{samples:G}));d.samples=[];var $=Oe/T,K=ce/T,z="audio",X={data1:We,data2:ie,startPTS:$,endPTS:K,startDTS:$,endDTS:K,type:z,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(ie.length,"MDAT length must not be zero"),X},E.remuxEmptyAudio=function(d,l,c,y){var f=d.inputTimeScale,T=d.samplerate?d.samplerate:f,I=f/T,P=this.nextAudioPts,S=(P!==null?P:y.startDTS*f)+this._initDTS,w=y.endDTS*f+this._initDTS,F=I*a,L=Math.ceil((w-S)/F),G=p.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Z=[],ue=0;ue<L;ue++){var ce=S+ue*F;Z.push({unit:G,pts:ce,dts:ce})}return d.samples=Z,this.remuxAudio(d,l,c,!1)},E.remuxID3=function(d,l){var c=d.samples.length;if(!c)return;for(var y=d.inputTimeScale,f=this._initPTS,T=this._initDTS,I=0;I<c;I++){var P=d.samples[I];P.pts=t(P.pts-f,l*y)/y,P.dts=t(P.dts-T,l*y)/y}var S=d.samples;return d.samples=[],{samples:S}},E.remuxText=function(d,l){var c=d.samples.length;if(!c)return;for(var y=d.inputTimeScale,f=this._initPTS,T=0;T<c;T++){var I=d.samples[T];I.pts=t(I.pts-f,l*y)/y}d.samples.sort(function(S,w){return S.pts-w.pts});var P=d.samples;return d.samples=[],{samples:P}},x}();function t(x,E){var h;if(E===null)return x;for(E<x?h=-8589934592:h=8589934592;Math.abs(x-E)>4294967296;)x+=h;return x}function _(x){for(var E=0;E<x.length;E++)if(x[E].key)return E;return-1}var b=function(E,h,d,l){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=h,this.size=d,this.cts=l,this.flags=new v(E)},v=function(E){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=E?2:1,this.isNonSync=E?0:1}},"./src/remux/passthrough-remuxer.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/polyfills/number.ts"),p=R("./src/utils/mp4-tools.ts"),C=R("./src/loader/fragment.ts"),H=R("./src/utils/logger.ts"),N=function(){function g(){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 m=g.prototype;return m.destroy=function(){},m.resetTimeStamp=function(a){this.initPTS=a,this.lastEndDTS=null},m.resetNextTimestamp=function(){this.lastEndDTS=null},m.resetInitSegment=function(a,r,o){this.audioCodec=r,this.videoCodec=o,this.generateInitSegment(a),this.emitInitSegment=!0},m.generateInitSegment=function(a){var r=this.audioCodec,o=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(p.parseInitSegment)(a);r||(r=A(s.audio,C.ElementaryStreamTypes.AUDIO)),o||(o=A(s.video,C.ElementaryStreamTypes.VIDEO));var i={};s.audio&&s.video?i.audiovideo={container:"video/mp4",codec:r+","+o,initSegment:a,id:"main"}:s.audio?i.audio={container:"audio/mp4",codec:r,initSegment:a,id:"audio"}:s.video?i.video={container:"video/mp4",codec:o,initSegment:a,id:"main"}:H.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},m.remux=function(a,r,o,s,i){var n=this.initPTS,t=this.lastEndDTS,_={audio:void 0,video:void 0,text:s,id3:o,initSegment:void 0};Object(B.isFiniteNumber)(t)||(t=this.lastEndDTS=i||0);var b=r.samples;if(!b||!b.length)return _;var v={initPTS:void 0,timescale:1},x=this.initData;if((!x||!x.length)&&(this.generateInitSegment(b),x=this.initData),!x||!x.length)return H.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),_;this.emitInitSegment&&(v.tracks=this.initTracks,this.emitInitSegment=!1),Object(B.isFiniteNumber)(n)||(this.initPTS=v.initPTS=n=e(x,b,t));var E=Object(p.getDuration)(b,x),h=t,d=E+h;Object(p.offsetStartDTS)(x,b,n),E>0?this.lastEndDTS=d:(H.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!x.audio,c=!!x.video,y="";l&&(y+="audio"),c&&(y+="video");var f={data1:b,startPTS:h,startDTS:h,endPTS:d,endDTS:d,type:y,hasAudio:l,hasVideo:c,nb:1,dropped:0};return _.audio=f.type==="audio"?f:void 0,_.video=f.type!=="audio"?f:void 0,_.text=s,_.id3=o,_.initSegment=v,_},g}(),e=function(m,u,a){return Object(p.getStartDTS)(m,u)-a};function A(g,m){var u=g==null?void 0:g.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||m===C.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}k.default=N},"./src/task-loop.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return B});var B=function(){function p(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var C=p.prototype;return C.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},C.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},C.onHandlerDestroyed=function(){},C.hasInterval=function(){return!!this._tickInterval},C.hasNextTick=function(){return!!this._tickTimer},C.setInterval=function(N){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,N),!0)},C.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},C.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},C.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},C.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},C.doTick=function(){},p}()},"./src/types/cmcd.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"CMCDVersion",function(){return B}),R.d(k,"CMCDObjectType",function(){return p}),R.d(k,"CMCDStreamingFormat",function(){return C}),R.d(k,"CMCDStreamType",function(){return H});var B=1,p;(function(N){N.MANIFEST="m",N.AUDIO="a",N.VIDEO="v",N.MUXED="av",N.INIT="i",N.CAPTION="c",N.TIMED_TEXT="tt",N.KEY="k",N.OTHER="o"})(p||(p={}));var C;(function(N){N.DASH="d",N.HLS="h",N.SMOOTH="s",N.OTHER="o"})(C||(C={}));var H;(function(N){N.VOD="v",N.LIVE="l"})(H||(H={}))},"./src/types/level.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"HlsSkip",function(){return C}),R.d(k,"getSkipValue",function(){return H}),R.d(k,"HlsUrlParameters",function(){return N}),R.d(k,"Level",function(){return e});function B(A,g){for(var m=0;m<g.length;m++){var u=g[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(A,u.key,u)}}function p(A,g,m){return g&&B(A.prototype,g),m&&B(A,m),A}var C;(function(A){A.No="",A.Yes="YES",A.v2="v2"})(C||(C={}));function H(A,g){var m=A.canSkipUntil,u=A.canSkipDateRanges,a=A.endSN,r=g!==void 0?g-a:0;return m&&r<m?u?C.v2:C.Yes:C.No}var N=function(){function A(m,u,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=m,this.part=u,this.skip=a}var g=A.prototype;return g.addDirectives=function(u){var a=new self.URL(u);return this.msn!==void 0&&a.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&a.searchParams.set("_HLS_part",this.part.toString()),this.skip&&a.searchParams.set("_HLS_skip",this.skip),a.toString()},A}(),e=function(){function A(g){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=[g.url],this.attrs=g.attrs,this.bitrate=g.bitrate,g.details&&(this.details=g.details),this.id=g.id||0,this.name=g.name,this.width=g.width||0,this.height=g.height||0,this.audioCodec=g.audioCodec,this.videoCodec=g.videoCodec,this.unknownCodecs=g.unknownCodecs,this.codecSet=[g.videoCodec,g.audioCodec].filter(function(m){return m}).join(",").replace(/\.[^.,]+/g,"")}return p(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(m){var u=m%this.url.length;this._urlId!==u&&(this.details=void 0,this._urlId=u)}}]),A}()},"./src/types/loader.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"PlaylistContextType",function(){return B}),R.d(k,"PlaylistLevelType",function(){return p});var B;(function(C){C.MANIFEST="manifest",C.LEVEL="level",C.AUDIO_TRACK="audioTrack",C.SUBTITLE_TRACK="subtitleTrack"})(B||(B={}));var p;(function(C){C.MAIN="main",C.AUDIO="audio",C.SUBTITLE="subtitle"})(p||(p={}))},"./src/types/transmuxer.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"ChunkMetadata",function(){return B});var B=function(H,N,e,A,g,m){A===void 0&&(A=0),g===void 0&&(g=-1),m===void 0&&(m=!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=p(),this.buffering={audio:p(),video:p(),audiovideo:p()},this.level=H,this.sn=N,this.id=e,this.size=A,this.part=g,this.partial=m};function p(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"AttrList",function(){return C});var B=/^(\d+)x(\d+)$/,p=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,C=function(){function H(e){typeof e=="string"&&(e=H.parseAttrList(e));for(var A in e)e.hasOwnProperty(A)&&(this[A]=e[A])}var N=H.prototype;return N.decimalInteger=function(A){var g=parseInt(this[A],10);return g>Number.MAX_SAFE_INTEGER?Infinity:g},N.hexadecimalInteger=function(A){if(this[A]){var g=(this[A]||"0x").slice(2);g=(g.length&1?"0":"")+g;for(var m=new Uint8Array(g.length/2),u=0;u<g.length/2;u++)m[u]=parseInt(g.slice(u*2,u*2+2),16);return m}else return null},N.hexadecimalIntegerAsNumber=function(A){var g=parseInt(this[A],16);return g>Number.MAX_SAFE_INTEGER?Infinity:g},N.decimalFloatingPoint=function(A){return parseFloat(this[A])},N.optionalFloat=function(A,g){var m=this[A];return m?parseFloat(m):g},N.enumeratedString=function(A){return this[A]},N.bool=function(A){return this[A]==="YES"},N.decimalResolution=function(A){var g=B.exec(this[A]);return g===null?void 0:{width:parseInt(g[1],10),height:parseInt(g[2],10)}},H.parseAttrList=function(A){var g,m={},u='"';for(p.lastIndex=0;(g=p.exec(A))!==null;){var a=g[2];a.indexOf(u)===0&&a.lastIndexOf(u)===a.length-1&&(a=a.slice(1,-1)),m[g[1]]=a}return m},H}()},"./src/utils/binary-search.ts":function(te,k,R){"use strict";R.r(k);var B={search:function(C,H){for(var N=0,e=C.length-1,A=null,g=null;N<=e;){A=(N+e)/2|0,g=C[A];var m=H(g);if(m>0)N=A+1;else if(m<0)e=A-1;else return g}return null}};k.default=B},"./src/utils/buffer-helper.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"BufferHelper",function(){return C});var B=R("./src/utils/logger.ts"),p={length:0,start:function(){return 0},end:function(){return 0}},C=function(){function H(){}return H.isBuffered=function(e,A){try{if(e){for(var g=H.getBuffered(e),m=0;m<g.length;m++)if(A>=g.start(m)&&A<=g.end(m))return!0}}catch(u){}return!1},H.bufferInfo=function(e,A,g){try{if(e){var m=H.getBuffered(e),u=[],a;for(a=0;a<m.length;a++)u.push({start:m.start(a),end:m.end(a)});return this.bufferedInfo(u,A,g)}}catch(r){}return{len:0,start:A,end:A,nextStart:void 0}},H.bufferedInfo=function(e,A,g){A=Math.max(0,A),e.sort(function(v,x){var E=v.start-x.start;return E||x.end-v.end});var m=[];if(g)for(var u=0;u<e.length;u++){var a=m.length;if(a){var r=m[a-1].end;e[u].start-r<g?e[u].end>r&&(m[a-1].end=e[u].end):m.push(e[u])}else m.push(e[u])}else m=e;for(var o=0,s,i=A,n=A,t=0;t<m.length;t++){var _=m[t].start,b=m[t].end;if(A+g>=_&&A<b)i=_,n=b,o=n-A;else if(A+g<_){s=_;break}}return{len:o,start:i||0,end:n||0,nextStart:s}},H.getBuffered=function(e){try{return e.buffered}catch(A){return B.logger.log("failed to get media.buffered",A),p}},H}()},"./src/utils/cea-608-parser.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"Row",function(){return n}),R.d(k,"CaptionScreen",function(){return t});var B=R("./src/utils/logger.ts"),p={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},C=function(d){var l=d;return p.hasOwnProperty(d)&&(l=p[d]),String.fromCharCode(l)},H=15,N=100,e={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},g={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},m={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],a;(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"})(a||(a={}));var r=function(){function h(){this.time=null,this.verboseLevel=a.ERROR}var d=h.prototype;return d.log=function(c,y){this.verboseLevel>=c&&B.logger.log(this.time+" ["+c+"] "+y)},h}(),o=function(d){for(var l=[],c=0;c<d.length;c++)l.push(d[c].toString(16));return l},s=function(){function h(l,c,y,f,T){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=l||"white",this.underline=c||!1,this.italics=y||!1,this.background=f||"black",this.flash=T||!1}var d=h.prototype;return d.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},d.setStyles=function(c){for(var y=["foreground","underline","italics","background","flash"],f=0;f<y.length;f++){var T=y[f];c.hasOwnProperty(T)&&(this[T]=c[T])}},d.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},d.equals=function(c){return this.foreground===c.foreground&&this.underline===c.underline&&this.italics===c.italics&&this.background===c.background&&this.flash===c.flash},d.copy=function(c){this.foreground=c.foreground,this.underline=c.underline,this.italics=c.italics,this.background=c.background,this.flash=c.flash},d.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},h}(),i=function(){function h(l,c,y,f,T,I){this.uchar=void 0,this.penState=void 0,this.uchar=l||" ",this.penState=new s(c,y,f,T,I)}var d=h.prototype;return d.reset=function(){this.uchar=" ",this.penState.reset()},d.setChar=function(c,y){this.uchar=c,this.penState.copy(y)},d.setPenState=function(c){this.penState.copy(c)},d.equals=function(c){return this.uchar===c.uchar&&this.penState.equals(c.penState)},d.copy=function(c){this.uchar=c.uchar,this.penState.copy(c.penState)},d.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},h}(),n=function(){function h(l){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var c=0;c<N;c++)this.chars.push(new i);this.logger=l,this.pos=0,this.currPenState=new s}var d=h.prototype;return d.equals=function(c){for(var y=!0,f=0;f<N;f++)if(!this.chars[f].equals(c.chars[f])){y=!1;break}return y},d.copy=function(c){for(var y=0;y<N;y++)this.chars[y].copy(c.chars[y])},d.isEmpty=function(){for(var c=!0,y=0;y<N;y++)if(!this.chars[y].isEmpty()){c=!1;break}return c},d.setCursor=function(c){this.pos!==c&&(this.pos=c),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>N&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=N)},d.moveCursor=function(c){var y=this.pos+c;if(c>1)for(var f=this.pos+1;f<y+1;f++)this.chars[f].setPenState(this.currPenState);this.setCursor(y)},d.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},d.insertChar=function(c){c>=144&&this.backSpace();var y=C(c);if(this.pos>=N){this.logger.log(a.ERROR,"Cannot insert "+c.toString(16)+" ("+y+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(y,this.currPenState),this.moveCursor(1)},d.clearFromPos=function(c){var y;for(y=c;y<N;y++)this.chars[y].reset()},d.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},d.clearToEndOfRow=function(){this.clearFromPos(this.pos)},d.getTextString=function(){for(var c=[],y=!0,f=0;f<N;f++){var T=this.chars[f].uchar;T!==" "&&(y=!1),c.push(T)}return y?"":c.join("")},d.setPenStyles=function(c){this.currPenState.setStyles(c);var y=this.chars[this.pos];y.setPenState(this.currPenState)},h}(),t=function(){function h(l){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var c=0;c<H;c++)this.rows.push(new n(l));this.logger=l,this.currRow=H-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var d=h.prototype;return d.reset=function(){for(var c=0;c<H;c++)this.rows[c].clear();this.currRow=H-1},d.equals=function(c){for(var y=!0,f=0;f<H;f++)if(!this.rows[f].equals(c.rows[f])){y=!1;break}return y},d.copy=function(c){for(var y=0;y<H;y++)this.rows[y].copy(c.rows[y])},d.isEmpty=function(){for(var c=!0,y=0;y<H;y++)if(!this.rows[y].isEmpty()){c=!1;break}return c},d.backSpace=function(){var c=this.rows[this.currRow];c.backSpace()},d.clearToEndOfRow=function(){var c=this.rows[this.currRow];c.clearToEndOfRow()},d.insertChar=function(c){var y=this.rows[this.currRow];y.insertChar(c)},d.setPen=function(c){var y=this.rows[this.currRow];y.setPenStyles(c)},d.moveCursor=function(c){var y=this.rows[this.currRow];y.moveCursor(c)},d.setCursor=function(c){this.logger.log(a.INFO,"setCursor: "+c);var y=this.rows[this.currRow];y.setCursor(c)},d.setPAC=function(c){this.logger.log(a.INFO,"pacData = "+JSON.stringify(c));var y=c.row-1;if(this.nrRollUpRows&&y<this.nrRollUpRows-1&&(y=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==y){for(var f=0;f<H;f++)this.rows[f].clear();var T=this.currRow+1-this.nrRollUpRows,I=this.lastOutputScreen;if(I){var P=I.rows[T].cueStartTime,S=this.logger.time;if(P&&S!==null&&P<S)for(var w=0;w<this.nrRollUpRows;w++)this.rows[y-this.nrRollUpRows+w+1].copy(I.rows[T+w])}}this.currRow=y;var F=this.rows[this.currRow];if(c.indent!==null){var L=c.indent,G=Math.max(L-1,0);F.setCursor(c.indent),c.color=F.chars[G].penState.foreground}var Z={foreground:c.color,underline:c.underline,italics:c.italics,background:"black",flash:!1};this.setPen(Z)},d.setBkgData=function(c){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(c)),this.backSpace(),this.setPen(c),this.insertChar(32)},d.setRollUpRows=function(c){this.nrRollUpRows=c},d.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(a.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(a.TEXT,this.getDisplayText());var c=this.currRow+1-this.nrRollUpRows,y=this.rows.splice(c,1)[0];y.clear(),this.rows.splice(this.currRow,0,y),this.logger.log(a.INFO,"Rolling up")},d.getDisplayText=function(c){c=c||!1;for(var y=[],f="",T=-1,I=0;I<H;I++){var P=this.rows[I].getTextString();P&&(T=I+1,c?y.push("Row "+T+": '"+P+"'"):y.push(P.trim()))}return y.length>0&&(c?f="["+y.join(" | ")+"]":f=y.join(`
|
|
`)),f},d.getTextAndFormat=function(){return this.rows},h}(),_=function(){function h(l,c,y){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=l,this.outputFilter=c,this.mode=null,this.verbose=0,this.displayedMemory=new t(y),this.nonDisplayedMemory=new t(y),this.lastOutputScreen=new t(y),this.currRollUpRow=this.displayedMemory.rows[H-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=y}var d=h.prototype;return d.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},d.getHandler=function(){return this.outputFilter},d.setHandler=function(c){this.outputFilter=c},d.setPAC=function(c){this.writeScreen.setPAC(c)},d.setBkgData=function(c){this.writeScreen.setBkgData(c)},d.setMode=function(c){if(c===this.mode)return;this.mode=c,this.logger.log(a.INFO,"MODE="+c),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=c},d.insertChars=function(c){for(var y=0;y<c.length;y++)this.writeScreen.insertChar(c[y]);var f=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,f+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(a.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},d.ccRCL=function(){this.logger.log(a.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},d.ccBS=function(){if(this.logger.log(a.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},d.ccAOF=function(){},d.ccAON=function(){},d.ccDER=function(){this.logger.log(a.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},d.ccRU=function(c){this.logger.log(a.INFO,"RU("+c+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(c)},d.ccFON=function(){this.logger.log(a.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},d.ccRDC=function(){this.logger.log(a.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},d.ccTR=function(){this.logger.log(a.INFO,"TR"),this.setMode("MODE_TEXT")},d.ccRTD=function(){this.logger.log(a.INFO,"RTD"),this.setMode("MODE_TEXT")},d.ccEDM=function(){this.logger.log(a.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},d.ccCR=function(){this.logger.log(a.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},d.ccENM=function(){this.logger.log(a.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},d.ccEOC=function(){if(this.logger.log(a.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var c=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=c,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},d.ccTO=function(c){this.logger.log(a.INFO,"TO("+c+") - Tab Offset"),this.writeScreen.moveCursor(c)},d.ccMIDROW=function(c){var y={flash:!1};if(y.underline=c%2===1,y.italics=c>=46,y.italics)y.foreground="white";else{var f=Math.floor(c/2)-16,T=["white","green","blue","cyan","red","yellow","magenta"];y.foreground=T[f]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(y)),this.writeScreen.setPen(y)},d.outputDataUpdate=function(c){c===void 0&&(c=!1);var y=this.logger.time;if(y===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=y:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,y,this.lastOutputScreen),c&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:y),this.lastOutputScreen.copy(this.displayedMemory))},d.cueSplitAtTime=function(c){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,c,this.displayedMemory),this.cueStartTime=c))},h}(),b=function(){function h(l,c,y){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var f=new r;this.channels=[null,new _(l,c,f),new _(l+1,y,f)],this.cmdHistory=E(),this.logger=f}var d=h.prototype;return d.getHandler=function(c){return this.channels[c].getHandler()},d.setHandler=function(c,y){this.channels[c].setHandler(y)},d.addData=function(c,y){var f,T,I,P=!1;this.logger.time=c;for(var S=0;S<y.length;S+=2){if(T=y[S]&127,I=y[S+1]&127,T===0&&I===0)continue;if(this.logger.log(a.DATA,"["+o([y[S],y[S+1]])+"] -> ("+o([T,I])+")"),f=this.parseCmd(T,I),f||(f=this.parseMidrow(T,I)),f||(f=this.parsePAC(T,I)),f||(f=this.parseBackgroundAttributes(T,I)),!f&&(P=this.parseChars(T,I),P)){var w=this.currentChannel;if(w&&w>0){var F=this.channels[w];F.insertChars(P)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!f&&!P&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+o([T,I])+" orig: "+o([y[S],y[S+1]]))}},d.parseCmd=function(c,y){var f=this.cmdHistory,T=(c===20||c===28||c===21||c===29)&&y>=32&&y<=47,I=(c===23||c===31)&&y>=33&&y<=35;if(!(T||I))return!1;if(x(c,y,f))return v(null,null,f),this.logger.log(a.DEBUG,"Repeated command ("+o([c,y])+") is dropped"),!0;var P=c===20||c===21||c===23?1:2,S=this.channels[P];return c===20||c===21||c===28||c===29?y===32?S.ccRCL():y===33?S.ccBS():y===34?S.ccAOF():y===35?S.ccAON():y===36?S.ccDER():y===37?S.ccRU(2):y===38?S.ccRU(3):y===39?S.ccRU(4):y===40?S.ccFON():y===41?S.ccRDC():y===42?S.ccTR():y===43?S.ccRTD():y===44?S.ccEDM():y===45?S.ccCR():y===46?S.ccENM():y===47&&S.ccEOC():S.ccTO(y-32),v(c,y,f),this.currentChannel=P,!0},d.parseMidrow=function(c,y){var f=0;if((c===17||c===25)&&y>=32&&y<=47){if(c===17?f=1:f=2,f!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var T=this.channels[f];return T?(T.ccMIDROW(y),this.logger.log(a.DEBUG,"MIDROW ("+o([c,y])+")"),!0):!1}return!1},d.parsePAC=function(c,y){var f,T=this.cmdHistory,I=(c>=17&&c<=23||c>=25&&c<=31)&&y>=64&&y<=127,P=(c===16||c===24)&&y>=64&&y<=95;if(!(I||P))return!1;if(x(c,y,T))return v(null,null,T),!0;var S=c<=23?1:2;y>=64&&y<=95?f=S===1?e[c]:g[c]:f=S===1?A[c]:m[c];var w=this.channels[S];return w?(w.setPAC(this.interpretPAC(f,y)),v(c,y,T),this.currentChannel=S,!0):!1},d.interpretPAC=function(c,y){var f,T={color:null,italics:!1,indent:null,underline:!1,row:c};return y>95?f=y-96:f=y-64,T.underline=(f&1)===1,f<=13?T.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(f/2)]:f<=15?(T.italics=!0,T.color="white"):T.indent=Math.floor((f-16)/2)*4,T},d.parseChars=function(c,y){var f,T=null,I=null;if(c>=25?(f=2,I=c-8):(f=1,I=c),I>=17&&I<=19){var P;I===17?P=y+80:I===18?P=y+112:P=y+144,this.logger.log(a.INFO,"Special char '"+C(P)+"' in channel "+f),T=[P]}else c>=32&&c<=127&&(T=y===0?[c]:[c,y]);if(T){var S=o(T);this.logger.log(a.DEBUG,"Char codes = "+S.join(",")),v(c,y,this.cmdHistory)}return T},d.parseBackgroundAttributes=function(c,y){var f=(c===16||c===24)&&y>=32&&y<=47,T=(c===23||c===31)&&y>=45&&y<=47;if(!(f||T))return!1;var I,P={};c===16||c===24?(I=Math.floor((y-32)/2),P.background=u[I],y%2===1&&(P.background=P.background+"_semi")):y===45?P.background="transparent":(P.foreground="black",y===47&&(P.underline=!0));var S=c<=23?1:2,w=this.channels[S];return w.setBkgData(P),v(c,y,this.cmdHistory),!0},d.reset=function(){for(var c=0;c<Object.keys(this.channels).length;c++){var y=this.channels[c];y&&y.reset()}this.cmdHistory=E()},d.cueSplitAtTime=function(c){for(var y=0;y<this.channels.length;y++){var f=this.channels[y];f&&f.cueSplitAtTime(c)}},h}();function v(h,d,l){l.a=h,l.b=d}function x(h,d,l){return l.a===h&&l.b===d}function E(){return{a:null,b:null}}k.default=b},"./src/utils/codecs.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"isCodecType",function(){return p}),R.d(k,"isCodecSupportedInMp4",function(){return C});var B={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 p(H,N){var e=B[N];return!!e&&e[H.slice(0,4)]===!0}function C(H,N){return MediaSource.isTypeSupported((N||"video")+'/mp4;codecs="'+H+'"')}},"./src/utils/cues.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/utils/vttparser.ts"),p=R("./src/utils/webvtt-parser.ts"),C=R("./src/utils/texttrack-utils.ts"),H=/\s/,N={newCue:function(A,g,m,u){for(var a=[],r,o,s,i,n,t=self.VTTCue||self.TextTrackCue,_=0;_<u.rows.length;_++)if(r=u.rows[_],s=!0,i=0,n="",!r.isEmpty()){for(var b=0;b<r.chars.length;b++)H.test(r.chars[b].uchar)&&s?i++:(n+=r.chars[b].uchar,s=!1);r.cueStartTime=g,g===m&&(m+=1e-4),i>=16?i--:i++;var v=Object(B.fixLineBreaks)(n.trim()),x=Object(p.generateCueId)(g,m,v);(!A||!A.cues||!A.cues.getCueById(x))&&(o=new t(g,m,v),o.id=x,o.line=_+1,o.align="left",o.position=10+Math.min(80,Math.floor(i*8/32)*10),a.push(o))}return A&&a.length&&(a.sort(function(E,h){return E.line==="auto"||h.line==="auto"?0:E.line>8&&h.line>8?h.line-E.line:E.line-h.line}),a.forEach(function(E){return Object(C.addCueToTrack)(A,E)})),a}};k.default=N},"./src/utils/discontinuities.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"findFirstFragWithCC",function(){return H}),R.d(k,"shouldAlignOnDiscontinuities",function(){return N}),R.d(k,"findDiscontinuousReferenceFrag",function(){return e}),R.d(k,"adjustSlidingStart",function(){return g}),R.d(k,"alignStream",function(){return m}),R.d(k,"alignPDT",function(){return a}),R.d(k,"alignFragmentByPDTDelta",function(){return r}),R.d(k,"alignMediaPlaylistByPDT",function(){return o});var B=R("./src/polyfills/number.ts"),p=R("./src/utils/logger.ts"),C=R("./src/controller/level-helper.ts");function H(s,i){for(var n=null,t=0,_=s.length;t<_;t++){var b=s[t];if(b&&b.cc===i){n=b;break}}return n}function N(s,i,n){return!!(i.details&&(n.endCC>n.startCC||s&&s.cc<n.startCC))}function e(s,i){var n=s.fragments,t=i.fragments;if(!t.length||!n.length){p.logger.log("No fragments to align");return}var _=H(n,t[0].cc);if(!_||_&&!_.startPTS){p.logger.log("No frag in previous level to align on");return}return _}function A(s,i){if(s){var n=s.start+i;s.start=s.startPTS=n,s.endPTS=n+s.duration}}function g(s,i){for(var n=i.fragments,t=0,_=n.length;t<_;t++)A(n[t],s);i.fragmentHint&&A(i.fragmentHint,s),i.alignedSliding=!0}function m(s,i,n){if(!i)return;u(s,n,i),!n.alignedSliding&&i.details&&a(n,i.details),!n.alignedSliding&&i.details&&!n.skippedSegments&&Object(C.adjustSliding)(i.details,n)}function u(s,i,n){if(N(s,n,i)){var t=e(n.details,i);t&&Object(B.isFiniteNumber)(t.start)&&(p.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),g(t.start,i))}}function a(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var n=i.fragments[0].programDateTime,t=s.fragments[0].programDateTime,_=(t-n)/1e3+i.fragments[0].start;_&&Object(B.isFiniteNumber)(_)&&(p.logger.log("Adjusting PTS using programDateTime delta "+(t-n)+"ms, sliding:"+_.toFixed(3)+" "+s.url+" "),g(_,s))}function r(s,i){var n=s.programDateTime;if(!n)return;var t=(n-i)/1e3;s.start=s.startPTS=t,s.endPTS=t+s.duration}function o(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var n=i.fragments[0].programDateTime,t=i.fragments[0].start,_=n-t*1e3;s.fragments.forEach(function(b){r(b,_)}),s.fragmentHint&&r(s.fragmentHint,_),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/utils/ewma.ts"),p=function(){function C(N,e,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 B.default(N),this.fast_=new B.default(e)}var H=C.prototype;return H.update=function(e,A){var g=this.slow_,m=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new B.default(e,g.getEstimate(),g.getTotalWeight())),this.fast_.halfLife!==A&&(this.fast_=new B.default(A,m.getEstimate(),m.getTotalWeight()))},H.sample=function(e,A){e=Math.max(e,this.minDelayMs_);var g=8*A,m=e/1e3,u=g/m;this.fast_.sample(m,u),this.slow_.sample(m,u)},H.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},H.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},H.destroy=function(){},C}();k.default=p},"./src/utils/ewma.ts":function(te,k,R){"use strict";R.r(k);var B=function(){function p(H,N,e){N===void 0&&(N=0),e===void 0&&(e=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_=N,this.totalWeight_=e}var C=p.prototype;return C.sample=function(N,e){var A=Math.pow(this.alpha_,N);this.estimate_=e*(1-A)+A*this.estimate_,this.totalWeight_+=N},C.getTotalWeight=function(){return this.totalWeight_},C.getEstimate=function(){if(this.alpha_){var N=1-Math.pow(this.alpha_,this.totalWeight_);if(N)return this.estimate_/N}return this.estimate_},p}();k.default=B},"./src/utils/fetch-loader.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"fetchSupported",function(){return r});var B=R("./src/polyfills/number.ts"),p=R("./src/loader/load-stats.ts"),C=R("./src/demux/chunk-cache.ts");function H(t,_){t.prototype=Object.create(_.prototype),t.prototype.constructor=t,m(t,_)}function N(t){var _=typeof Map=="function"?new Map:void 0;return N=function(v){if(v===null||!g(v))return v;if(typeof v!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _!="undefined"){if(_.has(v))return _.get(v);_.set(v,x)}function x(){return e(v,arguments,u(this).constructor)}return x.prototype=Object.create(v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),m(x,v)},N(t)}function e(t,_,b){return A()?e=Reflect.construct:e=function(x,E,h){var d=[null];d.push.apply(d,E);var l=Function.bind.apply(x,d),c=new l;return h&&m(c,h.prototype),c},e.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(t){return!1}}function g(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function m(t,_){return m=Object.setPrototypeOf||function(v,x){return v.__proto__=x,v},m(t,_)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},u(t)}function a(){return a=Object.assign||function(t){for(var _=1;_<arguments.length;_++){var b=arguments[_];for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(t[v]=b[v])}return t},a.apply(this,arguments)}function r(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var o=function(){function t(b){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=b.fetchSetup||i,this.controller=new self.AbortController,this.stats=new p.LoadStats}var _=t.prototype;return _.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},_.abortInternal=function(){var v=this.response;(!v||!v.ok)&&(this.stats.aborted=!0,this.controller.abort())},_.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},_.load=function(v,x,E){var h=this,d=this.stats;if(d.loading.start)throw new Error("Loader can only be used once.");d.loading.start=self.performance.now();var l=s(v,this.controller.signal),c=E.onProgress,y=v.responseType==="arraybuffer",f=y?"byteLength":"length";this.context=v,this.config=x,this.callbacks=E,this.request=this.fetchSetup(v,l),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){h.abortInternal(),E.onTimeout(d,v,h.response)},x.timeout),self.fetch(this.request).then(function(T){if(h.response=h.loader=T,!T.ok){var I=T.status,P=T.statusText;throw new n(P||"fetch, bad network response",I,T)}return d.loading.first=Math.max(self.performance.now(),d.loading.start),d.total=parseInt(T.headers.get("Content-Length")||"0"),c&&Object(B.isFiniteNumber)(x.highWaterMark)?h.loadProgressively(T,d,v,x.highWaterMark,c):y?T.arrayBuffer():T.text()}).then(function(T){var I=h.response;self.clearTimeout(h.requestTimeout),d.loading.end=Math.max(self.performance.now(),d.loading.first),d.loaded=d.total=T[f];var P={url:I.url,data:T};c&&!Object(B.isFiniteNumber)(x.highWaterMark)&&c(d,v,T,I),E.onSuccess(P,d,v,I)}).catch(function(T){if(self.clearTimeout(h.requestTimeout),d.aborted)return;var I=T.code||0;E.onError({code:I,text:T.message},v,T.details)})},_.getCacheAge=function(){var v=null;if(this.response){var x=this.response.headers.get("age");v=x?parseFloat(x):null}return v},_.loadProgressively=function(v,x,E,h,d){h===void 0&&(h=0);var l=new C.default,c=v.body.getReader(),y=function f(){return c.read().then(function(T){if(T.done)return l.dataLength&&d(x,E,l.flush(),v),Promise.resolve(new ArrayBuffer(0));var I=T.value,P=I.length;return x.loaded+=P,P<h||l.dataLength?(l.push(I),l.dataLength>=h&&d(x,E,l.flush(),v)):d(x,E,I,v),f()}).catch(function(){return Promise.reject()})};return y()},t}();function s(t,_){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:_,headers:new self.Headers(a({},t.headers))};return t.rangeEnd&&b.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),b}function i(t,_){return new self.Request(t.url,_)}var n=function(t){H(_,t);function _(b,v,x){var E;return E=t.call(this,b)||this,E.code=void 0,E.details=void 0,E.code=v,E.details=x,E}return _}(N(Error));k.default=o},"./src/utils/imsc1-ttml-parser.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"IMSC1_CODEC",function(){return g}),R.d(k,"parseIMSC1",function(){return r});var B=R("./src/utils/mp4-tools.ts"),p=R("./src/utils/vttparser.ts"),C=R("./src/utils/vttcue.ts"),H=R("./src/demux/id3.ts"),N=R("./src/utils/timescale-conversion.ts"),e=R("./src/utils/webvtt-parser.ts");function A(){return A=Object.assign||function(h){for(var d=1;d<arguments.length;d++){var l=arguments[d];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(h[c]=l[c])}return h},A.apply(this,arguments)}var g="stpp.ttml.im1t",m=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,u=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,a={left:"start",center:"center",right:"end",start:"start",end:"end"};function r(h,d,l,c,y){var f=Object(B.findBox)(new Uint8Array(h),["mdat"]);if(f.length===0){y(new Error("Could not parse IMSC1 mdat"));return}var T=f[0],I=Object(H.utf8ArrayToStr)(new Uint8Array(h,T.start,T.end-T.start)),P=Object(N.toTimescaleFromScale)(d,1,l);try{c(o(I,P))}catch(S){y(S)}}function o(h,d){var l=new DOMParser,c=l.parseFromString(h,"text/xml"),y=c.getElementsByTagName("tt")[0];if(!y)throw new Error("Invalid ttml");var f={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},T=Object.keys(f).reduce(function(F,L){return F[L]=y.getAttribute("ttp:"+L)||f[L],F},{}),I=y.getAttribute("xml:space")!=="preserve",P=i(s(y,"styling","style")),S=i(s(y,"layout","region")),w=s(y,"body","[begin]");return[].map.call(w,function(F){var L=n(F,I);if(!L||!F.hasAttribute("begin"))return null;var G=v(F.getAttribute("begin"),T),Z=v(F.getAttribute("dur"),T),ue=v(F.getAttribute("end"),T);if(G===null)throw b(F);if(ue===null){if(Z===null)throw b(F);ue=G+Z}var ce=new C.default(G-d,ue-d,L);ce.id=Object(e.generateCueId)(ce.startTime,ce.endTime,ce.text);var Re=S[F.getAttribute("region")],Ee=P[F.getAttribute("style")];ce.position=10,ce.size=80;var he=t(Re,Ee),we=he.textAlign;if(we){var Pe=a[we];Pe&&(ce.lineAlign=Pe),ce.align=we}return A(ce,he),ce}).filter(function(F){return F!==null})}function s(h,d,l){var c=h.getElementsByTagName(d)[0];return c?[].slice.call(c.querySelectorAll(l)):[]}function i(h){return h.reduce(function(d,l){var c=l.getAttribute("xml:id");return c&&(d[c]=l),d},{})}function n(h,d){return[].slice.call(h.childNodes).reduce(function(l,c,y){var f;return c.nodeName==="br"&&y?l+`
|
|
`:(f=c.childNodes)!==null&&f!==void 0&&f.length?n(c,d):d?l+c.textContent.trim().replace(/\s+/g," "):l+c.textContent},"")}function t(h,d){var l="http://www.w3.org/ns/ttml#styling",c=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return c.reduce(function(y,f){var T=_(d,l,f)||_(h,l,f);return T&&(y[f]=T),y},{})}function _(h,d,l){return h.hasAttributeNS(d,l)?h.getAttributeNS(d,l):null}function b(h){return new Error("Could not parse ttml timestamp "+h)}function v(h,d){if(!h)return null;var l=Object(p.parseTimeStamp)(h);return l===null&&(m.test(h)?l=x(h,d):u.test(h)&&(l=E(h,d))),l}function x(h,d){var l=m.exec(h),c=(l[4]|0)+(l[5]|0)/d.subFrameRate;return(l[1]|0)*3600+(l[2]|0)*60+(l[3]|0)+c/d.frameRate}function E(h,d){var l=u.exec(h),c=Number(l[1]),y=l[2];switch(y){case"h":return c*3600;case"m":return c*60;case"ms":return c*1e3;case"f":return c/d.frameRate;case"t":return c/d.tickRate}return c}},"./src/utils/logger.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"enableLogs",function(){return e}),R.d(k,"logger",function(){return A});var B=function(){},p={trace:B,debug:B,log:B,warn:B,info:B,error:B},C=p;function H(g){var m=self.console[g];return m?m.bind(self.console,"["+g+"] >"):B}function N(g){for(var m=arguments.length,u=new Array(m>1?m-1:0),a=1;a<m;a++)u[a-1]=arguments[a];u.forEach(function(r){C[r]=g[r]?g[r].bind(g):H(r)})}function e(g){if(self.console&&g===!0||typeof g=="object"){N(g,"debug","log","info","warn","error");try{C.log()}catch(m){C=p}}else C=p}var A=C},"./src/utils/mediakeys-helper.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"KeySystems",function(){return B}),R.d(k,"requestMediaKeySystemAccess",function(){return p});var B;(function(C){C.WIDEVINE="com.widevine.alpha",C.PLAYREADY="com.microsoft.playready"})(B||(B={}));var p=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"getMediaSource",function(){return B});function B(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"bin2str",function(){return N}),R.d(k,"readUint16",function(){return e}),R.d(k,"readUint32",function(){return A}),R.d(k,"writeUint32",function(){return g}),R.d(k,"findBox",function(){return m}),R.d(k,"parseSegmentIndex",function(){return u}),R.d(k,"parseInitSegment",function(){return a}),R.d(k,"getStartDTS",function(){return r}),R.d(k,"getDuration",function(){return o}),R.d(k,"computeRawDurationFromSamples",function(){return s}),R.d(k,"offsetStartDTS",function(){return i}),R.d(k,"segmentValidRange",function(){return n}),R.d(k,"appendUint8Array",function(){return t});var B=R("./src/utils/typed-array.ts"),p=R("./src/loader/fragment.ts"),C=Math.pow(2,32)-1,H=[].push;function N(_){return String.fromCharCode.apply(null,_)}function e(_,b){"data"in _&&(b+=_.start,_=_.data);var v=_[b]<<8|_[b+1];return v<0?65536+v:v}function A(_,b){"data"in _&&(b+=_.start,_=_.data);var v=_[b]<<24|_[b+1]<<16|_[b+2]<<8|_[b+3];return v<0?4294967296+v:v}function g(_,b,v){"data"in _&&(b+=_.start,_=_.data),_[b]=v>>24,_[b+1]=v>>16&255,_[b+2]=v>>8&255,_[b+3]=v&255}function m(_,b){var v=[];if(!b.length)return v;var x,E,h;"data"in _?(x=_.data,E=_.start,h=_.end):(x=_,E=0,h=x.byteLength);for(var d=E;d<h;){var l=A(x,d),c=N(x.subarray(d+4,d+8)),y=l>1?d+l:h;if(c===b[0])if(b.length===1)v.push({data:x,start:d+8,end:y});else{var f=m({data:x,start:d+8,end:y},b.slice(1));f.length&&H.apply(v,f)}d=y}return v}function u(_){var b=m(_,["moov"]),v=b[0],x=v?v.end:null,E=m(_,["sidx"]);if(!E||!E[0])return null;var h=[],d=E[0],l=d.data[0],c=l===0?8:16,y=A(d,c);c+=4;var f=0,T=0;l===0?c+=8:c+=16,c+=2;var I=d.end+T,P=e(d,c);c+=2;for(var S=0;S<P;S++){var w=c,F=A(d,w);w+=4;var L=F&2147483647,G=(F&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Z=A(d,w);w+=4,h.push({referenceSize:L,subsegmentDuration:Z,info:{duration:Z/y,start:I,end:I+L-1}}),I+=L,w+=4,c=w}return{earliestPresentationTime:f,timescale:y,version:l,referencesCount:P,references:h,moovEndOffset:x}}function a(_){for(var b=[],v=m(_,["moov","trak"]),x=0;x<v.length;x++){var E=v[x],h=m(E,["tkhd"])[0];if(h){var d=h.data[h.start],l=d===0?12:20,c=A(h,l),y=m(E,["mdia","mdhd"])[0];if(y){d=y.data[y.start],l=d===0?12:20;var f=A(y,l),T=m(E,["mdia","hdlr"])[0];if(T){var I=N(T.data.subarray(T.start+8,T.start+12)),P={soun:p.ElementaryStreamTypes.AUDIO,vide:p.ElementaryStreamTypes.VIDEO}[I];if(P){var S=m(E,["mdia","minf","stbl","stsd"])[0],w=void 0;S&&(w=N(S.data.subarray(S.start+12,S.start+16))),b[c]={timescale:f,type:P},b[P]={timescale:f,id:c,codec:w}}}}}}var F=m(_,["moov","mvex","trex"]);return F.forEach(function(L){var G=A(L,4),Z=b[G];Z&&(Z.default={duration:A(L,12),flags:A(L,20)})}),b}function r(_,b){return m(b,["moof","traf"]).reduce(function(v,x){var E=m(x,["tfdt"])[0],h=E.data[E.start],d=m(x,["tfhd"]).reduce(function(l,c){var y=A(c,4),f=_[y];if(f){var T=A(E,4);h===1&&(T*=Math.pow(2,32),T+=A(E,8));var I=f.timescale||9e4,P=T/I;if(isFinite(P)&&(l===null||P<l))return P}return l},null);return d!==null&&isFinite(d)&&(v===null||d<v)?d:v},null)||0}function o(_,b){for(var v=0,x=0,E=0,h=m(_,["moof","traf"]),d=0;d<h.length;d++){var l=h[d],c=m(l,["tfhd"])[0],y=A(c,4),f=b[y];if(!f)continue;var T=f.default,I=A(c,0)|(T==null?void 0:T.flags),P=T==null?void 0:T.duration;I&8&&(I&2?P=A(c,12):P=A(c,8));for(var S=f.timescale||9e4,w=m(l,["trun"]),F=0;F<w.length;F++){if(P){var L=A(w[F],4);v=P*L}else v=s(w[F]);f.type===p.ElementaryStreamTypes.VIDEO?x+=v/S:f.type===p.ElementaryStreamTypes.AUDIO&&(E+=v/S)}}if(x===0&&E===0){var G=u(_);if(G!=null&&G.references)return G.references.reduce(function(Z,ue){return Z+ue.info.duration||0},0)}return x||E}function s(_){var b=A(_,0),v=8;b&1&&(v+=4),b&4&&(v+=4);for(var x=0,E=A(_,4),h=0;h<E;h++){if(b&256){var d=A(_,v);x+=d,v+=4}b&512&&(v+=4),b&1024&&(v+=4),b&2048&&(v+=4)}return x}function i(_,b,v){m(b,["moof","traf"]).forEach(function(x){m(x,["tfhd"]).forEach(function(E){var h=A(E,4),d=_[h];if(!d)return;var l=d.timescale||9e4;m(x,["tfdt"]).forEach(function(c){var y=c.data[c.start],f=A(c,4);if(y===0)g(c,4,f-v*l);else{f*=Math.pow(2,32),f+=A(c,8),f-=v*l,f=Math.max(f,0);var T=Math.floor(f/(C+1)),I=Math.floor(f%(C+1));g(c,4,T),g(c,8,I)}})})})}function n(_){var b={valid:null,remainder:null},v=m(_,["moof"]);if(v){if(v.length<2)return b.remainder=_,b}else return b;var x=v[v.length-1];return b.valid=Object(B.sliceUint8)(_,0,x.start-8),b.remainder=Object(B.sliceUint8)(_,x.start-8),b}function t(_,b){var v=new Uint8Array(_.length+b.length);return v.set(_),v.set(b,_.length),v}},"./src/utils/output-filter.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"default",function(){return B});var B=function(){function p(H,N){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=H,this.trackName=N}var C=p.prototype;return C.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},C.newCue=function(N,e,A){(this.startTime===null||this.startTime>N)&&(this.startTime=N),this.endTime=e,this.screen=A,this.timelineController.createCaptionsTrack(this.trackName)},C.reset=function(){this.cueRanges=[]},p}()},"./src/utils/texttrack-utils.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"sendAddTrackEvent",function(){return p}),R.d(k,"addCueToTrack",function(){return C}),R.d(k,"clearCurrentCues",function(){return H}),R.d(k,"removeCuesInRange",function(){return N}),R.d(k,"getCuesInRange",function(){return A});var B=R("./src/utils/logger.ts");function p(g,m){var u;try{u=new Event("addtrack")}catch(a){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=g,m.dispatchEvent(u)}function C(g,m){var u=g.mode;if(u==="disabled"&&(g.mode="hidden"),g.cues&&!g.cues.getCueById(m.id))try{if(g.addCue(m),!g.cues.getCueById(m.id))throw new Error("addCue is failed for: "+m)}catch(r){B.logger.debug("[texttrack-utils]: "+r);var a=new self.TextTrackCue(m.startTime,m.endTime,m.text);a.id=m.id,g.addCue(a)}u==="disabled"&&(g.mode=u)}function H(g){var m=g.mode;if(m==="disabled"&&(g.mode="hidden"),g.cues)for(var u=g.cues.length;u--;)g.removeCue(g.cues[u]);m==="disabled"&&(g.mode=m)}function N(g,m,u){var a=g.mode;if(a==="disabled"&&(g.mode="hidden"),g.cues&&g.cues.length>0)for(var r=A(g.cues,m,u),o=0;o<r.length;o++)g.removeCue(r[o]);a==="disabled"&&(g.mode=a)}function e(g,m){if(m<g[0].startTime)return 0;var u=g.length-1;if(m>g[u].endTime)return-1;for(var a=0,r=u;a<=r;){var o=Math.floor((r+a)/2);if(m<g[o].startTime)r=o-1;else if(m>g[o].startTime&&a<u)a=o+1;else return o}return g[a].startTime-m<m-g[r].startTime?a:r}function A(g,m,u){var a=[],r=e(g,m);if(r>-1)for(var o=r,s=g.length;o<s;o++){var i=g[o];if(i.startTime>=m&&i.endTime<=u)a.push(i);else if(i.startTime>u)return a}return a}},"./src/utils/time-ranges.ts":function(te,k,R){"use strict";R.r(k);var B={toString:function(C){for(var H="",N=C.length,e=0;e<N;e++)H+="["+C.start(e).toFixed(3)+","+C.end(e).toFixed(3)+"]";return H}};k.default=B},"./src/utils/timescale-conversion.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"toTimescaleFromBase",function(){return p}),R.d(k,"toTimescaleFromScale",function(){return C}),R.d(k,"toMsFromMpegTsClock",function(){return H}),R.d(k,"toMpegTsClockFromTimescale",function(){return N});var B=9e4;function p(e,A,g,m){g===void 0&&(g=1),m===void 0&&(m=!1);var u=e*A*g;return m?Math.round(u):u}function C(e,A,g,m){return g===void 0&&(g=1),m===void 0&&(m=!1),p(e,A,1/g,m)}function H(e,A){return A===void 0&&(A=!1),p(e,1e3,1/B,A)}function N(e,A){return A===void 0&&(A=1),p(e,B,1/A)}},"./src/utils/typed-array.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"sliceUint8",function(){return B});function B(p,C,H){return Uint8Array.prototype.slice?p.slice(C,H):new Uint8Array(Array.prototype.slice.call(p,C,H))}},"./src/utils/vttcue.ts":function(te,k,R){"use strict";R.r(k),k.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var B=["","lr","rl"],p=["start","middle","end","left","right"];function C(g,m){if(typeof m!="string")return!1;if(!Array.isArray(g))return!1;var u=m.toLowerCase();return~g.indexOf(u)?u:!1}function H(g){return C(B,g)}function N(g){return C(p,g)}function e(g){for(var m=arguments.length,u=new Array(m>1?m-1:0),a=1;a<m;a++)u[a-1]=arguments[a];for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var s in o)g[s]=o[s]}return g}function A(g,m,u){var a=this,r={enumerable:!0};a.hasBeenReset=!1;var o="",s=!1,i=g,n=m,t=u,_=null,b="",v=!0,x="auto",E="start",h=50,d="middle",l=50,c="middle";Object.defineProperty(a,"id",e({},r,{get:function(){return o},set:function(f){o=""+f}})),Object.defineProperty(a,"pauseOnExit",e({},r,{get:function(){return s},set:function(f){s=!!f}})),Object.defineProperty(a,"startTime",e({},r,{get:function(){return i},set:function(f){if(typeof f!="number")throw new TypeError("Start time must be set to a number.");i=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",e({},r,{get:function(){return n},set:function(f){if(typeof f!="number")throw new TypeError("End time must be set to a number.");n=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",e({},r,{get:function(){return t},set:function(f){t=""+f,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",e({},r,{get:function(){return _},set:function(f){_=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",e({},r,{get:function(){return b},set:function(f){var T=H(f);if(T===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=T,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",e({},r,{get:function(){return v},set:function(f){v=!!f,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",e({},r,{get:function(){return x},set:function(f){if(typeof f!="number"&&f!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");x=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",e({},r,{get:function(){return E},set:function(f){var T=N(f);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");E=T,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",e({},r,{get:function(){return h},set:function(f){if(f<0||f>100)throw new Error("Position must be between 0 and 100.");h=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",e({},r,{get:function(){return d},set:function(f){var T=N(f);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");d=T,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",e({},r,{get:function(){return l},set:function(f){if(f<0||f>100)throw new Error("Size must be between 0 and 100.");l=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",e({},r,{get:function(){return c},set:function(f){var T=N(f);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");c=T,this.hasBeenReset=!0}})),a.displayState=void 0}return A.prototype.getCueAsHTML=function(){var g=self.WebVTT;return g.convertCueToDOMTree(self,this.text)},A}()},"./src/utils/vttparser.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"parseTimeStamp",function(){return C}),R.d(k,"fixLineBreaks",function(){return m}),R.d(k,"VTTParser",function(){return u});var B=R("./src/utils/vttcue.ts"),p=function(){function a(){}var r=a.prototype;return r.decode=function(s,i){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},a}();function C(a){function r(s,i,n,t){return(s|0)*3600+(i|0)*60+(n|0)+parseFloat(t||0)}var o=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return o?parseFloat(o[2])>59?r(o[2],o[3],0,o[4]):r(o[1],o[2],o[3],o[4]):null}var H=function(){function a(){this.values=Object.create(null)}var r=a.prototype;return r.set=function(s,i){!this.get(s)&&i!==""&&(this.values[s]=i)},r.get=function(s,i,n){return n?this.has(s)?this.values[s]:i[n]:this.has(s)?this.values[s]:i},r.has=function(s){return s in this.values},r.alt=function(s,i,n){for(var t=0;t<n.length;++t)if(i===n[t]){this.set(s,i);break}},r.integer=function(s,i){/^-?\d+$/.test(i)&&this.set(s,parseInt(i,10))},r.percent=function(s,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var n=parseFloat(i);if(n>=0&&n<=100)return this.set(s,n),!0}return!1},a}();function N(a,r,o,s){var i=s?a.split(s):[a];for(var n in i){if(typeof i[n]!="string")continue;var t=i[n].split(o);if(t.length!==2)continue;var _=t[0],b=t[1];r(_,b)}}var e=new B.default(0,0,""),A=e.align==="middle"?"middle":"center";function g(a,r,o){var s=a;function i(){var _=C(a);if(_===null)throw new Error("Malformed timestamp: "+s);return a=a.replace(/^[^\sa-zA-Z-]+/,""),_}function n(_,b){var v=new H;N(_,function(h,d){var l;switch(h){case"region":for(var c=o.length-1;c>=0;c--)if(o[c].id===d){v.set(h,o[c].region);break}break;case"vertical":v.alt(h,d,["rl","lr"]);break;case"line":l=d.split(","),v.integer(h,l[0]),v.percent(h,l[0])&&v.set("snapToLines",!1),v.alt(h,l[0],["auto"]),l.length===2&&v.alt("lineAlign",l[1],["start",A,"end"]);break;case"position":l=d.split(","),v.percent(h,l[0]),l.length===2&&v.alt("positionAlign",l[1],["start",A,"end","line-left","line-right","auto"]);break;case"size":v.percent(h,d);break;case"align":v.alt(h,d,["start",A,"end","left","right"]);break}},/:/,/\s/),b.region=v.get("region",null),b.vertical=v.get("vertical","");var x=v.get("line","auto");x==="auto"&&e.line===-1&&(x=-1),b.line=x,b.lineAlign=v.get("lineAlign","start"),b.snapToLines=v.get("snapToLines",!0),b.size=v.get("size",100),b.align=v.get("align",A);var E=v.get("position","auto");E==="auto"&&e.position===50&&(E=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=E}function t(){a=a.replace(/^\s+/,"")}if(t(),r.startTime=i(),t(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);a=a.substr(3),t(),r.endTime=i(),t(),n(a,r)}function m(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}var u=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new p,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var r=a.prototype;return r.parse=function(s){var i=this;s&&(i.buffer+=i.decoder.decode(s,{stream:!0}));function n(){var E=i.buffer,h=0;for(E=m(E);h<E.length&&E[h]!=="\r"&&E[h]!==`
|
|
`;)++h;var d=E.substr(0,h);return E[h]==="\r"&&++h,E[h]===`
|
|
`&&++h,i.buffer=E.substr(h),d}function t(E){N(E,function(h,d){},/:/)}try{var _="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;_=n();var b=_.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var v=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;v?v=!1:_=n();switch(i.state){case"HEADER":/:/.test(_)?t(_):_||(i.state="ID");continue;case"NOTE":_||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(_)){i.state="NOTE";break}if(!_)continue;if(i.cue=new B.default(0,0,""),i.state="CUE",_.indexOf("-->")===-1){i.cue.id=_;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{g(_,i.cue,i.regionList)}catch(E){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var x=_.indexOf("-->")!==-1;if(!_||x&&(v=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=`
|
|
`),i.cue.text+=_}continue;case"BADCUE":_||(i.state="ID")}}}catch(E){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},r.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(i){s.onparsingerror&&s.onparsingerror(i)}return s.onflush&&s.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(te,k,R){"use strict";R.r(k),R.d(k,"generateCueId",function(){return u}),R.d(k,"parseWebVTT",function(){return r});var B=R("./src/polyfills/number.ts"),p=R("./src/utils/vttparser.ts"),C=R("./src/demux/id3.ts"),H=R("./src/utils/timescale-conversion.ts"),N=R("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,A=function(s,i,n){return n===void 0&&(n=0),s.substr(n,i.length)===i},g=function(s){var i=parseInt(s.substr(-3)),n=parseInt(s.substr(-6,2)),t=parseInt(s.substr(-9,2)),_=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(B.isFiniteNumber)(i)||!Object(B.isFiniteNumber)(n)||!Object(B.isFiniteNumber)(t)||!Object(B.isFiniteNumber)(_))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return i+=1e3*n,i+=60*1e3*t,i+=60*60*1e3*_,i},m=function(s){for(var i=5381,n=s.length;n;)i=i*33^s.charCodeAt(--n);return(i>>>0).toString()};function u(o,s,i){return m(o.toString())+m(s.toString())+m(i)}var a=function(s,i,n){var t=s[i],_=s[t.prevCC];if(!_||!_.new&&t.new){s.ccOffset=s.presentationOffset=t.start,t.new=!1;return}for(;(b=_)!==null&&b!==void 0&&b.new;){var b;s.ccOffset+=t.start-_.start,t.new=!1,t=_,_=s[t.prevCC]}s.presentationOffset=n};function r(o,s,i,n,t,_,b,v){var x=new p.VTTParser,E=Object(C.utf8ArrayToStr)(new Uint8Array(o)).trim().replace(e,`
|
|
`).split(`
|
|
`),h=[],d=Object(H.toMpegTsClockFromTimescale)(s,i),l="00:00.000",c=0,y=0,f,T=!0,I=!1;x.oncue=function(P){var S=n[t],w=n.ccOffset,F=(c-d)/9e4;if(S!=null&&S.new&&(y!==void 0?w=n.ccOffset=S.start:a(n,t,F)),F&&(w=F-n.presentationOffset),I){var L=P.endTime-P.startTime,G=Object(N.normalizePts)((P.startTime+w-y)*9e4,_*9e4)/9e4;P.startTime=G,P.endTime=G+L}var Z=P.text.trim();P.text=decodeURIComponent(encodeURIComponent(Z)),P.id||(P.id=u(P.startTime,P.endTime,Z)),P.endTime>0&&h.push(P)},x.onparsingerror=function(P){f=P},x.onflush=function(){if(f){v(f);return}b(h)},E.forEach(function(P){if(T)if(A(P,"X-TIMESTAMP-MAP=")){T=!1,I=!0,P.substr(16).split(",").forEach(function(S){A(S,"LOCAL:")?l=S.substr(6):A(S,"MPEGTS:")&&(c=parseInt(S.substr(7)))});try{y=g(l)/1e3}catch(S){I=!1,f=S}return}else P===""&&(T=!1);x.parse(P+`
|
|
`)}),x.flush()}},"./src/utils/xhr-loader.ts":function(te,k,R){"use strict";R.r(k);var B=R("./src/utils/logger.ts"),p=R("./src/loader/load-stats.ts"),C=/^age:\s*[\d.]+\s*$/m,H=function(){function N(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 p.LoadStats,this.retryDelay=0}var e=N.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var g=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),g&&(g.onreadystatechange=null,g.onprogress=null,g.readyState!==4&&(this.stats.aborted=!0,g.abort()))},e.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(g,m,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=g,this.config=m,this.callbacks=u,this.retryDelay=m.retryDelay,this.loadInternal()},e.loadInternal=function(){var g=this.config,m=this.context;if(!g)return;var u=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var r=this.xhrSetup;try{if(r)try{r(u,m.url)}catch(i){u.open("GET",m.url,!0),r(u,m.url)}u.readyState||u.open("GET",m.url,!0);var o=this.context.headers;if(o)for(var s in o)u.setRequestHeader(s,o[s])}catch(i){this.callbacks.onError({code:u.status,text:i.message},m,u);return}m.rangeEnd&&u.setRequestHeader("Range","bytes="+m.rangeStart+"-"+(m.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=m.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),g.timeout),u.send()},e.readystatechange=function(){var g=this.context,m=this.loader,u=this.stats;if(!g||!m)return;var a=m.readyState,r=this.config;if(u.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),a===4){m.onreadystatechange=null,m.onprogress=null;var o=m.status;if(o>=200&&o<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var s,i;if(g.responseType==="arraybuffer"?(s=m.response,i=s.byteLength):(s=m.responseText,i=s.length),u.loaded=u.total=i,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(u,g,s,m),!this.callbacks)return;var t={url:m.responseURL,data:s};this.callbacks.onSuccess(t,u,g,m)}else u.retry>=r.maxRetry||o>=400&&o<499?(B.logger.error(o+" while loading "+g.url),this.callbacks.onError({code:o,text:m.statusText},g,m)):(B.logger.warn(o+" while loading "+g.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,r.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout)},e.loadtimeout=function(){B.logger.warn("timeout while loading "+this.context.url);var g=this.callbacks;g&&(this.abortInternal(),g.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(g){var m=this.stats;m.loaded=g.loaded,g.lengthComputable&&(m.total=g.total)},e.getCacheAge=function(){var g=null;if(this.loader&&C.test(this.loader.getAllResponseHeaders())){var m=this.loader.getResponseHeader("age");g=m?parseFloat(m):null}return g},N}();k.default=H}}).default})},vHTk:function(Be,oe,M){Be.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return Ze});var te=M("rePB"),k=M("VTBJ"),R=M("KQm4"),B=M("U8pU"),p=M("ODXe"),C=M("q1tI"),H=M("TSYQ"),N=M.n(H),e=M("Gytx"),A=M.n(e),g=M("Kwbf"),m=M("t23M"),u=M("qx4F"),a=M("6eGT"),r=M("IBYe"),o=M("Ff2n"),s=M("c+Xe"),i=M("fyJ8"),n=M("biw7");function t(Te,Ie,ke,We,$){var K=ke[Te]||{},z=ke[Ie]||{},X,ee;K.fixed==="left"?X=We.left[Te]:z.fixed==="right"&&(ee=We.right[Ie]);var Y=!1,J=!1,ne=!1,re=!1,ye=ke[Ie+1],be=ke[Te-1];if($==="rtl"){if(X!==void 0){var Ne=be&&be.fixed==="left";re=!Ne}else if(ee!==void 0){var Ve=ye&&ye.fixed==="right";ne=!Ve}}else if(X!==void 0){var $e=ye&&ye.fixed==="left";Y=!$e}else if(ee!==void 0){var Je=be&&be.fixed==="right";J=!Je}return{fixLeft:X,fixRight:ee,lastFixLeft:Y,firstFixRight:J,lastFixRight:ne,firstFixLeft:re,isSticky:We.isSticky}}var _=M("sR1s");function b(Te){var Ie=Te.cells,ke=Te.stickyOffsets,We=Te.flattenColumns,$=Te.rowComponent,K=Te.cellComponent,z=Te.onHeaderRow,X=Te.index,ee=C.useContext(n.a),Y=ee.prefixCls,J=ee.direction,ne;z&&(ne=z(Ie.map(function(ye){return ye.column}),X));var re=Object(_.a)(Ie.map(function(ye){return ye.column}));return C.createElement($,Object.assign({},ne),Ie.map(function(ye,be){var Ne=ye.column,Ve=t(ye.colStart,ye.colEnd,We,ke,J),$e;return Ne&&Ne.onHeaderCell&&($e=ye.column.onHeaderCell(Ne)),C.createElement(i.a,Object.assign({},ye,{ellipsis:Ne.ellipsis,align:Ne.align,component:K,prefixCls:Y,key:re[be]},Ve,{additionalProps:$e,rowType:"header"}))}))}b.displayName="HeaderRow";var v=b;function x(Te){var Ie=[];function ke(z,X){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[ee]=Ie[ee]||[];var Y=X,J=z.filter(Boolean).map(function(ne){var re={key:ne.key,className:ne.className||"",children:ne.title,column:ne,colStart:Y},ye=1,be=ne.children;return be&&be.length>0&&(ye=ke(be,Y,ee+1).reduce(function(Ne,Ve){return Ne+Ve},0),re.hasSubColumns=!0),"colSpan"in ne&&(ye=ne.colSpan),"rowSpan"in ne&&(re.rowSpan=ne.rowSpan),re.colSpan=ye,re.colEnd=re.colStart+ye-1,Ie[ee].push(re),Y+=ye,ye});return J}ke(Te,0);for(var We=Ie.length,$=function(X){Ie[X].forEach(function(ee){!("rowSpan"in ee)&&!ee.hasSubColumns&&(ee.rowSpan=We-X)})},K=0;K<We;K+=1)$(K);return Ie}function E(Te){var Ie=Te.stickyOffsets,ke=Te.columns,We=Te.flattenColumns,$=Te.onHeaderRow,K=C.useContext(n.a),z=K.prefixCls,X=K.getComponent,ee=C.useMemo(function(){return x(ke)},[ke]),Y=X(["header","wrapper"],"thead"),J=X(["header","row"],"tr"),ne=X(["header","cell"],"th");return C.createElement(Y,{className:"".concat(z,"-thead")},ee.map(function(re,ye){var be=C.createElement(v,{key:ye,flattenColumns:We,cells:re,stickyOffsets:Ie,rowComponent:J,cellComponent:ne,onHeaderRow:$,index:ye});return be}))}var h=E,d=M("hW8S");function l(Te){for(var Ie=Te.colWidths,ke=Te.columns,We=Te.columCount,$=[],K=We||ke.length,z=!1,X=K-1;X>=0;X-=1){var ee=Ie[X],Y=ke&&ke[X],J=Y&&Y[d.a];(ee||J||z)&&($.unshift(C.createElement("col",Object.assign({key:X,style:{width:ee,minWidth:ee}},J))),z=!0)}return C.createElement("colgroup",null,$)}var c=l;function y(Te,Ie){return Object(C.useMemo)(function(){for(var ke=[],We=0;We<Ie;We+=1){var $=Te[We];if($!==void 0)ke[We]=$;else return null}return ke},[Te.join("_"),Ie])}var f=C.forwardRef(function(Te,Ie){var ke=Te.noData,We=Te.columns,$=Te.flattenColumns,K=Te.colWidths,z=Te.columCount,X=Te.stickyOffsets,ee=Te.direction,Y=Te.fixHeader,J=Te.offsetHeader,ne=Te.stickyClassName,re=Te.onScroll,ye=Object(o.a)(Te,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),be=C.useContext(n.a),Ne=be.prefixCls,Ve=be.scrollbarSize,$e=be.isSticky,Je=$e&&!Y?0:Ve,Ct=C.useRef(null),dt=C.useCallback(function(Lt){Object(s.b)(Ie,Lt),Object(s.b)(Ct,Lt)},[]);C.useEffect(function(){var Lt;function Pt(bt){var Qt=bt.currentTarget,at=bt.deltaX;at&&(re({currentTarget:Qt,scrollLeft:Qt.scrollLeft+at}),bt.preventDefault())}return(Lt=Ct.current)===null||Lt===void 0||Lt.addEventListener("wheel",Pt),function(){var bt;(bt=Ct.current)===null||bt===void 0||bt.removeEventListener("wheel",Pt)}},[]);var rt=$[$.length-1],Dt={fixed:rt?rt.fixed:null,onHeaderCell:function(){return{className:"".concat(Ne,"-cell-scrollbar")}}},Ot=Object(C.useMemo)(function(){return Je?[].concat(Object(R.a)(We),[Dt]):We},[Je,We]),St=Object(C.useMemo)(function(){return Je?[].concat(Object(R.a)($),[Dt]):$},[Je,$]),Kt=Object(C.useMemo)(function(){var Lt=X.right,Pt=X.left;return Object(k.a)(Object(k.a)({},X),{},{left:ee==="rtl"?[].concat(Object(R.a)(Pt.map(function(bt){return bt+Je})),[0]):Pt,right:ee==="rtl"?Lt:[].concat(Object(R.a)(Lt.map(function(bt){return bt+Je})),[0]),isSticky:$e})},[Je,X,$e]),gt=y(K,z);return C.createElement("div",{style:Object(k.a)({overflow:"hidden"},$e?{top:J}:{}),ref:dt,className:N()("".concat(Ne,"-header"),Object(te.a)({},ne,!!ne))},C.createElement("table",{style:{tableLayout:"fixed",visibility:ke||gt?null:"hidden"}},C.createElement(c,{colWidths:gt?[].concat(Object(R.a)(gt),[Je]):[],columCount:z+1,columns:St}),C.createElement(h,Object.assign({},ye,{stickyOffsets:Kt,columns:Ot,flattenColumns:St}))))});f.displayName="FixedHeader";var T=f,I=C.createContext(null),P=I;function S(Te){var Ie=Te.prefixCls,ke=Te.children,We=Te.component,$=Te.cellComponent,K=Te.fixHeader,z=Te.fixColumn,X=Te.horizonScroll,ee=Te.className,Y=Te.expanded,J=Te.componentWidth,ne=Te.colSpan,re=C.useContext(n.a),ye=re.scrollbarSize;return C.useMemo(function(){var be=ke;return z&&(be=C.createElement("div",{style:{width:J-(K?ye:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},be)),C.createElement(We,{className:ee,style:{display:Y?null:"none"}},C.createElement(i.a,{component:$,prefixCls:Ie,colSpan:ne},be))},[ke,We,K,X,ee,Y,J,ne,ye])}var w=S;function F(Te){var Ie=Te.className,ke=Te.style,We=Te.record,$=Te.index,K=Te.rowKey,z=Te.getRowKey,X=Te.rowExpandable,ee=Te.expandedKeys,Y=Te.onRow,J=Te.indent,ne=J===void 0?0:J,re=Te.rowComponent,ye=Te.cellComponent,be=Te.childrenColumnName,Ne=C.useContext(n.a),Ve=Ne.prefixCls,$e=Ne.fixedInfoList,Je=C.useContext(P),Ct=Je.fixHeader,dt=Je.fixColumn,rt=Je.horizonScroll,Dt=Je.componentWidth,Ot=Je.flattenColumns,St=Je.expandableType,Kt=Je.expandRowByClick,gt=Je.onTriggerExpand,Lt=Je.rowClassName,Pt=Je.expandedRowClassName,bt=Je.indentSize,Qt=Je.expandIcon,at=Je.expandedRowRender,Le=Je.expandIconColumnIndex,qe=C.useState(!1),lt=Object(p.a)(qe,2),_t=lt[0],At=lt[1],ht=ee&&ee.has(Te.recordKey);C.useEffect(function(){ht&&At(!0)},[ht]);var st=St==="row"&&(!X||X(We)),ut=St==="nest",ct=be&&We&&We[be],vt=st||ut,ft;Y&&(ft=Y(We,$));var It=function(Bt){if(Kt&&vt&>(We,Bt),ft&&ft.onClick){for(var Gt,en=arguments.length,qt=new Array(en>1?en-1:0),Mt=1;Mt<en;Mt++)qt[Mt-1]=arguments[Mt];(Gt=ft).onClick.apply(Gt,[Bt].concat(qt))}},Rt;typeof Lt=="string"?Rt=Lt:typeof Lt=="function"&&(Rt=Lt(We,$,ne));var Zt=Object(_.a)(Ot),sn=C.createElement(re,Object.assign({},ft,{"data-row-key":K,className:N()(Ie,"".concat(Ve,"-row"),"".concat(Ve,"-row-level-").concat(ne),Rt,ft&&ft.className),style:Object(k.a)(Object(k.a)({},ke),ft?ft.style:null),onClick:It}),Ot.map(function(Vt,Bt){var Gt=Vt.render,en=Vt.dataIndex,qt=Vt.className,Mt=Zt[Bt],An=$e[Bt],jn;Bt===(Le||0)&&ut&&(jn=C.createElement(C.Fragment,null,C.createElement("span",{style:{paddingLeft:"".concat(bt*ne,"px")},className:"".concat(Ve,"-row-indent indent-level-").concat(ne)}),Qt({prefixCls:Ve,expanded:ht,expandable:ct,record:We,onExpand:gt})));var hi;return Vt.onCell&&(hi=Vt.onCell(We,$)),C.createElement(i.a,Object.assign({className:qt,ellipsis:Vt.ellipsis,align:Vt.align,component:ye,prefixCls:Ve,key:Mt,record:We,index:$,dataIndex:en,render:Gt,shouldCellUpdate:Vt.shouldCellUpdate},An,{appendNode:jn,additionalProps:hi}))})),mt;if(st&&(_t||ht)){var ot=at(We,$,ne+1,ht),on=Pt&&Pt(We,$,ne);mt=C.createElement(w,{expanded:ht,className:N()("".concat(Ve,"-expanded-row"),"".concat(Ve,"-expanded-row-level-").concat(ne+1),on),prefixCls:Ve,fixHeader:Ct,fixColumn:dt,horizonScroll:rt,component:re,componentWidth:Dt,cellComponent:ye,colSpan:Ot.length},ot)}var an;return ct&&ht&&(an=(We[be]||[]).map(function(Vt,Bt){var Gt=z(Vt,Bt);return C.createElement(F,Object.assign({},Te,{key:Gt,rowKey:Gt,record:Vt,recordKey:Gt,index:Bt,indent:ne+1}))})),C.createElement(C.Fragment,null,sn,mt,an)}F.displayName="BodyRow";var L=F,G=C.createContext(null),Z=G;function ue(Te){var Ie=Te.columnKey,ke=Te.onColumnResize,We=C.useRef();return C.useEffect(function(){We.current&&ke(Ie,We.current.offsetWidth)},[]),C.createElement(m.a,{onResize:function(K){var z=K.offsetWidth;ke(Ie,z)}},C.createElement("td",{ref:We,style:{padding:0,border:0,height:0}},C.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ce(Te){var Ie=Te.data,ke=Te.getRowKey,We=Te.measureColumnWidth,$=Te.expandedKeys,K=Te.onRow,z=Te.rowExpandable,X=Te.emptyNode,ee=Te.childrenColumnName,Y=C.useContext(Z),J=Y.onColumnResize,ne=C.useContext(n.a),re=ne.prefixCls,ye=ne.getComponent,be=C.useContext(P),Ne=be.fixHeader,Ve=be.horizonScroll,$e=be.flattenColumns,Je=be.componentWidth;return C.useMemo(function(){var Ct=ye(["body","wrapper"],"tbody"),dt=ye(["body","row"],"tr"),rt=ye(["body","cell"],"td"),Dt;Ie.length?Dt=Ie.map(function(St,Kt){var gt=ke(St,Kt);return C.createElement(L,{key:gt,rowKey:gt,record:St,recordKey:gt,index:Kt,rowComponent:dt,cellComponent:rt,expandedKeys:$,onRow:K,getRowKey:ke,rowExpandable:z,childrenColumnName:ee})}):Dt=C.createElement(w,{expanded:!0,className:"".concat(re,"-placeholder"),prefixCls:re,fixHeader:Ne,fixColumn:Ve,horizonScroll:Ve,component:dt,componentWidth:Je,cellComponent:rt,colSpan:$e.length},X);var Ot=Object(_.a)($e);return C.createElement(Ct,{className:"".concat(re,"-tbody")},We&&C.createElement("tr",{"aria-hidden":"true",className:"".concat(re,"-measure-row"),style:{height:0}},Ot.map(function(St){return C.createElement(ue,{key:St,columnKey:St,onColumnResize:J})})),Dt)},[Ie,re,K,We,$,ke,ye,Je,X,$e])}var Re=C.memo(ce);Re.displayName="Body";var Ee=Re,he=M("wRmb"),we=M("xEkU"),Pe=M.n(we);function de(Te){var Ie=Object(C.useRef)(Te),ke=Object(C.useState)({}),We=Object(p.a)(ke,2),$=We[1],K=Object(C.useRef)(null),z=Object(C.useRef)([]);function X(ee){K.current===null&&(z.current=[],K.current=Pe()(function(){z.current.forEach(function(Y){Ie.current=Y(Ie.current)}),K.current=null,$({})})),z.current.push(ee)}return Object(C.useEffect)(function(){return function(){Pe.a.cancel(K.current)}},[]),[Ie.current,X]}function j(Te){var Ie=Object(C.useRef)(Te),ke=Object(C.useRef)(null);function We(){window.clearTimeout(ke.current)}function $(z){Ie.current=z,We(),ke.current=window.setTimeout(function(){Ie.current=null,ke.current=null},100)}function K(){return Ie.current}return Object(C.useEffect)(function(){return We},[]),[$,K]}function O(Te,Ie,ke){var We=Object(C.useMemo)(function(){for(var $=[],K=[],z=0,X=0,ee=0;ee<Ie;ee+=1)if(ke==="rtl"){K[ee]=X,X+=Te[ee]||0;var Y=Ie-ee-1;$[Y]=z,z+=Te[Y]||0}else{$[ee]=z,z+=Te[ee]||0;var J=Ie-ee-1;K[J]=X,X+=Te[J]||0}return{left:$,right:K}},[Te,Ie,ke]);return We}var D=O;function W(Te){var Ie=Te.className,ke=Te.children;return C.createElement("div",{className:Ie},ke)}var V=W,U=M("n6Qo");function le(Te){var Ie,ke=Te.prefixCls,We=Te.record,$=Te.onExpand,K=Te.expanded,z=Te.expandable,X="".concat(ke,"-row-expand-icon");if(!z)return C.createElement("span",{className:N()(X,"".concat(ke,"-row-spaced"))});var ee=function(J){$(We,J),J.stopPropagation()};return C.createElement("span",{className:N()(X,(Ie={},Object(te.a)(Ie,"".concat(ke,"-row-expanded"),K),Object(te.a)(Ie,"".concat(ke,"-row-collapsed"),!K),Ie)),onClick:ee})}function Oe(Te,Ie,ke){var We=[];function $(K){(K||[]).forEach(function(z,X){We.push(Ie(z,X)),$(z[ke])})}return $(Te),We}var Me=M("zT1h"),ie=M("y0+3"),pe=function(Ie,ke){var We,$,K=Ie.scrollBodyRef,z=Ie.onScroll,X=Ie.offsetScroll,ee=C.useContext(n.a),Y=ee.prefixCls,J=((We=K.current)===null||We===void 0?void 0:We.scrollWidth)||0,ne=(($=K.current)===null||$===void 0?void 0:$.clientWidth)||0,re=J&&ne*(ne/J),ye=C.useRef(),be=de({scrollLeft:0,isHiddenScrollBar:!1}),Ne=Object(p.a)(be,2),Ve=Ne[0],$e=Ne[1],Je=C.useRef({delta:0,x:0}),Ct=C.useState(!1),dt=Object(p.a)(Ct,2),rt=dt[0],Dt=dt[1],Ot=function(){Dt(!1)},St=function(bt){bt.persist(),Je.current.delta=bt.pageX-Ve.scrollLeft,Je.current.x=0,Dt(!0),bt.preventDefault()},Kt=function(bt){var Qt,at=bt||((Qt=window)===null||Qt===void 0?void 0:Qt.event),Le=at.buttons;if(!rt||Le===0){rt&&Dt(!1);return}var qe=Je.current.x+bt.pageX-Je.current.x-Je.current.delta;qe<=0&&(qe=0),qe+re>=ne&&(qe=ne-re),z({scrollLeft:qe/ne*(J+2)}),Je.current.x=bt.pageX},gt=function(){var bt=Object(ie.b)(K.current).top,Qt=bt+K.current.offsetHeight,at=document.documentElement.scrollTop+window.innerHeight;Qt-Object(u.a)()<=at||bt>=at-X?$e(function(Le){return Object(k.a)(Object(k.a)({},Le),{},{isHiddenScrollBar:!0})}):$e(function(Le){return Object(k.a)(Object(k.a)({},Le),{},{isHiddenScrollBar:!1})})},Lt=function(bt){$e(function(Qt){return Object(k.a)(Object(k.a)({},Qt),{},{scrollLeft:bt/J*ne||0})})};return C.useImperativeHandle(ke,function(){return{setScrollLeft:Lt}}),C.useEffect(function(){var Pt=Object(Me.a)(document.body,"mouseup",Ot,!1),bt=Object(Me.a)(document.body,"mousemove",Kt,!1);return gt(),function(){Pt.remove(),bt.remove()}},[re,rt]),C.useEffect(function(){var Pt=Object(Me.a)(window,"scroll",gt,!1),bt=Object(Me.a)(window,"resize",gt,!1);return function(){Pt.remove(),bt.remove()}},[]),C.useEffect(function(){Ve.isHiddenScrollBar||$e(function(Pt){var bt,Qt;return Object(k.a)(Object(k.a)({},Pt),{},{scrollLeft:K.current.scrollLeft/((bt=K.current)===null||bt===void 0?void 0:bt.scrollWidth)*((Qt=K.current)===null||Qt===void 0?void 0:Qt.clientWidth)})})},[Ve.isHiddenScrollBar]),J<=ne||!re||Ve.isHiddenScrollBar?null:C.createElement("div",{style:{height:Object(u.a)(),width:ne,bottom:X},className:"".concat(Y,"-sticky-scroll")},C.createElement("div",{onMouseDown:St,ref:ye,className:N()("".concat(Y,"-sticky-scroll-bar"),Object(te.a)({},"".concat(Y,"-sticky-scroll-bar-active"),rt)),style:{width:"".concat(re,"px"),transform:"translate3d(".concat(Ve.scrollLeft,"px, 0, 0)")}}))},_e=C.forwardRef(pe);function Ae(Te,Ie){return C.useMemo(function(){var ke=!!Te;return{isSticky:ke,stickyClassName:ke?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(B.a)(Te)==="object"&&Te.offsetHeader||0,offsetScroll:Object(B.a)(Te)==="object"&&Te.offsetScroll||0}},[Te,Ie])}var Ke=[],ze={},Ze="rc-table-internal-hook",Ye=C.memo(function(Te){var Ie=Te.children;return Ie},function(Te,Ie){return A()(Te.props,Ie.props)?Te.pingLeft!==Ie.pingLeft||Te.pingRight!==Ie.pingRight:!1});function it(Te){var Ie,ke=Te.prefixCls,We=Te.className,$=Te.rowClassName,K=Te.style,z=Te.data,X=Te.rowKey,ee=Te.scroll,Y=Te.tableLayout,J=Te.direction,ne=Te.title,re=Te.footer,ye=Te.summary,be=Te.id,Ne=Te.showHeader,Ve=Te.components,$e=Te.emptyText,Je=Te.onRow,Ct=Te.onHeaderRow,dt=Te.internalHooks,rt=Te.transformColumns,Dt=Te.internalRefs,Ot=Te.sticky,St=z||Ke,Kt=!!St.length,gt=C.useState(0),Lt=Object(p.a)(gt,2),Pt=Lt[0],bt=Lt[1];C.useEffect(function(){bt(Object(u.a)())});var Qt=C.useMemo(function(){return Object(_.c)(Ve,{})},[Ve]),at=C.useCallback(function(Ht,Yt){return Object(_.b)(Qt,Ht)||Yt},[Qt]),Le=C.useMemo(function(){return typeof X=="function"?X:function(Ht){var Yt=Ht&&Ht[X];return Yt}},[X]),qe=Object(d.c)(Te),lt=qe.expandIcon,_t=qe.expandedRowKeys,At=qe.defaultExpandedRowKeys,ht=qe.defaultExpandAllRows,st=qe.expandedRowRender,ut=qe.onExpand,ct=qe.onExpandedRowsChange,vt=qe.expandRowByClick,ft=qe.rowExpandable,It=qe.expandIconColumnIndex,Rt=qe.expandedRowClassName,Zt=qe.childrenColumnName,sn=qe.indentSize,mt=lt||le,ot=Zt||"children",on=C.useMemo(function(){return st?"row":Te.expandable&&dt===Ze&&Te.expandable.__PARENT_RENDER_ICON__||St.some(function(Ht){return Ht&&Object(B.a)(Ht)==="object"&&Ht[ot]})?"nest":!1},[!!st,St]),an=C.useState(function(){return At||(ht?Oe(St,Le,ot):[])}),Vt=Object(p.a)(an,2),Bt=Vt[0],Gt=Vt[1],en=C.useMemo(function(){return new Set(_t||Bt||[])},[_t,Bt]),qt=C.useCallback(function(Ht){var Yt=Le(Ht,St.indexOf(Ht)),mn,Sn=en.has(Yt);Sn?(en.delete(Yt),mn=Object(R.a)(en)):mn=[].concat(Object(R.a)(en),[Yt]),Gt(mn),ut&&ut(!Sn,Ht),ct&&ct(mn)},[Le,en,St,ut,ct]),Mt=C.useState(0),An=Object(p.a)(Mt,2),jn=An[0],hi=An[1],Yn=Object(he.b)(Object(k.a)(Object(k.a)(Object(k.a)({},Te),qe),{},{expandable:!!st,expandedKeys:en,getRowKey:Le,onTriggerExpand:qt,expandIcon:mt,expandIconColumnIndex:It,direction:J}),dt===Ze?rt:null),Pi=Object(p.a)(Yn,2),ni=Pi[0],pn=Pi[1],ii=C.useMemo(function(){return{columns:ni,flattenColumns:pn}},[ni,pn]),fi=C.useRef(),Ti=C.useRef(),Ue=C.useRef(),Fn=C.useState(!1),ri=Object(p.a)(Fn,2),qn=ri[0],Qi=ri[1],Mi=C.useState(!1),xn=Object(p.a)(Mi,2),Xn=xn[0],ai=xn[1],Zi=de(new Map),Si=Object(p.a)(Zi,2),qi=Si[0],Ni=Si[1],Hn=Object(_.a)(pn),pi=Hn.map(function(Ht){return qi.get(Ht)}),ki=C.useMemo(function(){return pi},[pi.join("_")]),mi=D(ki,pn.length,J),Ln=ee&&Object(_.d)(ee.y),Pn=ee&&Object(_.d)(ee.x),kn=Pn&&pn.some(function(Ht){var Yt=Ht.fixed;return Yt}),Ci=C.useRef(),si=Ae(Ot,ke),$n=si.isSticky,Ui=si.offsetHeader,Bi=si.offsetScroll,ji=si.stickyClassName,gi,vi,Wn;Ln&&(vi={overflowY:"scroll",maxHeight:ee.y}),Pn&&(gi={overflowX:"auto"},Ln||(vi={overflowY:"hidden"}),Wn={width:ee.x===!0?"auto":ee.x,minWidth:"100%"});var Jn=C.useCallback(function(Ht,Yt){Ni(function(mn){var Sn=new Map(mn);return Sn.set(Ht,Yt),Sn})},[]),oi=j(null),Qn=Object(p.a)(oi,2),Fi=Qn[0],Hi=Qn[1];function li(Ht,Yt){if(!Yt)return;typeof Yt=="function"?Yt(Ht):Yt.scrollLeft!==Ht&&(Yt.scrollLeft=Ht)}var Zn=function(Yt){var mn=Yt.currentTarget,Sn=Yt.scrollLeft,On=typeof Sn=="number"?Sn:mn.scrollLeft,zi=mn||ze;if(!Hi()||Hi()===zi){var Ii;Fi(zi),li(On,Ti.current),li(On,Ue.current),li(On,(Ii=Ci.current)===null||Ii===void 0?void 0:Ii.setScrollLeft)}if(mn){var Vi=mn.scrollWidth,Yi=mn.clientWidth;Qi(On>0),ai(On<Vi-Yi)}},yi=function(){Ue.current&&Zn({currentTarget:Ue.current})},Wi=function(Yt){var mn=Yt.width;yi(),hi(fi.current?fi.current.offsetWidth:mn)};C.useEffect(function(){return yi},[]),C.useEffect(function(){Pn&&yi()},[Pn]),C.useEffect(function(){dt===Ze&&Dt&&(Dt.body.current=Ue.current)});var wi=at(["table"],"table"),ei=C.useMemo(function(){return Y||(kn?ee.x==="max-content"?"auto":"fixed":Ln||pn.some(function(Ht){var Yt=Ht.ellipsis;return Yt})?"fixed":"auto")},[Ln,kn,pn,Y]),ui,Ai={colWidths:ki,columCount:pn.length,stickyOffsets:mi,onHeaderRow:Ct,fixHeader:Ln},Kn=C.useMemo(function(){return Kt?null:typeof $e=="function"?$e():$e},[Kt,$e]),$i=C.createElement(Ee,{data:St,measureColumnWidth:Ln||Pn||$n,expandedKeys:en,rowExpandable:ft,getRowKey:Le,onRow:Je,emptyNode:Kn,childrenColumnName:ot}),Oi=C.createElement(c,{colWidths:pn.map(function(Ht){var Yt=Ht.width;return Yt}),columns:pn}),er=ye&&C.createElement(U.b,null,ye(St)),Ki=at(["body"]);if(Ln||$n){var Ri;typeof Ki=="function"?(Ri=Ki(St,{scrollbarSize:Pt,ref:Ue,onScroll:Zn}),Ai.colWidths=pn.map(function(Ht,Yt){var mn=Ht.width,Sn=Yt===ni.length-1?mn-Pt:mn;return typeof Sn=="number"&&!Number.isNaN(Sn)?Sn:(Object(g.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ri=C.createElement("div",{style:Object(k.a)(Object(k.a)({},gi),vi),onScroll:Zn,ref:Ue,className:N()("".concat(ke,"-body"))},C.createElement(wi,{style:Object(k.a)(Object(k.a)({},Wn),{},{tableLayout:ei})},Oi,$i,er),$n&&C.createElement(_e,{ref:Ci,offsetScroll:Bi,scrollBodyRef:Ue,onScroll:Zn})),ui=C.createElement(C.Fragment,null,Ne!==!1&&C.createElement(T,Object.assign({noData:!St.length},Ai,ii,{direction:J,offsetHeader:Ui,stickyClassName:ji,ref:Ti,onScroll:Zn})),Ri)}else ui=C.createElement("div",{style:Object(k.a)(Object(k.a)({},gi),vi),className:N()("".concat(ke,"-content")),onScroll:Zn,ref:Ue},C.createElement(wi,{style:Object(k.a)(Object(k.a)({},Wn),{},{tableLayout:ei})},Oi,Ne!==!1&&C.createElement(h,Object.assign({},Ai,ii)),$i,er));var Mn=Object(d.b)(Te),ci=C.createElement("div",Object.assign({className:N()(ke,We,(Ie={},Object(te.a)(Ie,"".concat(ke,"-rtl"),J==="rtl"),Object(te.a)(Ie,"".concat(ke,"-ping-left"),qn),Object(te.a)(Ie,"".concat(ke,"-ping-right"),Xn),Object(te.a)(Ie,"".concat(ke,"-layout-fixed"),Y==="fixed"),Object(te.a)(Ie,"".concat(ke,"-fixed-header"),Ln),Object(te.a)(Ie,"".concat(ke,"-fixed-column"),kn),Object(te.a)(Ie,"".concat(ke,"-scroll-horizontal"),Pn),Object(te.a)(Ie,"".concat(ke,"-has-fix-left"),pn[0]&&pn[0].fixed),Object(te.a)(Ie,"".concat(ke,"-has-fix-right"),pn[pn.length-1]&&pn[pn.length-1].fixed==="right"),Ie)),style:K,id:be,ref:fi},Mn),C.createElement(Ye,{pingLeft:qn,pingRight:Xn,props:Object(k.a)(Object(k.a)({},Te),{},{stickyOffsets:mi,mergedExpandedKeys:en})},ne&&C.createElement(V,{className:"".concat(ke,"-title")},ne(St)),C.createElement("div",{className:"".concat(ke,"-container")},ui),re&&C.createElement(V,{className:"".concat(ke,"-footer")},re(St))));Pn&&(ci=C.createElement(m.a,{onResize:Wi},ci));var Gi=C.useMemo(function(){return{prefixCls:ke,getComponent:at,scrollbarSize:Pt,direction:J,fixedInfoList:pn.map(function(Ht,Yt){return t(Yt,Yt,pn,mi,J)}),isSticky:$n}},[ke,at,Pt,J,pn,mi,J,$n]),tr=C.useMemo(function(){return Object(k.a)(Object(k.a)({},ii),{},{tableLayout:ei,rowClassName:$,expandedRowClassName:Rt,componentWidth:jn,fixHeader:Ln,fixColumn:kn,horizonScroll:Pn,expandIcon:mt,expandableType:on,expandRowByClick:vt,expandedRowRender:st,onTriggerExpand:qt,expandIconColumnIndex:It,indentSize:sn})},[ii,ei,$,Rt,jn,Ln,kn,Pn,mt,on,vt,st,qt,It,sn]),bi=C.useMemo(function(){return{onColumnResize:Jn}},[Jn]);return C.createElement(n.a.Provider,{value:Gi},C.createElement(P.Provider,{value:tr},C.createElement(Z.Provider,{value:bi},ci)))}it.Column=r.a,it.ColumnGroup=a.a,it.Summary=U.a,it.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var tt=oe.b=it},wRmb:function(Be,oe,M){"use strict";M.d(oe,"a",function(){return A});var te=M("rePB"),k=M("KQm4"),R=M("VTBJ"),B=M("Ff2n"),p=M("q1tI"),C=M.n(p),H=M("Kwbf"),N=M("Zm9Q"),e=M("hW8S");function A(r){return Object(N.a)(r).filter(function(o){return p.isValidElement(o)}).map(function(o){var s=o.key,i=o.props,n=i.children,t=Object(B.a)(i,["children"]),_=Object(R.a)({key:s},t);return n&&(_.children=A(n)),_})}function g(r){return r.reduce(function(o,s){var i=s.fixed,n=i===!0?"left":i,t=s.children;return t&&t.length>0?[].concat(Object(k.a)(o),Object(k.a)(g(t).map(function(_){return Object(R.a)({fixed:n},_)}))):[].concat(Object(k.a)(o),[Object(R.a)(Object(R.a)({},s),{},{fixed:n})])},[])}function m(r){for(var o=!0,s=0;s<r.length;s+=1){var i=r[s];if(o&&i.fixed!=="left")o=!1;else if(!o&&i.fixed==="left"){Object(H.a)(!1,"Index ".concat(s-1," of `columns` missing `fixed='left'` prop."));break}}for(var n=!0,t=r.length-1;t>=0;t-=1){var _=r[t];if(n&&_.fixed!=="right")n=!1;else if(!n&&_.fixed==="right"){Object(H.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function u(r){return r.map(function(o){var s=o.fixed,i=Object(B.a)(o,["fixed"]),n=s;return s==="left"?n="right":s==="right"&&(n="left"),Object(R.a)({fixed:n},i)})}function a(r,o){var s=r.prefixCls,i=r.columns,n=r.children,t=r.expandable,_=r.expandedKeys,b=r.getRowKey,v=r.onTriggerExpand,x=r.expandIcon,E=r.rowExpandable,h=r.expandIconColumnIndex,d=r.direction,l=r.expandRowByClick,c=p.useMemo(function(){return i||A(n)},[i,n]),y=p.useMemo(function(){if(t){var I,P=h||0,S=c[P],w=(I={},Object(te.a)(I,e.a,{className:"".concat(s,"-expand-icon-col")}),Object(te.a)(I,"title",""),Object(te.a)(I,"fixed",S?S.fixed:null),Object(te.a)(I,"className","".concat(s,"-row-expand-icon-cell")),Object(te.a)(I,"render",function(G,Z,ue){var ce=b(Z,ue),Re=_.has(ce),Ee=E?E(Z):!0,he=x({prefixCls:s,expanded:Re,expandable:Ee,record:Z,onExpand:v});return l?p.createElement("span",{onClick:function(Pe){return Pe.stopPropagation()}},he):he}),I),F=c.slice();return P>=0&&F.splice(P,0,w),F}return c},[t,c,b,_,x,d]),f=p.useMemo(function(){var I=y;return o&&(I=o(I)),I.length||(I=[{render:function(){return null}}]),I},[o,y,d]),T=p.useMemo(function(){return d==="rtl"?u(g(f)):g(f)},[f,d]);return[f,T]}oe.b=a},wwSX:function(Be,oe,M){Be.exports=M.p+"static/b2.2c844a2a.svg"},xiVL:function(Be,oe){Be.exports="data:image/png;base64,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"},xwll:function(Be,oe,M){Be.exports=M.p+"static/statistic-icon.df5f8e49.png"},"y0+3":function(Be,oe,M){"use strict";M.d(oe,"a",function(){return g}),M.d(oe,"b",function(){return u});var te=/margin|padding|width|height|max|min|offset/,k={left:!0,top:!0},R={cssFloat:1,styleFloat:1,float:1};function B(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function p(a,r,o){if(r=r.toLowerCase(),o==="auto"){if(r==="height")return a.offsetHeight;if(r==="width")return a.offsetWidth}return r in k||(k[r]=te.test(r)),k[r]?parseFloat(o)||0:o}function C(a,r){var o=arguments.length,s=B(a);return r=R[r]?"cssFloat"in a.style?"cssFloat":"styleFloat":r,o===1?s:p(a,r,s[r]||a.style[r])}function H(a,r,o){var s=arguments.length;if(r=R[r]?"cssFloat"in a.style?"cssFloat":"styleFloat":r,s===3)return typeof o=="number"&&te.test(r)&&(o="".concat(o,"px")),a.style[r]=o,o;for(var i in r)r.hasOwnProperty(i)&&H(a,i,r[i]);return B(a)}function N(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function e(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function A(){var a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:r}}function g(){var a=document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:r}}function m(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(a){var r=a.getBoundingClientRect(),o=document.documentElement;return{left:r.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}},y3Jh:function(Be,oe,M){"use strict";M.r(oe);var te=M("5Dmo"),k=M("3S7+"),R=M("fV52"),B=M("3I+P"),p=M("g9YV"),C=M("wCAj"),H=M("Znn+"),N=M("ZTPi"),e=M("5NDa"),A=M("5rEg"),g=M("OaEy"),m=M("2fM7"),u=M("14J3"),a=M("BMrR"),r=M("jCWc"),o=M("kPKH"),s=M("7Kak"),i=M("9yH6"),n=M("lUTK"),t=M("BvKs"),_=M("2qtc"),b=M("kLXV"),v=M("miYZ"),x=M("tsqr"),E=M("k1fw"),h=M("oBTY"),d=M("+L6B"),l=M("2/Rp"),c=M("qVdP"),y=M("jsC+"),f=M("9og8"),T=M("tJVT"),I=M("WmNS"),P=M.n(I),S=M("q1tI"),w=M.n(S),F=M("Ty5D"),L=M("9kvl"),G=M("9Bee"),Z=M("wd/R"),ue=M.n(Z),ce=M("m3rI"),Re=M("ErOA"),Ee=M("5A5F"),he=M.n(Ee),we=M("xKgJ"),Pe=M("zqRK"),de=M.n(Pe),j=M("+92d"),O=M.n(j),D=M("wwSX"),W=M.n(D),V=M("zlzj"),U=M.n(V),le=M("pxMS"),Oe=M.n(le),Me=M("xwll"),ie=M.n(Me),pe=M("a2OE"),_e=M.n(pe),Ae=M("Nf5h"),Ke=M("LvDl"),ze=M.n(Ke),Ze=M("1vsH"),Ye=M("yDOu"),it=M.n(Ye),tt=M("SVaM"),Te=function(ke){var We,$,K,z,X,ee,Y,J,ne,re,ye,be,Ne,Ve,$e,Je,Ct,dt=ke.globalSetting,rt=ke.user,Dt=ke.dispatch,Ot=Object(F.h)(),St={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:(Ot==null||((We=Ot.query)===null||We===void 0)?void 0:We.tab)||"public"},Kt=Object(S.useState)(0),gt=Object(T.a)(Kt,2),Lt=gt[0],Pt=gt[1],bt=Object(S.useState)(0),Qt=Object(T.a)(bt,2),at=Qt[0],Le=Qt[1],qe=Object(S.useState)(0),lt=Object(T.a)(qe,2),_t=lt[0],At=lt[1],ht=Object(S.useState)([]),st=Object(T.a)(ht,2),ut=st[0],ct=st[1],vt=Object(S.useState)([]),ft=Object(T.a)(vt,2),It=ft[0],Rt=ft[1],Zt=Object(S.useState)({}),sn=Object(T.a)(Zt,2),mt=sn[0],ot=sn[1],on=Object(S.useState)(!1),an=Object(T.a)(on,2),Vt=an[0],Bt=an[1],Gt=Object(S.useState)([]),en=Object(T.a)(Gt,2),qt=en[0],Mt=en[1],An=Object(S.useState)(!0),jn=Object(T.a)(An,2),hi=jn[0],Yn=jn[1],Pi=Object(S.useState)(null),ni=Object(T.a)(Pi,2),pn=ni[0],ii=ni[1],fi=Object(S.useState)(St),Ti=Object(T.a)(fi,2),Ue=Ti[0],Fn=Ti[1],ri=Object(S.useRef)(null),qn=Object(S.useRef)(null),Qi=Object(S.useState)([]),Mi=Object(T.a)(Qi,2),xn=Mi[0],Xn=Mi[1],ai=Object(S.useMemo)(function(){return["not_reviewed","under_review","review_finished"].includes(Ue.filter)},[Ue.filter]),Zi=Object(S.useState)(!1),Si=Object(T.a)(Zi,2),qi=Si[0],Ni=Si[1],Hn=Object(S.useState)(!1),pi=Object(T.a)(Hn,2),ki=pi[0],mi=pi[1],Ln=Object(S.useState)(""),Pn=Object(T.a)(Ln,2),kn=Pn[0],Ci=Pn[1],si=Object(S.useState)([]),$n=Object(T.a)(si,2),Ui=$n[0],Bi=$n[1],ji=Object(S.useState)(!1),gi=Object(T.a)(ji,2),vi=gi[0],Wn=gi[1],Jn=Object(S.useState)([]),oi=Object(T.a)(Jn,2),Qn=oi[0],Fi=oi[1],Hi=Object(S.useState)(!1),li=Object(T.a)(Hi,2),Zn=li[0],yi=li[1],Wi=Object(S.useState)(!1),wi=Object(T.a)(Wi,2),ei=wi[0],ui=wi[1],Ai=rt.userInfo.identity==="teacher",Kn=function(){var Fe=Object(f.a)(P.a.mark(function He(Ge,nt,xt){var yt,dn,bn,se,ve;return P.a.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return Ge.persist(),Ge!=null&&(yt=Ge.target)!==null&&yt!==void 0&&(dn=yt.style)!==null&&dn!==void 0&&dn.pointerEvents&&(Ge.target.style.pointerEvents="none"),fe.next=4,Object(Re.a)("/api/practices/".concat(nt.identifier,"/start"),{method:"get"});case 4:if(ve=fe.sent,!((ve==null?void 0:ve.status)===0)){fe.next=10;break}if(!xt){fe.next=9;break}return Object(Ze.S)("/problems/".concat(ve==null?void 0:ve.identifier,"/oj/").concat(nt==null?void 0:nt.identifier,"?tab=3")),fe.abrupt("return");case 9:Object(Ze.S)("/problems/".concat(ve==null?void 0:ve.identifier,"/oj/").concat(nt==null?void 0:nt.identifier));case 10:Ge!=null&&(bn=Ge.target)!==null&&bn!==void 0&&(se=bn.style)!==null&&se!==void 0&&se.pointerEvents&&(Ge.target.style.pointerEvents="auto");case 11:case"end":return fe.stop()}},He)}));return function(Ge,nt,xt){return Fe.apply(this,arguments)}}();Object(S.useEffect)(function(){var Fe=ue()().add(0,"days").unix(),He=localStorage.getItem("problemsclose");if(!He){Wn(!0);return}Fe>parseInt(He)&&Wn(!0)},[]);var $i=["\u672A\u53D1\u5E03","\u5DF2\u516C\u5F00","\u672A\u5BA1\u6838","\u5BA1\u6838\u4E2D","\u672A\u516C\u5F00","\u672A\u901A\u8FC7"],Oi=[{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,render:function(He,Ge){return w.a.createElement("div",{className:he.a.titleWarp},(Ue==null?void 0:Ue.filter)==="mine"?w.a.createElement("span",{className:he.a.tag},$i[Ge.practice_status]):null,w.a.createElement("span",{title:He,className:he.a.hov,onClick:function(xt){return Kn(xt,Ge)}},He))}},(Ue==null?void 0:Ue.filter)==="public"?{title:"\u9898\u89E3",dataIndex:"solution_count",width:100,sorter:!0,render:function(He,Ge){return w.a.createElement("span",{style:{display:"flex"}},w.a.createElement("span",{onClick:function(xt){return Kn(xt,Ge,!0)},className:"current"},He),(Ge==null?void 0:Ge.has_video_solution)&&w.a.createElement("img",{className:"ml5",src:de.a}))}}:null,(Ue==null?void 0:Ue.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(He){return w.a.createElement(w.a.Fragment,null,He===1&&w.a.createElement("span",{className:he.a["btn-style-1"]},"\u7B80\u5355"),He===2&&w.a.createElement("span",{className:he.a["btn-style-2"]},"\u9002\u4E2D"),He===3&&w.a.createElement("span",{className:he.a["btn-style-3"]},"\u56F0\u96BE"))}},(Ue==null?void 0:Ue.filter)==="public"?{title:"\u4EBA\u6570",dataIndex:"user_count",align:"center",sorter:!0,width:80}:null,(Ue==null?void 0:Ue.filter)==="public"?{title:"\u72B6\u6001",dataIndex:"status",width:90,render:function(He,Ge){return Object(we.p)()?w.a.createElement(w.a.Fragment,null,pn===(Ge==null?void 0:Ge.identifier)?w.a.createElement("span",{className:he.a.hovBtn,onClick:function(xt){return Kn(xt,Ge)}},"\u5F00\u542F\u5237\u9898"):w.a.createElement(w.a.Fragment,null,He===0&&w.a.createElement("span",{className:he.a.statusText},"\u672A\u5F00\u542F"),He===1&&w.a.createElement("span",{className:he.a.statusText},"\u8FDB\u884C\u4E2D"),He===2&&w.a.createElement("span",{className:he.a.statusText},"\u5DF2\u901A\u8FC7"))):"-"}}:null,(Ue==null?void 0:Ue.filter)!=="public"?{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_disciplines_name",ellipsis:!0,width:200,render:function(He){return w.a.createElement("span",null,He==null?void 0:He.join("\u3001"))}}:null,(Ue==null?void 0:Ue.filter)==="all"?{title:"\u521B\u5EFA\u8005",dataIndex:"creator",ellipsis:!0,width:100}:null,(Ue==null?void 0:Ue.filter)!=="public"?{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updated_at",sorter:!0,width:180}:null,Object(we.w)()?{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"right",width:80,render:function(He,Ge){return w.a.createElement(y.a,{className:"ml10",overlay:Ii(Ge==null?void 0:Ge.identifier,Ge)},w.a.createElement("span",{style:{cursor:"default"},onClick:function(xt){return xt.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"})))}}:Vt&&(Ue==null?void 0:Ue.filter)!=="public"?{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"right",width:80,render:function(He,Ge){return Ge!=null&&Ge.is_self&&(Ge==null?void 0:Ge.practice_status)!==1?w.a.createElement(y.a,{className:"ml10",overlay:Vi(Ge==null?void 0:Ge.identifier,Ge)},w.a.createElement("span",{style:{cursor:"default"},onClick:function(xt){return xt.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(Fe){return!!Fe}),er=[{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,render:function(He,Ge){return w.a.createElement("span",{className:he.a.hov,onClick:function(xt){return Kn(xt,Ge)}},He)}},{title:"\u96BE\u5EA6",dataIndex:"difficulty",sorter:!0,align:"left",width:90,render:function(He){return w.a.createElement(w.a.Fragment,null,He===1&&w.a.createElement("span",{className:he.a["btn-style-1"]},"\u7B80\u5355"),He===2&&w.a.createElement("span",{className:he.a["btn-style-2"]},"\u9002\u4E2D"),He===3&&w.a.createElement("span",{className:he.a["btn-style-3"]},"\u56F0\u96BE"))}},(Ue==null?void 0:Ue.filter)==="not_reviewed"?{title:"\u521B\u5EFA\u8005",dataIndex:"creator",ellipsis:!0,width:100}:{title:"\u5BA1\u6838\u8005",dataIndex:"reviewer",ellipsis:!0,width:100},(Ue==null?void 0:Ue.filter)==="not_reviewed"?{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"submit_time",width:180}:null,(Ue==null?void 0:Ue.filter)==="under_review"?{title:"\u5F00\u59CB\u5BA1\u6838\u65F6\u95F4",dataIndex:"start_review_time",width:180}:null,(Ue==null?void 0:Ue.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(He,Ge){var nt;switch(Ue==null?void 0:Ue.filter){case"under_review":nt=w.a.createElement("div",{style:{display:"flex"}},w.a.createElement(l.a,{type:"link",size:"small",onClick:function(yt){return Kn(yt,Ge)}},"\u5BA1\u6838"),w.a.createElement(l.a,{type:"link",style:{color:"#666"},size:"small",onClick:function(yt){return ci({e:yt,record:Ge,op:"release"})}},"\u79FB\u51FA"));break;case"review_finished":nt=w.a.createElement(l.a,{type:"link",size:"small",onClick:function(yt){Ni(!0),Ki(Ge)}},"\u5BA1\u6838\u8BB0\u5F55");break;default:nt=w.a.createElement(l.a,{type:"link",block:!0,onClick:function(yt){return ci({e:yt,record:Ge,op:"claim"})}},"\u5F00\u59CB\u5BA1\u6838");break}return nt}}].filter(function(Fe){return!!Fe}),Ki=function(){var Fe=Object(f.a)(P.a.mark(function He(Ge){var nt;return P.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return Bi([]),yt.next=3,Object(Re.a)("/api/practices/".concat(Ge.identifier,"/review_list"),{method:"get"});case 3:nt=yt.sent,Bi(nt==null?void 0:nt.reviews_list);case 5:case"end":return yt.stop()}},He)}));return function(Ge){return Fe.apply(this,arguments)}}(),Ri=[{title:"\u5BA1\u6838\u65F6\u95F4",dataIndex:"review_time",key:"review_time",render:function(He,Ge){return w.a.createElement("span",null,ue()(He).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(He,Ge){return He==="5"||He===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(){Ci(Ge.description),mi(!0)}},"\u67E5\u770B\u539F\u56E0")):w.a.createElement("span",null,"\u5DF2\u901A\u8FC7")}}];Object(S.useEffect)(function(){tr(),Mn(Ue)},[]),Object(S.useEffect)(function(){if(ut.length!==0){var Fe;(ri==null||((Fe=ri.current)===null||Fe===void 0)?void 0:Fe.clientHeight)>98&&Pt(1)}},[ut]),Object(S.useEffect)(function(){if(It.length!==0){var Fe;(qn==null||((Fe=qn.current)===null||Fe===void 0)?void 0:Fe.clientHeight)>98&&Le(1)}},[It]),Object(S.useEffect)(function(){return Dt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Dt({type:"globalSetting/setShowQuestionBackTop",payload:!0}),function(){Dt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Dt({type:"globalSetting/setShowQuestionBackTop",payload:!1})}},[]),Object(S.useEffect)(function(){var Fe;(document.title==="\u4EBA\u5DE5\u667A\u80FD\u79D1\u7814\u670D\u52A1\u5E73\u53F0"||document.title==="\u9996\u9875"||document.title==="\u5B9E\u8DF5\u6559\u5B66\u5E73\u53F0"||(Fe=document.title)!==null&&Fe!==void 0&&Fe.includes("img"))&&(document.title="\u5728\u7EBF\u5237\u9898")},[dt]),Object(S.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]);var Mn=function(){var Fe=Object(f.a)(P.a.mark(function He(Ge){var nt,xt,yt,dn;return P.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return Ge.search=encodeURIComponent(Ge.search),yt=ze.a.cloneDeep(Ge),yt.tag_discipline_id=(nt=yt.tag_discipline_id)!==null&&nt!==void 0&&nt.includes(-1)?[]:yt.tag_discipline_id,yt.source_discipline_id=(xt=yt.source_discipline_id)!==null&&xt!==void 0&&xt.includes(-1)?[]:yt.source_discipline_id,console.log(yt,"sendData"),Yn(!0),Mt([]),se.next=9,Object(Re.a)("/api/practices.json",{method:"get",params:yt});case 9:dn=se.sent,Xn([]),Yn(!1),At(dn==null?void 0:dn.practices_count),Mt(dn==null?void 0:dn.practices_list),Fi((dn==null?void 0:dn.recommend_subjects)||[]);case 15:case"end":return se.stop()}},He)}));return function(Ge){return Fe.apply(this,arguments)}}(),ci=function(){var Fe=Object(f.a)(P.a.mark(function He(Ge){var nt,xt,yt,dn,bn,se;return P.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return nt=Ge.op,xt=Ge.description,yt=Ge.record,dn=Ge.e,bn={op:nt,description:xt},Yn(!0),Se.next=5,Object(Re.a)("/api/practices/".concat(yt.identifier,"/review"),{method:"post",body:bn});case 5:se=Se.sent,Yn(!1),nt==="claim"&&(se.status===0||se.status==="0")&&Kn(dn,yt),Mn(Ue);case 9:case"end":return Se.stop()}},He)}));return function(Ge){return Fe.apply(this,arguments)}}(),Gi=function(){var Fe=Object(f.a)(P.a.mark(function He(Ge){var nt;return P.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return Yn(!0),yt.next=3,Object(Re.a)("/api/practices/".concat(Ge.identifier,"/publish"),{method:"post"});case 3:nt=yt.sent,Yn(!1),Mn(Ue);case 6:case"end":return yt.stop()}},He)}));return function(Ge){return Fe.apply(this,arguments)}}(),tr=function(){var Fe=Object(f.a)(P.a.mark(function He(){var Ge,nt,xt,yt,dn,bn;return P.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ve.next=2,Object(Re.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:return nt=ve.sent,ve.next=5,Object(Re.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source",position:"index"}});case 5:return xt=ve.sent,ve.next=8,Object(Re.a)("/api/mypractices/rank_list",{method:"get",params:{}});case 8:yt=ve.sent,nt!=null&&nt.tag_disciplines&&(dn=[{id:-1,name:"\u5168\u90E8",count:nt==null?void 0:nt.totalCount}].concat(Object(h.a)(nt==null?void 0:nt.tag_disciplines)),ct(dn)),xt!=null&&xt.tag_disciplines&&(bn=[{id:-1,name:"\u5168\u90E8",count:xt==null?void 0:xt.totalCount}].concat(Object(h.a)(xt==null?void 0:xt.tag_disciplines)),Rt(bn)),ot(yt||{}),Bt(yt==null||((Ge=yt.my_record)===null||Ge===void 0)?void 0:Ge.outsource);case 13:case"end":return ve.stop()}},He)}));return function(){return Fe.apply(this,arguments)}}(),bi=function(He,Ge){var nt;Ue.page=1;var xt=Ue["".concat(Ge,"_discipline_id")];(nt=Ue["".concat(Ge,"_discipline_id")])!==null&&nt!==void 0&&nt.includes(He)?xt=xt.filter(function(yt){return yt!==He}):xt.push(He),He===-1?xt=[-1]:(xt=xt.filter(function(yt){return yt!==-1}),xt.length||(xt=[-1])),Ue["".concat(Ge,"_discipline_id")]=xt,Fn(Object(E.a)({},Ue)),Mn(Ue)},Ht=function(He,Ge){Ue.page=1,Ue[Ge]=typeof He=="number"?He:null,Fn(Object(E.a)({},Ue)),Mn(Ue)},Yt=function(He){Ue.page=1,Ue.save_search=He,Fn(Object(E.a)({},Ue))},mn=function(He,Ge,nt){Ue.page=He==null?void 0:He.current,Ue.per_page=He==null?void 0:He.pageSize,nt!=null&&nt.order?(Ue.sort_by=nt==null?void 0:nt.field,Ue.sort_direction=(nt==null?void 0:nt.order)==="ascend"?"asc":"desc"):(Ue.sort_by=null,Ue.sort_direction=null),Fn(Object(E.a)({},Ue)),Mn(Ue)},Sn=function(He){Ue.page=1,Ue.filter=He,Ue.status=null,Ue.practice_status=null,Fn(Object(E.a)({},Ue)),Mn(Ue)},On=function(He,Ge){if((Ge==null?void 0:Ge.length)===0){x.b.warn("\u8BF7\u9009\u62E9\u8BD5\u9898");return}var nt=function(){var xt=Object(f.a)(P.a.mark(function yt(){var dn,bn;return P.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ve.next=2,Object(Re.a)("/api/practices/batch_op.json",{method:"post",body:{identifier:Ge,op:He}});case 2:dn=ve.sent,(dn==null?void 0:dn.status)===0&&(bn=qt.length===1&&Ue.page!==1?Ue.page-1:Ue.page,Ue.page=bn,Fn(Object(E.a)({},Ue)),Mn(Ue));case 4:case"end":return ve.stop()}},yt)}));return function(){return xt.apply(this,arguments)}}();if(He===-1){b.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:nt});return}nt()},zi=w.a.createElement(t.a,null,(Ue==null?void 0:Ue.filter)==="public"?w.a.createElement(t.a.Item,{onClick:function(){return On(0,xn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171"):[w.a.createElement(t.a.Item,{key:2,onClick:function(){return On(1,xn)}},"\u6279\u91CF\u79FB\u5165\u516C\u5171"),w.a.createElement(t.a.Item,{key:1,onClick:function(){return On(0,xn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171")],Object(we.w)()&&w.a.createElement(t.a.Item,{onClick:function(){return nr()}},"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93"),(Ue==null?void 0:Ue.filter)!=="public"&&w.a.createElement(t.a.Item,{onClick:function(){return On(-1,xn)}},"\u6279\u91CF\u5220\u9664")),Ii=function(He,Ge){return w.a.createElement(t.a,null,(Ge==null?void 0:Ge.practice_status)===1?w.a.createElement(t.a.Item,{onClick:function(){return On(0,[He])}},"\u79FB\u51FA\u516C\u5171"):w.a.createElement(t.a.Item,{onClick:function(){return On(1,[He])}},"\u79FB\u5165\u516C\u5171"),(Ue==null?void 0:Ue.filter)==="mine"?w.a.createElement(t.a.Item,{onClick:function(){return Gi(Ge)},disabled:![0,4,5].includes(Ge.practice_status)},[0,4,5].includes(Ge.practice_status)?"\u53D1\u5E03\u5BA1\u6838":"\u5DF2\u53D1\u5E03\u5BA1\u6838"):null,w.a.createElement(t.a.Item,{onClick:function(){return Object(Ze.S)("/problems/".concat(He,"/ojedit"))}},"\u7F16\u8F91"),(Ue==null?void 0:Ue.filter)!=="public"&&w.a.createElement(t.a.Item,{onClick:function(){return On(-1,[He])}},"\u5220\u9664"))},Vi=function(He,Ge){return w.a.createElement(t.a,null,w.a.createElement(t.a.Item,{onClick:function(){return Gi(Ge)},disabled:![0,4,5].includes(Ge.practice_status)},[0,4,5].includes(Ge.practice_status)?"\u53D1\u5E03\u5BA1\u6838":"\u5DF2\u53D1\u5E03\u5BA1\u6838"),w.a.createElement(t.a.Item,{onClick:function(){return Object(Ze.S)("/problems/".concat(He,"/ojedit"))}},"\u7F16\u8F91"),w.a.createElement(t.a.Item,{onClick:function(){return On(-1,[He])}},"\u5220\u9664"))},Yi=function(He){Xn(He)},nr=function(){if(!xn.length){x.b.warn("\u8BF7\u9009\u62E9\u53D1\u9001\u81F3\u8BD5\u9898\u5E93\u7684\u7F16\u7A0B\u5237\u9898");return}var He=null;b.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"},xn.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(i.a.Group,{onChange:function(nt){He=nt.target.value,document.getElementById("send-to-modal").style.display="none"}},w.a.createElement(i.a,{value:"c"},"C"),w.a.createElement(i.a,{value:"c++"},"C++"),w.a.createElement(i.a,{value:"java"},"Java"),w.a.createElement(i.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 Ge=Object(f.a)(P.a.mark(function xt(){var yt;return P.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:if(He){bn.next=3;break}return document.getElementById("send-to-modal").style.display="block",bn.abrupt("return",Promise.reject());case 3:return bn.next=5,Object(Re.a)("/api/practices/send_to_item_bank.json",{method:"post",body:{identifiers:xn,language:He}});case 5:yt=bn.sent,(yt==null?void 0:yt.status)===0&&x.b.success("\u53D1\u9001\u6210\u529F");case 7:case"end":return bn.stop()}},xt)}));function nt(){return Ge.apply(this,arguments)}return nt}()})},dr={selectedRowKeys:xn,columnWidth:40,onChange:Yi};return w.a.createElement("section",{className:he.a.wrap},w.a.createElement(Ae.a,{img:Oe.a,title:"\u7F16\u7A0B\u5237\u9898",sunTitle:"\u5FEB\u901F\u63D0\u9AD8\u7F16\u7A0B\u80FD\u529B",bannerExtraContent:w.a.createElement(y.a,{overlay:w.a.createElement(t.a,null,w.a.createElement(t.a.Item,{key:1,onClick:function(){L.d.push("/problems/add")}},"\u65B0\u5EFA\u9898\u76EE"),w.a.createElement(t.a.Item,{key:2,onClick:function(){L.d.push("/problems/batchAdd")}},"\u6279\u91CF\u5BFC\u5165\u9898\u76EE"))},w.a.createElement("div",{className:he.a.addQuestion,style:{visibility:Object(we.w)()||Vt?"visible":"hidden"}},w.a.createElement("span",null,"\u65B0\u5EFA\u9898\u76EE")))}),w.a.createElement("div",{className:he.a.content},w.a.createElement("div",{className:he.a.left},w.a.createElement(a.a,{className:"".concat(he.a.filterPoint," mb10"),align:"top"},w.a.createElement(o.a,{className:he.a.filterType},"\u77E5\u8BC6\u70B9"),w.a.createElement(o.a,{className:he.a.btnWarp,ref:ri,style:Lt>0?{height:Lt===1?76:"auto"}:{}},ut==null?void 0:ut.map(function(Fe){var He;return w.a.createElement("div",{onClick:function(){return bi(Fe.id,"tag")},key:Fe.id,className:Ue!=null&&(He=Ue.tag_discipline_id)!==null&&He!==void 0&&He.includes(Fe.id)?"".concat(he.a.btn," ").concat(he.a.btnActive):he.a.btn},w.a.createElement("span",{title:Fe.name},Fe.name),w.a.createElement("span",{className:he.a.count,style:{display:Fe.count?"block":"none"}},Fe.count))})),!!Lt&&w.a.createElement(o.a,{className:he.a.fold},Lt===1?w.a.createElement("div",{onClick:function(){return Pt(2)},className:he.a.action},"\u5C55\u5F00",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):w.a.createElement("div",{onClick:function(){return Pt(1)},className:he.a.action},"\u6536\u8D77",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"})))),!!It.length&&w.a.createElement(a.a,{className:he.a.filterPoint,align:"top",style:{marginBottom:22}},w.a.createElement(o.a,{className:he.a.filterType},"\u6765\u6E90"),w.a.createElement(o.a,{className:he.a.btnWarp,ref:qn,style:at>0?{height:at===1?76:"auto"}:{}},It==null?void 0:It.map(function(Fe){var He;return w.a.createElement("div",{onClick:function(){return bi(Fe.id,"source")},key:Fe.id,className:Ue!=null&&(He=Ue.source_discipline_id)!==null&&He!==void 0&&He.includes(Fe.id)?"".concat(he.a.btn," ").concat(he.a.btnActive):he.a.btn},w.a.createElement("span",{title:Fe.name},Fe.name),w.a.createElement("span",{className:he.a.count},Fe.count))}),!!at&&w.a.createElement(o.a,{className:he.a.fold},at===1?w.a.createElement("div",{onClick:function(){return Le(2)},className:he.a.action},"\u5C55\u5F00",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):w.a.createElement("div",{onClick:function(){return Le(1)},className:he.a.action},"\u6536\u8D77",w.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"}))))),w.a.createElement("div",{className:he.a.control},w.a.createElement(m.a,{suffixIcon:w.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u96BE\u5EA6",value:Ue==null?void 0:Ue.difficulty,onChange:function(He){return Ht(He,"difficulty")}},w.a.createElement(m.a.Option,{value:1},"\u7B80\u5355"),w.a.createElement(m.a.Option,{value:2},"\u9002\u4E2D"),w.a.createElement(m.a.Option,{value:3},"\u56F0\u96BE")),Object(we.p)()&&Ue.filter==="public"&&w.a.createElement(m.a,{suffixIcon:w.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:Ue==null?void 0:Ue.status,onChange:function(He){return Ht(He,"status")}},w.a.createElement(m.a.Option,{value:0},"\u672A\u5F00\u542F"),w.a.createElement(m.a.Option,{value:1},"\u8FDB\u884C\u4E2D"),w.a.createElement(m.a.Option,{value:2},"\u5DF2\u901A\u8FC7")),Object(we.p)()&&Ue.filter==="mine"&&w.a.createElement(m.a,{suffixIcon:w.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:Ue==null?void 0:Ue.practice_status,onChange:function(He){return Ht(He,"practice_status")}},w.a.createElement(m.a.Option,{value:0},"\u672A\u53D1\u5E03"),w.a.createElement(m.a.Option,{value:1},"\u5DF2\u516C\u5F00"),w.a.createElement(m.a.Option,{value:2},"\u672A\u5BA1\u6838"),w.a.createElement(m.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),w.a.createElement(m.a.Option,{value:4},"\u672A\u516C\u5F00"),w.a.createElement(m.a.Option,{value:5},"\u672A\u901A\u8FC7")),Object(we.p)()&&Ue.filter==="all"&&w.a.createElement(m.a,{suffixIcon:w.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:Ue==null?void 0:Ue.practice_status,onChange:function(He){return Ht(He,"practice_status")}},w.a.createElement(m.a.Option,{value:0},"\u672A\u53D1\u5E03"),w.a.createElement(m.a.Option,{value:1},"\u5DF2\u516C\u5F00"),w.a.createElement(m.a.Option,{value:2},"\u672A\u5BA1\u6838"),w.a.createElement(m.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),w.a.createElement(m.a.Option,{value:4},"\u672A\u516C\u5F00"),w.a.createElement(m.a.Option,{value:5},"\u672A\u901A\u8FC7")),w.a.createElement(A.a.Search,{className:he.a.search,size:"large",suffix:w.a.createElement("i",{className:"iconfont icon-sousuo9 font14 ".concat(he.a.searchIcon),onClick:function(){Ue.page=1,Ue.search=Ue.save_search,Fn(Object(E.a)({},Ue)),Ue.save_search&&Object(tt.a)({name:Ue.save_search,copywriting:Ue.save_search,position:"Practice"}),Mn(Ue)}}),placeholder:Object(we.w)()?"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u3001\u521B\u5EFA\u8005\u641C\u7D22":"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",value:Ue==null?void 0:Ue.save_search,onChange:function(He){return Yt(He.target.value)},onSearch:function(He){Ue.page=1,Ue.search=Ue.save_search,Fn(Object(E.a)({},Ue)),He&&Object(tt.a)({name:He,copywriting:He,position:"Practice"}),Mn(Ue)}})),w.a.createElement("div",{className:he.a.table},w.a.createElement("div",{className:he.a.tabWarp,style:Object(we.w)()||Vt?{}:{height:10,border:0}},Object(we.w)()?w.a.createElement(N.a,{className:he.a.tab,activeKey:ai?"not_reviewed":Ue.filter,onChange:Sn,tabBarExtraContent:!ai&&w.a.createElement(y.a,{overlay:zi},w.a.createElement("span",{className:"ant-dropdown-link font14 current",onClick:function(He){return He.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(N.a.TabPane,{tab:"\u516C\u5171",key:"public"}),w.a.createElement(N.a.TabPane,{tab:"\u5168\u90E8",key:"all"}),w.a.createElement(N.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),w.a.createElement(N.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):Vt?w.a.createElement(N.a,{className:he.a.tab,activeKey:ai?"not_reviewed":Ue.filter,onChange:Sn},w.a.createElement(N.a.TabPane,{tab:"\u516C\u5171",key:"public"}),w.a.createElement(N.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),w.a.createElement(N.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):null),ai?w.a.createElement("div",{className:he.a.tabWarp,style:Object(we.w)()||Vt?{}:{height:10,border:0}},w.a.createElement(N.a,{className:he.a.tab,activeKey:Ue.filter,onChange:Sn},w.a.createElement(N.a.TabPane,{tab:"\u5F85\u5BA1\u6838",key:"not_reviewed"}),w.a.createElement(N.a.TabPane,{tab:"\u5BA1\u6838\u4E2D",key:"under_review"}),w.a.createElement(N.a.TabPane,{tab:"\u5DF2\u5BA1\u6838",key:"review_finished"}))):null,!(Object(we.w)()||Vt)&&Ai&&w.a.createElement("div",{className:he.a.tabWarp2,style:{justifyContent:"end"}},Zn?w.a.createElement(a.a,{align:"middle"},w.a.createElement(a.a,{onClick:function(){return ui(!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"},xn.length),"\u4E2A")),w.a.createElement(l.a,{className:"mr20 ml40",ghost:!0,onClick:function(){yi(!1),Xn([])},type:"primary"},"\u53D6\u6D88"),w.a.createElement(l.a,{onClick:nr,ghost:!0,type:"primary"},"\u786E\u8BA4\u53D1\u9001")):w.a.createElement(l.a,{onClick:function(){return yi(!0)},type:"primary"},w.a.createElement("i",{className:"iconfont icon-fasong mr5"}),"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93")),w.a.createElement(C.a,{rowSelection:Object(we.w)()||Zn?dr:void 0,className:he.a.customTable,dataSource:qt,bordered:!1,rowKey:function(He){return He.identifier},columns:ai?er:Oi,rowClassName:he.a.row,loading:hi,onRow:function(He){return{onMouseEnter:function(nt){ii(He==null?void 0:He.identifier)},onMouseLeave:function(nt){ii(null)}}},onChange:mn,pagination:{pageSize:Ue.per_page,total:_t,current:Ue.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,position:["bottomCenter"],showTotal:function(He){return w.a.createElement("span",{className:"mr10"},"\u5171",w.a.createElement("span",{className:"c-orange"},He),"\u6761\u6570\u636E")}}}))),w.a.createElement("div",{className:he.a.right},w.a.createElement("div",{className:he.a.statistics},w.a.createElement("img",{src:ie.a,alt:""}),w.a.createElement("div",{className:he.a.title},"\u6211\u7684\u5237\u9898\u7EDF\u8BA1"),w.a.createElement(a.a,{justify:"space-between"},w.a.createElement(o.a,{className:he.a.statisticItem},w.a.createElement("div",{className:he.a.rate},Object(we.p)()?(mt==null||(($=mt.my_record)===null||$===void 0)?void 0:$.passed_ratio)||0:"-"),w.a.createElement("div",{className:he.a.dataName},"\u901A\u8FC7\u7387(%)")),w.a.createElement(o.a,{className:he.a.statisticItem},w.a.createElement("div",{className:he.a.rate},Object(we.p)()?(mt==null||((K=mt.my_record)===null||K===void 0)?void 0:K.passed_count)||0:"-"),w.a.createElement("div",{className:he.a.dataName},"\u5237\u9898\u6570")),w.a.createElement(o.a,{className:he.a.statisticItem},w.a.createElement("div",{className:he.a.rate},Object(we.p)()?mt==null||((z=mt.my_record)===null||z===void 0||((X=z.time_count)===null||X===void 0))?void 0:X.toFixed(2):"-"),w.a.createElement("div",{className:he.a.dataName},"\u7D2F\u8BA1\u65F6\u957F(h)")))),!!(mt!=null&&(ee=mt.rank_list)!==null&&ee!==void 0&&ee.length)&&w.a.createElement(w.a.Fragment,null,((Y=rt.userInfo)===null||Y===void 0?void 0:Y.user_id)!=2&&Object(we.m)()&&(dt==null||((J=dt.setting)===null||J===void 0)?void 0:J.main_site)&&vi&&(Qn==null?void 0:Qn.length)>0&&w.a.createElement("div",{className:he.a.problemsclose,style:{position:"relative"}},w.a.createElement(B.a,{autoplay:!0,pauseOnDotsHover:!0,style:{width:292,height:170,marginBottom:"10px",overflow:"hidden"}},Qn==null?void 0:Qn.map(function(Fe,He){return w.a.createElement("div",{style:{display:"flex"},key:He},w.a.createElement("a",{href:"/paths/".concat(Fe.identifier)},w.a.createElement("img",{style:{width:"292px",height:"170px",borderRadius:"4px"},src:ce.a.IMG_SERVER+"/"+Fe.image_url})))})),w.a.createElement("img",{className:he.a.imgsrc,onClick:function(){localStorage.setItem("problemsclose",ue()().add(1,"days").unix()+""),Wn(!1)},src:it.a})),w.a.createElement("div",{className:he.a.sort},w.a.createElement("div",{className:he.a.rankHeader},w.a.createElement("img",{src:_e.a,className:he.a.rankIcon})),!!(mt!=null&&(ne=mt.my_record)!==null&&ne!==void 0&&ne.rank)&&w.a.createElement("div",{className:"".concat(he.a.myRecord," ").concat(he.a.li)},w.a.createElement("span",{className:"".concat(he.a.recordPrefix," ").concat(he.a.mine)},"\u6211\u7684"),w.a.createElement("img",{className:he.a.avatar,src:ce.a.IMG_SERVER+"/images/"+(mt==null||((re=mt.my_record)===null||re===void 0)?void 0:re.image_url)}),w.a.createElement("span",{title:mt==null||((ye=mt.my_record)===null||ye===void 0)?void 0:ye.nickname,className:he.a.nickname},mt==null||((be=mt.my_record)===null||be===void 0)?void 0:be.nickname),w.a.createElement("span",{className:he.a.myRank},(mt==null||((Ne=mt.my_record)===null||Ne===void 0)?void 0:Ne.rank)>999?"\u7B2C999+\u540D":"\u7B2C".concat(mt==null||((Ve=mt.my_record)===null||Ve===void 0)?void 0:Ve.rank,"\u540D")),w.a.createElement("span",{className:he.a.questionNumber},mt==null||(($e=mt.my_record)===null||$e===void 0)?void 0:$e.passed_count,"\u9898")),mt==null||((Je=mt.rank_list)===null||Je===void 0)?void 0:Je.map(function(Fe,He){var Ge=He+1;return He===0&&(Ge=O.a),He===1&&(Ge=W.a),He===2&&(Ge=U.a),w.a.createElement("div",{className:he.a.li,key:He},typeof Ge=="number"?w.a.createElement("span",{className:he.a.recordPrefix},Ge):w.a.createElement("span",{className:he.a.recordPrefix},w.a.createElement("img",{src:Ge})),w.a.createElement("img",{className:he.a.avatar,src:ce.a.IMG_SERVER+"/images/"+(Fe==null?void 0:Fe.image_url)}),w.a.createElement("span",{title:Fe==null?void 0:Fe.nickname,className:he.a.nickname},Fe==null?void 0:Fe.nickname),w.a.createElement("span",{className:he.a.questionNumber},Fe.passed_count,"\u9898"))}))))),w.a.createElement(b.a,{title:"\u5BA1\u6838\u8BB0\u5F55",visible:qi,onOk:function(){},onCancel:function(){Ni(!1)},footer:null,closable:!0},w.a.createElement(C.a,{dataSource:Ui,columns:Ri})),w.a.createElement(b.a,{title:"\u672A\u901A\u8FC7\u539F\u56E0",visible:ki,onOk:function(){},onCancel:function(){mi(!1)},footer:null,closable:!0},w.a.createElement(G.a,{value:kn})),w.a.createElement(b.a,{visible:ei,centered:!0,width:1e3,okText:"\u786E\u5B9A\u53D1\u9001",onCancel:function(){return ui(!1)},cancelText:"\u8FD4\u56DE\u5217\u8868",onOk:Object(f.a)(P.a.mark(function Fe(){return P.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:ui(!1),nr();case 2:case"end":return Ge.stop()}},Fe)})),title:"\u67E5\u770B\u5DF2\u9009"},w.a.createElement("div",{className:"font14 c-light-primary mb10"},"\u5DF2\u9009",xn==null?void 0:xn.length,"\u4E2A"),w.a.createElement("div",{style:{height:400,overflow:"auto"}},qt==null||((Ct=qt.filter(function(Fe){return xn.includes(Fe.identifier)}))===null||Ct===void 0)?void 0:Ct.map(function(Fe,He){var Ge,nt;return w.a.createElement("div",{key:He,className:he.a.sendModal},w.a.createElement("div",{className:he.a.li},w.a.createElement("p",null,Fe==null?void 0:Fe.name),w.a.createElement("div",{className:he.a.bottom},w.a.createElement("span",{className:"c-grey-333"},"\u7F16\u7A0B\u9898"),w.a.createElement("i",{className:he.a.line}),w.a.createElement("span",{className:"c-grey-333"},Fe.difficulty===1&&"\u7B80\u5355",Fe.difficulty===2&&"\u9002\u4E2D",Fe.difficulty===3&&"\u56F0\u96BE"),w.a.createElement("i",{className:he.a.line}),w.a.createElement("span",null,"\u521B\u5EFA\u8005\xA0",w.a.createElement(k.a,{title:Fe==null?void 0:Fe.creator},w.a.createElement("span",{className:"c-grey-333"},(Fe==null||((Ge=Fe.creator)===null||Ge===void 0)?void 0:Ge.length)>6?(Fe==null||((nt=Fe.creator)===null||nt===void 0)?void 0:nt.substr(0,3))+"...":Fe==null?void 0:Fe.creator))),w.a.createElement("i",{className:he.a.line}),w.a.createElement("span",{className:he.a.des},"\u66F4\u65B0\xA0",w.a.createElement("span",{className:"c-grey-333"},Fe==null?void 0:Fe.updated_at)))),w.a.createElement("div",{className:he.a.del,onClick:function(){Xn(xn.filter(function(yt){return yt!==Fe.identifier}))}},"\u5220\u9664"))}))))};oe.default=Object(L.a)(function(Ie){var ke=Ie.user,We=Ie.globalSetting;return{user:ke,globalSetting:We}})(Te)},yDOu:function(Be,oe){Be.exports="data:image/png;base64,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"},z4EP:function(Be,oe){Be.exports="data:image/png;base64,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"},zlzj:function(Be,oe,M){Be.exports=M.p+"static/b3.30079151.svg"},zqRK:function(Be,oe,M){Be.exports=M.p+"static/v.7a1274ca.svg"}}]);
|