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

488 lines
1.2 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[199,5,7,8,17],{"+M/w":function(It,At,re){It.exports={flexRow:"flexRow___1Kwk7",flexColumn:"flexColumn___1x58l",action:"action___osaCD",setScore:"setScore___kmMlR",delete:"delete___XpFlx",content:"content___9Naj3",titleWrap:"titleWrap___32PZL",titleNumber:"titleNumber___3HPb0",score:"score___3zGYh",titleHtml:"titleHtml___2vgPo",answerWrap:"answerWrap___2vM8f",answer:"answer___1Q0Tc",answerText:"answerText___5UVSF"}},"+ua5":function(It,At,re){},"3pxb":function(It,At,re){It.exports=re.p+"static/refresh.c0b88523.png"},"49sm":function(It,At){var re={}.toString;It.exports=Array.isArray||function(ve){return re.call(ve)=="[object Array]"}},"5VLF":function(It,At,re){"use strict";var ve,J;function U(X,F,R){var Z=function(M,N){return X.js_beautify(M,N)};return Z.js=X.js_beautify,Z.css=F.css_beautify,Z.html=R.html_beautify,Z.js_beautify=X.js_beautify,Z.css_beautify=F.css_beautify,Z.html_beautify=R.html_beautify,Z}!(ve=[re("6UM0"),re("TXwP"),re("psGv")],J=function(X,F,R){return U(X,F,R)}.apply(At,ve),J!==void 0&&(It.exports=J))},"5jaM":function(It,At,re){It.exports=re.p+"static/dui.b74348bd.svg"},"6+eU":function(It,At,re){"use strict";re.d(At,"a",function(){return _});var ve=re("wx14"),J=re("rePB"),U=re("VTBJ"),X=re("1OyB"),F=re("vuIU"),R=re("Ji7U"),Z=re("LK+K"),M=re("q1tI"),N=re.n(M),O=re("TSYQ"),h=re.n(O),b=function(T){var d,u="".concat(T.rootPrefixCls,"-item"),o=h()(u,"".concat(u,"-").concat(T.page),(d={},Object(J.a)(d,"".concat(u,"-active"),T.active),Object(J.a)(d,T.className,!!T.className),Object(J.a)(d,"".concat(u,"-disabled"),!T.page),d)),l=function(){T.onClick(T.page)},m=function(E){T.onKeyPress(E,T.onClick,T.page)};return N.a.createElement("li",{title:T.showTitle?T.page:null,className:o,onClick:l,onKeyPress:m,tabIndex:"0"},T.itemRender(T.page,"page",N.a.createElement("a",{rel:"nofollow"},T.page)))},A=b,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(R.a)(d,x);var T=Object(Z.a)(d);function d(){var u;Object(X.a)(this,d);for(var o=arguments.length,l=new Array(o),m=0;m<o;m++)l[m]=arguments[m];return u=T.call.apply(T,[this].concat(l)),u.state={goInputText:""},u.buildOptionText=function(g){return"".concat(g," ").concat(u.props.locale.items_per_page)},u.changeSize=function(g){u.props.changeSize(Number(g))},u.handleChange=function(g){u.setState({goInputText:g.target.value})},u.handleBlur=function(g){var E=u.props,L=E.goButton,P=E.quickGo,j=E.rootPrefixCls,z=u.state.goInputText;if(L||z==="")return;if(g.relatedTarget&&(g.relatedTarget.className.indexOf("".concat(j,"-prev"))>=0||g.relatedTarget.className.indexOf("".concat(j,"-next"))>=0))return;u.setState({goInputText:""}),P(u.getValidValue())},u.go=function(g){var E=u.state.goInputText;if(E==="")return;(g.keyCode===a.ENTER||g.type==="click")&&(u.setState({goInputText:""}),u.props.quickGo(u.getValidValue()))},u}return Object(F.a)(d,[{key:"getValidValue",value:function(){var o=this.state,l=o.goInputText,m=o.current;return!l||isNaN(l)?m:Number(l)}},{key:"getPageSizeOptions",value:function(){var o=this.props,l=o.pageSize,m=o.pageSizeOptions;return m.some(function(g){return g.toString()===l.toString()})?m:m.concat([l.toString()]).sort(function(g,E){var L=isNaN(Number(g))?0:Number(g),P=isNaN(Number(E))?0:Number(E);return L-P})}},{key:"render",value:function(){var o=this,l=this.props,m=l.pageSize,g=l.locale,E=l.rootPrefixCls,L=l.changeSize,P=l.quickGo,j=l.goButton,z=l.selectComponentClass,ee=l.buildOptionText,Q=l.selectPrefixCls,q=l.disabled,ae=this.state.goInputText,ge="".concat(E,"-options"),pe=z,Ne=null,Fe=null,He=null;if(!L&&!P)return null;var Ke=this.getPageSizeOptions();if(L&&pe){var Xe=Ke.map(function(Ce,ye){return N.a.createElement(pe.Option,{key:ye,value:Ce.toString()},(ee||o.buildOptionText)(Ce))});Ne=N.a.createElement(pe,{disabled:q,prefixCls:Q,showSearch:!1,className:"".concat(ge,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(m||Ke[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ye){return ye.parentNode}},Xe)}return P&&(j&&(He=typeof j=="boolean"?N.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:q,className:"".concat(ge,"-quick-jumper-button")},g.jump_to_confirm):N.a.createElement("span",{onClick:this.go,onKeyUp:this.go},j)),Fe=N.a.createElement("div",{className:"".concat(ge,"-quick-jumper")},g.jump_to,N.a.createElement("input",{disabled:q,type:"text",value:ae,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),g.page,He)),N.a.createElement("li",{className:"".concat(ge)},Ne,Fe)}}]),d}(N.a.Component);r.defaultProps={pageSizeOptions:["10","20","50","100"]};var n=r,e=re("N2Kk");function t(){}function i(x){return typeof x=="number"&&isFinite(x)&&Math.floor(x)===x}function s(x,T,d){return d}function I(x,T,d){var u=typeof x=="undefined"?T.pageSize:x;return Math.floor((d.total-1)/u)+1}var C=function(x){Object(R.a)(d,x);var T=Object(Z.a)(d);function d(u){var o;Object(X.a)(this,d),o=T.call(this,u),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(I(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(L,P){var j=o.props.prefixCls,z=L||N.a.createElement("button",{type:"button","aria-label":P,className:"".concat(j,"-item-link")});return typeof L=="function"&&(z=N.a.createElement(L,Object(U.a)({},o.props))),z},o.savePaginationNode=function(L){o.paginationNode=L},o.isValid=function(L){return i(L)&&L!==o.state.current},o.shouldDisplayQuickJumper=function(){var L=o.props,P=L.showQuickJumper,j=L.pageSize,z=L.total;return z<=j?!1:P},o.handleKeyDown=function(L){(L.keyCode===a.ARROW_UP||L.keyCode===a.ARROW_DOWN)&&L.preventDefault()},o.handleKeyUp=function(L){var P=o.getValidValue(L),j=o.state.currentInputValue;P!==j&&o.setState({currentInputValue:P}),L.keyCode===a.ENTER?o.handleChange(P):L.keyCode===a.ARROW_UP?o.handleChange(P-1):L.keyCode===a.ARROW_DOWN&&o.handleChange(P+1)},o.changePageSize=function(L){var P=o.state.current,j=I(L,o.state,o.props);P=P>j?j:P,j===0&&(P=o.state.current),typeof L=="number"&&("pageSize"in o.props||o.setState({pageSize:L}),"current"in o.props||o.setState({current:P,currentInputValue:P})),o.props.onShowSizeChange(P,L),"onChange"in o.props&&o.props.onChange&&o.props.onChange(P,L)},o.handleChange=function(L){var P=o.props.disabled,j=L;if(o.isValid(j)&&!P){var z=I(void 0,o.state,o.props);j>z?j=z:j<1&&(j=1),"current"in o.props||o.setState({current:j,currentInputValue:j});var ee=o.state.pageSize;return o.props.onChange(j,ee),j}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current<I(void 0,o.state,o.props)},o.runIfEnter=function(L,P){if(L.key==="Enter"||L.charCode===13){for(var j=arguments.length,z=new Array(j>2?j-2:0),ee=2;ee<j;ee++)z[ee-2]=arguments[ee];P.apply(void 0,z)}},o.runIfEnterPrev=function(L){o.runIfEnter(L,o.prev)},o.runIfEnterNext=function(L){o.runIfEnter(L,o.next)},o.runIfEnterJumpPrev=function(L){o.runIfEnter(L,o.jumpPrev)},o.runIfEnterJumpNext=function(L){o.runIfEnter(L,o.jumpNext)},o.handleGoTO=function(L){(L.keyCode===a.ENTER||L.type==="click")&&o.handleChange(o.state.currentInputValue)};var l=u.onChange!==t,m="current"in u;m&&!l&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var g=u.defaultCurrent;"current"in u&&(g=u.current);var E=u.defaultPageSize;return"pageSize"in u&&(E=u.pageSize),g=Math.min(g,I(E,void 0,u)),o.state={current:g,currentInputValue:g,pageSize:E},o}return Object(F.a)(d,[{key:"componentDidUpdate",value:function(o,l){var m=this.props.prefixCls;if(l.current!==this.state.current&&this.paginationNode){var g=this.paginationNode.querySelector(".".concat(m,"-item-").concat(l.current));g&&document.activeElement===g&&g.blur()}}},{key:"getValidValue",value:function(o){var l=o.target.value,m=I(void 0,this.state,this.props),g=this.state.currentInputValue,E;return l===""?E=l:isNaN(Number(l))?E=g:l>=m?E=m:E=Number(l),E}},{key:"getShowSizeChanger",value:function(){var o=this.props,l=o.showSizeChanger,m=o.total,g=o.totalBoundaryShowSizeChanger;return typeof l!="undefined"?l:m>g}},{key:"renderPrev",value:function(o){var l=this.props,m=l.prevIcon,g=l.itemRender,E=g(o,"prev",this.getItemIcon(m,"prev page")),L=!this.hasPrev();return Object(M.isValidElement)(E)?Object(M.cloneElement)(E,{disabled:L}):E}},{key:"renderNext",value:function(o){var l=this.props,m=l.nextIcon,g=l.itemRender,E=g(o,"next",this.getItemIcon(m,"next page")),L=!this.hasNext();return Object(M.isValidElement)(E)?Object(M.cloneElement)(E,{disabled:L}):E}},{key:"render",value:function(){var o=this,l=this.props,m=l.prefixCls,g=l.className,E=l.style,L=l.disabled,P=l.hideOnSinglePage,j=l.total,z=l.locale,ee=l.showQuickJumper,Q=l.showLessItems,q=l.showTitle,ae=l.showTotal,ge=l.simple,pe=l.itemRender,Ne=l.showPrevNextJumpers,Fe=l.jumpPrevIcon,He=l.jumpNextIcon,Ke=l.selectComponentClass,Xe=l.selectPrefixCls,Ce=l.pageSizeOptions,ye=this.state,Pe=ye.current,Et=ye.pageSize,mt=ye.currentInputValue;if(P===!0&&j<=Et)return null;var gt=I(void 0,this.state,this.props),bt=[],oe=null,V=null,Y=null,he=null,Se=null,Ue=ee&&ee.goButton,Ie=Q?1:2,st=Pe-1>0?Pe-1:0,it=Pe+1<gt?Pe+1:gt,ut=Object.keys(this.props).reduce(function(se,le){return(le.substr(0,5)==="data-"||le.substr(0,5)==="aria-"||le==="role")&&(se[le]=o.props[le]),se},{});if(ge)return Ue&&(typeof Ue=="boolean"?Se=N.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):Se=N.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Ue),Se=N.a.createElement("li",{title:q?"".concat(z.jump_to).concat(Pe,"/").concat(gt):null,className:"".concat(m,"-simple-pager")},Se)),N.a.createElement("ul",Object(ve.a)({className:h()(m,"".concat(m,"-simple"),Object(J.a)({},"".concat(m,"-disabled"),L),g),style:E,ref:this.savePaginationNode},ut),N.a.createElement("li",{title:q?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:h()("".concat(m,"-prev"),Object(J.a)({},"".concat(m,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(st)),N.a.createElement("li",{title:q?"".concat(Pe,"/").concat(gt):null,className:"".concat(m,"-simple-pager")},N.a.createElement("input",{type:"text",value:mt,disabled:L,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),N.a.createElement("span",{className:"".concat(m,"-slash")},"/"),gt),N.a.createElement("li",{title:q?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:h()("".concat(m,"-next"),Object(J.a)({},"".concat(m,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(it)),Se);if(gt<=3+Ie*2){var dt={locale:z,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:q,itemRender:pe};gt||bt.push(N.a.createElement(A,Object(ve.a)({},dt,{key:"noPager",page:gt,className:"".concat(m,"-disabled")})));for(var vt=1;vt<=gt;vt+=1){var Tt=Pe===vt;bt.push(N.a.createElement(A,Object(ve.a)({},dt,{key:vt,page:vt,active:Tt})))}}else{var Me=Q?z.prev_3:z.prev_5,Ye=Q?z.next_3:z.next_5;Ne&&(oe=N.a.createElement("li",{title:q?Me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:h()("".concat(m,"-jump-prev"),Object(J.a)({},"".concat(m,"-jump-prev-custom-icon"),!!Fe))},pe(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Fe,"prev page"))),V=N.a.createElement("li",{title:q?Ye:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:h()("".concat(m,"-jump-next"),Object(J.a)({},"".concat(m,"-jump-next-custom-icon"),!!He))},pe(this.getJumpNextPage(),"jump-next",this.getItemIcon(He,"next page")))),he=N.a.createElement(A,{locale:z,last:!0,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:gt,page:gt,active:!1,showTitle:q,itemRender:pe}),Y=N.a.createElement(A,{locale:z,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:q,itemRender:pe});var tt=Math.max(1,Pe-Ie),at=Math.min(Pe+Ie,gt);Pe-1<=Ie&&(at=1+Ie*2),gt-Pe<=Ie&&(tt=gt-Ie*2);for(var ze=tt;ze<=at;ze+=1){var qe=Pe===ze;bt.push(N.a.createElement(A,{locale:z,rootPrefixCls:m,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ze,page:ze,active:qe,showTitle:q,itemRender:pe}))}Pe-1>=Ie*2&&Pe!==1+2&&(bt[0]=Object(M.cloneElement)(bt[0],{className:"".concat(m,"-item-after-jump-prev")}),bt.unshift(oe)),gt-Pe>=Ie*2&&Pe!==gt-2&&(bt[bt.length-1]=Object(M.cloneElement)(bt[bt.length-1],{className:"".concat(m,"-item-before-jump-next")}),bt.push(V)),tt!==1&&bt.unshift(Y),at!==gt&&bt.push(he)}var Oe=null;ae&&(Oe=N.a.createElement("li",{className:"".concat(m,"-total-text")},ae(j,[j===0?0:(Pe-1)*Et+1,Pe*Et>j?j:Pe*Et])));var be=!this.hasPrev()||!gt,_e=!this.hasNext()||!gt;return N.a.createElement("ul",Object(ve.a)({className:h()(m,g,Object(J.a)({},"".concat(m,"-disabled"),L)),style:E,unselectable:"unselectable",ref:this.savePaginationNode},ut),Oe,N.a.createElement("li",{title:q?z.prev_page:null,onClick:this.prev,tabIndex:be?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(m,"-prev"),Object(J.a)({},"".concat(m,"-disabled"),be)),"aria-disabled":be},this.renderPrev(st)),bt,N.a.createElement("li",{title:q?z.next_page:null,onClick:this.next,tabIndex:_e?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(m,"-next"),Object(J.a)({},"".concat(m,"-disabled"),_e)),"aria-disabled":_e},this.renderNext(it)),N.a.createElement(n,{disabled:L,locale:z,rootPrefixCls:m,selectComponentClass:Ke,selectPrefixCls:Xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Pe,pageSize:Et,pageSizeOptions:Ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ue}))}}],[{key:"getDerivedStateFromProps",value:function(o,l){var m={};if("current"in o&&(m.current=o.current,o.current!==l.current&&(m.currentInputValue=m.current)),"pageSize"in o&&o.pageSize!==l.pageSize){var g=l.current,E=I(o.pageSize,l,o);g=g>E?E:g,"current"in o||(m.current=g,m.currentInputValue=g),m.pageSize=o.pageSize}return m}}]),d}(N.a.Component);C.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:t,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:t,locale:e.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var _=C},"6K3P":function(It,At,re){It.exports=re.p+"static/jinshi.9b74f304.svg"},"6RRn":function(It,At,re){"use strict";var ve=re("wCXF"),J=re("n6Qo");re.d(At,"b",function(){return J.a});var U=re("IBYe"),X=re("6eGT"),F=re("hW8S");re.d(At,"a",function(){return F.a}),At.c=ve.b},"6UM0":function(It,At,re){var ve,J;(function(){var U;(function(){"use strict";var F=[function(N,O,h){var b=h(1).Beautifier,A=h(5).Options;function a(r,n){var e=new b(r,n);return e.beautify()}N.exports=a,N.exports.defaultOptions=function(){return new A}},function(N,O,h){var b=h(2).Output,A=h(3).Token,a=h(4),r=h(5).Options,n=h(7).Tokenizer,e=h(7).line_starters,t=h(7).positionable_operators,i=h(7).TOKEN;function s(Q,q){return q.indexOf(Q)!==-1}function I(Q){return Q.replace(/^\s+/g,"")}function C(Q){for(var q={},ae=0;ae<Q.length;ae++)q[Q[ae].replace(/-/g,"_")]=Q[ae];return q}function _(Q,q){return Q&&Q.type===i.RESERVED&&Q.text===q}function x(Q,q){return Q&&Q.type===i.RESERVED&&s(Q.text,q)}var T=["case","return","do","if","throw","else","await","break","continue","async"],d=["before-newline","after-newline","preserve-newline"],u=C(d),o=[u.before_newline,u.preserve_newline],l={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function m(Q,q){if(q.multiline_frame||q.mode===l.ForInitializer||q.mode===l.Conditional)return;Q.remove_indent(q.start_line_index)}function g(Q){Q=Q.replace(a.allLineBreaks,`
`);for(var q=[],ae=Q.indexOf(`
`);ae!==-1;)q.push(Q.substring(0,ae)),Q=Q.substring(ae+1),ae=Q.indexOf(`
`);return Q.length&&q.push(Q),q}function E(Q){return Q===l.ArrayLiteral}function L(Q){return s(Q,[l.Expression,l.ForInitializer,l.Conditional])}function P(Q,q){for(var ae=0;ae<Q.length;ae++){var ge=Q[ae].trim();if(ge.charAt(0)!==q)return!1}return!0}function j(Q,q){for(var ae=0,ge=Q.length,pe;ae<ge;ae++)if(pe=Q[ae],pe&&pe.indexOf(q)!==0)return!1;return!0}function z(Q,q){q=q||{},this._source_text=Q||"",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(q)}z.prototype.create_flags=function(Q,q){var ae=0;Q&&(ae=Q.indentation_level,!this._output.just_added_newline()&&Q.line_indent_level>ae&&(ae=Q.line_indent_level));var ge={mode:q,parent:Q,last_token:Q?Q.last_token:new A(i.START_BLOCK,""),last_word:Q?Q.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:ae,alignment:0,line_indent_level:Q?Q.line_indent_level:ae,start_line_index:this._output.get_line_number(),ternary_depth:0};return ge},z.prototype._reset=function(Q){var q=Q.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new b(this._options,q),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(l.BlockStatement);var ae=new n(Q,this._options);return this._tokens=ae.tokenize(),Q},z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Q,q=this._reset(this._source_text),ae=this._options.eol;this._options.eol==="auto"&&(ae=`
`,q&&a.lineBreak.test(q||"")&&(ae=q.match(a.lineBreak)[0]));for(var ge=this._tokens.next();ge;)this.handle_token(ge),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ge,ge=this._tokens.next();return Q=this._output.get_code(ae),Q},z.prototype.handle_token=function(Q,q){Q.type===i.START_EXPR?this.handle_start_expr(Q):Q.type===i.END_EXPR?this.handle_end_expr(Q):Q.type===i.START_BLOCK?this.handle_start_block(Q):Q.type===i.END_BLOCK?this.handle_end_block(Q):Q.type===i.WORD?this.handle_word(Q):Q.type===i.RESERVED?this.handle_word(Q):Q.type===i.SEMICOLON?this.handle_semicolon(Q):Q.type===i.STRING?this.handle_string(Q):Q.type===i.EQUALS?this.handle_equals(Q):Q.type===i.OPERATOR?this.handle_operator(Q):Q.type===i.COMMA?this.handle_comma(Q):Q.type===i.BLOCK_COMMENT?this.handle_block_comment(Q,q):Q.type===i.COMMENT?this.handle_comment(Q,q):Q.type===i.DOT?this.handle_dot(Q):Q.type===i.EOF?this.handle_eof(Q):Q.type===i.UNKNOWN?this.handle_unknown(Q,q):this.handle_unknown(Q,q)},z.prototype.handle_whitespace_and_comments=function(Q,q){var ae=Q.newlines,ge=this._options.keep_array_indentation&&E(this._flags.mode);if(Q.comments_before)for(var pe=Q.comments_before.next();pe;)this.handle_whitespace_and_comments(pe,q),this.handle_token(pe,q),pe=Q.comments_before.next();if(ge)for(var Ne=0;Ne<ae;Ne+=1)this.print_newline(Ne>0,q);else if(this._options.max_preserve_newlines&&ae>this._options.max_preserve_newlines&&(ae=this._options.max_preserve_newlines),this._options.preserve_newlines&&ae>1){this.print_newline(!1,q);for(var Fe=1;Fe<ae;Fe+=1)this.print_newline(!0,q)}};var ee=["async","break","continue","return","throw","yield"];z.prototype.allow_wrap_or_preserved_newline=function(Q,q){if(q=q===void 0?!1:q,this._output.just_added_newline())return;var ae=this._options.preserve_newlines&&Q.newlines||q,ge=s(this._flags.last_token.text,t)||s(Q.text,t);if(ge){var pe=s(this._flags.last_token.text,t)&&s(this._options.operator_position,o)||s(Q.text,t);ae=ae&&pe}if(ae)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(x(this._flags.last_token,ee))return;this._output.set_wrap_point()}},z.prototype.print_newline=function(Q,q){if(!q&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ae=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&_(ae,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(Q)&&(this._flags.multiline_frame=!0)},z.prototype.print_token_line_indentation=function(Q){this._output.just_added_newline()&&(this._options.keep_array_indentation&&Q.newlines&&(Q.text==="["||E(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(Q.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))},z.prototype.print_token=function(Q){if(this._output.raw){this._output.add_raw_token(Q);return}if(this._options.comma_first&&Q.previous&&Q.previous.type===i.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var q=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(q),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(Q),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(Q),this._output.non_breaking_space=!0,this._output.add_token(Q.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},z.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},z.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))},z.prototype.set_mode=function(Q){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,Q),this._flags=this.create_flags(this._previous_flags,Q),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===l.Statement&&m(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},z.prototype.start_of_object_property=function(){return this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},z.prototype.start_of_statement=function(Q){var q=!1;return q=q||x(this._flags.last_token,["var","let","const"])&&Q.type===i.WORD,q=q||_(this._flags.last_token,"do"),q=q||!(this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement)&&x(this._flags.last_token,ee)&&!Q.newlines,q=q||_(this._flags.last_token,"else")&&!(_(Q,"if")&&!Q.comments_before),q=q||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===l.ForInitializer||this._previous_flags.mode===l.Conditional),q=q||this._flags.last_token.type===i.WORD&&this._flags.mode===l.BlockStatement&&!this._flags.in_case&&!(Q.text==="--"||Q.text==="++")&&this._last_last_text!=="function"&&Q.type!==i.WORD&&Q.type!==i.RESERVED,q=q||this._flags.mode===l.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),q?(this.set_mode(l.Statement),this.indent(),this.handle_whitespace_and_comments(Q,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(Q,x(Q,["do","for","if","while"])),!0):!1},z.prototype.handle_start_expr=function(Q){this.start_of_statement(Q)||this.handle_whitespace_and_comments(Q);var q=l.Expression;if(Q.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,e)&&(this._output.space_before_token=!0),this.print_token(Q),this.set_mode(q),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}q=l.ArrayLiteral,E(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())),s(this._flags.last_token.type,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,q=l.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,q=l.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&Q.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,e)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(Q);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var ae=this._tokens.peek(-3);if(this._options.space_after_named_function&&ae){var ge=this._tokens.peek(-4);x(ae,["async","function"])||ae.text==="*"&&x(ge,["async","function"])?this._output.space_before_token=!0:this._flags.mode===l.ObjectLiteral?(ae.text==="{"||ae.text===","||ae.text==="*"&&(ge.text==="{"||ge.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(Q);(this._flags.last_token.type===i.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&s(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===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(Q,Q.newlines),this.print_token(Q),this.set_mode(q),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},z.prototype.handle_end_expr=function(Q){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(Q),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(Q,Q.text==="]"&&E(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.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(Q),this.restore_mode(),m(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===l.Conditional&&(this._previous_flags.mode=l.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},z.prototype.handle_start_block=function(Q){this.handle_whitespace_and_comments(Q);var q=this._tokens.peek(),ae=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(l.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(l.BlockStatement):ae&&(s(ae.text,[":",","])&&s(q.type,[i.STRING,i.WORD,i.RESERVED])||s(q.text,["get","set","..."])&&s(ae.type,[i.WORD,i.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(ae.text,[":",","])?this.set_mode(l.BlockStatement):this.set_mode(l.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(l.BlockStatement):s(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(l.ObjectLiteral):this.set_mode(l.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ge=!q.comments_before&&q.text==="}",pe=ge&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var Ne=0,Fe=null;this._flags.inline_frame=!0;do if(Ne+=1,Fe=this._tokens.peek(Ne-1),Fe.newlines){this._flags.inline_frame=!1;break}while(Fe.type!==i.EOF&&!(Fe.type===i.END_BLOCK&&Fe.opened===Q))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&Q.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(pe||this._flags.last_token.type===i.EQUALS||x(this._flags.last_token,T)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(E(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(Q),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(Q),this.indent(),!ge&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},z.prototype.handle_end_block=function(Q){for(this.handle_whitespace_and_comments(Q);this._flags.mode===l.Statement;)this.restore_mode();var q=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!q?this._output.space_before_token=!0:this._options.brace_style==="expand"?q||this.print_newline():q||(E(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(Q)},z.prototype.handle_word=function(Q){if(Q.type===i.RESERVED){if(s(Q.text,["set","get"])&&this._flags.mode!==l.ObjectLiteral)Q.type=i.WORD;else if(Q.text==="import"&&s(this._tokens.peek().text,["(","."]))Q.type=i.WORD;else if(s(Q.text,["as","from"])&&!this._flags.import_block)Q.type=i.WORD;else if(this._flags.mode===l.ObjectLiteral){var q=this._tokens.peek();q.text===":"&&(Q.type=i.WORD)}}if(this.start_of_statement(Q)?x(this._flags.last_token,["var","let","const"])&&Q.type===i.WORD&&(this._flags.declaration_statement=!0):Q.newlines&&!L(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!x(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(Q),this.print_newline()):this.handle_whitespace_and_comments(Q),this._flags.do_block&&!this._flags.do_while)if(_(Q,"while")){this._output.space_before_token=!0,this.print_token(Q),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&&_(Q,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===l.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(Q,["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(Q),this._flags.in_case=!0;return}if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(Q)),_(Q,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!Q.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,ee)?this._output.space_before_token=!0:_(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===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(L(this._flags.mode)||E(this._flags.mode))||this.print_newline(),this.print_token(Q),this._flags.last_word=Q.text;return}var ae="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?ae="SPACE":x(Q,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&Q.newlines?ae="NEWLINE":(ae="SPACE",this._output.space_before_token=!0):ae="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===l.BlockStatement?ae="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&L(this._flags.mode)?ae="SPACE":this._flags.last_token.type===i.STRING?ae="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&s(this._last_last_text,["{",","]))?ae="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?ae="SPACE":ae="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,ae="NEWLINE"),x(Q,e)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ae="SPACE":ae="NEWLINE"),x(Q,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===l.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&Q.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ge=this._output.current_line;ge.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ae==="NEWLINE"?x(this._flags.last_token,T)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(Q,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!x(Q,["var","let","const"]))&&this._flags.last_token.text!==":"&&(_(Q,"if")&&_(Q.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(Q,e)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&E(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ae==="SPACE"&&(this._output.space_before_token=!0);Q.previous&&(Q.previous.type===i.WORD||Q.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(Q),this._flags.last_word=Q.text,Q.type===i.RESERVED&&(Q.text==="do"?this._flags.do_block=!0:Q.text==="if"?this._flags.if_block=!0:Q.text==="import"?this._flags.import_block=!0:this._flags.import_block&&_(Q,"from")&&(this._flags.import_block=!1))},z.prototype.handle_semicolon=function(Q){this.start_of_statement(Q)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(Q);for(var q=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&_(q,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(Q)},z.prototype.handle_string=function(Q){Q.text.startsWith("`")&&Q.newlines===0&&Q.whitespace_before===""&&(Q.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(Q)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(Q),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(Q):Q.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(Q.previous.text==="]"||Q.previous.text===")")&&Q.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(Q)},z.prototype.handle_equals=function(Q){this.start_of_statement(Q)||this.handle_whitespace_and_comments(Q),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(Q),this._output.space_before_token=!0},z.prototype.handle_comma=function(Q){this.handle_whitespace_and_comments(Q,!0),this.print_token(Q),this._output.space_before_token=!0,this._flags.declaration_statement?(L(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(Q)):this._flags.mode===l.ObjectLiteral||this._flags.mode===l.Statement&&this._flags.parent.mode===l.ObjectLiteral?(this._flags.mode===l.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(Q)},z.prototype.handle_operator=function(Q){var q=Q.text==="*"&&(x(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),ae=s(Q.text,["-","+"])&&(s(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||s(this._flags.last_token.text,e)||this._flags.last_token.text===",");if(!this.start_of_statement(Q)){var ge=!q;this.handle_whitespace_and_comments(Q,ge)}if(Q.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(Q);return}if(Q.text==="::"){this.print_token(Q);return}if(this._flags.last_token.type===i.OPERATOR&&s(this._options.operator_position,o)&&this.allow_wrap_or_preserved_newline(Q),Q.text===":"&&this._flags.in_case){this.print_token(Q),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==i.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 pe=!0,Ne=!0,Fe=!1;if(Q.text===":"?this._flags.ternary_depth===0?pe=!1:(this._flags.ternary_depth-=1,Fe=!0):Q.text==="?"&&(this._flags.ternary_depth+=1),!ae&&!q&&this._options.preserve_newlines&&s(Q.text,t)){var He=Q.text===":",Ke=He&&Fe,Xe=He&&!Fe;switch(this._options.operator_position){case u.before_newline:this._output.space_before_token=!Xe,this.print_token(Q),(!He||Ke)&&this.allow_wrap_or_preserved_newline(Q),this._output.space_before_token=!0;return;case u.after_newline:this._output.space_before_token=!0,!He||Ke?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(Q):this._output.space_before_token=!1,this.print_token(Q),this._output.space_before_token=!0;return;case u.preserve_newline:Xe||this.allow_wrap_or_preserved_newline(Q),pe=!(this._output.just_added_newline()||Xe),this._output.space_before_token=pe,this.print_token(Q),this._output.space_before_token=!0;return}}if(q){this.allow_wrap_or_preserved_newline(Q),pe=!1;var Ce=this._tokens.peek();Ne=Ce&&s(Ce.type,[i.WORD,i.RESERVED])}else if(Q.text==="...")this.allow_wrap_or_preserved_newline(Q),pe=this._flags.last_token.type===i.START_BLOCK,Ne=!1;else if(s(Q.text,["--","++","!","~"])||ae){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(Q),pe=!1,Ne=!1,Q.newlines&&(Q.text==="--"||Q.text==="++"||Q.text==="~")){var ye=x(this._flags.last_token,T)&&Q.newlines;ye&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ye,!0)}this._flags.last_token.text===";"&&L(this._flags.mode)&&(pe=!0),this._flags.last_token.type===i.RESERVED?pe=!0:this._flags.last_token.type===i.END_EXPR?pe=!(this._flags.last_token.text==="]"&&(Q.text==="--"||Q.text==="++")):this._flags.last_token.type===i.OPERATOR&&(pe=s(Q.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(Q.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(Ne=!0)),(this._flags.mode===l.BlockStatement&&!this._flags.inline_frame||this._flags.mode===l.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||pe,this.print_token(Q),this._output.space_before_token=Ne},z.prototype.handle_block_comment=function(Q,q){if(this._output.raw){this._output.add_raw_token(Q),Q.directives&&Q.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(Q.directives){this.print_newline(!1,q),this.print_token(Q),Q.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(Q.text)&&!Q.newlines){this._output.space_before_token=!0,this.print_token(Q),this._output.space_before_token=!0;return}else this.print_block_commment(Q,q)},z.prototype.print_block_commment=function(Q,q){var ae=g(Q.text),ge,pe=!1,Ne=!1,Fe=Q.whitespace_before,He=Fe.length;if(this.print_newline(!1,q),this.print_token_line_indentation(Q),this._output.add_token(ae[0]),this.print_newline(!1,q),ae.length>1){for(ae=ae.slice(1),pe=P(ae,"*"),Ne=j(ae,Fe),pe&&(this._flags.alignment=1),ge=0;ge<ae.length;ge++)pe?(this.print_token_line_indentation(Q),this._output.add_token(I(ae[ge]))):Ne&&ae[ge]?(this.print_token_line_indentation(Q),this._output.add_token(ae[ge].substring(He))):(this._output.current_line.set_indent(-1),this._output.add_token(ae[ge])),this.print_newline(!1,q);this._flags.alignment=0}},z.prototype.handle_comment=function(Q,q){Q.newlines?this.print_newline(!1,q):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(Q),this.print_newline(!1,q)},z.prototype.handle_dot=function(Q){this.start_of_statement(Q)||this.handle_whitespace_and_comments(Q,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),x(this._flags.last_token,T)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(Q,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(Q)},z.prototype.handle_unknown=function(Q,q){this.print_token(Q),Q.text[Q.text.length-1]===`
`&&this.print_newline(!1,q)},z.prototype.handle_eof=function(Q){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(Q)},N.exports.Beautifier=z},function(N){function O(A){this.__parent=A,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=[]}O.prototype.clone_empty=function(){var A=new O(this.__parent);return A.set_indent(this.__indent_count,this.__alignment_count),A},O.prototype.item=function(A){return A<0?this.__items[this.__items.length+A]:this.__items[A]},O.prototype.has_match=function(A){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(A))return!0;return!1},O.prototype.set_indent=function(A,a){this.is_empty()&&(this.__indent_count=A||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},O.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)},O.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},O.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var A=this.__parent.current_line;return A.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),A.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),A.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,A.__items[0]===" "&&(A.__items.splice(0,1),A.__character_count-=1),!0}return!1},O.prototype.is_empty=function(){return this.__items.length===0},O.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},O.prototype.push=function(A){this.__items.push(A);var a=A.lastIndexOf(`
`);a!==-1?this.__character_count=A.length-a:this.__character_count+=A.length},O.prototype.pop=function(){var A=null;return this.is_empty()||(A=this.__items.pop(),this.__character_count-=A.length),A},O.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},O.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},O.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},O.prototype.toString=function(){var A="";return this.is_empty()?this.__parent.indent_empty_lines&&(A=this.__parent.get_indent_string(this.__indent_count)):(A=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),A+=this.__items.join("")),A};function h(A,a){this.__cache=[""],this.__indent_size=A.indent_size,this.__indent_string=A.indent_char,A.indent_with_tabs||(this.__indent_string=new Array(A.indent_size+1).join(A.indent_char)),a=a||"",A.indent_level>0&&(a=new Array(A.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}h.prototype.get_indent_size=function(A,a){var r=this.__base_string_length;return a=a||0,A<0&&(r=0),r+=A*this.__indent_size,r+=a,r},h.prototype.get_indent_string=function(A,a){var r=this.__base_string;return a=a||0,A<0&&(A=0,r=""),a+=A*this.__indent_size,this.__ensure_cache(a),r+=this.__cache[a],r},h.prototype.__ensure_cache=function(A){for(;A>=this.__cache.length;)this.__add_column()},h.prototype.__add_column=function(){var A=this.__cache.length,a=0,r="";this.__indent_size&&A>=this.__indent_size&&(a=Math.floor(A/this.__indent_size),A-=a*this.__indent_size,r=new Array(a+1).join(this.__indent_string)),A&&(r+=new Array(A+1).join(" ")),this.__cache.push(r)};function b(A,a){this.__indent_cache=new h(A,a),this.raw=!1,this._end_with_newline=A.end_with_newline,this.indent_size=A.indent_size,this.wrap_line_length=A.wrap_line_length,this.indent_empty_lines=A.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new O(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}b.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},b.prototype.get_line_number=function(){return this.__lines.length},b.prototype.get_indent_string=function(A,a){return this.__indent_cache.get_indent_string(A,a)},b.prototype.get_indent_size=function(A,a){return this.__indent_cache.get_indent_size(A,a)},b.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},b.prototype.add_new_line=function(A){return this.is_empty()||!A&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},b.prototype.get_code=function(A){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 A!==`
`&&(r=r.replace(/[\n]/g,A)),r},b.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},b.prototype.set_indent=function(A,a){return A=A||0,a=a||0,this.next_line.set_indent(A,a),this.__lines.length>1?(this.current_line.set_indent(A,a),!0):(this.current_line.set_indent(),!1)},b.prototype.add_raw_token=function(A){for(var a=0;a<A.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(A.whitespace_before),this.current_line.push(A.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},b.prototype.add_token=function(A){this.__add_space_before_token(),this.current_line.push(A),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},b.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(" "))},b.prototype.remove_indent=function(A){for(var a=this.__lines.length;A<a;)this.__lines[A]._remove_indent(),A++;this.current_line._remove_wrap_indent()},b.prototype.trim=function(A){for(A=A===void 0?!1:A,this.current_line.trim();A&&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},b.prototype.just_added_newline=function(){return this.current_line.is_empty()},b.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},b.prototype.ensure_empty_line_above=function(A,a){for(var r=this.__lines.length-2;r>=0;){var n=this.__lines[r];if(n.is_empty())break;if(n.item(0).indexOf(A)!==0&&n.item(-1)!==a){this.__lines.splice(r+1,0,new O(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},N.exports.Output=b},function(N){function O(h,b,A,a){this.type=h,this.text=b,this.comments_before=null,this.newlines=A||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}N.exports.Token=O},function(N,O){var h="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",b="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",A="\\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}|["+h+A+"])",n="(?:\\\\u[0-9a-fA-F]{4}|["+b+A+a+"])*";O.identifier=new RegExp(r+n,"g"),O.identifierStart=new RegExp(r),O.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+b+A+a+"])+");var e=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;O.newline=/[\n\r\u2028\u2029]/,O.lineBreak=new RegExp(`\r
|`+O.newline.source),O.allLineBreaks=new RegExp(O.lineBreak.source,"g")},function(N,O,h){var b=h(6).Options,A=["before-newline","after-newline","preserve-newline"];function a(r){b.call(this,r,"js");var n=this.raw_options.brace_style||null;n==="expand-strict"?this.raw_options.brace_style="expand":n==="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 e=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var t=0;t<e.length;t++)e[t]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=e[t];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",A),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}a.prototype=new b,N.exports.Options=a},function(N){function O(A,a){this.raw_options=h(A,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"])}O.prototype._get_array=function(A,a){var r=this.raw_options[A],n=a||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(n=r.concat()):typeof r=="string"&&(n=r.split(/[^a-zA-Z0-9_\/\-]+/)),n},O.prototype._get_boolean=function(A,a){var r=this.raw_options[A],n=r===void 0?!!a:!!r;return n},O.prototype._get_characters=function(A,a){var r=this.raw_options[A],n=a||"";return typeof r=="string"&&(n=r.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),n},O.prototype._get_number=function(A,a){var r=this.raw_options[A];a=parseInt(a,10),isNaN(a)&&(a=0);var n=parseInt(r,10);return isNaN(n)&&(n=a),n},O.prototype._get_selection=function(A,a,r){var n=this._get_selection_list(A,a,r);if(n.length!==1)throw new Error("Invalid Option Value: The option '"+A+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[A]+"'");return n[0]},O.prototype._get_selection_list=function(A,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 n=this._get_array(A,r);if(!this._is_valid_selection(n,a))throw new Error("Invalid Option Value: The option '"+A+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[A]+"'");return n},O.prototype._is_valid_selection=function(A,a){return A.length&&a.length&&!A.some(function(r){return a.indexOf(r)===-1})};function h(A,a){var r={};A=b(A);var n;for(n in A)n!==a&&(r[n]=A[n]);if(a&&A[a])for(n in A[a])r[n]=A[a][n];return r}function b(A){var a={},r;for(r in A){var n=r.replace(/-/g,"_");a[n]=A[r]}return a}N.exports.Options=O,N.exports.normalizeOpts=b,N.exports.mergeOpts=h},function(N,O,h){var b=h(8).InputScanner,A=h(9).Tokenizer,a=h(9).TOKEN,r=h(13).Directives,n=h(4),e=h(12).Pattern,t=h(14).TemplatablePattern;function i(P,j){return j.indexOf(P)!==-1}var s={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},I=new r(/\/\*/,/\*\//),C=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,_=/[0-9]/,x=/[^\d\.]/,T=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),d=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";d=d.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d="\\?\\.(?!\\d) "+d,d=d.replace(/ /g,"|");var u=new RegExp(d),o="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),l=o.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),m=new RegExp("^(?:"+l.join("|")+")$"),g,E=function(P,j){A.call(this,P,j),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var z=new e(this._input),ee=new t(this._input).read_options(this._options);this.__patterns={template:ee,identifier:ee.starting_with(n.identifier).matching(n.identifierMatch),number:z.matching(C),punct:z.matching(u),comment:z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:z.matching(/<!--/),html_comment_end:z.matching(/-->/),include:z.starting_with(/#include/).until_after(n.lineBreak),shebang:z.starting_with(/#!/).until_after(n.lineBreak),xml:z.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:ee.until(/['\\\n\r\u2028\u2029]/),double_quote:ee.until(/["\\\n\r\u2028\u2029]/),template_text:ee.until(/[`\\$]/),template_expression:ee.until(/[`}\\]/)}};E.prototype=new A,E.prototype._is_comment=function(P){return P.type===s.COMMENT||P.type===s.BLOCK_COMMENT||P.type===s.UNKNOWN},E.prototype._is_opening=function(P){return P.type===s.START_BLOCK||P.type===s.START_EXPR},E.prototype._is_closing=function(P,j){return(P.type===s.END_BLOCK||P.type===s.END_EXPR)&&j&&(P.text==="]"&&j.text==="["||P.text===")"&&j.text==="("||P.text==="}"&&j.text==="{")},E.prototype._reset=function(){g=!1},E.prototype._get_next_token=function(P,j){var z=null;this._readWhitespace();var ee=this._input.peek();return ee===null?this._create_token(s.EOF,""):(z=z||this._read_non_javascript(ee),z=z||this._read_string(ee),z=z||this._read_word(P),z=z||this._read_singles(ee),z=z||this._read_comment(ee),z=z||this._read_regexp(ee,P),z=z||this._read_xml(ee,P),z=z||this._read_punctuation(),z=z||this._create_token(s.UNKNOWN,this._input.next()),z)},E.prototype._read_word=function(P){var j;if(j=this.__patterns.identifier.read(),j!=="")return j=j.replace(n.allLineBreaks,`
`),!(P.type===s.DOT||P.type===s.RESERVED&&(P.text==="set"||P.text==="get"))&&m.test(j)?(j==="in"||j==="of")&&(P.type===s.WORD||P.type===s.STRING)?this._create_token(s.OPERATOR,j):this._create_token(s.RESERVED,j):this._create_token(s.WORD,j);if(j=this.__patterns.number.read(),j!=="")return this._create_token(s.WORD,j)},E.prototype._read_singles=function(P){var j=null;return P==="("||P==="["?j=this._create_token(s.START_EXPR,P):P===")"||P==="]"?j=this._create_token(s.END_EXPR,P):P==="{"?j=this._create_token(s.START_BLOCK,P):P==="}"?j=this._create_token(s.END_BLOCK,P):P===";"?j=this._create_token(s.SEMICOLON,P):P==="."&&x.test(this._input.peek(1))?j=this._create_token(s.DOT,P):P===","&&(j=this._create_token(s.COMMA,P)),j&&this._input.next(),j},E.prototype._read_punctuation=function(){var P=this.__patterns.punct.read();if(P!=="")return P==="="?this._create_token(s.EQUALS,P):P==="?."?this._create_token(s.DOT,P):this._create_token(s.OPERATOR,P)},E.prototype._read_non_javascript=function(P){var j="";if(P==="#"){if(this._is_first_token()&&(j=this.__patterns.shebang.read(),j))return this._create_token(s.UNKNOWN,j.trim()+`
`);if(j=this.__patterns.include.read(),j)return this._create_token(s.UNKNOWN,j.trim()+`
`);P=this._input.next();var z="#";if(this._input.hasNext()&&this._input.testChar(_)){do P=this._input.next(),z+=P;while(this._input.hasNext()&&P!=="#"&&P!=="=");return P==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(z+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,z)}this._input.back()}else if(P==="<"&&this._is_first_token()){if(j=this.__patterns.html_comment_start.read(),j){for(;this._input.hasNext()&&!this._input.testChar(n.newline);)j+=this._input.next();return g=!0,this._create_token(s.COMMENT,j)}}else if(g&&P==="-"&&(j=this.__patterns.html_comment_end.read(),j))return g=!1,this._create_token(s.COMMENT,j);return null},E.prototype._read_comment=function(P){var j=null;if(P==="/"){var z="";if(this._input.peek(1)==="*"){z=this.__patterns.block_comment.read();var ee=I.get_directives(z);ee&&ee.ignore==="start"&&(z+=I.readIgnored(this._input)),z=z.replace(n.allLineBreaks,`
`),j=this._create_token(s.BLOCK_COMMENT,z),j.directives=ee}else this._input.peek(1)==="/"&&(z=this.__patterns.comment.read(),j=this._create_token(s.COMMENT,z))}return j},E.prototype._read_string=function(P){if(P==="`"||P==="'"||P==='"'){var j=this._input.next();return this.has_char_escapes=!1,P==="`"?j+=this._read_string_recursive("`",!0,"${"):j+=this._read_string_recursive(P),this.has_char_escapes&&this._options.unescape_strings&&(j=L(j)),this._input.peek()===P&&(j+=this._input.next()),j=j.replace(n.allLineBreaks,`
`),this._create_token(s.STRING,j)}return null},E.prototype._allow_regexp_or_xml=function(P){return P.type===s.RESERVED&&i(P.text,["return","case","throw","else","do","typeof","yield"])||P.type===s.END_EXPR&&P.text===")"&&P.opened.previous.type===s.RESERVED&&i(P.opened.previous.text,["if","while","for"])||i(P.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},E.prototype._read_regexp=function(P,j){if(P==="/"&&this._allow_regexp_or_xml(j)){for(var z=this._input.next(),ee=!1,Q=!1;this._input.hasNext()&&(ee||Q||this._input.peek()!==P)&&!this._input.testChar(n.newline);)z+=this._input.peek(),ee?ee=!1:(ee=this._input.peek()==="\\",this._input.peek()==="["?Q=!0:this._input.peek()==="]"&&(Q=!1)),this._input.next();return this._input.peek()===P&&(z+=this._input.next(),z+=this._input.read(n.identifier)),this._create_token(s.STRING,z)}return null},E.prototype._read_xml=function(P,j){if(this._options.e4x&&P==="<"&&this._allow_regexp_or_xml(j)){var z="",ee=this.__patterns.xml.read_match();if(ee){for(var Q=ee[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),q=Q.indexOf("{")===0,ae=0;ee;){var ge=!!ee[1],pe=ee[2],Ne=!!ee[ee.length-1]||pe.slice(0,8)==="![CDATA[";if(!Ne&&(pe===Q||q&&pe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ge?--ae:++ae),z+=ee[0],ae<=0)break;ee=this.__patterns.xml.read_match()}return ee||(z+=this._input.match(/[\s\S]*/g)[0]),z=z.replace(n.allLineBreaks,`
`),this._create_token(s.STRING,z)}}return null};function L(P){for(var j="",z=0,ee=new b(P),Q=null;ee.hasNext();)if(Q=ee.match(/([\s]|[^\\]|\\\\)+/g),Q&&(j+=Q[0]),ee.peek()==="\\"){if(ee.next(),ee.peek()==="x")Q=ee.match(/x([0-9A-Fa-f]{2})/g);else if(ee.peek()==="u")Q=ee.match(/u([0-9A-Fa-f]{4})/g);else{j+="\\",ee.hasNext()&&(j+=ee.next());continue}if(!Q)return P;if(z=parseInt(Q[1],16),z>126&&z<=255&&Q[0].indexOf("x")===0)return P;if(z>=0&&z<32){j+="\\"+Q[0];continue}else z===34||z===39||z===92?j+="\\"+String.fromCharCode(z):j+=String.fromCharCode(z)}return j}E.prototype._read_string_recursive=function(P,j,z){var ee,Q;P==="'"?Q=this.__patterns.single_quote:P==='"'?Q=this.__patterns.double_quote:P==="`"?Q=this.__patterns.template_text:P==="}"&&(Q=this.__patterns.template_expression);for(var q=Q.read(),ae="";this._input.hasNext();){if(ae=this._input.next(),ae===P||!j&&n.newline.test(ae)){this._input.back();break}else ae==="\\"&&this._input.hasNext()?(ee=this._input.peek(),ee==="x"||ee==="u"?this.has_char_escapes=!0:ee==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ae+=this._input.next()):z&&(z==="${"&&ae==="$"&&this._input.peek()==="{"&&(ae+=this._input.next()),z===ae&&(P==="`"?ae+=this._read_string_recursive("}",j,"`"):ae+=this._read_string_recursive("`",j,"${"),this._input.hasNext()&&(ae+=this._input.next())));ae+=Q.read(),q+=ae}return q},N.exports.Tokenizer=E,N.exports.TOKEN=s,N.exports.positionable_operators=T.slice(),N.exports.line_starters=o.slice()},function(N){var O=RegExp.prototype.hasOwnProperty("sticky");function h(b){this.__input=b||"",this.__input_length=this.__input.length,this.__position=0}h.prototype.restart=function(){this.__position=0},h.prototype.back=function(){this.__position>0&&(this.__position-=1)},h.prototype.hasNext=function(){return this.__position<this.__input_length},h.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__input.charAt(this.__position),this.__position+=1),b},h.prototype.peek=function(b){var A=null;return b=b||0,b+=this.__position,b>=0&&b<this.__input_length&&(A=this.__input.charAt(b)),A},h.prototype.__match=function(b,A){b.lastIndex=A;var a=b.exec(this.__input);return a&&!(O&&b.sticky)&&(a.index!==A&&(a=null)),a},h.prototype.test=function(b,A){return A=A||0,A+=this.__position,A>=0&&A<this.__input_length?!!this.__match(b,A):!1},h.prototype.testChar=function(b,A){var a=this.peek(A);return b.lastIndex=0,a!==null&&b.test(a)},h.prototype.match=function(b){var A=this.__match(b,this.__position);return A?this.__position+=A[0].length:A=null,A},h.prototype.read=function(b,A,a){var r="",n;return b&&(n=this.match(b),n&&(r+=n[0])),A&&(n||!b)&&(r+=this.readUntil(A,a)),r},h.prototype.readUntil=function(b,A){var a="",r=this.__position;b.lastIndex=this.__position;var n=b.exec(this.__input);return n?(r=n.index,A&&(r+=n[0].length)):r=this.__input_length,a=this.__input.substring(this.__position,r),this.__position=r,a},h.prototype.readUntilAfter=function(b){return this.readUntil(b,!0)},h.prototype.get_regexp=function(b,A){var a=null,r="g";return A&&O&&(r="y"),typeof b=="string"&&b!==""?a=new RegExp(b,r):b&&(a=new RegExp(b.source,r)),a},h.prototype.get_literal_regexp=function(b){return RegExp(b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},h.prototype.peekUntilAfter=function(b){var A=this.__position,a=this.readUntilAfter(b);return this.__position=A,a},h.prototype.lookBack=function(b){var A=this.__position-1;return A>=b.length&&this.__input.substring(A-b.length,A).toLowerCase()===b},N.exports.InputScanner=h},function(N,O,h){var b=h(8).InputScanner,A=h(3).Token,a=h(10).TokenStream,r=h(11).WhitespacePattern,n={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},e=function(t,i){this._input=new b(t),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};e.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var t,i=new A(n.START,""),s=null,I=[],C=new a;i.type!==n.EOF;){for(t=this._get_next_token(i,s);this._is_comment(t);)C.add(t),t=this._get_next_token(i,s);C.isEmpty()||(t.comments_before=C,C=new a),t.parent=s,this._is_opening(t)?(I.push(s),s=t):s&&this._is_closing(t,s)&&(t.opened=s,s.closed=t,s=I.pop(),t.parent=s),t.previous=i,i.next=t,this.__tokens.add(t),i=t}return this.__tokens},e.prototype._is_first_token=function(){return this.__tokens.isEmpty()},e.prototype._reset=function(){},e.prototype._get_next_token=function(t,i){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(n.RAW,s):this._create_token(n.EOF,"")},e.prototype._is_comment=function(t){return!1},e.prototype._is_opening=function(t){return!1},e.prototype._is_closing=function(t,i){return!1},e.prototype._create_token=function(t,i){var s=new A(t,i,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},e.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},N.exports.Tokenizer=e,N.exports.TOKEN=n},function(N){function O(h){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=h}O.prototype.restart=function(){this.__position=0},O.prototype.isEmpty=function(){return this.__tokens_length===0},O.prototype.hasNext=function(){return this.__position<this.__tokens_length},O.prototype.next=function(){var h=null;return this.hasNext()&&(h=this.__tokens[this.__position],this.__position+=1),h},O.prototype.peek=function(h){var b=null;return h=h||0,h+=this.__position,h>=0&&h<this.__tokens_length&&(b=this.__tokens[h]),b},O.prototype.add=function(h){this.__parent_token&&(h.parent=this.__parent_token),this.__tokens.push(h),this.__tokens_length+=1},N.exports.TokenStream=O},function(N,O,h){var b=h(12).Pattern;function A(a,r){b.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=""}A.prototype=new b,A.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+"]")},A.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},A.prototype.matching=function(a,r){var n=this._create();return n.__set_whitespace_patterns(a,r),n._update(),n},A.prototype._create=function(){return new A(this._input,this)},A.prototype.__split=function(a,r){a.lastIndex=0;for(var n=0,e=[],t=a.exec(r);t;)e.push(r.substring(n,t.index)),n=t.index+t[0].length,t=a.exec(r);return n<r.length?e.push(r.substring(n,r.length)):e.push(""),e},N.exports.WhitespacePattern=A},function(N){function O(h,b){this._input=h,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,b&&(this._starting_pattern=this._input.get_regexp(b._starting_pattern,!0),this._match_pattern=this._input.get_regexp(b._match_pattern,!0),this._until_pattern=this._input.get_regexp(b._until_pattern),this._until_after=b._until_after)}O.prototype.read=function(){var h=this._input.read(this._starting_pattern);return(!this._starting_pattern||h)&&(h+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),h},O.prototype.read_match=function(){return this._input.match(this._match_pattern)},O.prototype.until_after=function(h){var b=this._create();return b._until_after=!0,b._until_pattern=this._input.get_regexp(h),b._update(),b},O.prototype.until=function(h){var b=this._create();return b._until_after=!1,b._until_pattern=this._input.get_regexp(h),b._update(),b},O.prototype.starting_with=function(h){var b=this._create();return b._starting_pattern=this._input.get_regexp(h,!0),b._update(),b},O.prototype.matching=function(h){var b=this._create();return b._match_pattern=this._input.get_regexp(h,!0),b._update(),b},O.prototype._create=function(){return new O(this._input,this)},O.prototype._update=function(){},N.exports.Pattern=O},function(N){function O(h,b){h=typeof h=="string"?h:h.source,b=typeof b=="string"?b:b.source,this.__directives_block_pattern=new RegExp(h+/ beautify( \w+[:]\w+)+ /.source+b,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(h+/\sbeautify\signore:end\s/.source+b,"g")}O.prototype.get_directives=function(h){if(!h.match(this.__directives_block_pattern))return null;var b={};this.__directive_pattern.lastIndex=0;for(var A=this.__directive_pattern.exec(h);A;)b[A[1]]=A[2],A=this.__directive_pattern.exec(h);return b},O.prototype.readIgnored=function(h){return h.readUntilAfter(this.__directives_end_ignore_pattern)},N.exports.Directives=O},function(N,O,h){var b=h(12).Pattern,A={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(r,n){b.call(this,r,n),this.__template_pattern=null,this._disabled=Object.assign({},A),this._excluded=Object.assign({},A),n&&(this.__template_pattern=this._input.get_regexp(n.__template_pattern),this._excluded=Object.assign(this._excluded,n._excluded),this._disabled=Object.assign(this._disabled,n._disabled));var e=new b(r);this.__patterns={handlebars_comment:e.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:e.starting_with(/{{{/).until_after(/}}}/),handlebars:e.starting_with(/{{/).until_after(/}}/),php:e.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:e.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:e.starting_with(/{%/).until_after(/%}/),django_value:e.starting_with(/{{/).until_after(/}}/),django_comment:e.starting_with(/{#/).until_after(/#}/),smarty:e.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:e.starting_with(/{\*/).until_after(/\*}/),smarty_literal:e.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new b,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(r){var n=this._create();return n._disabled[r]=!0,n._update(),n},a.prototype.read_options=function(r){var n=this._create();for(var e in A)n._disabled[e]=r.templating.indexOf(e)===-1;return n._update(),n},a.prototype.exclude=function(r){var n=this._create();return n._excluded[r]=!0,n._update(),n},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 n=this._read_template();n;)this._match_pattern?n+=this._input.read(this._match_pattern):n+=this._input.readUntil(this.__template_pattern),r+=n,n=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="",n=this._input.peek();if(n==="<"){var e=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&e==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&e==="%"&&(r=r||this.__patterns.erb.read())}else n==="{"&&(!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},N.exports.TemplatablePattern=a}],R={};function Z(N){var O=R[N];if(O!==void 0)return O.exports;var h=R[N]={exports:{}};return F[N](h,h.exports,Z),h.exports}var M=Z(0);U=M})();var X=U;!(ve=[],J=function(){return{js_beautify:X}}.apply(At,ve),J!==void 0&&(It.exports=J))})()},"6eGT":function(It,At,re){"use strict";function ve(J){return null}At.a=ve},"815F":function(It,At,re){"use strict";re.d(At,"e",function(){return Z}),re.d(At,"c",function(){return N}),re.d(At,"d",function(){return O}),re.d(At,"a",function(){return b}),re.d(At,"f",function(){return A}),re.d(At,"b",function(){return a});var ve=re("KQm4"),J=re("VTBJ"),U=re("Ff2n"),X=re("Zm9Q"),F=re("Kwbf"),R=re("OZM5");function Z(r,n){return r!=null?r:n}function M(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=new Map;function e(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(t||[]).forEach(function(s){var I=s.key,C=s.children;Object(F.a)(I!=null,"Tree node must have a certain key: [".concat(i).concat(I,"]"));var _=String(I);Object(F.a)(!n.has(_)||I===null||I===void 0,"Same 'key' exist in the Tree: ".concat(_)),n.set(_,!0),e(C,"".concat(i).concat(_," > "))})}e(r)}function N(r){function n(e){var t=Object(X.a)(e);return t.map(function(i){if(!Object(R.i)(i))return Object(F.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var s=i.key,I=i.props,C=I.children,_=Object(U.a)(I,["children"]),x=Object(J.a)({key:s},_),T=n(C);return T.length&&(x.children=T),x}).filter(function(i){return i})}return n(r)}function O(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],e=new Set(n===!0?[]:n),t=[];function i(s){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(C,_){var x=Object(R.h)(I?I.pos:"0",_),T=Z(C.key,x),d=Object(J.a)(Object(J.a)({},C),{},{parent:I,pos:x,children:null,data:C,isStart:[].concat(Object(ve.a)(I?I.isStart:[]),[_===0]),isEnd:[].concat(Object(ve.a)(I?I.isEnd:[]),[_===s.length-1])});return t.push(d),n===!0||e.has(T)?d.children=i(C.children||[],d):d.children=[],d})}return i(r),t}function h(r,n,e){var t;e?typeof e=="string"?t=function(I){return I[e]}:typeof e=="function"&&(t=function(I){return e(I)}):t=function(I,C){return Z(I.key,C)};function i(s,I,C){var _=s?s.children:r,x=s?Object(R.h)(C.pos,I):"0";if(s){var T=t(s,x),d={node:s,index:I,pos:x,key:T,parentPos:C.node?C.pos:null,level:C.level+1};n(d)}_&&_.forEach(function(u,o){i(u,o,{node:s,pos:x,level:C?C.level+1:-1})})}i(null)}function b(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=n.initWrapper,t=n.processEntity,i=n.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,I={},C={},_={posEntities:I,keyEntities:C};return e&&(_=e(_)||_),h(r,function(x){var T=x.node,d=x.index,u=x.pos,o=x.key,l=x.parentPos,m=x.level,g={node:T,index:d,key:o,pos:u,level:m},E=Z(o,u);I[u]=g,C[E]=g,g.parent=I[l],g.parent&&(g.parent.children=g.parent.children||[],g.parent.children.push(g)),t&&t(g,_)},s),i&&i(_),_}function A(r,n){var e=n.expandedKeys,t=n.selectedKeys,i=n.loadedKeys,s=n.loadingKeys,I=n.checkedKeys,C=n.halfCheckedKeys,_=n.dragOverNodeKey,x=n.dropPosition,T=n.keyEntities,d=T[r],u={eventKey:r,expanded:e.indexOf(r)!==-1,selected:t.indexOf(r)!==-1,loaded:i.indexOf(r)!==-1,loading:s.indexOf(r)!==-1,checked:I.indexOf(r)!==-1,halfChecked:C.indexOf(r)!==-1,pos:String(d?d.pos:""),dragOver:_===r&&x===0,dragOverGapTop:_===r&&x===-1,dragOverGapBottom:_===r&&x===1};return u}function a(r){var n=r.data,e=r.expanded,t=r.selected,i=r.checked,s=r.loaded,I=r.loading,C=r.halfChecked,_=r.dragOver,x=r.dragOverGapTop,T=r.dragOverGapBottom,d=r.pos,u=r.active,o=Object(J.a)(Object(J.a)({},n),{},{expanded:e,selected:t,checked:i,loaded:s,loading:I,halfChecked:C,dragOver:_,dragOverGapTop:x,dragOverGapBottom:T,pos:d,active:u});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(F.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),r}}),o}},"8hTe":function(It,At,re){It.exports={button:"button___1wy9m"}},"9Bee":function(It,At,re){"use strict";var ve=re("DYRE"),J=re("zeV3"),U=re("+L6B"),X=re("2/Rp"),F=re("k1fw"),R=re("9og8"),Z=re("tJVT"),M=re("WmNS"),N=re.n(M),O=re("q1tI"),h=re.n(O),b=re("vg9a"),A=re("DlQD"),a=re.n(A),r=re("rUJ1");function n(H,f){var v=H.match(/^(\s+)(?:```)/);if(v===null)return f;var k=v[1];return f.split(`
`).map(function($){var K=$.match(/^\s+/);if(K===null)return $;var Te=Object(Z.a)(K,1),Ze=Te[0];return Ze.length>=k.length?$.slice(k.length):$}).join(`
`)}var e=[],t=["<ul>"],i=new a.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function I(){e.length=0,t=["<ul>"]}var C={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function _(H,f,v,k){if(f>=H.length||H[f].level<=v)return f;var $=H[f];k.push("<li><a href='#"+$.anchor+"'>"+$.text+"</a>"),f++;var K=[];return f=_(H,f,$.level,K),K.length>0&&(k.push("<ul>"),K.forEach(function(Te){k.push(Te)}),k.push("</ul>")),k.push("</li>"),f=_(H,f,v,k),f}function x(){return _(e,0,0,t),t.push("</ul>"),t.join("")}var T={heading:function(f){var v=s.exec(f);if(v)return{type:"heading",raw:v[0],depth:v[1].length,text:v[2]}},fences:function(f){var v=this.rules.block.fences.exec(f);if(v){var k=v[0],$=n(k,v[3]||""),K=v[2]?v[2].trim():v[2];if(["latex","katex","math"].indexOf(K)>=0){var Te=o(),Ze=$;$=Te,l[Te]={type:"block",expression:Ze}}return{type:"code",raw:k,lang:K,text:$}}}},d=/(?:\${2})([^\n`]+?)(?:\${2})/gi,u=0,o=function(){return"__special_katext_id_".concat(u++,"__")},l={};function m(){return l}function g(){u=0,l={}}function E(H){return H=H.replace(d,function(f,v){var k=o();return l[k]={type:"inline",expression:v},k}),H}var L=i.listitem;i.listitem=function(H){return L(E(H))};var P=i.paragraph;i.paragraph=function(H){return P(E(H))};var j=i.tablecell;i.tablecell=function(H,f){return j(E(H),f)},i.code=function(H,f,v){var k=(f||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"<p class='editormd-tex'>".concat(H,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(f,'">').concat(v?H:Object(r.escape)(H,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(v?H:Object(r.escape)(H,!0))+"</code></pre>"},i.heading=function(H,f,v){var k=this.options.headerPrefix+v.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return e.push({anchor:k,level:f,text:H}),"<h"+f+' id="'+k+'">'+H+"</h"+f+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:T,renderer:i});var z=a.a,ee=re("SJMd"),Q=re("ulZh"),q=re.n(Q),ae=re("m3rI"),ge=re("Oy/b"),pe=re("p5ED"),Ne=re("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Fe=function(H,f){return(Fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,k){v.__proto__=k}||function(v,k){for(var $ in k)Object.prototype.hasOwnProperty.call(k,$)&&(v[$]=k[$])})(H,f)};function He(H,f){function v(){this.constructor=H}Fe(H,f),H.prototype=f===null?Object.create(f):(v.prototype=f.prototype,new v)}function Ke(H,f,v,k){return new(v||(v=Promise))(function($,K){function Te(_t){try{yt(k.next(_t))}catch(rt){K(rt)}}function Ze(_t){try{yt(k.throw(_t))}catch(rt){K(rt)}}function yt(_t){var rt;_t.done?$(_t.value):(rt=_t.value,rt instanceof v?rt:new v(function(Nt){Nt(rt)})).then(Te,Ze)}yt((k=k.apply(H,f||[])).next())})}function Xe(H,f){var v,k,$,K,Te={label:0,sent:function(){if(1&$[0])throw $[1];return $[1]},trys:[],ops:[]};return K={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function Ze(yt){return function(_t){return function(rt){if(v)throw new TypeError("Generator is already executing.");for(;Te;)try{if(v=1,k&&($=2&rt[0]?k.return:rt[0]?k.throw||(($=k.return)&&$.call(k),0):k.next)&&!($=$.call(k,rt[1])).done)return $;switch(k=0,$&&(rt=[2&rt[0],$.value]),rt[0]){case 0:case 1:$=rt;break;case 4:return Te.label++,{value:rt[1],done:!1};case 5:Te.label++,k=rt[1],rt=[0];continue;case 7:rt=Te.ops.pop(),Te.trys.pop();continue;default:if(!($=Te.trys,($=$.length>0&&$[$.length-1])||rt[0]!==6&&rt[0]!==2)){Te=0;continue}if(rt[0]===3&&(!$||rt[1]>$[0]&&rt[1]<$[3])){Te.label=rt[1];break}if(rt[0]===6&&Te.label<$[1]){Te.label=$[1],$=rt;break}if($&&Te.label<$[2]){Te.label=$[2],Te.ops.push(rt);break}$[2]&&Te.ops.pop(),Te.trys.pop();continue}rt=f.call(H,Te)}catch(Nt){rt=[6,Nt],k=0}finally{v=$=0}if(5&rt[0])throw rt[1];return{value:rt[0]?rt[1]:void 0,done:!0}}([yt,_t])}}}function Ce(){for(var H=0,f=0,v=arguments.length;f<v;f++)H+=arguments[f].length;var k=Array(H),$=0;for(f=0;f<v;f++)for(var K=arguments[f],Te=0,Ze=K.length;Te<Ze;Te++,$++)k[$]=K[Te];return k}var ye=function(){function H(){}return H.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},H.setAttributes=function(f,v){for(var k=0,$=v;k<$.length;k++){var K=$[k],Te=K[0],Ze=K[1];f.setAttribute(Te,Ze)}},H.createRect=function(f,v,k){var $=document.createElementNS("http://www.w3.org/2000/svg","rect");return $.setAttribute("width",f.toString()),$.setAttribute("height",v.toString()),k&&H.setAttributes($,k),$},H.createLine=function(f,v,k,$,K){var Te=document.createElementNS("http://www.w3.org/2000/svg","line");return Te.setAttribute("x1",f.toString()),Te.setAttribute("y1",v.toString()),Te.setAttribute("x2",k.toString()),Te.setAttribute("y2",$.toString()),K&&H.setAttributes(Te,K),Te},H.createPolygon=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","polygon");return k.setAttribute("points",f),v&&H.setAttributes(k,v),k},H.createCircle=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","circle");return k.setAttribute("cx",(f/2).toString()),k.setAttribute("cy",(f/2).toString()),k.setAttribute("r",f.toString()),v&&H.setAttributes(k,v),k},H.createEllipse=function(f,v,k){var $=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return $.setAttribute("cx",(f/2).toString()),$.setAttribute("cy",(v/2).toString()),$.setAttribute("rx",(f/2).toString()),$.setAttribute("ry",(v/2).toString()),k&&H.setAttributes($,k),$},H.createGroup=function(f){var v=document.createElementNS("http://www.w3.org/2000/svg","g");return f&&H.setAttributes(v,f),v},H.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},H.createMarker=function(f,v,k,$,K,Te,Ze){var yt=document.createElementNS("http://www.w3.org/2000/svg","marker");return H.setAttributes(yt,[["id",f],["orient",v],["markerWidth",k.toString()],["markerHeight",$.toString()],["refX",K.toString()],["refY",Te.toString()]]),yt.appendChild(Ze),yt},H.createText=function(f){var v=document.createElementNS("http://www.w3.org/2000/svg","text");return v.setAttribute("x","0"),v.setAttribute("y","0"),f&&H.setAttributes(v,f),v},H.createTSpan=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","tspan");return k.textContent=f,v&&H.setAttributes(k,v),k},H.createImage=function(f){var v=document.createElementNS("http://www.w3.org/2000/svg","image");return f&&H.setAttributes(v,f),v},H.createPoint=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return k.x=f,k.y=v,k},H.createPath=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","path");return k.setAttribute("d",f),v&&H.setAttributes(k,v),k},H}(),Pe=function(){function H(){}return H.addKey=function(f){H.key=f},Object.defineProperty(H,"isLicensed",{get:function(){return!!H.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(H.key)},enumerable:!1,configurable:!0}),H}(),Et=function(){function H(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return H.prototype.rasterize=function(f,v,k){var $=this;return new Promise(function(K){var Te=k!==void 0?k:document.createElement("canvas");f===null&&($.markersOnly=!0,$.naturalSize=!1);var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg");Ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ze.setAttribute("width",v.width.baseVal.valueAsString),Ze.setAttribute("height",v.height.baseVal.valueAsString),Ze.setAttribute("viewBox","0 0 "+v.viewBox.baseVal.width.toString()+" "+v.viewBox.baseVal.height.toString()),Ze.innerHTML=v.innerHTML,$.naturalSize===!0?(Ze.width.baseVal.value=f.naturalWidth,Ze.height.baseVal.value=f.naturalHeight):$.width!==void 0&&$.height!==void 0&&(Ze.width.baseVal.value=$.width,Ze.height.baseVal.value=$.height),Te.width=Ze.width.baseVal.value,Te.height=Ze.height.baseVal.value;var yt=Ze.outerHTML,_t=Te.getContext("2d");$.markersOnly!==!0&&_t.drawImage(f,0,0,Te.width,Te.height);var rt=window.URL,Nt=new Image(Te.width,Te.height);Nt.setAttribute("crossOrigin","anonymous");var Ot=new Blob([yt],{type:"image/svg+xml"}),Mt=rt.createObjectURL(Ot);Nt.onload=function(){_t.drawImage(Nt,0,0),rt.revokeObjectURL(Mt);var qt=Te.toDataURL($.imageType,$.imageQuality);K(qt)},Nt.src=Mt})},H}(),mt=function(){},gt=function(){function H(f){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+f+"_"}return Object.defineProperty(H.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(H.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(H.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),H.prototype.addClass=function(f){return this.styleSheet===void 0&&this.addStyleSheet(),f.name=""+this.classNamePrefix+f.localName,this.classes.push(f),this.styleSheet.sheet.insertRule("."+f.name+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length),f},H.prototype.addRule=function(f){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(f),this.styleSheet.sheet.insertRule(f.selector+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length)},H.prototype.addStyleSheet=function(){var f;this.styleSheet=document.createElement("style"),((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).appendChild(this.styleSheet),this.addRule(new bt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new bt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new bt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new oe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new oe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},H.prototype.removeStyleSheet=function(){var f;this.styleSheet&&(((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},H}(),bt=function(H,f){this.selector=H,this.style=f},oe=function(H,f){this.localName=H,this.style=f},V=function(){function H(f,v,k,$,K){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=f,this.displayMode=v,this.markerItems=k,this.uiStyleSettings=$,this.styles=K,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return H.prototype.show=function(f){var v=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=f,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var k=document.createElement("div");k.className=this.toolbarBlockStyleClass.name,k.style.whiteSpace="nowrap",this.uiContainer.appendChild(k),this.addActionButton(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(K){var Te=document.createElement("div");Te.className=""+v.toolbarButtonStyleClass.name,Te.setAttribute("data-type-name",K.typeName),Te.innerHTML=K.icon,Te.addEventListener("click",function(){v.markerToolbarButtonClicked(Te,K)}),v.buttons.push(Te),v.markerButtons.push(Te)}),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 $=document.createElement("div");$.className=this.toolbarBlockStyleClass.name,$.style.whiteSpace="nowrap",$.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild($),this.addActionButton($,'<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($,'<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()},H.prototype.addButtonClickListener=function(f){this.buttonClickListeners.push(f)},H.prototype.removeButtonClickListener=function(f){this.buttonClickListeners.indexOf(f)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(f),1)},H.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},H.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var f=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var v=0;v<this.markerButtons.length;v++)v<f||v===f&&this.markerButtons.length-1===f?this.markerButtonBlock.appendChild(this.markerButtons[v]):(v===f&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[v]))}},H.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")},H.prototype.resetButtonStyles=function(){var f=this;this.buttons.forEach(function(v){v.className=v.className.replace(f.uiStyleSettings.toolbarButtonStyleColorsClassName?f.uiStyleSettings.toolbarButtonStyleColorsClassName:f.toolbarButtonStyleColorsClass.name,"").trim(),v.className=v.className.replace(f.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?f.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:f.toolbarActiveButtonStyleColorsClass.name,"").trim(),v.className+=" "+(f.uiStyleSettings.toolbarButtonStyleColorsClassName?f.uiStyleSettings.toolbarButtonStyleColorsClassName:f.toolbarButtonStyleColorsClass.name)})},H.prototype.addActionButton=function(f,v,k){var $=this,K=document.createElement("div");switch(K.className=""+this.toolbarButtonStyleClass.name,K.innerHTML=v,K.setAttribute("data-action",k),K.addEventListener("click",function(){$.actionToolbarButtonClicked(K,k)}),k){case"select":K.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":K.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":K.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":K.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":K.style.fill=this.uiStyleSettings.closeButtonColor}f.appendChild(K),this.buttons.push(K)},H.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new oe("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 oe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new oe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new oe("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 oe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var f=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new oe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*f)+`px;
padding: `+f+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},H.prototype.markerToolbarButtonClicked=function(f,v){this.setActiveButton(f),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("marker",v)}),this.markerButtonOverflowBlock.style.display="none"},H.prototype.actionToolbarButtonClicked=function(f,v){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",v)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},H.prototype.setActiveButton=function(f){this.resetButtonStyles(),f.className=f.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),f.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},H.prototype.setActiveMarkerButton=function(f){var v=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===f});v&&this.setActiveButton(v)},H.prototype.setCurrentMarker=function(f){var v=this;this.currentMarker=f,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){v.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},H}(),Y=function(){function H(f,v,k,$){this.panels=[],this.panelButtons=[],this.markerjsContainer=f,this.displayMode=v,this.uiStyleSettings=k,this.styles=$,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return H.prototype.addStyles=function(){var f;this.toolboxStyleClass=this.styles.addClass(new oe("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 oe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var v=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new oe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new oe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new oe("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 oe("toolbox-panel-row_colors",`
background-color: `+((f=this.uiStyleSettings.toolboxBackgroundColor)!==null&&f!==void 0?f:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new oe("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*v)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*v)+`px;
padding: `+v+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new bt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new bt("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},H.prototype.show=function(f){var v;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=f,this.uiContainer.className=this.toolboxStyleClass.name+" "+((v=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&v!==void 0?v:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},H.prototype.setPanelButtons=function(f){var v,k,$=this;this.panels=f,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((v=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&v!==void 0?v:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(K){var Te;K.uiStyleSettings=$.uiStyleSettings;var Ze=document.createElement("div");Ze.className=$.toolboxButtonStyleClass.name+" "+((Te=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Te!==void 0?Te:$.toolboxButtonStyleColorsClass.name),Ze.innerHTML=K.icon,Ze.title=K.title,Ze.addEventListener("click",function(){$.panelButtonClick(K)}),$.panelButtons.push(Ze),$.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},H.prototype.panelButtonClick=function(f){var v=this,k=-1;if(f!==this.activePanel){k=this.panels.indexOf(f),this.panelRow.innerHTML="";var $=f.getUi();$.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild($),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=f}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){v.displayMode==="inline"?v.panelRow.style.display="none":v.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(K,Te){var Ze,yt;K.className=v.toolboxButtonStyleClass.name+" "+(Te===k?""+((Ze=v.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:v.toolboxActiveButtonStyleColorsClass.name):""+((yt=v.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&yt!==void 0?yt:v.toolboxButtonStyleColorsClass.name))})},H}(),he=function(H,f){this.title=H,this.icon=f},Se=function(H){function f(v,k,$,K){var Te=H.call(this,v,K||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Te.colors=[],Te.addTransparent=!1,Te.colorBoxes=[],Te.colors=k,Te.currentColor=$,Te.setCurrentColor=Te.setCurrentColor.bind(Te),Te.getColorBox=Te.getColorBox.bind(Te),Te}return He(f,H),f.prototype.getUi=function(){var v=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function($){var K=v.getColorBox($);k.appendChild(K),v.colorBoxes.push(K)}),k},f.prototype.getColorBox=function(v){var k=this,$=this.uiStyleSettings.toolbarHeight/4,K=this.uiStyleSettings.toolbarHeight-$,Te=document.createElement("div");Te.style.display="inline-block",Te.style.boxSizing="content-box",Te.style.width=K-2+"px",Te.style.height=K-2+"px",Te.style.padding="1px",Te.style.marginRight="2px",Te.style.marginBottom="2px",Te.style.borderWidth="2px",Te.style.borderStyle="solid",Te.style.borderRadius=(K+2)/2+"px",Te.style.borderColor=v===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Te.addEventListener("click",function(){k.setCurrentColor(v,Te)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=K-2+"px",Ze.style.height=K-2+"px",Ze.style.backgroundColor=v,Ze.style.borderRadius=K/2+"px",v==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.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>`),Te.appendChild(Ze),Te},f.prototype.setCurrentColor=function(v,k){var $=this;this.currentColor=v,this.colorBoxes.forEach(function(K){K.style.borderColor=K===k?$.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(v)},f}(he),Ue=function(){function H(f,v,k){this._state="new",this._isSelected=!1,this._container=f,this._overlayContainer=v,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(H.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),H.prototype.ownsTarget=function(f){return!1},Object.defineProperty(H.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),H.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},H.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},H.prototype.pointerDown=function(f,v){},H.prototype.dblClick=function(f,v){},H.prototype.manipulate=function(f){},H.prototype.pointerUp=function(f){this.stateChanged()},H.prototype.dispose=function(){},H.prototype.addMarkerVisualToContainer=function(f){this.container.childNodes.length>0?this.container.insertBefore(f,this.container.childNodes[0]):this.container.appendChild(f)},H.prototype.getState=function(){return{typeName:H.typeName,state:this.state,notes:this.notes}},H.prototype.restoreState=function(f){this._state=f.state,this.notes=f.notes},H.prototype.scale=function(f,v){},H.prototype.colorChanged=function(f){this.onColorChanged&&this.onColorChanged(f),this.stateChanged()},H.prototype.fillColorChanged=function(f){this.onFillColorChanged&&this.onFillColorChanged(f),this.stateChanged()},H.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var f=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),f.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(f)&&this.onStateChanged(this)}},H.typeName="MarkerBase",H}(),Ie=function(){function H(){this.findGripByVisual=this.findGripByVisual.bind(this)}return H.prototype.findGripByVisual=function(f){return this.topLeft.ownsTarget(f)?this.topLeft:this.topCenter.ownsTarget(f)?this.topCenter:this.topRight.ownsTarget(f)?this.topRight:this.centerLeft.ownsTarget(f)?this.centerLeft:this.centerRight.ownsTarget(f)?this.centerRight:this.bottomLeft.ownsTarget(f)?this.bottomLeft:this.bottomCenter.ownsTarget(f)?this.bottomCenter:this.bottomRight.ownsTarget(f)?this.bottomRight:void 0},H}(),st=function(){function H(){this.GRIP_SIZE=10,this.visual=ye.createGroup(),this.visual.appendChild(ye.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ye.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return H.prototype.ownsTarget=function(f){return f===this.visual||f===this.visual.childNodes[0]||f===this.visual.childNodes[1]},H}(),it=function(){function H(){}return H.toITransformMatrix=function(f){return{a:f.a,b:f.b,c:f.c,d:f.d,e:f.e,f:f.f}},H.toSVGMatrix=function(f,v){return f.a=v.a,f.b=v.b,f.c=v.c,f.d=v.d,f.e=v.e,f.f=v.f,f},H}(),ut=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.left=0,K.top=0,K.width=0,K.height=0,K.defaultSize={x:50,y:20},K.offsetX=0,K.offsetY=0,K.rotationAngle=0,K.CB_DISTANCE=10,K._suppressMarkerCreateEvent=!1,K.container.transform.baseVal.appendItem(ye.createTransform()),K.setupControlBox(),K}return He(f,H),Object.defineProperty(f.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"visual",{get:function(){return this._visual},set:function(v){this._visual=v;var k=ye.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),f.prototype.ownsTarget=function(v){return!!H.prototype.ownsTarget.call(this,v)||!!(this.controlGrips.findGripByVisual(v)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(v))},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.state==="new"&&(this.left=v.x,this.top=v.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var $=this.unrotatePoint(v);if(this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.offsetX=$.x-this.left,this.offsetY=$.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(k),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k)){this.activeGrip=this.rotatorGrip;var K=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=K.x-this.width/2,this.top=K.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Te=this.container.transform.baseVal.getItem(0);Te.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Te,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},f.prototype.pointerUp=function(v){var k=this.state;H.prototype.pointerUp.call(this,v),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(v),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},f.prototype.moveVisual=function(v){this.visual.style.transform="translate("+v.x+"px, "+v.y+"px)"},f.prototype.manipulate=function(v){var k=this.unrotatePoint(v);this.state==="creating"?this.resize(v):this.state==="move"?(this.left=this.manipulationStartLeft+(k.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(k.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(k):this.state==="rotate"&&this.rotate(v)},f.prototype.resize=function(v){var k=this.manipulationStartLeft,$=this.manipulationStartWidth,K=this.manipulationStartTop,Te=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+v.x-this.manipulationStartX,$=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:$=this.manipulationStartWidth+v.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:K=this.manipulationStartTop+v.y-this.manipulationStartY,Te=this.manipulationStartHeight+this.manipulationStartTop-K;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Te=this.manipulationStartHeight+v.y-this.manipulationStartY}$>=0?(this.left=k,this.width=$):(this.left=k+$,this.width=-$),Te>=0?(this.top=K,this.height=Te):(this.top=K+Te,this.height=-Te),this.setSize()},f.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},f.prototype.rotate=function(v){if(Math.abs(v.x-this.centerX)>.1){var k=Math.sign(v.x-this.centerX);this.rotationAngle=180*Math.atan((v.y-this.centerY)/(v.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},f.prototype.applyRotation=function(){var v=this.container.transform.baseVal.getItem(0);v.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(v,0)},f.prototype.rotatePoint=function(v){if(this.rotationAngle===0)return v;var k=this.container.getCTM(),$=ye.createPoint(v.x,v.y);return{x:($=$.matrixTransform(k)).x,y:$.y}},f.prototype.unrotatePoint=function(v){if(this.rotationAngle===0)return v;var k=this.container.getCTM();k=k.inverse();var $=ye.createPoint(v.x,v.y);return{x:($=$.matrixTransform(k)).x,y:$.y}},f.prototype.select=function(){H.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},f.prototype.deselect=function(){H.prototype.deselect.call(this),this.controlBox.style.display="none"},f.prototype.setupControlBox=function(){this.controlBox=ye.createGroup();var v=ye.createTransform();v.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(v),this.container.appendChild(this.controlBox),this.controlRect=ye.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=ye.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 Ie,this.addControlGrips(),this.controlBox.style.display="none"},f.prototype.adjustControlBox=function(){var v=this.controlBox.transform.baseVal.getItem(0);v.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(v,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()},f.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()},f.prototype.createGrip=function(){var v=new st;return v.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(v.visual),v},f.prototype.positionGrips=function(){var v=this.controlGrips.topLeft.GRIP_SIZE,k=-v/2,$=k,K=(this.width+this.CB_DISTANCE)/2-v/2,Te=(this.height+this.CB_DISTANCE)/2-v/2,Ze=this.height+this.CB_DISTANCE-v/2,yt=this.width+this.CB_DISTANCE-v/2;this.positionGrip(this.controlGrips.topLeft.visual,k,$),this.positionGrip(this.controlGrips.topCenter.visual,K,$),this.positionGrip(this.controlGrips.topRight.visual,yt,$),this.positionGrip(this.controlGrips.centerLeft.visual,k,Te),this.positionGrip(this.controlGrips.centerRight.visual,yt,Te),this.positionGrip(this.controlGrips.bottomLeft.visual,k,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,K,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,yt,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,K,$-3*this.CB_DISTANCE)},f.prototype.positionGrip=function(v,k,$){var K=v.transform.baseVal.getItem(0);K.setTranslate(k,$),v.transform.baseVal.replaceItem(K,0)},f.prototype.hideControlBox=function(){this.controlBox.style.display="none"},f.prototype.showControlBox=function(){this.controlBox.style.display=""},f.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:it.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:it.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},H.prototype.getState.call(this))},f.prototype.restoreState=function(v){H.prototype.restoreState.call(this,v);var k=v;this.left=k.left,this.top=k.top,this.width=k.width,this.height=k.height,this.rotationAngle=k.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(it.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},f.prototype.scale=function(v,k){H.prototype.scale.call(this,v,k);var $=this.rotatePoint({x:this.left,y:this.top}),K=this.unrotatePoint({x:$.x*v,y:$.y*k});this.left=K.x,this.top=K.y,this.width=this.width*v,this.height=this.height*k,this.adjustControlBox()},f}(Ue),dt=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.fillColor="transparent",K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.opacity=1,K.setStrokeColor=K.setStrokeColor.bind(K),K.setFillColor=K.setFillColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.createVisual=K.createVisual.bind(K),K}return He(f,H),f.prototype.ownsTarget=function(v){return!(!H.prototype.ownsTarget.call(this,v)&&v!==this.visual)},f.prototype.createVisual=function(){this.visual=ye.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)},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.state==="new"&&(this.createVisual(),this.moveVisual(v),this._state="creating")},f.prototype.manipulate=function(v){H.prototype.manipulate.call(this,v)},f.prototype.resize=function(v){H.prototype.resize.call(this,v),this.setSize()},f.prototype.setSize=function(){H.prototype.setSize.call(this),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},f.prototype.pointerUp=function(v){H.prototype.pointerUp.call(this,v),this.setSize()},f.prototype.setStrokeColor=function(v){this.strokeColor=v,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(v),this.stateChanged()},f.prototype.setFillColor=function(v){this.fillColor=v,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},f.prototype.setStrokeWidth=function(v){this.strokeWidth=v,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},f.prototype.setStrokeDasharray=function(v){this.strokeDasharray=v,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},f.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},H.prototype.getState.call(this))},f.prototype.restoreState=function(v){var k=v;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),H.prototype.restoreState.call(this,v),this.setSize()},f.prototype.scale=function(v,k){H.prototype.scale.call(this,v,k),this.setSize()},f.title="Rectangle marker",f}(ut),vt=function(H){function f(v,k,$,K){var Te=H.call(this,v,K||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Te.widths=[],Te.widthBoxes=[],Te.widths=k,Te.currentWidth=$,Te.setCurrentWidth=Te.setCurrentWidth.bind(Te),Te}return He(f,H),f.prototype.getUi=function(){var v=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function($){var K=document.createElement("div");K.style.display="flex",K.style.flexGrow="2",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.borderColor=$===v.currentWidth?v.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){v.setCurrentWidth($,K)}),k.appendChild(K);var Te=document.createElement("div");Te.innerText=$.toString(),Te.style.marginRight="5px",K.appendChild(Te);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var yt=document.createElement("hr");yt.style.minWidth="20px",yt.style.border="0px",yt.style.borderTop=$+"px solid "+v.uiStyleSettings.toolboxColor,yt.style.flexGrow="2",Ze.appendChild(yt),K.appendChild(Ze),v.widthBoxes.push(K)}),k},f.prototype.setCurrentWidth=function(v,k){var $=this;this.currentWidth=v,this.widthBoxes.forEach(function(K){K.style.borderColor=K===k?$.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},f}(he),Tt=function(H){function f(v,k,$,K){var Te=H.call(this,v,K||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Te.styles=[],Te.styleBoxes=[],Te.styles=k,Te.currentStyle=$,Te.setCurrentStyle=Te.setCurrentStyle.bind(Te),Te}return He(f,H),f.prototype.getUi=function(){var v=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function($){var K=document.createElement("div");K.style.display="flex",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.overflow="hidden",K.style.maxWidth=100/v.styles.length-5+"%",K.style.borderColor=$===v.currentStyle?v.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){v.setCurrentStyle($,K)}),k.appendChild(K);var Te=document.createElement("div");Te.style.minHeight="20px",Te.style.flexGrow="2",Te.style.overflow="hidden";var Ze=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+v.uiStyleSettings.toolboxColor+'" stroke-width="3" '+($!==""?'stroke-dasharray="'+$+'"':"")+` />
</svg>`;Te.innerHTML=Ze,K.appendChild(Te),v.styleBoxes.push(K)}),k},f.prototype.setCurrentStyle=function(v,k){var $=this;this.currentStyle=v,this.styleBoxes.forEach(function(K){K.style.borderColor=K===k?$.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},f}(he),Me=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.strokeColor=$.defaultColor,K.strokeWidth=$.defaultStrokeWidth,K.strokeDasharray=$.defaultStrokeDasharray,K.strokePanel=new Se("Line color",$.defaultColorSet,$.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new vt("Line width",$.defaultStrokeWidths,$.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new Tt("Line style",$.defaultStrokeDasharrays,$.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return He(f,H),Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=H.prototype.getState.call(this);return v.typeName=f.typeName,v},f.typeName="FrameMarker",f.title="Frame marker",f.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',f}(dt),Ye=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},tt=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.x1=0,K.y1=0,K.x2=0,K.y2=0,K.defaultLength=50,K.manipulationStartX=0,K.manipulationStartY=0,K.manipulationStartX1=0,K.manipulationStartY1=0,K.manipulationStartX2=0,K.manipulationStartY2=0,K.setupControlBox(),K}return He(f,H),f.prototype.ownsTarget=function(v){return!!H.prototype.ownsTarget.call(this,v)||!(!this.grip1.ownsTarget(v)&&!this.grip2.ownsTarget(v))},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.manipulationStartX=v.x,this.manipulationStartY=v.y,this.state==="new"&&(this.x1=v.x,this.y1=v.y,this.x2=v.x,this.y2=v.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(k)?this.activeGrip=this.grip1:this.grip2.ownsTarget(k)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},f.prototype.pointerUp=function(v){var k=this.state;H.prototype.pointerUp.call(this,v),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(v),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},f.prototype.adjustVisual=function(){},f.prototype.manipulate=function(v){this.state==="creating"?this.resize(v):this.state==="move"?(this.x1=this.manipulationStartX1+v.x-this.manipulationStartX,this.y1=this.manipulationStartY1+v.y-this.manipulationStartY,this.x2=this.manipulationStartX2+v.x-this.manipulationStartX,this.y2=this.manipulationStartY2+v.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(v)},f.prototype.resize=function(v){switch(this.activeGrip){case this.grip1:this.x1=v.x,this.y1=v.y;break;case this.grip2:case void 0:this.x2=v.x,this.y2=v.y}this.adjustVisual(),this.adjustControlBox()},f.prototype.select=function(){H.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},f.prototype.deselect=function(){H.prototype.deselect.call(this),this.controlBox.style.display="none"},f.prototype.setupControlBox=function(){this.controlBox=ye.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},f.prototype.adjustControlBox=function(){this.positionGrips()},f.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},f.prototype.createGrip=function(){var v=new st;return v.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(v.visual),v},f.prototype.positionGrips=function(){var v=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-v/2,this.y1-v/2),this.positionGrip(this.grip2.visual,this.x2-v/2,this.y2-v/2)},f.prototype.positionGrip=function(v,k,$){var K=v.transform.baseVal.getItem(0);K.setTranslate(k,$),v.transform.baseVal.replaceItem(K,0)},f.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},H.prototype.getState.call(this))},f.prototype.restoreState=function(v){H.prototype.restoreState.call(this,v);var k=v;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},f.prototype.scale=function(v,k){H.prototype.scale.call(this,v,k),this.x1=this.x1*v,this.y1=this.y1*k,this.x2=this.x2*v,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},f}(Ue),at=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.setStrokeColor=K.setStrokeColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.strokeColor=$.defaultColor,K.strokeWidth=$.defaultStrokeWidth,K.strokeDasharray=$.defaultStrokeDasharray,K.strokePanel=new Se("Line color",$.defaultColorSet,$.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new vt("Line width",$.defaultStrokeWidths,$.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new Tt("Line style",$.defaultStrokeDasharrays,$.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return He(f,H),f.prototype.ownsTarget=function(v){return!(!H.prototype.ownsTarget.call(this,v)&&v!==this.visual&&v!==this.selectorLine&&v!==this.visibleLine)},f.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorLine=ye.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ye.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)},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},f.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()),ye.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},f.prototype.setStrokeColor=function(v){this.strokeColor=v,this.adjustVisual(),this.colorChanged(v)},f.prototype.setStrokeWidth=function(v){this.strokeWidth=v,this.adjustVisual()},f.prototype.setStrokeDasharray=function(v){this.strokeDasharray=v,this.adjustVisual(),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},H.prototype.getState.call(this));return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){H.prototype.restoreState.call(this,v);var k=v;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},f.typeName="LineMarker",f.title="Line marker",f.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',f}(tt),ze=function(H){function f(v,k,$,K){var Te=H.call(this,v,K||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Te.fonts=[],Te.fontBoxes=[],Te.fonts=k,Te.currentFont=$,Te.setCurrentFont=Te.setCurrentFont.bind(Te),Te}return He(f,H),f.prototype.getUi=function(){var v=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function($){var K=document.createElement("div");K.style.display="inline-block",K.style.alignItems="center",K.style.justifyContent="space-between",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.overflow="hidden",K.style.maxWidth=100/v.fonts.length-5+"%",K.style.borderColor=$===v.currentFont?v.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){v.setCurrentFont($,K)}),k.appendChild(K);var Te=document.createElement("div");Te.style.display="flex",Te.style.minHeight="20px",Te.style.flexGrow="2",Te.style.fontFamily=$,Te.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",Te.appendChild(Ze),K.appendChild(Te),v.fontBoxes.push(K)}),k},f.prototype.setCurrentFont=function(v,k){var $=this;this.currentFont=v,this.fontBoxes.forEach(function(K){K.style.borderColor=K===k?$.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},f}(he),qe=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.color="transparent",K.padding=5,K.DEFAULT_TEXT="your text here",K.text=K.DEFAULT_TEXT,K.isMoved=!1,K.color=$.defaultColor,K.fontFamily=$.defaultFontFamily,K.defaultSize={x:100,y:30},K.setColor=K.setColor.bind(K),K.setFont=K.setFont.bind(K),K.renderText=K.renderText.bind(K),K.sizeText=K.sizeText.bind(K),K.textEditDivClicked=K.textEditDivClicked.bind(K),K.showTextEditor=K.showTextEditor.bind(K),K.setSize=K.setSize.bind(K),K.positionTextEditor=K.positionTextEditor.bind(K),K.colorPanel=new Se("Color",$.defaultColorSet,$.defaultColor),K.colorPanel.onColorChanged=K.setColor,K.fontFamilyPanel=new ze("Font",$.defaultFontFamilies,$.defaultFontFamily),K.fontFamilyPanel.onFontChanged=K.setFont,K}return He(f,H),f.prototype.ownsTarget=function(v){if(H.prototype.ownsTarget.call(this,v)||v===this.visual||v===this.textElement||v===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function($){$===v&&(k=!0)}),k},f.prototype.createVisual=function(){this.visual=ye.createGroup(),this.bgRectangle=ye.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ye.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.isMoved=!1,this.pointerDownPoint=v,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(v),this._state="creating")},f.prototype.renderText=function(){var v=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(k){v.textElement.appendChild(ye.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},f.prototype.getTextScale=function(){var v=this.textElement.getBBox(),k=1;if(v.width>0&&v.height>0){var $=(1*this.width-this.width*this.padding*2/100)/v.width,K=(1*this.height-this.height*this.padding*2/100)/v.height;k=Math.min($,K)}return k},f.prototype.getTextPosition=function(v){var k=this.textElement.getBBox(),$=0,K=0;return k.width>0&&k.height>0&&($=(this.width-k.width*v)/2,K=this.height/2-k.height*v/2),{x:$,y:K}},f.prototype.sizeText=function(){var v=this.textElement.getBBox(),k=this.getTextScale(),$=this.getTextPosition(k);$.y-=v.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+$.x+"px, "+$.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate($.x,$.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},f.prototype.manipulate=function(v){H.prototype.manipulate.call(this,v),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(v.x-this.pointerDownPoint.x)>5||Math.abs(v.y-this.pointerDownPoint.y)>5)},f.prototype.resize=function(v){H.prototype.resize.call(this,v),this.isMoved=!0,this.setSize(),this.sizeText()},f.prototype.setSize=function(){H.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},f.prototype.pointerUp=function(v){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),H.prototype.pointerUp.call(this,v),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},f.prototype.showTextEditor=function(){var v=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(k){k.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var k=Number.parseFloat(v.textEditor.style.fontSize);v.textEditor.clientWidth>=Number.parseInt(v.textEditor.style.maxWidth)&&k>.9;)k-=.1,v.textEditor.style.fontSize=Math.max(k,.9)+"em"}),this.textEditor.addEventListener("keyup",function(k){k.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(k){if(k.clipboardData){var $=k.clipboardData.getData("text"),K=window.getSelection();if(!K.rangeCount)return!1;K.deleteFromDocument(),K.getRangeAt(0).insertNode(document.createTextNode($)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){v.textEditDivClicked(v.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},f.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var v=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),$=this.textElement.getBBox(),K={x:$.width*v,y:$.height*v};k.x-=K.x/2,k.y-=K.y/2,this.textEditor.style.top=k.y+"px",this.textEditor.style.left=k.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-k.x+"px",this.textEditor.style.fontSize=Math.max(16*v,12)+"px",this.textElement.style.display="none"}},f.prototype.textEditDivClicked=function(v){this.text=v.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},f.prototype.select=function(){H.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},f.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),H.prototype.deselect.call(this)},f.prototype.dblClick=function(v,k){H.prototype.dblClick.call(this,v,k),this.showTextEditor()},f.prototype.setColor=function(v){this.textElement&&ye.setAttributes(this.textElement,[["fill",v]]),this.color=v,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(v)},f.prototype.setFont=function(v){this.textElement&&ye.setAttributes(this.textElement,[["font-family",v]]),this.fontFamily=v,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},f.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},f.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},H.prototype.getState.call(this));return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){var k=v;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),H.prototype.restoreState.call(this,v),this.setSize()},f.prototype.scale=function(v,k){H.prototype.scale.call(this,v,k),this.setSize(),this.sizeText(),this.positionTextEditor()},f.typeName="TextMarker",f.title="Text marker",f.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>',f}(ut),Oe=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.color="transparent",K.lineWidth=3,K.drawing=!1,K.pixelRatio=1,K.color=$.defaultColor,K.lineWidth=$.defaultStrokeWidth,K.pixelRatio=$.freehandPixelRatio,K.setColor=K.setColor.bind(K),K.addCanvas=K.addCanvas.bind(K),K.finishCreation=K.finishCreation.bind(K),K.setLineWidth=K.setLineWidth.bind(K),K.colorPanel=new Se("Color",$.defaultColorSet,$.defaultColor),K.colorPanel.onColorChanged=K.setColor,K.lineWidthPanel=new vt("Line width",$.defaultStrokeWidths,$.defaultStrokeWidth),K.lineWidthPanel.onWidthChanged=K.setLineWidth,K}return He(f,H),f.prototype.ownsTarget=function(v){return!(!H.prototype.ownsTarget.call(this,v)&&v!==this.visual&&v!==this.drawingImage)},f.prototype.createVisual=function(){this.visual=ye.createGroup(),this.drawingImage=ye.createImage(),this.visual.appendChild(this.drawingImage);var v=ye.createTransform();this.visual.transform.baseVal.appendItem(v),this.addMarkerVisualToContainer(this.visual)},f.prototype.pointerDown=function(v,k){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(v.x,v.y),this.drawing=!0):H.prototype.pointerDown.call(this,v,k)},f.prototype.manipulate=function(v){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(v.x,v.y),this.canvasContext.stroke()):H.prototype.manipulate.call(this,v)},f.prototype.resize=function(v){H.prototype.resize.call(this,v),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},f.prototype.pointerUp=function(v){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):H.prototype.pointerUp.call(this,v)},f.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)},f.prototype.select=function(){this.state==="creating"&&this.finishCreation(),H.prototype.select.call(this)},f.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),H.prototype.deselect.call(this)},f.prototype.finishCreation=function(){for(var v=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],$=k[0],K=k[1],Te=k[2],Ze=k[3],yt=!1,_t=0;_t<this.canvasElement.height;_t++)for(var rt=0;rt<this.canvasElement.width;rt++)v.data[_t*this.canvasElement.width*4+4*rt+3]>0&&(yt=!0,_t<K&&(K=_t),rt<$&&($=rt),_t>Ze&&(Ze=_t),rt>Te&&(Te=rt));if(yt){this.left=$/this.pixelRatio,this.top=K/this.pixelRatio,this.width=(Te-$)/this.pixelRatio,this.height=(Ze-K)/this.pixelRatio;var Nt=document.createElement("canvas");Nt.width=Te-$,Nt.height=Ze-K,Nt.getContext("2d").putImageData(this.canvasContext.getImageData($,K,Te-$,Ze-K),0,0),this.drawingImgUrl=Nt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},f.prototype.setDrawingImage=function(){ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},f.prototype.setColor=function(v){this.color=v,this.colorChanged(v)},f.prototype.setLineWidth=function(v){this.lineWidth=v},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=Object.assign({drawingImgUrl:this.drawingImgUrl},H.prototype.getState.call(this));return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){this.createVisual(),H.prototype.restoreState.call(this,v),this.drawingImgUrl=v.drawingImgUrl,this.setDrawingImage()},f.prototype.scale=function(v,k){H.prototype.scale.call(this,v,k),this.setDrawingImage()},f.typeName="FreehandMarker",f.title="Freehand marker",f.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>',f}(ut),be=function(H){function f(v,k,$){var K=H.call(this,v,$||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return K.typeBoxes=[],K.currentType=k,K.setCurrentType=K.setCurrentType.bind(K),K}return He(f,H),f.prototype.getUi=function(){var v=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var $=function(Ze){var yt="both";switch(Ze){case 0:yt="both";break;case 1:yt="start";break;case 2:yt="end";break;case 3:yt="none"}var _t=document.createElement("div");if(_t.style.display="flex",_t.style.flexGrow="2",_t.style.alignItems="center",_t.style.justifyContent="space-between",_t.style.padding="5px",_t.style.borderWidth="2px",_t.style.borderStyle="solid",_t.style.borderColor=yt===K.currentType?K.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){v.setCurrentType(yt,_t)}),k.appendChild(_t),yt==="both"||yt==="start"){var rt=document.createElement("div");rt.style.display="flex",rt.style.alignItems="center",rt.style.minHeight="20px",rt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,rt.style.marginLeft="5px",_t.appendChild(rt)}var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.style.flexGrow="2";var Ot=document.createElement("hr");if(Ot.style.minWidth="20px",Ot.style.border="0px",Ot.style.borderTop="3px solid "+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee"),Ot.style.flexGrow="2",Nt.appendChild(Ot),_t.appendChild(Nt),yt==="both"||yt==="end"){var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.minHeight="20px",Mt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Mt.style.marginRight="5px",_t.appendChild(Mt)}K.typeBoxes.push(_t)},K=this,Te=0;Te<4;Te++)$(Te);return k},f.prototype.setCurrentType=function(v,k){var $=this;this.currentType=v,this.typeBoxes.forEach(function(K){K.style.borderColor=K===k?$.uiStyleSettings!==void 0?$.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},f}(he),_e=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.arrowType="end",K.arrowBaseHeight=10,K.arrowBaseWidth=10,K.getArrowPoints=K.getArrowPoints.bind(K),K.setArrowType=K.setArrowType.bind(K),K.arrowTypePanel=new be("Arrow type","end"),K.arrowTypePanel.onArrowTypeChanged=K.setArrowType,K}return He(f,H),f.prototype.ownsTarget=function(v){return!(!H.prototype.ownsTarget.call(this,v)&&v!==this.arrow1&&v!==this.arrow2)},f.prototype.getArrowPoints=function(v,k){var $=this.arrowBaseWidth+2*this.strokeWidth,K=this.arrowBaseHeight+2*this.strokeWidth;return v-$/2+","+(k+K/2)+" "+v+","+(k-K/2)+" "+(v+$/2)+","+(k+K/2)},f.prototype.createTips=function(){this.arrow1=ye.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ye.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow2)},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.state==="creating"&&this.createTips()},f.prototype.adjustVisual=function(){if(H.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",ye.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ye.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var v=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.arrow1.transform.baseVal.getItem(0);k.setRotate(v,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var $=this.arrow2.transform.baseVal.getItem(0);$.setRotate(v+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem($,0)}},f.prototype.setArrowType=function(v){this.arrowType=v,this.adjustVisual(),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=Object.assign({arrowType:this.arrowType},H.prototype.getState.call(this));return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){H.prototype.restoreState.call(this,v);var k=v;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},f.typeName="ArrowMarker",f.title="Arrow marker",f.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',f}(at),se=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.fillColor=$.defaultFillColor,K.strokeWidth=0,K.fillPanel=new Se("Color",$.defaultColorSet,$.defaultFillColor),K.fillPanel.onColorChanged=K.setFillColor,K}return He(f,H),Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=H.prototype.getState.call(this);return v.typeName=f.typeName,v},f.typeName="CoverMarker",f.title="Cover marker",f.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',f}(dt),le=function(H){function f(v,k,$,K){var Te=H.call(this,v,K||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Te.opacities=[],Te.opacityBoxes=[],Te.opacities=k,Te.currentOpacity=$,Te.setCurrentOpacity=Te.setCurrentOpacity.bind(Te),Te}return He(f,H),f.prototype.getUi=function(){var v=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",k.style.justifyContent="space-between",this.opacities.forEach(function($){var K=document.createElement("div");K.style.display="flex",K.style.alignItems="center",K.style.justifyContent="center",K.style.padding="5px",K.style.borderWidth="2px",K.style.borderStyle="solid",K.style.borderColor=$===v.currentOpacity?v.uiStyleSettings.toolboxAccentColor:"transparent",K.addEventListener("click",function(){v.setCurrentOpacity($,K)}),k.appendChild(K);var Te=document.createElement("div");Te.innerText=100*$+"%",K.appendChild(Te),v.opacityBoxes.push(K)}),k},f.prototype.setCurrentOpacity=function(v,k){var $=this;this.currentOpacity=v,this.opacityBoxes.forEach(function(K){K.style.borderColor=K===k?$.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},f}(he),me=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.setOpacity=K.setOpacity.bind(K),K.fillColor=$.defaultHighlightColor,K.strokeWidth=0,K.opacity=$.defaultHighlightOpacity,K.fillPanel=new Se("Color",$.defaultColorSet,K.fillColor),K.fillPanel.onColorChanged=K.setFillColor,K.opacityPanel=new le("Opacity",$.defaultOpacitySteps,K.opacity),K.opacityPanel.onOpacityChanged=K.setOpacity,K}return He(f,H),f.prototype.setOpacity=function(v){this.opacity=v,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=H.prototype.getState.call(this);return v.typeName=f.typeName,v},f.typeName="HighlightMarker",f.title="Highlight marker",f.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>',f}(se),we='<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>',We=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.bgColor="transparent",K.tipPosition={x:0,y:0},K.tipBase1Position={x:0,y:0},K.tipBase2Position={x:0,y:0},K.tipMoving=!1,K.color=$.defaultStrokeColor,K.bgColor=$.defaultFillColor,K.fontFamily=$.defaultFontFamily,K.defaultSize={x:100,y:30},K.setBgColor=K.setBgColor.bind(K),K.getTipPoints=K.getTipPoints.bind(K),K.positionTip=K.positionTip.bind(K),K.setTipPoints=K.setTipPoints.bind(K),K.colorPanel=new Se("Text color",$.defaultColorSet,K.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),K.colorPanel.onColorChanged=K.setColor,K.bgColorPanel=new Se("Fill color",$.defaultColorSet,K.bgColor,we),K.bgColorPanel.onColorChanged=K.setBgColor,K.fontFamilyPanel=new ze("Font",$.defaultFontFamilies,$.defaultFontFamily),K.fontFamilyPanel.onFontChanged=K.setFont,K.tipGrip=new st,K.tipGrip.visual.transform.baseVal.appendItem(ye.createTransform()),K.controlBox.appendChild(K.tipGrip.visual),K}return He(f,H),f.prototype.ownsTarget=function(v){return H.prototype.ownsTarget.call(this,v)||this.tipGrip.ownsTarget(v)||this.tip===v},f.prototype.createTip=function(){ye.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ye.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},f.prototype.pointerDown=function(v,k){this.state==="new"&&H.prototype.pointerDown.call(this,v,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):H.prototype.pointerDown.call(this,v,k)},f.prototype.pointerUp=function(v){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,H.prototype.pointerUp.call(this,v);else{var k=this.state==="creating";H.prototype.pointerUp.call(this,v),this.setTipPoints(k),this.positionTip()}},f.prototype.manipulate=function(v){if(this.tipMoving){var k=this.unrotatePoint(v);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else H.prototype.manipulate.call(this,v)},f.prototype.setBgColor=function(v){this.bgRectangle&&this.tip&&(ye.setAttributes(this.bgRectangle,[["fill",v]]),ye.setAttributes(this.tip,[["fill",v]])),this.bgColor=v,this.fillColorChanged(v)},f.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},f.prototype.setTipPoints=function(v){v===void 0&&(v=!1);var k=Math.min(this.height/2,15),$=this.height/5;v&&(this.tipPosition={x:k+$/2,y:this.height+20});var K=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?K<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?($=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:k,y:0},this.tipBase2Position={x:k+$,y:0}):(this.tipBase1Position={x:0,y:k},this.tipBase2Position={x:0,y:k+$}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?K<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?($=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-k-$,y:0},this.tipBase2Position={x:this.width-k,y:0}):(this.tipBase1Position={x:this.width,y:k},this.tipBase2Position={x:this.width,y:k+$}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?K<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?($=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-k-$,y:this.height},this.tipBase2Position={x:this.width-k,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-k-$},this.tipBase2Position={x:this.width,y:this.height-k}):K<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?($=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:k,y:this.height},this.tipBase2Position={x:k+$,y:this.height}):(this.tipBase1Position={x:0,y:this.height-k},this.tipBase2Position={x:0,y:this.height-k-$})},f.prototype.resize=function(v){H.prototype.resize.call(this,v),this.positionTip()},f.prototype.positionTip=function(){ye.setAttributes(this.tip,[["points",this.getTipPoints()]]);var v=this.tipGrip.visual.transform.baseVal.getItem(0);v.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(v,0)},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),f.prototype.select=function(){this.positionTip(),H.prototype.select.call(this)},f.prototype.getState=function(){var v=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},H.prototype.getState.call(this));return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){var k=v;this.bgColor=k.bgColor,this.tipPosition=k.tipPosition,H.prototype.restoreState.call(this,v),this.createTip(),this.setTipPoints()},f.prototype.scale=function(v,k){H.prototype.scale.call(this,v,k),this.tipPosition={x:this.tipPosition.x*v,y:this.tipPosition.y*k},this.positionTip()},f.typeName="CalloutMarker",f.title="Callout marker",f.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>',f}(qe),$e=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.fillColor="transparent",K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.opacity=1,K.strokeColor=$.defaultColor,K.strokeWidth=$.defaultStrokeWidth,K.strokeDasharray=$.defaultStrokeDasharray,K.fillColor=$.defaultFillColor,K.setStrokeColor=K.setStrokeColor.bind(K),K.setFillColor=K.setFillColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.setOpacity=K.setOpacity.bind(K),K.createVisual=K.createVisual.bind(K),K.strokePanel=new Se("Line color",Ce($.defaultColorSet,["transparent"]),$.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.fillPanel=new Se("Fill color",Ce($.defaultColorSet,["transparent"]),K.fillColor,we),K.fillPanel.onColorChanged=K.setFillColor,K.strokeWidthPanel=new vt("Line width",$.defaultStrokeWidths,$.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new Tt("Line style",$.defaultStrokeDasharrays,$.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K.opacityPanel=new le("Opacity",$.defaultOpacitySteps,K.opacity),K.opacityPanel.onOpacityChanged=K.setOpacity,K}return He(f,H),f.prototype.ownsTarget=function(v){return!(!H.prototype.ownsTarget.call(this,v)&&v!==this.visual)},f.prototype.createVisual=function(){this.visual=ye.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)},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.state==="new"&&(this.createVisual(),this.moveVisual(v),this._state="creating")},f.prototype.manipulate=function(v){H.prototype.manipulate.call(this,v)},f.prototype.resize=function(v){H.prototype.resize.call(this,v),this.setSize()},f.prototype.setSize=function(){H.prototype.setSize.call(this),ye.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},f.prototype.pointerUp=function(v){H.prototype.pointerUp.call(this,v),this.setSize()},f.prototype.setStrokeColor=function(v){this.strokeColor=v,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(v),this.stateChanged()},f.prototype.setFillColor=function(v){this.fillColor=v,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(v),this.stateChanged()},f.prototype.setStrokeWidth=function(v){this.strokeWidth=v,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},f.prototype.setStrokeDasharray=function(v){this.strokeDasharray=v,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},f.prototype.setOpacity=function(v){this.opacity=v,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},H.prototype.getState.call(this));return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){var k=v;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),H.prototype.restoreState.call(this,v),this.setSize()},f.prototype.scale=function(v,k){H.prototype.scale.call(this,v,k),this.setSize()},f.typeName="EllipseMarker",f.title="Ellipse marker",f.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>',f}(ut),pt=function(H){function f(v,k,$){return H.call(this,v,k,$)||this}return He(f,H),Object.defineProperty(f.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),f.prototype.ownsTarget=function(v){return!(!H.prototype.ownsTarget.call(this,v)&&v!==this.tip1&&v!==this.tip2)},f.prototype.createTips=function(){this.tip1=ye.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(ye.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ye.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(ye.createTransform()),this.visual.appendChild(this.tip2)},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.state==="creating"&&this.createTips()},f.prototype.adjustVisual=function(){if(H.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ye.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()]]),ye.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 v=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.tip1.transform.baseVal.getItem(0);k.setRotate(v,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var $=this.tip2.transform.baseVal.getItem(0);$.setRotate(v+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem($,0)}},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=H.prototype.getState.call(this);return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){H.prototype.restoreState.call(this,v),this.createTips(),this.adjustVisual()},f.typeName="MeasurementMarker",f.title="Measurement marker",f.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>',f}(at),Bt=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.strokePanel.colors=$.defaultColorSet,K.fillColor="transparent",K}return He(f,H),Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=H.prototype.getState.call(this);return v.typeName=f.typeName,v},f.typeName="EllipseFrameMarker",f.title="Ellipse frame marker",f.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>',f}($e),Rt=function(){function H(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(H.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),H.prototype.addUndoStep=function(f){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(f)||(this.undoStack.push(f),JSON.stringify(this.lastRedoStep)!==JSON.stringify(f)&&this.redoStack.splice(0,this.redoStack.length))},H.prototype.replaceLastUndoStep=function(f){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=f)},H.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},H.prototype.undo=function(){if(this.undoStack.length>1){var f=this.undoStack.pop();return f!==void 0&&this.redoStack.push(f),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},H.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},H}(),Ct=function(H){function f(v,k,$){var K=H.call(this,v,k,$)||this;return K.strokeColor="transparent",K.strokeWidth=0,K.strokeDasharray="",K.curveX=0,K.curveY=0,K.manipulationStartCurveX=0,K.manipulationStartCurveY=0,K.setStrokeColor=K.setStrokeColor.bind(K),K.setStrokeWidth=K.setStrokeWidth.bind(K),K.setStrokeDasharray=K.setStrokeDasharray.bind(K),K.positionGrips=K.positionGrips.bind(K),K.addControlGrips=K.addControlGrips.bind(K),K.adjustVisual=K.adjustVisual.bind(K),K.setupControlBox=K.setupControlBox.bind(K),K.resize=K.resize.bind(K),K.strokeColor=$.defaultColor,K.strokeWidth=$.defaultStrokeWidth,K.strokeDasharray=$.defaultStrokeDasharray,K.strokePanel=new Se("Line color",$.defaultColorSet,$.defaultColor),K.strokePanel.onColorChanged=K.setStrokeColor,K.strokeWidthPanel=new vt("Line width",$.defaultStrokeWidths,$.defaultStrokeWidth),K.strokeWidthPanel.onWidthChanged=K.setStrokeWidth,K.strokeStylePanel=new Tt("Line style",$.defaultStrokeDasharrays,$.defaultStrokeDasharray),K.strokeStylePanel.onStyleChanged=K.setStrokeDasharray,K}return He(f,H),f.prototype.ownsTarget=function(v){return!(!H.prototype.ownsTarget.call(this,v)&&v!==this.visual&&v!==this.selectorCurve&&v!==this.visibleCurve&&!this.curveGrip.ownsTarget(v))},f.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},f.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorCurve=ye.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ye.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)},f.prototype.pointerDown=function(v,k){H.prototype.pointerDown.call(this,v,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=v.x,this.curveY=v.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},f.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ye.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},f.prototype.setupControlBox=function(){H.prototype.setupControlBox.call(this),this.curveControlLine1=ye.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ye.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)},f.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,H.prototype.addControlGrips.call(this)},f.prototype.positionGrips=function(){H.prototype.positionGrips.call(this);var v=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-v/2,this.curveY-v/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()))},f.prototype.manipulate=function(v){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+v.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+v.y-this.manipulationStartY),H.prototype.manipulate.call(this,v)},f.prototype.resize=function(v){this.activeGrip===this.curveGrip&&(this.curveX=v.x,this.curveY=v.y),H.prototype.resize.call(this,v),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},f.prototype.setStrokeColor=function(v){this.strokeColor=v,this.adjustVisual(),this.colorChanged(v)},f.prototype.setStrokeWidth=function(v){this.strokeWidth=v,this.adjustVisual()},f.prototype.setStrokeDasharray=function(v){this.strokeDasharray=v,this.adjustVisual()},f.prototype.scale=function(v,k){this.curveX=this.curveX*v,this.curveY=this.curveY*k,H.prototype.scale.call(this,v,k)},Object.defineProperty(f.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),f.prototype.getState=function(){var v=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},H.prototype.getState.call(this));return v.typeName=f.typeName,v},f.prototype.restoreState=function(v){H.prototype.restoreState.call(this,v);var k=v;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},f.typeName="CurveMarker",f.title="Curve marker",f.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>',f}(tt),tr=function(){function H(f,v){v===void 0&&(v=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=f,this.cancelable=v}return Object.defineProperty(H.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),H.prototype.preventDefault=function(){this._defaultPrevented=!0},H}(),zt=function(H){function f(v,k,$){var K=H.call(this,v,!1)||this;return K.dataUrl=k,K.state=$,K}return He(f,H),f}(tr),ft=function(H){function f(v,k,$){$===void 0&&($=!1);var K=H.call(this,v,$)||this;return K.marker=k,K}return He(f,H),f}(tr),Pt=function(){function H(){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 H.prototype.addEventListener=function(f,v){this[f].push(v)},H.prototype.removeEventListener=function(f,v){var k=this[f].indexOf(v);k>-1&&this[f].splice(k,1)},H}(),Yt=function(){function H(f){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ye,this._isOpen=!1,this.undoRedoManager=new Rt,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 Pt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=H.instanceCounter++,this.styles=new gt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=f,this.targetRoot=document.body,this.width=f.clientWidth,this.height=f.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(H.prototype,"ALL_MARKER_TYPES",{get:function(){return[Me,Oe,_e,qe,Bt,$e,me,We,pt,se,at,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Me,Oe,_e,qe,$e,me,We]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Me,Oe,_e,qe,me]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(f){var v=this;this._availableMarkerTypes.splice(0),f.forEach(function(k){if(typeof k=="string"){var $=v.ALL_MARKER_TYPES.find(function(K){return K.typeName===k});$!==void 0&&v._availableMarkerTypes.push($)}else v._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(f){this._zoomLevel=f,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(H.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),H.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Pe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},H.prototype.show=function(){var f=this;this.styles.styleSheetRoot===void 0&&mt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=mt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(v){return v(new tr(f))})},H.prototype.render=function(){return Ke(this,void 0,void 0,function(){var f;return Xe(this,function(v){switch(v.label){case 0:return this.setCurrentMarker(),(f=new Et).naturalSize=this.renderAtNaturalSize,f.imageType=this.renderImageType,f.imageQuality=this.renderImageQuality,f.markersOnly=this.renderMarkersOnly,f.width=this.renderWidth,f.height=this.renderHeight,[4,f.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return v.sent(),[4,f.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,v.sent()]}})})},H.prototype.close=function(f){var v=this;if(f===void 0&&(f=!1),this.isOpen){var k=!1;f||this.eventListeners.beforeclose.forEach(function($){var K=new tr(v,!0);$(K),K.defaultPrevented&&(k=!0)}),k||(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($){return $(new tr(v))}),this.detachEvents(),this._isOpen=!1)}},H.prototype.addMarkersToToolbar=function(){for(var f,v=[],k=0;k<arguments.length;k++)v[k]=arguments[k];(f=this._availableMarkerTypes).push.apply(f,v)},H.prototype.addRenderEventListener=function(f){this.addEventListener("render",function(v){f(v.dataUrl,v.state)})},H.prototype.removeRenderEventListener=function(f){},H.prototype.addCloseEventListener=function(f){this.addEventListener("close",function(){f()})},H.prototype.removeCloseEventListener=function(f){},H.prototype.setupResizeObserver=function(){var f=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){f.resize(f.target.clientWidth,f.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return f.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},H.prototype.onPopupTargetResize=function(){var f=1*this.target.clientWidth/this.target.clientHeight,v=this.editorCanvas.clientWidth/f>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*f:this.editorCanvas.clientWidth,k=v<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/f;this.resize(v,k)},H.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},H.prototype.resize=function(f,v){this._isResizing=!0;var k=f/this.imageWidth,$=v/this.imageHeight;this.imageWidth=Math.round(f),this.imageHeight=Math.round(v),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(k,$),this._isResizing=!1},H.prototype.scaleMarkers=function(f,v){var k,$=this;this._currentMarker&&this._currentMarker instanceof qe?this._currentMarker.scale(f,v):(k=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(K){K!==$._currentMarker&&K.scale(f,v)}),k!==void 0&&this.setCurrentMarker(k)},H.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"},H.prototype.setTopLeft=function(){var f=this.editingTarget.getBoundingClientRect(),v=this.editorCanvas.getBoundingClientRect();this.left=f.left-v.left,this.top=f.top-v.top},H.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)},H.prototype.addDefs=function(){for(var f,v=[],k=0;k<arguments.length;k++)v[k]=arguments[k];this.defs=ye.createDefs(),this.addDefsToImage(),(f=this.defs).append.apply(f,v)},H.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},H.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)},H.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},H.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},H.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)},H.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},H.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)},H.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 f=document.createElement("a");f.href="https://markerjs.com/",f.target="_blank",f.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>',f.title="Powered by marker.js",f.style.display="grid",f.style.alignItems="center",f.style.justifyItems="center",f.style.padding="3px",f.style.width="20px",f.style.height="20px",this.logoUI.appendChild(f),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},H.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")},H.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"},H.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},H.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 f=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=f+"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 V(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 Y(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},H.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},H.prototype.removeMarker=function(f){this.markerImage.removeChild(f.container),this.markers.indexOf(f)>-1&&this.markers.splice(this.markers.indexOf(f),1),f.dispose()},H.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())},H.prototype.toolbarButtonClicked=function(f,v){if(f==="marker"&&v!==void 0)this.createNewMarker(v);else if(f==="action")switch(v){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()}},H.prototype.deleteSelectedMarker=function(){var f=this;if(this._currentMarker!==void 0){var v=!1;if(this.eventListeners.markerbeforedelete.forEach(function($){var K=new ft(f,f._currentMarker,!0);$(K),K.defaultPrevented&&(v=!0)}),!v){var k=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($){return $(new ft(f,k))})}}},H.prototype.clear=function(){var f=this,v=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Te){var Ze=new ft(f,void 0,!0);Te(Ze),Ze.defaultPrevented&&(v=!0)}),!v)){this.setCurrentMarker();for(var k=function(Te){var Ze=$.markers[Te];$.setCurrentMarker($.markers[Te]),$._currentMarker.dispose(),$.markerImage.removeChild($._currentMarker.container),$.markers.splice($.markers.indexOf($._currentMarker),1),$.eventListeners.markerdelete.forEach(function(yt){return yt(new ft(f,Ze))})},$=this,K=this.markers.length-1;K>=0;K--)k(K);this.addUndoStep()}},Object.defineProperty(H.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),H.prototype.showNotesEditor=function(){var f;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=(f=this._currentMarker.notes)!==null&&f!==void 0?f:"",this.overlayContainer.appendChild(this.notesArea))},H.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)},H.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},H.prototype.addUndoStep=function(){var f=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var v=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===v.width&&k.height===v.height){var $=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(v),$<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(K){return K(new tr(f))})}else this.undoRedoManager.replaceLastUndoStep(v),this.eventListeners.statechange.forEach(function(K){return K(new tr(f))})}},H.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},H.prototype.undoStep=function(){var f=this,v=this.undoRedoManager.undo();v!==void 0&&(this.restoreState(v),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(k){return k(new tr(f))}))},H.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},H.prototype.redoStep=function(){var f=this,v=this.undoRedoManager.redo();v!==void 0&&(this.restoreState(v),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(k){return k(new tr(f))}))},H.prototype.stepZoom=function(){var f=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=f<this.zoomSteps.length-1?this.zoomSteps[f+1]:this.zoomSteps[0]},H.prototype.panTo=function(f){this.contentDiv.scrollBy({left:this.prevPanPoint.x-f.x,top:this.prevPanPoint.y-f.y}),this.prevPanPoint=f},H.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var f,v,k=this;return Xe(this,function($){switch($.label){case 0:return[4,this.render()];case 1:return f=$.sent(),v=this.getState(),this.eventListeners.render.forEach(function(K){return K(new zt(k,f,v))}),this.close(!0),[2]}})})},H.prototype.getState=function(f){f===!0&&this.setCurrentMarker();var v={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(k){return v.markers.push(k.getState())}),v},H.prototype.restoreState=function(f){var v=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);f.markers.forEach(function(k){var $=v._availableMarkerTypes.find(function(Te){return Te.typeName===k.typeName});if($!==void 0){var K=v.addNewMarker($);K.restoreState(k),v.markers.push(K)}}),f.width&&f.height&&(f.width!==this.imageWidth||f.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/f.width,this.imageHeight/f.height),this.eventListeners.restorestate.forEach(function(k){return k(new tr(v))})},H.prototype.addNewMarker=function(f){var v=ye.createGroup();return this.markerImage.appendChild(v),new f(v,this.overlayContainer,this.settings)},H.prototype.createNewMarker=function(f){var v,k=this;(v=typeof f=="string"?this._availableMarkerTypes.find(function($){return $.typeName===f}):f)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(v),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(v.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function($){return $(new ft(k,k._currentMarker))}))},H.prototype.markerCreated=function(f){var v=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(f),this.setCurrentMarker(f),f instanceof Oe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Oe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(k){return k(new ft(v,v._currentMarker))})},H.prototype.colorChanged=function(f){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=f,this.settings.defaultStrokeColor=f)},H.prototype.fillColorChanged=function(f){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=f)},H.prototype.markerStateChanged=function(f){var v=this;this.eventListeners.markerchange.forEach(function(k){return k(new ft(v,f))})},H.prototype.setCurrentMarker=function(f){var v=this;this._currentMarker!==f&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(k){return k(new ft(v,v._currentMarker))})),this._currentMarker=f,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(k){return k(new ft(v,v._currentMarker))}))},H.prototype.onPointerDown=function(f){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||f.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var v=this.markers.find(function(k){return k.ownsTarget(f.target)});v!==void 0?(this.setCurrentMarker(v),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(f.clientX,f.clientY),f.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:f.clientX,y:f.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(f.clientX,f.clientY))},H.prototype.onDblClick=function(f){if(this._isFocused||this.focus(),this.mode==="select"){var v=this.markers.find(function(k){return k.ownsTarget(f.target)});v!==void 0&&v!==this._currentMarker&&this.setCurrentMarker(v),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(f.clientX,f.clientY),f.target):this.setCurrentMarker()}},H.prototype.onPointerMove=function(f){this.touchPoints!==1&&f.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||f.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(f.clientX,f.clientY)):this.zoomLevel>1&&this.panTo({x:f.clientX,y:f.clientY}))},H.prototype.onPointerUp=function(f){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(f.clientX,f.clientY)),this.isDragging=!1,this.addUndoStep()},H.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},H.prototype.onKeyUp=function(f){this._currentMarker===void 0||this.notesArea!==void 0||f.key!=="Delete"&&f.key!=="Backspace"||this.deleteSelectedMarker()},H.prototype.clientToLocalCoordinates=function(f,v){var k=this.markerImage.getBoundingClientRect();return{x:(f-k.left)/this.zoomLevel,y:(v-k.top)/this.zoomLevel}},H.prototype.onWindowResize=function(){this.positionUI()},H.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var f=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=f+"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()},H.prototype.addLicenseKey=function(f){Pe.addKey(f)},H.prototype.addEventListener=function(f,v){this.eventListeners.addEventListener(f,v)},H.prototype.removeEventListener=function(f,v){this.eventListeners.removeEventListener(f,v)},H.prototype.renderState=function(f){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(f),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(H.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),H.prototype.focus=function(){var f=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(v){return v(new tr(f))}))},H.prototype.blur=function(){var f=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(v){return v(new tr(f))}))},H.instanceCounter=0,H}();/* **********************************
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 Lt=function(H,f){return(Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,k){v.__proto__=k}||function(v,k){for(var $ in k)Object.prototype.hasOwnProperty.call(k,$)&&(v[$]=k[$])})(H,f)};function ir(H,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function v(){this.constructor=H}Lt(H,f),H.prototype=f===null?Object.create(f):(v.prototype=f.prototype,new v)}function Vt(H,f,v,k){return new(v||(v=Promise))(function($,K){function Te(_t){try{yt(k.next(_t))}catch(rt){K(rt)}}function Ze(_t){try{yt(k.throw(_t))}catch(rt){K(rt)}}function yt(_t){var rt;_t.done?$(_t.value):(rt=_t.value,rt instanceof v?rt:new v(function(Nt){Nt(rt)})).then(Te,Ze)}yt((k=k.apply(H,f||[])).next())})}function rr(H,f){var v,k,$,K,Te={label:0,sent:function(){if(1&$[0])throw $[1];return $[1]},trys:[],ops:[]};return K={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(K[Symbol.iterator]=function(){return this}),K;function Ze(yt){return function(_t){return function(rt){if(v)throw new TypeError("Generator is already executing.");for(;Te;)try{if(v=1,k&&($=2&rt[0]?k.return:rt[0]?k.throw||(($=k.return)&&$.call(k),0):k.next)&&!($=$.call(k,rt[1])).done)return $;switch(k=0,$&&(rt=[2&rt[0],$.value]),rt[0]){case 0:case 1:$=rt;break;case 4:return Te.label++,{value:rt[1],done:!1};case 5:Te.label++,k=rt[1],rt=[0];continue;case 7:rt=Te.ops.pop(),Te.trys.pop();continue;default:if(!($=Te.trys,($=$.length>0&&$[$.length-1])||rt[0]!==6&&rt[0]!==2)){Te=0;continue}if(rt[0]===3&&(!$||rt[1]>$[0]&&rt[1]<$[3])){Te.label=rt[1];break}if(rt[0]===6&&Te.label<$[1]){Te.label=$[1],$=rt;break}if($&&Te.label<$[2]){Te.label=$[2],Te.ops.push(rt);break}$[2]&&Te.ops.pop(),Te.trys.pop();continue}rt=f.call(H,Te)}catch(Nt){rt=[6,Nt],k=0}finally{v=$=0}if(5&rt[0])throw rt[1];return{value:rt[0]?rt[1]:void 0,done:!0}}([yt,_t])}}}var cr=function(){function H(){}return H.addKey=function(f){H.key=f},Object.defineProperty(H,"isLicensed",{get:function(){return!!H.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(H.key)},enumerable:!1,configurable:!0}),H}(),ot=function(){function H(){}return H.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},H.setAttributes=function(f,v){for(var k=0,$=v;k<$.length;k++){var K=$[k],Te=K[0],Ze=K[1];f.setAttribute(Te,Ze)}},H.createRect=function(f,v,k){var $=document.createElementNS("http://www.w3.org/2000/svg","rect");return $.setAttribute("width",f.toString()),$.setAttribute("height",v.toString()),k&&H.setAttributes($,k),$},H.createLine=function(f,v,k,$,K){var Te=document.createElementNS("http://www.w3.org/2000/svg","line");return Te.setAttribute("x1",f.toString()),Te.setAttribute("y1",v.toString()),Te.setAttribute("x2",k.toString()),Te.setAttribute("y2",$.toString()),K&&H.setAttributes(Te,K),Te},H.createPolygon=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","polygon");return k.setAttribute("points",f),v&&H.setAttributes(k,v),k},H.createCircle=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","circle");return k.setAttribute("cx",(f/2).toString()),k.setAttribute("cy",(f/2).toString()),k.setAttribute("r",f.toString()),v&&H.setAttributes(k,v),k},H.createEllipse=function(f,v,k){var $=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return $.setAttribute("cx",(f/2).toString()),$.setAttribute("cy",(v/2).toString()),$.setAttribute("rx",(f/2).toString()),$.setAttribute("ry",(v/2).toString()),k&&H.setAttributes($,k),$},H.createGroup=function(f){var v=document.createElementNS("http://www.w3.org/2000/svg","g");return f&&H.setAttributes(v,f),v},H.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},H.createMarker=function(f,v,k,$,K,Te,Ze){var yt=document.createElementNS("http://www.w3.org/2000/svg","marker");return H.setAttributes(yt,[["id",f],["orient",v],["markerWidth",k.toString()],["markerHeight",$.toString()],["refX",K.toString()],["refY",Te.toString()]]),yt.appendChild(Ze),yt},H.createText=function(f){var v=document.createElementNS("http://www.w3.org/2000/svg","text");return v.setAttribute("x","0"),v.setAttribute("y","0"),f&&H.setAttributes(v,f),v},H.createTSpan=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","tspan");return k.textContent=f,v&&H.setAttributes(k,v),k},H.createImage=function(f){var v=document.createElementNS("http://www.w3.org/2000/svg","image");return f&&H.setAttributes(v,f),v},H.createPoint=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return k.x=f,k.y=v,k},H.createPath=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg","path");return k.setAttribute("d",f),v&&H.setAttributes(k,v),k},H.createElement=function(f,v){var k=document.createElementNS("http://www.w3.org/2000/svg",f);return v&&H.setAttributes(k,v),k},H.getHollowRectanglePath=function(f,v,k,$,K,Te,Ze,yt){return"M"+f+","+v+"V"+(v+$)+"H"+(f+k)+"V"+v+"H"+K+"V"+Te+"H"+(K+Ze)+"V"+(Te+yt)+"H"+K+"V"+v+"Z"},H}(),Kt=function(){function H(f){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+f+"_"}return Object.defineProperty(H.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(H.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(H.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),H.prototype.addClass=function(f){return this.styleSheet===void 0&&this.addStyleSheet(),f.name=""+this.classNamePrefix+f.localName,this.classes.push(f),this.styleSheet.sheet.insertRule("."+f.name+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length),f},H.prototype.addRule=function(f){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(f),this.styleSheet.sheet.insertRule(f.selector+" {"+f.style+"}",this.styleSheet.sheet.cssRules.length)},H.prototype.addStyleSheet=function(){var f;this.styleSheet=document.createElement("style"),((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).appendChild(this.styleSheet),this.addRule(new nr("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new nr("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new nr("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Jt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Jt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},H.prototype.removeStyleSheet=function(){var f;this.styleSheet&&(((f=this.styleSheetRoot)!==null&&f!==void 0?f:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},H}(),nr=function(H,f){this.selector=H,this.style=f},Jt=function(H,f){this.localName=H,this.style=f},or=function(){function H(){this.blocks=[],this.display=""}return H.prototype.addButtonBlock=function(f){f.className=this.blockClassName,f.buttonClassName=this.buttonClassName,f.buttonColorsClassName=this.buttonColorsClassName,f.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(f)},H.prototype.addElementBlock=function(f){f.className===void 0&&(f.className=this.blockClassName),this.blocks.push(f)},H.prototype.getUI=function(){var f=document.createElement("div");return f.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,f.style.display=this.display,this.blocks.forEach(function(v){return f.appendChild(v.getUI())}),f},H}(),jr=function(){function H(){}return H.prototype.getUI=function(){var f=document.createElement("div");if(f.className=this.className,this.minWidth!==void 0&&(f.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":f.style.justifyContent="flex-start";break;case"center":f.style.justifyContent="center";break;case"end":f.style.justifyContent="flex-end"}return f.style.whiteSpace="nowrap",f},H}(),un=function(H){function f(){var v=H!==null&&H.apply(this,arguments)||this;return v.buttons=[],v}return ir(f,H),f.prototype.addButton=function(v){v.className=this.buttonClassName,v.colorsClassName=this.buttonColorsClassName,v.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(v)},f.prototype.getUI=function(){var v=H.prototype.getUI.call(this);return this.buttons.forEach(function(k){return v.appendChild(k.getUI())}),v},f}(jr),Zr=function(){function H(f,v){this._isActive=!1,this._isHidden=!1,this._icon=f,this.title=v,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(H.prototype,"icon",{get:function(){return this._icon},set:function(f){this._icon=f,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isActive",{get:function(){return this._isActive},set:function(f){this._isActive=f,this.adjustClassName()},enumerable:!1,configurable:!0}),H.prototype.getUI=function(){var f=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 f.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},H.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,"")))},H.prototype.hide=function(){this._isHidden=!0},H}(),kr=function(H){function f(){var v=H!==null&&H.apply(this,arguments)||this;return v.elements=[],v}return ir(f,H),f.prototype.addElement=function(v){this.elements.push(v)},f.prototype.getUI=function(){var v=H.prototype.getUI.call(this);return this.elements.forEach(function(k){return v.appendChild(k)}),v},f}(jr),Pr=function(){function H(f,v){this.horizontal=f,this.vertical=v}return Object.defineProperty(H.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),H.prototype.getVerticalLength=function(f){return f/this.ratio},H.prototype.getHorizontalLength=function(f){return f*this.ratio},H}(),qr=function(){function H(){}return H.getIcon=function(f,v){if(f>0&&v>0){var k=new Pr(f,v),$=k.ratio>=1?20:k.getHorizontalLength(20),K=k.ratio<1?20:k.getVerticalLength(20),Te=document.createElementNS("http://www.w3.org/2000/svg","svg");Te.setAttribute("xmlns","http://www.w3.org/2000/svg"),Te.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Te);var Ze=ot.createDefs();Te.appendChild(Ze);var yt=ot.createElement("clipPath",[["id","text-bg-clip"]]);Ze.appendChild(yt);var _t=ot.createPath(ot.getHollowRectanglePath((24-$)/2,(24-K)/2,$,K,(24-$)/2+2,(24-K)/2+2,$-4,K-4));Te.appendChild(_t);var rt=ot.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);rt.appendChild(ot.createTSpan(f+":"+v)),Te.appendChild(rt);var Nt=rt.getBBox();ot.setAttributes(rt,[["x",((24-Nt.width)/2).toString()],["y",((24-Nt.height)/2-Nt.y).toString()]]);var Ot=ot.createPath(ot.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Nt.width))/2,(24-Math.ceil(Nt.height))/2,Math.ceil(Nt.width),Math.ceil(Nt.height)));return yt.appendChild(Ot),ot.setAttributes(_t,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Te),Te.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>'},H}(),Wr=function(H){function f(v,k,$){var K=H.call(this,v,k)||this;return K.isDropdownOpen=!1,K.onClick=K.dropdownButtonClicked,K.dropdownButtons=$,K}return ir(f,H),f.prototype.setupDropdown=function(){var v=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(k){k.className=v.className,k.colorsClassName=v.colorsClassName,v.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},f.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},f.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},f.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},f.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},f.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},f}(Zr),cn=function(){function H(f,v){this.GRIP_SIZE=10,this.color=f,this.fillColor=v,this.visual=ot.createGroup(),this.visual.appendChild(ot.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ot.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return H.prototype.ownsTarget=function(f){return f===this.visual||f===this.visual.childNodes[0]||f===this.visual.childNodes[1]},H.prototype.setCenter=function(f,v){this.visual.childNodes.forEach(function(k){return ot.setAttributes(k,[["cx",f.toString()],["cy",v.toString()]])})},H}(),Gr=function(){function H(f,v,k,$){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=f,this.canvasHeight=v,this.margin=k,this.container=$,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(H.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(f){this._aspectRatio=f,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(f){this._isGridVisible=f,this.gridContainer&&ot.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(f){this._zoomFactor=f,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),H.prototype.open=function(){var f=this;this.cropShadeElement=ot.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ot.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var v=0;v<this.numberOfGridLines;v++)this.horizontalGridLines.push(ot.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(ot.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(k){return f.gridContainer.appendChild(k)}),this.verticalGridLines.forEach(function(k){return f.gridContainer.appendChild(k)}),this.cropRectElement=ot.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new cn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new cn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new cn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new cn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},H.prototype.setCropRectangle=function(f){this.cropRect=f;var v=Object.assign({},this.cropRect);this.zoomFactor!==1&&(v.width=this.cropRect.width*this.zoomFactor,v.height=this.cropRect.height*this.zoomFactor,v.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-v.width/2,v.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-v.height/2),ot.setAttributes(this.cropRectElement,[["x",v.x.toString()],["y",v.y.toString()],["width",v.width.toString()],["height",v.height.toString()]]);var k=v.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(K,Te){var Ze=v.y+k*(Te+1);ot.setAttributes(K,[["x1",""+v.x],["y1",""+Ze],["x2",""+(v.x+v.width)],["y2",""+Ze]])});var $=v.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(K,Te){var Ze=v.x+$*(Te+1);ot.setAttributes(K,[["x1",""+Ze],["y1",""+v.y],["x2",""+Ze],["y2",""+(v.y+v.height)]])}),ot.setAttributes(this.cropShadeElement,[["d",ot.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,v.x,v.y,v.width,v.height)]]),this.topLeftGrip.setCenter(v.x,v.y),this.topRightGrip.setCenter(v.x+v.width,v.y),this.bottomLeftGrip.setCenter(v.x,v.y+v.height),this.bottomRightGrip.setCenter(v.x+v.width,v.y+v.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},H.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)},H.prototype.clientToLocalCoordinates=function(f,v){var k=this.container.getBoundingClientRect();return{x:f-k.left+this.margin,y:v-k.top+this.margin}},H.prototype.onPointerDown=function(f){this.container.setPointerCapture(f.pointerId),this.previousPoint=this.clientToLocalCoordinates(f.clientX,f.clientY),this.cropRectElement===f.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(f.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(f.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(f.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(f.target)&&(this.activeGrip=this.bottomRightGrip)},H.prototype.onPointerMove=function(f){if(this.isMoving)this.move(this.clientToLocalCoordinates(f.clientX,f.clientY));else if(this.activeGrip){var v=this.clientToLocalCoordinates(f.clientX,f.clientY);this.resize(v)}f.preventDefault()},H.prototype.onPointerUp=function(f){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(f.pointerId)},H.prototype.move=function(f){var v=f.x-this.previousPoint.x,k=f.y-this.previousPoint.y;this.zoomFactor!==1&&(v=-v/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+v),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+k),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=f},H.prototype.resize=function(f){var v=Object.assign({},this.cropRect),k=f.x-this.previousPoint.x,$=f.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:v.x+k<this.margin&&(k=this.margin-v.x),v.x+=k,v.width=this.cropRect.x+this.cropRect.width-v.x;break;case this.bottomRightGrip:case this.topRightGrip:v.width+k>this.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-v.width),v.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(v.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),v.height=this.aspectRatio.getVerticalLength(v.width)):(v.y+=$,v.height=this.cropRect.y+this.cropRect.height-v.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?v.height=this.aspectRatio.getVerticalLength(v.width):v.height+=$}v.width<10&&(v.x=this.cropRect.x,v.width=10),v.height<10&&(v.y=this.cropRect.y,v.height=10),this.previousPoint=f,v.x>=this.margin&&v.y>=this.margin&&v.x-this.margin+v.width<=this.canvasWidth&&v.y-this.margin+v.height<=this.canvasHeight&&(this.cropRect=v,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},H.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var f=this.cropRect.x+this.cropRect.width/2,v=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),$=this.aspectRatio.getVerticalLength(this.cropRect.width);k/this.canvasWidth<$/this.canvasHeight?this.cropRect.width=k:this.cropRect.height=$,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=f-this.cropRect.width/2,this.cropRect.y=v-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)}},H.prototype.getRescaledRect=function(f,v,k,$,K,Te){var Ze=k/f,yt=$/v;return{x:(K.x-Te)*Ze+Te,y:(K.y-Te)*yt+Te,width:K.width*Ze,height:K.height*yt}},H.prototype.scaleCanvas=function(f,v){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,f,v,this.cropRect,this.margin);this.canvasWidth=f,this.canvasHeight=v,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},H}(),gn=function(){function H(f){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=f,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(H.prototype,"angle",{get:function(){return this._angle},set:function(f){this._angle=f,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),H.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},H.prototype.onPointerDown=function(f){this.controlContainer.setPointerCapture(f.pointerId),this.isDragging=!0,this.previousPoint={x:f.clientX,y:f.clientY}},H.prototype.onPointerMove=function(f){this.isDragging&&(this.onAngleChange&&this.onAngleChange((f.clientX-this.previousPoint.x)/5),this.previousPoint.x=f.clientX)},H.prototype.onPointerUp=function(f){this.isDragging&&this.onAngleChange&&this.onAngleChange((f.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(f.pointerId)},H.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var f=this.angleLabelText.getBBox();ot.setAttributes(this.angleLabelElement,[["x",((this.width-f.width)/2).toString()],["y",(this.height/2).toString()]])}},H.prototype.positionScaleShape=function(){if(this.scaleShape){var f=this.scaleShape.transform.baseVal.getItem(0);f.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(f,0)}},H.prototype.getVisual=function(){var f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("xmlns","http://www.w3.org/2000/svg"),f.setAttribute("width",this.width+"px"),f.setAttribute("height",this.height+"px"),f.setAttribute("viewBox","0 0 "+this.width+" "+this.height),f.style.flexShrink="0",document.body.appendChild(f);for(var v="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var $=k%5==0?this.height/3:this.height/6;v+="h4v"+-$+"h1v"+$}v+="v1H0Z",this.scaleShape=ot.createPath(v);var K=ot.createTransform();this.scaleShape.transform.baseVal.appendItem(K),f.appendChild(this.scaleShape),this.angleLabelElement=ot.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ot.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Te=ot.createTSpan("");return Te.innerHTML="&deg;",this.angleLabelElement.appendChild(Te),f.appendChild(this.angleLabelElement),document.body.removeChild(f),f},H}(),Mr=function(){function H(){this.naturalSize=!1,this.imageType="image/png"}return H.prototype.rasterize=function(f,v,k,$,K,Te,Ze){var yt=this;return new Promise(function(_t){var rt=document.createElement("canvas");rt.width=f.width.baseVal.value-2*$,rt.height=f.height.baseVal.value-2*$;var Nt=1,Ot=1;yt.naturalSize===!0?(Nt=v.naturalWidth/(f.width.baseVal.value-2*$)/Te,Ot=v.naturalHeight/(f.height.baseVal.value-2*$)/Ze,rt.width=v.naturalWidth/Te,rt.height=v.naturalHeight/Ze):yt.width!==void 0&&yt.height!==void 0&&(Nt=yt.width/k.width,Ot=yt.height/k.height,rt.width*=Nt,rt.height*=Ot);var Mt=rt.getContext("2d");Mt.translate(rt.width/2,rt.height/2),Mt.rotate(K*Math.PI/180),Mt.scale(Te,Ze),Mt.translate(-rt.width/2,-rt.height/2),Mt.drawImage(v,0,0,rt.width,rt.height);var qt=document.createElement("canvas");qt.width=k.width*Nt,qt.height=k.height*Ot,qt.getContext("2d").putImageData(Mt.getImageData((k.x-$)*Nt,(k.y-$)*Ot,k.width*Nt,k.height*Ot),0,0),_t(qt.toDataURL(yt.imageType,yt.imageQuality))})},H}(),Ae=function(){function H(f){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=H.instanceCounter++,this.styles=new Kt(this.instanceNo),this.target=f,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(H.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(f){this._zoomToCropEnabled=f,f?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(f){this._isGridVisible=f,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"gridLines",{get:function(){return this._gridLines},set:function(f){this._gridLines=f,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(f){this._rotationAngle=f,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"aspectRatio",{get:function(){var f;return(f=this._aspectRatio)!==null&&f!==void 0?f:this.aspectRatios[0]},set:function(f){this._aspectRatio=f},enumerable:!1,configurable:!0}),H.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},H.prototype.show=function(){this.showUI(),this.open()},H.prototype.close=function(f){f===void 0&&(f=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),f||this.closeEventListeners.forEach(function(v){return v()}),this._isOpen=!1)},H.prototype.addRenderEventListener=function(f){this.renderEventListeners.push(f)},H.prototype.removeRenderEventListener=function(f){this.renderEventListeners.indexOf(f)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(f),1)},H.prototype.addCloseEventListener=function(f){this.closeEventListeners.push(f)},H.prototype.removeCloseEventListener=function(f){this.closeEventListeners.indexOf(f)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(f),1)},H.prototype.setupResizeObserver=function(){var f=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){f.resize(f.target.clientWidth,f.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))},H.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var f=1*this.target.clientWidth/this.target.clientHeight,v=this.contentDiv.clientWidth/f>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*f:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=v+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/f;this.resize(v,k)}},H.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},H.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",ot.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},H.prototype.resize=function(f,v){this.imageWidth=Math.round(f),this.imageHeight=Math.round(v),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()},H.prototype.setEditingTarget=function(){var f=document.createElement("canvas");f.width=this.target.naturalWidth,f.height=this.target.naturalHeight,f.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var v=f.toDataURL();ot.setAttributes(this.editingTarget,[["href",v]]),this.setEditingTargetSize()},H.prototype.setTopLeft=function(){var f=this.target.getBoundingClientRect(),v=this.editorCanvas.getBoundingClientRect();this.left=f.left-v.left-this.CANVAS_MARGIN,this.top=f.top-v.top-this.CANVAS_MARGIN},H.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=ot.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=ot.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=ot.createGroup(),this.editingTargetRotationScaleContainer=ot.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var f=ot.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(f);var v=ot.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(v),this.editingTargetContainer=ot.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)},H.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},H.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=ot.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Gr(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()},H.prototype.zoomToCrop=function(){if(this.cropRect){var f=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,v=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=f+"px "+v+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-f+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-v+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},H.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)},H.prototype.cropRectChanged=function(f){this.cropRect=f,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},H.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},H.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"},H.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},H.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 f=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,v=this.target.offsetTop>f+this.CANVAS_MARGIN?this.target.offsetTop-(f+this.CANVAS_MARGIN):0;this.coverDiv.style.top=v+"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},H.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},H.prototype.addTopToolbar=function(){var f=this;this.topToolbar=new or,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 v=new un;v.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(v);var k=[];this.aspectRatios.forEach(function(Ot){var Mt=new Zr(qr.getIcon(Ot.horizontal,Ot.vertical),Ot.horizontal===0&&Ot.vertical===0?"FREE":Ot.horizontal+":"+Ot.vertical);Mt.onClick=function(){return f.ratioButtonClicked(Ot)},k.push(Mt)}),this.aspectRatioButton=new Wr(qr.getIcon(0,0),"Aspect ratio",k),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,v.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var $=new Zr('<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");$.isActive=this.isGridVisible,$.onClick=function(){f.isGridVisible=!f.isGridVisible,$.isActive=f.isGridVisible},v.addButton($);var K=new Zr('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(K.isActive=this.zoomToCropEnabled,K.onClick=function(){f.zoomToCropEnabled=!f.zoomToCropEnabled,K.isActive=f.zoomToCropEnabled},v.addButton(K),!cr.isLicensed){var Te=new kr;this.topToolbar.addElementBlock(Te);var Ze=document.createElement("div");Ze.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var yt=document.createElement("a");yt.style.color="currentColor",yt.href="https://markerjs.com/products/cropro",yt.target="_blank",yt.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>',Ze.appendChild(yt),Te.addElement(Ze)}var _t=new un;_t.minWidth=3*this.toolbarHeight+"px",_t.contentAlign="end",this.topToolbar.addButtonBlock(_t);var rt=new Zr('<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");rt.onClick=this.startRenderAndClose,_t.addButton(rt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(rt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Nt=new Zr('<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");Nt.onClick=this.close,_t.addButton(Nt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Nt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},H.prototype.addBottomToolbar=function(){var f=this;this.bottomToolbar=new or,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 v=new un;v.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(v);var k=new Zr('<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");k.onClick=this.rotateLeftButtonClicked,v.addButton(k);var $=new Zr('<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");$.onClick=this.rotateRightButtonClicked,v.addButton($);var K=new kr;K.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(K),this.straightener=new gn("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(_t){f.rotateBy(_t),f.straightener.angle=f.rotationAngle},K.addElement(this.straightener.getUI());var Te=new un;Te.minWidth=2*this.toolbarHeight+"px",Te.contentAlign="end",this.bottomToolbar.addButtonBlock(Te);var Ze=new Zr('<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");Ze.onClick=this.flipHorizontallyButtonClicked,Te.addButton(Ze);var yt=new Zr('<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");yt.onClick=this.flipVerticallyButtonClicked,Te.addButton(yt)},H.prototype.ratioButtonClicked=function(f){this.aspectRatio=f,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},H.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=qr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},H.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Pr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},H.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},H.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},H.prototype.restoreState=function(f){if(f){var v=this.cropLayer.getRescaledRect(f.width,f.height,this.imageWidth,this.imageHeight,f.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(v),this.cropRectChanged(v),this.flippedHorizontally=f.flippedHorizontally,this.flippedVertically=f.flippedVertically,this.applyFlip(),this.rotationAngle=f.rotationAngle,this.applyRotation()}},H.prototype.clientToLocalCoordinates=function(f,v){var k=this.cropImage.getBoundingClientRect();return{x:f-k.left,y:v-k.top}},H.prototype.onWindowResize=function(){this.positionUI()},H.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var f=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=f+"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()},H.prototype.rotateLeftButtonClicked=function(){var f=this.rotationAngle-90;this.rotationAngle%90!=0&&(f+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(f)},H.prototype.rotateRightButtonClicked=function(){var f=this.rotationAngle+90;this.rotationAngle%90!=0&&(f-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(f)},H.prototype.rotateTo=function(f){f=(f=f>180?f-360:f)<=-180?f+360:f,this.rotationAngle=f,this.applyRotation()},H.prototype.rotateBy=function(f){this.rotateTo((this.rotationAngle+f)%360)},H.prototype.applyRotation=function(){var f=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var v=this.editingTargetRotationContainer.transform.baseVal.getItem(0);v.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(v,0);var k=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/k.width,this.imageHeight/k.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=f},H.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},H.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},H.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},H.prototype.startRenderAndClose=function(){return Vt(this,void 0,void 0,function(){var f,v;return rr(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return f=k.sent(),v=this.getState(),this.renderEventListeners.forEach(function($){return $(f,v)}),this.close(!0),[2]}})})},H.prototype.render=function(){return Vt(this,void 0,void 0,function(){var f;return rr(this,function(v){switch(v.label){case 0:return(f=new Mr).naturalSize=this.renderAtNaturalSize,f.imageType=this.renderImageType,f.imageQuality=this.renderImageQuality,f.width=this.renderWidth,f.height=this.renderHeight,this.unzoomFromCrop(),ot.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,f.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 v.sent(),[4,f.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,v.sent()]}})})},H.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Jt("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 Jt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Jt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var f=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Jt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*f)+`px;
height: `+(this.toolbarHeight-2*f)+`px;
padding: `+f+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Jt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Jt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new nr("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new nr("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Jt("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 Jt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Jt("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 Jt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*f)+`px;
padding: `+f+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Jt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},H.instanceCounter=0,H}(),ue=re("8hTe"),Ee=re.n(ue),ke=/<pre[^>]*>/g;function nt(H){var f=document.createElement("div");return f.innerHTML=H,f.childNodes.length===0?"":f.childNodes[0].nodeValue}var ht=At.a=function(H){var f=H.value,v=f===void 0?"":f,k=H.edit,$=k===void 0?!1:k,K=H.className,Te=H.showTextOnly,Ze=H.showLines,yt=H.replaces,_t=H.zoomImg,rt=H.hasMask,Nt=H.style,Ot=Nt===void 0?{}:Nt,Mt=H.stylesPrev,qt=Mt===void 0?{}:Mt,br=String(v),sr=Object(O.useRef)(),hr=Object(O.useRef)(),$t=Object(O.useState)(""),Ur=Object(Z.a)($t,2),Cr=Ur[0],fr=Ur[1],Fr=Object(O.useState)("office"),Xr=Object(Z.a)(Fr,2),Yr=Xr[0],Nr=Xr[1],Tr=function(){var er=new Ae(hr.current);er.displayMode="popup",er.addRenderEventListener(function(){var mr=Object(R.a)(N.a.mark(function ur(Qr){var yr;return N.a.wrap(function(Jr){for(;;)switch(Jr.prev=Jr.next){case 0:return sr.current.style.display="none",Jr.next=3,Object(Ne.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Qr}});case 3:yr=Jr.sent,yr!=null&&yr.id&&yt(hr.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(yr==null?void 0:yr.id,"?type=").concat(yr.content_type));case 5:case"end":return Jr.stop()}},ur)}));return function(ur){return mr.apply(this,arguments)}}()),er.show()},Hr=function(){var er=new Yt(hr.current);er.settings.displayMode="popup",er.addEventListener("render",function(){var mr=Object(R.a)(N.a.mark(function ur(Qr){var yr;return N.a.wrap(function(Jr){for(;;)switch(Jr.prev=Jr.next){case 0:if(sr.current.style.display="none",!hr.current){Jr.next=6;break}return Jr.next=4,Object(Ne.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Qr.dataUrl}});case 4:yr=Jr.sent,yr!=null&&yr.id&&yt(hr.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(yr==null?void 0:yr.id,"?type=").concat(yr.content_type));case 6:case"end":return Jr.stop()}},ur)}));return function(ur){return mr.apply(this,arguments)}}()),er.show(),window.markerArea=er},Vr=Object(O.useMemo)(function(){sr.current&&(sr.current.style.zIndex=-1);try{var ar=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,er=/\"\/api\/attachments\/|\"\/attachments\/download\//g,mr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;br=br.replace(ar,"("+ae.a.API_SERVER+"/api/attachments/").replace(er,'"'+ae.a.API_SERVER+"/api/attachments/").replace(mr,'"'+ae.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(Rn){}var ur=z(br),Qr=m();if(br.match(/\[TOC\]/)&&(ur=ur.replace("<p>[TOC]</p>",x()),I()),ur=ur.replace(/(__special_katext_id_\d+__)/g,function(Rn,Jr){var xn=Qr[Jr],Dn=xn.type,Pn=xn.expression;return Object(ge.renderToString)(nt(Pn)||"",{displayMode:Dn==="block",throwOnError:!1,output:"html"})}),ur=ur.replace(/▁/g,"\u2581\u2581\u2581"),g(),Te){var yr=document.createElement("div");return yr.innerHTML=ur,yr.innerText}return setTimeout(function(){return en()},500),ur},[br]),zr=Object(O.useRef)();C.WebkitLineClamp=Ze,Ze&&(Ot=Object(F.a)(Object(F.a)({},Ot),C));function nn(ar){var er=ar.target;if(er.tagName.toUpperCase()==="IMG"){if(_t){var mr=er.getAttribute("src");fr(mr),Nr("image")}}else if(er.tagName.toUpperCase()==="A"){var ur=er.getAttribute("href");if(ur.indexOf("office")>-1)ar.preventDefault(),fr(ur),Nr("office");else if(ur.indexOf("application/pdf")>-1)ar.preventDefault(),fr(ur),Nr("pdf");else if(ur.indexOf("text/html")>-1)ar.preventDefault(),fr(ur),Nr("html");else if(ur.startsWith("#")){ar.preventDefault();var Qr=document.getElementById(ur.replace("#",""));Qr&&Qr.scrollIntoView(!0)}}}var en=function(){var er,mr=(er=zr.current)===null||er===void 0?void 0:er.querySelectorAll("video");mr==null||mr.forEach(function(ur){if(ur.oncontextmenu=function(){return!1},ur.src.indexOf(".m3u8")>-1&&!ur.canPlayType("application/vnd.apple.mpegurl")){if(q.a.isSupported()){var Qr=new q.a;Qr.loadSource(ur.src),Qr.attachMedia(ur)}}})};Object(O.useEffect)(function(){if(zr.current&&Vr&&(Vr.match(ke)&&window.PR.prettyPrint()),zr.current)return zr.current.addEventListener("click",nn),function(){zr.current.removeEventListener("click",nn),g(),I()}},[Vr,zr.current,nn]);var xr=function(er){if(!$)return;er.target.nodeName==="IMG"?(sr.current.style.zIndex=1,sr.current.style.display="flex",sr.current.style.width=er.target.clientWidth+"px",sr.current.style.height=er.target.clientHeight+"px",sr.current.style.top=er.target.offsetTop+"px",sr.current.style.left=er.target.offsetLeft+"px",hr.current.src=er.target.getAttribute("src")):sr.current.style.display="none"};return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:zr,style:Object(F.a)({},Ot),className:"".concat(K||""," markdown-body ").concat(Ee.a.mdBody),onMouseOver:xr,dangerouslySetInnerHTML:{__html:Vr}}),h.a.createElement("div",{ref:sr,className:Ee.a.button},h.a.createElement(J.a,null,h.a.createElement(X.a,{onClick:function(){return Tr()}},"\u88C1\u526A"),h.a.createElement(X.a,{onClick:function(){return Hr()}},"\u7F16\u8F91"))),h.a.createElement("img",{ref:hr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),h.a.createElement(pe.a,{close:!0,data:Cr,type:Cr!=null&&Cr.length?Yr:"",style:Object(F.a)({},qt),onClose:function(){return fr("")}}))}},"9ZNV":function(It,At,re){"use strict";re.d(At,"a",function(){return O});var ve=re("0Owb"),J=re("+L6B"),U=re("2/Rp"),X=re("q1tI"),F=re.n(X),R=re("UUDw"),Z=re.n(R),M=re("TSYQ"),N=re.n(M),O=function(b){var A=b.cancelText,a=A===void 0?"\u53D6\u6D88":A,r=b.okText,n=r===void 0?"\u786E\u5B9A":r,e=b.loading,t=e===void 0?!1:e,i=b.hasOkBtn,s=i===void 0?!0:i,I=b.okButtonProps,C=I===void 0?{}:I,_=b.onCancel,x=_===void 0?function(){}:_,T=b.onOk,d=T===void 0?function(){}:T,u=b.className,o=u===void 0?"":u;return F.a.createElement("div",{className:N()(Z.a.buttonFixed,o)},F.a.createElement("div",{className:Z.a.buttonWrap},F.a.createElement(U.a,{size:"large",className:"".concat(Z.a.button," mr20"),onClick:x},a),s&&F.a.createElement(U.a,Object(ve.a)({size:"large",type:"primary",className:"".concat(Z.a.button," mr20"),loading:t,onClick:d},C),n)))}},"9z17":function(It,At,re){"use strict";re.d(At,"b",function(){return _});var ve=re("g9YV"),J=re("wCAj"),U=re("5NDa"),X=re("5rEg"),F=re("y8nQ"),R=re("Vl3Y"),Z=re("2qtc"),M=re("kLXV"),N=re("7Kak"),O=re("9yH6"),h=re("9og8"),b=re("tJVT"),A=re("WmNS"),a=re.n(A),r=re("q1tI"),n=re.n(r),e=re("ie49"),t=re.n(e),i=re("HBuW"),s=function(u){var o=u.total,l=u.used,m=u.copy,g=u.canNotCopy,E=u.inPaper,L="";return m>0&&g>0?L="\u5176\u4E2D\u6709".concat(m,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236\uFF0C\u6709").concat(g,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236"):m>0&&g===0?L="\u5176\u4E2D\u6709".concat(m,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236"):m===0&&g>0&&(L="\u5176\u4E2D\u6709".concat(g,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236")),"\u5F53\u524D\u9009\u4E2D".concat(o,"\u4E2A\u5B9E\u8BAD\u4E2D\uFF0C\u6709").concat(l,"\u4E2A\u5B9E\u8BAD\u5DF2\u5728\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C").concat(L).concat(E?"\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4F7F\u7528\u8BD5\u5377\uFF1F":"")},I=function(u){return u?{reproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u91CD\u590D\u4F7F\u7528\u7684\u5B9E\u8BAD\u672A\u5F00\u542F\u590D\u5236\u6743\u9650\uFF0C\u82E5\u7EE7\u7EED\u4F7F\u7528\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD"}:{reproducible:"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\u548C\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F"}},C=function(u){var o=u.onCancel,l=u.onOk,m=u.visible,g=u.inPaper,E=u.renderData,L=u.type,P=Object(r.useState)(1),j=Object(b.a)(P,2),z=j[0],ee=j[1],Q=Object(r.useState)(!1),q=Object(b.a)(Q,2),ae=q[0],ge=q[1],pe=Object(r.useMemo)(function(){return(E==null?void 0:E.total_num)===1&&(E==null?void 0:E.can_copy_num)===1},[E]);return n.a.createElement(n.a.Fragment,null,pe?n.a.createElement(M.a,{centered:!0,closable:!0,visible:m,title:"\u63D0\u793A",width:600,confirmLoading:ae,onCancel:o,onOk:Object(h.a)(a.a.mark(function Ne(){return a.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return ge(!0),He.next=3,l(z);case 3:ge(!1);case 4:case"end":return He.stop()}},Ne)}))},n.a.createElement("div",{className:t.a.content,style:{marginBottom:20}},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u95EE\u662F\u5426\u590D\u5236\u6210\u65B0\u5B9E\u8BAD\u53D1\u9001\u81F3\u6559\u5B66\u8BFE\u5802\u4E2D\uFF1F"),n.a.createElement(O.a.Group,{value:z,onChange:function(Fe){return ee(Fe.target.value)},className:t.a.content,style:{marginBottom:30}},n.a.createElement(O.a,{value:1,style:{color:"#464f66"}},"\u590D\u5236\u5B9E\u8BAD"),n.a.createElement(O.a,{value:0,style:{color:"#464f66"}},"\u4E0D\u590D\u5236\u5B9E\u8BAD")),n.a.createElement("div",{className:t.a.content,style:{marginBottom:10}},"\u8BF4\u660E\uFF1A"),n.a.createElement("div",{className:t.a.content},"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),n.a.createElement("div",{className:t.a.content},"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")):n.a.createElement(M.a,{centered:!0,closable:!0,visible:m,title:"\u63D0\u793A",width:600,onCancel:o,onOk:Object(h.a)(a.a.mark(function Ne(){return a.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return ge(!0),He.next=3,l(0);case 3:ge(!1);case 4:case"end":return He.stop()}},Ne)}))},n.a.createElement("div",{className:t.a.content},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F")))},_=function(){var u=Object(r.useState)(!1),o=Object(b.a)(u,2),l=o[0],m=o[1],g=Object(r.useState)(),E=Object(b.a)(g,2),L=E[0],P=E[1],j=function(){return m(!1)},z=function(){var ee=Object(h.a)(a.a.mark(function Q(q){var ae;return a.a.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return pe.next=2,Object(i.p)(q);case 2:if(ae=pe.sent,!("status"in ae)){pe.next=5;break}return pe.abrupt("return",!1);case 5:if(!(ae.repeat_shixun_num===0)){pe.next=7;break}return pe.abrupt("return",!1);case 7:return P(ae),m(!0),pe.abrupt("return",!0);case 10:case"end":return pe.stop()}},Q)}));return function(q){return ee.apply(this,arguments)}}();return[l,j,L,z]},x=function(u){var o=R.a.useForm(),l=Object(b.a)(o,1),m=l[0],g=Object(r.useState)(!1),E=Object(b.a)(g,2),L=E[0],P=E[1],j=u.onCancel,z=u.onOk,ee=u.visible,Q=u.inPaper,q=Q===void 0?!1:Q,ae=u.renderData,ge=u.type,pe=Object(r.useMemo)(function(){return q?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:t.a.tableCell},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(Xe,Ce){return n.a.createElement(n.a.Fragment,null,n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce.stage_shixun_id:Ce.id),"is_copy"],initialValue:1},n.a.createElement(O.a.Group,null,n.a.createElement(O.a,{value:1},"\u662F"),n.a.createElement(O.a,{value:0},"\u5426"))),n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce==null?void 0:Ce.stage_shixun_id:Ce.id),"is_use"],hidden:!0,initialValue:1},n.a.createElement(X.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:t.a.tableCell},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(Xe,Ce){return n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce.stage_shixun_id:Ce.id),"is_use"],initialValue:1},n.a.createElement(O.a.Group,null,n.a.createElement(O.a,{value:1},"\u662F"),n.a.createElement(O.a,{value:0},"\u5426")))}},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(Xe,Ce){return n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce.stage_shixun_id:Ce.id),"is_copy"],initialValue:1},n.a.createElement(O.a.Group,null,n.a.createElement(O.a,{value:1},"\u662F"),n.a.createElement(O.a,{value:0},"\u5426")))}}]},[q]),Ne=Object(r.useMemo)(function(){return q?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:t.a.tableCell,align:"center",render:function(Xe,Ce){return n.a.createElement(n.a.Fragment,null,n.a.createElement("span",null,Xe),n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce==null?void 0:Ce.stage_shixun_id:Ce.id),"is_copy"],hidden:!0,initialValue:0},n.a.createElement(X.a,{type:"hidden"})),n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce==null?void 0:Ce.stage_shixun_id:Ce.id),"is_use"],hidden:!0,initialValue:1},n.a.createElement(X.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:t.a.tableCell,align:"center"},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(Xe,Ce){return n.a.createElement(n.a.Fragment,null,n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce==null?void 0:Ce.stage_shixun_id:Ce.id),"is_use"],initialValue:0},n.a.createElement(O.a.Group,null,n.a.createElement(O.a,{value:1},"\u662F"),n.a.createElement(O.a,{value:0},"\u5426"))),n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ce==null?void 0:Ce.stage_shixun_id:Ce.id),"is_copy"],hidden:!0,initialValue:0},n.a.createElement(X.a,{type:"hidden"})))}}]},[q]),Fe=Object(r.useMemo)(function(){return s({total:ae==null?void 0:ae.total_num,used:ae==null?void 0:ae.repeat_shixun_num,copy:ae==null?void 0:ae.can_copy_num,canNotCopy:ae==null?void 0:ae.no_copy_num,inPaper:q})},[ae,q]),He=Object(r.useMemo)(function(){return I(q)},[q]);return n.a.createElement(M.a,{title:"\u5B9E\u8BAD\u91CD\u590D\u4F7F\u7528\u63D0\u793A",centered:!0,visible:ee,confirmLoading:L,onOk:Object(h.a)(a.a.mark(function Ke(){var Xe,Ce;return a.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return P(!0),Xe=m.getFieldsValue(),Ce=Object.keys(Xe).map(function(Et){return{id:parseInt(Et),is_use:Xe[Et].is_use,is_copy:Xe[Et].is_copy}}),Pe.next=5,z(Ce);case 5:P(!1);case 6:case"end":return Pe.stop()}},Ke)})),onCancel:j,width:800,okText:"\u786E\u8BA4",className:t.a.antdModal,destroyOnClose:!0},n.a.createElement(R.a,{form:m,preserve:!1},n.a.createElement("div",{className:t.a.brief},Fe),(ae==null?void 0:ae.can_copy_num)>0&&n.a.createElement("div",null,n.a.createElement("div",{className:t.a.contentTitle},"\u53EF\u590D\u5236\u5B9E\u8BAD"),n.a.createElement("div",{className:t.a.content},He.reproducible),n.a.createElement("div",{className:t.a.tips},n.a.createElement("div",null,"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),n.a.createElement("div",null,"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")),n.a.createElement(J.a,{columns:pe,className:t.a.antdTable,dataSource:ae==null?void 0:ae.can_copy_list,rowKey:ge==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})),(ae==null?void 0:ae.no_copy_num)>0&&n.a.createElement("div",null,n.a.createElement("div",{className:t.a.contentTitle},"\u4E0D\u53EF\u590D\u5236\u5B9E\u8BAD"),n.a.createElement("div",{className:t.a.content},He.irreproducible),n.a.createElement(J.a,{columns:Ne,className:t.a.antdTable,dataSource:ae==null?void 0:ae.no_copy_list,rowKey:ge==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})),(ae==null?void 0:ae.no_use_list.length)>0&&(ae==null?void 0:ae.no_use_list.map(function(Ke){return n.a.createElement("div",{key:ge==="subject"?Ke.stage_shixun_id:Ke.id},n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ke==null?void 0:Ke.stage_shixun_id:Ke.id),"is_copy"],hidden:!0,initialValue:0},n.a.createElement(X.a,{type:"hidden"})),n.a.createElement(R.a.Item,{name:["".concat(ge==="subject"?Ke==null?void 0:Ke.stage_shixun_id:Ke.id),"is_use"],hidden:!0,initialValue:1},n.a.createElement(X.a,{type:"hidden"})))}))))},T=function(u){var o=u.modalType;return o==="multiple"?n.a.createElement(x,u):n.a.createElement(C,u)};At.a=T},BU3w:function(It,At,re){"use strict";re.d(At,"a",function(){return R});var ve=re("MNnm"),J="rc-util-key";function U(Z){if(Z.attachTo)return Z.attachTo;var M=document.querySelector("head");return M||document.body}function X(Z){var M,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ve.a)())return null;var O=document.createElement("style");if((M=N.csp)===null||M===void 0?void 0:M.nonce){var h;O.nonce=(h=N.csp)===null||h===void 0?void 0:h.nonce}O.innerHTML=Z;var b=U(N),A=b.firstChild;return N.prepend&&b.prepend?b.prepend(O):N.prepend&&A?b.insertBefore(O,A):b.appendChild(O),O}var F=new Map;function R(Z,M){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},O=U(N);if(!F.has(O)){var h=X("",N),b=h.parentNode;F.set(O,b),b.removeChild(h)}var A=Array.from(F.get(O).children).find(function(t){return t.tagName==="STYLE"&&t[J]===M});if(A){var a,r;if(((a=N.csp)===null||a===void 0?void 0:a.nonce)&&A.nonce!==((r=N.csp)===null||r===void 0?void 0:r.nonce)){var n;A.nonce=(n=N.csp)===null||n===void 0?void 0:n.nonce}return A.innerHTML!==Z&&(A.innerHTML=Z),A}var e=X(Z,N);return e[J]=M,e}},D3Jc:function(It,At,re){It.exports={bg:"bg___2N4xV",wrap:"wrap___197Yw",title:"title___SRViJ",btnWrapper:"btnWrapper___1Clah",titleForExport:"titleForExport___1w_Fv",flexRow:"flexRow___2VcOb",flexColumn:"flexColumn___3sATC",flexJustifyBetween:"flexJustifyBetween___28Fc2",relative:"relative___1Z6Yd",questionNumber:"questionNumber___3JZ7u",score:"score___JiHU1",selectTopicButton:"selectTopicButton___2FHxM",line:"line___2fHJL",dragTip:"dragTip___3K-IA",typeActive:"typeActive___3Sew8",mouseTypeActive:"mouseTypeActive___2R64u",typeName:"typeName___1laV6",typeNumber:"typeNumber___slW4Y",typeAction:"typeAction___HFUjV",setScore:"setScore___3TxSu",delete:"delete___gIO9w",modal:"modal___2NK84"}},DlQD:function(It,At,re){(function(ve,J){It.exports=J()})(this,function(){"use strict";function ve(Oe,be){for(var _e=0;_e<be.length;_e++){var se=be[_e];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(Oe,se.key,se)}}function J(Oe,be,_e){return be&&ve(Oe.prototype,be),_e&&ve(Oe,_e),Oe}function U(Oe,be){if(!Oe)return;if(typeof Oe=="string")return X(Oe,be);var _e=Object.prototype.toString.call(Oe).slice(8,-1);if(_e==="Object"&&Oe.constructor&&(_e=Oe.constructor.name),_e==="Map"||_e==="Set")return Array.from(Oe);if(_e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_e))return X(Oe,be)}function X(Oe,be){(be==null||be>Oe.length)&&(be=Oe.length);for(var _e=0,se=new Array(be);_e<be;_e++)se[_e]=Oe[_e];return se}function F(Oe,be){var _e;if(typeof Symbol=="undefined"||Oe[Symbol.iterator]==null){if(Array.isArray(Oe)||(_e=U(Oe))||be&&Oe&&typeof Oe.length=="number"){_e&&(Oe=_e);var se=0;return function(){return se>=Oe.length?{done:!0}:{done:!1,value:Oe[se++]}}}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 _e=Oe[Symbol.iterator](),_e.next.bind(_e)}function R(Oe,be){return be={exports:{}},Oe(be,be.exports),be.exports}var Z=R(function(Oe){function be(){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 _e(se){Oe.exports.defaults=se}Oe.exports={defaults:be(),getDefaults:be,changeDefaults:_e}}),M=Z.defaults,N=Z.getDefaults,O=Z.changeDefaults,h=/[&<>"']/,b=/[&<>"']/g,A=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},n=function(be){return r[be]};function e(Oe,be){if(be){if(h.test(Oe))return Oe.replace(b,n)}else if(A.test(Oe))return Oe.replace(a,n);return Oe}var t=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(Oe){return Oe.replace(t,function(be,_e){return _e=_e.toLowerCase(),_e==="colon"?":":_e.charAt(0)==="#"?_e.charAt(1)==="x"?String.fromCharCode(parseInt(_e.substring(2),16)):String.fromCharCode(+_e.substring(1)):""})}var s=/(^|[^\[])\^/g;function I(Oe,be){Oe=Oe.source||Oe,be=be||"";var _e={replace:function(le,me){return me=me.source||me,me=me.replace(s,"$1"),Oe=Oe.replace(le,me),_e},getRegex:function(){return new RegExp(Oe,be)}};return _e}var C=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(Oe,be,_e){if(Oe){var se;try{se=decodeURIComponent(i(_e)).replace(C,"").toLowerCase()}catch(le){return null}if(se.indexOf("javascript:")===0||se.indexOf("vbscript:")===0||se.indexOf("data:")===0)return null}be&&!_.test(_e)&&(_e=l(be,_e));try{_e=encodeURI(_e).replace(/%25/g,"%")}catch(le){return null}return _e}var T={},d=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(Oe,be){T[" "+Oe]||(d.test(Oe)?T[" "+Oe]=Oe+"/":T[" "+Oe]=L(Oe,"/",!0)),Oe=T[" "+Oe];var _e=Oe.indexOf(":")===-1;return be.substring(0,2)==="//"?_e?be:Oe.replace(u,"$1")+be:be.charAt(0)==="/"?_e?be:Oe.replace(o,"$1")+be:Oe+be}var m={exec:function(){}};function g(Oe){for(var be=1,_e,se;be<arguments.length;be++){_e=arguments[be];for(se in _e)Object.prototype.hasOwnProperty.call(_e,se)&&(Oe[se]=_e[se])}return Oe}function E(Oe,be){var _e=Oe.replace(/\|/g,function(me,we,We){for(var $e=!1,pt=we;--pt>=0&&We[pt]==="\\";)$e=!$e;return $e?"|":" |"}),se=_e.split(/ \|/),le=0;if(se.length>be)se.splice(be);else for(;se.length<be;)se.push("");for(;le<se.length;le++)se[le]=se[le].trim().replace(/\\\|/g,"|");return se}function L(Oe,be,_e){var se=Oe.length;if(se===0)return"";for(var le=0;le<se;){var me=Oe.charAt(se-le-1);if(me===be&&!_e)le++;else if(me!==be&&_e)le++;else break}return Oe.substr(0,se-le)}function P(Oe,be){if(Oe.indexOf(be[1])===-1)return-1;for(var _e=Oe.length,se=0,le=0;le<_e;le++)if(Oe[le]==="\\")le++;else if(Oe[le]===be[0])se++;else if(Oe[le]===be[1]&&(se--,se<0))return le;return-1}function j(Oe){Oe&&Oe.sanitize&&!Oe.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 z={escape:e,unescape:i,edit:I,cleanUrl:x,resolveUrl:l,noopTest:m,merge:g,splitCells:E,rtrim:L,findClosingBracket:P,checkSanitizeDeprecation:j},ee=Z.defaults,Q=z.rtrim,q=z.splitCells,ae=z.escape,ge=z.findClosingBracket;function pe(Oe,be,_e){var se=be.href,le=be.title?ae(be.title):null,me=Oe[1].replace(/\\([\[\]])/g,"$1");return Oe[0].charAt(0)!=="!"?{type:"link",raw:_e,href:se,title:le,text:me}:{type:"image",raw:_e,href:se,title:le,text:ae(me)}}function Ne(Oe,be){var _e=Oe.match(/^(\s+)(?:```)/);if(_e===null)return be;var se=_e[1];return be.split(`
`).map(function(le){var me=le.match(/^\s+/);if(me===null)return le;var we=me[0];return we.length>=se.length?le.slice(se.length):le}).join(`
`)}var Fe=function(){function Oe(_e){this.options=_e||ee}var be=Oe.prototype;return be.space=function(se){var le=this.rules.block.newline.exec(se);if(le)return le[0].length>1?{type:"space",raw:le[0]}:{raw:`
`}},be.code=function(se,le){var me=this.rules.block.code.exec(se);if(me){var we=le[le.length-1];if(we&&we.type==="paragraph")return{raw:me[0],text:me[0].trimRight()};var We=me[0].replace(/^ {4}/gm,"");return{type:"code",raw:me[0],codeBlockStyle:"indented",text:this.options.pedantic?We:Q(We,`
`)}}},be.fences=function(se){var le=this.rules.block.fences.exec(se);if(le){var me=le[0],we=Ne(me,le[3]||"");return{type:"code",raw:me,lang:le[2]?le[2].trim():le[2],text:we}}},be.heading=function(se){var le=this.rules.block.heading.exec(se);if(le)return{type:"heading",raw:le[0],depth:le[1].length,text:le[2]}},be.nptable=function(se){var le=this.rules.block.nptable.exec(se);if(le){var me={type:"table",header:q(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[],raw:le[0]};if(me.header.length===me.align.length){var we=me.align.length,We;for(We=0;We<we;We++)/^ *-+: *$/.test(me.align[We])?me.align[We]="right":/^ *:-+: *$/.test(me.align[We])?me.align[We]="center":/^ *:-+ *$/.test(me.align[We])?me.align[We]="left":me.align[We]=null;for(we=me.cells.length,We=0;We<we;We++)me.cells[We]=q(me.cells[We],me.header.length);return me}}},be.hr=function(se){var le=this.rules.block.hr.exec(se);if(le)return{type:"hr",raw:le[0]}},be.blockquote=function(se){var le=this.rules.block.blockquote.exec(se);if(le){var me=le[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:le[0],text:me}}},be.list=function(se){var le=this.rules.block.list.exec(se);if(le){for(var me=le[0],we=le[2],We=we.length>1,$e=we[we.length-1]===")",pt={type:"list",raw:me,ordered:We,start:We?+we.slice(0,-1):"",loose:!1,items:[]},Bt=le[0].match(this.rules.block.item),Rt=!1,Ct,tr,zt,ft,Pt,Yt,Lt,ir=Bt.length,Vt=0;Vt<ir;Vt++)Ct=Bt[Vt],me=Ct,tr=Ct.length,Ct=Ct.replace(/^ *([*+-]|\d+[.)]) */,""),~Ct.indexOf(`
`)&&(tr-=Ct.length,Ct=this.options.pedantic?Ct.replace(/^ {1,4}/gm,""):Ct.replace(new RegExp("^ {1,"+tr+"}","gm"),"")),Vt!==ir-1&&(zt=this.rules.block.bullet.exec(Bt[Vt+1])[0],(We?zt.length===1||!$e&&zt[zt.length-1]===")":zt.length>1||this.options.smartLists&&zt!==we)&&(ft=Bt.slice(Vt+1).join(`
`),pt.raw=pt.raw.substring(0,pt.raw.length-ft.length),Vt=ir-1)),Pt=Rt||/\n\n(?!\s*$)/.test(Ct),Vt!==ir-1&&(Rt=Ct.charAt(Ct.length-1)===`
`,Pt||(Pt=Rt)),Pt&&(pt.loose=!0),Yt=/^\[[ xX]\] /.test(Ct),Lt=void 0,Yt&&(Lt=Ct[1]!==" ",Ct=Ct.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:me,task:Yt,checked:Lt,loose:Pt,text:Ct});return pt}},be.html=function(se){var le=this.rules.block.html.exec(se);if(le)return{type:this.options.sanitize?"paragraph":"html",raw:le[0],pre:!this.options.sanitizer&&(le[1]==="pre"||le[1]==="script"||le[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(le[0]):ae(le[0]):le[0]}},be.def=function(se){var le=this.rules.block.def.exec(se);if(le){le[3]&&(le[3]=le[3].substring(1,le[3].length-1));var me=le[1].toLowerCase().replace(/\s+/g," ");return{tag:me,raw:le[0],href:le[2],title:le[3]}}},be.table=function(se){var le=this.rules.block.table.exec(se);if(le){var me={type:"table",header:q(le[1].replace(/^ *| *\| *$/g,"")),align:le[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:le[3]?le[3].replace(/\n$/,"").split(`
`):[]};if(me.header.length===me.align.length){me.raw=le[0];var we=me.align.length,We;for(We=0;We<we;We++)/^ *-+: *$/.test(me.align[We])?me.align[We]="right":/^ *:-+: *$/.test(me.align[We])?me.align[We]="center":/^ *:-+ *$/.test(me.align[We])?me.align[We]="left":me.align[We]=null;for(we=me.cells.length,We=0;We<we;We++)me.cells[We]=q(me.cells[We].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},be.lheading=function(se){var le=this.rules.block.lheading.exec(se);if(le)return{type:"heading",raw:le[0],depth:le[2].charAt(0)==="="?1:2,text:le[1]}},be.paragraph=function(se){var le=this.rules.block.paragraph.exec(se);if(le)return{type:"paragraph",raw:le[0],text:le[1].charAt(le[1].length-1)===`
`?le[1].slice(0,-1):le[1]}},be.text=function(se,le){var me=this.rules.block.text.exec(se);if(me){var we=le[le.length-1];return we&&we.type==="text"?{raw:me[0],text:me[0]}:{type:"text",raw:me[0],text:me[0]}}},be.escape=function(se){var le=this.rules.inline.escape.exec(se);if(le)return{type:"escape",raw:le[0],text:ae(le[1])}},be.tag=function(se,le,me){var we=this.rules.inline.tag.exec(se);if(we)return!le&&/^<a /i.test(we[0])?le=!0:le&&/^<\/a>/i.test(we[0])&&(le=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(we[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(we[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:we[0],inLink:le,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):ae(we[0]):we[0]}},be.link=function(se){var le=this.rules.inline.link.exec(se);if(le){var me=ge(le[2],"()");if(me>-1){var we=le[0].indexOf("!")===0?5:4,We=we+le[1].length+me;le[2]=le[2].substring(0,me),le[0]=le[0].substring(0,We).trim(),le[3]=""}var $e=le[2],pt="";if(this.options.pedantic){var Bt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);Bt?($e=Bt[1],pt=Bt[3]):pt=""}else pt=le[3]?le[3].slice(1,-1):"";$e=$e.trim().replace(/^<([\s\S]*)>$/,"$1");var Rt=pe(le,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},le[0]);return Rt}},be.reflink=function(se,le){var me;if((me=this.rules.inline.reflink.exec(se))||(me=this.rules.inline.nolink.exec(se))){var we=(me[2]||me[1]).replace(/\s+/g," ");if(we=le[we.toLowerCase()],!we||!we.href){var We=me[0].charAt(0);return{type:"text",raw:We,text:We}}var $e=pe(me,we,me[0]);return $e}},be.strong=function(se,le,me){me===void 0&&(me="");var we=this.rules.inline.strong.start.exec(se);if(we&&(!we[1]||we[1]&&(me===""||this.rules.inline.punctuation.exec(me)))){le=le.slice(-1*se.length);var We=we[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;We.lastIndex=0;for(var $e;(we=We.exec(le))!=null;)if($e=this.rules.inline.strong.middle.exec(le.slice(0,we.index+3)),$e)return{type:"strong",raw:se.slice(0,$e[0].length),text:se.slice(2,$e[0].length-2)}}},be.em=function(se,le,me){me===void 0&&(me="");var we=this.rules.inline.em.start.exec(se);if(we&&(!we[1]||we[1]&&(me===""||this.rules.inline.punctuation.exec(me)))){le=le.slice(-1*se.length);var We=we[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;We.lastIndex=0;for(var $e;(we=We.exec(le))!=null;)if($e=this.rules.inline.em.middle.exec(le.slice(0,we.index+2)),$e)return{type:"em",raw:se.slice(0,$e[0].length),text:se.slice(1,$e[0].length-1)}}},be.codespan=function(se){var le=this.rules.inline.code.exec(se);if(le){var me=le[2].replace(/\n/g," "),we=/[^ ]/.test(me),We=me.startsWith(" ")&&me.endsWith(" ");return we&&We&&(me=me.substring(1,me.length-1)),me=ae(me,!0),{type:"codespan",raw:le[0],text:me}}},be.br=function(se){var le=this.rules.inline.br.exec(se);if(le)return{type:"br",raw:le[0]}},be.del=function(se){var le=this.rules.inline.del.exec(se);if(le)return{type:"del",raw:le[0],text:le[1]}},be.autolink=function(se,le){var me=this.rules.inline.autolink.exec(se);if(me){var we,We;return me[2]==="@"?(we=ae(this.options.mangle?le(me[1]):me[1]),We="mailto:"+we):(we=ae(me[1]),We=we),{type:"link",raw:me[0],text:we,href:We,tokens:[{type:"text",raw:we,text:we}]}}},be.url=function(se,le){var me;if(me=this.rules.inline.url.exec(se)){var we,We;if(me[2]==="@")we=ae(this.options.mangle?le(me[0]):me[0]),We="mailto:"+we;else{var $e;do $e=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while($e!==me[0]);we=ae(me[0]),me[1]==="www."?We="http://"+we:We=we}return{type:"link",raw:me[0],text:we,href:We,tokens:[{type:"text",raw:we,text:we}]}}},be.inlineText=function(se,le,me){var we=this.rules.inline.text.exec(se);if(we){var We;return le?We=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):ae(we[0]):we[0]:We=ae(this.options.smartypants?me(we[0]):we[0]),{type:"text",raw:we[0],text:We}}},Oe}(),He=z.noopTest,Ke=z.edit,Xe=z.merge,Ce={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]+/};Ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ce.def=Ke(Ce.def).replace("label",Ce._label).replace("title",Ce._title).getRegex(),Ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Ce.item=Ke(Ce.item,"gm").replace(/bull/g,Ce.bullet).getRegex(),Ce.list=Ke(Ce.list).replace(/bull/g,Ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ce.def.source+")").getRegex(),Ce._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",Ce._comment=/<!--(?!-?>)[\s\S]*?-->/,Ce.html=Ke(Ce.html,"i").replace("comment",Ce._comment).replace("tag",Ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ce.paragraph=Ke(Ce._paragraph).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.blockquote=Ke(Ce.blockquote).replace("paragraph",Ce.paragraph).getRegex(),Ce.normal=Xe({},Ce),Ce.gfm=Xe({},Ce.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*|$)"}),Ce.gfm.nptable=Ke(Ce.gfm.nptable).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.gfm.table=Ke(Ce.gfm.table).replace("hr",Ce.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",Ce._tag).getRegex(),Ce.pedantic=Xe({},Ce.normal,{html:Ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce._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:Ke(Ce.normal._paragraph).replace("hr",Ce.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ye={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])/};ye._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ye.punctuation=Ke(ye.punctuation).replace(/punctuation/g,ye._punctuation).getRegex(),ye._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ye._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ye.em.start=Ke(ye.em.start).replace(/punctuation/g,ye._punctuation).getRegex(),ye.em.middle=Ke(ye.em.middle).replace(/punctuation/g,ye._punctuation).replace(/overlapSkip/g,ye._overlapSkip).getRegex(),ye.em.endAst=Ke(ye.em.endAst,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.em.endUnd=Ke(ye.em.endUnd,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.strong.start=Ke(ye.strong.start).replace(/punctuation/g,ye._punctuation).getRegex(),ye.strong.middle=Ke(ye.strong.middle).replace(/punctuation/g,ye._punctuation).replace(/blockSkip/g,ye._blockSkip).getRegex(),ye.strong.endAst=Ke(ye.strong.endAst,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.strong.endUnd=Ke(ye.strong.endUnd,"g").replace(/punctuation/g,ye._punctuation).getRegex(),ye.blockSkip=Ke(ye._blockSkip,"g").getRegex(),ye.overlapSkip=Ke(ye._overlapSkip,"g").getRegex(),ye._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ye._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ye._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])?)+(?![-_])/,ye.autolink=Ke(ye.autolink).replace("scheme",ye._scheme).replace("email",ye._email).getRegex(),ye._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ye.tag=Ke(ye.tag).replace("comment",Ce._comment).replace("attribute",ye._attribute).getRegex(),ye._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ye._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ye._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ye.link=Ke(ye.link).replace("label",ye._label).replace("href",ye._href).replace("title",ye._title).getRegex(),ye.reflink=Ke(ye.reflink).replace("label",ye._label).getRegex(),ye.reflinkSearch=Ke(ye.reflinkSearch,"g").replace("reflink",ye.reflink).replace("nolink",ye.nolink).getRegex(),ye.normal=Xe({},ye),ye.pedantic=Xe({},ye.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:Ke(/^!?\[(label)\]\((.*?)\)/).replace("label",ye._label).getRegex(),reflink:Ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ye._label).getRegex()}),ye.gfm=Xe({},ye.normal,{escape:Ke(ye.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ye.gfm.url=Ke(ye.gfm.url,"i").replace("email",ye.gfm._extended_email).getRegex(),ye.breaks=Xe({},ye.gfm,{br:Ke(ye.br).replace("{2,}","*").getRegex(),text:Ke(ye.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Pe={block:Ce,inline:ye},Et=Z.defaults,mt=Pe.block,gt=Pe.inline;function bt(Oe){return Oe.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 oe(Oe){var be="",_e,se,le=Oe.length;for(_e=0;_e<le;_e++)se=Oe.charCodeAt(_e),Math.random()>.5&&(se="x"+se.toString(16)),be+="&#"+se+";";return be}var V=function(){function Oe(_e){this.tokens=[],this.tokens.links=Object.create(null),this.options=_e||Et,this.options.tokenizer=this.options.tokenizer||new Fe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var se={block:mt.normal,inline:gt.normal};this.options.pedantic?(se.block=mt.pedantic,se.inline=gt.pedantic):this.options.gfm&&(se.block=mt.gfm,this.options.breaks?se.inline=gt.breaks:se.inline=gt.gfm),this.tokenizer.rules=se}Oe.lex=function(se,le){var me=new Oe(le);return me.lex(se)};var be=Oe.prototype;return be.lex=function(se){return se=se.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(se,this.tokens,!0),this.inline(this.tokens),this.tokens},be.blockTokens=function(se,le,me){le===void 0&&(le=[]),me===void 0&&(me=!0),se=se.replace(/^ +$/gm,"");for(var we,We,$e,pt;se;){if(we=this.tokenizer.space(se)){se=se.substring(we.raw.length),we.type&&le.push(we);continue}if(we=this.tokenizer.code(se,le)){se=se.substring(we.raw.length),we.type?le.push(we):(pt=le[le.length-1],pt.raw+=`
`+we.raw,pt.text+=`
`+we.text);continue}if(we=this.tokenizer.fences(se)){se=se.substring(we.raw.length),le.push(we);continue}if(we=this.tokenizer.heading(se)){se=se.substring(we.raw.length),le.push(we);continue}if(we=this.tokenizer.nptable(se)){se=se.substring(we.raw.length),le.push(we);continue}if(we=this.tokenizer.hr(se)){se=se.substring(we.raw.length),le.push(we);continue}if(we=this.tokenizer.blockquote(se)){se=se.substring(we.raw.length),we.tokens=this.blockTokens(we.text,[],me),le.push(we);continue}if(we=this.tokenizer.list(se)){for(se=se.substring(we.raw.length),$e=we.items.length,We=0;We<$e;We++)we.items[We].tokens=this.blockTokens(we.items[We].text,[],!1);le.push(we);continue}if(we=this.tokenizer.html(se)){se=se.substring(we.raw.length),le.push(we);continue}if(me&&(we=this.tokenizer.def(se))){se=se.substring(we.raw.length),this.tokens.links[we.tag]||(this.tokens.links[we.tag]={href:we.href,title:we.title});continue}if(we=this.tokenizer.table(se)){se=se.substring(we.raw.length),le.push(we);continue}if(we=this.tokenizer.lheading(se)){se=se.substring(we.raw.length),le.push(we);continue}if(me&&(we=this.tokenizer.paragraph(se))){se=se.substring(we.raw.length),le.push(we);continue}if(we=this.tokenizer.text(se,le)){se=se.substring(we.raw.length),we.type?le.push(we):(pt=le[le.length-1],pt.raw+=`
`+we.raw,pt.text+=`
`+we.text);continue}if(se){var Bt="Infinite loop on byte: "+se.charCodeAt(0);if(this.options.silent){console.error(Bt);break}else throw new Error(Bt)}}return le},be.inline=function(se){var le,me,we,We,$e,pt,Bt=se.length;for(le=0;le<Bt;le++){pt=se[le];switch(pt.type){case"paragraph":case"text":case"heading":{pt.tokens=[],this.inlineTokens(pt.text,pt.tokens);break}case"table":{for(pt.tokens={header:[],cells:[]},We=pt.header.length,me=0;me<We;me++)pt.tokens.header[me]=[],this.inlineTokens(pt.header[me],pt.tokens.header[me]);for(We=pt.cells.length,me=0;me<We;me++)for($e=pt.cells[me],pt.tokens.cells[me]=[],we=0;we<$e.length;we++)pt.tokens.cells[me][we]=[],this.inlineTokens($e[we],pt.tokens.cells[me][we]);break}case"blockquote":{this.inline(pt.tokens);break}case"list":{for(We=pt.items.length,me=0;me<We;me++)this.inline(pt.items[me].tokens);break}}}return se},be.inlineTokens=function(se,le,me,we,We){le===void 0&&(le=[]),me===void 0&&(me=!1),we===void 0&&(we=!1),We===void 0&&(We="");var $e,pt=se,Bt;if(this.tokens.links){var Rt=Object.keys(this.tokens.links);if(Rt.length>0)for(;(Bt=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)Rt.includes(Bt[0].slice(Bt[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Bt.index)+"["+"a".repeat(Bt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Bt=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Bt.index)+"["+"a".repeat(Bt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;se;){if($e=this.tokenizer.escape(se)){se=se.substring($e.raw.length),le.push($e);continue}if($e=this.tokenizer.tag(se,me,we)){se=se.substring($e.raw.length),me=$e.inLink,we=$e.inRawBlock,le.push($e);continue}if($e=this.tokenizer.link(se)){se=se.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,we)),le.push($e);continue}if($e=this.tokenizer.reflink(se,this.tokens.links)){se=se.substring($e.raw.length),$e.type==="link"&&($e.tokens=this.inlineTokens($e.text,[],!0,we)),le.push($e);continue}if($e=this.tokenizer.strong(se,pt,We)){se=se.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],me,we),le.push($e);continue}if($e=this.tokenizer.em(se,pt,We)){se=se.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],me,we),le.push($e);continue}if($e=this.tokenizer.codespan(se)){se=se.substring($e.raw.length),le.push($e);continue}if($e=this.tokenizer.br(se)){se=se.substring($e.raw.length),le.push($e);continue}if($e=this.tokenizer.del(se)){se=se.substring($e.raw.length),$e.tokens=this.inlineTokens($e.text,[],me,we),le.push($e);continue}if($e=this.tokenizer.autolink(se,oe)){se=se.substring($e.raw.length),le.push($e);continue}if(!me&&($e=this.tokenizer.url(se,oe))){se=se.substring($e.raw.length),le.push($e);continue}if($e=this.tokenizer.inlineText(se,we,bt)){se=se.substring($e.raw.length),We=$e.raw.slice(-1),le.push($e);continue}if(se){var Ct="Infinite loop on byte: "+se.charCodeAt(0);if(this.options.silent){console.error(Ct);break}else throw new Error(Ct)}}return le},J(Oe,null,[{key:"rules",get:function(){return{block:mt,inline:gt}}}]),Oe}(),Y=Z.defaults,he=z.cleanUrl,Se=z.escape,Ue=function(){function Oe(_e){this.options=_e||Y}var be=Oe.prototype;return be.code=function(se,le,me){var we=(le||"").match(/\S*/)[0];if(this.options.highlight){var We=this.options.highlight(se,we);We!=null&&We!==se&&(me=!0,se=We)}return we?'<pre><code class="'+this.options.langPrefix+Se(we,!0)+'">'+(me?se:Se(se,!0))+`</code></pre>
`:"<pre><code>"+(me?se:Se(se,!0))+`</code></pre>
`},be.blockquote=function(se){return`<blockquote>
`+se+`</blockquote>
`},be.html=function(se){return se},be.heading=function(se,le,me,we){return this.options.headerIds?"<h"+le+' id="'+this.options.headerPrefix+we.slug(me)+'">'+se+"</h"+le+`>
`:"<h"+le+">"+se+"</h"+le+`>
`},be.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},be.list=function(se,le,me){var we=le?"ol":"ul",We=le&&me!==1?' start="'+me+'"':"";return"<"+we+We+`>
`+se+"</"+we+`>
`},be.listitem=function(se){return"<li>"+se+`</li>
`},be.checkbox=function(se){return"<input "+(se?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},be.paragraph=function(se){return"<p>"+se+`</p>
`},be.table=function(se,le){return le&&(le="<tbody>"+le+"</tbody>"),`<table>
<thead>
`+se+`</thead>
`+le+`</table>
`},be.tablerow=function(se){return`<tr>
`+se+`</tr>
`},be.tablecell=function(se,le){var me=le.header?"th":"td",we=le.align?"<"+me+' align="'+le.align+'">':"<"+me+">";return we+se+"</"+me+`>
`},be.strong=function(se){return"<strong>"+se+"</strong>"},be.em=function(se){return"<em>"+se+"</em>"},be.codespan=function(se){return"<code>"+se+"</code>"},be.br=function(){return this.options.xhtml?"<br/>":"<br>"},be.del=function(se){return"<del>"+se+"</del>"},be.link=function(se,le,me){if(se=he(this.options.sanitize,this.options.baseUrl,se),se===null)return me;var we='<a href="'+Se(se)+'"';return le&&(we+=' title="'+le+'"'),we+=">"+me+"</a>",we},be.image=function(se,le,me){if(se=he(this.options.sanitize,this.options.baseUrl,se),se===null)return me;var we='<img src="'+se+'" alt="'+me+'"';return le&&(we+=' title="'+le+'"'),we+=this.options.xhtml?"/>":">",we},be.text=function(se){return se},Oe}(),Ie=function(){function Oe(){}var be=Oe.prototype;return be.strong=function(se){return se},be.em=function(se){return se},be.codespan=function(se){return se},be.del=function(se){return se},be.html=function(se){return se},be.text=function(se){return se},be.link=function(se,le,me){return""+me},be.image=function(se,le,me){return""+me},be.br=function(){return""},Oe}(),st=function(){function Oe(){this.seen={}}var be=Oe.prototype;return be.slug=function(se){var le=se.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(le)){var me=le;do this.seen[me]++,le=me+"-"+this.seen[me];while(this.seen.hasOwnProperty(le))}return this.seen[le]=0,le},Oe}(),it=Z.defaults,ut=z.unescape,dt=function(){function Oe(_e){this.options=_e||it,this.options.renderer=this.options.renderer||new Ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ie,this.slugger=new st}Oe.parse=function(se,le){var me=new Oe(le);return me.parse(se)};var be=Oe.prototype;return be.parse=function(se,le){le===void 0&&(le=!0);var me="",we,We,$e,pt,Bt,Rt,Ct,tr,zt,ft,Pt,Yt,Lt,ir,Vt,rr,cr,ot,Kt=se.length;for(we=0;we<Kt;we++){ft=se[we];switch(ft.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline(ft.tokens),ft.depth,ut(this.parseInline(ft.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code(ft.text,ft.lang,ft.escaped);continue}case"table":{for(tr="",Ct="",pt=ft.header.length,We=0;We<pt;We++)Ct+=this.renderer.tablecell(this.parseInline(ft.tokens.header[We]),{header:!0,align:ft.align[We]});for(tr+=this.renderer.tablerow(Ct),zt="",pt=ft.cells.length,We=0;We<pt;We++){for(Rt=ft.tokens.cells[We],Ct="",Bt=Rt.length,$e=0;$e<Bt;$e++)Ct+=this.renderer.tablecell(this.parseInline(Rt[$e]),{header:!1,align:ft.align[$e]});zt+=this.renderer.tablerow(Ct)}me+=this.renderer.table(tr,zt);continue}case"blockquote":{zt=this.parse(ft.tokens),me+=this.renderer.blockquote(zt);continue}case"list":{for(Pt=ft.ordered,Yt=ft.start,Lt=ft.loose,pt=ft.items.length,zt="",We=0;We<pt;We++)Vt=ft.items[We],rr=Vt.checked,cr=Vt.task,ir="",Vt.task&&(ot=this.renderer.checkbox(rr),Lt?Vt.tokens.length>0&&Vt.tokens[0].type==="text"?(Vt.tokens[0].text=ot+" "+Vt.tokens[0].text,Vt.tokens[0].tokens&&Vt.tokens[0].tokens.length>0&&Vt.tokens[0].tokens[0].type==="text"&&(Vt.tokens[0].tokens[0].text=ot+" "+Vt.tokens[0].tokens[0].text)):Vt.tokens.unshift({type:"text",text:ot}):ir+=ot),ir+=this.parse(Vt.tokens,Lt),zt+=this.renderer.listitem(ir,cr,rr);me+=this.renderer.list(zt,Pt,Yt);continue}case"html":{me+=this.renderer.html(ft.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(zt=ft.tokens?this.parseInline(ft.tokens):ft.text;we+1<Kt&&se[we+1].type==="text";)ft=se[++we],zt+=`
`+(ft.tokens?this.parseInline(ft.tokens):ft.text);me+=le?this.renderer.paragraph(zt):zt;continue}default:{var nr='Token with "'+ft.type+'" type was not found.';if(this.options.silent){console.error(nr);return}else throw new Error(nr)}}}return me},be.parseInline=function(se,le){le=le||this.renderer;var me="",we,We,$e=se.length;for(we=0;we<$e;we++){We=se[we];switch(We.type){case"escape":{me+=le.text(We.text);break}case"html":{me+=le.html(We.text);break}case"link":{me+=le.link(We.href,We.title,this.parseInline(We.tokens,le));break}case"image":{me+=le.image(We.href,We.title,We.text);break}case"strong":{me+=le.strong(this.parseInline(We.tokens,le));break}case"em":{me+=le.em(this.parseInline(We.tokens,le));break}case"codespan":{me+=le.codespan(We.text);break}case"br":{me+=le.br();break}case"del":{me+=le.del(this.parseInline(We.tokens,le));break}case"text":{me+=le.text(We.text);break}default:{var pt='Token with "'+We.type+'" type was not found.';if(this.options.silent){console.error(pt);return}else throw new Error(pt)}}}return me},Oe}(),vt=z.merge,Tt=z.checkSanitizeDeprecation,Me=z.escape,Ye=Z.getDefaults,tt=Z.changeDefaults,at=Z.defaults;function ze(Oe,be,_e){if(typeof Oe=="undefined"||Oe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Oe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Oe)+", string expected");if(typeof be=="function"&&(_e=be,be=null),be=vt({},ze.defaults,be||{}),Tt(be),_e){var se=be.highlight,le;try{le=V.lex(Oe,be)}catch($e){return _e($e)}var me=function(pt){var Bt;if(!pt)try{Bt=dt.parse(le,be)}catch(Rt){pt=Rt}return be.highlight=se,pt?_e(pt):_e(null,Bt)};if(!se||se.length<3)return me();if(delete be.highlight,!le.length)return me();var we=0;ze.walkTokens(le,function($e){$e.type==="code"&&(we++,setTimeout(function(){se($e.text,$e.lang,function(pt,Bt){if(pt)return me(pt);Bt!=null&&Bt!==$e.text&&($e.text=Bt,$e.escaped=!0),we--,we===0&&me()})},0))}),we===0&&me();return}try{var We=V.lex(Oe,be);return be.walkTokens&&ze.walkTokens(We,be.walkTokens),dt.parse(We,be)}catch($e){if($e.message+=`
Please report this to https://github.com/markedjs/marked.`,be.silent)return"<p>An error occurred:</p><pre>"+Me($e.message+"",!0)+"</pre>";throw $e}}ze.options=ze.setOptions=function(Oe){return vt(ze.defaults,Oe),tt(ze.defaults),ze},ze.getDefaults=Ye,ze.defaults=at,ze.use=function(Oe){var be=vt({},Oe);if(Oe.renderer&&function(){var se=ze.defaults.renderer||new Ue,le=function(We){var $e=se[We];se[We]=function(){for(var pt=arguments.length,Bt=new Array(pt),Rt=0;Rt<pt;Rt++)Bt[Rt]=arguments[Rt];var Ct=Oe.renderer[We].apply(se,Bt);return Ct===!1&&(Ct=$e.apply(se,Bt)),Ct}};for(var me in Oe.renderer)le(me);be.renderer=se}(),Oe.tokenizer&&function(){var se=ze.defaults.tokenizer||new Fe,le=function(We){var $e=se[We];se[We]=function(){for(var pt=arguments.length,Bt=new Array(pt),Rt=0;Rt<pt;Rt++)Bt[Rt]=arguments[Rt];var Ct=Oe.tokenizer[We].apply(se,Bt);return Ct===!1&&(Ct=$e.apply(se,Bt)),Ct}};for(var me in Oe.tokenizer)le(me);be.tokenizer=se}(),Oe.walkTokens){var _e=ze.defaults.walkTokens;be.walkTokens=function(se){Oe.walkTokens(se),_e&&_e(se)}}ze.setOptions(be)},ze.walkTokens=function(Oe,be){for(var _e=F(Oe),se;!(se=_e()).done;){var le=se.value;be(le);switch(le.type){case"table":{for(var me=F(le.tokens.header),we;!(we=me()).done;){var We=we.value;ze.walkTokens(We,be)}for(var $e=F(le.tokens.cells),pt;!(pt=$e()).done;)for(var Bt=pt.value,Rt=F(Bt),Ct;!(Ct=Rt()).done;){var tr=Ct.value;ze.walkTokens(tr,be)}break}case"list":{ze.walkTokens(le.items,be);break}default:le.tokens&&ze.walkTokens(le.tokens,be)}}},ze.Parser=dt,ze.parser=dt.parse,ze.Renderer=Ue,ze.TextRenderer=Ie,ze.Lexer=V,ze.lexer=V.lex,ze.Tokenizer=Fe,ze.Slugger=st,ze.parse=ze;var qe=ze;return qe})},H7XF:function(It,At,re){"use strict";At.byteLength=M,At.toByteArray=O,At.fromByteArray=A;for(var ve=[],J=[],U=typeof Uint8Array!="undefined"?Uint8Array:Array,X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F=0,R=X.length;F<R;++F)ve[F]=X[F],J[X.charCodeAt(F)]=F;J["-".charCodeAt(0)]=62,J["_".charCodeAt(0)]=63;function Z(a){var r=a.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=a.indexOf("=");n===-1&&(n=r);var e=n===r?0:4-n%4;return[n,e]}function M(a){var r=Z(a),n=r[0],e=r[1];return(n+e)*3/4-e}function N(a,r,n){return(r+n)*3/4-n}function O(a){var r,n=Z(a),e=n[0],t=n[1],i=new U(N(a,e,t)),s=0,I=t>0?e-4:e,C;for(C=0;C<I;C+=4)r=J[a.charCodeAt(C)]<<18|J[a.charCodeAt(C+1)]<<12|J[a.charCodeAt(C+2)]<<6|J[a.charCodeAt(C+3)],i[s++]=r>>16&255,i[s++]=r>>8&255,i[s++]=r&255;return t===2&&(r=J[a.charCodeAt(C)]<<2|J[a.charCodeAt(C+1)]>>4,i[s++]=r&255),t===1&&(r=J[a.charCodeAt(C)]<<10|J[a.charCodeAt(C+1)]<<4|J[a.charCodeAt(C+2)]>>2,i[s++]=r>>8&255,i[s++]=r&255),i}function h(a){return ve[a>>18&63]+ve[a>>12&63]+ve[a>>6&63]+ve[a&63]}function b(a,r,n){for(var e,t=[],i=r;i<n;i+=3)e=(a[i]<<16&16711680)+(a[i+1]<<8&65280)+(a[i+2]&255),t.push(h(e));return t.join("")}function A(a){for(var r,n=a.length,e=n%3,t=[],i=16383,s=0,I=n-e;s<I;s+=i)t.push(b(a,s,s+i>I?I:s+i));return e===1?(r=a[n-1],t.push(ve[r>>2]+ve[r<<4&63]+"==")):e===2&&(r=(a[n-2]<<8)+a[n-1],t.push(ve[r>>10]+ve[r>>4&63]+ve[r<<2&63]+"=")),t.join("")}},HDXh:function(It,At,re){"use strict";(function(ve){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/var J=re("H7XF"),U=re("kVK+"),X=re("49sm");At.Buffer=M,At.SlowBuffer=t,At.INSPECT_MAX_BYTES=50,M.TYPED_ARRAY_SUPPORT=ve.TYPED_ARRAY_SUPPORT!==void 0?ve.TYPED_ARRAY_SUPPORT:F(),At.kMaxLength=R();function F(){try{var oe=new Uint8Array(1);return oe.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},oe.foo()===42&&typeof oe.subarray=="function"&&oe.subarray(1,1).byteLength===0}catch(V){return!1}}function R(){return M.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Z(oe,V){if(R()<V)throw new RangeError("Invalid typed array length");return M.TYPED_ARRAY_SUPPORT?(oe=new Uint8Array(V),oe.__proto__=M.prototype):(oe===null&&(oe=new M(V)),oe.length=V),oe}function M(oe,V,Y){if(!M.TYPED_ARRAY_SUPPORT&&!(this instanceof M))return new M(oe,V,Y);if(typeof oe=="number"){if(typeof V=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,oe)}return N(this,oe,V,Y)}M.poolSize=8192,M._augment=function(oe){return oe.__proto__=M.prototype,oe};function N(oe,V,Y,he){if(typeof V=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&V instanceof ArrayBuffer?r(oe,V,Y,he):typeof V=="string"?A(oe,V,Y):n(oe,V)}M.from=function(oe,V,Y){return N(null,oe,V,Y)},M.TYPED_ARRAY_SUPPORT&&(M.prototype.__proto__=Uint8Array.prototype,M.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&M[Symbol.species]===M&&Object.defineProperty(M,Symbol.species,{value:null,configurable:!0}));function O(oe){if(typeof oe!="number")throw new TypeError('"size" argument must be a number');if(oe<0)throw new RangeError('"size" argument must not be negative')}function h(oe,V,Y,he){return O(V),V<=0?Z(oe,V):Y!==void 0?typeof he=="string"?Z(oe,V).fill(Y,he):Z(oe,V).fill(Y):Z(oe,V)}M.alloc=function(oe,V,Y){return h(null,oe,V,Y)};function b(oe,V){if(O(V),oe=Z(oe,V<0?0:e(V)|0),!M.TYPED_ARRAY_SUPPORT)for(var Y=0;Y<V;++Y)oe[Y]=0;return oe}M.allocUnsafe=function(oe){return b(null,oe)},M.allocUnsafeSlow=function(oe){return b(null,oe)};function A(oe,V,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!M.isEncoding(Y))throw new TypeError('"encoding" must be a valid string encoding');var he=i(V,Y)|0;oe=Z(oe,he);var Se=oe.write(V,Y);return Se!==he&&(oe=oe.slice(0,Se)),oe}function a(oe,V){var Y=V.length<0?0:e(V.length)|0;oe=Z(oe,Y);for(var he=0;he<Y;he+=1)oe[he]=V[he]&255;return oe}function r(oe,V,Y,he){if(V.byteLength,Y<0||V.byteLength<Y)throw new RangeError("'offset' is out of bounds");if(V.byteLength<Y+(he||0))throw new RangeError("'length' is out of bounds");return Y===void 0&&he===void 0?V=new Uint8Array(V):he===void 0?V=new Uint8Array(V,Y):V=new Uint8Array(V,Y,he),M.TYPED_ARRAY_SUPPORT?(oe=V,oe.__proto__=M.prototype):oe=a(oe,V),oe}function n(oe,V){if(M.isBuffer(V)){var Y=e(V.length)|0;return oe=Z(oe,Y),oe.length===0||V.copy(oe,0,0,Y),oe}if(V){if(typeof ArrayBuffer!="undefined"&&V.buffer instanceof ArrayBuffer||"length"in V)return typeof V.length!="number"||bt(V.length)?Z(oe,0):a(oe,V);if(V.type==="Buffer"&&X(V.data))return a(oe,V.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function e(oe){if(oe>=R())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+R().toString(16)+" bytes");return oe|0}function t(oe){return+oe!=oe&&(oe=0),M.alloc(+oe)}M.isBuffer=function(V){return!!(V!=null&&V._isBuffer)},M.compare=function(V,Y){if(!M.isBuffer(V)||!M.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if(V===Y)return 0;for(var he=V.length,Se=Y.length,Ue=0,Ie=Math.min(he,Se);Ue<Ie;++Ue)if(V[Ue]!==Y[Ue]){he=V[Ue],Se=Y[Ue];break}return he<Se?-1:Se<he?1:0},M.isEncoding=function(V){switch(String(V).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},M.concat=function(V,Y){if(!X(V))throw new TypeError('"list" argument must be an Array of Buffers');if(V.length===0)return M.alloc(0);var he;if(Y===void 0)for(Y=0,he=0;he<V.length;++he)Y+=V[he].length;var Se=M.allocUnsafe(Y),Ue=0;for(he=0;he<V.length;++he){var Ie=V[he];if(!M.isBuffer(Ie))throw new TypeError('"list" argument must be an Array of Buffers');Ie.copy(Se,Ue),Ue+=Ie.length}return Se};function i(oe,V){if(M.isBuffer(oe))return oe.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(oe)||oe instanceof ArrayBuffer))return oe.byteLength;typeof oe!="string"&&(oe=""+oe);var Y=oe.length;if(Y===0)return 0;for(var he=!1;;)switch(V){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":case void 0:return ye(oe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return mt(oe).length;default:if(he)return ye(oe).length;V=(""+V).toLowerCase(),he=!0}}M.byteLength=i;function s(oe,V,Y){var he=!1;if((V===void 0||V<0)&&(V=0),V>this.length)return"";if((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)return"";if(Y>>>=0,V>>>=0,Y<=V)return"";for(oe||(oe="utf8");;)switch(oe){case"hex":return z(this,V,Y);case"utf8":case"utf-8":return g(this,V,Y);case"ascii":return P(this,V,Y);case"latin1":case"binary":return j(this,V,Y);case"base64":return m(this,V,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,V,Y);default:if(he)throw new TypeError("Unknown encoding: "+oe);oe=(oe+"").toLowerCase(),he=!0}}M.prototype._isBuffer=!0;function I(oe,V,Y){var he=oe[V];oe[V]=oe[Y],oe[Y]=he}M.prototype.swap16=function(){var V=this.length;if(V%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Y=0;Y<V;Y+=2)I(this,Y,Y+1);return this},M.prototype.swap32=function(){var V=this.length;if(V%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Y=0;Y<V;Y+=4)I(this,Y,Y+3),I(this,Y+1,Y+2);return this},M.prototype.swap64=function(){var V=this.length;if(V%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Y=0;Y<V;Y+=8)I(this,Y,Y+7),I(this,Y+1,Y+6),I(this,Y+2,Y+5),I(this,Y+3,Y+4);return this},M.prototype.toString=function(){var V=this.length|0;return V===0?"":arguments.length===0?g(this,0,V):s.apply(this,arguments)},M.prototype.equals=function(V){if(!M.isBuffer(V))throw new TypeError("Argument must be a Buffer");return this===V?!0:M.compare(this,V)===0},M.prototype.inspect=function(){var V="",Y=At.INSPECT_MAX_BYTES;return this.length>0&&(V=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(V+=" ... ")),"<Buffer "+V+">"},M.prototype.compare=function(V,Y,he,Se,Ue){if(!M.isBuffer(V))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),he===void 0&&(he=V?V.length:0),Se===void 0&&(Se=0),Ue===void 0&&(Ue=this.length),Y<0||he>V.length||Se<0||Ue>this.length)throw new RangeError("out of range index");if(Se>=Ue&&Y>=he)return 0;if(Se>=Ue)return-1;if(Y>=he)return 1;if(Y>>>=0,he>>>=0,Se>>>=0,Ue>>>=0,this===V)return 0;for(var Ie=Ue-Se,st=he-Y,it=Math.min(Ie,st),ut=this.slice(Se,Ue),dt=V.slice(Y,he),vt=0;vt<it;++vt)if(ut[vt]!==dt[vt]){Ie=ut[vt],st=dt[vt];break}return Ie<st?-1:st<Ie?1:0};function C(oe,V,Y,he,Se){if(oe.length===0)return-1;if(typeof Y=="string"?(he=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=Se?0:oe.length-1),Y<0&&(Y=oe.length+Y),Y>=oe.length){if(Se)return-1;Y=oe.length-1}else if(Y<0)if(Se)Y=0;else return-1;if(typeof V=="string"&&(V=M.from(V,he)),M.isBuffer(V))return V.length===0?-1:_(oe,V,Y,he,Se);if(typeof V=="number")return V=V&255,M.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Se?Uint8Array.prototype.indexOf.call(oe,V,Y):Uint8Array.prototype.lastIndexOf.call(oe,V,Y):_(oe,[V],Y,he,Se);throw new TypeError("val must be string, number or Buffer")}function _(oe,V,Y,he,Se){var Ue=1,Ie=oe.length,st=V.length;if(he!==void 0&&(he=String(he).toLowerCase(),he==="ucs2"||he==="ucs-2"||he==="utf16le"||he==="utf-16le")){if(oe.length<2||V.length<2)return-1;Ue=2,Ie/=2,st/=2,Y/=2}function it(Me,Ye){return Ue===1?Me[Ye]:Me.readUInt16BE(Ye*Ue)}var ut;if(Se){var dt=-1;for(ut=Y;ut<Ie;ut++)if(it(oe,ut)===it(V,dt===-1?0:ut-dt)){if(dt===-1&&(dt=ut),ut-dt+1===st)return dt*Ue}else dt!==-1&&(ut-=ut-dt),dt=-1}else for(Y+st>Ie&&(Y=Ie-st),ut=Y;ut>=0;ut--){for(var vt=!0,Tt=0;Tt<st;Tt++)if(it(oe,ut+Tt)!==it(V,Tt)){vt=!1;break}if(vt)return ut}return-1}M.prototype.includes=function(V,Y,he){return this.indexOf(V,Y,he)!==-1},M.prototype.indexOf=function(V,Y,he){return C(this,V,Y,he,!0)},M.prototype.lastIndexOf=function(V,Y,he){return C(this,V,Y,he,!1)};function x(oe,V,Y,he){Y=Number(Y)||0;var Se=oe.length-Y;he?(he=Number(he),he>Se&&(he=Se)):he=Se;var Ue=V.length;if(Ue%2!==0)throw new TypeError("Invalid hex string");he>Ue/2&&(he=Ue/2);for(var Ie=0;Ie<he;++Ie){var st=parseInt(V.substr(Ie*2,2),16);if(isNaN(st))return Ie;oe[Y+Ie]=st}return Ie}function T(oe,V,Y,he){return gt(ye(V,oe.length-Y),oe,Y,he)}function d(oe,V,Y,he){return gt(Pe(V),oe,Y,he)}function u(oe,V,Y,he){return d(oe,V,Y,he)}function o(oe,V,Y,he){return gt(mt(V),oe,Y,he)}function l(oe,V,Y,he){return gt(Et(V,oe.length-Y),oe,Y,he)}M.prototype.write=function(V,Y,he,Se){if(Y===void 0)Se="utf8",he=this.length,Y=0;else if(he===void 0&&typeof Y=="string")Se=Y,he=this.length,Y=0;else if(isFinite(Y))Y=Y|0,isFinite(he)?(he=he|0,Se===void 0&&(Se="utf8")):(Se=he,he=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ue=this.length-Y;if((he===void 0||he>Ue)&&(he=Ue),V.length>0&&(he<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");Se||(Se="utf8");for(var Ie=!1;;)switch(Se){case"hex":return x(this,V,Y,he);case"utf8":case"utf-8":return T(this,V,Y,he);case"ascii":return d(this,V,Y,he);case"latin1":case"binary":return u(this,V,Y,he);case"base64":return o(this,V,Y,he);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,V,Y,he);default:if(Ie)throw new TypeError("Unknown encoding: "+Se);Se=(""+Se).toLowerCase(),Ie=!0}},M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function m(oe,V,Y){return V===0&&Y===oe.length?J.fromByteArray(oe):J.fromByteArray(oe.slice(V,Y))}function g(oe,V,Y){Y=Math.min(oe.length,Y);for(var he=[],Se=V;Se<Y;){var Ue=oe[Se],Ie=null,st=Ue>239?4:Ue>223?3:Ue>191?2:1;if(Se+st<=Y){var it,ut,dt,vt;switch(st){case 1:Ue<128&&(Ie=Ue);break;case 2:it=oe[Se+1],(it&192)===128&&(vt=(Ue&31)<<6|it&63,vt>127&&(Ie=vt));break;case 3:it=oe[Se+1],ut=oe[Se+2],(it&192)===128&&(ut&192)===128&&(vt=(Ue&15)<<12|(it&63)<<6|ut&63,vt>2047&&(vt<55296||vt>57343)&&(Ie=vt));break;case 4:it=oe[Se+1],ut=oe[Se+2],dt=oe[Se+3],(it&192)===128&&(ut&192)===128&&(dt&192)===128&&(vt=(Ue&15)<<18|(it&63)<<12|(ut&63)<<6|dt&63,vt>65535&&vt<1114112&&(Ie=vt))}}Ie===null?(Ie=65533,st=1):Ie>65535&&(Ie-=65536,he.push(Ie>>>10&1023|55296),Ie=56320|Ie&1023),he.push(Ie),Se+=st}return L(he)}var E=4096;function L(oe){var V=oe.length;if(V<=E)return String.fromCharCode.apply(String,oe);for(var Y="",he=0;he<V;)Y+=String.fromCharCode.apply(String,oe.slice(he,he+=E));return Y}function P(oe,V,Y){var he="";Y=Math.min(oe.length,Y);for(var Se=V;Se<Y;++Se)he+=String.fromCharCode(oe[Se]&127);return he}function j(oe,V,Y){var he="";Y=Math.min(oe.length,Y);for(var Se=V;Se<Y;++Se)he+=String.fromCharCode(oe[Se]);return he}function z(oe,V,Y){var he=oe.length;(!V||V<0)&&(V=0),(!Y||Y<0||Y>he)&&(Y=he);for(var Se="",Ue=V;Ue<Y;++Ue)Se+=Ce(oe[Ue]);return Se}function ee(oe,V,Y){for(var he=oe.slice(V,Y),Se="",Ue=0;Ue<he.length;Ue+=2)Se+=String.fromCharCode(he[Ue]+he[Ue+1]*256);return Se}M.prototype.slice=function(V,Y){var he=this.length;V=~~V,Y=Y===void 0?he:~~Y,V<0?(V+=he,V<0&&(V=0)):V>he&&(V=he),Y<0?(Y+=he,Y<0&&(Y=0)):Y>he&&(Y=he),Y<V&&(Y=V);var Se;if(M.TYPED_ARRAY_SUPPORT)Se=this.subarray(V,Y),Se.__proto__=M.prototype;else{var Ue=Y-V;Se=new M(Ue,void 0);for(var Ie=0;Ie<Ue;++Ie)Se[Ie]=this[Ie+V]}return Se};function Q(oe,V,Y){if(oe%1!==0||oe<0)throw new RangeError("offset is not uint");if(oe+V>Y)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUIntLE=function(V,Y,he){V=V|0,Y=Y|0,he||Q(V,Y,this.length);for(var Se=this[V],Ue=1,Ie=0;++Ie<Y&&(Ue*=256);)Se+=this[V+Ie]*Ue;return Se},M.prototype.readUIntBE=function(V,Y,he){V=V|0,Y=Y|0,he||Q(V,Y,this.length);for(var Se=this[V+--Y],Ue=1;Y>0&&(Ue*=256);)Se+=this[V+--Y]*Ue;return Se},M.prototype.readUInt8=function(V,Y){return Y||Q(V,1,this.length),this[V]},M.prototype.readUInt16LE=function(V,Y){return Y||Q(V,2,this.length),this[V]|this[V+1]<<8},M.prototype.readUInt16BE=function(V,Y){return Y||Q(V,2,this.length),this[V]<<8|this[V+1]},M.prototype.readUInt32LE=function(V,Y){return Y||Q(V,4,this.length),(this[V]|this[V+1]<<8|this[V+2]<<16)+this[V+3]*16777216},M.prototype.readUInt32BE=function(V,Y){return Y||Q(V,4,this.length),this[V]*16777216+(this[V+1]<<16|this[V+2]<<8|this[V+3])},M.prototype.readIntLE=function(V,Y,he){V=V|0,Y=Y|0,he||Q(V,Y,this.length);for(var Se=this[V],Ue=1,Ie=0;++Ie<Y&&(Ue*=256);)Se+=this[V+Ie]*Ue;return Ue*=128,Se>=Ue&&(Se-=Math.pow(2,8*Y)),Se},M.prototype.readIntBE=function(V,Y,he){V=V|0,Y=Y|0,he||Q(V,Y,this.length);for(var Se=Y,Ue=1,Ie=this[V+--Se];Se>0&&(Ue*=256);)Ie+=this[V+--Se]*Ue;return Ue*=128,Ie>=Ue&&(Ie-=Math.pow(2,8*Y)),Ie},M.prototype.readInt8=function(V,Y){return Y||Q(V,1,this.length),this[V]&128?(255-this[V]+1)*-1:this[V]},M.prototype.readInt16LE=function(V,Y){Y||Q(V,2,this.length);var he=this[V]|this[V+1]<<8;return he&32768?he|4294901760:he},M.prototype.readInt16BE=function(V,Y){Y||Q(V,2,this.length);var he=this[V+1]|this[V]<<8;return he&32768?he|4294901760:he},M.prototype.readInt32LE=function(V,Y){return Y||Q(V,4,this.length),this[V]|this[V+1]<<8|this[V+2]<<16|this[V+3]<<24},M.prototype.readInt32BE=function(V,Y){return Y||Q(V,4,this.length),this[V]<<24|this[V+1]<<16|this[V+2]<<8|this[V+3]},M.prototype.readFloatLE=function(V,Y){return Y||Q(V,4,this.length),U.read(this,V,!0,23,4)},M.prototype.readFloatBE=function(V,Y){return Y||Q(V,4,this.length),U.read(this,V,!1,23,4)},M.prototype.readDoubleLE=function(V,Y){return Y||Q(V,8,this.length),U.read(this,V,!0,52,8)},M.prototype.readDoubleBE=function(V,Y){return Y||Q(V,8,this.length),U.read(this,V,!1,52,8)};function q(oe,V,Y,he,Se,Ue){if(!M.isBuffer(oe))throw new TypeError('"buffer" argument must be a Buffer instance');if(V>Se||V<Ue)throw new RangeError('"value" argument is out of bounds');if(Y+he>oe.length)throw new RangeError("Index out of range")}M.prototype.writeUIntLE=function(V,Y,he,Se){if(V=+V,Y=Y|0,he=he|0,!Se){var Ue=Math.pow(2,8*he)-1;q(this,V,Y,he,Ue,0)}var Ie=1,st=0;for(this[Y]=V&255;++st<he&&(Ie*=256);)this[Y+st]=V/Ie&255;return Y+he},M.prototype.writeUIntBE=function(V,Y,he,Se){if(V=+V,Y=Y|0,he=he|0,!Se){var Ue=Math.pow(2,8*he)-1;q(this,V,Y,he,Ue,0)}var Ie=he-1,st=1;for(this[Y+Ie]=V&255;--Ie>=0&&(st*=256);)this[Y+Ie]=V/st&255;return Y+he},M.prototype.writeUInt8=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,1,255,0),M.TYPED_ARRAY_SUPPORT||(V=Math.floor(V)),this[Y]=V&255,Y+1};function ae(oe,V,Y,he){V<0&&(V=65535+V+1);for(var Se=0,Ue=Math.min(oe.length-Y,2);Se<Ue;++Se)oe[Y+Se]=(V&255<<8*(he?Se:1-Se))>>>(he?Se:1-Se)*8}M.prototype.writeUInt16LE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[Y]=V&255,this[Y+1]=V>>>8):ae(this,V,Y,!0),Y+2},M.prototype.writeUInt16BE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[Y]=V>>>8,this[Y+1]=V&255):ae(this,V,Y,!1),Y+2};function ge(oe,V,Y,he){V<0&&(V=4294967295+V+1);for(var Se=0,Ue=Math.min(oe.length-Y,4);Se<Ue;++Se)oe[Y+Se]=V>>>(he?Se:3-Se)*8&255}M.prototype.writeUInt32LE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[Y+3]=V>>>24,this[Y+2]=V>>>16,this[Y+1]=V>>>8,this[Y]=V&255):ge(this,V,Y,!0),Y+4},M.prototype.writeUInt32BE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[Y]=V>>>24,this[Y+1]=V>>>16,this[Y+2]=V>>>8,this[Y+3]=V&255):ge(this,V,Y,!1),Y+4},M.prototype.writeIntLE=function(V,Y,he,Se){if(V=+V,Y=Y|0,!Se){var Ue=Math.pow(2,8*he-1);q(this,V,Y,he,Ue-1,-Ue)}var Ie=0,st=1,it=0;for(this[Y]=V&255;++Ie<he&&(st*=256);)V<0&&it===0&&this[Y+Ie-1]!==0&&(it=1),this[Y+Ie]=(V/st>>0)-it&255;return Y+he},M.prototype.writeIntBE=function(V,Y,he,Se){if(V=+V,Y=Y|0,!Se){var Ue=Math.pow(2,8*he-1);q(this,V,Y,he,Ue-1,-Ue)}var Ie=he-1,st=1,it=0;for(this[Y+Ie]=V&255;--Ie>=0&&(st*=256);)V<0&&it===0&&this[Y+Ie+1]!==0&&(it=1),this[Y+Ie]=(V/st>>0)-it&255;return Y+he},M.prototype.writeInt8=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,1,127,-128),M.TYPED_ARRAY_SUPPORT||(V=Math.floor(V)),V<0&&(V=255+V+1),this[Y]=V&255,Y+1},M.prototype.writeInt16LE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[Y]=V&255,this[Y+1]=V>>>8):ae(this,V,Y,!0),Y+2},M.prototype.writeInt16BE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[Y]=V>>>8,this[Y+1]=V&255):ae(this,V,Y,!1),Y+2},M.prototype.writeInt32LE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,4,2147483647,-2147483648),M.TYPED_ARRAY_SUPPORT?(this[Y]=V&255,this[Y+1]=V>>>8,this[Y+2]=V>>>16,this[Y+3]=V>>>24):ge(this,V,Y,!0),Y+4},M.prototype.writeInt32BE=function(V,Y,he){return V=+V,Y=Y|0,he||q(this,V,Y,4,2147483647,-2147483648),V<0&&(V=4294967295+V+1),M.TYPED_ARRAY_SUPPORT?(this[Y]=V>>>24,this[Y+1]=V>>>16,this[Y+2]=V>>>8,this[Y+3]=V&255):ge(this,V,Y,!1),Y+4};function pe(oe,V,Y,he,Se,Ue){if(Y+he>oe.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Ne(oe,V,Y,he,Se){return Se||pe(oe,V,Y,4,34028234663852886e22,-34028234663852886e22),U.write(oe,V,Y,he,23,4),Y+4}M.prototype.writeFloatLE=function(V,Y,he){return Ne(this,V,Y,!0,he)},M.prototype.writeFloatBE=function(V,Y,he){return Ne(this,V,Y,!1,he)};function Fe(oe,V,Y,he,Se){return Se||pe(oe,V,Y,8,17976931348623157e292,-17976931348623157e292),U.write(oe,V,Y,he,52,8),Y+8}M.prototype.writeDoubleLE=function(V,Y,he){return Fe(this,V,Y,!0,he)},M.prototype.writeDoubleBE=function(V,Y,he){return Fe(this,V,Y,!1,he)},M.prototype.copy=function(V,Y,he,Se){if(he||(he=0),!Se&&Se!==0&&(Se=this.length),Y>=V.length&&(Y=V.length),Y||(Y=0),Se>0&&Se<he&&(Se=he),Se===he)return 0;if(V.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(he<0||he>=this.length)throw new RangeError("sourceStart out of bounds");if(Se<0)throw new RangeError("sourceEnd out of bounds");Se>this.length&&(Se=this.length),V.length-Y<Se-he&&(Se=V.length-Y+he);var Ue=Se-he,Ie;if(this===V&&he<Y&&Y<Se)for(Ie=Ue-1;Ie>=0;--Ie)V[Ie+Y]=this[Ie+he];else if(Ue<1e3||!M.TYPED_ARRAY_SUPPORT)for(Ie=0;Ie<Ue;++Ie)V[Ie+Y]=this[Ie+he];else Uint8Array.prototype.set.call(V,this.subarray(he,he+Ue),Y);return Ue},M.prototype.fill=function(V,Y,he,Se){if(typeof V=="string"){if(typeof Y=="string"?(Se=Y,Y=0,he=this.length):typeof he=="string"&&(Se=he,he=this.length),V.length===1){var Ue=V.charCodeAt(0);Ue<256&&(V=Ue)}if(Se!==void 0&&typeof Se!="string")throw new TypeError("encoding must be a string");if(typeof Se=="string"&&!M.isEncoding(Se))throw new TypeError("Unknown encoding: "+Se)}else typeof V=="number"&&(V=V&255);if(Y<0||this.length<Y||this.length<he)throw new RangeError("Out of range index");if(he<=Y)return this;Y=Y>>>0,he=he===void 0?this.length:he>>>0,V||(V=0);var Ie;if(typeof V=="number")for(Ie=Y;Ie<he;++Ie)this[Ie]=V;else{var st=M.isBuffer(V)?V:ye(new M(V,Se).toString()),it=st.length;for(Ie=0;Ie<he-Y;++Ie)this[Ie+Y]=st[Ie%it]}return this};var He=/[^+\/0-9A-Za-z-_]/g;function Ke(oe){if(oe=Xe(oe).replace(He,""),oe.length<2)return"";for(;oe.length%4!==0;)oe=oe+"=";return oe}function Xe(oe){return oe.trim?oe.trim():oe.replace(/^\s+|\s+$/g,"")}function Ce(oe){return oe<16?"0"+oe.toString(16):oe.toString(16)}function ye(oe,V){V=V||Infinity;for(var Y,he=oe.length,Se=null,Ue=[],Ie=0;Ie<he;++Ie){if(Y=oe.charCodeAt(Ie),Y>55295&&Y<57344){if(!Se){if(Y>56319){(V-=3)>-1&&Ue.push(239,191,189);continue}else if(Ie+1===he){(V-=3)>-1&&Ue.push(239,191,189);continue}Se=Y;continue}if(Y<56320){(V-=3)>-1&&Ue.push(239,191,189),Se=Y;continue}Y=(Se-55296<<10|Y-56320)+65536}else Se&&((V-=3)>-1&&Ue.push(239,191,189));if(Se=null,Y<128){if((V-=1)<0)break;Ue.push(Y)}else if(Y<2048){if((V-=2)<0)break;Ue.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((V-=3)<0)break;Ue.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((V-=4)<0)break;Ue.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return Ue}function Pe(oe){for(var V=[],Y=0;Y<oe.length;++Y)V.push(oe.charCodeAt(Y)&255);return V}function Et(oe,V){for(var Y,he,Se,Ue=[],Ie=0;Ie<oe.length&&!((V-=2)<0);++Ie)Y=oe.charCodeAt(Ie),he=Y>>8,Se=Y%256,Ue.push(Se),Ue.push(he);return Ue}function mt(oe){return J.toByteArray(Ke(oe))}function gt(oe,V,Y,he){for(var Se=0;Se<he&&!(Se+Y>=V.length||Se>=oe.length);++Se)V[Se+Y]=oe[Se];return Se}function bt(oe){return oe!==oe}}).call(this,re("IyRk"))},IBYe:function(It,At,re){"use strict";function ve(J){return null}At.a=ve},LdHM:function(It,At,re){"use strict";re.d(At,"b",function(){return s}),re.d(At,"a",function(){return C});var ve=re("1OyB"),J=re("vuIU"),U=re("Ji7U"),X=re("LK+K"),F=re("q1tI"),R=re("rePB"),Z=re("Ff2n"),M=re("ODXe"),N=re("4IlW"),O=re("bX4T"),h=re("YrtM"),b=re("TSYQ"),A=re.n(b),a=re("+nKL"),r=re("8OUc"),n=function(q,ae){var ge=q.prefixCls,pe=q.id,Ne=q.flattenOptions,Fe=q.childrenAsData,He=q.values,Ke=q.searchValue,Xe=q.multiple,Ce=q.defaultActiveFirstOption,ye=q.height,Pe=q.itemHeight,Et=q.notFoundContent,mt=q.open,gt=q.menuItemSelectedIcon,bt=q.virtual,oe=q.onSelect,V=q.onToggleOpen,Y=q.onActiveValue,he=q.onScroll,Se=q.onMouseEnter,Ue="".concat(ge,"-item"),Ie=Object(h.a)(function(){return Ne},[mt,Ne],function(qe,Oe){return Oe[0]&&qe[1]!==Oe[1]}),st=F.useRef(null),it=function(Oe){Oe.preventDefault()},ut=function(Oe){st.current&&st.current.scrollTo({index:Oe})},dt=function(Oe){for(var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_e=Ie.length,se=0;se<_e;se+=1){var le=(Oe+se*be+_e)%_e,me=Ie[le],we=me.group,We=me.data;if(!we&&!We.disabled)return le}return-1},vt=F.useState(function(){return dt(0)}),Tt=Object(M.a)(vt,2),Me=Tt[0],Ye=Tt[1],tt=function(Oe){Ye(Oe);var be=Ie[Oe];if(!be){Y(null,-1);return}Y(be.data.value,Oe)};F.useEffect(function(){tt(Ce!==!1?dt(0):-1)},[Ie.length,Ke]),F.useEffect(function(){var qe=setTimeout(function(){if(!Xe&&mt&&He.size===1){var Oe=Array.from(He)[0],be=Ie.findIndex(function(_e){var se=_e.data;return se.value===Oe});tt(be),ut(be)}});return function(){return clearTimeout(qe)}},[mt]);var at=function(Oe){Oe!==void 0&&oe(Oe,{selected:!He.has(Oe)}),Xe||V(!1)};if(F.useImperativeHandle(ae,function(){return{onKeyDown:function(Oe){var be=Oe.which;switch(be){case N.a.UP:case N.a.DOWN:{var _e=0;if(be===N.a.UP?_e=-1:be===N.a.DOWN&&(_e=1),_e!==0){var se=dt(Me+_e,_e);ut(se),tt(se)}break}case N.a.ENTER:{var le=Ie[Me];le&&!le.data.disabled?at(le.data.value):at(void 0),mt&&Oe.preventDefault();break}case N.a.ESC:V(!1)}},onKeyUp:function(){},scrollTo:function(Oe){ut(Oe)}}}),Ie.length===0)return F.createElement("div",{role:"listbox",id:"".concat(pe,"_list"),className:"".concat(Ue,"-empty"),onMouseDown:it},Et);function ze(qe){var Oe=Ie[qe];if(!Oe)return null;var be=Oe.data||{},_e=be.value,se=be.label,le=be.children,me=Object(O.a)(be,!0),we=Fe?le:se;return Oe?F.createElement("div",Object.assign({"aria-label":typeof we=="string"?we:null},me,{key:qe,role:"option",id:"".concat(pe,"_list_").concat(qe),"aria-selected":He.has(_e)}),_e):null}return F.createElement(F.Fragment,null,F.createElement("div",{role:"listbox",id:"".concat(pe,"_list"),style:{height:0,width:0,overflow:"hidden"}},ze(Me-1),ze(Me),ze(Me+1)),F.createElement(a.a,{itemKey:"key",ref:st,data:Ie,height:ye,itemHeight:Pe,fullHeight:!1,onMouseDown:it,onScroll:he,virtual:bt,onMouseEnter:Se},function(qe,Oe){var be,_e=qe.group,se=qe.groupOption,le=qe.data,me=le.label,we=le.key;if(_e)return F.createElement("div",{className:A()(Ue,"".concat(Ue,"-group"))},me!==void 0?me:we);var We=le.disabled,$e=le.value,pt=le.title,Bt=le.children,Rt=le.style,Ct=le.className,tr=Object(Z.a)(le,["disabled","value","title","children","style","className"]),zt=He.has($e),ft="".concat(Ue,"-option"),Pt=A()(Ue,ft,Ct,(be={},Object(R.a)(be,"".concat(ft,"-grouped"),se),Object(R.a)(be,"".concat(ft,"-active"),Me===Oe&&!We),Object(R.a)(be,"".concat(ft,"-disabled"),We),Object(R.a)(be,"".concat(ft,"-selected"),zt),be)),Yt=Fe?Bt:me,Lt=!gt||typeof gt=="function"||zt;return F.createElement("div",Object.assign({},tr,{"aria-selected":zt,className:Pt,title:pt,onMouseMove:function(){if(Me===Oe||We)return;tt(Oe)},onClick:function(){We||at($e)},style:Rt}),F.createElement("div",{className:"".concat(ft,"-content")},Yt||$e),F.isValidElement(gt)||zt,Lt&&F.createElement(r.a,{className:"".concat(Ue,"-option-state"),customizeIcon:gt,customizeIconProps:{isSelected:zt}},zt?"\u2713":null))}))},e=F.forwardRef(n);e.displayName="OptionList";var t=e,i=function(){return null};i.isSelectOption=!0;var s=i,I=function(){return null};I.isSelectOptGroup=!0;var C=I,_=re("VTBJ"),x=re("Zm9Q");function T(Q){var q=Q.key,ae=Q.props,ge=ae.children,pe=ae.value,Ne=Object(Z.a)(ae,["children","value"]);return Object(_.a)({key:q,value:pe!==void 0?pe:q,children:ge},Ne)}function d(Q){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(Q).map(function(ae,ge){if(!F.isValidElement(ae)||!ae.type)return null;var pe=ae.type.isSelectOptGroup,Ne=ae.key,Fe=ae.props,He=Fe.children,Ke=Object(Z.a)(Fe,["children"]);return q||!pe?T(ae):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(Ne===null?ge:Ne,"__"),label:Ne},Ke),{},{options:d(He)})}).filter(function(ae){return ae})}var u=re("2Qr1"),o=re("qNPg"),l=re("U8pU"),m=re("Kwbf"),g=re("WKfj");function E(Q){var q=Q.mode,ae=Q.options,ge=Q.children,pe=Q.backfill,Ne=Q.allowClear,Fe=Q.placeholder,He=Q.getInputElement,Ke=Q.showSearch,Xe=Q.onSearch,Ce=Q.defaultOpen,ye=Q.autoFocus,Pe=Q.labelInValue,Et=Q.value,mt=Q.inputValue,gt=Q.optionLabelProp,bt=q==="multiple"||q==="tags",oe=Ke!==void 0?Ke:bt||q==="combobox",V=ae||d(ge);if(Object(m.a)(q!=="tags"||V.every(function(Ue){return!Ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),q==="tags"||q==="combobox"){var Y=V.some(function(Ue){return Ue.options?Ue.options.some(function(Ie){return typeof("value"in Ie?Ie.value:Ie.key)=="number"}):typeof("value"in Ue?Ue.value:Ue.key)=="number"});Object(m.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(m.a)(q!=="combobox"||!gt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(m.a)(q==="combobox"||!pe,"`backfill` only works with `combobox` mode."),Object(m.a)(q==="combobox"||!He,"`getInputElement` only work with `combobox` mode."),Object(m.b)(q!=="combobox"||!He||!Ne||!Fe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Xe&&!oe&&q!=="combobox"&&q!=="tags"&&Object(m.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(m.b)(!Ce||ye,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Et!=null){var he=Object(g.d)(Et);Object(m.a)(!Pe||he.every(function(Ue){return Object(l.a)(Ue)==="object"&&("key"in Ue||"value"in Ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(m.a)(!bt||Array.isArray(Et),"`value` should be array when `mode` is `multiple` or `tags`")}if(ge){var Se=null;Object(x.a)(ge).some(function(Ue){if(!F.isValidElement(Ue)||!Ue.type)return!1;var Ie=Ue.type;if(Ie.isSelectOption)return!1;if(Ie.isSelectOptGroup){var st=Object(x.a)(Ue.props.children).every(function(it){return!F.isValidElement(it)||!Ue.type||it.type.isSelectOption?!0:(Se=it.type,!1)});return!st}return Se=Ie,!0}),Se&&Object(m.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Se.displayName||Se.name||Se,"`.")),Object(m.a)(mt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var L=E,P=Object(o.a)({prefixCls:"rc-select",components:{optionList:t},convertChildrenToData:d,flattenOptions:u.d,getLabeledValue:u.e,filterOptions:u.b,isValueDisabled:u.g,findValueOption:u.c,warningProps:L,fillOptionsWithMissingValue:u.a}),j=function(Q){Object(U.a)(ae,Q);var q=Object(X.a)(ae);function ae(){var ge;return Object(ve.a)(this,ae),ge=q.apply(this,arguments),ge.selectRef=F.createRef(),ge.focus=function(){ge.selectRef.current.focus()},ge.blur=function(){ge.selectRef.current.blur()},ge}return Object(J.a)(ae,[{key:"render",value:function(){return F.createElement(P,Object.assign({ref:this.selectRef},this.props))}}]),ae}(F.Component);j.Option=s,j.OptGroup=C;var z=j,ee=At.c=z},NNiE:function(It,At,re){"use strict";var ve=re("7Kak"),J=re("9yH6"),U=re("tJVT"),X=re("q1tI"),F=re.n(X),R=re("9Bee"),Z=re("+M/w"),M=re.n(Z),N=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],O=function(b){var A=b.index,a=b.typeName,r=b.type,n=b.data,e=n===void 0?{}:n,t=b.inMouseId,i=b.isshow,s=b.onSetScore,I=s===void 0?function(){}:s,C=b.onDelete,_=C===void 0?function(){}:C,x=b.onMouseEnter,T=x===void 0?function(){}:x,d=b.showAnswer,u=d===void 0?!1:d,o=Object(X.useState)(!1),l=Object(U.a)(o,2),m=l[0],g=l[1],E=function(){var pe;return F.a.createElement("div",{className:M.a.answerWrap},e==null||((pe=e.choices)===null||pe===void 0)?void 0:pe.map(function(Ne,Fe){return F.a.createElement("div",{className:"".concat(M.a.flexRow," mt15"),key:Fe},F.a.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},N[Fe]),F.a.createElement("div",{className:"".concat(M.a.answer," ml5")},F.a.createElement(R.a,{value:Ne==null?void 0:Ne.choice_text})))}),u&&F.a.createElement("div",{className:"mt10 ".concat(M.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",e==null?void 0:e.standard_answer_show))},L=function(){var pe;return F.a.createElement("div",{className:M.a.answerWrap},F.a.createElement("div",{className:"".concat(M.a.flexRow," mt15")},e==null||((pe=e.choices)===null||pe===void 0)?void 0:pe.map(function(Ne,Fe){return F.a.createElement(J.a,{disabled:!0,key:Fe},Ne==null?void 0:Ne.choice_text)})),u&&F.a.createElement("div",{className:"mt10 ".concat(M.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",e==null?void 0:e.standard_answer_show))},P=function(){var pe;return F.a.createElement("div",{className:M.a.answerWrap},F.a.createElement("div",{className:"".concat(M.a.flexRow," mt15")},F.a.createElement(R.a,{value:e==null||((pe=e.program_attr)===null||pe===void 0)?void 0:pe.description})))},j=function(){var pe;return F.a.createElement("div",{className:M.a.answerWrap},u&&F.a.createElement("div",{className:"".concat(M.a.flexColumn," mt15")},e==null||((pe=e.standard_answer)===null||pe===void 0)?void 0:pe.map(function(Ne,Fe){return F.a.createElement(R.a,{key:Fe,value:"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(Ne.position,"\uFF09\uFF1A").concat(Ne.answer_text.join("\u3001"))})})))},z=function(){var pe;return F.a.createElement("div",{className:M.a.answerWrap},u&&F.a.createElement("div",{className:"mt15"},F.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A"),F.a.createElement(R.a,{value:e==null||((pe=e.answer_texts)===null||pe===void 0)?void 0:pe[0]})))},ee=function(){var pe;return F.a.createElement("div",{className:M.a.answerWrap},F.a.createElement("div",{className:"mt10"},"\u5173\u5361"),e==null||((pe=e.shixun)===null||pe===void 0)?void 0:pe.map(function(Ne,Fe){return F.a.createElement("div",{className:"mt10 font14",key:Fe},Fe+1,". ",Ne==null?void 0:Ne.challenge_name)}))},Q=function(){var pe;return F.a.createElement("div",{className:M.a.answerWrap,style:{display:m&&"none"}},e==null||((pe=e.sub_questions)===null||pe===void 0)?void 0:pe.map(function(Ne,Fe){var He,Ke='<span style="margin-right: 10px">'.concat(A+1,".").concat(Fe+1,'</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class="c-grey-999">\uFF08').concat(Ne.score,"\u5206\uFF09</span>");return F.a.createElement(X.Fragment,{key:Ne==null?void 0:Ne.id},F.a.createElement("div",{className:M.a.titleWrap,style:{marginTop:16}},F.a.createElement(R.a,{className:M.a.titleHtml,value:Ke+Ne.name})),Ne==null||((He=Ne.choices)===null||He===void 0)?void 0:He.map(function(Xe,Ce){return F.a.createElement("div",{className:"".concat(M.a.flexRow," mt15"),key:Ce},F.a.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},N[Ce]),F.a.createElement("div",{className:"".concat(M.a.answer," ml5")},F.a.createElement(R.a,{value:Xe==null?void 0:Xe.choice_text})))}),u&&F.a.createElement("div",{className:"mt10 ".concat(M.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",Ne==null?void 0:Ne.standard_answer_show))}))},q=function(){var pe={SINGLE:E,MULTIPLE:E,JUDGMENT:L,PROGRAM:P,COMPLETION:j,SUBJECTIVE:z,PRACTICAL:ee,COMBINATION:Q};return pe[r]?pe[r]():null},ae=function(pe,Ne){var Fe,He='<span style="margin-right: -10px">'.concat(Ne+1,'\u3001</span><span class="c-grey-999">\uFF08').concat((pe==null?void 0:pe.item_type)==="combination"?"\u5171".concat(pe==null||((Fe=pe.sub_questions)===null||Fe===void 0)?void 0:Fe.length,"\u5C0F\u9898\uFF0C"):"").concat(pe.score,"\u5206\uFF09</span> ");return He};return F.a.createElement("div",{onMouseEnter:function(){return T(e.id)}},t===e.id&&F.a.createElement("div",{className:M.a.action},F.a.createElement("div",{className:M.a.setScore,onClick:function(){return I(e.id,a,e==null?void 0:e.shixun,e.score,e)}},"\u8BBE\u7F6E\u5F97\u5206"),F.a.createElement("div",{className:M.a.delete,onClick:function(){return _(e.id)}},"\u5220\u9664")),F.a.createElement("div",{className:M.a.content},F.a.createElement("div",{className:M.a.titleWrap,style:{justifyContent:"space-between"}},F.a.createElement(R.a,{className:M.a.titleHtml,value:ae(e,A)+((e==null?void 0:e.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(e.name||(e==null?void 0:e.shixun_name))}),(e==null?void 0:e.item_type)==="combination"&&!i&&F.a.createElement("span",{onClick:function(pe){g(!m)},style:{textAlign:"end",flexShrink:0}},m?"\u5C55\u5F00":"\u6536\u8D77")),q()))};At.a=O},NvD2:function(It,At,re){"use strict";re.d(At,"a",function(){return R});var ve=re("Kwbf");function J(Z,M){var N=new Set;return Z.forEach(function(O){M.has(O)||N.add(O)}),N}function U(Z){var M=Z||{},N=M.disabled,O=M.disableCheckbox,h=M.checkable;return!!(N||O)||h===!1}function X(Z,M,N,O){for(var h=new Set(Z),b=new Set,A=0;A<=N;A+=1){var a=M.get(A)||new Set;a.forEach(function(t){var i=t.key,s=t.node,I=t.children,C=I===void 0?[]:I;h.has(i)&&!O(s)&&C.filter(function(_){return!O(_.node)}).forEach(function(_){h.add(_.key)})})}for(var r=new Set,n=N;n>=0;n-=1){var e=M.get(n)||new Set;e.forEach(function(t){var i=t.parent,s=t.node;if(O(s)||!t.parent||r.has(t.parent.key))return;if(O(t.parent.node)){r.add(i.key);return}var I=!0,C=!1;(i.children||[]).filter(function(_){return!O(_.node)}).forEach(function(_){var x=_.key,T=h.has(x);I&&!T&&(I=!1),!C&&(T||b.has(x))&&(C=!0)}),I&&h.add(i.key),C&&b.add(i.key),r.add(i.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(J(b,h))}}function F(Z,M,N,O,h){for(var b=new Set(Z),A=new Set(M),a=0;a<=O;a+=1){var r=N.get(a)||new Set;r.forEach(function(i){var s=i.key,I=i.node,C=i.children,_=C===void 0?[]:C;!b.has(s)&&!A.has(s)&&!h(I)&&_.filter(function(x){return!h(x.node)}).forEach(function(x){b.delete(x.key)})})}A=new Set;for(var n=new Set,e=O;e>=0;e-=1){var t=N.get(e)||new Set;t.forEach(function(i){var s=i.parent,I=i.node;if(h(I)||!i.parent||n.has(i.parent.key))return;if(h(i.parent.node)){n.add(s.key);return}var C=!0,_=!1;(s.children||[]).filter(function(x){return!h(x.node)}).forEach(function(x){var T=x.key,d=b.has(T);C&&!d&&(C=!1),!_&&(d||A.has(T))&&(_=!0)}),C||b.delete(s.key),_&&A.add(s.key),n.add(s.key)})}return{checkedKeys:Array.from(b),halfCheckedKeys:Array.from(J(A,b))}}function R(Z,M,N,O){var h=[],b;O?b=O:b=U;var A=new Set(Z.filter(function(e){var t=!!N[e];return t||h.push(e),t})),a=new Map,r=0;Object.keys(N).forEach(function(e){var t=N[e],i=t.level,s=a.get(i);s||(s=new Set,a.set(i,s)),s.add(t),r=Math.max(r,i)}),Object(ve.a)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(e){return"'".concat(e,"'")}).join(", ")));var n;return M===!0?n=X(A,a,r,b):n=F(A,M.halfCheckedKeys,a,r,b),n}},ORPY:function(It,At,re){It.exports={sendToClass:"sendToClass___2FQ8x"}},OZM5:function(It,At,re){"use strict";re.d(At,"b",function(){return O}),re.d(At,"a",function(){return h}),re.d(At,"k",function(){return b}),re.d(At,"h",function(){return A}),re.d(At,"i",function(){return a}),re.d(At,"g",function(){return r}),re.d(At,"c",function(){return n}),re.d(At,"d",function(){return e}),re.d(At,"j",function(){return s}),re.d(At,"e",function(){return I}),re.d(At,"f",function(){return C});var ve=re("KQm4"),J=re("U8pU"),U=re("Ff2n"),X=re("q1tI"),F=re.n(X),R=re("Kwbf"),Z=re("WaYH"),M=.25,N=2;function O(_,x){var T=_.slice(),d=T.indexOf(x);return d>=0&&T.splice(d,1),T}function h(_,x){var T=_.slice();return T.indexOf(x)===-1&&T.push(x),T}function b(_){return _.split("-")}function A(_,x){return"".concat(_,"-").concat(x)}function a(_){return _&&_.type&&_.type.isTreeNode}function r(_,x){var T=[_],d=x[_];function u(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(l){var m=l.key,g=l.children;T.push(m),u(g)})}return u(d.children),T}function n(_,x){var T=_.clientY,d=x.selectHandle.getBoundingClientRect(),u=d.top,o=d.bottom,l=d.height,m=Math.max(l*M,N);return T<=u+m?-1:T>=o-m?1:0}function e(_,x){if(!_)return;var T=x.multiple;return T?_.slice():_.length?[_[0]]:_}var t=function(x){return x};function i(_,x){if(!_)return[];var T=x||{},d=T.processProps,u=d===void 0?t:d,o=Array.isArray(_)?_:[_];return o.map(function(l){var m=l.children,g=Object(U.a)(l,["children"]),E=i(m,x);return F.a.createElement(Z.a,Object.assign({},u(g)),E)})}function s(_){if(!_)return null;var x;if(Array.isArray(_))x={checkedKeys:_,halfCheckedKeys:void 0};else if(Object(J.a)(_)==="object")x={checkedKeys:_.checked||void 0,halfCheckedKeys:_.halfChecked||void 0};else return Object(R.a)(!1,"`checkedKeys` is not an array or an object"),null;return x}function I(_,x){var T=new Set;function d(u){if(T.has(u))return;var o=x[u];if(!o)return;T.add(u);var l=o.parent,m=o.node;if(m.disabled)return;l&&d(l.key)}return(_||[]).forEach(function(u){d(u)}),Object(ve.a)(T)}function C(_){var x={};return Object.keys(_).forEach(function(T){(T.startsWith("data-")||T.startsWith("aria-"))&&(x[T]=_[T])}),x}},PEfE:function(It,At,re){It.exports={title:"title___316_5",radioWrap:"radioWrap___2b58p",row:"row___3Y_zu",radio:"radio___3wz7l",colorFF0000:"colorFF0000___3JfbP",pagination:"pagination___3UF9N",modalColumn:"modalColumn___2C76i",modalRow:"modalRow___3eIQ6",sup:"sup___1b5Qg"}},"SA+Z":function(It,At,re){var ve=re("wTVA"),J=re("EbDI"),U=re("ZhPi"),X=re("wkBT");function F(R){return ve(R)||J(R)||U(R)||X()}It.exports=F,It.exports.__esModule=!0,It.exports.default=It.exports},SJMd:function(It,At){/**
* @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 re,ve,J,U=!1,X,F;window.PR_SHOULD_USE_CONTINUATION=!0;var R,Z;(function(){var M=window,N=["break,continue,do,else,for,if,return,while"],O=[N,"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"],h=[O,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],b=[h,"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"],A=[h,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[h,"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",n=[h,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],e="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",t=[N,"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"],i=[N,"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"],s=[N,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],I=[b,a,A,n,e,t,i,s],C=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_="str",x="kwd",T="com",d="typ",u="lit",o="pun",l="pln",m="tag",g="dec",E="src",L="atn",P="atv",j="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function ee(oe){for(var V=0,Y=!1,he=!1,Se=0,Ue=oe.length;Se<Ue;++Se){var Ie=oe[Se];if(Ie.ignoreCase)he=!0;else if(/[a-z]/i.test(Ie.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Y=!0,he=!1;break}}var st={b:8,t:9,n:10,v:11,f:12,r:13};function it(Me){var Ye=Me.charCodeAt(0);if(Ye!==92)return Ye;var tt=Me.charAt(1);return Ye=st[tt],Ye||("0"<=tt&&tt<="7"?parseInt(Me.substring(1),8):tt==="u"||tt==="x"?parseInt(Me.substring(2),16):Me.charCodeAt(1))}function ut(Me){if(Me<32)return(Me<16?"\\x0":"\\x")+Me.toString(16);var Ye=String.fromCharCode(Me);return Ye==="\\"||Ye==="-"||Ye==="]"||Ye==="^"?"\\"+Ye:Ye}function dt(Me){var Ye=Me.substring(1,Me.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),tt=[],at=Ye[0]==="^",ze=["["];at&&ze.push("^");for(var qe=at?1:0,Oe=Ye.length;qe<Oe;++qe){var be=Ye[qe];if(/\\[bdsw]/i.test(be))ze.push(be);else{var _e=it(be),se;qe+2<Oe&&Ye[qe+1]==="-"?(se=it(Ye[qe+2]),qe+=2):se=_e,tt.push([_e,se]),se<65||_e>122||(se<65||_e>90||tt.push([Math.max(65,_e)|32,Math.min(se,90)|32]),se<97||_e>122||tt.push([Math.max(97,_e)&~32,Math.min(se,122)&~32]))}}tt.sort(function(We,$e){return We[0]-$e[0]||$e[1]-We[1]});for(var le=[],me=[],qe=0;qe<tt.length;++qe){var we=tt[qe];we[0]<=me[1]+1?me[1]=Math.max(me[1],we[1]):le.push(me=we)}for(var qe=0;qe<le.length;++qe){var we=le[qe];ze.push(ut(we[0])),we[1]>we[0]&&(we[1]+1>we[0]&&ze.push("-"),ze.push(ut(we[1])))}return ze.push("]"),ze.join("")}function vt(Me){for(var Ye=Me.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),tt=Ye.length,at=[],ze=0,qe=0;ze<tt;++ze){var Oe=Ye[ze];if(Oe==="(")++qe;else if(Oe.charAt(0)==="\\"){var be=+Oe.substring(1);be&&(be<=qe?at[be]=-1:Ye[ze]=ut(be))}}for(var ze=1;ze<at.length;++ze)at[ze]===-1&&(at[ze]=++V);for(var ze=0,qe=0;ze<tt;++ze){var Oe=Ye[ze];if(Oe==="(")++qe,at[qe]||(Ye[ze]="(?:");else if(Oe.charAt(0)==="\\"){var be=+Oe.substring(1);be&&be<=qe&&(Ye[ze]="\\"+at[be])}}for(var ze=0;ze<tt;++ze)Ye[ze]==="^"&&Ye[ze+1]!=="^"&&(Ye[ze]="");if(Me.ignoreCase&&Y)for(var ze=0;ze<tt;++ze){var Oe=Ye[ze],_e=Oe.charAt(0);Oe.length>=2&&_e==="["?Ye[ze]=dt(Oe):_e!=="\\"&&(Ye[ze]=Oe.replace(/[a-zA-Z]/g,function(me){var we=me.charCodeAt(0);return"["+String.fromCharCode(we&~32,we|32)+"]"}))}return Ye.join("")}for(var Tt=[],Se=0,Ue=oe.length;Se<Ue;++Se){var Ie=oe[Se];if(Ie.global||Ie.multiline)throw new Error(""+Ie);Tt.push("(?:"+vt(Ie)+")")}return new RegExp(Tt.join("|"),he?"gi":"g")}function Q(oe,V){var Y=/(?:^|\s)nocode(?:\s|$)/,he=[],Se=0,Ue=[],Ie=0;function st(it){var ut=it.nodeType;if(ut==1){if(Y.test(it.className))return;for(var dt=it.firstChild;dt;dt=dt.nextSibling)st(dt);var vt=it.nodeName.toLowerCase();(vt==="br"||vt==="li")&&(he[Ie]=`
`,Ue[Ie<<1]=Se++,Ue[Ie++<<1|1]=it)}else if(ut==3||ut==4){var Tt=it.nodeValue;Tt.length&&(V?Tt=Tt.replace(/\r\n?/g,`
`):Tt=Tt.replace(/[ \t\r\n]+/g," "),he[Ie]=Tt,Ue[Ie<<1]=Se,Se+=Tt.length,Ue[Ie++<<1|1]=it)}}return st(oe),{sourceCode:he.join("").replace(/\n$/,""),spans:Ue}}function q(oe,V,Y,he,Se){if(!Y)return;var Ue={sourceNode:oe,pre:1,langExtension:null,numberLines:null,sourceCode:Y,spans:null,basePos:V,decorations:null};he(Ue),Se.push.apply(Se,Ue.decorations)}var ae=/\S/;function ge(oe){for(var V=void 0,Y=oe.firstChild;Y;Y=Y.nextSibling){var he=Y.nodeType;V=he===1?V?oe:Y:he===3&&ae.test(Y.nodeValue)?oe:V}return V===oe?void 0:V}function pe(oe,V){var Y={},he;(function(){for(var Ie=oe.concat(V),st=[],it={},ut=0,dt=Ie.length;ut<dt;++ut){var vt=Ie[ut],Tt=vt[3];if(Tt)for(var Me=Tt.length;--Me>=0;)Y[Tt.charAt(Me)]=vt;var Ye=vt[1],tt=""+Ye;it.hasOwnProperty(tt)||(st.push(Ye),it[tt]=null)}st.push(/[\0-\uffff]/),he=ee(st)})();var Se=V.length,Ue=function(Ie){for(var st=Ie.sourceCode,it=Ie.basePos,ut=Ie.sourceNode,dt=[it,l],vt=0,Tt=st.match(he)||[],Me={},Ye=0,tt=Tt.length;Ye<tt;++Ye){var at=Tt[Ye],ze=Me[at],qe=void 0,Oe;if(typeof ze=="string")Oe=!1;else{var be=Y[at.charAt(0)];if(be)qe=at.match(be[1]),ze=be[0];else{for(var _e=0;_e<Se;++_e)if(be=V[_e],qe=at.match(be[1]),qe){ze=be[0];break}qe||(ze=l)}Oe=ze.length>=5&&ze.substring(0,5)==="lang-",Oe&&!(qe&&typeof qe[1]=="string")&&(Oe=!1,ze=E),Oe||(Me[at]=ze)}var se=vt;if(vt+=at.length,!Oe)dt.push(it+se,ze);else{var le=qe[1],me=at.indexOf(le),we=me+le.length;qe[2]&&(we=at.length-qe[2].length,me=we-le.length);var We=ze.substring(5);q(ut,it+se,at.substring(0,me),Ue,dt),q(ut,it+se+me,le,ye(We,le),dt),q(ut,it+se+we,at.substring(we),Ue,dt)}}Ie.decorations=dt};return Ue}function Ne(oe){var V=[],Y=[];oe.tripleQuotedStrings?V.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?V.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):V.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&Y.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var he=oe.hashComments;he&&(oe.cStyleComments?(he>1?V.push([T,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):V.push([T,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Y.push([_,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):V.push([T,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&(Y.push([T,/^\/\/[^\r\n]*/,null]),Y.push([T,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Se=oe.regexLiterals;if(Se){var Ue=Se>1?"":`
\r`,Ie=Ue?".":"[\\S\\s]",st="/(?=[^/*"+Ue+"])(?:[^/\\x5B\\x5C"+Ue+"]|\\x5C"+Ie+"|\\x5B(?:[^\\x5C\\x5D"+Ue+"]|\\x5C"+Ie+")*(?:\\x5D|$))+/";Y.push(["lang-regex",RegExp("^"+z+"("+st+")")])}var it=oe.types;it&&Y.push([d,it]);var ut=(""+oe.keywords).replace(/^ | $/g,"");ut.length&&Y.push([x,new RegExp("^(?:"+ut.replace(/[\s,]+/g,"|")+")\\b"),null]),V.push([l,/^\s+/,null,` \r
\xA0`]);var dt="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(dt+="(?!s*/)"),Y.push([u,/^@[a-z_$][a-z_$@0-9]*/i,null],[d,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[u,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[o,new RegExp(dt),null]),pe(V,Y)}var Fe=Ne({keywords:I,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function He(oe,V,Y){for(var he=/(?:^|\s)nocode(?:\s|$)/,Se=/\r\n?|\n/,Ue=oe.ownerDocument,Ie=Ue.createElement("li");oe.firstChild;)Ie.appendChild(oe.firstChild);var st=[Ie];function it(Ye){var tt=Ye.nodeType;if(tt==1&&!he.test(Ye.className))if(Ye.nodeName==="br")ut(Ye),Ye.parentNode&&Ye.parentNode.removeChild(Ye);else for(var at=Ye.firstChild;at;at=at.nextSibling)it(at);else if((tt==3||tt==4)&&Y){var ze=Ye.nodeValue,qe=ze.match(Se);if(qe){var Oe=ze.substring(0,qe.index);Ye.nodeValue=Oe;var be=ze.substring(qe.index+qe[0].length);if(be){var _e=Ye.parentNode;_e.insertBefore(Ue.createTextNode(be),Ye.nextSibling)}ut(Ye),Oe||Ye.parentNode.removeChild(Ye)}}}function ut(Ye){for(;!Ye.nextSibling;)if(Ye=Ye.parentNode,!Ye)return;function tt(qe,Oe){var be=Oe?qe.cloneNode(!1):qe,_e=qe.parentNode;if(_e){var se=tt(_e,1),le=qe.nextSibling;se.appendChild(be);for(var me=le;me;me=le)le=me.nextSibling,se.appendChild(me)}return be}for(var at=tt(Ye.nextSibling,0),ze;(ze=at.parentNode)&&ze.nodeType===1;)at=ze;st.push(at)}for(var dt=0;dt<st.length;++dt)it(st[dt]);V===(V|0)&&st[0].setAttribute("value",V);var vt=Ue.createElement("ol");vt.className="linenums";for(var Tt=Math.max(0,V-1|0)||0,dt=0,Me=st.length;dt<Me;++dt)Ie=st[dt],Ie.className="L"+(dt+Tt)%10,Ie.firstChild||Ie.appendChild(Ue.createTextNode("\xA0")),vt.appendChild(Ie);oe.appendChild(vt)}function Ke(oe){var V=/\bMSIE\s(\d+)/.exec(navigator.userAgent);V=V&&+V[1]<=8;var Y=/\n/g,he=oe.sourceCode,Se=he.length,Ue=0,Ie=oe.spans,st=Ie.length,it=0,ut=oe.decorations,dt=ut.length,vt=0;ut[dt]=Se;var Tt,Me;for(Me=Tt=0;Me<dt;)ut[Me]!==ut[Me+2]?(ut[Tt++]=ut[Me++],ut[Tt++]=ut[Me++]):Me+=2;for(dt=Tt,Me=Tt=0;Me<dt;){for(var Ye=ut[Me],tt=ut[Me+1],at=Me+2;at+2<=dt&&ut[at+1]===tt;)at+=2;ut[Tt++]=Ye,ut[Tt++]=tt,Me=at}dt=ut.length=Tt;var ze=oe.sourceNode,qe="";ze&&(qe=ze.style.display,ze.style.display="none");try{for(var Oe=null;it<st;){var be=Ie[it],_e=Ie[it+2]||Se,se=ut[vt+2]||Se,at=Math.min(_e,se),le=Ie[it+1],me;if(le.nodeType!==1&&(me=he.substring(Ue,at))){V&&(me=me.replace(Y,"\r")),le.nodeValue=me;var we=le.ownerDocument,We=we.createElement("span");We.className=ut[vt+1];var $e=le.parentNode;$e.replaceChild(We,le),We.appendChild(le),Ue<_e&&(Ie[it+1]=le=we.createTextNode(he.substring(at,_e)),$e.insertBefore(le,We.nextSibling))}Ue=at,Ue>=_e&&(it+=2),Ue>=se&&(vt+=2)}}finally{ze&&(ze.style.display=qe)}}var Xe={};function Ce(oe,V){for(var Y=V.length;--Y>=0;){var he=V[Y];Xe.hasOwnProperty(he)?M.console&&console.warn("cannot override language handler %s",he):Xe[he]=oe}}function ye(oe,V){return oe&&Xe.hasOwnProperty(oe)||(oe=/^\s*</.test(V)?"default-markup":"default-code"),Xe[oe]}Ce(Fe,["default-code"]),Ce(pe([],[[l,/^[^<?]+/],[g,/^<!\w[^>]*(?:>|$)/],[T,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["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"]),Ce(pe([[l,/^[\s]+/,null,` \r
`],[P,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[L,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[o,/^[=<>\/]+/],["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"]),Ce(pe([],[[P,/^[\s\S]+/]]),["uq.val"]),Ce(Ne({keywords:b,hashComments:!0,cStyleComments:!0,types:C}),["c","cc","cpp","cxx","cyc","m"]),Ce(Ne({keywords:"null,true,false"}),["json"]),Ce(Ne({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:C}),["cs"]),Ce(Ne({keywords:A,cStyleComments:!0}),["java"]),Ce(Ne({keywords:s,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ce(Ne({keywords:t,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ce(Ne({keywords:e,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ce(Ne({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ce(Ne({keywords:n,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ce(Ne({keywords:r,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ce(pe([],[[_,/^[\s\S]+/]]),["regex"]);function Pe(oe){var V=oe.langExtension;try{var Y=Q(oe.sourceNode,oe.pre),he=Y.sourceCode;oe.sourceCode=he,oe.spans=Y.spans,oe.basePos=0,ye(V,he)(oe),Ke(oe)}catch(Se){M.console&&console.log(Se&&Se.stack||Se)}}function Et(oe,V,Y){var he=Y||!1,Se=V||null,Ue=document.createElement("div");Ue.innerHTML="<pre>"+oe+"</pre>",Ue=Ue.firstChild,he&&He(Ue,he,!0);var Ie={langExtension:Se,numberLines:he,sourceNode:Ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Pe(Ie),Ue.innerHTML}function mt(oe,V){var Y=V||document.body,he=Y.ownerDocument||document;function Se(be){return Y.getElementsByTagName(be)}for(var Ue=[Se("pre"),Se("code"),Se("xmp")],Ie=[],st=0;st<Ue.length;++st)for(var it=0,ut=Ue[st].length;it<ut;++it)Ie.push(Ue[st][it]);Ue=null;var dt=Date;dt.now||(dt={now:function(){return+new Date}});var vt=0,Tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Me=/\bprettyprint\b/,Ye=/\bprettyprinted\b/,tt=/pre|xmp/i,at=/^code$/i,ze=/^(?:pre|code|xmp)$/i,qe={};function Oe(){for(var be=M.PR_SHOULD_USE_CONTINUATION?dt.now()+250:Infinity;vt<Ie.length&&dt.now()<be;vt++){for(var _e=Ie[vt],se=qe,le=_e;le=le.previousSibling;){var me=le.nodeType,we=(me===7||me===8)&&le.nodeValue;if(we?!/^\??prettify\b/.test(we):me!==3||/\S/.test(le.nodeValue))break;if(we){se={},we.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ir,Vt,rr){se[Vt]=rr});break}}var We=_e.className;if((se!==qe||Me.test(We))&&!Ye.test(We)){for(var $e=!1,pt=_e.parentNode;pt;pt=pt.parentNode){var Bt=pt.tagName;if(ze.test(Bt)&&pt.className&&Me.test(pt.className)){$e=!0;break}}if(!$e){_e.className+=" prettyprinted";var Rt=se.lang;if(!Rt){Rt=We.match(Tt);var Ct;!Rt&&(Ct=ge(_e))&&at.test(Ct.tagName)&&(Rt=Ct.className.match(Tt)),Rt&&(Rt=Rt[1])}var tr;if(tt.test(_e.tagName))tr=1;else{var zt=_e.currentStyle,ft=he.defaultView,Pt=zt?zt.whiteSpace:ft&&ft.getComputedStyle?ft.getComputedStyle(_e,null).getPropertyValue("white-space"):0;tr=Pt&&Pt.substring(0,3)==="pre"}var Yt=se.linenums;(Yt=Yt==="true"||+Yt)||(Yt=We.match(/\blinenums\b(?::(\d+))?/),Yt=Yt?Yt[1]&&Yt[1].length?+Yt[1]:!0:!1),Yt&&He(_e,Yt,tr);var Lt={langExtension:Rt,sourceNode:_e,numberLines:Yt,pre:tr,sourceCode:null,basePos:null,spans:null,decorations:null};Pe(Lt)}}}vt<Ie.length?M.setTimeout(Oe,250):typeof oe=="function"&&oe()}Oe()}var gt=M.PR={createSimpleLexer:pe,registerLangHandler:Ce,sourceDecorator:Ne,PR_ATTRIB_NAME:L,PR_ATTRIB_VALUE:P,PR_COMMENT:T,PR_DECLARATION:g,PR_KEYWORD:x,PR_LITERAL:u,PR_NOCODE:j,PR_PLAIN:l,PR_PUNCTUATION:o,PR_SOURCE:E,PR_STRING:_,PR_TAG:m,PR_TYPE:d,prettyPrintOne:U?M.prettyPrintOne=Et:R=Et,prettyPrint:Z=U?M.prettyPrint=mt:Z=mt},bt=M.define;typeof bt=="function"&&bt.amd&&bt("google-code-prettify",[],function(){return gt})})()},TXwP:function(It,At,re){var ve,J;(function(){var U;(function(){"use strict";var F=[,,function(N){function O(A){this.__parent=A,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=[]}O.prototype.clone_empty=function(){var A=new O(this.__parent);return A.set_indent(this.__indent_count,this.__alignment_count),A},O.prototype.item=function(A){return A<0?this.__items[this.__items.length+A]:this.__items[A]},O.prototype.has_match=function(A){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(A))return!0;return!1},O.prototype.set_indent=function(A,a){this.is_empty()&&(this.__indent_count=A||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},O.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)},O.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},O.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var A=this.__parent.current_line;return A.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),A.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),A.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,A.__items[0]===" "&&(A.__items.splice(0,1),A.__character_count-=1),!0}return!1},O.prototype.is_empty=function(){return this.__items.length===0},O.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},O.prototype.push=function(A){this.__items.push(A);var a=A.lastIndexOf(`
`);a!==-1?this.__character_count=A.length-a:this.__character_count+=A.length},O.prototype.pop=function(){var A=null;return this.is_empty()||(A=this.__items.pop(),this.__character_count-=A.length),A},O.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},O.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},O.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},O.prototype.toString=function(){var A="";return this.is_empty()?this.__parent.indent_empty_lines&&(A=this.__parent.get_indent_string(this.__indent_count)):(A=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),A+=this.__items.join("")),A};function h(A,a){this.__cache=[""],this.__indent_size=A.indent_size,this.__indent_string=A.indent_char,A.indent_with_tabs||(this.__indent_string=new Array(A.indent_size+1).join(A.indent_char)),a=a||"",A.indent_level>0&&(a=new Array(A.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}h.prototype.get_indent_size=function(A,a){var r=this.__base_string_length;return a=a||0,A<0&&(r=0),r+=A*this.__indent_size,r+=a,r},h.prototype.get_indent_string=function(A,a){var r=this.__base_string;return a=a||0,A<0&&(A=0,r=""),a+=A*this.__indent_size,this.__ensure_cache(a),r+=this.__cache[a],r},h.prototype.__ensure_cache=function(A){for(;A>=this.__cache.length;)this.__add_column()},h.prototype.__add_column=function(){var A=this.__cache.length,a=0,r="";this.__indent_size&&A>=this.__indent_size&&(a=Math.floor(A/this.__indent_size),A-=a*this.__indent_size,r=new Array(a+1).join(this.__indent_string)),A&&(r+=new Array(A+1).join(" ")),this.__cache.push(r)};function b(A,a){this.__indent_cache=new h(A,a),this.raw=!1,this._end_with_newline=A.end_with_newline,this.indent_size=A.indent_size,this.wrap_line_length=A.wrap_line_length,this.indent_empty_lines=A.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new O(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}b.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},b.prototype.get_line_number=function(){return this.__lines.length},b.prototype.get_indent_string=function(A,a){return this.__indent_cache.get_indent_string(A,a)},b.prototype.get_indent_size=function(A,a){return this.__indent_cache.get_indent_size(A,a)},b.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},b.prototype.add_new_line=function(A){return this.is_empty()||!A&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},b.prototype.get_code=function(A){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 A!==`
`&&(r=r.replace(/[\n]/g,A)),r},b.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},b.prototype.set_indent=function(A,a){return A=A||0,a=a||0,this.next_line.set_indent(A,a),this.__lines.length>1?(this.current_line.set_indent(A,a),!0):(this.current_line.set_indent(),!1)},b.prototype.add_raw_token=function(A){for(var a=0;a<A.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(A.whitespace_before),this.current_line.push(A.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},b.prototype.add_token=function(A){this.__add_space_before_token(),this.current_line.push(A),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},b.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(" "))},b.prototype.remove_indent=function(A){for(var a=this.__lines.length;A<a;)this.__lines[A]._remove_indent(),A++;this.current_line._remove_wrap_indent()},b.prototype.trim=function(A){for(A=A===void 0?!1:A,this.current_line.trim();A&&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},b.prototype.just_added_newline=function(){return this.current_line.is_empty()},b.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},b.prototype.ensure_empty_line_above=function(A,a){for(var r=this.__lines.length-2;r>=0;){var n=this.__lines[r];if(n.is_empty())break;if(n.item(0).indexOf(A)!==0&&n.item(-1)!==a){this.__lines.splice(r+1,0,new O(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},N.exports.Output=b},,,,function(N){function O(A,a){this.raw_options=h(A,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"])}O.prototype._get_array=function(A,a){var r=this.raw_options[A],n=a||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(n=r.concat()):typeof r=="string"&&(n=r.split(/[^a-zA-Z0-9_\/\-]+/)),n},O.prototype._get_boolean=function(A,a){var r=this.raw_options[A],n=r===void 0?!!a:!!r;return n},O.prototype._get_characters=function(A,a){var r=this.raw_options[A],n=a||"";return typeof r=="string"&&(n=r.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),n},O.prototype._get_number=function(A,a){var r=this.raw_options[A];a=parseInt(a,10),isNaN(a)&&(a=0);var n=parseInt(r,10);return isNaN(n)&&(n=a),n},O.prototype._get_selection=function(A,a,r){var n=this._get_selection_list(A,a,r);if(n.length!==1)throw new Error("Invalid Option Value: The option '"+A+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[A]+"'");return n[0]},O.prototype._get_selection_list=function(A,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 n=this._get_array(A,r);if(!this._is_valid_selection(n,a))throw new Error("Invalid Option Value: The option '"+A+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[A]+"'");return n},O.prototype._is_valid_selection=function(A,a){return A.length&&a.length&&!A.some(function(r){return a.indexOf(r)===-1})};function h(A,a){var r={};A=b(A);var n;for(n in A)n!==a&&(r[n]=A[n]);if(a&&A[a])for(n in A[a])r[n]=A[a][n];return r}function b(A){var a={},r;for(r in A){var n=r.replace(/-/g,"_");a[n]=A[r]}return a}N.exports.Options=O,N.exports.normalizeOpts=b,N.exports.mergeOpts=h},,function(N){var O=RegExp.prototype.hasOwnProperty("sticky");function h(b){this.__input=b||"",this.__input_length=this.__input.length,this.__position=0}h.prototype.restart=function(){this.__position=0},h.prototype.back=function(){this.__position>0&&(this.__position-=1)},h.prototype.hasNext=function(){return this.__position<this.__input_length},h.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__input.charAt(this.__position),this.__position+=1),b},h.prototype.peek=function(b){var A=null;return b=b||0,b+=this.__position,b>=0&&b<this.__input_length&&(A=this.__input.charAt(b)),A},h.prototype.__match=function(b,A){b.lastIndex=A;var a=b.exec(this.__input);return a&&!(O&&b.sticky)&&(a.index!==A&&(a=null)),a},h.prototype.test=function(b,A){return A=A||0,A+=this.__position,A>=0&&A<this.__input_length?!!this.__match(b,A):!1},h.prototype.testChar=function(b,A){var a=this.peek(A);return b.lastIndex=0,a!==null&&b.test(a)},h.prototype.match=function(b){var A=this.__match(b,this.__position);return A?this.__position+=A[0].length:A=null,A},h.prototype.read=function(b,A,a){var r="",n;return b&&(n=this.match(b),n&&(r+=n[0])),A&&(n||!b)&&(r+=this.readUntil(A,a)),r},h.prototype.readUntil=function(b,A){var a="",r=this.__position;b.lastIndex=this.__position;var n=b.exec(this.__input);return n?(r=n.index,A&&(r+=n[0].length)):r=this.__input_length,a=this.__input.substring(this.__position,r),this.__position=r,a},h.prototype.readUntilAfter=function(b){return this.readUntil(b,!0)},h.prototype.get_regexp=function(b,A){var a=null,r="g";return A&&O&&(r="y"),typeof b=="string"&&b!==""?a=new RegExp(b,r):b&&(a=new RegExp(b.source,r)),a},h.prototype.get_literal_regexp=function(b){return RegExp(b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},h.prototype.peekUntilAfter=function(b){var A=this.__position,a=this.readUntilAfter(b);return this.__position=A,a},h.prototype.lookBack=function(b){var A=this.__position-1;return A>=b.length&&this.__input.substring(A-b.length,A).toLowerCase()===b},N.exports.InputScanner=h},,,,,function(N){function O(h,b){h=typeof h=="string"?h:h.source,b=typeof b=="string"?b:b.source,this.__directives_block_pattern=new RegExp(h+/ beautify( \w+[:]\w+)+ /.source+b,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(h+/\sbeautify\signore:end\s/.source+b,"g")}O.prototype.get_directives=function(h){if(!h.match(this.__directives_block_pattern))return null;var b={};this.__directive_pattern.lastIndex=0;for(var A=this.__directive_pattern.exec(h);A;)b[A[1]]=A[2],A=this.__directive_pattern.exec(h);return b},O.prototype.readIgnored=function(h){return h.readUntilAfter(this.__directives_end_ignore_pattern)},N.exports.Directives=O},,function(N,O,h){var b=h(16).Beautifier,A=h(17).Options;function a(r,n){var e=new b(r,n);return e.beautify()}N.exports=a,N.exports.defaultOptions=function(){return new A}},function(N,O,h){var b=h(17).Options,A=h(2).Output,a=h(8).InputScanner,r=h(13).Directives,n=new r(/\/\*/,/\*\//),e=/\r\n|[\r\n]/,t=/\r\n|[\r\n]/g,i=/\s/,s=/(?:\s|\n)+/g,I=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,C=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function _(x,T){this._source_text=x||"",this._options=new b(T),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"]}_.prototype.eatString=function(x){var T="";for(this._ch=this._input.next();this._ch;){if(T+=this._ch,this._ch==="\\")T+=this._input.next();else if(x.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return T},_.prototype.eatWhitespace=function(x){for(var T=i.test(this._input.peek()),d=0;i.test(this._input.peek());)this._ch=this._input.next(),x&&this._ch===`
`&&((d===0||d<this._options.max_preserve_newlines)&&(d++,this._output.add_new_line(!0)));return T},_.prototype.foundNestedPseudoClass=function(){for(var x=0,T=1,d=this._input.peek(T);d;){if(d==="{")return!0;if(d==="(")x+=1;else if(d===")"){if(x===0)return!1;x-=1}else if(d===";"||d==="}")return!1;T++,d=this._input.peek(T)}return!1},_.prototype.print_string=function(x){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(x)},_.prototype.preserveSingleSpace=function(x){x&&(this._output.space_before_token=!0)},_.prototype.indent=function(){this._indentLevel++},_.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,T=this._options.eol;T==="auto"&&(T=`
`,x&&e.test(x||"")&&(T=x.match(e)[0])),x=x.replace(t,`
`);var d=x.match(/^[\t ]*/)[0];this._output=new A(this._options,d),this._input=new a(x),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var u=0,o=!1,l=!1,m=!1,g=!1,E=!1,L=!1,P=this._ch,j=!1,z,ee,Q;z=this._input.read(s),ee=z!=="",Q=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 q=this._input.read(I),ae=n.get_directives(q);ae&&ae.ignore==="start"&&(q+=n.readIgnored(this._input)),this.print_string(q),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(C)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(ee),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var ge=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ge.match(/[ :]$/)&&(ge=this.eatString(": ").replace(/\s$/,""),this.print_string(ge),this._output.space_before_token=!0),ge=ge.replace(/\s$/,""),ge==="extend"?g=!0:ge==="import"&&(E=!0),ge in this.NESTED_AT_RULE?(this._nestedLevel+=1,ge in this.CONDITIONAL_GROUP_RULE&&(m=!0)):!o&&u===0&&ge.indexOf(":")!==-1&&(l=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(ee),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")l&&(l=!1,this.outdent()),m?(m=!1,o=this._indentLevel>=this._nestedLevel):o=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&o&&(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)):(Q==="("?this._output.space_before_token=!1:Q!==","&&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(),Q==="{"&&this._output.trim(!0),E=!1,g=!1,l&&(this.outdent(),l=!1),this.print_string(this._ch),o=!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 pe=0;pe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;pe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[pe])){j=!0;break}(o||m)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!g&&u===0?(this.print_string(":"),l||(l=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Ne=Q==='"'||Q==="'";this.preserveSingleSpace(Ne||ee),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")j=!1,u===0?(l&&(this.outdent(),l=!1),g=!1,E=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),u++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),u&&(u--,this.outdent()));else{var Fe=!1;this._input.lookBack("with")&&(Fe=!0),this.preserveSingleSpace(ee||Fe),this.print_string(this._ch),l&&Q==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),L=!0):(this.eatWhitespace(),u++,this.indent())}else if(this._ch===")")u&&(u--,this.outdent()),L&&this._input.peek()===";"&&this._options.selector_separator_newline&&(L=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!l||L)&&u===0&&!E&&!g?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!l&&u===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&i.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(ee),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),i.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=Q==='"'||Q==="'";this.preserveSingleSpace(He||ee),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&j&&this._output.add_new_line()}var Ke=this._output.get_code(T);return Ke},N.exports.Beautifier=_},function(N,O,h){var b=h(6).Options;function A(a){b.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 n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var e=0;e<n.length;e++)n[e]!=="expand"?this.brace_style="collapse":this.brace_style=n[e]}A.prototype=new b,N.exports.Options=A}],R={};function Z(N){var O=R[N];if(O!==void 0)return O.exports;var h=R[N]={exports:{}};return F[N](h,h.exports,Z),h.exports}var M=Z(15);U=M})();var X=U;!(ve=[],J=function(){return{css_beautify:X}}.apply(At,ve),J!==void 0&&(It.exports=J))})()},UUDw:function(It,At,re){It.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},VN4U:function(It,At,re){"use strict";re.r(At);var ve=re("0Owb"),J=re("sPJy"),U=re("bE4q"),X=re("9og8"),F=re("tJVT"),R=re("PpiC"),Z=re("WmNS"),M=re.n(Z),N=re("q1tI"),O=re.n(N),h=re("9kvl"),b=re("dF/Y"),A=re("ngQI"),a=re("NNiE"),r=re("9ZNV"),n=re("D3Jc"),e=re.n(n),t=re("kHHm"),i=re("1n7x"),s=re.n(i),I=re("xOOu"),C=re.n(I),_=function(){document.body.scrollIntoView()},x=function(){document.querySelectorAll("canvas").forEach(function(m){(!m.clientWidth||!m.clientHeight)&&m.remove()})},T=function(){var l=Object(X.a)(M.a.mark(function m(g,E){var L,P,j,z,ee;return M.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:_(),x(),L={margin:1,html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1,width:1210},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}},P=s()(),j=M.a.mark(function ae(ge){return M.a.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,P.set(L).from(g[ge]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Fe=Object(X.a)(M.a.mark(function He(Ke){return M.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(!(ge<g.length-1)){Ce.next=3;break}return Ce.next=3,Ke.addPage();case 3:case"end":return Ce.stop()}},He)}));return function(He){return Fe.apply(this,arguments)}}());case 2:case"end":return Ne.stop()}},ae)}),z=0;case 6:if(!(z<g.length)){q.next=11;break}return q.delegateYield(j(z),"t0",8);case 8:z++,q.next=6;break;case 11:ee=new C.a,ee.file("".concat(E,".pdf"),P.output("blob"),{base64:!1}),ee.generateAsync({type:"blob"}).then(function(ae){var ge=document.createElement("a");ge.href=window.URL.createObjectURL(ae),ge.download="".concat(E,".zip"),document.body.appendChild(ge);var pe=new MouseEvent("click");ge.dispatchEvent(pe),document.body.removeChild(ge)});case 14:case"end":return q.stop()}},m)}));return function(g,E){return l.apply(this,arguments)}}(),d=re("ZWs3"),u=function(m){var g,E,L,P,j,z,ee,Q,q=m.paperlibrary,ae=m.user,ge=m.globalSetting,pe=m.loading,Ne=m.dispatch,Fe=Object(R.a)(m,["paperlibrary","user","globalSetting","loading","dispatch"]),He=Object(N.useState)(),Ke=Object(F.a)(He,2),Xe=Ke[0],Ce=Ke[1],ye=Object(N.useRef)();Object(N.useEffect)(function(){return Ne({type:"globalSetting/footerToggle",payload:!1}),function(){Ne({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(N.useEffect)(function(){var Ue,Ie,st,it;ye.current=(Ue=Fe.match)===null||Ue===void 0||((Ie=Ue.params)===null||Ie===void 0)?void 0:Ie.id,Ce((st=Fe.location)===null||st===void 0||((it=st.query)===null||it===void 0)?void 0:it.defaultActiveKey),Pe()},[]);var Pe=function(){Ne({type:"paperlibrary/getPaperData",payload:{id:ye.current}})},Et=function(){var Ue=Object(X.a)(M.a.mark(function Ie(st,it){var ut,dt,vt;return M.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(!(!st.destination||!st.source)){Me.next=2;break}return Me.abrupt("return");case 2:return ut=it.questions[st.source.index].id,dt=st.destination.index+1,Me.next=6,Ne({type:"paperlibrary/adjustPosition",payload:{id:ye.current,itemId:ut,position:dt}});case 6:if(vt=Me.sent,!(vt.status===-1)){Me.next=9;break}return Me.abrupt("return");case 9:Pe();case 10:case"end":return Me.stop()}},Ie)}));return function(st,it){return Ue.apply(this,arguments)}}(),mt=function(){Ne({type:"paperlibrary/setActionTabs",payload:{key:"Paperlibrary-SendToClass",params:{id:ye.current}}})},gt=Object(N.useRef)(),bt=Object(N.useState)(!1),oe=Object(F.a)(bt,2),V=oe[0],Y=oe[1],he=function(){var Ue=Object(X.a)(M.a.mark(function Ie(){return M.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return Y(!1),it.next=3,T(gt.current.children,"\u5BFC\u51FA\u8BD5\u5377");case 3:case"end":return it.stop()}},Ie)}));return function(){return Ue.apply(this,arguments)}}(),Se=function(){var Ue=Object(X.a)(M.a.mark(function Ie(){return M.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return Y(!0),it.next=3,T(gt.current.children,"\u5BFC\u51FA\u8BD5\u5377");case 3:case"end":return it.stop()}},Ie)}));return function(){return Ue.apply(this,arguments)}}();return O.a.createElement("section",{className:e.a.bg},O.a.createElement(U.a,{className:"mt30",separator:">"},O.a.createElement(U.a.Item,null,"\u8BD5\u5377\u5E93"),O.a.createElement(U.a.Item,{href:"/paperlibrary?defaultActiveKey=".concat(Xe)},Xe==="1"?"\u516C\u5F00\u8BD5\u5377\u5E93":"\u6211\u7684\u8BD5\u5377\u5E93"),O.a.createElement(U.a.Item,null,"\u8BD5\u5377\u67E5\u770B")),O.a.createElement("div",{className:e.a.title},O.a.createElement("div",{className:e.a.btnWrapper},O.a.createElement(d.a,{type:"primary",onClick:Se},O.a.createElement(b.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"),O.a.createElement(d.a,{type:"primary",className:"ml10",onClick:he},O.a.createElement(b.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"))),O.a.createElement("div",{className:e.a.wrap,ref:gt},O.a.createElement("div",{className:"pt20 pb20"},O.a.createElement("div",{className:e.a.titleForExport},(g=q.paperData)===null||g===void 0||((E=g.exam)===null||E===void 0)?void 0:E.name),O.a.createElement("div",{className:"".concat(e.a.flexRow," ").concat(e.a.flexJustifyBetween)},O.a.createElement("div",null,O.a.createElement("span",{className:e.a.questionNumber},"\u9898\u6570\uFF1A",(L=q.paperData)===null||L===void 0||((P=L.exam)===null||P===void 0)?void 0:P.all_questions_count),O.a.createElement("span",{className:e.a.score},"\u603B\u5206\uFF1A",(j=q.paperData)===null||j===void 0||((z=j.exam)===null||z===void 0)?void 0:z.all_score))),O.a.createElement("div",{className:e.a.line}),O.a.createElement("div",{className:e.a.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(ee=q.paperData)===null||ee===void 0||((Q=ee.questionList)===null||Q===void 0)?void 0:Q.map(function(Ue,Ie){return O.a.createElement("div",{className:"".concat(e.a.relative," mt20 mb20"),key:Ie},O.a.createElement("div",{className:e.a.typeActive},O.a.createElement("span",{className:e.a.typeName},Ue.number,"\u3001",Ue.name),O.a.createElement("span",{className:e.a.typeNumber},"\uFF08\u5171",Ue.questions_count,"\u9898\uFF1B\u5171",Ue.questions_score,"\u5206\uFF09")),O.a.createElement(A.a,{onDragEnd:function(it){return Et(it,Ue)}},O.a.createElement(A.c,{droppableId:Ie.toString()},function(st,it){var ut;return O.a.createElement("div",Object(ve.a)({className:"mt20",ref:st.innerRef},st.droppableProps,{onScroll:function(){}}),(ut=Ue.questions)===null||ut===void 0?void 0:ut.map(function(dt,vt){return O.a.createElement(A.b,{draggableId:dt.id.toString(),index:vt,key:dt.id},function(Tt){return O.a.createElement("div",Object(ve.a)({ref:Tt.innerRef},Tt.draggableProps,Tt.dragHandleProps),O.a.createElement(a.a,{index:vt,typeName:Ue.name,type:Ue.type,data:dt,showAnswer:V,isshow:!1}))})}))})))}))),O.a.createElement(r.a,{okText:"\u53D1\u9001\u8BFE\u5802",onCancel:function(){return h.d.replace("/paperlibrary")},onOk:mt}),O.a.createElement(t.a,null))},o=At.default=Object(h.a)(function(l){var m=l.paperlibrary,g=l.user,E=l.loading,L=l.globalSetting;return{paperlibrary:m,user:g,globalSetting:L,loading:E.effects}})(u)},WaYH:function(It,At,re){"use strict";var ve=re("rePB"),J=re("Ff2n"),U=re("VTBJ"),X=re("1OyB"),F=re("vuIU"),R=re("JX7q"),Z=re("Ji7U"),M=re("LK+K"),N=re("q1tI"),O=re("TSYQ"),h=re.n(O),b=re("sboe"),A=re("OZM5"),a=function(x){var T=x.prefixCls,d=x.level,u=x.isStart,o=x.isEnd;if(!d)return null;for(var l="".concat(T,"-indent-unit"),m=[],g=0;g<d;g+=1){var E;m.push(N.createElement("span",{key:g,className:h()(l,(E={},Object(ve.a)(E,"".concat(l,"-start"),u[g+1]),Object(ve.a)(E,"".concat(l,"-end"),o[g+1]),Object(ve.a)(E,"".concat(l,"-end-first-level"),!g&&o[0]),E))}))}return N.createElement("span",{"aria-hidden":"true",className:"".concat(T,"-indent")},m)},r=a,n=re("815F"),e="open",t="close",i="---",s=function(_){Object(Z.a)(T,_);var x=Object(M.a)(T);function T(){var d;return Object(X.a)(this,T),d=x.apply(this,arguments),d.state={dragNodeHighlight:!1},d.onSelectorClick=function(u){var o=d.props.context.onNodeClick;o(u,Object(n.b)(d.props)),d.isSelectable()?d.onSelect(u):d.onCheck(u)},d.onSelectorDoubleClick=function(u){var o=d.props.context.onNodeDoubleClick;o(u,Object(n.b)(d.props))},d.onSelect=function(u){if(d.isDisabled())return;var o=d.props.context.onNodeSelect;u.preventDefault(),o(u,Object(n.b)(d.props))},d.onCheck=function(u){if(d.isDisabled())return;var o=d.props,l=o.disableCheckbox,m=o.checked,g=d.props.context.onNodeCheck;if(!d.isCheckable()||l)return;u.preventDefault();var E=!m;g(u,Object(n.b)(d.props),E)},d.onMouseEnter=function(u){var o=d.props.context.onNodeMouseEnter;o(u,Object(n.b)(d.props))},d.onMouseLeave=function(u){var o=d.props.context.onNodeMouseLeave;o(u,Object(n.b)(d.props))},d.onContextMenu=function(u){var o=d.props.context.onNodeContextMenu;o(u,Object(n.b)(d.props))},d.onDragStart=function(u){var o=d.props.context.onNodeDragStart;u.stopPropagation(),d.setState({dragNodeHighlight:!0}),o(u,Object(R.a)(d));try{u.dataTransfer.setData("text/plain","")}catch(l){}},d.onDragEnter=function(u){var o=d.props.context.onNodeDragEnter;u.preventDefault(),u.stopPropagation(),o(u,Object(R.a)(d))},d.onDragOver=function(u){var o=d.props.context.onNodeDragOver;u.preventDefault(),u.stopPropagation(),o(u,Object(R.a)(d))},d.onDragLeave=function(u){var o=d.props.context.onNodeDragLeave;u.stopPropagation(),o(u,Object(R.a)(d))},d.onDragEnd=function(u){var o=d.props.context.onNodeDragEnd;u.stopPropagation(),d.setState({dragNodeHighlight:!1}),o(u,Object(R.a)(d))},d.onDrop=function(u){var o=d.props.context.onNodeDrop;u.preventDefault(),u.stopPropagation(),d.setState({dragNodeHighlight:!1}),o(u,Object(R.a)(d))},d.onExpand=function(u){var o=d.props.context.onNodeExpand;o(u,Object(n.b)(d.props))},d.setSelectHandle=function(u){d.selectHandle=u},d.getNodeState=function(){var u=d.props.expanded;return d.isLeaf()?null:u?e:t},d.hasChildren=function(){var u=d.props.eventKey,o=d.props.context.keyEntities,l=o[u]||{},m=l.children;return!!(m||[]).length},d.isLeaf=function(){var u=d.props,o=u.isLeaf,l=u.loaded,m=d.props.context.loadData,g=d.hasChildren();return o===!1?!1:o||!m&&!g||m&&l&&!g},d.isDisabled=function(){var u=d.props.disabled,o=d.props.context.disabled;return!!(o||u)},d.isCheckable=function(){var u=d.props.checkable,o=d.props.context.checkable;return!o||u===!1?!1:o},d.syncLoadData=function(u){var o=u.expanded,l=u.loading,m=u.loaded,g=d.props.context,E=g.loadData,L=g.onNodeLoad;if(l)return;E&&o&&!d.isLeaf()&&(!d.hasChildren()&&!m&&L(Object(n.b)(d.props)))},d.renderSwitcher=function(){var u=d.props,o=u.expanded,l=u.switcherIcon,m=d.props.context,g=m.prefixCls,E=m.switcherIcon,L=l||E;if(d.isLeaf())return N.createElement("span",{className:h()("".concat(g,"-switcher"),"".concat(g,"-switcher-noop"))},typeof L=="function"?L(Object(U.a)(Object(U.a)({},d.props),{},{isLeaf:!0})):L);var P=h()("".concat(g,"-switcher"),"".concat(g,"-switcher_").concat(o?e:t));return N.createElement("span",{onClick:d.onExpand,className:P},typeof L=="function"?L(Object(U.a)(Object(U.a)({},d.props),{},{isLeaf:!1})):L)},d.renderCheckbox=function(){var u=d.props,o=u.checked,l=u.halfChecked,m=u.disableCheckbox,g=d.props.context.prefixCls,E=d.isDisabled(),L=d.isCheckable();if(!L)return null;var P=typeof L!="boolean"?L:null;return N.createElement("span",{className:h()("".concat(g,"-checkbox"),o&&"".concat(g,"-checkbox-checked"),!o&&l&&"".concat(g,"-checkbox-indeterminate"),(E||m)&&"".concat(g,"-checkbox-disabled")),onClick:d.onCheck},P)},d.renderIcon=function(){var u=d.props.loading,o=d.props.context.prefixCls;return N.createElement("span",{className:h()("".concat(o,"-iconEle"),"".concat(o,"-icon__").concat(d.getNodeState()||"docu"),u&&"".concat(o,"-icon_loading"))})},d.renderSelector=function(){var u=d.state.dragNodeHighlight,o=d.props,l=o.title,m=o.selected,g=o.icon,E=o.loading,L=o.data,P=d.props.context,j=P.prefixCls,z=P.showIcon,ee=P.icon,Q=P.draggable,q=P.loadData,ae=P.titleRender,ge=d.isDisabled(),pe="".concat(j,"-node-content-wrapper"),Ne;if(z){var Fe=g||ee;Ne=Fe?N.createElement("span",{className:h()("".concat(j,"-iconEle"),"".concat(j,"-icon__customize"))},typeof Fe=="function"?Fe(d.props):Fe):d.renderIcon()}else q&&E&&(Ne=d.renderIcon());var He;typeof l=="function"?He=l(L):ae?He=ae(L):He=l;var Ke=N.createElement("span",{className:"".concat(j,"-title")},He);return N.createElement("span",{ref:d.setSelectHandle,title:typeof l=="string"?l:"",className:h()("".concat(pe),"".concat(pe,"-").concat(d.getNodeState()||"normal"),!ge&&(m||u)&&"".concat(j,"-node-selected"),!ge&&Q&&"draggable"),draggable:!ge&&Q||void 0,"aria-grabbed":!ge&&Q||void 0,onMouseEnter:d.onMouseEnter,onMouseLeave:d.onMouseLeave,onContextMenu:d.onContextMenu,onClick:d.onSelectorClick,onDoubleClick:d.onSelectorDoubleClick,onDragStart:Q?d.onDragStart:void 0},Ne,Ke)},d}return Object(F.a)(T,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var u=this.props.selectable,o=this.props.context.selectable;return typeof u=="boolean"?u:o}},{key:"render",value:function(){var u,o=this.props,l=o.eventKey,m=o.className,g=o.style,E=o.dragOver,L=o.dragOverGapTop,P=o.dragOverGapBottom,j=o.isLeaf,z=o.isStart,ee=o.isEnd,Q=o.expanded,q=o.selected,ae=o.checked,ge=o.halfChecked,pe=o.loading,Ne=o.domRef,Fe=o.active,He=o.onMouseMove,Ke=Object(J.a)(o,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Xe=this.props.context,Ce=Xe.prefixCls,ye=Xe.filterTreeNode,Pe=Xe.draggable,Et=Xe.keyEntities,mt=this.isDisabled(),gt=Object(A.f)(Ke),bt=Et[l]||{},oe=bt.level,V=ee[ee.length-1];return N.createElement("div",Object.assign({ref:Ne,className:h()(m,"".concat(Ce,"-treenode"),(u={},Object(ve.a)(u,"".concat(Ce,"-treenode-disabled"),mt),Object(ve.a)(u,"".concat(Ce,"-treenode-switcher-").concat(Q?"open":"close"),!j),Object(ve.a)(u,"".concat(Ce,"-treenode-checkbox-checked"),ae),Object(ve.a)(u,"".concat(Ce,"-treenode-checkbox-indeterminate"),ge),Object(ve.a)(u,"".concat(Ce,"-treenode-selected"),q),Object(ve.a)(u,"".concat(Ce,"-treenode-loading"),pe),Object(ve.a)(u,"".concat(Ce,"-treenode-active"),Fe),Object(ve.a)(u,"".concat(Ce,"-treenode-leaf-last"),V),Object(ve.a)(u,"drag-over",!mt&&E),Object(ve.a)(u,"drag-over-gap-top",!mt&&L),Object(ve.a)(u,"drag-over-gap-bottom",!mt&&P),Object(ve.a)(u,"filter-node",ye&&ye(Object(n.b)(this.props))),u)),style:g,onDragEnter:Pe?this.onDragEnter:void 0,onDragOver:Pe?this.onDragOver:void 0,onDragLeave:Pe?this.onDragLeave:void 0,onDrop:Pe?this.onDrop:void 0,onDragEnd:Pe?this.onDragEnd:void 0,onMouseMove:He},gt),N.createElement(r,{prefixCls:Ce,level:oe,isStart:z,isEnd:ee}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),T}(N.Component),I=function(x){return N.createElement(b.a.Consumer,null,function(T){return N.createElement(s,Object.assign({},x,{context:T}))})};I.displayName="TreeNode",I.defaultProps={title:i},I.isTreeNode=1;var C=At.a=I},Y1PL:function(It,At,re){"use strict";re.r(At),re.d(At,"ResizableTextArea",function(){return ge});var ve=re("wx14"),J=re("1OyB"),U=re("vuIU"),X=re("Ji7U"),F=re("LK+K"),R=re("q1tI"),Z=re("VTBJ"),M=re("rePB"),N=re("Zm9Q"),O=re("Kwbf"),h=re("c+Xe"),b=re("m+aA"),A=re("bdgK"),a=new Map;function r(Fe){Fe.forEach(function(He){var Ke,Xe=He.target;(Ke=a.get(Xe))===null||Ke===void 0||Ke.forEach(function(Ce){return Ce(Xe)})})}var n=new A.default(r),e=null,t=null;function i(Fe,He){a.has(Fe)||(a.set(Fe,new Set),n.observe(Fe)),a.get(Fe).add(He)}function s(Fe,He){a.has(Fe)&&(a.get(Fe).delete(He),a.get(Fe).size||(n.unobserve(Fe),a.delete(Fe)))}var I=function(Fe){Object(X.a)(Ke,Fe);var He=Object(F.a)(Ke);function Ke(){return Object(J.a)(this,Ke),He.apply(this,arguments)}return Object(U.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(R.Component),C=R.createContext(null);function _(Fe){var He=Fe.children,Ke=Fe.onBatchResize,Xe=R.useRef(0),Ce=R.useRef([]),ye=R.useContext(C),Pe=R.useCallback(function(Et,mt,gt){Xe.current+=1;var bt=Xe.current;Ce.current.push({size:Et,element:mt,data:gt}),Promise.resolve().then(function(){bt===Xe.current&&(Ke==null||Ke(Ce.current),Ce.current=[])}),ye==null||ye(Et,mt,gt)},[Ke,ye]);return R.createElement(C.Provider,{value:Pe},He)}function x(Fe){var He=Fe.children,Ke=Fe.disabled,Xe=R.useRef(null),Ce=R.useRef(null),ye=R.useContext(C),Pe=R.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Et=R.isValidElement(He)&&Object(h.c)(He),mt=Et?He.ref:null,gt=R.useMemo(function(){return Object(h.a)(mt,Xe)},[mt,Xe]),bt=R.useRef(Fe);bt.current=Fe;var oe=R.useCallback(function(V){var Y=bt.current,he=Y.onResize,Se=Y.data,Ue=V.getBoundingClientRect(),Ie=Ue.width,st=Ue.height,it=V.offsetWidth,ut=V.offsetHeight,dt=Math.floor(Ie),vt=Math.floor(st);if(Pe.current.width!==dt||Pe.current.height!==vt||Pe.current.offsetWidth!==it||Pe.current.offsetHeight!==ut){var Tt={width:dt,height:vt,offsetWidth:it,offsetHeight:ut};Pe.current=Tt;var Me=it===Math.round(Ie)?Ie:it,Ye=ut===Math.round(st)?st:ut,tt=Object(Z.a)(Object(Z.a)({},Tt),{},{offsetWidth:Me,offsetHeight:Ye});ye==null||ye(tt,V,Se),he&&Promise.resolve().then(function(){he(tt,V)})}},[]);return R.useEffect(function(){var V=Object(b.a)(Xe.current)||Object(b.a)(Ce.current);return V&&!Ke&&i(V,oe),function(){return s(V,oe)}},[Xe.current,Ke]),R.createElement(I,{ref:Ce},Et?R.cloneElement(He,{ref:gt}):He)}var T="rc-observer-key";function d(Fe){var He=Fe.children,Ke=Object(N.a)(He);return Ke.map(function(Xe,Ce){var ye=(Xe==null?void 0:Xe.key)||"".concat(T,"-").concat(Ce);return R.createElement(x,Object(ve.a)({},Fe,{key:ye}),Xe)})}d.Collection=_;var u=d,o=re("bT9E"),l=re("TSYQ"),m=re.n(l),g=`
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
`,E=["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"],L={},P;function j(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ke=Fe.getAttribute("id")||Fe.getAttribute("data-reactid")||Fe.getAttribute("name");if(He&&L[Ke])return L[Ke];var Xe=window.getComputedStyle(Fe),Ce=Xe.getPropertyValue("box-sizing")||Xe.getPropertyValue("-moz-box-sizing")||Xe.getPropertyValue("-webkit-box-sizing"),ye=parseFloat(Xe.getPropertyValue("padding-bottom"))+parseFloat(Xe.getPropertyValue("padding-top")),Pe=parseFloat(Xe.getPropertyValue("border-bottom-width"))+parseFloat(Xe.getPropertyValue("border-top-width")),Et=E.map(function(gt){return"".concat(gt,":").concat(Xe.getPropertyValue(gt))}).join(";"),mt={sizingStyle:Et,paddingSize:ye,borderSize:Pe,boxSizing:Ce};return He&&Ke&&(L[Ke]=mt),mt}function z(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Xe=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)),Fe.getAttribute("wrap")?P.setAttribute("wrap",Fe.getAttribute("wrap")):P.removeAttribute("wrap");var Ce=j(Fe,He),ye=Ce.paddingSize,Pe=Ce.borderSize,Et=Ce.boxSizing,mt=Ce.sizingStyle;P.setAttribute("style","".concat(mt,";").concat(g)),P.value=Fe.value||Fe.placeholder||"";var gt=Number.MIN_SAFE_INTEGER,bt=Number.MAX_SAFE_INTEGER,oe=P.scrollHeight,V;if(Et==="border-box"?oe+=Pe:Et==="content-box"&&(oe-=ye),Ke!==null||Xe!==null){P.value=" ";var Y=P.scrollHeight-ye;Ke!==null&&(gt=Y*Ke,Et==="border-box"&&(gt=gt+ye+Pe),oe=Math.max(gt,oe)),Xe!==null&&(bt=Y*Xe,Et==="border-box"&&(bt=bt+ye+Pe),V=oe>bt?"":"hidden",oe=Math.min(bt,oe))}return{height:oe,minHeight:gt,maxHeight:bt,overflowY:V,resize:"none"}}var ee=re("Gytx"),Q=re.n(ee),q;(function(Fe){Fe[Fe.NONE=0]="NONE",Fe[Fe.RESIZING=1]="RESIZING",Fe[Fe.RESIZED=2]="RESIZED"})(q||(q={}));var ae=function(Fe){Object(X.a)(Ke,Fe);var He=Object(F.a)(Ke);function Ke(Xe){var Ce;return Object(J.a)(this,Ke),Ce=He.call(this,Xe),Ce.nextFrameActionId=void 0,Ce.resizeFrameId=void 0,Ce.textArea=void 0,Ce.saveTextArea=function(ye){Ce.textArea=ye},Ce.handleResize=function(ye){var Pe=Ce.state.resizeStatus,Et=Ce.props,mt=Et.autoSize,gt=Et.onResize;if(Pe!==q.NONE)return;typeof gt=="function"&&gt(ye),mt&&Ce.resizeOnNextFrame()},Ce.resizeOnNextFrame=function(){cancelAnimationFrame(Ce.nextFrameActionId),Ce.nextFrameActionId=requestAnimationFrame(Ce.resizeTextarea)},Ce.resizeTextarea=function(){var ye=Ce.props.autoSize;if(!ye||!Ce.textArea)return;var Pe=ye.minRows,Et=ye.maxRows,mt=z(Ce.textArea,!1,Pe,Et);Ce.setState({textareaStyles:mt,resizeStatus:q.RESIZING},function(){cancelAnimationFrame(Ce.resizeFrameId),Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:q.RESIZED},function(){Ce.resizeFrameId=requestAnimationFrame(function(){Ce.setState({resizeStatus:q.NONE}),Ce.fixFirefoxAutoScroll()})})})})},Ce.renderTextArea=function(){var ye=Ce.props,Pe=ye.prefixCls,Et=Pe===void 0?"rc-textarea":Pe,mt=ye.autoSize,gt=ye.onResize,bt=ye.className,oe=ye.disabled,V=Ce.state,Y=V.textareaStyles,he=V.resizeStatus,Se=Object(o.a)(Ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),Ue=m()(Et,bt,Object(M.a)({},"".concat(Et,"-disabled"),oe));"value"in Se&&(Se.value=Se.value||"");var Ie=Object(Z.a)(Object(Z.a)(Object(Z.a)({},Ce.props.style),Y),he===q.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return R.createElement(u,{onResize:Ce.handleResize,disabled:!(mt||gt)},R.createElement("textarea",Object(ve.a)({},Se,{className:Ue,style:Ie,ref:Ce.saveTextArea})))},Ce.state={textareaStyles:{},resizeStatus:q.NONE},Ce}return Object(U.a)(Ke,[{key:"componentDidUpdate",value:function(Ce){(Ce.value!==this.props.value||!Q()(Ce.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 Ce=this.textArea.selectionStart,ye=this.textArea.selectionEnd;this.textArea.setSelectionRange(Ce,ye)}}catch(Pe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ke}(R.Component),ge=ae,pe=function(Fe){Object(X.a)(Ke,Fe);var He=Object(F.a)(Ke);function Ke(Xe){var Ce;Object(J.a)(this,Ke),Ce=He.call(this,Xe),Ce.resizableTextArea=void 0,Ce.focus=function(){Ce.resizableTextArea.textArea.focus()},Ce.saveTextArea=function(Pe){Ce.resizableTextArea=Pe},Ce.handleChange=function(Pe){var Et=Ce.props.onChange;Ce.setValue(Pe.target.value,function(){Ce.resizableTextArea.resizeTextarea()}),Et&&Et(Pe)},Ce.handleKeyDown=function(Pe){var Et=Ce.props,mt=Et.onPressEnter,gt=Et.onKeyDown;Pe.keyCode===13&&mt&&mt(Pe),gt&&gt(Pe)};var ye=typeof Xe.value=="undefined"||Xe.value===null?Xe.defaultValue:Xe.value;return Ce.state={value:ye},Ce}return Object(U.a)(Ke,[{key:"setValue",value:function(Ce,ye){"value"in this.props||this.setState({value:Ce},ye)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return R.createElement(ge,Object(ve.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Ce){return"value"in Ce?{value:Ce.value}:null}}]),Ke}(R.Component),Ne=At.default=pe},ZW9T:function(It,At,re){"use strict";re.d(At,"a",function(){return z});var ve=re("k1fw"),J=re("miYZ"),U=re("tsqr"),X=re("rAM+"),F=re("tJVT"),R=re("PpiC"),Z=re("q1tI"),M=re.n(Z),N=re("bdgK"),O=re("oBTY"),h=re("9og8"),b=re("WmNS"),A=re.n(b),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"]},n={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"for",content:["for( ; ; ){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"#include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"#include <vector>",content:["#include <vector>"].join(`
`)},{label:"#include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"#include <string>",content:["#include <string>"].join(`
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
`)}]},e={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(`
`)}]},t=re("5VLF"),i=re.n(t),s={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"]}},I=function(Q,q){return q.map(function(ae){return{label:ae,kind:Q.languages.CompletionItemKind.Keyword,insertText:ae}})},C=function(Q){return Object.keys(s.tables).map(function(q){return{label:q,kind:Q.languages.CompletionItemKind.Variable,insertText:q}})},_=function(Q,q){var ae=s.tables[Q];return ae?ae.map(function(ge){return{label:ge,kind:q.languages.CompletionItemKind.Field,insertText:ge}}):[]};function x(ee,Q,q,ae,ge){var pe=Q.getWordUntilPosition(q),Ne={startLineNumber:q.lineNumber,endLineNumber:q.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},Fe=ae.map(function(He){return{label:He,kind:ee.languages.CompletionItemKind.Keyword,insertText:He,insertTextRules:ee.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}});return ge.map(function(He){Fe.push(Object(ve.a)(Object(ve.a)({},He),{},{range:Ne}))}),Fe}var T=function(ee){s.languages.map(function(ge){return ee.languages.registerDocumentFormattingEditProvider(ge,{provideDocumentFormattingEdits:function(Ne,Fe,He){return Object(h.a)(A.a.mark(function Ke(){var Xe;return A.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return Xe=i()(Ne.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}),ye.abrupt("return",[{range:Ne.getFullModelRange(),text:Xe}]);case 2:case"end":return ye.stop()}},Ke)}))()}}),ge});var Q=n.quickKey.map(function(ge){return{label:ge.label,kind:ee.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:ee.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),q=e.quickKey.map(function(ge){return{label:ge.label,kind:ee.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:ee.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ae=r.quickKey.map(function(ge){return{label:ge.label,kind:ee.languages.CompletionItemKind.Method,insertText:ge.content,insertTextRules:ee.languages.CompletionItemInsertTextRule.InsertAsSnippet}});ee.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(O.a)(n.keywords),Object(O.a)(n.quickKey.map(function(ge){return ge.label}))),provideCompletionItems:function(pe,Ne){var Fe=pe.getValueInRange({startLineNumber:Ne.lineNumber,startColumn:1,endLineNumber:Ne.lineNumber,endColumn:Ne.column}),He=Fe.match(/cu/gim);console.log("match:",He,Ne,Fe,pe);var Ke=[],Xe=Ne.lineNumber,Ce=Ne.column,ye=pe.getValueInRange({startLineNumber:Xe,startColumn:0,endLineNumber:Xe,endColumn:Ce}),Pe=ye.trim().split(/\s+/),Et=Pe[Pe.length-1];if(Et.endsWith(".")){var mt=Et.slice(0,Et.length-1);Object.keys(s.tables).includes(mt)&&(Ke=Object(O.a)(_(mt,ee)))}else Et==="."?Ke=[]:Ke=[].concat(Object(O.a)(C(ee)),Object(O.a)(I(ee,n.keywords)),Object(O.a)(Q));return{suggestions:Ke}}}),ee.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(O.a)(a.keywords)),provideCompletionItems:function(pe,Ne){var Fe=pe.getValueInRange({startLineNumber:Ne.lineNumber,startColumn:1,endLineNumber:Ne.lineNumber,endColumn:Ne.column}),He=Fe.match(/cu/gim);console.log("match:",He,Ne,Fe,pe);var Ke=[],Xe=Ne.lineNumber,Ce=Ne.column,ye=pe.getValueInRange({startLineNumber:Xe,startColumn:0,endLineNumber:Xe,endColumn:Ce}),Pe=ye.trim().split(/\s+/),Et=Pe[Pe.length-1];if(Et.endsWith(".")){var mt=Et.slice(0,Et.length-1);Object.keys(s.tables).includes(mt)&&(Ke=Object(O.a)(_(mt,ee)))}else Et==="."?Ke=[]:Ke=[].concat(Object(O.a)(C(ee)),Object(O.a)(I(ee,a.keywords)));return{suggestions:Ke}}}),ee.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(O.a)(r.keywords)),provideCompletionItems:function(pe,Ne){var Fe=[],He=Ne.lineNumber,Ke=Ne.column,Xe=pe.getValueInRange({startLineNumber:He,startColumn:0,endLineNumber:He,endColumn:Ke}),Ce=Xe.trim().split(/\s+/),ye=Ce[Ce.length-1];if(ye.endsWith(".")){var Pe=ye.slice(0,ye.length-1);Object.keys(s.tables).includes(Pe)&&(Fe=Object(O.a)(_(Pe,ee)))}else ye==="."?Fe=[]:Fe=[].concat(Object(O.a)(C(ee)),Object(O.a)(I(ee,r.keywords)),Object(O.a)(ae));return{suggestions:Fe}}}),ee.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(O.a)(e.keywords)),provideCompletionItems:function(pe,Ne){var Fe=[],He=Ne.lineNumber,Ke=Ne.column,Xe=pe.getValueInRange({startLineNumber:He,startColumn:0,endLineNumber:He,endColumn:Ke}),Ce=Xe.trim().split(/\s+/),ye=Ce[Ce.length-1];if(ye.endsWith(".")){var Pe=ye.slice(0,ye.length-1);Object.keys(s.tables).includes(Pe)&&(Fe=Object(O.a)(_(Pe,ee)))}else ye==="."?Fe=[]:Fe=[].concat(Object(O.a)(C(ee)),Object(O.a)(I(ee,e.keywords)),Object(O.a)(q));return{suggestions:Fe}}})},d="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",u=re("LvDl"),o=re("+ua5");function l(ee){return/^\d+$/.test(ee)?"".concat(ee,"px"):ee}function m(){}var g=!1,E={"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 L(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Q=ee;if(Array.isArray(ee)){for(var q=0;q<ee.length;q++){var ae=E[ee[q]];if(ae)return ae}return Q[0]}return E[Q]||Q}var P=null,j=At.b=function(ee){var Q=ee.width,q=Q===void 0?"100%":Q,ae=ee.height,ge=ae===void 0?"100%":ae,pe=ee.value,Ne=ee.language,Fe=Ne===void 0?"javascript":Ne,He=ee.style,Ke=He===void 0?{}:He,Xe=ee.options,Ce=Xe===void 0?{}:Xe,ye=ee.overrideServices,Pe=ye===void 0?{}:ye,Et=ee.theme,mt=Et===void 0?"vs-dark":Et,gt=ee.onEditBlur,bt=ee.onSave,oe=ee.autoHeight,V=oe===void 0?!1:oe,Y=ee.forbidCopy,he=Y===void 0?!1:Y,Se=ee.onChange,Ue=Se===void 0?m:Se,Ie=ee.editorDidMount,st=Ie===void 0?m:Ie,it=ee.onFocus,ut=it===void 0?m:it,dt=ee.filename,vt=dt===void 0?"educoder.txt":dt,Tt=ee.errorLine,Me=ee.errorContent,Ye=Me===void 0?"":Me,tt=Object(R.a)(ee,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),at=Object(Z.useRef)(),ze=Object(Z.useRef)({}),qe=Object(Z.useRef)(),Oe=Object(Z.useRef)(!1),be=Object(Z.useRef)(),_e=Object(Z.useState)(!1),se=Object(F.a)(_e,2),le=se[0],me=se[1];function we(){var ot;return at.current&&(ot=new N.default(function(Kt){var nr=Object(X.a)(Kt),Jt;try{for(nr.s();!(Jt=nr.n()).done;){var or=Jt.value;(or.target.offsetHeight>0||or.target.offsetWidth>0)&&ze.current.instance.layout()}}catch(jr){nr.e(jr)}finally{nr.f()}}),ot.observe(at.current)),ot}function We(){U.b.warn(decodeURIComponent(d))}var $e=function(){var Kt=ze.current.instance;if(pe!=null&&Kt&&le){var nr=Kt.getModel();nr&&pe!==nr.getValue()&&(g=!0,nr.setValue(pe),Kt.layout(),g=!1)}};Object(Z.useEffect)(function(){qe.current&&clearTimeout(qe.current),qe.current=setTimeout(function(){$e()},500)},[pe,le,ze.current]),Object(Z.useEffect)(function(){if(Tt&&ze.current&&ze.current.instance){var ot=ze.current.instance;ot.changeViewZones(function(nr){var Jt=document.createElement("div");Jt.style.padding="10px 20px",Jt.style.width="calc(100% - 20px)",Jt.className="my-error-line-wrp",Jt.innerHTML=Ye,nr.addZone({afterLineNumber:Tt||11,heightInLines:3,domNode:Jt})});var Kt={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}};ot.addOverlayWidget(Kt),ot.revealPositionInCenter({lineNumber:20,column:1})}},[Tt,ze.current,le]);function pt(){var ot=ze.current.instance;if(ot){var Kt=ot.getSelection(),nr=ze.current.pastePos||{},Jt=new P.Range(nr.startLineNumber||Kt.endLineNumber,nr.startColumn||Kt.endColumn,nr.endLineNumber||Kt.endLineNumber,nr.endColumn||Kt.endColumn);setTimeout(function(){ot.executeEdits("",[{range:Jt,text:""}])},300)}}function Bt(ot){(window.navigator.platform.match("Mac")?ot.metaKey:ot.ctrlKey)&&ot.keyCode==83&&(ot.preventDefault(),bt())}var Rt=function(){if(V&&ze.current.instance){var Kt=ze.current.instance.getContentHeight();rr(Kt<ge?ge:Kt)}else rr(ge)};function Ct(ot){var Kt=document.createEvent("MouseEvents");Kt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ot.dispatchEvent(Kt)}function tr(ot,Kt){var nr=window.URL||window.webkitURL||window,Jt=new Blob([Kt]),or=document.createElementNS("http://www.w3.org/1999/xhtml","a");or.href=nr.createObjectURL(Jt),or.download=ot,Ct(or)}Object(Z.useEffect)(function(){Rt()},[Rt]),Object(Z.useEffect)(function(){at.current&&!le&&re.e(27).then(re.t.bind(null,"M/lh",7)).then(function(ot){try{P=ot,ze.current.instance=P.editor.create(at.current,{value:pe,language:L(Fe),theme:mt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},Pe);var Kt=ze.current.instance;if(st(Kt,P),setTimeout(function(){Rt(),ze.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){tr(vt||"educoder.txt",Kt.getValue())}})},500),ze.current.subscription=Kt.onDidChangeModelContent(function(Jt){Oe.current?clearTimeout(be.current):(Rt(),Ue(Kt.getValue(),Jt)),be.current=setTimeout(function(){Oe.current=!1},500)}),window.Monaco||T(P),he&&(Kt.addCommand(P.KeyMod.CtrlCmd|P.KeyMod.Shift|P.KeyCode.KEY_V,function(){return We(),null}),Kt.addCommand(P.KeyMod.CtrlCmd|P.KeyCode.KEY_C,function(){return We(),null})),window.Monaco=P,gt&&Kt.onDidBlurEditorWidget(function(){gt(Kt.getValue())}),ut&&Kt.onDidFocusEditorText(function(){ut(Kt.getValue())}),he){Kt.addCommand(P.KeyMod.CtrlCmd|P.KeyCode.KEY_V,function(){return We(),null}),Kt.onDidPaste(function(Jt){ze.current.pastePos=Jt});try{window.addEventListener("paste",pt)}catch(Jt){}}var nr=we();return me(!0),function(){var Jt=ze.current.instance;Jt.dispose();var or=Jt.getModel();or&&or.dispose(),ze.current.subscription&&ze.current.subscription.dispose(),he&&window.removeEventListener("paste",pt),nr.unobserve(at.current)}}catch(Jt){}})},[]),Object(Z.useEffect)(function(){var ot=ze.current.instance;if(ot&&le)return document.addEventListener("keydown",Bt,!1),function(){document.removeEventListener("keydown",Bt)}},[bt,le]),Object(Z.useEffect)(function(){var ot=ze.current.instance;if(ot&&le){var Kt=L(Fe);P.editor.setModelLanguage(ot.getModel(),Kt),console.log("language:",Fe,ot.getModel(),Kt)}},[Fe,le]),Object(Z.useEffect)(function(){var ot=ze.current.instance;ot&&le&&P.editor.setTheme(mt)},[mt,le]),Object(Z.useEffect)(function(){var ot=ze.current.instance;ot&&le&&(ot.updateOptions(Object(ve.a)({},Ce)),setTimeout(function(){ot.getModel().updateOptions(Object(ve.a)({},Ce))},200))},[JSON.stringify(Ce),le]),Object(Z.useEffect)(function(){var ot=ze.current.instance;ot&&le&&ot.layout()},[q,ge,le]);var zt=Object(Z.useState)(l(q)),ft=Object(F.a)(zt,2),Pt=ft[0],Yt=ft[1],Lt=Object(Z.useState)(l(ge)),ir=Object(F.a)(Lt,2),Vt=ir[0],rr=ir[1],cr=Object(ve.a)(Object(ve.a)({},Ke),{},{width:Pt,height:Vt});return M.a.createElement("div",{className:"my-monaco-editor",ref:at,style:cr})};function z(ee){var Q=ee.width,q=Q===void 0?"100%":Q,ae=ee.height,ge=ae===void 0?"100%":ae,pe=ee.original,Ne=ee.modified,Fe=ee.language,He=ee.options,Ke=He===void 0?{}:He,Xe=Object(Z.useRef)(),Ce=Object(Z.useState)(null),ye=Object(F.a)(Ce,2),Pe=ye[0],Et=ye[1];function mt(V){var Y;return Xe.current&&(Y=new N.default(function(he){var Se=Object(X.a)(he),Ue;try{for(Se.s();!(Ue=Se.n()).done;){var Ie=Ue.value;(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0)&&V.layout()}}catch(st){Se.e(st)}finally{Se.f()}}),Y.observe(Xe.current)),Y}Object(Z.useEffect)(function(){Xe.current&&re.e(27).then(re.t.bind(null,"M/lh",7)).then(function(V){P=V;var Y=P.editor.createDiffEditor(Xe.current,Object(ve.a)(Object(ve.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},Ke),{},{wordWrap:!0}));Et(Y);var he=mt(Y);return function(){Y.dispose();var Se=Y.getModel();Se&&Se.dispose(),he.unobserve(Xe.current)}})},[]),Object(Z.useEffect)(function(){Pe&&Pe.setModel({original:P.editor.createModel(pe,Fe),modified:P.editor.createModel(Ne,Fe)})},[pe,Ne,Fe,Pe]);var gt=l(q),bt=l(ge),oe={width:gt,height:bt};return M.a.createElement("div",{className:"my-diff-editor",ref:Xe,style:oe})}},ZWs3:function(It,At,re){"use strict";re.d(At,"a",function(){return h});var ve=re("+L6B"),J=re("2/Rp"),U=re("0Owb"),X=re("9og8"),F=re("tJVT"),R=re("PpiC"),Z=re("WmNS"),M=re.n(Z),N=re("q1tI"),O=re.n(N),h=function(A){var a=A.children,r=Object(R.a)(A,["children"]),n=Object(N.useState)(!1),e=Object(F.a)(n,2),t=e[0],i=e[1];return O.a.createElement(J.a,Object(U.a)({},r,{loading:t,onClick:function(){var s=Object(X.a)(M.a.mark(function I(C){return M.a.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.prev=0,i(!0),x.next=4,r.onClick(C);case 4:i(!1),x.next=10;break;case 7:x.prev=7,x.t0=x.catch(0),i(!1);case 10:case"end":return x.stop()}},I,null,[[0,7]])}));return function(I){return s.apply(this,arguments)}}()}),a)}},ZpRC:function(It,At,re){"use strict";function ve(h){return typeof h=="object"&&h!=null&&h.nodeType===1}function J(h,b){return(!b||h!=="hidden")&&h!=="visible"&&h!=="clip"}function U(h,b){if(h.clientHeight<h.scrollHeight||h.clientWidth<h.scrollWidth){var A=getComputedStyle(h,null);return J(A.overflowY,b)||J(A.overflowX,b)||function(a){var r=function(n){if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch(e){return null}}(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)}(h)}return!1}function X(h,b,A,a,r,n,e,t){return n<h&&e>b||n>h&&e<b?0:n<=h&&t<=A||e>=b&&t>=A?n-h-a:e>b&&t<A||n<h&&t>A?e-b+r:0}var F=function(h,b){var A=window,a=b.scrollMode,r=b.block,n=b.inline,e=b.boundary,t=b.skipOverflowHiddenElements,i=typeof e=="function"?e:function(Y){return Y!==e};if(!ve(h))throw new TypeError("Invalid target");for(var s=document.scrollingElement||document.documentElement,I=[],C=h;ve(C)&&i(C);){if((C=C.parentElement)===s){I.push(C);break}C!=null&&C===document.body&&U(C)&&!U(document.documentElement)||C!=null&&U(C,t)&&I.push(C)}for(var _=A.visualViewport?A.visualViewport.width:innerWidth,x=A.visualViewport?A.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,d=window.scrollY||pageYOffset,u=h.getBoundingClientRect(),o=u.height,l=u.width,m=u.top,g=u.right,E=u.bottom,L=u.left,P=r==="start"||r==="nearest"?m:r==="end"?E:m+o/2,j=n==="center"?L+l/2:n==="end"?g:L,z=[],ee=0;ee<I.length;ee++){var Q=I[ee],q=Q.getBoundingClientRect(),ae=q.height,ge=q.width,pe=q.top,Ne=q.right,Fe=q.bottom,He=q.left;if(a==="if-needed"&&m>=0&&L>=0&&E<=x&&g<=_&&m>=pe&&E<=Fe&&L>=He&&g<=Ne)return z;var Ke=getComputedStyle(Q),Xe=parseInt(Ke.borderLeftWidth,10),Ce=parseInt(Ke.borderTopWidth,10),ye=parseInt(Ke.borderRightWidth,10),Pe=parseInt(Ke.borderBottomWidth,10),Et=0,mt=0,gt="offsetWidth"in Q?Q.offsetWidth-Q.clientWidth-Xe-ye:0,bt="offsetHeight"in Q?Q.offsetHeight-Q.clientHeight-Ce-Pe:0;if(s===Q)Et=r==="start"?P:r==="end"?P-x:r==="nearest"?X(d,d+x,x,Ce,Pe,d+P,d+P+o,o):P-x/2,mt=n==="start"?j:n==="center"?j-_/2:n==="end"?j-_:X(T,T+_,_,Xe,ye,T+j,T+j+l,l),Et=Math.max(0,Et+d),mt=Math.max(0,mt+T);else{Et=r==="start"?P-pe-Ce:r==="end"?P-Fe+Pe+bt:r==="nearest"?X(pe,Fe,ae,Ce,Pe+bt,P,P+o,o):P-(pe+ae/2)+bt/2,mt=n==="start"?j-He-Xe:n==="center"?j-(He+ge/2)+gt/2:n==="end"?j-Ne+ye+gt:X(He,Ne,ge,Xe,ye+gt,j,j+l,l);var oe=Q.scrollLeft,V=Q.scrollTop;P+=V-(Et=Math.max(0,Math.min(V+Et,Q.scrollHeight-ae+bt))),j+=oe-(mt=Math.max(0,Math.min(oe+mt,Q.scrollWidth-ge+gt)))}z.push({el:Q,top:Et,left:mt})}return z};function R(h){return h===Object(h)&&Object.keys(h).length!==0}function Z(h,b){b===void 0&&(b="auto");var A="scrollBehavior"in document.body.style;h.forEach(function(a){var r=a.el,n=a.top,e=a.left;r.scroll&&A?r.scroll({top:n,left:e,behavior:b}):(r.scrollTop=n,r.scrollLeft=e)})}function M(h){return h===!1?{block:"end",inline:"nearest"}:R(h)?h:{block:"start",inline:"nearest"}}function N(h,b){var A=!h.ownerDocument.documentElement.contains(h);if(R(b)&&typeof b.behavior=="function")return b.behavior(A?[]:F(h,b));if(A)return;var a=M(b);return Z(F(h,a),a.behavior)}var O=At.a=N},bT9E:function(It,At,re){"use strict";re.d(At,"a",function(){return J});var ve=re("VTBJ");function J(U,X){var F=Object(ve.a)({},U);return Array.isArray(X)&&X.forEach(function(R){delete F[R]}),F}},biw7:function(It,At,re){"use strict";var ve=re("q1tI"),J=re.n(ve),U=ve.createContext(null);At.a=U},crp1:function(It,At,re){"use strict";re.d(At,"b",function(){return Lt}),re.d(At,"a",function(){return cr});var ve={},J=function(Ae,ue,Ee,ke,nt){var ht=ve[ue]||(ve[ue]=URL.createObjectURL(new Blob([Ae],{type:"text/javascript"}))),H=new Worker(ht);return H.onerror=function(f){return nt(f.error,null)},H.onmessage=function(f){return nt(null,f.data)},H.postMessage(Ee,ke),H},U=Uint8Array,X=Uint16Array,F=Uint32Array,R=new U([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Z=new U([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),M=new U([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),N=function(Ae,ue){for(var Ee=new X(31),ke=0;ke<31;++ke)Ee[ke]=ue+=1<<Ae[ke-1];for(var nt=new F(Ee[30]),ke=1;ke<30;++ke)for(var ht=Ee[ke];ht<Ee[ke+1];++ht)nt[ht]=ht-Ee[ke]<<5|ke;return[Ee,nt]},O=N(R,2),h=O[0],b=O[1];h[28]=258,b[258]=28;for(var A=N(Z,0),a=A[0],r=A[1],n=new X(32768),e=0;e<32768;++e){var t=(e&43690)>>>1|(e&21845)<<1;t=(t&52428)>>>2|(t&13107)<<2,t=(t&61680)>>>4|(t&3855)<<4,n[e]=((t&65280)>>>8|(t&255)<<8)>>>1}for(var i=function(Ae,ue,Ee){for(var ke=Ae.length,nt=0,ht=new X(ue);nt<ke;++nt)++ht[Ae[nt]-1];var H=new X(ue);for(nt=0;nt<ue;++nt)H[nt]=H[nt-1]+ht[nt-1]<<1;var f;if(Ee){f=new X(1<<ue);var v=15-ue;for(nt=0;nt<ke;++nt)if(Ae[nt])for(var k=nt<<4|Ae[nt],$=ue-Ae[nt],K=H[Ae[nt]-1]++<<$,Te=K|(1<<$)-1;K<=Te;++K)f[n[K]>>>v]=k}else for(f=new X(ke),nt=0;nt<ke;++nt)f[nt]=n[H[Ae[nt]-1]++]>>>15-Ae[nt];return f},s=new U(288),e=0;e<144;++e)s[e]=8;for(var e=144;e<256;++e)s[e]=9;for(var e=256;e<280;++e)s[e]=7;for(var e=280;e<288;++e)s[e]=8;for(var I=new U(32),e=0;e<32;++e)I[e]=5;var C=i(s,9,0),_=i(s,9,1),x=i(I,5,0),T=i(I,5,1),d=function(Ae){for(var ue=Ae[0],Ee=1;Ee<Ae.length;++Ee)Ae[Ee]>ue&&(ue=Ae[Ee]);return ue},u=function(Ae,ue,Ee){var ke=ue/8>>0;return(Ae[ke]|Ae[ke+1]<<8)>>>(ue&7)&Ee},o=function(Ae,ue){var Ee=ue/8>>0;return(Ae[Ee]|Ae[Ee+1]<<8|Ae[Ee+2]<<16)>>>(ue&7)},l=function(Ae){return(Ae/8>>0)+(Ae&7&&1)},m=function(Ae,ue,Ee){(ue==null||ue<0)&&(ue=0),(Ee==null||Ee>Ae.length)&&(Ee=Ae.length);var ke=new(Ae instanceof X?X:Ae instanceof F?F:U)(Ee-ue);return ke.set(Ae.subarray(ue,Ee)),ke},g=function(Ae,ue,Ee){var ke=Ae.length,nt=!ue||Ee,ht=!Ee||Ee.i;Ee||(Ee={}),ue||(ue=new U(ke*3));var H=function(ur){var Qr=ue.length;if(ur>Qr){var yr=new U(Math.max(Qr*2,ur));yr.set(ue),ue=yr}},f=Ee.f||0,v=Ee.p||0,k=Ee.b||0,$=Ee.l,K=Ee.d,Te=Ee.m,Ze=Ee.n,yt=ke*8;do{if(!$){Ee.f=f=u(Ae,v,1);var _t=u(Ae,v+1,3);if(v+=3,_t)if(_t==1)$=_,K=T,Te=9,Ze=5;else if(_t==2){var Mt=u(Ae,v,31)+257,qt=u(Ae,v+10,15)+4,br=Mt+u(Ae,v+5,31)+1;v+=14;for(var sr=new U(br),hr=new U(19),$t=0;$t<qt;++$t)hr[M[$t]]=u(Ae,v+$t*3,7);v+=qt*3;var Ur=d(hr),Cr=(1<<Ur)-1;if(!ht&&v+br*(Ur+7)>yt)break;for(var fr=i(hr,Ur,1),$t=0;$t<br;){var Fr=fr[u(Ae,v,Cr)];v+=Fr&15;var rt=Fr>>>4;if(rt<16)sr[$t++]=rt;else{var Xr=0,Yr=0;for(rt==16?(Yr=3+u(Ae,v,3),v+=2,Xr=sr[$t-1]):rt==17?(Yr=3+u(Ae,v,7),v+=3):rt==18&&(Yr=11+u(Ae,v,127),v+=7);Yr--;)sr[$t++]=Xr}}var Nr=sr.subarray(0,Mt),Tr=sr.subarray(Mt);Te=d(Nr),Ze=d(Tr),$=i(Nr,Te,1),K=i(Tr,Ze,1)}else throw"invalid block type";else{var rt=l(v)+4,Nt=Ae[rt-4]|Ae[rt-3]<<8,Ot=rt+Nt;if(Ot>ke){if(ht)throw"unexpected EOF";break}nt&&H(k+Nt),ue.set(Ae.subarray(rt,Ot),k),Ee.b=k+=Nt,Ee.p=v=Ot*8;continue}if(v>yt)throw"unexpected EOF"}nt&&H(k+131072);for(var Hr=(1<<Te)-1,Vr=(1<<Ze)-1,zr=Te+Ze+18;ht||v+zr<yt;){var Xr=$[o(Ae,v)&Hr],nn=Xr>>>4;if(v+=Xr&15,v>yt)throw"unexpected EOF";if(!Xr)throw"invalid length/literal";if(nn<256)ue[k++]=nn;else if(nn==256){$=null;break}else{var en=nn-254;if(nn>264){var $t=nn-257,xr=R[$t];en=u(Ae,v,(1<<xr)-1)+h[$t],v+=xr}var ar=K[o(Ae,v)&Vr],er=ar>>>4;if(!ar)throw"invalid distance";v+=ar&15;var Tr=a[er];if(er>3){var xr=Z[er];Tr+=o(Ae,v)&(1<<xr)-1,v+=xr}if(v>yt)throw"unexpected EOF";nt&&H(k+131072);for(var mr=k+en;k<mr;k+=4)ue[k]=ue[k-Tr],ue[k+1]=ue[k+1-Tr],ue[k+2]=ue[k+2-Tr],ue[k+3]=ue[k+3-Tr];k=mr}}Ee.l=$,Ee.p=v,Ee.b=k,$&&(f=1,Ee.m=Te,Ee.d=K,Ee.n=Ze)}while(!f);return k==ue.length?ue:m(ue,0,k)},E=function(Ae,ue,Ee){Ee<<=ue&7;var ke=ue/8>>0;Ae[ke]|=Ee,Ae[ke+1]|=Ee>>>8},L=function(Ae,ue,Ee){Ee<<=ue&7;var ke=ue/8>>0;Ae[ke]|=Ee,Ae[ke+1]|=Ee>>>8,Ae[ke+2]|=Ee>>>16},P=function(Ae,ue){for(var Ee=[],ke=0;ke<Ae.length;++ke)Ae[ke]&&Ee.push({s:ke,f:Ae[ke]});var nt=Ee.length,ht=Ee.slice();if(!nt)return[new U(0),0];if(nt==1){var H=new U(Ee[0].s+1);return H[Ee[0].s]=1,[H,1]}Ee.sort(function(br,sr){return br.f-sr.f}),Ee.push({s:-1,f:25001});var f=Ee[0],v=Ee[1],k=0,$=1,K=2;for(Ee[0]={s:-1,f:f.f+v.f,l:f,r:v};$!=nt-1;)f=Ee[Ee[k].f<Ee[K].f?k++:K++],v=Ee[k!=$&&Ee[k].f<Ee[K].f?k++:K++],Ee[$++]={s:-1,f:f.f+v.f,l:f,r:v};for(var Te=ht[0].s,ke=1;ke<nt;++ke)ht[ke].s>Te&&(Te=ht[ke].s);var Ze=new X(Te+1),yt=j(Ee[$-1],Ze,0);if(yt>ue){var ke=0,_t=0,rt=yt-ue,Nt=1<<rt;for(ht.sort(function(sr,hr){return Ze[hr.s]-Ze[sr.s]||sr.f-hr.f});ke<nt;++ke){var Ot=ht[ke].s;if(Ze[Ot]>ue)_t+=Nt-(1<<yt-Ze[Ot]),Ze[Ot]=ue;else break}for(_t>>>=rt;_t>0;){var Mt=ht[ke].s;Ze[Mt]<ue?_t-=1<<ue-Ze[Mt]++-1:++ke}for(;ke>=0&&_t;--ke){var qt=ht[ke].s;Ze[qt]==ue&&(--Ze[qt],++_t)}yt=ue}return[new U(Ze),yt]},j=function(Ae,ue,Ee){return Ae.s==-1?Math.max(j(Ae.l,ue,Ee+1),j(Ae.r,ue,Ee+1)):ue[Ae.s]=Ee},z=function(Ae){for(var ue=Ae.length;ue&&!Ae[--ue];);for(var Ee=new X(++ue),ke=0,nt=Ae[0],ht=1,H=function(v){Ee[ke++]=v},f=1;f<=ue;++f)if(Ae[f]==nt&&f!=ue)++ht;else{if(!nt&&ht>2){for(;ht>138;ht-=138)H(32754);ht>2&&(H(ht>10?ht-11<<5|28690:ht-3<<5|12305),ht=0)}else if(ht>3){for(H(nt),--ht;ht>6;ht-=6)H(8304);ht>2&&(H(ht-3<<5|8208),ht=0)}for(;ht--;)H(nt);ht=1,nt=Ae[f]}return[Ee.subarray(0,ke),ue]},ee=function(Ae,ue){for(var Ee=0,ke=0;ke<ue.length;++ke)Ee+=Ae[ke]*ue[ke];return Ee},Q=function(Ae,ue,Ee){var ke=Ee.length,nt=l(ue+2);Ae[nt]=ke&255,Ae[nt+1]=ke>>>8,Ae[nt+2]=Ae[nt]^255,Ae[nt+3]=Ae[nt+1]^255;for(var ht=0;ht<ke;++ht)Ae[nt+ht+4]=Ee[ht];return(nt+4+ke)*8},q=function(Ae,ue,Ee,ke,nt,ht,H,f,v,k,$){E(ue,$++,Ee),++nt[256];for(var K=P(nt,15),Te=K[0],Ze=K[1],yt=P(ht,15),_t=yt[0],rt=yt[1],Nt=z(Te),Ot=Nt[0],Mt=Nt[1],qt=z(_t),br=qt[0],sr=qt[1],hr=new X(19),$t=0;$t<Ot.length;++$t)hr[Ot[$t]&31]++;for(var $t=0;$t<br.length;++$t)hr[br[$t]&31]++;for(var Ur=P(hr,7),Cr=Ur[0],fr=Ur[1],Fr=19;Fr>4&&!Cr[M[Fr-1]];--Fr);var Xr=k+5<<3,Yr=ee(nt,s)+ee(ht,I)+H,Nr=ee(nt,Te)+ee(ht,_t)+H+14+3*Fr+ee(hr,Cr)+(2*hr[16]+3*hr[17]+7*hr[18]);if(Xr<=Yr&&Xr<=Nr)return Q(ue,$,Ae.subarray(v,v+k));var Tr,Hr,Vr,zr;if(E(ue,$,1+(Nr<Yr)),$+=2,Nr<Yr){Tr=i(Te,Ze,0),Hr=Te,Vr=i(_t,rt,0),zr=_t;var nn=i(Cr,fr,0);E(ue,$,Mt-257),E(ue,$+5,sr-1),E(ue,$+10,Fr-4),$+=14;for(var $t=0;$t<Fr;++$t)E(ue,$+3*$t,Cr[M[$t]]);$+=3*Fr;for(var en=[Ot,br],xr=0;xr<2;++xr)for(var ar=en[xr],$t=0;$t<ar.length;++$t){var er=ar[$t]&31;E(ue,$,nn[er]),$+=Cr[er],er>15&&(E(ue,$,ar[$t]>>>5&127),$+=ar[$t]>>>12)}}else Tr=C,Hr=s,Vr=x,zr=I;for(var $t=0;$t<f;++$t)if(ke[$t]>255){var er=ke[$t]>>>18&31;L(ue,$,Tr[er+257]),$+=Hr[er+257],er>7&&(E(ue,$,ke[$t]>>>23&31),$+=R[er]);var mr=ke[$t]&31;L(ue,$,Vr[mr]),$+=zr[mr],mr>3&&(L(ue,$,ke[$t]>>>5&8191),$+=Z[mr])}else L(ue,$,Tr[ke[$t]]),$+=Hr[ke[$t]];return L(ue,$,Tr[256]),$+Hr[256]},ae=new F([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ge=new U(0),pe=function(Ae,ue,Ee,ke,nt,ht){var H=Ae.length,f=new U(ke+H+5*(1+Math.floor(H/7e3))+nt),v=f.subarray(ke,f.length-nt),k=0;if(!ue||H<8)for(var $=0;$<=H;$+=65535){var K=$+65535;K<H?k=Q(v,k,Ae.subarray($,K)):(v[$]=ht,k=Q(v,k,Ae.subarray($,H)))}else{for(var Te=ae[ue-1],Ze=Te>>>13,yt=Te&8191,_t=(1<<Ee)-1,rt=new X(32768),Nt=new X(_t+1),Ot=Math.ceil(Ee/3),Mt=2*Ot,qt=function(Kr){return(Ae[Kr]^Ae[Kr+1]<<Ot^Ae[Kr+2]<<Mt)&_t},br=new F(25e3),sr=new X(288),hr=new X(32),$t=0,Ur=0,$=0,Cr=0,fr=0,Fr=0;$<H;++$){var Xr=qt($),Yr=$&32767,Nr=Nt[Xr];if(rt[Yr]=Nr,Nt[Xr]=Yr,fr<=$){var Tr=H-$;if(($t>7e3||Cr>24576)&&Tr>423){k=q(Ae,v,0,br,sr,hr,Ur,Cr,Fr,$-Fr,k),Cr=$t=Ur=0,Fr=$;for(var Hr=0;Hr<286;++Hr)sr[Hr]=0;for(var Hr=0;Hr<30;++Hr)hr[Hr]=0}var Vr=2,zr=0,nn=yt,en=Yr-Nr&32767;if(Tr>2&&Xr==qt($-en))for(var xr=Math.min(Ze,Tr)-1,ar=Math.min(32767,$),er=Math.min(258,Tr);en<=ar&&--nn&&Yr!=Nr;){if(Ae[$+Vr]==Ae[$+Vr-en]){for(var mr=0;mr<er&&Ae[$+mr]==Ae[$+mr-en];++mr);if(mr>Vr){if(Vr=mr,zr=en,mr>xr)break;for(var ur=Math.min(en,mr-2),Qr=0,Hr=0;Hr<ur;++Hr){var yr=$-en+Hr+32768&32767,Rn=rt[yr],Jr=yr-Rn+32768&32767;Jr>Qr&&(Qr=Jr,Nr=yr)}}}Yr=Nr,Nr=rt[Yr],en+=Yr-Nr+32768&32767}if(zr){br[Cr++]=268435456|b[Vr]<<18|r[zr];var xn=b[Vr]&31,Dn=r[zr]&31;Ur+=R[xn]+Z[Dn],++sr[257+xn],++hr[Dn],fr=$+Vr,++$t}else br[Cr++]=Ae[$],++sr[Ae[$]]}}k=q(Ae,v,ht,br,sr,hr,Ur,Cr,Fr,$-Fr,k),ht||(k=Q(v,k,ge))}return m(f,0,ke+l(k)+nt)},Ne=function(){for(var Ae=new F(256),ue=0;ue<256;++ue){for(var Ee=ue,ke=9;--ke;)Ee=(Ee&1&&3988292384)^Ee>>>1;Ae[ue]=Ee}return Ae}(),Fe=function(){var Ae=4294967295;return{p:function(ue){for(var Ee=Ae,ke=0;ke<ue.length;++ke)Ee=Ne[Ee&255^ue[ke]]^Ee>>>8;Ae=Ee},d:function(){return Ae^4294967295}}},He=function(){var Ae=1,ue=0;return{p:function(Ee){for(var ke=Ae,nt=ue,ht=Ee.length,H=0;H!=ht;){for(var f=Math.min(H+5552,ht);H<f;++H)ke+=Ee[H],nt+=ke;ke%=65521,nt%=65521}Ae=ke,ue=nt},d:function(){return(Ae>>>8<<16|(ue&255)<<8|ue>>>8)+((Ae&255)<<23)*2}}},Ke=function(Ae,ue,Ee,ke,nt){return pe(Ae,ue.level==null?6:ue.level,ue.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(Ae.length)))*1.5):12+ue.mem,Ee,ke,!nt)},Xe=function(Ae,ue){var Ee={};for(var ke in Ae)Ee[ke]=Ae[ke];for(var ke in ue)Ee[ke]=ue[ke];return Ee},Ce=function(Ae,ue,Ee){for(var ke=Ae(),nt=Ae.toString(),ht=nt.slice(nt.indexOf("[")+1,nt.lastIndexOf("]")).replace(/ /g,"").split(","),H=0;H<ke.length;++H){var f=ke[H],v=ht[H];if(typeof f=="function"){ue+=";"+v+"=";var k=f.toString();if(f.prototype)if(k.indexOf("[native code]")!=-1){var $=k.indexOf(" ",8)+1;ue+=k.slice($,k.indexOf("(",$))}else{ue+=k;for(var K in f.prototype)ue+=";"+v+".prototype."+K+"="+f.prototype[K].toString()}else ue+=k}else Ee[v]=f}return[ue,Ee]},ye=[],Pe=function(Ae){var ue=[];for(var Ee in Ae)(Ae[Ee]instanceof U||Ae[Ee]instanceof X||Ae[Ee]instanceof F)&&ue.push((Ae[Ee]=new Ae[Ee].constructor(Ae[Ee])).buffer);return ue},Et=function(Ae,ue,Ee,ke){var nt;if(!ye[Ee]){for(var ht="",H={},f=Ae.length-1,v=0;v<f;++v)nt=Ce(Ae[v],ht,H),ht=nt[0],H=nt[1];ye[Ee]=Ce(Ae[f],ht,H)}var k=Xe({},ye[Ee][1]);return J(ye[Ee][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ue.toString()+"}",Ee,k,Pe(k),ke)},mt=function(){return[U,X,F,R,Z,M,h,a,_,T,n,i,d,u,o,l,m,g,we,he,Se]},gt=function(){return[U,X,F,R,Z,M,b,r,C,s,x,I,n,ae,ge,i,E,L,P,j,z,ee,Q,q,l,m,pe,Ke,_e,he]},bt=function(){return[vt,Ye,dt,Fe,Ne]},oe=function(){return[Tt,Me]},V=function(){return[tt,dt,He]},Y=function(){return[at]},he=function(Ae){return postMessage(Ae,[Ae.buffer])},Se=function(Ae){return Ae&&Ae.size&&new U(Ae.size)},Ue=function(Ae,ue,Ee,ke,nt,ht){var H=Et(Ee,ke,nt,function(f,v){H.terminate(),ht(f,v)});return ue.consume||(Ae=new U(Ae)),H.postMessage([Ae,ue],[Ae.buffer]),function(){H.terminate()}},Ie=function(Ae){return Ae.ondata=function(ue,Ee){return postMessage([ue,Ee],[ue.buffer])},function(ue){return Ae.push(ue.data[0],ue.data[1])}},st=function(Ae,ue,Ee,ke,nt){var ht,H=Et(Ae,ke,nt,function(f,v){f?(H.terminate(),ue.ondata.call(ue,f)):(v[1]&&H.terminate(),ue.ondata.call(ue,f,v[0],v[1]))});H.postMessage(Ee),ue.push=function(f,v){if(ht)throw"stream finished";if(!ue.ondata)throw"no stream handler";H.postMessage([f,ht=v],[f.buffer])},ue.terminate=function(){H.terminate()}},it=function(Ae,ue){return Ae[ue]|Ae[ue+1]<<8},ut=function(Ae,ue){return(Ae[ue]|Ae[ue+1]<<8|Ae[ue+2]<<16)+(Ae[ue+3]<<23)*2},dt=function(Ae,ue,Ee){for(;Ee;++ue)Ae[ue]=Ee,Ee>>>=8},vt=function(Ae,ue){var Ee=ue.filename;if(Ae[0]=31,Ae[1]=139,Ae[2]=8,Ae[8]=ue.level<2?4:ue.level==9?2:0,Ae[9]=3,ue.mtime!=0&&dt(Ae,4,Math.floor(new Date(ue.mtime||Date.now())/1e3)),Ee){Ae[3]=8;for(var ke=0;ke<=Ee.length;++ke)Ae[ke+10]=Ee.charCodeAt(ke)}},Tt=function(Ae){if(Ae[0]!=31||Ae[1]!=139||Ae[2]!=8)throw"invalid gzip data";var ue=Ae[3],Ee=10;ue&4&&(Ee+=Ae[10]|(Ae[11]<<8)+2);for(var ke=(ue>>3&1)+(ue>>4&1);ke>0;ke-=!Ae[Ee++]);return Ee+(ue&2)},Me=function(Ae){var ue=Ae.length;return(Ae[ue-4]|Ae[ue-3]<<8|Ae[ue-2]<<16)+2*(Ae[ue-1]<<23)},Ye=function(Ae){return 10+(Ae.filename&&Ae.filename.length+1||0)},tt=function(Ae,ue){var Ee=ue.level,ke=Ee==0?0:Ee<6?1:Ee==9?3:2;Ae[0]=120,Ae[1]=ke<<6|(ke?32-2*ke:1)},at=function(Ae){if((Ae[0]&15)!=8||Ae[0]>>>4>7||(Ae[0]<<8|Ae[1])%31)throw"invalid zlib data";if(Ae[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function ze(Ae,ue){return!ue&&typeof Ae=="function"&&(ue=Ae,Ae={}),this.ondata=ue,Ae}var qe=function(){function Ae(ue,Ee){!Ee&&typeof ue=="function"&&(Ee=ue,ue={}),this.ondata=Ee,this.o=ue||{}}return Ae.prototype.p=function(ue,Ee){this.ondata(Ke(ue,this.o,0,0,!Ee),Ee)},Ae.prototype.push=function(ue,Ee){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Ee,this.p(ue,Ee||!1)},Ae}(),Oe=function(){function Ae(ue,Ee){st([gt,function(){return[Ie,qe]}],this,ze.call(this,ue,Ee),function(ke){var nt=new qe(ke.data);onmessage=Ie(nt)},6)}return Ae}();function be(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";return Ue(Ae,ue,[gt],function(ke){return he(_e(ke.data[0],ke.data[1]))},0,Ee)}function _e(Ae,ue){return ue===void 0&&(ue={}),Ke(Ae,ue,0,0)}var se=function(){function Ae(ue){this.s={},this.p=new U(0),this.ondata=ue}return Ae.prototype.e=function(ue){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Ee=this.p.length,ke=new U(Ee+ue.length);ke.set(this.p),ke.set(ue,Ee),this.p=ke},Ae.prototype.c=function(ue){this.d=this.s.i=ue||!1;var Ee=this.s.b,ke=g(this.p,this.o,this.s);this.ondata(m(ke,Ee,this.s.b),this.d),this.o=m(ke,this.s.b-32768),this.s.b=this.o.length,this.p=m(this.p,this.s.p/8>>0),this.s.p&=7},Ae.prototype.push=function(ue,Ee){this.e(ue),this.c(Ee)},Ae}(),le=function(){function Ae(ue){this.ondata=ue,st([mt,function(){return[Ie,se]}],this,0,function(){var Ee=new se;onmessage=Ie(Ee)},7)}return Ae}();function me(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";return Ue(Ae,ue,[mt],function(ke){return he(we(ke.data[0],Se(ke.data[1])))},1,Ee)}function we(Ae,ue){return g(Ae,ue)}var We=function(){function Ae(ue,Ee){this.c=Fe(),this.l=0,this.v=1,qe.call(this,ue,Ee)}return Ae.prototype.push=function(ue,Ee){qe.prototype.push.call(this,ue,Ee)},Ae.prototype.p=function(ue,Ee){this.c.p(ue),this.l+=ue.length;var ke=Ke(ue,this.o,this.v&&Ye(this.o),Ee&&8,!Ee);this.v&&(vt(ke,this.o),this.v=0),Ee&&(dt(ke,ke.length-8,this.c.d()),dt(ke,ke.length-4,this.l)),this.ondata(ke,Ee)},Ae}(),$e=function(){function Ae(ue,Ee){st([gt,bt,function(){return[Ie,qe,We]}],this,ze.call(this,ue,Ee),function(ke){var nt=new We(ke.data);onmessage=Ie(nt)},8)}return Ae}();function pt(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";return Ue(Ae,ue,[gt,bt,function(){return[Bt]}],function(ke){return he(Bt(ke.data[0],ke.data[1]))},2,Ee)}function Bt(Ae,ue){ue===void 0&&(ue={});var Ee=Fe(),ke=Ae.length;Ee.p(Ae);var nt=Ke(Ae,ue,Ye(ue),8),ht=nt.length;return vt(nt,ue),dt(nt,ht-8,Ee.d()),dt(nt,ht-4,ke),nt}var Rt=function(){function Ae(ue){this.v=1,se.call(this,ue)}return Ae.prototype.push=function(ue,Ee){if(se.prototype.e.call(this,ue),this.v){var ke=Tt(this.p);if(ke>=this.p.length&&!Ee)return;this.p=this.p.subarray(ke),this.v=0}if(Ee){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}se.prototype.c.call(this,Ee)},Ae}(),Ct=function(){function Ae(ue){this.ondata=ue,st([mt,oe,function(){return[Ie,se,Rt]}],this,0,function(){var Ee=new Rt;onmessage=Ie(Ee)},9)}return Ae}();function tr(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";return Ue(Ae,ue,[mt,oe,function(){return[zt]}],function(ke){return he(zt(ke.data[0]))},3,Ee)}function zt(Ae,ue){return g(Ae.subarray(Tt(Ae),-8),ue||new U(Me(Ae)))}var ft=function(){function Ae(ue,Ee){this.c=He(),this.v=1,qe.call(this,ue,Ee)}return Ae.prototype.push=function(ue,Ee){qe.prototype.push.call(this,ue,Ee)},Ae.prototype.p=function(ue,Ee){this.c.p(ue);var ke=Ke(ue,this.o,this.v&&2,Ee&&4,!Ee);this.v&&(tt(ke,this.o),this.v=0),Ee&&dt(ke,ke.length-4,this.c.d()),this.ondata(ke,Ee)},Ae}(),Pt=function(){function Ae(ue,Ee){st([gt,V,function(){return[Ie,qe,ft]}],this,ze.call(this,ue,Ee),function(ke){var nt=new ft(ke.data);onmessage=Ie(nt)},10)}return Ae}();function Yt(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";return Ue(Ae,ue,[gt,V,function(){return[Lt]}],function(ke){return he(Lt(ke.data[0],ke.data[1]))},4,Ee)}function Lt(Ae,ue){ue===void 0&&(ue={});var Ee=He();Ee.p(Ae);var ke=Ke(Ae,ue,2,4);return tt(ke,ue),dt(ke,ke.length-4,Ee.d()),ke}var ir=function(){function Ae(ue){this.v=1,se.call(this,ue)}return Ae.prototype.push=function(ue,Ee){if(se.prototype.e.call(this,ue),this.v){if(this.p.length<2&&!Ee)return;this.p=this.p.subarray(2),this.v=0}if(Ee){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}se.prototype.c.call(this,Ee)},Ae}(),Vt=function(){function Ae(ue){this.ondata=ue,st([mt,Y,function(){return[Ie,se,ir]}],this,0,function(){var Ee=new ir;onmessage=Ie(Ee)},11)}return Ae}();function rr(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";return Ue(Ae,ue,[mt,Y,function(){return[cr]}],function(ke){return he(cr(ke.data[0],Se(ke.data[1])))},5,Ee)}function cr(Ae,ue){return g((at(Ae),Ae.subarray(2,-4)),ue)}var ot=function(){function Ae(ue){this.G=Rt,this.I=se,this.Z=ir,this.ondata=ue}return Ae.prototype.push=function(ue,Ee){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(ue,Ee);else{if(this.p&&this.p.length){var ke=new U(this.p.length+ue.length);ke.set(this.p),ke.set(ue,this.p.length)}else this.p=ue;if(this.p.length>2){var nt=this,ht=function(){nt.ondata.apply(nt,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(ht):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(ht):new this.Z(ht),this.s.push(this.p,Ee),this.p=null}}},Ae}(),Kt=function(){function Ae(ue){this.G=Ct,this.I=le,this.Z=Vt,this.ondata=ue}return Ae.prototype.push=function(ue,Ee){ot.prototype.push.call(this,ue,Ee)},Ae}();function nr(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";return Ae[0]==31&&Ae[1]==139&&Ae[2]==8?tr(Ae,ue,Ee):(Ae[0]&15)!=8||Ae[0]>>4>7||(Ae[0]<<8|Ae[1])%31?me(Ae,ue,Ee):rr(Ae,ue,Ee)}function Jt(Ae,ue){return Ae[0]==31&&Ae[1]==139&&Ae[2]==8?zt(Ae,ue):(Ae[0]&15)!=8||Ae[0]>>4>7||(Ae[0]<<8|Ae[1])%31?we(Ae,ue):cr(Ae,ue)}var or=function(Ae,ue,Ee,ke){for(var nt in Ae){var ht=Ae[nt],H=ue+nt;ht instanceof U?Ee[H]=[ht,ke]:Array.isArray(ht)?Ee[H]=[ht[0],Xe(ke,ht[1])]:or(ht,H+"/",Ee,ke)}};function jr(Ae,ue){var Ee=Ae.length;if(!ue&&typeof TextEncoder!="undefined")return new TextEncoder().encode(Ae);for(var ke=new U(Ae.length+(Ae.length>>>1)),nt=0,ht=function(k){ke[nt++]=k},H=0;H<Ee;++H){if(nt+5>ke.length){var f=new U(nt+8+(Ee-H<<1));f.set(ke),ke=f}var v=Ae.charCodeAt(H);v<128||ue?ht(v):v<2048?(ht(192|v>>>6),ht(128|v&63)):v>55295&&v<57344?(v=65536+(v&1023<<10)|Ae.charCodeAt(++H)&1023,ht(240|v>>>18),ht(128|v>>>12&63),ht(128|v>>>6&63),ht(128|v&63)):(ht(224|v>>>12),ht(128|v>>>6&63),ht(128|v&63))}return m(ke,0,nt)}function un(Ae,ue){var Ee="";if(!ue&&typeof TextDecoder!="undefined")return new TextDecoder().decode(Ae);for(var ke=0;ke<Ae.length;){var nt=Ae[ke++];nt<128||ue?Ee+=String.fromCharCode(nt):nt<224?Ee+=String.fromCharCode((nt&31)<<6|Ae[ke++]&63):nt<240?Ee+=String.fromCharCode((nt&15)<<12|(Ae[ke++]&63)<<6|Ae[ke++]&63):(nt=((nt&15)<<18|(Ae[ke++]&63)<<12|(Ae[ke++]&63)<<6|Ae[ke++]&63)-65536,Ee+=String.fromCharCode(55296|nt>>10,56320|nt&1023))}return Ee}var Zr=function(Ae,ue){return ue+30+it(Ae,ue+26)+it(Ae,ue+28)},kr=function(Ae,ue,Ee){var ke=it(Ae,ue+28),nt=un(Ae.subarray(ue+46,ue+46+ke),!(it(Ae,ue+8)&2048)),ht=ue+46+ke,H=Ee?Pr(Ae,ht):[ut(Ae,ue+20),ut(Ae,ue+24),ut(Ae,ue+42)],f=H[0],v=H[1],k=H[2];return[it(Ae,ue+10),f,v,nt,ht+it(Ae,ue+30)+it(Ae,ue+32),k]},Pr=function(Ae,ue){for(;it(Ae,ue)!=1;ue+=4+it(Ae,ue+2));return[ut(Ae,ue+12),ut(Ae,ue+4),ut(Ae,ue+20)]},qr=function(Ae,ue,Ee,ke,nt,ht,H,f,v,k){var $=ht.length,K=ke.length;dt(Ae,ue,v!=null?33639248:67324752),ue+=4,v!=null&&(Ae[ue]=20,ue+=2),Ae[ue]=20,ue+=2,Ae[ue++]=k==8&&(f.level==1?6:f.level<6?4:f.level==9?2:0),Ae[ue++]=H&&8,Ae[ue]=k,ue+=2;var Te=new Date(f.mtime||Date.now()),Ze=Te.getFullYear()-1980;if(Ze<0||Ze>119)throw"date not in range 1980-2099";dt(Ae,ue,(Ze<<24)*2|Te.getMonth()+1<<21|Te.getDate()<<16|Te.getHours()<<11|Te.getMinutes()<<5|Te.getSeconds()>>>1),ue+=4,dt(Ae,ue,Ee),dt(Ae,ue+4,K),dt(Ae,ue+8,nt),dt(Ae,ue+12,$),ue+=16,v!=null&&(dt(Ae,ue+=10,v),ue+=4),Ae.set(ht,ue),ue+=$,v==null&&Ae.set(ke,ue)},Wr=function(Ae,ue,Ee,ke,nt){dt(Ae,ue,101010256),dt(Ae,ue+8,Ee),dt(Ae,ue+10,Ee),dt(Ae,ue+12,ke),dt(Ae,ue+16,nt)};function cn(Ae,ue,Ee){if(Ee||(Ee=ue,ue={}),typeof Ee!="function")throw"no callback";var ke={};or(Ae,"",ke,ue);var nt=Object.keys(ke),ht=nt.length,H=0,f=0,v=ht,k=new Array(ht),$=[],K=function(){for(var _t=0;_t<$.length;++_t)$[_t]()},Te=function(){var _t=new U(f+22),rt=H,Nt=f-H;f=0;for(var Ot=0;Ot<v;++Ot){var Mt=k[Ot];try{qr(_t,f,Mt.c,Mt.d,Mt.m,Mt.n,Mt.u,Mt.p,null,Mt.t),qr(_t,H,Mt.c,Mt.d,Mt.m,Mt.n,Mt.u,Mt.p,f,Mt.t),H+=46+Mt.n.length,f+=30+Mt.n.length+Mt.d.length}catch(qt){return Ee(qt,null)}}Wr(_t,H,k.length,Nt,rt),Ee(null,_t)};ht||Te();for(var Ze=function(_t){var rt=nt[_t],Nt=ke[rt],Ot=Nt[0],Mt=Nt[1],qt=Fe(),br=Ot.length;qt.p(Ot);var sr=jr(rt),hr=sr.length,$t=Mt.level==0?0:8,Ur=function(Cr,fr){if(Cr)K(),Ee(Cr,null);else{var Fr=fr.length;k[_t]={t:$t,d:fr,m:br,c:qt.d(),u:rt.length!=Fr,n:sr,p:Mt},H+=30+hr+Fr,f+=76+2*hr+Fr,--ht||Te()}};if(sr.length>65535&&Ur("filename too long",null),!$t)Ur(null,Ot);else if(br<16e4)try{Ur(null,_e(Ot,Mt))}catch(Cr){Ur(Cr,null)}else $.push(be(Ot,Mt,Ur))},yt=0;yt<v;++yt)Ze(yt);return K}function Gr(Ae,ue){ue===void 0&&(ue={});var Ee={},ke=[];or(Ae,"",Ee,ue);var nt=0,ht=0;for(var H in Ee){var f=Ee[H],v=f[0],k=f[1],$=k.level==0?0:8,K=jr(H),Te=K.length;if(K.length>65535)throw"filename too long";var Ze=$?_e(v,k):v,yt=Ze.length,_t=Fe();_t.p(v),ke.push({t:$,d:Ze,m:v.length,c:_t.d(),u:H.length!=Te,n:K,o:nt,p:k}),nt+=30+Te+yt,ht+=76+2*Te+yt}for(var rt=new U(ht+22),Nt=nt,Ot=ht-nt,Mt=0;Mt<ke.length;++Mt){var qt=ke[Mt];qr(rt,qt.o,qt.c,qt.d,qt.m,qt.n,qt.u,qt.p,null,qt.t),qr(rt,nt,qt.c,qt.d,qt.m,qt.n,qt.u,qt.p,qt.o,qt.t),nt+=46+qt.n.length}return Wr(rt,nt,ke.length,Ot,Nt),rt}function gn(Ae,ue){if(typeof ue!="function")throw"no callback";for(var Ee=[],ke=function(){for(var Te=0;Te<Ee.length;++Te)Ee[Te]()},nt={},ht=Ae.length-22;ut(Ae,ht)!=101010256;--ht)if(!ht||Ae.length-ht>65558){ue("invalid zip file",null);return}var H=it(Ae,ht+8);H||ue(null,{});var f=H,v=ut(Ae,ht+16),k=v==4294967295;if(k){if(ht=ut(Ae,ht-12),ut(Ae,ht)!=101075792)throw"invalid zip file";f=H=ut(Ae,ht+32),v=ut(Ae,ht+48)}for(var $=function(Te){var Ze=kr(Ae,v,k),yt=Ze[0],_t=Ze[1],rt=Ze[2],Nt=Ze[3],Ot=Ze[4],Mt=Ze[5],qt=Zr(Ae,Mt);v=Ot;var br=function(hr,$t){hr?(ke(),ue(hr,null)):(nt[Nt]=$t,--H||ue(null,nt))};if(!yt)br(null,m(Ae,qt,qt+_t));else if(yt==8){var sr=Ae.subarray(qt,qt+_t);if(_t<32e4)try{br(null,we(sr,new U(rt)))}catch(hr){br(hr,null)}else Ee.push(me(sr,{size:rt},br))}else br("unknown compression type "+yt,null)},K=0;K<f;++K)$(K);return ke}function Mr(Ae){for(var ue={},Ee=Ae.length-22;ut(Ae,Ee)!=101010256;--Ee)if(!Ee||Ae.length-Ee>65558)throw"invalid zip file";var ke=it(Ae,Ee+8);if(!ke)return{};var nt=ut(Ae,Ee+16),ht=nt==4294967295;if(ht){if(Ee=ut(Ae,Ee-12),ut(Ae,Ee)!=101075792)throw"invalid zip file";ke=ut(Ae,Ee+32),nt=ut(Ae,Ee+48)}for(var H=0;H<ke;++H){var f=kr(Ae,nt,ht),v=f[0],k=f[1],$=f[2],K=f[3],Te=f[4],Ze=f[5],yt=Zr(Ae,Ze);if(nt=Te,!v)ue[K]=m(Ae,yt,yt+k);else if(v==8)ue[K]=we(Ae.subarray(yt,yt+k),new U($));else throw"unknown compression type "+v}return ue}},dmUQ:function(It,At,re){"use strict";var ve=re("Ff2n"),J=re("rePB"),U=re("1OyB"),X=re("vuIU"),F=re("Ji7U"),R=re("md7G"),Z=re("foSv"),M=re("q1tI"),N=re.n(M),O=re("TSYQ"),h=re.n(O),b=re("4IlW");function A(o,l){var m=Object.keys(o);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(o);l&&(g=g.filter(function(E){return Object.getOwnPropertyDescriptor(o,E).enumerable})),m.push.apply(m,g)}return m}function a(o){for(var l=1;l<arguments.length;l++){var m=arguments[l]!=null?arguments[l]:{};l%2?A(Object(m),!0).forEach(function(g){Object(J.a)(o,g,m[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(m)):A(Object(m)).forEach(function(g){Object.defineProperty(o,g,Object.getOwnPropertyDescriptor(m,g))})}return o}function r(o){var l=n();return function(){var g=Object(Z.a)(o),E;if(l){var L=Object(Z.a)(this).constructor;E=Reflect.construct(g,arguments,L)}else E=g.apply(this,arguments);return Object(R.a)(this,E)}}function n(){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(o){return!1}}function e(){}function t(o){o.preventDefault()}var i=function(l){return l.replace(/[^\w.-]+/g,"")},s=200,I=600,C=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,_=function(l){return l!=null},x=function(l,m){return m===l||typeof m=="number"&&typeof l=="number"&&isNaN(m)&&isNaN(l)},T=function(o){Object(F.a)(m,o);var l=r(m);function m(g){var E;Object(U.a)(this,m),E=l.call(this,g),E.onKeyDown=function(j){var z=E.props,ee=z.onKeyDown,Q=z.onPressEnter;if(j.keyCode===b.a.UP){var q=E.getRatio(j);E.up(j,q,null),E.stop()}else if(j.keyCode===b.a.DOWN){var ae=E.getRatio(j);E.down(j,ae,null),E.stop()}else j.keyCode===b.a.ENTER&&Q&&Q(j);if(E.recordCursorPosition(),E.lastKeyCode=j.keyCode,ee){for(var ge=arguments.length,pe=new Array(ge>1?ge-1:0),Ne=1;Ne<ge;Ne++)pe[Ne-1]=arguments[Ne];ee.apply(void 0,[j].concat(pe))}},E.onKeyUp=function(j){var z=E.props.onKeyUp;if(E.stop(),E.recordCursorPosition(),z){for(var ee=arguments.length,Q=new Array(ee>1?ee-1:0),q=1;q<ee;q++)Q[q-1]=arguments[q];z.apply(void 0,[j].concat(Q))}},E.onChange=function(j){var z=E.props.onChange;E.state.focused&&(E.inputting=!0),E.rawInput=E.props.parser(E.getValueFromEvent(j)),E.setState({inputValue:E.rawInput}),z(E.toNumber(E.rawInput))},E.onMouseUp=function(){var j=E.props.onMouseUp;E.recordCursorPosition(),j&&j.apply(void 0,arguments)},E.onFocus=function(){var j;E.setState({focused:!0}),(j=E.props).onFocus.apply(j,arguments)},E.onBlur=function(){var j=E.props.onBlur;E.inputting=!1,E.setState({focused:!1});var z=E.getCurrentValidValue(E.state.inputValue),ee=E.setValue(z,e);if(j){var Q=E.input.value,q=E.getInputDisplayValue({focus:!1,value:ee});E.input.value=q&&Number(q),j.apply(void 0,arguments),E.input.value=Q}},E.getRatio=function(j){var z=1;return j.metaKey||j.ctrlKey?z=.1:j.shiftKey&&(z=10),z},E.getFullNum=function(j){return isNaN(j)?j:/e/i.test(String(j))?Number(j).toFixed(18).replace(/\.?0+$/,""):j},E.getPrecision=function(j){if(_(E.props.precision))return E.props.precision;var z=String(j);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var ee=0;return z.indexOf(".")>=0&&(ee=z.length-z.indexOf(".")-1),ee},E.getInputDisplayValue=function(j){var z=j||E.state,ee=z.focused,Q=z.inputValue,q=z.value,ae;ee?ae=Q:ae=E.toPrecisionAsStep(q),ae==null&&(ae="");var ge=E.formatWrapper(ae);return _(E.props.decimalSeparator)&&(ge=ge.toString().replace(".",E.props.decimalSeparator)),ge},E.recordCursorPosition=function(){try{E.cursorStart=E.input.selectionStart,E.cursorEnd=E.input.selectionEnd,E.currentValue=E.input.value,E.cursorBefore=E.input.value.substring(0,E.cursorStart),E.cursorAfter=E.input.value.substring(E.cursorEnd)}catch(j){}},E.restoreByAfter=function(j){if(j===void 0)return!1;var z=E.input.value,ee=z.lastIndexOf(j);if(ee===-1)return!1;var Q=E.cursorBefore.length;return E.lastKeyCode===b.a.DELETE&&E.cursorBefore.charAt(Q-1)===j[0]?(E.fixCaret(Q,Q),!0):ee+j.length===z.length?(E.fixCaret(ee,ee),!0):!1},E.partRestoreByAfter=function(j){return j===void 0?!1:Array.prototype.some.call(j,function(z,ee){var Q=j.substring(ee);return E.restoreByAfter(Q)})},E.isNotCompleteNumber=function(j){return isNaN(j)||j===""||j===null||j&&j.toString().indexOf(".")===j.toString().length-1},E.stop=function(){E.autoStepTimer&&clearTimeout(E.autoStepTimer)},E.down=function(j,z,ee){E.pressingUpOrDown=!0,E.step("down",j,z,ee)},E.up=function(j,z,ee){E.pressingUpOrDown=!0,E.step("up",j,z,ee)},E.saveInput=function(j){E.input=j};var L=g.value;L===void 0&&(L=g.defaultValue),E.state={focused:g.autoFocus};var P=E.getValidValue(E.toNumber(L));return E.state=a(a({},E.state),{},{inputValue:E.toPrecisionAsStep(P),value:P}),E}return Object(X.a)(m,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(E){var L=this.props,P=L.value,j=L.onChange,z=L.max,ee=L.min,Q=this.state.focused;if(E){if(!x(E.value,P)||!x(E.max,z)||!x(E.min,ee)){var q=Q?P:this.getValidValue(P),ae;this.pressingUpOrDown?ae=q:this.inputting?ae=this.rawInput:ae=this.toPrecisionAsStep(q),this.setState({value:q,inputValue:ae})}var ge="value"in this.props?P:this.state.value;"max"in this.props&&E.max!==z&&typeof ge=="number"&&ge>z&&j&&j(z),"min"in this.props&&E.min!==ee&&typeof ge=="number"&&ge<ee&&j&&j(ee)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var pe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===b.a.BACKSPACE?pe=this.cursorStart-1:this.lastKeyCode===b.a.DELETE&&(pe=this.cursorStart):pe=this.input.value.length,this.fixCaret(pe,pe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case b.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case b.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ne){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(E){var L=E;return L===""?L="":this.isNotCompleteNumber(parseFloat(L))?L=this.state.value:L=this.getValidValue(L),this.toNumber(L)}},{key:"getValueFromEvent",value:function(E){var L=E.target.value.trim().replace(/。/g,".");return _(this.props.decimalSeparator)&&(L=L.replace(this.props.decimalSeparator,".")),L}},{key:"getValidValue",value:function(E){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,j=parseFloat(E);return isNaN(j)?E:(j<L&&(j=L),j>P&&(j=P),j)}},{key:"setValue",value:function(E,L){var P=this.props.precision,j=this.isNotCompleteNumber(parseFloat(E))?null:parseFloat(E),z=this.state.value,ee=z===void 0?null:z,Q=this.state.inputValue,q=Q===void 0?null:Q,ae=typeof j=="number"?j.toFixed(P):"".concat(j),ge=j!==ee||ae!=="".concat(q);return"value"in this.props?(q=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:q},L)):this.setState({value:j,inputValue:this.toPrecisionAsStep(E)},L),ge&&this.props.onChange(j),j}},{key:"getMaxPrecision",value:function(E){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.props,j=P.precision,z=P.step;if(_(j))return j;var ee=this.getPrecision(L),Q=this.getPrecision(z),q=this.getPrecision(E);return E?Math.max(q,ee+Q):ee+Q}},{key:"getPrecisionFactor",value:function(E){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=this.getMaxPrecision(E,L);return Math.pow(10,P)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(E){return this.props.formatter?this.props.formatter(E):E}},{key:"toPrecisionAsStep",value:function(E){if(this.isNotCompleteNumber(E)||E==="")return E;var L=Math.abs(this.getMaxPrecision(E));return isNaN(L)?E.toString():Number(E).toFixed(L)}},{key:"toNumber",value:function(E){var L=this.props.precision,P=this.state.focused,j=E&&E.length>16&&P;return this.isNotCompleteNumber(E)||j?E:_(L)?Math.round(E*Math.pow(10,L))/Math.pow(10,L):Number(E)}},{key:"upStep",value:function(E,L){var P=this.props.step,j=this.getPrecisionFactor(E,L),z=Math.abs(this.getMaxPrecision(E,L)),ee=((j*E+j*P*L)/j).toFixed(z);return this.toNumber(ee)}},{key:"downStep",value:function(E,L){var P=this.props.step,j=this.getPrecisionFactor(E,L),z=Math.abs(this.getMaxPrecision(E,L)),ee=((j*E-j*P*L)/j).toFixed(z);return this.toNumber(ee)}},{key:"step",value:function(E,L){var P=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),L&&(L.persist(),L.preventDefault());var ee=this.props;if(ee.disabled)return;var Q=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(Q))return;var q=this["".concat(E,"Step")](Q,j),ae=q>ee.max||q<ee.min;if(q>ee.max?q=ee.max:q<ee.min&&(q=ee.min),this.setValue(q,null),this.setState({focused:!0},function(){P.pressingUpOrDown=!1}),ae)return;this.autoStepTimer=setTimeout(function(){P[E](L,j,!0)},z?s:I)}},{key:"fixCaret",value:function(E,L){if(E===void 0||L===void 0||!this.input||!this.input.value)return;try{var P=this.input.selectionStart,j=this.input.selectionEnd;(E!==P||L!==j)&&this.input.setSelectionRange(E,L)}catch(z){}}},{key:"render",value:function(){var E,L=this.props,P=L.prefixCls,j=L.disabled,z=L.readOnly,ee=L.useTouch,Q=L.autoComplete,q=L.upHandler,ae=L.downHandler,ge=L.className,pe=L.max,Ne=L.min,Fe=L.style,He=L.title,Ke=L.onMouseEnter,Xe=L.onMouseLeave,Ce=L.onMouseOver,ye=L.onMouseOut,Pe=L.required,Et=L.onClick,mt=L.tabIndex,gt=L.type,bt=L.placeholder,oe=L.id,V=L.inputMode,Y=L.pattern,he=L.step,Se=L.maxLength,Ue=L.autoFocus,Ie=L.name,st=L.onPaste,it=L.onInput,ut=Object(ve.a)(L,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),dt=this.state,vt=dt.value,Tt=dt.focused,Me=h()(P,(E={},Object(J.a)(E,ge,!!ge),Object(J.a)(E,"".concat(P,"-disabled"),j),Object(J.a)(E,"".concat(P,"-focused"),Tt),E)),Ye={};Object.keys(ut).forEach(function(we){(we.substr(0,5)==="data-"||we.substr(0,5)==="aria-"||we==="role")&&(Ye[we]=ut[we])});var tt=!z&&!j,at=this.getInputDisplayValue(null),ze=(vt||vt===0)&&(isNaN(vt)||Number(vt)>=pe),qe=(vt||vt===0)&&(isNaN(vt)||Number(vt)<=Ne),Oe=ze||j||z,be=qe||j||z,_e=h()("".concat(P,"-handler"),"".concat(P,"-handler-up"),Object(J.a)({},"".concat(P,"-handler-up-disabled"),Oe)),se=h()("".concat(P,"-handler"),"".concat(P,"-handler-down"),Object(J.a)({},"".concat(P,"-handler-down-disabled"),be)),le=ee?{onTouchStart:Oe?e:this.up,onTouchEnd:this.stop}:{onMouseDown:Oe?e:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},me=ee?{onTouchStart:be?e:this.down,onTouchEnd:this.stop}:{onMouseDown:be?e:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return N.a.createElement("div",{className:Me,style:Fe,title:He,onMouseEnter:Ke,onMouseLeave:Xe,onMouseOver:Ce,onMouseOut:ye,onFocus:function(){return null},onBlur:function(){return null}},N.a.createElement("div",{className:"".concat(P,"-handler-wrap")},N.a.createElement("span",Object.assign({unselectable:"on"},le,{role:"button","aria-label":"Increase Value","aria-disabled":Oe,className:_e}),q||N.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-up-inner"),onClick:t})),N.a.createElement("span",Object.assign({unselectable:"on"},me,{role:"button","aria-label":"Decrease Value","aria-disabled":be,className:se}),ae||N.a.createElement("span",{unselectable:"on",className:"".concat(P,"-handler-down-inner"),onClick:t}))),N.a.createElement("div",{className:"".concat(P,"-input-wrap")},N.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ne,"aria-valuemax":pe,"aria-valuenow":vt,required:Pe,type:gt,placeholder:bt,onPaste:st,onClick:Et,onMouseUp:this.onMouseUp,className:"".concat(P,"-input"),tabIndex:mt,autoComplete:Q,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:e,onKeyUp:tt?this.onKeyUp:e,autoFocus:Ue,maxLength:Se,readOnly:z,disabled:j,max:pe,min:Ne,step:he,name:Ie,title:He,id:oe,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(at),pattern:Y,inputMode:V,onInput:it},Ye))))}}]),m}(N.a.Component);T.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:C,min:-C,step:1,style:{},onChange:e,onKeyDown:e,onPressEnter:e,onFocus:e,onBlur:e,parser:i,required:!1,autoComplete:"off"};var d=T,u=At.a=d},fyJ8:function(It,At,re){"use strict";var ve=re("rePB"),J=re("VTBJ"),U=re("Ff2n"),X=re("U8pU"),F=re("q1tI"),R=re.n(F),Z=re("TSYQ"),M=re.n(Z),N=re("c+Xe"),O=re("sR1s");function h(n){return n&&Object(X.a)(n)==="object"&&!Array.isArray(n)&&!F.isValidElement(n)}function b(n){return typeof n=="string"?!0:Object(N.c)(n)}function A(n,e){var t,i=n.prefixCls,s=n.className,I=n.record,C=n.index,_=n.dataIndex,x=n.render,T=n.children,d=n.component,u=d===void 0?"td":d,o=n.colSpan,l=n.rowSpan,m=n.fixLeft,g=n.fixRight,E=n.firstFixLeft,L=n.lastFixLeft,P=n.firstFixRight,j=n.lastFixRight,z=n.appendNode,ee=n.additionalProps,Q=ee===void 0?{}:ee,q=n.ellipsis,ae=n.align,ge=n.rowType,pe=n.isSticky,Ne="".concat(i,"-cell"),Fe,He;if(T)He=T;else{var Ke=Object(O.b)(I,_);if(He=Ke,x){var Xe=x(Ke,I,C);h(Xe)?(He=Xe.children,Fe=Xe.props):He=Xe}}Object(X.a)(He)==="object"&&!Array.isArray(He)&&!F.isValidElement(He)&&(He=null),q&&(L||P)&&(He=F.createElement("span",{className:"".concat(Ne,"-content")},He));var Ce=Fe||{},ye=Ce.colSpan,Pe=Ce.rowSpan,Et=Ce.style,mt=Ce.className,gt=Object(U.a)(Ce,["colSpan","rowSpan","style","className"]),bt=ye!==void 0?ye:o,oe=Pe!==void 0?Pe:l;if(bt===0||oe===0)return null;var V={},Y=typeof m=="number",he=typeof g=="number";Y&&(V.position="sticky",V.left=m),he&&(V.position="sticky",V.right=g);var Se={};ae&&(Se.textAlign=ae);var Ue,Ie=q===!0?{showTitle:!0}:q;Ie&&(Ie.showTitle||ge==="header")&&(typeof He=="string"||typeof He=="number"?Ue=He.toString():F.isValidElement(He)&&typeof He.props.children=="string"&&(Ue=He.props.children));var st=Object(J.a)(Object(J.a)(Object(J.a)({title:Ue},gt),Q),{},{colSpan:bt&&bt!==1?bt:null,rowSpan:oe&&oe!==1?oe:null,className:M()(Ne,s,(t={},Object(ve.a)(t,"".concat(Ne,"-fix-left"),Y),Object(ve.a)(t,"".concat(Ne,"-fix-left-first"),E),Object(ve.a)(t,"".concat(Ne,"-fix-left-last"),L),Object(ve.a)(t,"".concat(Ne,"-fix-right"),he),Object(ve.a)(t,"".concat(Ne,"-fix-right-first"),P),Object(ve.a)(t,"".concat(Ne,"-fix-right-last"),j),Object(ve.a)(t,"".concat(Ne,"-ellipsis"),q),Object(ve.a)(t,"".concat(Ne,"-with-append"),z),Object(ve.a)(t,"".concat(Ne,"-fix-sticky"),(Y||he)&&pe),t),Q.className,mt),style:Object(J.a)(Object(J.a)(Object(J.a)(Object(J.a)({},Q.style),Se),V),Et),ref:b(u)?e:null});return F.createElement(u,Object.assign({},st),z,He)}var a=F.forwardRef(A);a.displayName="Cell";var r=F.memo(a,function(n,e){return e.shouldCellUpdate?!e.shouldCellUpdate(e.record,n.record):!1});At.a=r},hW8S:function(It,At,re){"use strict";re.d(At,"a",function(){return X}),re.d(At,"c",function(){return F}),re.d(At,"b",function(){return R});var ve=re("VTBJ"),J=re("Ff2n"),U=re("Kwbf"),X="RC_TABLE_INTERNAL_COL_DEFINE";function F(Z){var M=Z.expandable,N=Object(J.a)(Z,["expandable"]);return"expandable"in Z?Object(ve.a)(Object(ve.a)({},N),M):N}function R(Z){return Object.keys(Z).reduce(function(M,N){return(N.substr(0,5)==="data-"||N.substr(0,5)==="aria-")&&(M[N]=Z[N]),M},{})}},ie49:function(It,At,re){It.exports={brief:"brief___29L5W",contentTitle:"contentTitle___2wPLj",content:"content___2MAv3",tips:"tips___3qmPX",antdTable:"antdTable___o4ScH",tableCell:"tableCell___24I9Y",antdModal:"antdModal___1nRWw"}},kHHm:function(It,At,re){"use strict";var ve=re("g9YV"),J=re("wCAj"),U=re("giR+"),X=re("fyUT"),F=re("2qtc"),R=re("kLXV"),Z=re("miYZ"),M=re("tsqr"),N=re("9og8"),O=re("tJVT"),h=re("PpiC"),b=re("5NDa"),A=re("5rEg"),a=re("WmNS"),r=re.n(a),n=re("q1tI"),e=re.n(n),t=re("9kvl"),i=re("6K3P"),s=re.n(i),I=re("5jaM"),C=re.n(I),_=re("PEfE"),x=re.n(_),T=re("1vsH"),d=re("+L6B"),u=re("2/Rp"),o=re("ORPY"),l=re.n(o),m=re("rd/4"),g=re.n(m),E=re("3pxb"),L=re.n(E),P=function(pe){var Ne=pe.createState,Fe=pe.refreshLoading,He=pe.onRefresh,Ke=He===void 0?function(){}:He,Xe=pe.onCreate,Ce=Xe===void 0?function(){}:Xe;return e.a.createElement("div",{className:l.a.sendToClass},Ne?e.a.createElement(e.a.Fragment,null,e.a.createElement("img",{src:g.a,alt:"\u7A7A"}),e.a.createElement("div",null,"\u60A8\u8FD8\u6CA1\u6709\u521B\u5EFA\u6559\u5B66\u8BFE\u5802\uFF0C\u65E0\u6CD5\u5C06\u8BD5\u5377\u53D1\u9001\u81F3\u6559\u5B66\u8BFE\u5802\u3002"),e.a.createElement(u.a,{onClick:Ce,type:"primary",ghost:!0},"\u7ACB\u5373\u521B\u5EFA")):e.a.createElement(e.a.Fragment,null,e.a.createElement("img",{src:L.a,alt:"\u7A7A"}),e.a.createElement("div",null,"\u5DF2\u521B\u5EFA\u6559\u5B66\u8BFE\u5802\uFF1F\u8BF7\u5237\u65B0\u5217\u8868"),e.a.createElement(u.a,{loading:Fe,onClick:Ke,type:"primary",ghost:!0},"\u7ACB\u5373\u5237\u65B0")))},j=P,z=re("9z17"),ee=re("LvDl"),Q=A.a.Search,q=function(pe){var Ne=pe.paperlibrary,Fe=pe.globalSetting,He=pe.loading,Ke=pe.dispatch,Xe=Object(h.a)(pe,["paperlibrary","globalSetting","loading","dispatch"]),Ce=Object(n.useState)(""),ye=Object(O.a)(Ce,2),Pe=ye[0],Et=ye[1],mt=Object(n.useState)([]),gt=Object(O.a)(mt,2),bt=gt[0],oe=gt[1],V=Object(n.useState)([]),Y=Object(O.a)(V,2),he=Y[0],Se=Y[1],Ue=Object(n.useState)(!1),Ie=Object(O.a)(Ue,2),st=Ie[0],it=Ie[1],ut=Object(n.useState)(!0),dt=Object(O.a)(ut,2),vt=dt[0],Tt=dt[1],Me=Object(n.useState)(!0),Ye=Object(O.a)(Me,2),tt=Ye[0],at=Ye[1],ze=Object(n.useState)(!1),qe=Object(O.a)(ze,2),Oe=qe[0],be=qe[1];Object(n.useEffect)(function(){se()},[]);var _e=function(){Se([]),Et(""),se(!0),Ke({type:"paperlibrary/setActionTabs",payload:{}})},se=function(){var ft=Object(N.a)(r.a.mark(function Pt(Yt){var Lt;return r.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return at(!0),Vt.next=3,Ke({type:"paperlibrary/getCourseList",payload:{search:Yt?"":Pe}});case 3:Lt=Vt.sent,Lt&&(oe((Lt==null?void 0:Lt.courses)||[]),Tt(!0),be(!1)),at(!1);case 6:case"end":return Vt.stop()}},Pt)}));return function(Yt){return ft.apply(this,arguments)}}(),le=function(Pt){var Yt=parseInt(Pt);return Object(ee.isNaN)(Yt)?"":Yt},me=function(){var ft=Object(N.a)(r.a.mark(function Pt(){var Yt,Lt,ir;return r.a.wrap(function(rr){for(;;)switch(rr.prev=rr.next){case 0:if(he.length){rr.next=4;break}return M.b.info("\u60A8\u9700\u8981\u521B\u5EFA\u8BFE\u5802\uFF0C\u624D\u80FD\u53D1\u9001"),it(!0),rr.abrupt("return");case 4:return rr.next=6,zt({id:(Yt=Ne.actionTabs)===null||Yt===void 0||((Lt=Yt.params)===null||Lt===void 0)?void 0:Lt.id,course_id:he==null?void 0:he[0],type:"examination_bank"});case 6:ir=rr.sent,ir||we([]);case 8:case"end":return rr.stop()}},Pt)}));return function(){return ft.apply(this,arguments)}}(),we=function(){var ft=Object(N.a)(r.a.mark(function Pt(Yt){var Lt,ir,Vt,rr,cr,ot,Kt,nr,Jt,or,jr,un;return r.a.wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:if((Lt=Ne.actionTabs)!==null&&Lt!==void 0&&(ir=Lt.params)!==null&&ir!==void 0&&(Vt=ir.data)!==null&&Vt!==void 0&&Vt.is_random){kr.next=7;break}return kr.next=3,Ke({type:"paperlibrary/sendToClass",payload:{course_id:he==null?void 0:he[0],id:(rr=Ne.actionTabs)===null||rr===void 0||((cr=rr.params)===null||cr===void 0)?void 0:cr.id,shixuns_info:Yt.map(function(Pr){return{shixun_id:Pr.id,is_copy:Pr.is_copy,is_use:Pr.is_use}})}});case 3:return ot=kr.sent,ot&&ot.status===0&&(Ke({type:"paperlibrary/setActionTabs",payload:{}}),Se([]),Jt=ot==null||((Kt=ot.first_category_url)===null||Kt===void 0||((nr=Kt.split("/"))===null||nr===void 0))?void 0:nr[2],Object(T.S)("/classrooms/".concat(Jt,"/exercise"))),Ct(),kr.abrupt("return");case 7:or=bt.find(function(Pr){return Pr.course_id===(he==null?void 0:he[0])}),jr=1,un=R.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:500,maskClosable:!1,keyboard:!1,cancelButtonProps:{disabled:!1},title:"\u914D\u7F6E\u51FA\u5377\u6570\u91CF",content:e.a.createElement("div",{className:x.a.modalColumn},e.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20 mb10"},e.a.createElement("img",{style:{marginRight:5},src:s.a}),"\u968F\u673A\u7EC4\u5377\u7C7B\u578B\u7684\u8BD5\u5377\u6309\u7167\u51FA\u5377\u6570\u91CF\u5BF9\u6307\u5B9A\u8BFE\u5802\u751F\u6210\u4E0D\u91CD\u590D\u7684\u8BD5\u5377\u3002"),e.a.createElement("div",{style:{paddingLeft:18}},"\u8BFE\u5802\u540D\u79F0: ",or==null?void 0:or.course_name),e.a.createElement("div",{style:{paddingLeft:9},className:x.a.modalRow},e.a.createElement("sup",{className:x.a.sup},"*"),e.a.createElement("span",{style:{flexShrink:0}},"\u968F\u673A\u51FA\u5377\u6570\u91CF\uFF1A"),e.a.createElement(X.a,{parser:le,style:{width:120},placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u6570\u91CF",min:1,defaultValue:jr,onChange:function(qr){jr=qr;var Wr=document.getElementById("model_error");jr<1||jr>50?Wr.style.display="block":Wr.style.display="none"}})),e.a.createElement("div",{style:{display:"none",marginLeft:115},id:"model_error",className:"c-red"},"\u8BF7\u8F93\u51651-50\u4E4B\u95F4\u7684\u6574\u6570")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onCancel:_e,onOk:function(){var Pr=Object(N.a)(r.a.mark(function Wr(){var cn,Gr,gn,Mr;return r.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!(jr<1||jr>50)){ue.next=4;break}return gn=document.getElementById("model_error"),gn.style.display="block",ue.abrupt("return",Promise.reject());case 4:return un.update({cancelButtonProps:{disabled:!0}}),ue.next=7,Ke({type:"paperlibrary/sendToClass",payload:{course_id:he==null?void 0:he[0],id:(cn=Ne.actionTabs)===null||cn===void 0||((Gr=cn.params)===null||Gr===void 0)?void 0:Gr.id,num:jr,shixuns_info:Yt.map(function(Ee){return{shixun_id:Ee.id,is_copy:Ee.is_copy,is_use:Ee.is_use}})}});case 7:Mr=ue.sent,un.update({cancelButtonProps:{disabled:!1}}),Mr&&Mr.status===0&&(R.a.destroyAll(),R.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:500,title:"\u63D0\u793A",content:e.a.createElement("div",{className:x.a.modalColumn},e.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20 mb10"},e.a.createElement("img",{style:{marginRight:5},src:C.a}),"\u751F\u6210\u8BD5\u5377\u6210\u529F\uFF0C\u524D\u5F80\u8BFE\u5802\u53BB\u67E5\u770B\u5427\uFF01")),okText:"\u524D\u5F80\u8BFE\u5802",cancelText:"\u8FD4\u56DE\u8BD5\u5377\u5E93",onCancel:_e,onOk:function(){var ke,nt,ht=Mr==null||((ke=Mr.first_category_url)===null||ke===void 0||((nt=ke.split("/"))===null||nt===void 0))?void 0:nt[2];Object(T.S)("/classrooms/".concat(ht,"/exercise"))}}));case 10:case"end":return ue.stop()}},Wr)}));function qr(){return Pr.apply(this,arguments)}return qr}()});case 10:case"end":return kr.stop()}},Pt)}));return function(Yt){return ft.apply(this,arguments)}}(),We=function(){var ft=Object(N.a)(r.a.mark(function Pt(){return r.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return be(!0),Lt.next=3,se();case 3:case"end":return Lt.stop()}},Pt)}));return function(){return ft.apply(this,arguments)}}(),$e=[{title:"\u8BFE\u5802\u540D\u79F0",dataIndex:"course_name",ellipsis:!0},{title:"\u5206\u73ED\u6570\u91CF",dataIndex:"course_group_count",width:90,ellipsis:!0},{title:"\u5B66\u5458\u4EBA\u6570",dataIndex:"course_member_count",width:90,ellipsis:!0}],pt=Object(z.b)(),Bt=Object(O.a)(pt,4),Rt=Bt[0],Ct=Bt[1],tr=Bt[2],zt=Bt[3];return e.a.createElement("div",null,e.a.createElement(R.a,{centered:!0,keyboard:!1,closable:!1,visible:Ne.actionTabs.key==="Paperlibrary-SendToClass",title:"\u53D1\u9001\u81F3\u8BFE\u5802",maskClosable:!1,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:He["paperlibrary/sendToClass"],width:600,onOk:me,destroyOnClose:!0,onCancel:_e},e.a.createElement("div",{className:x.a.wrap},e.a.createElement("div",{className:x.a.title},e.a.createElement("img",{src:s.a}),"\u9009\u62E9\u7684\u8BD5\u5377\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802\u5E76\u4E3A\u73ED\u7EA7\u5B66\u5458\u751F\u6210\u8003\u8BD5\u8BD5\u5377"),e.a.createElement("div",{className:"mb10"},e.a.createElement(Q,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:Pe,onChange:function(Pt){Et(Pt.target.value),Pt.target.value||se(!0)},onSearch:function(Pt){Et(Pt),se(),Se([])}})),bt.length?e.a.createElement("div",{className:x.a.radioWrap},e.a.createElement(J.a,{rowClassName:x.a.row,bordered:!1,scroll:(bt==null?void 0:bt.length)<=7?{}:{y:350},loading:tt,rowKey:"course_id",pagination:!1,dataSource:bt,columns:$e,onRow:function(Pt){return{onClick:function(Lt){console.log([Pt==null?void 0:Pt.course_id]),Se([Pt==null?void 0:Pt.course_id])}}},rowSelection:{type:"radio",selectedRowKeys:he,onChange:function(Pt){Se(Pt),it(!1)}}})):!Pe&&!tt&&e.a.createElement(j,{createState:vt,refreshLoading:Oe,onRefresh:We,onCreate:function(){Tt(!1),Object(T.S)("/classrooms/new")}}),st&&e.a.createElement("div",{className:x.a.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802"))),e.a.createElement(z.a,{visible:Rt,inPaper:!0,onOk:we,onCancel:Ct,renderData:tr,modalType:"multiple",type:"examination_bank"}))},ae=At.a=Object(t.a)(function(ge){var pe=ge.paperlibrary,Ne=ge.loading,Fe=ge.globalSetting;return{paperlibrary:pe,globalSetting:Fe,loading:Ne.effects}})(q)},"kVK+":function(It,At){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */At.read=function(re,ve,J,U,X){var F,R,Z=X*8-U-1,M=(1<<Z)-1,N=M>>1,O=-7,h=J?X-1:0,b=J?-1:1,A=re[ve+h];for(h+=b,F=A&(1<<-O)-1,A>>=-O,O+=Z;O>0;F=F*256+re[ve+h],h+=b,O-=8);for(R=F&(1<<-O)-1,F>>=-O,O+=U;O>0;R=R*256+re[ve+h],h+=b,O-=8);if(F===0)F=1-N;else{if(F===M)return R?NaN:(A?-1:1)*Infinity;R=R+Math.pow(2,U),F=F-N}return(A?-1:1)*R*Math.pow(2,F-U)},At.write=function(re,ve,J,U,X,F){var R,Z,M,N=F*8-X-1,O=(1<<N)-1,h=O>>1,b=X===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=U?0:F-1,a=U?1:-1,r=ve<0||ve===0&&1/ve<0?1:0;for(ve=Math.abs(ve),isNaN(ve)||ve===Infinity?(Z=isNaN(ve)?1:0,R=O):(R=Math.floor(Math.log(ve)/Math.LN2),ve*(M=Math.pow(2,-R))<1&&(R--,M*=2),R+h>=1?ve+=b/M:ve+=b*Math.pow(2,1-h),ve*M>=2&&(R++,M/=2),R+h>=O?(Z=0,R=O):R+h>=1?(Z=(ve*M-1)*Math.pow(2,X),R=R+h):(Z=ve*Math.pow(2,h-1)*Math.pow(2,X),R=0));X>=8;re[J+A]=Z&255,A+=a,Z/=256,X-=8);for(R=R<<X|Z,N+=X;N>0;re[J+A]=R&255,A+=a,R/=256,N-=8);re[J+A-a]|=r*128}},n6Qo:function(It,At,re){"use strict";re.d(At,"a",function(){return M});var ve=re("q1tI"),J=re("biw7"),U=re("fyJ8");function X(N){var O=N.className,h=N.index,b=N.children,A=N.colSpan,a=N.rowSpan,r=ve.useContext(J.a),n=r.prefixCls,e=r.fixedInfoList,t=e[h];return ve.createElement(U.a,Object.assign({className:O,index:h,component:"td",prefixCls:n,record:null,dataIndex:null,render:function(){return{children:b,props:{colSpan:A,rowSpan:a}}}},t))}function F(N){return ve.createElement("tr",Object.assign({},N))}function R(N){var O=N.children,h=ve.useContext(J.a),b=h.prefixCls;return ve.createElement("tfoot",{className:"".concat(b,"-summary")},O)}var Z=At.b=R,M={Cell:X,Row:F}},ngQI:function(It,At,re){"use strict";re.d(At,"a",function(){return ss}),re.d(At,"b",function(){return fs}),re.d(At,"c",function(){return ms});var ve=re("q1tI"),J=re.n(ve),U=re("dI71"),X=re("wx14"),F=re("ANjH"),R=re("/MKj");function Z(p,w){if(p.length!==w.length)return!1;for(var D=0;D<p.length;D++)if(p[D]!==w[D])return!1;return!0}function M(p,w){var D=Object(ve.useState)(function(){return{inputs:w,result:p()}})[0],G=Object(ve.useRef)(!0),ie=Object(ve.useRef)(D),ne=G.current||Boolean(w&&ie.current.inputs&&Z(w,ie.current.inputs)),ce=ne?ie.current:{inputs:w,result:p()};return Object(ve.useEffect)(function(){G.current=!1,ie.current=ce},[ce]),ce.result}function N(p,w){return M(function(){return p},w)}var O=M,h=N,b=re("9R94"),A=function(w){var D=w.top,G=w.right,ie=w.bottom,ne=w.left,ce=G-ne,de=ie-D,Re={top:D,right:G,bottom:ie,left:ne,width:ce,height:de,x:ne,y:D,center:{x:(G+ne)/2,y:(ie+D)/2}};return Re},a=function(w,D){return{top:w.top-D.top,left:w.left-D.left,bottom:w.bottom+D.bottom,right:w.right+D.right}},r=function(w,D){return{top:w.top+D.top,left:w.left+D.left,bottom:w.bottom-D.bottom,right:w.right-D.right}},n=function(w,D){return{top:w.top+D.y,left:w.left+D.x,bottom:w.bottom+D.y,right:w.right+D.x}},e={top:0,right:0,bottom:0,left:0},t=function(w){var D=w.borderBox,G=w.margin,ie=G===void 0?e:G,ne=w.border,ce=ne===void 0?e:ne,de=w.padding,Re=de===void 0?e:de,Qe=A(a(D,ie)),je=A(r(D,ce)),Le=A(r(je,Re));return{marginBox:Qe,borderBox:A(D),paddingBox:je,contentBox:Le,margin:ie,border:ce,padding:Re}},i=function(w){var D=w.slice(0,-2),G=w.slice(-2);if(G!=="px")return 0;var ie=Number(D);return isNaN(ie)&&Object(b.a)(!1),ie},s=function(){return{x:window.pageXOffset,y:window.pageYOffset}},I=function(w,D){var G=w.borderBox,ie=w.border,ne=w.margin,ce=w.padding,de=n(G,D);return t({borderBox:de,border:ie,margin:ne,padding:ce})},C=function(w,D){return D===void 0&&(D=s()),I(w,D)},_=function(w,D){var G={top:i(D.marginTop),right:i(D.marginRight),bottom:i(D.marginBottom),left:i(D.marginLeft)},ie={top:i(D.paddingTop),right:i(D.paddingRight),bottom:i(D.paddingBottom),left:i(D.paddingLeft)},ne={top:i(D.borderTopWidth),right:i(D.borderRightWidth),bottom:i(D.borderBottomWidth),left:i(D.borderLeftWidth)};return t({borderBox:w,margin:G,padding:ie,border:ne})},x=function(w){var D=w.getBoundingClientRect(),G=window.getComputedStyle(w);return _(D,G)},T=Number.isNaN||function(w){return typeof w=="number"&&w!==w};function d(p,w){return p===w?!0:!!(T(p)&&T(w))}function u(p,w){if(p.length!==w.length)return!1;for(var D=0;D<p.length;D++)if(!d(p[D],w[D]))return!1;return!0}function o(p,w){w===void 0&&(w=u);var D,G=[],ie,ne=!1;function ce(){for(var de=[],Re=0;Re<arguments.length;Re++)de[Re]=arguments[Re];return ne&&D===this&&w(de,G)||(ie=p.apply(this,de),ne=!0,D=this,G=de),ie}return ce}var l=o,m=function(w){var D=[],G=null,ie=function(){for(var ce=arguments.length,de=new Array(ce),Re=0;Re<ce;Re++)de[Re]=arguments[Re];if(D=de,G)return;G=requestAnimationFrame(function(){G=null,w.apply(void 0,D)})};return ie.cancel=function(){if(!G)return;cancelAnimationFrame(G),G=null},ie},g=m,E=re("i8i4"),L=re.n(E),P=!0,j=/[ \t]{2,}/g,z=/^[ \t]*/gm,ee=function(w){return w.replace(j," ").replace(z,"").trim()},Q=function(w){return ee(`
%creact-beautiful-dnd
%c`+ee(w)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},q=function(w){return[Q(w),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},ae="__react-beautiful-dnd-disable-dev-warnings";function ge(p,w){var D;if(P)return;if(typeof window!="undefined"&&window[ae])return;(D=console)[p].apply(D,q(w))}var pe=ge.bind(null,"warn"),Ne=ge.bind(null,"error");function Fe(){}function He(p,w){return Object(X.a)({},p,{},w)}function Ke(p,w,D){var G=w.map(function(ie){var ne=He(D,ie.options);return p.addEventListener(ie.eventName,ie.fn,ne),function(){p.removeEventListener(ie.eventName,ie.fn,ne)}});return function(){G.forEach(function(ne){ne()})}}var Xe=!0,Ce="Invariant failed";function ye(p){this.message=p}ye.prototype.toString=function(){return this.message};function Pe(p,w){if(p)return;throw Xe?new ye(Ce):new ye(Ce+": "+(w||""))}var Et=function(p){Object(U.a)(w,p);function w(){for(var G,ie=arguments.length,ne=new Array(ie),ce=0;ce<ie;ce++)ne[ce]=arguments[ce];return G=p.call.apply(p,[this].concat(ne))||this,G.callbacks=null,G.unbind=Fe,G.onWindowError=function(de){var Re=G.getCallbacks();Re.isDragging()&&Re.tryAbort();var Qe=de.error;Qe instanceof ye&&de.preventDefault()},G.getCallbacks=function(){if(!G.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return G.callbacks},G.setCallbacks=function(de){G.callbacks=de},G}var D=w.prototype;return D.componentDidMount=function(){this.unbind=Ke(window,[{eventName:"error",fn:this.onWindowError}])},D.componentWillUnmount=function(){this.unbind()},D.componentDidCatch=function(ie){if(ie instanceof ye){this.setState({});return}throw ie},D.render=function(){return this.props.children(this.setCallbacks)},w}(J.a.Component),mt=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,gt=function(w){return w+1},bt=function(w){return`
You have lifted an item in position `+gt(w.source.index)+`
`},oe=function(w,D){var G=w.droppableId===D.droppableId,ie=gt(w.index),ne=gt(D.index);return G?`
You have moved the item from position `+ie+`
to position `+ne+`
`:`
You have moved the item from position `+ie+`
in list `+w.droppableId+`
to list `+D.droppableId+`
in position `+ne+`
`},V=function(w,D,G){var ie=D.droppableId===G.droppableId;return ie?`
The item `+w+`
has been combined with `+G.draggableId:`
The item `+w+`
in list `+D.droppableId+`
has been combined with `+G.draggableId+`
in list `+G.droppableId+`
`},Y=function(w){var D=w.destination;if(D)return oe(w.source,D);var G=w.combine;return G?V(w.draggableId,w.source,G):"You are over an area that cannot be dropped on"},he=function(w){return`
The item has returned to its starting position
of `+gt(w.index)+`
`},Se=function(w){if(w.reason==="CANCEL")return`
Movement cancelled.
`+he(w.source)+`
`;var D=w.destination,G=w.combine;return D?`
You have dropped the item.
`+oe(w.source,D)+`
`:G?`
You have dropped the item.
`+V(w.draggableId,w.source,G)+`
`:`
The item has been dropped while not over a drop area.
`+he(w.source)+`
`},Ue={dragHandleUsageInstructions:mt,onDragStart:bt,onDragUpdate:Y,onDragEnd:Se},Ie={x:0,y:0},st=function(w,D){return{x:w.x+D.x,y:w.y+D.y}},it=function(w,D){return{x:w.x-D.x,y:w.y-D.y}},ut=function(w,D){return w.x===D.x&&w.y===D.y},dt=function(w){return{x:w.x!==0?-w.x:0,y:w.y!==0?-w.y:0}},vt=function(w,D,G){var ie;return G===void 0&&(G=0),ie={},ie[w]=D,ie[w==="x"?"y":"x"]=G,ie},Tt=function(w,D){return Math.sqrt(Math.pow(D.x-w.x,2)+Math.pow(D.y-w.y,2))},Me=function(w,D){return Math.min.apply(Math,D.map(function(G){return Tt(w,G)}))},Ye=function(w){return function(D){return{x:w(D.x),y:w(D.y)}}},tt=function(p,w){var D=A({top:Math.max(w.top,p.top),right:Math.min(w.right,p.right),bottom:Math.min(w.bottom,p.bottom),left:Math.max(w.left,p.left)});return D.width<=0||D.height<=0?null:D},at=function(w,D){return{top:w.top+D.y,left:w.left+D.x,bottom:w.bottom+D.y,right:w.right+D.x}},ze=function(w){return[{x:w.left,y:w.top},{x:w.right,y:w.top},{x:w.left,y:w.bottom},{x:w.right,y:w.bottom}]},qe={top:0,right:0,bottom:0,left:0},Oe=function(w,D){return D?at(w,D.scroll.diff.displacement):w},be=function(w,D,G){if(G&&G.increasedBy){var ie;return Object(X.a)({},w,(ie={},ie[D.end]=w[D.end]+G.increasedBy[D.line],ie))}return w},_e=function(w,D){return D&&D.shouldClipSubject?tt(D.pageMarginBox,w):A(w)},se=function(p){var w=p.page,D=p.withPlaceholder,G=p.axis,ie=p.frame,ne=Oe(w.marginBox,ie),ce=be(ne,G,D),de=_e(ce,ie);return{page:w,withPlaceholder:D,active:de}},le=function(p,w){p.frame||Pe(!1);var D=p.frame,G=it(w,D.scroll.initial),ie=dt(G),ne=Object(X.a)({},D,{scroll:{initial:D.scroll.initial,current:w,diff:{value:G,displacement:ie},max:D.scroll.max}}),ce=se({page:p.subject.page,withPlaceholder:p.subject.withPlaceholder,axis:p.axis,frame:ne}),de=Object(X.a)({},p,{frame:ne,subject:ce});return de};function me(p){return Number.isInteger?Number.isInteger(p):typeof p=="number"&&isFinite(p)&&Math.floor(p)===p}function we(p){return Object.values?Object.values(p):Object.keys(p).map(function(w){return p[w]})}function We(p,w){if(p.findIndex)return p.findIndex(w);for(var D=0;D<p.length;D++)if(w(p[D]))return D;return-1}function $e(p,w){if(p.find)return p.find(w);var D=We(p,w);return D!==-1?p[D]:void 0}function pt(p){return Array.prototype.slice.call(p)}var Bt=l(function(p){return p.reduce(function(w,D){return w[D.descriptor.id]=D,w},{})}),Rt=l(function(p){return p.reduce(function(w,D){return w[D.descriptor.id]=D,w},{})}),Ct=l(function(p){return we(p)}),tr=l(function(p){return we(p)}),zt=l(function(p,w){var D=tr(w).filter(function(G){return p===G.descriptor.droppableId}).sort(function(G,ie){return G.descriptor.index-ie.descriptor.index});return D});function ft(p){return p.at&&p.at.type==="REORDER"?p.at.destination:null}function Pt(p){return p.at&&p.at.type==="COMBINE"?p.at.combine:null}var Yt=l(function(p,w){return w.filter(function(D){return D.descriptor.id!==p.descriptor.id})}),Lt=function(p){var w=p.isMovingForward,D=p.draggable,G=p.destination,ie=p.insideDestination,ne=p.previousImpact;if(!G.isCombineEnabled)return null;var ce=ft(ne);if(!ce)return null;function de(xt){var wt={type:"COMBINE",combine:{draggableId:xt,droppableId:G.descriptor.id}};return Object(X.a)({},ne,{at:wt})}var Re=ne.displaced.all,Qe=Re.length?Re[0]:null;if(w)return Qe?de(Qe):null;var je=Yt(D,ie);if(!Qe){if(!je.length)return null;var Le=je[je.length-1];return de(Le.descriptor.id)}var De=We(je,function(xt){return xt.descriptor.id===Qe});De!==-1||Pe(!1);var Ge=De-1;if(Ge<0)return null;var et=je[Ge];return de(et.descriptor.id)},ir=function(p,w){return p.descriptor.droppableId===w.descriptor.id},Vt={point:Ie,value:0},rr={invisible:{},visible:{},all:[]},cr={displaced:rr,displacedBy:Vt,at:null},ot=function(p,w){return function(D){return p<=D&&D<=w}},Kt=function(p){var w=ot(p.top,p.bottom),D=ot(p.left,p.right);return function(G){var ie=w(G.top)&&w(G.bottom)&&D(G.left)&&D(G.right);if(ie)return!0;var ne=w(G.top)||w(G.bottom),ce=D(G.left)||D(G.right),de=ne&&ce;if(de)return!0;var Re=G.top<p.top&&G.bottom>p.bottom,Qe=G.left<p.left&&G.right>p.right,je=Re&&Qe;if(je)return!0;var Le=Re&&ce||Qe&&ne;return Le}},nr=function(p){var w=ot(p.top,p.bottom),D=ot(p.left,p.right);return function(G){var ie=w(G.top)&&w(G.bottom)&&D(G.left)&&D(G.right);return ie}},Jt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},or={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},jr=function(p){return function(w){var D=ot(w.top,w.bottom),G=ot(w.left,w.right);return function(ie){return p===Jt?D(ie.top)&&D(ie.bottom):G(ie.left)&&G(ie.right)}}},un=function(w,D){var G=D.frame?D.frame.scroll.diff.displacement:Ie;return at(w,G)},Zr=function(w,D,G){return D.subject.active?G(D.subject.active)(w):!1},kr=function(w,D,G){return G(D)(w)},Pr=function(w){var D=w.target,G=w.destination,ie=w.viewport,ne=w.withDroppableDisplacement,ce=w.isVisibleThroughFrameFn,de=ne?un(D,G):D;return Zr(de,G,ce)&&kr(de,ie,ce)},qr=function(w){return Pr(Object(X.a)({},w,{isVisibleThroughFrameFn:Kt}))},Wr=function(w){return Pr(Object(X.a)({},w,{isVisibleThroughFrameFn:nr}))},cn=function(w){return Pr(Object(X.a)({},w,{isVisibleThroughFrameFn:jr(w.destination.axis)}))},Gr=function(w,D,G){if(typeof G=="boolean")return G;if(!D)return!0;var ie=D.invisible,ne=D.visible;if(ie[w])return!1;var ce=ne[w];return ce?ce.shouldAnimate:!0};function gn(p,w){var D=p.page.marginBox,G={top:w.point.y,right:0,bottom:0,left:w.point.x};return A(a(D,G))}function Mr(p){var w=p.afterDragging,D=p.destination,G=p.displacedBy,ie=p.viewport,ne=p.forceShouldAnimate,ce=p.last;return w.reduce(function(Re,Qe){var je=gn(Qe,G),Le=Qe.descriptor.id;Re.all.push(Le);var De=qr({target:je,destination:D,viewport:ie,withDroppableDisplacement:!0});if(!De)return Re.invisible[Qe.descriptor.id]=!0,Re;var Ge=Gr(Le,ce,ne),et={draggableId:Le,shouldAnimate:Ge};return Re.visible[Le]=et,Re},{all:[],visible:{},invisible:{}})}function Ae(p,w){if(!p.length)return 0;var D=p[p.length-1].descriptor.index;return w.inHomeList?D:D+1}function ue(p){var w=p.insideDestination,D=p.inHomeList,G=p.displacedBy,ie=p.destination,ne=Ae(w,{inHomeList:D});return{displaced:rr,displacedBy:G,at:{type:"REORDER",destination:{droppableId:ie.descriptor.id,index:ne}}}}function Ee(p){var w=p.draggable,D=p.insideDestination,G=p.destination,ie=p.viewport,ne=p.displacedBy,ce=p.last,de=p.index,Re=p.forceShouldAnimate,Qe=ir(w,G);if(de==null)return ue({insideDestination:D,inHomeList:Qe,displacedBy:ne,destination:G});var je=$e(D,function(xt){return xt.descriptor.index===de});if(!je)return ue({insideDestination:D,inHomeList:Qe,displacedBy:ne,destination:G});var Le=Yt(w,D),De=D.indexOf(je),Ge=Le.slice(De),et=Mr({afterDragging:Ge,destination:G,displacedBy:ne,last:ce,viewport:ie.frame,forceShouldAnimate:Re});return{displaced:et,displacedBy:ne,at:{type:"REORDER",destination:{droppableId:G.descriptor.id,index:de}}}}function ke(p,w){return Boolean(w.effected[p])}var nt=function(p){var w=p.isMovingForward,D=p.destination,G=p.draggables,ie=p.combine,ne=p.afterCritical;if(!D.isCombineEnabled)return null;var ce=ie.draggableId,de=G[ce],Re=de.descriptor.index,Qe=ke(ce,ne);return Qe?w?Re:Re-1:w?Re+1:Re},ht=function(p){var w=p.isMovingForward,D=p.isInHomeList,G=p.insideDestination,ie=p.location;if(!G.length)return null;var ne=ie.index,ce=w?ne+1:ne-1,de=G[0].descriptor.index,Re=G[G.length-1].descriptor.index,Qe=D?Re:Re+1;return ce<de||ce>Qe?null:ce},H=function(p){var w=p.isMovingForward,D=p.isInHomeList,G=p.draggable,ie=p.draggables,ne=p.destination,ce=p.insideDestination,de=p.previousImpact,Re=p.viewport,Qe=p.afterCritical,je=de.at;if(je||Pe(!1),je.type==="REORDER"){var Le=ht({isMovingForward:w,isInHomeList:D,location:je.destination,insideDestination:ce});return Le==null?null:Ee({draggable:G,insideDestination:ce,destination:ne,viewport:Re,last:de.displaced,displacedBy:de.displacedBy,index:Le})}var De=nt({isMovingForward:w,destination:ne,displaced:de.displaced,draggables:ie,combine:je.combine,afterCritical:Qe});return De==null?null:Ee({draggable:G,insideDestination:ce,destination:ne,viewport:Re,last:de.displaced,displacedBy:de.displacedBy,index:De})},f=function(p){var w=p.displaced,D=p.afterCritical,G=p.combineWith,ie=p.displacedBy,ne=Boolean(w.visible[G]||w.invisible[G]);return ke(G,D)?ne?Ie:dt(ie.point):ne?ie.point:Ie},v=function(p){var w=p.afterCritical,D=p.impact,G=p.draggables,ie=Pt(D);ie||Pe(!1);var ne=ie.draggableId,ce=G[ne].page.borderBox.center,de=f({displaced:D.displaced,afterCritical:w,combineWith:ne,displacedBy:D.displacedBy});return st(ce,de)},k=function(w,D){return D.margin[w.start]+D.borderBox[w.size]/2},$=function(w,D){return D.margin[w.end]+D.borderBox[w.size]/2},K=function(w,D,G){return D[w.crossAxisStart]+G.margin[w.crossAxisStart]+G.borderBox[w.crossAxisSize]/2},Te=function(w){var D=w.axis,G=w.moveRelativeTo,ie=w.isMoving;return vt(D.line,G.marginBox[D.end]+k(D,ie),K(D,G.marginBox,ie))},Ze=function(w){var D=w.axis,G=w.moveRelativeTo,ie=w.isMoving;return vt(D.line,G.marginBox[D.start]-$(D,ie),K(D,G.marginBox,ie))},yt=function(w){var D=w.axis,G=w.moveInto,ie=w.isMoving;return vt(D.line,G.contentBox[D.start]+k(D,ie),K(D,G.contentBox,ie))},_t=function(p){var w=p.impact,D=p.draggable,G=p.draggables,ie=p.droppable,ne=p.afterCritical,ce=zt(ie.descriptor.id,G),de=D.page,Re=ie.axis;if(!ce.length)return yt({axis:Re,moveInto:ie.page,isMoving:de});var Qe=w.displaced,je=w.displacedBy,Le=Qe.all[0];if(Le){var De=G[Le];if(ke(Le,ne))return Ze({axis:Re,moveRelativeTo:De.page,isMoving:de});var Ge=I(De.page,je.point);return Ze({axis:Re,moveRelativeTo:Ge,isMoving:de})}var et=ce[ce.length-1];if(et.descriptor.id===D.descriptor.id)return de.borderBox.center;if(ke(et.descriptor.id,ne)){var xt=I(et.page,dt(ne.displacedBy.point));return Te({axis:Re,moveRelativeTo:xt,isMoving:de})}return Te({axis:Re,moveRelativeTo:et.page,isMoving:de})},rt=function(p,w){var D=p.frame;return D?st(w,D.scroll.diff.displacement):w},Nt=function(w){var D=w.impact,G=w.draggable,ie=w.droppable,ne=w.draggables,ce=w.afterCritical,de=G.page.borderBox.center,Re=D.at;return ie&&Re?Re.type==="REORDER"?_t({impact:D,draggable:G,draggables:ne,droppable:ie,afterCritical:ce}):v({impact:D,draggables:ne,afterCritical:ce}):de},Ot=function(p){var w=Nt(p),D=p.droppable,G=D?rt(D,w):w;return G},Mt=function(p,w){var D=it(w,p.scroll.initial),G=dt(D),ie=A({top:w.y,bottom:w.y+p.frame.height,left:w.x,right:w.x+p.frame.width}),ne={frame:ie,scroll:{initial:p.scroll.initial,max:p.scroll.max,current:w,diff:{value:D,displacement:G}}};return ne};function qt(p,w){return p.map(function(D){return w[D]})}function br(p,w){for(var D=0;D<w.length;D++){var G=w[D].visible[p];if(G)return G}return null}var sr=function(p){var w=p.impact,D=p.viewport,G=p.destination,ie=p.draggables,ne=p.maxScrollChange,ce=Mt(D,st(D.scroll.current,ne)),de=G.frame?le(G,st(G.frame.scroll.current,ne)):G,Re=w.displaced,Qe=Mr({afterDragging:qt(Re.all,ie),destination:G,displacedBy:w.displacedBy,viewport:ce.frame,last:Re,forceShouldAnimate:!1}),je=Mr({afterDragging:qt(Re.all,ie),destination:de,displacedBy:w.displacedBy,viewport:D.frame,last:Re,forceShouldAnimate:!1}),Le={},De={},Ge=[Re,Qe,je];Re.all.forEach(function(xt){var wt=br(xt,Ge);if(wt){De[xt]=wt;return}Le[xt]=!0});var et=Object(X.a)({},w,{displaced:{all:Re.all,invisible:Le,visible:De}});return et},hr=function(p,w){return st(p.scroll.diff.displacement,w)},$t=function(p){var w=p.pageBorderBoxCenter,D=p.draggable,G=p.viewport,ie=hr(G,w),ne=it(ie,D.page.borderBox.center);return st(D.client.borderBox.center,ne)},Ur=function(p){var w=p.draggable,D=p.destination,G=p.newPageBorderBoxCenter,ie=p.viewport,ne=p.withDroppableDisplacement,ce=p.onlyOnMainAxis,de=ce===void 0?!1:ce,Re=it(G,w.page.borderBox.center),Qe=at(w.page.borderBox,Re),je={target:Qe,destination:D,withDroppableDisplacement:ne,viewport:ie};return de?cn(je):Wr(je)},Cr=function(p){var w=p.isMovingForward,D=p.draggable,G=p.destination,ie=p.draggables,ne=p.previousImpact,ce=p.viewport,de=p.previousPageBorderBoxCenter,Re=p.previousClientSelection,Qe=p.afterCritical;if(!G.isEnabled)return null;var je=zt(G.descriptor.id,ie),Le=ir(D,G),De=Lt({isMovingForward:w,draggable:D,destination:G,insideDestination:je,previousImpact:ne})||H({isMovingForward:w,isInHomeList:Le,draggable:D,draggables:ie,destination:G,insideDestination:je,previousImpact:ne,viewport:ce,afterCritical:Qe});if(!De)return null;var Ge=Ot({impact:De,draggable:D,droppable:G,draggables:ie,afterCritical:Qe}),et=Ur({draggable:D,destination:G,newPageBorderBoxCenter:Ge,viewport:ce.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(et){var xt=$t({pageBorderBoxCenter:Ge,draggable:D,viewport:ce});return{clientSelection:xt,impact:De,scrollJumpRequest:null}}var wt=it(Ge,de),Dt=sr({impact:De,viewport:ce,destination:G,draggables:ie,maxScrollChange:wt});return{clientSelection:Re,impact:Dt,scrollJumpRequest:wt}},fr=function(w){var D=w.subject.active;return D||Pe(!1),D},Fr=function(p){var w=p.isMovingForward,D=p.pageBorderBoxCenter,G=p.source,ie=p.droppables,ne=p.viewport,ce=G.subject.active;if(!ce)return null;var de=G.axis,Re=ot(ce[de.start],ce[de.end]),Qe=Ct(ie).filter(function(Le){return Le!==G}).filter(function(Le){return Le.isEnabled}).filter(function(Le){return Boolean(Le.subject.active)}).filter(function(Le){return Kt(ne.frame)(fr(Le))}).filter(function(Le){var De=fr(Le);return w?ce[de.crossAxisEnd]<De[de.crossAxisEnd]:De[de.crossAxisStart]<ce[de.crossAxisStart]}).filter(function(Le){var De=fr(Le),Ge=ot(De[de.start],De[de.end]);return Re(De[de.start])||Re(De[de.end])||Ge(ce[de.start])||Ge(ce[de.end])}).sort(function(Le,De){var Ge=fr(Le)[de.crossAxisStart],et=fr(De)[de.crossAxisStart];return w?Ge-et:et-Ge}).filter(function(Le,De,Ge){return fr(Le)[de.crossAxisStart]===fr(Ge[0])[de.crossAxisStart]});if(!Qe.length)return null;if(Qe.length===1)return Qe[0];var je=Qe.filter(function(Le){var De=ot(fr(Le)[de.start],fr(Le)[de.end]);return De(D[de.line])});return je.length===1?je[0]:je.length>1?je.sort(function(Le,De){return fr(Le)[de.start]-fr(De)[de.start]})[0]:Qe.sort(function(Le,De){var Ge=Me(D,ze(fr(Le))),et=Me(D,ze(fr(De)));return Ge!==et?Ge-et:fr(Le)[de.start]-fr(De)[de.start]})[0]},Xr=function(w,D){var G=w.page.borderBox.center;return ke(w.descriptor.id,D)?it(G,D.displacedBy.point):G},Yr=function(w,D){var G=w.page.borderBox;return ke(w.descriptor.id,D)?at(G,dt(D.displacedBy.point)):G},Nr=function(p){var w=p.pageBorderBoxCenter,D=p.viewport,G=p.destination,ie=p.insideDestination,ne=p.afterCritical,ce=ie.filter(function(de){return Wr({target:Yr(de,ne),destination:G,viewport:D.frame,withDroppableDisplacement:!0})}).sort(function(de,Re){var Qe=Tt(w,rt(G,Xr(de,ne))),je=Tt(w,rt(G,Xr(Re,ne)));return Qe<je?-1:je<Qe?1:de.descriptor.index-Re.descriptor.index});return ce[0]||null},Tr=l(function(w,D){var G=D[w.line];return{value:G,point:vt(w.line,G)}}),Hr=function(w,D,G){var ie=w.axis;if(w.descriptor.mode==="virtual")return vt(ie.line,D[ie.line]);var ne=w.subject.page.contentBox[ie.size],ce=zt(w.descriptor.id,G),de=ce.reduce(function(je,Le){return je+Le.client.marginBox[ie.size]},0),Re=de+D[ie.line],Qe=Re-ne;return Qe<=0?null:vt(ie.line,Qe)},Vr=function(w,D){return Object(X.a)({},w,{scroll:Object(X.a)({},w.scroll,{max:D})})},zr=function(w,D,G){var ie=w.frame;ir(D,w)&&Pe(!1),w.subject.withPlaceholder&&Pe(!1);var ne=Tr(w.axis,D.displaceBy).point,ce=Hr(w,ne,G),de={placeholderSize:ne,increasedBy:ce,oldFrameMaxScroll:w.frame?w.frame.scroll.max:null};if(!ie){var Re=se({page:w.subject.page,withPlaceholder:de,axis:w.axis,frame:w.frame});return Object(X.a)({},w,{subject:Re})}var Qe=ce?st(ie.scroll.max,ce):ie.scroll.max,je=Vr(ie,Qe),Le=se({page:w.subject.page,withPlaceholder:de,axis:w.axis,frame:je});return Object(X.a)({},w,{subject:Le,frame:je})},nn=function(w){var D=w.subject.withPlaceholder;D||Pe(!1);var G=w.frame;if(!G){var ie=se({page:w.subject.page,axis:w.axis,frame:null,withPlaceholder:null});return Object(X.a)({},w,{subject:ie})}var ne=D.oldFrameMaxScroll;ne||Pe(!1);var ce=Vr(G,ne),de=se({page:w.subject.page,axis:w.axis,frame:ce,withPlaceholder:null});return Object(X.a)({},w,{subject:de,frame:ce})},en=function(p){var w=p.previousPageBorderBoxCenter,D=p.moveRelativeTo,G=p.insideDestination,ie=p.draggable,ne=p.draggables,ce=p.destination,de=p.viewport,Re=p.afterCritical;if(!D){if(G.length)return null;var Qe={displaced:rr,displacedBy:Vt,at:{type:"REORDER",destination:{droppableId:ce.descriptor.id,index:0}}},je=Ot({impact:Qe,draggable:ie,droppable:ce,draggables:ne,afterCritical:Re}),Le=ir(ie,ce)?ce:zr(ce,ie,ne),De=Ur({draggable:ie,destination:Le,newPageBorderBoxCenter:je,viewport:de.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return De?Qe:null}var Ge=Boolean(w[ce.axis.line]<=D.page.borderBox.center[ce.axis.line]),et=function(){var wt=D.descriptor.index;return D.descriptor.id===ie.descriptor.id||Ge?wt:wt+1}(),xt=Tr(ce.axis,ie.displaceBy);return Ee({draggable:ie,insideDestination:G,destination:ce,viewport:de,displacedBy:xt,last:rr,index:et})},xr=function(p){var w=p.isMovingForward,D=p.previousPageBorderBoxCenter,G=p.draggable,ie=p.isOver,ne=p.draggables,ce=p.droppables,de=p.viewport,Re=p.afterCritical,Qe=Fr({isMovingForward:w,pageBorderBoxCenter:D,source:ie,droppables:ce,viewport:de});if(!Qe)return null;var je=zt(Qe.descriptor.id,ne),Le=Nr({pageBorderBoxCenter:D,viewport:de,destination:Qe,insideDestination:je,afterCritical:Re}),De=en({previousPageBorderBoxCenter:D,destination:Qe,draggable:G,draggables:ne,moveRelativeTo:Le,insideDestination:je,viewport:de,afterCritical:Re});if(!De)return null;var Ge=Ot({impact:De,draggable:G,droppable:Qe,draggables:ne,afterCritical:Re}),et=$t({pageBorderBoxCenter:Ge,draggable:G,viewport:de});return{clientSelection:et,impact:De,scrollJumpRequest:null}},ar=function(p){var w=p.at;return w?w.type==="REORDER"?w.destination.droppableId:w.combine.droppableId:null},er=function(w,D){var G=ar(w);return G?D[G]:null},mr=function(p){var w=p.state,D=p.type,G=er(w.impact,w.dimensions.droppables),ie=Boolean(G),ne=w.dimensions.droppables[w.critical.droppable.id],ce=G||ne,de=ce.axis.direction,Re=de==="vertical"&&(D==="MOVE_UP"||D==="MOVE_DOWN")||de==="horizontal"&&(D==="MOVE_LEFT"||D==="MOVE_RIGHT");if(Re&&!ie)return null;var Qe=D==="MOVE_DOWN"||D==="MOVE_RIGHT",je=w.dimensions.draggables[w.critical.draggable.id],Le=w.current.page.borderBoxCenter,De=w.dimensions,Ge=De.draggables,et=De.droppables;return Re?Cr({isMovingForward:Qe,previousPageBorderBoxCenter:Le,draggable:je,destination:ce,draggables:Ge,viewport:w.viewport,previousClientSelection:w.current.client.selection,previousImpact:w.impact,afterCritical:w.afterCritical}):xr({isMovingForward:Qe,previousPageBorderBoxCenter:Le,draggable:je,isOver:ce,draggables:Ge,droppables:et,viewport:w.viewport,afterCritical:w.afterCritical})};function ur(p){return p.phase==="DRAGGING"||p.phase==="COLLECTING"}function Qr(p){var w=ot(p.top,p.bottom),D=ot(p.left,p.right);return function(ie){return w(ie.y)&&D(ie.x)}}function yr(p,w){return p.left<w.right&&p.right>w.left&&p.top<w.bottom&&p.bottom>w.top}function Rn(p){var w=p.pageBorderBox,D=p.draggable,G=p.candidates,ie=D.page.borderBox.center,ne=G.map(function(ce){var de=ce.axis,Re=vt(ce.axis.line,w.center[de.line],ce.page.borderBox.center[de.crossAxisLine]);return{id:ce.descriptor.id,distance:Tt(ie,Re)}}).sort(function(ce,de){return de.distance-ce.distance});return ne[0]?ne[0].id:null}function Jr(p){var w=p.pageBorderBox,D=p.draggable,G=p.droppables,ie=Ct(G).filter(function(ne){if(!ne.isEnabled)return!1;var ce=ne.subject.active;if(!ce)return!1;if(!yr(w,ce))return!1;if(Qr(ce)(w.center))return!0;var de=ne.axis,Re=ce.center[de.crossAxisLine],Qe=w[de.crossAxisStart],je=w[de.crossAxisEnd],Le=ot(ce[de.crossAxisStart],ce[de.crossAxisEnd]),De=Le(Qe),Ge=Le(je);return!De&&!Ge?!0:De?Qe<Re:je>Re});return ie.length?ie.length===1?ie[0].descriptor.id:Rn({pageBorderBox:w,draggable:D,candidates:ie}):null}var xn=function(w,D){return A(at(w,D))},Dn=function(p,w){var D=p.frame;return D?xn(w,D.scroll.diff.value):w};function Pn(p){var w=p.displaced,D=p.id;return Boolean(w.visible[D]||w.invisible[D])}function Kr(p){var w=p.draggable,D=p.closest,G=p.inHomeList;return D?G&&D.descriptor.index>w.descriptor.index?D.descriptor.index-1:D.descriptor.index:null}var Zi=function(p){var w=p.pageBorderBoxWithDroppableScroll,D=p.draggable,G=p.destination,ie=p.insideDestination,ne=p.last,ce=p.viewport,de=p.afterCritical,Re=G.axis,Qe=Tr(G.axis,D.displaceBy),je=Qe.value,Le=w[Re.start],De=w[Re.end],Ge=Yt(D,ie),et=$e(Ge,function(wt){var Dt=wt.descriptor.id,Ut=wt.page.borderBox.center[Re.line],Xt=ke(Dt,de),Zt=Pn({displaced:ne,id:Dt});return Xt?Zt?De<=Ut:Le<Ut-je:Zt?De<=Ut+je:Le<Ut}),xt=Kr({draggable:D,closest:et,inHomeList:ir(D,G)});return Ee({draggable:D,insideDestination:ie,destination:G,viewport:ce,last:ne,displacedBy:Qe,index:xt})},jn=4,qi=function(p){var w=p.draggable,D=p.pageBorderBoxWithDroppableScroll,G=p.previousImpact,ie=p.destination,ne=p.insideDestination,ce=p.afterCritical;if(!ie.isCombineEnabled)return null;var de=ie.axis,Re=Tr(ie.axis,w.displaceBy),Qe=Re.value,je=D[de.start],Le=D[de.end],De=Yt(w,ne),Ge=$e(De,function(xt){var wt=xt.descriptor.id,Dt=xt.page.borderBox,Ut=Dt[de.size],Xt=Ut/jn,Zt=ke(wt,ce),pr=Pn({displaced:G.displaced,id:wt});return Zt?pr?Le>Dt[de.start]+Xt&&Le<Dt[de.end]-Xt:je>Dt[de.start]-Qe+Xt&&je<Dt[de.end]-Qe-Xt:pr?Le>Dt[de.start]+Qe+Xt&&Le<Dt[de.end]+Qe-Xt:je>Dt[de.start]+Xt&&je<Dt[de.end]-Xt});if(!Ge)return null;var et={displacedBy:Re,displaced:G.displaced,at:{type:"COMBINE",combine:{draggableId:Ge.descriptor.id,droppableId:ie.descriptor.id}}};return et},ea=function(p){var w=p.pageOffset,D=p.draggable,G=p.draggables,ie=p.droppables,ne=p.previousImpact,ce=p.viewport,de=p.afterCritical,Re=xn(D.page.borderBox,w),Qe=Jr({pageBorderBox:Re,draggable:D,droppables:ie});if(!Qe)return cr;var je=ie[Qe],Le=zt(je.descriptor.id,G),De=Dn(je,Re);return qi({pageBorderBoxWithDroppableScroll:De,draggable:D,previousImpact:ne,destination:je,insideDestination:Le,afterCritical:de})||Zi({pageBorderBoxWithDroppableScroll:De,draggable:D,destination:je,insideDestination:Le,last:ne.displaced,viewport:ce,afterCritical:de})},oi=function(p,w){var D;return Object(X.a)({},p,(D={},D[w.descriptor.id]=w,D))},wi=function(w){var D=w.previousImpact,G=w.impact,ie=w.droppables,ne=ar(D),ce=ar(G);if(!ne)return ie;if(ne===ce)return ie;var de=ie[ne];if(!de.subject.withPlaceholder)return ie;var Re=nn(de);return oi(ie,Re)},Sn=function(p){var w=p.draggable,D=p.draggables,G=p.droppables,ie=p.previousImpact,ne=p.impact,ce=wi({previousImpact:ie,impact:ne,droppables:G}),de=ar(ne);if(!de)return ce;var Re=G[de];if(ir(w,Re))return ce;if(Re.subject.withPlaceholder)return ce;var Qe=zr(Re,w,D);return oi(ce,Qe)},Tn=function(p){var w=p.state,D=p.clientSelection,G=p.dimensions,ie=p.viewport,ne=p.impact,ce=p.scrollJumpRequest,de=ie||w.viewport,Re=G||w.dimensions,Qe=D||w.current.client.selection,je=it(Qe,w.initial.client.selection),Le={offset:je,selection:Qe,borderBoxCenter:st(w.initial.client.borderBoxCenter,je)},De={selection:st(Le.selection,de.scroll.current),borderBoxCenter:st(Le.borderBoxCenter,de.scroll.current),offset:st(Le.offset,de.scroll.diff.value)},Ge={client:Le,page:De};if(w.phase==="COLLECTING")return Object(X.a)({phase:"COLLECTING"},w,{dimensions:Re,viewport:de,current:Ge});var et=Re.draggables[w.critical.draggable.id],xt=ne||ea({pageOffset:De.offset,draggable:et,draggables:Re.draggables,droppables:Re.droppables,previousImpact:w.impact,viewport:de,afterCritical:w.afterCritical}),wt=Sn({draggable:et,impact:xt,previousImpact:w.impact,draggables:Re.draggables,droppables:Re.droppables}),Dt=Object(X.a)({},w,{current:Ge,dimensions:{draggables:Re.draggables,droppables:wt},impact:xt,viewport:de,scrollJumpRequest:ce||null,forceShouldAnimate:ce?!1:null});return Dt};function ta(p,w){return p.map(function(D){return w[D]})}var Ci=function(p){var w=p.impact,D=p.viewport,G=p.draggables,ie=p.destination,ne=p.forceShouldAnimate,ce=w.displaced,de=ta(ce.all,G),Re=Mr({afterDragging:de,destination:ie,displacedBy:w.displacedBy,viewport:D.frame,forceShouldAnimate:ne,last:ce});return Object(X.a)({},w,{displaced:Re})},mn=function(p){var w=p.impact,D=p.draggable,G=p.droppable,ie=p.draggables,ne=p.viewport,ce=p.afterCritical,de=Ot({impact:w,draggable:D,draggables:ie,droppable:G,afterCritical:ce});return $t({pageBorderBoxCenter:de,draggable:D,viewport:ne})},Mn=function(p){var w=p.state,D=p.dimensions,G=p.viewport;w.movementMode==="SNAP"||Pe(!1);var ie=w.impact,ne=G||w.viewport,ce=D||w.dimensions,de=ce.draggables,Re=ce.droppables,Qe=de[w.critical.draggable.id],je=ar(ie);je||Pe(!1);var Le=Re[je],De=Ci({impact:ie,viewport:ne,destination:Le,draggables:de}),Ge=mn({impact:De,draggable:Qe,droppable:Le,draggables:de,viewport:ne,afterCritical:w.afterCritical});return Tn({impact:De,clientSelection:Ge,state:w,dimensions:ce,viewport:ne})},qn=function(p){return{index:p.index,droppableId:p.droppableId}},ra=function(p){var w=p.draggable,D=p.home,G=p.draggables,ie=p.viewport,ne=Tr(D.axis,w.displaceBy),ce=zt(D.descriptor.id,G),de=ce.indexOf(w);de!==-1||Pe(!1);var Re=ce.slice(de+1),Qe=Re.reduce(function(Ge,et){return Ge[et.descriptor.id]=!0,Ge},{}),je={inVirtualList:D.descriptor.mode==="virtual",displacedBy:ne,effected:Qe},Le=Mr({afterDragging:Re,destination:D,displacedBy:ne,last:null,viewport:ie.frame,forceShouldAnimate:!1}),De={displaced:Le,displacedBy:ne,at:{type:"REORDER",destination:qn(w.descriptor)}};return{impact:De,afterCritical:je}},na=function(p,w){return{draggables:p.draggables,droppables:oi(p.droppables,w)}},Wn=function(w){},Gn=function(w){},ia=function(p){var w=p.draggable,D=p.offset,G=p.initialWindowScroll,ie=I(w.client,D),ne=C(ie,G),ce=Object(X.a)({},w,{placeholder:Object(X.a)({},w.placeholder,{client:ie}),client:ie,page:ne});return ce},Ti=function(p){var w=p.frame;return w||Pe(!1),w},Fa=function(p){var w=p.additions,D=p.updatedDroppables,G=p.viewport,ie=G.scroll.diff.value;return w.map(function(ne){var ce=ne.descriptor.droppableId,de=D[ce],Re=Ti(de),Qe=Re.scroll.diff.value,je=st(ie,Qe),Le=ia({draggable:ne,offset:je,initialWindowScroll:G.scroll.initial});return Le})},Bi=function(p){var w=p.state,D=p.published;Wn();var G=D.modified.map(function(Xt){var Zt=w.dimensions.droppables[Xt.droppableId],pr=le(Zt,Xt.scroll);return pr}),ie=Object(X.a)({},w.dimensions.droppables,{},Bt(G)),ne=Rt(Fa({additions:D.additions,updatedDroppables:ie,viewport:w.viewport})),ce=Object(X.a)({},w.dimensions.draggables,{},ne);D.removals.forEach(function(Xt){delete ce[Xt]});var de={droppables:ie,draggables:ce},Re=ar(w.impact),Qe=Re?de.droppables[Re]:null,je=de.draggables[w.critical.draggable.id],Le=de.droppables[w.critical.droppable.id],De=ra({draggable:je,home:Le,draggables:ce,viewport:w.viewport}),Ge=De.impact,et=De.afterCritical,xt=Qe&&Qe.isCombineEnabled?w.impact:Ge,wt=ea({pageOffset:w.current.page.offset,draggable:de.draggables[w.critical.draggable.id],draggables:de.draggables,droppables:de.droppables,previousImpact:xt,viewport:w.viewport,afterCritical:et});Gn();var Dt=Object(X.a)({phase:"DRAGGING"},w,{phase:"DRAGGING",impact:wt,onLiftImpact:Ge,dimensions:de,afterCritical:et,forceShouldAnimate:!1});if(w.phase==="COLLECTING")return Dt;var Ut=Object(X.a)({phase:"DROP_PENDING"},Dt,{phase:"DROP_PENDING",reason:w.reason,isWaiting:!1});return Ut},xi=function(w){return w.movementMode==="SNAP"},Si=function(w,D,G){var ie=na(w.dimensions,D);return!xi(w)||G?Tn({state:w,dimensions:ie}):Mn({state:w,dimensions:ie})};function Ii(p){return p.isDragging&&p.movementMode==="SNAP"?Object(X.a)({phase:"DRAGGING"},p,{scrollJumpRequest:null}):p}var Er={phase:"IDLE",completed:null,shouldFlush:!1},vr=function(p,w){if(p===void 0&&(p=Er),w.type==="FLUSH")return Object(X.a)({},Er,{shouldFlush:!0});if(w.type==="INITIAL_PUBLISH"){p.phase==="IDLE"||Pe(!1);var D=w.payload,G=D.critical,ie=D.clientSelection,ne=D.viewport,ce=D.dimensions,de=D.movementMode,Re=ce.draggables[G.draggable.id],Qe=ce.droppables[G.droppable.id],je={selection:ie,borderBoxCenter:Re.client.borderBox.center,offset:Ie},Le={client:je,page:{selection:st(je.selection,ne.scroll.initial),borderBoxCenter:st(je.selection,ne.scroll.initial),offset:st(je.selection,ne.scroll.diff.value)}},De=Ct(ce.droppables).every(function(No){return!No.isFixedOnPage}),Ge=ra({draggable:Re,home:Qe,draggables:ce.draggables,viewport:ne}),et=Ge.impact,xt=Ge.afterCritical,wt={phase:"DRAGGING",isDragging:!0,critical:G,movementMode:de,dimensions:ce,initial:Le,current:Le,isWindowScrollAllowed:De,impact:et,afterCritical:xt,onLiftImpact:et,viewport:ne,scrollJumpRequest:null,forceShouldAnimate:null};return wt}if(w.type==="COLLECTION_STARTING"){if(p.phase==="COLLECTING"||p.phase==="DROP_PENDING")return p;p.phase==="DRAGGING"||Pe(!1);var Dt=Object(X.a)({phase:"COLLECTING"},p,{phase:"COLLECTING"});return Dt}if(w.type==="PUBLISH_WHILE_DRAGGING")return p.phase==="COLLECTING"||p.phase==="DROP_PENDING"||Pe(!1),Bi({state:p,published:w.payload});if(w.type==="MOVE"){if(p.phase==="DROP_PENDING")return p;ur(p)||Pe(!1);var Ut=w.payload.client;return ut(Ut,p.current.client.selection)?p:Tn({state:p,clientSelection:Ut,impact:xi(p)?p.impact:null})}if(w.type==="UPDATE_DROPPABLE_SCROLL"){if(p.phase==="DROP_PENDING")return Ii(p);if(p.phase==="COLLECTING")return Ii(p);ur(p)||Pe(!1);var Xt=w.payload,Zt=Xt.id,pr=Xt.newScroll,Ar=p.dimensions.droppables[Zt];if(!Ar)return p;var Dr=le(Ar,pr);return Si(p,Dr,!1)}if(w.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(p.phase==="DROP_PENDING")return p;ur(p)||Pe(!1);var An=w.payload,_r=An.id,rn=An.isEnabled,hn=p.dimensions.droppables[_r];hn||Pe(!1),hn.isEnabled!==rn||Pe(!1);var yn=Object(X.a)({},hn,{isEnabled:rn});return Si(p,yn,!0)}if(w.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(p.phase==="DROP_PENDING")return p;ur(p)||Pe(!1);var ii=w.payload,Kn=ii.id,vi=ii.isCombineEnabled,zi=p.dimensions.droppables[Kn];zi||Pe(!1),zi.isCombineEnabled!==vi||Pe(!1);var LA=Object(X.a)({},zi,{isCombineEnabled:vi});return Si(p,LA,!0)}if(w.type==="MOVE_BY_WINDOW_SCROLL"){if(p.phase==="DROP_PENDING"||p.phase==="DROP_ANIMATING")return p;ur(p)||Pe(!1),p.isWindowScrollAllowed||Pe(!1);var Lo=w.payload.newScroll;if(ut(p.viewport.scroll.current,Lo))return Ii(p);var Uo=Mt(p.viewport,Lo);return xi(p)?Mn({state:p,viewport:Uo}):Tn({state:p,viewport:Uo})}if(w.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!ur(p))return p;var Ia=w.payload.maxScroll;if(ut(Ia,p.viewport.scroll.max))return p;var UA=Object(X.a)({},p.viewport,{scroll:Object(X.a)({},p.viewport.scroll,{max:Ia})});return Object(X.a)({phase:"DRAGGING"},p,{viewport:UA})}if(w.type==="MOVE_UP"||w.type==="MOVE_DOWN"||w.type==="MOVE_LEFT"||w.type==="MOVE_RIGHT"){if(p.phase==="COLLECTING"||p.phase==="DROP_PENDING")return p;p.phase==="DRAGGING"||Pe(!1);var Oa=mr({state:p,type:w.type});return Oa?Tn({state:p,impact:Oa.impact,clientSelection:Oa.clientSelection,scrollJumpRequest:Oa.scrollJumpRequest}):p}if(w.type==="DROP_PENDING"){var FA=w.payload.reason;p.phase==="COLLECTING"||Pe(!1);var NA=Object(X.a)({phase:"DROP_PENDING"},p,{phase:"DROP_PENDING",isWaiting:!0,reason:FA});return NA}if(w.type==="DROP_ANIMATE"){var vs=w.payload,ys=vs.completed,Es=vs.dropDuration,Fo=vs.newHomeClientOffset;p.phase==="DRAGGING"||p.phase==="DROP_PENDING"||Pe(!1);var PA={phase:"DROP_ANIMATING",completed:ys,dropDuration:Es,newHomeClientOffset:Fo,dimensions:p.dimensions};return PA}if(w.type==="DROP_COMPLETE"){var MA=w.payload.completed;return{phase:"IDLE",completed:MA,shouldFlush:!1}}return p},an=function(w){return{type:"BEFORE_INITIAL_CAPTURE",payload:w}},vn=function(w){return{type:"LIFT",payload:w}},ei=function(w){return{type:"INITIAL_PUBLISH",payload:w}},aa=function(w){return{type:"PUBLISH_WHILE_DRAGGING",payload:w}},Oi=function(){return{type:"COLLECTION_STARTING",payload:null}},Na=function(w){return{type:"UPDATE_DROPPABLE_SCROLL",payload:w}},Pa=function(w){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:w}},Wo=function(w){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:w}},sa=function(w){return{type:"MOVE",payload:w}},_s=function(w){return{type:"MOVE_BY_WINDOW_SCROLL",payload:w}},ws=function(w){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:w}},Ri=function(){return{type:"MOVE_UP",payload:null}},li=function(){return{type:"MOVE_DOWN",payload:null}},Or=function(){return{type:"MOVE_RIGHT",payload:null}},Go=function(){return{type:"MOVE_LEFT",payload:null}},Di=function(){return{type:"FLUSH",payload:null}},Cs=function(w){return{type:"DROP_ANIMATE",payload:w}},Vn=function(w){return{type:"DROP_COMPLETE",payload:w}},In=function(w){return{type:"DROP",payload:w}},Vo=function(w){return{type:"DROP_PENDING",payload:w}},kn=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function sn(p){if(p.length<=1)return;for(var w=p.map(function(de){return de.descriptor.index}),D={},G=1;G<w.length;G++){var ie=w[G],ne=w[G-1];ie!==ne+1&&(D[ie]=!0)}if(!Object.keys(D).length)return;var ce=w.map(function(de){var Re=Boolean(D[de]);return Re?"[\u{1F525}"+de+"]":""+de}).join(", ")}function Ts(p,w){if(!1)var D}var dn=function(p){return function(w){var D=w.getState,G=w.dispatch;return function(ie){return function(ne){if(ne.type!=="LIFT"){ie(ne);return}var ce=ne.payload,de=ce.id,Re=ce.clientSelection,Qe=ce.movementMode,je=D();je.phase==="DROP_ANIMATING"&&G(Vn({completed:je.completed})),D().phase==="IDLE"||Pe(!1),G(Di()),G(an({draggableId:de,movementMode:Qe}));var Le={shouldPublishImmediately:Qe==="SNAP"},De={draggableId:de,scrollOptions:Le},Ge=p.startPublishing(De),et=Ge.critical,xt=Ge.dimensions,wt=Ge.viewport;Ts(et,xt),G(ei({critical:et,dimensions:xt,clientSelection:Re,movementMode:Qe,viewport:wt}))}}}},Ma=function(p){return function(){return function(w){return function(D){D.type==="INITIAL_PUBLISH"&&p.dragging(),D.type==="DROP_ANIMATE"&&p.dropping(D.payload.completed.result.reason),(D.type==="FLUSH"||D.type==="DROP_COMPLETE")&&p.resting(),w(D)}}}},Ln={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Hn={opacity:{drop:0,combining:.7},scale:{drop:.75}},Rr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},zn=Rr.outOfTheWay+"s "+Ln.outOfTheWay,Ai={fluid:"opacity "+zn,snap:"transform "+zn+", opacity "+zn,drop:function(w){var D=w+"s "+Ln.drop;return"transform "+D+", opacity "+D},outOfTheWay:"transform "+zn,placeholder:"height "+zn+", width "+zn+", margin "+zn},ka=function(w){return ut(w,Ie)?null:"translate("+w.x+"px, "+w.y+"px)"},oa={moveTo:ka,drop:function(w,D){var G=ka(w);return G?D?G+" scale("+Hn.scale.drop+")":G:null}},ui=Rr.minDropTime,Ha=Rr.maxDropTime,Bs=Ha-ui,En=1500,Xn=.6,Yn=function(p){var w=p.current,D=p.destination,G=p.reason,ie=Tt(w,D);if(ie<=0)return ui;if(ie>=En)return Ha;var ne=ie/En,ce=ui+Bs*ne,de=G==="CANCEL"?ce*Xn:ce;return Number(de.toFixed(2))},on=function(p){var w=p.impact,D=p.draggable,G=p.dimensions,ie=p.viewport,ne=p.afterCritical,ce=G.draggables,de=G.droppables,Re=ar(w),Qe=Re?de[Re]:null,je=de[D.descriptor.droppableId],Le=mn({impact:w,draggable:D,draggables:ce,afterCritical:ne,droppable:Qe||je,viewport:ie}),De=it(Le,D.client.borderBox.center);return De},Jn=function(p){var w=p.draggables,D=p.reason,G=p.lastImpact,ie=p.home,ne=p.viewport,ce=p.onLiftImpact;if(!G.at||D!=="DROP"){var de=Ci({draggables:w,impact:ce,destination:ie,viewport:ne,forceShouldAnimate:!0});return{impact:de,didDropInsideDroppable:!1}}if(G.at.type==="REORDER")return{impact:G,didDropInsideDroppable:!0};var Re=Object(X.a)({},G,{displaced:rr});return{impact:Re,didDropInsideDroppable:!0}},xs=function(p){var w=p.getState,D=p.dispatch;return function(G){return function(ie){if(ie.type!=="DROP"){G(ie);return}var ne=w(),ce=ie.payload.reason;if(ne.phase==="COLLECTING"){D(Vo({reason:ce}));return}if(ne.phase==="IDLE")return;var de=ne.phase==="DROP_PENDING"&&ne.isWaiting;de&&Pe(!1),ne.phase==="DRAGGING"||ne.phase==="DROP_PENDING"||Pe(!1);var Re=ne.critical,Qe=ne.dimensions,je=Qe.draggables[ne.critical.draggable.id],Le=Jn({reason:ce,lastImpact:ne.impact,afterCritical:ne.afterCritical,onLiftImpact:ne.onLiftImpact,home:ne.dimensions.droppables[ne.critical.droppable.id],viewport:ne.viewport,draggables:ne.dimensions.draggables}),De=Le.impact,Ge=Le.didDropInsideDroppable,et=Ge?ft(De):null,xt=Ge?Pt(De):null,wt={index:Re.draggable.index,droppableId:Re.droppable.id},Dt={draggableId:je.descriptor.id,type:je.descriptor.type,source:wt,reason:ce,mode:ne.movementMode,destination:et,combine:xt},Ut=on({impact:De,draggable:je,dimensions:Qe,viewport:ne.viewport,afterCritical:ne.afterCritical}),Xt={critical:ne.critical,afterCritical:ne.afterCritical,result:Dt,impact:De},Zt=!ut(ne.current.client.offset,Ut)||Boolean(Dt.combine);if(!Zt){D(Vn({completed:Xt}));return}var pr=Yn({current:ne.current.client.offset,destination:Ut,reason:ce}),Ar={newHomeClientOffset:Ut,dropDuration:pr,completed:Xt};D(Cs(Ar))}}},Qa=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Ka(p){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(D){if(D.target!==window&&D.target!==window.document)return;p()}}}function Ss(p){var w=p.onWindowScroll;function D(){w(Qa())}var G=g(D),ie=Ka(G),ne=Fe;function ce(){return ne!==Fe}function de(){ce()&&Pe(!1),ne=Ke(window,[ie])}function Re(){ce()||Pe(!1),G.cancel(),ne(),ne=Fe}return{start:de,stop:Re,isActive:ce}}var zo=function(w){return w.type==="DROP_COMPLETE"||w.type==="DROP_ANIMATE"||w.type==="FLUSH"},Li=function(p){var w=Ss({onWindowScroll:function(G){p.dispatch(_s({newScroll:G}))}});return function(D){return function(G){!w.isActive()&&G.type==="INITIAL_PUBLISH"&&w.start(),w.isActive()&&zo(G)&&w.stop(),D(G)}}},Qn=function(p){var w=!1,D=!1,G=setTimeout(function(){D=!0}),ie=function(ce){if(w)return;if(D)return;w=!0,p(ce),clearTimeout(G)};return ie.wasCalled=function(){return w},ie},Xo=function(){var p=[],w=function(ne){var ce=We(p,function(Qe){return Qe.timerId===ne});ce!==-1||Pe(!1);var de=p.splice(ce,1),Re=de[0];Re.callback()},D=function(ne){var ce=setTimeout(function(){return w(ce)}),de={timerId:ce,callback:ne};p.push(de)},G=function(){if(!p.length)return;var ne=[].concat(p);p.length=0,ne.forEach(function(ce){clearTimeout(ce.timerId),ce.callback()})};return{add:D,flush:G}},Yo=function(w,D){return w==null&&D==null?!0:w==null||D==null?!1:w.droppableId===D.droppableId&&w.index===D.index},la=function(w,D){return w==null&&D==null?!0:w==null||D==null?!1:w.draggableId===D.draggableId&&w.droppableId===D.droppableId},Is=function(w,D){if(w===D)return!0;var G=w.draggable.id===D.draggable.id&&w.draggable.droppableId===D.draggable.droppableId&&w.draggable.type===D.draggable.type&&w.draggable.index===D.draggable.index,ie=w.droppable.id===D.droppable.id&&w.droppable.type===D.droppable.type;return G&&ie},Ui=function(w,D){Wn(),D(),Gn()},Aa=function(w,D){return{draggableId:w.draggable.id,type:w.droppable.type,source:{droppableId:w.droppable.id,index:w.draggable.index},mode:D}},bn=function(w,D,G,ie){if(!w){G(ie(D));return}var ne=Qn(G),ce={announce:ne};w(D,ce),ne.wasCalled()||G(ie(D))},Os=function(p,w){var D=Xo(),G=null,ie=function(De,Ge){G&&Pe(!1),Ui("onBeforeCapture",function(){var et=p().onBeforeCapture;if(et){var xt={draggableId:De,mode:Ge};et(xt)}})},ne=function(De,Ge){G&&Pe(!1),Ui("onBeforeDragStart",function(){var et=p().onBeforeDragStart;et&&et(Aa(De,Ge))})},ce=function(De,Ge){G&&Pe(!1);var et=Aa(De,Ge);G={mode:Ge,lastCritical:De,lastLocation:et.source,lastCombine:null},D.add(function(){Ui("onDragStart",function(){return bn(p().onDragStart,et,w,Ue.onDragStart)})})},de=function(De,Ge){var et=ft(Ge),xt=Pt(Ge);G||Pe(!1);var wt=!Is(De,G.lastCritical);wt&&(G.lastCritical=De);var Dt=!Yo(G.lastLocation,et);Dt&&(G.lastLocation=et);var Ut=!la(G.lastCombine,xt);if(Ut&&(G.lastCombine=xt),!wt&&!Dt&&!Ut)return;var Xt=Object(X.a)({},Aa(De,G.mode),{combine:xt,destination:et});D.add(function(){Ui("onDragUpdate",function(){return bn(p().onDragUpdate,Xt,w,Ue.onDragUpdate)})})},Re=function(){G||Pe(!1),D.flush()},Qe=function(De){G||Pe(!1),G=null,Ui("onDragEnd",function(){return bn(p().onDragEnd,De,w,Ue.onDragEnd)})},je=function(){if(!G)return;var De=Object(X.a)({},Aa(G.lastCritical,G.mode),{combine:null,destination:null,reason:"CANCEL"});Qe(De)};return{beforeCapture:ie,beforeStart:ne,start:ce,update:de,flush:Re,drop:Qe,abort:je}},Jo=function(p,w){var D=Os(p,w);return function(G){return function(ie){return function(ne){if(ne.type==="BEFORE_INITIAL_CAPTURE"){D.beforeCapture(ne.payload.draggableId,ne.payload.movementMode);return}if(ne.type==="INITIAL_PUBLISH"){var ce=ne.payload.critical;D.beforeStart(ce,ne.payload.movementMode),ie(ne),D.start(ce,ne.payload.movementMode);return}if(ne.type==="DROP_COMPLETE"){var de=ne.payload.completed.result;D.flush(),ie(ne),D.drop(de);return}if(ie(ne),ne.type==="FLUSH"){D.abort();return}var Re=G.getState();Re.phase==="DRAGGING"&&D.update(Re.critical,Re.impact)}}}},$o=function(p){return function(w){return function(D){if(D.type!=="DROP_ANIMATION_FINISHED"){w(D);return}var G=p.getState();G.phase==="DROP_ANIMATING"||Pe(!1),p.dispatch(Vn({completed:G.completed}))}}},ua=function(p){var w=null,D=null;function G(){D&&(cancelAnimationFrame(D),D=null),w&&(w(),w=null)}return function(ie){return function(ne){if((ne.type==="FLUSH"||ne.type==="DROP_COMPLETE"||ne.type==="DROP_ANIMATION_FINISHED")&&G(),ie(ne),ne.type!=="DROP_ANIMATE")return;var ce={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Re=p.getState();Re.phase==="DROP_ANIMATING"&&p.dispatch(kn())}};D=requestAnimationFrame(function(){D=null,w=Ke(window,[ce])})}}},Zo=function(p){return function(){return function(w){return function(D){(D.type==="DROP_COMPLETE"||D.type==="FLUSH"||D.type==="DROP_ANIMATE")&&p.stopPublishing(),w(D)}}}},Rs=function(p){var w=!1;return function(){return function(D){return function(G){if(G.type==="INITIAL_PUBLISH"){w=!0,p.tryRecordFocus(G.payload.critical.draggable.id),D(G),p.tryRestoreFocusRecorded();return}if(D(G),!w)return;if(G.type==="FLUSH"){w=!1,p.tryRestoreFocusRecorded();return}if(G.type==="DROP_COMPLETE"){w=!1;var ie=G.payload.completed.result;ie.combine&&p.tryShiftRecord(ie.draggableId,ie.combine.draggableId),p.tryRestoreFocusRecorded()}}}}},Ds=function(w){return w.type==="DROP_COMPLETE"||w.type==="DROP_ANIMATE"||w.type==="FLUSH"},Ls=function(p){return function(w){return function(D){return function(G){if(Ds(G)){p.stop(),D(G);return}if(G.type==="INITIAL_PUBLISH"){D(G);var ie=w.getState();ie.phase==="DRAGGING"||Pe(!1),p.start(ie);return}D(G),p.scroll(w.getState())}}}},Us=function(p){return function(w){return function(D){if(w(D),D.type!=="PUBLISH_WHILE_DRAGGING")return;var G=p.getState();if(G.phase!=="DROP_PENDING")return;if(G.isWaiting)return;p.dispatch(In({reason:G.reason}))}}},Fs=F.d,Ns=function(p){var w=p.dimensionMarshal,D=p.focusMarshal,G=p.styleMarshal,ie=p.getResponders,ne=p.announce,ce=p.autoScroller;return Object(F.e)(vr,Fs(Object(F.a)(Ma(G),Zo(w),dn(w),xs,$o,ua,Us,Ls(ce),Li,Rs(D),Jo(ie,ne))))},ca=function(){return{additions:{},removals:{},modified:{}}};function Ps(p){var w=p.registry,D=p.callbacks,G=ca(),ie=null,ne=function(){if(ie)return;D.collectionStarting(),ie=requestAnimationFrame(function(){ie=null,Wn();var je=G,Le=je.additions,De=je.removals,Ge=je.modified,et=Object.keys(Le).map(function(Dt){return w.draggable.getById(Dt).getDimension(Ie)}).sort(function(Dt,Ut){return Dt.descriptor.index-Ut.descriptor.index}),xt=Object.keys(Ge).map(function(Dt){var Ut=w.droppable.getById(Dt),Xt=Ut.callbacks.getScrollWhileDragging();return{droppableId:Dt,scroll:Xt}}),wt={additions:et,removals:Object.keys(De),modified:xt};G=ca(),Gn(),D.publish(wt)})},ce=function(je){var Le=je.descriptor.id;G.additions[Le]=je,G.modified[je.descriptor.droppableId]=!0,G.removals[Le]&&delete G.removals[Le],ne()},de=function(je){var Le=je.descriptor;G.removals[Le.id]=!0,G.modified[Le.droppableId]=!0,G.additions[Le.id]&&delete G.additions[Le.id],ne()},Re=function(){if(!ie)return;cancelAnimationFrame(ie),ie=null,G=ca()};return{add:ce,remove:de,stop:Re}}var Ms=function(p){var w=p.scrollHeight,D=p.scrollWidth,G=p.height,ie=p.width,ne=it({x:D,y:w},{x:ie,y:G}),ce={x:Math.max(0,ne.x),y:Math.max(0,ne.y)};return ce},Fi=function(){var p=document.documentElement;return p||Pe(!1),p},ks=function(){var p=Fi(),w=Ms({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,width:p.clientWidth,height:p.clientHeight});return w},qo=function(){var p=Qa(),w=ks(),D=p.y,G=p.x,ie=Fi(),ne=ie.clientWidth,ce=ie.clientHeight,de=G+ne,Re=D+ce,Qe=A({top:D,left:G,right:de,bottom:Re}),je={frame:Qe,scroll:{initial:p,current:p,max:w,diff:{value:Ie,displacement:Ie}}};return je},ja=function(p){var w=p.critical,D=p.scrollOptions,G=p.registry;Wn();var ie=qo(),ne=ie.scroll.current,ce=w.droppable,de=G.droppable.getAllByType(ce.type).map(function(Le){return Le.callbacks.getDimensionAndWatchScroll(ne,D)}),Re=G.draggable.getAllByType(w.draggable.type).map(function(Le){return Le.getDimension(ne)}),Qe={draggables:Rt(Re),droppables:Bt(de)};Gn();var je={dimensions:Qe,critical:w,viewport:ie};return je};function Hs(p,w,D){if(D.descriptor.id===w.id)return!1;if(D.descriptor.type!==w.type)return!1;var G=p.droppable.getById(D.descriptor.droppableId);return!(G.descriptor.mode!=="virtual")}var Qs=function(p,w){var D=null,G=Ps({callbacks:{publish:w.publishWhileDragging,collectionStarting:w.collectionStarting},registry:p}),ie=function(Ge,et){if(p.droppable.exists(Ge)||Pe(!1),!D)return;w.updateDroppableIsEnabled({id:Ge,isEnabled:et})},ne=function(Ge,et){if(!D)return;p.droppable.exists(Ge)||Pe(!1),w.updateDroppableIsCombineEnabled({id:Ge,isCombineEnabled:et})},ce=function(Ge,et){if(!D)return;p.droppable.exists(Ge)||Pe(!1),w.updateDroppableScroll({id:Ge,newScroll:et})},de=function(Ge,et){if(!D)return;p.droppable.getById(Ge).callbacks.scroll(et)},Re=function(){if(!D)return;G.stop();var Ge=D.critical.droppable;p.droppable.getAllByType(Ge.type).forEach(function(et){return et.callbacks.dragStopped()}),D.unsubscribe(),D=null},Qe=function(Ge){D||Pe(!1);var et=D.critical.draggable;Ge.type==="ADDITION"&&(Hs(p,et,Ge.value)&&G.add(Ge.value)),Ge.type==="REMOVAL"&&(Hs(p,et,Ge.value)&&G.remove(Ge.value))},je=function(Ge){D&&Pe(!1);var et=p.draggable.getById(Ge.draggableId),xt=p.droppable.getById(et.descriptor.droppableId),wt={draggable:et.descriptor,droppable:xt.descriptor},Dt=p.subscribe(Qe);return D={critical:wt,unsubscribe:Dt},ja({critical:wt,registry:p,scrollOptions:Ge.scrollOptions})},Le={updateDroppableIsEnabled:ie,updateDroppableIsCombineEnabled:ne,scrollDroppable:de,updateDroppableScroll:ce,startPublishing:je,stopPublishing:Re};return Le},Ks=function(p,w){return p.phase==="IDLE"?!0:p.phase!=="DROP_ANIMATING"||p.completed.result.draggableId===w?!1:p.completed.result.reason==="DROP"},el=function(p){window.scrollBy(p.x,p.y)},tl=l(function(p){return Ct(p).filter(function(w){return w.isEnabled?!!w.frame:!1})}),rl=function(w,D){var G=$e(tl(D),function(ie){return ie.frame||Pe(!1),Qr(ie.frame.pageMarginBox)(w)});return G},nl=function(p){var w=p.center,D=p.destination,G=p.droppables;if(D){var ie=G[D];return ie.frame?ie:null}var ne=rl(w,G);return ne},_n={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(w){return Math.pow(w,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},il=function(p,w){var D=p[w.size]*_n.startFromPercentage,G=p[w.size]*_n.maxScrollAtPercentage,ie={startScrollingFrom:D,maxScrollValueAt:G};return ie},js=function(p){var w=p.startOfRange,D=p.endOfRange,G=p.current,ie=D-w;if(ie===0)return 0;var ne=G-w,ce=ne/ie;return ce},ci=1,al=function(p,w){if(p>w.startScrollingFrom)return 0;if(p<=w.maxScrollValueAt)return _n.maxPixelScroll;if(p===w.startScrollingFrom)return ci;var D=js({startOfRange:w.maxScrollValueAt,endOfRange:w.startScrollingFrom,current:p}),G=1-D,ie=_n.maxPixelScroll*_n.ease(G);return Math.ceil(ie)},Ws=_n.durationDampening.accelerateAt,Gs=_n.durationDampening.stopDampeningAt,sl=function(p,w){var D=w,G=Gs,ie=Date.now(),ne=ie-D;if(ne>=Gs)return p;if(ne<Ws)return ci;var ce=js({startOfRange:Ws,endOfRange:G,current:ne}),de=p*_n.ease(ce);return Math.ceil(de)},Ni=function(p){var w=p.distanceToEdge,D=p.thresholds,G=p.dragStartTime,ie=p.shouldUseTimeDampening,ne=al(w,D);return ne===0?0:ie?Math.max(sl(ne,G),ci):ne},Vs=function(p){var w=p.container,D=p.distanceToEdges,G=p.dragStartTime,ie=p.axis,ne=p.shouldUseTimeDampening,ce=il(w,ie),de=D[ie.end]<D[ie.start];return de?Ni({distanceToEdge:D[ie.end],thresholds:ce,dragStartTime:G,shouldUseTimeDampening:ne}):-1*Ni({distanceToEdge:D[ie.start],thresholds:ce,dragStartTime:G,shouldUseTimeDampening:ne})},ol=function(p){var w=p.container,D=p.subject,G=p.proposedScroll,ie=D.height>w.height,ne=D.width>w.width;return!ne&&!ie?G:ne&&ie?null:{x:ne?0:G.x,y:ie?0:G.y}},ll=Ye(function(p){return p===0?0:p}),zs=function(p){var w=p.dragStartTime,D=p.container,G=p.subject,ie=p.center,ne=p.shouldUseTimeDampening,ce={top:ie.y-D.top,right:D.right-ie.x,bottom:D.bottom-ie.y,left:ie.x-D.left},de=Vs({container:D,distanceToEdges:ce,dragStartTime:w,axis:Jt,shouldUseTimeDampening:ne}),Re=Vs({container:D,distanceToEdges:ce,dragStartTime:w,axis:or,shouldUseTimeDampening:ne}),Qe=ll({x:Re,y:de});if(ut(Qe,Ie))return null;var je=ol({container:D,subject:G,proposedScroll:Qe});return je?ut(je,Ie)?null:je:null},da=Ye(function(p){return p===0?0:p>0?1:-1}),Wa=function(){var p=function(D,G){return D<0?D:D>G?D-G:0};return function(w){var D=w.current,G=w.max,ie=w.change,ne=st(D,ie),ce={x:p(ne.x,G.x),y:p(ne.y,G.y)};return ut(ce,Ie)?null:ce}}(),Xs=function(w){var D=w.max,G=w.current,ie=w.change,ne={x:Math.max(G.x,D.x),y:Math.max(G.y,D.y)},ce=da(ie),de=Wa({max:ne,current:G,change:ce});return de?ce.x!==0&&de.x===0?!0:ce.y!==0&&de.y===0:!0},Ga=function(w,D){return Xs({current:w.scroll.current,max:w.scroll.max,change:D})},Al=function(w,D){if(!Ga(w,D))return null;var G=w.scroll.max,ie=w.scroll.current;return Wa({current:ie,max:G,change:D})},di=function(w,D){var G=w.frame;return G?Xs({current:G.scroll.current,max:G.scroll.max,change:D}):!1},ul=function(w,D){var G=w.frame;return G&&di(w,D)?Wa({current:G.scroll.current,max:G.scroll.max,change:D}):null},cl=function(p){var w=p.viewport,D=p.subject,G=p.center,ie=p.dragStartTime,ne=p.shouldUseTimeDampening,ce=zs({dragStartTime:ie,container:w.frame,subject:D,center:G,shouldUseTimeDampening:ne});return ce&&Ga(w,ce)?ce:null},dl=function(p){var w=p.droppable,D=p.subject,G=p.center,ie=p.dragStartTime,ne=p.shouldUseTimeDampening,ce=w.frame;if(!ce)return null;var de=zs({dragStartTime:ie,container:ce.pageMarginBox,subject:D,center:G,shouldUseTimeDampening:ne});return de&&di(w,de)?de:null},Ys=function(p){var w=p.state,D=p.dragStartTime,G=p.shouldUseTimeDampening,ie=p.scrollWindow,ne=p.scrollDroppable,ce=w.current.page.borderBoxCenter,de=w.dimensions.draggables[w.critical.draggable.id],Re=de.page.marginBox;if(w.isWindowScrollAllowed){var Qe=w.viewport,je=cl({dragStartTime:D,viewport:Qe,subject:Re,center:ce,shouldUseTimeDampening:G});if(je){ie(je);return}}var Le=nl({center:ce,destination:ar(w.impact),droppables:w.dimensions.droppables});if(!Le)return;var De=dl({dragStartTime:D,droppable:Le,subject:Re,center:ce,shouldUseTimeDampening:G});De&&ne(Le.descriptor.id,De)},hl=function(p){var w=p.scrollWindow,D=p.scrollDroppable,G=g(w),ie=g(D),ne=null,ce=function(je){ne||Pe(!1);var Le=ne,De=Le.shouldUseTimeDampening,Ge=Le.dragStartTime;Ys({state:je,scrollWindow:G,scrollDroppable:ie,dragStartTime:Ge,shouldUseTimeDampening:De})},de=function(je){Wn(),ne&&Pe(!1);var Le=Date.now(),De=!1,Ge=function(){De=!0};Ys({state:je,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:Ge,scrollDroppable:Ge}),ne={dragStartTime:Le,shouldUseTimeDampening:De},Gn(),De&&ce(je)},Re=function(){if(!ne)return;G.cancel(),ie.cancel(),ne=null};return{start:de,stop:Re,scroll:ce}},fl=function(p){var w=p.move,D=p.scrollDroppable,G=p.scrollWindow,ie=function(Qe,je){var Le=st(Qe.current.client.selection,je);w({client:Le})},ne=function(Qe,je){if(!di(Qe,je))return je;var Le=ul(Qe,je);if(!Le)return D(Qe.descriptor.id,je),null;var De=it(je,Le);D(Qe.descriptor.id,De);var Ge=it(je,De);return Ge},ce=function(Qe,je,Le){if(!Qe)return Le;if(!Ga(je,Le))return Le;var De=Al(je,Le);if(!De)return G(Le),null;var Ge=it(Le,De);G(Ge);var et=it(Le,Ge);return et},de=function(Qe){var je=Qe.scrollJumpRequest;if(!je)return;var Le=ar(Qe.impact);Le||Pe(!1);var De=ne(Qe.dimensions.droppables[Le],je);if(!De)return;var Ge=Qe.viewport,et=ce(Qe.isWindowScrollAllowed,Ge,De);if(!et)return;ie(Qe,et)};return de},pl=function(p){var w=p.scrollDroppable,D=p.scrollWindow,G=p.move,ie=hl({scrollWindow:D,scrollDroppable:w}),ne=fl({move:G,scrollWindow:D,scrollDroppable:w}),ce=function(Qe){if(Qe.phase!=="DRAGGING")return;if(Qe.movementMode==="FLUID"){ie.scroll(Qe);return}if(!Qe.scrollJumpRequest)return;ne(Qe)},de={scroll:ce,start:ie.start,stop:ie.stop};return de},hi="data-rbd",fi=function(){var p=hi+"-drag-handle";return{base:p,draggableId:p+"-draggable-id",contextId:p+"-context-id"}}(),Va=function(){var p=hi+"-draggable";return{base:p,contextId:p+"-context-id",id:p+"-id"}}(),ha=function(){var p=hi+"-droppable";return{base:p,contextId:p+"-context-id",id:p+"-id"}}(),Js={contextId:hi+"-scroll-container-context-id"},gl=function(w){return function(D){return"["+D+'="'+w+'"]'}},pi=function(w,D){return w.map(function(G){var ie=G.styles[D];return ie?G.selector+" { "+ie+" }":""}).join(" ")},ml="pointer-events: none;",vl=function(p){var w=gl(p),D=function(){var de=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:w(fi.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:de,dragging:ml,dropAnimating:de}}}(),G=function(){var de=`
transition: `+Ai.outOfTheWay+`;
`;return{selector:w(Va.contextId),styles:{dragging:de,dropAnimating:de,userCancel:de}}}(),ie={selector:w(ha.contextId),styles:{always:"overflow-anchor: none;"}},ne={selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
`}},ce=[G,D,ie,ne];return{always:pi(ce,"always"),resting:pi(ce,"resting"),dragging:pi(ce,"dragging"),dropAnimating:pi(ce,"dropAnimating"),userCancel:pi(ce,"userCancel")}},pn=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?ve.useLayoutEffect:ve.useEffect,gi=function(){var w=document.querySelector("head");return w||Pe(!1),w},$s=function(w){var D=document.createElement("style");return w&&D.setAttribute("nonce",w),D.type="text/css",D};function yl(p,w){var D=O(function(){return vl(p)},[p]),G=Object(ve.useRef)(null),ie=Object(ve.useRef)(null),ne=h(l(function(Le){var De=ie.current;De||Pe(!1),De.textContent=Le}),[]),ce=h(function(Le){var De=G.current;De||Pe(!1),De.textContent=Le},[]);pn(function(){!G.current&&!ie.current||Pe(!1);var Le=$s(w),De=$s(w);return G.current=Le,ie.current=De,Le.setAttribute(hi+"-always",p),De.setAttribute(hi+"-dynamic",p),gi().appendChild(Le),gi().appendChild(De),ce(D.always),ne(D.resting),function(){var Ge=function(xt){var wt=xt.current;wt||Pe(!1),gi().removeChild(wt),xt.current=null};Ge(G),Ge(ie)}},[w,ce,ne,D.always,D.resting,p]);var de=h(function(){return ne(D.dragging)},[ne,D.dragging]),Re=h(function(Le){if(Le==="DROP"){ne(D.dropAnimating);return}ne(D.userCancel)},[ne,D.dropAnimating,D.userCancel]),Qe=h(function(){if(!ie.current)return;ne(D.resting)},[ne,D.resting]),je=O(function(){return{dragging:de,dropping:Re,resting:Qe}},[de,Re,Qe]);return je}var Zs=function(p){return p&&p.ownerDocument?p.ownerDocument.defaultView:window};function Pi(p){return p instanceof Zs(p).HTMLElement}function qs(p,w){var D="["+fi.contextId+'="'+p+'"]',G=pt(document.querySelectorAll(D));if(!G.length)return null;var ie=$e(G,function(ne){return ne.getAttribute(fi.draggableId)===w});return ie&&Pi(ie)?ie:null}function El(p){var w=Object(ve.useRef)({}),D=Object(ve.useRef)(null),G=Object(ve.useRef)(null),ie=Object(ve.useRef)(!1),ne=h(function(De,Ge){var et={id:De,focus:Ge};return w.current[De]=et,function(){var wt=w.current,Dt=wt[De];Dt!==et&&delete wt[De]}},[]),ce=h(function(De){var Ge=qs(p,De);Ge&&Ge!==document.activeElement&&Ge.focus()},[p]),de=h(function(De,Ge){D.current===De&&(D.current=Ge)},[]),Re=h(function(){if(G.current)return;if(!ie.current)return;G.current=requestAnimationFrame(function(){G.current=null;var De=D.current;De&&ce(De)})},[ce]),Qe=h(function(De){D.current=null;var Ge=document.activeElement;if(!Ge)return;if(Ge.getAttribute(fi.draggableId)!==De)return;D.current=De},[]);pn(function(){return ie.current=!0,function(){ie.current=!1;var De=G.current;De&&cancelAnimationFrame(De)}},[]);var je=O(function(){return{register:ne,tryRecordFocus:Qe,tryRestoreFocusRecorded:Re,tryShiftRecord:de}},[ne,Qe,Re,de]);return je}function fa(){var p={draggables:{},droppables:{}},w=[];function D(Le){return w.push(Le),function(){var Ge=w.indexOf(Le);if(Ge===-1)return;w.splice(Ge,1)}}function G(Le){w.length&&w.forEach(function(De){return De(Le)})}function ie(Le){return p.draggables[Le]||null}function ne(Le){var De=ie(Le);return De||Pe(!1),De}var ce={register:function(De){p.draggables[De.descriptor.id]=De,G({type:"ADDITION",value:De})},update:function(De,Ge){var et=p.draggables[Ge.descriptor.id];if(!et)return;if(et.uniqueId!==De.uniqueId)return;delete p.draggables[Ge.descriptor.id],p.draggables[De.descriptor.id]=De},unregister:function(De){var Ge=De.descriptor.id,et=ie(Ge);if(!et)return;if(De.uniqueId!==et.uniqueId)return;delete p.draggables[Ge],G({type:"REMOVAL",value:De})},getById:ne,findById:ie,exists:function(De){return Boolean(ie(De))},getAllByType:function(De){return we(p.draggables).filter(function(Ge){return Ge.descriptor.type===De})}};function de(Le){return p.droppables[Le]||null}function Re(Le){var De=de(Le);return De||Pe(!1),De}var Qe={register:function(De){p.droppables[De.descriptor.id]=De},unregister:function(De){var Ge=de(De.descriptor.id);if(!Ge)return;if(De.uniqueId!==Ge.uniqueId)return;delete p.droppables[De.descriptor.id]},getById:Re,findById:de,exists:function(De){return Boolean(de(De))},getAllByType:function(De){return we(p.droppables).filter(function(Ge){return Ge.descriptor.type===De})}};function je(){p.draggables={},p.droppables={},w.length=0}return{draggable:ce,droppable:Qe,subscribe:D,clean:je}}function bl(){var p=O(fa,[]);return Object(ve.useEffect)(function(){return function(){requestAnimationFrame(p.clean)}},[p]),p}var za=J.a.createContext(null),Mi=function(){var p=document.body;return p||Pe(!1),p},_l={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},wl=function(w){return"rbd-announcement-"+w};function Cl(p){var w=O(function(){return wl(p)},[p]),D=Object(ve.useRef)(null);Object(ve.useEffect)(function(){var ne=document.createElement("div");return D.current=ne,ne.id=w,ne.setAttribute("aria-live","assertive"),ne.setAttribute("aria-atomic","true"),Object(X.a)(ne.style,_l),Mi().appendChild(ne),function(){setTimeout(function(){var Re=Mi();Re.contains(ne)&&Re.removeChild(ne),ne===D.current&&(D.current=null)})}},[w]);var G=h(function(ie){var ne=D.current;if(ne){ne.textContent=ie;return}},[]);return G}var eo=0,Tl={separator:"::"};function Bl(){eo=0}function Xa(p,w){return w===void 0&&(w=Tl),O(function(){return""+p+w.separator+eo++},[w.separator,p])}function xl(p){var w=p.contextId,D=p.uniqueId;return"rbd-hidden-text-"+w+"-"+D}function Sl(p){var w=p.contextId,D=p.text,G=Xa("hidden-text",{separator:"-"}),ie=O(function(){return xl({contextId:w,uniqueId:G})},[G,w]);return Object(ve.useEffect)(function(){var ce=document.createElement("div");return ce.id=ie,ce.textContent=D,ce.style.display="none",Mi().appendChild(ce),function(){var Re=Mi();Re.contains(ce)&&Re.removeChild(ce)}},[ie,D]),ie}var ki=J.a.createContext(null),Il={react:"^16.8.5","react-dom":"^16.8.5"},Ol=/(\d+)\.(\d+)\.(\d+)/,to=function(w){var D=Ol.exec(w);D!=null||Pe(!1);var G=Number(D[1]),ie=Number(D[2]),ne=Number(D[3]);return{major:G,minor:ie,patch:ne,raw:w}},Hi=function(w,D){return D.major>w.major?!0:D.major<w.major?!1:D.minor>w.minor?!0:D.minor<w.minor?!1:D.patch>=w.patch},Rl=function(p,w){var D=to(p),G=to(w);if(Hi(D,G))return},jA=`
We expect a html5 doctype: <!doctype html>
This is to ensure consistent browser layout and measurement
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
`,ro=function(p){var w=p.doctype;if(!w)return;w.name.toLowerCase()!=="html",w.publicId!==""};function Ya(p){}function Qi(p,w){Ya(function(){Object(ve.useEffect)(function(){try{p()}catch(D){Ne(`
A setup problem was encountered.
> `+D.message+`
`)}},w)})}function Dl(){Qi(function(){Rl(Il.react,J.a.version),ro(document)},[])}function Ja(p){var w=Object(ve.useRef)(p);return Object(ve.useEffect)(function(){w.current=p}),w}function Ll(){var p=null;function w(){return Boolean(p)}function D(ce){return ce===p}function G(ce){p&&Pe(!1);var de={abandon:ce};return p=de,de}function ie(){p||Pe(!1),p=null}function ne(){p&&(p.abandon(),ie())}return{isClaimed:w,isActive:D,claim:G,release:ie,tryAbandon:ne}}var Ul=9,Fl=13,$a=27,tn=32,Nl=33,Pl=34,Ml=35,kl=36,Hl=37,no=38,Ql=39,Kl=40,pa,jl=(pa={},pa[Fl]=!0,pa[Ul]=!0,pa),io=function(p){jl[p.keyCode]&&p.preventDefault()},ga=function(){var p="visibilitychange";if(typeof document=="undefined")return p;var w=[p,"ms"+p,"webkit"+p,"moz"+p,"o"+p],D=$e(w,function(G){return"on"+G in document});return D||p}(),Za=0,kt=5;function Wl(p,w){return Math.abs(w.x-p.x)>=kt||Math.abs(w.y-p.y)>=kt}var ao={type:"IDLE"};function qa(p){var w=p.cancel,D=p.completed,G=p.getPhase,ie=p.setPhase;return[{eventName:"mousemove",fn:function(ce){var de=ce.button,Re=ce.clientX,Qe=ce.clientY;if(de!==Za)return;var je={x:Re,y:Qe},Le=G();if(Le.type==="DRAGGING"){ce.preventDefault(),Le.actions.move(je);return}Le.type==="PENDING"||Pe(!1);var De=Le.point;if(!Wl(De,je))return;ce.preventDefault();var Ge=Le.actions.fluidLift(je);ie({type:"DRAGGING",actions:Ge})}},{eventName:"mouseup",fn:function(ce){var de=G();if(de.type!=="DRAGGING"){w();return}ce.preventDefault(),de.actions.drop({shouldBlockNextClick:!0}),D()}},{eventName:"mousedown",fn:function(ce){G().type==="DRAGGING"&&ce.preventDefault(),w()}},{eventName:"keydown",fn:function(ce){var de=G();if(de.type==="PENDING"){w();return}if(ce.keyCode===$a){ce.preventDefault(),w();return}io(ce)}},{eventName:"resize",fn:w},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){G().type==="PENDING"&&w()}},{eventName:"webkitmouseforcedown",fn:function(ce){var de=G();if(de.type!=="IDLE"||Pe(!1),de.actions.shouldRespectForcePress()){w();return}ce.preventDefault()}},{eventName:ga,fn:w}]}function Un(p){var w=Object(ve.useRef)(ao),D=Object(ve.useRef)(Fe),G=O(function(){return{eventName:"mousedown",fn:function(Le){if(Le.defaultPrevented)return;if(Le.button!==Za)return;if(Le.ctrlKey||Le.metaKey||Le.shiftKey||Le.altKey)return;var De=p.findClosestDraggableId(Le);if(!De)return;var Ge=p.tryGetLock(De,ce,{sourceEvent:Le});if(!Ge)return;Le.preventDefault();var et={x:Le.clientX,y:Le.clientY};D.current(),Qe(Ge,et)}}},[p]),ie=O(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(Le){if(Le.defaultPrevented)return;var De=p.findClosestDraggableId(Le);if(!De)return;var Ge=p.findOptionsForDraggable(De);if(!Ge)return;if(Ge.shouldRespectForcePress)return;if(!p.canGetLock(De))return;Le.preventDefault()}}},[p]),ne=h(function(){var Le={passive:!1,capture:!0};D.current=Ke(window,[ie,G],Le)},[ie,G]),ce=h(function(){var je=w.current;if(je.type==="IDLE")return;w.current=ao,D.current(),ne()},[ne]),de=h(function(){var je=w.current;ce(),je.type==="DRAGGING"&&je.actions.cancel({shouldBlockNextClick:!0}),je.type==="PENDING"&&je.actions.abort()},[ce]),Re=h(function(){var Le={capture:!0,passive:!1},De=qa({cancel:de,completed:ce,getPhase:function(){return w.current},setPhase:function(et){w.current=et}});D.current=Ke(window,De,Le)},[de,ce]),Qe=h(function(Le,De){w.current.type==="IDLE"||Pe(!1),w.current={type:"PENDING",point:De,actions:Le},Re()},[Re]);pn(function(){return ne(),function(){D.current()}},[ne])}var mi;function so(){}var Ki=(mi={},mi[Pl]=!0,mi[Nl]=!0,mi[kl]=!0,mi[Ml]=!0,mi);function ma(p,w){function D(){w(),p.cancel()}function G(){w(),p.drop()}return[{eventName:"keydown",fn:function(ne){if(ne.keyCode===$a){ne.preventDefault(),D();return}if(ne.keyCode===tn){ne.preventDefault(),G();return}if(ne.keyCode===Kl){ne.preventDefault(),p.moveDown();return}if(ne.keyCode===no){ne.preventDefault(),p.moveUp();return}if(ne.keyCode===Ql){ne.preventDefault(),p.moveRight();return}if(ne.keyCode===Hl){ne.preventDefault(),p.moveLeft();return}if(Ki[ne.keyCode]){ne.preventDefault();return}io(ne)}},{eventName:"mousedown",fn:D},{eventName:"mouseup",fn:D},{eventName:"click",fn:D},{eventName:"touchstart",fn:D},{eventName:"resize",fn:D},{eventName:"wheel",fn:D,options:{passive:!0}},{eventName:ga,fn:D}]}function Gl(p){var w=Object(ve.useRef)(so),D=O(function(){return{eventName:"keydown",fn:function(ne){if(ne.defaultPrevented)return;if(ne.keyCode!==tn)return;var ce=p.findClosestDraggableId(ne);if(!ce)return;var de=p.tryGetLock(ce,je,{sourceEvent:ne});if(!de)return;ne.preventDefault();var Re=!0,Qe=de.snapLift();w.current();function je(){Re||Pe(!1),Re=!1,w.current(),G()}w.current=Ke(window,ma(Qe,je),{capture:!0,passive:!1})}}},[p]),G=h(function(){var ne={passive:!1,capture:!0};w.current=Ke(window,[D],ne)},[D]);pn(function(){return G(),function(){w.current()}},[G])}var es={type:"IDLE"},Vl=120,ti=.15;function ts(p){var w=p.cancel,D=p.getPhase;return[{eventName:"orientationchange",fn:w},{eventName:"resize",fn:w},{eventName:"contextmenu",fn:function(ie){ie.preventDefault()}},{eventName:"keydown",fn:function(ie){if(D().type!=="DRAGGING"){w();return}ie.keyCode===$a&&ie.preventDefault(),w()}},{eventName:ga,fn:w}]}function rs(p){var w=p.cancel,D=p.completed,G=p.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(ne){var ce=G();if(ce.type!=="DRAGGING"){w();return}ce.hasMoved=!0;var de=ne.touches[0],Re=de.clientX,Qe=de.clientY,je={x:Re,y:Qe};ne.preventDefault(),ce.actions.move(je)}},{eventName:"touchend",fn:function(ne){var ce=G();if(ce.type!=="DRAGGING"){w();return}ne.preventDefault(),ce.actions.drop({shouldBlockNextClick:!0}),D()}},{eventName:"touchcancel",fn:function(ne){if(G().type!=="DRAGGING"){w();return}ne.preventDefault(),w()}},{eventName:"touchforcechange",fn:function(ne){var ce=G();ce.type!=="IDLE"||Pe(!1);var de=ne.touches[0];if(!de)return;var Re=de.force>=ti;if(!Re)return;var Qe=ce.actions.shouldRespectForcePress();if(ce.type==="PENDING"){Qe&&w();return}if(Qe){if(ce.hasMoved){ne.preventDefault();return}w();return}ne.preventDefault()}},{eventName:ga,fn:w}]}function zl(p){var w=Object(ve.useRef)(es),D=Object(ve.useRef)(Fe),G=h(function(){return w.current},[]),ie=h(function(Ge){w.current=Ge},[]),ne=O(function(){return{eventName:"touchstart",fn:function(Ge){if(Ge.defaultPrevented)return;var et=p.findClosestDraggableId(Ge);if(!et)return;var xt=p.tryGetLock(et,de,{sourceEvent:Ge});if(!xt)return;var wt=Ge.touches[0],Dt=wt.clientX,Ut=wt.clientY,Xt={x:Dt,y:Ut};D.current(),Le(xt,Xt)}}},[p]),ce=h(function(){var Ge={capture:!0,passive:!1};D.current=Ke(window,[ne],Ge)},[ne]),de=h(function(){var De=w.current;if(De.type==="IDLE")return;De.type==="PENDING"&&clearTimeout(De.longPressTimerId),ie(es),D.current(),ce()},[ce,ie]),Re=h(function(){var De=w.current;de(),De.type==="DRAGGING"&&De.actions.cancel({shouldBlockNextClick:!0}),De.type==="PENDING"&&De.actions.abort()},[de]),Qe=h(function(){var Ge={capture:!0,passive:!1},et={cancel:Re,completed:de,getPhase:G},xt=Ke(window,rs(et),Ge),wt=Ke(window,ts(et),Ge);D.current=function(){xt(),wt()}},[Re,G,de]),je=h(function(){var Ge=G();Ge.type==="PENDING"||Pe(!1);var et=Ge.actions.fluidLift(Ge.point);ie({type:"DRAGGING",actions:et,hasMoved:!1})},[G,ie]),Le=h(function(Ge,et){G().type==="IDLE"||Pe(!1);var xt=setTimeout(je,Vl);ie({type:"PENDING",point:et,actions:Ge,longPressTimerId:xt}),Qe()},[Qe,G,ie,je]);pn(function(){return ce(),function(){D.current();var et=G();et.type==="PENDING"&&(clearTimeout(et.longPressTimerId),ie(es))}},[G,ce,ie]),pn(function(){var Ge=Ke(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return Ge},[])}function oo(p){Ya(function(){var w=Ja(p);Qi(function(){w.current.length===p.length||Pe(!1)})})}var Xl={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function va(p,w){if(w==null)return!1;var D=Boolean(Xl[w.tagName.toLowerCase()]);if(D)return!0;var G=w.getAttribute("contenteditable");return G==="true"||G===""?!0:w===p?!1:va(p,w.parentElement)}function Yl(p,w){var D=w.target;return Pi(D)?va(p,D):!1}var Jl=function(p){return A(p.getBoundingClientRect()).center};function $l(p){return p instanceof Zs(p).Element}var Zl=function(){var p="matches";if(typeof document=="undefined")return p;var w=[p,"msMatchesSelector","webkitMatchesSelector"],D=$e(w,function(G){return G in Element.prototype});return D||p}();function lo(p,w){return p==null?null:p[Zl](w)?p:lo(p.parentElement,w)}function ql(p,w){return p.closest?p.closest(w):lo(p,w)}function eA(p){return"["+fi.contextId+'="'+p+'"]'}function tA(p,w){var D=w.target;if(!$l(D))return null;var G=eA(p),ie=ql(D,G);return ie&&Pi(ie)?ie:null}function Ao(p,w){var D=tA(p,w);return D?D.getAttribute(fi.draggableId):null}function rA(p,w){var D="["+Va.contextId+'="'+p+'"]',G=pt(document.querySelectorAll(D)),ie=$e(G,function(ne){return ne.getAttribute(Va.id)===w});return ie&&Pi(ie)?ie:null}function nA(p){p.preventDefault()}function ya(p){var w=p.expected,D=p.phase,G=p.isLockActive,ie=p.shouldWarn;return G()?!(w!==D):!1}function ns(p){var w=p.lockAPI,D=p.store,G=p.registry,ie=p.draggableId;if(w.isClaimed())return!1;var ne=G.draggable.findById(ie);return ne&&ne.options.isEnabled?!!Ks(D.getState(),ie):!1}function iA(p){var w=p.lockAPI,D=p.contextId,G=p.store,ie=p.registry,ne=p.draggableId,ce=p.forceSensorStop,de=p.sourceEvent,Re=ns({lockAPI:w,store:G,registry:ie,draggableId:ne});if(!Re)return null;var Qe=ie.draggable.getById(ne),je=rA(D,Qe.descriptor.id);if(!je)return null;if(de&&!Qe.options.canDragInteractiveElements&&Yl(je,de))return null;var Le=w.claim(ce||Fe),De="PRE_DRAG";function Ge(){return Qe.options.shouldRespectForcePress}function et(){return w.isActive(Le)}function xt(Ar,Dr){ya({expected:Ar,phase:De,isLockActive:et,shouldWarn:!0})&&G.dispatch(Dr())}var wt=xt.bind(null,"DRAGGING");function Dt(Ar){function Dr(){w.release(),De="COMPLETED"}De!=="PRE_DRAG"&&(Dr(),De==="PRE_DRAG"||Pe(!1)),G.dispatch(vn(Ar.liftActionArgs)),De="DRAGGING";function An(_r,rn){if(rn===void 0&&(rn={shouldBlockNextClick:!1}),Ar.cleanup(),rn.shouldBlockNextClick){var hn=Ke(window,[{eventName:"click",fn:nA,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(hn)}Dr(),G.dispatch(In({reason:_r}))}return Object(X.a)({isActive:function(){return ya({expected:"DRAGGING",phase:De,isLockActive:et,shouldWarn:!1})},shouldRespectForcePress:Ge,drop:function(rn){return An("DROP",rn)},cancel:function(rn){return An("CANCEL",rn)}},Ar.actions)}function Ut(Ar){var Dr=g(function(_r){wt(function(){return sa({client:_r})})}),An=Dt({liftActionArgs:{id:ne,clientSelection:Ar,movementMode:"FLUID"},cleanup:function(){return Dr.cancel()},actions:{move:Dr}});return Object(X.a)({},An,{move:Dr})}function Xt(){var Ar={moveUp:function(){return wt(Ri)},moveRight:function(){return wt(Or)},moveDown:function(){return wt(li)},moveLeft:function(){return wt(Go)}};return Dt({liftActionArgs:{id:ne,clientSelection:Jl(je),movementMode:"SNAP"},cleanup:Fe,actions:Ar})}function Zt(){var Ar=ya({expected:"PRE_DRAG",phase:De,isLockActive:et,shouldWarn:!0});Ar&&w.release()}var pr={isActive:function(){return ya({expected:"PRE_DRAG",phase:De,isLockActive:et,shouldWarn:!1})},shouldRespectForcePress:Ge,fluidLift:Ut,snapLift:Xt,abort:Zt};return pr}var Ea=[Un,Gl,zl];function aA(p){var w=p.contextId,D=p.store,G=p.registry,ie=p.customSensors,ne=p.enableDefaultSensors,ce=[].concat(ne?Ea:[],ie||[]),de=Object(ve.useState)(function(){return Ll()})[0],Re=h(function(Ut,Xt){Ut.isDragging&&!Xt.isDragging&&de.tryAbandon()},[de]);pn(function(){var Ut=D.getState(),Xt=D.subscribe(function(){var Zt=D.getState();Re(Ut,Zt),Ut=Zt});return Xt},[de,D,Re]),pn(function(){return de.tryAbandon},[de.tryAbandon]);var Qe=h(function(Dt){return ns({lockAPI:de,registry:G,store:D,draggableId:Dt})},[de,G,D]),je=h(function(Dt,Ut,Xt){return iA({lockAPI:de,registry:G,contextId:w,store:D,draggableId:Dt,forceSensorStop:Ut,sourceEvent:Xt&&Xt.sourceEvent?Xt.sourceEvent:null})},[w,de,G,D]),Le=h(function(Dt){return Ao(w,Dt)},[w]),De=h(function(Dt){var Ut=G.draggable.findById(Dt);return Ut?Ut.options:null},[G.draggable]),Ge=h(function(){if(!de.isClaimed())return;de.tryAbandon(),D.getState().phase!=="IDLE"&&D.dispatch(Di())},[de,D]),et=h(de.isClaimed,[de]),xt=O(function(){return{canGetLock:Qe,tryGetLock:je,findClosestDraggableId:Le,findOptionsForDraggable:De,tryReleaseLock:Ge,isLockClaimed:et}},[Qe,je,Le,De,Ge,et]);oo(ce);for(var wt=0;wt<ce.length;wt++)ce[wt](xt)}var is=function(w){return{onBeforeCapture:w.onBeforeCapture,onBeforeDragStart:w.onBeforeDragStart,onDragStart:w.onDragStart,onDragEnd:w.onDragEnd,onDragUpdate:w.onDragUpdate}};function ri(p){return p.current||Pe(!1),p.current}function uo(p){var w=p.contextId,D=p.setCallbacks,G=p.sensors,ie=p.nonce,ne=p.dragHandleUsageInstructions,ce=Object(ve.useRef)(null);Dl();var de=Ja(p),Re=h(function(){return is(de.current)},[de]),Qe=Cl(w),je=Sl({contextId:w,text:ne}),Le=yl(w,ie),De=h(function(_r){ri(ce).dispatch(_r)},[]),Ge=O(function(){return Object(F.b)({publishWhileDragging:aa,updateDroppableScroll:Na,updateDroppableIsEnabled:Pa,updateDroppableIsCombineEnabled:Wo,collectionStarting:Oi},De)},[De]),et=bl(),xt=O(function(){return Qs(et,Ge)},[et,Ge]),wt=O(function(){return pl(Object(X.a)({scrollWindow:el,scrollDroppable:xt.scrollDroppable},Object(F.b)({move:sa},De)))},[xt.scrollDroppable,De]),Dt=El(w),Ut=O(function(){return Ns({announce:Qe,autoScroller:wt,dimensionMarshal:xt,focusMarshal:Dt,getResponders:Re,styleMarshal:Le})},[Qe,wt,xt,Dt,Re,Le]);ce.current=Ut;var Xt=h(function(){var _r=ri(ce),rn=_r.getState();rn.phase!=="IDLE"&&_r.dispatch(Di())},[]),Zt=h(function(){var _r=ri(ce).getState();return _r.isDragging||_r.phase==="DROP_ANIMATING"},[]),pr=O(function(){return{isDragging:Zt,tryAbort:Xt}},[Zt,Xt]);D(pr);var Ar=h(function(_r){return Ks(ri(ce).getState(),_r)},[]),Dr=h(function(){return ur(ri(ce).getState())},[]),An=O(function(){return{marshal:xt,focus:Dt,contextId:w,canLift:Ar,isMovementAllowed:Dr,dragHandleUsageInstructionsId:je,registry:et}},[w,xt,je,Dt,Ar,Dr,et]);return aA({contextId:w,store:Ut,registry:et,customSensors:G,enableDefaultSensors:p.enableDefaultSensors!==!1}),Object(ve.useEffect)(function(){return Xt},[Xt]),J.a.createElement(ki.Provider,{value:An},J.a.createElement(R.a,{context:za,store:Ut},p.children))}var as=0;function sA(){as=0}function co(){return O(function(){return""+as++},[])}function ho(){sA(),Bl()}function ss(p){var w=co(),D=p.dragHandleUsageInstructions||Ue.dragHandleUsageInstructions;return J.a.createElement(Et,null,function(G){return J.a.createElement(uo,{nonce:p.nonce,contextId:w,setCallbacks:G,dragHandleUsageInstructions:D,enableDefaultSensors:p.enableDefaultSensors,sensors:p.sensors,onBeforeCapture:p.onBeforeCapture,onBeforeDragStart:p.onBeforeDragStart,onDragStart:p.onDragStart,onDragUpdate:p.onDragUpdate,onDragEnd:p.onDragEnd},p.children)})}var ba=function(w){return function(D){return w===D}},fo=ba("scroll"),po=ba("auto"),go=ba("visible"),_a=function(w,D){return D(w.overflowX)||D(w.overflowY)},oA=function(w,D){return D(w.overflowX)&&D(w.overflowY)},mo=function(w){var D=window.getComputedStyle(w),G={overflowX:D.overflowX,overflowY:D.overflowY};return _a(G,fo)||_a(G,po)},lA=function(){return!1;var w,D;if(!mo(w))return!1;var G,ie;if(oA(ie,go))return!1},wn=function p(w){return w==null?null:w===document.body?lA()?w:null:w===document.documentElement?null:mo(w)?w:p(w.parentElement)},vo=function(p){if(!p)return;var w=wn(p.parentElement);if(!w)return},os=function(p){return{x:p.scrollLeft,y:p.scrollTop}},AA=function p(w){if(!w)return!1;var D=window.getComputedStyle(w);return D.position==="fixed"?!0:p(w.parentElement)},uA=function(p){var w=wn(p),D=AA(p);return{closestScrollable:w,isFixedOnPage:D}},cA=function(p){var w=p.descriptor,D=p.isEnabled,G=p.isCombineEnabled,ie=p.isFixedOnPage,ne=p.direction,ce=p.client,de=p.page,Re=p.closest,Qe=function(){if(!Re)return null;var Ge=Re.scrollSize,et=Re.client,xt=Ms({scrollHeight:Ge.scrollHeight,scrollWidth:Ge.scrollWidth,height:et.paddingBox.height,width:et.paddingBox.width});return{pageMarginBox:Re.page.marginBox,frameClient:et,scrollSize:Ge,shouldClipSubject:Re.shouldClipSubject,scroll:{initial:Re.scroll,current:Re.scroll,max:xt,diff:{value:Ie,displacement:Ie}}}}(),je=ne==="vertical"?Jt:or,Le=se({page:de,withPlaceholder:null,axis:je,frame:Qe}),De={descriptor:w,isCombineEnabled:G,isFixedOnPage:ie,axis:je,isEnabled:D,client:ce,page:de,frame:Qe,subject:Le};return De},dA=function(w,D){var G=x(w);if(!D)return G;if(w!==D)return G;var ie=G.paddingBox.top-D.scrollTop,ne=G.paddingBox.left-D.scrollLeft,ce=ie+D.scrollHeight,de=ne+D.scrollWidth,Re={top:ie,right:de,bottom:ce,left:ne},Qe=a(Re,G.border),je=t({borderBox:Qe,margin:G.margin,border:G.border,padding:G.padding});return je},hA=function(p){var w=p.ref,D=p.descriptor,G=p.env,ie=p.windowScroll,ne=p.direction,ce=p.isDropDisabled,de=p.isCombineEnabled,Re=p.shouldClipSubject,Qe=G.closestScrollable,je=dA(w,Qe),Le=C(je,ie),De=function(){if(!Qe)return null;var et=x(Qe),xt={scrollHeight:Qe.scrollHeight,scrollWidth:Qe.scrollWidth};return{client:et,page:C(et,ie),scroll:os(Qe),scrollSize:xt,shouldClipSubject:Re}}(),Ge=cA({descriptor:D,isEnabled:!ce,isCombineEnabled:de,isFixedOnPage:G.isFixedOnPage,direction:ne,client:je,page:Le,closest:De});return Ge},fA={passive:!1},pA={passive:!0},yo=function(p){return p.shouldPublishImmediately?fA:pA};function ji(p){var w=Object(ve.useContext)(p);return w||Pe(!1),w}var wa=function(w){return w&&w.env.closestScrollable||null};function ls(p){var w=Object(ve.useRef)(null),D=ji(ki),G=Xa("droppable"),ie=D.registry,ne=D.marshal,ce=Ja(p),de=O(function(){return{id:p.droppableId,type:p.type,mode:p.mode}},[p.droppableId,p.mode,p.type]),Re=Object(ve.useRef)(de),Qe=O(function(){return l(function(Zt,pr){w.current||Pe(!1);var Ar={x:Zt,y:pr};ne.updateDroppableScroll(de.id,Ar)})},[de.id,ne]),je=h(function(){var Zt=w.current;return!Zt||!Zt.env.closestScrollable?Ie:os(Zt.env.closestScrollable)},[]),Le=h(function(){var Zt=je();Qe(Zt.x,Zt.y)},[je,Qe]),De=O(function(){return g(Le)},[Le]),Ge=h(function(){var Zt=w.current,pr=wa(Zt);Zt&&pr||Pe(!1);var Ar=Zt.scrollOptions;if(Ar.shouldPublishImmediately){Le();return}De()},[De,Le]),et=h(function(Zt,pr){w.current&&Pe(!1);var Ar=ce.current,Dr=Ar.getDroppableRef();Dr||Pe(!1);var An=uA(Dr),_r={ref:Dr,descriptor:de,env:An,scrollOptions:pr};w.current=_r;var rn=hA({ref:Dr,descriptor:de,env:An,windowScroll:Zt,direction:Ar.direction,isDropDisabled:Ar.isDropDisabled,isCombineEnabled:Ar.isCombineEnabled,shouldClipSubject:!Ar.ignoreContainerClipping}),hn=An.closestScrollable;return hn&&(hn.setAttribute(Js.contextId,D.contextId),hn.addEventListener("scroll",Ge,yo(_r.scrollOptions))),rn},[D.contextId,de,Ge,ce]),xt=h(function(){var Zt=w.current,pr=wa(Zt);return Zt&&pr||Pe(!1),os(pr)},[]),wt=h(function(){var Zt=w.current;Zt||Pe(!1);var pr=wa(Zt);if(w.current=null,!pr)return;De.cancel(),pr.removeAttribute(Js.contextId),pr.removeEventListener("scroll",Ge,yo(Zt.scrollOptions))},[Ge,De]),Dt=h(function(Zt){var pr=w.current;pr||Pe(!1);var Ar=wa(pr);Ar||Pe(!1),Ar.scrollTop+=Zt.y,Ar.scrollLeft+=Zt.x},[]),Ut=O(function(){return{getDimensionAndWatchScroll:et,getScrollWhileDragging:xt,dragStopped:wt,scroll:Dt}},[wt,et,xt,Dt]),Xt=O(function(){return{uniqueId:G,descriptor:de,callbacks:Ut}},[Ut,de,G]);pn(function(){return Re.current=Xt.descriptor,ie.droppable.register(Xt),function(){w.current&&wt(),ie.droppable.unregister(Xt)}},[Ut,de,wt,Xt,ne,ie.droppable]),pn(function(){if(!w.current)return;ne.updateDroppableIsEnabled(Re.current.id,!p.isDropDisabled)},[p.isDropDisabled,ne]),pn(function(){if(!w.current)return;ne.updateDroppableIsCombineEnabled(Re.current.id,p.isCombineEnabled)},[p.isCombineEnabled,ne])}function Ca(){}var ln={width:0,height:0,margin:qe},Wi=function(w){var D=w.isAnimatingOpenOnMount,G=w.placeholder,ie=w.animate;return D||ie==="close"?ln:{height:G.client.borderBox.height,width:G.client.borderBox.width,margin:G.client.margin}},gA=function(w){var D=w.isAnimatingOpenOnMount,G=w.placeholder,ie=w.animate,ne=Wi({isAnimatingOpenOnMount:D,placeholder:G,animate:ie});return{display:G.display,boxSizing:"border-box",width:ne.width,height:ne.height,marginTop:ne.margin.top,marginRight:ne.margin.right,marginBottom:ne.margin.bottom,marginLeft:ne.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:ie!=="none"?Ai.placeholder:null}};function mA(p){var w=Object(ve.useRef)(null),D=h(function(){if(!w.current)return;clearTimeout(w.current),w.current=null},[]),G=p.animate,ie=p.onTransitionEnd,ne=p.onClose,ce=p.contextId,de=Object(ve.useState)(p.animate==="open"),Re=de[0],Qe=de[1];Object(ve.useEffect)(function(){return Re?G!=="open"?(D(),Qe(!1),Ca):w.current?Ca:(w.current=setTimeout(function(){w.current=null,Qe(!1)}),D):Ca},[G,Re,D]);var je=h(function(De){if(De.propertyName!=="height")return;ie(),G==="close"&&ne()},[G,ne,ie]),Le=gA({isAnimatingOpenOnMount:Re,animate:p.animate,placeholder:p.placeholder});return J.a.createElement(p.placeholder.tagName,{style:Le,"data-rbd-placeholder-context-id":ce,onTransitionEnd:je,ref:p.innerRef})}var Eo=J.a.memo(mA),Gi=J.a.createContext(null);function bo(p){p&&Pi(p)||Pe(!1)}function As(p){return typeof p=="boolean"}function us(p,w){w.forEach(function(D){return D(p)})}var vA=[function(w){var D=w.props;D.droppableId||Pe(!1),typeof D.droppableId=="string"||Pe(!1)},function(w){var D=w.props;As(D.isDropDisabled)||Pe(!1),As(D.isCombineEnabled)||Pe(!1),As(D.ignoreContainerClipping)||Pe(!1)},function(w){var D=w.getDroppableRef;bo(D())}],yA=[function(w){var D=w.props,G=w.getPlaceholderRef;if(!D.placeholder)return;var ie=G();if(ie)return}],EA=[function(w){var D=w.props;D.renderClone||Pe(!1)},function(w){var D=w.getPlaceholderRef;D()&&Pe(!1)}];function bA(p){Qi(function(){us(p,vA),p.props.mode==="standard"&&us(p,yA),p.props.mode==="virtual"&&us(p,EA)})}var _A=function(p){Object(U.a)(w,p);function w(){for(var G,ie=arguments.length,ne=new Array(ie),ce=0;ce<ie;ce++)ne[ce]=arguments[ce];return G=p.call.apply(p,[this].concat(ne))||this,G.state={isVisible:Boolean(G.props.on),data:G.props.on,animate:G.props.shouldAnimate&&G.props.on?"open":"none"},G.onClose=function(){if(G.state.animate!=="close")return;G.setState({isVisible:!1})},G}w.getDerivedStateFromProps=function(ie,ne){return ie.shouldAnimate?ie.on?{isVisible:!0,data:ie.on,animate:"open"}:ne.isVisible?{isVisible:!0,data:ne.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(ie.on),data:ie.on,animate:"none"}};var D=w.prototype;return D.render=function(){if(!this.state.isVisible)return null;var ie={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(ie)},w}(J.a.PureComponent),cs={dragging:5e3,dropAnimating:4500},_o=function(w,D){return D?Ai.drop(D.duration):w?Ai.snap:Ai.fluid},wo=function(w,D){return w?D?Hn.opacity.drop:Hn.opacity.combining:null},Co=function(w){return w.forceShouldAnimate!=null?w.forceShouldAnimate:w.mode==="SNAP"};function ds(p){var w=p.dimension,D=w.client,G=p.offset,ie=p.combineWith,ne=p.dropping,ce=Boolean(ie),de=Co(p),Re=Boolean(ne),Qe=Re?oa.drop(G,ce):oa.moveTo(G),je={position:"fixed",top:D.marginBox.top,left:D.marginBox.left,boxSizing:"border-box",width:D.borderBox.width,height:D.borderBox.height,transition:_o(de,ne),transform:Qe,opacity:wo(ce,Re),zIndex:Re?cs.dropAnimating:cs.dragging,pointerEvents:"none"};return je}function wA(p){return{transform:oa.moveTo(p.offset),transition:p.shouldAnimateDisplacement?null:"none"}}function CA(p){return p.type==="DRAGGING"?ds(p):wA(p)}function TA(p,w,D){D===void 0&&(D=Ie);var G=window.getComputedStyle(w),ie=w.getBoundingClientRect(),ne=_(ie,G),ce=C(ne,D),de={client:ne,tagName:w.tagName.toLowerCase(),display:G.display},Re={x:ne.marginBox.width,y:ne.marginBox.height},Qe={descriptor:p,placeholder:de,displaceBy:Re,client:ne,page:ce};return Qe}function BA(p){var w=Xa("draggable"),D=p.descriptor,G=p.registry,ie=p.getDraggableRef,ne=p.canDragInteractiveElements,ce=p.shouldRespectForcePress,de=p.isEnabled,Re=O(function(){return{canDragInteractiveElements:ne,shouldRespectForcePress:ce,isEnabled:de}},[ne,de,ce]),Qe=h(function(Ge){var et=ie();return et||Pe(!1),TA(D,et,Ge)},[D,ie]),je=O(function(){return{uniqueId:w,descriptor:D,options:Re,getDimension:Qe}},[D,Qe,Re,w]),Le=Object(ve.useRef)(je),De=Object(ve.useRef)(!0);pn(function(){return G.draggable.register(Le.current),function(){return G.draggable.unregister(Le.current)}},[G.draggable]),pn(function(){if(De.current){De.current=!1;return}var Ge=Le.current;Le.current=je,G.draggable.update(je,Ge)},[je,G.draggable])}function Ta(p,w,D){Qi(function(){function G(ne){return"Draggable[id: "+ne+"]: "}var ie=p.draggableId;if(ie||Pe(!1),typeof ie=="string"||Pe(!1),me(p.index)||Pe(!1),p.mapped.type==="DRAGGING")return;bo(D()),p.isEnabled&&(qs(w,ie)||Pe(!1))})}function Ba(p){Ya(function(){var w=Object(ve.useRef)(p);Qi(function(){p===w.current||Pe(!1)},[p])})}function xA(p){p.preventDefault()}function To(p){var w=Object(ve.useRef)(null),D=h(function(_r){w.current=_r},[]),G=h(function(){return w.current},[]),ie=ji(ki),ne=ie.contextId,ce=ie.dragHandleUsageInstructionsId,de=ie.registry,Re=ji(Gi),Qe=Re.type,je=Re.droppableId,Le=O(function(){return{id:p.draggableId,index:p.index,type:Qe,droppableId:je}},[p.draggableId,p.index,Qe,je]),De=p.children,Ge=p.draggableId,et=p.isEnabled,xt=p.shouldRespectForcePress,wt=p.canDragInteractiveElements,Dt=p.isClone,Ut=p.mapped,Xt=p.dropAnimationFinished;if(Ta(p,ne,G),Ba(Dt),!Dt){var Zt=O(function(){return{descriptor:Le,registry:de,getDraggableRef:G,canDragInteractiveElements:wt,shouldRespectForcePress:xt,isEnabled:et}},[Le,de,G,wt,xt,et]);BA(Zt)}var pr=O(function(){return et?{tabIndex:0,role:"button","aria-describedby":ce,"data-rbd-drag-handle-draggable-id":Ge,"data-rbd-drag-handle-context-id":ne,draggable:!1,onDragStart:xA}:null},[ne,ce,Ge,et]),Ar=h(function(_r){if(Ut.type!=="DRAGGING")return;if(!Ut.dropping)return;if(_r.propertyName!=="transform")return;Xt()},[Xt,Ut]),Dr=O(function(){var _r=CA(Ut),rn=Ut.type==="DRAGGING"&&Ut.dropping?Ar:null,hn={innerRef:D,draggableProps:{"data-rbd-draggable-context-id":ne,"data-rbd-draggable-id":Ge,style:_r,onTransitionEnd:rn},dragHandleProps:pr};return hn},[ne,pr,Ge,Ut,Ar,D]),An=O(function(){return{draggableId:Le.id,type:Le.type,source:{index:Le.index,droppableId:Le.droppableId}}},[Le.droppableId,Le.id,Le.index,Le.type]);return De(Dr,Ut.snapshot,An)}var xa=function(p,w){return p===w},hs=function(p){var w=p.combine,D=p.destination;return D?D.droppableId:w?w.droppableId:null},Bo=function(w){return w.combine?w.combine.draggableId:null},xo=function(w){return w.at&&w.at.type==="COMBINE"?w.at.combine.draggableId:null};function SA(){var p=l(function(ie,ne){return{x:ie,y:ne}}),w=l(function(ie,ne,ce,de,Re){return{isDragging:!0,isClone:ne,isDropAnimating:Boolean(Re),dropAnimation:Re,mode:ie,draggingOver:ce,combineWith:de,combineTargetFor:null}}),D=l(function(ie,ne,ce,de,Re,Qe,je){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Re,combineWith:Qe,mode:ne,offset:ie,dimension:ce,forceShouldAnimate:je,snapshot:w(ne,de,Re,Qe,null)}}}),G=function(ne,ce){if(ne.isDragging){if(ne.critical.draggable.id!==ce.draggableId)return null;var de=ne.current.client.offset,Re=ne.dimensions.draggables[ce.draggableId],Qe=ar(ne.impact),je=xo(ne.impact),Le=ne.forceShouldAnimate;return D(p(de.x,de.y),ne.movementMode,Re,ce.isClone,Qe,je,Le)}if(ne.phase==="DROP_ANIMATING"){var De=ne.completed;if(De.result.draggableId!==ce.draggableId)return null;var Ge=ce.isClone,et=ne.dimensions.draggables[ce.draggableId],xt=De.result,wt=xt.mode,Dt=hs(xt),Ut=Bo(xt),Xt=ne.dropDuration,Zt={duration:Xt,curve:Ln.drop,moveTo:ne.newHomeClientOffset,opacity:Ut?Hn.opacity.drop:null,scale:Ut?Hn.scale.drop:null};return{mapped:{type:"DRAGGING",offset:ne.newHomeClientOffset,dimension:et,dropping:Zt,draggingOver:Dt,combineWith:Ut,mode:wt,forceShouldAnimate:null,snapshot:w(wt,Ge,Dt,Ut,Zt)}}}return null};return G}function Vi(p){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:p,combineWith:null}}var So={mapped:{type:"SECONDARY",offset:Ie,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Vi(null)}};function Io(){var p=l(function(ce,de){return{x:ce,y:de}}),w=l(Vi),D=l(function(ce,de,Re){return de===void 0&&(de=null),{mapped:{type:"SECONDARY",offset:ce,combineTargetFor:de,shouldAnimateDisplacement:Re,snapshot:w(de)}}}),G=function(de){return de?D(Ie,de,!0):null},ie=function(de,Re,Qe,je){var Le=Qe.displaced.visible[de],De=Boolean(je.inVirtualList&&je.effected[de]),Ge=Pt(Qe),et=Ge&&Ge.draggableId===de?Re:null;if(!Le){if(!De)return G(et);if(Qe.displaced.invisible[de])return null;var xt=dt(je.displacedBy.point),wt=p(xt.x,xt.y);return D(wt,et,!0)}if(De)return G(et);var Dt=Qe.displacedBy.point,Ut=p(Dt.x,Dt.y);return D(Ut,et,Le.shouldAnimate)},ne=function(de,Re){if(de.isDragging)return de.critical.draggable.id===Re.draggableId?null:ie(Re.draggableId,de.critical.draggable.id,de.impact,de.afterCritical);if(de.phase==="DROP_ANIMATING"){var Qe=de.completed;return Qe.result.draggableId===Re.draggableId?null:ie(Re.draggableId,Qe.result.draggableId,Qe.impact,Qe.afterCritical)}return null};return ne}var IA=function(){var w=SA(),D=Io(),G=function(ne,ce){return w(ne,ce)||D(ne,ce)||So};return G},OA={dropAnimationFinished:kn},Oo=Object(R.c)(IA,OA,null,{context:za,pure:!0,areStatePropsEqual:xa})(To);function ni(p){var w=ji(Gi),D=w.isUsingCloneFor;return D===p.draggableId&&!p.isClone?null:J.a.createElement(Oo,p)}function fs(p){var w=typeof p.isDragDisabled=="boolean"?!p.isDragDisabled:!0,D=Boolean(p.disableInteractiveElementBlocking),G=Boolean(p.shouldRespectForcePress);return J.a.createElement(ni,Object(X.a)({},p,{isClone:!1,isEnabled:w,canDragInteractiveElements:D,shouldRespectForcePress:G}))}function Sa(p){var w=Object(ve.useContext)(ki);w||Pe(!1);var D=w.contextId,G=w.isMovementAllowed,ie=Object(ve.useRef)(null),ne=Object(ve.useRef)(null),ce=p.children,de=p.droppableId,Re=p.type,Qe=p.mode,je=p.direction,Le=p.ignoreContainerClipping,De=p.isDropDisabled,Ge=p.isCombineEnabled,et=p.snapshot,xt=p.useClone,wt=p.updateViewportMaxScroll,Dt=p.getContainerForClone,Ut=h(function(){return ie.current},[]),Xt=h(function(yn){ie.current=yn},[]),Zt=h(function(){return ne.current},[]),pr=h(function(yn){ne.current=yn},[]);bA({props:p,getDroppableRef:Ut,getPlaceholderRef:Zt});var Ar=h(function(){G()&&wt({maxScroll:ks()})},[G,wt]);ls({droppableId:de,type:Re,mode:Qe,direction:je,isDropDisabled:De,isCombineEnabled:Ge,ignoreContainerClipping:Le,getDroppableRef:Ut});var Dr=J.a.createElement(_A,{on:p.placeholder,shouldAnimate:p.shouldAnimatePlaceholder},function(yn){var ii=yn.onClose,Kn=yn.data,vi=yn.animate;return J.a.createElement(Eo,{placeholder:Kn,onClose:ii,innerRef:pr,animate:vi,contextId:D,onTransitionEnd:Ar})}),An=O(function(){return{innerRef:Xt,placeholder:Dr,droppableProps:{"data-rbd-droppable-id":de,"data-rbd-droppable-context-id":D}}},[D,de,Dr,Xt]),_r=xt?xt.dragging.draggableId:null,rn=O(function(){return{droppableId:de,type:Re,isUsingCloneFor:_r}},[de,_r,Re]);function hn(){if(!xt)return null;var yn=xt.dragging,ii=xt.render,Kn=J.a.createElement(ni,{draggableId:yn.draggableId,index:yn.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(vi,zi){return ii(vi,zi,yn)});return L.a.createPortal(Kn,Dt())}return J.a.createElement(Gi.Provider,{value:rn},ce(An,et),hn())}var ps=function(w,D){return w===D.droppable.type},Ro=function(w,D){return D.draggables[w.draggable.id]},RA=function(){var w={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},D=Object(X.a)({},w,{shouldAnimatePlaceholder:!1}),G=l(function(ce){return{draggableId:ce.id,type:ce.type,source:{index:ce.index,droppableId:ce.droppableId}}}),ie=l(function(ce,de,Re,Qe,je,Le){var De=je.descriptor.id,Ge=je.descriptor.droppableId===ce;if(Ge){var et=Le?{render:Le,dragging:G(je.descriptor)}:null,xt={isDraggingOver:Re,draggingOverWith:Re?De:null,draggingFromThisWith:De,isUsingPlaceholder:!0};return{placeholder:je.placeholder,shouldAnimatePlaceholder:!1,snapshot:xt,useClone:et}}if(!de)return D;if(!Qe)return w;var wt={isDraggingOver:Re,draggingOverWith:De,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:je.placeholder,shouldAnimatePlaceholder:!0,snapshot:wt,useClone:null}}),ne=function(de,Re){var Qe=Re.droppableId,je=Re.type,Le=!Re.isDropDisabled,De=Re.renderClone;if(de.isDragging){var Ge=de.critical;if(!ps(je,Ge))return D;var et=Ro(Ge,de.dimensions),xt=ar(de.impact)===Qe;return ie(Qe,Le,xt,xt,et,De)}if(de.phase==="DROP_ANIMATING"){var wt=de.completed;if(!ps(je,wt.critical))return D;var Dt=Ro(wt.critical,de.dimensions);return ie(Qe,Le,hs(wt.result)===Qe,ar(wt.impact)===Qe,Dt,De)}if(de.phase==="IDLE"&&de.completed&&!de.shouldFlush){var Ut=de.completed;if(!ps(je,Ut.critical))return D;var Xt=ar(Ut.impact)===Qe,Zt=Boolean(Ut.impact.at&&Ut.impact.at.type==="COMBINE"),pr=Ut.critical.droppable.id===Qe;return Xt?Zt?w:D:pr?w:D}return D};return ne},DA={updateViewportMaxScroll:ws};function Do(){return document.body||Pe(!1),document.body}var gs={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Do},ms=Object(R.c)(RA,DA,null,{context:za,pure:!0,areStatePropsEqual:xa})(Sa);ms.defaultProps=gs},p5ED:function(It,At,re){"use strict";var ve=re("+L6B"),J=re("2/Rp"),U=re("5Dmo"),X=re("3S7+"),F=re("k1fw"),R=re("tJVT"),Z=re("q1tI"),M=re.n(Z),N=re("vHTk"),O=re.n(N),h=re("yEEn"),b=re("ZW9T"),A=re("1vsH");At.a=function(a){var r=a.name,n=a.data,e=a.theme,t=a.type,i=a.filename,s=a.monacoEditor,I=a.className,C=a.style,_=a.close,x=a.onClose,T=a.hasMask,d=Object(Z.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),u=Object(R.a)(d,2),o=u[0],l=u[1],m=Object(Z.useState)(""),g=Object(R.a)(m,2),E=g[0],L=g[1],P,j=1024*1024,z=10*j,ee=Object(Z.useRef)();t==="office"&&(P=Object(A.T)(n).filesize,P>z&&(t="other")),i&&(s.filename=i),Object(Z.useEffect)(function(){var ae,ge,pe=(ae=document.cookie)===null||ae===void 0||((ge=ae.replace(/\s/g,""))===null||ge===void 0)?void 0:ge.split(";");pe==null||pe.map(function(Ne){var Fe=Ne.split("=");Fe[0]==="_educoder_session"&&L(Fe[1])})},[]);var Q=function(){if(n.startsWith("http")||n.startsWith("/")){q();return}Object(A.z)(i||"educoder",n,i)},q=function(){Object(A.x)(i||r,n)};return console.log("data:",n,"fileanme:",i," name:",r),M.a.createElement("div",{style:Object(F.a)({},C||{}),className:"".concat(T&&O.a.bgBlack," ").concat(t?O.a.wrp:"hide")},_&&M.a.createElement("div",{className:O.a.close,ref:ee},M.a.createElement(X.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ee.current}},M.a.createElement("span",{onClick:q},M.a.createElement("i",{className:"icon-quxiaozhiding"}))),M.a.createElement(X.a,{title:"\u5173\u95ED",getPopupContainer:function(){return ee.current}},M.a.createElement("span",{className:"",onClick:x},M.a.createElement("i",{className:"icon-guanbi1"})))),M.a.createElement("div",{className:"".concat(O.a[I]," ").concat(I," ").concat(O.a.monaco," ").concat(t==="txt"?"show":"hide")},t==="txt"&&M.a.createElement(b.b,s)),t==="audio"&&M.a.createElement("audio",{src:"".concat(n!=null&&n.startsWith("/")||(n==null?void 0:n.indexOf("https://"))>-1?n:"data:audio/mp3;base64,").concat(n),autoPlay:!0}),t==="video"&&M.a.createElement(M.a.Fragment,null,n!=null&&n.startsWith("/")?M.a.createElement("video",{controls:!0,src:"".concat(n),autoPlay:!0}):M.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(n),autoPlay:!0})),t==="html"&&M.a.createElement("iframe",{src:n+"&disposition=inline"}),t==="pdf"&&M.a.createElement("embed",{className:O.a.embed,src:n}),t==="image"&&M.a.createElement(M.a.Fragment,null,M.a.createElement("img",{src:"".concat(n!=null&&n.startsWith("/")||(n==null?void 0:n.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(n)})),t==="other"&&M.a.createElement("div",null,M.a.createElement(J.a,{type:"primary",size:"large",onClick:Q},M.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(t==="download"||t==="office")&&M.a.createElement(J.a,{type:"primary",size:"large",onClick:Q},M.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},psGv:function(It,At,re){var ve,J;(function(){var U;(function(){"use strict";var Z=[,,function(h){function b(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=[]}b.prototype.clone_empty=function(){var r=new b(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},b.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},b.prototype.has_match=function(r){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(r))return!0;return!1},b.prototype.set_indent=function(r,n){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.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},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(r){this.__items.push(r);var n=r.lastIndexOf(`
`);n!==-1?this.__character_count=r.length-n:this.__character_count+=r.length},b.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.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 A(r,n){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)),n=n||"",r.indent_level>0&&(n=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}A.prototype.get_indent_size=function(r,n){var e=this.__base_string_length;return n=n||0,r<0&&(e=0),e+=r*this.__indent_size,e+=n,e},A.prototype.get_indent_string=function(r,n){var e=this.__base_string;return n=n||0,r<0&&(r=0,e=""),n+=r*this.__indent_size,this.__ensure_cache(n),e+=this.__cache[n],e},A.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},A.prototype.__add_column=function(){var r=this.__cache.length,n=0,e="";this.__indent_size&&r>=this.__indent_size&&(n=Math.floor(r/this.__indent_size),r-=n*this.__indent_size,e=new Array(n+1).join(this.__indent_string)),r&&(e+=new Array(r+1).join(" ")),this.__cache.push(e)};function a(r,n){this.__indent_cache=new A(r,n),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 b(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,n){return this.__indent_cache.get_indent_string(r,n)},a.prototype.get_indent_size=function(r,n){return this.__indent_cache.get_indent_size(r,n)},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 n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var e=this.__lines.join(`
`);return r!==`
`&&(e=e.replace(/[\n]/g,r)),e},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(r,n){return r=r||0,n=n||0,this.next_line.set_indent(r,n),this.__lines.length>1?(this.current_line.set_indent(r,n),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(r){for(var n=0;n<r.newlines;n++)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 n=this.__lines.length;r<n;)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,n){for(var e=this.__lines.length-2;e>=0;){var t=this.__lines[e];if(t.is_empty())break;if(t.item(0).indexOf(r)!==0&&t.item(-1)!==n){this.__lines.splice(e+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}e--}},h.exports.Output=a},function(h){function b(A,a,r,n){this.type=A,this.text=a,this.comments_before=null,this.newlines=r||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}h.exports.Token=b},,,function(h){function b(r,n){this.raw_options=A(r,n),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"])}b.prototype._get_array=function(r,n){var e=this.raw_options[r],t=n||[];return typeof e=="object"?e!==null&&typeof e.concat=="function"&&(t=e.concat()):typeof e=="string"&&(t=e.split(/[^a-zA-Z0-9_\/\-]+/)),t},b.prototype._get_boolean=function(r,n){var e=this.raw_options[r],t=e===void 0?!!n:!!e;return t},b.prototype._get_characters=function(r,n){var e=this.raw_options[r],t=n||"";return typeof e=="string"&&(t=e.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),t},b.prototype._get_number=function(r,n){var e=this.raw_options[r];n=parseInt(n,10),isNaN(n)&&(n=0);var t=parseInt(e,10);return isNaN(t)&&(t=n),t},b.prototype._get_selection=function(r,n,e){var t=this._get_selection_list(r,n,e);if(t.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
`+n+`
You passed in: '`+this.raw_options[r]+"'");return t[0]},b.prototype._get_selection_list=function(r,n,e){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(e=e||[n[0]],!this._is_valid_selection(e,n))throw new Error("Invalid Default Value!");var t=this._get_array(r,e);if(!this._is_valid_selection(t,n))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
`+n+`
You passed in: '`+this.raw_options[r]+"'");return t},b.prototype._is_valid_selection=function(r,n){return r.length&&n.length&&!r.some(function(e){return n.indexOf(e)===-1})};function A(r,n){var e={};r=a(r);var t;for(t in r)t!==n&&(e[t]=r[t]);if(n&&r[n])for(t in r[n])e[t]=r[n][t];return e}function a(r){var n={},e;for(e in r){var t=e.replace(/-/g,"_");n[t]=r[e]}return n}h.exports.Options=b,h.exports.normalizeOpts=a,h.exports.mergeOpts=A},,function(h){var b=RegExp.prototype.hasOwnProperty("sticky");function A(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}A.prototype.restart=function(){this.__position=0},A.prototype.back=function(){this.__position>0&&(this.__position-=1)},A.prototype.hasNext=function(){return this.__position<this.__input_length},A.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},A.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},A.prototype.__match=function(a,r){a.lastIndex=r;var n=a.exec(this.__input);return n&&!(b&&a.sticky)&&(n.index!==r&&(n=null)),n},A.prototype.test=function(a,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(a,r):!1},A.prototype.testChar=function(a,r){var n=this.peek(r);return a.lastIndex=0,n!==null&&a.test(n)},A.prototype.match=function(a){var r=this.__match(a,this.__position);return r?this.__position+=r[0].length:r=null,r},A.prototype.read=function(a,r,n){var e="",t;return a&&(t=this.match(a),t&&(e+=t[0])),r&&(t||!a)&&(e+=this.readUntil(r,n)),e},A.prototype.readUntil=function(a,r){var n="",e=this.__position;a.lastIndex=this.__position;var t=a.exec(this.__input);return t?(e=t.index,r&&(e+=t[0].length)):e=this.__input_length,n=this.__input.substring(this.__position,e),this.__position=e,n},A.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},A.prototype.get_regexp=function(a,r){var n=null,e="g";return r&&b&&(e="y"),typeof a=="string"&&a!==""?n=new RegExp(a,e):a&&(n=new RegExp(a.source,e)),n},A.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},A.prototype.peekUntilAfter=function(a){var r=this.__position,n=this.readUntilAfter(a);return this.__position=r,n},A.prototype.lookBack=function(a){var r=this.__position-1;return r>=a.length&&this.__input.substring(r-a.length,r).toLowerCase()===a},h.exports.InputScanner=A},function(h,b,A){var a=A(8).InputScanner,r=A(3).Token,n=A(10).TokenStream,e=A(11).WhitespacePattern,t={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},i=function(s,I){this._input=new a(s),this._options=I||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new e(this._input)};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var s,I=new r(t.START,""),C=null,_=[],x=new n;I.type!==t.EOF;){for(s=this._get_next_token(I,C);this._is_comment(s);)x.add(s),s=this._get_next_token(I,C);x.isEmpty()||(s.comments_before=x,x=new n),s.parent=C,this._is_opening(s)?(_.push(C),C=s):C&&this._is_closing(s,C)&&(s.opened=C,C.closed=s,C=_.pop(),s.parent=C),s.previous=I,I.next=s,this.__tokens.add(s),I=s}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(s,I){this._readWhitespace();var C=this._input.read(/.+/g);return C?this._create_token(t.RAW,C):this._create_token(t.EOF,"")},i.prototype._is_comment=function(s){return!1},i.prototype._is_opening=function(s){return!1},i.prototype._is_closing=function(s,I){return!1},i.prototype._create_token=function(s,I){var C=new r(s,I,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return C},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},h.exports.Tokenizer=i,h.exports.TOKEN=t},function(h){function b(A){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=A}b.prototype.restart=function(){this.__position=0},b.prototype.isEmpty=function(){return this.__tokens_length===0},b.prototype.hasNext=function(){return this.__position<this.__tokens_length},b.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__tokens[this.__position],this.__position+=1),A},b.prototype.peek=function(A){var a=null;return A=A||0,A+=this.__position,A>=0&&A<this.__tokens_length&&(a=this.__tokens[A]),a},b.prototype.add=function(A){this.__parent_token&&(A.parent=this.__parent_token),this.__tokens.push(A),this.__tokens_length+=1},h.exports.TokenStream=b},function(h,b,A){var a=A(12).Pattern;function r(n,e){a.call(this,n,e),e?this._line_regexp=this._input.get_regexp(e._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new a,r.prototype.__set_whitespace_patterns=function(n,e){n+="\\t ",e+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+e+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+e+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var n=this._input.read(this._match_pattern);if(n===" ")this.whitespace_before_token=" ";else if(n){var e=this.__split(this._newline_regexp,n);this.newline_count=e.length-1,this.whitespace_before_token=e[this.newline_count]}return n},r.prototype.matching=function(n,e){var t=this._create();return t.__set_whitespace_patterns(n,e),t._update(),t},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(n,e){n.lastIndex=0;for(var t=0,i=[],s=n.exec(e);s;)i.push(e.substring(t,s.index)),t=s.index+s[0].length,s=n.exec(e);return t<e.length?i.push(e.substring(t,e.length)):i.push(""),i},h.exports.WhitespacePattern=r},function(h){function b(A,a){this._input=A,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)}b.prototype.read=function(){var A=this._input.read(this._starting_pattern);return(!this._starting_pattern||A)&&(A+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),A},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(A){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(A),a._update(),a},b.prototype.until=function(A){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(A),a._update(),a},b.prototype.starting_with=function(A){var a=this._create();return a._starting_pattern=this._input.get_regexp(A,!0),a._update(),a},b.prototype.matching=function(A){var a=this._create();return a._match_pattern=this._input.get_regexp(A,!0),a._update(),a},b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){},h.exports.Pattern=b},function(h){function b(A,a){A=typeof A=="string"?A:A.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(A+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(A+/\sbeautify\signore:end\s/.source+a,"g")}b.prototype.get_directives=function(A){if(!A.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(A);r;)a[r[1]]=r[2],r=this.__directive_pattern.exec(A);return a},b.prototype.readIgnored=function(A){return A.readUntilAfter(this.__directives_end_ignore_pattern)},h.exports.Directives=b},function(h,b,A){var a=A(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(e,t){a.call(this,e,t),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),t&&(this.__template_pattern=this._input.get_regexp(t.__template_pattern),this._excluded=Object.assign(this._excluded,t._excluded),this._disabled=Object.assign(this._disabled,t._disabled));var i=new a(e);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new a,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},n.prototype.read_options=function(e){var t=this._create();for(var i in r)t._disabled[i]=e.templating.indexOf(i)===-1;return t._update(),t},n.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},n.prototype.read=function(){var e="";this._match_pattern?e=this._input.read(this._starting_pattern):e=this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},n.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},n.prototype._read_template=function(){var e="",t=this._input.peek();if(t==="<"){var i=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&i==="?"&&(e=e||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&i==="%"&&(e=e||this.__patterns.erb.read())}else t==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(e=e||this.__patterns.handlebars_comment.read(),e=e||this.__patterns.handlebars_unescaped.read(),e=e||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=e||this.__patterns.django_comment.read(),e=e||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=e||this.__patterns.smarty_comment.read(),e=e||this.__patterns.smarty_literal.read(),e=e||this.__patterns.smarty.read()));return e},h.exports.TemplatablePattern=n},,,,function(h,b,A){var a=A(19).Beautifier,r=A(20).Options;function n(e,t,i,s){var I=new a(e,t,i,s);return I.beautify()}h.exports=n,h.exports.defaultOptions=function(){return new r}},function(h,b,A){var a=A(20).Options,r=A(2).Output,n=A(21).Tokenizer,e=A(21).TOKEN,t=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,s=function(m,g){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=m.max_preserve_newlines,this.preserve_newlines=m.preserve_newlines,this._output=new r(m,g)};s.prototype.current_line_has_match=function(m){return this._output.current_line.has_match(m)},s.prototype.set_space_before_token=function(m,g){this._output.space_before_token=m,this._output.non_breaking_space=g},s.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},s.prototype.add_raw_token=function(m){this._output.add_raw_token(m)},s.prototype.print_preserved_newlines=function(m){var g=0;m.type!==e.TEXT&&m.previous.type!==e.TEXT&&(g=m.newlines?1:0),this.preserve_newlines&&(g=m.newlines<this.max_preserve_newlines+1?m.newlines:this.max_preserve_newlines+1);for(var E=0;E<g;E++)this.print_newline(E>0);return g!==0},s.prototype.traverse_whitespace=function(m){return m.whitespace_before||m.newlines?(this.print_preserved_newlines(m)||(this._output.space_before_token=!0),!0):!1},s.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},s.prototype.print_newline=function(m){this._output.add_new_line(m)},s.prototype.print_token=function(m){m.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(m.text))},s.prototype.indent=function(){this.indent_level++},s.prototype.get_full_indent=function(m){return m=this.indent_level+(m||0),m<1?"":this._output.get_indent_string(m)};var I=function(m){for(var g=null,E=m.next;E.type!==e.EOF&&m.closed!==E;){if(E.type===e.ATTRIBUTE&&E.text==="type"){E.next&&E.next.type===e.EQUALS&&E.next.next&&E.next.next.type===e.VALUE&&(g=E.next.next.text);break}E=E.next}return g},C=function(m,g){var E=null,L=null;return g.closed?(m==="script"?E="text/javascript":m==="style"&&(E="text/css"),E=I(g)||E,E.search("text/css")>-1?L="css":E.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?L="javascript":E.search(/(text|application|dojo)\/(x-)?(html)/)>-1?L="html":E.search(/test\/null/)>-1&&(L="null"),L):null};function _(m,g){return g.indexOf(m)!==-1}function x(m,g,E){this.parent=m||null,this.tag=g?g.tag_name:"",this.indent_level=E||0,this.parser_token=g||null}function T(m){this._printer=m,this._current_frame=null}T.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},T.prototype.record_tag=function(m){var g=new x(this._current_frame,m,this._printer.indent_level);this._current_frame=g},T.prototype._try_pop_frame=function(m){var g=null;return m&&(g=m.parser_token,this._printer.indent_level=m.indent_level,this._current_frame=m.parent),g},T.prototype._get_frame=function(m,g){for(var E=this._current_frame;E&&!(m.indexOf(E.tag)!==-1);){if(g&&g.indexOf(E.tag)!==-1){E=null;break}E=E.parent}return E},T.prototype.try_pop=function(m,g){var E=this._get_frame([m],g);return this._try_pop_frame(E)},T.prototype.indent_to_tag=function(m){var g=this._get_frame(m);g&&(this._printer.indent_level=g.indent_level)};function d(m,g,E,L){this._source_text=m||"",g=g||{},this._js_beautify=E,this._css_beautify=L,this._tag_stack=null;var P=new a(g,"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"}d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var m=this._source_text,g=this._options.eol;this._options.eol==="auto"&&(g=`
`,m&&t.test(m)&&(g=m.match(t)[0])),m=m.replace(i,`
`);var E=m.match(/^[\t ]*/)[0],L={text:"",type:""},P=new u,j=new s(this._options,E),z=new n(m,this._options).tokenize();this._tag_stack=new T(j);for(var ee=null,Q=z.next();Q.type!==e.EOF;)Q.type===e.TAG_OPEN||Q.type===e.COMMENT?(ee=this._handle_tag_open(j,Q,P,L),P=ee):Q.type===e.ATTRIBUTE||Q.type===e.EQUALS||Q.type===e.VALUE||Q.type===e.TEXT&&!P.tag_complete?ee=this._handle_inside_tag(j,Q,P,z):Q.type===e.TAG_CLOSE?ee=this._handle_tag_close(j,Q,P):Q.type===e.TEXT?ee=this._handle_text(j,Q,P):j.add_raw_token(Q),L=ee,Q=z.next();var q=j._output.get_code(g);return q},d.prototype._handle_tag_close=function(m,g,E){var L={text:g.text,type:g.type};return m.alignment_size=0,E.tag_complete=!0,m.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),E.is_unformatted?m.add_raw_token(g):(E.tag_start_char==="<"&&(m.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&E.has_wrapped_attrs&&m.print_newline(!1)),m.print_token(g)),E.indent_content&&!(E.is_unformatted||E.is_content_unformatted)&&(m.indent(),E.indent_content=!1),!E.is_inline_element&&!(E.is_unformatted||E.is_content_unformatted)&&m.set_wrap_point(),L},d.prototype._handle_inside_tag=function(m,g,E,L){var P=E.has_wrapped_attrs,j={text:g.text,type:g.type};if(m.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),E.is_unformatted)m.add_raw_token(g);else if(E.tag_start_char==="{"&&g.type===e.TEXT)m.print_preserved_newlines(g)?(g.newlines=0,m.add_raw_token(g)):m.print_token(g);else{if(g.type===e.ATTRIBUTE?(m.set_space_before_token(!0),E.attr_count+=1):(g.type===e.EQUALS||g.type===e.VALUE&&g.previous.type===e.EQUALS)&&m.set_space_before_token(!1),g.type===e.ATTRIBUTE&&E.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(m.traverse_whitespace(g),P=P||g.newlines!==0),this._is_wrap_attributes_force)){var z=E.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&E.attr_count===1){var ee=!0,Q=0,q;do{if(q=L.peek(Q),q.type===e.ATTRIBUTE){ee=!1;break}Q+=1}while(Q<4&&q.type!==e.EOF&&q.type!==e.TAG_CLOSE);z=!ee}z&&(m.print_newline(!1),P=!0)}m.print_token(g),P=P||m.previous_token_wrapped(),E.has_wrapped_attrs=P}return j},d.prototype._handle_text=function(m,g,E){var L={text:g.text,type:"TK_CONTENT"};return E.custom_beautifier_name?this._print_custom_beatifier_text(m,g,E):E.is_unformatted||E.is_content_unformatted?m.add_raw_token(g):(m.traverse_whitespace(g),m.print_token(g)),L},d.prototype._print_custom_beatifier_text=function(m,g,E){var L=this;if(g.text!==""){var P=g.text,j,z=1,ee="",Q="";E.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?j=this._js_beautify:E.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?j=this._css_beautify:E.custom_beautifier_name==="html"&&(j=function(Fe,He){var Ke=new d(Fe,He,L._js_beautify,L._css_beautify);return Ke.beautify()}),this._options.indent_scripts==="keep"?z=0:this._options.indent_scripts==="separate"&&(z=-m.indent_level);var q=m.get_full_indent(z);if(P=P.replace(/\n[ \t]*$/,""),E.custom_beautifier_name!=="html"&&P[0]==="<"&&P.match(/^(<!--|<!\[CDATA\[)/)){var ae=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(P);if(!ae){m.add_raw_token(g);return}ee=q+ae[1]+`
`,P=ae[4],ae[5]&&(Q=q+ae[5]),P=P.replace(/\n[ \t]*$/,""),(ae[2]||ae[3].indexOf(`
`)!==-1)&&(ae=ae[3].match(/[ \t]+$/),ae&&(g.whitespace_before=ae[0]))}if(P)if(j){var ge=function(){this.eol=`
`};ge.prototype=this._options.raw_options;var pe=new ge;P=j(q+P,pe)}else{var Ne=g.whitespace_before;Ne&&(P=P.replace(new RegExp(`
(`+Ne+")?","g"),`
`)),P=q+P.replace(/\n/g,`
`+q)}ee&&(P?P=ee+P+`
`+Q:P=ee+Q),m.print_newline(!1),P&&(g.text=P,g.whitespace_before="",g.newlines=0,m.add_raw_token(g),m.print_newline(!0))}},d.prototype._handle_tag_open=function(m,g,E,L){var P=this._get_tag_open_token(g);return(E.is_unformatted||E.is_content_unformatted)&&!E.is_empty_element&&g.type===e.TAG_OPEN&&g.text.indexOf("</")===0?(m.add_raw_token(g),P.start_tag_token=this._tag_stack.try_pop(P.tag_name)):(m.traverse_whitespace(g),this._set_tag_position(m,g,P,E,L),P.is_inline_element||m.set_wrap_point(),m.print_token(g)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(P.alignment_size=g.text.length+1),!P.tag_complete&&!P.is_unformatted&&(m.alignment_size=P.alignment_size),P};var u=function(m,g){if(this.parent=m||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="",!g)this.tag_complete=!0;else{var E;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(E=g.text.match(/^<([^\s>]*)/),this.tag_check=E?E[1]:""):(E=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=E?E[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===e.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||g.closed&&g.closed.text==="/>";var L=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(L=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(L)))}};d.prototype._get_tag_open_token=function(m){var g=new u(this._tag_stack.get_parser_token(),m);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||_(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&_(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&_(g.tag_check,this._options.content_unformatted),g.is_inline_element=_(g.tag_name,this._options.inline)||g.tag_name.includes("-")||g.tag_start_char==="{",g},d.prototype._set_tag_position=function(m,g,E,L,P){if(E.is_empty_element||(E.is_end_tag?E.start_tag_token=this._tag_stack.try_pop(E.tag_name):(this._do_optional_end_element(E)&&(E.is_inline_element||m.print_newline(!1)),this._tag_stack.record_tag(E),(E.tag_name==="script"||E.tag_name==="style")&&!(E.is_unformatted||E.is_content_unformatted)&&(E.custom_beautifier_name=C(E.tag_check,g)))),_(E.tag_check,this._options.extra_liners)&&(m.print_newline(!1),m._output.just_added_blankline()||m.print_newline(!0)),E.is_empty_element){if(E.tag_start_char==="{"&&E.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),E.indent_content=!0;var j=m.current_line_has_match(/{{#if/);j||m.print_newline(!1)}E.tag_name==="!--"&&P.type===e.TAG_CLOSE&&L.is_end_tag&&E.text.indexOf(`
`)===-1||(E.is_inline_element||E.is_unformatted||m.print_newline(!1),this._calcluate_parent_multiline(m,E))}else if(E.is_end_tag){var z=!1;z=E.start_tag_token&&E.start_tag_token.multiline_content,z=z||!E.is_inline_element&&!(L.is_inline_element||L.is_unformatted)&&!(P.type===e.TAG_CLOSE&&E.start_tag_token===L)&&P.type!=="TK_CONTENT",(E.is_content_unformatted||E.is_unformatted)&&(z=!1),z&&m.print_newline(!1)}else E.indent_content=!E.custom_beautifier_name,E.tag_start_char==="<"&&(E.tag_name==="html"?E.indent_content=this._options.indent_inner_html:E.tag_name==="head"?E.indent_content=this._options.indent_head_inner_html:E.tag_name==="body"&&(E.indent_content=this._options.indent_body_inner_html)),!(E.is_inline_element||E.is_unformatted)&&(P.type!=="TK_CONTENT"||E.is_content_unformatted)&&m.print_newline(!1),this._calcluate_parent_multiline(m,E)},d.prototype._calcluate_parent_multiline=function(m,g){g.parent&&m._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var o=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],l=["a","audio","del","ins","map","noscript","video"];d.prototype._do_optional_end_element=function(m){var g=null;if(m.is_empty_element||!m.is_start_tag||!m.parent)return;if(m.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(m.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul"]);else if(m.tag_name==="dd"||m.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(m.parent.tag_name==="p"&&o.indexOf(m.tag_name)!==-1){var E=m.parent.parent;(!E||l.indexOf(E.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else m.tag_name==="rp"||m.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):m.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):m.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):m.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):m.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):m.tag_name==="tbody"||m.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):m.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(m.tag_name==="th"||m.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return m.parent=this._tag_stack.get_parser_token(),g},h.exports.Beautifier=d},function(h,b,A){var a=A(6).Options;function r(n){a.call(this,n,"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,h.exports.Options=r},function(h,b,A){var a=A(9).Tokenizer,r=A(9).TOKEN,n=A(13).Directives,e=A(14).TemplatablePattern,t=A(12).Pattern,i={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},s=new n(/<\!--/,/-->/),I=function(C,_){a.call(this,C,_),this._current_tag_name="";var x=new e(this._input).read_options(this._options),T=new t(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:T.starting_with(/{{!--/).until_after(/--}}/),handlebars:T.starting_with(/{{/).until_after(/}}/),handlebars_open:T.until(/[\n\r\t }]/),handlebars_raw_close:T.until(/}}/),comment:T.starting_with(/<!--/).until_after(/-->/),cdata:T.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:T.starting_with(/<!\[/).until_after(/]>/),processing:T.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 d=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=T.matching(d).until_after(d)}};I.prototype=new a,I.prototype._is_comment=function(C){return!1},I.prototype._is_opening=function(C){return C.type===i.TAG_OPEN},I.prototype._is_closing=function(C,_){return C.type===i.TAG_CLOSE&&_&&((C.text===">"||C.text==="/>")&&_.text[0]==="<"||C.text==="}}"&&_.text[0]==="{"&&_.text[1]==="{")},I.prototype._reset=function(){this._current_tag_name=""},I.prototype._get_next_token=function(C,_){var x=null;this._readWhitespace();var T=this._input.peek();return T===null?this._create_token(i.EOF,""):(x=x||this._read_open_handlebars(T,_),x=x||this._read_attribute(T,C,_),x=x||this._read_close(T,_),x=x||this._read_raw_content(T,C,_),x=x||this._read_content_word(T),x=x||this._read_comment_or_cdata(T),x=x||this._read_processing(T),x=x||this._read_open(T,_),x=x||this._create_token(i.UNKNOWN,this._input.next()),x)},I.prototype._read_comment_or_cdata=function(C){var _=null,x=null,T=null;if(C==="<"){var d=this._input.peek(1);d==="!"&&(x=this.__patterns.comment.read(),x?(T=s.get_directives(x),T&&T.ignore==="start"&&(x+=s.readIgnored(this._input))):x=this.__patterns.cdata.read()),x&&(_=this._create_token(i.COMMENT,x),_.directives=T)}return _},I.prototype._read_processing=function(C){var _=null,x=null,T=null;if(C==="<"){var d=this._input.peek(1);(d==="!"||d==="?")&&(x=this.__patterns.conditional_comment.read(),x=x||this.__patterns.processing.read()),x&&(_=this._create_token(i.COMMENT,x),_.directives=T)}return _},I.prototype._read_open=function(C,_){var x=null,T=null;return _||C==="<"&&(x=this._input.next(),this._input.peek()==="/"&&(x+=this._input.next()),x+=this.__patterns.element_name.read(),T=this._create_token(i.TAG_OPEN,x)),T},I.prototype._read_open_handlebars=function(C,_){var x=null,T=null;return _||this._options.indent_handlebars&&C==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(x=this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars.read(),T=this._create_token(i.COMMENT,x)):(x=this.__patterns.handlebars_open.read(),T=this._create_token(i.TAG_OPEN,x))),T},I.prototype._read_close=function(C,_){var x=null,T=null;return _&&(_.text[0]==="<"&&(C===">"||C==="/"&&this._input.peek(1)===">")?(x=this._input.next(),C==="/"&&(x+=this._input.next()),T=this._create_token(i.TAG_CLOSE,x)):_.text[0]==="{"&&C==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),T=this._create_token(i.TAG_CLOSE,"}}"))),T},I.prototype._read_attribute=function(C,_,x){var T=null,d="";if(x&&x.text[0]==="<")if(C==="=")T=this._create_token(i.EQUALS,this._input.next());else if(C==='"'||C==="'"){var u=this._input.next();C==='"'?u+=this.__patterns.double_quote.read():u+=this.__patterns.single_quote.read(),T=this._create_token(i.VALUE,u)}else d=this.__patterns.attribute.read(),d&&(_.type===i.EQUALS?T=this._create_token(i.VALUE,d):T=this._create_token(i.ATTRIBUTE,d));return T},I.prototype._is_content_unformatted=function(C){return this._options.void_elements.indexOf(C)===-1&&(this._options.content_unformatted.indexOf(C)!==-1||this._options.unformatted.indexOf(C)!==-1)},I.prototype._read_raw_content=function(C,_,x){var T="";if(x&&x.text[0]==="{")T=this.__patterns.handlebars_raw_close.read();else if(_.type===i.TAG_CLOSE&&_.opened.text[0]==="<"&&_.text[0]!=="/"){var d=_.opened.text.substr(1).toLowerCase();if(d==="script"||d==="style"){var u=this._read_comment_or_cdata(C);if(u)return u.type=i.TEXT,u;T=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(d)&&(T=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig")))}return T?this._create_token(i.TEXT,T):null},I.prototype._read_content_word=function(C){var _="";if(this._options.unformatted_content_delimiter&&(C===this._options.unformatted_content_delimiter[0]&&(_=this.__patterns.unformatted_content_delimiter.read())),_||(_=this.__patterns.word.read()),_)return this._create_token(i.TEXT,_)},h.exports.Tokenizer=I,h.exports.TOKEN=i}],M={};function N(h){var b=M[h];if(b!==void 0)return b.exports;var A=M[h]={exports:{}};return Z[h](A,A.exports,N),A.exports}var O=N(18);U=O})();var X=U;if(!0)!(ve=[re,re("6UM0"),re("TXwP")],J=function(Z){var M=re("6UM0"),N=re("TXwP");return{html_beautify:function(O,h){return X(O,h,M.js_beautify,N.css_beautify)}}}.apply(At,ve),J!==void 0&&(It.exports=J));else var F,R})()},"rAM+":function(It,At,re){"use strict";re.d(At,"a",function(){return J});var ve=re("Qw5x");function J(U,X){var F;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(F=Object(ve.a)(U))||X&&U&&typeof U.length=="number"){F&&(U=F);var R=0,Z=function(){};return{s:Z,n:function(){return R>=U.length?{done:!0}:{done:!1,value:U[R++]}},e:function(b){throw b},f:Z}}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 M=!0,N=!1,O;return{s:function(){F=U[Symbol.iterator]()},n:function(){var b=F.next();return M=b.done,b},e:function(b){N=!0,O=b},f:function(){try{!M&&F.return!=null&&F.return()}finally{if(N)throw O}}}}},rUJ1:function(It,At){const re=/[&<>"']/,ve=/[&<>"']/g,J=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,X={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},F=T=>X[T];function R(T,d){if(d){if(re.test(T))return T.replace(ve,F)}else if(J.test(T))return T.replace(U,F);return T}const Z=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function M(T){return T.replace(Z,(d,u)=>(u=u.toLowerCase(),u==="colon"?":":u.charAt(0)==="#"?u.charAt(1)==="x"?String.fromCharCode(parseInt(u.substring(2),16)):String.fromCharCode(+u.substring(1)):""))}const N=/(^|[^\[])\^/g;function O(T,d){T=T.source||T,d=d||"";const u={replace:(o,l)=>(l=l.source||l,l=l.replace(N,"$1"),T=T.replace(o,l),u),getRegex:()=>new RegExp(T,d)};return u}const h=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(T,d,u){if(T){let o;try{o=decodeURIComponent(M(u)).replace(h,"").toLowerCase()}catch(l){return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}d&&!b.test(u)&&(u=t(d,u));try{u=encodeURI(u).replace(/%25/g,"%")}catch(o){return null}return u}const a={},r=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,e=/^([^:]+:\/*[^/]*)[\s\S]*$/;function t(T,d){a[" "+T]||(r.test(T)?a[" "+T]=T+"/":a[" "+T]=C(T,"/",!0)),T=a[" "+T];const u=T.indexOf(":")===-1;return d.substring(0,2)==="//"?u?d:T.replace(n,"$1")+d:d.charAt(0)==="/"?u?d:T.replace(e,"$1")+d:T+d}const i={exec:function(){}};function s(T){let d=1,u,o;for(;d<arguments.length;d++){u=arguments[d];for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(T[o]=u[o])}return T}function I(T,d){const u=T.replace(/\|/g,(m,g,E)=>{let L=!1,P=g;for(;--P>=0&&E[P]==="\\";)L=!L;return L?"|":" |"}),o=u.split(/ \|/);let l=0;if(o.length>d)o.splice(d);else for(;o.length<d;)o.push("");for(;l<o.length;l++)o[l]=o[l].trim().replace(/\\\|/g,"|");return o}function C(T,d,u){const o=T.length;if(o===0)return"";let l=0;for(;l<o;){const m=T.charAt(o-l-1);if(m===d&&!u)l++;else if(m!==d&&u)l++;else break}return T.substr(0,o-l)}function _(T,d){if(T.indexOf(d[1])===-1)return-1;const u=T.length;let o=0,l=0;for(;l<u;l++)if(T[l]==="\\")l++;else if(T[l]===d[0])o++;else if(T[l]===d[1]&&(o--,o<0))return l;return-1}function x(T){T&&T.sanitize&&!T.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")}It.exports={escape:R,unescape:M,edit:O,cleanUrl:A,resolveUrl:t,noopTest:i,merge:s,splitCells:I,rtrim:C,findClosingBracket:_,checkSanitizeDeprecation:x}},"rd/4":function(It,At,re){It.exports=re.p+"static/noData.dc777645.png"},sR1s:function(It,At,re){"use strict";re.d(At,"b",function(){return X}),re.d(At,"a",function(){return F}),re.d(At,"c",function(){return R}),re.d(At,"d",function(){return Z});var ve=re("U8pU"),J="RC_TABLE_KEY";function U(M){return M==null?[]:Array.isArray(M)?M:[M]}function X(M,N){if(!N&&typeof N!="number")return M;for(var O=U(N),h=M,b=0;b<O.length;b+=1){if(!h)return null;var A=O[b];h=h[A]}return h}function F(M){var N=[],O={};return M.forEach(function(h){for(var b=h||{},A=b.key,a=b.dataIndex,r=A||U(a).join("-")||J;O[r];)r="".concat(r,"_next");O[r]=!0,N.push(r)}),N}function R(){var M={};function N(A,a){a&&Object.keys(a).forEach(function(r){var n=a[r];n&&Object(ve.a)(n)==="object"?(A[r]=A[r]||{},N(A[r],n)):A[r]=n})}for(var O=arguments.length,h=new Array(O),b=0;b<O;b++)h[b]=arguments[b];return h.forEach(function(A){N(M,A)}),M}function Z(M){return M!=null}},sboe:function(It,At,re){"use strict";re.d(At,"a",function(){return U});var ve=re("q1tI"),J=re.n(ve),U=ve.createContext(null)},t23M:function(It,At,re){"use strict";var ve=re("VTBJ"),J=re("1OyB"),U=re("vuIU"),X=re("Ji7U"),F=re("LK+K"),R=re("q1tI"),Z=re.n(R),M=re("m+aA"),N=re("Zm9Q"),O=re("Kwbf"),h=re("c+Xe"),b=re("bdgK"),A="rc-observer-key",a=function(r){Object(X.a)(e,r);var n=Object(F.a)(e);function e(){var t;return Object(J.a)(this,e),t=n.apply(this,arguments),t.resizeObserver=null,t.childNode=null,t.currentElement=null,t.state={width:0,height:0,offsetHeight:0,offsetWidth:0},t.onResize=function(i){var s=t.props.onResize,I=i[0].target,C=I.getBoundingClientRect(),_=C.width,x=C.height,T=I.offsetWidth,d=I.offsetHeight,u=Math.floor(_),o=Math.floor(x);if(t.state.width!==u||t.state.height!==o||t.state.offsetWidth!==T||t.state.offsetHeight!==d){var l={width:u,height:o,offsetWidth:T,offsetHeight:d};t.setState(l),s&&Promise.resolve().then(function(){s(Object(ve.a)(Object(ve.a)({},l),{},{offsetWidth:T,offsetHeight:d}))})}},t.setChildNode=function(i){t.childNode=i},t}return Object(U.a)(e,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var i=this.props.disabled;if(i){this.destroyObserver();return}var s=Object(M.a)(this.childNode||this),I=s!==this.currentElement;I&&(this.destroyObserver(),this.currentElement=s),!this.resizeObserver&&s&&(this.resizeObserver=new b.default(this.onResize),this.resizeObserver.observe(s))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var i=this.props.children,s=Object(N.a)(i);if(s.length>1)Object(O.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(s.length===0)return Object(O.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var I=s[0];if(R.isValidElement(I)&&Object(h.c)(I)){var C=I.ref;s[0]=R.cloneElement(I,{ref:Object(h.a)(C,this.setChildNode)})}return s.length===1?s[0]:s.map(function(_,x){return!R.isValidElement(_)||"key"in _&&_.key!==null?_:R.cloneElement(_,{key:"".concat(A,"-").concat(x)})})}}]),e}(R.Component);a.displayName="ResizeObserver",At.a=a},ulZh:function(It,At,re){typeof window!="undefined"&&function(J,U){It.exports=U()}(this,function(){return function(ve){var J={};function U(X){if(J[X])return J[X].exports;var F=J[X]={i:X,l:!1,exports:{}};return ve[X].call(F.exports,F,F.exports,U),F.l=!0,F.exports}return U.m=ve,U.c=J,U.d=function(X,F,R){U.o(X,F)||Object.defineProperty(X,F,{enumerable:!0,get:R})},U.r=function(X){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(X,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(X,"__esModule",{value:!0})},U.t=function(X,F){if(F&1&&(X=U(X)),F&8)return X;if(F&4&&typeof X=="object"&&X&&X.__esModule)return X;var R=Object.create(null);if(U.r(R),Object.defineProperty(R,"default",{enumerable:!0,value:X}),F&2&&typeof X!="string")for(var Z in X)U.d(R,Z,function(M){return X[M]}.bind(null,Z));return R},U.n=function(X){var F=X&&X.__esModule?function(){return X.default}:function(){return X};return U.d(F,"a",F),F},U.o=function(X,F){return Object.prototype.hasOwnProperty.call(X,F)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ve,J,U){"use strict";var X=Object.prototype.hasOwnProperty,F="~";function R(){}Object.create&&(R.prototype=Object.create(null),new R().__proto__||(F=!1));function Z(h,b,A){this.fn=h,this.context=b,this.once=A||!1}function M(h,b,A,a,r){if(typeof A!="function")throw new TypeError("The listener must be a function");var n=new Z(A,a||h,r),e=F?F+b:b;return h._events[e]?h._events[e].fn?h._events[e]=[h._events[e],n]:h._events[e].push(n):(h._events[e]=n,h._eventsCount++),h}function N(h,b){--h._eventsCount===0?h._events=new R:delete h._events[b]}function O(){this._events=new R,this._eventsCount=0}O.prototype.eventNames=function(){var b=[],A,a;if(this._eventsCount===0)return b;for(a in A=this._events)X.call(A,a)&&b.push(F?a.slice(1):a);return Object.getOwnPropertySymbols?b.concat(Object.getOwnPropertySymbols(A)):b},O.prototype.listeners=function(b){var A=F?F+b:b,a=this._events[A];if(!a)return[];if(a.fn)return[a.fn];for(var r=0,n=a.length,e=new Array(n);r<n;r++)e[r]=a[r].fn;return e},O.prototype.listenerCount=function(b){var A=F?F+b:b,a=this._events[A];return a?a.fn?1:a.length:0},O.prototype.emit=function(b,A,a,r,n,e){var t=F?F+b:b;if(!this._events[t])return!1;var i=this._events[t],s=arguments.length,I,C;if(i.fn){i.once&&this.removeListener(b,i.fn,void 0,!0);switch(s){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,A),!0;case 3:return i.fn.call(i.context,A,a),!0;case 4:return i.fn.call(i.context,A,a,r),!0;case 5:return i.fn.call(i.context,A,a,r,n),!0;case 6:return i.fn.call(i.context,A,a,r,n,e),!0}for(C=1,I=new Array(s-1);C<s;C++)I[C-1]=arguments[C];i.fn.apply(i.context,I)}else{var _=i.length,x;for(C=0;C<_;C++){i[C].once&&this.removeListener(b,i[C].fn,void 0,!0);switch(s){case 1:i[C].fn.call(i[C].context);break;case 2:i[C].fn.call(i[C].context,A);break;case 3:i[C].fn.call(i[C].context,A,a);break;case 4:i[C].fn.call(i[C].context,A,a,r);break;default:if(!I)for(x=1,I=new Array(s-1);x<s;x++)I[x-1]=arguments[x];i[C].fn.apply(i[C].context,I)}}}return!0},O.prototype.on=function(b,A,a){return M(this,b,A,a,!1)},O.prototype.once=function(b,A,a){return M(this,b,A,a,!0)},O.prototype.removeListener=function(b,A,a,r){var n=F?F+b:b;if(!this._events[n])return this;if(!A)return N(this,n),this;var e=this._events[n];if(e.fn)e.fn===A&&(!r||e.once)&&(!a||e.context===a)&&N(this,n);else{for(var t=0,i=[],s=e.length;t<s;t++)(e[t].fn!==A||r&&!e[t].once||a&&e[t].context!==a)&&i.push(e[t]);i.length?this._events[n]=i.length===1?i[0]:i:N(this,n)}return this},O.prototype.removeAllListeners=function(b){var A;return b?(A=F?F+b:b,this._events[A]&&N(this,A)):(this._events=new R,this._eventsCount=0),this},O.prototype.off=O.prototype.removeListener,O.prototype.addListener=O.prototype.on,O.prefixed=F,O.EventEmitter=O,ve.exports=O},"./node_modules/url-toolkit/src/url-toolkit.js":function(ve,J,U){(function(X){var F=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,R=/^([^\/?#]*)([^]*)$/,Z=/(?:\/|^)\.(?=\/)/g,M=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,N={buildAbsoluteURL:function(O,h,b){if(b=b||{},O=O.trim(),h=h.trim(),!h){if(!b.alwaysNormalize)return O;var A=N.parseURL(O);if(!A)throw new Error("Error trying to parse base URL.");return A.path=N.normalizePath(A.path),N.buildURLFromParts(A)}var a=N.parseURL(h);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return b.alwaysNormalize?(a.path=N.normalizePath(a.path),N.buildURLFromParts(a)):h;var r=N.parseURL(O);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&r.path[0]!=="/"){var n=R.exec(r.path);r.netLoc=n[1],r.path=n[2]}r.netLoc&&!r.path&&(r.path="/");var e={scheme:r.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(e.netLoc=r.netLoc,a.path[0]!=="/"))if(!a.path)e.path=r.path,a.params||(e.params=r.params,a.query||(e.query=r.query));else{var t=r.path,i=t.substring(0,t.lastIndexOf("/")+1)+a.path;e.path=N.normalizePath(i)}return e.path===null&&(e.path=b.alwaysNormalize?N.normalizePath(a.path):a.path),N.buildURLFromParts(e)},parseURL:function(O){var h=F.exec(O);return h?{scheme:h[1]||"",netLoc:h[2]||"",path:h[3]||"",params:h[4]||"",query:h[5]||"",fragment:h[6]||""}:null},normalizePath:function(O){for(O=O.split("").reverse().join("").replace(Z,"");O.length!==(O=O.replace(M,"")).length;);return O.split("").reverse().join("")},buildURLFromParts:function(O){return O.scheme+O.netLoc+O.path+O.params+O.query+O.fragment}};ve.exports=N})(this)},"./node_modules/webworkify-webpack/index.js":function(ve,J,U){function X(b){var A={};function a(n){if(A[n])return A[n].exports;var e=A[n]={i:n,l:!1,exports:{}};return b[n].call(e.exports,e,e.exports,a),e.l=!0,e.exports}a.m=b,a.c=A,a.i=function(n){return n},a.d=function(n,e,t){a.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:t})},a.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},a.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return a.d(e,"a",e),e},a.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},a.p="/",a.oe=function(n){throw console.error(n),n};var r=a(a.s=ENTRY_MODULE);return r.default||r}var F="[\\.|\\-|\\+|\\w|/|@]+",R="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+F+").*?\\)";function Z(b){return(b+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function M(b){return!isNaN(1*b)}function N(b,A,a){var r={};r[a]=[];var n=A.toString(),e=n.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!e)return r;for(var t=e[1],i=new RegExp("(\\\\n|\\W)"+Z(t)+R,"g"),s;s=i.exec(n);){if(s[3]==="dll-reference")continue;r[a].push(s[3])}for(i=new RegExp("\\("+Z(t)+'\\("(dll-reference\\s('+F+'))"\\)\\)'+R,"g");s=i.exec(n);)b[s[2]]||(r[a].push(s[1]),b[s[2]]=U(s[1]).m),r[s[2]]=r[s[2]]||[],r[s[2]].push(s[4]);for(var I=Object.keys(r),C=0;C<I.length;C++)for(var _=0;_<r[I[C]].length;_++)M(r[I[C]][_])&&(r[I[C]][_]=1*r[I[C]][_]);return r}function O(b){var A=Object.keys(b);return A.reduce(function(a,r){return a||b[r].length>0},!1)}function h(b,A){for(var a={main:[A]},r={main:[]},n={main:{}};O(a);)for(var e=Object.keys(a),t=0;t<e.length;t++){var i=e[t],s=a[i],I=s.pop();if(n[i]=n[i]||{},n[i][I]||!b[i][I])continue;n[i][I]=!0,r[i]=r[i]||[],r[i].push(I);for(var C=N(b,b[i][I],i),_=Object.keys(C),x=0;x<_.length;x++)a[_[x]]=a[_[x]]||[],a[_[x]]=a[_[x]].concat(C[_[x]])}return r}ve.exports=function(b,A){A=A||{};var a={main:U.m},r=A.all?{main:Object.keys(a.main)}:h(a,b),n="";Object.keys(r).filter(function(I){return I!=="main"}).forEach(function(I){for(var C=0;r[I][C];)C++;r[I].push(C),a[I][C]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",n=n+"var "+I+" = ("+X.toString().replace("ENTRY_MODULE",JSON.stringify(C))+")({"+r[I].map(function(_){return""+JSON.stringify(_)+": "+a[I][_].toString()}).join(",")+`});
`}),n=n+"new (("+X.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+r.main.map(function(I){return""+JSON.stringify(I)+": "+a.main[I].toString()}).join(",")+"}))(self);";var e=new window.Blob([n],{type:"text/javascript"});if(A.bare)return e;var t=window.URL||window.webkitURL||window.mozURL||window.msURL,i=t.createObjectURL(e),s=new window.Worker(i);return s.objectURL=i,s}},"./src/config.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"hlsDefaultConfig",function(){return x}),U.d(J,"mergeConfig",function(){return d}),U.d(J,"enableStreamingMode",function(){return u});var X=U("./src/controller/abr-controller.ts"),F=U("./src/controller/audio-stream-controller.ts"),R=U("./src/controller/audio-track-controller.ts"),Z=U("./src/controller/subtitle-stream-controller.ts"),M=U("./src/controller/subtitle-track-controller.ts"),N=U("./src/controller/buffer-controller.ts"),O=U("./src/controller/timeline-controller.ts"),h=U("./src/controller/cap-level-controller.ts"),b=U("./src/controller/fps-controller.ts"),A=U("./src/controller/eme-controller.ts"),a=U("./src/controller/cmcd-controller.ts"),r=U("./src/utils/xhr-loader.ts"),n=U("./src/utils/fetch-loader.ts"),e=U("./src/utils/cues.ts"),t=U("./src/utils/mediakeys-helper.ts"),i=U("./src/utils/logger.ts");function s(){return s=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var m=arguments[l];for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(o[g]=m[g])}return o},s.apply(this,arguments)}function I(o,l){var m=Object.keys(o);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(o);l&&(g=g.filter(function(E){return Object.getOwnPropertyDescriptor(o,E).enumerable})),m.push.apply(m,g)}return m}function C(o){for(var l=1;l<arguments.length;l++){var m=arguments[l]!=null?arguments[l]:{};l%2?I(Object(m),!0).forEach(function(g){_(o,g,m[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(m)):I(Object(m)).forEach(function(g){Object.defineProperty(o,g,Object.getOwnPropertyDescriptor(m,g))})}return o}function _(o,l,m){return l in o?Object.defineProperty(o,l,{value:m,enumerable:!0,configurable:!0,writable:!0}):o[l]=m,o}var x=C(C({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:X.default,bufferController:N.default,capLevelController:h.default,fpsController:b.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:t.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},T()),{},{subtitleStreamController:Z.SubtitleStreamController,subtitleTrackController:M.default,timelineController:O.TimelineController,audioStreamController:F.default,audioTrackController:R.default,emeController:A.default,cmcdController:a.default});function T(){return{cueHandler:e.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 d(o,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(l.liveMaxLatencyDurationCount!==void 0&&(l.liveSyncDurationCount===void 0||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(l.liveMaxLatencyDuration!==void 0&&(l.liveSyncDuration===void 0||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return s({},o,l)}function u(o){var l=o.loader;if(l!==n.default&&l!==r.default)i.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),o.progressive=!1;else{var m=Object(n.fetchSupported)();m&&(o.loader=n.default,o.progressive=!0,o.enableSoftwareAES=!0,i.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/polyfills/number.ts"),F=U("./src/utils/ewma-bandwidth-estimator.ts"),R=U("./src/events.ts"),Z=U("./src/utils/buffer-helper.ts"),M=U("./src/errors.ts"),N=U("./src/types/loader.ts"),O=U("./src/utils/logger.ts");function h(a,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,e.key,e)}}function b(a,r,n){return r&&h(a.prototype,r),n&&h(a,n),a}var A=function(){function a(n){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=n;var e=n.config;this.bwEstimator=new F.default(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate),this.registerListeners()}var r=a.prototype;return r.registerListeners=function(){var e=this.hls;e.on(R.Events.FRAG_LOADING,this.onFragLoading,this),e.on(R.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(R.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(R.Events.FRAG_LOADING,this.onFragLoading,this),e.off(R.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(R.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(e,t){var i=t.frag;if(i.type===N.PlaylistLevelType.MAIN&&!this.timer){var s;this.fragCurrent=i,this.partCurrent=(s=t.part)!=null?s:null,this.timer=self.setInterval(this.onCheck,100)}},r.onLevelLoaded=function(e,t){var i=this.hls.config;t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,i=this.hls,s=i.autoLevelEnabled,I=i.config,C=i.media;if(!e||!C)return;var _=t?t.stats:e.stats,x=t?t.duration:e.duration;if(_.aborted){O.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!s||C.paused||!C.playbackRate||!C.readyState)return;var T=performance.now()-_.loading.start,d=Math.abs(C.playbackRate);if(T<=500*x/d)return;var u=i.levels,o=i.minAutoLevel,l=u[e.level],m=_.total||Math.max(_.loaded,Math.round(x*l.maxBitrate/8)),g=Math.max(1,_.bwEstimate?_.bwEstimate/8:_.loaded*1e3/T),E=(m-_.loaded)/g,L=C.currentTime,P=(Z.BufferHelper.bufferInfo(C,L,I.maxBufferHole).end-L)/d;if(P>=2*x/d||E<=P)return;var j=Number.POSITIVE_INFINITY,z;for(z=e.level-1;z>o;z--){var ee=u[z].maxBitrate;if(j=x*ee/(8*.8*g),j<P)break}if(j>=E)return;var Q=this.bwEstimator.getEstimate();O.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+`
Current BW estimate: `+(Object(X.isFiniteNumber)(Q)?(Q/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+E.toFixed(3)+` s
Estimated load time for the next fragment: `+j.toFixed(3)+` s
Time to underbuffer: `+P.toFixed(3)+" s"),i.nextLoadLevel=z,this.bwEstimator.sample(T,_.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),i.trigger(R.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:_})},r.onFragLoaded=function(e,t){var i=t.frag,s=t.part;if(i.type===N.PlaylistLevelType.MAIN&&Object(X.isFiniteNumber)(i.sn)){var I=s?s.stats:i.stats,C=s?s.duration:i.duration;if(this.clearTimer(),this.lastLoadedFragLevel=i.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var _=this.hls.levels[i.level],x=(_.loaded?_.loaded.bytes:0)+I.loaded,T=(_.loaded?_.loaded.duration:0)+C;_.loaded={bytes:x,duration:T},_.realBitrate=Math.round(8*x/T)}if(i.bitrateTest){var d={stats:I,frag:i,part:s,id:i.type};this.onFragBuffered(R.Events.FRAG_BUFFERED,d),i.bitrateTest=!1}}},r.onFragBuffered=function(e,t){var i=t.frag,s=t.part,I=s?s.stats:i.stats;if(I.aborted)return;if(i.type!==N.PlaylistLevelType.MAIN||i.sn==="initSegment")return;var C=I.parsing.end-I.loading.start;this.bwEstimator.sample(C,I.loaded),I.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=C/1e3:this.bitrateTestDelay=0},r.onError=function(e,t){switch(t.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,i=this.hls,s=i.maxAutoLevel,I=i.config,C=i.minAutoLevel,_=i.media,x=t?t.duration:e?e.duration:0,T=_?_.currentTime:0,d=_&&_.playbackRate!==0?Math.abs(_.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():I.abrEwmaDefaultEstimate,o=(Z.BufferHelper.bufferInfo(_,T,I.maxBufferHole).end-T)/d,l=this.findBestLevel(u,C,s,o,I.abrBandWidthFactor,I.abrBandWidthUpFactor);if(l>=0)return l;O.logger.trace((o?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=x?Math.min(x,I.maxStarvationDelay):I.maxStarvationDelay,g=I.abrBandWidthFactor,E=I.abrBandWidthUpFactor;if(!o){var L=this.bitrateTestDelay;if(L){var P=x?Math.min(x,I.maxLoadingDelay):I.maxLoadingDelay;m=P-L,O.logger.trace("bitrate test took "+Math.round(1e3*L)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),g=E=1}}return l=this.findBestLevel(u,C,s,o+m,g,E),Math.max(l,0)},r.findBestLevel=function(e,t,i,s,I,C){for(var _,x=this.fragCurrent,T=this.partCurrent,d=this.lastLoadedFragLevel,u=this.hls.levels,o=u[d],l=!!(o!=null&&(_=o.details)!==null&&_!==void 0&&_.live),m=o==null?void 0:o.codecSet,g=T?T.duration:x?x.duration:0,E=i;E>=t;E--){var L=u[E];if(!L||m&&L.codecSet!==m)continue;var P=L.details,j=(T?P==null?void 0:P.partTarget:P==null?void 0:P.averagetargetduration)||g,z=void 0;E<=d?z=I*e:z=C*e;var ee=u[E].maxBitrate,Q=ee*j/z;if(O.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+E+"/"+Math.round(z)+"/"+ee+"/"+j+"/"+s+"/"+Q),z>ee&&(!Q||l&&!this.bitrateTestDelay||Q<s))return E}return-1},b(a,[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(e!==-1&&(!t||!t.canEstimate()))return e;var i=this.getNextABRAutoLevel();return e!==-1&&(i=Math.min(e,i)),i},set:function(e){this._nextAutoLevel=e}}]),a}();J.default=A},"./src/controller/audio-stream-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/polyfills/number.ts"),F=U("./src/controller/base-stream-controller.ts"),R=U("./src/events.ts"),Z=U("./src/utils/buffer-helper.ts"),M=U("./src/controller/fragment-tracker.ts"),N=U("./src/types/level.ts"),O=U("./src/types/loader.ts"),h=U("./src/loader/fragment.ts"),b=U("./src/demux/chunk-cache.ts"),A=U("./src/demux/transmuxer-interface.ts"),a=U("./src/types/transmuxer.ts"),r=U("./src/controller/fragment-finders.ts"),n=U("./src/utils/discontinuities.ts"),e=U("./src/errors.ts"),t=U("./src/utils/logger.ts");function i(){return i=Object.assign||function(x){for(var T=1;T<arguments.length;T++){var d=arguments[T];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(x[u]=d[u])}return x},i.apply(this,arguments)}function s(x,T){x.prototype=Object.create(T.prototype),x.prototype.constructor=x,I(x,T)}function I(x,T){return I=Object.setPrototypeOf||function(u,o){return u.__proto__=o,u},I(x,T)}var C=100,_=function(x){s(T,x);function T(u,o){var l;return l=x.call(this,u,o,"[audio-stream-controller]")||this,l.videoBuffer=null,l.videoTrackCC=-1,l.waitingVideoCC=-1,l.audioSwitch=!1,l.trackId=-1,l.waitingData=null,l.mainDetails=null,l.bufferFlushed=!1,l._registerListeners(),l}var d=T.prototype;return d.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},d._registerListeners=function(){var o=this.hls;o.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(R.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.on(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.on(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(R.Events.ERROR,this.onError,this),o.on(R.Events.BUFFER_RESET,this.onBufferReset,this),o.on(R.Events.BUFFER_CREATED,this.onBufferCreated,this),o.on(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.on(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},d._unregisterListeners=function(){var o=this.hls;o.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(R.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.off(R.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.off(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(R.Events.ERROR,this.onError,this),o.off(R.Events.BUFFER_RESET,this.onBufferReset,this),o.off(R.Events.BUFFER_CREATED,this.onBufferCreated,this),o.off(R.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.off(R.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this)},d.onInitPtsFound=function(o,l){var m=l.frag,g=l.id,E=l.initPTS;if(g==="main"){var L=m.cc;this.initPTS[m.cc]=E,this.log("InitPTS for cc: "+L+" found from main: "+E),this.videoTrackCC=L,this.state===F.State.WAITING_INIT_PTS&&this.tick()}},d.startLoad=function(o){if(!this.levels){this.startPosition=o,this.state=F.State.STOPPED;return}var l=this.lastCurrentTime;this.stopLoad(),this.setInterval(C),this.fragLoadError=0,l>0&&o===-1?(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),this.state=F.State.IDLE):(this.loadedmetadata=!1,this.state=F.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()},d.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_TRACK:{var o,l=this.levels,m=this.trackId,g=l==null||((o=l[m])===null||o===void 0)?void 0:o.details;if(g){if(this.waitForCdnTuneIn(g))break;this.state=F.State.WAITING_INIT_PTS}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var E,L=performance.now(),P=this.retryDate;(!P||L>=P||(E=this.media)!==null&&E!==void 0&&E.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=F.State.IDLE);break}case F.State.WAITING_INIT_PTS:{var j=this.waitingData;if(j){var z=j.frag,ee=j.part,Q=j.cache,q=j.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.FRAG_LOADING;var ae=Q.flush(),ge={frag:z,part:ee,payload:ae,networkDetails:null};this._handleFragmentLoadProgress(ge),q&&x.prototype._handleFragmentLoadComplete.call(this,ge)}else if(this.videoTrackCC!==this.waitingVideoCC)t.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var pe=this.getLoadPosition(),Ne=Z.BufferHelper.bufferInfo(this.mediaBuffer,pe,this.config.maxBufferHole),Fe=Object(r.fragmentWithinToleranceTest)(Ne.end,this.config.maxFragLookUpTolerance,z);Fe<0&&(t.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+Ne.end+" is needed"),this.clearWaitingFragment())}}else this.state=F.State.IDLE}}this.onTickEnd()},d.clearWaitingFragment=function(){var o=this.waitingData;o&&(this.fragmentTracker.removeFragment(o.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=F.State.IDLE)},d.onTickEnd=function(){var o=this.media;if(!o||!o.readyState)return;var l=this.mediaBuffer?this.mediaBuffer:o,m=l.buffered;!this.loadedmetadata&&m.length&&(this.loadedmetadata=!0),this.lastCurrentTime=o.currentTime},d.doTickIdle=function(){var o,l,m=this.hls,g=this.levels,E=this.media,L=this.trackId,P=m.config;if(!g||!g[L])return;if(!E&&(this.startFragRequested||!P.startFragPrefetch))return;var j=g[L],z=j.details;if(!z||z.live&&this.levelLastLoaded!==L||this.waitForCdnTuneIn(z)){this.state=F.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,h.ElementaryStreamTypes.AUDIO,O.PlaylistLevelType.AUDIO));var ee=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,O.PlaylistLevelType.AUDIO);if(ee===null)return;var Q=ee.len,q=this.getMaxBufferLength(),ae=this.audioSwitch;if(Q>=q&&!ae)return;if(!ae&&this._streamEnded(ee,z)){m.trigger(R.Events.BUFFER_EOS,{type:"audio"}),this.state=F.State.ENDED;return}var ge=z.fragments,pe=ge[0].start,Ne=ee.end;if(ae){var Fe=this.getLoadPosition();Ne=Fe,z.PTSKnown&&Fe<pe&&((ee.end>pe||ee.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),E.currentTime=pe+.05))}var He=this.getNextFragment(Ne,z);if(!He){this.bufferFlushed=!0;return}((o=He.decryptdata)===null||o===void 0?void 0:o.keyFormat)==="identity"&&!((l=He.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(He,z):this.loadFragment(He,z,Ne)},d.getMaxBufferLength=function(){var o=x.prototype.getMaxBufferLength.call(this),l=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,O.PlaylistLevelType.MAIN);return l===null?o:Math.max(o,l.len)},d.onMediaDetaching=function(){this.videoBuffer=null,x.prototype.onMediaDetaching.call(this)},d.onAudioTracksUpdated=function(o,l){var m=l.audioTracks;this.resetTransmuxer(),this.levels=m.map(function(g){return new N.Level(g)})},d.onAudioTrackSwitching=function(o,l){var m=!!l.url;this.trackId=l.id;var g=this.fragCurrent;g!=null&&g.loader&&g.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),m?this.setInterval(C):this.resetTransmuxer(),m?(this.audioSwitch=!0,this.state=F.State.IDLE):this.state=F.State.STOPPED,this.tick()},d.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},d.onLevelLoaded=function(o,l){this.mainDetails=l.details},d.onAudioTrackLoaded=function(o,l){var m,g=this.levels,E=l.details,L=l.id;if(!g){this.warn("Audio tracks were reset while loading level "+L);return}this.log("Track "+L+" loaded ["+E.startSN+","+E.endSN+"],duration:"+E.totalduration);var P=g[L],j=0;if(E.live||(m=P.details)!==null&&m!==void 0&&m.live){var z=this.mainDetails;if(E.fragments[0]||(E.deltaUpdateFailed=!0),E.deltaUpdateFailed||!z)return;!P.details&&E.hasProgramDateTime&&z.hasProgramDateTime?(Object(n.alignMediaPlaylistByPDT)(E,z),j=E.fragments[0].start):j=this.alignPlaylists(E,P.details)}P.details=E,this.levelLastLoaded=L,!this.startFragRequested&&(this.mainDetails||!E.live)&&this.setStartPosition(P.details,j),this.state===F.State.WAITING_TRACK&&!this.waitForCdnTuneIn(E)&&(this.state=F.State.IDLE),this.tick()},d._handleFragmentLoadProgress=function(o){var l,m=o.frag,g=o.part,E=o.payload,L=this.config,P=this.trackId,j=this.levels;if(!j){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+m.sn+" of level "+m.level+" will not be buffered");return}var z=j[P];console.assert(z,"Audio track is defined on fragment load progress");var ee=z.details;console.assert(ee,"Audio track details are defined on fragment load progress");var Q=L.defaultAudioCodec||z.audioCodec||"mp4a.40.2",q=this.transmuxer;q||(q=this.transmuxer=new A.default(this.hls,O.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ae=this.initPTS[m.cc],ge=(l=m.initSegment)===null||l===void 0?void 0:l.data;if(ae!==void 0){var pe=!1,Ne=g?g.index:-1,Fe=Ne!==-1,He=new a.ChunkMetadata(m.level,m.sn,m.stats.chunkCount,E.byteLength,Ne,Fe);q.push(E,ge,Q,"",m,g,ee.totalduration,pe,He,ae)}else{t.logger.log("Unknown video PTS for cc "+m.cc+", waiting for video PTS before demuxing audio frag "+m.sn+" of ["+ee.startSN+" ,"+ee.endSN+"],track "+P);var Ke=this.waitingData=this.waitingData||{frag:m,part:g,cache:new b.default,complete:!1},Xe=Ke.cache;Xe.push(new Uint8Array(E)),this.waitingVideoCC=this.videoTrackCC,this.state=F.State.WAITING_INIT_PTS}},d._handleFragmentLoadComplete=function(o){if(this.waitingData){this.waitingData.complete=!0;return}x.prototype._handleFragmentLoadComplete.call(this,o)},d.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},d.onBufferCreated=function(o,l){var m=l.tracks.audio;m&&(this.mediaBuffer=m.buffer),l.tracks.video&&(this.videoBuffer=l.tracks.video.buffer)},d.onFragBuffered=function(o,l){var m=l.frag,g=l.part;if(m.type!==O.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(m)){this.warn("Fragment "+m.sn+(g?" p: "+g.index:"")+" of level "+m.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}m.sn!=="initSegment"&&(this.fragPrevious=m,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(R.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(m,g)},d.onError=function(o,l){switch(l.details){case e.ErrorDetails.FRAG_LOAD_ERROR:case e.ErrorDetails.FRAG_LOAD_TIMEOUT:case e.ErrorDetails.KEY_LOAD_ERROR:case e.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(O.PlaylistLevelType.AUDIO,l);break;case e.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case e.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==F.State.ERROR&&this.state!==F.State.STOPPED&&(this.state=l.fatal?F.State.ERROR:F.State.IDLE,this.warn(l.details+" while loading frag, switching to "+this.state+" state"));break;case e.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="audio"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var m=!0,g=this.getFwdBufferInfo(this.mediaBuffer,O.PlaylistLevelType.AUDIO);g&&g.len>.5&&(m=!this.reduceMaxBufferLength(g.len)),m&&(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}},d.onBufferFlushed=function(o,l){var m=l.type;m===h.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},d._handleTransmuxComplete=function(o){var l,m="audio",g=this.hls,E=o.remuxResult,L=o.chunkMeta,P=this.getCurrentContext(L);if(!P){this.warn("The loading context changed while buffering fragment "+L.sn+" of level "+L.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(L.level);return}var j=P.frag,z=P.part,ee=E.audio,Q=E.text,q=E.id3,ae=E.initSegment;if(this.fragContextChanged(j))return;if(this.state=F.State.PARSING,this.audioSwitch&&ee&&this.completeAudioSwitch(),ae!=null&&ae.tracks&&(this._bufferInitSegment(ae.tracks,j,L),g.trigger(R.Events.FRAG_PARSING_INIT_SEGMENT,{frag:j,id:m,tracks:ae.tracks})),ee){var ge=ee.startPTS,pe=ee.endPTS,Ne=ee.startDTS,Fe=ee.endDTS;z&&(z.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:ge,endPTS:pe,startDTS:Ne,endDTS:Fe}),j.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,ge,pe,Ne,Fe),this.bufferFragmentData(ee,j,z,L)}if(q!=null&&(l=q.samples)!==null&&l!==void 0&&l.length){var He=i({frag:j,id:m},q);g.trigger(R.Events.FRAG_PARSING_METADATA,He)}if(Q){var Ke=i({frag:j,id:m},Q);g.trigger(R.Events.FRAG_PARSING_USERDATA,Ke)}},d._bufferInitSegment=function(o,l,m){if(this.state!==F.State.PARSING)return;o.video&&delete o.video;var g=o.audio;if(!g)return;g.levelCodec=g.codec,g.id="audio",this.log("Init audio buffer, container:"+g.container+", codecs[parsed]=["+g.codec+"]"),this.hls.trigger(R.Events.BUFFER_CODECS,o);var E=g.initSegment;if(E!=null&&E.byteLength){var L={type:"audio",frag:l,part:null,chunkMeta:m,parent:l.type,data:E};this.hls.trigger(R.Events.BUFFER_APPENDING,L)}this.tick()},d.loadFragment=function(o,l,m){var g=this.fragmentTracker.getState(o);this.fragCurrent=o,(this.audioSwitch||g===M.FragmentState.NOT_LOADED||g===M.FragmentState.PARTIAL)&&(o.sn==="initSegment"?this._loadInitSegment(o):l.live&&!Object(X.isFiniteNumber)(this.initPTS[o.cc])?(this.log("Waiting for video PTS in continuity counter "+o.cc+" of live stream before loading audio fragment "+o.sn+" of level "+this.trackId),this.state=F.State.WAITING_INIT_PTS):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,o,l,m)))},d.completeAudioSwitch=function(){var o=this.hls,l=this.media,m=this.trackId;l&&(this.log("Switching audio track : flushing all audio"),x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,o.trigger(R.Events.AUDIO_TRACK_SWITCHED,{id:m})},T}(F.default);J.default=_},"./src/controller/audio-track-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/events.ts"),F=U("./src/errors.ts"),R=U("./src/controller/base-playlist-controller.ts"),Z=U("./src/types/loader.ts");function M(A,a){for(var r=0;r<a.length;r++){var n=a[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,n.key,n)}}function N(A,a,r){return a&&M(A.prototype,a),r&&M(A,r),A}function O(A,a){A.prototype=Object.create(a.prototype),A.prototype.constructor=A,h(A,a)}function h(A,a){return h=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n},h(A,a)}var b=function(A){O(a,A);function a(n){var e;return e=A.call(this,n,"[audio-track-controller]")||this,e.tracks=[],e.groupId=null,e.tracksInGroup=[],e.trackId=-1,e.trackName="",e.selectDefaultTrack=!0,e.registerListeners(),e}var r=a.prototype;return r.registerListeners=function(){var e=this.hls;e.on(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(X.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(X.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(X.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(X.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(X.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(X.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(X.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(X.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,A.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(e,t){this.tracks=t.audioTracks||[]},r.onAudioTrackLoaded=function(e,t){var i=t.id,s=t.details,I=this.tracksInGroup[i];if(!I){this.warn("Invalid audio track id "+i);return}var C=I.details;I.details=t.details,this.log("audioTrack "+i+" loaded ["+s.startSN+"-"+s.endSN+"]"),i===this.trackId&&(this.retryCount=0,this.playlistLoaded(i,t,C))},r.onLevelLoading=function(e,t){this.switchLevel(t.level)},r.onLevelSwitching=function(e,t){this.switchLevel(t.level)},r.switchLevel=function(e){var t=this.hls.levels[e];if(!(t!=null&&t.audioGroupIds))return;var i=t.audioGroupIds[t.urlId];if(this.groupId!==i){this.groupId=i;var s=this.tracks.filter(function(C){return!i||C.groupId===i});this.selectDefaultTrack&&!s.some(function(C){return C.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=s;var I={audioTracks:s};this.log("Updating audio tracks, "+s.length+' track(s) found in "'+i+'" group-id'),this.hls.trigger(X.Events.AUDIO_TRACKS_UPDATED,I),this.selectInitialTrack()}},r.onError=function(e,t){if(A.prototype.onError.call(this,e,t),t.fatal||!t.context)return;t.context.type===Z.PlaylistContextType.AUDIO_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},r.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var i=t[this.trackId];this.log("Now switching to audio-track index "+e);var s=t[e],I=s.id,C=s.groupId,_=C===void 0?"":C,x=s.name,T=s.type,d=s.url;if(this.trackId=e,this.trackName=x,this.selectDefaultTrack=!1,this.hls.trigger(X.Events.AUDIO_TRACK_SWITCHING,{id:I,groupId:_,name:x,type:T,url:d}),s.details&&!s.details.live)return;var u=this.switchParams(s.url,i==null?void 0:i.details);this.loadPlaylist(u)},r.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,i=this.findTrackId(t)||this.findTrackId();i!==-1?this.setAudioTrack(i):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},r.findTrackId=function(e){for(var t=this.tracksInGroup,i=0;i<t.length;i++){var s=t[i];if((!this.selectDefaultTrack||s.default)&&(!e||e===s.name))return s.id}return-1},r.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var i=t.id,s=t.groupId,I=t.url;if(e)try{I=e.addDirectives(I)}catch(C){this.warn("Could not construct new URL with HLS Delivery Directives: "+C)}this.log("loading audio-track playlist for id: "+i),this.clearTimer(),this.hls.trigger(X.Events.AUDIO_TRACK_LOADING,{url:I,id:i,groupId:s,deliveryDirectives:e||null})}},N(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}]),a}(R.default);J.default=b},"./src/controller/base-playlist-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return N});var X=U("./src/polyfills/number.ts"),F=U("./src/types/level.ts"),R=U("./src/controller/level-helper.ts"),Z=U("./src/utils/logger.ts"),M=U("./src/errors.ts"),N=function(){function O(b,A){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=Z.logger.log.bind(Z.logger,A+":"),this.warn=Z.logger.warn.bind(Z.logger,A+":"),this.hls=b}var h=O.prototype;return h.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},h.onError=function(A,a){a.fatal&&a.type===M.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},h.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},h.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},h.stopLoad=function(){this.canLoad=!1,this.clearTimer()},h.switchParams=function(A,a){var r=a==null?void 0:a.renditionReports;if(r)for(var n=0;n<r.length;n++){var e=r[n],t=""+e.URI;if(t===A.substr(-t.length)){var i=parseInt(e["LAST-MSN"]),s=parseInt(e["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var I=Math.min(a.age-a.partTarget,a.targetduration);s!==void 0&&I>a.partTarget&&(s+=1)}if(Object(X.isFiniteNumber)(i))return new F.HlsUrlParameters(i,Object(X.isFiniteNumber)(s)?s:void 0,F.HlsSkip.No)}}},h.loadPlaylist=function(A){},h.shouldLoadTrack=function(A){return this.canLoad&&A&&!!A.url&&(!A.details||A.details.live)},h.playlistLoaded=function(A,a,r){var n=this,e=a.details,t=a.stats,i=t.loading.end?Math.max(0,self.performance.now()-t.loading.end):0;if(e.advancedDateTime=Date.now()-i,e.live||r!=null&&r.live){if(e.reloaded(r),r&&this.log("live playlist "+A+" "+(e.advanced?"REFRESHED "+e.lastPartSn+"-"+e.lastPartIndex:"MISSED")),r&&e.fragments.length>0&&Object(R.mergeDetails)(r,e),!this.canLoad||!e.live)return;var s,I=void 0,C=void 0;if(e.canBlockReload&&e.endSN&&e.advanced){var _=this.hls.config.lowLatencyMode,x=e.lastPartSn,T=e.endSN,d=e.lastPartIndex,u=d!==-1,o=x===T,l=_?0:d;u?(I=o?T+1:x,C=o?l:d+1):I=T+1;var m=e.age,g=m+e.ageHeader,E=Math.min(g-e.partTarget,e.targetduration*1.5);if(E>0){if(r&&E>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+E+" with playlist age: "+e.age),E=0;else{var L=Math.floor(E/e.targetduration);if(I+=L,C!==void 0){var P=Math.round(E%e.targetduration/e.partTarget);C+=P}this.log("CDN Tune-in age: "+e.ageHeader+"s last advanced "+m.toFixed(2)+"s goal: "+E+" skip sn "+L+" to part "+C)}e.tuneInGoal=E}if(s=this.getDeliveryDirectives(e,a.deliveryDirectives,I,C),_||!o){this.loadPlaylist(s);return}}else s=this.getDeliveryDirectives(e,a.deliveryDirectives,I,C);var j=Object(R.computeReloadInterval)(e,t);I!==void 0&&e.canBlockReload&&(j-=e.partTarget||1),this.log("reload live playlist "+A+" in "+Math.round(j)+" ms"),this.timer=self.setTimeout(function(){return n.loadPlaylist(s)},j)}else this.clearTimer()},h.getDeliveryDirectives=function(A,a,r,n){var e=Object(F.getSkipValue)(A,r);return a!=null&&a.skip&&A.deltaUpdateFailed&&(r=a.msn,n=a.part,e=F.HlsSkip.No),new F.HlsUrlParameters(r,n,e)},h.retryLoadingOrFail=function(A){var a=this,r=this.hls.config,n=this.retryCount<r.levelLoadingMaxRetry;if(n){var e;if(this.retryCount++,A.details.indexOf("LoadTimeOut")>-1&&(e=A.context)!==null&&e!==void 0&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+A.details+'"'),this.loadPlaylist();else{var t=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},t),this.warn("retry playlist loading #"+this.retryCount+" in "+t+' ms after "'+A.details+'"')}}else this.warn('cannot recover from error "'+A.details+'"'),this.clearTimer(),A.fatal=!0;return n},O}()},"./src/controller/base-stream-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"State",function(){return T}),U.d(J,"default",function(){return d});var X=U("./src/polyfills/number.ts"),F=U("./src/task-loop.ts"),R=U("./src/controller/fragment-tracker.ts"),Z=U("./src/utils/buffer-helper.ts"),M=U("./src/utils/logger.ts"),N=U("./src/events.ts"),O=U("./src/errors.ts"),h=U("./src/types/transmuxer.ts"),b=U("./src/utils/mp4-tools.ts"),A=U("./src/utils/discontinuities.ts"),a=U("./src/controller/fragment-finders.ts"),r=U("./src/controller/level-helper.ts"),n=U("./src/loader/fragment-loader.ts"),e=U("./src/crypt/decrypter.ts"),t=U("./src/utils/time-ranges.ts"),i=U("./src/types/loader.ts");function s(u,o){for(var l=0;l<o.length;l++){var m=o[l];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(u,m.key,m)}}function I(u,o,l){return o&&s(u.prototype,o),l&&s(u,l),u}function C(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function _(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,x(u,o)}function x(u,o){return x=Object.setPrototypeOf||function(m,g){return m.__proto__=g,m},x(u,o)}var T={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"},d=function(u){_(o,u);function o(m,g,E){var L;return L=u.call(this)||this,L.hls=void 0,L.fragPrevious=null,L.fragCurrent=null,L.fragmentTracker=void 0,L.transmuxer=null,L._state=T.STOPPED,L.media=void 0,L.mediaBuffer=void 0,L.config=void 0,L.bitrateTest=!1,L.lastCurrentTime=0,L.nextLoadPosition=0,L.startPosition=0,L.loadedmetadata=!1,L.fragLoadError=0,L.retryDate=0,L.levels=null,L.fragmentLoader=void 0,L.levelLastLoaded=null,L.startFragRequested=!1,L.decrypter=void 0,L.initPTS=[],L.onvseeking=null,L.onvended=null,L.logPrefix="",L.log=void 0,L.warn=void 0,L.logPrefix=E,L.log=M.logger.log.bind(M.logger,E+":"),L.warn=M.logger.warn.bind(M.logger,E+":"),L.hls=m,L.fragmentLoader=new n.default(m.config),L.fragmentTracker=g,L.config=m.config,L.decrypter=new e.default(m,m.config),m.on(N.Events.KEY_LOADED,L.onKeyLoaded,C(L)),L}var l=o.prototype;return l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(g){},l.stopLoad=function(){this.fragmentLoader.abort();var g=this.fragCurrent;g&&this.fragmentTracker.removeFragment(g),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=T.STOPPED},l._streamEnded=function(g,E){var L=this.fragCurrent,P=this.fragmentTracker;if(!E.live&&L&&L.sn===E.endSN&&!g.nextStart){var j=P.getState(L);return j===R.FragmentState.PARTIAL||j===R.FragmentState.OK}return!1},l.onMediaAttached=function(g,E){var L=this.media=this.mediaBuffer=E.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),L.addEventListener("seeking",this.onvseeking),L.addEventListener("ended",this.onvended);var P=this.config;this.levels&&P.autoStartLoad&&this.state===T.STOPPED&&this.startLoad(P.startPosition)},l.onMediaDetaching=function(){var g=this.media;g!=null&&g.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),g&&(g.removeEventListener("seeking",this.onvseeking),g.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},l.onMediaSeeking=function(){var g=this.config,E=this.fragCurrent,L=this.media,P=this.mediaBuffer,j=this.state,z=L?L.currentTime:0,ee=Z.BufferHelper.bufferInfo(P||L,z,g.maxBufferHole);if(this.log("media seeking to "+(Object(X.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+j),j===T.ENDED)this.resetLoadingState();else if(E&&!ee.len){var Q=g.maxFragLookUpTolerance,q=E.start-Q,ae=E.start+E.duration+Q,ge=z>ae;(z<q||ge)&&(ge&&E.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),E.loader.abort()),this.resetLoadingState())}L&&(this.lastCurrentTime=z),!this.loadedmetadata&&!ee.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},l.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},l.onKeyLoaded=function(g,E){if(this.state!==T.KEY_LOADING||E.frag!==this.fragCurrent||!this.levels)return;this.state=T.IDLE;var L=this.levels[E.frag.level].details;L&&this.loadFragment(E.frag,L,E.frag.start)},l.onHandlerDestroying=function(){this.stopLoad(),u.prototype.onHandlerDestroying.call(this)},l.onHandlerDestroyed=function(){this.state=T.STOPPED,this.hls.off(N.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,u.prototype.onHandlerDestroyed.call(this)},l.loadKey=function(g,E){this.log("Loading key for "+g.sn+" of ["+E.startSN+"-"+E.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level),this.state=T.KEY_LOADING,this.fragCurrent=g,this.hls.trigger(N.Events.KEY_LOADING,{frag:g})},l.loadFragment=function(g,E,L){this._loadFragForPlayback(g,E,L)},l._loadFragForPlayback=function(g,E,L){var P=this,j=function(ee){if(P.fragContextChanged(g)){P.warn("Fragment "+g.sn+(ee.part?" p: "+ee.part.index:"")+" of level "+g.level+" was dropped during download."),P.fragmentTracker.removeFragment(g);return}g.stats.chunkCount++,P._handleFragmentLoadProgress(ee)};this._doFragLoad(g,E,L,j).then(function(z){if(!z)return;P.fragLoadError=0;var ee=P.state;if(P.fragContextChanged(g)){(ee===T.FRAG_LOADING||ee===T.BACKTRACKING||!P.fragCurrent&&ee===T.PARSING)&&(P.fragmentTracker.removeFragment(g),P.state=T.IDLE);return}if("payload"in z&&(P.log("Loaded fragment "+g.sn+" of level "+g.level),P.hls.trigger(N.Events.FRAG_LOADED,z),P.state===T.BACKTRACKING)){P.fragmentTracker.backtrack(g,z),P.resetFragmentLoading(g);return}P._handleFragmentLoadComplete(z)}).catch(function(z){P.warn(z),P.resetFragmentLoading(g)})},l.flushMainBuffer=function(g,E,L){if(L===void 0&&(L=null),!(g-E))return;var P={startOffset:g,endOffset:E,type:L};this.fragLoadError=0,this.hls.trigger(N.Events.BUFFER_FLUSHING,P)},l._loadInitSegment=function(g){var E=this;this._doFragLoad(g).then(function(L){if(!L||E.fragContextChanged(g)||!E.levels)throw new Error("init load aborted");return L}).then(function(L){var P=E.hls,j=L.payload,z=g.decryptdata;if(j&&j.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var ee=self.performance.now();return E.decrypter.webCryptoDecrypt(new Uint8Array(j),z.key.buffer,z.iv.buffer).then(function(Q){var q=self.performance.now();return P.trigger(N.Events.FRAG_DECRYPTED,{frag:g,payload:Q,stats:{tstart:ee,tdecrypt:q}}),L.payload=Q,L})}return L}).then(function(L){var P=E.fragCurrent,j=E.hls,z=E.levels;if(!z)throw new Error("init load aborted, missing levels");var ee=z[g.level].details;console.assert(ee,"Level details are defined when init segment is loaded");var Q=g.stats;E.state=T.IDLE,E.fragLoadError=0,g.data=new Uint8Array(L.payload),Q.parsing.start=Q.buffering.start=self.performance.now(),Q.parsing.end=Q.buffering.end=self.performance.now(),L.frag===P&&j.trigger(N.Events.FRAG_BUFFERED,{stats:Q,frag:P,part:null,id:g.type}),E.tick()}).catch(function(L){E.warn(L),E.resetFragmentLoading(g)})},l.fragContextChanged=function(g){var E=this.fragCurrent;return!g||!E||g.level!==E.level||g.sn!==E.sn||g.urlId!==E.urlId},l.fragBufferedComplete=function(g,E){var L=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+g.type+" sn: "+g.sn+(E?" part: "+E.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level+" "+t.default.toString(Z.BufferHelper.getBuffered(L))),this.state=T.IDLE,this.tick()},l._handleFragmentLoadComplete=function(g){var E=this.transmuxer;if(!E)return;var L=g.frag,P=g.part,j=g.partsLoaded,z=!j||j.length===0||j.some(function(Q){return!Q}),ee=new h.ChunkMetadata(L.level,L.sn,L.stats.chunkCount+1,0,P?P.index:-1,!z);E.flush(ee)},l._handleFragmentLoadProgress=function(g){},l._doFragLoad=function(g,E,L,P){var j=this;if(L===void 0&&(L=null),!this.levels)throw new Error("frag load aborted, missing levels");if(L=Math.max(g.start,L||0),this.config.lowLatencyMode&&E){var z=E.partList;if(z&&P){L>g.end&&E.fragmentHint&&(g=E.fragmentHint);var ee=this.getNextPart(z,g,L);if(ee>-1){var Q=z[ee];return this.log("Loading part sn: "+g.sn+" p: "+Q.index+" cc: "+g.cc+" of playlist ["+E.startSN+"-"+E.endSN+"] parts [0-"+ee+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(L.toFixed(3))),this.nextLoadPosition=Q.start+Q.duration,this.state=T.FRAG_LOADING,this.hls.trigger(N.Events.FRAG_LOADING,{frag:g,part:z[ee],targetBufferTime:L}),this.doFragPartsLoad(g,z,ee,P).catch(function(q){return j.handleFragLoadError(q)})}else if(!g.url||this.loadedEndOfParts(z,L))return Promise.resolve(null)}}return this.log("Loading fragment "+g.sn+" cc: "+g.cc+" "+(E?"of ["+E.startSN+"-"+E.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(L.toFixed(3))),Object(X.isFiniteNumber)(g.sn)&&!this.bitrateTest&&(this.nextLoadPosition=g.start+g.duration),this.state=T.FRAG_LOADING,this.hls.trigger(N.Events.FRAG_LOADING,{frag:g,targetBufferTime:L}),this.fragmentLoader.load(g,P).catch(function(q){return j.handleFragLoadError(q)})},l.doFragPartsLoad=function(g,E,L,P){var j=this;return new Promise(function(z,ee){var Q=[],q=function ae(ge){var pe=E[ge];j.fragmentLoader.loadPart(g,pe,P).then(function(Ne){Q[pe.index]=Ne;var Fe=Ne.part;j.hls.trigger(N.Events.FRAG_LOADED,Ne);var He=E[ge+1];if(He&&He.fragment===g)ae(ge+1);else return z({frag:g,part:Fe,partsLoaded:Q})}).catch(ee)};q(L)})},l.handleFragLoadError=function(g){var E=g.data;return E&&E.details===O.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(E.frag,E.part):this.hls.trigger(N.Events.ERROR,E),null},l._handleTransmuxerFlush=function(g){var E=this.getCurrentContext(g);if(!E||this.state!==T.PARSING){this.fragCurrent||(this.state=T.IDLE);return}var L=E.frag,P=E.part,j=E.level,z=self.performance.now();L.stats.parsing.end=z,P&&(P.stats.parsing.end=z),this.updateLevelTiming(L,P,j,g.partial)},l.getCurrentContext=function(g){var E=this.levels,L=g.level,P=g.sn,j=g.part;if(!E||!E[L])return this.warn("Levels object was unset while buffering fragment "+P+" of level "+L+". The current chunk will not be buffered."),null;var z=E[L],ee=j>-1?Object(r.getPartWith)(z,P,j):null,Q=ee?ee.fragment:Object(r.getFragmentWithSN)(z,P,this.fragCurrent);return Q?{frag:Q,part:ee,level:z}:null},l.bufferFragmentData=function(g,E,L,P){if(!g||this.state!==T.PARSING)return;var j=g.data1,z=g.data2,ee=j;if(j&&z&&(ee=Object(b.appendUint8Array)(j,z)),!ee||!ee.length)return;var Q={type:g.type,frag:E,part:L,chunkMeta:P,parent:E.type,data:ee};this.hls.trigger(N.Events.BUFFER_APPENDING,Q),g.dropped&&g.independent&&!L&&this.flushBufferGap(E)},l.flushBufferGap=function(g){var E=this.media;if(!E)return;if(!Z.BufferHelper.isBuffered(E,E.currentTime)){this.flushMainBuffer(0,g.start);return}var L=E.currentTime,P=Z.BufferHelper.bufferInfo(E,L,0),j=g.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,j*.25),ee=Math.max(Math.min(g.start-z,P.end-z),L+z);g.start-ee>z&&this.flushMainBuffer(ee,g.start)},l.getFwdBufferInfo=function(g,E){var L=this.config,P=this.getLoadPosition();if(!Object(X.isFiniteNumber)(P))return null;var j=Z.BufferHelper.bufferInfo(g,P,L.maxBufferHole);if(j.len===0&&j.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(P,E);if(z&&j.nextStart<z.end)return Z.BufferHelper.bufferInfo(g,P,Math.max(j.nextStart,L.maxBufferHole))}return j},l.getMaxBufferLength=function(g){var E=this.config,L;return g?L=Math.max(8*E.maxBufferSize/g,E.maxBufferLength):L=E.maxBufferLength,Math.min(L,E.maxMaxBufferLength)},l.reduceMaxBufferLength=function(g){var E=this.config,L=g||E.maxBufferLength;return E.maxMaxBufferLength>=L?(E.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+E.maxMaxBufferLength+"s"),!0):!1},l.getNextFragment=function(g,E){var L,P,j=E.fragments,z=j.length;if(!z)return null;var ee=this.config,Q=j[0].start,q;if(E.live){var ae=ee.initialLiveManifestSize;if(z<ae)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+ae+")"),null;!E.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(q=this.getInitialLiveFragment(E,j),this.startPosition=q?this.hls.liveSyncPosition||q.start:g)}else g<=Q&&(q=j[0]);if(!q){var ge=ee.lowLatencyMode?E.partEnd:E.fragmentEnd;q=this.getFragmentAtPosition(g,ge,E)}return(L=q)!==null&&L!==void 0&&L.initSegment&&!((P=q)!==null&&P!==void 0&&P.initSegment.data)&&!this.bitrateTest&&(q=q.initSegment),q},l.getNextPart=function(g,E,L){for(var P=-1,j=!1,z=!0,ee=0,Q=g.length;ee<Q;ee++){var q=g[ee];if(z=z&&!q.independent,P>-1&&L<q.start)break;var ae=q.loaded;!ae&&(j||q.independent||z)&&q.fragment===E&&(P=ee),j=ae}return P},l.loadedEndOfParts=function(g,E){var L=g[g.length-1];return L&&E>L.start&&L.loaded},l.getInitialLiveFragment=function(g,E){var L=this.fragPrevious,P=null;if(L){if(g.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+L.programDateTime),P=Object(a.findFragmentByPDT)(E,L.endProgramDateTime,this.config.maxFragLookUpTolerance)),!P){var j=L.sn+1;if(j>=g.startSN&&j<=g.endSN){var z=E[j-g.startSN];L.cc===z.cc&&(P=z,this.log("Live playlist, switching playlist, load frag with next SN: "+P.sn))}P||(P=Object(a.findFragWithCC)(E,L.cc),P&&this.log("Live playlist, switching playlist, load frag with same CC: "+P.sn))}}else{var ee=this.hls.liveSyncPosition;ee!==null&&(P=this.getFragmentAtPosition(ee,this.bitrateTest?g.fragmentEnd:g.edge,g))}return P},l.getFragmentAtPosition=function(g,E,L){var P=this.config,j=this.fragPrevious,z=L.fragments,ee=L.endSN,Q=L.fragmentHint,q=P.maxFragLookUpTolerance,ae=!!(P.lowLatencyMode&&L.partList&&Q);ae&&Q&&!this.bitrateTest&&(z=z.concat(Q),ee=Q.sn);var ge;if(g<E){var pe=g>E-q?0:q;ge=Object(a.findFragmentByPTS)(j,z,g,pe)}else ge=z[z.length-1];if(ge){var Ne=ge.sn-L.startSN,Fe=j&&ge.level===j.level,He=z[Ne+1],Ke=this.fragmentTracker.getState(ge);if(Ke===R.FragmentState.BACKTRACKED){ge=null;for(var Xe=Ne;z[Xe]&&this.fragmentTracker.getState(z[Xe])===R.FragmentState.BACKTRACKED;)j?ge=z[Xe--]:ge=z[--Xe];ge||(ge=He)}else j&&ge.sn===j.sn&&!ae&&(Fe&&(ge.sn<ee&&this.fragmentTracker.getState(He)!==R.FragmentState.OK?(this.log("SN "+ge.sn+" just loaded, load next one: "+He.sn),ge=He):ge=null))}return ge},l.synchronizeToLiveEdge=function(g){var E=this.config,L=this.media;if(!L)return;var P=this.hls.liveSyncPosition,j=L.currentTime,z=g.fragments[0].start,ee=g.edge,Q=j>=z-E.maxFragLookUpTolerance&&j<=ee;if(P!==null&&L.duration>P&&(j<P||!Q)){var q=E.liveMaxLatencyDuration!==void 0?E.liveMaxLatencyDuration:E.liveMaxLatencyDurationCount*g.targetduration;(!Q&&L.readyState<4||j<ee-q)&&(this.loadedmetadata||(this.nextLoadPosition=P),L.readyState&&(this.warn("Playback: "+j.toFixed(3)+" is located too far from the end of live sliding playlist: "+ee+", reset currentTime to : "+P.toFixed(3)),L.currentTime=P))}},l.alignPlaylists=function(g,E){var L=this.levels,P=this.levelLastLoaded,j=this.fragPrevious,z=P!==null?L[P]:null,ee=g.fragments.length;if(!ee)return this.warn("No fragments in live playlist"),0;var Q=g.fragments[0].start,q=!E,ae=g.alignedSliding&&Object(X.isFiniteNumber)(Q);if(q||!ae&&!Q){Object(A.alignStream)(j,z,g);var ge=g.fragments[0].start;return this.log("Live playlist sliding: "+ge.toFixed(2)+" start-sn: "+(E?E.startSN:"na")+"->"+g.startSN+" prev-sn: "+(j?j.sn:"na")+" fragments: "+ee),ge}return Q},l.waitForCdnTuneIn=function(g){var E=3;return g.live&&g.canBlockReload&&g.tuneInGoal>Math.max(g.partHoldBack,g.partTarget*E)},l.setStartPosition=function(g,E){var L=this.startPosition;if(L<E&&(L=-1),L===-1||this.lastCurrentTime===-1){var P=g.startTimeOffset;Object(X.isFiniteNumber)(P)?(L=E+P,P<0&&(L+=g.totalduration),L=Math.min(Math.max(E,L),E+g.totalduration),this.log("Start time offset "+P+" found in playlist, adjust startPosition to "+L),this.startPosition=L):g.live?L=this.hls.liveSyncPosition||E:this.startPosition=L=0,this.lastCurrentTime=L}this.nextLoadPosition=L},l.getLoadPosition=function(){var g=this.media,E=0;return this.loadedmetadata&&g?E=g.currentTime:this.nextLoadPosition&&(E=this.nextLoadPosition),E},l.handleFragLoadAborted=function(g,E){this.transmuxer&&g.sn!=="initSegment"&&g.stats.aborted&&(this.warn("Fragment "+g.sn+(E?" part"+E.index:"")+" of level "+g.level+" was aborted"),this.resetFragmentLoading(g))},l.resetFragmentLoading=function(g){(!this.fragCurrent||!this.fragContextChanged(g))&&(this.state=T.IDLE)},l.onFragmentOrKeyLoadError=function(g,E){if(E.fatal)return;var L=E.frag;if(!L||L.type!==g)return;var P=this.fragCurrent;console.assert(P&&L.sn===P.sn&&L.level===P.level&&L.urlId===P.urlId,"Frag load error must match current frag to retry");var j=this.config;if(this.fragLoadError+1<=j.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(L.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*j.fragLoadingRetryDelay,j.fragLoadingMaxRetryTimeout);this.warn("Fragment "+L.sn+" of "+g+" "+L.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=T.FRAG_LOADING_WAITING_RETRY}else E.levelRetry?(g===i.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=T.IDLE):(M.logger.error(E.details+" reaches max retry, redispatch as fatal ..."),E.fatal=!0,this.hls.stopLoad(),this.state=T.ERROR)},l.afterBufferFlushed=function(g,E,L){if(!g)return;var P=Z.BufferHelper.getBuffered(g);this.fragmentTracker.detectEvictedFragments(E,P,L),this.state===T.ENDED&&this.resetLoadingState()},l.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=T.IDLE},l.resetLiveStartWhenNotLoaded=function(g){if(!this.loadedmetadata){this.startFragRequested=!1;var E=this.levels?this.levels[g].details:null;if(E!=null&&E.live)return this.startPosition=-1,this.setStartPosition(E,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},l.updateLevelTiming=function(g,E,L,P){var j=this,z=L.details;console.assert(!!z,"level.details must be defined");var ee=Object.keys(g.elementaryStreams).reduce(function(Q,q){var ae=g.elementaryStreams[q];if(ae){var ge=ae.endPTS-ae.startPTS;if(ge<=0)return j.warn("Could not parse fragment "+g.sn+" "+q+" duration reliably ("+ge+") resetting transmuxer to fallback to playlist timing"),j.resetTransmuxer(),Q||!1;var pe=P?0:Object(r.updateFragPTSDTS)(z,g,ae.startPTS,ae.endPTS,ae.startDTS,ae.endDTS);return j.hls.trigger(N.Events.LEVEL_PTS_UPDATED,{details:z,level:L,drift:pe,type:q,frag:g,start:ae.startPTS,end:ae.endPTS}),!0}return Q},!1);ee?(this.state=T.PARSED,this.hls.trigger(N.Events.FRAG_PARSED,{frag:g,part:E})):this.resetLoadingState()},l.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},I(o,[{key:"state",get:function(){return this._state},set:function(g){var E=this._state;E!==g&&(this._state=g,this.log(E+"->"+g))}}]),o}(F.default)},"./src/controller/buffer-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return a});var X=U("./src/polyfills/number.ts"),F=U("./src/events.ts"),R=U("./src/utils/logger.ts"),Z=U("./src/errors.ts"),M=U("./src/utils/buffer-helper.ts"),N=U("./src/utils/mediasource-helper.ts"),O=U("./src/loader/fragment.ts"),h=U("./src/controller/buffer-operation-queue.ts"),b=Object(N.getMediaSource)(),A=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function r(e){var t=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 i=t.hls,s=t.media,I=t.mediaSource;R.logger.log("[buffer-controller]: Media source opened"),s&&(t.updateMediaElementDuration(),i.trigger(F.Events.MEDIA_ATTACHED,{media:s})),I&&I.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){R.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){R.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var n=r.prototype;return n.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},n.destroy=function(){this.unregisterListeners(),this.details=null},n.registerListeners=function(){var t=this.hls;t.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(F.Events.BUFFER_RESET,this.onBufferReset,this),t.on(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(F.Events.BUFFER_EOS,this.onBufferEos,this),t.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(F.Events.FRAG_PARSED,this.onFragParsed,this),t.on(F.Events.FRAG_CHANGED,this.onFragChanged,this)},n.unregisterListeners=function(){var t=this.hls;t.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(F.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(F.Events.BUFFER_RESET,this.onBufferReset,this),t.off(F.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(F.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(F.Events.BUFFER_EOS,this.onBufferEos,this),t.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(F.Events.FRAG_PARSED,this.onFragParsed,this),t.off(F.Events.FRAG_CHANGED,this.onFragChanged,this)},n._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new h.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},n.onManifestParsed=function(t,i){var s=2;(i.audio&&!i.video||!i.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.details=null,R.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},n.onMediaAttaching=function(t,i){var s=this.media=i.media;if(s&&b){var I=this.mediaSource=new b;I.addEventListener("sourceopen",this._onMediaSourceOpen),I.addEventListener("sourceended",this._onMediaSourceEnded),I.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(I),this._objectUrl=s.src}},n.onMediaDetaching=function(){var t=this.media,i=this.mediaSource,s=this._objectUrl;if(i){if(R.logger.log("[buffer-controller]: media source detaching"),i.readyState==="open")try{i.endOfStream()}catch(I){R.logger.warn("[buffer-controller]: onMediaDetaching: "+I.message+" while calling endOfStream")}this.onBufferReset(),i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(s&&self.URL.revokeObjectURL(s),t.src===s?(t.removeAttribute("src"),t.load()):R.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(F.Events.MEDIA_DETACHED,void 0)},n.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach(function(i){var s=t.sourceBuffer[i];try{s&&(t.removeBufferListeners(i),t.mediaSource&&t.mediaSource.removeSourceBuffer(s),t.sourceBuffer[i]=void 0)}catch(I){R.logger.warn("[buffer-controller]: Failed to reset the "+i+" buffer",I)}}),this._initSourceBuffer()},n.onBufferCodecs=function(t,i){var s=this,I=this.getSourceBufferTypes().length;if(Object.keys(i).forEach(function(C){if(I){var _=s.tracks[C];if(_&&typeof _.buffer.changeType=="function"){var x=i[C],T=x.codec,d=x.levelCodec,u=x.container,o=(_.levelCodec||_.codec).replace(A,"$1"),l=(d||T).replace(A,"$1");if(o!==l){var m=u+";codecs="+(d||T);s.appendChangeType(C,m)}}}else s.pendingTracks[C]=i[C]}),I)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},n.appendChangeType=function(t,i){var s=this,I=this.operationQueue,C={execute:function(){var x=s.sourceBuffer[t];x&&(R.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+i),x.changeType(i)),I.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(x){R.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",x)}};I.append(C,t)},n.onBufferAppending=function(t,i){var s=this,I=this.hls,C=this.operationQueue,_=this.tracks,x=i.data,T=i.type,d=i.frag,u=i.part,o=i.chunkMeta,l=o.buffering[T],m=self.performance.now();l.start=m;var g=d.stats.buffering,E=u?u.stats.buffering:null;g.start===0&&(g.start=m),E&&E.start===0&&(E.start=m);var L=_.audio,P=T==="audio"&&o.id===1&&(L==null?void 0:L.container)==="audio/mpeg",j={execute:function(){if(l.executeStart=self.performance.now(),P){var ee=s.sourceBuffer[T];if(ee){var Q=d.start-ee.timestampOffset;Math.abs(Q)>=.1&&(R.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+d.start+" (delta: "+Q+") sn: "+d.sn+")"),ee.timestampOffset=d.start)}}s.appendExecutor(x,T)},onStart:function(){},onComplete:function(){var ee=self.performance.now();l.executeEnd=l.end=ee,g.first===0&&(g.first=ee),E&&E.first===0&&(E.first=ee);var Q=s.sourceBuffer,q={};for(var ae in Q)q[ae]=M.BufferHelper.getBuffered(Q[ae]);s.appendError=0,s.hls.trigger(F.Events.BUFFER_APPENDED,{type:T,frag:d,part:u,chunkMeta:o,parent:d.type,timeRanges:q})},onError:function(ee){R.logger.error("[buffer-controller]: Error encountered while trying to append to the "+T+" SourceBuffer",ee);var Q={type:Z.ErrorTypes.MEDIA_ERROR,parent:d.type,details:Z.ErrorDetails.BUFFER_APPEND_ERROR,err:ee,fatal:!1};ee.code===DOMException.QUOTA_EXCEEDED_ERR?Q.details=Z.ErrorDetails.BUFFER_FULL_ERROR:(s.appendError++,Q.details=Z.ErrorDetails.BUFFER_APPEND_ERROR,s.appendError>I.config.appendErrorMaxRetry&&(R.logger.error("[buffer-controller]: Failed "+I.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),Q.fatal=!0)),I.trigger(F.Events.ERROR,Q)}};C.append(j,T)},n.onBufferFlushing=function(t,i){var s=this,I=this.operationQueue,C=function(x){return{execute:s.removeExecutor.bind(s,x,i.startOffset,i.endOffset),onStart:function(){},onComplete:function(){s.hls.trigger(F.Events.BUFFER_FLUSHED,{type:x})},onError:function(d){R.logger.warn("[buffer-controller]: Failed to remove from "+x+" SourceBuffer",d)}}};i.type?I.append(C(i.type),i.type):this.getSourceBufferTypes().forEach(function(_){I.append(C(_),_)})},n.onFragParsed=function(t,i){var s=this,I=i.frag,C=i.part,_=[],x=C?C.elementaryStreams:I.elementaryStreams;x[O.ElementaryStreamTypes.AUDIOVIDEO]?_.push("audiovideo"):(x[O.ElementaryStreamTypes.AUDIO]&&_.push("audio"),x[O.ElementaryStreamTypes.VIDEO]&&_.push("video"));var T=function(){var u=self.performance.now();I.stats.buffering.end=u,C&&(C.stats.buffering.end=u);var o=C?C.stats:I.stats;s.hls.trigger(F.Events.FRAG_BUFFERED,{frag:I,part:C,stats:o,id:I.type})};_.length===0&&R.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+I.type+" level: "+I.level+" sn: "+I.sn),this.blockBuffers(T,_)},n.onFragChanged=function(t,i){this.flushBackBuffer()},n.onBufferEos=function(t,i){var s=this,I=this.getSourceBufferTypes().reduce(function(C,_){var x=s.sourceBuffer[_];return(!i.type||i.type===_)&&(x&&!x.ended&&(x.ended=!0,R.logger.log("[buffer-controller]: "+_+" sourceBuffer now EOS"))),C&&!!(!x||x.ended)},!0);I&&this.blockBuffers(function(){var C=s.mediaSource;if(!C||C.readyState!=="open")return;C.endOfStream()})},n.onLevelUpdated=function(t,i){var s=i.details;if(!s.fragments.length)return;this.details=s,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},n.flushBackBuffer=function(){var t=this.hls,i=this.details,s=this.media,I=this.sourceBuffer;if(!s||i===null)return;var C=this.getSourceBufferTypes();if(!C.length)return;var _=i.live&&t.config.liveBackBufferLength!==null?t.config.liveBackBufferLength:t.config.backBufferLength;if(!Object(X.isFiniteNumber)(_)||_<0)return;var x=s.currentTime,T=i.levelTargetDuration,d=Math.max(_,T),u=Math.floor(x/T)*T-d;C.forEach(function(o){var l=I[o];if(l){var m=M.BufferHelper.getBuffered(l);m.length>0&&u>m.start(0)&&(t.trigger(F.Events.BACK_BUFFER_REACHED,{bufferEnd:u}),i.live&&t.trigger(F.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:u}),t.trigger(F.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:u,type:o}))}})},n.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var t=this.details,i=this.hls,s=this.media,I=this.mediaSource,C=t.fragments[0].start+t.totalduration,_=s.duration,x=Object(X.isFiniteNumber)(I.duration)?I.duration:0;t.live&&i.config.liveDurationInfinity?(R.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),I.duration=Infinity,this.updateSeekableRange(t)):(C>x&&C>_||!Object(X.isFiniteNumber)(_))&&(R.logger.log("[buffer-controller]: Updating Media Source duration to "+C.toFixed(3)),I.duration=C)},n.updateSeekableRange=function(t){var i=this.mediaSource,s=t.fragments,I=s.length;if(I&&t.live&&i!==null&&i!==void 0&&i.setLiveSeekableRange){var C=Math.max(0,s[0].start),_=Math.max(C,C+t.totalduration);i.setLiveSeekableRange(C,_)}},n.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,i=this.operationQueue,s=this.pendingTracks,I=Object.keys(s).length;if(I&&!t||I===2){this.createSourceBuffers(s),this.pendingTracks={};var C=this.getSourceBufferTypes();if(C.length===0){this.hls.trigger(F.Events.ERROR,{type:Z.ErrorTypes.MEDIA_ERROR,details:Z.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}C.forEach(function(_){i.executeNext(_)})}},n.createSourceBuffers=function(t){var i=this.sourceBuffer,s=this.mediaSource;if(!s)throw Error("createSourceBuffers called when mediaSource was null");var I=0;for(var C in t)if(!i[C]){var _=t[C];if(!_)throw Error("source buffer exists for track "+C+", however track does not");var x=_.levelCodec||_.codec,T=_.container+";codecs="+x;R.logger.log("[buffer-controller]: creating sourceBuffer("+T+")");try{var d=i[C]=s.addSourceBuffer(T),u=C;this.addBufferListener(u,"updatestart",this._onSBUpdateStart),this.addBufferListener(u,"updateend",this._onSBUpdateEnd),this.addBufferListener(u,"error",this._onSBUpdateError),this.tracks[C]={buffer:d,codec:x,container:_.container,levelCodec:_.levelCodec,id:_.id},I++}catch(o){R.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+o.message),this.hls.trigger(F.Events.ERROR,{type:Z.ErrorTypes.MEDIA_ERROR,details:Z.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:o,mimeType:T})}}I&&this.hls.trigger(F.Events.BUFFER_CREATED,{tracks:this.tracks})},n._onSBUpdateStart=function(t){var i=this.operationQueue,s=i.current(t);s.onStart()},n._onSBUpdateEnd=function(t){var i=this.operationQueue,s=i.current(t);s.onComplete(),i.shiftAndExecuteNext(t)},n._onSBUpdateError=function(t,i){R.logger.error("[buffer-controller]: "+t+" SourceBuffer error",i),this.hls.trigger(F.Events.ERROR,{type:Z.ErrorTypes.MEDIA_ERROR,details:Z.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var s=this.operationQueue.current(t);s&&s.onError(i)},n.removeExecutor=function(t,i,s){var I=this.media,C=this.mediaSource,_=this.operationQueue,x=this.sourceBuffer,T=x[t];if(!I||!C||!T){R.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),_.shiftAndExecuteNext(t);return}var d=Object(X.isFiniteNumber)(I.duration)?I.duration:Infinity,u=Object(X.isFiniteNumber)(C.duration)?C.duration:Infinity,o=Math.max(0,i),l=Math.min(s,d,u);l>o?(R.logger.log("[buffer-controller]: Removing ["+o+","+l+"] from the "+t+" SourceBuffer"),console.assert(!T.updating,t+" sourceBuffer must not be updating"),T.remove(o,l)):_.shiftAndExecuteNext(t)},n.appendExecutor=function(t,i){var s=this.operationQueue,I=this.sourceBuffer,C=I[i];if(!C){R.logger.warn("[buffer-controller]: Attempting to append to the "+i+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(i);return}C.ended=!1,console.assert(!C.updating,i+" sourceBuffer must not be updating"),C.appendBuffer(t)},n.blockBuffers=function(t,i){var s=this;if(i===void 0&&(i=this.getSourceBufferTypes()),!i.length){R.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(t);return}var I=this.operationQueue,C=i.map(function(_){return I.appendBlocker(_)});Promise.all(C).then(function(){t(),i.forEach(function(_){var x=s.sourceBuffer[_];(!x||!x.updating)&&I.shiftAndExecuteNext(_)})})},n.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},n.addBufferListener=function(t,i,s){var I=this.sourceBuffer[t];if(!I)return;var C=s.bind(this,t);this.listeners[t].push({event:i,listener:C}),I.addEventListener(i,C)},n.removeBufferListeners=function(t){var i=this.sourceBuffer[t];if(!i)return;this.listeners[t].forEach(function(s){i.removeEventListener(s.event,s.listener)})},r}()},"./src/controller/buffer-operation-queue.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return F});var X=U("./src/utils/logger.ts"),F=function(){function R(M){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=M}var Z=R.prototype;return Z.append=function(N,O){var h=this.queues[O];h.push(N),h.length===1&&this.buffers[O]&&this.executeNext(O)},Z.insertAbort=function(N,O){var h=this.queues[O];h.unshift(N),this.executeNext(O)},Z.appendBlocker=function(N){var O,h=new Promise(function(A){O=A}),b={execute:O,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(b,N),h},Z.executeNext=function(N){var O=this.buffers,h=this.queues,b=O[N],A=h[N];if(A.length){var a=A[0];try{a.execute()}catch(r){X.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(r),(!b||!b.updating)&&(A.shift(),this.executeNext(N))}}},Z.shiftAndExecuteNext=function(N){this.queues[N].shift(),this.executeNext(N)},Z.current=function(N){return this.queues[N][0]},R}()},"./src/controller/cap-level-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/events.ts");function F(M,N){for(var O=0;O<N.length;O++){var h=N[O];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(M,h.key,h)}}function R(M,N,O){return N&&F(M.prototype,N),O&&F(M,O),M}var Z=function(){function M(O){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=O,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var N=M.prototype;return N.setStreamController=function(h){this.streamController=h},N.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},N.registerListeners=function(){var h=this.hls;h.on(X.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),h.on(X.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.on(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.on(X.Events.BUFFER_CODECS,this.onBufferCodecs,this),h.on(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},N.unregisterListener=function(){var h=this.hls;h.off(X.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),h.off(X.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.off(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),h.off(X.Events.BUFFER_CODECS,this.onBufferCodecs,this),h.off(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},N.onFpsDropLevelCapping=function(h,b){M.isLevelAllowed(b.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(b.droppedLevel)},N.onMediaAttaching=function(h,b){this.media=b.media instanceof HTMLVideoElement?b.media:null},N.onManifestParsed=function(h,b){var A=this.hls;this.restrictedLevels=[],this.firstLevel=b.firstLevel,A.config.capLevelToPlayerSize&&b.video&&this.startCapping()},N.onBufferCodecs=function(h,b){var A=this.hls;A.config.capLevelToPlayerSize&&b.video&&this.startCapping()},N.onMediaDetaching=function(){this.stopCapping()},N.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var h=this.hls.levels;if(h.length){var b=this.hls;b.autoLevelCapping=this.getMaxLevel(h.length-1),b.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=b.autoLevelCapping}}},N.getMaxLevel=function(h){var b=this,A=this.hls.levels;if(!A.length)return-1;var a=A.filter(function(r,n){return M.isLevelAllowed(n,b.restrictedLevels)&&n<=h});return this.clientRect=null,M.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},N.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()},N.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},N.getDimensions=function(){if(this.clientRect)return this.clientRect;var h=this.media,b={width:0,height:0};if(h){var A=h.getBoundingClientRect();b.width=A.width,b.height=A.height,!b.width&&!b.height&&(b.width=A.right-A.left||h.width||0,b.height=A.bottom-A.top||h.height||0)}return this.clientRect=b,b},M.isLevelAllowed=function(h,b){return b===void 0&&(b=[]),b.indexOf(h)===-1},M.getMaxLevelByMediaSize=function(h,b,A){if(!h||!h.length)return-1;for(var a=function(i,s){return s?i.width!==s.width||i.height!==s.height:!0},r=h.length-1,n=0;n<h.length;n+=1){var e=h[n];if((e.width>=b||e.height>=A)&&a(e,h[n+1])){r=n;break}}return r},R(M,[{key:"mediaWidth",get:function(){return this.getDimensions().width*M.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*M.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var h=1;try{h=self.devicePixelRatio}catch(b){}return h}}]),M}();J.default=Z},"./src/controller/cmcd-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return a});var X=U("./src/events.ts"),F=U("./src/types/cmcd.ts"),R=U("./src/utils/buffer-helper.ts"),Z=U("./src/utils/logger.ts");function M(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function N(r,n,e){return n&&M(r.prototype,n),e&&M(r,e),r}function O(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e)return(e=e.call(r)).next.bind(e);if(Array.isArray(r)||(e=h(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0;return function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}}}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 h(r,n){if(!r)return;if(typeof r=="string")return b(r,n);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return b(r,n)}function b(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function A(){return A=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},A.apply(this,arguments)}var a=function(){function r(e){var t=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(){t.initialized&&(t.starved=!0),t.buffering=!0},this.onPlaying=function(){t.initialized||(t.initialized=!0),t.buffering=!1},this.applyPlaylistData=function(I){try{t.apply(I,{ot:F.CMCDObjectType.MANIFEST,su:!t.initialized})}catch(C){Z.logger.warn("Could not generate manifest CMCD data.",C)}},this.applyFragmentData=function(I){try{var C=I.frag,_=t.hls.levels[C.level],x=t.getObjectType(C),T={d:C.duration*1e3,ot:x};(x===F.CMCDObjectType.VIDEO||x===F.CMCDObjectType.AUDIO||x==F.CMCDObjectType.MUXED)&&(T.br=_.bitrate/1e3,T.tb=t.getTopBandwidth(x),T.bl=t.getBufferLength(x)),t.apply(I,T)}catch(d){Z.logger.warn("Could not generate segment CMCD data.",d)}},this.hls=e;var i=this.config=e.config,s=i.cmcd;s!=null&&(i.pLoader=this.createPlaylistLoader(),i.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||r.uuid(),this.cid=s.contentId,this.useHeaders=s.useHeaders===!0,this.registerListeners())}var n=r.prototype;return n.registerListeners=function(){var t=this.hls;t.on(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(X.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.on(X.Events.BUFFER_CREATED,this.onBufferCreated,this)},n.unregisterListeners=function(){var t=this.hls;t.off(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(X.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.off(X.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},n.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},n.onMediaAttached=function(t,i){this.media=i.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},n.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},n.onBufferCreated=function(t,i){var s,I;this.audioBuffer=(s=i.tracks.audio)===null||s===void 0?void 0:s.buffer,this.videoBuffer=(I=i.tracks.video)===null||I===void 0?void 0:I.buffer},n.createData=function(){var t;return{v:F.CMCDVersion,sf:F.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(t=this.media)===null||t===void 0?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},n.apply=function(t,i){i===void 0&&(i={}),A(i,this.createData());var s=i.ot===F.CMCDObjectType.INIT||i.ot===F.CMCDObjectType.VIDEO||i.ot===F.CMCDObjectType.MUXED;if(this.starved&&s&&(i.bs=!0,i.su=!0,this.starved=!1),i.su==null&&(i.su=this.buffering),this.useHeaders){var I=r.toHeaders(i);if(!Object.keys(I).length)return;t.headers||(t.headers={}),A(t.headers,I)}else{var C=r.toQuery(i);if(!C)return;t.url=r.appendQueryToUri(t.url,C)}},n.getObjectType=function(t){var i=t.type;return i==="subtitle"?F.CMCDObjectType.TIMED_TEXT:t.sn==="initSegment"?F.CMCDObjectType.INIT:i==="audio"?F.CMCDObjectType.AUDIO:i==="main"?this.hls.audioTracks.length?F.CMCDObjectType.VIDEO:F.CMCDObjectType.MUXED:void 0},n.getTopBandwidth=function(t){for(var i=0,s=t===F.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,I=O(s),C;!(C=I()).done;){var _=C.value;_.bitrate>i&&(i=_.bitrate)}return i>0?i:NaN},n.getBufferLength=function(t){var i=this.hls.media,s=t===F.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!i)return NaN;var I=R.BufferHelper.bufferInfo(s,i.currentTime,this.config.maxBufferHole);return I.len*1e3},n.createPlaylistLoader=function(){var t=this.config.pLoader,i=this.applyPlaylistData,s=t||this.config.loader;return function(){function I(_){this.loader=void 0,this.loader=new s(_)}var C=I.prototype;return C.destroy=function(){this.loader.destroy()},C.abort=function(){this.loader.abort()},C.load=function(x,T,d){i(x),this.loader.load(x,T,d)},N(I,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),I}()},n.createFragmentLoader=function(){var t=this.config.fLoader,i=this.applyFragmentData,s=t||this.config.loader;return function(){function I(_){this.loader=void 0,this.loader=new s(_)}var C=I.prototype;return C.destroy=function(){this.loader.destroy()},C.abort=function(){this.loader.abort()},C.load=function(x,T,d){i(x),this.loader.load(x,T,d)},N(I,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),I}()},r.uuid=function(){var t=URL.createObjectURL(new Blob),i=t.toString();return URL.revokeObjectURL(t),i.substr(i.lastIndexOf("/")+1)},r.serialize=function(t){for(var i=[],s=function(P){return!Number.isNaN(P)&&P!=null&&P!==""&&P!==!1},I=function(P){return Math.round(P)},C=function(P){return I(P/100)*100},_=function(P){return encodeURIComponent(P)},x={br:I,d:I,bl:C,dl:C,mtp:C,nor:_,rtp:C,tb:I},T=Object.keys(t||{}).sort(),d=O(T),u;!(u=d()).done;){var o=u.value,l=t[o];if(!s(l))continue;if(o==="v"&&l===1)continue;if(o=="pr"&&l===1)continue;var m=x[o];m&&(l=m(l));var g=typeof l,E=void 0;o==="ot"||o==="sf"||o==="st"?E=o+"="+l:g==="boolean"?E=o:g==="number"?E=o+"="+l:E=o+"="+JSON.stringify(l),i.push(E)}return i.join(",")},r.toHeaders=function(t){for(var i=Object.keys(t),s={},I=["Object","Request","Session","Status"],C=[{},{},{},{}],_={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,T=i;x<T.length;x++){var d=T[x],u=_[d]!=null?_[d]:1;C[u][d]=t[d]}for(var o=0;o<C.length;o++){var l=r.serialize(C[o]);l&&(s["CMCD-"+I[o]]=l)}return s},r.toQuery=function(t){return"CMCD="+encodeURIComponent(r.serialize(t))},r.appendQueryToUri=function(t,i){if(!i)return t;var s=t.includes("?")?"&":"?";return""+t+s+i},r}()},"./src/controller/eme-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/events.ts"),F=U("./src/errors.ts"),R=U("./src/utils/logger.ts"),Z=U("./src/utils/mediakeys-helper.ts");function M(a,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,e.key,e)}}function N(a,r,n){return r&&M(a.prototype,r),n&&M(a,n),a}var O=3,h=function(r,n,e){var t={audioCapabilities:[],videoCapabilities:[]};return r.forEach(function(i){t.audioCapabilities.push({contentType:'audio/mp4; codecs="'+i+'"',robustness:e.audioRobustness||""})}),n.forEach(function(i){t.videoCapabilities.push({contentType:'video/mp4; codecs="'+i+'"',robustness:e.videoRobustness||""})}),[t]},b=function(r,n,e,t){switch(r){case Z.KeySystems.WIDEVINE:return h(n,e,t);default:throw new Error("Unknown key-system: "+r)}},A=function(){function a(n){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=n,this._config=n.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(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(X.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(X.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r._unregisterListeners=function(){this.hls.off(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(X.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(X.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r.getLicenseServerUrl=function(e){switch(e){case Z.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},r._attemptKeySystemAccess=function(e,t,i){var s=this,I=b(e,t,i,this._drmSystemOptions);R.logger.log("Requesting encrypted media key-system access");var C=this.requestMediaKeySystemAccess(e,I);this.mediaKeysPromise=C.then(function(_){return s._onMediaKeySystemAccessObtained(e,_)}),C.catch(function(_){R.logger.error('Failed to obtain key-system "'+e+'" access:',_)})},r._onMediaKeySystemAccessObtained=function(e,t){var i=this;R.logger.log('Access for key-system "'+e+'" obtained');var s={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(s);var I=Promise.resolve().then(function(){return t.createMediaKeys()}).then(function(C){return s.mediaKeys=C,R.logger.log('Media-keys created for key-system "'+e+'"'),i._onMediaKeysCreated(),C});return I.catch(function(C){R.logger.error("Failed to create media-keys:",C)}),I},r._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach(function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))})},r._onNewMediaKeySession=function(e){var t=this;R.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",function(i){t._onKeySessionMessage(e,i.message)},!1)},r._onKeySessionMessage=function(e,t){R.logger.log("Got EME message event, creating license request"),this._requestLicense(t,function(i){R.logger.log("Received license data (length: "+(i&&i.byteLength)+"), updating key-session"),e.update(i)})},r.onMediaEncrypted=function(e){var t=this;if(R.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),!this.mediaKeysPromise){R.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var i=function(I){if(!t._media)return;t._attemptSetMediaKeys(I),t._generateRequestWithPreferredKeySession(e.initDataType,e.initData)};this.mediaKeysPromise.then(i).catch(i)},r._attemptSetMediaKeys=function(e){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys){R.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}R.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},r._generateRequestWithPreferredKeySession=function(e,t){var i=this,s=this._mediaKeysList[0];if(!s){R.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(s.mediaKeysSessionInitialized){R.logger.warn("Key-Session already initialized but requested again");return}var I=s.mediaKeysSession;if(!I){R.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!t){R.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}R.logger.log('Generating key-session request for "'+e+'" init data type'),s.mediaKeysSessionInitialized=!0,I.generateRequest(e,t).then(function(){R.logger.debug("Key-session generation succeeded")}).catch(function(C){R.logger.error("Error generating key-session request:",C),i.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},r._createLicenseXhr=function(e,t,i){var s=new XMLHttpRequest;s.responseType="arraybuffer",s.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,s,e,t,i);var I=this._licenseXhrSetup;if(I)try{I.call(this.hls,s,e),I=void 0}catch(C){R.logger.error(C)}try{s.readyState||s.open("POST",e,!0),I&&I.call(this.hls,s,e)}catch(C){throw new Error("issue setting up KeySystem license XHR "+C)}return s},r._onLicenseRequestReadyStageChange=function(e,t,i,s){switch(e.readyState){case 4:if(e.status===200){this._requestLicenseFailureCount=0,R.logger.log("License request succeeded");var I=e.response,C=this._licenseResponseCallback;if(C)try{I=C.call(this.hls,e,t)}catch(x){R.logger.error(x)}s(I)}else{if(R.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>O){this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var _=O-this._requestLicenseFailureCount+1;R.logger.warn("Retrying license request, "+_+" attempts left"),this._requestLicense(i,s)}break}},r._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case Z.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},r._requestLicense=function(e,t){R.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i){R.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var s=this.getLicenseServerUrl(i.mediaKeySystemDomain),I=this._createLicenseXhr(s,e,t);R.logger.log("Sending license request to URL: "+s);var C=this._generateLicenseRequestChallenge(i,e);I.send(C)}catch(_){R.logger.error("Failure requesting DRM license: "+_),this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.KEY_SYSTEM_ERROR,details:F.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},r.onMediaAttached=function(e,t){if(!this._emeEnabled)return;var i=t.media;this._media=i,i.addEventListener("encrypted",this._onMediaEncrypted)},r.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;if(!e)return;e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map(function(i){if(i.mediaKeysSession)return i.mediaKeysSession.close().catch(function(){})})).then(function(){return e.setMediaKeys(null)}).catch(function(){})},r.onManifestParsed=function(e,t){if(!this._emeEnabled)return;var i=t.levels.map(function(I){return I.audioCodec}).filter(function(I){return!!I}),s=t.levels.map(function(I){return I.videoCodec}).filter(function(I){return!!I});this._attemptKeySystemAccess(Z.KeySystems.WIDEVINE,i,s)},N(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();J.default=A},"./src/controller/fps-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/events.ts"),F=U("./src/utils/logger.ts"),R=function(){function Z(N){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=N,this.registerListeners()}var M=Z.prototype;return M.setStreamController=function(O){this.streamController=O},M.registerListeners=function(){this.hls.on(X.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},M.unregisterListeners=function(){this.hls.off(X.Events.MEDIA_ATTACHING,this.onMediaAttaching)},M.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},M.onMediaAttaching=function(O,h){var b=this.hls.config;if(b.capLevelOnFPSDrop){var A=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=A,A&&typeof A.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),b.fpsDroppedMonitoringPeriod)}},M.checkFPS=function(O,h,b){var A=performance.now();if(h){if(this.lastTime){var a=A-this.lastTime,r=b-this.lastDroppedFrames,n=h-this.lastDecodedFrames,e=1e3*r/a,t=this.hls;if(t.trigger(X.Events.FPS_DROP,{currentDropped:r,currentDecoded:n,totalDroppedFrames:b}),e>0&&r>t.config.fpsDroppedMonitoringThreshold*n){var i=t.currentLevel;F.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+i),i>0&&(t.autoLevelCapping===-1||t.autoLevelCapping>=i)&&(i=i-1,t.trigger(X.Events.FPS_DROP_LEVEL_CAPPING,{level:i,droppedLevel:t.currentLevel}),t.autoLevelCapping=i,this.streamController.nextLevelSwitch())}}this.lastTime=A,this.lastDroppedFrames=b,this.lastDecodedFrames=h}},M.checkFPSInterval=function(){var O=this.media;if(O)if(this.isVideoPlaybackQualityAvailable){var h=O.getVideoPlaybackQuality();this.checkFPS(O,h.totalVideoFrames,h.droppedVideoFrames)}else this.checkFPS(O,O.webkitDecodedFrameCount,O.webkitDroppedFrameCount)},Z}();J.default=R},"./src/controller/fragment-finders.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"findFragmentByPDT",function(){return R}),U.d(J,"findFragmentByPTS",function(){return Z}),U.d(J,"fragmentWithinToleranceTest",function(){return M}),U.d(J,"pdtWithinToleranceTest",function(){return N}),U.d(J,"findFragWithCC",function(){return O});var X=U("./src/polyfills/number.ts"),F=U("./src/utils/binary-search.ts");function R(h,b,A){if(b===null||!Array.isArray(h)||!h.length||!Object(X.isFiniteNumber)(b))return null;var a=h[0].programDateTime;if(b<(a||0))return null;var r=h[h.length-1].endProgramDateTime;if(b>=(r||0))return null;A=A||0;for(var n=0;n<h.length;++n){var e=h[n];if(N(b,A,e))return e}return null}function Z(h,b,A,a){A===void 0&&(A=0),a===void 0&&(a=0);var r=null;if(h?r=b[h.sn-b[0].sn+1]||null:A===0&&b[0].start===0&&(r=b[0]),r&&M(A,a,r)===0)return r;var n=F.default.search(b,M.bind(null,A,a));return n||r}function M(h,b,A){h===void 0&&(h=0),b===void 0&&(b=0);var a=Math.min(b,A.duration+(A.deltaPTS?A.deltaPTS:0));return A.start+A.duration-a<=h?1:A.start-a>h&&A.start?-1:0}function N(h,b,A){var a=Math.min(b,A.duration+(A.deltaPTS?A.deltaPTS:0))*1e3,r=A.endProgramDateTime||0;return r-a>h}function O(h,b){return F.default.search(h,function(A){return A.cc<b?1:A.cc>b?-1:0})}},"./src/controller/fragment-tracker.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"FragmentState",function(){return R}),U.d(J,"FragmentTracker",function(){return Z});var X=U("./src/events.ts"),F=U("./src/types/loader.ts"),R;(function(O){O.NOT_LOADED="NOT_LOADED",O.BACKTRACKED="BACKTRACKED",O.APPENDING="APPENDING",O.PARTIAL="PARTIAL",O.OK="OK"})(R||(R={}));var Z=function(){function O(b){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=b,this._registerListeners()}var h=O.prototype;return h._registerListeners=function(){var A=this.hls;A.on(X.Events.BUFFER_APPENDED,this.onBufferAppended,this),A.on(X.Events.FRAG_BUFFERED,this.onFragBuffered,this),A.on(X.Events.FRAG_LOADED,this.onFragLoaded,this)},h._unregisterListeners=function(){var A=this.hls;A.off(X.Events.BUFFER_APPENDED,this.onBufferAppended,this),A.off(X.Events.FRAG_BUFFERED,this.onFragBuffered,this),A.off(X.Events.FRAG_LOADED,this.onFragLoaded,this)},h.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},h.getAppendedFrag=function(A,a){if(a===F.PlaylistLevelType.MAIN){var r=this.activeFragment,n=this.activeParts;if(!r)return null;if(n)for(var e=n.length;e--;){var t=n[e],i=t?t.end:r.appendedPTS;if(t.start<=A&&i!==void 0&&A<=i)return e>9&&(this.activeParts=n.slice(e-9)),t}else if(r.start<=A&&r.appendedPTS!==void 0&&A<=r.appendedPTS)return r}return this.getBufferedFrag(A,a)},h.getBufferedFrag=function(A,a){for(var r=this.fragments,n=Object.keys(r),e=n.length;e--;){var t=r[n[e]];if((t==null?void 0:t.body.type)===a&&t.buffered){var i=t.body;if(i.start<=A&&A<=i.end)return i}}return null},h.detectEvictedFragments=function(A,a,r){var n=this;Object.keys(this.fragments).forEach(function(e){var t=n.fragments[e];if(!t)return;if(!t.buffered){t.body.type===r&&n.removeFragment(t.body);return}var i=t.range[A];if(!i)return;i.time.some(function(s){var I=!n.isTimeBuffered(s.startPTS,s.endPTS,a);return I&&n.removeFragment(t.body),I})})},h.detectPartialFragments=function(A){var a=this,r=this.timeRanges,n=A.frag,e=A.part;if(!r||n.sn==="initSegment")return;var t=N(n),i=this.fragments[t];if(!i)return;Object.keys(r).forEach(function(s){var I=n.elementaryStreams[s];if(!I)return;var C=r[s],_=e!==null||I.partial===!0;i.range[s]=a.getBufferedTimes(n,e,_,C)}),i.backtrack=i.loaded=null,Object.keys(i.range).length?i.buffered=!0:this.removeFragment(i.body)},h.fragBuffered=function(A){var a=N(A),r=this.fragments[a];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},h.getBufferedTimes=function(A,a,r,n){for(var e={time:[],partial:r},t=a?a.start:A.start,i=a?a.end:A.end,s=A.minEndPTS||i,I=A.maxStartPTS||t,C=0;C<n.length;C++){var _=n.start(C)-this.bufferPadding,x=n.end(C)+this.bufferPadding;if(I>=_&&s<=x){e.time.push({startPTS:Math.max(t,n.start(C)),endPTS:Math.min(i,n.end(C))});break}else if(t<x&&i>_)e.partial=!0,e.time.push({startPTS:Math.max(t,n.start(C)),endPTS:Math.min(i,n.end(C))});else if(i<=_)break}return e},h.getPartialFragment=function(A){var a=null,r,n,e,t=0,i=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach(function(I){var C=s[I];if(!C)return;M(C)&&(n=C.body.start-i,e=C.body.end+i,A>=n&&A<=e&&(r=Math.min(A-n,e-A),t<=r&&(a=C.body,t=r)))}),a},h.getState=function(A){var a=N(A),r=this.fragments[a];return r?r.buffered?M(r)?R.PARTIAL:R.OK:r.backtrack?R.BACKTRACKED:R.APPENDING:R.NOT_LOADED},h.backtrack=function(A,a){var r=N(A),n=this.fragments[r];if(!n||n.backtrack)return null;var e=n.backtrack=a||n.loaded;return n.loaded=null,e},h.getBacktrackData=function(A){var a=N(A),r=this.fragments[a];if(r){var n,e=r.backtrack;if(e!=null&&(n=e.payload)!==null&&n!==void 0&&n.byteLength)return e;this.removeFragment(A)}return null},h.isTimeBuffered=function(A,a,r){for(var n,e,t=0;t<r.length;t++){if(n=r.start(t)-this.bufferPadding,e=r.end(t)+this.bufferPadding,A>=n&&a<=e)return!0;if(a<=n)return!1}return!1},h.onFragLoaded=function(A,a){var r=a.frag,n=a.part;if(r.sn==="initSegment"||r.bitrateTest||n)return;var e=N(r);this.fragments[e]={body:r,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},h.onBufferAppended=function(A,a){var r=this,n=a.frag,e=a.part,t=a.timeRanges;if(n.type===F.PlaylistLevelType.MAIN)if(this.activeFragment=n,e){var i=this.activeParts;i||(this.activeParts=i=[]),i.push(e)}else this.activeParts=null;this.timeRanges=t,Object.keys(t).forEach(function(s){var I=t[s];if(r.detectEvictedFragments(s,I),!e)for(var C=0;C<I.length;C++)n.appendedPTS=Math.max(I.end(C),n.appendedPTS||0)})},h.onFragBuffered=function(A,a){this.detectPartialFragments(a)},h.hasFragment=function(A){var a=N(A);return!!this.fragments[a]},h.removeFragmentsInRange=function(A,a,r){var n=this;Object.keys(this.fragments).forEach(function(e){var t=n.fragments[e];if(!t)return;if(t.buffered){var i=t.body;i.type===r&&i.start<a&&i.end>A&&n.removeFragment(i)}})},h.removeFragment=function(A){var a=N(A);A.stats.loaded=0,A.clearElementaryStreamInfo(),delete this.fragments[a]},h.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},O}();function M(O){var h,b;return O.buffered&&(((h=O.range.video)===null||h===void 0?void 0:h.partial)||((b=O.range.audio)===null||b===void 0?void 0:b.partial))}function N(O){return O.type+"_"+O.level+"_"+O.urlId+"_"+O.sn}},"./src/controller/gap-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"STALL_MINIMUM_DURATION_MS",function(){return M}),U.d(J,"MAX_START_GAP_JUMP",function(){return N}),U.d(J,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return O}),U.d(J,"SKIP_BUFFER_RANGE_START",function(){return h}),U.d(J,"default",function(){return b});var X=U("./src/utils/buffer-helper.ts"),F=U("./src/errors.ts"),R=U("./src/events.ts"),Z=U("./src/utils/logger.ts"),M=250,N=2,O=.1,h=.05,b=function(){function A(r,n,e,t){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=n,this.fragmentTracker=e,this.hls=t}var a=A.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(n){var e=this.config,t=this.media,i=this.stalled,s=t.currentTime,I=t.seeking,C=this.seeking&&!I,_=!this.seeking&&I;if(this.seeking=I,s!==n){if(this.moved=!0,i!==null){if(this.stallReported){var x=self.performance.now()-i;Z.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(x)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||C)&&(this.stalled=null),t.paused||t.ended||t.playbackRate===0||!X.BufferHelper.getBuffered(t).length)return;var T=X.BufferHelper.bufferInfo(t,s,0),d=T.len>0,u=T.nextStart||0;if(!d&&!u)return;if(I){var o=T.len>N,l=!u||u-s>N&&!this.fragmentTracker.getPartialFragment(s);if(o||l)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var m,g=Math.max(u,T.start||0)-s,E=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,L=E==null||((m=E.details)===null||m===void 0)?void 0:m.live,P=L?E.details.targetduration*2:N;if(g>0&&g<=P){this._trySkipBufferHole(null);return}}var j=self.performance.now();if(i===null){this.stalled=j;return}var z=j-i;!I&&z>=M&&this._reportStall(T.len);var ee=X.BufferHelper.bufferInfo(t,s,e.maxBufferHole);this._tryFixBufferStall(ee,z)},a._tryFixBufferStall=function(n,e){var t=this.config,i=this.fragmentTracker,s=this.media,I=s.currentTime,C=i.getPartialFragment(I);if(C){var _=this._trySkipBufferHole(C);if(_)return}n.len>t.maxBufferHole&&e>t.highBufferWatchdogPeriod*1e3&&(Z.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(n){var e=this.hls,t=this.media,i=this.stallReported;i||(this.stallReported=!0,Z.logger.warn("Playback stalling at @"+t.currentTime+" due to low buffer (buffer="+n+")"),e.trigger(R.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:n}))},a._trySkipBufferHole=function(n){for(var e=this.config,t=this.hls,i=this.media,s=i.currentTime,I=0,C=X.BufferHelper.getBuffered(i),_=0;_<C.length;_++){var x=C.start(_);if(s+e.maxBufferHole>=I&&s<x){var T=Math.max(x+h,i.currentTime+O);return Z.logger.warn("skipping hole, adjusting currentTime from "+s+" to "+T),this.moved=!0,this.stalled=null,i.currentTime=T,n&&t.trigger(R.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+s+" to "+T,frag:n}),T}I=C.end(_)}return 0},a._tryNudgeBuffer=function(){var n=this.config,e=this.hls,t=this.media,i=t.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<n.nudgeMaxRetry){var I=i+s*n.nudgeOffset;Z.logger.warn("Nudging 'currentTime' from "+i+" to "+I),t.currentTime=I,e.trigger(R.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else Z.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+n.nudgeMaxRetry+" nudges"),e.trigger(R.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},A}()},"./src/controller/id3-track-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/events.ts"),F=U("./src/utils/texttrack-utils.ts"),R=U("./src/demux/id3.ts"),Z=.25,M=function(){function N(h){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=h,this._registerListeners()}var O=N.prototype;return O.destroy=function(){this._unregisterListeners()},O._registerListeners=function(){var b=this.hls;b.on(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(X.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),b.on(X.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},O._unregisterListeners=function(){var b=this.hls;b.off(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(X.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),b.off(X.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},O.onMediaAttached=function(b,A){this.media=A.media},O.onMediaDetaching=function(){if(!this.id3Track)return;Object(F.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},O.getID3Track=function(b){if(!this.media)return;for(var A=0;A<b.length;A++){var a=b[A];if(a.kind==="metadata"&&a.label==="id3")return Object(F.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},O.onFragParsingMetadata=function(b,A){if(!this.media)return;var a=A.frag,r=A.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var n=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,e=0;e<r.length;e++){var t=R.getID3Frames(r[e].data);if(t){var i=r[e].pts,s=e<r.length-1?r[e+1].pts:a.end,I=s-i;I<=0&&(s=i+Z);for(var C=0;C<t.length;C++){var _=t[C];if(!R.isTimeStampFrame(_)){var x=new n(i,s,"");x.value=_,this.id3Track.addCue(x)}}}}},O.onBufferFlushing=function(b,A){var a=A.startOffset,r=A.endOffset,n=A.type;if(!n||n==="audio"){var e=this.id3Track;e&&Object(F.removeCuesInRange)(e,a,r)}},N}();J.default=M},"./src/controller/latency-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return N});var X=U("./src/errors.ts"),F=U("./src/events.ts"),R=U("./src/utils/logger.ts");function Z(O,h){for(var b=0;b<h.length;b++){var A=h[b];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(O,A.key,A)}}function M(O,h,b){return h&&Z(O.prototype,h),b&&Z(O,b),O}var N=function(){function O(b){var A=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 A.timeupdate()},this.hls=b,this.config=b.config,this.registerListeners()}var h=O.prototype;return h.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},h.registerListeners=function(){this.hls.on(F.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(F.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(F.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){this.hls.off(F.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(F.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(F.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(F.Events.ERROR,this.onError)},h.onMediaAttached=function(A,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},h.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},h.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},h.onLevelUpdated=function(A,a){var r=a.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},h.onError=function(A,a){if(a.details!==X.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,R.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},h.timeupdate=function(){var A=this.media,a=this.levelDetails;if(!A||!a)return;this.currentTime=A.currentTime;var r=this.computeLatency();if(r===null)return;this._latency=r;var n=this.config,e=n.lowLatencyMode,t=n.maxLiveSyncPlaybackRate;if(!e||t===1)return;var i=this.targetLatency;if(i===null)return;var s=r-i,I=Math.min(this.maxLatency,i+a.targetduration),C=s<I;if(a.live&&C&&s>.05&&this.forwardBufferLength>1){var _=Math.min(2,Math.max(1,t)),x=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;A.playbackRate=Math.min(_,Math.max(1,x))}else A.playbackRate!==1&&A.playbackRate!==0&&(A.playbackRate=1)},h.estimateLiveEdge=function(){var A=this.levelDetails;return A===null?null:A.edge+A.age},h.computeLatency=function(){var A=this.estimateLiveEdge();return A===null?null:A-this.currentTime},M(O,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var A=this.config,a=this.levelDetails;return A.liveMaxLatencyDuration!==void 0?A.liveMaxLatencyDuration:a?A.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var A=this.levelDetails;if(A===null)return null;var a=A.holdBack,r=A.partHoldBack,n=A.targetduration,e=this.config,t=e.liveSyncDuration,i=e.liveSyncDurationCount,s=e.lowLatencyMode,I=this.hls.userConfig,C=s&&r||a;(I.liveSyncDuration||I.liveSyncDurationCount||C===0)&&(C=t!==void 0?t:i*n);var _=n,x=1;return C+Math.min(this.stallCount*x,_)}},{key:"liveSyncPosition",get:function(){var A=this.estimateLiveEdge(),a=this.targetLatency,r=this.levelDetails;if(A===null||a===null||r===null)return null;var n=r.edge,e=A-a-this.edgeStalled,t=n-r.totalduration,i=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(t,e),i)}},{key:"drift",get:function(){var A=this.levelDetails;return A===null?1:A.drift}},{key:"edgeStalled",get:function(){var A=this.levelDetails;if(A===null)return 0;var a=(this.config.lowLatencyMode&&A.partTarget||A.targetduration)*3;return Math.max(A.age-a,0)}},{key:"forwardBufferLength",get:function(){var A=this.media,a=this.levelDetails;if(!A||!a)return 0;var r=A.buffered.length;return r?A.buffered.end(r-1):a.edge-this.currentTime}}]),O}()},"./src/controller/level-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return e});var X=U("./src/types/level.ts"),F=U("./src/events.ts"),R=U("./src/errors.ts"),Z=U("./src/utils/codecs.ts"),M=U("./src/controller/level-helper.ts"),N=U("./src/controller/base-playlist-controller.ts"),O=U("./src/types/loader.ts");function h(){return h=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var I in s)Object.prototype.hasOwnProperty.call(s,I)&&(t[I]=s[I])}return t},h.apply(this,arguments)}function b(t,i){for(var s=0;s<i.length;s++){var I=i[s];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(t,I.key,I)}}function A(t,i,s){return i&&b(t.prototype,i),s&&b(t,s),t}function a(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,r(t,i)}function r(t,i){return r=Object.setPrototypeOf||function(I,C){return I.__proto__=C,I},r(t,i)}var n=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),e=function(t){a(i,t);function i(I){var C;return C=t.call(this,I,"[level-controller]")||this,C._levels=[],C._firstLevel=-1,C._startLevel=void 0,C.currentLevelIndex=-1,C.manualLevelIndex=-1,C.onParsedComplete=void 0,C._registerListeners(),C}var s=i.prototype;return s._registerListeners=function(){var C=this.hls;C.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),C.on(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),C.on(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),C.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),C.on(F.Events.ERROR,this.onError,this)},s._unregisterListeners=function(){var C=this.hls;C.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),C.off(F.Events.LEVEL_LOADED,this.onLevelLoaded,this),C.off(F.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),C.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),C.off(F.Events.ERROR,this.onError,this)},s.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},s.startLoad=function(){var C=this._levels;C.forEach(function(_){_.loadError=0}),t.prototype.startLoad.call(this)},s.onManifestLoaded=function(C,_){var x=[],T=[],d=[],u,o={},l,m=!1,g=!1,E=!1;if(_.levels.forEach(function(z){var ee=z.attrs;m=m||!!(z.width&&z.height),g=g||!!z.videoCodec,E=E||!!z.audioCodec,n&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var Q=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;l=o[Q],l?l.url.push(z.url):(l=new X.Level(z),o[Q]=l,x.push(l)),ee&&(ee.AUDIO&&Object(M.addGroupId)(l,"audio",ee.AUDIO),ee.SUBTITLES&&Object(M.addGroupId)(l,"text",ee.SUBTITLES))}),(m||g)&&E&&(x=x.filter(function(z){var ee=z.videoCodec,Q=z.width,q=z.height;return!!ee||!!(Q&&q)})),x=x.filter(function(z){var ee=z.audioCodec,Q=z.videoCodec;return(!ee||Object(Z.isCodecSupportedInMp4)(ee,"audio"))&&(!Q||Object(Z.isCodecSupportedInMp4)(Q,"video"))}),_.audioTracks&&(T=_.audioTracks.filter(function(z){return!z.audioCodec||Object(Z.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(M.assignTrackIdsByGroup)(T)),_.subtitles&&(d=_.subtitles,Object(M.assignTrackIdsByGroup)(d)),x.length>0){u=x[0].bitrate,x.sort(function(z,ee){return z.bitrate-ee.bitrate}),this._levels=x;for(var L=0;L<x.length;L++)if(x[L].bitrate===u){this._firstLevel=L,this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+u);break}var P=E&&!g,j={levels:x,audioTracks:T,subtitleTracks:d,firstLevel:this._firstLevel,stats:_.stats,audio:E,video:g,altAudio:!P&&T.some(function(z){return!!z.url})};this.hls.trigger(F.Events.MANIFEST_PARSED,j),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(F.Events.ERROR,{type:R.ErrorTypes.MEDIA_ERROR,details:R.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:_.url,reason:"no level with compatible codecs found in manifest"})},s.onError=function(C,_){if(t.prototype.onError.call(this,C,_),_.fatal)return;var x=_.context,T=this._levels[this.currentLevelIndex];if(x&&(x.type===O.PlaylistContextType.AUDIO_TRACK&&T.audioGroupIds&&x.groupId===T.audioGroupIds[T.urlId]||x.type===O.PlaylistContextType.SUBTITLE_TRACK&&T.textGroupIds&&x.groupId===T.textGroupIds[T.urlId])){this.redundantFailover(this.currentLevelIndex);return}var d=!1,u=!0,o;switch(_.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:if(_.frag){var l=this._levels[_.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(o=_.frag.level)):o=_.frag.level}break;case R.ErrorDetails.LEVEL_LOAD_ERROR:case R.ErrorDetails.LEVEL_LOAD_TIMEOUT:x&&(x.deliveryDirectives&&(u=!1),o=x.level),d=!0;break;case R.ErrorDetails.REMUX_ALLOC_ERROR:o=_.level,d=!0;break}o!==void 0&&this.recoverLevel(_,o,d,u)},s.recoverLevel=function(C,_,x,T){var d=C.details,u=this._levels[_];if(u.loadError++,x){var o=this.retryLoadingOrFail(C);if(o)C.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(T){var l=u.url.length;if(l>1&&u.loadError<l)C.levelRetry=!0,this.redundantFailover(_);else if(this.manualLevelIndex===-1){var m=_===0?this._levels.length-1:_-1;this.currentLevelIndex!==m&&this._levels[m].loadError===0&&(this.warn(d+": switch to "+m),C.levelRetry=!0,this.hls.nextAutoLevel=m)}}},s.redundantFailover=function(C){var _=this._levels[C],x=_.url.length;if(x>1){var T=(_.urlId+1)%x;this.warn("Switching to redundant URL-id "+T),this._levels.forEach(function(d){d.urlId=T}),this.level=C}},s.onFragLoaded=function(C,_){var x=_.frag;if(x!==void 0&&x.type===O.PlaylistLevelType.MAIN){var T=this._levels[x.level];T!==void 0&&(T.fragmentError=0,T.loadError=0)}},s.onLevelLoaded=function(C,_){var x,T=_.level,d=_.details,u=this._levels[T];if(!u){var o;this.warn("Invalid level index "+T),(o=_.deliveryDirectives)!==null&&o!==void 0&&o.skip&&(d.deltaUpdateFailed=!0);return}T===this.currentLevelIndex?(u.fragmentError===0&&(u.loadError=0,this.retryCount=0),this.playlistLoaded(T,_,u.details)):(x=_.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(d.deltaUpdateFailed=!0)},s.onAudioTrackSwitched=function(C,_){var x=this.hls.levels[this.currentLevelIndex];if(!x)return;if(x.audioGroupIds){for(var T=-1,d=this.hls.audioTracks[_.id].groupId,u=0;u<x.audioGroupIds.length;u++)if(x.audioGroupIds[u]===d){T=u;break}T!==x.urlId&&(x.urlId=T,this.startLoad())}},s.loadPlaylist=function(C){var _=this.currentLevelIndex,x=this._levels[_];if(this.canLoad&&x&&x.url.length>0){var T=x.urlId,d=x.url[T];if(C)try{d=C.addDirectives(d)}catch(u){this.warn("Could not construct new URL with HLS Delivery Directives: "+u)}this.log("Attempt loading level index "+_+(C?" at sn "+C.msn+" part "+C.part:"")+" with URL-id "+T+" "+d),this.clearTimer(),this.hls.trigger(F.Events.LEVEL_LOADING,{url:d,level:_,id:T,deliveryDirectives:C||null})}},s.removeLevel=function(C,_){var x=function(u,o){return o!==_},T=this._levels.filter(function(d,u){return u!==C?!0:d.url.length>1&&_!==void 0?(d.url=d.url.filter(x),d.audioGroupIds&&(d.audioGroupIds=d.audioGroupIds.filter(x)),d.textGroupIds&&(d.textGroupIds=d.textGroupIds.filter(x)),d.urlId=0,!0):!1}).map(function(d,u){var o=d.details;return o!=null&&o.fragments&&o.fragments.forEach(function(l){l.level=u}),d});this._levels=T,this.hls.trigger(F.Events.LEVELS_UPDATED,{levels:T})},A(i,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(C){var _,x=this._levels;if(x.length===0)return;if(this.currentLevelIndex===C&&(_=x[C])!==null&&_!==void 0&&_.details)return;if(C<0||C>=x.length){var T=C<0;if(this.hls.trigger(F.Events.ERROR,{type:R.ErrorTypes.OTHER_ERROR,details:R.ErrorDetails.LEVEL_SWITCH_ERROR,level:C,fatal:T,reason:"invalid level idx"}),T)return;C=Math.min(C,x.length-1)}this.clearTimer();var d=this.currentLevelIndex,u=x[d],o=x[C];this.log("switching to level "+C+" from "+d),this.currentLevelIndex=C;var l=h({},o,{level:C,maxBitrate:o.maxBitrate,uri:o.uri,urlId:o.urlId});delete l._urlId,this.hls.trigger(F.Events.LEVEL_SWITCHING,l);var m=o.details;if(!m||m.live){var g=this.switchParams(o.uri,u==null?void 0:u.details);this.loadPlaylist(g)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(C){this.manualLevelIndex=C,this._startLevel===void 0&&(this._startLevel=C),C!==-1&&(this.level=C)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(C){this._firstLevel=C}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var C=this.hls.config.startLevel;return C!==void 0?C:this._firstLevel}else return this._startLevel},set:function(C){this._startLevel=C}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(C){this.level=C,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=C)}}]),i}(N.default)},"./src/controller/level-helper.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"addGroupId",function(){return R}),U.d(J,"assignTrackIdsByGroup",function(){return Z}),U.d(J,"updatePTS",function(){return M}),U.d(J,"updateFragPTSDTS",function(){return O}),U.d(J,"mergeDetails",function(){return h}),U.d(J,"mapPartIntersection",function(){return b}),U.d(J,"mapFragmentIntersection",function(){return A}),U.d(J,"adjustSliding",function(){return a}),U.d(J,"addSliding",function(){return r}),U.d(J,"computeReloadInterval",function(){return n}),U.d(J,"getFragmentWithSN",function(){return e}),U.d(J,"getPartWith",function(){return t});var X=U("./src/polyfills/number.ts"),F=U("./src/utils/logger.ts");function R(i,s,I){switch(s){case"audio":i.audioGroupIds||(i.audioGroupIds=[]),i.audioGroupIds.push(I);break;case"text":i.textGroupIds||(i.textGroupIds=[]),i.textGroupIds.push(I);break}}function Z(i){var s={};i.forEach(function(I){var C=I.groupId||"";I.id=s[C]=s[C]||0,s[C]++})}function M(i,s,I){var C=i[s],_=i[I];N(C,_)}function N(i,s){var I=s.startPTS;if(Object(X.isFiniteNumber)(I)){var C=0,_;s.sn>i.sn?(C=I-i.start,_=i):(C=i.start-I,_=s),_.duration!==C&&(_.duration=C)}else if(s.sn>i.sn){var x=i.cc===s.cc;x&&i.minEndPTS?s.start=i.start+(i.minEndPTS-i.start):s.start=i.start+i.duration}else s.start=Math.max(i.start-s.duration,0)}function O(i,s,I,C,_,x){var T=C-I;T<=0&&(F.logger.warn("Fragment should have a positive duration",s),C=I+s.duration,x=_+s.duration);var d=I,u=C,o=s.startPTS,l=s.endPTS;if(Object(X.isFiniteNumber)(o)){var m=Math.abs(o-I);Object(X.isFiniteNumber)(s.deltaPTS)?s.deltaPTS=Math.max(m,s.deltaPTS):s.deltaPTS=m,d=Math.max(I,o),I=Math.min(I,o),_=Math.min(_,s.startDTS),u=Math.min(C,l),C=Math.max(C,l),x=Math.max(x,s.endDTS)}s.duration=C-I;var g=I-s.start;s.appendedPTS=C,s.start=s.startPTS=I,s.maxStartPTS=d,s.startDTS=_,s.endPTS=C,s.minEndPTS=u,s.endDTS=x;var E=s.sn;if(!i||E<i.startSN||E>i.endSN)return 0;var L,P=E-i.startSN,j=i.fragments;for(j[P]=s,L=P;L>0;L--)N(j[L],j[L-1]);for(L=P;L<j.length-1;L++)N(j[L],j[L+1]);return i.fragmentHint&&N(j[j.length-1],i.fragmentHint),i.PTSKnown=i.alignedSliding=!0,g}function h(i,s){for(var I=null,C=i.fragments,_=C.length-1;_>=0;_--){var x=C[_].initSegment;if(x){I=x;break}}i.fragmentHint&&delete i.fragmentHint.endPTS;var T=0,d;if(A(i,s,function(L,P){L.relurl&&(T=L.cc-P.cc),Object(X.isFiniteNumber)(L.startPTS)&&Object(X.isFiniteNumber)(L.endPTS)&&(P.start=P.startPTS=L.startPTS,P.startDTS=L.startDTS,P.appendedPTS=L.appendedPTS,P.maxStartPTS=L.maxStartPTS,P.endPTS=L.endPTS,P.endDTS=L.endDTS,P.minEndPTS=L.minEndPTS,P.duration=L.endPTS-L.startPTS,P.duration&&(d=P),s.PTSKnown=s.alignedSliding=!0),P.elementaryStreams=L.elementaryStreams,P.loader=L.loader,P.stats=L.stats,P.urlId=L.urlId,L.initSegment&&(P.initSegment=L.initSegment,I=L.initSegment)}),I){var u=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;u.forEach(function(L){var P;(!L.initSegment||L.initSegment.relurl===((P=I)===null||P===void 0?void 0:P.relurl))&&(L.initSegment=I)})}if(s.skippedSegments&&(s.deltaUpdateFailed=s.fragments.some(function(L){return!L}),s.deltaUpdateFailed)){F.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var o=s.skippedSegments;o--;)s.fragments.shift();s.startSN=s.fragments[0].sn,s.startCC=s.fragments[0].cc}var l=s.fragments;if(T){F.logger.warn("discontinuity sliding from playlist, take drift into account");for(var m=0;m<l.length;m++)l[m].cc+=T}s.skippedSegments&&(s.startCC=s.fragments[0].cc),b(i.partList,s.partList,function(L,P){P.elementaryStreams=L.elementaryStreams,P.stats=L.stats}),d?O(s,d,d.startPTS,d.endPTS,d.startDTS,d.endDTS):a(i,s),l.length&&(s.totalduration=s.edge-l[0].start),s.driftStartTime=i.driftStartTime,s.driftStart=i.driftStart;var g=s.advancedDateTime;if(s.advanced&&g){var E=s.edge;s.driftStart||(s.driftStartTime=g,s.driftStart=E),s.driftEndTime=g,s.driftEnd=E}else s.driftEndTime=i.driftEndTime,s.driftEnd=i.driftEnd,s.advancedDateTime=i.advancedDateTime}function b(i,s,I){if(i&&s)for(var C=0,_=0,x=i.length;_<=x;_++){var T=i[_],d=s[_+C];T&&d&&T.index===d.index&&T.fragment.sn===d.fragment.sn?I(T,d):C--}}function A(i,s,I){for(var C=s.skippedSegments,_=Math.max(i.startSN,s.startSN)-s.startSN,x=(i.fragmentHint?1:0)+(C?s.endSN:Math.min(i.endSN,s.endSN))-s.startSN,T=s.startSN-i.startSN,d=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,u=i.fragmentHint?i.fragments.concat(i.fragmentHint):i.fragments,o=_;o<=x;o++){var l=u[T+o],m=d[o];C&&!m&&o<C&&(m=s.fragments[o]=l),l&&m&&I(l,m)}}function a(i,s){var I=s.startSN+s.skippedSegments-i.startSN,C=i.fragments;if(I<0||I>=C.length)return;r(s,C[I].start)}function r(i,s){if(s){for(var I=i.fragments,C=i.skippedSegments;C<I.length;C++)I[C].start+=s;i.fragmentHint&&(i.fragmentHint.start+=s)}}function n(i,s){var I=1e3*i.levelTargetDuration,C=I/2,_=i.age,x=_>0&&_<I*3,T=s.loading.end-s.loading.start,d,u=i.availabilityDelay;if(i.updated===!1)if(x){var o=333*i.misses;d=Math.max(Math.min(C,T*2),o),i.availabilityDelay=(i.availabilityDelay||0)+d}else d=C;else x?(u=Math.min(u||I/2,_),i.availabilityDelay=u,d=u+I-_):d=I-T;return Math.round(d)}function e(i,s,I){if(!i||!i.details)return null;var C=i.details,_=C.fragments[s-C.startSN];return _||(_=C.fragmentHint,_&&_.sn===s?_:s<C.startSN&&I&&I.sn===s?I:null)}function t(i,s,I){if(!i||!i.details)return null;var C=i.details.partList;if(C)for(var _=C.length;_--;){var x=C[_];if(x.index===I&&x.fragment.sn===s)return x}return null}},"./src/controller/stream-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return C});var X=U("./src/polyfills/number.ts"),F=U("./src/controller/base-stream-controller.ts"),R=U("./src/is-supported.ts"),Z=U("./src/events.ts"),M=U("./src/utils/buffer-helper.ts"),N=U("./src/controller/fragment-tracker.ts"),O=U("./src/types/loader.ts"),h=U("./src/loader/fragment.ts"),b=U("./src/demux/transmuxer-interface.ts"),A=U("./src/types/transmuxer.ts"),a=U("./src/controller/gap-controller.ts"),r=U("./src/errors.ts"),n=U("./src/utils/logger.ts");function e(_,x){for(var T=0;T<x.length;T++){var d=x[T];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(_,d.key,d)}}function t(_,x,T){return x&&e(_.prototype,x),T&&e(_,T),_}function i(_,x){_.prototype=Object.create(x.prototype),_.prototype.constructor=_,s(_,x)}function s(_,x){return s=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},s(_,x)}var I=100,C=function(_){i(x,_);function x(d,u){var o;return o=_.call(this,d,u,"[stream-controller]")||this,o.audioCodecSwap=!1,o.gapController=null,o.level=-1,o._forceStartLoad=!1,o.altAudio=!1,o.audioOnly=!1,o.fragPlaying=null,o.onvplaying=null,o.onvseeked=null,o.fragLastKbps=0,o.stalled=!1,o.couldBacktrack=!1,o.audioCodecSwitch=!1,o.videoBuffer=null,o._registerListeners(),o}var T=x.prototype;return T._registerListeners=function(){var u=this.hls;u.on(Z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(Z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(Z.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(Z.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(Z.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(Z.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(Z.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),u.on(Z.Events.ERROR,this.onError,this),u.on(Z.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.on(Z.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),u.on(Z.Events.BUFFER_CREATED,this.onBufferCreated,this),u.on(Z.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.on(Z.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),u.on(Z.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T._unregisterListeners=function(){var u=this.hls;u.off(Z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(Z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(Z.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(Z.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(Z.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(Z.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),u.off(Z.Events.ERROR,this.onError,this),u.off(Z.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),u.off(Z.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),u.off(Z.Events.BUFFER_CREATED,this.onBufferCreated,this),u.off(Z.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),u.off(Z.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),u.off(Z.Events.FRAG_BUFFERED,this.onFragBuffered,this)},T.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},T.startLoad=function(u){if(this.levels){var o=this.lastCurrentTime,l=this.hls;if(this.stopLoad(),this.setInterval(I),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var m=l.startLevel;m===-1&&(l.config.testBandwidth?(m=0,this.bitrateTest=!0):m=l.nextAutoLevel),this.level=l.nextLoadLevel=m,this.loadedmetadata=!1}o>0&&u===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),u=o),this.state=F.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=u,this.tick()}else this._forceStartLoad=!0,this.state=F.State.STOPPED},T.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},T.doTick=function(){switch(this.state){case F.State.IDLE:this.doTickIdle();break;case F.State.WAITING_LEVEL:{var u,o=this.levels,l=this.level,m=o==null||((u=o[l])===null||u===void 0)?void 0:u.details;if(m&&(!m.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(m))break;this.state=F.State.IDLE;break}break}case F.State.FRAG_LOADING_WAITING_RETRY:{var g,E=self.performance.now(),L=this.retryDate;(!L||E>=L||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=F.State.IDLE)}break;default:break}this.onTickEnd()},T.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},T.doTickIdle=function(){var u,o,l=this.hls,m=this.levelLastLoaded,g=this.levels,E=this.media,L=l.config,P=l.nextLoadLevel;if(m===null||!E&&(this.startFragRequested||!L.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!g||!g[P])return;var j=g[P];this.level=l.nextLoadLevel=P;var z=j.details;if(!z||this.state===F.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==P){this.state=F.State.WAITING_LEVEL;return}var ee=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:E,O.PlaylistLevelType.MAIN);if(ee===null)return;var Q=ee.len,q=this.getMaxBufferLength(j.maxBitrate);if(Q>=q)return;if(this._streamEnded(ee,z)){var ae={};this.altAudio&&(ae.type="video"),this.hls.trigger(Z.Events.BUFFER_EOS,ae),this.state=F.State.ENDED;return}var ge=ee.end,pe=this.getNextFragment(ge,z);if(this.couldBacktrack&&!this.fragPrevious&&pe&&pe.sn!=="initSegment"){var Ne=pe.sn-z.startSN;Ne>1&&(pe=z.fragments[Ne-1],this.fragmentTracker.removeFragment(pe))}if(pe&&this.fragmentTracker.getState(pe)===N.FragmentState.OK&&this.nextLoadPosition>ge){var Fe=this.audioOnly&&!this.altAudio?h.ElementaryStreamTypes.AUDIO:h.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(E,Fe,O.PlaylistLevelType.MAIN),pe=this.getNextFragment(this.nextLoadPosition,z)}if(!pe)return;pe.initSegment&&!pe.initSegment.data&&!this.bitrateTest&&(pe=pe.initSegment),((u=pe.decryptdata)===null||u===void 0?void 0:u.keyFormat)==="identity"&&!((o=pe.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(pe,z):this.loadFragment(pe,z,ge)},T.loadFragment=function(u,o,l){var m,g=this.fragmentTracker.getState(u);if(this.fragCurrent=u,g===N.FragmentState.BACKTRACKED){var E=this.fragmentTracker.getBacktrackData(u);if(E){this._handleFragmentLoadProgress(E),this._handleFragmentLoadComplete(E);return}else g=N.FragmentState.NOT_LOADED}g===N.FragmentState.NOT_LOADED||g===N.FragmentState.PARTIAL?u.sn==="initSegment"?this._loadInitSegment(u):this.bitrateTest?(u.bitrateTest=!0,this.log("Fragment "+u.sn+" of level "+u.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(u)):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,u,o,l)):g===N.FragmentState.APPENDING?this.reduceMaxBufferLength(u.duration)&&this.fragmentTracker.removeFragment(u):((m=this.media)===null||m===void 0?void 0:m.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},T.getAppendedFrag=function(u){var o=this.fragmentTracker.getAppendedFrag(u,O.PlaylistLevelType.MAIN);return o&&"fragment"in o?o.fragment:o},T.getBufferedFrag=function(u){return this.fragmentTracker.getBufferedFrag(u,O.PlaylistLevelType.MAIN)},T.followingBufferedFrag=function(u){return u?this.getBufferedFrag(u.end+.5):null},T.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},T.nextLevelSwitch=function(){var u=this.levels,o=this.media;if(o!=null&&o.readyState){var l,m=this.getAppendedFrag(o.currentTime);if(m&&m.start>1&&this.flushMainBuffer(0,m.start-1),!o.paused&&u){var g=this.hls.nextLoadLevel,E=u[g],L=this.fragLastKbps;L&&this.fragCurrent?l=this.fragCurrent.duration*E.maxBitrate/(1e3*L)+1:l=0}else l=0;var P=this.getBufferedFrag(o.currentTime+l);if(P){var j=this.followingBufferedFrag(P);if(j){this.abortCurrentFrag();var z=j.maxStartPTS?j.maxStartPTS:j.start,ee=j.duration,Q=Math.max(P.end,z+Math.min(Math.max(ee-this.config.maxFragLookUpTolerance,ee*.5),ee*.75));this.flushMainBuffer(Q,Number.POSITIVE_INFINITY)}}}},T.abortCurrentFrag=function(){var u=this.fragCurrent;this.fragCurrent=null,u!=null&&u.loader&&u.loader.abort(),this.state===F.State.KEY_LOADING&&(this.state=F.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},T.flushMainBuffer=function(u,o){_.prototype.flushMainBuffer.call(this,u,o,this.altAudio?"video":null)},T.onMediaAttached=function(u,o){_.prototype.onMediaAttached.call(this,u,o);var l=o.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),l.addEventListener("playing",this.onvplaying),l.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,l,this.fragmentTracker,this.hls)},T.onMediaDetaching=function(){var u=this.media;u&&(u.removeEventListener("playing",this.onvplaying),u.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),_.prototype.onMediaDetaching.call(this)},T.onMediaPlaying=function(){this.tick()},T.onMediaSeeked=function(){var u=this.media,o=u?u.currentTime:null;Object(X.isFiniteNumber)(o)&&this.log("Media seeked to "+o.toFixed(3)),this.tick()},T.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(Z.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},T.onManifestParsed=function(u,o){var l=!1,m=!1,g;o.levels.forEach(function(E){g=E.audioCodec,g&&(g.indexOf("mp4a.40.2")!==-1&&(l=!0),g.indexOf("mp4a.40.5")!==-1&&(m=!0))}),this.audioCodecSwitch=l&&m&&!Object(R.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},T.onLevelLoading=function(u,o){var l=this.levels;if(!l||this.state!==F.State.IDLE)return;var m=l[o.level];(!m.details||m.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(m.details))&&(this.state=F.State.WAITING_LEVEL)},T.onLevelLoaded=function(u,o){var l,m=this.levels,g=o.level,E=o.details,L=E.totalduration;if(!m){this.warn("Levels were reset while loading level "+g);return}this.log("Level "+g+" loaded ["+E.startSN+","+E.endSN+"], cc ["+E.startCC+", "+E.endCC+"] duration:"+L);var P=this.fragCurrent;P&&(this.state===F.State.FRAG_LOADING||this.state===F.State.FRAG_LOADING_WAITING_RETRY)&&(P.level!==o.level&&P.loader&&(this.state=F.State.IDLE,P.loader.abort()));var j=m[g],z=0;if(E.live||(l=j.details)!==null&&l!==void 0&&l.live){if(E.fragments[0]||(E.deltaUpdateFailed=!0),E.deltaUpdateFailed)return;z=this.alignPlaylists(E,j.details)}if(j.details=E,this.levelLastLoaded=g,this.hls.trigger(Z.Events.LEVEL_UPDATED,{details:E,level:g}),this.state===F.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(E))return;this.state=F.State.IDLE}this.startFragRequested?E.live&&this.synchronizeToLiveEdge(E):this.setStartPosition(E,z),this.tick()},T._handleFragmentLoadProgress=function(u){var o,l=u.frag,m=u.part,g=u.payload,E=this.levels;if(!E){this.warn("Levels were reset while fragment load was in progress. Fragment "+l.sn+" of level "+l.level+" will not be buffered");return}var L=E[l.level],P=L.details;if(!P){this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset");return}var j=L.videoCodec,z=P.PTSKnown||!P.live,ee=(o=l.initSegment)===null||o===void 0?void 0:o.data,Q=this._getAudioCodec(L),q=this.transmuxer=this.transmuxer||new b.default(this.hls,O.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ae=m?m.index:-1,ge=ae!==-1,pe=new A.ChunkMetadata(l.level,l.sn,l.stats.chunkCount,g.byteLength,ae,ge),Ne=this.initPTS[l.cc];q.push(g,ee,Q,j,l,m,P.totalduration,z,pe,Ne)},T.onAudioTrackSwitching=function(u,o){var l=this.altAudio,m=!!o.url,g=o.id;if(!m){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var E=this.fragCurrent;E!=null&&E.loader&&(this.log("Switching to main audio track, cancel main fragment load"),E.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var L=this.hls;l&&L.trigger(Z.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),L.trigger(Z.Events.AUDIO_TRACK_SWITCHED,{id:g})}},T.onAudioTrackSwitched=function(u,o){var l=o.id,m=!!this.hls.audioTracks[l].url;if(m){var g=this.videoBuffer;g&&this.mediaBuffer!==g&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=g)}this.altAudio=m,this.tick()},T.onBufferCreated=function(u,o){var l=o.tracks,m,g,E=!1;for(var L in l){var P=l[L];if(P.id==="main"){if(g=L,m=P,L==="video"){var j=l[L];j&&(this.videoBuffer=j.buffer)}}else E=!0}E&&m?(this.log("Alternate track found, use "+g+".buffered to schedule main fragment loading"),this.mediaBuffer=m.buffer):this.mediaBuffer=this.media},T.onFragBuffered=function(u,o){var l=o.frag,m=o.part;if(l&&l.type!==O.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(l)){this.warn("Fragment "+l.sn+(m?" p: "+m.index:"")+" of level "+l.level+" finished buffering, but was aborted. state: "+this.state),this.state===F.State.PARSED&&(this.state=F.State.IDLE);return}var g=m?m.stats:l.stats;this.fragLastKbps=Math.round(8*g.total/(g.buffering.end-g.loading.first)),l.sn!=="initSegment"&&(this.fragPrevious=l),this.fragBufferedComplete(l,m)},T.onError=function(u,o){switch(o.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(O.PlaylistLevelType.MAIN,o);break;case r.ErrorDetails.LEVEL_LOAD_ERROR:case r.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==F.State.ERROR&&(o.fatal?(this.warn(""+o.details),this.state=F.State.ERROR):!o.levelRetry&&this.state===F.State.WAITING_LEVEL&&(this.state=F.State.IDLE));break;case r.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="main"&&(this.state===F.State.PARSING||this.state===F.State.PARSED)){var l=!0,m=this.getFwdBufferInfo(this.media,O.PlaylistLevelType.MAIN);m&&m.len>.5&&(l=!this.reduceMaxBufferLength(m.len)),l&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},T.checkBuffer=function(){var u=this.media,o=this.gapController;if(!u||!o||!u.readyState)return;var l=M.BufferHelper.getBuffered(u);!this.loadedmetadata&&l.length?(this.loadedmetadata=!0,this.seekToStartPos()):o.poll(this.lastCurrentTime),this.lastCurrentTime=u.currentTime},T.onFragLoadEmergencyAborted=function(){this.state=F.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},T.onBufferFlushed=function(u,o){var l=o.type;if(l!==h.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var m=(l===h.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(m,l,O.PlaylistLevelType.MAIN)}},T.onLevelsUpdated=function(u,o){this.levels=o.levels},T.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},T.seekToStartPos=function(){var u=this.media,o=u.currentTime,l=this.startPosition;if(l>=0&&o<l){if(u.seeking){n.logger.log("could not seek to "+l+", already seeking at "+o);return}var m=M.BufferHelper.getBuffered(u),g=m.length?m.start(0):0,E=g-l;E>0&&(E<this.config.maxBufferHole||E<this.config.maxFragLookUpTolerance)&&(n.logger.log("adjusting start position by "+E+" to match buffer start"),l+=E,this.startPosition=l),this.log("seek to target start position "+l+" from current time "+o),u.currentTime=l}},T._getAudioCodec=function(u){var o=this.config.defaultAudioCodec||u.audioCodec;return this.audioCodecSwap&&o&&(this.log("Swapping audio codec"),o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5"),o},T._loadBitrateTestFrag=function(u){var o=this;this._doFragLoad(u).then(function(l){var m=o.hls;if(!l||m.nextLoadLevel||o.fragContextChanged(u))return;o.fragLoadError=0,o.state=F.State.IDLE,o.startFragRequested=!1,o.bitrateTest=!1;var g=u.stats;g.parsing.start=g.parsing.end=g.buffering.start=g.buffering.end=self.performance.now(),m.trigger(Z.Events.FRAG_LOADED,l)})},T._handleTransmuxComplete=function(u){var o,l="main",m=this.hls,g=u.remuxResult,E=u.chunkMeta,L=this.getCurrentContext(E);if(!L){this.warn("The loading context changed while buffering fragment "+E.sn+" of level "+E.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(E.level);return}var P=L.frag,j=L.part,z=L.level,ee=g.video,Q=g.text,q=g.id3,ae=g.initSegment,ge=this.altAudio?void 0:g.audio;if(this.fragContextChanged(P))return;if(this.state=F.State.PARSING,ae){ae.tracks&&(this._bufferInitSegment(z,ae.tracks,P,E),m.trigger(Z.Events.FRAG_PARSING_INIT_SEGMENT,{frag:P,id:l,tracks:ae.tracks}));var pe=ae.initPTS,Ne=ae.timescale;Object(X.isFiniteNumber)(pe)&&(this.initPTS[P.cc]=pe,m.trigger(Z.Events.INIT_PTS_FOUND,{frag:P,id:l,initPTS:pe,timescale:Ne}))}if(ee&&g.independent!==!1){if(z.details){var Fe=ee.startPTS,He=ee.endPTS,Ke=ee.startDTS,Xe=ee.endDTS;if(j)j.elementaryStreams[ee.type]={startPTS:Fe,endPTS:He,startDTS:Ke,endDTS:Xe};else if(ee.firstKeyFrame&&ee.independent&&(this.couldBacktrack=!0),ee.dropped&&ee.independent){var Ce=this.getLoadPosition()+this.config.maxBufferHole;if(Ce<Fe){this.backtrack(P);return}P.setElementaryStreamInfo(ee.type,P.start,He,P.start,Xe,!0)}P.setElementaryStreamInfo(ee.type,Fe,He,Ke,Xe),this.bufferFragmentData(ee,P,j,E)}}else if(g.independent===!1){this.backtrack(P);return}if(ge){var ye=ge.startPTS,Pe=ge.endPTS,Et=ge.startDTS,mt=ge.endDTS;j&&(j.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:ye,endPTS:Pe,startDTS:Et,endDTS:mt}),P.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,ye,Pe,Et,mt),this.bufferFragmentData(ge,P,j,E)}if(q!=null&&(o=q.samples)!==null&&o!==void 0&&o.length){var gt={frag:P,id:l,samples:q.samples};m.trigger(Z.Events.FRAG_PARSING_METADATA,gt)}if(Q){var bt={frag:P,id:l,samples:Q.samples};m.trigger(Z.Events.FRAG_PARSING_USERDATA,bt)}},T._bufferInitSegment=function(u,o,l,m){var g=this;if(this.state!==F.State.PARSING)return;this.audioOnly=!!o.audio&&!o.video,this.altAudio&&!this.audioOnly&&delete o.audio;var E=o.audio,L=o.video,P=o.audiovideo;if(E){var j=u.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(j&&(j.indexOf("mp4a.40.5")!==-1?j="mp4a.40.2":j="mp4a.40.5"),E.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(j="mp4a.40.5")),z.indexOf("android")!==-1&&E.container!=="audio/mpeg"&&(j="mp4a.40.2",this.log("Android: force audio codec to "+j)),u.audioCodec&&u.audioCodec!==j&&this.log('Swapping manifest audio codec "'+u.audioCodec+'" for "'+j+'"'),E.levelCodec=j,E.id="main",this.log("Init audio buffer, container:"+E.container+", codecs[selected/level/parsed]=["+(j||"")+"/"+(u.audioCodec||"")+"/"+E.codec+"]")}L&&(L.levelCodec=u.videoCodec,L.id="main",this.log("Init video buffer, container:"+L.container+", codecs[level/parsed]=["+(u.videoCodec||"")+"/"+L.codec+"]")),P&&this.log("Init audiovideo buffer, container:"+P.container+", codecs[level/parsed]=["+(u.attrs.CODECS||"")+"/"+P.codec+"]"),this.hls.trigger(Z.Events.BUFFER_CODECS,o),Object.keys(o).forEach(function(ee){var Q=o[ee],q=Q.initSegment;q!=null&&q.byteLength&&g.hls.trigger(Z.Events.BUFFER_APPENDING,{type:ee,data:q,frag:l,part:null,chunkMeta:m,parent:l.type})}),this.tick()},T.backtrack=function(u){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(u);var o=this.fragmentTracker.backtrack(u);this.fragPrevious=null,this.nextLoadPosition=u.start,o?this.resetFragmentLoading(u):this.state=F.State.BACKTRACKING},T.checkFragmentChanged=function(){var u=this.media,o=null;if(u&&u.readyState>1&&u.seeking===!1){var l=u.currentTime;if(M.BufferHelper.isBuffered(u,l)?o=this.getAppendedFrag(l):M.BufferHelper.isBuffered(u,l+.1)&&(o=this.getAppendedFrag(l+.1)),o){var m=this.fragPlaying,g=o.level;(!m||o.sn!==m.sn||m.level!==g||o.urlId!==m.urlId)&&(this.hls.trigger(Z.Events.FRAG_CHANGED,{frag:o}),(!m||m.level!==g)&&this.hls.trigger(Z.Events.LEVEL_SWITCHED,{level:g}),this.fragPlaying=o)}}},t(x,[{key:"nextLevel",get:function(){var u=this.nextBufferedFrag;return u?u.level:-1}},{key:"currentLevel",get:function(){var u=this.media;if(u){var o=this.getAppendedFrag(u.currentTime);if(o)return o.level}return-1}},{key:"nextBufferedFrag",get:function(){var u=this.media;if(u){var o=this.getAppendedFrag(u.currentTime);return this.followingBufferedFrag(o)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),x}(F.default)},"./src/controller/subtitle-stream-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"SubtitleStreamController",function(){return i});var X=U("./src/events.ts"),F=U("./src/utils/logger.ts"),R=U("./src/utils/buffer-helper.ts"),Z=U("./src/controller/fragment-finders.ts"),M=U("./src/utils/discontinuities.ts"),N=U("./src/controller/level-helper.ts"),O=U("./src/controller/fragment-tracker.ts"),h=U("./src/controller/base-stream-controller.ts"),b=U("./src/types/loader.ts"),A=U("./src/types/level.ts");function a(s,I){for(var C=0;C<I.length;C++){var _=I[C];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(s,_.key,_)}}function r(s,I,C){return I&&a(s.prototype,I),C&&a(s,C),s}function n(s,I){s.prototype=Object.create(I.prototype),s.prototype.constructor=s,e(s,I)}function e(s,I){return e=Object.setPrototypeOf||function(_,x){return _.__proto__=x,_},e(s,I)}var t=500,i=function(s){n(I,s);function I(_,x){var T;return T=s.call(this,_,x,"[subtitle-stream-controller]")||this,T.levels=[],T.currentTrackId=-1,T.tracksBuffered=[],T.mainDetails=null,T._registerListeners(),T}var C=I.prototype;return C.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},C._registerListeners=function(){var x=this.hls;x.on(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(X.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(X.Events.ERROR,this.onError,this),x.on(X.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(X.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.on(X.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.on(X.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.on(X.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},C._unregisterListeners=function(){var x=this.hls;x.off(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(X.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(X.Events.ERROR,this.onError,this),x.off(X.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.off(X.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.off(X.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.off(X.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.off(X.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},C.startLoad=function(){this.stopLoad(),this.state=h.State.IDLE,this.setInterval(t),this.tick()},C.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},C.onLevelLoaded=function(x,T){this.mainDetails=T.details},C.onSubtitleFragProcessed=function(x,T){var d=T.frag,u=T.success;if(this.fragPrevious=d,this.state=h.State.IDLE,!u)return;var o=this.tracksBuffered[this.currentTrackId];if(!o)return;for(var l,m=d.start,g=0;g<o.length;g++)if(m>=o[g].start&&m<=o[g].end){l=o[g];break}var E=d.start+d.duration;l?l.end=E:(l={start:m,end:E},o.push(l)),this.fragmentTracker.fragBuffered(d)},C.onBufferFlushing=function(x,T){var d=T.startOffset,u=T.endOffset;if(d===0&&u!==Number.POSITIVE_INFINITY){var o=this.currentTrackId,l=this.levels;if(!l.length||!l[o]||!l[o].details)return;var m=l[o].details,g=m.targetduration,E=u-g;if(E<=0)return;T.endOffsetSubtitles=Math.max(0,E),this.tracksBuffered.forEach(function(L){for(var P=0;P<L.length;){if(L[P].end<=E){L.shift();continue}else if(L[P].start<E)L[P].start=E;else break;P++}}),this.fragmentTracker.removeFragmentsInRange(d,E,b.PlaylistLevelType.SUBTITLE)}},C.onError=function(x,T){var d,u=T.frag;if(!u||u.type!==b.PlaylistLevelType.SUBTITLE)return;(d=this.fragCurrent)!==null&&d!==void 0&&d.loader&&this.fragCurrent.loader.abort(),this.state=h.State.IDLE},C.onSubtitleTracksUpdated=function(x,T){var d=this,u=T.subtitleTracks;this.tracksBuffered=[],this.levels=u.map(function(o){return new A.Level(o)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(o){d.tracksBuffered[o.id]=[]}),this.mediaBuffer=null},C.onSubtitleTrackSwitch=function(x,T){if(this.currentTrackId=T.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var d=this.levels[this.currentTrackId];d!=null&&d.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,d&&this.setInterval(t)},C.onSubtitleTrackLoaded=function(x,T){var d,u=T.details,o=T.id,l=this.currentTrackId,m=this.levels;if(!m.length)return;var g=m[l];if(o>=m.length||o!==l||!g)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,u.live||(d=g.details)!==null&&d!==void 0&&d.live){var E=this.mainDetails;if(u.deltaUpdateFailed||!E)return;var L=E.fragments[0];if(!g.details)u.hasProgramDateTime&&E.hasProgramDateTime?Object(M.alignMediaPlaylistByPDT)(u,E):L&&Object(N.addSliding)(u,L.start);else{var P=this.alignPlaylists(u,g.details);P===0&&L&&Object(N.addSliding)(u,L.start)}}if(g.details=u,this.levelLastLoaded=o,this.tick(),u.live&&!this.fragCurrent&&this.media&&this.state===h.State.IDLE){var j=Object(Z.findFragmentByPTS)(null,u.fragments,this.media.currentTime,0);j||(this.warn("Subtitle playlist not aligned with playback"),g.details=void 0)}},C._handleFragmentLoadComplete=function(x){var T=x.frag,d=x.payload,u=T.decryptdata,o=this.hls;if(this.fragContextChanged(T))return;if(d&&d.byteLength>0&&u&&u.key&&u.iv&&u.method==="AES-128"){var l=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(d),u.key.buffer,u.iv.buffer).then(function(m){var g=performance.now();o.trigger(X.Events.FRAG_DECRYPTED,{frag:T,payload:m,stats:{tstart:l,tdecrypt:g}})})}},C.doTick=function(){if(!this.media){this.state=h.State.IDLE;return}if(this.state===h.State.IDLE){var x,T=this.currentTrackId,d=this.levels;if(!d.length||!d[T]||!d[T].details)return;var u=d[T].details,o=u.targetduration,l=this.config,m=this.media,g=R.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,m.currentTime-o,l.maxBufferHole),E=g.end,L=g.len,P=this.getMaxBufferLength()+o;if(L>P)return;console.assert(u,"Subtitle track details are defined on idle subtitle stream controller tick");var j=u.fragments,z=j.length,ee=u.edge,Q,q=this.fragPrevious;if(E<ee){var ae=l.maxFragLookUpTolerance;q&&u.hasProgramDateTime&&(Q=Object(Z.findFragmentByPDT)(j,q.endProgramDateTime,ae)),Q||(Q=Object(Z.findFragmentByPTS)(q,j,E,ae),!Q&&q&&q.start<j[0].start&&(Q=j[0]))}else Q=j[z-1];(x=Q)!==null&&x!==void 0&&x.encrypted?(F.logger.log("Loading key for "+Q.sn),this.state=h.State.KEY_LOADING,this.hls.trigger(X.Events.KEY_LOADING,{frag:Q})):Q&&this.fragmentTracker.getState(Q)===O.FragmentState.NOT_LOADED&&this.loadFragment(Q,u,E)}},C.loadFragment=function(x,T,d){this.fragCurrent=x,s.prototype.loadFragment.call(this,x,T,d)},r(I,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),I}(h.default)},"./src/controller/subtitle-track-controller.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/events.ts"),F=U("./src/utils/texttrack-utils.ts"),R=U("./src/controller/base-playlist-controller.ts"),Z=U("./src/types/loader.ts");function M(a,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,e.key,e)}}function N(a,r,n){return r&&M(a.prototype,r),n&&M(a,n),a}function O(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,h(a,r)}function h(a,r){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(a,r)}var b=function(a){O(r,a);function r(e){var t;return t=a.call(this,e,"[subtitle-track-controller]")||this,t.media=null,t.tracks=[],t.groupId=null,t.tracksInGroup=[],t.trackId=-1,t.selectDefaultTrack=!0,t.queuedDefaultTrack=-1,t.trackChangeListener=function(){return t.onTextTracksChanged()},t.asyncPollTrackChange=function(){return t.pollTrackChange(0)},t.useTextTrackPolling=!1,t.subtitlePollingInterval=-1,t.subtitleDisplay=!0,t.registerListeners(),t}var n=r.prototype;return n.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},n.registerListeners=function(){var t=this.hls;t.on(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(X.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(X.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(X.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(X.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){var t=this.hls;t.off(X.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(X.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(X.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(X.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(X.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(X.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(X.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(X.Events.ERROR,this.onError,this)},n.onMediaAttached=function(t,i){if(this.media=i.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)},n.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},n.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 t=A(this.media.textTracks);t.forEach(function(i){Object(F.clearCurrentCues)(i)}),this.subtitleTrack=-1,this.media=null},n.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},n.onManifestParsed=function(t,i){this.tracks=i.subtitleTracks},n.onSubtitleTrackLoaded=function(t,i){var s=i.id,I=i.details,C=this.trackId,_=this.tracksInGroup[C];if(!_){this.warn("Invalid subtitle track id "+s);return}var x=_.details;_.details=i.details,this.log("subtitle track "+s+" loaded ["+I.startSN+"-"+I.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,i,x))},n.onLevelLoading=function(t,i){this.switchLevel(i.level)},n.onLevelSwitching=function(t,i){this.switchLevel(i.level)},n.switchLevel=function(t){var i=this.hls.levels[t];if(!(i!=null&&i.textGroupIds))return;var s=i.textGroupIds[i.urlId];if(this.groupId!==s){var I=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,C=this.tracks.filter(function(T){return!s||T.groupId===s});this.tracksInGroup=C;var _=this.findTrackId(I==null?void 0:I.name)||this.findTrackId();this.groupId=s;var x={subtitleTracks:C};this.log("Updating subtitle tracks, "+C.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(X.Events.SUBTITLE_TRACKS_UPDATED,x),_!==-1&&this.setSubtitleTrack(_,I)}},n.findTrackId=function(t){for(var i=this.tracksInGroup,s=0;s<i.length;s++){var I=i[s];if((!this.selectDefaultTrack||I.default)&&(!t||t===I.name))return I.id}return-1},n.onError=function(t,i){if(a.prototype.onError.call(this,t,i),i.fatal||!i.context)return;i.context.type===Z.PlaylistContextType.SUBTITLE_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},n.loadPlaylist=function(t){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var s=i.id,I=i.groupId,C=i.url;if(t)try{C=t.addDirectives(C)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Loading subtitle playlist for id "+s),this.hls.trigger(X.Events.SUBTITLE_TRACK_LOADING,{url:C,id:s,groupId:I,deliveryDirectives:t||null})}},n.toggleTrackModes=function(t){var i=this,s=this.media,I=this.subtitleDisplay,C=this.trackId;if(!s)return;var _=A(s.textTracks),x=_.filter(function(u){return u.groupId===i.groupId});if(t===-1)[].slice.call(_).forEach(function(u){u.mode="disabled"});else{var T=x[C];T&&(T.mode="disabled")}var d=x[t];d&&(d.mode=I?"showing":"hidden")},n.setSubtitleTrack=function(t,i){var s,I=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=t;return}if(this.trackId!==t&&this.toggleTrackModes(t),this.trackId===t&&(t===-1||(s=I[t])!==null&&s!==void 0&&s.details)||t<-1||t>=I.length)return;this.clearTimer();var C=I[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,C){var _=C.id,x=C.groupId,T=x===void 0?"":x,d=C.name,u=C.type,o=C.url;this.hls.trigger(X.Events.SUBTITLE_TRACK_SWITCH,{id:_,groupId:T,name:d,type:u,url:o});var l=this.switchParams(C.url,i==null?void 0:i.details);this.loadPlaylist(l)}else this.hls.trigger(X.Events.SUBTITLE_TRACK_SWITCH,{id:t})},n.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var t=-1,i=A(this.media.textTracks),s=0;s<i.length;s++)if(i[s].mode==="hidden")t=s;else if(i[s].mode==="showing"){t=s;break}this.subtitleTrack!==t&&(this.subtitleTrack=t)},N(r,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1;var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,i)}}]),r}(R.default);function A(a){for(var r=[],n=0;n<a.length;n++){var e=a[n];e.kind==="subtitles"&&e.label&&r.push(a[n])}return r}J.default=b},"./src/controller/timeline-controller.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"TimelineController",function(){return A});var X=U("./src/polyfills/number.ts"),F=U("./src/events.ts"),R=U("./src/utils/cea-608-parser.ts"),Z=U("./src/utils/output-filter.ts"),M=U("./src/utils/webvtt-parser.ts"),N=U("./src/utils/texttrack-utils.ts"),O=U("./src/utils/imsc1-ttml-parser.ts"),h=U("./src/types/loader.ts"),b=U("./src/utils/logger.ts"),A=function(){function e(i){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=n(),this.captionsProperties=void 0,this.hls=i,this.config=i.config,this.Cues=i.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 s=new Z.default(this,"textTrack1"),I=new Z.default(this,"textTrack2"),C=new Z.default(this,"textTrack3"),_=new Z.default(this,"textTrack4");this.cea608Parser1=new R.default(1,s,I),this.cea608Parser2=new R.default(3,C,_)}i.on(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),i.on(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),i.on(F.Events.FRAG_LOADING,this.onFragLoading,this),i.on(F.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),i.on(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),i.on(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),i.on(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),i.on(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var s=this.hls;s.off(F.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(F.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(F.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.off(F.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.off(F.Events.FRAG_LOADING,this.onFragLoading,this),s.off(F.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(F.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.off(F.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.off(F.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.off(F.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.off(F.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(s,I,C,_,x){for(var T=!1,d=x.length;d--;){var u=x[d],o=r(u[0],u[1],I,C);if(o>=0&&(u[0]=Math.min(u[0],I),u[1]=Math.max(u[1],C),T=!0,o/(C-I)>.5))return}if(T||x.push([I,C]),this.config.renderTextTracksNatively){var l=this.captionsTracks[s];this.Cues.newCue(l,I,C,_)}else{var m=this.Cues.newCue(null,I,C,_);this.hls.trigger(F.Events.CUES_PARSED,{type:"captions",cues:m,track:s})}},t.onInitPtsFound=function(s,I){var C=this,_=I.frag,x=I.id,T=I.initPTS,d=I.timescale,u=this.unparsedVttFrags;x==="main"&&(this.initPTS[_.cc]=T,this.timescale[_.cc]=d),u.length&&(this.unparsedVttFrags=[],u.forEach(function(o){C.onFragLoaded(F.Events.FRAG_LOADED,o)}))},t.getExistingTrack=function(s){var I=this.media;if(I)for(var C=0;C<I.textTracks.length;C++){var _=I.textTracks[C];if(_[s])return _}return null},t.createCaptionsTrack=function(s){this.config.renderTextTracksNatively?this.createNativeTrack(s):this.createNonNativeTrack(s)},t.createNativeTrack=function(s){if(this.captionsTracks[s])return;var I=this.captionsProperties,C=this.captionsTracks,_=this.media,x=I[s],T=x.label,d=x.languageCode,u=this.getExistingTrack(s);if(u)C[s]=u,Object(N.clearCurrentCues)(C[s]),Object(N.sendAddTrackEvent)(C[s],_);else{var o=this.createTextTrack("captions",T,d);o&&(o[s]=!0,C[s]=o)}},t.createNonNativeTrack=function(s){if(this.nonNativeCaptionsTracks[s])return;var I=this.captionsProperties[s];if(!I)return;var C=I.label,_={_id:s,label:C,kind:"captions",default:I.media?!!I.media.default:!1,closedCaptions:I.media};this.nonNativeCaptionsTracks[s]=_,this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[_]})},t.createTextTrack=function(s,I,C){var _=this.media;return _?_.addTextTrack(s,I,C):void 0},t.onMediaAttaching=function(s,I){this.media=I.media,this._cleanTracks()},t.onMediaDetaching=function(){var s=this.captionsTracks;Object.keys(s).forEach(function(I){Object(N.clearCurrentCues)(s[I]),delete s[I]}),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=n(),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())},t._cleanTracks=function(){var s=this.media;if(!s)return;var I=s.textTracks;if(I)for(var C=0;C<I.length;C++)Object(N.clearCurrentCues)(I[C])},t.onSubtitleTracksUpdated=function(s,I){var C=this;this.textTracks=[];var _=I.subtitleTracks||[],x=_.some(function(o){return o.textCodec===O.IMSC1_CODEC});if(this.config.enableWebVTT||x&&this.config.enableIMSC1){var T=this.tracks&&_&&this.tracks.length===_.length;if(this.tracks=_||[],this.config.renderTextTracksNatively){var d=this.media?this.media.textTracks:[];this.tracks.forEach(function(o,l){var m;if(l<d.length){for(var g=null,E=0;E<d.length;E++)if(a(d[E],o)){g=d[E];break}g&&(m=g)}m?Object(N.clearCurrentCues)(m):(m=C.createTextTrack("subtitles",o.name,o.lang),m&&(m.mode="disabled")),m&&(m.groupId=o.groupId,C.textTracks.push(m))})}else if(!T&&this.tracks&&this.tracks.length){var u=this.tracks.map(function(o){return{label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}});this.hls.trigger(F.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}},t.onManifestLoaded=function(s,I){var C=this;this.config.enableCEA708Captions&&I.captions&&I.captions.forEach(function(_){var x=/(?:CC|SERVICE)([1-4])/.exec(_.instreamId);if(!x)return;var T="textTrack"+x[1],d=C.captionsProperties[T];if(!d)return;d.label=_.name,_.lang&&(d.languageCode=_.lang),d.media=_})},t.onFragLoading=function(s,I){var C=this.cea608Parser1,_=this.cea608Parser2,x=this.lastSn,T=this.lastPartIndex;if(!this.enabled||!(C&&_))return;if(I.frag.type===h.PlaylistLevelType.MAIN){var d,u,o=I.frag.sn,l=(d=I==null||((u=I.part)===null||u===void 0)?void 0:u.index)!=null?d:-1;o===x+1||o===x&&l===T+1||(C.reset(),_.reset()),this.lastSn=o,this.lastPartIndex=l}},t.onFragLoaded=function(s,I){var C=I.frag,_=I.payload,x=this.initPTS,T=this.unparsedVttFrags;if(C.type===h.PlaylistLevelType.SUBTITLE)if(_.byteLength){if(!Object(X.isFiniteNumber)(x[C.cc])){T.push(I),x.length&&this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:C,error:new Error("Missing initial subtitle PTS")});return}var d=C.decryptdata;if(d==null||d.key==null||d.method!=="AES-128"){var u=this.tracks[C.level],o=this.vttCCs;o[C.cc]||(o[C.cc]={start:C.start,prevCC:this.prevCC,new:!0},this.prevCC=C.cc),u&&u.textCodec===O.IMSC1_CODEC?this._parseIMSC1(C,_):this._parseVTTs(C,_,o)}}else this.hls.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:C,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(s,I){var C=this,_=this.hls;Object(O.parseIMSC1)(I,this.initPTS[s.cc],this.timescale[s.cc],function(x){C._appendCues(x,s.level),_.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(x){b.logger.log("Failed to parse IMSC1: "+x),_.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:x})})},t._parseVTTs=function(s,I,C){var _=this,x=this.hls;Object(M.parseWebVTT)(I,this.initPTS[s.cc],this.timescale[s.cc],C,s.cc,s.start,function(T){_._appendCues(T,s.level),x.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(T){_._fallbackToIMSC1(s,I),b.logger.log("Failed to parse VTT cue: "+T),x.trigger(F.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:T})})},t._fallbackToIMSC1=function(s,I){var C=this,_=this.tracks[s.level];_.textCodec||Object(O.parseIMSC1)(I,this.initPTS[s.cc],this.timescale[s.cc],function(){_.textCodec=O.IMSC1_CODEC,C._parseIMSC1(s,I)},function(){_.textCodec="wvtt"})},t._appendCues=function(s,I){var C=this.hls;if(this.config.renderTextTracksNatively){var _=this.textTracks[I];if(_.mode==="disabled")return;s.forEach(function(d){return Object(N.addCueToTrack)(_,d)})}else{var x=this.tracks[I],T=x.default?"default":"subtitles"+I;C.trigger(F.Events.CUES_PARSED,{type:"subtitles",cues:s,track:T})}},t.onFragDecrypted=function(s,I){var C=I.frag;if(C.type===h.PlaylistLevelType.SUBTITLE){if(!Object(X.isFiniteNumber)(this.initPTS[C.cc])){this.unparsedVttFrags.push(I);return}this.onFragLoaded(F.Events.FRAG_LOADED,I)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(s,I){var C=this.cea608Parser1,_=this.cea608Parser2;if(!this.enabled||!(C&&_))return;for(var x=0;x<I.samples.length;x++){var T=I.samples[x].bytes;if(T){var d=this.extractCea608Data(T);C.addData(I.samples[x].pts,d[0]),_.addData(I.samples[x].pts,d[1])}}},t.onBufferFlushing=function(s,I){var C=I.startOffset,_=I.endOffset,x=I.endOffsetSubtitles,T=I.type,d=this.media;if(!d||d.currentTime<_)return;if(!T||T==="video"){var u=this.captionsTracks;Object.keys(u).forEach(function(l){return Object(N.removeCuesInRange)(u[l],C,_)})}if(this.config.renderTextTracksNatively&&(C===0&&x!==void 0)){var o=this.textTracks;Object.keys(o).forEach(function(l){return Object(N.removeCuesInRange)(o[l],C,x)})}},t.extractCea608Data=function(s){for(var I=s[0]&31,C=2,_=[[],[]],x=0;x<I;x++){var T=s[C++],d=127&s[C++],u=127&s[C++],o=(4&T)!==0,l=3&T;if(d===0&&u===0)continue;o&&((l===0||l===1)&&(_[l].push(d),_[l].push(u)))}return _},e}();function a(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}function r(e,t,i,s){return Math.min(t,s)-Math.max(e,i)}function n(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return X});var X=function(){function F(Z,M){this.subtle=void 0,this.aesIV=void 0,this.subtle=Z,this.aesIV=M}var R=F.prototype;return R.decrypt=function(M,N){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},N,M)},F}()},"./src/crypt/aes-decryptor.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"removePadding",function(){return F}),U.d(J,"default",function(){return R});var X=U("./src/utils/typed-array.ts");function F(Z){var M=Z.byteLength,N=M&&new DataView(Z.buffer).getUint8(M-1);return N?Object(X.sliceUint8)(Z,0,M-N):Z}var R=function(){function Z(){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 M=Z.prototype;return M.uint8ArrayToUint32Array_=function(O){for(var h=new DataView(O),b=new Uint32Array(4),A=0;A<4;A++)b[A]=h.getUint32(A*4);return b},M.initTable=function(){var O=this.sBox,h=this.invSBox,b=this.subMix,A=b[0],a=b[1],r=b[2],n=b[3],e=this.invSubMix,t=e[0],i=e[1],s=e[2],I=e[3],C=new Uint32Array(256),_=0,x=0,T=0;for(T=0;T<256;T++)T<128?C[T]=T<<1:C[T]=T<<1^283;for(T=0;T<256;T++){var d=x^x<<1^x<<2^x<<3^x<<4;d=d>>>8^d&255^99,O[_]=d,h[d]=_;var u=C[_],o=C[u],l=C[o],m=C[d]*257^d*16843008;A[_]=m<<24|m>>>8,a[_]=m<<16|m>>>16,r[_]=m<<8|m>>>24,n[_]=m,m=l*16843009^o*65537^u*257^_*16843008,t[d]=m<<24|m>>>8,i[d]=m<<16|m>>>16,s[d]=m<<8|m>>>24,I[d]=m,_?(_=u^C[C[C[l^u]]],x^=C[C[x]]):_=x=1}},M.expandKey=function(O){for(var h=this.uint8ArrayToUint32Array_(O),b=!0,A=0;A<h.length&&b;)b=h[A]===this.key[A],A++;if(b)return;this.key=h;var a=this.keySize=h.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var r=this.ksRows=(a+6+1)*4,n,e,t=this.keySchedule=new Uint32Array(r),i=this.invKeySchedule=new Uint32Array(r),s=this.sBox,I=this.rcon,C=this.invSubMix,_=C[0],x=C[1],T=C[2],d=C[3],u,o;for(n=0;n<r;n++){if(n<a){u=t[n]=h[n];continue}o=u,n%a===0?(o=o<<8|o>>>24,o=s[o>>>24]<<24|s[o>>>16&255]<<16|s[o>>>8&255]<<8|s[o&255],o^=I[n/a|0]<<24):a>6&&n%a===4&&(o=s[o>>>24]<<24|s[o>>>16&255]<<16|s[o>>>8&255]<<8|s[o&255]),t[n]=u=(t[n-a]^o)>>>0}for(e=0;e<r;e++)n=r-e,e&3?o=t[n]:o=t[n-4],e<4||n<=4?i[e]=o:i[e]=_[s[o>>>24]]^x[s[o>>>16&255]]^T[s[o>>>8&255]]^d[s[o&255]],i[e]=i[e]>>>0},M.networkToHostOrderSwap=function(O){return O<<24|(O&65280)<<8|(O&16711680)>>8|O>>>24},M.decrypt=function(O,h,b){for(var A=this.keySize+6,a=this.invKeySchedule,r=this.invSBox,n=this.invSubMix,e=n[0],t=n[1],i=n[2],s=n[3],I=this.uint8ArrayToUint32Array_(b),C=I[0],_=I[1],x=I[2],T=I[3],d=new Int32Array(O),u=new Int32Array(d.length),o,l,m,g,E,L,P,j,z,ee,Q,q,ae,ge,pe=this.networkToHostOrderSwap;h<d.length;){for(z=pe(d[h]),ee=pe(d[h+1]),Q=pe(d[h+2]),q=pe(d[h+3]),E=z^a[0],L=q^a[1],P=Q^a[2],j=ee^a[3],ae=4,ge=1;ge<A;ge++)o=e[E>>>24]^t[L>>16&255]^i[P>>8&255]^s[j&255]^a[ae],l=e[L>>>24]^t[P>>16&255]^i[j>>8&255]^s[E&255]^a[ae+1],m=e[P>>>24]^t[j>>16&255]^i[E>>8&255]^s[L&255]^a[ae+2],g=e[j>>>24]^t[E>>16&255]^i[L>>8&255]^s[P&255]^a[ae+3],E=o,L=l,P=m,j=g,ae=ae+4;o=r[E>>>24]<<24^r[L>>16&255]<<16^r[P>>8&255]<<8^r[j&255]^a[ae],l=r[L>>>24]<<24^r[P>>16&255]<<16^r[j>>8&255]<<8^r[E&255]^a[ae+1],m=r[P>>>24]<<24^r[j>>16&255]<<16^r[E>>8&255]<<8^r[L&255]^a[ae+2],g=r[j>>>24]<<24^r[E>>16&255]<<16^r[L>>8&255]<<8^r[P&255]^a[ae+3],u[h]=pe(o^C),u[h+1]=pe(g^_),u[h+2]=pe(m^x),u[h+3]=pe(l^T),C=z,_=ee,x=Q,T=q,h=h+4}return u.buffer},Z}()},"./src/crypt/decrypter.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return h});var X=U("./src/crypt/aes-crypto.ts"),F=U("./src/crypt/fast-aes-key.ts"),R=U("./src/crypt/aes-decryptor.ts"),Z=U("./src/utils/logger.ts"),M=U("./src/utils/mp4-tools.ts"),N=U("./src/utils/typed-array.ts"),O=16,h=function(){function b(a,r,n){var e=n===void 0?{}:n,t=e.removePKCS7Padding,i=t===void 0?!0:t;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=i,i)try{var s=self.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch(I){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var A=b.prototype;return A.destroy=function(){this.observer=null},A.isSync=function(){return this.config.enableSoftwareAES},A.flush=function(){var r=this.currentResult;if(!r){this.reset();return}var n=new Uint8Array(r);return this.reset(),this.removePKCS7Padding?Object(R.removePadding)(n):n},A.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},A.decrypt=function(r,n,e,t){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(r),n,e);var i=this.flush();i&&t(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(r),n,e).then(t)},A.softwareDecrypt=function(r,n,e){var t=this.currentIV,i=this.currentResult,s=this.remainderData;this.logOnce("JS AES decrypt"),s&&(r=Object(M.appendUint8Array)(s,r),this.remainderData=null);var I=this.getValidChunk(r);if(!I.length)return null;t&&(e=t);var C=this.softwareDecrypter;C||(C=this.softwareDecrypter=new R.default),C.expandKey(n);var _=i;return this.currentResult=C.decrypt(I.buffer,0,e),this.currentIV=Object(N.sliceUint8)(I,-16).buffer,_||null},A.webCryptoDecrypt=function(r,n,e){var t=this,i=this.subtle;return(this.key!==n||!this.fastAesKey)&&(this.key=n,this.fastAesKey=new F.default(i,n)),this.fastAesKey.expandKey().then(function(s){if(!i)return Promise.reject(new Error("web crypto not initialized"));var I=new X.default(i,e);return I.decrypt(r.buffer,s)}).catch(function(s){return t.onWebCryptoError(s,r,n,e)})},A.onWebCryptoError=function(r,n,e,t){return Z.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",r),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(n,e,t)},A.getValidChunk=function(r){var n=r,e=r.length-r.length%O;return e!==r.length&&(n=Object(N.sliceUint8)(r,0,e),this.remainderData=Object(N.sliceUint8)(r,e)),n},A.logOnce=function(r){if(!this.logEnabled)return;Z.logger.log("[decrypter.ts]: "+r),this.logEnabled=!1},b}()},"./src/crypt/fast-aes-key.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return X});var X=function(){function F(Z,M){this.subtle=void 0,this.key=void 0,this.subtle=Z,this.key=M}var R=F.prototype;return R.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},F}()},"./src/demux/aacdemuxer.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/demux/base-audio-demuxer.ts"),F=U("./src/demux/adts.ts"),R=U("./src/utils/logger.ts"),Z=U("./src/demux/id3.ts");function M(h,b){h.prototype=Object.create(b.prototype),h.prototype.constructor=h,N(h,b)}function N(h,b){return N=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},N(h,b)}var O=function(h){M(b,h);function b(a,r){var n;return n=h.call(this)||this,n.observer=void 0,n.config=void 0,n.observer=a,n.config=r,n}var A=b.prototype;return A.resetInitSegment=function(r,n,e){h.prototype.resetInitSegment.call(this,r,n,e),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:r,duration:e,inputTimeScale:9e4,dropped:0}},b.probe=function(r){if(!r)return!1;for(var n=Z.getID3Data(r,0)||[],e=n.length,t=r.length;e<t;e++)if(F.probe(r,e))return R.logger.log("ADTS sync word found !"),!0;return!1},A.canParse=function(r,n){return F.canParse(r,n)},A.appendFrame=function(r,n,e){F.initTrackConfig(r,this.observer,n,e,r.manifestCodec);var t=F.appendFrame(r,n,e,this.initPTS,this.frameIndex);if(t&&t.missing===0)return t},b}(X.default);O.minProbeByteLength=9,J.default=O},"./src/demux/adts.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"getAudioConfig",function(){return Z}),U.d(J,"isHeaderPattern",function(){return M}),U.d(J,"getHeaderLength",function(){return N}),U.d(J,"getFullFrameLength",function(){return O}),U.d(J,"canGetFrameLength",function(){return h}),U.d(J,"isHeader",function(){return b}),U.d(J,"canParse",function(){return A}),U.d(J,"probe",function(){return a}),U.d(J,"initTrackConfig",function(){return r}),U.d(J,"getFrameDuration",function(){return n}),U.d(J,"parseFrameHeader",function(){return e}),U.d(J,"appendFrame",function(){return t});var X=U("./src/utils/logger.ts"),F=U("./src/errors.ts"),R=U("./src/events.ts");function Z(i,s,I,C){var _,x,T,d,u=navigator.userAgent.toLowerCase(),o=C,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_=((s[I+2]&192)>>>6)+1;var m=(s[I+2]&60)>>>2;if(m>l.length-1){i.trigger(R.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+m});return}return T=(s[I+2]&1)<<2,T|=(s[I+3]&192)>>>6,X.logger.log("manifest codec:"+C+", ADTS type:"+_+", samplingIndex:"+m),/firefox/i.test(u)?m>=6?(_=5,d=new Array(4),x=m-3):(_=2,d=new Array(2),x=m):u.indexOf("android")!==-1?(_=2,d=new Array(2),x=m):(_=5,d=new Array(4),C&&(C.indexOf("mp4a.40.29")!==-1||C.indexOf("mp4a.40.5")!==-1)||!C&&m>=6?x=m-3:((C&&C.indexOf("mp4a.40.2")!==-1&&(m>=6&&T===1||/vivaldi/i.test(u))||!C&&T===1)&&(_=2,d=new Array(2)),x=m)),d[0]=_<<3,d[0]|=(m&14)>>1,d[1]|=(m&1)<<7,d[1]|=T<<3,_===5&&(d[1]|=(x&14)>>1,d[2]=(x&1)<<7,d[2]|=2<<2,d[3]=0),{config:d,samplerate:l[m],channelCount:T,codec:"mp4a.40."+_,manifestCodec:o}}function M(i,s){return i[s]===255&&(i[s+1]&246)===240}function N(i,s){return i[s+1]&1?7:9}function O(i,s){return(i[s+3]&3)<<11|i[s+4]<<3|(i[s+5]&224)>>>5}function h(i,s){return s+5<i.length}function b(i,s){return s+1<i.length&&M(i,s)}function A(i,s){return h(i,s)&&M(i,s)&&O(i,s)<=i.length-s}function a(i,s){if(b(i,s)){var I=N(i,s);if(s+I>=i.length)return!1;var C=O(i,s);if(C<=I)return!1;var _=s+C;return _===i.length||b(i,_)}return!1}function r(i,s,I,C,_){if(!i.samplerate){var x=Z(s,I,C,_);if(!x)return;i.config=x.config,i.samplerate=x.samplerate,i.channelCount=x.channelCount,i.codec=x.codec,i.manifestCodec=x.manifestCodec,X.logger.log("parsed codec:"+i.codec+", rate:"+x.samplerate+", channels:"+x.channelCount)}}function n(i){return 1024*9e4/i}function e(i,s,I,C,_){var x=N(i,s),T=O(i,s);if(T-=x,T>0){var d=I+C*_;return{headerLength:x,frameLength:T,stamp:d}}}function t(i,s,I,C,_){var x=n(i.samplerate),T=e(s,I,C,_,x);if(T){var d=T.frameLength,u=T.headerLength,o=T.stamp,l=u+d,m=Math.max(0,I+l-s.length),g;m?(g=new Uint8Array(l-u),g.set(s.subarray(I+u,s.length),0)):g=s.subarray(I+u,I+l);var E={unit:g,pts:o};return m||i.samples.push(E),{sample:E,length:l,missing:m}}}},"./src/demux/base-audio-demuxer.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"initPTSFn",function(){return O});var X=U("./src/polyfills/number.ts"),F=U("./src/demux/id3.ts"),R=U("./src/demux/dummy-demuxed-track.ts"),Z=U("./src/utils/mp4-tools.ts"),M=U("./src/utils/typed-array.ts"),N=function(){function h(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var b=h.prototype;return b.resetInitSegment=function(a,r,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},b.resetTimeStamp=function(){},b.resetContiguity=function(){},b.canParse=function(a,r){return!1},b.appendFrame=function(a,r,n){},b.demux=function(a,r){this.cachedData&&(a=Object(Z.appendUint8Array)(this.cachedData,a),this.cachedData=null);var n=F.getID3Data(a,0),e=n?n.length:0,t,i,s=this._audioTrack,I=this._id3Track,C=n?F.getTimeStamp(n):void 0,_=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=O(C,r)),n&&n.length>0&&I.samples.push({pts:this.initPTS,dts:this.initPTS,data:n}),i=this.initPTS;e<_;){if(this.canParse(a,e)){var x=this.appendFrame(s,a,e);x?(this.frameIndex++,i=x.sample.pts,e+=x.length,t=e):e=_}else F.canParse(a,e)?(n=F.getID3Data(a,e),I.samples.push({pts:i,dts:i,data:n}),e+=n.length,t=e):e++;if(e===_&&t!==_){var T=Object(M.sliceUint8)(a,t);this.cachedData?this.cachedData=Object(Z.appendUint8Array)(this.cachedData,T):this.cachedData=T}}return{audioTrack:s,avcTrack:Object(R.dummyTrack)(),id3Track:I,textTrack:Object(R.dummyTrack)()}},b.demuxSampleAes=function(a,r,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},b.flush=function(a){var r=this.cachedData;return r&&(this.cachedData=null,this.demux(r,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(R.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(R.dummyTrack)()}},b.destroy=function(){},h}(),O=function(b,A){return Object(X.isFiniteNumber)(b)?b*90:A*9e4};J.default=N},"./src/demux/chunk-cache.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return X});var X=function(){function R(){this.chunks=[],this.dataLength=0}var Z=R.prototype;return Z.push=function(N){this.chunks.push(N),this.dataLength+=N.length},Z.flush=function(){var N=this.chunks,O=this.dataLength,h;if(N.length)N.length===1?h=N[0]:h=F(N,O);else return new Uint8Array(0);return this.reset(),h},Z.reset=function(){this.chunks.length=0,this.dataLength=0},R}();function F(R,Z){for(var M=new Uint8Array(Z),N=0,O=0;O<R.length;O++){var h=R[O];M.set(h,N),N+=h.length}return M}},"./src/demux/dummy-demuxed-track.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"dummyTrack",function(){return X});function X(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/utils/logger.ts"),F=function(){function R(M){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=M,this.bytesAvailable=M.byteLength,this.word=0,this.bitsAvailable=0}var Z=R.prototype;return Z.loadWord=function(){var N=this.data,O=this.bytesAvailable,h=N.byteLength-O,b=new Uint8Array(4),A=Math.min(4,O);if(A===0)throw new Error("no bytes available");b.set(N.subarray(h,h+A)),this.word=new DataView(b.buffer).getUint32(0),this.bitsAvailable=A*8,this.bytesAvailable-=A},Z.skipBits=function(N){var O;this.bitsAvailable>N?(this.word<<=N,this.bitsAvailable-=N):(N-=this.bitsAvailable,O=N>>3,N-=O>>3,this.bytesAvailable-=O,this.loadWord(),this.word<<=N,this.bitsAvailable-=N)},Z.readBits=function(N){var O=Math.min(this.bitsAvailable,N),h=this.word>>>32-O;return N>32&&X.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=O,this.bitsAvailable>0?this.word<<=O:this.bytesAvailable>0&&this.loadWord(),O=N-O,O>0&&this.bitsAvailable?h<<O|this.readBits(O):h},Z.skipLZ=function(){var N;for(N=0;N<this.bitsAvailable;++N)if((this.word&2147483648>>>N)!==0)return this.word<<=N,this.bitsAvailable-=N,N;return this.loadWord(),N+this.skipLZ()},Z.skipUEG=function(){this.skipBits(1+this.skipLZ())},Z.skipEG=function(){this.skipBits(1+this.skipLZ())},Z.readUEG=function(){var N=this.skipLZ();return this.readBits(N+1)-1},Z.readEG=function(){var N=this.readUEG();return 1&N?1+N>>>1:-1*(N>>>1)},Z.readBoolean=function(){return this.readBits(1)===1},Z.readUByte=function(){return this.readBits(8)},Z.readUShort=function(){return this.readBits(16)},Z.readUInt=function(){return this.readBits(32)},Z.skipScalingList=function(N){for(var O=8,h=8,b,A=0;A<N;A++)h!==0&&(b=this.readEG(),h=(O+b+256)%256),O=h===0?O:h},Z.readSPS=function(){var N=0,O=0,h=0,b=0,A,a,r,n=this.readUByte.bind(this),e=this.readBits.bind(this),t=this.readUEG.bind(this),i=this.readBoolean.bind(this),s=this.skipBits.bind(this),I=this.skipEG.bind(this),C=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);n();var x=n();if(e(5),s(3),n(),C(),x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128){var T=t();if(T===3&&s(1),C(),C(),s(1),i())for(a=T!==3?8:12,r=0;r<a;r++)i()&&(r<6?_(16):_(64))}C();var d=t();if(d===0)t();else if(d===1)for(s(1),I(),I(),A=t(),r=0;r<A;r++)I();C(),s(1);var u=t(),o=t(),l=e(1);l===0&&s(1),s(1),i()&&(N=t(),O=t(),h=t(),b=t());var m=[1,1];if(i()&&i()){var g=n();switch(g){case 1:m=[1,1];break;case 2:m=[12,11];break;case 3:m=[10,11];break;case 4:m=[16,11];break;case 5:m=[40,33];break;case 6:m=[24,11];break;case 7:m=[20,11];break;case 8:m=[32,11];break;case 9:m=[80,33];break;case 10:m=[18,11];break;case 11:m=[15,11];break;case 12:m=[64,33];break;case 13:m=[160,99];break;case 14:m=[4,3];break;case 15:m=[3,2];break;case 16:m=[2,1];break;case 255:{m=[n()<<8|n(),n()<<8|n()];break}}}return{width:Math.ceil((u+1)*16-N*2-O*2),height:(2-l)*(o+1)*16-(l?2:4)*(h+b),pixelRatio:m}},Z.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},R}();J.default=F},"./src/demux/id3.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"isHeader",function(){return X}),U.d(J,"isFooter",function(){return F}),U.d(J,"getID3Data",function(){return R}),U.d(J,"canParse",function(){return M}),U.d(J,"getTimeStamp",function(){return N}),U.d(J,"isTimeStampFrame",function(){return O}),U.d(J,"getID3Frames",function(){return b}),U.d(J,"decodeFrame",function(){return A}),U.d(J,"utf8ArrayToStr",function(){return t}),U.d(J,"testables",function(){return i});var X=function(_,x){return x+10<=_.length&&(_[x]===73&&_[x+1]===68&&_[x+2]===51&&(_[x+3]<255&&_[x+4]<255&&(_[x+6]<128&&_[x+7]<128&&_[x+8]<128&&_[x+9]<128)))},F=function(_,x){return x+10<=_.length&&(_[x]===51&&_[x+1]===68&&_[x+2]===73&&(_[x+3]<255&&_[x+4]<255&&(_[x+6]<128&&_[x+7]<128&&_[x+8]<128&&_[x+9]<128)))},R=function(_,x){for(var T=x,d=0;X(_,x);){d+=10;var u=Z(_,x+6);d+=u,F(_,x+10)&&(d+=10),x+=d}return d>0?_.subarray(T,T+d):void 0},Z=function(_,x){var T=0;return T=(_[x]&127)<<21,T|=(_[x+1]&127)<<14,T|=(_[x+2]&127)<<7,T|=_[x+3]&127,T},M=function(_,x){return X(_,x)&&Z(_,x+6)+10<=_.length-x},N=function(_){for(var x=b(_),T=0;T<x.length;T++){var d=x[T];if(O(d))return e(d)}return},O=function(_){return _&&_.key==="PRIV"&&_.info==="com.apple.streaming.transportStreamTimestamp"},h=function(_){var x=String.fromCharCode(_[0],_[1],_[2],_[3]),T=Z(_,4),d=10;return{type:x,size:T,data:_.subarray(d,d+T)}},b=function(_){for(var x=0,T=[];X(_,x);){var d=Z(_,x+6);x+=10;for(var u=x+d;x+8<u;){var o=h(_.subarray(x)),l=A(o);l&&T.push(l),x+=o.size+10}F(_,x)&&(x+=10)}return T},A=function(_){return _.type==="PRIV"?a(_):_.type[0]==="W"?n(_):r(_)},a=function(_){if(_.size<2)return;var x=t(_.data,!0),T=new Uint8Array(_.data.subarray(x.length+1));return{key:_.type,info:x,data:T.buffer}},r=function(_){if(_.size<2)return;if(_.type==="TXXX"){var x=1,T=t(_.data.subarray(x),!0);x+=T.length+1;var d=t(_.data.subarray(x));return{key:_.type,info:T,data:d}}var u=t(_.data.subarray(1));return{key:_.type,data:u}},n=function(_){if(_.type==="WXXX"){if(_.size<2)return;var x=1,T=t(_.data.subarray(x),!0);x+=T.length+1;var d=t(_.data.subarray(x));return{key:_.type,info:T,data:d}}var u=t(_.data);return{key:_.type,data:u}},e=function(_){if(_.data.byteLength===8){var x=new Uint8Array(_.data),T=x[3]&1,d=(x[4]<<23)+(x[5]<<15)+(x[6]<<7)+x[7];return d/=45,T&&(d+=4772185884e-2),Math.round(d)}return},t=function(_,x){x===void 0&&(x=!1);var T=I();if(T){var d=T.decode(_);if(x){var u=d.indexOf("\0");return u!==-1?d.substring(0,u):d}return d.replace(/\0/g,"")}for(var o=_.length,l,m,g,E="",L=0;L<o;){if(l=_[L++],l===0&&x)return E;if(l===0||l===3)continue;switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:E+=String.fromCharCode(l);break;case 12:case 13:m=_[L++],E+=String.fromCharCode((l&31)<<6|m&63);break;case 14:m=_[L++],g=_[L++],E+=String.fromCharCode((l&15)<<12|(m&63)<<6|(g&63)<<0);break;default:}}return E},i={decodeTextFrame:r},s;function I(){return!s&&typeof self.TextDecoder!="undefined"&&(s=new self.TextDecoder("utf-8")),s}},"./src/demux/mp3demuxer.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/demux/base-audio-demuxer.ts"),F=U("./src/demux/id3.ts"),R=U("./src/utils/logger.ts"),Z=U("./src/demux/mpegaudio.ts");function M(h,b){h.prototype=Object.create(b.prototype),h.prototype.constructor=h,N(h,b)}function N(h,b){return N=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},N(h,b)}var O=function(h){M(b,h);function b(){return h.apply(this,arguments)||this}var A=b.prototype;return A.resetInitSegment=function(r,n,e){h.prototype.resetInitSegment.call(this,r,n,e),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:r,duration:e,inputTimeScale:9e4,dropped:0}},b.probe=function(r){if(!r)return!1;for(var n=F.getID3Data(r,0)||[],e=n.length,t=r.length;e<t;e++)if(Z.probe(r,e))return R.logger.log("MPEG Audio sync word found !"),!0;return!1},A.canParse=function(r,n){return Z.canParse(r,n)},A.appendFrame=function(r,n,e){return this.initPTS===null?void 0:Z.appendFrame(r,n,e,this.initPTS,this.frameIndex)},b}(X.default);O.minProbeByteLength=4,J.default=O},"./src/demux/mp4demuxer.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/utils/mp4-tools.ts"),F=U("./src/demux/dummy-demuxed-track.ts"),R=function(){function Z(N,O){this.remainderData=null,this.config=void 0,this.config=O}var M=Z.prototype;return M.resetTimeStamp=function(){},M.resetInitSegment=function(){},M.resetContiguity=function(){},Z.probe=function(O){return Object(X.findBox)({data:O,start:0,end:Math.min(O.length,16384)},["moof"]).length>0},M.demux=function(O){var h=O,b=Object(F.dummyTrack)();if(this.config.progressive){this.remainderData&&(h=Object(X.appendUint8Array)(this.remainderData,O));var A=Object(X.segmentValidRange)(h);this.remainderData=A.remainder,b.samples=A.valid||new Uint8Array}else b.samples=h;return{audioTrack:Object(F.dummyTrack)(),avcTrack:b,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},M.flush=function(){var O=Object(F.dummyTrack)();return O.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(F.dummyTrack)(),avcTrack:O,id3Track:Object(F.dummyTrack)(),textTrack:Object(F.dummyTrack)()}},M.demuxSampleAes=function(O,h,b){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},M.destroy=function(){},Z}();R.minProbeByteLength=1024,J.default=R},"./src/demux/mpegaudio.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"appendFrame",function(){return N}),U.d(J,"parseHeader",function(){return O}),U.d(J,"isHeaderPattern",function(){return h}),U.d(J,"isHeader",function(){return b}),U.d(J,"canParse",function(){return A}),U.d(J,"probe",function(){return a});var X=null,F=[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],R=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Z=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],M=[0,1,1,4];function N(r,n,e,t,i){if(e+24>n.length)return;var s=O(n,e);if(s&&e+s.frameLength<=n.length){var I=s.samplesPerFrame*9e4/s.sampleRate,C=t+i*I,_={unit:n.subarray(e,e+s.frameLength),pts:C,dts:C};return r.config=[],r.channelCount=s.channelCount,r.samplerate=s.sampleRate,r.samples.push(_),{sample:_,length:s.frameLength,missing:0}}}function O(r,n){var e=r[n+1]>>3&3,t=r[n+1]>>1&3,i=r[n+2]>>4&15,s=r[n+2]>>2&3;if(e!==1&&i!==0&&i!==15&&s!==3){var I=r[n+2]>>1&1,C=r[n+3]>>6,_=e===3?3-t:t===3?3:4,x=F[_*14+i-1]*1e3,T=e===3?0:e===2?1:2,d=R[T*3+s],u=C===3?1:2,o=Z[e][t],l=M[t],m=o*8*l,g=Math.floor(o*x/d+I)*l;if(X===null){var E=navigator.userAgent||"",L=E.match(/Chrome\/(\d+)/i);X=L?parseInt(L[1]):0}var P=!!X&&X<=87;return P&&t===2&&x>=224e3&&C===0&&(r[n+3]=r[n+3]|128),{sampleRate:d,channelCount:u,frameLength:g,samplesPerFrame:m}}}function h(r,n){return r[n]===255&&(r[n+1]&224)===224&&(r[n+1]&6)!==0}function b(r,n){return n+1<r.length&&h(r,n)}function A(r,n){var e=4;return h(r,n)&&e<=r.length-n}function a(r,n){if(n+1<r.length&&h(r,n)){var e=4,t=O(r,n),i=e;t!=null&&t.frameLength&&(i=t.frameLength);var s=n+i;return s===r.length||b(r,s)}return!1}},"./src/demux/sample-aes.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/crypt/decrypter.ts"),F=U("./src/demux/tsdemuxer.ts"),R=function(){function Z(N,O,h){this.keyData=void 0,this.decrypter=void 0,this.keyData=h,this.decrypter=new X.default(N,O,{removePKCS7Padding:!1})}var M=Z.prototype;return M.decryptBuffer=function(O,h){this.decrypter.decrypt(O,this.keyData.key.buffer,this.keyData.iv.buffer,h)},M.decryptAacSample=function(O,h,b,A){var a=O[h].unit,r=a.subarray(16,a.length-a.length%16),n=r.buffer.slice(r.byteOffset,r.byteOffset+r.length),e=this;this.decryptBuffer(n,function(t){var i=new Uint8Array(t);a.set(i,16),A||e.decryptAacSamples(O,h+1,b)})},M.decryptAacSamples=function(O,h,b){for(;;h++){if(h>=O.length){b();return}if(O[h].unit.length<32)continue;var A=this.decrypter.isSync();if(this.decryptAacSample(O,h,b,A),!A)return}},M.getAvcEncryptedData=function(O){for(var h=Math.floor((O.length-48)/160)*16+16,b=new Int8Array(h),A=0,a=32;a<=O.length-16;a+=160,A+=16)b.set(O.subarray(a,a+16),A);return b},M.getAvcDecryptedUnit=function(O,h){for(var b=new Uint8Array(h),A=0,a=32;a<=O.length-16;a+=160,A+=16)O.set(b.subarray(A,A+16),a);return O},M.decryptAvcSample=function(O,h,b,A,a,r){var n=Object(F.discardEPB)(a.data),e=this.getAvcEncryptedData(n),t=this;this.decryptBuffer(e.buffer,function(i){a.data=t.getAvcDecryptedUnit(n,i),r||t.decryptAvcSamples(O,h,b+1,A)})},M.decryptAvcSamples=function(O,h,b,A){if(O instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,b=0){if(h>=O.length){A();return}for(var a=O[h].units;!(b>=a.length);b++){var r=a[b];if(r.data.length<=48||r.type!==1&&r.type!==5)continue;var n=this.decrypter.isSync();if(this.decryptAvcSample(O,h,b,A,r,n),!n)return}}},Z}();J.default=R},"./src/demux/transmuxer-interface.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return a});var X=U("./node_modules/webworkify-webpack/index.js"),F=U.n(X),R=U("./src/events.ts"),Z=U("./src/demux/transmuxer.ts"),M=U("./src/utils/logger.ts"),N=U("./src/errors.ts"),O=U("./src/utils/mediasource-helper.ts"),h=U("./node_modules/eventemitter3/index.js"),b=U.n(h),A=Object(O.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function r(e,t,i,s){var I=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=e,this.id=t,this.onTransmuxComplete=i,this.onFlush=s;var C=e.config,_=function(o,l){l=l||{},l.frag=I.frag,l.id=I.id,e.trigger(o,l)};this.observer=new h.EventEmitter,this.observer.on(R.Events.FRAG_DECRYPTED,_),this.observer.on(R.Events.ERROR,_);var x={mp4:A.isTypeSupported("video/mp4"),mpeg:A.isTypeSupported("audio/mpeg"),mp3:A.isTypeSupported('audio/mp4; codecs="mp3"')},T=navigator.vendor;if(C.enableWorker&&typeof Worker!="undefined"){M.logger.log("demuxing in webworker");var d;try{d=this.worker=X("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),d.addEventListener("message",this.onwmsg),d.onerror=function(u){e.trigger(R.Events.ERROR,{type:N.ErrorTypes.OTHER_ERROR,details:N.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(u.message+" ("+u.filename+":"+u.lineno+")")})},d.postMessage({cmd:"init",typeSupported:x,vendor:T,id:t,config:JSON.stringify(C)})}catch(u){M.logger.warn("Error in worker:",u),M.logger.error("Error while initializing DemuxerWorker, fallback to inline"),d&&self.URL.revokeObjectURL(d.objectURL),this.transmuxer=new Z.default(this.observer,x,C,T,t),this.worker=null}}else this.transmuxer=new Z.default(this.observer,x,C,T,t)}var n=r.prototype;return n.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var i=this.transmuxer;i&&(i.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.observer=null},n.push=function(t,i,s,I,C,_,x,T,d,u){var o=this;d.transmuxing.start=self.performance.now();var l=this.transmuxer,m=this.worker,g=_?_.start:C.start,E=C.decryptdata,L=this.frag,P=!(L&&C.cc===L.cc),j=!(L&&d.level===L.level),z=L?d.sn-L.sn:-1,ee=this.part?d.part-this.part.index:1,Q=!j&&(z===1||z===0&&ee===1),q=self.performance.now();(j||z||C.stats.parsing.start===0)&&(C.stats.parsing.start=q),_&&(ee||!Q)&&(_.stats.parsing.start=q);var ae=new Z.TransmuxState(P,Q,T,j,g);if(!Q||P){M.logger.log("[transmuxer-interface, "+C.type+"]: Starting new transmux session for sn: "+d.sn+" p: "+d.part+" level: "+d.level+" id: "+d.id+`
discontinuity: `+P+`
trackSwitch: `+j+`
contiguous: `+Q+`
accurateTimeOffset: `+T+`
timeOffset: `+g);var ge=new Z.TransmuxConfig(s,I,i,x,u);this.configureTransmuxer(ge)}if(this.frag=C,this.part=_,m)m.postMessage({cmd:"demux",data:t,decryptdata:E,chunkMeta:d,state:ae},t instanceof ArrayBuffer?[t]:[]);else if(l){var pe=l.push(t,E,d,ae);Object(Z.isPromise)(pe)?pe.then(function(Ne){o.handleTransmuxComplete(Ne)}):this.handleTransmuxComplete(pe)}},n.flush=function(t){var i=this;t.transmuxing.start=self.performance.now();var s=this.transmuxer,I=this.worker;if(I)I.postMessage({cmd:"flush",chunkMeta:t});else if(s){var C=s.flush(t);Object(Z.isPromise)(C)?C.then(function(_){i.handleFlushResult(_,t)}):this.handleFlushResult(C,t)}},n.handleFlushResult=function(t,i){var s=this;t.forEach(function(I){s.handleTransmuxComplete(I)}),this.onFlush(i)},n.onWorkerMessage=function(t){var i=t.data,s=this.hls;switch(i.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(i.data);break}case"flush":{this.onFlush(i.data);break}default:{i.data=i.data||{},i.data.frag=this.frag,i.data.id=this.id,s.trigger(i.event,i.data);break}}},n.configureTransmuxer=function(t){var i=this.worker,s=this.transmuxer;i?i.postMessage({cmd:"configure",config:t}):s&&s.configure(t)},n.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},r}()},"./src/demux/transmuxer-worker.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return N});var X=U("./src/demux/transmuxer.ts"),F=U("./src/events.ts"),R=U("./src/utils/logger.ts"),Z=U("./node_modules/eventemitter3/index.js"),M=U.n(Z);function N(a){var r=new Z.EventEmitter,n=function(t,i){a.postMessage({event:t,data:i})};r.on(F.Events.FRAG_DECRYPTED,n),r.on(F.Events.ERROR,n),a.addEventListener("message",function(e){var t=e.data;switch(t.cmd){case"init":{var i=JSON.parse(t.config);a.transmuxer=new X.default(r,t.typeSupported,i,t.vendor,t.id),Object(R.enableLogs)(i.debug),n("init",null);break}case"configure":{a.transmuxer.configure(t.config);break}case"demux":{var s=a.transmuxer.push(t.data,t.decryptdata,t.chunkMeta,t.state);Object(X.isPromise)(s)?s.then(function(_){O(a,_)}):O(a,s);break}case"flush":{var I=t.chunkMeta,C=a.transmuxer.flush(I);Object(X.isPromise)(C)?C.then(function(_){b(a,_,I)}):b(a,C,I);break}default:break}})}function O(a,r){if(A(r.remuxResult))return;var n=[],e=r.remuxResult,t=e.audio,i=e.video;t&&h(n,t),i&&h(n,i),a.postMessage({event:"transmuxComplete",data:r},n)}function h(a,r){r.data1&&a.push(r.data1.buffer),r.data2&&a.push(r.data2.buffer)}function b(a,r,n){r.forEach(function(e){O(a,e)}),a.postMessage({event:"flush",data:n})}function A(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return i}),U.d(J,"isPromise",function(){return C}),U.d(J,"TransmuxConfig",function(){return _}),U.d(J,"TransmuxState",function(){return x});var X=U("./src/events.ts"),F=U("./src/errors.ts"),R=U("./src/crypt/decrypter.ts"),Z=U("./src/demux/aacdemuxer.ts"),M=U("./src/demux/mp4demuxer.ts"),N=U("./src/demux/tsdemuxer.ts"),O=U("./src/demux/mp3demuxer.ts"),h=U("./src/remux/mp4-remuxer.ts"),b=U("./src/remux/passthrough-remuxer.ts"),A=U("./src/demux/chunk-cache.ts"),a=U("./src/utils/mp4-tools.ts"),r=U("./src/utils/logger.ts"),n;try{n=self.performance.now.bind(self.performance)}catch(T){r.logger.debug("Unable to use Performance API on this environment"),n=self.Date.now}var e=[{demux:N.default,remux:h.default},{demux:M.default,remux:b.default},{demux:Z.default,remux:h.default},{demux:O.default,remux:h.default}],t=1024;e.forEach(function(T){var d=T.demux;t=Math.max(t,d.minProbeByteLength)});var i=function(){function T(u,o,l,m,g){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 A.default,this.observer=u,this.typeSupported=o,this.config=l,this.vendor=m,this.id=g}var d=T.prototype;return d.configure=function(o){this.transmuxConfig=o,this.decrypter&&this.decrypter.reset()},d.push=function(o,l,m,g){var E=this,L=m.transmuxing;L.executeStart=n();var P=new Uint8Array(o),j=this.cache,z=this.config,ee=this.currentTransmuxState,Q=this.transmuxConfig;g&&(this.currentTransmuxState=g);var q=s(P,l);if(q&&q.method==="AES-128"){var ae=this.getDecrypter();if(z.enableSoftwareAES){var ge=ae.softwareDecrypt(P,q.key.buffer,q.iv.buffer);if(!ge)return L.executeEnd=n(),I(m);P=new Uint8Array(ge)}else return this.decryptionPromise=ae.webCryptoDecrypt(P,q.key.buffer,q.iv.buffer).then(function(V){var Y=E.push(V,null,m);return E.decryptionPromise=null,Y}),this.decryptionPromise}var pe=g||ee,Ne=pe.contiguous,Fe=pe.discontinuity,He=pe.trackSwitch,Ke=pe.accurateTimeOffset,Xe=pe.timeOffset,Ce=Q.audioCodec,ye=Q.videoCodec,Pe=Q.defaultInitPts,Et=Q.duration,mt=Q.initSegmentData;if((Fe||He)&&this.resetInitSegment(mt,Ce,ye,Et),Fe&&this.resetInitialTimestamp(Pe),Ne||this.resetContiguity(),this.needsProbing(P,Fe,He)){if(j.dataLength){var gt=j.flush();P=Object(a.appendUint8Array)(gt,P)}this.configureTransmuxer(P,Q)}var bt=this.transmux(P,q,Xe,Ke,m),oe=this.currentTransmuxState;return oe.contiguous=!0,oe.discontinuity=!1,oe.trackSwitch=!1,L.executeEnd=n(),bt},d.flush=function(o){var l=this,m=o.transmuxing;m.executeStart=n();var g=this.decrypter,E=this.cache,L=this.currentTransmuxState,P=this.decryptionPromise;if(P)return P.then(function(){return l.flush(o)});var j=[],z=L.timeOffset;if(g){var ee=g.flush();ee&&j.push(this.push(ee,null,o))}var Q=E.dataLength;E.reset();var q=this.demuxer,ae=this.remuxer;if(!q||!ae)return Q>=t&&this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:F.ErrorTypes.MEDIA_ERROR,details:F.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),m.executeEnd=n(),[I(o)];var ge=q.flush(z);return C(ge)?ge.then(function(pe){return l.flushRemux(j,pe,o),j}):(this.flushRemux(j,ge,o),j)},d.flushRemux=function(o,l,m){var g=l.audioTrack,E=l.avcTrack,L=l.id3Track,P=l.textTrack,j=this.currentTransmuxState,z=j.accurateTimeOffset,ee=j.timeOffset;r.logger.log("[transmuxer.ts]: Flushed fragment "+m.sn+(m.part>-1?" p: "+m.part:"")+" of level "+m.level);var Q=this.remuxer.remux(g,E,L,P,ee,z,!0,this.id);o.push({remuxResult:Q,chunkMeta:m}),m.transmuxing.executeEnd=n()},d.resetInitialTimestamp=function(o){var l=this.demuxer,m=this.remuxer;if(!l||!m)return;l.resetTimeStamp(o),m.resetTimeStamp(o)},d.resetContiguity=function(){var o=this.demuxer,l=this.remuxer;if(!o||!l)return;o.resetContiguity(),l.resetNextTimestamp()},d.resetInitSegment=function(o,l,m,g){var E=this.demuxer,L=this.remuxer;if(!E||!L)return;E.resetInitSegment(l,m,g),L.resetInitSegment(o,l,m)},d.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},d.transmux=function(o,l,m,g,E){var L;return l&&l.method==="SAMPLE-AES"?L=this.transmuxSampleAes(o,l,m,g,E):L=this.transmuxUnencrypted(o,m,g,E),L},d.transmuxUnencrypted=function(o,l,m,g){var E=this.demuxer.demux(o,l,!1,!this.config.progressive),L=E.audioTrack,P=E.avcTrack,j=E.id3Track,z=E.textTrack,ee=this.remuxer.remux(L,P,j,z,l,m,!1,this.id);return{remuxResult:ee,chunkMeta:g}},d.transmuxSampleAes=function(o,l,m,g,E){var L=this;return this.demuxer.demuxSampleAes(o,l,m).then(function(P){var j=L.remuxer.remux(P.audioTrack,P.avcTrack,P.id3Track,P.textTrack,m,g,!1,L.id);return{remuxResult:j,chunkMeta:E}})},d.configureTransmuxer=function(o,l){for(var m=this.config,g=this.observer,E=this.typeSupported,L=this.vendor,P=l.audioCodec,j=l.defaultInitPts,z=l.duration,ee=l.initSegmentData,Q=l.videoCodec,q,ae=0,ge=e.length;ae<ge;ae++)if(e[ae].demux.probe(o)){q=e[ae];break}q||(r.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),q={demux:M.default,remux:b.default});var pe=this.demuxer,Ne=this.remuxer,Fe=q.remux,He=q.demux;(!Ne||!(Ne instanceof Fe))&&(this.remuxer=new Fe(g,m,E,L)),(!pe||!(pe instanceof He))&&(this.demuxer=new He(g,m,E),this.probe=He.probe),this.resetInitSegment(ee,P,Q,z),this.resetInitialTimestamp(j)},d.needsProbing=function(o,l,m){return!this.demuxer||!this.remuxer||l||m},d.getDecrypter=function(){var o=this.decrypter;return o||(o=this.decrypter=new R.default(this.observer,this.config)),o},T}();function s(T,d){var u=null;return T.byteLength>0&&d!=null&&d.key!=null&&d.iv!==null&&d.method!=null&&(u=d),u}var I=function(d){return{remuxResult:{},chunkMeta:d}};function C(T){return"then"in T&&T.then instanceof Function}var _=function(d,u,o,l,m){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=d,this.videoCodec=u,this.initSegmentData=o,this.duration=l,this.defaultInitPts=m},x=function(d,u,o,l,m){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=d,this.contiguous=u,this.accurateTimeOffset=o,this.trackSwitch=l,this.timeOffset=m}},"./src/demux/tsdemuxer.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"discardEPB",function(){return I});var X=U("./src/demux/adts.ts"),F=U("./src/demux/mpegaudio.ts"),R=U("./src/demux/exp-golomb.ts"),Z=U("./src/demux/id3.ts"),M=U("./src/demux/sample-aes.ts"),N=U("./src/events.ts"),O=U("./src/utils/mp4-tools.ts"),h=U("./src/utils/logger.ts"),b=U("./src/errors.ts"),A={video:1,audio:2,id3:3,text:4},a=function(){function C(x,T,d){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=T,this.typeSupported=d}C.probe=function(T){var d=C.syncOffset(T);return d<0?!1:(d&&h.logger.warn("MPEG2-TS detected but first sync word found @ offset "+d+", junk ahead ?"),!0)},C.syncOffset=function(T){for(var d=Math.min(1e3,T.length-3*188),u=0;u<d;){if(T[u]===71&&T[u+188]===71&&T[u+2*188]===71)return u;u++}return-1},C.createTrack=function(T,d){return{container:T==="video"||T==="audio"?"video/mp2t":void 0,type:T,id:A[T],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:T==="audio"?d:void 0}};var _=C.prototype;return _.resetInitSegment=function(T,d,u){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=C.createTrack("video",u),this._audioTrack=C.createTrack("audio",u),this._id3Track=C.createTrack("id3",u),this._txtTrack=C.createTrack("text",u),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=T,this.videoCodec=d,this._duration=u},_.resetTimeStamp=function(){},_.resetContiguity=function(){var T=this._audioTrack,d=this._avcTrack,u=this._id3Track;T&&(T.pesData=null),d&&(d.pesData=null),u&&(u.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},_.demux=function(T,d,u,o){u===void 0&&(u=!1),o===void 0&&(o=!1),u||(this.sampleAes=null);var l,m=this._avcTrack,g=this._audioTrack,E=this._id3Track,L=m.pid,P=m.pesData,j=g.pid,z=E.pid,ee=g.pesData,Q=E.pesData,q=!1,ae=this.pmtParsed,ge=this._pmtId,pe=T.length;if(this.remainderData&&(T=Object(O.appendUint8Array)(this.remainderData,T),pe=T.length,this.remainderData=null),pe<188&&!o)return this.remainderData=T,{audioTrack:g,avcTrack:m,id3Track:E,textTrack:this._txtTrack};var Ne=Math.max(0,C.syncOffset(T));pe-=(pe+Ne)%188,pe<T.byteLength&&!o&&(this.remainderData=new Uint8Array(T.buffer,pe,T.buffer.byteLength-pe));for(var Fe=Ne;Fe<pe;Fe+=188)if(T[Fe]===71){var He=!!(T[Fe+1]&64),Ke=((T[Fe+1]&31)<<8)+T[Fe+2],Xe=(T[Fe+3]&48)>>4,Ce=void 0;if(Xe>1){if(Ce=Fe+5+T[Fe+4],Ce===Fe+188)continue}else Ce=Fe+4;switch(Ke){case L:He&&(P&&(l=t(P))&&this.parseAVCPES(l,!1),P={data:[],size:0}),P&&(P.data.push(T.subarray(Ce,Fe+188)),P.size+=Fe+188-Ce);break;case j:He&&(ee&&(l=t(ee))&&(g.isAAC?this.parseAACPES(l):this.parseMPEGPES(l)),ee={data:[],size:0}),ee&&(ee.data.push(T.subarray(Ce,Fe+188)),ee.size+=Fe+188-Ce);break;case z:He&&(Q&&(l=t(Q))&&this.parseID3PES(l),Q={data:[],size:0}),Q&&(Q.data.push(T.subarray(Ce,Fe+188)),Q.size+=Fe+188-Ce);break;case 0:He&&(Ce+=T[Ce]+1),ge=this._pmtId=n(T,Ce);break;case ge:{He&&(Ce+=T[Ce]+1);var ye=e(T,Ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,u);L=ye.avc,L>0&&(m.pid=L),j=ye.audio,j>0&&(g.pid=j,g.isAAC=ye.isAAC),z=ye.id3,z>0&&(E.pid=z),q&&!ae&&(h.logger.log("reparse from beginning"),q=!1,Fe=Ne-188),ae=this.pmtParsed=!0;break}case 17:case 8191:break;default:q=!0;break}}else this.observer.emit(N.Events.ERROR,N.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});m.pesData=P,g.pesData=ee,E.pesData=Q;var Pe={audioTrack:g,avcTrack:m,id3Track:E,textTrack:this._txtTrack};return o&&this.extractRemainingSamples(Pe),Pe},_.flush=function(){var T=this.remainderData;this.remainderData=null;var d;return T?d=this.demux(T,-1,!1,!0):d={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(d),this.sampleAes?this.decrypt(d,this.sampleAes):d},_.extractRemainingSamples=function(T){var d=T.audioTrack,u=T.avcTrack,o=T.id3Track,l=u.pesData,m=d.pesData,g=o.pesData,E;l&&(E=t(l))?(this.parseAVCPES(E,!0),u.pesData=null):u.pesData=l,m&&(E=t(m))?(d.isAAC?this.parseAACPES(E):this.parseMPEGPES(E),d.pesData=null):(m!=null&&m.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),d.pesData=m),g&&(E=t(g))?(this.parseID3PES(E),o.pesData=null):o.pesData=g},_.demuxSampleAes=function(T,d,u){var o=this.demux(T,u,!0,!this.config.progressive),l=this.sampleAes=new M.default(this.observer,this.config,d);return this.decrypt(o,l)},_.decrypt=function(T,d){return new Promise(function(u){var o=T.audioTrack,l=T.avcTrack;o.samples&&o.isAAC?d.decryptAacSamples(o.samples,0,function(){l.samples?d.decryptAvcSamples(l.samples,0,0,function(){u(T)}):u(T)}):l.samples&&d.decryptAvcSamples(l.samples,0,0,function(){u(T)})})},_.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},_.parseAVCPES=function(T,d){var u=this,o=this._avcTrack,l=this.parseAVCNALu(T.data),m=!1,g=this.avcSample,E,L=!1;T.data=null,g&&l.length&&!o.audFound&&(i(g,o),g=this.avcSample=r(!1,T.pts,T.dts,"")),l.forEach(function(P){switch(P.type){case 1:{E=!0,g||(g=u.avcSample=r(!0,T.pts,T.dts,"")),m&&(g.debug+="NDR "),g.frame=!0;var j=P.data;if(L&&j.length>4){var z=new R.default(j).readSliceType();(z===2||z===4||z===7||z===9)&&(g.key=!0)}break}case 5:E=!0,g||(g=u.avcSample=r(!0,T.pts,T.dts,"")),m&&(g.debug+="IDR "),g.key=!0,g.frame=!0;break;case 6:{E=!0,m&&g&&(g.debug+="SEI ");var ee=new R.default(I(P.data));ee.readUByte();for(var Q=0,q=0,ae=!1,ge=0;!ae&&ee.bytesAvailable>1;){Q=0;do ge=ee.readUByte(),Q+=ge;while(ge===255);q=0;do ge=ee.readUByte(),q+=ge;while(ge===255);if(Q===4&&ee.bytesAvailable!==0){ae=!0;var pe=ee.readUByte();if(pe===181){var Ne=ee.readUShort();if(Ne===49){var Fe=ee.readUInt();if(Fe===1195456820){var He=ee.readUByte();if(He===3){for(var Ke=ee.readUByte(),Xe=ee.readUByte(),Ce=31&Ke,ye=[Ke,Xe],Pe=0;Pe<Ce;Pe++)ye.push(ee.readUByte()),ye.push(ee.readUByte()),ye.push(ee.readUByte());s(u._txtTrack.samples,{type:3,pts:T.pts,bytes:ye})}}}}}else if(Q===5&&ee.bytesAvailable!==0){if(ae=!0,q>16){for(var Et=[],mt=0;mt<16;mt++)Et.push(ee.readUByte().toString(16)),(mt===3||mt===5||mt===7||mt===9)&&Et.push("-");for(var gt=q-16,bt=new Uint8Array(gt),oe=0;oe<gt;oe++)bt[oe]=ee.readUByte();s(u._txtTrack.samples,{pts:T.pts,payloadType:Q,uuid:Et.join(""),userData:Object(Z.utf8ArrayToStr)(bt),userDataBytes:bt})}}else if(q<ee.bytesAvailable)for(var V=0;V<q;V++)ee.readUByte()}break}case 7:if(E=!0,L=!0,m&&g&&(g.debug+="SPS "),!o.sps){var Y=new R.default(P.data),he=Y.readSPS();o.width=he.width,o.height=he.height,o.pixelRatio=he.pixelRatio,o.sps=[P.data],o.duration=u._duration;for(var Se=P.data.subarray(1,4),Ue="avc1.",Ie=0;Ie<3;Ie++){var st=Se[Ie].toString(16);st.length<2&&(st="0"+st),Ue+=st}o.codec=Ue}break;case 8:E=!0,m&&g&&(g.debug+="PPS "),o.pps||(o.pps=[P.data]);break;case 9:E=!1,o.audFound=!0,g&&i(g,o),g=u.avcSample=r(!1,T.pts,T.dts,m?"AUD ":"");break;case 12:E=!1;break;default:E=!1,g&&(g.debug+="unknown NAL "+P.type+" ");break}if(g&&E){var it=g.units;it.push(P)}}),d&&g&&(i(g,o),this.avcSample=null)},_.getLastNalUnit=function(){var T,d=this.avcSample,u;if(!d||d.units.length===0){var o=this._avcTrack.samples;d=o[o.length-1]}if((T=d)!==null&&T!==void 0&&T.units){var l=d.units;u=l[l.length-1]}return u},_.parseAVCNALu=function(T){var d=T.byteLength,u=this._avcTrack,o=u.naluState||0,l=o,m=[],g=0,E,L,P,j=-1,z=0;for(o===-1&&(j=0,z=T[0]&31,o=0,g=1);g<d;){if(E=T[g++],!o){o=E?0:1;continue}if(o===1){o=E?0:2;continue}if(!E)o=3;else if(E===1){if(j>=0){var ee={data:T.subarray(j,g-o-1),type:z};m.push(ee)}else{var Q=this.getLastNalUnit();if(Q&&(l&&g<=4-l&&(Q.state&&(Q.data=Q.data.subarray(0,Q.data.byteLength-l))),L=g-o-1,L>0)){var q=new Uint8Array(Q.data.byteLength+L);q.set(Q.data,0),q.set(T.subarray(0,L),Q.data.byteLength),Q.data=q,Q.state=0}}g<d?(P=T[g]&31,j=g,z=P,o=0):o=-1}else o=0}if(j>=0&&o>=0){var ae={data:T.subarray(j,d),type:z,state:o};m.push(ae)}if(m.length===0){var ge=this.getLastNalUnit();if(ge){var pe=new Uint8Array(ge.data.byteLength+T.byteLength);pe.set(ge.data,0),pe.set(T,ge.data.byteLength),ge.data=pe}}return u.naluState=o,m},_.parseAACPES=function(T){var d=0,u=this._audioTrack,o=this.aacOverFlow,l=T.data;if(o){this.aacOverFlow=null;var m=o.sample.unit.byteLength,g=Math.min(o.missing,m),E=m-g;o.sample.unit.set(l.subarray(0,g),E),u.samples.push(o.sample),d=o.missing}var L,P;for(L=d,P=l.length;L<P-1&&!X.isHeader(l,L);L++);if(L!==d){var j,z;if(L<P-1?(j="AAC PES did not start with ADTS header,offset:"+L,z=!1):(j="no ADTS header found in AAC PES",z=!0),h.logger.warn("parsing error:"+j),this.observer.emit(N.Events.ERROR,N.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:j}),z)return}X.initTrackConfig(u,this.observer,l,L,this.audioCodec);var ee;if(T.pts!==void 0)ee=T.pts;else if(o){var Q=X.getFrameDuration(u.samplerate);ee=o.sample.pts+Q}else{h.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var q=0;L<P;)if(X.isHeader(l,L)){if(L+5<P){var ae=X.appendFrame(u,l,L,ee,q);if(ae)if(ae.missing)this.aacOverFlow=ae;else{L+=ae.length,q++;continue}}break}else L++},_.parseMPEGPES=function(T){var d=T.data,u=d.length,o=0,l=0,m=T.pts;if(m===void 0){h.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<u;)if(F.isHeader(d,l)){var g=F.appendFrame(this._audioTrack,d,l,m,o);if(g)l+=g.length,o++;else break}else l++},_.parseID3PES=function(T){if(T.pts===void 0){h.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(T)},C}();a.minProbeByteLength=188;function r(C,_,x,T){return{key:C,frame:!1,pts:_,dts:x,units:[],debug:T,length:0}}function n(C,_){return(C[_+10]&31)<<8|C[_+11]}function e(C,_,x,T){var d={audio:-1,avc:-1,id3:-1,isAAC:!0},u=(C[_+1]&15)<<8|C[_+2],o=_+3+u-4,l=(C[_+10]&15)<<8|C[_+11];for(_+=12+l;_<o;){var m=(C[_+1]&31)<<8|C[_+2];switch(C[_]){case 207:if(!T){h.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:d.audio===-1&&(d.audio=m);break;case 21:d.id3===-1&&(d.id3=m);break;case 219:if(!T){h.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:d.avc===-1&&(d.avc=m);break;case 3:case 4:x?d.audio===-1&&(d.audio=m,d.isAAC=!1):h.logger.log("MPEG audio found, not supported in this browser");break;case 36:h.logger.warn("Unsupported HEVC stream type found");break;default:break}_+=((C[_+3]&15)<<8|C[_+4])+5}return d}function t(C){var _=0,x,T,d,u,o,l=C.data;if(!C||C.size===0)return null;for(;l[0].length<19&&l.length>1;){var m=new Uint8Array(l[0].length+l[1].length);m.set(l[0]),m.set(l[1],l[0].length),l[0]=m,l.splice(1,1)}x=l[0];var g=(x[0]<<16)+(x[1]<<8)+x[2];if(g===1){if(T=(x[4]<<8)+x[5],T&&T>C.size-6)return null;var E=x[7];E&192&&(u=(x[9]&14)*536870912+(x[10]&255)*4194304+(x[11]&254)*16384+(x[12]&255)*128+(x[13]&254)/2,E&64?(o=(x[14]&14)*536870912+(x[15]&255)*4194304+(x[16]&254)*16384+(x[17]&255)*128+(x[18]&254)/2,u-o>60*9e4&&(h.logger.warn(Math.round((u-o)/9e4)+"s delta between PTS and DTS, align them"),u=o)):o=u),d=x[8];var L=d+9;if(C.size<=L)return null;C.size-=L;for(var P=new Uint8Array(C.size),j=0,z=l.length;j<z;j++){x=l[j];var ee=x.byteLength;if(L)if(L>ee){L-=ee;continue}else x=x.subarray(L),ee-=L,L=0;P.set(x,_),_+=ee}return T&&(T-=d+3),{data:P,pts:u,dts:o,len:T}}return null}function i(C,_){if(C.units.length&&C.frame){if(C.pts===void 0){var x=_.samples,T=x.length;if(T){var d=x[T-1];C.pts=d.pts,C.dts=d.dts}else{_.dropped++;return}}_.samples.push(C)}C.debug.length&&h.logger.log(C.pts+"/"+C.dts+":"+C.debug)}function s(C,_){var x=C.length;if(x>0){if(_.pts>=C[x-1].pts)C.push(_);else for(var T=x-1;T>=0;T--)if(_.pts<C[T].pts){C.splice(T,0,_);break}}else C.push(_)}function I(C){for(var _=C.byteLength,x=[],T=1;T<_-2;)C[T]===0&&C[T+1]===0&&C[T+2]===3?(x.push(T+2),T+=2):T++;if(x.length===0)return C;var d=_-x.length,u=new Uint8Array(d),o=0;for(T=0;T<d;o++,T++)o===x[0]&&(o++,x.shift()),u[T]=C[o];return u}J.default=a},"./src/errors.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"ErrorTypes",function(){return X}),U.d(J,"ErrorDetails",function(){return F});var X;(function(R){R.NETWORK_ERROR="networkError",R.MEDIA_ERROR="mediaError",R.KEY_SYSTEM_ERROR="keySystemError",R.MUX_ERROR="muxError",R.OTHER_ERROR="otherError"})(X||(X={}));var F;(function(R){R.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",R.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",R.KEY_SYSTEM_NO_SESSION="keySystemNoSession",R.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",R.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",R.MANIFEST_LOAD_ERROR="manifestLoadError",R.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",R.MANIFEST_PARSING_ERROR="manifestParsingError",R.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",R.LEVEL_EMPTY_ERROR="levelEmptyError",R.LEVEL_LOAD_ERROR="levelLoadError",R.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",R.LEVEL_SWITCH_ERROR="levelSwitchError",R.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",R.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",R.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",R.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",R.FRAG_LOAD_ERROR="fragLoadError",R.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",R.FRAG_DECRYPT_ERROR="fragDecryptError",R.FRAG_PARSING_ERROR="fragParsingError",R.REMUX_ALLOC_ERROR="remuxAllocError",R.KEY_LOAD_ERROR="keyLoadError",R.KEY_LOAD_TIMEOUT="keyLoadTimeOut",R.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",R.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",R.BUFFER_APPEND_ERROR="bufferAppendError",R.BUFFER_APPENDING_ERROR="bufferAppendingError",R.BUFFER_STALLED_ERROR="bufferStalledError",R.BUFFER_FULL_ERROR="bufferFullError",R.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",R.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",R.INTERNAL_EXCEPTION="internalException",R.INTERNAL_ABORTED="aborted",R.UNKNOWN="unknown"})(F||(F={}))},"./src/events.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"Events",function(){return X});var X;(function(F){F.MEDIA_ATTACHING="hlsMediaAttaching",F.MEDIA_ATTACHED="hlsMediaAttached",F.MEDIA_DETACHING="hlsMediaDetaching",F.MEDIA_DETACHED="hlsMediaDetached",F.BUFFER_RESET="hlsBufferReset",F.BUFFER_CODECS="hlsBufferCodecs",F.BUFFER_CREATED="hlsBufferCreated",F.BUFFER_APPENDING="hlsBufferAppending",F.BUFFER_APPENDED="hlsBufferAppended",F.BUFFER_EOS="hlsBufferEos",F.BUFFER_FLUSHING="hlsBufferFlushing",F.BUFFER_FLUSHED="hlsBufferFlushed",F.MANIFEST_LOADING="hlsManifestLoading",F.MANIFEST_LOADED="hlsManifestLoaded",F.MANIFEST_PARSED="hlsManifestParsed",F.LEVEL_SWITCHING="hlsLevelSwitching",F.LEVEL_SWITCHED="hlsLevelSwitched",F.LEVEL_LOADING="hlsLevelLoading",F.LEVEL_LOADED="hlsLevelLoaded",F.LEVEL_UPDATED="hlsLevelUpdated",F.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",F.LEVELS_UPDATED="hlsLevelsUpdated",F.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",F.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",F.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",F.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",F.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",F.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",F.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",F.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",F.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",F.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",F.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",F.CUES_PARSED="hlsCuesParsed",F.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",F.INIT_PTS_FOUND="hlsInitPtsFound",F.FRAG_LOADING="hlsFragLoading",F.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",F.FRAG_LOADED="hlsFragLoaded",F.FRAG_DECRYPTED="hlsFragDecrypted",F.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",F.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",F.FRAG_PARSING_METADATA="hlsFragParsingMetadata",F.FRAG_PARSED="hlsFragParsed",F.FRAG_BUFFERED="hlsFragBuffered",F.FRAG_CHANGED="hlsFragChanged",F.FPS_DROP="hlsFpsDrop",F.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",F.ERROR="hlsError",F.DESTROYING="hlsDestroying",F.KEY_LOADING="hlsKeyLoading",F.KEY_LOADED="hlsKeyLoaded",F.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",F.BACK_BUFFER_REACHED="hlsBackBufferReached"})(X||(X={}))},"./src/hls.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return C});var X=U("./node_modules/url-toolkit/src/url-toolkit.js"),F=U.n(X),R=U("./src/loader/playlist-loader.ts"),Z=U("./src/loader/key-loader.ts"),M=U("./src/controller/id3-track-controller.ts"),N=U("./src/controller/latency-controller.ts"),O=U("./src/controller/level-controller.ts"),h=U("./src/controller/fragment-tracker.ts"),b=U("./src/controller/stream-controller.ts"),A=U("./src/is-supported.ts"),a=U("./src/utils/logger.ts"),r=U("./src/config.ts"),n=U("./node_modules/eventemitter3/index.js"),e=U.n(n),t=U("./src/events.ts"),i=U("./src/errors.ts");function s(_,x){for(var T=0;T<x.length;T++){var d=x[T];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(_,d.key,d)}}function I(_,x,T){return x&&s(_.prototype,x),T&&s(_,T),_}var C=function(){_.isSupported=function(){return Object(A.isSupported)()};function _(T){T===void 0&&(T={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new n.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 d=this.config=Object(r.mergeConfig)(_.DefaultConfig,T);this.userConfig=T,Object(a.enableLogs)(d.debug),this._autoLevelCapping=-1,d.progressive&&Object(r.enableStreamingMode)(d);var u=d.abrController,o=d.bufferController,l=d.capLevelController,m=d.fpsController,g=this.abrController=new u(this),E=this.bufferController=new o(this),L=this.capLevelController=new l(this),P=new m(this),j=new R.default(this),z=new Z.default(this),ee=new M.default(this),Q=this.levelController=new O.default(this),q=new h.FragmentTracker(this),ae=this.streamController=new b.default(this,q);L.setStreamController(ae),P.setStreamController(ae);var ge=[Q,ae];this.networkControllers=ge;var pe=[j,z,g,E,L,P,ee,q];this.audioTrackController=this.createController(d.audioTrackController,null,ge),this.createController(d.audioStreamController,q,ge),this.subtitleTrackController=this.createController(d.subtitleTrackController,null,ge),this.createController(d.subtitleStreamController,q,ge),this.createController(d.timelineController,null,pe),this.emeController=this.createController(d.emeController,null,pe),this.cmcdController=this.createController(d.cmcdController,null,pe),this.latencyController=this.createController(N.default,null,pe),this.coreComponents=pe}var x=_.prototype;return x.createController=function(d,u,o){if(d){var l=u?new d(this,u):new d(this);return o&&o.push(l),l}return null},x.on=function(d,u,o){o===void 0&&(o=this),this._emitter.on(d,u,o)},x.once=function(d,u,o){o===void 0&&(o=this),this._emitter.once(d,u,o)},x.removeAllListeners=function(d){this._emitter.removeAllListeners(d)},x.off=function(d,u,o,l){o===void 0&&(o=this),this._emitter.off(d,u,o,l)},x.listeners=function(d){return this._emitter.listeners(d)},x.emit=function(d,u,o){return this._emitter.emit(d,u,o)},x.trigger=function(d,u){if(this.config.debug)return this.emit(d,d,u);try{return this.emit(d,d,u)}catch(o){a.logger.error("An internal error happened while handling event "+d+'. Error message: "'+o.message+'". Here is a stacktrace:',o),this.trigger(t.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:d,error:o})}return!1},x.listenerCount=function(d){return this._emitter.listenerCount(d)},x.destroy=function(){a.logger.log("destroy"),this.trigger(t.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(d){return d.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(d){return d.destroy()}),this.coreComponents.length=0},x.attachMedia=function(d){a.logger.log("attachMedia"),this._media=d,this.trigger(t.Events.MEDIA_ATTACHING,{media:d})},x.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(t.Events.MEDIA_DETACHING,void 0),this._media=null},x.loadSource=function(d){this.stopLoad();var u=this.media,o=this.url,l=this.url=X.buildAbsoluteURL(self.location.href,d,{alwaysNormalize:!0});a.logger.log("loadSource:"+l),u&&o&&o!==l&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(u)),this.trigger(t.Events.MANIFEST_LOADING,{url:d})},x.startLoad=function(d){d===void 0&&(d=-1),a.logger.log("startLoad("+d+")"),this.networkControllers.forEach(function(u){u.startLoad(d)})},x.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(d){d.stopLoad()})},x.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},x.recoverMediaError=function(){a.logger.log("recoverMediaError");var d=this._media;this.detachMedia(),d&&this.attachMedia(d)},x.removeLevel=function(d,u){u===void 0&&(u=0),this.levelController.removeLevel(d,u)},I(_,[{key:"levels",get:function(){var d=this.levelController.levels;return d||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(d){a.logger.log("set currentLevel:"+d),this.loadLevel=d,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(d){a.logger.log("set nextLevel:"+d),this.levelController.manualLevel=d,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(d){a.logger.log("set loadLevel:"+d),this.levelController.manualLevel=d}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(d){this.levelController.nextLoadLevel=d}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(d){a.logger.log("set firstLevel:"+d),this.levelController.firstLevel=d}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(d){a.logger.log("set startLevel:"+d),d!==-1&&(d=Math.max(d,this.minAutoLevel)),this.levelController.startLevel=d}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(d){var u=!!d;u!==this.config.capLevelToPlayerSize&&(u?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=u)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(d){this._autoLevelCapping!==d&&(a.logger.log("set autoLevelCapping:"+d),this._autoLevelCapping=d)}},{key:"bandwidthEstimate",get:function(){var d=this.abrController.bwEstimator;return d?d.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var d=this.levels,u=this.config.minAutoBitrate;if(!d)return 0;for(var o=d.length,l=0;l<o;l++)if(d[l].maxBitrate>u)return l;return 0}},{key:"maxAutoLevel",get:function(){var d=this.levels,u=this.autoLevelCapping,o;return u===-1&&d&&d.length?o=d.length-1:o=u,o}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(d){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,d)}},{key:"audioTracks",get:function(){var d=this.audioTrackController;return d?d.audioTracks:[]}},{key:"audioTrack",get:function(){var d=this.audioTrackController;return d?d.audioTrack:-1},set:function(d){var u=this.audioTrackController;u&&(u.audioTrack=d)}},{key:"subtitleTracks",get:function(){var d=this.subtitleTrackController;return d?d.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var d=this.subtitleTrackController;return d?d.subtitleTrack:-1},set:function(d){var u=this.subtitleTrackController;u&&(u.subtitleTrack=d)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var d=this.subtitleTrackController;return d?d.subtitleDisplay:!1},set:function(d){var u=this.subtitleTrackController;u&&(u.subtitleDisplay=d)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(d){this.config.lowLatencyMode=d}},{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 t.Events}},{key:"ErrorTypes",get:function(){return i.ErrorTypes}},{key:"ErrorDetails",get:function(){return i.ErrorDetails}},{key:"DefaultConfig",get:function(){return _.defaultConfig?_.defaultConfig:r.hlsDefaultConfig},set:function(d){_.defaultConfig=d}}]),_}();C.defaultConfig=void 0},"./src/is-supported.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"isSupported",function(){return R}),U.d(J,"changeTypeSupported",function(){return Z});var X=U("./src/utils/mediasource-helper.ts");function F(){return self.SourceBuffer||self.WebKitSourceBuffer}function R(){var M=Object(X.getMediaSource)();if(!M)return!1;var N=F(),O=M&&typeof M.isTypeSupported=="function"&&M.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),h=!N||N.prototype&&typeof N.prototype.appendBuffer=="function"&&typeof N.prototype.remove=="function";return!!O&&!!h}function Z(){var M,N=F();return typeof(N==null||((M=N.prototype)===null||M===void 0)?void 0:M.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return a}),U.d(J,"LoadError",function(){return n});var X=U("./src/polyfills/number.ts"),F=U("./src/errors.ts");function R(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,h(e,t)}function Z(e){var t=typeof Map=="function"?new Map:void 0;return Z=function(s){if(s===null||!O(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(s))return t.get(s);t.set(s,I)}function I(){return M(s,arguments,b(this).constructor)}return I.prototype=Object.create(s.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),h(I,s)},Z(e)}function M(e,t,i){return N()?M=Reflect.construct:M=function(I,C,_){var x=[null];x.push.apply(x,C);var T=Function.bind.apply(I,x),d=new T;return _&&h(d,_.prototype),d},M.apply(null,arguments)}function N(){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(e){return!1}}function O(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function h(e,t){return h=Object.setPrototypeOf||function(s,I){return s.__proto__=I,s},h(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},b(e)}var A=Math.pow(2,17),a=function(){function e(i){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=i}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(s,I){var C=this,_=s.url;if(!_)return Promise.reject(new n({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,networkDetails:null},"Fragment does not have a "+(_?"part list":"url")));this.abort();var x=this.config,T=x.fLoader,d=x.loader;return new Promise(function(u,o){C.loader&&C.loader.destroy();var l=C.loader=s.loader=T?new T(x):new d(x),m=r(s),g={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:A};s.stats=l.stats,l.load(m,g,{onSuccess:function(L,P,j,z){C.resetLoader(s,l),u({frag:s,part:null,payload:L.data,networkDetails:z})},onError:function(L,P,j){C.resetLoader(s,l),o(new n({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,response:L,networkDetails:j}))},onAbort:function(L,P,j){C.resetLoader(s,l),o(new n({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,networkDetails:j}))},onTimeout:function(L,P,j){C.resetLoader(s,l),o(new n({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,networkDetails:j}))},onProgress:function(L,P,j,z){I&&I({frag:s,part:null,payload:j,networkDetails:z})}})})},t.loadPart=function(s,I,C){var _=this;this.abort();var x=this.config,T=x.fLoader,d=x.loader;return new Promise(function(u,o){_.loader&&_.loader.destroy();var l=_.loader=s.loader=T?new T(x):new d(x),m=r(s,I),g={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:A};I.stats=l.stats,l.load(m,g,{onSuccess:function(L,P,j,z){_.resetLoader(s,l),_.updateStatsFromPart(s,I);var ee={frag:s,part:I,payload:L.data,networkDetails:z};C(ee),u(ee)},onError:function(L,P,j){_.resetLoader(s,l),o(new n({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,part:I,response:L,networkDetails:j}))},onAbort:function(L,P,j){s.stats.aborted=I.stats.aborted,_.resetLoader(s,l),o(new n({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,part:I,networkDetails:j}))},onTimeout:function(L,P,j){_.resetLoader(s,l),o(new n({type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,part:I,networkDetails:j}))}})})},t.updateStatsFromPart=function(s,I){var C=s.stats,_=I.stats,x=_.total;if(C.loaded+=_.loaded,x){var T=Math.round(s.duration/I.duration),d=Math.min(Math.round(C.loaded/x),T),u=T-d,o=u*Math.round(C.loaded/d);C.total=C.loaded+o}else C.total=Math.max(C.loaded,C.total);var l=C.loading,m=_.loading;l.start?l.first+=m.first-m.start:(l.start=m.start,l.first=m.first),l.end=m.end},t.resetLoader=function(s,I){s.loader=null,this.loader===I&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),I.destroy()},e}();function r(e,t){t===void 0&&(t=null);var i=t||e,s={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},I=i.byteRangeStartOffset,C=i.byteRangeEndOffset;return Object(X.isFiniteNumber)(I)&&Object(X.isFiniteNumber)(C)&&(s.rangeStart=I,s.rangeEnd=C),s}var n=function(e){R(t,e);function t(i){for(var s,I=arguments.length,C=new Array(I>1?I-1:0),_=1;_<I;_++)C[_-1]=arguments[_];return s=e.call.apply(e,[this].concat(C))||this,s.data=void 0,s.data=i,s}return t}(Z(Error))},"./src/loader/fragment.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"ElementaryStreamTypes",function(){return a}),U.d(J,"BaseSegment",function(){return r}),U.d(J,"Fragment",function(){return n}),U.d(J,"Part",function(){return e});var X=U("./src/polyfills/number.ts"),F=U("./node_modules/url-toolkit/src/url-toolkit.js"),R=U.n(F),Z=U("./src/utils/logger.ts"),M=U("./src/loader/level-key.ts"),N=U("./src/loader/load-stats.ts");function O(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,h(t,i)}function h(t,i){return h=Object.setPrototypeOf||function(I,C){return I.__proto__=C,I},h(t,i)}function b(t,i){for(var s=0;s<i.length;s++){var I=i[s];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(t,I.key,I)}}function A(t,i,s){return i&&b(t.prototype,i),s&&b(t,s),t}var a;(function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"})(a||(a={}));var r=function(){function t(s){var I;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(I={},I[a.AUDIO]=null,I[a.VIDEO]=null,I[a.AUDIOVIDEO]=null,I),this.baseurl=s}var i=t.prototype;return i.setByteRange=function(I,C){var _=I.split("@",2),x=[];_.length===1?x[0]=C?C.byteRangeEndOffset:0:x[0]=parseInt(_[1]),x[1]=parseInt(_[0])+x[0],this._byteRange=x},A(t,[{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(F.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(I){this._url=I}}]),t}(),n=function(t){O(i,t);function i(I,C){var _;return _=t.call(this,C)||this,_._decryptdata=null,_.rawProgramDateTime=null,_.programDateTime=null,_.tagList=[],_.duration=0,_.sn=0,_.levelkey=void 0,_.type=void 0,_.loader=null,_.level=-1,_.cc=0,_.startPTS=void 0,_.endPTS=void 0,_.appendedPTS=void 0,_.startDTS=void 0,_.endDTS=void 0,_.start=0,_.deltaPTS=void 0,_.maxStartPTS=void 0,_.minEndPTS=void 0,_.stats=new N.LoadStats,_.urlId=0,_.data=void 0,_.bitrateTest=!1,_.title=null,_.initSegment=null,_.type=I,_}var s=i.prototype;return s.createInitializationVector=function(C){for(var _=new Uint8Array(16),x=12;x<16;x++)_[x]=C>>8*(15-x)&255;return _},s.setDecryptDataFromLevelKey=function(C,_){var x=C;return(C==null?void 0:C.method)==="AES-128"&&C.uri&&!C.iv&&(x=M.LevelKey.fromURI(C.uri),x.method=C.method,x.iv=this.createInitializationVector(_),x.keyFormat="identity"),x},s.setElementaryStreamInfo=function(C,_,x,T,d,u){u===void 0&&(u=!1);var o=this.elementaryStreams,l=o[C];if(!l){o[C]={startPTS:_,endPTS:x,startDTS:T,endDTS:d,partial:u};return}l.startPTS=Math.min(l.startPTS,_),l.endPTS=Math.max(l.endPTS,x),l.startDTS=Math.min(l.startDTS,T),l.endDTS=Math.max(l.endDTS,d)},s.clearElementaryStreamInfo=function(){var C=this.elementaryStreams;C[a.AUDIO]=null,C[a.VIDEO]=null,C[a.AUDIOVIDEO]=null},A(i,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var C=this.sn;typeof C!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&Z.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),C=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,C)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(X.isFiniteNumber)(this.programDateTime))return null;var C=Object(X.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+C*1e3}},{key:"encrypted",get:function(){var C;return!!((C=this.decryptdata)!==null&&C!==void 0&&C.keyFormat&&this.decryptdata.uri)}}]),i}(r),e=function(t){O(i,t);function i(s,I,C,_,x){var T;T=t.call(this,C)||this,T.fragOffset=0,T.duration=0,T.gap=!1,T.independent=!1,T.relurl=void 0,T.fragment=void 0,T.index=void 0,T.stats=new N.LoadStats,T.duration=s.decimalFloatingPoint("DURATION"),T.gap=s.bool("GAP"),T.independent=s.bool("INDEPENDENT"),T.relurl=s.enumeratedString("URI"),T.fragment=I,T.index=_;var d=s.enumeratedString("BYTERANGE");return d&&T.setByteRange(d,x),x&&(T.fragOffset=x.fragOffset+x.duration),T}return A(i,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var I=this.elementaryStreams;return!!(I.audio||I.video||I.audiovideo)}}]),i}(r)},"./src/loader/key-loader.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return Z});var X=U("./src/events.ts"),F=U("./src/errors.ts"),R=U("./src/utils/logger.ts"),Z=function(){function M(O){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=O,this._registerListeners()}var N=M.prototype;return N._registerListeners=function(){this.hls.on(X.Events.KEY_LOADING,this.onKeyLoading,this)},N._unregisterListeners=function(){this.hls.off(X.Events.KEY_LOADING,this.onKeyLoading)},N.destroy=function(){this._unregisterListeners();for(var h in this.loaders){var b=this.loaders[h];b&&b.destroy()}this.loaders={}},N.onKeyLoading=function(h,b){var A=b.frag,a=A.type,r=this.loaders[a];if(!A.decryptdata){R.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var n=A.decryptdata.uri;if(n!==this.decrypturl||this.decryptkey===null){var e=this.hls.config;if(r&&(R.logger.warn("abort previous key loader for type:"+a),r.abort()),!n){R.logger.warn("key uri is falsy");return}var t=e.loader,i=A.loader=this.loaders[a]=new t(e);this.decrypturl=n,this.decryptkey=null;var s={url:n,frag:A,responseType:"arraybuffer"},I={timeout:e.fragLoadingTimeOut,maxRetry:0,retryDelay:e.fragLoadingRetryDelay,maxRetryDelay:e.fragLoadingMaxRetryTimeout,highWaterMark:0},C={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};i.load(s,I,C)}else this.decryptkey&&(A.decryptdata.key=this.decryptkey,this.hls.trigger(X.Events.KEY_LOADED,{frag:A}))},N.loadsuccess=function(h,b,A){var a=A.frag;if(!a.decryptdata){R.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(h.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(X.Events.KEY_LOADED,{frag:a})},N.loaderror=function(h,b){var A=b.frag,a=A.loader;a&&a.abort(),delete this.loaders[A.type],this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:A,response:h})},N.loadtimeout=function(h,b){var A=b.frag,a=A.loader;a&&a.abort(),delete this.loaders[A.type],this.hls.trigger(X.Events.ERROR,{type:F.ErrorTypes.NETWORK_ERROR,details:F.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:A})},M}()},"./src/loader/level-details.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"LevelDetails",function(){return M});var X=U("./src/polyfills/number.ts");function F(N,O){for(var h=0;h<O.length;h++){var b=O[h];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(N,b.key,b)}}function R(N,O,h){return O&&F(N.prototype,O),h&&F(N,h),N}var Z=10,M=function(){function N(h){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=h}var O=N.prototype;return O.reloaded=function(b){if(!b){this.advanced=!0,this.updated=!0;return}var A=this.lastPartSn-b.lastPartSn,a=this.lastPartIndex-b.lastPartIndex;this.updated=this.endSN!==b.endSN||!!a||!!A,this.advanced=this.endSN>b.endSN||A>0||A===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(b.misses*.6):this.misses=b.misses+1,this.availabilityDelay=b.availabilityDelay},R(N,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(X.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||Z}},{key:"drift",get:function(){var b=this.driftEndTime-this.driftStartTime;if(b>0){var A=this.driftEnd-this.driftStart;return A*1e3/b}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var b;return(b=this.fragments)!==null&&b!==void 0&&b.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 b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),N}()},"./src/loader/level-key.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"LevelKey",function(){return M});var X=U("./node_modules/url-toolkit/src/url-toolkit.js"),F=U.n(X);function R(N,O){for(var h=0;h<O.length;h++){var b=O[h];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(N,b.key,b)}}function Z(N,O,h){return O&&R(N.prototype,O),h&&R(N,h),N}var M=function(){N.fromURL=function(h,b){return new N(h,b)},N.fromURI=function(h){return new N(h)};function N(O,h){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,h?this._uri=Object(X.buildAbsoluteURL)(O,h,{alwaysNormalize:!0}):this._uri=O}return Z(N,[{key:"uri",get:function(){return this._uri}}]),N}()},"./src/loader/load-stats.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"LoadStats",function(){return X});var X=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(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return i});var X=U("./src/polyfills/number.ts"),F=U("./node_modules/url-toolkit/src/url-toolkit.js"),R=U.n(F),Z=U("./src/loader/fragment.ts"),M=U("./src/loader/level-details.ts"),N=U("./src/loader/level-key.ts"),O=U("./src/utils/attr-list.ts"),h=U("./src/utils/logger.ts"),b=U("./src/utils/codecs.ts"),A=/#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"),n=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("|")),e=/\.(mp4|m4s|m4v|m4a)$/i;function t(x){var T,d;return e.test((T=(d=F.parseURL(x))===null||d===void 0?void 0:d.path)!=null?T:"")}var i=function(){function x(){}return x.findGroup=function(d,u){for(var o=0;o<d.length;o++){var l=d[o];if(l.id===u)return l}},x.convertAVC1ToAVCOTI=function(d){var u=d.split(".");if(u.length>2){var o=u.shift()+".";return o+=parseInt(u.shift()).toString(16),o+=("000"+parseInt(u.shift()).toString(16)).substr(-4),o}return d},x.resolve=function(d,u){return F.buildAbsoluteURL(u,d,{alwaysNormalize:!0})},x.parseMasterPlaylist=function(d,u){var o=[],l={},m=!1;A.lastIndex=0;for(var g;(g=A.exec(d))!=null;)if(g[1]){var E=new O.AttrList(g[1]),L={attrs:E,bitrate:E.decimalInteger("AVERAGE-BANDWIDTH")||E.decimalInteger("BANDWIDTH"),name:E.NAME,url:x.resolve(g[2],u)},P=E.decimalResolution("RESOLUTION");P&&(L.width=P.width,L.height=P.height),s((E.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),L),L.videoCodec&&L.videoCodec.indexOf("avc1")!==-1&&(L.videoCodec=x.convertAVC1ToAVCOTI(L.videoCodec)),o.push(L)}else if(g[3]){var j=new O.AttrList(g[3]);j["DATA-ID"]&&(m=!0,l[j["DATA-ID"]]=j)}return{levels:o,sessionData:m?l:null}},x.parseMasterPlaylistMedia=function(d,u,o,l){l===void 0&&(l=[]);var m,g=[],E=0;for(a.lastIndex=0;(m=a.exec(d))!==null;){var L=new O.AttrList(m[1]);if(L.TYPE===o){var P={attrs:L,bitrate:0,id:E++,groupId:L["GROUP-ID"],instreamId:L["INSTREAM-ID"],name:L.NAME||L.LANGUAGE||"",type:o,default:L.bool("DEFAULT"),autoselect:L.bool("AUTOSELECT"),forced:L.bool("FORCED"),lang:L.LANGUAGE,url:L.URI?x.resolve(L.URI,u):""};if(l.length){var j=x.findGroup(l,P.groupId)||l[0];I(P,j,"audioCodec"),I(P,j,"textCodec")}g.push(P)}}return g},x.parseLevelPlaylist=function(d,u,o,l,m){var g=new M.LevelDetails(u),E=g.fragments,L=null,P=0,j=0,z=0,ee=0,Q=null,q=new Z.Fragment(l,u),ae,ge,pe,Ne=-1,Fe=!1;for(r.lastIndex=0,g.m3u8=d;(ae=r.exec(d))!==null;){Fe&&(Fe=!1,q=new Z.Fragment(l,u),q.start=z,q.sn=P,q.cc=ee,q.level=o,L&&(q.initSegment=L,q.rawProgramDateTime=L.rawProgramDateTime));var He=ae[1];if(He){q.duration=parseFloat(He);var Ke=(" "+ae[2]).slice(1);q.title=Ke||null,q.tagList.push(Ke?["INF",He,Ke]:["INF",He])}else if(ae[3])Object(X.isFiniteNumber)(q.duration)&&(q.start=z,pe&&(q.levelkey=pe),q.sn=P,q.level=o,q.cc=ee,q.urlId=m,E.push(q),q.relurl=(" "+ae[3]).slice(1),_(q,Q),Q=q,z+=q.duration,P++,j=0,Fe=!0);else if(ae[4]){var Xe=(" "+ae[4]).slice(1);Q?q.setByteRange(Xe,Q):q.setByteRange(Xe)}else if(ae[5])q.rawProgramDateTime=(" "+ae[5]).slice(1),q.tagList.push(["PROGRAM-DATE-TIME",q.rawProgramDateTime]),Ne===-1&&(Ne=E.length);else{if(ae=ae[0].match(n),!ae){h.logger.warn("No matches on slow regex match for level playlist!");continue}for(ge=1;ge<ae.length&&!(typeof ae[ge]!="undefined");ge++);var Ce=(" "+ae[ge]).slice(1),ye=(" "+ae[ge+1]).slice(1),Pe=ae[ge+2]?(" "+ae[ge+2]).slice(1):"";switch(Ce){case"PLAYLIST-TYPE":g.type=ye.toUpperCase();break;case"MEDIA-SEQUENCE":P=g.startSN=parseInt(ye);break;case"SKIP":{var Et=new O.AttrList(ye),mt=Et.decimalInteger("SKIPPED-SEGMENTS");if(Object(X.isFiniteNumber)(mt)){g.skippedSegments=mt;for(var gt=mt;gt--;)E.unshift(null);P+=mt}var bt=Et.enumeratedString("RECENTLY-REMOVED-DATERANGES");bt&&(g.recentlyRemovedDateranges=bt.split(" "));break}case"TARGETDURATION":g.targetduration=parseFloat(ye);break;case"VERSION":g.version=parseInt(ye);break;case"EXTM3U":break;case"ENDLIST":g.live=!1;break;case"#":(ye||Pe)&&q.tagList.push(Pe?[ye,Pe]:[ye]);break;case"DIS":ee++;case"GAP":q.tagList.push([Ce]);break;case"BITRATE":q.tagList.push([Ce,ye]);break;case"DISCONTINUITY-SEQ":ee=parseInt(ye);break;case"KEY":{var oe,V=new O.AttrList(ye),Y=V.enumeratedString("METHOD"),he=V.URI,Se=V.hexadecimalInteger("IV"),Ue=V.enumeratedString("KEYFORMATVERSIONS"),Ie=V.enumeratedString("KEYID"),st=(oe=V.enumeratedString("KEYFORMAT"))!=null?oe:"identity",it=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(it.indexOf(st)>-1){h.logger.warn("Keyformat "+st+" is not supported from the manifest");continue}else if(st!=="identity")continue;Y&&(pe=N.LevelKey.fromURL(u,he),he&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Y)>=0&&(pe.method=Y,pe.keyFormat=st,Ie&&(pe.keyID=Ie),Ue&&(pe.keyFormatVersions=Ue),pe.iv=Se));break}case"START":{var ut=new O.AttrList(ye),dt=ut.decimalFloatingPoint("TIME-OFFSET");Object(X.isFiniteNumber)(dt)&&(g.startTimeOffset=dt);break}case"MAP":{var vt=new O.AttrList(ye);q.relurl=vt.URI,vt.BYTERANGE&&q.setByteRange(vt.BYTERANGE),q.level=o,q.sn="initSegment",pe&&(q.levelkey=pe),q.initSegment=null,L=q,Fe=!0;break}case"SERVER-CONTROL":{var Tt=new O.AttrList(ye);g.canBlockReload=Tt.bool("CAN-BLOCK-RELOAD"),g.canSkipUntil=Tt.optionalFloat("CAN-SKIP-UNTIL",0),g.canSkipDateRanges=g.canSkipUntil>0&&Tt.bool("CAN-SKIP-DATERANGES"),g.partHoldBack=Tt.optionalFloat("PART-HOLD-BACK",0),g.holdBack=Tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new O.AttrList(ye);g.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ye=g.partList;Ye||(Ye=g.partList=[]);var tt=j>0?Ye[Ye.length-1]:void 0,at=j++,ze=new Z.Part(new O.AttrList(ye),q,u,at,tt);Ye.push(ze),q.duration+=ze.duration;break}case"PRELOAD-HINT":{var qe=new O.AttrList(ye);g.preloadHint=qe;break}case"RENDITION-REPORT":{var Oe=new O.AttrList(ye);g.renditionReports=g.renditionReports||[],g.renditionReports.push(Oe);break}default:h.logger.warn("line parsed but not handled: "+ae);break}}}Q&&!Q.relurl?(E.pop(),z-=Q.duration,g.partList&&(g.fragmentHint=Q)):g.partList&&(_(q,Q),q.cc=ee,g.fragmentHint=q);var be=E.length,_e=E[0],se=E[be-1];if(z+=g.skippedSegments*g.targetduration,z>0&&be&&se){g.averagetargetduration=z/be;var le=se.sn;g.endSN=le!=="initSegment"?le:0,_e&&(g.startCC=_e.cc,_e.initSegment||g.fragments.every(function(me){return me.relurl&&t(me.relurl)})&&(h.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),q=new Z.Fragment(l,u),q.relurl=se.relurl,q.level=o,q.sn="initSegment",_e.initSegment=q,g.needSidxRanges=!0))}else g.endSN=0,g.startCC=0;return g.fragmentHint&&(z+=g.fragmentHint.duration),g.totalduration=z,g.endCC=ee,Ne>0&&C(E,Ne),g},x}();function s(x,T){["video","audio","text"].forEach(function(d){var u=x.filter(function(l){return Object(b.isCodecType)(l,d)});if(u.length){var o=u.filter(function(l){return l.lastIndexOf("avc1",0)===0||l.lastIndexOf("mp4a",0)===0});T[d+"Codec"]=o.length>0?o[0]:u[0],x=x.filter(function(l){return u.indexOf(l)===-1})}}),T.unknownCodecs=x}function I(x,T,d){var u=T[d];u&&(x[d]=u)}function C(x,T){for(var d=x[T],u=T;u--;){var o=x[u];if(!o)return;o.programDateTime=d.programDateTime-o.duration*1e3,d=o}}function _(x,T){x.rawProgramDateTime?x.programDateTime=Date.parse(x.rawProgramDateTime):T!=null&&T.programDateTime&&(x.programDateTime=T.endProgramDateTime),Object(X.isFiniteNumber)(x.programDateTime)||(x.programDateTime=null,x.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/polyfills/number.ts"),F=U("./src/events.ts"),R=U("./src/errors.ts"),Z=U("./src/utils/logger.ts"),M=U("./src/utils/mp4-tools.ts"),N=U("./src/loader/m3u8-parser.ts"),O=U("./src/types/loader.ts"),h=U("./src/utils/attr-list.ts");function b(r){var n=r.type;switch(n){case O.PlaylistContextType.AUDIO_TRACK:return O.PlaylistLevelType.AUDIO;case O.PlaylistContextType.SUBTITLE_TRACK:return O.PlaylistLevelType.SUBTITLE;default:return O.PlaylistLevelType.MAIN}}function A(r,n){var e=r.url;return(e===void 0||e.indexOf("data:")===0)&&(e=n.url),e}var a=function(){function r(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var n=r.prototype;return n.registerListeners=function(){var t=this.hls;t.on(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(F.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},n.unregisterListeners=function(){var t=this.hls;t.off(F.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(F.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(F.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(F.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},n.createInternalLoader=function(t){var i=this.hls.config,s=i.pLoader,I=i.loader,C=s||I,_=new C(i);return t.loader=_,this.loaders[t.type]=_,_},n.getInternalLoader=function(t){return this.loaders[t.type]},n.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},n.destroyInternalLoaders=function(){for(var t in this.loaders){var i=this.loaders[t];i&&i.destroy(),this.resetInternalLoader(t)}},n.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},n.onManifestLoading=function(t,i){var s=i.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:O.PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})},n.onLevelLoading=function(t,i){var s=i.id,I=i.level,C=i.url,_=i.deliveryDirectives;this.load({id:s,groupId:null,level:I,responseType:"text",type:O.PlaylistContextType.LEVEL,url:C,deliveryDirectives:_})},n.onAudioTrackLoading=function(t,i){var s=i.id,I=i.groupId,C=i.url,_=i.deliveryDirectives;this.load({id:s,groupId:I,level:null,responseType:"text",type:O.PlaylistContextType.AUDIO_TRACK,url:C,deliveryDirectives:_})},n.onSubtitleTrackLoading=function(t,i){var s=i.id,I=i.groupId,C=i.url,_=i.deliveryDirectives;this.load({id:s,groupId:I,level:null,responseType:"text",type:O.PlaylistContextType.SUBTITLE_TRACK,url:C,deliveryDirectives:_})},n.load=function(t){var i,s=this.hls.config,I=this.getInternalLoader(t);if(I){var C=I.context;if(C&&C.url===t.url){Z.logger.trace("[playlist-loader]: playlist request ongoing");return}Z.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),I.abort()}var _,x,T,d;switch(t.type){case O.PlaylistContextType.MANIFEST:_=s.manifestLoadingMaxRetry,x=s.manifestLoadingTimeOut,T=s.manifestLoadingRetryDelay,d=s.manifestLoadingMaxRetryTimeout;break;case O.PlaylistContextType.LEVEL:case O.PlaylistContextType.AUDIO_TRACK:case O.PlaylistContextType.SUBTITLE_TRACK:_=0,x=s.levelLoadingTimeOut;break;default:_=s.levelLoadingMaxRetry,x=s.levelLoadingTimeOut,T=s.levelLoadingRetryDelay,d=s.levelLoadingMaxRetryTimeout;break}if(I=this.createInternalLoader(t),(i=t.deliveryDirectives)!==null&&i!==void 0&&i.part){var u;if(t.type===O.PlaylistContextType.LEVEL&&t.level!==null?u=this.hls.levels[t.level].details:t.type===O.PlaylistContextType.AUDIO_TRACK&&t.id!==null?u=this.hls.audioTracks[t.id].details:t.type===O.PlaylistContextType.SUBTITLE_TRACK&&t.id!==null&&(u=this.hls.subtitleTracks[t.id].details),u){var o=u.partTarget,l=u.targetduration;o&&l&&(x=Math.min(Math.max(o*3,l*.8)*1e3,x))}}var m={timeout:x,maxRetry:_,retryDelay:T,maxRetryDelay:d,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};I.load(t,m,g)},n.loadsuccess=function(t,i,s,I){if(I===void 0&&(I=null),s.isSidxRequest){this.handleSidxRequest(t,s),this.handlePlaylistLoaded(t,i,s,I);return}this.resetInternalLoader(s.type);var C=t.data;if(C.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(t,s,"no EXTM3U delimiter",I);return}i.parsing.start=performance.now(),C.indexOf("#EXTINF:")>0||C.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,i,s,I):this.handleMasterPlaylist(t,i,s,I)},n.loaderror=function(t,i,s){s===void 0&&(s=null),this.handleNetworkError(i,s,!1,t)},n.loadtimeout=function(t,i,s){s===void 0&&(s=null),this.handleNetworkError(i,s,!0)},n.handleMasterPlaylist=function(t,i,s,I){var C=this.hls,_=t.data,x=A(t,s),T=N.default.parseMasterPlaylist(_,x),d=T.levels,u=T.sessionData;if(!d.length){this.handleManifestParsingError(t,s,"no level found in manifest",I);return}var o=d.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),l=d.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),m=N.default.parseMasterPlaylistMedia(_,x,"AUDIO",o),g=N.default.parseMasterPlaylistMedia(_,x,"SUBTITLES",l),E=N.default.parseMasterPlaylistMedia(_,x,"CLOSED-CAPTIONS");if(m.length){var L=m.some(function(P){return!P.url});!L&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(Z.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new h.AttrList({}),bitrate:0,url:""}))}C.trigger(F.Events.MANIFEST_LOADED,{levels:d,audioTracks:m,subtitles:g,captions:E,url:x,stats:i,networkDetails:I,sessionData:u})},n.handleTrackOrLevelPlaylist=function(t,i,s,I){var C=this.hls,_=s.id,x=s.level,T=s.type,d=A(t,s),u=Object(X.isFiniteNumber)(_)?_:0,o=Object(X.isFiniteNumber)(x)?x:u,l=b(s),m=N.default.parseLevelPlaylist(t.data,d,o,l,u);if(!m.fragments.length){C.trigger(F.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:d,reason:"no fragments found in level",level:typeof s.level=="number"?s.level:void 0});return}if(T===O.PlaylistContextType.MANIFEST){var g={attrs:new h.AttrList({}),bitrate:0,details:m,name:"",url:d};C.trigger(F.Events.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:d,stats:i,networkDetails:I,sessionData:null})}if(i.parsing.end=performance.now(),m.needSidxRanges){var E,L=(E=m.fragments[0].initSegment)===null||E===void 0?void 0:E.url;this.load({url:L,isSidxRequest:!0,type:T,level:x,levelDetails:m,id:_,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}s.levelDetails=m,this.handlePlaylistLoaded(t,i,s,I)},n.handleSidxRequest=function(t,i){var s=Object(M.parseSegmentIndex)(new Uint8Array(t.data));if(!s)return;var I=s.references,C=i.levelDetails;I.forEach(function(_,x){var T=_.info,d=C.fragments[x];d.byteRange.length===0&&d.setByteRange(String(1+T.end-T.start)+"@"+String(T.start)),d.initSegment&&d.initSegment.setByteRange(String(s.moovEndOffset)+"@0")})},n.handleManifestParsingError=function(t,i,s,I){this.hls.trigger(F.Events.ERROR,{type:R.ErrorTypes.NETWORK_ERROR,details:R.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:i.type===O.PlaylistContextType.MANIFEST,url:t.url,reason:s,response:t,context:i,networkDetails:I})},n.handleNetworkError=function(t,i,s,I){s===void 0&&(s=!1),Z.logger.warn("[playlist-loader]: A network "+(s?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var C=R.ErrorDetails.UNKNOWN,_=!1,x=this.getInternalLoader(t);switch(t.type){case O.PlaylistContextType.MANIFEST:C=s?R.ErrorDetails.MANIFEST_LOAD_TIMEOUT:R.ErrorDetails.MANIFEST_LOAD_ERROR,_=!0;break;case O.PlaylistContextType.LEVEL:C=s?R.ErrorDetails.LEVEL_LOAD_TIMEOUT:R.ErrorDetails.LEVEL_LOAD_ERROR,_=!1;break;case O.PlaylistContextType.AUDIO_TRACK:C=s?R.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:R.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,_=!1;break;case O.PlaylistContextType.SUBTITLE_TRACK:C=s?R.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:R.ErrorDetails.SUBTITLE_LOAD_ERROR,_=!1;break}x&&this.resetInternalLoader(t.type);var T={type:R.ErrorTypes.NETWORK_ERROR,details:C,fatal:_,url:t.url,loader:x,context:t,networkDetails:i};I&&(T.response=I),this.hls.trigger(F.Events.ERROR,T)},n.handlePlaylistLoaded=function(t,i,s,I){var C=s.type,_=s.level,x=s.id,T=s.groupId,d=s.loader,u=s.levelDetails,o=s.deliveryDirectives;if(!(u!=null&&u.targetduration)){this.handleManifestParsingError(t,s,"invalid target duration",I);return}if(!d)return;u.live&&(d.getCacheAge&&(u.ageHeader=d.getCacheAge()||0),(!d.getCacheAge||isNaN(u.ageHeader))&&(u.ageHeader=0));switch(C){case O.PlaylistContextType.MANIFEST:case O.PlaylistContextType.LEVEL:this.hls.trigger(F.Events.LEVEL_LOADED,{details:u,level:_||0,id:x||0,stats:i,networkDetails:I,deliveryDirectives:o});break;case O.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(F.Events.AUDIO_TRACK_LOADED,{details:u,id:x||0,groupId:T||"",stats:i,networkDetails:I,deliveryDirectives:o});break;case O.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(F.Events.SUBTITLE_TRACK_LOADED,{details:u,id:x||0,groupId:T||"",stats:i,networkDetails:I,deliveryDirectives:o});break}},r}();J.default=a},"./src/polyfills/number.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"isFiniteNumber",function(){return X}),U.d(J,"MAX_SAFE_INTEGER",function(){return F});var X=Number.isFinite||function(R){return typeof R=="number"&&isFinite(R)},F=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ve,J,U){"use strict";U.r(J);var X=function(){function F(){}return F.getSilentFrame=function(Z,M){switch(Z){case"mp4a.40.2":if(M===1)return new Uint8Array([0,200,0,128,35,128]);if(M===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(M===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(M===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(M===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(M===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(M===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(M===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(M===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},F}();J.default=X},"./src/remux/mp4-generator.ts":function(ve,J,U){"use strict";U.r(J);var X=Math.pow(2,32)-1,F=function(){function R(){}return R.init=function(){R.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 M;for(M in R.types)R.types.hasOwnProperty(M)&&(R.types[M]=[M.charCodeAt(0),M.charCodeAt(1),M.charCodeAt(2),M.charCodeAt(3)]);var N=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),O=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);R.HDLR_TYPES={video:N,audio:O};var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),b=new Uint8Array([0,0,0,0,0,0,0,0]);R.STTS=R.STSC=R.STCO=b,R.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),R.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),R.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var A=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);R.FTYP=R.box(R.types.ftyp,A,r,A,a),R.DINF=R.box(R.types.dinf,R.box(R.types.dref,h))},R.box=function(M){for(var N=8,O=arguments.length,h=new Array(O>1?O-1:0),b=1;b<O;b++)h[b-1]=arguments[b];for(var A=h.length,a=A;A--;)N+=h[A].byteLength;var r=new Uint8Array(N);for(r[0]=N>>24&255,r[1]=N>>16&255,r[2]=N>>8&255,r[3]=N&255,r.set(M,4),A=0,N=8;A<a;A++)r.set(h[A],N),N+=h[A].byteLength;return r},R.hdlr=function(M){return R.box(R.types.hdlr,R.HDLR_TYPES[M])},R.mdat=function(M){return R.box(R.types.mdat,M)},R.mdhd=function(M,N){N*=M;var O=Math.floor(N/(X+1)),h=Math.floor(N%(X+1));return R.box(R.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,M>>24&255,M>>16&255,M>>8&255,M&255,O>>24,O>>16&255,O>>8&255,O&255,h>>24,h>>16&255,h>>8&255,h&255,85,196,0,0]))},R.mdia=function(M){return R.box(R.types.mdia,R.mdhd(M.timescale,M.duration),R.hdlr(M.type),R.minf(M))},R.mfhd=function(M){return R.box(R.types.mfhd,new Uint8Array([0,0,0,0,M>>24,M>>16&255,M>>8&255,M&255]))},R.minf=function(M){return M.type==="audio"?R.box(R.types.minf,R.box(R.types.smhd,R.SMHD),R.DINF,R.stbl(M)):R.box(R.types.minf,R.box(R.types.vmhd,R.VMHD),R.DINF,R.stbl(M))},R.moof=function(M,N,O){return R.box(R.types.moof,R.mfhd(M),R.traf(O,N))},R.moov=function(M){for(var N=M.length,O=[];N--;)O[N]=R.trak(M[N]);return R.box.apply(null,[R.types.moov,R.mvhd(M[0].timescale,M[0].duration)].concat(O).concat(R.mvex(M)))},R.mvex=function(M){for(var N=M.length,O=[];N--;)O[N]=R.trex(M[N]);return R.box.apply(null,[R.types.mvex].concat(O))},R.mvhd=function(M,N){N*=M;var O=Math.floor(N/(X+1)),h=Math.floor(N%(X+1)),b=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,M>>24&255,M>>16&255,M>>8&255,M&255,O>>24,O>>16&255,O>>8&255,O&255,h>>24,h>>16&255,h>>8&255,h&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 R.box(R.types.mvhd,b)},R.sdtp=function(M){var N=M.samples||[],O=new Uint8Array(4+N.length),h,b;for(h=0;h<N.length;h++)b=N[h].flags,O[h+4]=b.dependsOn<<4|b.isDependedOn<<2|b.hasRedundancy;return R.box(R.types.sdtp,O)},R.stbl=function(M){return R.box(R.types.stbl,R.stsd(M),R.box(R.types.stts,R.STTS),R.box(R.types.stsc,R.STSC),R.box(R.types.stsz,R.STSZ),R.box(R.types.stco,R.STCO))},R.avc1=function(M){var N=[],O=[],h,b,A;for(h=0;h<M.sps.length;h++)b=M.sps[h],A=b.byteLength,N.push(A>>>8&255),N.push(A&255),N=N.concat(Array.prototype.slice.call(b));for(h=0;h<M.pps.length;h++)b=M.pps[h],A=b.byteLength,O.push(A>>>8&255),O.push(A&255),O=O.concat(Array.prototype.slice.call(b));var a=R.box(R.types.avcC,new Uint8Array([1,N[3],N[4],N[5],252|3,224|M.sps.length].concat(N).concat([M.pps.length]).concat(O))),r=M.width,n=M.height,e=M.pixelRatio[0],t=M.pixelRatio[1];return R.box(R.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,n>>8&255,n&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,R.box(R.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),R.box(R.types.pasp,new Uint8Array([e>>24,e>>16&255,e>>8&255,e&255,t>>24,t>>16&255,t>>8&255,t&255])))},R.esds=function(M){var N=M.config.length;return new Uint8Array([0,0,0,0,3,23+N,0,1,0,4,15+N,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([N]).concat(M.config).concat([6,1,2]))},R.mp4a=function(M){var N=M.samplerate;return R.box(R.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,M.channelCount,0,16,0,0,0,0,N>>8&255,N&255,0,0]),R.box(R.types.esds,R.esds(M)))},R.mp3=function(M){var N=M.samplerate;return R.box(R.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,M.channelCount,0,16,0,0,0,0,N>>8&255,N&255,0,0]))},R.stsd=function(M){return M.type==="audio"?!M.isAAC&&M.codec==="mp3"?R.box(R.types.stsd,R.STSD,R.mp3(M)):R.box(R.types.stsd,R.STSD,R.mp4a(M)):R.box(R.types.stsd,R.STSD,R.avc1(M))},R.tkhd=function(M){var N=M.id,O=M.duration*M.timescale,h=M.width,b=M.height,A=Math.floor(O/(X+1)),a=Math.floor(O%(X+1));return R.box(R.types.tkhd,new Uint8Array([1,0,0,7,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,0,0,0,0,A>>24,A>>16&255,A>>8&255,A&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,h>>8&255,h&255,0,0,b>>8&255,b&255,0,0]))},R.traf=function(M,N){var O=R.sdtp(M),h=M.id,b=Math.floor(N/(X+1)),A=Math.floor(N%(X+1));return R.box(R.types.traf,R.box(R.types.tfhd,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255])),R.box(R.types.tfdt,new Uint8Array([1,0,0,0,b>>24,b>>16&255,b>>8&255,b&255,A>>24,A>>16&255,A>>8&255,A&255])),R.trun(M,O.length+16+20+8+16+8+8),O)},R.trak=function(M){return M.duration=M.duration||4294967295,R.box(R.types.trak,R.tkhd(M),R.mdia(M))},R.trex=function(M){var N=M.id;return R.box(R.types.trex,new Uint8Array([0,0,0,0,N>>24,N>>16&255,N>>8&255,N&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},R.trun=function(M,N){var O=M.samples||[],h=O.length,b=12+16*h,A=new Uint8Array(b),a,r,n,e,t,i;for(N+=8+b,A.set([0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,h&255,N>>>24&255,N>>>16&255,N>>>8&255,N&255],0),a=0;a<h;a++)r=O[a],n=r.duration,e=r.size,t=r.flags,i=r.cts,A.set([n>>>24&255,n>>>16&255,n>>>8&255,n&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255,t.isLeading<<2|t.dependsOn,t.isDependedOn<<6|t.hasRedundancy<<4|t.paddingValue<<1|t.isNonSync,t.degradPrio&240<<8,t.degradPrio&15,i>>>24&255,i>>>16&255,i>>>8&255,i&255],12+16*a);return R.box(R.types.trun,A)},R.initSegment=function(M){R.types||R.init();var N=R.moov(M),O=new Uint8Array(R.FTYP.byteLength+N.byteLength);return O.set(R.FTYP),O.set(N,R.FTYP.byteLength),O},R}();F.types=void 0,F.HDLR_TYPES=void 0,F.STTS=void 0,F.STSC=void 0,F.STCO=void 0,F.STSZ=void 0,F.VMHD=void 0,F.SMHD=void 0,F.STSD=void 0,F.FTYP=void 0,F.DINF=void 0,J.default=F},"./src/remux/mp4-remuxer.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return i}),U.d(J,"normalizePts",function(){return s});var X=U("./src/polyfills/number.ts"),F=U("./src/remux/aac-helper.ts"),R=U("./src/remux/mp4-generator.ts"),Z=U("./src/events.ts"),M=U("./src/errors.ts"),N=U("./src/utils/logger.ts"),O=U("./src/types/loader.ts"),h=U("./src/utils/timescale-conversion.ts");function b(){return b=Object.assign||function(x){for(var T=1;T<arguments.length;T++){var d=arguments[T];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(x[u]=d[u])}return x},b.apply(this,arguments)}var A=10*1e3,a=1024,r=1152,n=null,e=null,t=!1,i=function(){function x(d,u,o,l){if(l===void 0&&(l=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=d,this.config=u,this.typeSupported=o,this.ISGenerated=!1,n===null){var m=navigator.userAgent||"",g=m.match(/Chrome\/(\d+)/i);n=g?parseInt(g[1]):0}if(e===null){var E=navigator.userAgent.match(/Safari\/(\d+)/i);e=E?parseInt(E[1]):0}t=!!n&&n<75||!!e&&e<600}var T=x.prototype;return T.destroy=function(){},T.resetTimeStamp=function(u){N.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=u},T.resetNextTimestamp=function(){N.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},T.resetInitSegment=function(){N.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},T.getVideoStartPts=function(u){var o=!1,l=u.reduce(function(m,g){var E=g.pts-m;return E<-4294967296?(o=!0,s(m,g.pts)):E>0?m:g.pts},u[0].pts);return o&&N.logger.debug("PTS rollover detected"),l},T.remux=function(u,o,l,m,g,E,L,P){var j,z,ee,Q,q,ae,ge=g,pe=g,Ne=u.pid>-1,Fe=o.pid>-1,He=o.samples.length,Ke=u.samples.length>0,Xe=He>1,Ce=(!Ne||Ke)&&(!Fe||Xe)||this.ISGenerated||L;if(Ce){this.ISGenerated||(ee=this.generateIS(u,o,g));var ye=this.isVideoContiguous,Pe=-1;if(Xe&&(Pe=I(o.samples),!ye&&this.config.forceKeyFrameOnDiscontinuity))if(ae=!0,Pe>0){N.logger.warn("[mp4-remuxer]: Dropped "+Pe+" out of "+He+" video samples due to a missing keyframe");var Et=this.getVideoStartPts(o.samples);o.samples=o.samples.slice(Pe),o.dropped+=Pe,pe+=(o.samples[0].pts-Et)/(o.timescale||9e4)}else Pe===-1&&(N.logger.warn("[mp4-remuxer]: No keyframe found out of "+He+" video samples"),ae=!1);if(this.ISGenerated){if(Ke&&Xe){var mt=this.getVideoStartPts(o.samples),gt=s(u.samples[0].pts,mt)-mt,bt=gt/o.inputTimeScale;ge+=Math.max(0,bt),pe+=Math.max(0,-bt)}if(Ke){if(u.samplerate||(N.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),ee=this.generateIS(u,o,g)),z=this.remuxAudio(u,ge,this.isAudioContiguous,E,Fe||Xe||P===O.PlaylistLevelType.AUDIO?pe:void 0),Xe){var oe=z?z.endPTS-z.startPTS:0;o.inputTimeScale||(N.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),ee=this.generateIS(u,o,g)),j=this.remuxVideo(o,pe,ye,oe)}}else Xe&&(j=this.remuxVideo(o,pe,ye,0));j&&(j.firstKeyFrame=Pe,j.independent=Pe!==-1)}}return this.ISGenerated&&(l.samples.length&&(q=this.remuxID3(l,g)),m.samples.length&&(Q=this.remuxText(m,g))),{audio:z,video:j,initSegment:ee,independent:ae,text:Q,id3:q}},T.generateIS=function(u,o,l){var m=u.samples,g=o.samples,E=this.typeSupported,L={},P=!Object(X.isFiniteNumber)(this._initPTS),j="audio/mp4",z,ee,Q;if(P&&(z=ee=Infinity),u.config&&m.length&&(u.timescale=u.samplerate,u.isAAC||(E.mpeg?(j="audio/mpeg",u.codec=""):E.mp3&&(u.codec="mp3")),L.audio={id:"audio",container:j,codec:u.codec,initSegment:!u.isAAC&&E.mpeg?new Uint8Array(0):R.default.initSegment([u]),metadata:{channelCount:u.channelCount}},P&&(Q=u.inputTimeScale,z=ee=m[0].pts-Math.round(Q*l))),o.sps&&o.pps&&g.length&&(o.timescale=o.inputTimeScale,L.video={id:"main",container:"video/mp4",codec:o.codec,initSegment:R.default.initSegment([o]),metadata:{width:o.width,height:o.height}},P)){Q=o.inputTimeScale;var q=this.getVideoStartPts(g),ae=Math.round(Q*l);ee=Math.min(ee,s(g[0].dts,q)-ae),z=Math.min(z,q-ae)}if(Object.keys(L).length)return this.ISGenerated=!0,P&&(this._initPTS=z,this._initDTS=ee),{tracks:L,initPTS:z,timescale:Q}},T.remuxVideo=function(u,o,l,m){var g=u.inputTimeScale,E=u.samples,L=[],P=E.length,j=this._initPTS,z=this.nextAvcDts,ee=8,Q,q,ae,ge=Number.POSITIVE_INFINITY,pe=Number.NEGATIVE_INFINITY,Ne=0,Fe=!1;if(!l||z===null){var He=o*g,Ke=E[0].pts-s(E[0].dts,E[0].pts);z=He-Ke}for(var Xe=0;Xe<P;Xe++){var Ce=E[Xe];if(Ce.pts=s(Ce.pts-j,z),Ce.dts=s(Ce.dts-j,z),Ce.dts>Ce.pts){var ye=9e4*.2;Ne=Math.max(Math.min(Ne,Ce.pts-Ce.dts),-1*ye)}Ce.dts<E[Xe>0?Xe-1:Xe].dts&&(Fe=!0)}Fe&&E.sort(function(tr,zt){var ft=tr.dts-zt.dts,Pt=tr.pts-zt.pts;return ft||Pt}),q=E[0].dts,ae=E[E.length-1].dts;var Pe=Math.round((ae-q)/(P-1));if(Ne<0){if(Ne<Pe*-2){N.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(h.toMsFromMpegTsClock)(-Pe,!0)+" ms");for(var Et=Ne,mt=0;mt<P;mt++)E[mt].dts=Et=Math.max(Et,E[mt].pts-Pe),E[mt].pts=Math.max(Et,E[mt].pts)}else{N.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(h.toMsFromMpegTsClock)(Ne,!0)+" ms to overcome this issue");for(var gt=0;gt<P;gt++)E[gt].dts=E[gt].dts+Ne}q=E[0].dts}if(l){var bt=q-z,oe=bt>Pe,V=bt<-1;if(oe||V){oe?N.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(bt,!0)+" ms ("+bt+"dts) hole between fragments detected, filling it"):N.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(-bt,!0)+" ms ("+bt+"dts) overlapping between fragments detected"),q=z;var Y=E[0].pts-bt;E[0].dts=q,E[0].pts=Y,N.logger.log("Video: First PTS/DTS adjusted: "+Object(h.toMsFromMpegTsClock)(Y,!0)+"/"+Object(h.toMsFromMpegTsClock)(q,!0)+", delta: "+Object(h.toMsFromMpegTsClock)(bt,!0)+" ms")}}t&&(q=Math.max(0,q));for(var he=0,Se=0,Ue=0;Ue<P;Ue++){for(var Ie=E[Ue],st=Ie.units,it=st.length,ut=0,dt=0;dt<it;dt++)ut+=st[dt].data.length;Se+=ut,he+=it,Ie.length=ut,Ie.dts=Math.max(Ie.dts,q),Ie.pts=Math.max(Ie.pts,Ie.dts,0),ge=Math.min(Ie.pts,ge),pe=Math.max(Ie.pts,pe)}ae=E[P-1].dts;var vt=Se+4*he+8,Tt;try{Tt=new Uint8Array(vt)}catch(tr){this.observer.emit(Z.Events.ERROR,Z.Events.ERROR,{type:M.ErrorTypes.MUX_ERROR,details:M.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:vt,reason:"fail allocating video mdat "+vt});return}var Me=new DataView(Tt.buffer);Me.setUint32(0,vt),Tt.set(R.default.types.mdat,4);for(var Ye=0;Ye<P;Ye++){for(var tt=E[Ye],at=tt.units,ze=0,qe=0,Oe=at.length;qe<Oe;qe++){var be=at[qe],_e=be.data,se=be.data.byteLength;Me.setUint32(ee,se),ee+=4,Tt.set(_e,ee),ee+=se,ze+=4+se}if(Ye<P-1)Q=E[Ye+1].dts-tt.dts;else{var le=this.config,me=tt.dts-E[Ye>0?Ye-1:Ye].dts;if(le.stretchShortVideoTrack&&this.nextAudioPts!==null){var we=Math.floor(le.maxBufferHole*g),We=(m?ge+m*g:this.nextAudioPts)-tt.pts;We>we?(Q=We-me,Q<0&&(Q=me),N.logger.log("[mp4-remuxer]: It is approximately "+We/90+" ms to the next segment; using duration "+Q/90+" ms for the last video frame.")):Q=me}else Q=me}var $e=Math.round(tt.pts-tt.dts);L.push(new C(tt.key,Q,ze,$e))}if(L.length&&n&&n<70){var pt=L[0].flags;pt.dependsOn=2,pt.isNonSync=0}console.assert(Q!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=ae+Q,this.isVideoContiguous=!0;var Bt=R.default.moof(u.sequenceNumber++,q,b({},u,{samples:L})),Rt="video",Ct={data1:Bt,data2:Tt,startPTS:ge/g,endPTS:(pe+Q)/g,startDTS:q/g,endDTS:z/g,type:Rt,hasAudio:!1,hasVideo:!0,nb:L.length,dropped:u.dropped};return u.samples=[],u.dropped=0,console.assert(Tt.length,"MDAT length must not be zero"),Ct},T.remuxAudio=function(u,o,l,m,g){var E=u.inputTimeScale,L=u.samplerate?u.samplerate:E,P=E/L,j=u.isAAC?a:r,z=j*P,ee=this._initPTS,Q=!u.isAAC&&this.typeSupported.mpeg,q=[],ae=u.samples,ge=Q?0:8,pe=this.nextAudioPts||-1,Ne=o*E;if(this.isAudioContiguous=l=l||ae.length&&pe>0&&(m&&Math.abs(Ne-pe)<9e3||Math.abs(s(ae[0].pts-ee,Ne)-pe)<20*z),ae.forEach(function(_e){_e.pts=s(_e.pts-ee,Ne)}),!l||pe<0){if(ae=ae.filter(function(_e){return _e.pts>=0}),!ae.length)return;g===0?pe=0:m?pe=Math.max(0,Ne):pe=ae[0].pts}if(u.isAAC)for(var Fe=g!==void 0,He=this.config.maxAudioFramesDrift,Ke=0,Xe=pe;Ke<ae.length;Ke++){var Ce=ae[Ke],ye=Ce.pts,Pe=ye-Xe,Et=Math.abs(1e3*Pe/E);if(Pe<=-He*z&&Fe)Ke===0&&(N.logger.warn("Audio frame @ "+(ye/E).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Pe/E)+" ms."),this.nextAudioPts=pe=Xe=ye);else if(Pe>=He*z&&Et<A&&Fe){var mt=Math.round(Pe/z);Xe=ye-mt*z,Xe<0&&(mt--,Xe+=z),Ke===0&&(this.nextAudioPts=pe=Xe),N.logger.warn("[mp4-remuxer]: Injecting "+mt+" audio frame @ "+(Xe/E).toFixed(3)+"s due to "+Math.round(1e3*Pe/E)+" ms gap.");for(var gt=0;gt<mt;gt++){var bt=Math.max(Xe,0),oe=F.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);oe||(N.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),oe=Ce.unit.subarray()),ae.splice(Ke,0,{unit:oe,pts:bt}),Xe+=z,Ke++}}Ce.pts=Xe,Xe+=z}for(var V=null,Y=null,he,Se=0,Ue=ae.length;Ue--;)Se+=ae[Ue].unit.byteLength;for(var Ie=0,st=ae.length;Ie<st;Ie++){var it=ae[Ie],ut=it.unit,dt=it.pts;if(Y!==null){var vt=q[Ie-1];vt.duration=Math.round((dt-Y)/P)}else if(l&&u.isAAC&&(dt=pe),V=dt,Se>0){Se+=ge;try{he=new Uint8Array(Se)}catch(_e){this.observer.emit(Z.Events.ERROR,Z.Events.ERROR,{type:M.ErrorTypes.MUX_ERROR,details:M.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Se,reason:"fail allocating audio mdat "+Se});return}if(!Q){var Tt=new DataView(he.buffer);Tt.setUint32(0,Se),he.set(R.default.types.mdat,4)}}else return;he.set(ut,ge);var Me=ut.byteLength;ge+=Me,q.push(new C(!0,j,Me,0)),Y=dt}var Ye=q.length;if(!Ye)return;var tt=q[q.length-1];this.nextAudioPts=pe=Y+P*tt.duration;var at=Q?new Uint8Array(0):R.default.moof(u.sequenceNumber++,V/P,b({},u,{samples:q}));u.samples=[];var ze=V/E,qe=pe/E,Oe="audio",be={data1:at,data2:he,startPTS:ze,endPTS:qe,startDTS:ze,endDTS:qe,type:Oe,hasAudio:!0,hasVideo:!1,nb:Ye};return this.isAudioContiguous=!0,console.assert(he.length,"MDAT length must not be zero"),be},T.remuxEmptyAudio=function(u,o,l,m){var g=u.inputTimeScale,E=u.samplerate?u.samplerate:g,L=g/E,P=this.nextAudioPts,j=(P!==null?P:m.startDTS*g)+this._initDTS,z=m.endDTS*g+this._initDTS,ee=L*a,Q=Math.ceil((z-j)/ee),q=F.default.getSilentFrame(u.manifestCodec||u.codec,u.channelCount);if(N.logger.warn("[mp4-remuxer]: remux empty Audio"),!q){N.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ae=[],ge=0;ge<Q;ge++){var pe=j+ge*ee;ae.push({unit:q,pts:pe,dts:pe})}return u.samples=ae,this.remuxAudio(u,o,l,!1)},T.remuxID3=function(u,o){var l=u.samples.length;if(!l)return;for(var m=u.inputTimeScale,g=this._initPTS,E=this._initDTS,L=0;L<l;L++){var P=u.samples[L];P.pts=s(P.pts-g,o*m)/m,P.dts=s(P.dts-E,o*m)/m}var j=u.samples;return u.samples=[],{samples:j}},T.remuxText=function(u,o){var l=u.samples.length;if(!l)return;for(var m=u.inputTimeScale,g=this._initPTS,E=0;E<l;E++){var L=u.samples[E];L.pts=s(L.pts-g,o*m)/m}u.samples.sort(function(j,z){return j.pts-z.pts});var P=u.samples;return u.samples=[],{samples:P}},x}();function s(x,T){var d;if(T===null)return x;for(T<x?d=-8589934592:d=8589934592;Math.abs(x-T)>4294967296;)x+=d;return x}function I(x){for(var T=0;T<x.length;T++)if(x[T].key)return T;return-1}var C=function(T,d,u,o){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=d,this.size=u,this.cts=o,this.flags=new _(T)},_=function(T){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=T?2:1,this.isNonSync=T?0:1}},"./src/remux/passthrough-remuxer.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/polyfills/number.ts"),F=U("./src/utils/mp4-tools.ts"),R=U("./src/loader/fragment.ts"),Z=U("./src/utils/logger.ts"),M=function(){function h(){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 b=h.prototype;return b.destroy=function(){},b.resetTimeStamp=function(a){this.initPTS=a,this.lastEndDTS=null},b.resetNextTimestamp=function(){this.lastEndDTS=null},b.resetInitSegment=function(a,r,n){this.audioCodec=r,this.videoCodec=n,this.generateInitSegment(a),this.emitInitSegment=!0},b.generateInitSegment=function(a){var r=this.audioCodec,n=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var e=this.initData=Object(F.parseInitSegment)(a);r||(r=O(e.audio,R.ElementaryStreamTypes.AUDIO)),n||(n=O(e.video,R.ElementaryStreamTypes.VIDEO));var t={};e.audio&&e.video?t.audiovideo={container:"video/mp4",codec:r+","+n,initSegment:a,id:"main"}:e.audio?t.audio={container:"audio/mp4",codec:r,initSegment:a,id:"audio"}:e.video?t.video={container:"video/mp4",codec:n,initSegment:a,id:"main"}:Z.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=t},b.remux=function(a,r,n,e,t){var i=this.initPTS,s=this.lastEndDTS,I={audio:void 0,video:void 0,text:e,id3:n,initSegment:void 0};Object(X.isFiniteNumber)(s)||(s=this.lastEndDTS=t||0);var C=r.samples;if(!C||!C.length)return I;var _={initPTS:void 0,timescale:1},x=this.initData;if((!x||!x.length)&&(this.generateInitSegment(C),x=this.initData),!x||!x.length)return Z.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),I;this.emitInitSegment&&(_.tracks=this.initTracks,this.emitInitSegment=!1),Object(X.isFiniteNumber)(i)||(this.initPTS=_.initPTS=i=N(x,C,s));var T=Object(F.getDuration)(C,x),d=s,u=T+d;Object(F.offsetStartDTS)(x,C,i),T>0?this.lastEndDTS=u:(Z.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var o=!!x.audio,l=!!x.video,m="";o&&(m+="audio"),l&&(m+="video");var g={data1:C,startPTS:d,startDTS:d,endPTS:u,endDTS:u,type:m,hasAudio:o,hasVideo:l,nb:1,dropped:0};return I.audio=g.type==="audio"?g:void 0,I.video=g.type!=="audio"?g:void 0,I.text=e,I.id3=n,I.initSegment=_,I},h}(),N=function(b,A,a){return Object(F.getStartDTS)(b,A)-a};function O(h,b){var A=h==null?void 0:h.codec;return A&&A.length>4?A:A==="hvc1"?"hvc1.1.c.L120.90":A==="av01"?"av01.0.04M.08":A==="avc1"||b===R.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}J.default=M},"./src/task-loop.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return X});var X=function(){function F(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var R=F.prototype;return R.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},R.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},R.onHandlerDestroyed=function(){},R.hasInterval=function(){return!!this._tickInterval},R.hasNextTick=function(){return!!this._tickTimer},R.setInterval=function(M){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,M),!0)},R.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},R.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},R.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},R.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},R.doTick=function(){},F}()},"./src/types/cmcd.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"CMCDVersion",function(){return X}),U.d(J,"CMCDObjectType",function(){return F}),U.d(J,"CMCDStreamingFormat",function(){return R}),U.d(J,"CMCDStreamType",function(){return Z});var X=1,F;(function(M){M.MANIFEST="m",M.AUDIO="a",M.VIDEO="v",M.MUXED="av",M.INIT="i",M.CAPTION="c",M.TIMED_TEXT="tt",M.KEY="k",M.OTHER="o"})(F||(F={}));var R;(function(M){M.DASH="d",M.HLS="h",M.SMOOTH="s",M.OTHER="o"})(R||(R={}));var Z;(function(M){M.VOD="v",M.LIVE="l"})(Z||(Z={}))},"./src/types/level.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"HlsSkip",function(){return R}),U.d(J,"getSkipValue",function(){return Z}),U.d(J,"HlsUrlParameters",function(){return M}),U.d(J,"Level",function(){return N});function X(O,h){for(var b=0;b<h.length;b++){var A=h[b];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(O,A.key,A)}}function F(O,h,b){return h&&X(O.prototype,h),b&&X(O,b),O}var R;(function(O){O.No="",O.Yes="YES",O.v2="v2"})(R||(R={}));function Z(O,h){var b=O.canSkipUntil,A=O.canSkipDateRanges,a=O.endSN,r=h!==void 0?h-a:0;return b&&r<b?A?R.v2:R.Yes:R.No}var M=function(){function O(b,A,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=b,this.part=A,this.skip=a}var h=O.prototype;return h.addDirectives=function(A){var a=new self.URL(A);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()},O}(),N=function(){function O(h){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=[h.url],this.attrs=h.attrs,this.bitrate=h.bitrate,h.details&&(this.details=h.details),this.id=h.id||0,this.name=h.name,this.width=h.width||0,this.height=h.height||0,this.audioCodec=h.audioCodec,this.videoCodec=h.videoCodec,this.unknownCodecs=h.unknownCodecs,this.codecSet=[h.videoCodec,h.audioCodec].filter(function(b){return b}).join(",").replace(/\.[^.,]+/g,"")}return F(O,[{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(b){var A=b%this.url.length;this._urlId!==A&&(this.details=void 0,this._urlId=A)}}]),O}()},"./src/types/loader.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"PlaylistContextType",function(){return X}),U.d(J,"PlaylistLevelType",function(){return F});var X;(function(R){R.MANIFEST="manifest",R.LEVEL="level",R.AUDIO_TRACK="audioTrack",R.SUBTITLE_TRACK="subtitleTrack"})(X||(X={}));var F;(function(R){R.MAIN="main",R.AUDIO="audio",R.SUBTITLE="subtitle"})(F||(F={}))},"./src/types/transmuxer.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"ChunkMetadata",function(){return X});var X=function(Z,M,N,O,h,b){O===void 0&&(O=0),h===void 0&&(h=-1),b===void 0&&(b=!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=F(),this.buffering={audio:F(),video:F(),audiovideo:F()},this.level=Z,this.sn=M,this.id=N,this.size=O,this.part=h,this.partial=b};function F(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"AttrList",function(){return R});var X=/^(\d+)x(\d+)$/,F=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,R=function(){function Z(N){typeof N=="string"&&(N=Z.parseAttrList(N));for(var O in N)N.hasOwnProperty(O)&&(this[O]=N[O])}var M=Z.prototype;return M.decimalInteger=function(O){var h=parseInt(this[O],10);return h>Number.MAX_SAFE_INTEGER?Infinity:h},M.hexadecimalInteger=function(O){if(this[O]){var h=(this[O]||"0x").slice(2);h=(h.length&1?"0":"")+h;for(var b=new Uint8Array(h.length/2),A=0;A<h.length/2;A++)b[A]=parseInt(h.slice(A*2,A*2+2),16);return b}else return null},M.hexadecimalIntegerAsNumber=function(O){var h=parseInt(this[O],16);return h>Number.MAX_SAFE_INTEGER?Infinity:h},M.decimalFloatingPoint=function(O){return parseFloat(this[O])},M.optionalFloat=function(O,h){var b=this[O];return b?parseFloat(b):h},M.enumeratedString=function(O){return this[O]},M.bool=function(O){return this[O]==="YES"},M.decimalResolution=function(O){var h=X.exec(this[O]);return h===null?void 0:{width:parseInt(h[1],10),height:parseInt(h[2],10)}},Z.parseAttrList=function(O){var h,b={},A='"';for(F.lastIndex=0;(h=F.exec(O))!==null;){var a=h[2];a.indexOf(A)===0&&a.lastIndexOf(A)===a.length-1&&(a=a.slice(1,-1)),b[h[1]]=a}return b},Z}()},"./src/utils/binary-search.ts":function(ve,J,U){"use strict";U.r(J);var X={search:function(R,Z){for(var M=0,N=R.length-1,O=null,h=null;M<=N;){O=(M+N)/2|0,h=R[O];var b=Z(h);if(b>0)M=O+1;else if(b<0)N=O-1;else return h}return null}};J.default=X},"./src/utils/buffer-helper.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"BufferHelper",function(){return R});var X=U("./src/utils/logger.ts"),F={length:0,start:function(){return 0},end:function(){return 0}},R=function(){function Z(){}return Z.isBuffered=function(N,O){try{if(N){for(var h=Z.getBuffered(N),b=0;b<h.length;b++)if(O>=h.start(b)&&O<=h.end(b))return!0}}catch(A){}return!1},Z.bufferInfo=function(N,O,h){try{if(N){var b=Z.getBuffered(N),A=[],a;for(a=0;a<b.length;a++)A.push({start:b.start(a),end:b.end(a)});return this.bufferedInfo(A,O,h)}}catch(r){}return{len:0,start:O,end:O,nextStart:void 0}},Z.bufferedInfo=function(N,O,h){O=Math.max(0,O),N.sort(function(_,x){var T=_.start-x.start;return T||x.end-_.end});var b=[];if(h)for(var A=0;A<N.length;A++){var a=b.length;if(a){var r=b[a-1].end;N[A].start-r<h?N[A].end>r&&(b[a-1].end=N[A].end):b.push(N[A])}else b.push(N[A])}else b=N;for(var n=0,e,t=O,i=O,s=0;s<b.length;s++){var I=b[s].start,C=b[s].end;if(O+h>=I&&O<C)t=I,i=C,n=i-O;else if(O+h<I){e=I;break}}return{len:n,start:t||0,end:i||0,nextStart:e}},Z.getBuffered=function(N){try{return N.buffered}catch(O){return X.logger.log("failed to get media.buffered",O),F}},Z}()},"./src/utils/cea-608-parser.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"Row",function(){return i}),U.d(J,"CaptionScreen",function(){return s});var X=U("./src/utils/logger.ts"),F={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},R=function(u){var o=u;return F.hasOwnProperty(u)&&(o=F[u]),String.fromCharCode(o)},Z=15,M=100,N={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},O={17:2,18:4,21:6,22:8,23:10,19:13,20:15},h={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},b={25:2,26:4,29:6,30:8,31:10,27:13,28:15},A=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],a;(function(d){d[d.ERROR=0]="ERROR",d[d.TEXT=1]="TEXT",d[d.WARNING=2]="WARNING",d[d.INFO=2]="INFO",d[d.DEBUG=3]="DEBUG",d[d.DATA=3]="DATA"})(a||(a={}));var r=function(){function d(){this.time=null,this.verboseLevel=a.ERROR}var u=d.prototype;return u.log=function(l,m){this.verboseLevel>=l&&X.logger.log(this.time+" ["+l+"] "+m)},d}(),n=function(u){for(var o=[],l=0;l<u.length;l++)o.push(u[l].toString(16));return o},e=function(){function d(o,l,m,g,E){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=o||"white",this.underline=l||!1,this.italics=m||!1,this.background=g||"black",this.flash=E||!1}var u=d.prototype;return u.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},u.setStyles=function(l){for(var m=["foreground","underline","italics","background","flash"],g=0;g<m.length;g++){var E=m[g];l.hasOwnProperty(E)&&(this[E]=l[E])}},u.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},u.equals=function(l){return this.foreground===l.foreground&&this.underline===l.underline&&this.italics===l.italics&&this.background===l.background&&this.flash===l.flash},u.copy=function(l){this.foreground=l.foreground,this.underline=l.underline,this.italics=l.italics,this.background=l.background,this.flash=l.flash},u.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},d}(),t=function(){function d(o,l,m,g,E,L){this.uchar=void 0,this.penState=void 0,this.uchar=o||" ",this.penState=new e(l,m,g,E,L)}var u=d.prototype;return u.reset=function(){this.uchar=" ",this.penState.reset()},u.setChar=function(l,m){this.uchar=l,this.penState.copy(m)},u.setPenState=function(l){this.penState.copy(l)},u.equals=function(l){return this.uchar===l.uchar&&this.penState.equals(l.penState)},u.copy=function(l){this.uchar=l.uchar,this.penState.copy(l.penState)},u.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},d}(),i=function(){function d(o){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var l=0;l<M;l++)this.chars.push(new t);this.logger=o,this.pos=0,this.currPenState=new e}var u=d.prototype;return u.equals=function(l){for(var m=!0,g=0;g<M;g++)if(!this.chars[g].equals(l.chars[g])){m=!1;break}return m},u.copy=function(l){for(var m=0;m<M;m++)this.chars[m].copy(l.chars[m])},u.isEmpty=function(){for(var l=!0,m=0;m<M;m++)if(!this.chars[m].isEmpty()){l=!1;break}return l},u.setCursor=function(l){this.pos!==l&&(this.pos=l),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>M&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=M)},u.moveCursor=function(l){var m=this.pos+l;if(l>1)for(var g=this.pos+1;g<m+1;g++)this.chars[g].setPenState(this.currPenState);this.setCursor(m)},u.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},u.insertChar=function(l){l>=144&&this.backSpace();var m=R(l);if(this.pos>=M){this.logger.log(a.ERROR,"Cannot insert "+l.toString(16)+" ("+m+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(m,this.currPenState),this.moveCursor(1)},u.clearFromPos=function(l){var m;for(m=l;m<M;m++)this.chars[m].reset()},u.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},u.clearToEndOfRow=function(){this.clearFromPos(this.pos)},u.getTextString=function(){for(var l=[],m=!0,g=0;g<M;g++){var E=this.chars[g].uchar;E!==" "&&(m=!1),l.push(E)}return m?"":l.join("")},u.setPenStyles=function(l){this.currPenState.setStyles(l);var m=this.chars[this.pos];m.setPenState(this.currPenState)},d}(),s=function(){function d(o){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var l=0;l<Z;l++)this.rows.push(new i(o));this.logger=o,this.currRow=Z-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var u=d.prototype;return u.reset=function(){for(var l=0;l<Z;l++)this.rows[l].clear();this.currRow=Z-1},u.equals=function(l){for(var m=!0,g=0;g<Z;g++)if(!this.rows[g].equals(l.rows[g])){m=!1;break}return m},u.copy=function(l){for(var m=0;m<Z;m++)this.rows[m].copy(l.rows[m])},u.isEmpty=function(){for(var l=!0,m=0;m<Z;m++)if(!this.rows[m].isEmpty()){l=!1;break}return l},u.backSpace=function(){var l=this.rows[this.currRow];l.backSpace()},u.clearToEndOfRow=function(){var l=this.rows[this.currRow];l.clearToEndOfRow()},u.insertChar=function(l){var m=this.rows[this.currRow];m.insertChar(l)},u.setPen=function(l){var m=this.rows[this.currRow];m.setPenStyles(l)},u.moveCursor=function(l){var m=this.rows[this.currRow];m.moveCursor(l)},u.setCursor=function(l){this.logger.log(a.INFO,"setCursor: "+l);var m=this.rows[this.currRow];m.setCursor(l)},u.setPAC=function(l){this.logger.log(a.INFO,"pacData = "+JSON.stringify(l));var m=l.row-1;if(this.nrRollUpRows&&m<this.nrRollUpRows-1&&(m=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==m){for(var g=0;g<Z;g++)this.rows[g].clear();var E=this.currRow+1-this.nrRollUpRows,L=this.lastOutputScreen;if(L){var P=L.rows[E].cueStartTime,j=this.logger.time;if(P&&j!==null&&P<j)for(var z=0;z<this.nrRollUpRows;z++)this.rows[m-this.nrRollUpRows+z+1].copy(L.rows[E+z])}}this.currRow=m;var ee=this.rows[this.currRow];if(l.indent!==null){var Q=l.indent,q=Math.max(Q-1,0);ee.setCursor(l.indent),l.color=ee.chars[q].penState.foreground}var ae={foreground:l.color,underline:l.underline,italics:l.italics,background:"black",flash:!1};this.setPen(ae)},u.setBkgData=function(l){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(l)),this.backSpace(),this.setPen(l),this.insertChar(32)},u.setRollUpRows=function(l){this.nrRollUpRows=l},u.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(a.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(a.TEXT,this.getDisplayText());var l=this.currRow+1-this.nrRollUpRows,m=this.rows.splice(l,1)[0];m.clear(),this.rows.splice(this.currRow,0,m),this.logger.log(a.INFO,"Rolling up")},u.getDisplayText=function(l){l=l||!1;for(var m=[],g="",E=-1,L=0;L<Z;L++){var P=this.rows[L].getTextString();P&&(E=L+1,l?m.push("Row "+E+": '"+P+"'"):m.push(P.trim()))}return m.length>0&&(l?g="["+m.join(" | ")+"]":g=m.join(`
`)),g},u.getTextAndFormat=function(){return this.rows},d}(),I=function(){function d(o,l,m){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=o,this.outputFilter=l,this.mode=null,this.verbose=0,this.displayedMemory=new s(m),this.nonDisplayedMemory=new s(m),this.lastOutputScreen=new s(m),this.currRollUpRow=this.displayedMemory.rows[Z-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=m}var u=d.prototype;return u.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Z-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},u.getHandler=function(){return this.outputFilter},u.setHandler=function(l){this.outputFilter=l},u.setPAC=function(l){this.writeScreen.setPAC(l)},u.setBkgData=function(l){this.writeScreen.setBkgData(l)},u.setMode=function(l){if(l===this.mode)return;this.mode=l,this.logger.log(a.INFO,"MODE="+l),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=l},u.insertChars=function(l){for(var m=0;m<l.length;m++)this.writeScreen.insertChar(l[m]);var g=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,g+": "+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())},u.ccRCL=function(){this.logger.log(a.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},u.ccBS=function(){if(this.logger.log(a.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},u.ccAOF=function(){},u.ccAON=function(){},u.ccDER=function(){this.logger.log(a.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},u.ccRU=function(l){this.logger.log(a.INFO,"RU("+l+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(l)},u.ccFON=function(){this.logger.log(a.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},u.ccRDC=function(){this.logger.log(a.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},u.ccTR=function(){this.logger.log(a.INFO,"TR"),this.setMode("MODE_TEXT")},u.ccRTD=function(){this.logger.log(a.INFO,"RTD"),this.setMode("MODE_TEXT")},u.ccEDM=function(){this.logger.log(a.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},u.ccCR=function(){this.logger.log(a.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},u.ccENM=function(){this.logger.log(a.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},u.ccEOC=function(){if(this.logger.log(a.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var l=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=l,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},u.ccTO=function(l){this.logger.log(a.INFO,"TO("+l+") - Tab Offset"),this.writeScreen.moveCursor(l)},u.ccMIDROW=function(l){var m={flash:!1};if(m.underline=l%2===1,m.italics=l>=46,m.italics)m.foreground="white";else{var g=Math.floor(l/2)-16,E=["white","green","blue","cyan","red","yellow","magenta"];m.foreground=E[g]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(m)),this.writeScreen.setPen(m)},u.outputDataUpdate=function(l){l===void 0&&(l=!1);var m=this.logger.time;if(m===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=m:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,m,this.lastOutputScreen),l&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:m),this.lastOutputScreen.copy(this.displayedMemory))},u.cueSplitAtTime=function(l){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,l,this.displayedMemory),this.cueStartTime=l))},d}(),C=function(){function d(o,l,m){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var g=new r;this.channels=[null,new I(o,l,g),new I(o+1,m,g)],this.cmdHistory=T(),this.logger=g}var u=d.prototype;return u.getHandler=function(l){return this.channels[l].getHandler()},u.setHandler=function(l,m){this.channels[l].setHandler(m)},u.addData=function(l,m){var g,E,L,P=!1;this.logger.time=l;for(var j=0;j<m.length;j+=2){if(E=m[j]&127,L=m[j+1]&127,E===0&&L===0)continue;if(this.logger.log(a.DATA,"["+n([m[j],m[j+1]])+"] -> ("+n([E,L])+")"),g=this.parseCmd(E,L),g||(g=this.parseMidrow(E,L)),g||(g=this.parsePAC(E,L)),g||(g=this.parseBackgroundAttributes(E,L)),!g&&(P=this.parseChars(E,L),P)){var z=this.currentChannel;if(z&&z>0){var ee=this.channels[z];ee.insertChars(P)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!g&&!P&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+n([E,L])+" orig: "+n([m[j],m[j+1]]))}},u.parseCmd=function(l,m){var g=this.cmdHistory,E=(l===20||l===28||l===21||l===29)&&m>=32&&m<=47,L=(l===23||l===31)&&m>=33&&m<=35;if(!(E||L))return!1;if(x(l,m,g))return _(null,null,g),this.logger.log(a.DEBUG,"Repeated command ("+n([l,m])+") is dropped"),!0;var P=l===20||l===21||l===23?1:2,j=this.channels[P];return l===20||l===21||l===28||l===29?m===32?j.ccRCL():m===33?j.ccBS():m===34?j.ccAOF():m===35?j.ccAON():m===36?j.ccDER():m===37?j.ccRU(2):m===38?j.ccRU(3):m===39?j.ccRU(4):m===40?j.ccFON():m===41?j.ccRDC():m===42?j.ccTR():m===43?j.ccRTD():m===44?j.ccEDM():m===45?j.ccCR():m===46?j.ccENM():m===47&&j.ccEOC():j.ccTO(m-32),_(l,m,g),this.currentChannel=P,!0},u.parseMidrow=function(l,m){var g=0;if((l===17||l===25)&&m>=32&&m<=47){if(l===17?g=1:g=2,g!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var E=this.channels[g];return E?(E.ccMIDROW(m),this.logger.log(a.DEBUG,"MIDROW ("+n([l,m])+")"),!0):!1}return!1},u.parsePAC=function(l,m){var g,E=this.cmdHistory,L=(l>=17&&l<=23||l>=25&&l<=31)&&m>=64&&m<=127,P=(l===16||l===24)&&m>=64&&m<=95;if(!(L||P))return!1;if(x(l,m,E))return _(null,null,E),!0;var j=l<=23?1:2;m>=64&&m<=95?g=j===1?N[l]:h[l]:g=j===1?O[l]:b[l];var z=this.channels[j];return z?(z.setPAC(this.interpretPAC(g,m)),_(l,m,E),this.currentChannel=j,!0):!1},u.interpretPAC=function(l,m){var g,E={color:null,italics:!1,indent:null,underline:!1,row:l};return m>95?g=m-96:g=m-64,E.underline=(g&1)===1,g<=13?E.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(g/2)]:g<=15?(E.italics=!0,E.color="white"):E.indent=Math.floor((g-16)/2)*4,E},u.parseChars=function(l,m){var g,E=null,L=null;if(l>=25?(g=2,L=l-8):(g=1,L=l),L>=17&&L<=19){var P;L===17?P=m+80:L===18?P=m+112:P=m+144,this.logger.log(a.INFO,"Special char '"+R(P)+"' in channel "+g),E=[P]}else l>=32&&l<=127&&(E=m===0?[l]:[l,m]);if(E){var j=n(E);this.logger.log(a.DEBUG,"Char codes = "+j.join(",")),_(l,m,this.cmdHistory)}return E},u.parseBackgroundAttributes=function(l,m){var g=(l===16||l===24)&&m>=32&&m<=47,E=(l===23||l===31)&&m>=45&&m<=47;if(!(g||E))return!1;var L,P={};l===16||l===24?(L=Math.floor((m-32)/2),P.background=A[L],m%2===1&&(P.background=P.background+"_semi")):m===45?P.background="transparent":(P.foreground="black",m===47&&(P.underline=!0));var j=l<=23?1:2,z=this.channels[j];return z.setBkgData(P),_(l,m,this.cmdHistory),!0},u.reset=function(){for(var l=0;l<Object.keys(this.channels).length;l++){var m=this.channels[l];m&&m.reset()}this.cmdHistory=T()},u.cueSplitAtTime=function(l){for(var m=0;m<this.channels.length;m++){var g=this.channels[m];g&&g.cueSplitAtTime(l)}},d}();function _(d,u,o){o.a=d,o.b=u}function x(d,u,o){return o.a===d&&o.b===u}function T(){return{a:null,b:null}}J.default=C},"./src/utils/codecs.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"isCodecType",function(){return F}),U.d(J,"isCodecSupportedInMp4",function(){return R});var X={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 F(Z,M){var N=X[M];return!!N&&N[Z.slice(0,4)]===!0}function R(Z,M){return MediaSource.isTypeSupported((M||"video")+'/mp4;codecs="'+Z+'"')}},"./src/utils/cues.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/utils/vttparser.ts"),F=U("./src/utils/webvtt-parser.ts"),R=U("./src/utils/texttrack-utils.ts"),Z=/\s/,M={newCue:function(O,h,b,A){for(var a=[],r,n,e,t,i,s=self.VTTCue||self.TextTrackCue,I=0;I<A.rows.length;I++)if(r=A.rows[I],e=!0,t=0,i="",!r.isEmpty()){for(var C=0;C<r.chars.length;C++)Z.test(r.chars[C].uchar)&&e?t++:(i+=r.chars[C].uchar,e=!1);r.cueStartTime=h,h===b&&(b+=1e-4),t>=16?t--:t++;var _=Object(X.fixLineBreaks)(i.trim()),x=Object(F.generateCueId)(h,b,_);(!O||!O.cues||!O.cues.getCueById(x))&&(n=new s(h,b,_),n.id=x,n.line=I+1,n.align="left",n.position=10+Math.min(80,Math.floor(t*8/32)*10),a.push(n))}return O&&a.length&&(a.sort(function(T,d){return T.line==="auto"||d.line==="auto"?0:T.line>8&&d.line>8?d.line-T.line:T.line-d.line}),a.forEach(function(T){return Object(R.addCueToTrack)(O,T)})),a}};J.default=M},"./src/utils/discontinuities.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"findFirstFragWithCC",function(){return Z}),U.d(J,"shouldAlignOnDiscontinuities",function(){return M}),U.d(J,"findDiscontinuousReferenceFrag",function(){return N}),U.d(J,"adjustSlidingStart",function(){return h}),U.d(J,"alignStream",function(){return b}),U.d(J,"alignPDT",function(){return a}),U.d(J,"alignFragmentByPDTDelta",function(){return r}),U.d(J,"alignMediaPlaylistByPDT",function(){return n});var X=U("./src/polyfills/number.ts"),F=U("./src/utils/logger.ts"),R=U("./src/controller/level-helper.ts");function Z(e,t){for(var i=null,s=0,I=e.length;s<I;s++){var C=e[s];if(C&&C.cc===t){i=C;break}}return i}function M(e,t,i){return!!(t.details&&(i.endCC>i.startCC||e&&e.cc<i.startCC))}function N(e,t){var i=e.fragments,s=t.fragments;if(!s.length||!i.length){F.logger.log("No fragments to align");return}var I=Z(i,s[0].cc);if(!I||I&&!I.startPTS){F.logger.log("No frag in previous level to align on");return}return I}function O(e,t){if(e){var i=e.start+t;e.start=e.startPTS=i,e.endPTS=i+e.duration}}function h(e,t){for(var i=t.fragments,s=0,I=i.length;s<I;s++)O(i[s],e);t.fragmentHint&&O(t.fragmentHint,e),t.alignedSliding=!0}function b(e,t,i){if(!t)return;A(e,i,t),!i.alignedSliding&&t.details&&a(i,t.details),!i.alignedSliding&&t.details&&!i.skippedSegments&&Object(R.adjustSliding)(t.details,i)}function A(e,t,i){if(M(e,i,t)){var s=N(i.details,t);s&&Object(X.isFiniteNumber)(s.start)&&(F.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),h(s.start,t))}}function a(e,t){if(!t.fragments.length||!e.hasProgramDateTime||!t.hasProgramDateTime)return;var i=t.fragments[0].programDateTime,s=e.fragments[0].programDateTime,I=(s-i)/1e3+t.fragments[0].start;I&&Object(X.isFiniteNumber)(I)&&(F.logger.log("Adjusting PTS using programDateTime delta "+(s-i)+"ms, sliding:"+I.toFixed(3)+" "+e.url+" "),h(I,e))}function r(e,t){var i=e.programDateTime;if(!i)return;var s=(i-t)/1e3;e.start=e.startPTS=s,e.endPTS=s+e.duration}function n(e,t){if(!t.fragments.length||!e.hasProgramDateTime||!t.hasProgramDateTime)return;var i=t.fragments[0].programDateTime,s=t.fragments[0].start,I=i-s*1e3;e.fragments.forEach(function(C){r(C,I)}),e.fragmentHint&&r(e.fragmentHint,I),e.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/utils/ewma.ts"),F=function(){function R(M,N,O){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=O,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new X.default(M),this.fast_=new X.default(N)}var Z=R.prototype;return Z.update=function(N,O){var h=this.slow_,b=this.fast_;this.slow_.halfLife!==N&&(this.slow_=new X.default(N,h.getEstimate(),h.getTotalWeight())),this.fast_.halfLife!==O&&(this.fast_=new X.default(O,b.getEstimate(),b.getTotalWeight()))},Z.sample=function(N,O){N=Math.max(N,this.minDelayMs_);var h=8*O,b=N/1e3,A=h/b;this.fast_.sample(b,A),this.slow_.sample(b,A)},Z.canEstimate=function(){var N=this.fast_;return N&&N.getTotalWeight()>=this.minWeight_},Z.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},Z.destroy=function(){},R}();J.default=F},"./src/utils/ewma.ts":function(ve,J,U){"use strict";U.r(J);var X=function(){function F(Z,M,N){M===void 0&&(M=0),N===void 0&&(N=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=Z,this.alpha_=Z?Math.exp(Math.log(.5)/Z):0,this.estimate_=M,this.totalWeight_=N}var R=F.prototype;return R.sample=function(M,N){var O=Math.pow(this.alpha_,M);this.estimate_=N*(1-O)+O*this.estimate_,this.totalWeight_+=M},R.getTotalWeight=function(){return this.totalWeight_},R.getEstimate=function(){if(this.alpha_){var M=1-Math.pow(this.alpha_,this.totalWeight_);if(M)return this.estimate_/M}return this.estimate_},F}();J.default=X},"./src/utils/fetch-loader.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"fetchSupported",function(){return r});var X=U("./src/polyfills/number.ts"),F=U("./src/loader/load-stats.ts"),R=U("./src/demux/chunk-cache.ts");function Z(s,I){s.prototype=Object.create(I.prototype),s.prototype.constructor=s,b(s,I)}function M(s){var I=typeof Map=="function"?new Map:void 0;return M=function(_){if(_===null||!h(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof I!="undefined"){if(I.has(_))return I.get(_);I.set(_,x)}function x(){return N(_,arguments,A(this).constructor)}return x.prototype=Object.create(_.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),b(x,_)},M(s)}function N(s,I,C){return O()?N=Reflect.construct:N=function(x,T,d){var u=[null];u.push.apply(u,T);var o=Function.bind.apply(x,u),l=new o;return d&&b(l,d.prototype),l},N.apply(null,arguments)}function O(){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 h(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function b(s,I){return b=Object.setPrototypeOf||function(_,x){return _.__proto__=x,_},b(s,I)}function A(s){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},A(s)}function a(){return a=Object.assign||function(s){for(var I=1;I<arguments.length;I++){var C=arguments[I];for(var _ in C)Object.prototype.hasOwnProperty.call(C,_)&&(s[_]=C[_])}return s},a.apply(this,arguments)}function r(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(s){}return!1}var n=function(){function s(C){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=C.fetchSetup||t,this.controller=new self.AbortController,this.stats=new F.LoadStats}var I=s.prototype;return I.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},I.abortInternal=function(){var _=this.response;(!_||!_.ok)&&(this.stats.aborted=!0,this.controller.abort())},I.abort=function(){var _;this.abortInternal(),(_=this.callbacks)!==null&&_!==void 0&&_.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},I.load=function(_,x,T){var d=this,u=this.stats;if(u.loading.start)throw new Error("Loader can only be used once.");u.loading.start=self.performance.now();var o=e(_,this.controller.signal),l=T.onProgress,m=_.responseType==="arraybuffer",g=m?"byteLength":"length";this.context=_,this.config=x,this.callbacks=T,this.request=this.fetchSetup(_,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){d.abortInternal(),T.onTimeout(u,_,d.response)},x.timeout),self.fetch(this.request).then(function(E){if(d.response=d.loader=E,!E.ok){var L=E.status,P=E.statusText;throw new i(P||"fetch, bad network response",L,E)}return u.loading.first=Math.max(self.performance.now(),u.loading.start),u.total=parseInt(E.headers.get("Content-Length")||"0"),l&&Object(X.isFiniteNumber)(x.highWaterMark)?d.loadProgressively(E,u,_,x.highWaterMark,l):m?E.arrayBuffer():E.text()}).then(function(E){var L=d.response;self.clearTimeout(d.requestTimeout),u.loading.end=Math.max(self.performance.now(),u.loading.first),u.loaded=u.total=E[g];var P={url:L.url,data:E};l&&!Object(X.isFiniteNumber)(x.highWaterMark)&&l(u,_,E,L),T.onSuccess(P,u,_,L)}).catch(function(E){if(self.clearTimeout(d.requestTimeout),u.aborted)return;var L=E.code||0;T.onError({code:L,text:E.message},_,E.details)})},I.getCacheAge=function(){var _=null;if(this.response){var x=this.response.headers.get("age");_=x?parseFloat(x):null}return _},I.loadProgressively=function(_,x,T,d,u){d===void 0&&(d=0);var o=new R.default,l=_.body.getReader(),m=function g(){return l.read().then(function(E){if(E.done)return o.dataLength&&u(x,T,o.flush(),_),Promise.resolve(new ArrayBuffer(0));var L=E.value,P=L.length;return x.loaded+=P,P<d||o.dataLength?(o.push(L),o.dataLength>=d&&u(x,T,o.flush(),_)):u(x,T,L,_),g()}).catch(function(){return Promise.reject()})};return m()},s}();function e(s,I){var C={method:"GET",mode:"cors",credentials:"same-origin",signal:I,headers:new self.Headers(a({},s.headers))};return s.rangeEnd&&C.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),C}function t(s,I){return new self.Request(s.url,I)}var i=function(s){Z(I,s);function I(C,_,x){var T;return T=s.call(this,C)||this,T.code=void 0,T.details=void 0,T.code=_,T.details=x,T}return I}(M(Error));J.default=n},"./src/utils/imsc1-ttml-parser.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"IMSC1_CODEC",function(){return h}),U.d(J,"parseIMSC1",function(){return r});var X=U("./src/utils/mp4-tools.ts"),F=U("./src/utils/vttparser.ts"),R=U("./src/utils/vttcue.ts"),Z=U("./src/demux/id3.ts"),M=U("./src/utils/timescale-conversion.ts"),N=U("./src/utils/webvtt-parser.ts");function O(){return O=Object.assign||function(d){for(var u=1;u<arguments.length;u++){var o=arguments[u];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(d[l]=o[l])}return d},O.apply(this,arguments)}var h="stpp.ttml.im1t",b=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,A=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,a={left:"start",center:"center",right:"end",start:"start",end:"end"};function r(d,u,o,l,m){var g=Object(X.findBox)(new Uint8Array(d),["mdat"]);if(g.length===0){m(new Error("Could not parse IMSC1 mdat"));return}var E=g[0],L=Object(Z.utf8ArrayToStr)(new Uint8Array(d,E.start,E.end-E.start)),P=Object(M.toTimescaleFromScale)(u,1,o);try{l(n(L,P))}catch(j){m(j)}}function n(d,u){var o=new DOMParser,l=o.parseFromString(d,"text/xml"),m=l.getElementsByTagName("tt")[0];if(!m)throw new Error("Invalid ttml");var g={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},E=Object.keys(g).reduce(function(ee,Q){return ee[Q]=m.getAttribute("ttp:"+Q)||g[Q],ee},{}),L=m.getAttribute("xml:space")!=="preserve",P=t(e(m,"styling","style")),j=t(e(m,"layout","region")),z=e(m,"body","[begin]");return[].map.call(z,function(ee){var Q=i(ee,L);if(!Q||!ee.hasAttribute("begin"))return null;var q=_(ee.getAttribute("begin"),E),ae=_(ee.getAttribute("dur"),E),ge=_(ee.getAttribute("end"),E);if(q===null)throw C(ee);if(ge===null){if(ae===null)throw C(ee);ge=q+ae}var pe=new R.default(q-u,ge-u,Q);pe.id=Object(N.generateCueId)(pe.startTime,pe.endTime,pe.text);var Ne=j[ee.getAttribute("region")],Fe=P[ee.getAttribute("style")];pe.position=10,pe.size=80;var He=s(Ne,Fe),Ke=He.textAlign;if(Ke){var Xe=a[Ke];Xe&&(pe.lineAlign=Xe),pe.align=Ke}return O(pe,He),pe}).filter(function(ee){return ee!==null})}function e(d,u,o){var l=d.getElementsByTagName(u)[0];return l?[].slice.call(l.querySelectorAll(o)):[]}function t(d){return d.reduce(function(u,o){var l=o.getAttribute("xml:id");return l&&(u[l]=o),u},{})}function i(d,u){return[].slice.call(d.childNodes).reduce(function(o,l,m){var g;return l.nodeName==="br"&&m?o+`
`:(g=l.childNodes)!==null&&g!==void 0&&g.length?i(l,u):u?o+l.textContent.trim().replace(/\s+/g," "):o+l.textContent},"")}function s(d,u){var o="http://www.w3.org/ns/ttml#styling",l=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return l.reduce(function(m,g){var E=I(u,o,g)||I(d,o,g);return E&&(m[g]=E),m},{})}function I(d,u,o){return d.hasAttributeNS(u,o)?d.getAttributeNS(u,o):null}function C(d){return new Error("Could not parse ttml timestamp "+d)}function _(d,u){if(!d)return null;var o=Object(F.parseTimeStamp)(d);return o===null&&(b.test(d)?o=x(d,u):A.test(d)&&(o=T(d,u))),o}function x(d,u){var o=b.exec(d),l=(o[4]|0)+(o[5]|0)/u.subFrameRate;return(o[1]|0)*3600+(o[2]|0)*60+(o[3]|0)+l/u.frameRate}function T(d,u){var o=A.exec(d),l=Number(o[1]),m=o[2];switch(m){case"h":return l*3600;case"m":return l*60;case"ms":return l*1e3;case"f":return l/u.frameRate;case"t":return l/u.tickRate}return l}},"./src/utils/logger.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"enableLogs",function(){return N}),U.d(J,"logger",function(){return O});var X=function(){},F={trace:X,debug:X,log:X,warn:X,info:X,error:X},R=F;function Z(h){var b=self.console[h];return b?b.bind(self.console,"["+h+"] >"):X}function M(h){for(var b=arguments.length,A=new Array(b>1?b-1:0),a=1;a<b;a++)A[a-1]=arguments[a];A.forEach(function(r){R[r]=h[r]?h[r].bind(h):Z(r)})}function N(h){if(self.console&&h===!0||typeof h=="object"){M(h,"debug","log","info","warn","error");try{R.log()}catch(b){R=F}}else R=F}var O=R},"./src/utils/mediakeys-helper.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"KeySystems",function(){return X}),U.d(J,"requestMediaKeySystemAccess",function(){return F});var X;(function(R){R.WIDEVINE="com.widevine.alpha",R.PLAYREADY="com.microsoft.playready"})(X||(X={}));var F=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"getMediaSource",function(){return X});function X(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"bin2str",function(){return M}),U.d(J,"readUint16",function(){return N}),U.d(J,"readUint32",function(){return O}),U.d(J,"writeUint32",function(){return h}),U.d(J,"findBox",function(){return b}),U.d(J,"parseSegmentIndex",function(){return A}),U.d(J,"parseInitSegment",function(){return a}),U.d(J,"getStartDTS",function(){return r}),U.d(J,"getDuration",function(){return n}),U.d(J,"computeRawDurationFromSamples",function(){return e}),U.d(J,"offsetStartDTS",function(){return t}),U.d(J,"segmentValidRange",function(){return i}),U.d(J,"appendUint8Array",function(){return s});var X=U("./src/utils/typed-array.ts"),F=U("./src/loader/fragment.ts"),R=Math.pow(2,32)-1,Z=[].push;function M(I){return String.fromCharCode.apply(null,I)}function N(I,C){"data"in I&&(C+=I.start,I=I.data);var _=I[C]<<8|I[C+1];return _<0?65536+_:_}function O(I,C){"data"in I&&(C+=I.start,I=I.data);var _=I[C]<<24|I[C+1]<<16|I[C+2]<<8|I[C+3];return _<0?4294967296+_:_}function h(I,C,_){"data"in I&&(C+=I.start,I=I.data),I[C]=_>>24,I[C+1]=_>>16&255,I[C+2]=_>>8&255,I[C+3]=_&255}function b(I,C){var _=[];if(!C.length)return _;var x,T,d;"data"in I?(x=I.data,T=I.start,d=I.end):(x=I,T=0,d=x.byteLength);for(var u=T;u<d;){var o=O(x,u),l=M(x.subarray(u+4,u+8)),m=o>1?u+o:d;if(l===C[0])if(C.length===1)_.push({data:x,start:u+8,end:m});else{var g=b({data:x,start:u+8,end:m},C.slice(1));g.length&&Z.apply(_,g)}u=m}return _}function A(I){var C=b(I,["moov"]),_=C[0],x=_?_.end:null,T=b(I,["sidx"]);if(!T||!T[0])return null;var d=[],u=T[0],o=u.data[0],l=o===0?8:16,m=O(u,l);l+=4;var g=0,E=0;o===0?l+=8:l+=16,l+=2;var L=u.end+E,P=N(u,l);l+=2;for(var j=0;j<P;j++){var z=l,ee=O(u,z);z+=4;var Q=ee&2147483647,q=(ee&2147483648)>>>31;if(q===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ae=O(u,z);z+=4,d.push({referenceSize:Q,subsegmentDuration:ae,info:{duration:ae/m,start:L,end:L+Q-1}}),L+=Q,z+=4,l=z}return{earliestPresentationTime:g,timescale:m,version:o,referencesCount:P,references:d,moovEndOffset:x}}function a(I){for(var C=[],_=b(I,["moov","trak"]),x=0;x<_.length;x++){var T=_[x],d=b(T,["tkhd"])[0];if(d){var u=d.data[d.start],o=u===0?12:20,l=O(d,o),m=b(T,["mdia","mdhd"])[0];if(m){u=m.data[m.start],o=u===0?12:20;var g=O(m,o),E=b(T,["mdia","hdlr"])[0];if(E){var L=M(E.data.subarray(E.start+8,E.start+12)),P={soun:F.ElementaryStreamTypes.AUDIO,vide:F.ElementaryStreamTypes.VIDEO}[L];if(P){var j=b(T,["mdia","minf","stbl","stsd"])[0],z=void 0;j&&(z=M(j.data.subarray(j.start+12,j.start+16))),C[l]={timescale:g,type:P},C[P]={timescale:g,id:l,codec:z}}}}}}var ee=b(I,["moov","mvex","trex"]);return ee.forEach(function(Q){var q=O(Q,4),ae=C[q];ae&&(ae.default={duration:O(Q,12),flags:O(Q,20)})}),C}function r(I,C){return b(C,["moof","traf"]).reduce(function(_,x){var T=b(x,["tfdt"])[0],d=T.data[T.start],u=b(x,["tfhd"]).reduce(function(o,l){var m=O(l,4),g=I[m];if(g){var E=O(T,4);d===1&&(E*=Math.pow(2,32),E+=O(T,8));var L=g.timescale||9e4,P=E/L;if(isFinite(P)&&(o===null||P<o))return P}return o},null);return u!==null&&isFinite(u)&&(_===null||u<_)?u:_},null)||0}function n(I,C){for(var _=0,x=0,T=0,d=b(I,["moof","traf"]),u=0;u<d.length;u++){var o=d[u],l=b(o,["tfhd"])[0],m=O(l,4),g=C[m];if(!g)continue;var E=g.default,L=O(l,0)|(E==null?void 0:E.flags),P=E==null?void 0:E.duration;L&8&&(L&2?P=O(l,12):P=O(l,8));for(var j=g.timescale||9e4,z=b(o,["trun"]),ee=0;ee<z.length;ee++){if(P){var Q=O(z[ee],4);_=P*Q}else _=e(z[ee]);g.type===F.ElementaryStreamTypes.VIDEO?x+=_/j:g.type===F.ElementaryStreamTypes.AUDIO&&(T+=_/j)}}if(x===0&&T===0){var q=A(I);if(q!=null&&q.references)return q.references.reduce(function(ae,ge){return ae+ge.info.duration||0},0)}return x||T}function e(I){var C=O(I,0),_=8;C&1&&(_+=4),C&4&&(_+=4);for(var x=0,T=O(I,4),d=0;d<T;d++){if(C&256){var u=O(I,_);x+=u,_+=4}C&512&&(_+=4),C&1024&&(_+=4),C&2048&&(_+=4)}return x}function t(I,C,_){b(C,["moof","traf"]).forEach(function(x){b(x,["tfhd"]).forEach(function(T){var d=O(T,4),u=I[d];if(!u)return;var o=u.timescale||9e4;b(x,["tfdt"]).forEach(function(l){var m=l.data[l.start],g=O(l,4);if(m===0)h(l,4,g-_*o);else{g*=Math.pow(2,32),g+=O(l,8),g-=_*o,g=Math.max(g,0);var E=Math.floor(g/(R+1)),L=Math.floor(g%(R+1));h(l,4,E),h(l,8,L)}})})})}function i(I){var C={valid:null,remainder:null},_=b(I,["moof"]);if(_){if(_.length<2)return C.remainder=I,C}else return C;var x=_[_.length-1];return C.valid=Object(X.sliceUint8)(I,0,x.start-8),C.remainder=Object(X.sliceUint8)(I,x.start-8),C}function s(I,C){var _=new Uint8Array(I.length+C.length);return _.set(I),_.set(C,I.length),_}},"./src/utils/output-filter.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"default",function(){return X});var X=function(){function F(Z,M){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=Z,this.trackName=M}var R=F.prototype;return R.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},R.newCue=function(M,N,O){(this.startTime===null||this.startTime>M)&&(this.startTime=M),this.endTime=N,this.screen=O,this.timelineController.createCaptionsTrack(this.trackName)},R.reset=function(){this.cueRanges=[]},F}()},"./src/utils/texttrack-utils.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"sendAddTrackEvent",function(){return F}),U.d(J,"addCueToTrack",function(){return R}),U.d(J,"clearCurrentCues",function(){return Z}),U.d(J,"removeCuesInRange",function(){return M}),U.d(J,"getCuesInRange",function(){return O});var X=U("./src/utils/logger.ts");function F(h,b){var A;try{A=new Event("addtrack")}catch(a){A=document.createEvent("Event"),A.initEvent("addtrack",!1,!1)}A.track=h,b.dispatchEvent(A)}function R(h,b){var A=h.mode;if(A==="disabled"&&(h.mode="hidden"),h.cues&&!h.cues.getCueById(b.id))try{if(h.addCue(b),!h.cues.getCueById(b.id))throw new Error("addCue is failed for: "+b)}catch(r){X.logger.debug("[texttrack-utils]: "+r);var a=new self.TextTrackCue(b.startTime,b.endTime,b.text);a.id=b.id,h.addCue(a)}A==="disabled"&&(h.mode=A)}function Z(h){var b=h.mode;if(b==="disabled"&&(h.mode="hidden"),h.cues)for(var A=h.cues.length;A--;)h.removeCue(h.cues[A]);b==="disabled"&&(h.mode=b)}function M(h,b,A){var a=h.mode;if(a==="disabled"&&(h.mode="hidden"),h.cues&&h.cues.length>0)for(var r=O(h.cues,b,A),n=0;n<r.length;n++)h.removeCue(r[n]);a==="disabled"&&(h.mode=a)}function N(h,b){if(b<h[0].startTime)return 0;var A=h.length-1;if(b>h[A].endTime)return-1;for(var a=0,r=A;a<=r;){var n=Math.floor((r+a)/2);if(b<h[n].startTime)r=n-1;else if(b>h[n].startTime&&a<A)a=n+1;else return n}return h[a].startTime-b<b-h[r].startTime?a:r}function O(h,b,A){var a=[],r=N(h,b);if(r>-1)for(var n=r,e=h.length;n<e;n++){var t=h[n];if(t.startTime>=b&&t.endTime<=A)a.push(t);else if(t.startTime>A)return a}return a}},"./src/utils/time-ranges.ts":function(ve,J,U){"use strict";U.r(J);var X={toString:function(R){for(var Z="",M=R.length,N=0;N<M;N++)Z+="["+R.start(N).toFixed(3)+","+R.end(N).toFixed(3)+"]";return Z}};J.default=X},"./src/utils/timescale-conversion.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"toTimescaleFromBase",function(){return F}),U.d(J,"toTimescaleFromScale",function(){return R}),U.d(J,"toMsFromMpegTsClock",function(){return Z}),U.d(J,"toMpegTsClockFromTimescale",function(){return M});var X=9e4;function F(N,O,h,b){h===void 0&&(h=1),b===void 0&&(b=!1);var A=N*O*h;return b?Math.round(A):A}function R(N,O,h,b){return h===void 0&&(h=1),b===void 0&&(b=!1),F(N,O,1/h,b)}function Z(N,O){return O===void 0&&(O=!1),F(N,1e3,1/X,O)}function M(N,O){return O===void 0&&(O=1),F(N,X,1/O)}},"./src/utils/typed-array.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"sliceUint8",function(){return X});function X(F,R,Z){return Uint8Array.prototype.slice?F.slice(R,Z):new Uint8Array(Array.prototype.slice.call(F,R,Z))}},"./src/utils/vttcue.ts":function(ve,J,U){"use strict";U.r(J),J.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var X=["","lr","rl"],F=["start","middle","end","left","right"];function R(h,b){if(typeof b!="string")return!1;if(!Array.isArray(h))return!1;var A=b.toLowerCase();return~h.indexOf(A)?A:!1}function Z(h){return R(X,h)}function M(h){return R(F,h)}function N(h){for(var b=arguments.length,A=new Array(b>1?b-1:0),a=1;a<b;a++)A[a-1]=arguments[a];for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)h[e]=n[e]}return h}function O(h,b,A){var a=this,r={enumerable:!0};a.hasBeenReset=!1;var n="",e=!1,t=h,i=b,s=A,I=null,C="",_=!0,x="auto",T="start",d=50,u="middle",o=50,l="middle";Object.defineProperty(a,"id",N({},r,{get:function(){return n},set:function(g){n=""+g}})),Object.defineProperty(a,"pauseOnExit",N({},r,{get:function(){return e},set:function(g){e=!!g}})),Object.defineProperty(a,"startTime",N({},r,{get:function(){return t},set:function(g){if(typeof g!="number")throw new TypeError("Start time must be set to a number.");t=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",N({},r,{get:function(){return i},set:function(g){if(typeof g!="number")throw new TypeError("End time must be set to a number.");i=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",N({},r,{get:function(){return s},set:function(g){s=""+g,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",N({},r,{get:function(){return I},set:function(g){I=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",N({},r,{get:function(){return C},set:function(g){var E=Z(g);if(E===!1)throw new SyntaxError("An invalid or illegal string was specified.");C=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",N({},r,{get:function(){return _},set:function(g){_=!!g,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",N({},r,{get:function(){return x},set:function(g){if(typeof g!="number"&&g!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");x=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",N({},r,{get:function(){return T},set:function(g){var E=M(g);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");T=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",N({},r,{get:function(){return d},set:function(g){if(g<0||g>100)throw new Error("Position must be between 0 and 100.");d=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",N({},r,{get:function(){return u},set:function(g){var E=M(g);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");u=E,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",N({},r,{get:function(){return o},set:function(g){if(g<0||g>100)throw new Error("Size must be between 0 and 100.");o=g,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",N({},r,{get:function(){return l},set:function(g){var E=M(g);if(!E)throw new SyntaxError("An invalid or illegal string was specified.");l=E,this.hasBeenReset=!0}})),a.displayState=void 0}return O.prototype.getCueAsHTML=function(){var h=self.WebVTT;return h.convertCueToDOMTree(self,this.text)},O}()},"./src/utils/vttparser.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"parseTimeStamp",function(){return R}),U.d(J,"fixLineBreaks",function(){return b}),U.d(J,"VTTParser",function(){return A});var X=U("./src/utils/vttcue.ts"),F=function(){function a(){}var r=a.prototype;return r.decode=function(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},a}();function R(a){function r(e,t,i,s){return(e|0)*3600+(t|0)*60+(i|0)+parseFloat(s||0)}var n=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?r(n[2],n[3],0,n[4]):r(n[1],n[2],n[3],n[4]):null}var Z=function(){function a(){this.values=Object.create(null)}var r=a.prototype;return r.set=function(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)},r.get=function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},r.has=function(e){return e in this.values},r.alt=function(e,t,i){for(var s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}},r.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},r.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var i=parseFloat(t);if(i>=0&&i<=100)return this.set(e,i),!0}return!1},a}();function M(a,r,n,e){var t=e?a.split(e):[a];for(var i in t){if(typeof t[i]!="string")continue;var s=t[i].split(n);if(s.length!==2)continue;var I=s[0],C=s[1];r(I,C)}}var N=new X.default(0,0,""),O=N.align==="middle"?"middle":"center";function h(a,r,n){var e=a;function t(){var I=R(a);if(I===null)throw new Error("Malformed timestamp: "+e);return a=a.replace(/^[^\sa-zA-Z-]+/,""),I}function i(I,C){var _=new Z;M(I,function(d,u){var o;switch(d){case"region":for(var l=n.length-1;l>=0;l--)if(n[l].id===u){_.set(d,n[l].region);break}break;case"vertical":_.alt(d,u,["rl","lr"]);break;case"line":o=u.split(","),_.integer(d,o[0]),_.percent(d,o[0])&&_.set("snapToLines",!1),_.alt(d,o[0],["auto"]),o.length===2&&_.alt("lineAlign",o[1],["start",O,"end"]);break;case"position":o=u.split(","),_.percent(d,o[0]),o.length===2&&_.alt("positionAlign",o[1],["start",O,"end","line-left","line-right","auto"]);break;case"size":_.percent(d,u);break;case"align":_.alt(d,u,["start",O,"end","left","right"]);break}},/:/,/\s/),C.region=_.get("region",null),C.vertical=_.get("vertical","");var x=_.get("line","auto");x==="auto"&&N.line===-1&&(x=-1),C.line=x,C.lineAlign=_.get("lineAlign","start"),C.snapToLines=_.get("snapToLines",!0),C.size=_.get("size",100),C.align=_.get("align",O);var T=_.get("position","auto");T==="auto"&&N.position===50&&(T=C.align==="start"||C.align==="left"?0:C.align==="end"||C.align==="right"?100:50),C.position=T}function s(){a=a.replace(/^\s+/,"")}if(s(),r.startTime=t(),s(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+e);a=a.substr(3),s(),r.endTime=t(),s(),i(a,r)}function b(a){return a.replace(/<br(?: \/)?>/gi,`
`)}var A=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new F,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(e){var t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function i(){var T=t.buffer,d=0;for(T=b(T);d<T.length&&T[d]!=="\r"&&T[d]!==`
`;)++d;var u=T.substr(0,d);return T[d]==="\r"&&++d,T[d]===`
`&&++d,t.buffer=T.substr(d),u}function s(T){M(T,function(d,u){},/:/)}try{var I="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;I=i();var C=I.match(/^()?WEBVTT([ \t].*)?$/);if(!C||!C[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var _=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;_?_=!1:I=i();switch(t.state){case"HEADER":/:/.test(I)?s(I):I||(t.state="ID");continue;case"NOTE":I||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(I)){t.state="NOTE";break}if(!I)continue;if(t.cue=new X.default(0,0,""),t.state="CUE",I.indexOf("-->")===-1){t.cue.id=I;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{h(I,t.cue,t.regionList)}catch(T){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{var x=I.indexOf("-->")!==-1;if(!I||x&&(_=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=I}continue;case"BADCUE":I||(t.state="ID")}}}catch(T){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},r.flush=function(){var e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(ve,J,U){"use strict";U.r(J),U.d(J,"generateCueId",function(){return A}),U.d(J,"parseWebVTT",function(){return r});var X=U("./src/polyfills/number.ts"),F=U("./src/utils/vttparser.ts"),R=U("./src/demux/id3.ts"),Z=U("./src/utils/timescale-conversion.ts"),M=U("./src/remux/mp4-remuxer.ts"),N=/\r\n|\n\r|\n|\r/g,O=function(e,t,i){return i===void 0&&(i=0),e.substr(i,t.length)===t},h=function(e){var t=parseInt(e.substr(-3)),i=parseInt(e.substr(-6,2)),s=parseInt(e.substr(-9,2)),I=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!Object(X.isFiniteNumber)(t)||!Object(X.isFiniteNumber)(i)||!Object(X.isFiniteNumber)(s)||!Object(X.isFiniteNumber)(I))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*i,t+=60*1e3*s,t+=60*60*1e3*I,t},b=function(e){for(var t=5381,i=e.length;i;)t=t*33^e.charCodeAt(--i);return(t>>>0).toString()};function A(n,e,t){return b(n.toString())+b(e.toString())+b(t)}var a=function(e,t,i){var s=e[t],I=e[s.prevCC];if(!I||!I.new&&s.new){e.ccOffset=e.presentationOffset=s.start,s.new=!1;return}for(;(C=I)!==null&&C!==void 0&&C.new;){var C;e.ccOffset+=s.start-I.start,s.new=!1,s=I,I=e[s.prevCC]}e.presentationOffset=i};function r(n,e,t,i,s,I,C,_){var x=new F.VTTParser,T=Object(R.utf8ArrayToStr)(new Uint8Array(n)).trim().replace(N,`
`).split(`
`),d=[],u=Object(Z.toMpegTsClockFromTimescale)(e,t),o="00:00.000",l=0,m=0,g,E=!0,L=!1;x.oncue=function(P){var j=i[s],z=i.ccOffset,ee=(l-u)/9e4;if(j!=null&&j.new&&(m!==void 0?z=i.ccOffset=j.start:a(i,s,ee)),ee&&(z=ee-i.presentationOffset),L){var Q=P.endTime-P.startTime,q=Object(M.normalizePts)((P.startTime+z-m)*9e4,I*9e4)/9e4;P.startTime=q,P.endTime=q+Q}var ae=P.text.trim();P.text=decodeURIComponent(encodeURIComponent(ae)),P.id||(P.id=A(P.startTime,P.endTime,ae)),P.endTime>0&&d.push(P)},x.onparsingerror=function(P){g=P},x.onflush=function(){if(g){_(g);return}C(d)},T.forEach(function(P){if(E)if(O(P,"X-TIMESTAMP-MAP=")){E=!1,L=!0,P.substr(16).split(",").forEach(function(j){O(j,"LOCAL:")?o=j.substr(6):O(j,"MPEGTS:")&&(l=parseInt(j.substr(7)))});try{m=h(o)/1e3}catch(j){L=!1,g=j}return}else P===""&&(E=!1);x.parse(P+`
`)}),x.flush()}},"./src/utils/xhr-loader.ts":function(ve,J,U){"use strict";U.r(J);var X=U("./src/utils/logger.ts"),F=U("./src/loader/load-stats.ts"),R=/^age:\s*[\d.]+\s*$/m,Z=function(){function M(O){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=O?O.xhrSetup:null,this.stats=new F.LoadStats,this.retryDelay=0}var N=M.prototype;return N.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},N.abortInternal=function(){var h=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),h&&(h.onreadystatechange=null,h.onprogress=null,h.readyState!==4&&(this.stats.aborted=!0,h.abort()))},N.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},N.load=function(h,b,A){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=h,this.config=b,this.callbacks=A,this.retryDelay=b.retryDelay,this.loadInternal()},N.loadInternal=function(){var h=this.config,b=this.context;if(!h)return;var A=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var r=this.xhrSetup;try{if(r)try{r(A,b.url)}catch(t){A.open("GET",b.url,!0),r(A,b.url)}A.readyState||A.open("GET",b.url,!0);var n=this.context.headers;if(n)for(var e in n)A.setRequestHeader(e,n[e])}catch(t){this.callbacks.onError({code:A.status,text:t.message},b,A);return}b.rangeEnd&&A.setRequestHeader("Range","bytes="+b.rangeStart+"-"+(b.rangeEnd-1)),A.onreadystatechange=this.readystatechange.bind(this),A.onprogress=this.loadprogress.bind(this),A.responseType=b.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),A.send()},N.readystatechange=function(){var h=this.context,b=this.loader,A=this.stats;if(!h||!b)return;var a=b.readyState,r=this.config;if(A.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),A.loading.first===0&&(A.loading.first=Math.max(self.performance.now(),A.loading.start)),a===4){b.onreadystatechange=null,b.onprogress=null;var n=b.status;if(n>=200&&n<300){A.loading.end=Math.max(self.performance.now(),A.loading.first);var e,t;if(h.responseType==="arraybuffer"?(e=b.response,t=e.byteLength):(e=b.responseText,t=e.length),A.loaded=A.total=t,!this.callbacks)return;var i=this.callbacks.onProgress;if(i&&i(A,h,e,b),!this.callbacks)return;var s={url:b.responseURL,data:e};this.callbacks.onSuccess(s,A,h,b)}else A.retry>=r.maxRetry||n>=400&&n<499?(X.logger.error(n+" while loading "+h.url),this.callbacks.onError({code:n,text:b.statusText},h,b)):(X.logger.warn(n+" while loading "+h.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),A.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout)},N.loadtimeout=function(){X.logger.warn("timeout while loading "+this.context.url);var h=this.callbacks;h&&(this.abortInternal(),h.onTimeout(this.stats,this.context,this.loader))},N.loadprogress=function(h){var b=this.stats;b.loaded=h.loaded,h.lengthComputable&&(b.total=h.total)},N.getCacheAge=function(){var h=null;if(this.loader&&R.test(this.loader.getAllResponseHeaders())){var b=this.loader.getResponseHeader("age");h=b?parseFloat(b):null}return h},M}();J.default=Z}}).default})},vHTk:function(It,At,re){It.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(It,At,re){"use strict";re.d(At,"a",function(){return ut});var ve=re("rePB"),J=re("VTBJ"),U=re("KQm4"),X=re("U8pU"),F=re("ODXe"),R=re("q1tI"),Z=re("TSYQ"),M=re.n(Z),N=re("Gytx"),O=re.n(N),h=re("Kwbf"),b=re("t23M"),A=re("qx4F"),a=re("6eGT"),r=re("IBYe"),n=re("Ff2n"),e=re("c+Xe"),t=re("fyJ8"),i=re("biw7");function s(Me,Ye,tt,at,ze){var qe=tt[Me]||{},Oe=tt[Ye]||{},be,_e;qe.fixed==="left"?be=at.left[Me]:Oe.fixed==="right"&&(_e=at.right[Ye]);var se=!1,le=!1,me=!1,we=!1,We=tt[Ye+1],$e=tt[Me-1];if(ze==="rtl"){if(be!==void 0){var pt=$e&&$e.fixed==="left";we=!pt}else if(_e!==void 0){var Bt=We&&We.fixed==="right";me=!Bt}}else if(be!==void 0){var Rt=We&&We.fixed==="left";se=!Rt}else if(_e!==void 0){var Ct=$e&&$e.fixed==="right";le=!Ct}return{fixLeft:be,fixRight:_e,lastFixLeft:se,firstFixRight:le,lastFixRight:me,firstFixLeft:we,isSticky:at.isSticky}}var I=re("sR1s");function C(Me){var Ye=Me.cells,tt=Me.stickyOffsets,at=Me.flattenColumns,ze=Me.rowComponent,qe=Me.cellComponent,Oe=Me.onHeaderRow,be=Me.index,_e=R.useContext(i.a),se=_e.prefixCls,le=_e.direction,me;Oe&&(me=Oe(Ye.map(function(We){return We.column}),be));var we=Object(I.a)(Ye.map(function(We){return We.column}));return R.createElement(ze,Object.assign({},me),Ye.map(function(We,$e){var pt=We.column,Bt=s(We.colStart,We.colEnd,at,tt,le),Rt;return pt&&pt.onHeaderCell&&(Rt=We.column.onHeaderCell(pt)),R.createElement(t.a,Object.assign({},We,{ellipsis:pt.ellipsis,align:pt.align,component:qe,prefixCls:se,key:we[$e]},Bt,{additionalProps:Rt,rowType:"header"}))}))}C.displayName="HeaderRow";var _=C;function x(Me){var Ye=[];function tt(Oe,be){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ye[_e]=Ye[_e]||[];var se=be,le=Oe.filter(Boolean).map(function(me){var we={key:me.key,className:me.className||"",children:me.title,column:me,colStart:se},We=1,$e=me.children;return $e&&$e.length>0&&(We=tt($e,se,_e+1).reduce(function(pt,Bt){return pt+Bt},0),we.hasSubColumns=!0),"colSpan"in me&&(We=me.colSpan),"rowSpan"in me&&(we.rowSpan=me.rowSpan),we.colSpan=We,we.colEnd=we.colStart+We-1,Ye[_e].push(we),se+=We,We});return le}tt(Me,0);for(var at=Ye.length,ze=function(be){Ye[be].forEach(function(_e){!("rowSpan"in _e)&&!_e.hasSubColumns&&(_e.rowSpan=at-be)})},qe=0;qe<at;qe+=1)ze(qe);return Ye}function T(Me){var Ye=Me.stickyOffsets,tt=Me.columns,at=Me.flattenColumns,ze=Me.onHeaderRow,qe=R.useContext(i.a),Oe=qe.prefixCls,be=qe.getComponent,_e=R.useMemo(function(){return x(tt)},[tt]),se=be(["header","wrapper"],"thead"),le=be(["header","row"],"tr"),me=be(["header","cell"],"th");return R.createElement(se,{className:"".concat(Oe,"-thead")},_e.map(function(we,We){var $e=R.createElement(_,{key:We,flattenColumns:at,cells:we,stickyOffsets:Ye,rowComponent:le,cellComponent:me,onHeaderRow:ze,index:We});return $e}))}var d=T,u=re("hW8S");function o(Me){for(var Ye=Me.colWidths,tt=Me.columns,at=Me.columCount,ze=[],qe=at||tt.length,Oe=!1,be=qe-1;be>=0;be-=1){var _e=Ye[be],se=tt&&tt[be],le=se&&se[u.a];(_e||le||Oe)&&(ze.unshift(R.createElement("col",Object.assign({key:be,style:{width:_e,minWidth:_e}},le))),Oe=!0)}return R.createElement("colgroup",null,ze)}var l=o;function m(Me,Ye){return Object(R.useMemo)(function(){for(var tt=[],at=0;at<Ye;at+=1){var ze=Me[at];if(ze!==void 0)tt[at]=ze;else return null}return tt},[Me.join("_"),Ye])}var g=R.forwardRef(function(Me,Ye){var tt=Me.noData,at=Me.columns,ze=Me.flattenColumns,qe=Me.colWidths,Oe=Me.columCount,be=Me.stickyOffsets,_e=Me.direction,se=Me.fixHeader,le=Me.offsetHeader,me=Me.stickyClassName,we=Me.onScroll,We=Object(n.a)(Me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),$e=R.useContext(i.a),pt=$e.prefixCls,Bt=$e.scrollbarSize,Rt=$e.isSticky,Ct=Rt&&!se?0:Bt,tr=R.useRef(null),zt=R.useCallback(function(rr){Object(e.b)(Ye,rr),Object(e.b)(tr,rr)},[]);R.useEffect(function(){var rr;function cr(ot){var Kt=ot.currentTarget,nr=ot.deltaX;nr&&(we({currentTarget:Kt,scrollLeft:Kt.scrollLeft+nr}),ot.preventDefault())}return(rr=tr.current)===null||rr===void 0||rr.addEventListener("wheel",cr),function(){var ot;(ot=tr.current)===null||ot===void 0||ot.removeEventListener("wheel",cr)}},[]);var ft=ze[ze.length-1],Pt={fixed:ft?ft.fixed:null,onHeaderCell:function(){return{className:"".concat(pt,"-cell-scrollbar")}}},Yt=Object(R.useMemo)(function(){return Ct?[].concat(Object(U.a)(at),[Pt]):at},[Ct,at]),Lt=Object(R.useMemo)(function(){return Ct?[].concat(Object(U.a)(ze),[Pt]):ze},[Ct,ze]),ir=Object(R.useMemo)(function(){var rr=be.right,cr=be.left;return Object(J.a)(Object(J.a)({},be),{},{left:_e==="rtl"?[].concat(Object(U.a)(cr.map(function(ot){return ot+Ct})),[0]):cr,right:_e==="rtl"?rr:[].concat(Object(U.a)(rr.map(function(ot){return ot+Ct})),[0]),isSticky:Rt})},[Ct,be,Rt]),Vt=m(qe,Oe);return R.createElement("div",{style:Object(J.a)({overflow:"hidden"},Rt?{top:le}:{}),ref:zt,className:M()("".concat(pt,"-header"),Object(ve.a)({},me,!!me))},R.createElement("table",{style:{tableLayout:"fixed",visibility:tt||Vt?null:"hidden"}},R.createElement(l,{colWidths:Vt?[].concat(Object(U.a)(Vt),[Ct]):[],columCount:Oe+1,columns:Lt}),R.createElement(d,Object.assign({},We,{stickyOffsets:ir,columns:Yt,flattenColumns:Lt}))))});g.displayName="FixedHeader";var E=g,L=R.createContext(null),P=L;function j(Me){var Ye=Me.prefixCls,tt=Me.children,at=Me.component,ze=Me.cellComponent,qe=Me.fixHeader,Oe=Me.fixColumn,be=Me.horizonScroll,_e=Me.className,se=Me.expanded,le=Me.componentWidth,me=Me.colSpan,we=R.useContext(i.a),We=we.scrollbarSize;return R.useMemo(function(){var $e=tt;return Oe&&($e=R.createElement("div",{style:{width:le-(qe?We:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ye,"-expanded-row-fixed")},$e)),R.createElement(at,{className:_e,style:{display:se?null:"none"}},R.createElement(t.a,{component:ze,prefixCls:Ye,colSpan:me},$e))},[tt,at,qe,be,_e,se,le,me,We])}var z=j;function ee(Me){var Ye=Me.className,tt=Me.style,at=Me.record,ze=Me.index,qe=Me.rowKey,Oe=Me.getRowKey,be=Me.rowExpandable,_e=Me.expandedKeys,se=Me.onRow,le=Me.indent,me=le===void 0?0:le,we=Me.rowComponent,We=Me.cellComponent,$e=Me.childrenColumnName,pt=R.useContext(i.a),Bt=pt.prefixCls,Rt=pt.fixedInfoList,Ct=R.useContext(P),tr=Ct.fixHeader,zt=Ct.fixColumn,ft=Ct.horizonScroll,Pt=Ct.componentWidth,Yt=Ct.flattenColumns,Lt=Ct.expandableType,ir=Ct.expandRowByClick,Vt=Ct.onTriggerExpand,rr=Ct.rowClassName,cr=Ct.expandedRowClassName,ot=Ct.indentSize,Kt=Ct.expandIcon,nr=Ct.expandedRowRender,Jt=Ct.expandIconColumnIndex,or=R.useState(!1),jr=Object(F.a)(or,2),un=jr[0],Zr=jr[1],kr=_e&&_e.has(Me.recordKey);R.useEffect(function(){kr&&Zr(!0)},[kr]);var Pr=Lt==="row"&&(!be||be(at)),qr=Lt==="nest",Wr=$e&&at&&at[$e],cn=Pr||qr,Gr;se&&(Gr=se(at,ze));var gn=function(f){if(ir&&cn&&Vt(at,f),Gr&&Gr.onClick){for(var v,k=arguments.length,$=new Array(k>1?k-1:0),K=1;K<k;K++)$[K-1]=arguments[K];(v=Gr).onClick.apply(v,[f].concat($))}},Mr;typeof rr=="string"?Mr=rr:typeof rr=="function"&&(Mr=rr(at,ze,me));var Ae=Object(I.a)(Yt),ue=R.createElement(we,Object.assign({},Gr,{"data-row-key":qe,className:M()(Ye,"".concat(Bt,"-row"),"".concat(Bt,"-row-level-").concat(me),Mr,Gr&&Gr.className),style:Object(J.a)(Object(J.a)({},tt),Gr?Gr.style:null),onClick:gn}),Yt.map(function(H,f){var v=H.render,k=H.dataIndex,$=H.className,K=Ae[f],Te=Rt[f],Ze;f===(Jt||0)&&qr&&(Ze=R.createElement(R.Fragment,null,R.createElement("span",{style:{paddingLeft:"".concat(ot*me,"px")},className:"".concat(Bt,"-row-indent indent-level-").concat(me)}),Kt({prefixCls:Bt,expanded:kr,expandable:Wr,record:at,onExpand:Vt})));var yt;return H.onCell&&(yt=H.onCell(at,ze)),R.createElement(t.a,Object.assign({className:$,ellipsis:H.ellipsis,align:H.align,component:We,prefixCls:Bt,key:K,record:at,index:ze,dataIndex:k,render:v,shouldCellUpdate:H.shouldCellUpdate},Te,{appendNode:Ze,additionalProps:yt}))})),Ee;if(Pr&&(un||kr)){var ke=nr(at,ze,me+1,kr),nt=cr&&cr(at,ze,me);Ee=R.createElement(z,{expanded:kr,className:M()("".concat(Bt,"-expanded-row"),"".concat(Bt,"-expanded-row-level-").concat(me+1),nt),prefixCls:Bt,fixHeader:tr,fixColumn:zt,horizonScroll:ft,component:we,componentWidth:Pt,cellComponent:We,colSpan:Yt.length},ke)}var ht;return Wr&&kr&&(ht=(at[$e]||[]).map(function(H,f){var v=Oe(H,f);return R.createElement(ee,Object.assign({},Me,{key:v,rowKey:v,record:H,recordKey:v,index:f,indent:me+1}))})),R.createElement(R.Fragment,null,ue,Ee,ht)}ee.displayName="BodyRow";var Q=ee,q=R.createContext(null),ae=q;function ge(Me){var Ye=Me.columnKey,tt=Me.onColumnResize,at=R.useRef();return R.useEffect(function(){at.current&&tt(Ye,at.current.offsetWidth)},[]),R.createElement(b.a,{onResize:function(qe){var Oe=qe.offsetWidth;tt(Ye,Oe)}},R.createElement("td",{ref:at,style:{padding:0,border:0,height:0}},R.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function pe(Me){var Ye=Me.data,tt=Me.getRowKey,at=Me.measureColumnWidth,ze=Me.expandedKeys,qe=Me.onRow,Oe=Me.rowExpandable,be=Me.emptyNode,_e=Me.childrenColumnName,se=R.useContext(ae),le=se.onColumnResize,me=R.useContext(i.a),we=me.prefixCls,We=me.getComponent,$e=R.useContext(P),pt=$e.fixHeader,Bt=$e.horizonScroll,Rt=$e.flattenColumns,Ct=$e.componentWidth;return R.useMemo(function(){var tr=We(["body","wrapper"],"tbody"),zt=We(["body","row"],"tr"),ft=We(["body","cell"],"td"),Pt;Ye.length?Pt=Ye.map(function(Lt,ir){var Vt=tt(Lt,ir);return R.createElement(Q,{key:Vt,rowKey:Vt,record:Lt,recordKey:Vt,index:ir,rowComponent:zt,cellComponent:ft,expandedKeys:ze,onRow:qe,getRowKey:tt,rowExpandable:Oe,childrenColumnName:_e})}):Pt=R.createElement(z,{expanded:!0,className:"".concat(we,"-placeholder"),prefixCls:we,fixHeader:pt,fixColumn:Bt,horizonScroll:Bt,component:zt,componentWidth:Ct,cellComponent:ft,colSpan:Rt.length},be);var Yt=Object(I.a)(Rt);return R.createElement(tr,{className:"".concat(we,"-tbody")},at&&R.createElement("tr",{"aria-hidden":"true",className:"".concat(we,"-measure-row"),style:{height:0}},Yt.map(function(Lt){return R.createElement(ge,{key:Lt,columnKey:Lt,onColumnResize:le})})),Pt)},[Ye,we,qe,at,ze,tt,We,Ct,be,Rt])}var Ne=R.memo(pe);Ne.displayName="Body";var Fe=Ne,He=re("wRmb"),Ke=re("xEkU"),Xe=re.n(Ke);function Ce(Me){var Ye=Object(R.useRef)(Me),tt=Object(R.useState)({}),at=Object(F.a)(tt,2),ze=at[1],qe=Object(R.useRef)(null),Oe=Object(R.useRef)([]);function be(_e){qe.current===null&&(Oe.current=[],qe.current=Xe()(function(){Oe.current.forEach(function(se){Ye.current=se(Ye.current)}),qe.current=null,ze({})})),Oe.current.push(_e)}return Object(R.useEffect)(function(){return function(){Xe.a.cancel(qe.current)}},[]),[Ye.current,be]}function ye(Me){var Ye=Object(R.useRef)(Me),tt=Object(R.useRef)(null);function at(){window.clearTimeout(tt.current)}function ze(Oe){Ye.current=Oe,at(),tt.current=window.setTimeout(function(){Ye.current=null,tt.current=null},100)}function qe(){return Ye.current}return Object(R.useEffect)(function(){return at},[]),[ze,qe]}function Pe(Me,Ye,tt){var at=Object(R.useMemo)(function(){for(var ze=[],qe=[],Oe=0,be=0,_e=0;_e<Ye;_e+=1)if(tt==="rtl"){qe[_e]=be,be+=Me[_e]||0;var se=Ye-_e-1;ze[se]=Oe,Oe+=Me[se]||0}else{ze[_e]=Oe,Oe+=Me[_e]||0;var le=Ye-_e-1;qe[le]=be,be+=Me[le]||0}return{left:ze,right:qe}},[Me,Ye,tt]);return at}var Et=Pe;function mt(Me){var Ye=Me.className,tt=Me.children;return R.createElement("div",{className:Ye},tt)}var gt=mt,bt=re("n6Qo");function oe(Me){var Ye,tt=Me.prefixCls,at=Me.record,ze=Me.onExpand,qe=Me.expanded,Oe=Me.expandable,be="".concat(tt,"-row-expand-icon");if(!Oe)return R.createElement("span",{className:M()(be,"".concat(tt,"-row-spaced"))});var _e=function(le){ze(at,le),le.stopPropagation()};return R.createElement("span",{className:M()(be,(Ye={},Object(ve.a)(Ye,"".concat(tt,"-row-expanded"),qe),Object(ve.a)(Ye,"".concat(tt,"-row-collapsed"),!qe),Ye)),onClick:_e})}function V(Me,Ye,tt){var at=[];function ze(qe){(qe||[]).forEach(function(Oe,be){at.push(Ye(Oe,be)),ze(Oe[tt])})}return ze(Me),at}var Y=re("zT1h"),he=re("y0+3"),Se=function(Ye,tt){var at,ze,qe=Ye.scrollBodyRef,Oe=Ye.onScroll,be=Ye.offsetScroll,_e=R.useContext(i.a),se=_e.prefixCls,le=((at=qe.current)===null||at===void 0?void 0:at.scrollWidth)||0,me=((ze=qe.current)===null||ze===void 0?void 0:ze.clientWidth)||0,we=le&&me*(me/le),We=R.useRef(),$e=Ce({scrollLeft:0,isHiddenScrollBar:!1}),pt=Object(F.a)($e,2),Bt=pt[0],Rt=pt[1],Ct=R.useRef({delta:0,x:0}),tr=R.useState(!1),zt=Object(F.a)(tr,2),ft=zt[0],Pt=zt[1],Yt=function(){Pt(!1)},Lt=function(ot){ot.persist(),Ct.current.delta=ot.pageX-Bt.scrollLeft,Ct.current.x=0,Pt(!0),ot.preventDefault()},ir=function(ot){var Kt,nr=ot||((Kt=window)===null||Kt===void 0?void 0:Kt.event),Jt=nr.buttons;if(!ft||Jt===0){ft&&Pt(!1);return}var or=Ct.current.x+ot.pageX-Ct.current.x-Ct.current.delta;or<=0&&(or=0),or+we>=me&&(or=me-we),Oe({scrollLeft:or/me*(le+2)}),Ct.current.x=ot.pageX},Vt=function(){var ot=Object(he.b)(qe.current).top,Kt=ot+qe.current.offsetHeight,nr=document.documentElement.scrollTop+window.innerHeight;Kt-Object(A.a)()<=nr||ot>=nr-be?Rt(function(Jt){return Object(J.a)(Object(J.a)({},Jt),{},{isHiddenScrollBar:!0})}):Rt(function(Jt){return Object(J.a)(Object(J.a)({},Jt),{},{isHiddenScrollBar:!1})})},rr=function(ot){Rt(function(Kt){return Object(J.a)(Object(J.a)({},Kt),{},{scrollLeft:ot/le*me||0})})};return R.useImperativeHandle(tt,function(){return{setScrollLeft:rr}}),R.useEffect(function(){var cr=Object(Y.a)(document.body,"mouseup",Yt,!1),ot=Object(Y.a)(document.body,"mousemove",ir,!1);return Vt(),function(){cr.remove(),ot.remove()}},[we,ft]),R.useEffect(function(){var cr=Object(Y.a)(window,"scroll",Vt,!1),ot=Object(Y.a)(window,"resize",Vt,!1);return function(){cr.remove(),ot.remove()}},[]),R.useEffect(function(){Bt.isHiddenScrollBar||Rt(function(cr){var ot,Kt;return Object(J.a)(Object(J.a)({},cr),{},{scrollLeft:qe.current.scrollLeft/((ot=qe.current)===null||ot===void 0?void 0:ot.scrollWidth)*((Kt=qe.current)===null||Kt===void 0?void 0:Kt.clientWidth)})})},[Bt.isHiddenScrollBar]),le<=me||!we||Bt.isHiddenScrollBar?null:R.createElement("div",{style:{height:Object(A.a)(),width:me,bottom:be},className:"".concat(se,"-sticky-scroll")},R.createElement("div",{onMouseDown:Lt,ref:We,className:M()("".concat(se,"-sticky-scroll-bar"),Object(ve.a)({},"".concat(se,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(we,"px"),transform:"translate3d(".concat(Bt.scrollLeft,"px, 0, 0)")}}))},Ue=R.forwardRef(Se);function Ie(Me,Ye){return R.useMemo(function(){var tt=!!Me;return{isSticky:tt,stickyClassName:tt?"".concat(Ye,"-sticky-header"):"",offsetHeader:Object(X.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(X.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Ye])}var st=[],it={},ut="rc-table-internal-hook",dt=R.memo(function(Me){var Ye=Me.children;return Ye},function(Me,Ye){return O()(Me.props,Ye.props)?Me.pingLeft!==Ye.pingLeft||Me.pingRight!==Ye.pingRight:!1});function vt(Me){var Ye,tt=Me.prefixCls,at=Me.className,ze=Me.rowClassName,qe=Me.style,Oe=Me.data,be=Me.rowKey,_e=Me.scroll,se=Me.tableLayout,le=Me.direction,me=Me.title,we=Me.footer,We=Me.summary,$e=Me.id,pt=Me.showHeader,Bt=Me.components,Rt=Me.emptyText,Ct=Me.onRow,tr=Me.onHeaderRow,zt=Me.internalHooks,ft=Me.transformColumns,Pt=Me.internalRefs,Yt=Me.sticky,Lt=Oe||st,ir=!!Lt.length,Vt=R.useState(0),rr=Object(F.a)(Vt,2),cr=rr[0],ot=rr[1];R.useEffect(function(){ot(Object(A.a)())});var Kt=R.useMemo(function(){return Object(I.c)(Bt,{})},[Bt]),nr=R.useCallback(function(Er,vr){return Object(I.b)(Kt,Er)||vr},[Kt]),Jt=R.useMemo(function(){return typeof be=="function"?be:function(Er){var vr=Er&&Er[be];return vr}},[be]),or=Object(u.c)(Me),jr=or.expandIcon,un=or.expandedRowKeys,Zr=or.defaultExpandedRowKeys,kr=or.defaultExpandAllRows,Pr=or.expandedRowRender,qr=or.onExpand,Wr=or.onExpandedRowsChange,cn=or.expandRowByClick,Gr=or.rowExpandable,gn=or.expandIconColumnIndex,Mr=or.expandedRowClassName,Ae=or.childrenColumnName,ue=or.indentSize,Ee=jr||oe,ke=Ae||"children",nt=R.useMemo(function(){return Pr?"row":Me.expandable&&zt===ut&&Me.expandable.__PARENT_RENDER_ICON__||Lt.some(function(Er){return Er&&Object(X.a)(Er)==="object"&&Er[ke]})?"nest":!1},[!!Pr,Lt]),ht=R.useState(function(){return Zr||(kr?V(Lt,Jt,ke):[])}),H=Object(F.a)(ht,2),f=H[0],v=H[1],k=R.useMemo(function(){return new Set(un||f||[])},[un,f]),$=R.useCallback(function(Er){var vr=Jt(Er,Lt.indexOf(Er)),an,vn=k.has(vr);vn?(k.delete(vr),an=Object(U.a)(k)):an=[].concat(Object(U.a)(k),[vr]),v(an),qr&&qr(!vn,Er),Wr&&Wr(an)},[Jt,k,Lt,qr,Wr]),K=R.useState(0),Te=Object(F.a)(K,2),Ze=Te[0],yt=Te[1],_t=Object(He.b)(Object(J.a)(Object(J.a)(Object(J.a)({},Me),or),{},{expandable:!!Pr,expandedKeys:k,getRowKey:Jt,onTriggerExpand:$,expandIcon:Ee,expandIconColumnIndex:gn,direction:le}),zt===ut?ft:null),rt=Object(F.a)(_t,2),Nt=rt[0],Ot=rt[1],Mt=R.useMemo(function(){return{columns:Nt,flattenColumns:Ot}},[Nt,Ot]),qt=R.useRef(),br=R.useRef(),sr=R.useRef(),hr=R.useState(!1),$t=Object(F.a)(hr,2),Ur=$t[0],Cr=$t[1],fr=R.useState(!1),Fr=Object(F.a)(fr,2),Xr=Fr[0],Yr=Fr[1],Nr=Ce(new Map),Tr=Object(F.a)(Nr,2),Hr=Tr[0],Vr=Tr[1],zr=Object(I.a)(Ot),nn=zr.map(function(Er){return Hr.get(Er)}),en=R.useMemo(function(){return nn},[nn.join("_")]),xr=Et(en,Ot.length,le),ar=_e&&Object(I.d)(_e.y),er=_e&&Object(I.d)(_e.x),mr=er&&Ot.some(function(Er){var vr=Er.fixed;return vr}),ur=R.useRef(),Qr=Ie(Yt,tt),yr=Qr.isSticky,Rn=Qr.offsetHeader,Jr=Qr.offsetScroll,xn=Qr.stickyClassName,Dn,Pn,Kr;ar&&(Pn={overflowY:"scroll",maxHeight:_e.y}),er&&(Dn={overflowX:"auto"},ar||(Pn={overflowY:"hidden"}),Kr={width:_e.x===!0?"auto":_e.x,minWidth:"100%"});var Zi=R.useCallback(function(Er,vr){Vr(function(an){var vn=new Map(an);return vn.set(Er,vr),vn})},[]),jn=ye(null),qi=Object(F.a)(jn,2),ea=qi[0],oi=qi[1];function wi(Er,vr){if(!vr)return;typeof vr=="function"?vr(Er):vr.scrollLeft!==Er&&(vr.scrollLeft=Er)}var Sn=function(vr){var an=vr.currentTarget,vn=vr.scrollLeft,ei=typeof vn=="number"?vn:an.scrollLeft,aa=an||it;if(!oi()||oi()===aa){var Oi;ea(aa),wi(ei,br.current),wi(ei,sr.current),wi(ei,(Oi=ur.current)===null||Oi===void 0?void 0:Oi.setScrollLeft)}if(an){var Na=an.scrollWidth,Pa=an.clientWidth;Cr(ei>0),Yr(ei<Na-Pa)}},Tn=function(){sr.current&&Sn({currentTarget:sr.current})},ta=function(vr){var an=vr.width;Tn(),yt(qt.current?qt.current.offsetWidth:an)};R.useEffect(function(){return Tn},[]),R.useEffect(function(){er&&Tn()},[er]),R.useEffect(function(){zt===ut&&Pt&&(Pt.body.current=sr.current)});var Ci=nr(["table"],"table"),mn=R.useMemo(function(){return se||(mr?_e.x==="max-content"?"auto":"fixed":ar||Ot.some(function(Er){var vr=Er.ellipsis;return vr})?"fixed":"auto")},[ar,mr,Ot,se]),Mn,qn={colWidths:en,columCount:Ot.length,stickyOffsets:xr,onHeaderRow:tr,fixHeader:ar},ra=R.useMemo(function(){return ir?null:typeof Rt=="function"?Rt():Rt},[ir,Rt]),na=R.createElement(Fe,{data:Lt,measureColumnWidth:ar||er||yr,expandedKeys:k,rowExpandable:Gr,getRowKey:Jt,onRow:Ct,emptyNode:ra,childrenColumnName:ke}),Wn=R.createElement(l,{colWidths:Ot.map(function(Er){var vr=Er.width;return vr}),columns:Ot}),Gn=We&&R.createElement(bt.b,null,We(Lt)),ia=nr(["body"]);if(ar||yr){var Ti;typeof ia=="function"?(Ti=ia(Lt,{scrollbarSize:cr,ref:sr,onScroll:Sn}),qn.colWidths=Ot.map(function(Er,vr){var an=Er.width,vn=vr===Nt.length-1?an-cr:an;return typeof vn=="number"&&!Number.isNaN(vn)?vn:(Object(h.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ti=R.createElement("div",{style:Object(J.a)(Object(J.a)({},Dn),Pn),onScroll:Sn,ref:sr,className:M()("".concat(tt,"-body"))},R.createElement(Ci,{style:Object(J.a)(Object(J.a)({},Kr),{},{tableLayout:mn})},Wn,na,Gn),yr&&R.createElement(Ue,{ref:ur,offsetScroll:Jr,scrollBodyRef:sr,onScroll:Sn})),Mn=R.createElement(R.Fragment,null,pt!==!1&&R.createElement(E,Object.assign({noData:!Lt.length},qn,Mt,{direction:le,offsetHeader:Rn,stickyClassName:xn,ref:br,onScroll:Sn})),Ti)}else Mn=R.createElement("div",{style:Object(J.a)(Object(J.a)({},Dn),Pn),className:M()("".concat(tt,"-content")),onScroll:Sn,ref:sr},R.createElement(Ci,{style:Object(J.a)(Object(J.a)({},Kr),{},{tableLayout:mn})},Wn,pt!==!1&&R.createElement(d,Object.assign({},qn,Mt)),na,Gn));var Fa=Object(u.b)(Me),Bi=R.createElement("div",Object.assign({className:M()(tt,at,(Ye={},Object(ve.a)(Ye,"".concat(tt,"-rtl"),le==="rtl"),Object(ve.a)(Ye,"".concat(tt,"-ping-left"),Ur),Object(ve.a)(Ye,"".concat(tt,"-ping-right"),Xr),Object(ve.a)(Ye,"".concat(tt,"-layout-fixed"),se==="fixed"),Object(ve.a)(Ye,"".concat(tt,"-fixed-header"),ar),Object(ve.a)(Ye,"".concat(tt,"-fixed-column"),mr),Object(ve.a)(Ye,"".concat(tt,"-scroll-horizontal"),er),Object(ve.a)(Ye,"".concat(tt,"-has-fix-left"),Ot[0]&&Ot[0].fixed),Object(ve.a)(Ye,"".concat(tt,"-has-fix-right"),Ot[Ot.length-1]&&Ot[Ot.length-1].fixed==="right"),Ye)),style:qe,id:$e,ref:qt},Fa),R.createElement(dt,{pingLeft:Ur,pingRight:Xr,props:Object(J.a)(Object(J.a)({},Me),{},{stickyOffsets:xr,mergedExpandedKeys:k})},me&&R.createElement(gt,{className:"".concat(tt,"-title")},me(Lt)),R.createElement("div",{className:"".concat(tt,"-container")},Mn),we&&R.createElement(gt,{className:"".concat(tt,"-footer")},we(Lt))));er&&(Bi=R.createElement(b.a,{onResize:ta},Bi));var xi=R.useMemo(function(){return{prefixCls:tt,getComponent:nr,scrollbarSize:cr,direction:le,fixedInfoList:Ot.map(function(Er,vr){return s(vr,vr,Ot,xr,le)}),isSticky:yr}},[tt,nr,cr,le,Ot,xr,le,yr]),Si=R.useMemo(function(){return Object(J.a)(Object(J.a)({},Mt),{},{tableLayout:mn,rowClassName:ze,expandedRowClassName:Mr,componentWidth:Ze,fixHeader:ar,fixColumn:mr,horizonScroll:er,expandIcon:Ee,expandableType:nt,expandRowByClick:cn,expandedRowRender:Pr,onTriggerExpand:$,expandIconColumnIndex:gn,indentSize:ue})},[Mt,mn,ze,Mr,Ze,ar,mr,er,Ee,nt,cn,Pr,$,gn,ue]),Ii=R.useMemo(function(){return{onColumnResize:Zi}},[Zi]);return R.createElement(i.a.Provider,{value:xi},R.createElement(P.Provider,{value:Si},R.createElement(ae.Provider,{value:Ii},Bi)))}vt.Column=r.a,vt.ColumnGroup=a.a,vt.Summary=bt.a,vt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var Tt=At.b=vt},wOnQ:function(It,At,re){/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*/(function(ve,J){It.exports=J()})(this,function(){"use strict";/*! *****************************************************************************
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 ve=function(y,c){return ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,B){S.__proto__=B}||function(S,B){for(var W in B)Object.prototype.hasOwnProperty.call(B,W)&&(S[W]=B[W])},ve(y,c)};function J(y,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");ve(y,c);function S(){this.constructor=y}y.prototype=c===null?Object.create(c):(S.prototype=c.prototype,new S)}var U=function(){return U=Object.assign||function(c){for(var S,B=1,W=arguments.length;B<W;B++){S=arguments[B];for(var te in S)Object.prototype.hasOwnProperty.call(S,te)&&(c[te]=S[te])}return c},U.apply(this,arguments)};function X(y,c,S,B){function W(te){return te instanceof S?te:new S(function(fe){fe(te)})}return new(S||(S=Promise))(function(te,fe){function xe(Je){try{Ve(B.next(Je))}catch(lt){fe(lt)}}function Be(Je){try{Ve(B.throw(Je))}catch(lt){fe(lt)}}function Ve(Je){Je.done?te(Je.value):W(Je.value).then(xe,Be)}Ve((B=B.apply(y,c||[])).next())})}function F(y,c){var S={label:0,sent:function(){if(te[0]&1)throw te[1];return te[1]},trys:[],ops:[]},B,W,te,fe;return fe={next:xe(0),throw:xe(1),return:xe(2)},typeof Symbol=="function"&&(fe[Symbol.iterator]=function(){return this}),fe;function xe(Ve){return function(Je){return Be([Ve,Je])}}function Be(Ve){if(B)throw new TypeError("Generator is already executing.");for(;S;)try{if(B=1,W&&(te=Ve[0]&2?W.return:Ve[0]?W.throw||((te=W.return)&&te.call(W),0):W.next)&&!(te=te.call(W,Ve[1])).done)return te;(W=0,te)&&(Ve=[Ve[0]&2,te.value]);switch(Ve[0]){case 0:case 1:te=Ve;break;case 4:return S.label++,{value:Ve[1],done:!1};case 5:S.label++,W=Ve[1],Ve=[0];continue;case 7:Ve=S.ops.pop(),S.trys.pop();continue;default:if(!(te=S.trys,te=te.length>0&&te[te.length-1])&&(Ve[0]===6||Ve[0]===2)){S=0;continue}if(Ve[0]===3&&(!te||Ve[1]>te[0]&&Ve[1]<te[3])){S.label=Ve[1];break}if(Ve[0]===6&&S.label<te[1]){S.label=te[1],te=Ve;break}if(te&&S.label<te[2]){S.label=te[2],S.ops.push(Ve);break}te[2]&&S.ops.pop(),S.trys.pop();continue}Ve=c.call(y,S)}catch(Je){Ve=[6,Je],W=0}finally{B=te=0}if(Ve[0]&5)throw Ve[1];return{value:Ve[0]?Ve[1]:void 0,done:!0}}}function R(y,c,S){if(S||arguments.length===2)for(var B=0,W=c.length,te;B<W;B++)(te||!(B in c))&&(te||(te=Array.prototype.slice.call(c,0,B)),te[B]=c[B]);return y.concat(te||c)}for(var Z=function(){function y(c,S,B,W){this.left=c,this.top=S,this.width=B,this.height=W}return y.prototype.add=function(c,S,B,W){return new y(this.left+c,this.top+S,this.width+B,this.height+W)},y.fromClientRect=function(c,S){return new y(S.left+c.windowBounds.left,S.top+c.windowBounds.top,S.width,S.height)},y.fromDOMRectList=function(c,S){var B=Array.from(S).find(function(W){return W.width!==0});return B?new y(B.left+c.windowBounds.left,B.top+c.windowBounds.top,B.width,B.height):y.EMPTY},y.EMPTY=new y(0,0,0,0),y}(),M=function(y,c){return Z.fromClientRect(y,c.getBoundingClientRect())},N=function(y){var c=y.body,S=y.documentElement;if(!c||!S)throw new Error("Unable to get document size");var B=Math.max(Math.max(c.scrollWidth,S.scrollWidth),Math.max(c.offsetWidth,S.offsetWidth),Math.max(c.clientWidth,S.clientWidth)),W=Math.max(Math.max(c.scrollHeight,S.scrollHeight),Math.max(c.offsetHeight,S.offsetHeight),Math.max(c.clientHeight,S.clientHeight));return new Z(0,0,B,W)},O=function(y){for(var c=[],S=0,B=y.length;S<B;){var W=y.charCodeAt(S++);if(W>=55296&&W<=56319&&S<B){var te=y.charCodeAt(S++);(te&64512)===56320?c.push(((W&1023)<<10)+(te&1023)+65536):(c.push(W),S--)}else c.push(W)}return c},h=function(){for(var y=[],c=0;c<arguments.length;c++)y[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,y);var S=y.length;if(!S)return"";for(var B=[],W=-1,te="";++W<S;){var fe=y[W];fe<=65535?B.push(fe):(fe-=65536,B.push((fe>>10)+55296,fe%1024+56320)),(W+1===S||B.length>16384)&&(te+=String.fromCharCode.apply(String,B),B.length=0)}return te},b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a<b.length;a++)A[b.charCodeAt(a)]=a;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),e=0;e<r.length;e++)n[r.charCodeAt(e)]=e;for(var t=function(y){var c=y.length*.75,S=y.length,B,W=0,te,fe,xe,Be;y[y.length-1]==="="&&(c--,y[y.length-2]==="="&&c--);var Ve=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),Je=Array.isArray(Ve)?Ve:new Uint8Array(Ve);for(B=0;B<S;B+=4)te=n[y.charCodeAt(B)],fe=n[y.charCodeAt(B+1)],xe=n[y.charCodeAt(B+2)],Be=n[y.charCodeAt(B+3)],Je[W++]=te<<2|fe>>4,Je[W++]=(fe&15)<<4|xe>>2,Je[W++]=(xe&3)<<6|Be&63;return Ve},i=function(y){for(var c=y.length,S=[],B=0;B<c;B+=2)S.push(y[B+1]<<8|y[B]);return S},s=function(y){for(var c=y.length,S=[],B=0;B<c;B+=4)S.push(y[B+3]<<24|y[B+2]<<16|y[B+1]<<8|y[B]);return S},I=5,C=6+5,_=2,x=C-I,T=65536>>I,d=1<<I,u=d-1,o=1024>>I,l=T+o,m=l,g=2048>>6,E=m+g,L=65536>>C,P=1<<x,j=P-1,z=function(y,c,S){return y.slice?y.slice(c,S):new Uint16Array(Array.prototype.slice.call(y,c,S))},ee=function(y,c,S){return y.slice?y.slice(c,S):new Uint32Array(Array.prototype.slice.call(y,c,S))},Q=function(y,c){var S=t(y),B=Array.isArray(S)?s(S):new Uint32Array(S),W=Array.isArray(S)?i(S):new Uint16Array(S),te=24,fe=z(W,te/2,B[4]/2),xe=B[5]===2?z(W,(te+B[4])/2):ee(B,Math.ceil((te+B[4])/4));return new q(B[0],B[1],B[2],B[3],fe,xe)},q=function(){function y(c,S,B,W,te,fe){this.initialValue=c,this.errorValue=S,this.highStart=B,this.highValueIndex=W,this.index=te,this.data=fe}return y.prototype.get=function(c){var S;if(c>=0){if(c<55296||c>56319&&c<=65535)return S=this.index[c>>I],S=(S<<_)+(c&u),this.data[S];if(c<=65535)return S=this.index[T+(c-55296>>I)],S=(S<<_)+(c&u),this.data[S];if(c<this.highStart)return S=E-L+(c>>C),S=this.index[S],S+=c>>I&j,S=this.index[S],S=(S<<_)+(c&u),this.data[S];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},y}(),ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ge=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),pe=0;pe<ae.length;pe++)ge[ae.charCodeAt(pe)]=pe;var Ne="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Fe=50,He=1,Ke=2,Xe=3,Ce=4,ye=5,Pe=7,Et=8,mt=9,gt=10,bt=11,oe=12,V=13,Y=14,he=15,Se=16,Ue=17,Ie=18,st=19,it=20,ut=21,dt=22,vt=23,Tt=24,Me=25,Ye=26,tt=27,at=28,ze=29,qe=30,Oe=31,be=32,_e=33,se=34,le=35,me=36,we=37,We=38,$e=39,pt=40,Bt=41,Rt=42,Ct=43,tr=[9001,65288],zt="!",ft="\xD7",Pt="\xF7",Yt=Q(Ne),Lt=[qe,me],ir=[He,Ke,Xe,ye],Vt=[gt,Et],rr=[tt,Ye],cr=ir.concat(Vt),ot=[We,$e,pt,se,le],Kt=[he,V],nr=function(y,c){c===void 0&&(c="strict");var S=[],B=[],W=[];return y.forEach(function(te,fe){var xe=Yt.get(te);if(xe>Fe?(W.push(!0),xe-=Fe):W.push(!1),["normal","auto","loose"].indexOf(c)!==-1&&[8208,8211,12316,12448].indexOf(te)!==-1)return B.push(fe),S.push(Se);if(xe===Ce||xe===bt){if(fe===0)return B.push(fe),S.push(qe);var Be=S[fe-1];return cr.indexOf(Be)===-1?(B.push(B[fe-1]),S.push(Be)):(B.push(fe),S.push(qe))}if(B.push(fe),xe===Oe)return S.push(c==="strict"?ut:we);if(xe===Rt)return S.push(qe);if(xe===ze)return S.push(qe);if(xe===Ct)return te>=131072&&te<=196605||te>=196608&&te<=262141?S.push(we):S.push(qe);S.push(xe)}),[B,S,W]},Jt=function(y,c,S,B){var W=B[S];if(Array.isArray(y)?y.indexOf(W)!==-1:y===W)for(var te=S;te<=B.length;){te++;var fe=B[te];if(fe===c)return!0;if(fe!==gt)break}if(W===gt)for(var te=S;te>0;){te--;var xe=B[te];if(Array.isArray(y)?y.indexOf(xe)!==-1:y===xe)for(var Be=S;Be<=B.length;){Be++;var fe=B[Be];if(fe===c)return!0;if(fe!==gt)break}if(xe!==gt)break}return!1},or=function(y,c){for(var S=y;S>=0;){var B=c[S];if(B===gt)S--;else return B}return 0},jr=function(y,c,S,B,W){if(S[B]===0)return ft;var te=B-1;if(Array.isArray(W)&&W[te]===!0)return ft;var fe=te-1,xe=te+1,Be=c[te],Ve=fe>=0?c[fe]:0,Je=c[xe];if(Be===Ke&&Je===Xe)return ft;if(ir.indexOf(Be)!==-1)return zt;if(ir.indexOf(Je)!==-1)return ft;if(Vt.indexOf(Je)!==-1)return ft;if(or(te,c)===Et)return Pt;if(Yt.get(y[te])===bt)return ft;if((Be===be||Be===_e)&&Yt.get(y[xe])===bt)return ft;if(Be===Pe||Je===Pe)return ft;if(Be===mt)return ft;if([gt,V,he].indexOf(Be)===-1&&Je===mt)return ft;if([Ue,Ie,st,Tt,at].indexOf(Je)!==-1)return ft;if(or(te,c)===dt)return ft;if(Jt(vt,dt,te,c))return ft;if(Jt([Ue,Ie],ut,te,c))return ft;if(Jt(oe,oe,te,c))return ft;if(Be===gt)return Pt;if(Be===vt||Je===vt)return ft;if(Je===Se||Be===Se)return Pt;if([V,he,ut].indexOf(Je)!==-1||Be===Y)return ft;if(Ve===me&&Kt.indexOf(Be)!==-1)return ft;if(Be===at&&Je===me)return ft;if(Je===it)return ft;if(Lt.indexOf(Je)!==-1&&Be===Me||Lt.indexOf(Be)!==-1&&Je===Me)return ft;if(Be===tt&&[we,be,_e].indexOf(Je)!==-1||[we,be,_e].indexOf(Be)!==-1&&Je===Ye)return ft;if(Lt.indexOf(Be)!==-1&&rr.indexOf(Je)!==-1||rr.indexOf(Be)!==-1&&Lt.indexOf(Je)!==-1)return ft;if([tt,Ye].indexOf(Be)!==-1&&(Je===Me||[dt,he].indexOf(Je)!==-1&&c[xe+1]===Me)||[dt,he].indexOf(Be)!==-1&&Je===Me||Be===Me&&[Me,at,Tt].indexOf(Je)!==-1)return ft;if([Me,at,Tt,Ue,Ie].indexOf(Je)!==-1)for(var lt=te;lt>=0;){var ct=c[lt];if(ct===Me)return ft;if([at,Tt].indexOf(ct)!==-1)lt--;else break}if([tt,Ye].indexOf(Je)!==-1)for(var lt=[Ue,Ie].indexOf(Be)!==-1?fe:te;lt>=0;){var ct=c[lt];if(ct===Me)return ft;if([at,Tt].indexOf(ct)!==-1)lt--;else break}if(We===Be&&[We,$e,se,le].indexOf(Je)!==-1||[$e,se].indexOf(Be)!==-1&&[$e,pt].indexOf(Je)!==-1||[pt,le].indexOf(Be)!==-1&&Je===pt)return ft;if(ot.indexOf(Be)!==-1&&[it,Ye].indexOf(Je)!==-1||ot.indexOf(Je)!==-1&&Be===tt)return ft;if(Lt.indexOf(Be)!==-1&&Lt.indexOf(Je)!==-1)return ft;if(Be===Tt&&Lt.indexOf(Je)!==-1)return ft;if(Lt.concat(Me).indexOf(Be)!==-1&&Je===dt&&tr.indexOf(y[xe])===-1||Lt.concat(Me).indexOf(Je)!==-1&&Be===Ie)return ft;if(Be===Bt&&Je===Bt){for(var jt=S[te],St=1;jt>0&&(jt--,c[jt]===Bt);)St++;if(St%2!==0)return ft}return Be===be&&Je===_e?ft:Pt},un=function(y,c){c||(c={lineBreak:"normal",wordBreak:"normal"});var S=nr(y,c.lineBreak),B=S[0],W=S[1],te=S[2];(c.wordBreak==="break-all"||c.wordBreak==="break-word")&&(W=W.map(function(xe){return[Me,qe,Rt].indexOf(xe)!==-1?we:xe}));var fe=c.wordBreak==="keep-all"?te.map(function(xe,Be){return xe&&y[Be]>=19968&&y[Be]<=40959}):void 0;return[B,W,fe]},Zr=function(){function y(c,S,B,W){this.codePoints=c,this.required=S===zt,this.start=B,this.end=W}return y.prototype.slice=function(){return h.apply(void 0,this.codePoints.slice(this.start,this.end))},y}(),kr=function(y,c){var S=O(y),B=un(S,c),W=B[0],te=B[1],fe=B[2],xe=S.length,Be=0,Ve=0;return{next:function(){if(Ve>=xe)return{done:!0,value:null};for(var Je=ft;Ve<xe&&(Je=jr(S,te,W,++Ve,fe))===ft;);if(Je!==ft||Ve===xe){var lt=new Zr(S,Je,Be,Ve);return Be=Ve,{value:lt,done:!1}}return{done:!0,value:null}}}},Pr=1<<0,qr=1<<1,Wr=1<<2,cn=1<<3,Gr=10,gn=47,Mr=92,Ae=9,ue=32,Ee=34,ke=61,nt=35,ht=36,H=37,f=39,v=40,k=41,$=95,K=45,Te=33,Ze=60,yt=62,_t=64,rt=91,Nt=93,Ot=61,Mt=123,qt=63,br=125,sr=124,hr=126,$t=128,Ur=65533,Cr=42,fr=43,Fr=44,Xr=58,Yr=59,Nr=46,Tr=0,Hr=8,Vr=11,zr=14,nn=31,en=127,xr=-1,ar=48,er=97,mr=101,ur=102,Qr=117,yr=122,Rn=65,Jr=69,xn=70,Dn=85,Pn=90,Kr=function(y){return y>=ar&&y<=57},Zi=function(y){return y>=55296&&y<=57343},jn=function(y){return Kr(y)||y>=Rn&&y<=xn||y>=er&&y<=ur},qi=function(y){return y>=er&&y<=yr},ea=function(y){return y>=Rn&&y<=Pn},oi=function(y){return qi(y)||ea(y)},wi=function(y){return y>=$t},Sn=function(y){return y===Gr||y===Ae||y===ue},Tn=function(y){return oi(y)||wi(y)||y===$},ta=function(y){return Tn(y)||Kr(y)||y===K},Ci=function(y){return y>=Tr&&y<=Hr||y===Vr||y>=zr&&y<=nn||y===en},mn=function(y,c){return y!==Mr?!1:c!==Gr},Mn=function(y,c,S){return y===K?Tn(c)||mn(c,S):Tn(y)?!0:!!(y===Mr&&mn(y,c))},qn=function(y,c,S){return y===fr||y===K?Kr(c)?!0:c===Nr&&Kr(S):y===Nr?Kr(c):Kr(y)},ra=function(y){var c=0,S=1;(y[c]===fr||y[c]===K)&&(y[c]===K&&(S=-1),c++);for(var B=[];Kr(y[c]);)B.push(y[c++]);var W=B.length?parseInt(h.apply(void 0,B),10):0;y[c]===Nr&&c++;for(var te=[];Kr(y[c]);)te.push(y[c++]);var fe=te.length,xe=fe?parseInt(h.apply(void 0,te),10):0;(y[c]===Jr||y[c]===mr)&&c++;var Be=1;(y[c]===fr||y[c]===K)&&(y[c]===K&&(Be=-1),c++);for(var Ve=[];Kr(y[c]);)Ve.push(y[c++]);var Je=Ve.length?parseInt(h.apply(void 0,Ve),10):0;return S*(W+xe*Math.pow(10,-fe))*Math.pow(10,Be*Je)},na={type:2},Wn={type:3},Gn={type:4},ia={type:13},Ti={type:8},Fa={type:21},Bi={type:9},xi={type:10},Si={type:11},Ii={type:12},Er={type:14},vr={type:23},an={type:1},vn={type:25},ei={type:24},aa={type:26},Oi={type:27},Na={type:28},Pa={type:29},Wo={type:31},sa={type:32},_s=function(){function y(){this._value=[]}return y.prototype.write=function(c){this._value=this._value.concat(O(c))},y.prototype.read=function(){for(var c=[],S=this.consumeToken();S!==sa;)c.push(S),S=this.consumeToken();return c},y.prototype.consumeToken=function(){var c=this.consumeCodePoint();switch(c){case Ee:return this.consumeStringToken(Ee);case nt:var S=this.peekCodePoint(0),B=this.peekCodePoint(1),W=this.peekCodePoint(2);if(ta(S)||mn(B,W)){var te=Mn(S,B,W)?qr:Pr,fe=this.consumeName();return{type:5,value:fe,flags:te}}break;case ht:if(this.peekCodePoint(0)===ke)return this.consumeCodePoint(),ia;break;case f:return this.consumeStringToken(f);case v:return na;case k:return Wn;case Cr:if(this.peekCodePoint(0)===ke)return this.consumeCodePoint(),Er;break;case fr:if(qn(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case Fr:return Gn;case K:var xe=c,Be=this.peekCodePoint(0),Ve=this.peekCodePoint(1);if(qn(xe,Be,Ve))return this.reconsumeCodePoint(c),this.consumeNumericToken();if(Mn(xe,Be,Ve))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();if(Be===K&&Ve===yt)return this.consumeCodePoint(),this.consumeCodePoint(),ei;break;case Nr:if(qn(c,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(c),this.consumeNumericToken();break;case gn:if(this.peekCodePoint(0)===Cr)for(this.consumeCodePoint();;){var Je=this.consumeCodePoint();if(Je===Cr&&(Je=this.consumeCodePoint(),Je===gn))return this.consumeToken();if(Je===xr)return this.consumeToken()}break;case Xr:return aa;case Yr:return Oi;case Ze:if(this.peekCodePoint(0)===Te&&this.peekCodePoint(1)===K&&this.peekCodePoint(2)===K)return this.consumeCodePoint(),this.consumeCodePoint(),vn;break;case _t:var lt=this.peekCodePoint(0),ct=this.peekCodePoint(1),jt=this.peekCodePoint(2);if(Mn(lt,ct,jt)){var fe=this.consumeName();return{type:7,value:fe}}break;case rt:return Na;case Mr:if(mn(c,this.peekCodePoint(0)))return this.reconsumeCodePoint(c),this.consumeIdentLikeToken();break;case Nt:return Pa;case Ot:if(this.peekCodePoint(0)===ke)return this.consumeCodePoint(),Ti;break;case Mt:return Si;case br:return Ii;case Qr:case Dn:var St=this.peekCodePoint(0),Ft=this.peekCodePoint(1);return St===fr&&(jn(Ft)||Ft===qt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(c),this.consumeIdentLikeToken();case sr:if(this.peekCodePoint(0)===ke)return this.consumeCodePoint(),Bi;if(this.peekCodePoint(0)===sr)return this.consumeCodePoint(),Fa;break;case hr:if(this.peekCodePoint(0)===ke)return this.consumeCodePoint(),xi;break;case xr:return sa}return Sn(c)?(this.consumeWhiteSpace(),Wo):Kr(c)?(this.reconsumeCodePoint(c),this.consumeNumericToken()):Tn(c)?(this.reconsumeCodePoint(c),this.consumeIdentLikeToken()):{type:6,value:h(c)}},y.prototype.consumeCodePoint=function(){var c=this._value.shift();return typeof c=="undefined"?-1:c},y.prototype.reconsumeCodePoint=function(c){this._value.unshift(c)},y.prototype.peekCodePoint=function(c){return c>=this._value.length?-1:this._value[c]},y.prototype.consumeUnicodeRangeToken=function(){for(var c=[],S=this.consumeCodePoint();jn(S)&&c.length<6;)c.push(S),S=this.consumeCodePoint();for(var B=!1;S===qt&&c.length<6;)c.push(S),S=this.consumeCodePoint(),B=!0;if(B){var W=parseInt(h.apply(void 0,c.map(function(Be){return Be===qt?ar:Be})),16),te=parseInt(h.apply(void 0,c.map(function(Be){return Be===qt?xn:Be})),16);return{type:30,start:W,end:te}}var fe=parseInt(h.apply(void 0,c),16);if(this.peekCodePoint(0)===K&&jn(this.peekCodePoint(1))){this.consumeCodePoint(),S=this.consumeCodePoint();for(var xe=[];jn(S)&&xe.length<6;)xe.push(S),S=this.consumeCodePoint();var te=parseInt(h.apply(void 0,xe),16);return{type:30,start:fe,end:te}}else return{type:30,start:fe,end:fe}},y.prototype.consumeIdentLikeToken=function(){var c=this.consumeName();return c.toLowerCase()==="url"&&this.peekCodePoint(0)===v?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===v?(this.consumeCodePoint(),{type:19,value:c}):{type:20,value:c}},y.prototype.consumeUrlToken=function(){var c=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===xr)return{type:22,value:""};var S=this.peekCodePoint(0);if(S===f||S===Ee){var B=this.consumeStringToken(this.consumeCodePoint());return B.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===xr||this.peekCodePoint(0)===k)?(this.consumeCodePoint(),{type:22,value:B.value}):(this.consumeBadUrlRemnants(),vr)}for(;;){var W=this.consumeCodePoint();if(W===xr||W===k)return{type:22,value:h.apply(void 0,c)};if(Sn(W))return this.consumeWhiteSpace(),this.peekCodePoint(0)===xr||this.peekCodePoint(0)===k?(this.consumeCodePoint(),{type:22,value:h.apply(void 0,c)}):(this.consumeBadUrlRemnants(),vr);if(W===Ee||W===f||W===v||Ci(W))return this.consumeBadUrlRemnants(),vr;if(W===Mr)if(mn(W,this.peekCodePoint(0)))c.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),vr;else c.push(W)}},y.prototype.consumeWhiteSpace=function(){for(;Sn(this.peekCodePoint(0));)this.consumeCodePoint()},y.prototype.consumeBadUrlRemnants=function(){for(;;){var c=this.consumeCodePoint();if(c===k||c===xr)return;mn(c,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},y.prototype.consumeStringSlice=function(c){for(var S=5e4,B="";c>0;){var W=Math.min(S,c);B+=h.apply(void 0,this._value.splice(0,W)),c-=W}return this._value.shift(),B},y.prototype.consumeStringToken=function(c){var S="",B=0;do{var W=this._value[B];if(W===xr||W===void 0||W===c)return S+=this.consumeStringSlice(B),{type:0,value:S};if(W===Gr)return this._value.splice(0,B),an;if(W===Mr){var te=this._value[B+1];te!==xr&&te!==void 0&&(te===Gr?(S+=this.consumeStringSlice(B),B=-1,this._value.shift()):mn(W,te)&&(S+=this.consumeStringSlice(B),S+=h(this.consumeEscapedCodePoint()),B=-1))}B++}while(!0)},y.prototype.consumeNumber=function(){var c=[],S=Wr,B=this.peekCodePoint(0);for((B===fr||B===K)&&c.push(this.consumeCodePoint());Kr(this.peekCodePoint(0));)c.push(this.consumeCodePoint());B=this.peekCodePoint(0);var W=this.peekCodePoint(1);if(B===Nr&&Kr(W))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),S=cn;Kr(this.peekCodePoint(0));)c.push(this.consumeCodePoint());B=this.peekCodePoint(0),W=this.peekCodePoint(1);var te=this.peekCodePoint(2);if((B===Jr||B===mr)&&((W===fr||W===K)&&Kr(te)||Kr(W)))for(c.push(this.consumeCodePoint(),this.consumeCodePoint()),S=cn;Kr(this.peekCodePoint(0));)c.push(this.consumeCodePoint());return[ra(c),S]},y.prototype.consumeNumericToken=function(){var c=this.consumeNumber(),S=c[0],B=c[1],W=this.peekCodePoint(0),te=this.peekCodePoint(1),fe=this.peekCodePoint(2);if(Mn(W,te,fe)){var xe=this.consumeName();return{type:15,number:S,flags:B,unit:xe}}return W===H?(this.consumeCodePoint(),{type:16,number:S,flags:B}):{type:17,number:S,flags:B}},y.prototype.consumeEscapedCodePoint=function(){var c=this.consumeCodePoint();if(jn(c)){for(var S=h(c);jn(this.peekCodePoint(0))&&S.length<6;)S+=h(this.consumeCodePoint());Sn(this.peekCodePoint(0))&&this.consumeCodePoint();var B=parseInt(S,16);return B===0||Zi(B)||B>1114111?Ur:B}return c===xr?Ur:c},y.prototype.consumeName=function(){for(var c="";;){var S=this.consumeCodePoint();if(ta(S))c+=h(S);else if(mn(S,this.peekCodePoint(0)))c+=h(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(S),c}},y}(),ws=function(){function y(c){this._tokens=c}return y.create=function(c){var S=new _s;return S.write(c),new y(S.read())},y.parseValue=function(c){return y.create(c).parseComponentValue()},y.parseValues=function(c){return y.create(c).parseComponentValues()},y.prototype.parseComponentValue=function(){for(var c=this.consumeToken();c.type===31;)c=this.consumeToken();if(c.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(c);var S=this.consumeComponentValue();do c=this.consumeToken();while(c.type===31);if(c.type===32)return S;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},y.prototype.parseComponentValues=function(){for(var c=[];;){var S=this.consumeComponentValue();if(S.type===32)return c;c.push(S),c.push()}},y.prototype.consumeComponentValue=function(){var c=this.consumeToken();switch(c.type){case 11:case 28:case 2:return this.consumeSimpleBlock(c.type);case 19:return this.consumeFunction(c)}return c},y.prototype.consumeSimpleBlock=function(c){for(var S={type:c,values:[]},B=this.consumeToken();;){if(B.type===32||Vo(B,c))return S;this.reconsumeToken(B),S.values.push(this.consumeComponentValue()),B=this.consumeToken()}},y.prototype.consumeFunction=function(c){for(var S={name:c.value,values:[],type:18};;){var B=this.consumeToken();if(B.type===32||B.type===3)return S;this.reconsumeToken(B),S.values.push(this.consumeComponentValue())}},y.prototype.consumeToken=function(){var c=this._tokens.shift();return typeof c=="undefined"?sa:c},y.prototype.reconsumeToken=function(c){this._tokens.unshift(c)},y}(),Ri=function(y){return y.type===15},li=function(y){return y.type===17},Or=function(y){return y.type===20},Go=function(y){return y.type===0},Di=function(y,c){return Or(y)&&y.value===c},Cs=function(y){return y.type!==31},Vn=function(y){return y.type!==31&&y.type!==4},In=function(y){var c=[],S=[];return y.forEach(function(B){if(B.type===4){if(S.length===0)throw new Error("Error parsing function args, zero tokens for arg");c.push(S),S=[];return}B.type!==31&&S.push(B)}),S.length&&c.push(S),c},Vo=function(y,c){return c===11&&y.type===12||c===28&&y.type===29?!0:c===2&&y.type===3},kn=function(y){return y.type===17||y.type===15},sn=function(y){return y.type===16||kn(y)},Ts=function(y){return y.length>1?[y[0],y[1]]:[y[0]]},dn={type:17,number:0,flags:Wr},Ma={type:16,number:50,flags:Wr},Ln={type:16,number:100,flags:Wr},Hn=function(y,c,S){var B=y[0],W=y[1];return[Rr(B,c),Rr(typeof W!="undefined"?W:B,S)]},Rr=function(y,c){if(y.type===16)return y.number/100*c;if(Ri(y))switch(y.unit){case"rem":case"em":return 16*y.number;case"px":default:return y.number}return y.number},zn="deg",Ai="grad",ka="rad",oa="turn",ui={name:"angle",parse:function(y,c){if(c.type===15)switch(c.unit){case zn:return Math.PI*c.number/180;case Ai:return Math.PI/200*c.number;case ka:return c.number;case oa:return Math.PI*2*c.number}throw new Error("Unsupported angle type")}},Ha=function(y){return y.type===15&&(y.unit===zn||y.unit===Ai||y.unit===ka||y.unit===oa)},Bs=function(y){var c=y.filter(Or).map(function(S){return S.value}).join(" ");switch(c){case"to bottom right":case"to right bottom":case"left top":case"top left":return[dn,dn];case"to top":case"bottom":return En(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[dn,Ln];case"to right":case"left":return En(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ln,Ln];case"to bottom":case"top":return En(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ln,dn];case"to left":case"right":return En(270)}return 0},En=function(y){return Math.PI*y/180},Xn={name:"color",parse:function(y,c){if(c.type===18){var S=zo[c.name];if(typeof S=="undefined")throw new Error('Attempting to parse an unsupported color function "'+c.name+'"');return S(y,c.values)}if(c.type===5){if(c.value.length===3){var B=c.value.substring(0,1),W=c.value.substring(1,2),te=c.value.substring(2,3);return Jn(parseInt(B+B,16),parseInt(W+W,16),parseInt(te+te,16),1)}if(c.value.length===4){var B=c.value.substring(0,1),W=c.value.substring(1,2),te=c.value.substring(2,3),fe=c.value.substring(3,4);return Jn(parseInt(B+B,16),parseInt(W+W,16),parseInt(te+te,16),parseInt(fe+fe,16)/255)}if(c.value.length===6){var B=c.value.substring(0,2),W=c.value.substring(2,4),te=c.value.substring(4,6);return Jn(parseInt(B,16),parseInt(W,16),parseInt(te,16),1)}if(c.value.length===8){var B=c.value.substring(0,2),W=c.value.substring(2,4),te=c.value.substring(4,6),fe=c.value.substring(6,8);return Jn(parseInt(B,16),parseInt(W,16),parseInt(te,16),parseInt(fe,16)/255)}}if(c.type===20){var xe=Qn[c.value.toUpperCase()];if(typeof xe!="undefined")return xe}return Qn.TRANSPARENT}},Yn=function(y){return(255&y)===0},on=function(y){var c=255&y,S=255&y>>8,B=255&y>>16,W=255&y>>24;return c<255?"rgba("+W+","+B+","+S+","+c/255+")":"rgb("+W+","+B+","+S+")"},Jn=function(y,c,S,B){return(y<<24|c<<16|S<<8|Math.round(B*255)<<0)>>>0},xs=function(y,c){if(y.type===17)return y.number;if(y.type===16){var S=c===3?1:255;return c===3?y.number/100*S:Math.round(y.number/100*S)}return 0},Qa=function(y,c){var S=c.filter(Vn);if(S.length===3){var B=S.map(xs),W=B[0],te=B[1],fe=B[2];return Jn(W,te,fe,1)}if(S.length===4){var xe=S.map(xs),W=xe[0],te=xe[1],fe=xe[2],Be=xe[3];return Jn(W,te,fe,Be)}return 0};function Ka(y,c,S){return S<0&&(S+=1),S>=1&&(S-=1),S<1/6?(c-y)*S*6+y:S<1/2?c:S<2/3?(c-y)*6*(2/3-S)+y:y}var Ss=function(y,c){var S=c.filter(Vn),B=S[0],W=S[1],te=S[2],fe=S[3],xe=(B.type===17?En(B.number):ui.parse(y,B))/(Math.PI*2),Be=sn(W)?W.number/100:0,Ve=sn(te)?te.number/100:0,Je=typeof fe!="undefined"&&sn(fe)?Rr(fe,1):1;if(Be===0)return Jn(Ve*255,Ve*255,Ve*255,1);var lt=Ve<=.5?Ve*(Be+1):Ve+Be-Ve*Be,ct=Ve*2-lt,jt=Ka(ct,lt,xe+1/3),St=Ka(ct,lt,xe),Ft=Ka(ct,lt,xe-1/3);return Jn(jt*255,St*255,Ft*255,Je)},zo={hsl:Ss,hsla:Ss,rgb:Qa,rgba:Qa},Li=function(y,c){return Xn.parse(y,ws.create(c).parseComponentValue())},Qn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Xo={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(y,c){return c.map(function(S){if(Or(S))switch(S.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Yo={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},la=function(y,c){var S=Xn.parse(y,c[0]),B=c[1];return B&&sn(B)?{color:S,stop:B}:{color:S,stop:null}},Is=function(y,c){var S=y[0],B=y[y.length-1];S.stop===null&&(S.stop=dn),B.stop===null&&(B.stop=Ln);for(var W=[],te=0,fe=0;fe<y.length;fe++){var xe=y[fe].stop;if(xe!==null){var Be=Rr(xe,c);Be>te?W.push(Be):W.push(te),te=Be}else W.push(null)}for(var Ve=null,fe=0;fe<W.length;fe++){var Je=W[fe];if(Je===null)Ve===null&&(Ve=fe);else if(Ve!==null){for(var lt=fe-Ve,ct=W[Ve-1],jt=(Je-ct)/(lt+1),St=1;St<=lt;St++)W[Ve+St-1]=jt*St;Ve=null}}return y.map(function(Ft,lr){var Qt=Ft.color;return{color:Qt,stop:Math.max(Math.min(1,W[lr]/c),0)}})},Ui=function(y,c,S){var B=c/2,W=S/2,te=Rr(y[0],c)-B,fe=W-Rr(y[1],S);return(Math.atan2(fe,te)+Math.PI*2)%(Math.PI*2)},Aa=function(y,c,S){var B=typeof y=="number"?y:Ui(y,c,S),W=Math.abs(c*Math.sin(B))+Math.abs(S*Math.cos(B)),te=c/2,fe=S/2,xe=W/2,Be=Math.sin(B-Math.PI/2)*xe,Ve=Math.cos(B-Math.PI/2)*xe;return[W,te-Ve,te+Ve,fe-Be,fe+Be]},bn=function(y,c){return Math.sqrt(y*y+c*c)},Os=function(y,c,S,B,W){var te=[[0,0],[0,c],[y,0],[y,c]];return te.reduce(function(fe,xe){var Be=xe[0],Ve=xe[1],Je=bn(S-Be,B-Ve);return(W?Je<fe.optimumDistance:Je>fe.optimumDistance)?{optimumCorner:xe,optimumDistance:Je}:fe},{optimumDistance:W?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Jo=function(y,c,S,B,W){var te=0,fe=0;switch(y.size){case 0:y.shape===0?te=fe=Math.min(Math.abs(c),Math.abs(c-B),Math.abs(S),Math.abs(S-W)):y.shape===1&&(te=Math.min(Math.abs(c),Math.abs(c-B)),fe=Math.min(Math.abs(S),Math.abs(S-W)));break;case 2:if(y.shape===0)te=fe=Math.min(bn(c,S),bn(c,S-W),bn(c-B,S),bn(c-B,S-W));else if(y.shape===1){var xe=Math.min(Math.abs(S),Math.abs(S-W))/Math.min(Math.abs(c),Math.abs(c-B)),Be=Os(B,W,c,S,!0),Ve=Be[0],Je=Be[1];te=bn(Ve-c,(Je-S)/xe),fe=xe*te}break;case 1:y.shape===0?te=fe=Math.max(Math.abs(c),Math.abs(c-B),Math.abs(S),Math.abs(S-W)):y.shape===1&&(te=Math.max(Math.abs(c),Math.abs(c-B)),fe=Math.max(Math.abs(S),Math.abs(S-W)));break;case 3:if(y.shape===0)te=fe=Math.max(bn(c,S),bn(c,S-W),bn(c-B,S),bn(c-B,S-W));else if(y.shape===1){var xe=Math.max(Math.abs(S),Math.abs(S-W))/Math.max(Math.abs(c),Math.abs(c-B)),lt=Os(B,W,c,S,!1),Ve=lt[0],Je=lt[1];te=bn(Ve-c,(Je-S)/xe),fe=xe*te}break}return Array.isArray(y.size)&&(te=Rr(y.size[0],B),fe=y.size.length===2?Rr(y.size[1],W):te),[te,fe]},$o=function(y,c){var S=En(180),B=[];return In(c).forEach(function(W,te){if(te===0){var fe=W[0];if(fe.type===20&&fe.value==="to"){S=Bs(W);return}else if(Ha(fe)){S=ui.parse(y,fe);return}}var xe=la(y,W);B.push(xe)}),{angle:S,stops:B,type:1}},ua=function(y,c){var S=En(180),B=[];return In(c).forEach(function(W,te){if(te===0){var fe=W[0];if(fe.type===20&&["top","left","right","bottom"].indexOf(fe.value)!==-1){S=Bs(W);return}else if(Ha(fe)){S=(ui.parse(y,fe)+En(270))%En(360);return}}var xe=la(y,W);B.push(xe)}),{angle:S,stops:B,type:1}},Zo=function(y,c){var S=En(180),B=[],W=1,te=0,fe=3,xe=[];return In(c).forEach(function(Be,Ve){var Je=Be[0];if(Ve===0){if(Or(Je)&&Je.value==="linear"){W=1;return}else if(Or(Je)&&Je.value==="radial"){W=2;return}}if(Je.type===18){if(Je.name==="from"){var lt=Xn.parse(y,Je.values[0]);B.push({stop:dn,color:lt})}else if(Je.name==="to"){var lt=Xn.parse(y,Je.values[0]);B.push({stop:Ln,color:lt})}else if(Je.name==="color-stop"){var ct=Je.values.filter(Vn);if(ct.length===2){var lt=Xn.parse(y,ct[1]),jt=ct[0];li(jt)&&B.push({stop:{type:16,number:jt.number*100,flags:jt.flags},color:lt})}}}}),W===1?{angle:(S+En(180))%En(360),stops:B,type:W}:{size:fe,shape:te,stops:B,position:xe,type:W}},Rs="closest-side",Ds="farthest-side",Ls="closest-corner",Us="farthest-corner",Fs="circle",Ns="ellipse",ca="cover",Ps="contain",Ms=function(y,c){var S=0,B=3,W=[],te=[];return In(c).forEach(function(fe,xe){var Be=!0;if(xe===0){var Ve=!1;Be=fe.reduce(function(lt,ct){if(Ve)if(Or(ct))switch(ct.value){case"center":return te.push(Ma),lt;case"top":case"left":return te.push(dn),lt;case"right":case"bottom":return te.push(Ln),lt}else(sn(ct)||kn(ct))&&te.push(ct);else if(Or(ct))switch(ct.value){case Fs:return S=0,!1;case Ns:return S=1,!1;case"at":return Ve=!0,!1;case Rs:return B=0,!1;case ca:case Ds:return B=1,!1;case Ps:case Ls:return B=2,!1;case Us:return B=3,!1}else if(kn(ct)||sn(ct))return Array.isArray(B)||(B=[]),B.push(ct),!1;return lt},Be)}if(Be){var Je=la(y,fe);W.push(Je)}}),{size:B,shape:S,stops:W,position:te,type:2}},Fi=function(y,c){var S=0,B=3,W=[],te=[];return In(c).forEach(function(fe,xe){var Be=!0;if(xe===0?Be=fe.reduce(function(Je,lt){if(Or(lt))switch(lt.value){case"center":return te.push(Ma),!1;case"top":case"left":return te.push(dn),!1;case"right":case"bottom":return te.push(Ln),!1}else if(sn(lt)||kn(lt))return te.push(lt),!1;return Je},Be):xe===1&&(Be=fe.reduce(function(Je,lt){if(Or(lt))switch(lt.value){case Fs:return S=0,!1;case Ns:return S=1,!1;case Ps:case Rs:return B=0,!1;case Ds:return B=1,!1;case Ls:return B=2,!1;case ca:case Us:return B=3,!1}else if(kn(lt)||sn(lt))return Array.isArray(B)||(B=[]),B.push(lt),!1;return Je},Be)),Be){var Ve=la(y,fe);W.push(Ve)}}),{size:B,shape:S,stops:W,position:te,type:2}},ks=function(y){return y.type===1},qo=function(y){return y.type===2},ja={name:"image",parse:function(y,c){if(c.type===22){var S={url:c.value,type:0};return y.cache.addImage(c.value),S}if(c.type===18){var B=Qs[c.name];if(typeof B=="undefined")throw new Error('Attempting to parse an unsupported image function "'+c.name+'"');return B(y,c.values)}throw new Error("Unsupported image type "+c.type)}};function Hs(y){return!(y.type===20&&y.value==="none")&&(y.type!==18||!!Qs[y.name])}var Qs={"linear-gradient":$o,"-moz-linear-gradient":ua,"-ms-linear-gradient":ua,"-o-linear-gradient":ua,"-webkit-linear-gradient":ua,"radial-gradient":Ms,"-moz-radial-gradient":Fi,"-ms-radial-gradient":Fi,"-o-radial-gradient":Fi,"-webkit-radial-gradient":Fi,"-webkit-gradient":Zo},Ks={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(y,c){if(c.length===0)return[];var S=c[0];return S.type===20&&S.value==="none"?[]:c.filter(function(B){return Vn(B)&&Hs(B)}).map(function(B){return ja.parse(y,B)})}},el={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(y,c){return c.map(function(S){if(Or(S))switch(S.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},tl={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(y,c){return In(c).map(function(S){return S.filter(sn)}).map(Ts)}},rl={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(y,c){return In(c).map(function(S){return S.filter(Or).map(function(B){return B.value}).join(" ")}).map(nl)}},nl=function(y){switch(y){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},_n;(function(y){y.AUTO="auto",y.CONTAIN="contain",y.COVER="cover"})(_n||(_n={}));var il={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(y,c){return In(c).map(function(S){return S.filter(js)})}},js=function(y){return Or(y)||sn(y)},ci=function(y){return{name:"border-"+y+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},al=ci("top"),Ws=ci("right"),Gs=ci("bottom"),sl=ci("left"),Ni=function(y){return{name:"border-radius-"+y,initialValue:"0 0",prefix:!1,type:1,parse:function(c,S){return Ts(S.filter(sn))}}},Vs=Ni("top-left"),ol=Ni("top-right"),ll=Ni("bottom-right"),zs=Ni("bottom-left"),da=function(y){return{name:"border-"+y+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(c,S){switch(S){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Wa=da("top"),Xs=da("right"),Ga=da("bottom"),Al=da("left"),di=function(y){return{name:"border-"+y+"-width",initialValue:"0",type:0,prefix:!1,parse:function(c,S){return Ri(S)?S.number:0}}},ul=di("top"),cl=di("right"),dl=di("bottom"),Ys=di("left"),hl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},fl={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(y,c){switch(c){case"rtl":return 1;case"ltr":default:return 0}}},pl={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(y,c){return c.filter(Or).reduce(function(S,B){return S|hi(B.value)},0)}},hi=function(y){switch(y){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},fi={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(y,c){switch(c){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Va={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(y,c){return c.type===20&&c.value==="normal"?0:c.type===17||c.type===15?c.number:0}},ha;(function(y){y.NORMAL="normal",y.STRICT="strict"})(ha||(ha={}));var Js={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(y,c){switch(c){case"strict":return ha.STRICT;case"normal":default:return ha.NORMAL}}},gl={name:"line-height",initialValue:"normal",prefix:!1,type:4},pi=function(y,c){return Or(y)&&y.value==="normal"?1.2*c:y.type===17?c*y.number:sn(y)?Rr(y,c):c},ml={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(y,c){return c.type===20&&c.value==="none"?null:ja.parse(y,c)}},vl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(y,c){switch(c){case"inside":return 0;case"outside":default:return 1}}},pn={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(y,c){switch(c){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},gi=function(y){return{name:"margin-"+y,initialValue:"0",prefix:!1,type:4}},$s=gi("top"),yl=gi("right"),Zs=gi("bottom"),Pi=gi("left"),qs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(y,c){return c.filter(Or).map(function(S){switch(S.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},El={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(y,c){switch(c){case"break-word":return"break-word";case"normal":default:return"normal"}}},fa=function(y){return{name:"padding-"+y,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},bl=fa("top"),za=fa("right"),Mi=fa("bottom"),_l=fa("left"),wl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(y,c){switch(c){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Cl={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(y,c){switch(c){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},eo={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(y,c){return c.length===1&&Di(c[0],"none")?[]:In(c).map(function(S){for(var B={color:Qn.TRANSPARENT,offsetX:dn,offsetY:dn,blur:dn},W=0,te=0;te<S.length;te++){var fe=S[te];kn(fe)?(W===0?B.offsetX=fe:W===1?B.offsetY=fe:B.blur=fe,W++):B.color=Xn.parse(y,fe)}return B})}},Tl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(y,c){switch(c){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Bl={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(y,c){if(c.type===20&&c.value==="none")return null;if(c.type===18){var S=Sl[c.name];if(typeof S=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+c.name+'"');return S(c.values)}return null}},Xa=function(y){var c=y.filter(function(S){return S.type===17}).map(function(S){return S.number});return c.length===6?c:null},xl=function(y){var c=y.filter(function(Be){return Be.type===17}).map(function(Be){return Be.number}),S=c[0],B=c[1];c[2],c[3];var W=c[4],te=c[5];c[6],c[7],c[8],c[9],c[10],c[11];var fe=c[12],xe=c[13];return c[14],c[15],c.length===16?[S,B,W,te,fe,xe]:null},Sl={matrix:Xa,matrix3d:xl},ki={type:16,number:50,flags:Wr},Il=[ki,ki],Ol={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(y,c){var S=c.filter(sn);return S.length!==2?Il:[S[0],S[1]]}},to={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(y,c){switch(c){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Hi;(function(y){y.NORMAL="normal",y.BREAK_ALL="break-all",y.KEEP_ALL="keep-all"})(Hi||(Hi={}));for(var Rl={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(y,c){switch(c){case"break-all":return Hi.BREAK_ALL;case"keep-all":return Hi.KEEP_ALL;case"normal":default:return Hi.NORMAL}}},jA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(y,c){if(c.type===20)return{auto:!0,order:0};if(li(c))return{auto:!1,order:c.number};throw new Error("Invalid z-index number parsed")}},ro={name:"time",parse:function(y,c){if(c.type===15)switch(c.unit.toLowerCase()){case"s":return 1e3*c.number;case"ms":return c.number}throw new Error("Unsupported time type")}},Ya={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(y,c){return li(c)?c.number:1}},Qi={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Dl={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(y,c){return c.filter(Or).map(function(S){switch(S.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(S){return S!==0})}},Ja={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(y,c){var S=[],B=[];return c.forEach(function(W){switch(W.type){case 20:case 0:S.push(W.value);break;case 17:S.push(W.number.toString());break;case 4:B.push(S.join(" ")),S.length=0;break}}),S.length&&B.push(S.join(" ")),B.map(function(W){return W.indexOf(" ")===-1?W:"'"+W+"'"})}},Ll={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Ul={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(y,c){if(li(c))return c.number;if(Or(c))switch(c.value){case"bold":return 700;case"normal":default:return 400}return 400}},Fl={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(y,c){return c.filter(Or).map(function(S){return S.value})}},$a={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(y,c){switch(c){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},tn=function(y,c){return(y&c)!==0},Nl={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(y,c){if(c.length===0)return[];var S=c[0];return S.type===20&&S.value==="none"?[]:c}},Pl={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(y,c){if(c.length===0)return null;var S=c[0];if(S.type===20&&S.value==="none")return null;for(var B=[],W=c.filter(Cs),te=0;te<W.length;te++){var fe=W[te],xe=W[te+1];if(fe.type===20){var Be=xe&&li(xe)?xe.number:1;B.push({counter:fe.value,increment:Be})}}return B}},Ml={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(y,c){if(c.length===0)return[];for(var S=[],B=c.filter(Cs),W=0;W<B.length;W++){var te=B[W],fe=B[W+1];if(Or(te)&&te.value!=="none"){var xe=fe&&li(fe)?fe.number:0;S.push({counter:te.value,reset:xe})}}return S}},kl={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(y,c){return c.filter(Ri).map(function(S){return ro.parse(y,S)})}},Hl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(y,c){if(c.length===0)return null;var S=c[0];if(S.type===20&&S.value==="none")return null;var B=[],W=c.filter(Go);if(W.length%2!==0)return null;for(var te=0;te<W.length;te+=2){var fe=W[te].value,xe=W[te+1].value;B.push({open:fe,close:xe})}return B}},no=function(y,c,S){if(!y)return"";var B=y[Math.min(c,y.length-1)];return B?S?B.open:B.close:""},Ql={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(y,c){return c.length===1&&Di(c[0],"none")?[]:In(c).map(function(S){for(var B={color:255,offsetX:dn,offsetY:dn,blur:dn,spread:dn,inset:!1},W=0,te=0;te<S.length;te++){var fe=S[te];Di(fe,"inset")?B.inset=!0:kn(fe)?(W===0?B.offsetX=fe:W===1?B.offsetY=fe:W===2?B.blur=fe:B.spread=fe,W++):B.color=Xn.parse(y,fe)}return B})}},Kl={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(y,c){var S=[0,1,2],B=[];return c.filter(Or).forEach(function(W){switch(W.value){case"stroke":B.push(1);break;case"fill":B.push(0);break;case"markers":B.push(2);break}}),S.forEach(function(W){B.indexOf(W)===-1&&B.push(W)}),B}},pa={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},jl={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(y,c){return Ri(c)?c.number:0}},io=function(){function y(c,S){var B,W;this.animationDuration=kt(c,kl,S.animationDuration),this.backgroundClip=kt(c,Xo,S.backgroundClip),this.backgroundColor=kt(c,Yo,S.backgroundColor),this.backgroundImage=kt(c,Ks,S.backgroundImage),this.backgroundOrigin=kt(c,el,S.backgroundOrigin),this.backgroundPosition=kt(c,tl,S.backgroundPosition),this.backgroundRepeat=kt(c,rl,S.backgroundRepeat),this.backgroundSize=kt(c,il,S.backgroundSize),this.borderTopColor=kt(c,al,S.borderTopColor),this.borderRightColor=kt(c,Ws,S.borderRightColor),this.borderBottomColor=kt(c,Gs,S.borderBottomColor),this.borderLeftColor=kt(c,sl,S.borderLeftColor),this.borderTopLeftRadius=kt(c,Vs,S.borderTopLeftRadius),this.borderTopRightRadius=kt(c,ol,S.borderTopRightRadius),this.borderBottomRightRadius=kt(c,ll,S.borderBottomRightRadius),this.borderBottomLeftRadius=kt(c,zs,S.borderBottomLeftRadius),this.borderTopStyle=kt(c,Wa,S.borderTopStyle),this.borderRightStyle=kt(c,Xs,S.borderRightStyle),this.borderBottomStyle=kt(c,Ga,S.borderBottomStyle),this.borderLeftStyle=kt(c,Al,S.borderLeftStyle),this.borderTopWidth=kt(c,ul,S.borderTopWidth),this.borderRightWidth=kt(c,cl,S.borderRightWidth),this.borderBottomWidth=kt(c,dl,S.borderBottomWidth),this.borderLeftWidth=kt(c,Ys,S.borderLeftWidth),this.boxShadow=kt(c,Ql,S.boxShadow),this.color=kt(c,hl,S.color),this.direction=kt(c,fl,S.direction),this.display=kt(c,pl,S.display),this.float=kt(c,fi,S.cssFloat),this.fontFamily=kt(c,Ja,S.fontFamily),this.fontSize=kt(c,Ll,S.fontSize),this.fontStyle=kt(c,$a,S.fontStyle),this.fontVariant=kt(c,Fl,S.fontVariant),this.fontWeight=kt(c,Ul,S.fontWeight),this.letterSpacing=kt(c,Va,S.letterSpacing),this.lineBreak=kt(c,Js,S.lineBreak),this.lineHeight=kt(c,gl,S.lineHeight),this.listStyleImage=kt(c,ml,S.listStyleImage),this.listStylePosition=kt(c,vl,S.listStylePosition),this.listStyleType=kt(c,pn,S.listStyleType),this.marginTop=kt(c,$s,S.marginTop),this.marginRight=kt(c,yl,S.marginRight),this.marginBottom=kt(c,Zs,S.marginBottom),this.marginLeft=kt(c,Pi,S.marginLeft),this.opacity=kt(c,Ya,S.opacity);var te=kt(c,qs,S.overflow);this.overflowX=te[0],this.overflowY=te[te.length>1?1:0],this.overflowWrap=kt(c,El,S.overflowWrap),this.paddingTop=kt(c,bl,S.paddingTop),this.paddingRight=kt(c,za,S.paddingRight),this.paddingBottom=kt(c,Mi,S.paddingBottom),this.paddingLeft=kt(c,_l,S.paddingLeft),this.paintOrder=kt(c,Kl,S.paintOrder),this.position=kt(c,Cl,S.position),this.textAlign=kt(c,wl,S.textAlign),this.textDecorationColor=kt(c,Qi,(B=S.textDecorationColor)!==null&&B!==void 0?B:S.color),this.textDecorationLine=kt(c,Dl,(W=S.textDecorationLine)!==null&&W!==void 0?W:S.textDecoration),this.textShadow=kt(c,eo,S.textShadow),this.textTransform=kt(c,Tl,S.textTransform),this.transform=kt(c,Bl,S.transform),this.transformOrigin=kt(c,Ol,S.transformOrigin),this.visibility=kt(c,to,S.visibility),this.webkitTextStrokeColor=kt(c,pa,S.webkitTextStrokeColor),this.webkitTextStrokeWidth=kt(c,jl,S.webkitTextStrokeWidth),this.wordBreak=kt(c,Rl,S.wordBreak),this.zIndex=kt(c,jA,S.zIndex)}return y.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},y.prototype.isTransparent=function(){return Yn(this.backgroundColor)},y.prototype.isTransformed=function(){return this.transform!==null},y.prototype.isPositioned=function(){return this.position!==0},y.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},y.prototype.isFloating=function(){return this.float!==0},y.prototype.isInlineLevel=function(){return tn(this.display,4)||tn(this.display,33554432)||tn(this.display,268435456)||tn(this.display,536870912)||tn(this.display,67108864)||tn(this.display,134217728)},y}(),ga=function(){function y(c,S){this.content=kt(c,Nl,S.content),this.quotes=kt(c,Hl,S.quotes)}return y}(),Za=function(){function y(c,S){this.counterIncrement=kt(c,Pl,S.counterIncrement),this.counterReset=kt(c,Ml,S.counterReset)}return y}(),kt=function(y,c,S){var B=new _s,W=S!==null&&typeof S!="undefined"?S.toString():c.initialValue;B.write(W);var te=new ws(B.read());switch(c.type){case 2:var fe=te.parseComponentValue();return c.parse(y,Or(fe)?fe.value:c.initialValue);case 0:return c.parse(y,te.parseComponentValue());case 1:return c.parse(y,te.parseComponentValues());case 4:return te.parseComponentValue();case 3:switch(c.format){case"angle":return ui.parse(y,te.parseComponentValue());case"color":return Xn.parse(y,te.parseComponentValue());case"image":return ja.parse(y,te.parseComponentValue());case"length":var xe=te.parseComponentValue();return kn(xe)?xe:dn;case"length-percentage":var Be=te.parseComponentValue();return sn(Be)?Be:dn;case"time":return ro.parse(y,te.parseComponentValue())}break}},Wl="data-html2canvas-debug",ao=function(y){var c=y.getAttribute(Wl);switch(c){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},qa=function(y,c){var S=ao(y);return S===1||c===S},Un=function(){function y(c,S){if(this.context=c,this.textNodes=[],this.elements=[],this.flags=0,qa(S,3))debugger;this.styles=new io(c,window.getComputedStyle(S,null)),fs(S)&&(this.styles.animationDuration.some(function(B){return B>0})&&(S.style.animationDuration="0s"),this.styles.transform!==null&&(S.style.transform="none")),this.bounds=M(this.context,S),qa(S,4)&&(this.flags|=16)}return y}(),mi="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",so="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ki=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ma=0;ma<so.length;ma++)Ki[so.charCodeAt(ma)]=ma;for(var Gl=function(y){var c=y.length*.75,S=y.length,B,W=0,te,fe,xe,Be;y[y.length-1]==="="&&(c--,y[y.length-2]==="="&&c--);var Ve=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(c):new Array(c),Je=Array.isArray(Ve)?Ve:new Uint8Array(Ve);for(B=0;B<S;B+=4)te=Ki[y.charCodeAt(B)],fe=Ki[y.charCodeAt(B+1)],xe=Ki[y.charCodeAt(B+2)],Be=Ki[y.charCodeAt(B+3)],Je[W++]=te<<2|fe>>4,Je[W++]=(fe&15)<<4|xe>>2,Je[W++]=(xe&3)<<6|Be&63;return Ve},es=function(y){for(var c=y.length,S=[],B=0;B<c;B+=2)S.push(y[B+1]<<8|y[B]);return S},Vl=function(y){for(var c=y.length,S=[],B=0;B<c;B+=4)S.push(y[B+3]<<24|y[B+2]<<16|y[B+1]<<8|y[B]);return S},ti=5,ts=6+5,rs=2,zl=ts-ti,oo=65536>>ti,Xl=1<<ti,va=Xl-1,Yl=1024>>ti,Jl=oo+Yl,$l=Jl,Zl=2048>>6,lo=$l+Zl,ql=65536>>ts,eA=1<<zl,tA=eA-1,Ao=function(y,c,S){return y.slice?y.slice(c,S):new Uint16Array(Array.prototype.slice.call(y,c,S))},rA=function(y,c,S){return y.slice?y.slice(c,S):new Uint32Array(Array.prototype.slice.call(y,c,S))},nA=function(y,c){var S=Gl(y),B=Array.isArray(S)?Vl(S):new Uint32Array(S),W=Array.isArray(S)?es(S):new Uint16Array(S),te=24,fe=Ao(W,te/2,B[4]/2),xe=B[5]===2?Ao(W,(te+B[4])/2):rA(B,Math.ceil((te+B[4])/4));return new ya(B[0],B[1],B[2],B[3],fe,xe)},ya=function(){function y(c,S,B,W,te,fe){this.initialValue=c,this.errorValue=S,this.highStart=B,this.highValueIndex=W,this.index=te,this.data=fe}return y.prototype.get=function(c){var S;if(c>=0){if(c<55296||c>56319&&c<=65535)return S=this.index[c>>ti],S=(S<<rs)+(c&va),this.data[S];if(c<=65535)return S=this.index[oo+(c-55296>>ti)],S=(S<<rs)+(c&va),this.data[S];if(c<this.highStart)return S=lo-ql+(c>>ts),S=this.index[S],S+=c>>ti&tA,S=this.index[S],S=(S<<rs)+(c&va),this.data[S];if(c<=1114111)return this.data[this.highValueIndex]}return this.errorValue},y}(),ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",iA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ea=0;Ea<ns.length;Ea++)iA[ns.charCodeAt(Ea)]=Ea;var aA=1,is=2,ri=3,uo=4,as=5,sA=7,co=8,ho=9,ss=10,ba=11,fo=12,po=13,go=14,_a=15,oA=function(y){for(var c=[],S=0,B=y.length;S<B;){var W=y.charCodeAt(S++);if(W>=55296&&W<=56319&&S<B){var te=y.charCodeAt(S++);(te&64512)===56320?c.push(((W&1023)<<10)+(te&1023)+65536):(c.push(W),S--)}else c.push(W)}return c},mo=function(){for(var y=[],c=0;c<arguments.length;c++)y[c]=arguments[c];if(String.fromCodePoint)return String.fromCodePoint.apply(String,y);var S=y.length;if(!S)return"";for(var B=[],W=-1,te="";++W<S;){var fe=y[W];fe<=65535?B.push(fe):(fe-=65536,B.push((fe>>10)+55296,fe%1024+56320)),(W+1===S||B.length>16384)&&(te+=String.fromCharCode.apply(String,B),B.length=0)}return te},lA=nA(mi),wn="\xD7",vo="\xF7",os=function(y){return lA.get(y)},AA=function(y,c,S){var B=S-2,W=c[B],te=c[S-1],fe=c[S];if(te===is&&fe===ri)return wn;if(te===is||te===ri||te===uo)return vo;if(fe===is||fe===ri||fe===uo)return vo;if(te===co&&[co,ho,ba,fo].indexOf(fe)!==-1)return wn;if((te===ba||te===ho)&&(fe===ho||fe===ss))return wn;if((te===fo||te===ss)&&fe===ss)return wn;if(fe===po||fe===as)return wn;if(fe===sA)return wn;if(te===aA)return wn;if(te===po&&fe===go){for(;W===as;)W=c[--B];if(W===go)return wn}if(te===_a&&fe===_a){for(var xe=0;W===_a;)xe++,W=c[--B];if(xe%2===0)return wn}return vo},uA=function(y){var c=oA(y),S=c.length,B=0,W=0,te=c.map(os);return{next:function(){if(B>=S)return{done:!0,value:null};for(var fe=wn;B<S&&(fe=AA(c,te,++B))===wn;);if(fe!==wn||B===S){var xe=mo.apply(null,c.slice(W,B));return W=B,{value:xe,done:!1}}return{done:!0,value:null}}}},cA=function(y){for(var c=uA(y),S=[],B;!(B=c.next()).done;)B.value&&S.push(B.value.slice());return S},dA=function(y){var c=123;if(y.createRange){var S=y.createRange();if(S.getBoundingClientRect){var B=y.createElement("boundtest");B.style.height=c+"px",B.style.display="block",y.body.appendChild(B),S.selectNode(B);var W=S.getBoundingClientRect(),te=Math.round(W.height);if(y.body.removeChild(B),te===c)return!0}}return!1},hA=function(y){var c=y.createElement("boundtest");c.style.width="50px",c.style.display="block",c.style.fontSize="12px",c.style.letterSpacing="0px",c.style.wordSpacing="0px",y.body.appendChild(c);var S=y.createRange();c.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var B=c.firstChild,W=O(B.data).map(function(Be){return h(Be)}),te=0,fe={},xe=W.every(function(Be,Ve){S.setStart(B,te),S.setEnd(B,te+Be.length);var Je=S.getBoundingClientRect();te+=Be.length;var lt=Je.x>fe.x||Je.y>fe.y;return fe=Je,Ve===0?!0:lt});return y.body.removeChild(c),xe},fA=function(){return typeof new Image().crossOrigin!="undefined"},pA=function(){return typeof new XMLHttpRequest().responseType=="string"},yo=function(y){var c=new Image,S=y.createElement("canvas"),B=S.getContext("2d");if(!B)return!1;c.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{B.drawImage(c,0,0),S.toDataURL()}catch(W){return!1}return!0},ji=function(y){return y[0]===0&&y[1]===255&&y[2]===0&&y[3]===255},wa=function(y){var c=y.createElement("canvas"),S=100;c.width=S,c.height=S;var B=c.getContext("2d");if(!B)return Promise.reject(!1);B.fillStyle="rgb(0, 255, 0)",B.fillRect(0,0,S,S);var W=new Image,te=c.toDataURL();W.src=te;var fe=ls(S,S,0,0,W);return B.fillStyle="red",B.fillRect(0,0,S,S),Ca(fe).then(function(xe){B.drawImage(xe,0,0);var Be=B.getImageData(0,0,S,S).data;B.fillStyle="red",B.fillRect(0,0,S,S);var Ve=y.createElement("div");return Ve.style.backgroundImage="url("+te+")",Ve.style.height=S+"px",ji(Be)?Ca(ls(S,S,0,0,Ve)):Promise.reject(!1)}).then(function(xe){return B.drawImage(xe,0,0),ji(B.getImageData(0,0,S,S).data)}).catch(function(){return!1})},ls=function(y,c,S,B,W){var te="http://www.w3.org/2000/svg",fe=document.createElementNS(te,"svg"),xe=document.createElementNS(te,"foreignObject");return fe.setAttributeNS(null,"width",y.toString()),fe.setAttributeNS(null,"height",c.toString()),xe.setAttributeNS(null,"width","100%"),xe.setAttributeNS(null,"height","100%"),xe.setAttributeNS(null,"x",S.toString()),xe.setAttributeNS(null,"y",B.toString()),xe.setAttributeNS(null,"externalResourcesRequired","true"),fe.appendChild(xe),xe.appendChild(W),fe},Ca=function(y){return new Promise(function(c,S){var B=new Image;B.onload=function(){return c(B)},B.onerror=S,B.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(y))})},ln={get SUPPORT_RANGE_BOUNDS(){var y=dA(document);return Object.defineProperty(ln,"SUPPORT_RANGE_BOUNDS",{value:y}),y},get SUPPORT_WORD_BREAKING(){var y=ln.SUPPORT_RANGE_BOUNDS&&hA(document);return Object.defineProperty(ln,"SUPPORT_WORD_BREAKING",{value:y}),y},get SUPPORT_SVG_DRAWING(){var y=yo(document);return Object.defineProperty(ln,"SUPPORT_SVG_DRAWING",{value:y}),y},get SUPPORT_FOREIGNOBJECT_DRAWING(){var y=typeof Array.from=="function"&&typeof window.fetch=="function"?wa(document):Promise.resolve(!1);return Object.defineProperty(ln,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:y}),y},get SUPPORT_CORS_IMAGES(){var y=fA();return Object.defineProperty(ln,"SUPPORT_CORS_IMAGES",{value:y}),y},get SUPPORT_RESPONSE_TYPE(){var y=pA();return Object.defineProperty(ln,"SUPPORT_RESPONSE_TYPE",{value:y}),y},get SUPPORT_CORS_XHR(){var y="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ln,"SUPPORT_CORS_XHR",{value:y}),y},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var y=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(ln,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:y}),y}},Wi=function(){function y(c,S){this.text=c,this.bounds=S}return y}(),gA=function(y,c,S,B){var W=As(c,S),te=[],fe=0;return W.forEach(function(xe){if(S.textDecorationLine.length||xe.trim().length>0)if(ln.SUPPORT_RANGE_BOUNDS){var Be=Eo(B,fe,xe.length).getClientRects();if(Be.length>1){var Ve=Gi(xe),Je=0;Ve.forEach(function(ct){te.push(new Wi(ct,Z.fromDOMRectList(y,Eo(B,Je+fe,ct.length).getClientRects()))),Je+=ct.length})}else te.push(new Wi(xe,Z.fromDOMRectList(y,Be)))}else{var lt=B.splitText(xe.length);te.push(new Wi(xe,mA(y,B))),B=lt}else ln.SUPPORT_RANGE_BOUNDS||(B=B.splitText(xe.length));fe+=xe.length}),te},mA=function(y,c){var S=c.ownerDocument;if(S){var B=S.createElement("html2canvaswrapper");B.appendChild(c.cloneNode(!0));var W=c.parentNode;if(W){W.replaceChild(B,c);var te=M(y,B);return B.firstChild&&W.replaceChild(B.firstChild,B),te}}return Z.EMPTY},Eo=function(y,c,S){var B=y.ownerDocument;if(!B)throw new Error("Node has no owner document");var W=B.createRange();return W.setStart(y,c),W.setEnd(y,c+S),W},Gi=function(y){if(ln.SUPPORT_NATIVE_TEXT_SEGMENTATION){var c=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(c.segment(y)).map(function(S){return S.segment})}return cA(y)},bo=function(y,c){if(ln.SUPPORT_NATIVE_TEXT_SEGMENTATION){var S=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(S.segment(y)).map(function(B){return B.segment})}return vA(y,c)},As=function(y,c){return c.letterSpacing!==0?Gi(y):bo(y,c)},us=[32,160,4961,65792,65793,4153,4241],vA=function(y,c){for(var S=kr(y,{lineBreak:c.lineBreak,wordBreak:c.overflowWrap==="break-word"?"break-word":c.wordBreak}),B=[],W,te=function(){if(W.value){var fe=W.value.slice(),xe=O(fe),Be="";xe.forEach(function(Ve){us.indexOf(Ve)===-1?Be+=h(Ve):(Be.length&&B.push(Be),B.push(h(Ve)),Be="")}),Be.length&&B.push(Be)}};!(W=S.next()).done;)te();return B},yA=function(){function y(c,S,B){this.text=EA(S.data,B.textTransform),this.textBounds=gA(c,this.text,B,S)}return y}(),EA=function(y,c){switch(c){case 1:return y.toLowerCase();case 3:return y.replace(bA,_A);case 2:return y.toUpperCase();default:return y}},bA=/(^|\s|:|-|\(|\))([a-z])/g,_A=function(y,c,S){return y.length>0?c+S.toUpperCase():y},cs=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;return W.src=B.currentSrc||B.src,W.intrinsicWidth=B.naturalWidth,W.intrinsicHeight=B.naturalHeight,W.context.cache.addImage(W.src),W}return c}(Un),_o=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;return W.canvas=B,W.intrinsicWidth=B.width,W.intrinsicHeight=B.height,W}return c}(Un),wo=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this,te=new XMLSerializer,fe=M(S,B);return B.setAttribute("width",fe.width+"px"),B.setAttribute("height",fe.height+"px"),W.svg="data:image/svg+xml,"+encodeURIComponent(te.serializeToString(B)),W.intrinsicWidth=B.width.baseVal.value,W.intrinsicHeight=B.height.baseVal.value,W.context.cache.addImage(W.svg),W}return c}(Un),Co=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;return W.value=B.value,W}return c}(Un),ds=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;return W.start=B.start,W.reversed=typeof B.reversed=="boolean"&&B.reversed===!0,W}return c}(Un),wA=[{type:15,flags:0,unit:"px",number:3}],CA=[{type:16,flags:0,number:50}],TA=function(y){return y.width>y.height?new Z(y.left+(y.width-y.height)/2,y.top,y.height,y.height):y.width<y.height?new Z(y.left,y.top+(y.height-y.width)/2,y.width,y.width):y},BA=function(y){var c=y.type===xA?new Array(y.value.length+1).join("\u2022"):y.value;return c.length===0?y.placeholder||"":c},Ta="checkbox",Ba="radio",xA="password",To=707406591,xa=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;W.type=B.type.toLowerCase(),W.checked=B.checked,W.value=BA(B),(W.type===Ta||W.type===Ba)&&(W.styles.backgroundColor=3739148031,W.styles.borderTopColor=W.styles.borderRightColor=W.styles.borderBottomColor=W.styles.borderLeftColor=2779096575,W.styles.borderTopWidth=W.styles.borderRightWidth=W.styles.borderBottomWidth=W.styles.borderLeftWidth=1,W.styles.borderTopStyle=W.styles.borderRightStyle=W.styles.borderBottomStyle=W.styles.borderLeftStyle=1,W.styles.backgroundClip=[0],W.styles.backgroundOrigin=[0],W.bounds=TA(W.bounds));switch(W.type){case Ta:W.styles.borderTopRightRadius=W.styles.borderTopLeftRadius=W.styles.borderBottomRightRadius=W.styles.borderBottomLeftRadius=wA;break;case Ba:W.styles.borderTopRightRadius=W.styles.borderTopLeftRadius=W.styles.borderBottomRightRadius=W.styles.borderBottomLeftRadius=CA;break}return W}return c}(Un),hs=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this,te=B.options[B.selectedIndex||0];return W.value=te&&te.text||"",W}return c}(Un),Bo=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;return W.value=B.value,W}return c}(Un),xo=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;W.src=B.src,W.width=parseInt(B.width,10)||0,W.height=parseInt(B.height,10)||0,W.backgroundColor=W.styles.backgroundColor;try{if(B.contentWindow&&B.contentWindow.document&&B.contentWindow.document.documentElement){W.tree=Io(S,B.contentWindow.document.documentElement);var te=B.contentWindow.document.documentElement?Li(S,getComputedStyle(B.contentWindow.document.documentElement).backgroundColor):Qn.TRANSPARENT,fe=B.contentWindow.document.body?Li(S,getComputedStyle(B.contentWindow.document.body).backgroundColor):Qn.TRANSPARENT;W.backgroundColor=Yn(te)?Yn(fe)?W.styles.backgroundColor:fe:te}}catch(xe){}return W}return c}(Un),SA=["OL","UL","MENU"],Vi=function(y,c,S,B){for(var W=c.firstChild,te=void 0;W;W=te)if(te=W.nextSibling,Oo(W)&&W.data.trim().length>0)S.textNodes.push(new yA(y,W,S.styles));else if(ni(W))if(de(W)&&W.assignedNodes)W.assignedNodes().forEach(function(xe){return Vi(y,xe,S,B)});else{var fe=So(y,W);fe.styles.isVisible()&&(IA(W,fe,B)?fe.flags|=4:OA(fe.styles)&&(fe.flags|=2),SA.indexOf(W.tagName)!==-1&&(fe.flags|=8),S.elements.push(fe),W.slot,W.shadowRoot?Vi(y,W.shadowRoot,fe,B):!ne(W)&&!Do(W)&&!ce(W)&&Vi(y,W,fe,B))}},So=function(y,c){return w(c)?new cs(y,c):ms(c)?new _o(y,c):Do(c)?new wo(y,c):ps(c)?new Co(y,c):Ro(c)?new ds(y,c):RA(c)?new xa(y,c):ce(c)?new hs(y,c):ne(c)?new Bo(y,c):D(c)?new xo(y,c):new Un(y,c)},Io=function(y,c){var S=So(y,c);return S.flags|=4,Vi(y,c,S,S),S},IA=function(y,c,S){return c.styles.isPositionedWithZIndex()||c.styles.opacity<1||c.styles.isTransformed()||gs(y)&&S.styles.isTransparent()},OA=function(y){return y.isPositioned()||y.isFloating()},Oo=function(y){return y.nodeType===Node.TEXT_NODE},ni=function(y){return y.nodeType===Node.ELEMENT_NODE},fs=function(y){return ni(y)&&typeof y.style!="undefined"&&!Sa(y)},Sa=function(y){return typeof y.className=="object"},ps=function(y){return y.tagName==="LI"},Ro=function(y){return y.tagName==="OL"},RA=function(y){return y.tagName==="INPUT"},DA=function(y){return y.tagName==="HTML"},Do=function(y){return y.tagName==="svg"},gs=function(y){return y.tagName==="BODY"},ms=function(y){return y.tagName==="CANVAS"},p=function(y){return y.tagName==="VIDEO"},w=function(y){return y.tagName==="IMG"},D=function(y){return y.tagName==="IFRAME"},G=function(y){return y.tagName==="STYLE"},ie=function(y){return y.tagName==="SCRIPT"},ne=function(y){return y.tagName==="TEXTAREA"},ce=function(y){return y.tagName==="SELECT"},de=function(y){return y.tagName==="SLOT"},Re=function(y){return y.tagName.indexOf("-")>0},Qe=function(){function y(){this.counters={}}return y.prototype.getCounterValue=function(c){var S=this.counters[c];return S&&S.length?S[S.length-1]:1},y.prototype.getCounterValues=function(c){var S=this.counters[c];return S||[]},y.prototype.pop=function(c){var S=this;c.forEach(function(B){return S.counters[B].pop()})},y.prototype.parse=function(c){var S=this,B=c.counterIncrement,W=c.counterReset,te=!0;B!==null&&B.forEach(function(xe){var Be=S.counters[xe.counter];Be&&xe.increment!==0&&(te=!1,Be.length||Be.push(1),Be[Math.max(0,Be.length-1)]+=xe.increment)});var fe=[];return te&&W.forEach(function(xe){var Be=S.counters[xe.counter];fe.push(xe.counter),Be||(Be=S.counters[xe.counter]=[]),Be.push(xe.reset)}),fe},y}(),je={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Le={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},De={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Ge={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},et=function(y,c,S,B,W,te){return y<c||y>S?hn(y,W,te.length>0):B.integers.reduce(function(fe,xe,Be){for(;y>=xe;)y-=xe,fe+=B.values[Be];return fe},"")+te},xt=function(y,c,S,B){var W="";do S||y--,W=B(y)+W,y/=c;while(y*c>=c);return W},wt=function(y,c,S,B,W){var te=S-c+1;return(y<0?"-":"")+(xt(Math.abs(y),te,B,function(fe){return h(Math.floor(fe%te)+c)})+W)},Dt=function(y,c,S){S===void 0&&(S=". ");var B=c.length;return xt(Math.abs(y),B,!1,function(W){return c[Math.floor(W%B)]})+S},Ut=1<<0,Xt=1<<1,Zt=1<<2,pr=1<<3,Ar=function(y,c,S,B,W,te){if(y<-9999||y>9999)return hn(y,4,W.length>0);var fe=Math.abs(y),xe=W;if(fe===0)return c[0]+xe;for(var Be=0;fe>0&&Be<=4;Be++){var Ve=fe%10;Ve===0&&tn(te,Ut)&&xe!==""?xe=c[Ve]+xe:Ve>1||Ve===1&&Be===0||Ve===1&&Be===1&&tn(te,Xt)||Ve===1&&Be===1&&tn(te,Zt)&&y>100||Ve===1&&Be>1&&tn(te,pr)?xe=c[Ve]+(Be>0?S[Be-1]:"")+xe:Ve===1&&Be>0&&(xe=S[Be-1]+xe),fe=Math.floor(fe/10)}return(y<0?B:"")+xe},Dr="\u5341\u767E\u5343\u842C",An="\u62FE\u4F70\u4EDF\u842C",_r="\u30DE\u30A4\u30CA\u30B9",rn="\uB9C8\uC774\uB108\uC2A4",hn=function(y,c,S){var B=S?". ":"",W=S?"\u3001":"",te=S?", ":"",fe=S?" ":"";switch(c){case 0:return"\u2022"+fe;case 1:return"\u25E6"+fe;case 2:return"\u25FE"+fe;case 5:var xe=wt(y,48,57,!0,B);return xe.length<4?"0"+xe:xe;case 4:return Dt(y,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",W);case 6:return et(y,1,3999,je,3,B).toLowerCase();case 7:return et(y,1,3999,je,3,B);case 8:return wt(y,945,969,!1,B);case 9:return wt(y,97,122,!1,B);case 10:return wt(y,65,90,!1,B);case 11:return wt(y,1632,1641,!0,B);case 12:case 49:return et(y,1,9999,Le,3,B);case 35:return et(y,1,9999,Le,3,B).toLowerCase();case 13:return wt(y,2534,2543,!0,B);case 14:case 30:return wt(y,6112,6121,!0,B);case 15:return Dt(y,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",W);case 16:return Dt(y,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",W);case 17:case 48:return Ar(y,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Dr,"\u8CA0",W,Xt|Zt|pr);case 47:return Ar(y,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",An,"\u8CA0",W,Ut|Xt|Zt|pr);case 42:return Ar(y,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Dr,"\u8D1F",W,Xt|Zt|pr);case 41:return Ar(y,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",An,"\u8D1F",W,Ut|Xt|Zt|pr);case 26:return Ar(y,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",_r,W,0);case 25:return Ar(y,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",_r,W,Ut|Xt|Zt);case 31:return Ar(y,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",rn,te,Ut|Xt|Zt);case 33:return Ar(y,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",rn,te,0);case 32:return Ar(y,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",rn,te,Ut|Xt|Zt);case 18:return wt(y,2406,2415,!0,B);case 20:return et(y,1,19999,Ge,3,B);case 21:return wt(y,2790,2799,!0,B);case 22:return wt(y,2662,2671,!0,B);case 22:return et(y,1,10999,De,3,B);case 23:return Dt(y,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Dt(y,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return wt(y,3302,3311,!0,B);case 28:return Dt(y,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",W);case 29:return Dt(y,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",W);case 34:return wt(y,3792,3801,!0,B);case 37:return wt(y,6160,6169,!0,B);case 38:return wt(y,4160,4169,!0,B);case 39:return wt(y,2918,2927,!0,B);case 40:return wt(y,1776,1785,!0,B);case 43:return wt(y,3046,3055,!0,B);case 44:return wt(y,3174,3183,!0,B);case 45:return wt(y,3664,3673,!0,B);case 46:return wt(y,3872,3881,!0,B);case 3:default:return wt(y,48,57,!0,B)}},yn="data-html2canvas-ignore",ii=function(){function y(c,S,B){if(this.context=c,this.options=B,this.scrolledElements=[],this.referenceElement=S,this.counters=new Qe,this.quoteDepth=0,!S.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(S.ownerDocument.documentElement,!1)}return y.prototype.toIFrame=function(c,S){var B=this,W=vi(c,S);if(!W.contentWindow)return Promise.reject("Unable to find iframe window");var te=c.defaultView.pageXOffset,fe=c.defaultView.pageYOffset,xe=W.contentWindow,Be=xe.document,Ve=Lo(W).then(function(){return X(B,void 0,void 0,function(){var Je,lt;return F(this,function(ct){switch(ct.label){case 0:return this.scrolledElements.forEach(FA),xe&&(xe.scrollTo(S.left,S.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(xe.scrollY!==S.top||xe.scrollX!==S.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(xe.scrollX-S.left,xe.scrollY-S.top,0,0))),Je=this.options.onclone,lt=this.clonedReferenceElement,typeof lt=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Be.fonts&&Be.fonts.ready?[4,Be.fonts.ready]:[3,2];case 1:ct.sent(),ct.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,LA(Be)]:[3,4];case 3:ct.sent(),ct.label=4;case 4:return typeof Je=="function"?[2,Promise.resolve().then(function(){return Je(Be,lt)}).then(function(){return W})]:[2,W]}})})});return Be.open(),Be.write(UA(document.doctype)+"<html></html>"),Oa(this.referenceElement.ownerDocument,te,fe),Be.replaceChild(Be.adoptNode(this.documentElement),Be.documentElement),Be.close(),Ve},y.prototype.createElementClone=function(c){if(qa(c,2))debugger;if(ms(c))return this.createCanvasClone(c);if(p(c))return this.createVideoClone(c);if(G(c))return this.createStyleClone(c);var S=c.cloneNode(!1);return w(S)&&(w(c)&&c.currentSrc&&c.currentSrc!==c.src&&(S.src=c.currentSrc,S.srcset=""),S.loading==="lazy"&&(S.loading="eager")),Re(S)?this.createCustomElementClone(S):S},y.prototype.createCustomElementClone=function(c){var S=document.createElement("html2canvascustomelement");return Ia(c.style,S),S},y.prototype.createStyleClone=function(c){try{var S=c.sheet;if(S&&S.cssRules){var B=[].slice.call(S.cssRules,0).reduce(function(te,fe){return fe&&typeof fe.cssText=="string"?te+fe.cssText:te},""),W=c.cloneNode(!1);return W.textContent=B,W}}catch(te){if(this.context.logger.error("Unable to access cssRules property",te),te.name!=="SecurityError")throw te}return c.cloneNode(!1)},y.prototype.createCanvasClone=function(c){var S;if(this.options.inlineImages&&c.ownerDocument){var B=c.ownerDocument.createElement("img");try{return B.src=c.toDataURL(),B}catch(Ve){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",c)}}var W=c.cloneNode(!1);try{W.width=c.width,W.height=c.height;var te=c.getContext("2d"),fe=W.getContext("2d");if(fe)if(!this.options.allowTaint&&te)fe.putImageData(te.getImageData(0,0,c.width,c.height),0,0);else{var xe=(S=c.getContext("webgl2"))!==null&&S!==void 0?S:c.getContext("webgl");if(xe){var Be=xe.getContextAttributes();(Be==null?void 0:Be.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",c)}fe.drawImage(c,0,0)}return W}catch(Ve){this.context.logger.info("Unable to clone canvas as it is tainted",c)}return W},y.prototype.createVideoClone=function(c){var S=c.ownerDocument.createElement("canvas");S.width=c.offsetWidth,S.height=c.offsetHeight;var B=S.getContext("2d");try{return B&&(B.drawImage(c,0,0,S.width,S.height),this.options.allowTaint||B.getImageData(0,0,S.width,S.height)),S}catch(te){this.context.logger.info("Unable to clone video as it is tainted",c)}var W=c.ownerDocument.createElement("canvas");return W.width=c.offsetWidth,W.height=c.offsetHeight,W},y.prototype.appendChildNode=function(c,S,B){(!ni(S)||!ie(S)&&!S.hasAttribute(yn)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(S)))&&((!this.options.copyStyles||!ni(S)||!G(S))&&c.appendChild(this.cloneNode(S,B)))},y.prototype.cloneChildNodes=function(c,S,B){for(var W=this,te=c.shadowRoot?c.shadowRoot.firstChild:c.firstChild;te;te=te.nextSibling)if(ni(te)&&de(te)&&typeof te.assignedNodes=="function"){var fe=te.assignedNodes();fe.length&&fe.forEach(function(xe){return W.appendChildNode(S,xe,B)})}else this.appendChildNode(S,te,B)},y.prototype.cloneNode=function(c,S){if(Oo(c))return document.createTextNode(c.data);if(!c.ownerDocument)return c.cloneNode(!1);var B=c.ownerDocument.defaultView;if(B&&ni(c)&&(fs(c)||Sa(c))){var W=this.createElementClone(c);W.style.transitionProperty="none";var te=B.getComputedStyle(c),fe=B.getComputedStyle(c,":before"),xe=B.getComputedStyle(c,":after");this.referenceElement===c&&fs(W)&&(this.clonedReferenceElement=W),gs(W)&&PA(W);var Be=this.counters.parse(new Za(this.context,te)),Ve=this.resolvePseudoContent(c,W,fe,Kn.BEFORE);Re(c)&&(S=!0),p(c)||this.cloneChildNodes(c,W,S),Ve&&W.insertBefore(Ve,W.firstChild);var Je=this.resolvePseudoContent(c,W,xe,Kn.AFTER);return Je&&W.appendChild(Je),this.counters.pop(Be),(te&&(this.options.copyStyles||Sa(c))&&!D(c)||S)&&Ia(te,W),(c.scrollTop!==0||c.scrollLeft!==0)&&this.scrolledElements.push([W,c.scrollLeft,c.scrollTop]),(ne(c)||ce(c))&&(ne(W)||ce(W))&&(W.value=c.value),W}return c.cloneNode(!1)},y.prototype.resolvePseudoContent=function(c,S,B,W){var te=this;if(!B)return;var fe=B.content,xe=S.ownerDocument;if(!xe||!fe||fe==="none"||fe==="-moz-alt-content"||B.display==="none")return;this.counters.parse(new Za(this.context,B));var Be=new ga(this.context,B),Ve=xe.createElement("html2canvaspseudoelement");Ia(B,Ve),Be.content.forEach(function(lt){if(lt.type===0)Ve.appendChild(xe.createTextNode(lt.value));else if(lt.type===22){var ct=xe.createElement("img");ct.src=lt.value,ct.style.opacity="1",Ve.appendChild(ct)}else if(lt.type===18){if(lt.name==="attr"){var jt=lt.values.filter(Or);jt.length&&Ve.appendChild(xe.createTextNode(c.getAttribute(jt[0].value)||""))}else if(lt.name==="counter"){var St=lt.values.filter(Vn),Ft=St[0],lr=St[1];if(Ft&&Or(Ft)){var Qt=te.counters.getCounterValue(Ft.value),Gt=lr&&Or(lr)?pn.parse(te.context,lr.value):3;Ve.appendChild(xe.createTextNode(hn(Qt,Gt,!1)))}}else if(lt.name==="counters"){var wr=lt.values.filter(Vn),Ft=wr[0],gr=wr[1],lr=wr[2];if(Ft&&Or(Ft)){var Sr=te.counters.getCounterValues(Ft.value),Wt=lr&&Or(lr)?pn.parse(te.context,lr.value):3,Br=gr&&gr.type===0?gr.value:"",Ir=Sr.map(function(Cn){return hn(Cn,Wt,!1)}).join(Br);Ve.appendChild(xe.createTextNode(Ir))}}}else if(lt.type===20)switch(lt.value){case"open-quote":Ve.appendChild(xe.createTextNode(no(Be.quotes,te.quoteDepth++,!0)));break;case"close-quote":Ve.appendChild(xe.createTextNode(no(Be.quotes,--te.quoteDepth,!1)));break;default:Ve.appendChild(xe.createTextNode(lt.value))}}),Ve.className=ys+" "+Es;var Je=W===Kn.BEFORE?" "+ys:" "+Es;return Sa(S)?S.className.baseValue+=Je:S.className+=Je,Ve},y.destroy=function(c){return c.parentNode?(c.parentNode.removeChild(c),!0):!1},y}(),Kn;(function(y){y[y.BEFORE=0]="BEFORE",y[y.AFTER=1]="AFTER"})(Kn||(Kn={}));var vi=function(y,c){var S=y.createElement("iframe");return S.className="html2canvas-container",S.style.visibility="hidden",S.style.position="fixed",S.style.left="-10000px",S.style.top="0px",S.style.border="0",S.width=c.width.toString(),S.height=c.height.toString(),S.scrolling="no",S.setAttribute(yn,"true"),y.body.appendChild(S),S},zi=function(y){return new Promise(function(c){if(y.complete){c();return}if(!y.src){c();return}y.onload=c,y.onerror=c})},LA=function(y){return Promise.all([].slice.call(y.images,0).map(zi))},Lo=function(y){return new Promise(function(c,S){var B=y.contentWindow;if(!B)return S("No window assigned for iframe");var W=B.document;B.onload=y.onload=function(){B.onload=y.onload=null;var te=setInterval(function(){W.body.childNodes.length>0&&W.readyState==="complete"&&(clearInterval(te),c(y))},50)}})},Uo=["all","d","content"],Ia=function(y,c){for(var S=y.length-1;S>=0;S--){var B=y.item(S);Uo.indexOf(B)===-1&&c.style.setProperty(B,y.getPropertyValue(B))}return c},UA=function(y){var c="";return y&&(c+="<!DOCTYPE ",y.name&&(c+=y.name),y.internalSubset&&(c+=y.internalSubset),y.publicId&&(c+='"'+y.publicId+'"'),y.systemId&&(c+='"'+y.systemId+'"'),c+=">"),c},Oa=function(y,c,S){y&&y.defaultView&&(c!==y.defaultView.pageXOffset||S!==y.defaultView.pageYOffset)&&y.defaultView.scrollTo(c,S)},FA=function(y){var c=y[0],S=y[1],B=y[2];c.scrollLeft=S,c.scrollTop=B},NA=":before",vs=":after",ys="___html2canvas___pseudoelement_before",Es="___html2canvas___pseudoelement_after",Fo=`{
content: "" !important;
display: none !important;
}`,PA=function(y){MA(y,"."+ys+NA+Fo+`
.`+Es+vs+Fo)},MA=function(y,c){var S=y.ownerDocument;if(S){var B=S.createElement("style");B.textContent=c,y.appendChild(B)}},No=function(){function y(){}return y.getOrigin=function(c){var S=y._link;return S?(S.href=c,S.href=S.href,S.protocol+S.hostname+S.port):"about:blank"},y.isSameOrigin=function(c){return y.getOrigin(c)===y._origin},y.setContext=function(c){y._link=c.document.createElement("a"),y._origin=y.getOrigin(c.location.href)},y._origin="about:blank",y}(),qA=function(){function y(c,S){this.context=c,this._options=S,this._cache={}}return y.prototype.addImage=function(c){var S=Promise.resolve();return this.has(c)||(HA(c)||nu(c))&&(this._cache[c]=this.loadImage(c)).catch(function(){}),S},y.prototype.match=function(c){return this._cache[c]},y.prototype.loadImage=function(c){return X(this,void 0,void 0,function(){var S,B,W,te,fe=this;return F(this,function(xe){switch(xe.label){case 0:return S=No.isSameOrigin(c),B=!kA(c)&&this._options.useCORS===!0&&ln.SUPPORT_CORS_IMAGES&&!S,W=!kA(c)&&!S&&!HA(c)&&typeof this._options.proxy=="string"&&ln.SUPPORT_CORS_XHR&&!B,!S&&this._options.allowTaint===!1&&!kA(c)&&!HA(c)&&!W&&!B?[2]:(te=c,W?[4,this.proxy(te)]:[3,2]);case 1:te=xe.sent(),xe.label=2;case 2:return this.context.logger.debug("Added image "+c.substring(0,256)),[4,new Promise(function(Be,Ve){var Je=new Image;Je.onload=function(){return Be(Je)},Je.onerror=Ve,(iu(te)||B)&&(Je.crossOrigin="anonymous"),Je.src=te,Je.complete===!0&&setTimeout(function(){return Be(Je)},500),fe._options.imageTimeout>0&&setTimeout(function(){return Ve("Timed out ("+fe._options.imageTimeout+"ms) loading image")},fe._options.imageTimeout)})];case 3:return[2,xe.sent()]}})})},y.prototype.has=function(c){return typeof this._cache[c]!="undefined"},y.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},y.prototype.proxy=function(c){var S=this,B=this._options.proxy;if(!B)throw new Error("No proxy defined");var W=c.substring(0,256);return new Promise(function(te,fe){var xe=ln.SUPPORT_RESPONSE_TYPE?"blob":"text",Be=new XMLHttpRequest;Be.onload=function(){if(Be.status===200)if(xe==="text")te(Be.response);else{var lt=new FileReader;lt.addEventListener("load",function(){return te(lt.result)},!1),lt.addEventListener("error",function(ct){return fe(ct)},!1),lt.readAsDataURL(Be.response)}else fe("Failed to proxy resource "+W+" with status code "+Be.status)},Be.onerror=fe;var Ve=B.indexOf("?")>-1?"&":"?";if(Be.open("GET",""+B+Ve+"url="+encodeURIComponent(c)+"&responseType="+xe),xe!=="text"&&Be instanceof XMLHttpRequest&&(Be.responseType=xe),S._options.imageTimeout){var Je=S._options.imageTimeout;Be.timeout=Je,Be.ontimeout=function(){return fe("Timed out ("+Je+"ms) proxying "+W)}}Be.send()})},y}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(y){return ln.SUPPORT_SVG_DRAWING||!au(y)},kA=function(y){return ru.test(y)},iu=function(y){return tu.test(y)},HA=function(y){return y.substr(0,4)==="blob"},au=function(y){return y.substr(-3).toLowerCase()==="svg"||eu.test(y)},Ht=function(){function y(c,S){this.type=0,this.x=c,this.y=S}return y.prototype.add=function(c,S){return new y(this.x+c,this.y+S)},y}(),Ra=function(y,c,S){return new Ht(y.x+(c.x-y.x)*S,y.y+(c.y-y.y)*S)},Po=function(){function y(c,S,B,W){this.type=1,this.start=c,this.startControl=S,this.endControl=B,this.end=W}return y.prototype.subdivide=function(c,S){var B=Ra(this.start,this.startControl,c),W=Ra(this.startControl,this.endControl,c),te=Ra(this.endControl,this.end,c),fe=Ra(B,W,c),xe=Ra(W,te,c),Be=Ra(fe,xe,c);return S?new y(this.start,B,fe,Be):new y(Be,xe,te,this.end)},y.prototype.add=function(c,S){return new y(this.start.add(c,S),this.startControl.add(c,S),this.endControl.add(c,S),this.end.add(c,S))},y.prototype.reverse=function(){return new y(this.end,this.endControl,this.startControl,this.start)},y}(),Fn=function(y){return y.type===1},su=function(){function y(c){var S=c.styles,B=c.bounds,W=Hn(S.borderTopLeftRadius,B.width,B.height),te=W[0],fe=W[1],xe=Hn(S.borderTopRightRadius,B.width,B.height),Be=xe[0],Ve=xe[1],Je=Hn(S.borderBottomRightRadius,B.width,B.height),lt=Je[0],ct=Je[1],jt=Hn(S.borderBottomLeftRadius,B.width,B.height),St=jt[0],Ft=jt[1],lr=[];lr.push((te+Be)/B.width),lr.push((St+lt)/B.width),lr.push((fe+Ft)/B.height),lr.push((Ve+ct)/B.height);var Qt=Math.max.apply(Math,lr);Qt>1&&(te/=Qt,fe/=Qt,Be/=Qt,Ve/=Qt,lt/=Qt,ct/=Qt,St/=Qt,Ft/=Qt);var Gt=B.width-Be,wr=B.height-ct,gr=B.width-lt,Sr=B.height-Ft,Wt=S.borderTopWidth,Br=S.borderRightWidth,Ir=S.borderBottomWidth,dr=S.borderLeftWidth,Bn=Rr(S.paddingTop,c.bounds.width),Cn=Rr(S.paddingRight,c.bounds.width),On=Rr(S.paddingBottom,c.bounds.width),fn=Rr(S.paddingLeft,c.bounds.width);this.topLeftBorderDoubleOuterBox=te>0||fe>0?$r(B.left+dr/3,B.top+Wt/3,te-dr/3,fe-Wt/3,Lr.TOP_LEFT):new Ht(B.left+dr/3,B.top+Wt/3),this.topRightBorderDoubleOuterBox=te>0||fe>0?$r(B.left+Gt,B.top+Wt/3,Be-Br/3,Ve-Wt/3,Lr.TOP_RIGHT):new Ht(B.left+B.width-Br/3,B.top+Wt/3),this.bottomRightBorderDoubleOuterBox=lt>0||ct>0?$r(B.left+gr,B.top+wr,lt-Br/3,ct-Ir/3,Lr.BOTTOM_RIGHT):new Ht(B.left+B.width-Br/3,B.top+B.height-Ir/3),this.bottomLeftBorderDoubleOuterBox=St>0||Ft>0?$r(B.left+dr/3,B.top+Sr,St-dr/3,Ft-Ir/3,Lr.BOTTOM_LEFT):new Ht(B.left+dr/3,B.top+B.height-Ir/3),this.topLeftBorderDoubleInnerBox=te>0||fe>0?$r(B.left+dr*2/3,B.top+Wt*2/3,te-dr*2/3,fe-Wt*2/3,Lr.TOP_LEFT):new Ht(B.left+dr*2/3,B.top+Wt*2/3),this.topRightBorderDoubleInnerBox=te>0||fe>0?$r(B.left+Gt,B.top+Wt*2/3,Be-Br*2/3,Ve-Wt*2/3,Lr.TOP_RIGHT):new Ht(B.left+B.width-Br*2/3,B.top+Wt*2/3),this.bottomRightBorderDoubleInnerBox=lt>0||ct>0?$r(B.left+gr,B.top+wr,lt-Br*2/3,ct-Ir*2/3,Lr.BOTTOM_RIGHT):new Ht(B.left+B.width-Br*2/3,B.top+B.height-Ir*2/3),this.bottomLeftBorderDoubleInnerBox=St>0||Ft>0?$r(B.left+dr*2/3,B.top+Sr,St-dr*2/3,Ft-Ir*2/3,Lr.BOTTOM_LEFT):new Ht(B.left+dr*2/3,B.top+B.height-Ir*2/3),this.topLeftBorderStroke=te>0||fe>0?$r(B.left+dr/2,B.top+Wt/2,te-dr/2,fe-Wt/2,Lr.TOP_LEFT):new Ht(B.left+dr/2,B.top+Wt/2),this.topRightBorderStroke=te>0||fe>0?$r(B.left+Gt,B.top+Wt/2,Be-Br/2,Ve-Wt/2,Lr.TOP_RIGHT):new Ht(B.left+B.width-Br/2,B.top+Wt/2),this.bottomRightBorderStroke=lt>0||ct>0?$r(B.left+gr,B.top+wr,lt-Br/2,ct-Ir/2,Lr.BOTTOM_RIGHT):new Ht(B.left+B.width-Br/2,B.top+B.height-Ir/2),this.bottomLeftBorderStroke=St>0||Ft>0?$r(B.left+dr/2,B.top+Sr,St-dr/2,Ft-Ir/2,Lr.BOTTOM_LEFT):new Ht(B.left+dr/2,B.top+B.height-Ir/2),this.topLeftBorderBox=te>0||fe>0?$r(B.left,B.top,te,fe,Lr.TOP_LEFT):new Ht(B.left,B.top),this.topRightBorderBox=Be>0||Ve>0?$r(B.left+Gt,B.top,Be,Ve,Lr.TOP_RIGHT):new Ht(B.left+B.width,B.top),this.bottomRightBorderBox=lt>0||ct>0?$r(B.left+gr,B.top+wr,lt,ct,Lr.BOTTOM_RIGHT):new Ht(B.left+B.width,B.top+B.height),this.bottomLeftBorderBox=St>0||Ft>0?$r(B.left,B.top+Sr,St,Ft,Lr.BOTTOM_LEFT):new Ht(B.left,B.top+B.height),this.topLeftPaddingBox=te>0||fe>0?$r(B.left+dr,B.top+Wt,Math.max(0,te-dr),Math.max(0,fe-Wt),Lr.TOP_LEFT):new Ht(B.left+dr,B.top+Wt),this.topRightPaddingBox=Be>0||Ve>0?$r(B.left+Math.min(Gt,B.width-Br),B.top+Wt,Gt>B.width+Br?0:Math.max(0,Be-Br),Math.max(0,Ve-Wt),Lr.TOP_RIGHT):new Ht(B.left+B.width-Br,B.top+Wt),this.bottomRightPaddingBox=lt>0||ct>0?$r(B.left+Math.min(gr,B.width-dr),B.top+Math.min(wr,B.height-Ir),Math.max(0,lt-Br),Math.max(0,ct-Ir),Lr.BOTTOM_RIGHT):new Ht(B.left+B.width-Br,B.top+B.height-Ir),this.bottomLeftPaddingBox=St>0||Ft>0?$r(B.left+dr,B.top+Math.min(Sr,B.height-Ir),Math.max(0,St-dr),Math.max(0,Ft-Ir),Lr.BOTTOM_LEFT):new Ht(B.left+dr,B.top+B.height-Ir),this.topLeftContentBox=te>0||fe>0?$r(B.left+dr+fn,B.top+Wt+Bn,Math.max(0,te-(dr+fn)),Math.max(0,fe-(Wt+Bn)),Lr.TOP_LEFT):new Ht(B.left+dr+fn,B.top+Wt+Bn),this.topRightContentBox=Be>0||Ve>0?$r(B.left+Math.min(Gt,B.width+dr+fn),B.top+Wt+Bn,Gt>B.width+dr+fn?0:Be-dr+fn,Ve-(Wt+Bn),Lr.TOP_RIGHT):new Ht(B.left+B.width-(Br+Cn),B.top+Wt+Bn),this.bottomRightContentBox=lt>0||ct>0?$r(B.left+Math.min(gr,B.width-(dr+fn)),B.top+Math.min(wr,B.height+Wt+Bn),Math.max(0,lt-(Br+Cn)),ct-(Ir+On),Lr.BOTTOM_RIGHT):new Ht(B.left+B.width-(Br+Cn),B.top+B.height-(Ir+On)),this.bottomLeftContentBox=St>0||Ft>0?$r(B.left+dr+fn,B.top+Sr,Math.max(0,St-(dr+fn)),Ft-(Ir+On),Lr.BOTTOM_LEFT):new Ht(B.left+dr+fn,B.top+B.height-(Ir+On))}return y}(),Lr;(function(y){y[y.TOP_LEFT=0]="TOP_LEFT",y[y.TOP_RIGHT=1]="TOP_RIGHT",y[y.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",y[y.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Lr||(Lr={}));var $r=function(y,c,S,B,W){var te=4*((Math.sqrt(2)-1)/3),fe=S*te,xe=B*te,Be=y+S,Ve=c+B;switch(W){case Lr.TOP_LEFT:return new Po(new Ht(y,Ve),new Ht(y,Ve-xe),new Ht(Be-fe,c),new Ht(Be,c));case Lr.TOP_RIGHT:return new Po(new Ht(y,c),new Ht(y+fe,c),new Ht(Be,Ve-xe),new Ht(Be,Ve));case Lr.BOTTOM_RIGHT:return new Po(new Ht(Be,c),new Ht(Be,c+xe),new Ht(y+fe,Ve),new Ht(y,Ve));case Lr.BOTTOM_LEFT:default:return new Po(new Ht(Be,Ve),new Ht(Be-fe,Ve),new Ht(y,c+xe),new Ht(y,c))}},Mo=function(y){return[y.topLeftBorderBox,y.topRightBorderBox,y.bottomRightBorderBox,y.bottomLeftBorderBox]},ou=function(y){return[y.topLeftContentBox,y.topRightContentBox,y.bottomRightContentBox,y.bottomLeftContentBox]},ko=function(y){return[y.topLeftPaddingBox,y.topRightPaddingBox,y.bottomRightPaddingBox,y.bottomLeftPaddingBox]},lu=function(){function y(c,S,B){this.offsetX=c,this.offsetY=S,this.matrix=B,this.type=0,this.target=2|4}return y}(),Ho=function(){function y(c,S){this.path=c,this.target=S,this.type=1}return y}(),Au=function(){function y(c){this.opacity=c,this.type=2,this.target=2|4}return y}(),uu=function(y){return y.type===0},WA=function(y){return y.type===1},cu=function(y){return y.type===2},GA=function(y,c){return y.length===c.length?y.some(function(S,B){return S===c[B]}):!1},du=function(y,c,S,B,W){return y.map(function(te,fe){switch(fe){case 0:return te.add(c,S);case 1:return te.add(c+B,S);case 2:return te.add(c+B,S+W);case 3:return te.add(c,S+W)}return te})},VA=function(){function y(c){this.element=c,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return y}(),zA=function(){function y(c,S){if(this.container=c,this.parent=S,this.effects=[],this.curves=new su(this.container),this.container.styles.opacity<1&&this.effects.push(new Au(this.container.styles.opacity)),this.container.styles.transform!==null){var B=this.container.bounds.left+this.container.styles.transformOrigin[0].number,W=this.container.bounds.top+this.container.styles.transformOrigin[1].number,te=this.container.styles.transform;this.effects.push(new lu(B,W,te))}if(this.container.styles.overflowX!==0){var fe=Mo(this.curves),xe=ko(this.curves);GA(fe,xe)?this.effects.push(new Ho(fe,2|4)):(this.effects.push(new Ho(fe,2)),this.effects.push(new Ho(xe,4)))}}return y.prototype.getEffects=function(c){for(var S=[2,3].indexOf(this.container.styles.position)===-1,B=this.parent,W=this.effects.slice(0);B;){var te=B.effects.filter(function(Be){return!WA(Be)});if(S||B.container.styles.position!==0||!B.parent){if(W.unshift.apply(W,te),S=[2,3].indexOf(B.container.styles.position)===-1,B.container.styles.overflowX!==0){var fe=Mo(B.curves),xe=ko(B.curves);GA(fe,xe)||W.unshift(new Ho(xe,2|4))}}else W.unshift.apply(W,te);B=B.parent}return W.filter(function(Be){return tn(Be.target,c)})},y}(),QA=function(y,c,S,B){y.container.elements.forEach(function(W){var te=tn(W.flags,4),fe=tn(W.flags,2),xe=new zA(W,y);tn(W.styles.display,2048)&&B.push(xe);var Be=tn(W.flags,8)?[]:B;if(te||fe){var Ve=te||W.styles.isPositioned()?S:c,Je=new VA(xe);if(W.styles.isPositioned()||W.styles.opacity<1||W.styles.isTransformed()){var lt=W.styles.zIndex.order;if(lt<0){var ct=0;Ve.negativeZIndex.some(function(St,Ft){return lt>St.element.container.styles.zIndex.order?(ct=Ft,!1):ct>0}),Ve.negativeZIndex.splice(ct,0,Je)}else if(lt>0){var jt=0;Ve.positiveZIndex.some(function(St,Ft){return lt>=St.element.container.styles.zIndex.order?(jt=Ft+1,!1):jt>0}),Ve.positiveZIndex.splice(jt,0,Je)}else Ve.zeroOrAutoZIndexOrTransformedOrOpacity.push(Je)}else W.styles.isFloating()?Ve.nonPositionedFloats.push(Je):Ve.nonPositionedInlineLevel.push(Je);QA(xe,Je,te?Je:S,Be)}else W.styles.isInlineLevel()?c.inlineLevel.push(xe):c.nonInlineLevel.push(xe),QA(xe,c,S,Be);tn(W.flags,8)&&XA(W,Be)})},XA=function(y,c){for(var S=y instanceof ds?y.start:1,B=y instanceof ds?y.reversed:!1,W=0;W<c.length;W++){var te=c[W];te.container instanceof Co&&typeof te.container.value=="number"&&te.container.value!==0&&(S=te.container.value),te.listValue=hn(S,te.container.styles.listStyleType,!0),S+=B?-1:1}},hu=function(y){var c=new zA(y,null),S=new VA(c),B=[];return QA(c,S,S,B),XA(c.container,B),S},YA=function(y,c){switch(c){case 0:return Nn(y.topLeftBorderBox,y.topLeftPaddingBox,y.topRightBorderBox,y.topRightPaddingBox);case 1:return Nn(y.topRightBorderBox,y.topRightPaddingBox,y.bottomRightBorderBox,y.bottomRightPaddingBox);case 2:return Nn(y.bottomRightBorderBox,y.bottomRightPaddingBox,y.bottomLeftBorderBox,y.bottomLeftPaddingBox);case 3:default:return Nn(y.bottomLeftBorderBox,y.bottomLeftPaddingBox,y.topLeftBorderBox,y.topLeftPaddingBox)}},fu=function(y,c){switch(c){case 0:return Nn(y.topLeftBorderBox,y.topLeftBorderDoubleOuterBox,y.topRightBorderBox,y.topRightBorderDoubleOuterBox);case 1:return Nn(y.topRightBorderBox,y.topRightBorderDoubleOuterBox,y.bottomRightBorderBox,y.bottomRightBorderDoubleOuterBox);case 2:return Nn(y.bottomRightBorderBox,y.bottomRightBorderDoubleOuterBox,y.bottomLeftBorderBox,y.bottomLeftBorderDoubleOuterBox);case 3:default:return Nn(y.bottomLeftBorderBox,y.bottomLeftBorderDoubleOuterBox,y.topLeftBorderBox,y.topLeftBorderDoubleOuterBox)}},pu=function(y,c){switch(c){case 0:return Nn(y.topLeftBorderDoubleInnerBox,y.topLeftPaddingBox,y.topRightBorderDoubleInnerBox,y.topRightPaddingBox);case 1:return Nn(y.topRightBorderDoubleInnerBox,y.topRightPaddingBox,y.bottomRightBorderDoubleInnerBox,y.bottomRightPaddingBox);case 2:return Nn(y.bottomRightBorderDoubleInnerBox,y.bottomRightPaddingBox,y.bottomLeftBorderDoubleInnerBox,y.bottomLeftPaddingBox);case 3:default:return Nn(y.bottomLeftBorderDoubleInnerBox,y.bottomLeftPaddingBox,y.topLeftBorderDoubleInnerBox,y.topLeftPaddingBox)}},gu=function(y,c){switch(c){case 0:return Qo(y.topLeftBorderStroke,y.topRightBorderStroke);case 1:return Qo(y.topRightBorderStroke,y.bottomRightBorderStroke);case 2:return Qo(y.bottomRightBorderStroke,y.bottomLeftBorderStroke);case 3:default:return Qo(y.bottomLeftBorderStroke,y.topLeftBorderStroke)}},Qo=function(y,c){var S=[];return Fn(y)?S.push(y.subdivide(.5,!1)):S.push(y),Fn(c)?S.push(c.subdivide(.5,!0)):S.push(c),S},Nn=function(y,c,S,B){var W=[];return Fn(y)?W.push(y.subdivide(.5,!1)):W.push(y),Fn(S)?W.push(S.subdivide(.5,!0)):W.push(S),Fn(B)?W.push(B.subdivide(.5,!0).reverse()):W.push(B),Fn(c)?W.push(c.subdivide(.5,!1).reverse()):W.push(c),W},JA=function(y){var c=y.bounds,S=y.styles;return c.add(S.borderLeftWidth,S.borderTopWidth,-(S.borderRightWidth+S.borderLeftWidth),-(S.borderTopWidth+S.borderBottomWidth))},Ko=function(y){var c=y.styles,S=y.bounds,B=Rr(c.paddingLeft,S.width),W=Rr(c.paddingRight,S.width),te=Rr(c.paddingTop,S.width),fe=Rr(c.paddingBottom,S.width);return S.add(B+c.borderLeftWidth,te+c.borderTopWidth,-(c.borderRightWidth+c.borderLeftWidth+B+W),-(c.borderTopWidth+c.borderBottomWidth+te+fe))},mu=function(y,c){return y===0?c.bounds:y===2?Ko(c):JA(c)},vu=function(y,c){return y===0?c.bounds:y===2?Ko(c):JA(c)},KA=function(y,c,S){var B=mu(La(y.styles.backgroundOrigin,c),y),W=vu(La(y.styles.backgroundClip,c),y),te=yu(La(y.styles.backgroundSize,c),S,B),fe=te[0],xe=te[1],Be=Hn(La(y.styles.backgroundPosition,c),B.width-fe,B.height-xe),Ve=Eu(La(y.styles.backgroundRepeat,c),Be,te,B,W),Je=Math.round(B.left+Be[0]),lt=Math.round(B.top+Be[1]);return[Ve,Je,lt,fe,xe]},Da=function(y){return Or(y)&&y.value===_n.AUTO},jo=function(y){return typeof y=="number"},yu=function(y,c,S){var B=c[0],W=c[1],te=c[2],fe=y[0],xe=y[1];if(!fe)return[0,0];if(sn(fe)&&xe&&sn(xe))return[Rr(fe,S.width),Rr(xe,S.height)];var Be=jo(te);if(Or(fe)&&(fe.value===_n.CONTAIN||fe.value===_n.COVER)){if(jo(te)){var Ve=S.width/S.height;return Ve<te!==(fe.value===_n.COVER)?[S.width,S.width/te]:[S.height*te,S.height]}return[S.width,S.height]}var Je=jo(B),lt=jo(W),ct=Je||lt;if(Da(fe)&&(!xe||Da(xe))){if(Je&&lt)return[B,W];if(!Be&&!ct)return[S.width,S.height];if(ct&&Be){var jt=Je?B:W*te,St=lt?W:B/te;return[jt,St]}var Ft=Je?B:S.width,lr=lt?W:S.height;return[Ft,lr]}if(Be){var Qt=0,Gt=0;return sn(fe)?Qt=Rr(fe,S.width):sn(xe)&&(Gt=Rr(xe,S.height)),Da(fe)?Qt=Gt*te:(!xe||Da(xe))&&(Gt=Qt/te),[Qt,Gt]}var wr=null,gr=null;if(sn(fe)?wr=Rr(fe,S.width):xe&&sn(xe)&&(gr=Rr(xe,S.height)),wr!==null&&(!xe||Da(xe))&&(gr=Je&&lt?wr/B*W:S.height),gr!==null&&Da(fe)&&(wr=Je&&lt?gr/W*B:S.width),wr!==null&&gr!==null)return[wr,gr];throw new Error("Unable to calculate background-size for element")},La=function(y,c){var S=y[c];return typeof S=="undefined"?y[0]:S},Eu=function(y,c,S,B,W){var te=c[0],fe=c[1],xe=S[0],Be=S[1];switch(y){case 2:return[new Ht(Math.round(B.left),Math.round(B.top+fe)),new Ht(Math.round(B.left+B.width),Math.round(B.top+fe)),new Ht(Math.round(B.left+B.width),Math.round(Be+B.top+fe)),new Ht(Math.round(B.left),Math.round(Be+B.top+fe))];case 3:return[new Ht(Math.round(B.left+te),Math.round(B.top)),new Ht(Math.round(B.left+te+xe),Math.round(B.top)),new Ht(Math.round(B.left+te+xe),Math.round(B.height+B.top)),new Ht(Math.round(B.left+te),Math.round(B.height+B.top))];case 1:return[new Ht(Math.round(B.left+te),Math.round(B.top+fe)),new Ht(Math.round(B.left+te+xe),Math.round(B.top+fe)),new Ht(Math.round(B.left+te+xe),Math.round(B.top+fe+Be)),new Ht(Math.round(B.left+te),Math.round(B.top+fe+Be))];default:return[new Ht(Math.round(W.left),Math.round(W.top)),new Ht(Math.round(W.left+W.width),Math.round(W.top)),new Ht(Math.round(W.left+W.width),Math.round(W.height+W.top)),new Ht(Math.round(W.left),Math.round(W.height+W.top))]}},bu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",$A="Hidden Text",_u=function(){function y(c){this._data={},this._document=c}return y.prototype.parseMetrics=function(c,S){var B=this._document.createElement("div"),W=this._document.createElement("img"),te=this._document.createElement("span"),fe=this._document.body;B.style.visibility="hidden",B.style.fontFamily=c,B.style.fontSize=S,B.style.margin="0",B.style.padding="0",B.style.whiteSpace="nowrap",fe.appendChild(B),W.src=bu,W.width=1,W.height=1,W.style.margin="0",W.style.padding="0",W.style.verticalAlign="baseline",te.style.fontFamily=c,te.style.fontSize=S,te.style.margin="0",te.style.padding="0",te.appendChild(this._document.createTextNode($A)),B.appendChild(te),B.appendChild(W);var xe=W.offsetTop-te.offsetTop+2;B.removeChild(te),B.appendChild(this._document.createTextNode($A)),B.style.lineHeight="normal",W.style.verticalAlign="super";var Be=W.offsetTop-B.offsetTop+2;return fe.removeChild(B),{baseline:xe,middle:Be}},y.prototype.getMetrics=function(c,S){var B=c+" "+S;return typeof this._data[B]=="undefined"&&(this._data[B]=this.parseMetrics(c,S)),this._data[B]},y}(),ZA=function(){function y(c,S){this.context=c,this.options=S}return y}(),wu=1e4,Cu=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;return W._activeEffects=[],W.canvas=B.canvas?B.canvas:document.createElement("canvas"),W.ctx=W.canvas.getContext("2d"),B.canvas||(W.canvas.width=Math.floor(B.width*B.scale),W.canvas.height=Math.floor(B.height*B.scale),W.canvas.style.width=B.width+"px",W.canvas.style.height=B.height+"px"),W.fontMetrics=new _u(document),W.ctx.scale(W.options.scale,W.options.scale),W.ctx.translate(-B.x,-B.y),W.ctx.textBaseline="bottom",W._activeEffects=[],W.context.logger.debug("Canvas renderer initialized ("+B.width+"x"+B.height+") with scale "+B.scale),W}return c.prototype.applyEffects=function(S){for(var B=this;this._activeEffects.length;)this.popEffect();S.forEach(function(W){return B.applyEffect(W)})},c.prototype.applyEffect=function(S){this.ctx.save(),cu(S)&&(this.ctx.globalAlpha=S.opacity),uu(S)&&(this.ctx.translate(S.offsetX,S.offsetY),this.ctx.transform(S.matrix[0],S.matrix[1],S.matrix[2],S.matrix[3],S.matrix[4],S.matrix[5]),this.ctx.translate(-S.offsetX,-S.offsetY)),WA(S)&&(this.path(S.path),this.ctx.clip()),this._activeEffects.push(S)},c.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},c.prototype.renderStack=function(S){return X(this,void 0,void 0,function(){var B;return F(this,function(W){switch(W.label){case 0:return B=S.element.container.styles,B.isVisible()?[4,this.renderStackContent(S)]:[3,2];case 1:W.sent(),W.label=2;case 2:return[2]}})})},c.prototype.renderNode=function(S){return X(this,void 0,void 0,function(){return F(this,function(B){switch(B.label){case 0:if(tn(S.container.flags,16))debugger;return S.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(S)]:[3,3];case 1:return B.sent(),[4,this.renderNodeContent(S)];case 2:B.sent(),B.label=3;case 3:return[2]}})})},c.prototype.renderTextWithLetterSpacing=function(S,B,W){var te=this;if(B===0)this.ctx.fillText(S.text,S.bounds.left,S.bounds.top+W);else{var fe=Gi(S.text);fe.reduce(function(xe,Be){return te.ctx.fillText(Be,xe,S.bounds.top+W),xe+te.ctx.measureText(Be).width},S.bounds.left)}},c.prototype.createFontStyle=function(S){var B=S.fontVariant.filter(function(fe){return fe==="normal"||fe==="small-caps"}).join(""),W=Iu(S.fontFamily).join(", "),te=Ri(S.fontSize)?""+S.fontSize.number+S.fontSize.unit:S.fontSize.number+"px";return[[S.fontStyle,B,S.fontWeight,te,W].join(" "),W,te]},c.prototype.renderTextNode=function(S,B){return X(this,void 0,void 0,function(){var W,te,fe,xe,Be,Ve,Je,lt,ct=this;return F(this,function(jt){return W=this.createFontStyle(B),te=W[0],fe=W[1],xe=W[2],this.ctx.font=te,this.ctx.direction=B.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Be=this.fontMetrics.getMetrics(fe,xe),Ve=Be.baseline,Je=Be.middle,lt=B.paintOrder,S.textBounds.forEach(function(St){lt.forEach(function(Ft){switch(Ft){case 0:ct.ctx.fillStyle=on(B.color),ct.renderTextWithLetterSpacing(St,B.letterSpacing,Ve);var lr=B.textShadow;lr.length&&St.text.trim().length&&(lr.slice(0).reverse().forEach(function(Qt){ct.ctx.shadowColor=on(Qt.color),ct.ctx.shadowOffsetX=Qt.offsetX.number*ct.options.scale,ct.ctx.shadowOffsetY=Qt.offsetY.number*ct.options.scale,ct.ctx.shadowBlur=Qt.blur.number,ct.renderTextWithLetterSpacing(St,B.letterSpacing,Ve)}),ct.ctx.shadowColor="",ct.ctx.shadowOffsetX=0,ct.ctx.shadowOffsetY=0,ct.ctx.shadowBlur=0),B.textDecorationLine.length&&(ct.ctx.fillStyle=on(B.textDecorationColor||B.color),B.textDecorationLine.forEach(function(Qt){switch(Qt){case 1:ct.ctx.fillRect(St.bounds.left,Math.round(St.bounds.top+Ve),St.bounds.width,1);break;case 2:ct.ctx.fillRect(St.bounds.left,Math.round(St.bounds.top),St.bounds.width,1);break;case 3:ct.ctx.fillRect(St.bounds.left,Math.ceil(St.bounds.top+Je),St.bounds.width,1);break}}));break;case 1:B.webkitTextStrokeWidth&&St.text.trim().length&&(ct.ctx.strokeStyle=on(B.webkitTextStrokeColor),ct.ctx.lineWidth=B.webkitTextStrokeWidth,ct.ctx.lineJoin=window.chrome?"miter":"round",ct.ctx.strokeText(St.text,St.bounds.left,St.bounds.top+Ve)),ct.ctx.strokeStyle="",ct.ctx.lineWidth=0,ct.ctx.lineJoin="miter";break}})}),[2]})})},c.prototype.renderReplacedElement=function(S,B,W){if(W&&S.intrinsicWidth>0&&S.intrinsicHeight>0){var te=Ko(S),fe=ko(B);this.path(fe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(W,0,0,S.intrinsicWidth,S.intrinsicHeight,te.left,te.top,te.width,te.height),this.ctx.restore()}},c.prototype.renderNodeContent=function(S){return X(this,void 0,void 0,function(){var B,W,te,fe,xe,Be,Ve,Ve,Je,lt,ct,jt,St,Ft,lr,Qt,Gt,wr,gr,Ve,Sr,St,Qt;return F(this,function(Wt){switch(Wt.label){case 0:this.applyEffects(S.getEffects(4)),B=S.container,W=S.curves,te=B.styles,fe=0,xe=B.textNodes,Wt.label=1;case 1:return fe<xe.length?(Be=xe[fe],[4,this.renderTextNode(Be,te)]):[3,4];case 2:Wt.sent(),Wt.label=3;case 3:return fe++,[3,1];case 4:if(!(B instanceof cs))return[3,8];Wt.label=5;case 5:return Wt.trys.push([5,7,,8]),[4,this.context.cache.match(B.src)];case 6:return Ve=Wt.sent(),this.renderReplacedElement(B,W,Ve),[3,8];case 7:return Wt.sent(),this.context.logger.error("Error loading image "+B.src),[3,8];case 8:if(B instanceof _o&&this.renderReplacedElement(B,W,B.canvas),!(B instanceof wo))return[3,12];Wt.label=9;case 9:return Wt.trys.push([9,11,,12]),[4,this.context.cache.match(B.svg)];case 10:return Ve=Wt.sent(),this.renderReplacedElement(B,W,Ve),[3,12];case 11:return Wt.sent(),this.context.logger.error("Error loading svg "+B.svg.substring(0,255)),[3,12];case 12:return B instanceof xo&&B.tree?(Je=new c(this.context,{scale:this.options.scale,backgroundColor:B.backgroundColor,x:0,y:0,width:B.width,height:B.height}),[4,Je.render(B.tree)]):[3,14];case 13:lt=Wt.sent(),B.width&&B.height&&this.ctx.drawImage(lt,0,0,B.width,B.height,B.bounds.left,B.bounds.top,B.bounds.width,B.bounds.height),Wt.label=14;case 14:if(B instanceof xa&&(ct=Math.min(B.bounds.width,B.bounds.height),B.type===Ta?B.checked&&(this.ctx.save(),this.path([new Ht(B.bounds.left+ct*.39363,B.bounds.top+ct*.79),new Ht(B.bounds.left+ct*.16,B.bounds.top+ct*.5549),new Ht(B.bounds.left+ct*.27347,B.bounds.top+ct*.44071),new Ht(B.bounds.left+ct*.39694,B.bounds.top+ct*.5649),new Ht(B.bounds.left+ct*.72983,B.bounds.top+ct*.23),new Ht(B.bounds.left+ct*.84,B.bounds.top+ct*.34085),new Ht(B.bounds.left+ct*.39363,B.bounds.top+ct*.79)]),this.ctx.fillStyle=on(To),this.ctx.fill(),this.ctx.restore()):B.type===Ba&&(B.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(B.bounds.left+ct/2,B.bounds.top+ct/2,ct/4,0,Math.PI*2,!0),this.ctx.fillStyle=on(To),this.ctx.fill(),this.ctx.restore()))),Tu(B)&&B.value.length){jt=this.createFontStyle(te),St=jt[0],Ft=jt[1],lr=this.fontMetrics.getMetrics(St,Ft).baseline,this.ctx.font=St,this.ctx.fillStyle=on(te.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=xu(B.styles.textAlign),Qt=Ko(B),Gt=0;switch(B.styles.textAlign){case 1:Gt+=Qt.width/2;break;case 2:Gt+=Qt.width;break}wr=Qt.add(Gt,0,0,-Qt.height/2+1),this.ctx.save(),this.path([new Ht(Qt.left,Qt.top),new Ht(Qt.left+Qt.width,Qt.top),new Ht(Qt.left+Qt.width,Qt.top+Qt.height),new Ht(Qt.left,Qt.top+Qt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Wi(B.value,wr),te.letterSpacing,lr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!tn(B.styles.display,2048))return[3,20];if(!(B.styles.listStyleImage!==null))return[3,19];if(gr=B.styles.listStyleImage,!(gr.type===0))return[3,18];Ve=void 0,Sr=gr.url,Wt.label=15;case 15:return Wt.trys.push([15,17,,18]),[4,this.context.cache.match(Sr)];case 16:return Ve=Wt.sent(),this.ctx.drawImage(Ve,B.bounds.left-(Ve.width+10),B.bounds.top),[3,18];case 17:return Wt.sent(),this.context.logger.error("Error loading list-style-image "+Sr),[3,18];case 18:return[3,20];case 19:S.listValue&&B.styles.listStyleType!==-1&&(St=this.createFontStyle(te)[0],this.ctx.font=St,this.ctx.fillStyle=on(te.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Qt=new Z(B.bounds.left,B.bounds.top+Rr(B.styles.paddingTop,B.bounds.width),B.bounds.width,pi(te.lineHeight,te.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Wi(S.listValue,Qt),te.letterSpacing,pi(te.lineHeight,te.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Wt.label=20;case 20:return[2]}})})},c.prototype.renderStackContent=function(S){return X(this,void 0,void 0,function(){var B,W,te,fe,xe,te,Be,Ve,te,Je,lt,te,ct,jt,te,St,Ft,te,lr,Qt,te;return F(this,function(Gt){switch(Gt.label){case 0:if(tn(S.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(S.element)];case 1:Gt.sent(),B=0,W=S.negativeZIndex,Gt.label=2;case 2:return B<W.length?(te=W[B],[4,this.renderStack(te)]):[3,5];case 3:Gt.sent(),Gt.label=4;case 4:return B++,[3,2];case 5:return[4,this.renderNodeContent(S.element)];case 6:Gt.sent(),fe=0,xe=S.nonInlineLevel,Gt.label=7;case 7:return fe<xe.length?(te=xe[fe],[4,this.renderNode(te)]):[3,10];case 8:Gt.sent(),Gt.label=9;case 9:return fe++,[3,7];case 10:Be=0,Ve=S.nonPositionedFloats,Gt.label=11;case 11:return Be<Ve.length?(te=Ve[Be],[4,this.renderStack(te)]):[3,14];case 12:Gt.sent(),Gt.label=13;case 13:return Be++,[3,11];case 14:Je=0,lt=S.nonPositionedInlineLevel,Gt.label=15;case 15:return Je<lt.length?(te=lt[Je],[4,this.renderStack(te)]):[3,18];case 16:Gt.sent(),Gt.label=17;case 17:return Je++,[3,15];case 18:ct=0,jt=S.inlineLevel,Gt.label=19;case 19:return ct<jt.length?(te=jt[ct],[4,this.renderNode(te)]):[3,22];case 20:Gt.sent(),Gt.label=21;case 21:return ct++,[3,19];case 22:St=0,Ft=S.zeroOrAutoZIndexOrTransformedOrOpacity,Gt.label=23;case 23:return St<Ft.length?(te=Ft[St],[4,this.renderStack(te)]):[3,26];case 24:Gt.sent(),Gt.label=25;case 25:return St++,[3,23];case 26:lr=0,Qt=S.positiveZIndex,Gt.label=27;case 27:return lr<Qt.length?(te=Qt[lr],[4,this.renderStack(te)]):[3,30];case 28:Gt.sent(),Gt.label=29;case 29:return lr++,[3,27];case 30:return[2]}})})},c.prototype.mask=function(S){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(S.slice(0).reverse()),this.ctx.closePath()},c.prototype.path=function(S){this.ctx.beginPath(),this.formatPath(S),this.ctx.closePath()},c.prototype.formatPath=function(S){var B=this;S.forEach(function(W,te){var fe=Fn(W)?W.start:W;te===0?B.ctx.moveTo(fe.x,fe.y):B.ctx.lineTo(fe.x,fe.y),Fn(W)&&B.ctx.bezierCurveTo(W.startControl.x,W.startControl.y,W.endControl.x,W.endControl.y,W.end.x,W.end.y)})},c.prototype.renderRepeat=function(S,B,W,te){this.path(S),this.ctx.fillStyle=B,this.ctx.translate(W,te),this.ctx.fill(),this.ctx.translate(-W,-te)},c.prototype.resizeImage=function(S,B,W){var te;if(S.width===B&&S.height===W)return S;var fe=(te=this.canvas.ownerDocument)!==null&&te!==void 0?te:document,xe=fe.createElement("canvas");xe.width=Math.max(1,B),xe.height=Math.max(1,W);var Be=xe.getContext("2d");return Be.drawImage(S,0,0,S.width,S.height,0,0,B,W),xe},c.prototype.renderBackgroundImage=function(S){return X(this,void 0,void 0,function(){var B,W,te,fe,xe,Be;return F(this,function(Ve){switch(Ve.label){case 0:B=S.styles.backgroundImage.length-1,W=function(Je){var lt,ct,jt,St,Ft,lr,Qt,Gt,wr,gr,St,Ft,lr,Qt,Gt,Sr,Wt,Br,Ir,dr,Bn,Cn,On,fn,wr,$n,St,yi,Ei,Qt,Gt,bi,Ft,lr,Xi,Zn,_i,Yi,Ji,ai,$i,si;return F(this,function(Ua){switch(Ua.label){case 0:if(!(Je.type===0))return[3,5];lt=void 0,ct=Je.url,Ua.label=1;case 1:return Ua.trys.push([1,3,,4]),[4,te.context.cache.match(ct)];case 2:return lt=Ua.sent(),[3,4];case 3:return Ua.sent(),te.context.logger.error("Error loading background-image "+ct),[3,4];case 4:return lt&&(jt=KA(S,B,[lt.width,lt.height,lt.width/lt.height]),St=jt[0],Ft=jt[1],lr=jt[2],Qt=jt[3],Gt=jt[4],wr=te.ctx.createPattern(te.resizeImage(lt,Qt,Gt),"repeat"),te.renderRepeat(St,wr,Ft,lr)),[3,6];case 5:ks(Je)?(gr=KA(S,B,[null,null,null]),St=gr[0],Ft=gr[1],lr=gr[2],Qt=gr[3],Gt=gr[4],Sr=Aa(Je.angle,Qt,Gt),Wt=Sr[0],Br=Sr[1],Ir=Sr[2],dr=Sr[3],Bn=Sr[4],Cn=document.createElement("canvas"),Cn.width=Qt,Cn.height=Gt,On=Cn.getContext("2d"),fn=On.createLinearGradient(Br,dr,Ir,Bn),Is(Je.stops,Wt).forEach(function(bs){return fn.addColorStop(bs.stop,on(bs.color))}),On.fillStyle=fn,On.fillRect(0,0,Qt,Gt),Qt>0&&Gt>0&&(wr=te.ctx.createPattern(Cn,"repeat"),te.renderRepeat(St,wr,Ft,lr))):qo(Je)&&($n=KA(S,B,[null,null,null]),St=$n[0],yi=$n[1],Ei=$n[2],Qt=$n[3],Gt=$n[4],bi=Je.position.length===0?[Ma]:Je.position,Ft=Rr(bi[0],Qt),lr=Rr(bi[bi.length-1],Gt),Xi=Jo(Je,Ft,lr,Qt,Gt),Zn=Xi[0],_i=Xi[1],Zn>0&&_i>0&&(Yi=te.ctx.createRadialGradient(yi+Ft,Ei+lr,0,yi+Ft,Ei+lr,Zn),Is(Je.stops,Zn*2).forEach(function(bs){return Yi.addColorStop(bs.stop,on(bs.color))}),te.path(St),te.ctx.fillStyle=Yi,Zn!==_i?(Ji=S.bounds.left+.5*S.bounds.width,ai=S.bounds.top+.5*S.bounds.height,$i=_i/Zn,si=1/$i,te.ctx.save(),te.ctx.translate(Ji,ai),te.ctx.transform(1,0,0,$i,0,0),te.ctx.translate(-Ji,-ai),te.ctx.fillRect(yi,si*(Ei-ai)+ai,Qt,Gt*si),te.ctx.restore()):te.ctx.fill())),Ua.label=6;case 6:return B--,[2]}})},te=this,fe=0,xe=S.styles.backgroundImage.slice(0).reverse(),Ve.label=1;case 1:return fe<xe.length?(Be=xe[fe],[5,W(Be)]):[3,4];case 2:Ve.sent(),Ve.label=3;case 3:return fe++,[3,1];case 4:return[2]}})})},c.prototype.renderSolidBorder=function(S,B,W){return X(this,void 0,void 0,function(){return F(this,function(te){return this.path(YA(W,B)),this.ctx.fillStyle=on(S),this.ctx.fill(),[2]})})},c.prototype.renderDoubleBorder=function(S,B,W,te){return X(this,void 0,void 0,function(){var fe,xe;return F(this,function(Be){switch(Be.label){case 0:return B<3?[4,this.renderSolidBorder(S,W,te)]:[3,2];case 1:return Be.sent(),[2];case 2:return fe=fu(te,W),this.path(fe),this.ctx.fillStyle=on(S),this.ctx.fill(),xe=pu(te,W),this.path(xe),this.ctx.fill(),[2]}})})},c.prototype.renderNodeBackgroundAndBorders=function(S){return X(this,void 0,void 0,function(){var B,W,te,fe,xe,Be,Ve,Je,lt=this;return F(this,function(ct){switch(ct.label){case 0:return this.applyEffects(S.getEffects(2)),B=S.container.styles,W=!Yn(B.backgroundColor)||B.backgroundImage.length,te=[{style:B.borderTopStyle,color:B.borderTopColor,width:B.borderTopWidth},{style:B.borderRightStyle,color:B.borderRightColor,width:B.borderRightWidth},{style:B.borderBottomStyle,color:B.borderBottomColor,width:B.borderBottomWidth},{style:B.borderLeftStyle,color:B.borderLeftColor,width:B.borderLeftWidth}],fe=Bu(La(B.backgroundClip,0),S.curves),W||B.boxShadow.length?(this.ctx.save(),this.path(fe),this.ctx.clip(),Yn(B.backgroundColor)||(this.ctx.fillStyle=on(B.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(S.container)]):[3,2];case 1:ct.sent(),this.ctx.restore(),B.boxShadow.slice(0).reverse().forEach(function(jt){lt.ctx.save();var St=Mo(S.curves),Ft=jt.inset?0:wu,lr=du(St,-Ft+(jt.inset?1:-1)*jt.spread.number,(jt.inset?1:-1)*jt.spread.number,jt.spread.number*(jt.inset?-2:2),jt.spread.number*(jt.inset?-2:2));jt.inset?(lt.path(St),lt.ctx.clip(),lt.mask(lr)):(lt.mask(St),lt.ctx.clip(),lt.path(lr)),lt.ctx.shadowOffsetX=jt.offsetX.number+Ft,lt.ctx.shadowOffsetY=jt.offsetY.number,lt.ctx.shadowColor=on(jt.color),lt.ctx.shadowBlur=jt.blur.number,lt.ctx.fillStyle=jt.inset?on(jt.color):"rgba(0,0,0,1)",lt.ctx.fill(),lt.ctx.restore()}),ct.label=2;case 2:xe=0,Be=0,Ve=te,ct.label=3;case 3:return Be<Ve.length?(Je=Ve[Be],Je.style!==0&&!Yn(Je.color)&&Je.width>0?Je.style===2?[4,this.renderDashedDottedBorder(Je.color,Je.width,xe,S.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return ct.sent(),[3,11];case 5:return Je.style===3?[4,this.renderDashedDottedBorder(Je.color,Je.width,xe,S.curves,3)]:[3,7];case 6:return ct.sent(),[3,11];case 7:return Je.style===4?[4,this.renderDoubleBorder(Je.color,Je.width,xe,S.curves)]:[3,9];case 8:return ct.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Je.color,xe,S.curves)];case 10:ct.sent(),ct.label=11;case 11:xe++,ct.label=12;case 12:return Be++,[3,3];case 13:return[2]}})})},c.prototype.renderDashedDottedBorder=function(S,B,W,te,fe){return X(this,void 0,void 0,function(){var xe,Be,Ve,Je,lt,ct,jt,St,Ft,lr,Qt,Gt,wr,gr,Sr,Wt,Sr,Wt;return F(this,function(Br){return this.ctx.save(),xe=gu(te,W),Be=YA(te,W),fe===2&&(this.path(Be),this.ctx.clip()),Fn(Be[0])?(Ve=Be[0].start.x,Je=Be[0].start.y):(Ve=Be[0].x,Je=Be[0].y),Fn(Be[1])?(lt=Be[1].end.x,ct=Be[1].end.y):(lt=Be[1].x,ct=Be[1].y),W===0||W===2?jt=Math.abs(Ve-lt):jt=Math.abs(Je-ct),this.ctx.beginPath(),fe===3?this.formatPath(xe):this.formatPath(Be.slice(0,2)),St=B<3?B*3:B*2,Ft=B<3?B*2:B,fe===3&&(St=B,Ft=B),lr=!0,jt<=St*2?lr=!1:jt<=St*2+Ft?(Qt=jt/(2*St+Ft),St*=Qt,Ft*=Qt):(Gt=Math.floor((jt+Ft)/(St+Ft)),wr=(jt-Gt*St)/(Gt-1),gr=(jt-(Gt+1)*St)/Gt,Ft=gr<=0||Math.abs(Ft-wr)<Math.abs(Ft-gr)?wr:gr),lr&&(fe===3?this.ctx.setLineDash([0,St+Ft]):this.ctx.setLineDash([St,Ft])),fe===3?(this.ctx.lineCap="round",this.ctx.lineWidth=B):this.ctx.lineWidth=B*2+1.1,this.ctx.strokeStyle=on(S),this.ctx.stroke(),this.ctx.setLineDash([]),fe===2&&(Fn(Be[0])&&(Sr=Be[3],Wt=Be[0],this.ctx.beginPath(),this.formatPath([new Ht(Sr.end.x,Sr.end.y),new Ht(Wt.start.x,Wt.start.y)]),this.ctx.stroke()),Fn(Be[1])&&(Sr=Be[1],Wt=Be[2],this.ctx.beginPath(),this.formatPath([new Ht(Sr.end.x,Sr.end.y),new Ht(Wt.start.x,Wt.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},c.prototype.render=function(S){return X(this,void 0,void 0,function(){var B;return F(this,function(W){switch(W.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=on(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),B=hu(S),[4,this.renderStack(B)];case 1:return W.sent(),this.applyEffects([]),[2,this.canvas]}})})},c}(ZA),Tu=function(y){return y instanceof Bo||y instanceof hs?!0:y instanceof xa&&y.type!==Ba&&y.type!==Ta},Bu=function(y,c){switch(y){case 0:return Mo(c);case 2:return ou(c);case 1:default:return ko(c)}},xu=function(y){switch(y){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(y){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?y.filter(function(c){return Su.indexOf(c)===-1}):y},Ou=function(y){J(c,y);function c(S,B){var W=y.call(this,S,B)||this;return W.canvas=B.canvas?B.canvas:document.createElement("canvas"),W.ctx=W.canvas.getContext("2d"),W.options=B,W.canvas.width=Math.floor(B.width*B.scale),W.canvas.height=Math.floor(B.height*B.scale),W.canvas.style.width=B.width+"px",W.canvas.style.height=B.height+"px",W.ctx.scale(W.options.scale,W.options.scale),W.ctx.translate(-B.x,-B.y),W.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+B.width+"x"+B.height+" at "+B.x+","+B.y+") with scale "+B.scale),W}return c.prototype.render=function(S){return X(this,void 0,void 0,function(){var B,W;return F(this,function(te){switch(te.label){case 0:return B=ls(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,S),[4,Ru(B)];case 1:return W=te.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=on(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(W,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},c}(ZA),Ru=function(y){return new Promise(function(c,S){var B=new Image;B.onload=function(){c(B)},B.onerror=S,B.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(y))})},Du=function(){function y(c){var S=c.id,B=c.enabled;this.id=S,this.enabled=B,this.start=Date.now()}return y.prototype.debug=function(){for(var c=[],S=0;S<arguments.length;S++)c[S]=arguments[S];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,R([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},y.prototype.getTime=function(){return Date.now()-this.start},y.prototype.info=function(){for(var c=[],S=0;S<arguments.length;S++)c[S]=arguments[S];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,R([this.id,this.getTime()+"ms"],c)))},y.prototype.warn=function(){for(var c=[],S=0;S<arguments.length;S++)c[S]=arguments[S];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,R([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},y.prototype.error=function(){for(var c=[],S=0;S<arguments.length;S++)c[S]=arguments[S];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,R([this.id,this.getTime()+"ms"],c)):this.info.apply(this,c))},y.instances={},y}(),Lu=function(){function y(c,S){var B;this.windowBounds=S,this.instanceName="#"+y.instanceCount++,this.logger=new Du({id:this.instanceName,enabled:c.logging}),this.cache=(B=c.cache)!==null&&B!==void 0?B:new qA(this,c)}return y.instanceCount=1,y}(),Uu=function(y,c){return c===void 0&&(c={}),Fu(y,c)};typeof window!="undefined"&&No.setContext(window);var Fu=function(y,c){return X(void 0,void 0,void 0,function(){var S,B,W,te,fe,xe,Be,Ve,Je,lt,ct,jt,St,Ft,lr,Qt,Gt,wr,gr,Sr,Wt,Br,Wt,Ir,dr,Bn,Cn,On,fn,$n,yi,Ei,bi,Xi,Zn,_i,Yi,Ji,ai,$i;return F(this,function(si){switch(si.label){case 0:if(!y||typeof y!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(S=y.ownerDocument,!S)throw new Error("Element is not attached to a Document");if(B=S.defaultView,!B)throw new Error("Document is not attached to a Window");return W={allowTaint:(Ir=c.allowTaint)!==null&&Ir!==void 0?Ir:!1,imageTimeout:(dr=c.imageTimeout)!==null&&dr!==void 0?dr:15e3,proxy:c.proxy,useCORS:(Bn=c.useCORS)!==null&&Bn!==void 0?Bn:!1},te=U({logging:(Cn=c.logging)!==null&&Cn!==void 0?Cn:!0,cache:c.cache},W),fe={windowWidth:(On=c.windowWidth)!==null&&On!==void 0?On:B.innerWidth,windowHeight:(fn=c.windowHeight)!==null&&fn!==void 0?fn:B.innerHeight,scrollX:($n=c.scrollX)!==null&&$n!==void 0?$n:B.pageXOffset,scrollY:(yi=c.scrollY)!==null&&yi!==void 0?yi:B.pageYOffset},xe=new Z(fe.scrollX,fe.scrollY,fe.windowWidth,fe.windowHeight),Be=new Lu(te,xe),Ve=(Ei=c.foreignObjectRendering)!==null&&Ei!==void 0?Ei:!1,Je={allowTaint:(bi=c.allowTaint)!==null&&bi!==void 0?bi:!1,onclone:c.onclone,ignoreElements:c.ignoreElements,inlineImages:Ve,copyStyles:Ve},Be.logger.debug("Starting document clone with size "+xe.width+"x"+xe.height+" scrolled to "+-xe.left+","+-xe.top),lt=new ii(Be,y,Je),ct=lt.clonedReferenceElement,ct?[4,lt.toIFrame(S,xe)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return jt=si.sent(),St=gs(ct)||DA(ct)?N(ct.ownerDocument):M(Be,ct),Ft=St.width,lr=St.height,Qt=St.left,Gt=St.top,wr=Nu(Be,ct,c.backgroundColor),gr={canvas:c.canvas,backgroundColor:wr,scale:(Zn=(Xi=c.scale)!==null&&Xi!==void 0?Xi:B.devicePixelRatio)!==null&&Zn!==void 0?Zn:1,x:((_i=c.x)!==null&&_i!==void 0?_i:0)+Qt,y:((Yi=c.y)!==null&&Yi!==void 0?Yi:0)+Gt,width:(Ji=c.width)!==null&&Ji!==void 0?Ji:Math.ceil(Ft),height:(ai=c.height)!==null&&ai!==void 0?ai:Math.ceil(lr)},Ve?(Be.logger.debug("Document cloned, using foreign object rendering"),Wt=new Ou(Be,gr),[4,Wt.render(ct)]):[3,3];case 2:return Sr=si.sent(),[3,5];case 3:return Be.logger.debug("Document cloned, element located at "+Qt+","+Gt+" with size "+Ft+"x"+lr+" using computed rendering"),Be.logger.debug("Starting DOM parsing"),Br=Io(Be,ct),wr===Br.styles.backgroundColor&&(Br.styles.backgroundColor=Qn.TRANSPARENT),Be.logger.debug("Starting renderer for element at "+gr.x+","+gr.y+" with size "+gr.width+"x"+gr.height),Wt=new Cu(Be,gr),[4,Wt.render(Br)];case 4:Sr=si.sent(),si.label=5;case 5:return(($i=c.removeContainer)!==null&&$i!==void 0?$i:!0)&&(ii.destroy(jt)||Be.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Be.logger.debug("Finished rendering"),[2,Sr]}})})},Nu=function(y,c,S){var B=c.ownerDocument,W=B.documentElement?Li(y,getComputedStyle(B.documentElement).backgroundColor):Qn.TRANSPARENT,te=B.body?Li(y,getComputedStyle(B.body).backgroundColor):Qn.TRANSPARENT,fe=typeof S=="string"?Li(y,S):S===null?Qn.TRANSPARENT:4294967295;return c===B.documentElement?Yn(W)?Yn(te)?fe:te:W:fe};return Uu})},wRmb:function(It,At,re){"use strict";re.d(At,"a",function(){return O});var ve=re("rePB"),J=re("KQm4"),U=re("VTBJ"),X=re("Ff2n"),F=re("q1tI"),R=re.n(F),Z=re("Kwbf"),M=re("Zm9Q"),N=re("hW8S");function O(r){return Object(M.a)(r).filter(function(n){return F.isValidElement(n)}).map(function(n){var e=n.key,t=n.props,i=t.children,s=Object(X.a)(t,["children"]),I=Object(U.a)({key:e},s);return i&&(I.children=O(i)),I})}function h(r){return r.reduce(function(n,e){var t=e.fixed,i=t===!0?"left":t,s=e.children;return s&&s.length>0?[].concat(Object(J.a)(n),Object(J.a)(h(s).map(function(I){return Object(U.a)({fixed:i},I)}))):[].concat(Object(J.a)(n),[Object(U.a)(Object(U.a)({},e),{},{fixed:i})])},[])}function b(r){for(var n=!0,e=0;e<r.length;e+=1){var t=r[e];if(n&&t.fixed!=="left")n=!1;else if(!n&&t.fixed==="left"){Object(Z.a)(!1,"Index ".concat(e-1," of `columns` missing `fixed='left'` prop."));break}}for(var i=!0,s=r.length-1;s>=0;s-=1){var I=r[s];if(i&&I.fixed!=="right")i=!1;else if(!i&&I.fixed==="right"){Object(Z.a)(!1,"Index ".concat(s+1," of `columns` missing `fixed='right'` prop."));break}}}function A(r){return r.map(function(n){var e=n.fixed,t=Object(X.a)(n,["fixed"]),i=e;return e==="left"?i="right":e==="right"&&(i="left"),Object(U.a)({fixed:i},t)})}function a(r,n){var e=r.prefixCls,t=r.columns,i=r.children,s=r.expandable,I=r.expandedKeys,C=r.getRowKey,_=r.onTriggerExpand,x=r.expandIcon,T=r.rowExpandable,d=r.expandIconColumnIndex,u=r.direction,o=r.expandRowByClick,l=F.useMemo(function(){return t||O(i)},[t,i]),m=F.useMemo(function(){if(s){var L,P=d||0,j=l[P],z=(L={},Object(ve.a)(L,N.a,{className:"".concat(e,"-expand-icon-col")}),Object(ve.a)(L,"title",""),Object(ve.a)(L,"fixed",j?j.fixed:null),Object(ve.a)(L,"className","".concat(e,"-row-expand-icon-cell")),Object(ve.a)(L,"render",function(q,ae,ge){var pe=C(ae,ge),Ne=I.has(pe),Fe=T?T(ae):!0,He=x({prefixCls:e,expanded:Ne,expandable:Fe,record:ae,onExpand:_});return o?F.createElement("span",{onClick:function(Xe){return Xe.stopPropagation()}},He):He}),L),ee=l.slice();return P>=0&&ee.splice(P,0,z),ee}return l},[s,l,C,I,x,u]),g=F.useMemo(function(){var L=m;return n&&(L=n(L)),L.length||(L=[{render:function(){return null}}]),L},[n,m,u]),E=F.useMemo(function(){return u==="rtl"?A(h(g)):h(g)},[g,u]);return[g,E]}At.b=a},"y0+3":function(It,At,re){"use strict";re.d(At,"a",function(){return h}),re.d(At,"b",function(){return A});var ve=/margin|padding|width|height|max|min|offset/,J={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function X(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function F(a,r,n){if(r=r.toLowerCase(),n==="auto"){if(r==="height")return a.offsetHeight;if(r==="width")return a.offsetWidth}return r in J||(J[r]=ve.test(r)),J[r]?parseFloat(n)||0:n}function R(a,r){var n=arguments.length,e=X(a);return r=U[r]?"cssFloat"in a.style?"cssFloat":"styleFloat":r,n===1?e:F(a,r,e[r]||a.style[r])}function Z(a,r,n){var e=arguments.length;if(r=U[r]?"cssFloat"in a.style?"cssFloat":"styleFloat":r,e===3)return typeof n=="number"&&ve.test(r)&&(n="".concat(n,"px")),a.style[r]=n,n;for(var t in r)r.hasOwnProperty(t)&&Z(a,t,r[t]);return X(a)}function M(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function N(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function O(){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 h(){var a=document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:r}}function b(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function A(a){var r=a.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}}}]);