(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=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.current2?j-2:0),ee=2;ee=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=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;aeae&&(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;Ne0,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;Fe0&&(!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=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;a1&&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>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".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(//),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=0&&b=0&&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=0&&h/),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=[""],i=new a.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function I(){e.length=0,t=[""]}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("- "+$.text+""),f++;var K=[];return f=_(H,f,$.level,K),K.length>0&&(k.push("
"),K.forEach(function(Te){k.push(Te)}),k.push("
")),k.push(" "),f=_(H,f,v,k),f}function x(){return _(e,0,0,t),t.push("
"),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?"".concat(H,"
"):'
').concat(v?H:Object(r.escape)(H,!0),`
`):''+(v?H:Object(r.escape)(H,!0))+"
"},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+""},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',"select"),this.addActionButton(k,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(k,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(k,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(k,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(k,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(k,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(k,'',"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='',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($,'',"render"),this.addActionButton($,'',"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;v0&&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||'')||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=``),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||'')||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||'')||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=``;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='',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='',f}(tt),ze=function(H){function f(v,k,$,K){var Te=H.call(this,v,K||'')||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='',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;_t0&&(yt=!0,_tZe&&(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='',f}(ut),be=function(H){function f(v,k,$){var K=H.call(this,v,$||'')||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=``,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=``,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='',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='',f}(dt),le=function(H){function f(v,k,$,K){var Te=H.call(this,v,K||'')||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='',f}(se),we='',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,''),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.width/2&&this.tipPosition.y>=this.height/2?K',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='',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='',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='',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='',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;kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*f:this.editorCanvas.clientWidth,k=v',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-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),$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''},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;vthis.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+kthis.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="°",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_MARGINf+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('',"Toggle grid");$.isActive=this.isGridVisible,$.onClick=function(){f.isGridVisible=!f.isGridVisible,$.isActive=f.isGridVisible},v.addButton($);var K=new Zr('',"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='',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('',"OK");rt.onClick=this.startRenderAndClose,_t.addButton(rt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(rt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Nt=new Zr('',"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('',"Rotate left");k.onClick=this.rotateLeftButtonClicked,v.addButton(k);var $=new Zr('',"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('',"Flip horizontal");Ze.onClick=this.flipHorizontallyButtonClicked,Te.addButton(Ze);var yt=new Zr('',"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=/]*>/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("[TOC]
",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;_eOe.length)&&(be=Oe.length);for(var _e=0,se=new Array(be);_e=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={"&":"&","<":"<",">":">",'"':""","'":"'"},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=0&&We[pt]==="\\";)$e=!$e;return $e?"|":" |"}),se=_e.split(/ \|/),le=0;if(se.length>be)se.splice(be);else for(;se.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 ?/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;Vt1||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/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*|\\n*|\\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=//,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*$)|\\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]*?\\?>|^|^",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]*?(?:(?=[\\?@\\[\\]`^{|}~",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]*?(?:(?=[\\.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;le0)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?''+(me?se:Se(se,!0))+`
`:""+(me?se:Se(se,!0))+`
`},be.blockquote=function(se){return`
`+se+`
`},be.html=function(se){return se},be.heading=function(se,le,me,we){return this.options.headerIds?"
`:""+se+"
`},be.hr=function(){return this.options.xhtml?`
`:`
`},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""+se+`
`},be.checkbox=function(se){return" "},be.paragraph=function(se){return""+se+`
`},be.table=function(se,le){return le&&(le=""+le+""),`
`},be.tablerow=function(se){return`
`+se+`
`},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""+se+""},be.em=function(se){return""+se+""},be.codespan=function(se){return""+se+""},be.br=function(){return this.options.xhtml?"
":"
"},be.del=function(se){return""+se+""},be.link=function(se,le,me){if(se=he(this.options.sanitize,this.options.baseUrl,se),se===null)return me;var we='"+me+"",we},be.image=function(se,le,me){if(se=he(this.options.sanitize,this.options.baseUrl,se),se===null)return me;var we='
":">",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;we0&&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+1An error occurred:
"+Me($e.message+"",!0)+"
";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;Rt0)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>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;iI?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
* @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()=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>>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;Y0&&(V=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(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;vt2147483647?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;utIe&&(Y=Ie-st),ut=Y;ut>=0;ut--){for(var vt=!0,Tt=0;TtSe&&(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;IeUe)&&(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;Se239?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;hehe)&&(Y=he);for(var Se="",Ue=V;Uehe&&(V=he),Y<0?(Y+=he,Y<0&&(Y=0)):Y>he&&(Y=he),YY)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;++Ie0&&(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=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||Voe.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=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>>(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>>(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>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=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=0;--Ie)V[Ie+Y]=this[Ie+he];else if(Ue<1e3||!M.TYPED_ARRAY_SUPPORT)for(Ie=0;Ie>>0,he=he===void 0?this.length:he>>>0,V||(V=0);var Ie;if(typeof V=="number")for(Ie=Y;Ie55295&&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>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=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=''.concat(A+1,".").concat(Fe+1,'\uFF08\u5355\u9009\u9898\uFF09\uFF08').concat(Ne.score,"\u5206\uFF09");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=''.concat(Ne+1,'\u3001\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 ");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;Se122||(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;qewe[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=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=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=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=_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*]*(?:>|$)/],[T,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^