(window.webpackJsonp=window.webpackJsonp||[]).push([[100,5,7,8],{"+92d":function(Me,ne,B){Me.exports=B.p+"static/b1.8d46544a.svg"},"+ua5":function(Me,ne,B){},"/cxE":function(Me,ne,B){"use strict";B.d(ne,"f",function(){return I}),B.d(ne,"g",function(){return W}),B.d(ne,"h",function(){return P}),B.d(ne,"e",function(){return K}),B.d(ne,"b",function(){return N}),B.d(ne,"c",function(){return e}),B.d(ne,"d",function(){return C}),B.d(ne,"a",function(){return E});class Q{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(g){setTimeout(()=>{throw g.stack?new Error(g.message+`
`+g.stack):g},0)}}emit(g){this.listeners.forEach(h=>{h(g)})}onUnexpectedError(g){this.unexpectedErrorHandler(g),this.emit(g)}onUnexpectedExternalError(g){this.unexpectedErrorHandler(g)}}const H=new Q;function I(g){K(g)||H.onUnexpectedError(g);return}function W(g){K(g)||H.onUnexpectedExternalError(g);return}function P(g){if(g instanceof Error){let{name:h,message:a}=g;const i=g.stacktrace||g.stack;return{$isError:!0,name:h,message:a,stack:i}}return g}const R="Canceled";function K(g){return g instanceof Error&&g.name===R&&g.message===R}function N(){const g=new Error(R);return g.name=g.message,g}function e(g){return g?new Error(`Illegal argument: ${g}`):new Error("Illegal argument")}function C(g){return g?new Error(`Illegal state: ${g}`):new Error("Illegal state")}class E extends Error{constructor(g){super("NotSupported");g&&(this.message=g)}}},"24hK":function(Me,ne,B){"use strict";B.d(ne,"a",function(){return H});class Q{constructor(I){this.element=I,this.next=Q.Undefined,this.prev=Q.Undefined}}Q.Undefined=new Q(void 0);class H{constructor(){this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Q.Undefined}clear(){let I=this._first;for(;I!==Q.Undefined;){const W=I.next;I.prev=Q.Undefined,I.next=Q.Undefined,I=W}this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}unshift(I){return this._insert(I,!1)}push(I){return this._insert(I,!0)}_insert(I,W){const P=new Q(I);if(this._first===Q.Undefined)this._first=P,this._last=P;else if(W){const K=this._last;this._last=P,P.prev=K,K.next=P}else{const K=this._first;this._first=P,P.next=K,K.prev=P}this._size+=1;let R=!1;return()=>{R||(R=!0,this._remove(P))}}shift(){if(this._first===Q.Undefined)return;{const I=this._first.element;return this._remove(this._first),I}}pop(){if(this._last===Q.Undefined)return;{const I=this._last.element;return this._remove(this._last),I}}_remove(I){if(I.prev!==Q.Undefined&&I.next!==Q.Undefined){const W=I.prev;W.next=I.next,I.next.prev=W}else I.prev===Q.Undefined&&I.next===Q.Undefined?(this._first=Q.Undefined,this._last=Q.Undefined):I.next===Q.Undefined?(this._last=this._last.prev,this._last.next=Q.Undefined):I.prev===Q.Undefined&&(this._first=this._first.next,this._first.prev=Q.Undefined);this._size-=1}*[Symbol.iterator](){let I=this._first;for(;I!==Q.Undefined;)yield I.element,I=I.next}}},"3/fG":function(Me,ne,B){"use strict";B.d(ne,"a",function(){return H});function Q(I,W){let P;return W.length===0?P=I:P=I.replace(/\{(\d+)\}/g,function(R,K){const N=K[0];return typeof W[N]!="undefined"?W[N]:R}),P}function H(I,W,...P){return Q(W,P)}},"55Ip":function(Me,ne,B){"use strict";B.d(ne,"a",function(){return r});var Q=B("Ty5D"),H=B("dI71"),I=B("q1tI"),W=B.n(I),P=B("YS25"),R=B("17x9"),K=B.n(R),N=B("wx14"),e=B("zLVn"),C=B("9R94"),E=function(u){Object(H.a)(o,u);function o(){for(var _,p=arguments.length,d=new Array(p),A=0;A
=0||p.relatedTarget.className.indexOf("".concat(S,"-next"))>=0))return;u.setState({goInputText:""}),D(u.getValidValue())},u.go=function(p){var d=u.state.goInputText;if(d==="")return;(p.keyCode===a.ENTER||p.type==="click")&&(u.setState({goInputText:""}),u.props.quickGo(u.getValidValue()))},u}return Object(P.a)(f,[{key:"getValidValue",value:function(){var o=this.state,c=o.goInputText,_=o.current;return!c||isNaN(c)?_:Number(c)}},{key:"getPageSizeOptions",value:function(){var o=this.props,c=o.pageSize,_=o.pageSizeOptions;return _.some(function(p){return p.toString()===c.toString()})?_:_.concat([c.toString()]).sort(function(p,d){var A=isNaN(Number(p))?0:Number(p),D=isNaN(Number(d))?0:Number(d);return A-D})}},{key:"render",value:function(){var o=this,c=this.props,_=c.pageSize,p=c.locale,d=c.rootPrefixCls,A=c.changeSize,D=c.quickGo,S=c.goButton,L=c.selectComponentClass,M=c.buildOptionText,O=c.selectPrefixCls,j=c.disabled,G=this.state.goInputText,X="".concat(d,"-options"),ee=L,he=null,ge=null,de=null;if(!A&&!D)return null;var Te=this.getPageSizeOptions();if(A&&ee){var xe=Te.map(function(ce,ae){return e.a.createElement(ee.Option,{key:ae,value:ce.toString()},(M||o.buildOptionText)(ce))});he=e.a.createElement(ee,{disabled:j,prefixCls:O,showSearch:!1,className:"".concat(X,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(_||Te[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ae){return ae.parentNode}},xe)}return D&&(S&&(de=typeof S=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:j,className:"".concat(X,"-quick-jumper-button")},p.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},S)),ge=e.a.createElement("div",{className:"".concat(X,"-quick-jumper")},p.jump_to,e.a.createElement("input",{disabled:j,type:"text",value:G,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),p.page,de)),e.a.createElement("li",{className:"".concat(X)},he,ge)}}]),f}(e.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var l=i,s=B("N2Kk");function n(){}function r(T){return typeof T=="number"&&isFinite(T)&&Math.floor(T)===T}function t(T,y,f){return f}function b(T,y,f){var u=typeof T=="undefined"?y.pageSize:T;return Math.floor((f.total-1)/u)+1}var v=function(T){Object(R.a)(f,T);var y=Object(K.a)(f);function f(u){var o;Object(W.a)(this,f),o=y.call(this,u),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(b(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(A,D){var S=o.props.prefixCls,L=A||e.a.createElement("button",{type:"button","aria-label":D,className:"".concat(S,"-item-link")});return typeof A=="function"&&(L=e.a.createElement(A,Object(I.a)({},o.props))),L},o.savePaginationNode=function(A){o.paginationNode=A},o.isValid=function(A){return r(A)&&A!==o.state.current},o.shouldDisplayQuickJumper=function(){var A=o.props,D=A.showQuickJumper,S=A.pageSize,L=A.total;return L<=S?!1:D},o.handleKeyDown=function(A){(A.keyCode===a.ARROW_UP||A.keyCode===a.ARROW_DOWN)&&A.preventDefault()},o.handleKeyUp=function(A){var D=o.getValidValue(A),S=o.state.currentInputValue;D!==S&&o.setState({currentInputValue:D}),A.keyCode===a.ENTER?o.handleChange(D):A.keyCode===a.ARROW_UP?o.handleChange(D-1):A.keyCode===a.ARROW_DOWN&&o.handleChange(D+1)},o.changePageSize=function(A){var D=o.state.current,S=b(A,o.state,o.props);D=D>S?S:D,S===0&&(D=o.state.current),typeof A=="number"&&("pageSize"in o.props||o.setState({pageSize:A}),"current"in o.props||o.setState({current:D,currentInputValue:D})),o.props.onShowSizeChange(D,A),"onChange"in o.props&&o.props.onChange&&o.props.onChange(D,A)},o.handleChange=function(A){var D=o.props.disabled,S=A;if(o.isValid(S)&&!D){var L=b(void 0,o.state,o.props);S>L?S=L:S<1&&(S=1),"current"in o.props||o.setState({current:S,currentInputValue:S});var M=o.state.pageSize;return o.props.onChange(S,M),S}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?S-2:0),M=2;M=_?d=_:d=Number(c),d}},{key:"getShowSizeChanger",value:function(){var o=this.props,c=o.showSizeChanger,_=o.total,p=o.totalBoundaryShowSizeChanger;return typeof c!="undefined"?c:_>p}},{key:"renderPrev",value:function(o){var c=this.props,_=c.prevIcon,p=c.itemRender,d=p(o,"prev",this.getItemIcon(_,"prev page")),A=!this.hasPrev();return Object(N.isValidElement)(d)?Object(N.cloneElement)(d,{disabled:A}):d}},{key:"renderNext",value:function(o){var c=this.props,_=c.nextIcon,p=c.itemRender,d=p(o,"next",this.getItemIcon(_,"next page")),A=!this.hasNext();return Object(N.isValidElement)(d)?Object(N.cloneElement)(d,{disabled:A}):d}},{key:"render",value:function(){var o=this,c=this.props,_=c.prefixCls,p=c.className,d=c.style,A=c.disabled,D=c.hideOnSinglePage,S=c.total,L=c.locale,M=c.showQuickJumper,O=c.showLessItems,j=c.showTitle,G=c.showTotal,X=c.simple,ee=c.itemRender,he=c.showPrevNextJumpers,ge=c.jumpPrevIcon,de=c.jumpNextIcon,Te=c.selectComponentClass,xe=c.selectPrefixCls,ce=c.pageSizeOptions,ae=this.state,Le=ae.current,Ye=ae.pageSize,Fe=ae.currentInputValue;if(D===!0&&S<=Ye)return null;var We=b(void 0,this.state,this.props),be=[],Ee=null,Ae=null,Ie=null,$=null,se=null,ue=M&&M.goButton,pe=O?1:2,Se=Le-1>0?Le-1:0,Pe=Le+1=pe*2&&Le!==1+2&&(be[0]=Object(N.cloneElement)(be[0],{className:"".concat(_,"-item-after-jump-prev")}),be.unshift(Ee)),We-Le>=pe*2&&Le!==We-2&&(be[be.length-1]=Object(N.cloneElement)(be[be.length-1],{className:"".concat(_,"-item-before-jump-next")}),be.push(Ae)),_e!==1&&be.unshift(Ie),we!==We&&be.push($)}var re=null;G&&(re=e.a.createElement("li",{className:"".concat(_,"-total-text")},G(S,[S===0?0:(Le-1)*Ye+1,Le*Ye>S?S:Le*Ye])));var Z=!this.hasPrev()||!We,J=!this.hasNext()||!We;return e.a.createElement("ul",Object(Q.a)({className:E()(_,p,Object(H.a)({},"".concat(_,"-disabled"),A)),style:d,unselectable:"unselectable",ref:this.savePaginationNode},De),re,e.a.createElement("li",{title:j?L.prev_page:null,onClick:this.prev,tabIndex:Z?null:0,onKeyPress:this.runIfEnterPrev,className:E()("".concat(_,"-prev"),Object(H.a)({},"".concat(_,"-disabled"),Z)),"aria-disabled":Z},this.renderPrev(Se)),be,e.a.createElement("li",{title:j?L.next_page:null,onClick:this.next,tabIndex:J?null:0,onKeyPress:this.runIfEnterNext,className:E()("".concat(_,"-next"),Object(H.a)({},"".concat(_,"-disabled"),J)),"aria-disabled":J},this.renderNext(Pe)),e.a.createElement(l,{disabled:A,locale:L,rootPrefixCls:_,selectComponentClass:Te,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Le,pageSize:Ye,pageSizeOptions:ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ue}))}}],[{key:"getDerivedStateFromProps",value:function(o,c){var _={};if("current"in o&&(_.current=o.current,o.current!==c.current&&(_.currentInputValue=_.current)),"pageSize"in o&&o.pageSize!==c.pageSize){var p=c.current,d=b(o.pageSize,c,o);p=p>d?d:p,"current"in o||(_.current=p,_.currentInputValue=p),_.pageSize=o.pageSize}return _}}]),f}(e.a.Component);v.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:s.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var m=v},"6RRn":function(Me,ne,B){"use strict";var Q=B("wCXF"),H=B("n6Qo");B.d(ne,"b",function(){return H.a});var I=B("IBYe"),W=B("6eGT"),P=B("hW8S");B.d(ne,"a",function(){return P.a}),ne.c=Q.b},"6UM0":function(Me,ne,B){var Q,H;(function(){var I;(function(){"use strict";var P=[function(e,C,E){var g=E(1).Beautifier,h=E(5).Options;function a(i,l){var s=new g(i,l);return s.beautify()}e.exports=a,e.exports.defaultOptions=function(){return new h}},function(e,C,E){var g=E(2).Output,h=E(3).Token,a=E(4),i=E(5).Options,l=E(7).Tokenizer,s=E(7).line_starters,n=E(7).positionable_operators,r=E(7).TOKEN;function t(O,j){return j.indexOf(O)!==-1}function b(O){return O.replace(/^\s+/g,"")}function v(O){for(var j={},G=0;GG&&(G=O.line_indent_level));var X={mode:j,parent:O,last_token:O?O.last_token:new h(r.START_BLOCK,""),last_word:O?O.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:G,alignment:0,line_indent_level:O?O.line_indent_level:G,start_line_index:this._output.get_line_number(),ternary_depth:0};return X},L.prototype._reset=function(O){var j=O.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new g(this._options,j),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var G=new l(O,this._options);return this._tokens=G.tokenize(),O},L.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O,j=this._reset(this._source_text),G=this._options.eol;this._options.eol==="auto"&&(G=`
`,j&&a.lineBreak.test(j||"")&&(G=j.match(a.lineBreak)[0]));for(var X=this._tokens.next();X;)this.handle_token(X),this._last_last_text=this._flags.last_token.text,this._flags.last_token=X,X=this._tokens.next();return O=this._output.get_code(G),O},L.prototype.handle_token=function(O,j){O.type===r.START_EXPR?this.handle_start_expr(O):O.type===r.END_EXPR?this.handle_end_expr(O):O.type===r.START_BLOCK?this.handle_start_block(O):O.type===r.END_BLOCK?this.handle_end_block(O):O.type===r.WORD?this.handle_word(O):O.type===r.RESERVED?this.handle_word(O):O.type===r.SEMICOLON?this.handle_semicolon(O):O.type===r.STRING?this.handle_string(O):O.type===r.EQUALS?this.handle_equals(O):O.type===r.OPERATOR?this.handle_operator(O):O.type===r.COMMA?this.handle_comma(O):O.type===r.BLOCK_COMMENT?this.handle_block_comment(O,j):O.type===r.COMMENT?this.handle_comment(O,j):O.type===r.DOT?this.handle_dot(O):O.type===r.EOF?this.handle_eof(O):O.type===r.UNKNOWN?this.handle_unknown(O,j):this.handle_unknown(O,j)},L.prototype.handle_whitespace_and_comments=function(O,j){var G=O.newlines,X=this._options.keep_array_indentation&&d(this._flags.mode);if(O.comments_before)for(var ee=O.comments_before.next();ee;)this.handle_whitespace_and_comments(ee,j),this.handle_token(ee,j),ee=O.comments_before.next();if(X)for(var he=0;he0,j);else if(this._options.max_preserve_newlines&&G>this._options.max_preserve_newlines&&(G=this._options.max_preserve_newlines),this._options.preserve_newlines&&G>1){this.print_newline(!1,j);for(var ge=1;ge0&&(!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))},L.prototype.set_mode=function(O){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,O),this._flags=this.create_flags(this._previous_flags,O),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},L.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===c.Statement&&_(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},L.prototype.start_of_object_property=function(){return this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||T(this._flags.last_token,["get","set"]))},L.prototype.start_of_statement=function(O){var j=!1;return j=j||T(this._flags.last_token,["var","let","const"])&&O.type===r.WORD,j=j||m(this._flags.last_token,"do"),j=j||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&T(this._flags.last_token,M)&&!O.newlines,j=j||m(this._flags.last_token,"else")&&!(m(O,"if")&&!O.comments_before),j=j||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),j=j||this._flags.last_token.type===r.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(O.text==="--"||O.text==="++")&&this._last_last_text!=="function"&&O.type!==r.WORD&&O.type!==r.RESERVED,j=j||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||T(this._flags.last_token,["get","set"])),j?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(O,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O,T(O,["do","for","if","while"])),!0):!1},L.prototype.handle_start_expr=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O);var j=c.Expression;if(O.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){T(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(O),this.set_mode(j),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}j=c.ArrayLiteral,d(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),t(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,j=c.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,j=c.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&O.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var G=this._tokens.peek(-3);if(this._options.space_after_named_function&&G){var X=this._tokens.peek(-4);T(G,["async","function"])||G.text==="*"&&T(X,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?(G.text==="{"||G.text===","||G.text==="*"&&(X.text==="{"||X.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(O);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(O,O.newlines),this.print_token(O),this.set_mode(j),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},L.prototype.handle_end_expr=function(O){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(O,O.text==="]"&&d(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.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(O),this.restore_mode(),_(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},L.prototype.handle_start_block=function(O){this.handle_whitespace_and_comments(O);var j=this._tokens.peek(),G=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):G&&(t(G.text,[":",","])&&t(j.type,[r.STRING,r.WORD,r.RESERVED])||t(j.text,["get","set","..."])&&t(G.type,[r.WORD,r.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(G.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):t(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||T(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(T(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var X=!j.comments_before&&j.text==="}",ee=X&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var he=0,ge=null;this._flags.inline_frame=!0;do if(he+=1,ge=this._tokens.peek(he-1),ge.newlines){this._flags.inline_frame=!1;break}while(ge.type!==r.EOF&&!(ge.type===r.END_BLOCK&&ge.opened===O))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(ee||this._flags.last_token.type===r.EQUALS||T(this._flags.last_token,y)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(d(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(O),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(O),this.indent(),!X&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},L.prototype.handle_end_block=function(O){for(this.handle_whitespace_and_comments(O);this._flags.mode===c.Statement;)this.restore_mode();var j=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!j?this._output.space_before_token=!0:this._options.brace_style==="expand"?j||this.print_newline():j||(d(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(O)},L.prototype.handle_word=function(O){if(O.type===r.RESERVED){if(t(O.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)O.type=r.WORD;else if(O.text==="import"&&t(this._tokens.peek().text,["(","."]))O.type=r.WORD;else if(t(O.text,["as","from"])&&!this._flags.import_block)O.type=r.WORD;else if(this._flags.mode===c.ObjectLiteral){var j=this._tokens.peek();j.text===":"&&(O.type=r.WORD)}}if(this.start_of_statement(O)?T(this._flags.last_token,["var","let","const"])&&O.type===r.WORD&&(this._flags.declaration_statement=!0):O.newlines&&!A(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!T(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(O),this.print_newline()):this.handle_whitespace_and_comments(O),this._flags.do_block&&!this._flags.do_while)if(m(O,"while")){this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&m(O,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&T(O,["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(O),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O)),m(O,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!O.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?T(this._flags.last_token,["get","set","new","export"])||T(this._flags.last_token,M)?this._output.space_before_token=!0:m(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(A(this._flags.mode)||d(this._flags.mode))||this.print_newline(),this.print_token(O),this._flags.last_word=O.text;return}var G="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?G="SPACE":T(O,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines?G="NEWLINE":(G="SPACE",this._output.space_before_token=!0):G="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===c.BlockStatement?G="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&A(this._flags.mode)?G="SPACE":this._flags.last_token.type===r.STRING?G="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(this._last_last_text,["{",","]))?G="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?G="SPACE":G="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,G="NEWLINE"),T(O,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?G="SPACE":G="NEWLINE"),T(O,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var X=this._output.current_line;X.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else G==="NEWLINE"?T(this._flags.last_token,y)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&T(O,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!T(O,["var","let","const"]))&&this._flags.last_token.text!==":"&&(m(O,"if")&&m(O.previous,"else")?this._output.space_before_token=!0:this.print_newline()):T(O,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&d(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():G==="SPACE"&&(this._output.space_before_token=!0);O.previous&&(O.previous.type===r.WORD||O.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(O),this._flags.last_word=O.text,O.type===r.RESERVED&&(O.text==="do"?this._flags.do_block=!0:O.text==="if"?this._flags.if_block=!0:O.text==="import"?this._flags.import_block=!0:this._flags.import_block&&m(O,"from")&&(this._flags.import_block=!1))},L.prototype.handle_semicolon=function(O){this.start_of_statement(O)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(O);for(var j=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&m(j,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(O)},L.prototype.handle_string=function(O){O.text.startsWith("`")&&O.newlines===0&&O.whitespace_before===""&&(O.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(O)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(O),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O):O.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(O.previous.text==="]"||O.previous.text===")")&&O.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(O)},L.prototype.handle_equals=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0},L.prototype.handle_comma=function(O){this.handle_whitespace_and_comments(O,!0),this.print_token(O),this._output.space_before_token=!0,this._flags.declaration_statement?(A(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(O)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)},L.prototype.handle_operator=function(O){var j=O.text==="*"&&(T(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),G=t(O.text,["-","+"])&&(t(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||t(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(O)){var X=!j;this.handle_whitespace_and_comments(O,X)}if(O.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(O);return}if(O.text==="::"){this.print_token(O);return}if(this._flags.last_token.type===r.OPERATOR&&t(this._options.operator_position,o)&&this.allow_wrap_or_preserved_newline(O),O.text===":"&&this._flags.in_case){this.print_token(O),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.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 ee=!0,he=!0,ge=!1;if(O.text===":"?this._flags.ternary_depth===0?ee=!1:(this._flags.ternary_depth-=1,ge=!0):O.text==="?"&&(this._flags.ternary_depth+=1),!G&&!j&&this._options.preserve_newlines&&t(O.text,n)){var de=O.text===":",Te=de&&ge,xe=de&&!ge;switch(this._options.operator_position){case u.before_newline:this._output.space_before_token=!xe,this.print_token(O),(!de||Te)&&this.allow_wrap_or_preserved_newline(O),this._output.space_before_token=!0;return;case u.after_newline:this._output.space_before_token=!0,!de||Te?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(O):this._output.space_before_token=!1,this.print_token(O),this._output.space_before_token=!0;return;case u.preserve_newline:xe||this.allow_wrap_or_preserved_newline(O),ee=!(this._output.just_added_newline()||xe),this._output.space_before_token=ee,this.print_token(O),this._output.space_before_token=!0;return}}if(j){this.allow_wrap_or_preserved_newline(O),ee=!1;var ce=this._tokens.peek();he=ce&&t(ce.type,[r.WORD,r.RESERVED])}else if(O.text==="...")this.allow_wrap_or_preserved_newline(O),ee=this._flags.last_token.type===r.START_BLOCK,he=!1;else if(t(O.text,["--","++","!","~"])||G){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(O),ee=!1,he=!1,O.newlines&&(O.text==="--"||O.text==="++"||O.text==="~")){var ae=T(this._flags.last_token,y)&&O.newlines;ae&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ae,!0)}this._flags.last_token.text===";"&&A(this._flags.mode)&&(ee=!0),this._flags.last_token.type===r.RESERVED?ee=!0:this._flags.last_token.type===r.END_EXPR?ee=!(this._flags.last_token.text==="]"&&(O.text==="--"||O.text==="++")):this._flags.last_token.type===r.OPERATOR&&(ee=t(O.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(O.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(he=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ee,this.print_token(O),this._output.space_before_token=he},L.prototype.handle_block_comment=function(O,j){if(this._output.raw){this._output.add_raw_token(O),O.directives&&O.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(O.directives){this.print_newline(!1,j),this.print_token(O),O.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(O.text)&&!O.newlines){this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0;return}else this.print_block_commment(O,j)},L.prototype.print_block_commment=function(O,j){var G=p(O.text),X,ee=!1,he=!1,ge=O.whitespace_before,de=ge.length;if(this.print_newline(!1,j),this.print_token_line_indentation(O),this._output.add_token(G[0]),this.print_newline(!1,j),G.length>1){for(G=G.slice(1),ee=D(G,"*"),he=S(G,ge),ee&&(this._flags.alignment=1),X=0;X=0;a--)if(this.__items[a].match(h))return!0;return!1},C.prototype.set_indent=function(h,a){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},C.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)},C.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},C.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},C.prototype.is_empty=function(){return this.__items.length===0},C.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},C.prototype.push=function(h){this.__items.push(h);var a=h.lastIndexOf(`
`);a!==-1?this.__character_count=h.length-a:this.__character_count+=h.length},C.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},C.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},C.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},C.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},C.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function E(h,a){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),a=a||"",h.indent_level>0&&(a=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}E.prototype.get_indent_size=function(h,a){var i=this.__base_string_length;return a=a||0,h<0&&(i=0),i+=h*this.__indent_size,i+=a,i},E.prototype.get_indent_string=function(h,a){var i=this.__base_string;return a=a||0,h<0&&(h=0,i=""),a+=h*this.__indent_size,this.__ensure_cache(a),i+=this.__cache[a],i},E.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var h=this.__cache.length,a=0,i="";this.__indent_size&&h>=this.__indent_size&&(a=Math.floor(h/this.__indent_size),h-=a*this.__indent_size,i=new Array(a+1).join(this.__indent_string)),h&&(i+=new Array(h+1).join(" ")),this.__cache.push(i)};function g(h,a){this.__indent_cache=new E(h,a),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new C(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}g.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},g.prototype.get_line_number=function(){return this.__lines.length},g.prototype.get_indent_string=function(h,a){return this.__indent_cache.get_indent_string(h,a)},g.prototype.get_indent_size=function(h,a){return this.__indent_cache.get_indent_size(h,a)},g.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},g.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},g.prototype.get_code=function(h){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 i=this.__lines.join(`
`);return h!==`
`&&(i=i.replace(/[\n]/g,h)),i},g.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},g.prototype.set_indent=function(h,a){return h=h||0,a=a||0,this.next_line.set_indent(h,a),this.__lines.length>1?(this.current_line.set_indent(h,a),!0):(this.current_line.set_indent(),!1)},g.prototype.add_raw_token=function(h){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},g.prototype.just_added_newline=function(){return this.current_line.is_empty()},g.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},g.prototype.ensure_empty_line_above=function(h,a){for(var i=this.__lines.length-2;i>=0;){var l=this.__lines[i];if(l.is_empty())break;if(l.item(0).indexOf(h)!==0&&l.item(-1)!==a){this.__lines.splice(i+1,0,new C(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=g},function(e){function C(E,g,h,a){this.type=E,this.text=g,this.comments_before=null,this.newlines=h||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=C},function(e,C){var E="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",g="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\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",i="(?:\\\\u[0-9a-fA-F]{4}|["+E+h+"])",l="(?:\\\\u[0-9a-fA-F]{4}|["+g+h+a+"])*";C.identifier=new RegExp(i+l,"g"),C.identifierStart=new RegExp(i),C.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+g+h+a+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;C.newline=/[\n\r\u2028\u2029]/,C.lineBreak=new RegExp(`\r
|`+C.newline.source),C.allLineBreaks=new RegExp(C.lineBreak.source,"g")},function(e,C,E){var g=E(6).Options,h=["before-newline","after-newline","preserve-newline"];function a(i){g.call(this,i,"js");var l=this.raw_options.brace_style||null;l==="expand-strict"?this.raw_options.brace_style="expand":l==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),f=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";f=f.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),f="\\?\\.(?!\\d) "+f,f=f.replace(/ /g,"|");var u=new RegExp(f),o="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=o.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),_=new RegExp("^(?:"+c.join("|")+")$"),p,d=function(D,S){h.call(this,D,S),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var L=new s(this._input),M=new n(this._input).read_options(this._options);this.__patterns={template:M,identifier:M.starting_with(l.identifier).matching(l.identifierMatch),number:L.matching(v),punct:L.matching(u),comment:L.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:L.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:L.matching(//),include:L.starting_with(/#include/).until_after(l.lineBreak),shebang:L.starting_with(/#!/).until_after(l.lineBreak),xml:L.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:M.until(/['\\\n\r\u2028\u2029]/),double_quote:M.until(/["\\\n\r\u2028\u2029]/),template_text:M.until(/[`\\$]/),template_expression:M.until(/[`}\\]/)}};d.prototype=new h,d.prototype._is_comment=function(D){return D.type===t.COMMENT||D.type===t.BLOCK_COMMENT||D.type===t.UNKNOWN},d.prototype._is_opening=function(D){return D.type===t.START_BLOCK||D.type===t.START_EXPR},d.prototype._is_closing=function(D,S){return(D.type===t.END_BLOCK||D.type===t.END_EXPR)&&S&&(D.text==="]"&&S.text==="["||D.text===")"&&S.text==="("||D.text==="}"&&S.text==="{")},d.prototype._reset=function(){p=!1},d.prototype._get_next_token=function(D,S){var L=null;this._readWhitespace();var M=this._input.peek();return M===null?this._create_token(t.EOF,""):(L=L||this._read_non_javascript(M),L=L||this._read_string(M),L=L||this._read_word(D),L=L||this._read_singles(M),L=L||this._read_comment(M),L=L||this._read_regexp(M,D),L=L||this._read_xml(M,D),L=L||this._read_punctuation(),L=L||this._create_token(t.UNKNOWN,this._input.next()),L)},d.prototype._read_word=function(D){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(l.allLineBreaks,`
`),!(D.type===t.DOT||D.type===t.RESERVED&&(D.text==="set"||D.text==="get"))&&_.test(S)?(S==="in"||S==="of")&&(D.type===t.WORD||D.type===t.STRING)?this._create_token(t.OPERATOR,S):this._create_token(t.RESERVED,S):this._create_token(t.WORD,S);if(S=this.__patterns.number.read(),S!=="")return this._create_token(t.WORD,S)},d.prototype._read_singles=function(D){var S=null;return D==="("||D==="["?S=this._create_token(t.START_EXPR,D):D===")"||D==="]"?S=this._create_token(t.END_EXPR,D):D==="{"?S=this._create_token(t.START_BLOCK,D):D==="}"?S=this._create_token(t.END_BLOCK,D):D===";"?S=this._create_token(t.SEMICOLON,D):D==="."&&T.test(this._input.peek(1))?S=this._create_token(t.DOT,D):D===","&&(S=this._create_token(t.COMMA,D)),S&&this._input.next(),S},d.prototype._read_punctuation=function(){var D=this.__patterns.punct.read();if(D!=="")return D==="="?this._create_token(t.EQUALS,D):D==="?."?this._create_token(t.DOT,D):this._create_token(t.OPERATOR,D)},d.prototype._read_non_javascript=function(D){var S="";if(D==="#"){if(this._is_first_token()&&(S=this.__patterns.shebang.read(),S))return this._create_token(t.UNKNOWN,S.trim()+`
`);if(S=this.__patterns.include.read(),S)return this._create_token(t.UNKNOWN,S.trim()+`
`);D=this._input.next();var L="#";if(this._input.hasNext()&&this._input.testChar(m)){do D=this._input.next(),L+=D;while(this._input.hasNext()&&D!=="#"&&D!=="=");return D==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(L+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(L+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,L)}this._input.back()}else if(D==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(l.newline);)S+=this._input.next();return p=!0,this._create_token(t.COMMENT,S)}}else if(p&&D==="-"&&(S=this.__patterns.html_comment_end.read(),S))return p=!1,this._create_token(t.COMMENT,S);return null},d.prototype._read_comment=function(D){var S=null;if(D==="/"){var L="";if(this._input.peek(1)==="*"){L=this.__patterns.block_comment.read();var M=b.get_directives(L);M&&M.ignore==="start"&&(L+=b.readIgnored(this._input)),L=L.replace(l.allLineBreaks,`
`),S=this._create_token(t.BLOCK_COMMENT,L),S.directives=M}else this._input.peek(1)==="/"&&(L=this.__patterns.comment.read(),S=this._create_token(t.COMMENT,L))}return S},d.prototype._read_string=function(D){if(D==="`"||D==="'"||D==='"'){var S=this._input.next();return this.has_char_escapes=!1,D==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(D),this.has_char_escapes&&this._options.unescape_strings&&(S=A(S)),this._input.peek()===D&&(S+=this._input.next()),S=S.replace(l.allLineBreaks,`
`),this._create_token(t.STRING,S)}return null},d.prototype._allow_regexp_or_xml=function(D){return D.type===t.RESERVED&&r(D.text,["return","case","throw","else","do","typeof","yield"])||D.type===t.END_EXPR&&D.text===")"&&D.opened.previous.type===t.RESERVED&&r(D.opened.previous.text,["if","while","for"])||r(D.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},d.prototype._read_regexp=function(D,S){if(D==="/"&&this._allow_regexp_or_xml(S)){for(var L=this._input.next(),M=!1,O=!1;this._input.hasNext()&&(M||O||this._input.peek()!==D)&&!this._input.testChar(l.newline);)L+=this._input.peek(),M?M=!1:(M=this._input.peek()==="\\",this._input.peek()==="["?O=!0:this._input.peek()==="]"&&(O=!1)),this._input.next();return this._input.peek()===D&&(L+=this._input.next(),L+=this._input.read(l.identifier)),this._create_token(t.STRING,L)}return null},d.prototype._read_xml=function(D,S){if(this._options.e4x&&D==="<"&&this._allow_regexp_or_xml(S)){var L="",M=this.__patterns.xml.read_match();if(M){for(var O=M[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),j=O.indexOf("{")===0,G=0;M;){var X=!!M[1],ee=M[2],he=!!M[M.length-1]||ee.slice(0,8)==="![CDATA[";if(!he&&(ee===O||j&&ee.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(X?--G:++G),L+=M[0],G<=0)break;M=this.__patterns.xml.read_match()}return M||(L+=this._input.match(/[\s\S]*/g)[0]),L=L.replace(l.allLineBreaks,`
`),this._create_token(t.STRING,L)}}return null};function A(D){for(var S="",L=0,M=new g(D),O=null;M.hasNext();)if(O=M.match(/([\s]|[^\\]|\\\\)+/g),O&&(S+=O[0]),M.peek()==="\\"){if(M.next(),M.peek()==="x")O=M.match(/x([0-9A-Fa-f]{2})/g);else if(M.peek()==="u")O=M.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",M.hasNext()&&(S+=M.next());continue}if(!O)return D;if(L=parseInt(O[1],16),L>126&&L<=255&&O[0].indexOf("x")===0)return D;if(L>=0&&L<32){S+="\\"+O[0];continue}else L===34||L===39||L===92?S+="\\"+String.fromCharCode(L):S+=String.fromCharCode(L)}return S}d.prototype._read_string_recursive=function(D,S,L){var M,O;D==="'"?O=this.__patterns.single_quote:D==='"'?O=this.__patterns.double_quote:D==="`"?O=this.__patterns.template_text:D==="}"&&(O=this.__patterns.template_expression);for(var j=O.read(),G="";this._input.hasNext();){if(G=this._input.next(),G===D||!S&&l.newline.test(G)){this._input.back();break}else G==="\\"&&this._input.hasNext()?(M=this._input.peek(),M==="x"||M==="u"?this.has_char_escapes=!0:M==="\r"&&this._input.peek(1)===`
`&&this._input.next(),G+=this._input.next()):L&&(L==="${"&&G==="$"&&this._input.peek()==="{"&&(G+=this._input.next()),L===G&&(D==="`"?G+=this._read_string_recursive("}",S,"`"):G+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(G+=this._input.next())));G+=O.read(),j+=G}return j},e.exports.Tokenizer=d,e.exports.TOKEN=t,e.exports.positionable_operators=y.slice(),e.exports.line_starters=o.slice()},function(e){var C=RegExp.prototype.hasOwnProperty("sticky");function E(g){this.__input=g||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position=0&&g=0&&h=g.length&&this.__input.substring(h-g.length,h).toLowerCase()===g},e.exports.InputScanner=E},function(e,C,E){var g=E(8).InputScanner,h=E(3).Token,a=E(10).TokenStream,i=E(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(n,r){this._input=new g(n),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var n,r=new h(l.START,""),t=null,b=[],v=new a;r.type!==l.EOF;){for(n=this._get_next_token(r,t);this._is_comment(n);)v.add(n),n=this._get_next_token(r,t);v.isEmpty()||(n.comments_before=v,v=new a),n.parent=t,this._is_opening(n)?(b.push(t),t=n):t&&this._is_closing(n,t)&&(n.opened=t,t.closed=n,t=b.pop(),n.parent=t),n.previous=r,r.next=n,this.__tokens.add(n),r=n}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(n,r){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(l.RAW,t):this._create_token(l.EOF,"")},s.prototype._is_comment=function(n){return!1},s.prototype._is_opening=function(n){return!1},s.prototype._is_closing=function(n,r){return!1},s.prototype._create_token=function(n,r){var t=new h(n,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=s,e.exports.TOKEN=l},function(e){function C(E){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=E}C.prototype.restart=function(){this.__position=0},C.prototype.isEmpty=function(){return this.__tokens_length===0},C.prototype.hasNext=function(){return this.__position=0&&E/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new g,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(i){var l=this._create();return l._disabled[i]=!0,l._update(),l},a.prototype.read_options=function(i){var l=this._create();for(var s in h)l._disabled[s]=i.templating.indexOf(s)===-1;return l._update(),l},a.prototype.exclude=function(i){var l=this._create();return l._excluded[i]=!0,l._update(),l},a.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),i+=l,l=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},a.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},a.prototype._read_template=function(){var i="",l=this._input.peek();if(l==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(i=i||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},e.exports.TemplatablePattern=a}],R={};function K(e){var C=R[e];if(C!==void 0)return C.exports;var E=R[e]={exports:{}};return P[e](E,E.exports,K),E.exports}var N=K(0);I=N})();var W=I;!(Q=[],H=function(){return{js_beautify:W}}.apply(ne,Q),H!==void 0&&(Me.exports=H))})()},"6eGT":function(Me,ne,B){"use strict";function Q(H){return null}ne.a=Q},"746U":function(Me,ne,B){"use strict";B.d(ne,"f",function(){return Q}),B.d(ne,"l",function(){return H}),B.d(ne,"k",function(){return I}),B.d(ne,"j",function(){return W}),B.d(ne,"g",function(){return P}),B.d(ne,"m",function(){return R}),B.d(ne,"h",function(){return K}),B.d(ne,"n",function(){return N}),B.d(ne,"c",function(){return e}),B.d(ne,"a",function(){return C}),B.d(ne,"i",function(){return E}),B.d(ne,"o",function(){return g}),B.d(ne,"e",function(){return i}),B.d(ne,"d",function(){return l}),B.d(ne,"p",function(){return s}),B.d(ne,"b",function(){return n});function Q(r){return Array.isArray(r)}function H(r){return typeof r=="string"}function I(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function W(r){return typeof r=="number"&&!isNaN(r)}function P(r){return r===!0||r===!1}function R(r){return typeof r=="undefined"}function K(r){return!N(r)}function N(r){return R(r)||r===null}function e(r,t){if(!r)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function C(r){if(N(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function E(r){return typeof r=="function"}function g(r,t){const b=Math.min(r.length,t.length);for(let v=0;vfunction(){const T=Array.prototype.slice.call(arguments,0);return t(m,T)};let v={};for(const m of r)v[m]=b(m);return v}function s(r){return r===null?void 0:r}function n(r,t="Unreachable"){throw new Error(t)}},"815F":function(Me,ne,B){"use strict";B.d(ne,"e",function(){return K}),B.d(ne,"c",function(){return e}),B.d(ne,"d",function(){return C}),B.d(ne,"a",function(){return g}),B.d(ne,"f",function(){return h}),B.d(ne,"b",function(){return a});var Q=B("KQm4"),H=B("VTBJ"),I=B("Ff2n"),W=B("Zm9Q"),P=B("Kwbf"),R=B("OZM5");function K(i,l){return i!=null?i:l}function N(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=new Map;function s(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(t){var b=t.key,v=t.children;Object(P.a)(b!=null,"Tree node must have a certain key: [".concat(r).concat(b,"]"));var m=String(b);Object(P.a)(!l.has(m)||b===null||b===void 0,"Same 'key' exist in the Tree: ".concat(m)),l.set(m,!0),s(v,"".concat(r).concat(m," > "))})}s(i)}function e(i){function l(s){var n=Object(W.a)(s);return n.map(function(r){if(!Object(R.i)(r))return Object(P.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var t=r.key,b=r.props,v=b.children,m=Object(I.a)(b,["children"]),T=Object(H.a)({key:t},m),y=l(v);return y.length&&(T.children=y),T}).filter(function(r){return r})}return l(i)}function C(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(l===!0?[]:l),n=[];function r(t){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(v,m){var T=Object(R.h)(b?b.pos:"0",m),y=K(v.key,T),f=Object(H.a)(Object(H.a)({},v),{},{parent:b,pos:T,children:null,data:v,isStart:[].concat(Object(Q.a)(b?b.isStart:[]),[m===0]),isEnd:[].concat(Object(Q.a)(b?b.isEnd:[]),[m===t.length-1])});return n.push(f),l===!0||s.has(y)?f.children=r(v.children||[],f):f.children=[],f})}return r(i),n}function E(i,l,s){var n;s?typeof s=="string"?n=function(b){return b[s]}:typeof s=="function"&&(n=function(b){return s(b)}):n=function(b,v){return K(b.key,v)};function r(t,b,v){var m=t?t.children:i,T=t?Object(R.h)(v.pos,b):"0";if(t){var y=n(t,T),f={node:t,index:b,pos:T,key:y,parentPos:v.node?v.pos:null,level:v.level+1};l(f)}m&&m.forEach(function(u,o){r(u,o,{node:t,pos:T,level:v?v.level+1:-1})})}r(null)}function g(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=l.initWrapper,n=l.processEntity,r=l.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,b={},v={},m={posEntities:b,keyEntities:v};return s&&(m=s(m)||m),E(i,function(T){var y=T.node,f=T.index,u=T.pos,o=T.key,c=T.parentPos,_=T.level,p={node:y,index:f,key:o,pos:u,level:_},d=K(o,u);b[u]=p,v[d]=p,p.parent=b[c],p.parent&&(p.parent.children=p.parent.children||[],p.parent.children.push(p)),n&&n(p,m)},t),r&&r(m),m}function h(i,l){var s=l.expandedKeys,n=l.selectedKeys,r=l.loadedKeys,t=l.loadingKeys,b=l.checkedKeys,v=l.halfCheckedKeys,m=l.dragOverNodeKey,T=l.dropPosition,y=l.keyEntities,f=y[i],u={eventKey:i,expanded:s.indexOf(i)!==-1,selected:n.indexOf(i)!==-1,loaded:r.indexOf(i)!==-1,loading:t.indexOf(i)!==-1,checked:b.indexOf(i)!==-1,halfChecked:v.indexOf(i)!==-1,pos:String(f?f.pos:""),dragOver:m===i&&T===0,dragOverGapTop:m===i&&T===-1,dragOverGapBottom:m===i&&T===1};return u}function a(i){var l=i.data,s=i.expanded,n=i.selected,r=i.checked,t=i.loaded,b=i.loading,v=i.halfChecked,m=i.dragOver,T=i.dragOverGapTop,y=i.dragOverGapBottom,f=i.pos,u=i.active,o=Object(H.a)(Object(H.a)({},l),{},{expanded:s,selected:n,checked:r,loaded:t,loading:b,halfChecked:v,dragOver:m,dragOverGapTop:T,dragOverGapBottom:y,pos:f,active:u});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(P.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),o}},"8HAY":function(Me,ne,B){"use strict";B.d(ne,"a",function(){return P}),B.d(ne,"b",function(){return R}),B.d(ne,"d",function(){return K}),B.d(ne,"e",function(){return N}),B.d(ne,"c",function(){return e});var Q=B("MI8n"),H=B("pmY6"),I=B("3/fG"),W=function(C,E,g,h){function a(i){return i instanceof g?i:new g(function(l){l(i)})}return new(g||(g=Promise))(function(i,l){function s(t){try{r(h.next(t))}catch(b){l(b)}}function n(t){try{r(h.throw(t))}catch(b){l(b)}}function r(t){t.done?i(t.value):a(t.value).then(s,n)}r((h=h.apply(C,E||[])).next())})};class P extends H.a{constructor(C,E="",g="",h=!0,a){super();this._onDidChange=this._register(new Q.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=C,this._label=E,this._cssClass=g,this._enabled=h,this._actionCallback=a}get id(){return this._id}get label(){return this._label}set label(C){this._setLabel(C)}_setLabel(C){this._label!==C&&(this._label=C,this._onDidChange.fire({label:C}))}get tooltip(){return this._tooltip||""}set tooltip(C){this._setTooltip(C)}_setTooltip(C){this._tooltip!==C&&(this._tooltip=C,this._onDidChange.fire({tooltip:C}))}get class(){return this._cssClass}set class(C){this._setClass(C)}_setClass(C){this._cssClass!==C&&(this._cssClass=C,this._onDidChange.fire({class:C}))}get enabled(){return this._enabled}set enabled(C){this._setEnabled(C)}_setEnabled(C){this._enabled!==C&&(this._enabled=C,this._onDidChange.fire({enabled:C}))}get checked(){return this._checked}set checked(C){this._setChecked(C)}_setChecked(C){this._checked!==C&&(this._checked=C,this._onDidChange.fire({checked:C}))}run(C,E){return W(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(C))})}}class R extends H.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Q.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Q.b),this.onDidRun=this._onDidRun.event}run(C,E){return W(this,void 0,void 0,function*(){if(!C.enabled)return;this._onBeforeRun.fire({action:C});let g;try{yield this.runAction(C,E)}catch(h){g=h}this._onDidRun.fire({action:C,error:g})})}runAction(C,E){return W(this,void 0,void 0,function*(){yield C.run(E)})}}class K extends P{constructor(C){super(K.ID,C,C?"separator text":"separator");this.checked=!1,this.enabled=!1}}K.ID="vs.actions.separator";class N{constructor(C,E,g,h){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=C,this.label=E,this.class=h,this._actions=g}get actions(){return this._actions}dispose(){}run(){return W(this,void 0,void 0,function*(){})}}class e extends P{constructor(){super(e.ID,I.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(Me,ne,B){Me.exports={button:"button___1wy9m"}},"9Bee":function(Me,ne,B){"use strict";var Q=B("DYRE"),H=B("zeV3"),I=B("+L6B"),W=B("2/Rp"),P=B("k1fw"),R=B("9og8"),K=B("tJVT"),N=B("WmNS"),e=B.n(N),C=B("q1tI"),E=B.n(C),g=B("vg9a"),h=B("DlQD"),a=B.n(h),i=B("rUJ1");function l(U,x){var w=U.match(/^(\s+)(?:```)/);if(w===null)return x;var k=w[1];return x.split(`
`).map(function(z){var F=z.match(/^\s+/);if(F===null)return z;var ie=Object(K.a)(F,1),Ce=ie[0];return Ce.length>=k.length?z.slice(k.length):z}).join(`
`)}var s=[],n=[""],r=new a.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){s.length=0,n=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(U,x,w,k){if(x>=U.length||U[x].level<=w)return x;var z=U[x];k.push("- "+z.text+""),x++;var F=[];return x=m(U,x,z.level,F),F.length>0&&(k.push("
"),F.forEach(function(ie){k.push(ie)}),k.push("
")),k.push(" "),x=m(U,x,w,k),x}function T(){return m(s,0,0,n),n.push("
"),n.join("")}var y={heading:function(x){var w=t.exec(x);if(w)return{type:"heading",raw:w[0],depth:w[1].length,text:w[2]}},fences:function(x){var w=this.rules.block.fences.exec(x);if(w){var k=w[0],z=l(k,w[3]||""),F=w[2]?w[2].trim():w[2];if(["latex","katex","math"].indexOf(F)>=0){var ie=o(),Ce=z;z=ie,c[ie]={type:"block",expression:Ce}}return{type:"code",raw:k,lang:F,text:z}}}},f=/(?:\${2})([^\n`]+?)(?:\${2})/gi,u=0,o=function(){return"__special_katext_id_".concat(u++,"__")},c={};function _(){return c}function p(){u=0,c={}}function d(U){return U=U.replace(f,function(x,w){var k=o();return c[k]={type:"inline",expression:w},k}),U}var A=r.listitem;r.listitem=function(U){return A(d(U))};var D=r.paragraph;r.paragraph=function(U){return D(d(U))};var S=r.tablecell;r.tablecell=function(U,x){return S(d(U),x)},r.code=function(U,x,w){var k=(x||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"".concat(U,"
"):'
').concat(w?U:Object(i.escape)(U,!0),`
`):''+(w?U:Object(i.escape)(U,!0))+"
"},r.heading=function(U,x,w){var k=this.options.headerPrefix+w.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:k,level:x,text:U}),"'+U+""},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:y,renderer:r});var L=a.a,M=B("SJMd"),O=B("ulZh"),j=B.n(O),G=B("m3rI"),X=B("Oy/b"),ee=B("p5ED"),he=B("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 ge=function(U,x){return(ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,k){w.__proto__=k}||function(w,k){for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&(w[z]=k[z])})(U,x)};function de(U,x){function w(){this.constructor=U}ge(U,x),U.prototype=x===null?Object.create(x):(w.prototype=x.prototype,new w)}function Te(U,x,w,k){return new(w||(w=Promise))(function(z,F){function ie($e){try{je(k.next($e))}catch(Re){F(Re)}}function Ce($e){try{je(k.throw($e))}catch(Re){F(Re)}}function je($e){var Re;$e.done?z($e.value):(Re=$e.value,Re instanceof w?Re:new w(function(Ze){Ze(Re)})).then(ie,Ce)}je((k=k.apply(U,x||[])).next())})}function xe(U,x){var w,k,z,F,ie={label:0,sent:function(){if(1&z[0])throw z[1];return z[1]},trys:[],ops:[]};return F={next:Ce(0),throw:Ce(1),return:Ce(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function Ce(je){return function($e){return function(Re){if(w)throw new TypeError("Generator is already executing.");for(;ie;)try{if(w=1,k&&(z=2&Re[0]?k.return:Re[0]?k.throw||((z=k.return)&&z.call(k),0):k.next)&&!(z=z.call(k,Re[1])).done)return z;switch(k=0,z&&(Re=[2&Re[0],z.value]),Re[0]){case 0:case 1:z=Re;break;case 4:return ie.label++,{value:Re[1],done:!1};case 5:ie.label++,k=Re[1],Re=[0];continue;case 7:Re=ie.ops.pop(),ie.trys.pop();continue;default:if(!(z=ie.trys,(z=z.length>0&&z[z.length-1])||Re[0]!==6&&Re[0]!==2)){ie=0;continue}if(Re[0]===3&&(!z||Re[1]>z[0]&&Re[1]',"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(F){var ie=document.createElement("div");ie.className=""+w.toolbarButtonStyleClass.name,ie.setAttribute("data-type-name",F.typeName),ie.innerHTML=F.icon,ie.addEventListener("click",function(){w.markerToolbarButtonClicked(ie,F)}),w.buttons.push(ie),w.markerButtons.push(ie)}),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 z=document.createElement("div");z.className=this.toolbarBlockStyleClass.name,z.style.whiteSpace="nowrap",z.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(z),this.addActionButton(z,'',"render"),this.addActionButton(z,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},U.prototype.addButtonClickListener=function(x){this.buttonClickListeners.push(x)},U.prototype.removeButtonClickListener=function(x){this.buttonClickListeners.indexOf(x)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(x),1)},U.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},U.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var x=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var w=0;w0&&this.buttonClickListeners.forEach(function(k){return k("marker",w)}),this.markerButtonOverflowBlock.style.display="none"},U.prototype.actionToolbarButtonClicked=function(x,w){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",w)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},U.prototype.setActiveButton=function(x){this.resetButtonStyles(),x.className=x.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),x.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},U.prototype.setActiveMarkerButton=function(x){var w=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===x});w&&this.setActiveButton(w)},U.prototype.setCurrentMarker=function(x){var w=this;this.currentMarker=x,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){w.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},U}(),Ie=function(){function U(x,w,k,z){this.panels=[],this.panelButtons=[],this.markerjsContainer=x,this.displayMode=w,this.uiStyleSettings=k,this.styles=z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return U.prototype.addStyles=function(){var x;this.toolboxStyleClass=this.styles.addClass(new Ee("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 Ee("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var w=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ee("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ee("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ee("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 Ee("toolbox-panel-row_colors",`
background-color: `+((x=this.uiStyleSettings.toolboxBackgroundColor)!==null&&x!==void 0?x:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ee("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
padding: `+w+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ee("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ee("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new be("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new be("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},U.prototype.show=function(x){var w;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=x,this.uiContainer.className=this.toolboxStyleClass.name+" "+((w=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},U.prototype.setPanelButtons=function(x){var w,k,z=this;this.panels=x,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((w=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&w!==void 0?w: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(F){var ie;F.uiStyleSettings=z.uiStyleSettings;var Ce=document.createElement("div");Ce.className=z.toolboxButtonStyleClass.name+" "+((ie=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:z.toolboxButtonStyleColorsClass.name),Ce.innerHTML=F.icon,Ce.title=F.title,Ce.addEventListener("click",function(){z.panelButtonClick(F)}),z.panelButtons.push(Ce),z.buttonRow.appendChild(Ce)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},U.prototype.panelButtonClick=function(x){var w=this,k=-1;if(x!==this.activePanel){k=this.panels.indexOf(x),this.panelRow.innerHTML="";var z=x.getUi();z.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(z),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=x}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){w.displayMode==="inline"?w.panelRow.style.display="none":w.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(F,ie){var Ce,je;F.className=w.toolboxButtonStyleClass.name+" "+(ie===k?""+((Ce=w.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ce!==void 0?Ce:w.toolboxActiveButtonStyleColorsClass.name):""+((je=w.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&je!==void 0?je:w.toolboxButtonStyleColorsClass.name))})},U}(),$=function(U,x){this.title=U,this.icon=x},se=function(U){function x(w,k,z,F){var ie=U.call(this,w,F||'')||this;return ie.colors=[],ie.addTransparent=!1,ie.colorBoxes=[],ie.colors=k,ie.currentColor=z,ie.setCurrentColor=ie.setCurrentColor.bind(ie),ie.getColorBox=ie.getColorBox.bind(ie),ie}return de(x,U),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function(z){var F=w.getColorBox(z);k.appendChild(F),w.colorBoxes.push(F)}),k},x.prototype.getColorBox=function(w){var k=this,z=this.uiStyleSettings.toolbarHeight/4,F=this.uiStyleSettings.toolbarHeight-z,ie=document.createElement("div");ie.style.display="inline-block",ie.style.boxSizing="content-box",ie.style.width=F-2+"px",ie.style.height=F-2+"px",ie.style.padding="1px",ie.style.marginRight="2px",ie.style.marginBottom="2px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderRadius=(F+2)/2+"px",ie.style.borderColor=w===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){k.setCurrentColor(w,ie)});var Ce=document.createElement("div");return Ce.style.display="inline-block",Ce.style.width=F-2+"px",Ce.style.height=F-2+"px",Ce.style.backgroundColor=w,Ce.style.borderRadius=F/2+"px",w==="transparent"&&(Ce.style.fill=this.uiStyleSettings.toolboxAccentColor,Ce.innerHTML=``),ie.appendChild(Ce),ie},x.prototype.setCurrentColor=function(w,k){var z=this;this.currentColor=w,this.colorBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(w)},x}($),ue=function(){function U(x,w,k){this._state="new",this._isSelected=!1,this._container=x,this._overlayContainer=w,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(U.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),U.prototype.ownsTarget=function(x){return!1},Object.defineProperty(U.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),U.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},U.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},U.prototype.pointerDown=function(x,w){},U.prototype.dblClick=function(x,w){},U.prototype.manipulate=function(x){},U.prototype.pointerUp=function(x){this.stateChanged()},U.prototype.dispose=function(){},U.prototype.addMarkerVisualToContainer=function(x){this.container.childNodes.length>0?this.container.insertBefore(x,this.container.childNodes[0]):this.container.appendChild(x)},U.prototype.getState=function(){return{typeName:U.typeName,state:this.state,notes:this.notes}},U.prototype.restoreState=function(x){this._state=x.state,this.notes=x.notes},U.prototype.scale=function(x,w){},U.prototype.colorChanged=function(x){this.onColorChanged&&this.onColorChanged(x),this.stateChanged()},U.prototype.fillColorChanged=function(x){this.onFillColorChanged&&this.onFillColorChanged(x),this.stateChanged()},U.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var x=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),x.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(x)&&this.onStateChanged(this)}},U.typeName="MarkerBase",U}(),pe=function(){function U(){this.findGripByVisual=this.findGripByVisual.bind(this)}return U.prototype.findGripByVisual=function(x){return this.topLeft.ownsTarget(x)?this.topLeft:this.topCenter.ownsTarget(x)?this.topCenter:this.topRight.ownsTarget(x)?this.topRight:this.centerLeft.ownsTarget(x)?this.centerLeft:this.centerRight.ownsTarget(x)?this.centerRight:this.bottomLeft.ownsTarget(x)?this.bottomLeft:this.bottomCenter.ownsTarget(x)?this.bottomCenter:this.bottomRight.ownsTarget(x)?this.bottomRight:void 0},U}(),Se=function(){function U(){this.GRIP_SIZE=10,this.visual=ae.createGroup(),this.visual.appendChild(ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return U.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},U}(),Pe=function(){function U(){}return U.toITransformMatrix=function(x){return{a:x.a,b:x.b,c:x.c,d:x.d,e:x.e,f:x.f}},U.toSVGMatrix=function(x,w){return x.a=w.a,x.b=w.b,x.c=w.c,x.d=w.d,x.e=w.e,x.f=w.f,x},U}(),De=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.left=0,F.top=0,F.width=0,F.height=0,F.defaultSize={x:50,y:20},F.offsetX=0,F.offsetY=0,F.rotationAngle=0,F.CB_DISTANCE=10,F._suppressMarkerCreateEvent=!1,F.container.transform.baseVal.appendItem(ae.createTransform()),F.setupControlBox(),F}return de(x,U),Object.defineProperty(x.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"visual",{get:function(){return this._visual},set:function(w){this._visual=w;var k=ae.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(w){return!!U.prototype.ownsTarget.call(this,w)||!!(this.controlGrips.findGripByVisual(w)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(w))},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.left=w.x,this.top=w.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var z=this.unrotatePoint(w);if(this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.offsetX=z.x-this.left,this.offsetY=z.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 F=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=F.x-this.width/2,this.top=F.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ie=this.container.transform.baseVal.getItem(0);ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},x.prototype.pointerUp=function(w){var k=this.state;U.prototype.pointerUp.call(this,w),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(w),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},x.prototype.moveVisual=function(w){this.visual.style.transform="translate("+w.x+"px, "+w.y+"px)"},x.prototype.manipulate=function(w){var k=this.unrotatePoint(w);this.state==="creating"?this.resize(w):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(w)},x.prototype.resize=function(w){var k=this.manipulationStartLeft,z=this.manipulationStartWidth,F=this.manipulationStartTop,ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+w.x-this.manipulationStartX,z=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:z=this.manipulationStartWidth+w.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:F=this.manipulationStartTop+w.y-this.manipulationStartY,ie=this.manipulationStartHeight+this.manipulationStartTop-F;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ie=this.manipulationStartHeight+w.y-this.manipulationStartY}z>=0?(this.left=k,this.width=z):(this.left=k+z,this.width=-z),ie>=0?(this.top=F,this.height=ie):(this.top=F+ie,this.height=-ie),this.setSize()},x.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},x.prototype.rotate=function(w){if(Math.abs(w.x-this.centerX)>.1){var k=Math.sign(w.x-this.centerX);this.rotationAngle=180*Math.atan((w.y-this.centerY)/(w.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},x.prototype.applyRotation=function(){var w=this.container.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(w,0)},x.prototype.rotatePoint=function(w){if(this.rotationAngle===0)return w;var k=this.container.getCTM(),z=ae.createPoint(w.x,w.y);return{x:(z=z.matrixTransform(k)).x,y:z.y}},x.prototype.unrotatePoint=function(w){if(this.rotationAngle===0)return w;var k=this.container.getCTM();k=k.inverse();var z=ae.createPoint(w.x,w.y);return{x:(z=z.matrixTransform(k)).x,y:z.y}},x.prototype.select=function(){U.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){U.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=ae.createGroup();var w=ae.createTransform();w.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(w),this.container.appendChild(this.controlBox),this.controlRect=ae.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=ae.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 pe,this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){var w=this.controlBox.transform.baseVal.getItem(0);w.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(w,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()},x.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()},x.prototype.createGrip=function(){var w=new Se;return w.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(w.visual),w},x.prototype.positionGrips=function(){var w=this.controlGrips.topLeft.GRIP_SIZE,k=-w/2,z=k,F=(this.width+this.CB_DISTANCE)/2-w/2,ie=(this.height+this.CB_DISTANCE)/2-w/2,Ce=this.height+this.CB_DISTANCE-w/2,je=this.width+this.CB_DISTANCE-w/2;this.positionGrip(this.controlGrips.topLeft.visual,k,z),this.positionGrip(this.controlGrips.topCenter.visual,F,z),this.positionGrip(this.controlGrips.topRight.visual,je,z),this.positionGrip(this.controlGrips.centerLeft.visual,k,ie),this.positionGrip(this.controlGrips.centerRight.visual,je,ie),this.positionGrip(this.controlGrips.bottomLeft.visual,k,Ce),this.positionGrip(this.controlGrips.bottomCenter.visual,F,Ce),this.positionGrip(this.controlGrips.bottomRight.visual,je,Ce),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,F,z-3*this.CB_DISTANCE)},x.prototype.positionGrip=function(w,k,z){var F=w.transform.baseVal.getItem(0);F.setTranslate(k,z),w.transform.baseVal.replaceItem(F,0)},x.prototype.hideControlBox=function(){this.controlBox.style.display="none"},x.prototype.showControlBox=function(){this.controlBox.style.display=""},x.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Pe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Pe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},U.prototype.getState.call(this))},x.prototype.restoreState=function(w){U.prototype.restoreState.call(this,w);var k=w;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(Pe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Pe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},x.prototype.scale=function(w,k){U.prototype.scale.call(this,w,k);var z=this.rotatePoint({x:this.left,y:this.top}),F=this.unrotatePoint({x:z.x*w,y:z.y*k});this.left=F.x,this.top=F.y,this.width=this.width*w,this.height=this.height*k,this.adjustControlBox()},x}(ue),ke=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.createVisual=F.createVisual.bind(F),F}return de(x,U),x.prototype.ownsTarget=function(w){return!(!U.prototype.ownsTarget.call(this,w)&&w!==this.visual)},x.prototype.createVisual=function(){this.visual=ae.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)},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},x.prototype.manipulate=function(w){U.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){U.prototype.resize.call(this,w),this.setSize()},x.prototype.setSize=function(){U.prototype.setSize.call(this),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(w){U.prototype.pointerUp.call(this,w),this.setSize()},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},x.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},U.prototype.getState.call(this))},x.prototype.restoreState=function(w){var k=w;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),U.prototype.restoreState.call(this,w),this.setSize()},x.prototype.scale=function(w,k){U.prototype.scale.call(this,w,k),this.setSize()},x.title="Rectangle marker",x}(De),Be=function(U){function x(w,k,z,F){var ie=U.call(this,w,F||'')||this;return ie.widths=[],ie.widthBoxes=[],ie.widths=k,ie.currentWidth=z,ie.setCurrentWidth=ie.setCurrentWidth.bind(ie),ie}return de(x,U),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function(z){var F=document.createElement("div");F.style.display="flex",F.style.flexGrow="2",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=z===w.currentWidth?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentWidth(z,F)}),k.appendChild(F);var ie=document.createElement("div");ie.innerText=z.toString(),ie.style.marginRight="5px",F.appendChild(ie);var Ce=document.createElement("div");Ce.style.minHeight="20px",Ce.style.flexGrow="2",Ce.style.display="flex",Ce.style.alignItems="center";var je=document.createElement("hr");je.style.minWidth="20px",je.style.border="0px",je.style.borderTop=z+"px solid "+w.uiStyleSettings.toolboxColor,je.style.flexGrow="2",Ce.appendChild(je),F.appendChild(Ce),w.widthBoxes.push(F)}),k},x.prototype.setCurrentWidth=function(w,k){var z=this;this.currentWidth=w,this.widthBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},x}($),Ke=function(U){function x(w,k,z,F){var ie=U.call(this,w,F||'')||this;return ie.styles=[],ie.styleBoxes=[],ie.styles=k,ie.currentStyle=z,ie.setCurrentStyle=ie.setCurrentStyle.bind(ie),ie}return de(x,U),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function(z){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/w.styles.length-5+"%",F.style.borderColor=z===w.currentStyle?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentStyle(z,F)}),k.appendChild(F);var ie=document.createElement("div");ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.overflow="hidden";var Ce=``;ie.innerHTML=Ce,F.appendChild(ie),w.styleBoxes.push(F)}),k},x.prototype.setCurrentStyle=function(w,k){var z=this;this.currentStyle=w,this.styleBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},x}($),oe=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.strokePanel=new se("Line color",z.defaultColorSet,z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new Be("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new Ke("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return de(x,U),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=U.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="FrameMarker",x.title="Frame marker",x.icon='',x}(ke),me=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},_e=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.x1=0,F.y1=0,F.x2=0,F.y2=0,F.defaultLength=50,F.manipulationStartX=0,F.manipulationStartY=0,F.manipulationStartX1=0,F.manipulationStartY1=0,F.manipulationStartX2=0,F.manipulationStartY2=0,F.setupControlBox(),F}return de(x,U),x.prototype.ownsTarget=function(w){return!!U.prototype.ownsTarget.call(this,w)||!(!this.grip1.ownsTarget(w)&&!this.grip2.ownsTarget(w))},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.manipulationStartX=w.x,this.manipulationStartY=w.y,this.state==="new"&&(this.x1=w.x,this.y1=w.y,this.x2=w.x,this.y2=w.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")},x.prototype.pointerUp=function(w){var k=this.state;U.prototype.pointerUp.call(this,w),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(w),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},x.prototype.adjustVisual=function(){},x.prototype.manipulate=function(w){this.state==="creating"?this.resize(w):this.state==="move"?(this.x1=this.manipulationStartX1+w.x-this.manipulationStartX,this.y1=this.manipulationStartY1+w.y-this.manipulationStartY,this.x2=this.manipulationStartX2+w.x-this.manipulationStartX,this.y2=this.manipulationStartY2+w.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(w)},x.prototype.resize=function(w){switch(this.activeGrip){case this.grip1:this.x1=w.x,this.y1=w.y;break;case this.grip2:case void 0:this.x2=w.x,this.y2=w.y}this.adjustVisual(),this.adjustControlBox()},x.prototype.select=function(){U.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){U.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=ae.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){this.positionGrips()},x.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},x.prototype.createGrip=function(){var w=new Se;return w.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(w.visual),w},x.prototype.positionGrips=function(){var w=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-w/2,this.y1-w/2),this.positionGrip(this.grip2.visual,this.x2-w/2,this.y2-w/2)},x.prototype.positionGrip=function(w,k,z){var F=w.transform.baseVal.getItem(0);F.setTranslate(k,z),w.transform.baseVal.replaceItem(F,0)},x.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},U.prototype.getState.call(this))},x.prototype.restoreState=function(w){U.prototype.restoreState.call(this,w);var k=w;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},x.prototype.scale=function(w,k){U.prototype.scale.call(this,w,k),this.x1=this.x1*w,this.y1=this.y1*k,this.x2=this.x2*w,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},x}(ue),we=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.strokePanel=new se("Line color",z.defaultColorSet,z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new Be("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new Ke("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return de(x,U),x.prototype.ownsTarget=function(w){return!(!U.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorLine&&w!==this.visibleLine)},x.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.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)},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},x.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()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},U.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){U.prototype.restoreState.call(this,w);var k=w;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},x.typeName="LineMarker",x.title="Line marker",x.icon='',x}(_e),fe=function(U){function x(w,k,z,F){var ie=U.call(this,w,F||'')||this;return ie.fonts=[],ie.fontBoxes=[],ie.fonts=k,ie.currentFont=z,ie.setCurrentFont=ie.setCurrentFont.bind(ie),ie}return de(x,U),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function(z){var F=document.createElement("div");F.style.display="inline-block",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/w.fonts.length-5+"%",F.style.borderColor=z===w.currentFont?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentFont(z,F)}),k.appendChild(F);var ie=document.createElement("div");ie.style.display="flex",ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.fontFamily=z,ie.style.overflow="hidden";var Ce=document.createElement("div");Ce.style.whiteSpace="nowrap",Ce.style.overflow="hidden",Ce.style.textOverflow="ellipsis",Ce.innerHTML="The quick brown fox jumps over the lazy dog",ie.appendChild(Ce),F.appendChild(ie),w.fontBoxes.push(F)}),k},x.prototype.setCurrentFont=function(w,k){var z=this;this.currentFont=w,this.fontBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},x}($),ye=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.color="transparent",F.padding=5,F.DEFAULT_TEXT="your text here",F.text=F.DEFAULT_TEXT,F.isMoved=!1,F.color=z.defaultColor,F.fontFamily=z.defaultFontFamily,F.defaultSize={x:100,y:30},F.setColor=F.setColor.bind(F),F.setFont=F.setFont.bind(F),F.renderText=F.renderText.bind(F),F.sizeText=F.sizeText.bind(F),F.textEditDivClicked=F.textEditDivClicked.bind(F),F.showTextEditor=F.showTextEditor.bind(F),F.setSize=F.setSize.bind(F),F.positionTextEditor=F.positionTextEditor.bind(F),F.colorPanel=new se("Color",z.defaultColorSet,z.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.fontFamilyPanel=new fe("Font",z.defaultFontFamilies,z.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F}return de(x,U),x.prototype.ownsTarget=function(w){if(U.prototype.ownsTarget.call(this,w)||w===this.visual||w===this.textElement||w===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function(z){z===w&&(k=!0)}),k},x.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.isMoved=!1,this.pointerDownPoint=w,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},x.prototype.renderText=function(){var w=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){w.textElement.appendChild(ae.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},x.prototype.getTextScale=function(){var w=this.textElement.getBBox(),k=1;if(w.width>0&&w.height>0){var z=(1*this.width-this.width*this.padding*2/100)/w.width,F=(1*this.height-this.height*this.padding*2/100)/w.height;k=Math.min(z,F)}return k},x.prototype.getTextPosition=function(w){var k=this.textElement.getBBox(),z=0,F=0;return k.width>0&&k.height>0&&(z=(this.width-k.width*w)/2,F=this.height/2-k.height*w/2),{x:z,y:F}},x.prototype.sizeText=function(){var w=this.textElement.getBBox(),k=this.getTextScale(),z=this.getTextPosition(k);z.y-=w.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+z.x+"px, "+z.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(z.x,z.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},x.prototype.manipulate=function(w){U.prototype.manipulate.call(this,w),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(w.x-this.pointerDownPoint.x)>5||Math.abs(w.y-this.pointerDownPoint.y)>5)},x.prototype.resize=function(w){U.prototype.resize.call(this,w),this.isMoved=!0,this.setSize(),this.sizeText()},x.prototype.setSize=function(){U.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},x.prototype.pointerUp=function(w){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),U.prototype.pointerUp.call(this,w),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},x.prototype.showTextEditor=function(){var w=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(w.textEditor.style.fontSize);w.textEditor.clientWidth>=Number.parseInt(w.textEditor.style.maxWidth)&&k>.9;)k-=.1,w.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 z=k.clipboardData.getData("text"),F=window.getSelection();if(!F.rangeCount)return!1;F.deleteFromDocument(),F.getRangeAt(0).insertNode(document.createTextNode(z)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){w.textEditDivClicked(w.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},x.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var w=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),z=this.textElement.getBBox(),F={x:z.width*w,y:z.height*w};k.x-=F.x/2,k.y-=F.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*w,12)+"px",this.textElement.style.display="none"}},x.prototype.textEditDivClicked=function(w){this.text=w.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},x.prototype.select=function(){U.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},x.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),U.prototype.deselect.call(this)},x.prototype.dblClick=function(w,k){U.prototype.dblClick.call(this,w,k),this.showTextEditor()},x.prototype.setColor=function(w){this.textElement&&ae.setAttributes(this.textElement,[["fill",w]]),this.color=w,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(w)},x.prototype.setFont=function(w){this.textElement&&ae.setAttributes(this.textElement,[["font-family",w]]),this.fontFamily=w,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},x.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},x.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},U.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){var k=w;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),U.prototype.restoreState.call(this,w),this.setSize()},x.prototype.scale=function(w,k){U.prototype.scale.call(this,w,k),this.setSize(),this.sizeText(),this.positionTextEditor()},x.typeName="TextMarker",x.title="Text marker",x.icon='',x}(De),re=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.color="transparent",F.lineWidth=3,F.drawing=!1,F.pixelRatio=1,F.color=z.defaultColor,F.lineWidth=z.defaultStrokeWidth,F.pixelRatio=z.freehandPixelRatio,F.setColor=F.setColor.bind(F),F.addCanvas=F.addCanvas.bind(F),F.finishCreation=F.finishCreation.bind(F),F.setLineWidth=F.setLineWidth.bind(F),F.colorPanel=new se("Color",z.defaultColorSet,z.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.lineWidthPanel=new Be("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.lineWidthPanel.onWidthChanged=F.setLineWidth,F}return de(x,U),x.prototype.ownsTarget=function(w){return!(!U.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.drawingImage)},x.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var w=ae.createTransform();this.visual.transform.baseVal.appendItem(w),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(w,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(w.x,w.y),this.drawing=!0):U.prototype.pointerDown.call(this,w,k)},x.prototype.manipulate=function(w){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(w.x,w.y),this.canvasContext.stroke()):U.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){U.prototype.resize.call(this,w),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(w){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):U.prototype.pointerUp.call(this,w)},x.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)},x.prototype.select=function(){this.state==="creating"&&this.finishCreation(),U.prototype.select.call(this)},x.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),U.prototype.deselect.call(this)},x.prototype.finishCreation=function(){for(var w=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],z=k[0],F=k[1],ie=k[2],Ce=k[3],je=!1,$e=0;$e0&&(je=!0,$eCe&&(Ce=$e),Re>ie&&(ie=Re));if(je){this.left=z/this.pixelRatio,this.top=F/this.pixelRatio,this.width=(ie-z)/this.pixelRatio,this.height=(Ce-F)/this.pixelRatio;var Ze=document.createElement("canvas");Ze.width=ie-z,Ze.height=Ce-F,Ze.getContext("2d").putImageData(this.canvasContext.getImageData(z,F,ie-z,Ce-F),0,0),this.drawingImgUrl=Ze.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},x.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},x.prototype.setColor=function(w){this.color=w,this.colorChanged(w)},x.prototype.setLineWidth=function(w){this.lineWidth=w},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({drawingImgUrl:this.drawingImgUrl},U.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){this.createVisual(),U.prototype.restoreState.call(this,w),this.drawingImgUrl=w.drawingImgUrl,this.setDrawingImage()},x.prototype.scale=function(w,k){U.prototype.scale.call(this,w,k),this.setDrawingImage()},x.typeName="FreehandMarker",x.title="Freehand marker",x.icon='',x}(De),Z=function(U){function x(w,k,z){var F=U.call(this,w,z||'')||this;return F.typeBoxes=[],F.currentType=k,F.setCurrentType=F.setCurrentType.bind(F),F}return de(x,U),x.prototype.getUi=function(){var w=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var z=function(Ce){var je="both";switch(Ce){case 0:je="both";break;case 1:je="start";break;case 2:je="end";break;case 3:je="none"}var $e=document.createElement("div");if($e.style.display="flex",$e.style.flexGrow="2",$e.style.alignItems="center",$e.style.justifyContent="space-between",$e.style.padding="5px",$e.style.borderWidth="2px",$e.style.borderStyle="solid",$e.style.borderColor=je===F.currentType?F.uiStyleSettings.toolboxAccentColor:"transparent",$e.addEventListener("click",function(){w.setCurrentType(je,$e)}),k.appendChild($e),je==="both"||je==="start"){var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.minHeight="20px",Re.innerHTML=``,Re.style.marginLeft="5px",$e.appendChild(Re)}var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.minHeight="20px",Ze.style.flexGrow="2";var qe=document.createElement("hr");if(qe.style.minWidth="20px",qe.style.border="0px",qe.style.borderTop="3px solid "+(F.uiStyleSettings!==void 0?F.uiStyleSettings.toolboxColor:"#eeeeee"),qe.style.flexGrow="2",Ze.appendChild(qe),$e.appendChild(Ze),je==="both"||je==="end"){var ft=document.createElement("div");ft.style.display="flex",ft.style.alignItems="center",ft.style.minHeight="20px",ft.innerHTML=``,ft.style.marginRight="5px",$e.appendChild(ft)}F.typeBoxes.push($e)},F=this,ie=0;ie<4;ie++)z(ie);return k},x.prototype.setCurrentType=function(w,k){var z=this;this.currentType=w,this.typeBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings!==void 0?z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},x}($),J=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.arrowType="end",F.arrowBaseHeight=10,F.arrowBaseWidth=10,F.getArrowPoints=F.getArrowPoints.bind(F),F.setArrowType=F.setArrowType.bind(F),F.arrowTypePanel=new Z("Arrow type","end"),F.arrowTypePanel.onArrowTypeChanged=F.setArrowType,F}return de(x,U),x.prototype.ownsTarget=function(w){return!(!U.prototype.ownsTarget.call(this,w)&&w!==this.arrow1&&w!==this.arrow2)},x.prototype.getArrowPoints=function(w,k){var z=this.arrowBaseWidth+2*this.strokeWidth,F=this.arrowBaseHeight+2*this.strokeWidth;return w-z/2+","+(k+F/2)+" "+w+","+(k-F/2)+" "+(w+z/2)+","+(k+F/2)},x.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(U.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",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var w=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(w,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var z=this.arrow2.transform.baseVal.getItem(0);z.setRotate(w+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(z,0)}},x.prototype.setArrowType=function(w){this.arrowType=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({arrowType:this.arrowType},U.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){U.prototype.restoreState.call(this,w);var k=w;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},x.typeName="ArrowMarker",x.title="Arrow marker",x.icon='',x}(we),V=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.fillColor=z.defaultFillColor,F.strokeWidth=0,F.fillPanel=new se("Color",z.defaultColorSet,z.defaultFillColor),F.fillPanel.onColorChanged=F.setFillColor,F}return de(x,U),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=U.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="CoverMarker",x.title="Cover marker",x.icon='',x}(ke),Y=function(U){function x(w,k,z,F){var ie=U.call(this,w,F||'')||this;return ie.opacities=[],ie.opacityBoxes=[],ie.opacities=k,ie.currentOpacity=z,ie.setCurrentOpacity=ie.setCurrentOpacity.bind(ie),ie}return de(x,U),x.prototype.getUi=function(){var w=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(z){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="center",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=z===w.currentOpacity?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentOpacity(z,F)}),k.appendChild(F);var ie=document.createElement("div");ie.innerText=100*z+"%",F.appendChild(ie),w.opacityBoxes.push(F)}),k},x.prototype.setCurrentOpacity=function(w,k){var z=this;this.currentOpacity=w,this.opacityBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},x}($),q=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.setOpacity=F.setOpacity.bind(F),F.fillColor=z.defaultHighlightColor,F.strokeWidth=0,F.opacity=z.defaultHighlightOpacity,F.fillPanel=new se("Color",z.defaultColorSet,F.fillColor),F.fillPanel.onColorChanged=F.setFillColor,F.opacityPanel=new Y("Opacity",z.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return de(x,U),x.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=U.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="HighlightMarker",x.title="Highlight marker",x.icon='',x}(V),te='',le=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.bgColor="transparent",F.tipPosition={x:0,y:0},F.tipBase1Position={x:0,y:0},F.tipBase2Position={x:0,y:0},F.tipMoving=!1,F.color=z.defaultStrokeColor,F.bgColor=z.defaultFillColor,F.fontFamily=z.defaultFontFamily,F.defaultSize={x:100,y:30},F.setBgColor=F.setBgColor.bind(F),F.getTipPoints=F.getTipPoints.bind(F),F.positionTip=F.positionTip.bind(F),F.setTipPoints=F.setTipPoints.bind(F),F.colorPanel=new se("Text color",z.defaultColorSet,F.color,''),F.colorPanel.onColorChanged=F.setColor,F.bgColorPanel=new se("Fill color",z.defaultColorSet,F.bgColor,te),F.bgColorPanel.onColorChanged=F.setBgColor,F.fontFamilyPanel=new fe("Font",z.defaultFontFamilies,z.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F.tipGrip=new Se,F.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),F.controlBox.appendChild(F.tipGrip.visual),F}return de(x,U),x.prototype.ownsTarget=function(w){return U.prototype.ownsTarget.call(this,w)||this.tipGrip.ownsTarget(w)||this.tip===w},x.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},x.prototype.pointerDown=function(w,k){this.state==="new"&&U.prototype.pointerDown.call(this,w,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):U.prototype.pointerDown.call(this,w,k)},x.prototype.pointerUp=function(w){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,U.prototype.pointerUp.call(this,w);else{var k=this.state==="creating";U.prototype.pointerUp.call(this,w),this.setTipPoints(k),this.positionTip()}},x.prototype.manipulate=function(w){if(this.tipMoving){var k=this.unrotatePoint(w);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else U.prototype.manipulate.call(this,w)},x.prototype.setBgColor=function(w){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",w]]),ae.setAttributes(this.tip,[["fill",w]])),this.bgColor=w,this.fillColorChanged(w)},x.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},x.prototype.setTipPoints=function(w){w===void 0&&(w=!1);var k=Math.min(this.height/2,15),z=this.height/5;w&&(this.tipPosition={x:k+z/2,y:this.height+20});var F=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?F',x}(ye),ve=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.fillColor=z.defaultFillColor,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.setOpacity=F.setOpacity.bind(F),F.createVisual=F.createVisual.bind(F),F.strokePanel=new se("Line color",ce(z.defaultColorSet,["transparent"]),z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.fillPanel=new se("Fill color",ce(z.defaultColorSet,["transparent"]),F.fillColor,te),F.fillPanel.onColorChanged=F.setFillColor,F.strokeWidthPanel=new Be("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new Ke("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F.opacityPanel=new Y("Opacity",z.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return de(x,U),x.prototype.ownsTarget=function(w){return!(!U.prototype.ownsTarget.call(this,w)&&w!==this.visual)},x.prototype.createVisual=function(){this.visual=ae.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)},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},x.prototype.manipulate=function(w){U.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){U.prototype.resize.call(this,w),this.setSize()},x.prototype.setSize=function(){U.prototype.setSize.call(this),ae.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},x.prototype.pointerUp=function(w){U.prototype.pointerUp.call(this,w),this.setSize()},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},x.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(w),this.stateChanged()},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},U.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){var k=w;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),U.prototype.restoreState.call(this,w),this.setSize()},x.prototype.scale=function(w,k){U.prototype.scale.call(this,w,k),this.setSize()},x.typeName="EllipseMarker",x.title="Ellipse marker",x.icon='',x}(De),Oe=function(U){function x(w,k,z){return U.call(this,w,k,z)||this}return de(x,U),Object.defineProperty(x.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(w){return!(!U.prototype.ownsTarget.call(this,w)&&w!==this.tip1&&w!==this.tip2)},x.prototype.createTips=function(){this.tip1=ae.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(ae.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ae.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(ae.createTransform()),this.visual.appendChild(this.tip2)},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(U.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ae.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()]]),ae.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 w=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(w,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var z=this.tip2.transform.baseVal.getItem(0);z.setRotate(w+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(z,0)}},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=U.prototype.getState.call(this);return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){U.prototype.restoreState.call(this,w),this.createTips(),this.adjustVisual()},x.typeName="MeasurementMarker",x.title="Measurement marker",x.icon='',x}(we),He=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.strokePanel.colors=z.defaultColorSet,F.fillColor="transparent",F}return de(x,U),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=U.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="EllipseFrameMarker",x.title="Ellipse frame marker",x.icon='',x}(ve),ze=function(){function U(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(U.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),U.prototype.addUndoStep=function(x){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(x)||(this.undoStack.push(x),JSON.stringify(this.lastRedoStep)!==JSON.stringify(x)&&this.redoStack.splice(0,this.redoStack.length))},U.prototype.replaceLastUndoStep=function(x){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=x)},U.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},U.prototype.undo=function(){if(this.undoStack.length>1){var x=this.undoStack.pop();return x!==void 0&&this.redoStack.push(x),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},U.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},U}(),Ne=function(U){function x(w,k,z){var F=U.call(this,w,k,z)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.curveX=0,F.curveY=0,F.manipulationStartCurveX=0,F.manipulationStartCurveY=0,F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.positionGrips=F.positionGrips.bind(F),F.addControlGrips=F.addControlGrips.bind(F),F.adjustVisual=F.adjustVisual.bind(F),F.setupControlBox=F.setupControlBox.bind(F),F.resize=F.resize.bind(F),F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.strokePanel=new se("Line color",z.defaultColorSet,z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new Be("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new Ke("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return de(x,U),x.prototype.ownsTarget=function(w){return!(!U.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorCurve&&w!==this.visibleCurve&&!this.curveGrip.ownsTarget(w))},x.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},x.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.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)},x.prototype.pointerDown=function(w,k){U.prototype.pointerDown.call(this,w,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=w.x,this.curveY=w.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},x.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setupControlBox=function(){U.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.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)},x.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,U.prototype.addControlGrips.call(this)},x.prototype.positionGrips=function(){U.prototype.positionGrips.call(this);var w=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-w/2,this.curveY-w/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()))},x.prototype.manipulate=function(w){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+w.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+w.y-this.manipulationStartY),U.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){this.activeGrip===this.curveGrip&&(this.curveX=w.x,this.curveY=w.y),U.prototype.resize.call(this,w),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual()},x.prototype.scale=function(w,k){this.curveX=this.curveX*w,this.curveY=this.curveY*k,U.prototype.scale.call(this,w,k)},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},U.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){U.prototype.restoreState.call(this,w);var k=w;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},x.typeName="CurveMarker",x.title="Curve marker",x.icon='',x}(_e),Je=function(){function U(x,w){w===void 0&&(w=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=x,this.cancelable=w}return Object.defineProperty(U.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),U.prototype.preventDefault=function(){this._defaultPrevented=!0},U}(),Qe=function(U){function x(w,k,z){var F=U.call(this,w,!1)||this;return F.dataUrl=k,F.state=z,F}return de(x,U),x}(Je),Ge=function(U){function x(w,k,z){z===void 0&&(z=!1);var F=U.call(this,w,z)||this;return F.marker=k,F}return de(x,U),x}(Je),at=function(){function U(){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 U.prototype.addEventListener=function(x,w){this[x].push(w)},U.prototype.removeEventListener=function(x,w){var k=this[x].indexOf(w);k>-1&&this[x].splice(k,1)},U}(),nt=function(){function U(x){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new me,this._isOpen=!1,this.undoRedoManager=new ze,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 at,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=U.instanceCounter++,this.styles=new We(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=x,this.targetRoot=document.body,this.width=x.clientWidth,this.height=x.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(U.prototype,"ALL_MARKER_TYPES",{get:function(){return[oe,re,J,ye,He,ve,q,le,Oe,V,we,Ne]},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[oe,re,J,ye,ve,q,le]},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"BASIC_MARKER_TYPES",{get:function(){return[oe,re,J,ye,q]},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(x){var w=this;this._availableMarkerTypes.splice(0),x.forEach(function(k){if(typeof k=="string"){var z=w.ALL_MARKER_TYPES.find(function(F){return F.typeName===k});z!==void 0&&w._availableMarkerTypes.push(z)}else w._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(x){this._zoomLevel=x,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(U.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),U.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},U.prototype.show=function(){var x=this;this.styles.styleSheetRoot===void 0&&Fe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Fe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(w){return w(new Je(x))})},U.prototype.render=function(){return Te(this,void 0,void 0,function(){var x;return xe(this,function(w){switch(w.label){case 0:return this.setCurrentMarker(),(x=new Ye).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.markersOnly=this.renderMarkersOnly,x.width=this.renderWidth,x.height=this.renderHeight,[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return w.sent(),[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,w.sent()]}})})},U.prototype.close=function(x){var w=this;if(x===void 0&&(x=!1),this.isOpen){var k=!1;x||this.eventListeners.beforeclose.forEach(function(z){var F=new Je(w,!0);z(F),F.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(z){return z(new Je(w))}),this.detachEvents(),this._isOpen=!1)}},U.prototype.addMarkersToToolbar=function(){for(var x,w=[],k=0;kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*x:this.editorCanvas.clientWidth,k=w',x.title="Powered by marker.js",x.style.display="grid",x.style.alignItems="center",x.style.justifyItems="center",x.style.padding="3px",x.style.width="20px",x.style.height="20px",this.logoUI.appendChild(x),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},U.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")},U.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"},U.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},U.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 x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"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 Ae(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(x),1),x.dispose()},U.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())},U.prototype.toolbarButtonClicked=function(x,w){if(x==="marker"&&w!==void 0)this.createNewMarker(w);else if(x==="action")switch(w){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()}},U.prototype.deleteSelectedMarker=function(){var x=this;if(this._currentMarker!==void 0){var w=!1;if(this.eventListeners.markerbeforedelete.forEach(function(z){var F=new Ge(x,x._currentMarker,!0);z(F),F.defaultPrevented&&(w=!0)}),!w){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(z){return z(new Ge(x,k))})}}},U.prototype.clear=function(){var x=this,w=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ie){var Ce=new Ge(x,void 0,!0);ie(Ce),Ce.defaultPrevented&&(w=!0)}),!w)){this.setCurrentMarker();for(var k=function(ie){var Ce=z.markers[ie];z.setCurrentMarker(z.markers[ie]),z._currentMarker.dispose(),z.markerImage.removeChild(z._currentMarker.container),z.markers.splice(z.markers.indexOf(z._currentMarker),1),z.eventListeners.markerdelete.forEach(function(je){return je(new Ge(x,Ce))})},z=this,F=this.markers.length-1;F>=0;F--)k(F);this.addUndoStep()}},Object.defineProperty(U.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),U.prototype.showNotesEditor=function(){var x;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=(x=this._currentMarker.notes)!==null&&x!==void 0?x:"",this.overlayContainer.appendChild(this.notesArea))},U.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)},U.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},U.prototype.addUndoStep=function(){var x=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var w=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===w.width&&k.height===w.height){var z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(w),z1&&this.panTo({x:x.clientX,y:x.clientY}))},U.prototype.onPointerUp=function(x){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(x.clientX,x.clientY)),this.isDragging=!1,this.addUndoStep()},U.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},U.prototype.onKeyUp=function(x){this._currentMarker===void 0||this.notesArea!==void 0||x.key!=="Delete"&&x.key!=="Backspace"||this.deleteSelectedMarker()},U.prototype.clientToLocalCoordinates=function(x,w){var k=this.markerImage.getBoundingClientRect();return{x:(x-k.left)/this.zoomLevel,y:(w-k.top)/this.zoomLevel}},U.prototype.onWindowResize=function(){this.positionUI()},U.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"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()},U.prototype.addLicenseKey=function(x){Le.addKey(x)},U.prototype.addEventListener=function(x,w){this.eventListeners.addEventListener(x,w)},U.prototype.removeEventListener=function(x,w){this.eventListeners.removeEventListener(x,w)},U.prototype.renderState=function(x){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(x),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(U.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),U.prototype.focus=function(){var x=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(w){return w(new Je(x))}))},U.prototype.blur=function(){var x=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(w){return w(new Je(x))}))},U.instanceCounter=0,U}();/* **********************************
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 rt=function(U,x){return(rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,k){w.__proto__=k}||function(w,k){for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&(w[z]=k[z])})(U,x)};function dt(U,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function w(){this.constructor=U}rt(U,x),U.prototype=x===null?Object.create(x):(w.prototype=x.prototype,new w)}function et(U,x,w,k){return new(w||(w=Promise))(function(z,F){function ie($e){try{je(k.next($e))}catch(Re){F(Re)}}function Ce($e){try{je(k.throw($e))}catch(Re){F(Re)}}function je($e){var Re;$e.done?z($e.value):(Re=$e.value,Re instanceof w?Re:new w(function(Ze){Ze(Re)})).then(ie,Ce)}je((k=k.apply(U,x||[])).next())})}function st(U,x){var w,k,z,F,ie={label:0,sent:function(){if(1&z[0])throw z[1];return z[1]},trys:[],ops:[]};return F={next:Ce(0),throw:Ce(1),return:Ce(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function Ce(je){return function($e){return function(Re){if(w)throw new TypeError("Generator is already executing.");for(;ie;)try{if(w=1,k&&(z=2&Re[0]?k.return:Re[0]?k.throw||((z=k.return)&&z.call(k),0):k.next)&&!(z=z.call(k,Re[1])).done)return z;switch(k=0,z&&(Re=[2&Re[0],z.value]),Re[0]){case 0:case 1:z=Re;break;case 4:return ie.label++,{value:Re[1],done:!1};case 5:ie.label++,k=Re[1],Re=[0];continue;case 7:Re=ie.ops.pop(),ie.trys.pop();continue;default:if(!(z=ie.trys,(z=z.length>0&&z[z.length-1])||Re[0]!==6&&Re[0]!==2)){ie=0;continue}if(Re[0]===3&&(!z||Re[1]>z[0]&&Re[1]0&&w>0){var k=new Rt(x,w),z=k.ratio>=1?20:k.getHorizontalLength(20),F=k.ratio<1?20:k.getVerticalLength(20),ie=document.createElementNS("http://www.w3.org/2000/svg","svg");ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),ie.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ie);var Ce=Ue.createDefs();ie.appendChild(Ce);var je=Ue.createElement("clipPath",[["id","text-bg-clip"]]);Ce.appendChild(je);var $e=Ue.createPath(Ue.getHollowRectanglePath((24-z)/2,(24-F)/2,z,F,(24-z)/2+2,(24-F)/2+2,z-4,F-4));ie.appendChild($e);var Re=Ue.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Re.appendChild(Ue.createTSpan(x+":"+w)),ie.appendChild(Re);var Ze=Re.getBBox();Ue.setAttributes(Re,[["x",((24-Ze.width)/2).toString()],["y",((24-Ze.height)/2-Ze.y).toString()]]);var qe=Ue.createPath(Ue.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ze.width))/2,(24-Math.ceil(Ze.height))/2,Math.ceil(Ze.width),Math.ceil(Ze.height)));return je.appendChild(qe),Ue.setAttributes($e,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ie),ie.outerHTML}return''},U}(),Tt=function(U){function x(w,k,z){var F=U.call(this,w,k)||this;return F.isDropdownOpen=!1,F.onClick=F.dropdownButtonClicked,F.dropdownButtons=z,F}return dt(x,U),x.prototype.setupDropdown=function(){var w=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=w.className,k.colorsClassName=w.colorsClassName,w.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},x.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},x.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},x.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},x.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},x.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},x}(bt),At=function(){function U(x,w){this.GRIP_SIZE=10,this.color=x,this.fillColor=w,this.visual=Ue.createGroup(),this.visual.appendChild(Ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ue.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return U.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},U.prototype.setCenter=function(x,w){this.visual.childNodes.forEach(function(k){return Ue.setAttributes(k,[["cx",x.toString()],["cy",w.toString()]])})},U}(),_t=function(){function U(x,w,k,z){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=x,this.canvasHeight=w,this.margin=k,this.container=z,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(U.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(x){this._aspectRatio=x,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.gridContainer&&Ue.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(x){this._zoomFactor=x,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),U.prototype.open=function(){var x=this;this.cropShadeElement=Ue.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ue.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var w=0;wthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-w.height/2),Ue.setAttributes(this.cropRectElement,[["x",w.x.toString()],["y",w.y.toString()],["width",w.width.toString()],["height",w.height.toString()]]);var k=w.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(F,ie){var Ce=w.y+k*(ie+1);Ue.setAttributes(F,[["x1",""+w.x],["y1",""+Ce],["x2",""+(w.x+w.width)],["y2",""+Ce]])});var z=w.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(F,ie){var Ce=w.x+z*(ie+1);Ue.setAttributes(F,[["x1",""+Ce],["y1",""+w.y],["x2",""+Ce],["y2",""+(w.y+w.height)]])}),Ue.setAttributes(this.cropShadeElement,[["d",Ue.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,w.x,w.y,w.width,w.height)]]),this.topLeftGrip.setCenter(w.x,w.y),this.topRightGrip.setCenter(w.x+w.width,w.y),this.bottomLeftGrip.setCenter(w.x,w.y+w.height),this.bottomRightGrip.setCenter(w.x+w.width,w.y+w.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},U.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)},U.prototype.clientToLocalCoordinates=function(x,w){var k=this.container.getBoundingClientRect();return{x:x-k.left+this.margin,y:w-k.top+this.margin}},U.prototype.onPointerDown=function(x){this.container.setPointerCapture(x.pointerId),this.previousPoint=this.clientToLocalCoordinates(x.clientX,x.clientY),this.cropRectElement===x.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(x.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(x.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(x.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(x.target)&&(this.activeGrip=this.bottomRightGrip)},U.prototype.onPointerMove=function(x){if(this.isMoving)this.move(this.clientToLocalCoordinates(x.clientX,x.clientY));else if(this.activeGrip){var w=this.clientToLocalCoordinates(x.clientX,x.clientY);this.resize(w)}x.preventDefault()},U.prototype.onPointerUp=function(x){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(x.pointerId)},U.prototype.move=function(x){var w=x.x-this.previousPoint.x,k=x.y-this.previousPoint.y;this.zoomFactor!==1&&(w=-w/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+w),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=x},U.prototype.resize=function(x){var w=Object.assign({},this.cropRect),k=x.x-this.previousPoint.x,z=x.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:w.x+kthis.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-w.width),w.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(w.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),w.height=this.aspectRatio.getVerticalLength(w.width)):(w.y+=z,w.height=this.cropRect.y+this.cropRect.height-w.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?w.height=this.aspectRatio.getVerticalLength(w.width):w.height+=z}w.width<10&&(w.x=this.cropRect.x,w.width=10),w.height<10&&(w.y=this.cropRect.y,w.height=10),this.previousPoint=x,w.x>=this.margin&&w.y>=this.margin&&w.x-this.margin+w.width<=this.canvasWidth&&w.y-this.margin+w.height<=this.canvasHeight&&(this.cropRect=w,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},U.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var x=this.cropRect.x+this.cropRect.width/2,w=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),z=this.aspectRatio.getVerticalLength(this.cropRect.width);k/this.canvasWidththis.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=x-this.cropRect.width/2,this.cropRect.y=w-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)}},U.prototype.getRescaledRect=function(x,w,k,z,F,ie){var Ce=k/x,je=z/w;return{x:(F.x-ie)*Ce+ie,y:(F.y-ie)*je+ie,width:F.width*Ce,height:F.height*je}},U.prototype.scaleCanvas=function(x,w){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,x,w,this.cropRect,this.margin);this.canvasWidth=x,this.canvasHeight=w,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},U}(),Pt=function(){function U(x){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=x,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(U.prototype,"angle",{get:function(){return this._angle},set:function(x){this._angle=x,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),U.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},U.prototype.onPointerDown=function(x){this.controlContainer.setPointerCapture(x.pointerId),this.isDragging=!0,this.previousPoint={x:x.clientX,y:x.clientY}},U.prototype.onPointerMove=function(x){this.isDragging&&(this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.previousPoint.x=x.clientX)},U.prototype.onPointerUp=function(x){this.isDragging&&this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(x.pointerId)},U.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var x=this.angleLabelText.getBBox();Ue.setAttributes(this.angleLabelElement,[["x",((this.width-x.width)/2).toString()],["y",(this.height/2).toString()]])}},U.prototype.positionScaleShape=function(){if(this.scaleShape){var x=this.scaleShape.transform.baseVal.getItem(0);x.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(x,0)}},U.prototype.getVisual=function(){var x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("width",this.width+"px"),x.setAttribute("height",this.height+"px"),x.setAttribute("viewBox","0 0 "+this.width+" "+this.height),x.style.flexShrink="0",document.body.appendChild(x);for(var w="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var z=k%5==0?this.height/3:this.height/6;w+="h4v"+-z+"h1v"+z}w+="v1H0Z",this.scaleShape=Ue.createPath(w);var F=Ue.createTransform();this.scaleShape.transform.baseVal.appendItem(F),x.appendChild(this.scaleShape),this.angleLabelElement=Ue.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ue.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ie=Ue.createTSpan("");return ie.innerHTML="°",this.angleLabelElement.appendChild(ie),x.appendChild(this.angleLabelElement),document.body.removeChild(x),x},U}(),It=function(){function U(){this.naturalSize=!1,this.imageType="image/png"}return U.prototype.rasterize=function(x,w,k,z,F,ie,Ce){var je=this;return new Promise(function($e){var Re=document.createElement("canvas");Re.width=x.width.baseVal.value-2*z,Re.height=x.height.baseVal.value-2*z;var Ze=1,qe=1;je.naturalSize===!0?(Ze=w.naturalWidth/(x.width.baseVal.value-2*z)/ie,qe=w.naturalHeight/(x.height.baseVal.value-2*z)/Ce,Re.width=w.naturalWidth/ie,Re.height=w.naturalHeight/Ce):je.width!==void 0&&je.height!==void 0&&(Ze=je.width/k.width,qe=je.height/k.height,Re.width*=Ze,Re.height*=qe);var ft=Re.getContext("2d");ft.translate(Re.width/2,Re.height/2),ft.rotate(F*Math.PI/180),ft.scale(ie,Ce),ft.translate(-Re.width/2,-Re.height/2),ft.drawImage(w,0,0,Re.width,Re.height);var Lt=document.createElement("canvas");Lt.width=k.width*Ze,Lt.height=k.height*qe,Lt.getContext("2d").putImageData(ft.getImageData((k.x-z)*Ze,(k.y-z)*qe,k.width*Ze,k.height*qe),0,0),$e(Lt.toDataURL(je.imageType,je.imageQuality))})},U}(),Bt=function(){function U(x){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=U.instanceCounter++,this.styles=new pt(this.instanceNo),this.target=x,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(U.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(x){this._zoomToCropEnabled=x,x?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"gridLines",{get:function(){return this._gridLines},set:function(x){this._gridLines=x,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(x){this._rotationAngle=x,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"aspectRatio",{get:function(){var x;return(x=this._aspectRatio)!==null&&x!==void 0?x:this.aspectRatios[0]},set:function(x){this._aspectRatio=x},enumerable:!1,configurable:!0}),U.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},U.prototype.show=function(){this.showUI(),this.open()},U.prototype.close=function(x){x===void 0&&(x=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),x||this.closeEventListeners.forEach(function(w){return w()}),this._isOpen=!1)},U.prototype.addRenderEventListener=function(x){this.renderEventListeners.push(x)},U.prototype.removeRenderEventListener=function(x){this.renderEventListeners.indexOf(x)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(x),1)},U.prototype.addCloseEventListener=function(x){this.closeEventListeners.push(x)},U.prototype.removeCloseEventListener=function(x){this.closeEventListeners.indexOf(x)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(x),1)},U.prototype.setupResizeObserver=function(){var x=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){x.resize(x.target.clientWidth,x.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))},U.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var x=1*this.target.clientWidth/this.target.clientHeight,w=this.contentDiv.clientWidth/x>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*x:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=w+2*this.CANVAS_MARGINx+this.CANVAS_MARGIN?this.target.offsetTop-(x+this.CANVAS_MARGIN):0;this.coverDiv.style.top=w+"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},U.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},U.prototype.addTopToolbar=function(){var x=this;this.topToolbar=new tt,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 w=new Et;w.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(w);var k=[];this.aspectRatios.forEach(function(qe){var ft=new bt(ct.getIcon(qe.horizontal,qe.vertical),qe.horizontal===0&&qe.vertical===0?"FREE":qe.horizontal+":"+qe.vertical);ft.onClick=function(){return x.ratioButtonClicked(qe)},k.push(ft)}),this.aspectRatioButton=new Tt(ct.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,w.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var z=new bt('',"Toggle grid");z.isActive=this.isGridVisible,z.onClick=function(){x.isGridVisible=!x.isGridVisible,z.isActive=x.isGridVisible},w.addButton(z);var F=new bt('',"Zoom to selection");if(F.isActive=this.zoomToCropEnabled,F.onClick=function(){x.zoomToCropEnabled=!x.zoomToCropEnabled,F.isActive=x.zoomToCropEnabled},w.addButton(F),!ut.isLicensed){var ie=new Ot;this.topToolbar.addElementBlock(ie);var Ce=document.createElement("div");Ce.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var je=document.createElement("a");je.style.color="currentColor",je.href="https://markerjs.com/products/cropro",je.target="_blank",je.innerHTML='',Ce.appendChild(je),ie.addElement(Ce)}var $e=new Et;$e.minWidth=3*this.toolbarHeight+"px",$e.contentAlign="end",this.topToolbar.addButtonBlock($e);var Re=new bt('',"OK");Re.onClick=this.startRenderAndClose,$e.addButton(Re),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Re.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ze=new bt('',"Close");Ze.onClick=this.close,$e.addButton(Ze),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ze.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},U.prototype.addBottomToolbar=function(){var x=this;this.bottomToolbar=new tt,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 w=new Et;w.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(w);var k=new bt('',"Rotate left");k.onClick=this.rotateLeftButtonClicked,w.addButton(k);var z=new bt('',"Rotate right");z.onClick=this.rotateRightButtonClicked,w.addButton(z);var F=new Ot;F.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(F),this.straightener=new Pt("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($e){x.rotateBy($e),x.straightener.angle=x.rotationAngle},F.addElement(this.straightener.getUI());var ie=new Et;ie.minWidth=2*this.toolbarHeight+"px",ie.contentAlign="end",this.bottomToolbar.addButtonBlock(ie);var Ce=new bt('',"Flip horizontal");Ce.onClick=this.flipHorizontallyButtonClicked,ie.addButton(Ce);var je=new bt('',"Flip vertical");je.onClick=this.flipVerticallyButtonClicked,ie.addButton(je)},U.prototype.ratioButtonClicked=function(x){this.aspectRatio=x,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},U.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ct.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},U.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Rt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},U.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},U.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},U.prototype.restoreState=function(x){if(x){var w=this.cropLayer.getRescaledRect(x.width,x.height,this.imageWidth,this.imageHeight,x.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(w),this.cropRectChanged(w),this.flippedHorizontally=x.flippedHorizontally,this.flippedVertically=x.flippedVertically,this.applyFlip(),this.rotationAngle=x.rotationAngle,this.applyRotation()}},U.prototype.clientToLocalCoordinates=function(x,w){var k=this.cropImage.getBoundingClientRect();return{x:x-k.left,y:w-k.top}},U.prototype.onWindowResize=function(){this.positionUI()},U.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var x=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=x+"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()},U.prototype.rotateLeftButtonClicked=function(){var x=this.rotationAngle-90;this.rotationAngle%90!=0&&(x+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(x)},U.prototype.rotateRightButtonClicked=function(){var x=this.rotationAngle+90;this.rotationAngle%90!=0&&(x-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(x)},U.prototype.rotateTo=function(x){x=(x=x>180?x-360:x)<=-180?x+360:x,this.rotationAngle=x,this.applyRotation()},U.prototype.rotateBy=function(x){this.rotateTo((this.rotationAngle+x)%360)},U.prototype.applyRotation=function(){var x=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var w=this.editingTargetRotationContainer.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(w,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=x},U.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},U.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},U.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},U.prototype.startRenderAndClose=function(){return et(this,void 0,void 0,function(){var x,w;return st(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return x=k.sent(),w=this.getState(),this.renderEventListeners.forEach(function(z){return z(x,w)}),this.close(!0),[2]}})})},U.prototype.render=function(){return et(this,void 0,void 0,function(){var x;return st(this,function(w){switch(w.label){case 0:return(x=new It).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.width=this.renderWidth,x.height=this.renderHeight,this.unzoomFromCrop(),Ue.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,x.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 w.sent(),[4,x.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,w.sent()]}})})},U.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ve("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 Ve("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ve("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var x=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ve("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*x)+`px;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ve("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ve("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Xe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Xe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ve("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 Ve("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ve("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 Ve("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ve("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},U.instanceCounter=0,U}(),Wt=B("8hTe"),Mt=B.n(Wt),Ft=/]*>/g;function Ht(U){var x=document.createElement("div");return x.innerHTML=U,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var Jt=ne.a=function(U){var x=U.value,w=x===void 0?"":x,k=U.edit,z=k===void 0?!1:k,F=U.className,ie=U.showTextOnly,Ce=U.showLines,je=U.replaces,$e=U.zoomImg,Re=U.hasMask,Ze=U.style,qe=Ze===void 0?{}:Ze,ft=U.stylesPrev,Lt=ft===void 0?{}:ft,Ut=String(w),yt=Object(C.useRef)(),Nt=Object(C.useRef)(),rr=Object(C.useState)(""),Qt=Object(K.a)(rr,2),Kt=Qt[0],jt=Qt[1],nr=Object(C.useState)("office"),Zt=Object(K.a)(nr,2),lr=Zt[0],Gt=Zt[1],ir=function(){var it=new Bt(Nt.current);it.displayMode="popup",it.addRenderEventListener(function(){var xt=Object(R.a)(e.a.mark(function ot(wt){var mt;return e.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:return yt.current.style.display="none",Ct.next=3,Object(he.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wt}});case 3:mt=Ct.sent,mt!=null&&mt.id&&je(Nt.current.getAttribute("src").replace(G.a.API_SERVER,""),"/api/attachments/".concat(mt==null?void 0:mt.id,"?type=").concat(mt.content_type));case 5:case"end":return Ct.stop()}},ot)}));return function(ot){return xt.apply(this,arguments)}}()),it.show()},ur=function(){var it=new nt(Nt.current);it.settings.displayMode="popup",it.addEventListener("render",function(){var xt=Object(R.a)(e.a.mark(function ot(wt){var mt;return e.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(yt.current.style.display="none",!Nt.current){Ct.next=6;break}return Ct.next=4,Object(he.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wt.dataUrl}});case 4:mt=Ct.sent,mt!=null&&mt.id&&je(Nt.current.getAttribute("src").replace(G.a.API_SERVER,""),"/api/attachments/".concat(mt==null?void 0:mt.id,"?type=").concat(mt.content_type));case 6:case"end":return Ct.stop()}},ot)}));return function(ot){return xt.apply(this,arguments)}}()),it.show(),window.markerArea=it},zt=Object(C.useMemo)(function(){yt.current&&(yt.current.style.zIndex=-1);try{var gt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,it=/\"\/api\/attachments\/|\"\/attachments\/download\//g,xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ut=Ut.replace(gt,"("+G.a.API_SERVER+"/api/attachments/").replace(it,'"'+G.a.API_SERVER+"/api/attachments/").replace(xt,'"'+G.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(qt){}var ot=L(Ut),wt=_();if(Ut.match(/\[TOC\]/)&&(ot=ot.replace("[TOC]
",T()),b()),ot=ot.replace(/(__special_katext_id_\d+__)/g,function(qt,Ct){var sr=wt[Ct],er=sr.type,Xt=sr.expression;return Object(X.renderToString)(Ht(Xt)||"",{displayMode:er==="block",throwOnError:!1,output:"html"})}),ot=ot.replace(/▁/g,"\u2581\u2581\u2581"),p(),ie){var mt=document.createElement("div");return mt.innerHTML=ot,mt.innerText}return setTimeout(function(){return ar()},500),ot},[Ut]),kt=Object(C.useRef)();v.WebkitLineClamp=Ce,Ce&&(qe=Object(P.a)(Object(P.a)({},qe),v));function Vt(gt){var it=gt.target;if(it.tagName.toUpperCase()==="IMG"){if($e){var xt=it.getAttribute("src");jt(xt),Gt("image")}}else if(it.tagName.toUpperCase()==="A"){var ot=it.getAttribute("href");if(ot.indexOf("office")>-1)gt.preventDefault(),jt(ot),Gt("office");else if(ot.indexOf("application/pdf")>-1)gt.preventDefault(),jt(ot),Gt("pdf");else if(ot.indexOf("text/html")>-1)gt.preventDefault(),jt(ot),Gt("html");else if(ot.startsWith("#")){gt.preventDefault();var wt=document.getElementById(ot.replace("#",""));wt&&wt.scrollIntoView(!0)}}}var ar=function(){var it,xt=(it=kt.current)===null||it===void 0?void 0:it.querySelectorAll("video");xt==null||xt.forEach(function(ot){if(ot.oncontextmenu=function(){return!1},ot.src.indexOf(".m3u8")>-1&&!ot.canPlayType("application/vnd.apple.mpegurl")){if(j.a.isSupported()){var wt=new j.a;wt.loadSource(ot.src),wt.attachMedia(ot)}}})};Object(C.useEffect)(function(){if(kt.current&&zt&&(zt.match(Ft)&&window.PR.prettyPrint()),kt.current)return kt.current.addEventListener("click",Vt),function(){kt.current.removeEventListener("click",Vt),p(),b()}},[zt,kt.current,Vt]);var Yt=function(it){if(!z)return;it.target.nodeName==="IMG"?(yt.current.style.zIndex=1,yt.current.style.display="flex",yt.current.style.width=it.target.clientWidth+"px",yt.current.style.height=it.target.clientHeight+"px",yt.current.style.top=it.target.offsetTop+"px",yt.current.style.left=it.target.offsetLeft+"px",Nt.current.src=it.target.getAttribute("src")):yt.current.style.display="none"};return E.a.createElement("div",{style:{position:"relative"}},E.a.createElement("div",{ref:kt,style:Object(P.a)({},qe),className:"".concat(F||""," markdown-body ").concat(Mt.a.mdBody),onMouseOver:Yt,dangerouslySetInnerHTML:{__html:zt}}),E.a.createElement("div",{ref:yt,className:Mt.a.button},E.a.createElement(H.a,null,E.a.createElement(W.a,{onClick:function(){return ir()}},"\u88C1\u526A"),E.a.createElement(W.a,{onClick:function(){return ur()}},"\u7F16\u8F91"))),E.a.createElement("img",{ref:Nt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),E.a.createElement(ee.a,{close:!0,data:Kt,type:Kt!=null&&Kt.length?lr:"",style:Object(P.a)({},Lt),onClose:function(){return jt("")}}))}},BU3w:function(Me,ne,B){"use strict";B.d(ne,"a",function(){return R});var Q=B("MNnm"),H="rc-util-key";function I(K){if(K.attachTo)return K.attachTo;var N=document.querySelector("head");return N||document.body}function W(K){var N,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Q.a)())return null;var C=document.createElement("style");if((N=e.csp)===null||N===void 0?void 0:N.nonce){var E;C.nonce=(E=e.csp)===null||E===void 0?void 0:E.nonce}C.innerHTML=K;var g=I(e),h=g.firstChild;return e.prepend&&g.prepend?g.prepend(C):e.prepend&&h?g.insertBefore(C,h):g.appendChild(C),C}var P=new Map;function R(K,N){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=I(e);if(!P.has(C)){var E=W("",e),g=E.parentNode;P.set(C,g),g.removeChild(E)}var h=Array.from(P.get(C).children).find(function(n){return n.tagName==="STYLE"&&n[H]===N});if(h){var a,i;if(((a=e.csp)===null||a===void 0?void 0:a.nonce)&&h.nonce!==((i=e.csp)===null||i===void 0?void 0:i.nonce)){var l;h.nonce=(l=e.csp)===null||l===void 0?void 0:l.nonce}return h.innerHTML!==K&&(h.innerHTML=K),h}var s=W(K,e);return s[H]=N,s}},"C/vA":function(Me,ne,B){"use strict";B.d(ne,"a",function(){return Q});function Q(H){const I=this;let W=!1,P;return function(){return W||(W=!0,P=H.apply(I,arguments)),P}}},"Cg/j":function(Me,ne,B){"use strict";B.d(ne,"b",function(){return Q}),B.d(ne,"a",function(){return H}),B.d(ne,"c",function(){return W}),B.d(ne,"d",function(){return P});var Q;(function(R){R.serviceIds=new Map,R.DI_TARGET="$di$target",R.DI_DEPENDENCIES="$di$dependencies";function K(N){return N[R.DI_DEPENDENCIES]||[]}R.getServiceDependencies=K})(Q||(Q={}));const H=W("instantiationService");function I(R,K,N,e){K[Q.DI_TARGET]===K?K[Q.DI_DEPENDENCIES].push({id:R,index:N,optional:e}):(K[Q.DI_DEPENDENCIES]=[{id:R,index:N,optional:e}],K[Q.DI_TARGET]=K)}function W(R){if(Q.serviceIds.has(R))return Q.serviceIds.get(R);const K=function(N,e,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(K,N,C,!1)};return K.toString=()=>R,Q.serviceIds.set(R,K),K}function P(R){return function(K,N,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");I(R,K,e,!0)}}},DlQD:function(Me,ne,B){(function(Q,H){Me.exports=H()})(this,function(){"use strict";function Q(re,Z){for(var J=0;Jre.length)&&(Z=re.length);for(var J=0,V=new Array(Z);J=re.length?{done:!0}:{done:!1,value:re[V++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return J=re[Symbol.iterator](),J.next.bind(J)}function R(re,Z){return Z={exports:{}},re(Z,Z.exports),Z.exports}var K=R(function(re){function Z(){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 J(V){re.exports.defaults=V}re.exports={defaults:Z(),getDefaults:Z,changeDefaults:J}}),N=K.defaults,e=K.getDefaults,C=K.changeDefaults,E=/[&<>"']/,g=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},l=function(Z){return i[Z]};function s(re,Z){if(Z){if(E.test(re))return re.replace(g,l)}else if(h.test(re))return re.replace(a,l);return re}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(re){return re.replace(n,function(Z,J){return J=J.toLowerCase(),J==="colon"?":":J.charAt(0)==="#"?J.charAt(1)==="x"?String.fromCharCode(parseInt(J.substring(2),16)):String.fromCharCode(+J.substring(1)):""})}var t=/(^|[^\[])\^/g;function b(re,Z){re=re.source||re,Z=Z||"";var J={replace:function(Y,q){return q=q.source||q,q=q.replace(t,"$1"),re=re.replace(Y,q),J},getRegex:function(){return new RegExp(re,Z)}};return J}var v=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function T(re,Z,J){if(re){var V;try{V=decodeURIComponent(r(J)).replace(v,"").toLowerCase()}catch(Y){return null}if(V.indexOf("javascript:")===0||V.indexOf("vbscript:")===0||V.indexOf("data:")===0)return null}Z&&!m.test(J)&&(J=c(Z,J));try{J=encodeURI(J).replace(/%25/g,"%")}catch(Y){return null}return J}var y={},f=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(re,Z){y[" "+re]||(f.test(re)?y[" "+re]=re+"/":y[" "+re]=A(re,"/",!0)),re=y[" "+re];var J=re.indexOf(":")===-1;return Z.substring(0,2)==="//"?J?Z:re.replace(u,"$1")+Z:Z.charAt(0)==="/"?J?Z:re.replace(o,"$1")+Z:re+Z}var _={exec:function(){}};function p(re){for(var Z=1,J,V;Z=0&&le[Oe]==="\\";)ve=!ve;return ve?"|":" |"}),V=J.split(/ \|/),Y=0;if(V.length>Z)V.splice(Z);else for(;V.length=V.length?Y.slice(V.length):Y}).join(`
`)}var ge=function(){function re(J){this.options=J||M}var Z=re.prototype;return Z.space=function(V){var Y=this.rules.block.newline.exec(V);if(Y)return Y[0].length>1?{type:"space",raw:Y[0]}:{raw:`
`}},Z.code=function(V,Y){var q=this.rules.block.code.exec(V);if(q){var te=Y[Y.length-1];if(te&&te.type==="paragraph")return{raw:q[0],text:q[0].trimRight()};var le=q[0].replace(/^ {4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?le:O(le,`
`)}}},Z.fences=function(V){var Y=this.rules.block.fences.exec(V);if(Y){var q=Y[0],te=he(q,Y[3]||"");return{type:"code",raw:q,lang:Y[2]?Y[2].trim():Y[2],text:te}}},Z.heading=function(V){var Y=this.rules.block.heading.exec(V);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},Z.nptable=function(V){var Y=this.rules.block.nptable.exec(V);if(Y){var q={type:"table",header:j(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[],raw:Y[0]};if(q.header.length===q.align.length){var te=q.align.length,le;for(le=0;le ?/gm,"");return{type:"blockquote",raw:Y[0],text:q}}},Z.list=function(V){var Y=this.rules.block.list.exec(V);if(Y){for(var q=Y[0],te=Y[2],le=te.length>1,ve=te[te.length-1]===")",Oe={type:"list",raw:q,ordered:le,start:le?+te.slice(0,-1):"",loose:!1,items:[]},He=Y[0].match(this.rules.block.item),ze=!1,Ne,Je,Qe,Ge,at,nt,rt,dt=He.length,et=0;et1||this.options.smartLists&&Qe!==te)&&(Ge=He.slice(et+1).join(`
`),Oe.raw=Oe.raw.substring(0,Oe.raw.length-Ge.length),et=dt-1)),at=ze||/\n\n(?!\s*$)/.test(Ne),et!==dt-1&&(ze=Ne.charAt(Ne.length-1)===`
`,at||(at=ze)),at&&(Oe.loose=!0),nt=/^\[[ xX]\] /.test(Ne),rt=void 0,nt&&(rt=Ne[1]!==" ",Ne=Ne.replace(/^\[[ xX]\] +/,"")),Oe.items.push({type:"list_item",raw:q,task:nt,checked:rt,loose:at,text:Ne});return Oe}},Z.html=function(V){var Y=this.rules.block.html.exec(V);if(Y)return{type:this.options.sanitize?"paragraph":"html",raw:Y[0],pre:!this.options.sanitizer&&(Y[1]==="pre"||Y[1]==="script"||Y[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Y[0]):G(Y[0]):Y[0]}},Z.def=function(V){var Y=this.rules.block.def.exec(V);if(Y){Y[3]&&(Y[3]=Y[3].substring(1,Y[3].length-1));var q=Y[1].toLowerCase().replace(/\s+/g," ");return{tag:q,raw:Y[0],href:Y[2],title:Y[3]}}},Z.table=function(V){var Y=this.rules.block.table.exec(V);if(Y){var q={type:"table",header:j(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[]};if(q.header.length===q.align.length){q.raw=Y[0];var te=q.align.length,le;for(le=0;le/i.test(te[0])&&(Y=!1),!q&&/^<(pre|code|kbd|script)(\s|>)/i.test(te[0])?q=!0:q&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(te[0])&&(q=!1),{type:this.options.sanitize?"text":"html",raw:te[0],inLink:Y,inRawBlock:q,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(te[0]):G(te[0]):te[0]}},Z.link=function(V){var Y=this.rules.inline.link.exec(V);if(Y){var q=X(Y[2],"()");if(q>-1){var te=Y[0].indexOf("!")===0?5:4,le=te+Y[1].length+q;Y[2]=Y[2].substring(0,q),Y[0]=Y[0].substring(0,le).trim(),Y[3]=""}var ve=Y[2],Oe="";if(this.options.pedantic){var He=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ve);He?(ve=He[1],Oe=He[3]):Oe=""}else Oe=Y[3]?Y[3].slice(1,-1):"";ve=ve.trim().replace(/^<([\s\S]*)>$/,"$1");var ze=ee(Y,{href:ve&&ve.replace(this.rules.inline._escapes,"$1"),title:Oe&&Oe.replace(this.rules.inline._escapes,"$1")},Y[0]);return ze}},Z.reflink=function(V,Y){var q;if((q=this.rules.inline.reflink.exec(V))||(q=this.rules.inline.nolink.exec(V))){var te=(q[2]||q[1]).replace(/\s+/g," ");if(te=Y[te.toLowerCase()],!te||!te.href){var le=q[0].charAt(0);return{type:"text",raw:le,text:le}}var ve=ee(q,te,q[0]);return ve}},Z.strong=function(V,Y,q){q===void 0&&(q="");var te=this.rules.inline.strong.start.exec(V);if(te&&(!te[1]||te[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Y=Y.slice(-1*V.length);var le=te[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;le.lastIndex=0;for(var ve;(te=le.exec(Y))!=null;)if(ve=this.rules.inline.strong.middle.exec(Y.slice(0,te.index+3)),ve)return{type:"strong",raw:V.slice(0,ve[0].length),text:V.slice(2,ve[0].length-2)}}},Z.em=function(V,Y,q){q===void 0&&(q="");var te=this.rules.inline.em.start.exec(V);if(te&&(!te[1]||te[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Y=Y.slice(-1*V.length);var le=te[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;le.lastIndex=0;for(var ve;(te=le.exec(Y))!=null;)if(ve=this.rules.inline.em.middle.exec(Y.slice(0,te.index+2)),ve)return{type:"em",raw:V.slice(0,ve[0].length),text:V.slice(1,ve[0].length-1)}}},Z.codespan=function(V){var Y=this.rules.inline.code.exec(V);if(Y){var q=Y[2].replace(/\n/g," "),te=/[^ ]/.test(q),le=q.startsWith(" ")&&q.endsWith(" ");return te&&le&&(q=q.substring(1,q.length-1)),q=G(q,!0),{type:"codespan",raw:Y[0],text:q}}},Z.br=function(V){var Y=this.rules.inline.br.exec(V);if(Y)return{type:"br",raw:Y[0]}},Z.del=function(V){var Y=this.rules.inline.del.exec(V);if(Y)return{type:"del",raw:Y[0],text:Y[1]}},Z.autolink=function(V,Y){var q=this.rules.inline.autolink.exec(V);if(q){var te,le;return q[2]==="@"?(te=G(this.options.mangle?Y(q[1]):q[1]),le="mailto:"+te):(te=G(q[1]),le=te),{type:"link",raw:q[0],text:te,href:le,tokens:[{type:"text",raw:te,text:te}]}}},Z.url=function(V,Y){var q;if(q=this.rules.inline.url.exec(V)){var te,le;if(q[2]==="@")te=G(this.options.mangle?Y(q[0]):q[0]),le="mailto:"+te;else{var ve;do ve=q[0],q[0]=this.rules.inline._backpedal.exec(q[0])[0];while(ve!==q[0]);te=G(q[0]),q[1]==="www."?le="http://"+te:le=te}return{type:"link",raw:q[0],text:te,href:le,tokens:[{type:"text",raw:te,text:te}]}}},Z.inlineText=function(V,Y,q){var te=this.rules.inline.text.exec(V);if(te){var le;return Y?le=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(te[0]):G(te[0]):te[0]:le=G(this.options.smartypants?q(te[0]):te[0]),{type:"text",raw:te[0],text:le}}},re}(),de=L.noopTest,Te=L.edit,xe=L.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:de,table:de,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=Te(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=Te(ce.item,"gm").replace(/bull/g,ce.bullet).getRegex(),ce.list=Te(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=Te(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ce.paragraph=Te(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=Te(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=Te(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=Te(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:Te(`^ *(?: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:de,paragraph:Te(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 ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:de,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:de,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ae.punctuation=Te(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=Te(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=Te(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=Te(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=Te(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=Te(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=Te(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=Te(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=Te(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=Te(ae._blockSkip,"g").getRegex(),ae.overlapSkip=Te(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._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])?)+(?![-_])/,ae.autolink=Te(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=Te(ae.tag).replace("comment",ce._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=Te(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=Te(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=Te(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=xe({},ae),ae.pedantic=xe({},ae.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=xe({},ae.normal,{escape:Te(ae.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&&(V="x"+V.toString(16)),Z+=""+V+";";return Z}var Ae=function(){function re(J){this.tokens=[],this.tokens.links=Object.create(null),this.options=J||Ye,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var V={block:Fe.normal,inline:We.normal};this.options.pedantic?(V.block=Fe.pedantic,V.inline=We.pedantic):this.options.gfm&&(V.block=Fe.gfm,this.options.breaks?V.inline=We.breaks:V.inline=We.gfm),this.tokenizer.rules=V}re.lex=function(V,Y){var q=new re(Y);return q.lex(V)};var Z=re.prototype;return Z.lex=function(V){return V=V.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(V,this.tokens,!0),this.inline(this.tokens),this.tokens},Z.blockTokens=function(V,Y,q){Y===void 0&&(Y=[]),q===void 0&&(q=!0),V=V.replace(/^ +$/gm,"");for(var te,le,ve,Oe;V;){if(te=this.tokenizer.space(V)){V=V.substring(te.raw.length),te.type&&Y.push(te);continue}if(te=this.tokenizer.code(V,Y)){V=V.substring(te.raw.length),te.type?Y.push(te):(Oe=Y[Y.length-1],Oe.raw+=`
`+te.raw,Oe.text+=`
`+te.text);continue}if(te=this.tokenizer.fences(V)){V=V.substring(te.raw.length),Y.push(te);continue}if(te=this.tokenizer.heading(V)){V=V.substring(te.raw.length),Y.push(te);continue}if(te=this.tokenizer.nptable(V)){V=V.substring(te.raw.length),Y.push(te);continue}if(te=this.tokenizer.hr(V)){V=V.substring(te.raw.length),Y.push(te);continue}if(te=this.tokenizer.blockquote(V)){V=V.substring(te.raw.length),te.tokens=this.blockTokens(te.text,[],q),Y.push(te);continue}if(te=this.tokenizer.list(V)){for(V=V.substring(te.raw.length),ve=te.items.length,le=0;le0)for(;(He=this.tokenizer.rules.inline.reflinkSearch.exec(Oe))!=null;)ze.includes(He[0].slice(He[0].lastIndexOf("[")+1,-1))&&(Oe=Oe.slice(0,He.index)+"["+"a".repeat(He[0].length-2)+"]"+Oe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(He=this.tokenizer.rules.inline.blockSkip.exec(Oe))!=null;)Oe=Oe.slice(0,He.index)+"["+"a".repeat(He[0].length-2)+"]"+Oe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;V;){if(ve=this.tokenizer.escape(V)){V=V.substring(ve.raw.length),Y.push(ve);continue}if(ve=this.tokenizer.tag(V,q,te)){V=V.substring(ve.raw.length),q=ve.inLink,te=ve.inRawBlock,Y.push(ve);continue}if(ve=this.tokenizer.link(V)){V=V.substring(ve.raw.length),ve.type==="link"&&(ve.tokens=this.inlineTokens(ve.text,[],!0,te)),Y.push(ve);continue}if(ve=this.tokenizer.reflink(V,this.tokens.links)){V=V.substring(ve.raw.length),ve.type==="link"&&(ve.tokens=this.inlineTokens(ve.text,[],!0,te)),Y.push(ve);continue}if(ve=this.tokenizer.strong(V,Oe,le)){V=V.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],q,te),Y.push(ve);continue}if(ve=this.tokenizer.em(V,Oe,le)){V=V.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],q,te),Y.push(ve);continue}if(ve=this.tokenizer.codespan(V)){V=V.substring(ve.raw.length),Y.push(ve);continue}if(ve=this.tokenizer.br(V)){V=V.substring(ve.raw.length),Y.push(ve);continue}if(ve=this.tokenizer.del(V)){V=V.substring(ve.raw.length),ve.tokens=this.inlineTokens(ve.text,[],q,te),Y.push(ve);continue}if(ve=this.tokenizer.autolink(V,Ee)){V=V.substring(ve.raw.length),Y.push(ve);continue}if(!q&&(ve=this.tokenizer.url(V,Ee))){V=V.substring(ve.raw.length),Y.push(ve);continue}if(ve=this.tokenizer.inlineText(V,te,be)){V=V.substring(ve.raw.length),le=ve.raw.slice(-1),Y.push(ve);continue}if(V){var Ne="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(Ne);break}else throw new Error(Ne)}}return Y},H(re,null,[{key:"rules",get:function(){return{block:Fe,inline:We}}}]),re}(),Ie=K.defaults,$=L.cleanUrl,se=L.escape,ue=function(){function re(J){this.options=J||Ie}var Z=re.prototype;return Z.code=function(V,Y,q){var te=(Y||"").match(/\S*/)[0];if(this.options.highlight){var le=this.options.highlight(V,te);le!=null&&le!==V&&(q=!0,V=le)}return te?''+(q?V:se(V,!0))+`
`:""+(q?V:se(V,!0))+`
`},Z.blockquote=function(V){return`
`+V+`
`},Z.html=function(V){return V},Z.heading=function(V,Y,q,te){return this.options.headerIds?"
`:""+V+"
`},Z.hr=function(){return this.options.xhtml?`
`:`
`},Z.list=function(V,Y,q){var te=Y?"ol":"ul",le=Y&&q!==1?' start="'+q+'"':"";return"<"+te+le+`>
`+V+""+te+`>
`},Z.listitem=function(V){return""+V+`
`},Z.checkbox=function(V){return" "},Z.paragraph=function(V){return""+V+`
`},Z.table=function(V,Y){return Y&&(Y=""+Y+""),`
`},Z.tablerow=function(V){return`
`+V+`
`},Z.tablecell=function(V,Y){var q=Y.header?"th":"td",te=Y.align?"<"+q+' align="'+Y.align+'">':"<"+q+">";return te+V+""+q+`>
`},Z.strong=function(V){return""+V+""},Z.em=function(V){return""+V+""},Z.codespan=function(V){return""+V+""},Z.br=function(){return this.options.xhtml?"
":"
"},Z.del=function(V){return""+V+""},Z.link=function(V,Y,q){if(V=$(this.options.sanitize,this.options.baseUrl,V),V===null)return q;var te='"+q+"",te},Z.image=function(V,Y,q){if(V=$(this.options.sanitize,this.options.baseUrl,V),V===null)return q;var te='
":">",te},Z.text=function(V){return V},re}(),pe=function(){function re(){}var Z=re.prototype;return Z.strong=function(V){return V},Z.em=function(V){return V},Z.codespan=function(V){return V},Z.del=function(V){return V},Z.html=function(V){return V},Z.text=function(V){return V},Z.link=function(V,Y,q){return""+q},Z.image=function(V,Y,q){return""+q},Z.br=function(){return""},re}(),Se=function(){function re(){this.seen={}}var Z=re.prototype;return Z.slug=function(V){var Y=V.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Y)){var q=Y;do this.seen[q]++,Y=q+"-"+this.seen[q];while(this.seen.hasOwnProperty(Y))}return this.seen[Y]=0,Y},re}(),Pe=K.defaults,De=L.unescape,ke=function(){function re(J){this.options=J||Pe,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new pe,this.slugger=new Se}re.parse=function(V,Y){var q=new re(Y);return q.parse(V)};var Z=re.prototype;return Z.parse=function(V,Y){Y===void 0&&(Y=!0);var q="",te,le,ve,Oe,He,ze,Ne,Je,Qe,Ge,at,nt,rt,dt,et,st,ut,Ue,pt=V.length;for(te=0;te0&&et.tokens[0].type==="text"?(et.tokens[0].text=Ue+" "+et.tokens[0].text,et.tokens[0].tokens&&et.tokens[0].tokens.length>0&&et.tokens[0].tokens[0].type==="text"&&(et.tokens[0].tokens[0].text=Ue+" "+et.tokens[0].tokens[0].text)):et.tokens.unshift({type:"text",text:Ue}):dt+=Ue),dt+=this.parse(et.tokens,rt),Qe+=this.renderer.listitem(dt,ut,st);q+=this.renderer.list(Qe,at,nt);continue}case"html":{q+=this.renderer.html(Ge.text);continue}case"paragraph":{q+=this.renderer.paragraph(this.parseInline(Ge.tokens));continue}case"text":{for(Qe=Ge.tokens?this.parseInline(Ge.tokens):Ge.text;te+1An error occurred:
"+oe(ve.message+"",!0)+"
";throw ve}}fe.options=fe.setOptions=function(re){return Be(fe.defaults,re),_e(fe.defaults),fe},fe.getDefaults=me,fe.defaults=we,fe.use=function(re){var Z=Be({},re);if(re.renderer&&function(){var V=fe.defaults.renderer||new ue,Y=function(le){var ve=V[le];V[le]=function(){for(var Oe=arguments.length,He=new Array(Oe),ze=0;ze>>6)+e(128|A&63):e(224|A>>>12&15)+e(128|A>>>6&63)+e(128|A&63)}else{var A=65536+(d.charCodeAt(0)-55296)*1024+(d.charCodeAt(1)-56320);return e(240|A>>>18&7)+e(128|A>>>12&63)+e(128|A>>>6&63)+e(128|A&63)}},E=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=function(d){return d.replace(E,C)},h=function(d){var A=[0,2,1][d.length%3],D=d.charCodeAt(0)<<16|(d.length>1?d.charCodeAt(1):0)<<8|(d.length>2?d.charCodeAt(2):0),S=[K.charAt(D>>>18),K.charAt(D>>>12&63),A>=2?"=":K.charAt(D>>>6&63),A>=1?"=":K.charAt(D&63)];return S.join("")},a=W.btoa&&typeof W.btoa=="function"?function(d){return W.btoa(d)}:function(d){if(d.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return d.replace(/[\s\S]{1,3}/g,h)},i=function(d){return a(g(String(d)))},l=function(d){return d.replace(/[+\/]/g,function(A){return A=="+"?"-":"_"}).replace(/=/g,"")},s=function(d,A){return A?l(i(d)):i(d)},n=function(d){return s(d,!0)},r;W.Uint8Array&&(r=function(d,A){for(var D="",S=0,L=d.length;S>>18)+K.charAt(G>>>12&63)+(typeof O!="undefined"?K.charAt(G>>>6&63):"=")+(typeof j!="undefined"?K.charAt(G&63):"=")}return A?l(D):D});var t=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,b=function(d){switch(d.length){case 4:var A=(7&d.charCodeAt(0))<<18|(63&d.charCodeAt(1))<<12|(63&d.charCodeAt(2))<<6|63&d.charCodeAt(3),D=A-65536;return e((D>>>10)+55296)+e((D&1023)+56320);case 3:return e((15&d.charCodeAt(0))<<12|(63&d.charCodeAt(1))<<6|63&d.charCodeAt(2));default:return e((31&d.charCodeAt(0))<<6|63&d.charCodeAt(1))}},v=function(d){return d.replace(t,b)},m=function(d){var A=d.length,D=A%4,S=(A>0?N[d.charAt(0)]<<18:0)|(A>1?N[d.charAt(1)]<<12:0)|(A>2?N[d.charAt(2)]<<6:0)|(A>3?N[d.charAt(3)]:0),L=[e(S>>>16),e(S>>>8&255),e(S&255)];return L.length-=[0,0,2,1][D],L.join("")},T=W.atob&&typeof W.atob=="function"?function(d){return W.atob(d)}:function(d){return d.replace(/\S{1,4}/g,m)},y=function(d){return T(String(d).replace(/[^A-Za-z0-9\+\/]/g,""))},f=function(d){return v(T(d))},u=function(d){return String(d).replace(/[-_]/g,function(A){return A=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(d){return f(u(d))},c;W.Uint8Array&&(c=function(d){return Uint8Array.from(y(u(d)),function(A){return A.charCodeAt(0)})});var _=function(){var d=W.Base64;return W.Base64=P,d};if(W.Base64={VERSION:R,atob:y,btoa:a,fromBase64:o,toBase64:s,utob:g,encode:s,encodeURI:n,btou:v,decode:o,noConflict:_,fromUint8Array:r,toUint8Array:c},typeof Object.defineProperty=="function"){var p=function(d){return{value:d,enumerable:!1,writable:!0,configurable:!0}};W.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",p(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",p(function(d){return s(this,d)})),Object.defineProperty(String.prototype,"toBase64URI",p(function(){return s(this,!0)}))}}return W.Meteor&&(Base64=W.Base64),Me.exports?Me.exports.Base64=W.Base64:!(H=[],I=function(){return W.Base64}.apply(ne,H),I!==void 0&&(Me.exports=I)),{Base64:W.Base64}})}).call(this,B("IyRk"))},JYp7:function(Me,ne,B){"use strict";B.d(ne,"a",function(){return Q});var Q;(function(H){function I(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}H.is=I;const W=Object.freeze([]);function P(){return W}H.empty=P;function*R(t){yield t}H.single=R;function K(t){return t||W}H.from=K;function N(t){return!t||t[Symbol.iterator]().next().done===!0}H.isEmpty=N;function e(t){return t[Symbol.iterator]().next().value}H.first=e;function C(t,b){for(const v of t)if(b(v))return!0;return!1}H.some=C;function E(t,b){for(const v of t)if(b(v))return v;return}H.find=E;function*g(t,b){for(const v of t)b(v)&&(yield v)}H.filter=g;function*h(t,b){let v=0;for(const m of t)yield b(m,v++)}H.map=h;function*a(...t){for(const b of t)for(const v of b)yield v}H.concat=a;function*i(t){for(const b of t)for(const v of b)yield v}H.concatNested=i;function l(t,b,v){let m=v;for(const T of t)m=b(m,T);return m}H.reduce=l;function*s(t,b,v=t.length){for(b<0&&(b+=t.length),v<0?v+=t.length:v>t.length&&(v=t.length);bm===T){const m=t[Symbol.iterator](),T=b[Symbol.iterator]();for(;;){const y=m.next(),f=T.next();if(y.done!==f.done)return!1;if(y.done)return!0;if(!v(y.value,f.value))return!1}}H.equals=r})(Q||(Q={}))},LdHM:function(Me,ne,B){"use strict";B.d(ne,"b",function(){return t}),B.d(ne,"a",function(){return v});var Q=B("1OyB"),H=B("vuIU"),I=B("Ji7U"),W=B("LK+K"),P=B("q1tI"),R=B("rePB"),K=B("Ff2n"),N=B("ODXe"),e=B("4IlW"),C=B("bX4T"),E=B("YrtM"),g=B("TSYQ"),h=B.n(g),a=B("+nKL"),i=B("8OUc"),l=function(j,G){var X=j.prefixCls,ee=j.id,he=j.flattenOptions,ge=j.childrenAsData,de=j.values,Te=j.searchValue,xe=j.multiple,ce=j.defaultActiveFirstOption,ae=j.height,Le=j.itemHeight,Ye=j.notFoundContent,Fe=j.open,We=j.menuItemSelectedIcon,be=j.virtual,Ee=j.onSelect,Ae=j.onToggleOpen,Ie=j.onActiveValue,$=j.onScroll,se=j.onMouseEnter,ue="".concat(X,"-item"),pe=Object(E.a)(function(){return he},[Fe,he],function(ye,re){return re[0]&&ye[1]!==re[1]}),Se=P.useRef(null),Pe=function(re){re.preventDefault()},De=function(re){Se.current&&Se.current.scrollTo({index:re})},ke=function(re){for(var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,J=pe.length,V=0;V1&&arguments[1]!==void 0?arguments[1]:!1;return Object(T.a)(O).map(function(G,X){if(!P.isValidElement(G)||!G.type)return null;var ee=G.type.isSelectOptGroup,he=G.key,ge=G.props,de=ge.children,Te=Object(K.a)(ge,["children"]);return j||!ee?y(G):Object(m.a)(Object(m.a)({key:"__RC_SELECT_GRP__".concat(he===null?X:he,"__"),label:he},Te),{},{options:f(de)})}).filter(function(G){return G})}var u=B("2Qr1"),o=B("qNPg"),c=B("U8pU"),_=B("Kwbf"),p=B("WKfj");function d(O){var j=O.mode,G=O.options,X=O.children,ee=O.backfill,he=O.allowClear,ge=O.placeholder,de=O.getInputElement,Te=O.showSearch,xe=O.onSearch,ce=O.defaultOpen,ae=O.autoFocus,Le=O.labelInValue,Ye=O.value,Fe=O.inputValue,We=O.optionLabelProp,be=j==="multiple"||j==="tags",Ee=Te!==void 0?Te:be||j==="combobox",Ae=G||f(X);if(Object(_.a)(j!=="tags"||Ae.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),j==="tags"||j==="combobox"){var Ie=Ae.some(function(ue){return ue.options?ue.options.some(function(pe){return typeof("value"in pe?pe.value:pe.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(_.a)(!Ie,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(_.a)(j!=="combobox"||!We,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(_.a)(j==="combobox"||!ee,"`backfill` only works with `combobox` mode."),Object(_.a)(j==="combobox"||!de,"`getInputElement` only work with `combobox` mode."),Object(_.b)(j!=="combobox"||!de||!he||!ge,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!Ee&&j!=="combobox"&&j!=="tags"&&Object(_.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(_.b)(!ce||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ye!=null){var $=Object(p.d)(Ye);Object(_.a)(!Le||$.every(function(ue){return Object(c.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(_.a)(!be||Array.isArray(Ye),"`value` should be array when `mode` is `multiple` or `tags`")}if(X){var se=null;Object(T.a)(X).some(function(ue){if(!P.isValidElement(ue)||!ue.type)return!1;var pe=ue.type;if(pe.isSelectOption)return!1;if(pe.isSelectOptGroup){var Se=Object(T.a)(ue.props.children).every(function(Pe){return!P.isValidElement(Pe)||!ue.type||Pe.type.isSelectOption?!0:(se=Pe.type,!1)});return!Se}return se=pe,!0}),se&&Object(_.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(se.displayName||se.name||se,"`.")),Object(_.a)(Fe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var A=d,D=Object(o.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:f,flattenOptions:u.d,getLabeledValue:u.e,filterOptions:u.b,isValueDisabled:u.g,findValueOption:u.c,warningProps:A,fillOptionsWithMissingValue:u.a}),S=function(O){Object(I.a)(G,O);var j=Object(W.a)(G);function G(){var X;return Object(Q.a)(this,G),X=j.apply(this,arguments),X.selectRef=P.createRef(),X.focus=function(){X.selectRef.current.focus()},X.blur=function(){X.selectRef.current.blur()},X}return Object(H.a)(G,[{key:"render",value:function(){return P.createElement(D,Object.assign({ref:this.selectRef},this.props))}}]),G}(P.Component);S.Option=t,S.OptGroup=v;var L=S,M=ne.c=L},MI8n:function(Me,ne,B){"use strict";B.d(ne,"c",function(){return P}),B.d(ne,"b",function(){return e}),B.d(ne,"e",function(){return C}),B.d(ne,"a",function(){return E}),B.d(ne,"d",function(){return g}),B.d(ne,"f",function(){return h});var Q=B("/cxE"),H=B("pmY6"),I=B("24hK"),W=B("5Y4S"),P;(function(a){a.None=()=>H.a.None;function i(d){return(A,D=null,S)=>{let L=!1,M;return M=d(O=>L?void 0:(M?M.dispose():L=!0,A.call(D,O)),null,S),L&&M.dispose(),M}}a.once=i;function l(d,A){return v((D,S=null,L)=>d(M=>D.call(S,A(M)),null,L))}a.map=l;function s(d,A){return v((D,S=null,L)=>d(M=>{A(M),D.call(S,M)},null,L))}a.forEach=s;function n(d,A){return v((D,S=null,L)=>d(M=>A(M)&&D.call(S,M),null,L))}a.filter=n;function r(d){return d}a.signal=r;function t(...d){return(A,D=null,S)=>Object(H.e)(...d.map(L=>L(M=>A.call(D,M),null,S)))}a.any=t;function b(d,A,D){let S=D;return l(d,L=>(S=A(S,L),S))}a.reduce=b;function v(d){let A;const D=new e({onFirstListenerAdd(){A=d(D.fire,D)},onLastListenerRemove(){A.dispose()}});return D.event}function m(d,A,D=100,S=!1,L){let M,O,j,G=0;const X=new e({leakWarningThreshold:L,onFirstListenerAdd(){M=d(ee=>{G++,O=A(O,ee),S&&!j&&(X.fire(O),O=void 0),clearTimeout(j),j=setTimeout(()=>{const he=O;O=void 0,j=void 0,(!S||G>1)&&X.fire(he),G=0},D)})},onLastListenerRemove(){M.dispose()}});return X.event}a.debounce=m;function T(d,A=(D,S)=>D===S){let D=!0,S;return n(d,L=>{const M=D||!A(L,S);return D=!1,S=L,M})}a.latch=T;function y(d,A){return[a.filter(d,A),a.filter(d,D=>!A(D))]}a.split=y;function f(d,A=!1,D=[]){let S=D.slice(),L=d(j=>{S?S.push(j):O.fire(j)});const M=()=>{S&&S.forEach(j=>O.fire(j)),S=null},O=new e({onFirstListenerAdd(){L||(L=d(j=>O.fire(j)))},onFirstListenerDidAdd(){S&&(A?setTimeout(M):M())},onLastListenerRemove(){L&&L.dispose(),L=null}});return O.event}a.buffer=f;class u{constructor(d){this.event=d}map(d){return new u(l(this.event,d))}forEach(d){return new u(s(this.event,d))}filter(d){return new u(n(this.event,d))}reduce(d,A){return new u(b(this.event,d,A))}latch(){return new u(T(this.event))}debounce(d,A=100,D=!1,S){return new u(m(this.event,d,A,D,S))}on(d,A,D){return this.event(d,A,D)}once(d,A,D){return i(this.event)(d,A,D)}}function o(d){return new u(d)}a.chain=o;function c(d,A,D=S=>S){const S=(...j)=>O.fire(D(...j)),L=()=>d.on(A,S),M=()=>d.removeListener(A,S),O=new e({onFirstListenerAdd:L,onLastListenerRemove:M});return O.event}a.fromNodeEventEmitter=c;function _(d,A,D=S=>S){const S=(...j)=>O.fire(D(...j)),L=()=>d.addEventListener(A,S),M=()=>d.removeEventListener(A,S),O=new e({onFirstListenerAdd:L,onLastListenerRemove:M});return O.event}a.fromDOMEventEmitter=_;function p(d){return new Promise(A=>i(d)(A))}a.toPromise=p})(P||(P={}));class R{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${R._idPool++}`}start(a){this._stopWatch=new W.a(!0),this._listenerCount=a}stop(){if(this._stopWatch){const a=this._stopWatch.elapsed();this._elapsedOverall+=a,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${a.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}R._idPool=0;let K=-1;class N{constructor(a,i=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=i,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let i=K;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||a{const n=this._stacks.get(l)||0;this._stacks.set(l,n-1)}}}class e{constructor(a){var i;this._disposed=!1,this._options=a,this._leakageMon=K>0?new N(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new R(this._options._profName):void 0}get event(){return this._event||(this._event=(a,i,l)=>{var s;this._listeners||(this._listeners=new I.a);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(i?[a,i]:a);n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,i);const t=(s=this._leakageMon)===null||s===void 0?void 0:s.check(this._listeners.size),b=Object(H.i)(()=>{if(t&&t(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const v=this._listeners&&!this._listeners.isEmpty();v||this._options.onLastListenerRemove(this)}});return l instanceof H.b?l.add(b):Array.isArray(l)&&l.push(b),b}),this._event}fire(a){var i,l;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new I.a);for(let s of this._listeners)this._deliveryQueue.push([s,a]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,n]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,n):s[0].call(s[1],n)}catch(r){Object(Q.f)(r)}}(l=this._perfMon)===null||l===void 0||l.stop()}}dispose(){var a,i,l,s,n;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(s=(l=this._options)===null||l===void 0?void 0:l.onLastListenerRemove)===null||s===void 0||s.call(l),(n=this._leakageMon)===null||n===void 0||n.dispose())}}class C extends e{constructor(a){super(a);this._isPaused=0,this._eventQueue=new I.a,this._mergeFn=a==null?void 0:a.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const a=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(a))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(a){this._listeners&&(this._isPaused!==0?this._eventQueue.push(a):super.fire(a))}}class E extends C{constructor(a){var i;super(a);this._delay=(i=a.delay)!==null&&i!==void 0?i:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}class g{constructor(){this.buffers=[]}wrapEvent(a){return(i,l,s)=>a(n=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>i.call(l,n)):i.call(l,n)},void 0,s)}bufferEvents(a){const i=[];this.buffers.push(i);const l=a();return this.buffers.pop(),i.forEach(s=>s()),l}}class h{constructor(){this.listening=!1,this.inputEvent=P.None,this.inputEventListener=H.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Me,ne,B){"use strict";(function(Q,H){B.d(ne,"b",function(){return l}),B.d(ne,"i",function(){return t}),B.d(ne,"f",function(){return b}),B.d(ne,"d",function(){return v}),B.d(ne,"g",function(){return m}),B.d(ne,"h",function(){return T}),B.d(ne,"c",function(){return y}),B.d(ne,"k",function(){return f}),B.d(ne,"j",function(){return u}),B.d(ne,"a",function(){return o}),B.d(ne,"e",function(){return p});var I;const W="en";let P=!1,R=!1,K=!1,N=!1,e=!1,C=!1,E=!1,g,h=W,a,i;const l=typeof self=="object"?self:typeof Q=="object"?Q:{};let s;typeof l.vscode!="undefined"&&typeof l.vscode.process!="undefined"?s=l.vscode.process:typeof H!="undefined"&&(s=H);const n=typeof((I=s==null?void 0:s.versions)===null||I===void 0?void 0:I.electron)=="string"&&s.type==="renderer";if(typeof navigator=="object"&&!n)i=navigator.userAgent,P=i.indexOf("Windows")>=0,R=i.indexOf("Macintosh")>=0,E=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=i.indexOf("Linux")>=0,C=!0,g=navigator.language,h=g;else if(typeof s=="object"){P=s.platform==="win32",R=s.platform==="darwin",K=s.platform==="linux",N=K&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,g=W,h=W;const d=s.env.VSCODE_NLS_CONFIG;if(d)try{const A=JSON.parse(d),D=A.availableLanguages["*"];g=A.locale,h=D||W,a=A._translationsConfigFile}catch(A){}e=!0}else console.error("Unable to resolve platform.");let r=0;R?r=1:P?r=3:K&&(r=2);const t=P,b=R,v=K,m=e,T=C,y=E,f=i,u=function(){if(l.setImmediate)return l.setImmediate.bind(l);if(typeof l.postMessage=="function"&&!l.importScripts){let D=[];l.addEventListener("message",L=>{if(L.data&&L.data.vscodeSetImmediateId)for(let M=0,O=D.length;M{const M=++S;D.push({id:M,callback:L}),l.postMessage({vscodeSetImmediateId:M},"*")}}if(typeof(s==null?void 0:s.nextTick)=="function")return s.nextTick.bind(s);const A=Promise.resolve();return D=>A.then(D)}(),o=R||E?2:P?1:3;let c=!0,_=!1;function p(){if(!_){_=!0;const d=new Uint8Array(2);d[0]=1,d[1]=2;const A=new Uint16Array(d.buffer);c=A[0]===(2<<8)+1}return c}}).call(this,B("IyRk"),B("Q2Ig"))},N0LK:function(Me,ne,B){"use strict";B.d(ne,"C",function(){return Q}),B.d(ne,"v",function(){return I}),B.d(ne,"s",function(){return W}),B.d(ne,"t",function(){return P}),B.d(ne,"U",function(){return R}),B.d(ne,"J",function(){return K}),B.d(ne,"O",function(){return N}),B.d(ne,"p",function(){return e}),B.d(ne,"T",function(){return C}),B.d(ne,"q",function(){return E}),B.d(ne,"N",function(){return g}),B.d(ne,"M",function(){return h}),B.d(ne,"Q",function(){return a}),B.d(ne,"u",function(){return i}),B.d(ne,"x",function(){return l}),B.d(ne,"I",function(){return s}),B.d(ne,"f",function(){return n}),B.d(ne,"h",function(){return r}),B.d(ne,"g",function(){return t}),B.d(ne,"i",function(){return b}),B.d(ne,"G",function(){return v}),B.d(ne,"H",function(){return m}),B.d(ne,"r",function(){return T}),B.d(ne,"R",function(){return y}),B.d(ne,"d",function(){return f}),B.d(ne,"e",function(){return u}),B.d(ne,"E",function(){return o}),B.d(ne,"F",function(){return c}),B.d(ne,"j",function(){return _}),B.d(ne,"z",function(){return p}),B.d(ne,"K",function(){return A}),B.d(ne,"L",function(){return D}),B.d(ne,"m",function(){return L}),B.d(ne,"k",function(){return O}),B.d(ne,"A",function(){return G}),B.d(ne,"a",function(){return X}),B.d(ne,"n",function(){return ee}),B.d(ne,"l",function(){return he}),B.d(ne,"D",function(){return ge}),B.d(ne,"B",function(){return de}),B.d(ne,"b",function(){return Te}),B.d(ne,"S",function(){return xe}),B.d(ne,"o",function(){return ce}),B.d(ne,"P",function(){return ae}),B.d(ne,"w",function(){return Le}),B.d(ne,"c",function(){return Ye}),B.d(ne,"y",function(){return be});function Q($){return!$||typeof $!="string"?!0:$.trim().length===0}const H=/{(\d+)}/g;function I($,...se){return se.length===0?$:$.replace(H,function(ue,pe){const Se=parseInt(pe,10);return isNaN(Se)||Se<0||Se>=se.length?ue:se[Se]})}function W($){return $.replace(/[<>&]/g,function(se){switch(se){case"<":return"<";case">":return">";case"&":return"&";default:return se}})}function P($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function R($,se=" "){const ue=K($,se);return N(ue,se)}function K($,se){if(!$||!se)return $;const ue=se.length;if(ue===0||$.length===0)return $;let pe=0;for(;$.indexOf(se,pe)===pe;)pe=pe+ue;return $.substring(pe)}function N($,se){if(!$||!se)return $;const ue=se.length,pe=$.length;if(ue===0||pe===0)return $;let Se=pe,Pe=-1;for(;!(Pe=$.lastIndexOf(se,Se-1),Pe===-1||Pe+ue!==Se);){if(Pe===0)return"";Se=Pe}return $.substring(0,Se)}function e($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C($){return $.replace(/\*/g,"")}function E($,se,ue={}){if(!$)throw new Error("Cannot create regex from empty string");se||($=P($)),ue.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let pe="";return ue.global&&(pe+="g"),ue.matchCase||(pe+="i"),ue.multiline&&(pe+="m"),ue.unicode&&(pe+="u"),new RegExp($,pe)}function g($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const se=$.exec("");return!!(se&&$.lastIndex===0)}function h($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function a($){return $.split(/\r\n|\r|\n/)}function i($){for(let se=0,ue=$.length;se=0;ue--){const pe=$.charCodeAt(ue);if(pe!==32&&pe!==9)return ue}return-1}function n($,se){return $se?1:0}function r($,se,ue=0,pe=$.length,Se=0,Pe=se.length){for(;ueKe)return 1}const De=pe-ue,ke=Pe-Se;return Deke?1:0}function t($,se){return b($,se,0,$.length,0,se.length)}function b($,se,ue=0,pe=$.length,Se=0,Pe=se.length){for(;ue=128||Ke>=128)return r($.toLowerCase(),se.toLowerCase(),ue,pe,Se,Pe);v(Be)&&(Be-=32),v(Ke)&&(Ke-=32);const oe=Be-Ke;if(oe===0)continue;return oe}const De=pe-ue,ke=Pe-Se;return Deke?1:0}function v($){return $>=97&&$<=122}function m($){return $>=65&&$<=90}function T($,se){return $.length===se.length&&b($,se)===0}function y($,se){const ue=se.length;return se.length>$.length?!1:b($,se,0,ue)===0}function f($,se){let ue,pe=Math.min($.length,se.length);for(ue=0;ue1){const pe=$.charCodeAt(se-2);if(o(pe))return _(pe,ue)}return ue}function A($,se){const ue=Fe.getInstance(),pe=se,Se=$.length,Pe=p($,Se,se);se+=Pe>=65536?2:1;let De=ue.getGraphemeBreakType(Pe);for(;se=65536?2:1,De=Be}return se-pe}function D($,se){const ue=Fe.getInstance(),pe=se,Se=d($,se);se-=Se>=65536?2:1;let Pe=ue.getGraphemeBreakType(Se);for(;se>0;){const De=d($,se),ke=ue.getGraphemeBreakType(De);if(Ye(ke,Pe))break;se-=De>=65536?2:1,Pe=ke}return pe-se}const S=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function L($){return S.test($)}const M=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function O($){return M.test($)}const j=/^[\t\n\r\x20-\x7E]*$/;function G($){return j.test($)}const X=/[\u2028\u2029]/;function ee($){return X.test($)}function he($){for(let se=0,ue=$.length;se=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function de($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Te=String.fromCharCode(65279);function xe($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function ce($,se=!1){return $?(se&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function ae($){const se=90-65+1;return $=$%(2*se),$se[3*pe+1])pe=2*pe+1;else return se[3*pe+2];return 0}}Fe._INSTANCE=null;function We(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function be($,se){if($===0)return 0;const ue=Ee($,se);if(ue!==void 0)return ue;const pe=d(se,$);return $-=Ae(pe),$}function Ee($,se){let ue=d(se,$);for($-=Ae(ue);Ie(ue)||ue===65039||ue===8419;){if($===0)return;ue=d(se,$),$-=Ae(ue)}if(!de(ue))return;if($>=0){const pe=d(se,$);pe===8205&&($-=Ae(pe))}return $}function Ae($){return $>=65536?2:1}function Ie($){return 127995<=$&&$<=127999}},NvD2:function(Me,ne,B){"use strict";B.d(ne,"a",function(){return R});var Q=B("Kwbf");function H(K,N){var e=new Set;return K.forEach(function(C){N.has(C)||e.add(C)}),e}function I(K){var N=K||{},e=N.disabled,C=N.disableCheckbox,E=N.checkable;return!!(e||C)||E===!1}function W(K,N,e,C){for(var E=new Set(K),g=new Set,h=0;h<=e;h+=1){var a=N.get(h)||new Set;a.forEach(function(n){var r=n.key,t=n.node,b=n.children,v=b===void 0?[]:b;E.has(r)&&!C(t)&&v.filter(function(m){return!C(m.node)}).forEach(function(m){E.add(m.key)})})}for(var i=new Set,l=e;l>=0;l-=1){var s=N.get(l)||new Set;s.forEach(function(n){var r=n.parent,t=n.node;if(C(t)||!n.parent||i.has(n.parent.key))return;if(C(n.parent.node)){i.add(r.key);return}var b=!0,v=!1;(r.children||[]).filter(function(m){return!C(m.node)}).forEach(function(m){var T=m.key,y=E.has(T);b&&!y&&(b=!1),!v&&(y||g.has(T))&&(v=!0)}),b&&E.add(r.key),v&&g.add(r.key),i.add(r.key)})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(H(g,E))}}function P(K,N,e,C,E){for(var g=new Set(K),h=new Set(N),a=0;a<=C;a+=1){var i=e.get(a)||new Set;i.forEach(function(r){var t=r.key,b=r.node,v=r.children,m=v===void 0?[]:v;!g.has(t)&&!h.has(t)&&!E(b)&&m.filter(function(T){return!E(T.node)}).forEach(function(T){g.delete(T.key)})})}h=new Set;for(var l=new Set,s=C;s>=0;s-=1){var n=e.get(s)||new Set;n.forEach(function(r){var t=r.parent,b=r.node;if(E(b)||!r.parent||l.has(r.parent.key))return;if(E(r.parent.node)){l.add(t.key);return}var v=!0,m=!1;(t.children||[]).filter(function(T){return!E(T.node)}).forEach(function(T){var y=T.key,f=g.has(y);v&&!f&&(v=!1),!m&&(f||h.has(y))&&(m=!0)}),v||g.delete(t.key),m&&h.add(t.key),l.add(t.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(H(h,g))}}function R(K,N,e,C){var E=[],g;C?g=C:g=I;var h=new Set(K.filter(function(s){var n=!!e[s];return n||E.push(s),n})),a=new Map,i=0;Object.keys(e).forEach(function(s){var n=e[s],r=n.level,t=a.get(r);t||(t=new Set,a.set(r,t)),t.add(n),i=Math.max(i,r)}),Object(Q.a)(!E.length,"Tree missing follow keys: ".concat(E.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var l;return N===!0?l=W(h,a,i,g):l=P(h,N.halfCheckedKeys,a,i,g),l}},OZM5:function(Me,ne,B){"use strict";B.d(ne,"b",function(){return C}),B.d(ne,"a",function(){return E}),B.d(ne,"k",function(){return g}),B.d(ne,"h",function(){return h}),B.d(ne,"i",function(){return a}),B.d(ne,"g",function(){return i}),B.d(ne,"c",function(){return l}),B.d(ne,"d",function(){return s}),B.d(ne,"j",function(){return t}),B.d(ne,"e",function(){return b}),B.d(ne,"f",function(){return v});var Q=B("KQm4"),H=B("U8pU"),I=B("Ff2n"),W=B("q1tI"),P=B.n(W),R=B("Kwbf"),K=B("WaYH"),N=.25,e=2;function C(m,T){var y=m.slice(),f=y.indexOf(T);return f>=0&&y.splice(f,1),y}function E(m,T){var y=m.slice();return y.indexOf(T)===-1&&y.push(T),y}function g(m){return m.split("-")}function h(m,T){return"".concat(m,"-").concat(T)}function a(m){return m&&m.type&&m.type.isTreeNode}function i(m,T){var y=[m],f=T[m];function u(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(c){var _=c.key,p=c.children;y.push(_),u(p)})}return u(f.children),y}function l(m,T){var y=m.clientY,f=T.selectHandle.getBoundingClientRect(),u=f.top,o=f.bottom,c=f.height,_=Math.max(c*N,e);return y<=u+_?-1:y>=o-_?1:0}function s(m,T){if(!m)return;var y=T.multiple;return y?m.slice():m.length?[m[0]]:m}var n=function(T){return T};function r(m,T){if(!m)return[];var y=T||{},f=y.processProps,u=f===void 0?n:f,o=Array.isArray(m)?m:[m];return o.map(function(c){var _=c.children,p=Object(I.a)(c,["children"]),d=r(_,T);return P.a.createElement(K.a,Object.assign({},u(p)),d)})}function t(m){if(!m)return null;var T;if(Array.isArray(m))T={checkedKeys:m,halfCheckedKeys:void 0};else if(Object(H.a)(m)==="object")T={checkedKeys:m.checked||void 0,halfCheckedKeys:m.halfChecked||void 0};else return Object(R.a)(!1,"`checkedKeys` is not an array or an object"),null;return T}function b(m,T){var y=new Set;function f(u){if(y.has(u))return;var o=T[u];if(!o)return;y.add(u);var c=o.parent,_=o.node;if(_.disabled)return;c&&f(c.key)}return(m||[]).forEach(function(u){f(u)}),Object(Q.a)(y)}function v(m){var T={};return Object.keys(m).forEach(function(y){(y.startsWith("data-")||y.startsWith("aria-"))&&(T[y]=m[y])}),T}},"SA+Z":function(Me,ne,B){var Q=B("wTVA"),H=B("EbDI"),I=B("ZhPi"),W=B("wkBT");function P(R){return Q(R)||H(R)||I(R)||W()}Me.exports=P,Me.exports.__esModule=!0,Me.exports.default=Me.exports},SJMd:function(Me,ne){/**
* @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 B,Q,H,I=!1,W,P;window.PR_SHOULD_USE_CONTINUATION=!0;var R,K;(function(){var N=window,e=["break,continue,do,else,for,if,return,while"],C=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],E=[C,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],g=[E,"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"],h=[E,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[E,"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"],i="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",l=[E,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],r=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],b=[g,a,h,l,s,n,r,t],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,m="str",T="kwd",y="com",f="typ",u="lit",o="pun",c="pln",_="tag",p="dec",d="src",A="atn",D="atv",S="nocode",L="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function M(Ee){for(var Ae=0,Ie=!1,$=!1,se=0,ue=Ee.length;se122||(V<65||J>90||_e.push([Math.max(65,J)|32,Math.min(V,90)|32]),V<97||J>122||_e.push([Math.max(97,J)&~32,Math.min(V,122)&~32]))}}_e.sort(function(le,ve){return le[0]-ve[0]||ve[1]-le[1]});for(var Y=[],q=[],ye=0;ye<_e.length;++ye){var te=_e[ye];te[0]<=q[1]+1?q[1]=Math.max(q[1],te[1]):Y.push(q=te)}for(var ye=0;yete[0]&&(te[1]+1>te[0]&&fe.push("-"),fe.push(De(te[1])))}return fe.push("]"),fe.join("")}function Be(oe){for(var me=oe.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")),_e=me.length,we=[],fe=0,ye=0;fe<_e;++fe){var re=me[fe];if(re==="(")++ye;else if(re.charAt(0)==="\\"){var Z=+re.substring(1);Z&&(Z<=ye?we[Z]=-1:me[fe]=De(Z))}}for(var fe=1;fe=2&&J==="["?me[fe]=ke(re):J!=="\\"&&(me[fe]=re.replace(/[a-zA-Z]/g,function(q){var te=q.charCodeAt(0);return"["+String.fromCharCode(te&~32,te|32)+"]"}))}return me.join("")}for(var Ke=[],se=0,ue=Ee.length;se=0;)Ie[Ke.charAt(oe)]=Be;var me=Be[1],_e=""+me;Pe.hasOwnProperty(_e)||(Se.push(me),Pe[_e]=null)}Se.push(/[\0-\uffff]/),$=M(Se)})();var se=Ae.length,ue=function(pe){for(var Se=pe.sourceCode,Pe=pe.basePos,De=pe.sourceNode,ke=[Pe,c],Be=0,Ke=Se.match($)||[],oe={},me=0,_e=Ke.length;me<_e;++me){var we=Ke[me],fe=oe[we],ye=void 0,re;if(typeof fe=="string")re=!1;else{var Z=Ie[we.charAt(0)];if(Z)ye=we.match(Z[1]),fe=Z[0];else{for(var J=0;J=5&&fe.substring(0,5)==="lang-",re&&!(ye&&typeof ye[1]=="string")&&(re=!1,fe=d),re||(oe[we]=fe)}var V=Be;if(Be+=we.length,!re)ke.push(Pe+V,fe);else{var Y=ye[1],q=we.indexOf(Y),te=q+Y.length;ye[2]&&(te=we.length-ye[2].length,q=te-Y.length);var le=fe.substring(5);j(De,Pe+V,we.substring(0,q),ue,ke),j(De,Pe+V+q,Y,ae(le,Y),ke),j(De,Pe+V+te,we.substring(te),ue,ke)}}pe.decorations=ke};return ue}function he(Ee){var Ae=[],Ie=[];Ee.tripleQuotedStrings?Ae.push([m,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ee.multiLineStrings?Ae.push([m,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ae.push([m,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ee.verbatimStrings&&Ie.push([m,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=Ee.hashComments;$&&(Ee.cStyleComments?($>1?Ae.push([y,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ae.push([y,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ie.push([m,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ae.push([y,/^#[^\r\n]*/,null,"#"])),Ee.cStyleComments&&(Ie.push([y,/^\/\/[^\r\n]*/,null]),Ie.push([y,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var se=Ee.regexLiterals;if(se){var ue=se>1?"":`
\r`,pe=ue?".":"[\\S\\s]",Se="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+pe+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+pe+")*(?:\\x5D|$))+/";Ie.push(["lang-regex",RegExp("^"+L+"("+Se+")")])}var Pe=Ee.types;Pe&&Ie.push([f,Pe]);var De=(""+Ee.keywords).replace(/^ | $/g,"");De.length&&Ie.push([T,new RegExp("^(?:"+De.replace(/[\s,]+/g,"|")+")\\b"),null]),Ae.push([c,/^\s+/,null,` \r
\xA0`]);var ke="^.[^\\s\\w.$@'\"`/\\\\]*";return Ee.regexLiterals&&(ke+="(?!s*/)"),Ie.push([u,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[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"],[c,/^\\[\s\S]?/,null],[o,new RegExp(ke),null]),ee(Ae,Ie)}var ge=he({keywords:b,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function de(Ee,Ae,Ie){for(var $=/(?:^|\s)nocode(?:\s|$)/,se=/\r\n?|\n/,ue=Ee.ownerDocument,pe=ue.createElement("li");Ee.firstChild;)pe.appendChild(Ee.firstChild);var Se=[pe];function Pe(me){var _e=me.nodeType;if(_e==1&&!$.test(me.className))if(me.nodeName==="br")De(me),me.parentNode&&me.parentNode.removeChild(me);else for(var we=me.firstChild;we;we=we.nextSibling)Pe(we);else if((_e==3||_e==4)&&Ie){var fe=me.nodeValue,ye=fe.match(se);if(ye){var re=fe.substring(0,ye.index);me.nodeValue=re;var Z=fe.substring(ye.index+ye[0].length);if(Z){var J=me.parentNode;J.insertBefore(ue.createTextNode(Z),me.nextSibling)}De(me),re||me.parentNode.removeChild(me)}}}function De(me){for(;!me.nextSibling;)if(me=me.parentNode,!me)return;function _e(ye,re){var Z=re?ye.cloneNode(!1):ye,J=ye.parentNode;if(J){var V=_e(J,1),Y=ye.nextSibling;V.appendChild(Z);for(var q=Y;q;q=Y)Y=q.nextSibling,V.appendChild(q)}return Z}for(var we=_e(me.nextSibling,0),fe;(fe=we.parentNode)&&fe.nodeType===1;)we=fe;Se.push(we)}for(var ke=0;ke=J&&(Pe+=2),ue>=V&&(Be+=2)}}finally{fe&&(fe.style.display=ye)}}var xe={};function ce(Ee,Ae){for(var Ie=Ae.length;--Ie>=0;){var $=Ae[Ie];xe.hasOwnProperty($)?N.console&&console.warn("cannot override language handler %s",$):xe[$]=Ee}}function ae(Ee,Ae){return Ee&&xe.hasOwnProperty(Ee)||(Ee=/^\s*]*(?:>|$)/],[y,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^