(window.webpackJsonp=window.webpackJsonp||[]).push([[218,5,7],{"+ua5":function(Qe,ue,W){},"/cxE":function(Qe,ue,W){"use strict";W.d(ue,"f",function(){return C}),W.d(ue,"g",function(){return j}),W.d(ue,"h",function(){return L}),W.d(ue,"e",function(){return B}),W.d(ue,"b",function(){return N}),W.d(ue,"c",function(){return e}),W.d(ue,"d",function(){return A}),W.d(ue,"a",function(){return f});class te{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(p){setTimeout(()=>{throw p.stack?new Error(p.message+`
`+p.stack):p},0)}}emit(p){this.listeners.forEach(o=>{o(p)})}onUnexpectedError(p){this.unexpectedErrorHandler(p),this.emit(p)}onUnexpectedExternalError(p){this.unexpectedErrorHandler(p)}}const H=new te;function C(p){B(p)||H.onUnexpectedError(p);return}function j(p){B(p)||H.onUnexpectedExternalError(p);return}function L(p){if(p instanceof Error){let{name:o,message:a}=p;const n=p.stacktrace||p.stack;return{$isError:!0,name:o,message:a,stack:n}}return p}const R="Canceled";function B(p){return p instanceof Error&&p.name===R&&p.message===R}function N(){const p=new Error(R);return p.name=p.message,p}function e(p){return p?new Error(`Illegal argument: ${p}`):new Error("Illegal argument")}function A(p){return p?new Error(`Illegal state: ${p}`):new Error("Illegal state")}class f extends Error{constructor(p){super("NotSupported");p&&(this.message=p)}}},"24hK":function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return H});class te{constructor(C){this.element=C,this.next=te.Undefined,this.prev=te.Undefined}}te.Undefined=new te(void 0);class H{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===te.Undefined}clear(){let C=this._first;for(;C!==te.Undefined;){const j=C.next;C.prev=te.Undefined,C.next=te.Undefined,C=j}this._first=te.Undefined,this._last=te.Undefined,this._size=0}unshift(C){return this._insert(C,!1)}push(C){return this._insert(C,!0)}_insert(C,j){const L=new te(C);if(this._first===te.Undefined)this._first=L,this._last=L;else if(j){const B=this._last;this._last=L,L.prev=B,B.next=L}else{const B=this._first;this._first=L,L.next=B,B.prev=L}this._size+=1;let R=!1;return()=>{R||(R=!0,this._remove(L))}}shift(){if(this._first===te.Undefined)return;{const C=this._first.element;return this._remove(this._first),C}}pop(){if(this._last===te.Undefined)return;{const C=this._last.element;return this._remove(this._last),C}}_remove(C){if(C.prev!==te.Undefined&&C.next!==te.Undefined){const j=C.prev;j.next=C.next,C.next.prev=j}else C.prev===te.Undefined&&C.next===te.Undefined?(this._first=te.Undefined,this._last=te.Undefined):C.next===te.Undefined?(this._last=this._last.prev,this._last.next=te.Undefined):C.prev===te.Undefined&&(this._first=this._first.next,this._first.prev=te.Undefined);this._size-=1}*[Symbol.iterator](){let C=this._first;for(;C!==te.Undefined;)yield C.element,C=C.next}}},"3/fG":function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return H});function te(C,j){let L;return j.length===0?L=C:L=C.replace(/\{(\d+)\}/g,function(R,B){const N=B[0];return typeof j[N]!="undefined"?j[N]:R}),L}function H(C,j,...L){return te(j,L)}},"55Ip":function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return i});var te=W("Ty5D"),H=W("dI71"),C=W("q1tI"),j=W.n(C),L=W("YS25"),R=W("17x9"),B=W.n(R),N=W("wx14"),e=W("zLVn"),A=W("9R94"),f=function(h){Object(H.a)(c,h);function c(){for(var T,b=arguments.length,S=new Array(b),D=0;DV&&(V=O.line_indent_level));var ae={mode:G,parent:O,last_token:O?O.last_token:new o(i.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:V,alignment:0,line_indent_level:O?O.line_indent_level:V,start_line_index:this._output.get_line_number(),ternary_depth:0};return ae},P.prototype._reset=function(O){var G=O.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new p(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var V=new l(O,this._options);return this._tokens=V.tokenize(),O},P.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O,G=this._reset(this._source_text),V=this._options.eol;this._options.eol==="auto"&&(V=`
`,G&&a.lineBreak.test(G||"")&&(V=G.match(a.lineBreak)[0]));for(var ae=this._tokens.next();ae;)this.handle_token(ae),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ae,ae=this._tokens.next();return O=this._output.get_code(V),O},P.prototype.handle_token=function(O,G){O.type===i.START_EXPR?this.handle_start_expr(O):O.type===i.END_EXPR?this.handle_end_expr(O):O.type===i.START_BLOCK?this.handle_start_block(O):O.type===i.END_BLOCK?this.handle_end_block(O):O.type===i.WORD?this.handle_word(O):O.type===i.RESERVED?this.handle_word(O):O.type===i.SEMICOLON?this.handle_semicolon(O):O.type===i.STRING?this.handle_string(O):O.type===i.EQUALS?this.handle_equals(O):O.type===i.OPERATOR?this.handle_operator(O):O.type===i.COMMA?this.handle_comma(O):O.type===i.BLOCK_COMMENT?this.handle_block_comment(O,G):O.type===i.COMMENT?this.handle_comment(O,G):O.type===i.DOT?this.handle_dot(O):O.type===i.EOF?this.handle_eof(O):O.type===i.UNKNOWN?this.handle_unknown(O,G):this.handle_unknown(O,G)},P.prototype.handle_whitespace_and_comments=function(O,G){var V=O.newlines,ae=this._options.keep_array_indentation&&S(this._flags.mode);if(O.comments_before)for(var ie=O.comments_before.next();ie;)this.handle_whitespace_and_comments(ie,G),this.handle_token(ie,G),ie=O.comments_before.next();if(ae)for(var fe=0;fe0,G);else if(this._options.max_preserve_newlines&&V>this._options.max_preserve_newlines&&(V=this._options.max_preserve_newlines),this._options.preserve_newlines&&V>1){this.print_newline(!1,G);for(var ce=1;ce0&&(!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))},P.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)},P.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===d.Statement&&T(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.start_of_object_property=function(){return this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"]))},P.prototype.start_of_statement=function(O){var G=!1;return G=G||E(this._flags.last_token,["var","let","const"])&&O.type===i.WORD,G=G||g(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&E(this._flags.last_token,U)&&!O.newlines,G=G||g(this._flags.last_token,"else")&&!(g(O,"if")&&!O.comments_before),G=G||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),G=G||this._flags.last_token.type===i.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(O.text==="--"||O.text==="++")&&this._last_last_text!=="function"&&O.type!==i.WORD&&O.type!==i.RESERVED,G=G||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"])),G?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(O,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O,E(O,["do","for","if","while"])),!0):!1},P.prototype.handle_start_expr=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O);var G=d.Expression;if(O.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){E(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(O),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=d.ArrayLiteral,S(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,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,G=d.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=d.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===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var V=this._tokens.peek(-3);if(this._options.space_after_named_function&&V){var ae=this._tokens.peek(-4);E(V,["async","function"])||V.text==="*"&&E(ae,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?(V.text==="{"||V.text===","||V.text==="*"&&(ae.text==="{"||ae.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===i.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===d.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===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(O,O.newlines),this.print_token(O),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},P.prototype.handle_end_expr=function(O){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(O,O.text==="]"&&S(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(O),this.restore_mode(),T(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===d.Conditional&&(this._previous_flags.mode=d.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},P.prototype.handle_start_block=function(O){this.handle_whitespace_and_comments(O);var G=this._tokens.peek(),V=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):V&&(t(V.text,[":",","])&&t(G.type,[i.STRING,i.WORD,i.RESERVED])||t(G.text,["get","set","..."])&&t(V.type,[i.WORD,i.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(V.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):t(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||E(this._flags.last_token,["return","throw","import","default"])?this.set_mode(d.ObjectLiteral):this.set_mode(d.BlockStatement),this._flags.last_token&&(E(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ae=!G.comments_before&&G.text==="}",ie=ae&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var fe=0,ce=null;this._flags.inline_frame=!0;do if(fe+=1,ce=this._tokens.peek(fe-1),ce.newlines){this._flags.inline_frame=!1;break}while(ce.type!==i.EOF&&!(ce.type===i.END_BLOCK&&ce.opened===O))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(ie||this._flags.last_token.type===i.EQUALS||E(this._flags.last_token,_)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(S(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(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!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(O),this.indent(),!ae&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},P.prototype.handle_end_block=function(O){for(this.handle_whitespace_and_comments(O);this._flags.mode===d.Statement;)this.restore_mode();var G=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(S(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)},P.prototype.handle_word=function(O){if(O.type===i.RESERVED){if(t(O.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)O.type=i.WORD;else if(O.text==="import"&&t(this._tokens.peek().text,["(","."]))O.type=i.WORD;else if(t(O.text,["as","from"])&&!this._flags.import_block)O.type=i.WORD;else if(this._flags.mode===d.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(O.type=i.WORD)}}if(this.start_of_statement(O)?E(this._flags.last_token,["var","let","const"])&&O.type===i.WORD&&(this._flags.declaration_statement=!0):O.newlines&&!D(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!E(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(g(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&&g(O,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===d.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&E(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===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O)),g(O,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!O.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?E(this._flags.last_token,["get","set","new","export"])||E(this._flags.last_token,U)?this._output.space_before_token=!0:g(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(D(this._flags.mode)||S(this._flags.mode))||this.print_newline(),this.print_token(O),this._flags.last_word=O.text;return}var V="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?V="SPACE":E(O,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines?V="NEWLINE":(V="SPACE",this._output.space_before_token=!0):V="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===d.BlockStatement?V="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&D(this._flags.mode)?V="SPACE":this._flags.last_token.type===i.STRING?V="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&t(this._last_last_text,["{",","]))?V="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?V="SPACE":V="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,V="NEWLINE"),E(O,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?V="SPACE":V="NEWLINE"),E(O,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===d.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 ae=this._output.current_line;ae.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else V==="NEWLINE"?E(this._flags.last_token,_)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&E(O,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!E(O,["var","let","const"]))&&this._flags.last_token.text!==":"&&(g(O,"if")&&g(O.previous,"else")?this._output.space_before_token=!0:this.print_newline()):E(O,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&S(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():V==="SPACE"&&(this._output.space_before_token=!0);O.previous&&(O.previous.type===i.WORD||O.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(O),this._flags.last_word=O.text,O.type===i.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&&g(O,"from")&&(this._flags.import_block=!1))},P.prototype.handle_semicolon=function(O){this.start_of_statement(O)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(O);for(var G=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&g(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(O)},P.prototype.handle_string=function(O){O.text.startsWith("`")&&O.newlines===0&&O.whitespace_before===""&&(O.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(O)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(O),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O):O.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(O.previous.text==="]"||O.previous.text===")")&&O.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(O)},P.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},P.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?(D(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)):this._flags.mode===d.ObjectLiteral||this._flags.mode===d.Statement&&this._flags.parent.mode===d.ObjectLiteral?(this._flags.mode===d.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)},P.prototype.handle_operator=function(O){var G=O.text==="*"&&(E(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),V=t(O.text,["-","+"])&&(t(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||t(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(O)){var ae=!G;this.handle_whitespace_and_comments(O,ae)}if(O.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(O);return}if(O.text==="::"){this.print_token(O);return}if(this._flags.last_token.type===i.OPERATOR&&t(this._options.operator_position,c)&&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!==i.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var ie=!0,fe=!0,ce=!1;if(O.text===":"?this._flags.ternary_depth===0?ie=!1:(this._flags.ternary_depth-=1,ce=!0):O.text==="?"&&(this._flags.ternary_depth+=1),!V&&!G&&this._options.preserve_newlines&&t(O.text,r)){var J=O.text===":",Z=J&&ce,he=J&&!ce;switch(this._options.operator_position){case h.before_newline:this._output.space_before_token=!he,this.print_token(O),(!J||Z)&&this.allow_wrap_or_preserved_newline(O),this._output.space_before_token=!0;return;case h.after_newline:this._output.space_before_token=!0,!J||Z?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 h.preserve_newline:he||this.allow_wrap_or_preserved_newline(O),ie=!(this._output.just_added_newline()||he),this._output.space_before_token=ie,this.print_token(O),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(O),ie=!1;var X=this._tokens.peek();fe=X&&t(X.type,[i.WORD,i.RESERVED])}else if(O.text==="...")this.allow_wrap_or_preserved_newline(O),ie=this._flags.last_token.type===i.START_BLOCK,fe=!1;else if(t(O.text,["--","++","!","~"])||V){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(O),ie=!1,fe=!1,O.newlines&&(O.text==="--"||O.text==="++"||O.text==="~")){var $=E(this._flags.last_token,_)&&O.newlines;$&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline($,!0)}this._flags.last_token.text===";"&&D(this._flags.mode)&&(ie=!0),this._flags.last_token.type===i.RESERVED?ie=!0:this._flags.last_token.type===i.END_EXPR?ie=!(this._flags.last_token.text==="]"&&(O.text==="--"||O.text==="++")):this._flags.last_token.type===i.OPERATOR&&(ie=t(O.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(O.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(fe=!0)),(this._flags.mode===d.BlockStatement&&!this._flags.inline_frame||this._flags.mode===d.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ie,this.print_token(O),this._output.space_before_token=fe},P.prototype.handle_block_comment=function(O,G){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,G),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,G)},P.prototype.print_block_commment=function(O,G){var V=b(O.text),ae,ie=!1,fe=!1,ce=O.whitespace_before,J=ce.length;if(this.print_newline(!1,G),this.print_token_line_indentation(O),this._output.add_token(V[0]),this.print_newline(!1,G),V.length>1){for(V=V.slice(1),ie=I(V,"*"),fe=w(V,ce),ie&&(this._flags.alignment=1),ae=0;ae=0;a--)if(this.__items[a].match(o))return!0;return!1},A.prototype.set_indent=function(o,a){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},A.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(o){this.__items.push(o);var a=o.lastIndexOf(`
`);a!==-1?this.__character_count=o.length-a:this.__character_count+=o.length},A.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function f(o,a){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),a=a||"",o.indent_level>0&&(a=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}f.prototype.get_indent_size=function(o,a){var n=this.__base_string_length;return a=a||0,o<0&&(n=0),n+=o*this.__indent_size,n+=a,n},f.prototype.get_indent_string=function(o,a){var n=this.__base_string;return a=a||0,o<0&&(o=0,n=""),a+=o*this.__indent_size,this.__ensure_cache(a),n+=this.__cache[a],n},f.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var o=this.__cache.length,a=0,n="";this.__indent_size&&o>=this.__indent_size&&(a=Math.floor(o/this.__indent_size),o-=a*this.__indent_size,n=new Array(a+1).join(this.__indent_string)),o&&(n+=new Array(o+1).join(" ")),this.__cache.push(n)};function p(o,a){this.__indent_cache=new f(o,a),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}p.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},p.prototype.get_line_number=function(){return this.__lines.length},p.prototype.get_indent_string=function(o,a){return this.__indent_cache.get_indent_string(o,a)},p.prototype.get_indent_size=function(o,a){return this.__indent_cache.get_indent_size(o,a)},p.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},p.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},p.prototype.get_code=function(o){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 n=this.__lines.join(`
`);return o!==`
`&&(n=n.replace(/[\n]/g,o)),n},p.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},p.prototype.set_indent=function(o,a){return o=o||0,a=a||0,this.next_line.set_indent(o,a),this.__lines.length>1?(this.current_line.set_indent(o,a),!0):(this.current_line.set_indent(),!1)},p.prototype.add_raw_token=function(o){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},p.prototype.just_added_newline=function(){return this.current_line.is_empty()},p.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},p.prototype.ensure_empty_line_above=function(o,a){for(var n=this.__lines.length-2;n>=0;){var l=this.__lines[n];if(l.is_empty())break;if(l.item(0).indexOf(o)!==0&&l.item(-1)!==a){this.__lines.splice(n+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},e.exports.Output=p},function(e){function A(f,p,o,a){this.type=f,this.text=p,this.comments_before=null,this.newlines=o||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=A},function(e,A){var f="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\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",n="(?:\\\\u[0-9a-fA-F]{4}|["+f+o+"])",l="(?:\\\\u[0-9a-fA-F]{4}|["+p+o+a+"])*";A.identifier=new RegExp(n+l,"g"),A.identifierStart=new RegExp(n),A.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+p+o+a+"])+");var s=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;A.newline=/[\n\r\u2028\u2029]/,A.lineBreak=new RegExp(`\r
|`+A.newline.source),A.allLineBreaks=new RegExp(A.lineBreak.source,"g")},function(e,A,f){var p=f(6).Options,o=["before-newline","after-newline","preserve-newline"];function a(n){p.call(this,n,"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 r=0;r>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),u=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";u=u.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),u="\\?\\.(?!\\d) "+u,u=u.replace(/ /g,"|");var h=new RegExp(u),c="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=c.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),T=new RegExp("^(?:"+d.join("|")+")$"),b,S=function(I,w){o.call(this,I,w),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var P=new s(this._input),U=new r(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(l.identifier).matching(l.identifierMatch),number:P.matching(m),punct:P.matching(h),comment:P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:P.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:P.matching(//),include:P.starting_with(/#include/).until_after(l.lineBreak),shebang:P.starting_with(/#!/).until_after(l.lineBreak),xml:P.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:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};S.prototype=new o,S.prototype._is_comment=function(I){return I.type===t.COMMENT||I.type===t.BLOCK_COMMENT||I.type===t.UNKNOWN},S.prototype._is_opening=function(I){return I.type===t.START_BLOCK||I.type===t.START_EXPR},S.prototype._is_closing=function(I,w){return(I.type===t.END_BLOCK||I.type===t.END_EXPR)&&w&&(I.text==="]"&&w.text==="["||I.text===")"&&w.text==="("||I.text==="}"&&w.text==="{")},S.prototype._reset=function(){b=!1},S.prototype._get_next_token=function(I,w){var P=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(t.EOF,""):(P=P||this._read_non_javascript(U),P=P||this._read_string(U),P=P||this._read_word(I),P=P||this._read_singles(U),P=P||this._read_comment(U),P=P||this._read_regexp(U,I),P=P||this._read_xml(U,I),P=P||this._read_punctuation(),P=P||this._create_token(t.UNKNOWN,this._input.next()),P)},S.prototype._read_word=function(I){var w;if(w=this.__patterns.identifier.read(),w!=="")return w=w.replace(l.allLineBreaks,`
`),!(I.type===t.DOT||I.type===t.RESERVED&&(I.text==="set"||I.text==="get"))&&T.test(w)?(w==="in"||w==="of")&&(I.type===t.WORD||I.type===t.STRING)?this._create_token(t.OPERATOR,w):this._create_token(t.RESERVED,w):this._create_token(t.WORD,w);if(w=this.__patterns.number.read(),w!=="")return this._create_token(t.WORD,w)},S.prototype._read_singles=function(I){var w=null;return I==="("||I==="["?w=this._create_token(t.START_EXPR,I):I===")"||I==="]"?w=this._create_token(t.END_EXPR,I):I==="{"?w=this._create_token(t.START_BLOCK,I):I==="}"?w=this._create_token(t.END_BLOCK,I):I===";"?w=this._create_token(t.SEMICOLON,I):I==="."&&E.test(this._input.peek(1))?w=this._create_token(t.DOT,I):I===","&&(w=this._create_token(t.COMMA,I)),w&&this._input.next(),w},S.prototype._read_punctuation=function(){var I=this.__patterns.punct.read();if(I!=="")return I==="="?this._create_token(t.EQUALS,I):I==="?."?this._create_token(t.DOT,I):this._create_token(t.OPERATOR,I)},S.prototype._read_non_javascript=function(I){var w="";if(I==="#"){if(this._is_first_token()&&(w=this.__patterns.shebang.read(),w))return this._create_token(t.UNKNOWN,w.trim()+`
`);if(w=this.__patterns.include.read(),w)return this._create_token(t.UNKNOWN,w.trim()+`
`);I=this._input.next();var P="#";if(this._input.hasNext()&&this._input.testChar(g)){do I=this._input.next(),P+=I;while(this._input.hasNext()&&I!=="#"&&I!=="=");return I==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(P+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(P+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,P)}this._input.back()}else if(I==="<"&&this._is_first_token()){if(w=this.__patterns.html_comment_start.read(),w){for(;this._input.hasNext()&&!this._input.testChar(l.newline);)w+=this._input.next();return b=!0,this._create_token(t.COMMENT,w)}}else if(b&&I==="-"&&(w=this.__patterns.html_comment_end.read(),w))return b=!1,this._create_token(t.COMMENT,w);return null},S.prototype._read_comment=function(I){var w=null;if(I==="/"){var P="";if(this._input.peek(1)==="*"){P=this.__patterns.block_comment.read();var U=y.get_directives(P);U&&U.ignore==="start"&&(P+=y.readIgnored(this._input)),P=P.replace(l.allLineBreaks,`
`),w=this._create_token(t.BLOCK_COMMENT,P),w.directives=U}else this._input.peek(1)==="/"&&(P=this.__patterns.comment.read(),w=this._create_token(t.COMMENT,P))}return w},S.prototype._read_string=function(I){if(I==="`"||I==="'"||I==='"'){var w=this._input.next();return this.has_char_escapes=!1,I==="`"?w+=this._read_string_recursive("`",!0,"${"):w+=this._read_string_recursive(I),this.has_char_escapes&&this._options.unescape_strings&&(w=D(w)),this._input.peek()===I&&(w+=this._input.next()),w=w.replace(l.allLineBreaks,`
`),this._create_token(t.STRING,w)}return null},S.prototype._allow_regexp_or_xml=function(I){return I.type===t.RESERVED&&i(I.text,["return","case","throw","else","do","typeof","yield"])||I.type===t.END_EXPR&&I.text===")"&&I.opened.previous.type===t.RESERVED&&i(I.opened.previous.text,["if","while","for"])||i(I.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},S.prototype._read_regexp=function(I,w){if(I==="/"&&this._allow_regexp_or_xml(w)){for(var P=this._input.next(),U=!1,O=!1;this._input.hasNext()&&(U||O||this._input.peek()!==I)&&!this._input.testChar(l.newline);)P+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?O=!0:this._input.peek()==="]"&&(O=!1)),this._input.next();return this._input.peek()===I&&(P+=this._input.next(),P+=this._input.read(l.identifier)),this._create_token(t.STRING,P)}return null},S.prototype._read_xml=function(I,w){if(this._options.e4x&&I==="<"&&this._allow_regexp_or_xml(w)){var P="",U=this.__patterns.xml.read_match();if(U){for(var O=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=O.indexOf("{")===0,V=0;U;){var ae=!!U[1],ie=U[2],fe=!!U[U.length-1]||ie.slice(0,8)==="![CDATA[";if(!fe&&(ie===O||G&&ie.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ae?--V:++V),P+=U[0],V<=0)break;U=this.__patterns.xml.read_match()}return U||(P+=this._input.match(/[\s\S]*/g)[0]),P=P.replace(l.allLineBreaks,`
`),this._create_token(t.STRING,P)}}return null};function D(I){for(var w="",P=0,U=new p(I),O=null;U.hasNext();)if(O=U.match(/([\s]|[^\\]|\\\\)+/g),O&&(w+=O[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")O=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")O=U.match(/u([0-9A-Fa-f]{4})/g);else{w+="\\",U.hasNext()&&(w+=U.next());continue}if(!O)return I;if(P=parseInt(O[1],16),P>126&&P<=255&&O[0].indexOf("x")===0)return I;if(P>=0&&P<32){w+="\\"+O[0];continue}else P===34||P===39||P===92?w+="\\"+String.fromCharCode(P):w+=String.fromCharCode(P)}return w}S.prototype._read_string_recursive=function(I,w,P){var U,O;I==="'"?O=this.__patterns.single_quote:I==='"'?O=this.__patterns.double_quote:I==="`"?O=this.__patterns.template_text:I==="}"&&(O=this.__patterns.template_expression);for(var G=O.read(),V="";this._input.hasNext();){if(V=this._input.next(),V===I||!w&&l.newline.test(V)){this._input.back();break}else V==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
`&&this._input.next(),V+=this._input.next()):P&&(P==="${"&&V==="$"&&this._input.peek()==="{"&&(V+=this._input.next()),P===V&&(I==="`"?V+=this._read_string_recursive("}",w,"`"):V+=this._read_string_recursive("`",w,"${"),this._input.hasNext()&&(V+=this._input.next())));V+=O.read(),G+=V}return G},e.exports.Tokenizer=S,e.exports.TOKEN=t,e.exports.positionable_operators=_.slice(),e.exports.line_starters=c.slice()},function(e){var A=RegExp.prototype.hasOwnProperty("sticky");function f(p){this.__input=p||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position=0&&p=0&&o=p.length&&this.__input.substring(o-p.length,o).toLowerCase()===p},e.exports.InputScanner=f},function(e,A,f){var p=f(8).InputScanner,o=f(3).Token,a=f(10).TokenStream,n=f(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(r,i){this._input=new p(r),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var r,i=new o(l.START,""),t=null,y=[],m=new a;i.type!==l.EOF;){for(r=this._get_next_token(i,t);this._is_comment(r);)m.add(r),r=this._get_next_token(i,t);m.isEmpty()||(r.comments_before=m,m=new a),r.parent=t,this._is_opening(r)?(y.push(t),t=r):t&&this._is_closing(r,t)&&(r.opened=t,t.closed=r,t=y.pop(),r.parent=t),r.previous=i,i.next=r,this.__tokens.add(r),i=r}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(r,i){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(r){return!1},s.prototype._is_opening=function(r){return!1},s.prototype._is_closing=function(r,i){return!1},s.prototype._create_token=function(r,i){var t=new o(r,i,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 A(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position=0&&f/),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 p,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(n){var l=this._create();return l._disabled[n]=!0,l._update(),l},a.prototype.read_options=function(n){var l=this._create();for(var s in o)l._disabled[s]=n.templating.indexOf(s)===-1;return l._update(),l},a.prototype.exclude=function(n){var l=this._create();return l._excluded[n]=!0,l._update(),l},a.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),n+=l,l=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},a.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},a.prototype._read_template=function(){var n="",l=this._input.peek();if(l==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(n=n||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},e.exports.TemplatablePattern=a}],R={};function B(e){var A=R[e];if(A!==void 0)return A.exports;var f=R[e]={exports:{}};return L[e](f,f.exports,B),f.exports}var N=B(0);C=N})();var j=C;!(te=[],H=function(){return{js_beautify:j}}.apply(ue,te),H!==void 0&&(Qe.exports=H))})()},"746U":function(Qe,ue,W){"use strict";W.d(ue,"f",function(){return te}),W.d(ue,"l",function(){return H}),W.d(ue,"k",function(){return C}),W.d(ue,"j",function(){return j}),W.d(ue,"g",function(){return L}),W.d(ue,"m",function(){return R}),W.d(ue,"h",function(){return B}),W.d(ue,"n",function(){return N}),W.d(ue,"c",function(){return e}),W.d(ue,"a",function(){return A}),W.d(ue,"i",function(){return f}),W.d(ue,"o",function(){return p}),W.d(ue,"e",function(){return n}),W.d(ue,"d",function(){return l}),W.d(ue,"p",function(){return s}),W.d(ue,"b",function(){return r});function te(i){return Array.isArray(i)}function H(i){return typeof i=="string"}function C(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function j(i){return typeof i=="number"&&!isNaN(i)}function L(i){return i===!0||i===!1}function R(i){return typeof i=="undefined"}function B(i){return!N(i)}function N(i){return R(i)||i===null}function e(i,t){if(!i)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function A(i){if(N(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function f(i){return typeof i=="function"}function p(i,t){const y=Math.min(i.length,t.length);for(let m=0;mfunction(){const E=Array.prototype.slice.call(arguments,0);return t(g,E)};let m={};for(const g of i)m[g]=y(g);return m}function s(i){return i===null?void 0:i}function r(i,t="Unreachable"){throw new Error(t)}},"815F":function(Qe,ue,W){"use strict";W.d(ue,"e",function(){return B}),W.d(ue,"c",function(){return e}),W.d(ue,"d",function(){return A}),W.d(ue,"a",function(){return p}),W.d(ue,"f",function(){return o}),W.d(ue,"b",function(){return a});var te=W("KQm4"),H=W("VTBJ"),C=W("Ff2n"),j=W("Zm9Q"),L=W("Kwbf"),R=W("OZM5");function B(n,l){return n!=null?n:l}function N(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=new Map;function s(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(r||[]).forEach(function(t){var y=t.key,m=t.children;Object(L.a)(y!=null,"Tree node must have a certain key: [".concat(i).concat(y,"]"));var g=String(y);Object(L.a)(!l.has(g)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(g)),l.set(g,!0),s(m,"".concat(i).concat(g," > "))})}s(n)}function e(n){function l(s){var r=Object(j.a)(s);return r.map(function(i){if(!Object(R.i)(i))return Object(L.a)(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var t=i.key,y=i.props,m=y.children,g=Object(C.a)(y,["children"]),E=Object(H.a)({key:t},g),_=l(m);return _.length&&(E.children=_),E}).filter(function(i){return i})}return l(n)}function A(){var n=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),r=[];function i(t){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(m,g){var E=Object(R.h)(y?y.pos:"0",g),_=B(m.key,E),u=Object(H.a)(Object(H.a)({},m),{},{parent:y,pos:E,children:null,data:m,isStart:[].concat(Object(te.a)(y?y.isStart:[]),[g===0]),isEnd:[].concat(Object(te.a)(y?y.isEnd:[]),[g===t.length-1])});return r.push(u),l===!0||s.has(_)?u.children=i(m.children||[],u):u.children=[],u})}return i(n),r}function f(n,l,s){var r;s?typeof s=="string"?r=function(y){return y[s]}:typeof s=="function"&&(r=function(y){return s(y)}):r=function(y,m){return B(y.key,m)};function i(t,y,m){var g=t?t.children:n,E=t?Object(R.h)(m.pos,y):"0";if(t){var _=r(t,E),u={node:t,index:y,pos:E,key:_,parentPos:m.node?m.pos:null,level:m.level+1};l(u)}g&&g.forEach(function(h,c){i(h,c,{node:t,pos:E,level:m?m.level+1:-1})})}i(null)}function p(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=l.initWrapper,r=l.processEntity,i=l.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,y={},m={},g={posEntities:y,keyEntities:m};return s&&(g=s(g)||g),f(n,function(E){var _=E.node,u=E.index,h=E.pos,c=E.key,d=E.parentPos,T=E.level,b={node:_,index:u,key:c,pos:h,level:T},S=B(c,h);y[h]=b,m[S]=b,b.parent=y[d],b.parent&&(b.parent.children=b.parent.children||[],b.parent.children.push(b)),r&&r(b,g)},t),i&&i(g),g}function o(n,l){var s=l.expandedKeys,r=l.selectedKeys,i=l.loadedKeys,t=l.loadingKeys,y=l.checkedKeys,m=l.halfCheckedKeys,g=l.dragOverNodeKey,E=l.dropPosition,_=l.keyEntities,u=_[n],h={eventKey:n,expanded:s.indexOf(n)!==-1,selected:r.indexOf(n)!==-1,loaded:i.indexOf(n)!==-1,loading:t.indexOf(n)!==-1,checked:y.indexOf(n)!==-1,halfChecked:m.indexOf(n)!==-1,pos:String(u?u.pos:""),dragOver:g===n&&E===0,dragOverGapTop:g===n&&E===-1,dragOverGapBottom:g===n&&E===1};return h}function a(n){var l=n.data,s=n.expanded,r=n.selected,i=n.checked,t=n.loaded,y=n.loading,m=n.halfChecked,g=n.dragOver,E=n.dragOverGapTop,_=n.dragOverGapBottom,u=n.pos,h=n.active,c=Object(H.a)(Object(H.a)({},l),{},{expanded:s,selected:r,checked:i,loaded:t,loading:y,halfChecked:m,dragOver:g,dragOverGapTop:E,dragOverGapBottom:_,pos:u,active:h});return"props"in c||Object.defineProperty(c,"props",{get:function(){return Object(L.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),n}}),c}},"8HAY":function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return L}),W.d(ue,"b",function(){return R}),W.d(ue,"d",function(){return B}),W.d(ue,"e",function(){return N}),W.d(ue,"c",function(){return e});var te=W("MI8n"),H=W("pmY6"),C=W("3/fG"),j=function(A,f,p,o){function a(n){return n instanceof p?n:new p(function(l){l(n)})}return new(p||(p=Promise))(function(n,l){function s(t){try{i(o.next(t))}catch(y){l(y)}}function r(t){try{i(o.throw(t))}catch(y){l(y)}}function i(t){t.done?n(t.value):a(t.value).then(s,r)}i((o=o.apply(A,f||[])).next())})};class L extends H.a{constructor(A,f="",p="",o=!0,a){super();this._onDidChange=this._register(new te.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=A,this._label=f,this._cssClass=p,this._enabled=o,this._actionCallback=a}get id(){return this._id}get label(){return this._label}set label(A){this._setLabel(A)}_setLabel(A){this._label!==A&&(this._label=A,this._onDidChange.fire({label:A}))}get tooltip(){return this._tooltip||""}set tooltip(A){this._setTooltip(A)}_setTooltip(A){this._tooltip!==A&&(this._tooltip=A,this._onDidChange.fire({tooltip:A}))}get class(){return this._cssClass}set class(A){this._setClass(A)}_setClass(A){this._cssClass!==A&&(this._cssClass=A,this._onDidChange.fire({class:A}))}get enabled(){return this._enabled}set enabled(A){this._setEnabled(A)}_setEnabled(A){this._enabled!==A&&(this._enabled=A,this._onDidChange.fire({enabled:A}))}get checked(){return this._checked}set checked(A){this._setChecked(A)}_setChecked(A){this._checked!==A&&(this._checked=A,this._onDidChange.fire({checked:A}))}run(A,f){return j(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(A))})}}class R extends H.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new te.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new te.b),this.onDidRun=this._onDidRun.event}run(A,f){return j(this,void 0,void 0,function*(){if(!A.enabled)return;this._onBeforeRun.fire({action:A});let p;try{yield this.runAction(A,f)}catch(o){p=o}this._onDidRun.fire({action:A,error:p})})}runAction(A,f){return j(this,void 0,void 0,function*(){yield A.run(f)})}}class B extends L{constructor(A){super(B.ID,A,A?"separator text":"separator");this.checked=!1,this.enabled=!1}}B.ID="vs.actions.separator";class N{constructor(A,f,p,o){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=A,this.label=f,this.class=o,this._actions=p}get actions(){return this._actions}dispose(){}run(){return j(this,void 0,void 0,function*(){})}}class e extends L{constructor(){super(e.ID,C.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8Jsi":function(Qe,ue,W){"use strict";W.d(ue,"d",function(){return d}),W.d(ue,"a",function(){return Re}),W.d(ue,"b",function(){return Ne}),W.d(ue,"c",function(){return Ie});var te=W("1OyB"),H=W("vuIU"),C=W("Ji7U"),j=W("LK+K"),L=W("KQm4"),R=W("U8pU"),B=W("ODXe"),N=W("VTBJ"),e=W("q1tI"),A=W("qNPg"),f=W("2Qr1"),p=W("815F"),o=W("NvD2"),a=W("wPlo"),n=W("6cGi"),l=W("Kwbf"),s=W("4IlW"),r=W("YrtM"),i=W("fAei"),t=e.createContext(null);function y(oe,me){if(!oe)return!0;var be=oe.data,xe=be.disabled,Ce=be.disableCheckbox;switch(me){case"select":return xe;case"checkbox":return xe||Ce}return!1}function m(oe,me){var be=e.useCallback(function(Ce){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",Se=arguments.length>2?arguments[2]:void 0,Ue=oe.get(Ce);return!Se&&y(Ue,Oe)?null:Ue},[oe]),xe=e.useCallback(function(Ce){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"select",Se=arguments.length>2?arguments[2]:void 0,Ue=me.get(Ce);return!Se&&y(Ue,Oe)?null:Ue},[me]);return[be,xe]}function g(oe){return e.useMemo(function(){var me=new Map,be=new Map;return oe.forEach(function(xe){me.set(xe.key,xe),be.set(xe.data.value,xe)}),[me,be]},[oe])}var E={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},_=function(me,be){var xe=me.prefixCls,Ce=me.height,Oe=me.itemHeight,Se=me.virtual,Ue=me.options,Be=me.flattenOptions,Te=me.multiple,De=me.searchValue,de=me.onSelect,re=me.onToggleOpen,le=me.open,z=me.notFoundContent,Q=me.onMouseEnter,q=e.useContext(t),ee=q.checkable,ve=q.checkedKeys,we=q.halfCheckedKeys,Fe=q.treeExpandedKeys,Ge=q.treeDefaultExpandAll,Je=q.treeDefaultExpandedKeys,ze=q.onTreeExpand,qe=q.treeIcon,nt=q.showTreeIcon,$e=q.switcherIcon,gt=q.treeLine,ht=q.treeNodeFilterProp,bt=q.loadData,pt=q.treeLoadedKeys,it=q.treeMotion,_t=q.onTreeLoad,Tt=e.useRef(),Ve=Object(r.a)(function(){return Ue},[le,Ue],function(He,Pe){return Pe[0]&&He[1]!==Pe[1]}),At=g(Be),We=Object(B.a)(At,2),Ye=We[0],rt=We[1],dt=m(Ye,rt),vt=Object(B.a)(dt,2),ut=vt[0],tt=vt[1],Ze=e.useMemo(function(){return ve.map(function(He){var Pe=tt(He);return Pe?Pe.key:null})},[ve]),et=e.useMemo(function(){return ee?{checked:Ze,halfChecked:we}:null},[Ze,we,ee]);e.useEffect(function(){if(le&&!Te&&Ze.length){var He;(He=Tt.current)===null||He===void 0||He.scrollTo({key:Ze[0]})}},[le]);var st=String(De).toLowerCase(),ot=function(Pe){return st?String(Pe[ht]).toLowerCase().includes(st):!1},lt=e.useState(Je),ct=Object(B.a)(lt,2),Ct=ct[0],Mt=ct[1],Nt=e.useState(null),Wt=Object(B.a)(Nt,2),jt=Wt[0],Vt=Wt[1],Kt=e.useMemo(function(){return Fe?Object(L.a)(Fe):De?jt:Ct},[Ct,jt,st,Fe]);e.useEffect(function(){De&&Vt(Be.map(function(He){return He.key}))},[De]);var F=function(Pe){Mt(Pe),Vt(Pe),ze&&ze(Pe)},v=function(Pe){Pe.preventDefault()},x=function(Pe,Xe){var Ke=Xe.node.key,at=ut(Ke,ee?"checkbox":"select");at!==null&&de(at.data.value,{selected:!ve.includes(at.data.value)}),Te||re(!1)},k=e.useState(null),K=Object(B.a)(k,2),M=K[0],ne=K[1],Me=ut(M);if(e.useImperativeHandle(be,function(){return{onKeyDown:function(Pe){var Xe,Ke=Pe.which;switch(Ke){case s.a.UP:case s.a.DOWN:case s.a.LEFT:case s.a.RIGHT:(Xe=Tt.current)===null||Xe===void 0||Xe.onKeyDown(Pe);break;case s.a.ENTER:{Me!==null&&x(null,{node:{key:M},selected:!ve.includes(Me.data.value)});break}case s.a.ESC:re(!1)}},onKeyUp:function(){}}}),Ve.length===0)return e.createElement("div",{role:"listbox",className:"".concat(xe,"-empty"),onMouseDown:v},z);var je={};return pt&&(je.loadedKeys=pt),Kt&&(je.expandedKeys=Kt),e.createElement("div",{onMouseDown:v,onMouseEnter:Q},Me&&le&&e.createElement("span",{style:E,"aria-live":"assertive"},Me.data.value),e.createElement(i.b,Object.assign({ref:Tt,focusable:!1,prefixCls:"".concat(xe,"-tree"),treeData:Ve,height:Ce,itemHeight:Oe,virtual:Se,multiple:Te,icon:qe,showIcon:nt,switcherIcon:$e,showLine:gt,loadData:De?null:bt,motion:it,checkable:ee,checkStrictly:!0,checkedKeys:et,selectedKeys:ee?[]:Ze,defaultExpandAll:Ge},je,{onActiveChange:ne,onSelect:x,onCheck:x,onExpand:F,onLoad:_t,filterTreeNode:ot})))},u=e.forwardRef(_);u.displayName="OptionList";var h=u,c=function(){return null},d=c,T=W("Ff2n"),b=W("Zm9Q");function S(oe){return Object(b.a)(oe).map(function(me){if(!e.isValidElement(me)||!me.type)return null;var be=me.key,xe=me.props,Ce=xe.children,Oe=xe.value,Se=Object(T.a)(xe,["children","value"]),Ue=Object(N.a)({key:be,value:Oe},Se),Be=S(Ce);return Be.length&&(Ue.children=Be),Ue}).filter(function(me){return me})}function D(oe){if(!oe)return oe;var me=Object(N.a)({},oe);return"props"in me||Object.defineProperty(me,"props",{get:function(){return Object(l.a)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),me}}),me}function I(oe,me,be,xe,Ce){var Oe=null,Se=null;function Ue(){function Be(Te){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Te.map(function(re,le){var z="".concat(De,"-").concat(le),Q=be.includes(re.value),q=Be(re.children||[],z,Q),ee=e.createElement(d,Object.assign({},re),q.map(function(we){return we.node}));if(me===re.value&&(Oe=ee),Q){var ve={pos:z,node:ee,children:q};return de||Se.push(ve),ve}return null}).filter(function(re){return re})}Se||(Se=[],Be(xe),Se.sort(function(Te,De){var de=Te.node.props.value,re=De.node.props.value,le=be.indexOf(de),z=be.indexOf(re);return le-z}))}Object.defineProperty(oe,"triggerNode",{get:function(){return Object(l.a)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),Ue(),Oe}}),Object.defineProperty(oe,"allCheckedNodes",{get:function(){return Object(l.a)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),Ue(),Ce?Se:Se.map(function(Te){var De=Te.node;return De})}})}function w(oe){return Array.isArray(oe)?oe:oe!==void 0?[oe]:[]}function P(oe,me){var be=new Map;return me.forEach(function(xe){var Ce=xe.data;be.set(Ce.value,Ce)}),oe.map(function(xe){return D(be.get(xe))})}function U(oe,me){var be=P([oe],me)[0];return be?be.disabled:!1}function O(oe){return oe.disabled||oe.disableCheckbox||oe.checkable===!1}function G(oe){for(var me=oe.parent,be=0,xe=me;xe;)xe=xe.parent,be+=1;return be}function V(oe){function me(xe){return(xe||[]).map(function(Ce){var Oe=Ce.value,Se=Ce.key,Ue=Ce.children,Be=Object(N.a)(Object(N.a)({},Ce),{},{key:"key"in Ce?Se:Oe});return Ue&&(Be.children=me(Ue)),Be})}var be=Object(p.d)(me(oe),!0);return be.map(function(xe){return{key:xe.data.key,data:xe.data,level:G(xe)}})}function ae(oe){return function(me,be){var xe=be[oe];return String(xe).toLowerCase().includes(String(me).toLowerCase())}}function ie(oe,me,be){var xe=be.optionFilterProp,Ce=be.filterOption;if(Ce===!1)return me;var Oe;typeof Ce=="function"?Oe=Ce:Oe=ae(xe);function Se(Ue){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ue.map(function(Te){var De=Te.children,de=Be||Oe(oe,D(Te)),re=Se(De||[],de);return de||re.length?Object(N.a)(Object(N.a)({},Te),{},{children:re}):null}).filter(function(Te){return Te})}return Se(me)}function fe(oe,me,be,xe){var Ce=new Map;return w(me).forEach(function(Oe){Oe&&Object(R.a)(Oe)==="object"&&"value"in Oe&&Ce.set(Oe.value,Oe)}),oe.map(function(Oe){var Se={value:Oe},Ue=be(Oe,"select",!0),Be=Ue?xe(Ue.data):Oe;if(Ce.has(Oe)){var Te=Ce.get(Oe);Se.label="label"in Te?Te.label:Be,"halfChecked"in Te&&(Se.halfChecked=Te.halfChecked)}else Se.label=Be;return Se})}function ce(oe,me){var be=new Set(oe);return be.add(me),Array.from(be)}function J(oe,me){var be=new Set(oe);return be.delete(me),Array.from(be)}function Z(oe){var me=oe.searchPlaceholder,be=oe.treeCheckStrictly,xe=oe.treeCheckable,Ce=oe.labelInValue,Oe=oe.value,Se=oe.multiple;Object(l.a)(!me,"`searchPlaceholder` has been removed."),be&&Ce===!1&&Object(l.a)(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(Ce||be)&&Object(l.a)(w(Oe).every(function(Ue){return Ue&&Object(R.a)(Ue)==="object"&&"value"in Ue}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),be||Se||xe?Object(l.a)(!Oe||Array.isArray(Oe),"`value` should be an array when `TreeSelect` is checkable or multiple."):Object(l.a)(!Array.isArray(Oe),"`value` should not be array when `TreeSelect` is single mode.")}var he=Z,X=10;function $(oe,me){var be=me.id,xe=me.pId,Ce=me.rootPId,Oe={},Se=[],Ue=oe.map(function(Be){var Te=Object(N.a)({},Be),De=Te[be];return Oe[De]=Te,Te.key=Te.key||De,Te});return Ue.forEach(function(Be){var Te=Be[xe],De=Oe[Te];De&&(De.children=De.children||[],De.children.push(Be)),(Te===Ce||!De&&Ce===null)&&Se.push(Be)}),Se}function ye(oe,me){var be=0,xe=new Set;function Ce(Oe){return(Oe||[]).map(function(Se){var Ue=Se.key,Be=Se.value,Te=Se.children,De=Object(T.a)(Se,["key","value","children"]),de="value"in Se?Be:Ue,re=Object(N.a)(Object(N.a)({},De),{},{key:Ue!=null?Ue:de,value:de,title:me(Se)});return"children"in Se&&(re.children=Ce(Te)),re})}return Ce(oe)}function Le(oe,me,be){var xe=be.getLabelProp,Ce=be.simpleMode,Oe=e.useRef({});return oe?(Oe.current.formatTreeData=Oe.current.treeData===oe?Oe.current.formatTreeData:ye(Ce?$(oe,Object(N.a)({id:"id",pId:"pId",rootPId:null},Ce!==!0?Ce:{})):oe,xe),Oe.current.treeData=oe):Oe.current.formatTreeData=Oe.current.children===me?Oe.current.formatTreeData:ye(S(me),xe),Oe.current.formatTreeData}var Re="SHOW_ALL",Ie="SHOW_PARENT",Ne="SHOW_CHILD";function _e(oe,me,be){var xe=new Set(oe);return me===Ne?oe.filter(function(Ce){var Oe=be[Ce];return!(Oe&&Oe.children&&Oe.children.every(function(Se){var Ue=Se.node;return O(Ue)||xe.has(Ue.key)}))}):me===Ie?oe.filter(function(Ce){var Oe=be[Ce],Se=Oe?Oe.parent:null;return!(Se&&!O(Se.node)&&xe.has(Se.node.key))}):oe}function Ee(oe,me){var be=me.value,xe=me.getEntityByValue,Ce=me.getEntityByKey,Oe=me.treeConduction,Se=me.showCheckedStrategy,Ue=me.conductKeyEntities,Be=me.getLabelProp;return e.useMemo(function(){var Te=oe;if(Oe){var De=_e(oe.map(function(de){var re=xe(de);return re?re.key:de}),Se,Ue);Te=De.map(function(de){var re=Ce(de);return re?re.data.value:de})}return fe(Te,be,xe,Be)},[oe,be,Oe,Se,xe])}var Ae=["expandedKeys","treeData","treeCheckable","showCheckedStrategy","searchPlaceholder","treeLine","treeIcon","showTreeIcon","switcherIcon","treeNodeFilterProp","filterTreeNode","dropdownPopupAlign","treeDefaultExpandAll","treeCheckStrictly","treeExpandedKeys","treeLoadedKeys","treeMotion","onTreeExpand","onTreeLoad","loadData","treeDataSimpleMode","treeNodeLabelProp","treeDefaultExpandedKeys"],Y=Object(A.a)({prefixCls:"rc-tree-select",components:{optionList:h},convertChildrenToData:function(){return null},flattenOptions:V,getLabeledValue:f.e,filterOptions:ie,isValueDisabled:U,findValueOption:P,omitDOMProps:function(me){var be=Object(N.a)({},me);return Ae.forEach(function(xe){delete be[xe]}),be}});Y.displayName="Select";var se=e.forwardRef(function(oe,me){var be=oe.multiple,xe=oe.treeCheckable,Ce=oe.treeCheckStrictly,Oe=oe.showCheckedStrategy,Se=Oe===void 0?"SHOW_CHILD":Oe,Ue=oe.labelInValue,Be=oe.loadData,Te=oe.treeLoadedKeys,De=oe.treeNodeFilterProp,de=De===void 0?"value":De,re=oe.treeNodeLabelProp,le=oe.treeDataSimpleMode,z=oe.treeData,Q=oe.treeExpandedKeys,q=oe.treeDefaultExpandedKeys,ee=oe.treeDefaultExpandAll,ve=oe.children,we=oe.treeIcon,Fe=oe.showTreeIcon,Ge=oe.switcherIcon,Je=oe.treeLine,ze=oe.treeMotion,qe=oe.filterTreeNode,nt=oe.dropdownPopupAlign,$e=oe.onChange,gt=oe.onTreeExpand,ht=oe.onTreeLoad,bt=oe.onDropdownVisibleChange,pt=oe.onSelect,it=oe.onDeselect,_t=xe||Ce,Tt=be||_t,Ve=xe&&!Ce,At=Ce||Ue,We=e.useRef(null);e.useImperativeHandle(me,function(){return{focus:We.current.focus,blur:We.current.blur}});var Ye=function(Ke){return z&&Ke.label||Ke.title},rt=function(Ke){return re?Ke[re]:Ye(Ke)},dt=Le(z,ve,{getLabelProp:Ye,simpleMode:le}),vt=Object(e.useMemo)(function(){return V(dt)},[dt]),ut=g(vt),tt=Object(B.a)(ut,2),Ze=tt[0],et=tt[1],st=m(Ze,et),ot=Object(B.a)(st,2),lt=ot[0],ct=ot[1],Ct=Object(e.useMemo)(function(){return Ve?Object(p.a)(dt):{keyEntities:null}},[dt,xe,Ce]),Mt=Ct.keyEntities,Nt=Object(n.a)(oe.defaultValue,{value:oe.value}),Wt=Object(B.a)(Nt,2),jt=Wt[0],Vt=Wt[1],Kt=function(Ke){var at=[],St=[];return Ke.forEach(function(xt){ct(xt)?St.push(xt):at.push(xt)}),{missingRawValues:at,existRawValues:St}},F=Object(e.useMemo)(function(){var Xe=[],Ke=[];if(w(jt).forEach(function(yt){if(yt&&Object(R.a)(yt)==="object"&&"value"in yt)if(yt.halfChecked&&Ce){var Rt=ct(yt.value);Xe.push(Rt?Rt.key:yt.value)}else Ke.push(yt.value);else Ke.push(yt)}),Ve){var at=Kt(Ke),St=at.missingRawValues,xt=at.existRawValues,Et=xt.map(function(yt){return ct(yt).key}),Ot=Object(o.a)(Et,!0,Mt),Ht=Ot.checkedKeys,Ft=Ot.halfCheckedKeys;return[[].concat(Object(L.a)(St),Object(L.a)(Ht.map(function(yt){return lt(yt).data.value}))),Ft]}return[Ke,Xe]},[jt,Tt,At,xe,Ce]),v=Object(B.a)(F,2),x=v[0],k=v[1],K=Ee(x,{treeConduction:Ve,value:jt,showCheckedStrategy:Se,conductKeyEntities:Mt,getEntityByValue:ct,getEntityByKey:lt,getLabelProp:rt}),M=function(Ke,at,St){if(Vt(Tt?Ke:Ke[0]),$e){var xt=Ke;if(Ve&&Se!=="SHOW_ALL"){var Et=Ke.map(function(It){var kt=ct(It);return kt?kt.key:It}),Ot=_e(Et,Se,Mt);xt=Ot.map(function(It){var kt=lt(It);return kt?kt.data.value:It})}var Ht=at||{triggerValue:void 0,selected:void 0},Ft=Ht.triggerValue,yt=Ht.selected,Rt=At?fe(xt,jt,ct,rt):xt;if(Ce){var Gt=k.map(function(It){var kt=lt(It);return kt?kt.data.value:It}).filter(function(It){return!xt.includes(It)});Rt=[].concat(Object(L.a)(Rt),Object(L.a)(fe(Gt,jt,ct,rt)))}var Lt={preValue:K,triggerValue:Ft},Yt=!0;(Ce||St==="selection"&&!yt)&&(Yt=!1),I(Lt,Ft,Ke,dt,Yt),_t?Lt.checked=yt:Lt.selected=yt,$e(Tt?Rt:Rt[0],At?null:xt.map(function(It){var kt=ct(It);return kt?rt(kt.data):null}),Lt)}},ne=function(Ke,at,St){var xt=Ke;if(!Tt)M([Ke],{selected:!0,triggerValue:Ke},St);else{var Et=ce(x,Ke);if(Ve){var Ot=Kt(Et),Ht=Ot.missingRawValues,Ft=Ot.existRawValues,yt=Ft.map(function(Lt){return ct(Lt).key}),Rt=Object(o.a)(yt,!0,Mt),Gt=Rt.checkedKeys;Et=[].concat(Object(L.a)(Ht),Object(L.a)(Gt.map(function(Lt){return lt(Lt).data.value})))}M(Et,{selected:!0,triggerValue:Ke},St)}pt&&pt(xt,at)},Me=function(Ke,at,St){var xt=Ke,Et=J(x,Ke);if(Ve){var Ot=Kt(Et),Ht=Ot.missingRawValues,Ft=Ot.existRawValues,yt=Ft.map(function(Lt){return ct(Lt).key}),Rt=Object(o.a)(yt,{checked:!1,halfCheckedKeys:k},Mt),Gt=Rt.checkedKeys;Et=[].concat(Object(L.a)(Ht),Object(L.a)(Gt.map(function(Lt){return lt(Lt).data.value})))}M(Et,{selected:!1,triggerValue:Ke},St),it&&it(xt,at)},je=function(){M([],null,"clear")},He=e.useCallback(function(Xe){if(bt){var Ke={};Object.defineProperty(Ke,"documentClickClose",{get:function(){return Object(l.a)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),bt(Xe,Ke)}},[bt]),Pe={optionLabelProp:null,optionFilterProp:de,dropdownAlign:nt,internalProps:{mark:a.a,onClear:je,skipTriggerChange:!0,skipTriggerSelect:!0,onRawSelect:ne,onRawDeselect:Me}};return"filterTreeNode"in oe&&(Pe.filterOption=qe),e.createElement(t.Provider,{value:{checkable:_t,loadData:Be,treeLoadedKeys:Te,onTreeLoad:ht,checkedKeys:x,halfCheckedKeys:k,treeDefaultExpandAll:ee,treeExpandedKeys:Q,treeDefaultExpandedKeys:q,onTreeExpand:gt,treeIcon:we,treeMotion:ze,showTreeIcon:Fe,switcherIcon:Ge,treeLine:Je,treeNodeFilterProp:de}},e.createElement(Y,Object.assign({ref:We,mode:Tt?"multiple":null},oe,Pe,{value:K,labelInValue:!0,options:dt,onChange:null,onSelect:null,onDeselect:null,onDropdownVisibleChange:He})))}),pe=function(oe){Object(C.a)(be,oe);var me=Object(j.a)(be);function be(){var xe;return Object(te.a)(this,be),xe=me.apply(this,arguments),xe.selectRef=e.createRef(),xe.focus=function(){xe.selectRef.current.focus()},xe.blur=function(){xe.selectRef.current.blur()},xe}return Object(H.a)(be,[{key:"render",value:function(){return e.createElement(se,Object.assign({ref:this.selectRef},this.props))}}]),be}(e.Component);pe.TreeNode=d,pe.SHOW_ALL=Re,pe.SHOW_PARENT=Ie,pe.SHOW_CHILD=Ne;var ge=pe,ke=ue.e=ge},"8hTe":function(Qe,ue,W){Qe.exports={button:"button___1wy9m"}},"9Bee":function(Qe,ue,W){"use strict";var te=W("DYRE"),H=W("zeV3"),C=W("+L6B"),j=W("2/Rp"),L=W("k1fw"),R=W("9og8"),B=W("tJVT"),N=W("WmNS"),e=W.n(N),A=W("q1tI"),f=W.n(A),p=W("vg9a"),o=W("DlQD"),a=W.n(o),n=W("rUJ1");function l(F,v){var x=F.match(/^(\s+)(?:```)/);if(x===null)return v;var k=x[1];return v.split(`
`).map(function(K){var M=K.match(/^\s+/);if(M===null)return K;var ne=Object(B.a)(M,1),Me=ne[0];return Me.length>=k.length?K.slice(k.length):K}).join(`
`)}var s=[],r=[""],i=new a.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function y(){s.length=0,r=[""]}var m={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(F,v,x,k){if(v>=F.length||F[v].level<=x)return v;var K=F[v];k.push("- "+K.text+""),v++;var M=[];return v=g(F,v,K.level,M),M.length>0&&(k.push("
"),M.forEach(function(ne){k.push(ne)}),k.push("
")),k.push(" "),v=g(F,v,x,k),v}function E(){return g(s,0,0,r),r.push("
"),r.join("")}var _={heading:function(v){var x=t.exec(v);if(x)return{type:"heading",raw:x[0],depth:x[1].length,text:x[2]}},fences:function(v){var x=this.rules.block.fences.exec(v);if(x){var k=x[0],K=l(k,x[3]||""),M=x[2]?x[2].trim():x[2];if(["latex","katex","math"].indexOf(M)>=0){var ne=c(),Me=K;K=ne,d[ne]={type:"block",expression:Me}}return{type:"code",raw:k,lang:M,text:K}}}},u=/(?:\${2})([^\n`]+?)(?:\${2})/gi,h=0,c=function(){return"__special_katext_id_".concat(h++,"__")},d={};function T(){return d}function b(){h=0,d={}}function S(F){return F=F.replace(u,function(v,x){var k=c();return d[k]={type:"inline",expression:x},k}),F}var D=i.listitem;i.listitem=function(F){return D(S(F))};var I=i.paragraph;i.paragraph=function(F){return I(S(F))};var w=i.tablecell;i.tablecell=function(F,v){return w(S(F),v)},i.code=function(F,v,x){var k=(v||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"".concat(F,"
"):'
').concat(x?F:Object(n.escape)(F,!0),`
`):''+(x?F:Object(n.escape)(F,!0))+"
"},i.heading=function(F,v,x){var k=this.options.headerPrefix+x.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:k,level:v,text:F}),"'+F+""},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:_,renderer:i});var P=a.a,U=W("SJMd"),O=W("ulZh"),G=W.n(O),V=W("m3rI"),ae=W("Oy/b"),ie=W("p5ED"),fe=W("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 ce=function(F,v){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,k){x.__proto__=k}||function(x,k){for(var K in k)Object.prototype.hasOwnProperty.call(k,K)&&(x[K]=k[K])})(F,v)};function J(F,v){function x(){this.constructor=F}ce(F,v),F.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}function Z(F,v,x,k){return new(x||(x=Promise))(function(K,M){function ne(He){try{je(k.next(He))}catch(Pe){M(Pe)}}function Me(He){try{je(k.throw(He))}catch(Pe){M(Pe)}}function je(He){var Pe;He.done?K(He.value):(Pe=He.value,Pe instanceof x?Pe:new x(function(Xe){Xe(Pe)})).then(ne,Me)}je((k=k.apply(F,v||[])).next())})}function he(F,v){var x,k,K,M,ne={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return M={next:Me(0),throw:Me(1),return:Me(2)},typeof Symbol=="function"&&(M[Symbol.iterator]=function(){return this}),M;function Me(je){return function(He){return function(Pe){if(x)throw new TypeError("Generator is already executing.");for(;ne;)try{if(x=1,k&&(K=2&Pe[0]?k.return:Pe[0]?k.throw||((K=k.return)&&K.call(k),0):k.next)&&!(K=K.call(k,Pe[1])).done)return K;switch(k=0,K&&(Pe=[2&Pe[0],K.value]),Pe[0]){case 0:case 1:K=Pe;break;case 4:return ne.label++,{value:Pe[1],done:!1};case 5:ne.label++,k=Pe[1],Pe=[0];continue;case 7:Pe=ne.ops.pop(),ne.trys.pop();continue;default:if(!(K=ne.trys,(K=K.length>0&&K[K.length-1])||Pe[0]!==6&&Pe[0]!==2)){ne=0;continue}if(Pe[0]===3&&(!K||Pe[1]>K[0]&&Pe[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(M){var ne=document.createElement("div");ne.className=""+x.toolbarButtonStyleClass.name,ne.setAttribute("data-type-name",M.typeName),ne.innerHTML=M.icon,ne.addEventListener("click",function(){x.markerToolbarButtonClicked(ne,M)}),x.buttons.push(ne),x.markerButtons.push(ne)}),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 K=document.createElement("div");K.className=this.toolbarBlockStyleClass.name,K.style.whiteSpace="nowrap",K.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(K),this.addActionButton(K,'',"render"),this.addActionButton(K,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},F.prototype.addButtonClickListener=function(v){this.buttonClickListeners.push(v)},F.prototype.removeButtonClickListener=function(v){this.buttonClickListeners.indexOf(v)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(v),1)},F.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},F.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var v=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var x=0;x0&&this.buttonClickListeners.forEach(function(k){return k("marker",x)}),this.markerButtonOverflowBlock.style.display="none"},F.prototype.actionToolbarButtonClicked=function(v,x){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",x)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},F.prototype.setActiveButton=function(v){this.resetButtonStyles(),v.className=v.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),v.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},F.prototype.setActiveMarkerButton=function(v){var x=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===v});x&&this.setActiveButton(x)},F.prototype.setCurrentMarker=function(v){var x=this;this.currentMarker=v,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){x.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},F}(),Ae=function(){function F(v,x,k,K){this.panels=[],this.panelButtons=[],this.markerjsContainer=v,this.displayMode=x,this.uiStyleSettings=k,this.styles=K,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return F.prototype.addStyles=function(){var v;this.toolboxStyleClass=this.styles.addClass(new _e("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 _e("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var x=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new _e("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new _e("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new _e("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 _e("toolbox-panel-row_colors",`
background-color: `+((v=this.uiStyleSettings.toolboxBackgroundColor)!==null&&v!==void 0?v:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new _e("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*x)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*x)+`px;
padding: `+x+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new _e("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new _e("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ne("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ne("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},F.prototype.show=function(v){var x;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=v,this.uiContainer.className=this.toolboxStyleClass.name+" "+((x=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&x!==void 0?x:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},F.prototype.setPanelButtons=function(v){var x,k,K=this;this.panels=v,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((x=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&x!==void 0?x: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(M){var ne;M.uiStyleSettings=K.uiStyleSettings;var Me=document.createElement("div");Me.className=K.toolboxButtonStyleClass.name+" "+((ne=K.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ne!==void 0?ne:K.toolboxButtonStyleColorsClass.name),Me.innerHTML=M.icon,Me.title=M.title,Me.addEventListener("click",function(){K.panelButtonClick(M)}),K.panelButtons.push(Me),K.buttonRow.appendChild(Me)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},F.prototype.panelButtonClick=function(v){var x=this,k=-1;if(v!==this.activePanel){k=this.panels.indexOf(v),this.panelRow.innerHTML="";var K=v.getUi();K.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(K),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=v}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){x.displayMode==="inline"?x.panelRow.style.display="none":x.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(M,ne){var Me,je;M.className=x.toolboxButtonStyleClass.name+" "+(ne===k?""+((Me=x.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Me!==void 0?Me:x.toolboxActiveButtonStyleColorsClass.name):""+((je=x.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&je!==void 0?je:x.toolboxButtonStyleColorsClass.name))})},F}(),Y=function(F,v){this.title=F,this.icon=v},se=function(F){function v(x,k,K,M){var ne=F.call(this,x,M||'')||this;return ne.colors=[],ne.addTransparent=!1,ne.colorBoxes=[],ne.colors=k,ne.currentColor=K,ne.setCurrentColor=ne.setCurrentColor.bind(ne),ne.getColorBox=ne.getColorBox.bind(ne),ne}return J(v,F),v.prototype.getUi=function(){var x=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function(K){var M=x.getColorBox(K);k.appendChild(M),x.colorBoxes.push(M)}),k},v.prototype.getColorBox=function(x){var k=this,K=this.uiStyleSettings.toolbarHeight/4,M=this.uiStyleSettings.toolbarHeight-K,ne=document.createElement("div");ne.style.display="inline-block",ne.style.boxSizing="content-box",ne.style.width=M-2+"px",ne.style.height=M-2+"px",ne.style.padding="1px",ne.style.marginRight="2px",ne.style.marginBottom="2px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderRadius=(M+2)/2+"px",ne.style.borderColor=x===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){k.setCurrentColor(x,ne)});var Me=document.createElement("div");return Me.style.display="inline-block",Me.style.width=M-2+"px",Me.style.height=M-2+"px",Me.style.backgroundColor=x,Me.style.borderRadius=M/2+"px",x==="transparent"&&(Me.style.fill=this.uiStyleSettings.toolboxAccentColor,Me.innerHTML=``),ne.appendChild(Me),ne},v.prototype.setCurrentColor=function(x,k){var K=this;this.currentColor=x,this.colorBoxes.forEach(function(M){M.style.borderColor=M===k?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(x)},v}(Y),pe=function(){function F(v,x,k){this._state="new",this._isSelected=!1,this._container=v,this._overlayContainer=x,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(F.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),F.prototype.ownsTarget=function(v){return!1},Object.defineProperty(F.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),F.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},F.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},F.prototype.pointerDown=function(v,x){},F.prototype.dblClick=function(v,x){},F.prototype.manipulate=function(v){},F.prototype.pointerUp=function(v){this.stateChanged()},F.prototype.dispose=function(){},F.prototype.addMarkerVisualToContainer=function(v){this.container.childNodes.length>0?this.container.insertBefore(v,this.container.childNodes[0]):this.container.appendChild(v)},F.prototype.getState=function(){return{typeName:F.typeName,state:this.state,notes:this.notes}},F.prototype.restoreState=function(v){this._state=v.state,this.notes=v.notes},F.prototype.scale=function(v,x){},F.prototype.colorChanged=function(v){this.onColorChanged&&this.onColorChanged(v),this.stateChanged()},F.prototype.fillColorChanged=function(v){this.onFillColorChanged&&this.onFillColorChanged(v),this.stateChanged()},F.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var v=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),v.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(v)&&this.onStateChanged(this)}},F.typeName="MarkerBase",F}(),ge=function(){function F(){this.findGripByVisual=this.findGripByVisual.bind(this)}return F.prototype.findGripByVisual=function(v){return this.topLeft.ownsTarget(v)?this.topLeft:this.topCenter.ownsTarget(v)?this.topCenter:this.topRight.ownsTarget(v)?this.topRight:this.centerLeft.ownsTarget(v)?this.centerLeft:this.centerRight.ownsTarget(v)?this.centerRight:this.bottomLeft.ownsTarget(v)?this.bottomLeft:this.bottomCenter.ownsTarget(v)?this.bottomCenter:this.bottomRight.ownsTarget(v)?this.bottomRight:void 0},F}(),ke=function(){function F(){this.GRIP_SIZE=10,this.visual=$.createGroup(),this.visual.appendChild($.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild($.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return F.prototype.ownsTarget=function(v){return v===this.visual||v===this.visual.childNodes[0]||v===this.visual.childNodes[1]},F}(),oe=function(){function F(){}return F.toITransformMatrix=function(v){return{a:v.a,b:v.b,c:v.c,d:v.d,e:v.e,f:v.f}},F.toSVGMatrix=function(v,x){return v.a=x.a,v.b=x.b,v.c=x.c,v.d=x.d,v.e=x.e,v.f=x.f,v},F}(),me=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.left=0,M.top=0,M.width=0,M.height=0,M.defaultSize={x:50,y:20},M.offsetX=0,M.offsetY=0,M.rotationAngle=0,M.CB_DISTANCE=10,M._suppressMarkerCreateEvent=!1,M.container.transform.baseVal.appendItem($.createTransform()),M.setupControlBox(),M}return J(v,F),Object.defineProperty(v.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"visual",{get:function(){return this._visual},set:function(x){this._visual=x;var k=$.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),v.prototype.ownsTarget=function(x){return!!F.prototype.ownsTarget.call(this,x)||!!(this.controlGrips.findGripByVisual(x)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(x))},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.state==="new"&&(this.left=x.x,this.top=x.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var K=this.unrotatePoint(x);if(this.manipulationStartX=K.x,this.manipulationStartY=K.y,this.offsetX=K.x-this.left,this.offsetY=K.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 M=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=M.x-this.width/2,this.top=M.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ne=this.container.transform.baseVal.getItem(0);ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ne,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},v.prototype.pointerUp=function(x){var k=this.state;F.prototype.pointerUp.call(this,x),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(x),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},v.prototype.moveVisual=function(x){this.visual.style.transform="translate("+x.x+"px, "+x.y+"px)"},v.prototype.manipulate=function(x){var k=this.unrotatePoint(x);this.state==="creating"?this.resize(x):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(x)},v.prototype.resize=function(x){var k=this.manipulationStartLeft,K=this.manipulationStartWidth,M=this.manipulationStartTop,ne=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+x.x-this.manipulationStartX,K=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:K=this.manipulationStartWidth+x.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:M=this.manipulationStartTop+x.y-this.manipulationStartY,ne=this.manipulationStartHeight+this.manipulationStartTop-M;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ne=this.manipulationStartHeight+x.y-this.manipulationStartY}K>=0?(this.left=k,this.width=K):(this.left=k+K,this.width=-K),ne>=0?(this.top=M,this.height=ne):(this.top=M+ne,this.height=-ne),this.setSize()},v.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},v.prototype.rotate=function(x){if(Math.abs(x.x-this.centerX)>.1){var k=Math.sign(x.x-this.centerX);this.rotationAngle=180*Math.atan((x.y-this.centerY)/(x.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},v.prototype.applyRotation=function(){var x=this.container.transform.baseVal.getItem(0);x.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(x,0)},v.prototype.rotatePoint=function(x){if(this.rotationAngle===0)return x;var k=this.container.getCTM(),K=$.createPoint(x.x,x.y);return{x:(K=K.matrixTransform(k)).x,y:K.y}},v.prototype.unrotatePoint=function(x){if(this.rotationAngle===0)return x;var k=this.container.getCTM();k=k.inverse();var K=$.createPoint(x.x,x.y);return{x:(K=K.matrixTransform(k)).x,y:K.y}},v.prototype.select=function(){F.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},v.prototype.deselect=function(){F.prototype.deselect.call(this),this.controlBox.style.display="none"},v.prototype.setupControlBox=function(){this.controlBox=$.createGroup();var x=$.createTransform();x.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(x),this.container.appendChild(this.controlBox),this.controlRect=$.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=$.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 ge,this.addControlGrips(),this.controlBox.style.display="none"},v.prototype.adjustControlBox=function(){var x=this.controlBox.transform.baseVal.getItem(0);x.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(x,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()},v.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()},v.prototype.createGrip=function(){var x=new ke;return x.visual.transform.baseVal.appendItem($.createTransform()),this.controlBox.appendChild(x.visual),x},v.prototype.positionGrips=function(){var x=this.controlGrips.topLeft.GRIP_SIZE,k=-x/2,K=k,M=(this.width+this.CB_DISTANCE)/2-x/2,ne=(this.height+this.CB_DISTANCE)/2-x/2,Me=this.height+this.CB_DISTANCE-x/2,je=this.width+this.CB_DISTANCE-x/2;this.positionGrip(this.controlGrips.topLeft.visual,k,K),this.positionGrip(this.controlGrips.topCenter.visual,M,K),this.positionGrip(this.controlGrips.topRight.visual,je,K),this.positionGrip(this.controlGrips.centerLeft.visual,k,ne),this.positionGrip(this.controlGrips.centerRight.visual,je,ne),this.positionGrip(this.controlGrips.bottomLeft.visual,k,Me),this.positionGrip(this.controlGrips.bottomCenter.visual,M,Me),this.positionGrip(this.controlGrips.bottomRight.visual,je,Me),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,M,K-3*this.CB_DISTANCE)},v.prototype.positionGrip=function(x,k,K){var M=x.transform.baseVal.getItem(0);M.setTranslate(k,K),x.transform.baseVal.replaceItem(M,0)},v.prototype.hideControlBox=function(){this.controlBox.style.display="none"},v.prototype.showControlBox=function(){this.controlBox.style.display=""},v.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:oe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:oe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},F.prototype.getState.call(this))},v.prototype.restoreState=function(x){F.prototype.restoreState.call(this,x);var k=x;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(oe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(oe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},v.prototype.scale=function(x,k){F.prototype.scale.call(this,x,k);var K=this.rotatePoint({x:this.left,y:this.top}),M=this.unrotatePoint({x:K.x*x,y:K.y*k});this.left=M.x,this.top=M.y,this.width=this.width*x,this.height=this.height*k,this.adjustControlBox()},v}(pe),be=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.fillColor="transparent",M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.opacity=1,M.setStrokeColor=M.setStrokeColor.bind(M),M.setFillColor=M.setFillColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.createVisual=M.createVisual.bind(M),M}return J(v,F),v.prototype.ownsTarget=function(x){return!(!F.prototype.ownsTarget.call(this,x)&&x!==this.visual)},v.prototype.createVisual=function(){this.visual=$.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)},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.state==="new"&&(this.createVisual(),this.moveVisual(x),this._state="creating")},v.prototype.manipulate=function(x){F.prototype.manipulate.call(this,x)},v.prototype.resize=function(x){F.prototype.resize.call(this,x),this.setSize()},v.prototype.setSize=function(){F.prototype.setSize.call(this),$.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},v.prototype.pointerUp=function(x){F.prototype.pointerUp.call(this,x),this.setSize()},v.prototype.setStrokeColor=function(x){this.strokeColor=x,this.visual&&$.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(x),this.stateChanged()},v.prototype.setFillColor=function(x){this.fillColor=x,this.visual&&$.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},v.prototype.setStrokeWidth=function(x){this.strokeWidth=x,this.visual&&$.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},v.prototype.setStrokeDasharray=function(x){this.strokeDasharray=x,this.visual&&$.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},v.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},F.prototype.getState.call(this))},v.prototype.restoreState=function(x){var k=x;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),F.prototype.restoreState.call(this,x),this.setSize()},v.prototype.scale=function(x,k){F.prototype.scale.call(this,x,k),this.setSize()},v.title="Rectangle marker",v}(me),xe=function(F){function v(x,k,K,M){var ne=F.call(this,x,M||'')||this;return ne.widths=[],ne.widthBoxes=[],ne.widths=k,ne.currentWidth=K,ne.setCurrentWidth=ne.setCurrentWidth.bind(ne),ne}return J(v,F),v.prototype.getUi=function(){var x=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function(K){var M=document.createElement("div");M.style.display="flex",M.style.flexGrow="2",M.style.alignItems="center",M.style.justifyContent="space-between",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.borderColor=K===x.currentWidth?x.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){x.setCurrentWidth(K,M)}),k.appendChild(M);var ne=document.createElement("div");ne.innerText=K.toString(),ne.style.marginRight="5px",M.appendChild(ne);var Me=document.createElement("div");Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.display="flex",Me.style.alignItems="center";var je=document.createElement("hr");je.style.minWidth="20px",je.style.border="0px",je.style.borderTop=K+"px solid "+x.uiStyleSettings.toolboxColor,je.style.flexGrow="2",Me.appendChild(je),M.appendChild(Me),x.widthBoxes.push(M)}),k},v.prototype.setCurrentWidth=function(x,k){var K=this;this.currentWidth=x,this.widthBoxes.forEach(function(M){M.style.borderColor=M===k?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},v}(Y),Ce=function(F){function v(x,k,K,M){var ne=F.call(this,x,M||'')||this;return ne.styles=[],ne.styleBoxes=[],ne.styles=k,ne.currentStyle=K,ne.setCurrentStyle=ne.setCurrentStyle.bind(ne),ne}return J(v,F),v.prototype.getUi=function(){var x=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function(K){var M=document.createElement("div");M.style.display="flex",M.style.alignItems="center",M.style.justifyContent="space-between",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.overflow="hidden",M.style.maxWidth=100/x.styles.length-5+"%",M.style.borderColor=K===x.currentStyle?x.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){x.setCurrentStyle(K,M)}),k.appendChild(M);var ne=document.createElement("div");ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.overflow="hidden";var Me=``;ne.innerHTML=Me,M.appendChild(ne),x.styleBoxes.push(M)}),k},v.prototype.setCurrentStyle=function(x,k){var K=this;this.currentStyle=x,this.styleBoxes.forEach(function(M){M.style.borderColor=M===k?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},v}(Y),Oe=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.strokeColor=K.defaultColor,M.strokeWidth=K.defaultStrokeWidth,M.strokeDasharray=K.defaultStrokeDasharray,M.strokePanel=new se("Line color",K.defaultColorSet,K.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.strokeWidthPanel=new xe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ce("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M}return J(v,F),Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=F.prototype.getState.call(this);return x.typeName=v.typeName,x},v.typeName="FrameMarker",v.title="Frame marker",v.icon='',v}(be),Se=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},Ue=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.x1=0,M.y1=0,M.x2=0,M.y2=0,M.defaultLength=50,M.manipulationStartX=0,M.manipulationStartY=0,M.manipulationStartX1=0,M.manipulationStartY1=0,M.manipulationStartX2=0,M.manipulationStartY2=0,M.setupControlBox(),M}return J(v,F),v.prototype.ownsTarget=function(x){return!!F.prototype.ownsTarget.call(this,x)||!(!this.grip1.ownsTarget(x)&&!this.grip2.ownsTarget(x))},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.manipulationStartX=x.x,this.manipulationStartY=x.y,this.state==="new"&&(this.x1=x.x,this.y1=x.y,this.x2=x.x,this.y2=x.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")},v.prototype.pointerUp=function(x){var k=this.state;F.prototype.pointerUp.call(this,x),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(x),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},v.prototype.adjustVisual=function(){},v.prototype.manipulate=function(x){this.state==="creating"?this.resize(x):this.state==="move"?(this.x1=this.manipulationStartX1+x.x-this.manipulationStartX,this.y1=this.manipulationStartY1+x.y-this.manipulationStartY,this.x2=this.manipulationStartX2+x.x-this.manipulationStartX,this.y2=this.manipulationStartY2+x.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(x)},v.prototype.resize=function(x){switch(this.activeGrip){case this.grip1:this.x1=x.x,this.y1=x.y;break;case this.grip2:case void 0:this.x2=x.x,this.y2=x.y}this.adjustVisual(),this.adjustControlBox()},v.prototype.select=function(){F.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},v.prototype.deselect=function(){F.prototype.deselect.call(this),this.controlBox.style.display="none"},v.prototype.setupControlBox=function(){this.controlBox=$.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},v.prototype.adjustControlBox=function(){this.positionGrips()},v.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},v.prototype.createGrip=function(){var x=new ke;return x.visual.transform.baseVal.appendItem($.createTransform()),this.controlBox.appendChild(x.visual),x},v.prototype.positionGrips=function(){var x=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-x/2,this.y1-x/2),this.positionGrip(this.grip2.visual,this.x2-x/2,this.y2-x/2)},v.prototype.positionGrip=function(x,k,K){var M=x.transform.baseVal.getItem(0);M.setTranslate(k,K),x.transform.baseVal.replaceItem(M,0)},v.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},F.prototype.getState.call(this))},v.prototype.restoreState=function(x){F.prototype.restoreState.call(this,x);var k=x;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},v.prototype.scale=function(x,k){F.prototype.scale.call(this,x,k),this.x1=this.x1*x,this.y1=this.y1*k,this.x2=this.x2*x,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},v}(pe),Be=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.setStrokeColor=M.setStrokeColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.strokeColor=K.defaultColor,M.strokeWidth=K.defaultStrokeWidth,M.strokeDasharray=K.defaultStrokeDasharray,M.strokePanel=new se("Line color",K.defaultColorSet,K.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.strokeWidthPanel=new xe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ce("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M}return J(v,F),v.prototype.ownsTarget=function(x){return!(!F.prototype.ownsTarget.call(this,x)&&x!==this.visual&&x!==this.selectorLine&&x!==this.visibleLine)},v.prototype.createVisual=function(){this.visual=$.createGroup(),this.selectorLine=$.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=$.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)},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},v.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()),$.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),$.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),$.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},v.prototype.setStrokeColor=function(x){this.strokeColor=x,this.adjustVisual(),this.colorChanged(x)},v.prototype.setStrokeWidth=function(x){this.strokeWidth=x,this.adjustVisual()},v.prototype.setStrokeDasharray=function(x){this.strokeDasharray=x,this.adjustVisual(),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},F.prototype.getState.call(this));return x.typeName=v.typeName,x},v.prototype.restoreState=function(x){F.prototype.restoreState.call(this,x);var k=x;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},v.typeName="LineMarker",v.title="Line marker",v.icon='',v}(Ue),Te=function(F){function v(x,k,K,M){var ne=F.call(this,x,M||'')||this;return ne.fonts=[],ne.fontBoxes=[],ne.fonts=k,ne.currentFont=K,ne.setCurrentFont=ne.setCurrentFont.bind(ne),ne}return J(v,F),v.prototype.getUi=function(){var x=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function(K){var M=document.createElement("div");M.style.display="inline-block",M.style.alignItems="center",M.style.justifyContent="space-between",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.overflow="hidden",M.style.maxWidth=100/x.fonts.length-5+"%",M.style.borderColor=K===x.currentFont?x.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){x.setCurrentFont(K,M)}),k.appendChild(M);var ne=document.createElement("div");ne.style.display="flex",ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.fontFamily=K,ne.style.overflow="hidden";var Me=document.createElement("div");Me.style.whiteSpace="nowrap",Me.style.overflow="hidden",Me.style.textOverflow="ellipsis",Me.innerHTML="The quick brown fox jumps over the lazy dog",ne.appendChild(Me),M.appendChild(ne),x.fontBoxes.push(M)}),k},v.prototype.setCurrentFont=function(x,k){var K=this;this.currentFont=x,this.fontBoxes.forEach(function(M){M.style.borderColor=M===k?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},v}(Y),De=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.color="transparent",M.padding=5,M.DEFAULT_TEXT="your text here",M.text=M.DEFAULT_TEXT,M.isMoved=!1,M.color=K.defaultColor,M.fontFamily=K.defaultFontFamily,M.defaultSize={x:100,y:30},M.setColor=M.setColor.bind(M),M.setFont=M.setFont.bind(M),M.renderText=M.renderText.bind(M),M.sizeText=M.sizeText.bind(M),M.textEditDivClicked=M.textEditDivClicked.bind(M),M.showTextEditor=M.showTextEditor.bind(M),M.setSize=M.setSize.bind(M),M.positionTextEditor=M.positionTextEditor.bind(M),M.colorPanel=new se("Color",K.defaultColorSet,K.defaultColor),M.colorPanel.onColorChanged=M.setColor,M.fontFamilyPanel=new Te("Font",K.defaultFontFamilies,K.defaultFontFamily),M.fontFamilyPanel.onFontChanged=M.setFont,M}return J(v,F),v.prototype.ownsTarget=function(x){if(F.prototype.ownsTarget.call(this,x)||x===this.visual||x===this.textElement||x===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function(K){K===x&&(k=!0)}),k},v.prototype.createVisual=function(){this.visual=$.createGroup(),this.bgRectangle=$.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=$.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem($.createTransform()),this.textElement.transform.baseVal.appendItem($.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.isMoved=!1,this.pointerDownPoint=x,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(x),this._state="creating")},v.prototype.renderText=function(){var x=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){x.textElement.appendChild($.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},v.prototype.getTextScale=function(){var x=this.textElement.getBBox(),k=1;if(x.width>0&&x.height>0){var K=(1*this.width-this.width*this.padding*2/100)/x.width,M=(1*this.height-this.height*this.padding*2/100)/x.height;k=Math.min(K,M)}return k},v.prototype.getTextPosition=function(x){var k=this.textElement.getBBox(),K=0,M=0;return k.width>0&&k.height>0&&(K=(this.width-k.width*x)/2,M=this.height/2-k.height*x/2),{x:K,y:M}},v.prototype.sizeText=function(){var x=this.textElement.getBBox(),k=this.getTextScale(),K=this.getTextPosition(k);K.y-=x.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+K.x+"px, "+K.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(K.x,K.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},v.prototype.manipulate=function(x){F.prototype.manipulate.call(this,x),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(x.x-this.pointerDownPoint.x)>5||Math.abs(x.y-this.pointerDownPoint.y)>5)},v.prototype.resize=function(x){F.prototype.resize.call(this,x),this.isMoved=!0,this.setSize(),this.sizeText()},v.prototype.setSize=function(){F.prototype.setSize.call(this),this.visual&&this.bgRectangle&&($.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),$.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},v.prototype.pointerUp=function(x){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),F.prototype.pointerUp.call(this,x),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},v.prototype.showTextEditor=function(){var x=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(x.textEditor.style.fontSize);x.textEditor.clientWidth>=Number.parseInt(x.textEditor.style.maxWidth)&&k>.9;)k-=.1,x.textEditor.style.fontSize=Math.max(k,.9)+"em"}),this.textEditor.addEventListener("keyup",function(k){k.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(k){if(k.clipboardData){var K=k.clipboardData.getData("text"),M=window.getSelection();if(!M.rangeCount)return!1;M.deleteFromDocument(),M.getRangeAt(0).insertNode(document.createTextNode(K)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){x.textEditDivClicked(x.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},v.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var x=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),K=this.textElement.getBBox(),M={x:K.width*x,y:K.height*x};k.x-=M.x/2,k.y-=M.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*x,12)+"px",this.textElement.style.display="none"}},v.prototype.textEditDivClicked=function(x){this.text=x.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},v.prototype.select=function(){F.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},v.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),F.prototype.deselect.call(this)},v.prototype.dblClick=function(x,k){F.prototype.dblClick.call(this,x,k),this.showTextEditor()},v.prototype.setColor=function(x){this.textElement&&$.setAttributes(this.textElement,[["fill",x]]),this.color=x,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(x)},v.prototype.setFont=function(x){this.textElement&&$.setAttributes(this.textElement,[["font-family",x]]),this.fontFamily=x,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},v.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},v.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},F.prototype.getState.call(this));return x.typeName=v.typeName,x},v.prototype.restoreState=function(x){var k=x;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),F.prototype.restoreState.call(this,x),this.setSize()},v.prototype.scale=function(x,k){F.prototype.scale.call(this,x,k),this.setSize(),this.sizeText(),this.positionTextEditor()},v.typeName="TextMarker",v.title="Text marker",v.icon='',v}(me),de=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.color="transparent",M.lineWidth=3,M.drawing=!1,M.pixelRatio=1,M.color=K.defaultColor,M.lineWidth=K.defaultStrokeWidth,M.pixelRatio=K.freehandPixelRatio,M.setColor=M.setColor.bind(M),M.addCanvas=M.addCanvas.bind(M),M.finishCreation=M.finishCreation.bind(M),M.setLineWidth=M.setLineWidth.bind(M),M.colorPanel=new se("Color",K.defaultColorSet,K.defaultColor),M.colorPanel.onColorChanged=M.setColor,M.lineWidthPanel=new xe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),M.lineWidthPanel.onWidthChanged=M.setLineWidth,M}return J(v,F),v.prototype.ownsTarget=function(x){return!(!F.prototype.ownsTarget.call(this,x)&&x!==this.visual&&x!==this.drawingImage)},v.prototype.createVisual=function(){this.visual=$.createGroup(),this.drawingImage=$.createImage(),this.visual.appendChild(this.drawingImage);var x=$.createTransform();this.visual.transform.baseVal.appendItem(x),this.addMarkerVisualToContainer(this.visual)},v.prototype.pointerDown=function(x,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(x.x,x.y),this.drawing=!0):F.prototype.pointerDown.call(this,x,k)},v.prototype.manipulate=function(x){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(x.x,x.y),this.canvasContext.stroke()):F.prototype.manipulate.call(this,x)},v.prototype.resize=function(x){F.prototype.resize.call(this,x),$.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),$.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},v.prototype.pointerUp=function(x){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):F.prototype.pointerUp.call(this,x)},v.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)},v.prototype.select=function(){this.state==="creating"&&this.finishCreation(),F.prototype.select.call(this)},v.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),F.prototype.deselect.call(this)},v.prototype.finishCreation=function(){for(var x=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],K=k[0],M=k[1],ne=k[2],Me=k[3],je=!1,He=0;He0&&(je=!0,HeMe&&(Me=He),Pe>ne&&(ne=Pe));if(je){this.left=K/this.pixelRatio,this.top=M/this.pixelRatio,this.width=(ne-K)/this.pixelRatio,this.height=(Me-M)/this.pixelRatio;var Xe=document.createElement("canvas");Xe.width=ne-K,Xe.height=Me-M,Xe.getContext("2d").putImageData(this.canvasContext.getImageData(K,M,ne-K,Me-M),0,0),this.drawingImgUrl=Xe.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},v.prototype.setDrawingImage=function(){$.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),$.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},v.prototype.setColor=function(x){this.color=x,this.colorChanged(x)},v.prototype.setLineWidth=function(x){this.lineWidth=x},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=Object.assign({drawingImgUrl:this.drawingImgUrl},F.prototype.getState.call(this));return x.typeName=v.typeName,x},v.prototype.restoreState=function(x){this.createVisual(),F.prototype.restoreState.call(this,x),this.drawingImgUrl=x.drawingImgUrl,this.setDrawingImage()},v.prototype.scale=function(x,k){F.prototype.scale.call(this,x,k),this.setDrawingImage()},v.typeName="FreehandMarker",v.title="Freehand marker",v.icon='',v}(me),re=function(F){function v(x,k,K){var M=F.call(this,x,K||'')||this;return M.typeBoxes=[],M.currentType=k,M.setCurrentType=M.setCurrentType.bind(M),M}return J(v,F),v.prototype.getUi=function(){var x=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var K=function(Me){var je="both";switch(Me){case 0:je="both";break;case 1:je="start";break;case 2:je="end";break;case 3:je="none"}var He=document.createElement("div");if(He.style.display="flex",He.style.flexGrow="2",He.style.alignItems="center",He.style.justifyContent="space-between",He.style.padding="5px",He.style.borderWidth="2px",He.style.borderStyle="solid",He.style.borderColor=je===M.currentType?M.uiStyleSettings.toolboxAccentColor:"transparent",He.addEventListener("click",function(){x.setCurrentType(je,He)}),k.appendChild(He),je==="both"||je==="start"){var Pe=document.createElement("div");Pe.style.display="flex",Pe.style.alignItems="center",Pe.style.minHeight="20px",Pe.innerHTML=``,Pe.style.marginLeft="5px",He.appendChild(Pe)}var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.style.flexGrow="2";var Ke=document.createElement("hr");if(Ke.style.minWidth="20px",Ke.style.border="0px",Ke.style.borderTop="3px solid "+(M.uiStyleSettings!==void 0?M.uiStyleSettings.toolboxColor:"#eeeeee"),Ke.style.flexGrow="2",Xe.appendChild(Ke),He.appendChild(Xe),je==="both"||je==="end"){var at=document.createElement("div");at.style.display="flex",at.style.alignItems="center",at.style.minHeight="20px",at.innerHTML=``,at.style.marginRight="5px",He.appendChild(at)}M.typeBoxes.push(He)},M=this,ne=0;ne<4;ne++)K(ne);return k},v.prototype.setCurrentType=function(x,k){var K=this;this.currentType=x,this.typeBoxes.forEach(function(M){M.style.borderColor=M===k?K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},v}(Y),le=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.arrowType="end",M.arrowBaseHeight=10,M.arrowBaseWidth=10,M.getArrowPoints=M.getArrowPoints.bind(M),M.setArrowType=M.setArrowType.bind(M),M.arrowTypePanel=new re("Arrow type","end"),M.arrowTypePanel.onArrowTypeChanged=M.setArrowType,M}return J(v,F),v.prototype.ownsTarget=function(x){return!(!F.prototype.ownsTarget.call(this,x)&&x!==this.arrow1&&x!==this.arrow2)},v.prototype.getArrowPoints=function(x,k){var K=this.arrowBaseWidth+2*this.strokeWidth,M=this.arrowBaseHeight+2*this.strokeWidth;return x-K/2+","+(k+M/2)+" "+x+","+(k-M/2)+" "+(x+K/2)+","+(k+M/2)},v.prototype.createTips=function(){this.arrow1=$.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem($.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=$.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem($.createTransform()),this.visual.appendChild(this.arrow2)},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.state==="creating"&&this.createTips()},v.prototype.adjustVisual=function(){if(F.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",$.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),$.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var x=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(x,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var K=this.arrow2.transform.baseVal.getItem(0);K.setRotate(x+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(K,0)}},v.prototype.setArrowType=function(x){this.arrowType=x,this.adjustVisual(),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=Object.assign({arrowType:this.arrowType},F.prototype.getState.call(this));return x.typeName=v.typeName,x},v.prototype.restoreState=function(x){F.prototype.restoreState.call(this,x);var k=x;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},v.typeName="ArrowMarker",v.title="Arrow marker",v.icon='',v}(Be),z=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.fillColor=K.defaultFillColor,M.strokeWidth=0,M.fillPanel=new se("Color",K.defaultColorSet,K.defaultFillColor),M.fillPanel.onColorChanged=M.setFillColor,M}return J(v,F),Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=F.prototype.getState.call(this);return x.typeName=v.typeName,x},v.typeName="CoverMarker",v.title="Cover marker",v.icon='',v}(be),Q=function(F){function v(x,k,K,M){var ne=F.call(this,x,M||'')||this;return ne.opacities=[],ne.opacityBoxes=[],ne.opacities=k,ne.currentOpacity=K,ne.setCurrentOpacity=ne.setCurrentOpacity.bind(ne),ne}return J(v,F),v.prototype.getUi=function(){var x=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(K){var M=document.createElement("div");M.style.display="flex",M.style.alignItems="center",M.style.justifyContent="center",M.style.padding="5px",M.style.borderWidth="2px",M.style.borderStyle="solid",M.style.borderColor=K===x.currentOpacity?x.uiStyleSettings.toolboxAccentColor:"transparent",M.addEventListener("click",function(){x.setCurrentOpacity(K,M)}),k.appendChild(M);var ne=document.createElement("div");ne.innerText=100*K+"%",M.appendChild(ne),x.opacityBoxes.push(M)}),k},v.prototype.setCurrentOpacity=function(x,k){var K=this;this.currentOpacity=x,this.opacityBoxes.forEach(function(M){M.style.borderColor=M===k?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},v}(Y),q=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.setOpacity=M.setOpacity.bind(M),M.fillColor=K.defaultHighlightColor,M.strokeWidth=0,M.opacity=K.defaultHighlightOpacity,M.fillPanel=new se("Color",K.defaultColorSet,M.fillColor),M.fillPanel.onColorChanged=M.setFillColor,M.opacityPanel=new Q("Opacity",K.defaultOpacitySteps,M.opacity),M.opacityPanel.onOpacityChanged=M.setOpacity,M}return J(v,F),v.prototype.setOpacity=function(x){this.opacity=x,this.visual&&$.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=F.prototype.getState.call(this);return x.typeName=v.typeName,x},v.typeName="HighlightMarker",v.title="Highlight marker",v.icon='',v}(z),ee='',ve=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.bgColor="transparent",M.tipPosition={x:0,y:0},M.tipBase1Position={x:0,y:0},M.tipBase2Position={x:0,y:0},M.tipMoving=!1,M.color=K.defaultStrokeColor,M.bgColor=K.defaultFillColor,M.fontFamily=K.defaultFontFamily,M.defaultSize={x:100,y:30},M.setBgColor=M.setBgColor.bind(M),M.getTipPoints=M.getTipPoints.bind(M),M.positionTip=M.positionTip.bind(M),M.setTipPoints=M.setTipPoints.bind(M),M.colorPanel=new se("Text color",K.defaultColorSet,M.color,''),M.colorPanel.onColorChanged=M.setColor,M.bgColorPanel=new se("Fill color",K.defaultColorSet,M.bgColor,ee),M.bgColorPanel.onColorChanged=M.setBgColor,M.fontFamilyPanel=new Te("Font",K.defaultFontFamilies,K.defaultFontFamily),M.fontFamilyPanel.onFontChanged=M.setFont,M.tipGrip=new ke,M.tipGrip.visual.transform.baseVal.appendItem($.createTransform()),M.controlBox.appendChild(M.tipGrip.visual),M}return J(v,F),v.prototype.ownsTarget=function(x){return F.prototype.ownsTarget.call(this,x)||this.tipGrip.ownsTarget(x)||this.tip===x},v.prototype.createTip=function(){$.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=$.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},v.prototype.pointerDown=function(x,k){this.state==="new"&&F.prototype.pointerDown.call(this,x,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):F.prototype.pointerDown.call(this,x,k)},v.prototype.pointerUp=function(x){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,F.prototype.pointerUp.call(this,x);else{var k=this.state==="creating";F.prototype.pointerUp.call(this,x),this.setTipPoints(k),this.positionTip()}},v.prototype.manipulate=function(x){if(this.tipMoving){var k=this.unrotatePoint(x);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else F.prototype.manipulate.call(this,x)},v.prototype.setBgColor=function(x){this.bgRectangle&&this.tip&&($.setAttributes(this.bgRectangle,[["fill",x]]),$.setAttributes(this.tip,[["fill",x]])),this.bgColor=x,this.fillColorChanged(x)},v.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},v.prototype.setTipPoints=function(x){x===void 0&&(x=!1);var k=Math.min(this.height/2,15),K=this.height/5;x&&(this.tipPosition={x:k+K/2,y:this.height+20});var M=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?M',v}(De),we=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.fillColor="transparent",M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.opacity=1,M.strokeColor=K.defaultColor,M.strokeWidth=K.defaultStrokeWidth,M.strokeDasharray=K.defaultStrokeDasharray,M.fillColor=K.defaultFillColor,M.setStrokeColor=M.setStrokeColor.bind(M),M.setFillColor=M.setFillColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.setOpacity=M.setOpacity.bind(M),M.createVisual=M.createVisual.bind(M),M.strokePanel=new se("Line color",X(K.defaultColorSet,["transparent"]),K.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.fillPanel=new se("Fill color",X(K.defaultColorSet,["transparent"]),M.fillColor,ee),M.fillPanel.onColorChanged=M.setFillColor,M.strokeWidthPanel=new xe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ce("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M.opacityPanel=new Q("Opacity",K.defaultOpacitySteps,M.opacity),M.opacityPanel.onOpacityChanged=M.setOpacity,M}return J(v,F),v.prototype.ownsTarget=function(x){return!(!F.prototype.ownsTarget.call(this,x)&&x!==this.visual)},v.prototype.createVisual=function(){this.visual=$.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)},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.state==="new"&&(this.createVisual(),this.moveVisual(x),this._state="creating")},v.prototype.manipulate=function(x){F.prototype.manipulate.call(this,x)},v.prototype.resize=function(x){F.prototype.resize.call(this,x),this.setSize()},v.prototype.setSize=function(){F.prototype.setSize.call(this),$.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},v.prototype.pointerUp=function(x){F.prototype.pointerUp.call(this,x),this.setSize()},v.prototype.setStrokeColor=function(x){this.strokeColor=x,this.visual&&$.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(x),this.stateChanged()},v.prototype.setFillColor=function(x){this.fillColor=x,this.visual&&$.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(x),this.stateChanged()},v.prototype.setStrokeWidth=function(x){this.strokeWidth=x,this.visual&&$.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},v.prototype.setStrokeDasharray=function(x){this.strokeDasharray=x,this.visual&&$.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},v.prototype.setOpacity=function(x){this.opacity=x,this.visual&&$.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},F.prototype.getState.call(this));return x.typeName=v.typeName,x},v.prototype.restoreState=function(x){var k=x;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),F.prototype.restoreState.call(this,x),this.setSize()},v.prototype.scale=function(x,k){F.prototype.scale.call(this,x,k),this.setSize()},v.typeName="EllipseMarker",v.title="Ellipse marker",v.icon='',v}(me),Fe=function(F){function v(x,k,K){return F.call(this,x,k,K)||this}return J(v,F),Object.defineProperty(v.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),v.prototype.ownsTarget=function(x){return!(!F.prototype.ownsTarget.call(this,x)&&x!==this.tip1&&x!==this.tip2)},v.prototype.createTips=function(){this.tip1=$.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($.createTransform()),this.visual.appendChild(this.tip1),this.tip2=$.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($.createTransform()),this.visual.appendChild(this.tip2)},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.state==="creating"&&this.createTips()},v.prototype.adjustVisual=function(){if(F.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&($.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()]]),$.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 x=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(x,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var K=this.tip2.transform.baseVal.getItem(0);K.setRotate(x+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(K,0)}},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=F.prototype.getState.call(this);return x.typeName=v.typeName,x},v.prototype.restoreState=function(x){F.prototype.restoreState.call(this,x),this.createTips(),this.adjustVisual()},v.typeName="MeasurementMarker",v.title="Measurement marker",v.icon='',v}(Be),Ge=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.strokePanel.colors=K.defaultColorSet,M.fillColor="transparent",M}return J(v,F),Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=F.prototype.getState.call(this);return x.typeName=v.typeName,x},v.typeName="EllipseFrameMarker",v.title="Ellipse frame marker",v.icon='',v}(we),Je=function(){function F(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(F.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),F.prototype.addUndoStep=function(v){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(v)||(this.undoStack.push(v),JSON.stringify(this.lastRedoStep)!==JSON.stringify(v)&&this.redoStack.splice(0,this.redoStack.length))},F.prototype.replaceLastUndoStep=function(v){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=v)},F.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},F.prototype.undo=function(){if(this.undoStack.length>1){var v=this.undoStack.pop();return v!==void 0&&this.redoStack.push(v),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},F.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},F}(),ze=function(F){function v(x,k,K){var M=F.call(this,x,k,K)||this;return M.strokeColor="transparent",M.strokeWidth=0,M.strokeDasharray="",M.curveX=0,M.curveY=0,M.manipulationStartCurveX=0,M.manipulationStartCurveY=0,M.setStrokeColor=M.setStrokeColor.bind(M),M.setStrokeWidth=M.setStrokeWidth.bind(M),M.setStrokeDasharray=M.setStrokeDasharray.bind(M),M.positionGrips=M.positionGrips.bind(M),M.addControlGrips=M.addControlGrips.bind(M),M.adjustVisual=M.adjustVisual.bind(M),M.setupControlBox=M.setupControlBox.bind(M),M.resize=M.resize.bind(M),M.strokeColor=K.defaultColor,M.strokeWidth=K.defaultStrokeWidth,M.strokeDasharray=K.defaultStrokeDasharray,M.strokePanel=new se("Line color",K.defaultColorSet,K.defaultColor),M.strokePanel.onColorChanged=M.setStrokeColor,M.strokeWidthPanel=new xe("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),M.strokeWidthPanel.onWidthChanged=M.setStrokeWidth,M.strokeStylePanel=new Ce("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),M.strokeStylePanel.onStyleChanged=M.setStrokeDasharray,M}return J(v,F),v.prototype.ownsTarget=function(x){return!(!F.prototype.ownsTarget.call(this,x)&&x!==this.visual&&x!==this.selectorCurve&&x!==this.visibleCurve&&!this.curveGrip.ownsTarget(x))},v.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},v.prototype.createVisual=function(){this.visual=$.createGroup(),this.selectorCurve=$.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=$.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)},v.prototype.pointerDown=function(x,k){F.prototype.pointerDown.call(this,x,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=x.x,this.curveY=x.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},v.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),$.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),$.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),$.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},v.prototype.setupControlBox=function(){F.prototype.setupControlBox.call(this),this.curveControlLine1=$.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=$.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)},v.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,F.prototype.addControlGrips.call(this)},v.prototype.positionGrips=function(){F.prototype.positionGrips.call(this);var x=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-x/2,this.curveY-x/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()))},v.prototype.manipulate=function(x){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+x.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+x.y-this.manipulationStartY),F.prototype.manipulate.call(this,x)},v.prototype.resize=function(x){this.activeGrip===this.curveGrip&&(this.curveX=x.x,this.curveY=x.y),F.prototype.resize.call(this,x),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},v.prototype.setStrokeColor=function(x){this.strokeColor=x,this.adjustVisual(),this.colorChanged(x)},v.prototype.setStrokeWidth=function(x){this.strokeWidth=x,this.adjustVisual()},v.prototype.setStrokeDasharray=function(x){this.strokeDasharray=x,this.adjustVisual()},v.prototype.scale=function(x,k){this.curveX=this.curveX*x,this.curveY=this.curveY*k,F.prototype.scale.call(this,x,k)},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var x=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},F.prototype.getState.call(this));return x.typeName=v.typeName,x},v.prototype.restoreState=function(x){F.prototype.restoreState.call(this,x);var k=x;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},v.typeName="CurveMarker",v.title="Curve marker",v.icon='',v}(Ue),qe=function(){function F(v,x){x===void 0&&(x=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=v,this.cancelable=x}return Object.defineProperty(F.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),F.prototype.preventDefault=function(){this._defaultPrevented=!0},F}(),nt=function(F){function v(x,k,K){var M=F.call(this,x,!1)||this;return M.dataUrl=k,M.state=K,M}return J(v,F),v}(qe),$e=function(F){function v(x,k,K){K===void 0&&(K=!1);var M=F.call(this,x,K)||this;return M.marker=k,M}return J(v,F),v}(qe),gt=function(){function F(){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 F.prototype.addEventListener=function(v,x){this[v].push(x)},F.prototype.removeEventListener=function(v,x){var k=this[v].indexOf(x);k>-1&&this[v].splice(k,1)},F}(),ht=function(){function F(v){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Se,this._isOpen=!1,this.undoRedoManager=new Je,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 gt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=F.instanceCounter++,this.styles=new Ie(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=v,this.targetRoot=document.body,this.width=v.clientWidth,this.height=v.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(F.prototype,"ALL_MARKER_TYPES",{get:function(){return[Oe,de,le,De,Ge,we,q,ve,Fe,z,Be,ze]},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Oe,de,le,De,we,q,ve]},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Oe,de,le,De,q]},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(v){var x=this;this._availableMarkerTypes.splice(0),v.forEach(function(k){if(typeof k=="string"){var K=x.ALL_MARKER_TYPES.find(function(M){return M.typeName===k});K!==void 0&&x._availableMarkerTypes.push(K)}else x._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(v){this._zoomLevel=v,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(F.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),F.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ye.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},F.prototype.show=function(){var v=this;this.styles.styleSheetRoot===void 0&&Re.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Re.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(x){return x(new qe(v))})},F.prototype.render=function(){return Z(this,void 0,void 0,function(){var v;return he(this,function(x){switch(x.label){case 0:return this.setCurrentMarker(),(v=new Le).naturalSize=this.renderAtNaturalSize,v.imageType=this.renderImageType,v.imageQuality=this.renderImageQuality,v.markersOnly=this.renderMarkersOnly,v.width=this.renderWidth,v.height=this.renderHeight,[4,v.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return x.sent(),[4,v.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,x.sent()]}})})},F.prototype.close=function(v){var x=this;if(v===void 0&&(v=!1),this.isOpen){var k=!1;v||this.eventListeners.beforeclose.forEach(function(K){var M=new qe(x,!0);K(M),M.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(K){return K(new qe(x))}),this.detachEvents(),this._isOpen=!1)}},F.prototype.addMarkersToToolbar=function(){for(var v,x=[],k=0;kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*v:this.editorCanvas.clientWidth,k=x',v.title="Powered by marker.js",v.style.display="grid",v.style.alignItems="center",v.style.justifyItems="center",v.style.padding="3px",v.style.width="20px",v.style.height="20px",this.logoUI.appendChild(v),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},F.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")},F.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"},F.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},F.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 v=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=v+"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 Ee(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(v),1),v.dispose()},F.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())},F.prototype.toolbarButtonClicked=function(v,x){if(v==="marker"&&x!==void 0)this.createNewMarker(x);else if(v==="action")switch(x){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()}},F.prototype.deleteSelectedMarker=function(){var v=this;if(this._currentMarker!==void 0){var x=!1;if(this.eventListeners.markerbeforedelete.forEach(function(K){var M=new $e(v,v._currentMarker,!0);K(M),M.defaultPrevented&&(x=!0)}),!x){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(K){return K(new $e(v,k))})}}},F.prototype.clear=function(){var v=this,x=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ne){var Me=new $e(v,void 0,!0);ne(Me),Me.defaultPrevented&&(x=!0)}),!x)){this.setCurrentMarker();for(var k=function(ne){var Me=K.markers[ne];K.setCurrentMarker(K.markers[ne]),K._currentMarker.dispose(),K.markerImage.removeChild(K._currentMarker.container),K.markers.splice(K.markers.indexOf(K._currentMarker),1),K.eventListeners.markerdelete.forEach(function(je){return je(new $e(v,Me))})},K=this,M=this.markers.length-1;M>=0;M--)k(M);this.addUndoStep()}},Object.defineProperty(F.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),F.prototype.showNotesEditor=function(){var v;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=(v=this._currentMarker.notes)!==null&&v!==void 0?v:"",this.overlayContainer.appendChild(this.notesArea))},F.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)},F.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},F.prototype.addUndoStep=function(){var v=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var x=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===x.width&&k.height===x.height){var K=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(x),K1&&this.panTo({x:v.clientX,y:v.clientY}))},F.prototype.onPointerUp=function(v){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(v.clientX,v.clientY)),this.isDragging=!1,this.addUndoStep()},F.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},F.prototype.onKeyUp=function(v){this._currentMarker===void 0||this.notesArea!==void 0||v.key!=="Delete"&&v.key!=="Backspace"||this.deleteSelectedMarker()},F.prototype.clientToLocalCoordinates=function(v,x){var k=this.markerImage.getBoundingClientRect();return{x:(v-k.left)/this.zoomLevel,y:(x-k.top)/this.zoomLevel}},F.prototype.onWindowResize=function(){this.positionUI()},F.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var v=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=v+"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()},F.prototype.addLicenseKey=function(v){ye.addKey(v)},F.prototype.addEventListener=function(v,x){this.eventListeners.addEventListener(v,x)},F.prototype.removeEventListener=function(v,x){this.eventListeners.removeEventListener(v,x)},F.prototype.renderState=function(v){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(v),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(F.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),F.prototype.focus=function(){var v=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(x){return x(new qe(v))}))},F.prototype.blur=function(){var v=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(x){return x(new qe(v))}))},F.instanceCounter=0,F}();/* **********************************
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 bt=function(F,v){return(bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,k){x.__proto__=k}||function(x,k){for(var K in k)Object.prototype.hasOwnProperty.call(k,K)&&(x[K]=k[K])})(F,v)};function pt(F,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function x(){this.constructor=F}bt(F,v),F.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}function it(F,v,x,k){return new(x||(x=Promise))(function(K,M){function ne(He){try{je(k.next(He))}catch(Pe){M(Pe)}}function Me(He){try{je(k.throw(He))}catch(Pe){M(Pe)}}function je(He){var Pe;He.done?K(He.value):(Pe=He.value,Pe instanceof x?Pe:new x(function(Xe){Xe(Pe)})).then(ne,Me)}je((k=k.apply(F,v||[])).next())})}function _t(F,v){var x,k,K,M,ne={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return M={next:Me(0),throw:Me(1),return:Me(2)},typeof Symbol=="function"&&(M[Symbol.iterator]=function(){return this}),M;function Me(je){return function(He){return function(Pe){if(x)throw new TypeError("Generator is already executing.");for(;ne;)try{if(x=1,k&&(K=2&Pe[0]?k.return:Pe[0]?k.throw||((K=k.return)&&K.call(k),0):k.next)&&!(K=K.call(k,Pe[1])).done)return K;switch(k=0,K&&(Pe=[2&Pe[0],K.value]),Pe[0]){case 0:case 1:K=Pe;break;case 4:return ne.label++,{value:Pe[1],done:!1};case 5:ne.label++,k=Pe[1],Pe=[0];continue;case 7:Pe=ne.ops.pop(),ne.trys.pop();continue;default:if(!(K=ne.trys,(K=K.length>0&&K[K.length-1])||Pe[0]!==6&&Pe[0]!==2)){ne=0;continue}if(Pe[0]===3&&(!K||Pe[1]>K[0]&&Pe[1]0&&x>0){var k=new Ze(v,x),K=k.ratio>=1?20:k.getHorizontalLength(20),M=k.ratio<1?20:k.getVerticalLength(20),ne=document.createElementNS("http://www.w3.org/2000/svg","svg");ne.setAttribute("xmlns","http://www.w3.org/2000/svg"),ne.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ne);var Me=Ve.createDefs();ne.appendChild(Me);var je=Ve.createElement("clipPath",[["id","text-bg-clip"]]);Me.appendChild(je);var He=Ve.createPath(Ve.getHollowRectanglePath((24-K)/2,(24-M)/2,K,M,(24-K)/2+2,(24-M)/2+2,K-4,M-4));ne.appendChild(He);var Pe=Ve.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pe.appendChild(Ve.createTSpan(v+":"+x)),ne.appendChild(Pe);var Xe=Pe.getBBox();Ve.setAttributes(Pe,[["x",((24-Xe.width)/2).toString()],["y",((24-Xe.height)/2-Xe.y).toString()]]);var Ke=Ve.createPath(Ve.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Xe.width))/2,(24-Math.ceil(Xe.height))/2,Math.ceil(Xe.width),Math.ceil(Xe.height)));return je.appendChild(Ke),Ve.setAttributes(He,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ne),ne.outerHTML}return''},F}(),st=function(F){function v(x,k,K){var M=F.call(this,x,k)||this;return M.isDropdownOpen=!1,M.onClick=M.dropdownButtonClicked,M.dropdownButtons=K,M}return pt(v,F),v.prototype.setupDropdown=function(){var x=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=x.className,k.colorsClassName=x.colorsClassName,x.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},v.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},v.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},v.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},v.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},v.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},v}(ut),ot=function(){function F(v,x){this.GRIP_SIZE=10,this.color=v,this.fillColor=x,this.visual=Ve.createGroup(),this.visual.appendChild(Ve.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ve.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return F.prototype.ownsTarget=function(v){return v===this.visual||v===this.visual.childNodes[0]||v===this.visual.childNodes[1]},F.prototype.setCenter=function(v,x){this.visual.childNodes.forEach(function(k){return Ve.setAttributes(k,[["cx",v.toString()],["cy",x.toString()]])})},F}(),lt=function(){function F(v,x,k,K){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=v,this.canvasHeight=x,this.margin=k,this.container=K,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(F.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(v){this._aspectRatio=v,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(v){this._isGridVisible=v,this.gridContainer&&Ve.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(v){this._zoomFactor=v,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),F.prototype.open=function(){var v=this;this.cropShadeElement=Ve.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ve.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var x=0;xthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-x.height/2),Ve.setAttributes(this.cropRectElement,[["x",x.x.toString()],["y",x.y.toString()],["width",x.width.toString()],["height",x.height.toString()]]);var k=x.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(M,ne){var Me=x.y+k*(ne+1);Ve.setAttributes(M,[["x1",""+x.x],["y1",""+Me],["x2",""+(x.x+x.width)],["y2",""+Me]])});var K=x.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(M,ne){var Me=x.x+K*(ne+1);Ve.setAttributes(M,[["x1",""+Me],["y1",""+x.y],["x2",""+Me],["y2",""+(x.y+x.height)]])}),Ve.setAttributes(this.cropShadeElement,[["d",Ve.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,x.x,x.y,x.width,x.height)]]),this.topLeftGrip.setCenter(x.x,x.y),this.topRightGrip.setCenter(x.x+x.width,x.y),this.bottomLeftGrip.setCenter(x.x,x.y+x.height),this.bottomRightGrip.setCenter(x.x+x.width,x.y+x.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},F.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)},F.prototype.clientToLocalCoordinates=function(v,x){var k=this.container.getBoundingClientRect();return{x:v-k.left+this.margin,y:x-k.top+this.margin}},F.prototype.onPointerDown=function(v){this.container.setPointerCapture(v.pointerId),this.previousPoint=this.clientToLocalCoordinates(v.clientX,v.clientY),this.cropRectElement===v.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(v.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(v.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(v.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(v.target)&&(this.activeGrip=this.bottomRightGrip)},F.prototype.onPointerMove=function(v){if(this.isMoving)this.move(this.clientToLocalCoordinates(v.clientX,v.clientY));else if(this.activeGrip){var x=this.clientToLocalCoordinates(v.clientX,v.clientY);this.resize(x)}v.preventDefault()},F.prototype.onPointerUp=function(v){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(v.pointerId)},F.prototype.move=function(v){var x=v.x-this.previousPoint.x,k=v.y-this.previousPoint.y;this.zoomFactor!==1&&(x=-x/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+x),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=v},F.prototype.resize=function(v){var x=Object.assign({},this.cropRect),k=v.x-this.previousPoint.x,K=v.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:x.x+kthis.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-x.width),x.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(x.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),x.height=this.aspectRatio.getVerticalLength(x.width)):(x.y+=K,x.height=this.cropRect.y+this.cropRect.height-x.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?x.height=this.aspectRatio.getVerticalLength(x.width):x.height+=K}x.width<10&&(x.x=this.cropRect.x,x.width=10),x.height<10&&(x.y=this.cropRect.y,x.height=10),this.previousPoint=v,x.x>=this.margin&&x.y>=this.margin&&x.x-this.margin+x.width<=this.canvasWidth&&x.y-this.margin+x.height<=this.canvasHeight&&(this.cropRect=x,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},F.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var v=this.cropRect.x+this.cropRect.width/2,x=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),K=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=v-this.cropRect.width/2,this.cropRect.y=x-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)}},F.prototype.getRescaledRect=function(v,x,k,K,M,ne){var Me=k/v,je=K/x;return{x:(M.x-ne)*Me+ne,y:(M.y-ne)*je+ne,width:M.width*Me,height:M.height*je}},F.prototype.scaleCanvas=function(v,x){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,v,x,this.cropRect,this.margin);this.canvasWidth=v,this.canvasHeight=x,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},F}(),ct=function(){function F(v){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=v,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(F.prototype,"angle",{get:function(){return this._angle},set:function(v){this._angle=v,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),F.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},F.prototype.onPointerDown=function(v){this.controlContainer.setPointerCapture(v.pointerId),this.isDragging=!0,this.previousPoint={x:v.clientX,y:v.clientY}},F.prototype.onPointerMove=function(v){this.isDragging&&(this.onAngleChange&&this.onAngleChange((v.clientX-this.previousPoint.x)/5),this.previousPoint.x=v.clientX)},F.prototype.onPointerUp=function(v){this.isDragging&&this.onAngleChange&&this.onAngleChange((v.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(v.pointerId)},F.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var v=this.angleLabelText.getBBox();Ve.setAttributes(this.angleLabelElement,[["x",((this.width-v.width)/2).toString()],["y",(this.height/2).toString()]])}},F.prototype.positionScaleShape=function(){if(this.scaleShape){var v=this.scaleShape.transform.baseVal.getItem(0);v.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(v,0)}},F.prototype.getVisual=function(){var v=document.createElementNS("http://www.w3.org/2000/svg","svg");v.setAttribute("xmlns","http://www.w3.org/2000/svg"),v.setAttribute("width",this.width+"px"),v.setAttribute("height",this.height+"px"),v.setAttribute("viewBox","0 0 "+this.width+" "+this.height),v.style.flexShrink="0",document.body.appendChild(v);for(var x="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var K=k%5==0?this.height/3:this.height/6;x+="h4v"+-K+"h1v"+K}x+="v1H0Z",this.scaleShape=Ve.createPath(x);var M=Ve.createTransform();this.scaleShape.transform.baseVal.appendItem(M),v.appendChild(this.scaleShape),this.angleLabelElement=Ve.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ve.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ne=Ve.createTSpan("");return ne.innerHTML="°",this.angleLabelElement.appendChild(ne),v.appendChild(this.angleLabelElement),document.body.removeChild(v),v},F}(),Ct=function(){function F(){this.naturalSize=!1,this.imageType="image/png"}return F.prototype.rasterize=function(v,x,k,K,M,ne,Me){var je=this;return new Promise(function(He){var Pe=document.createElement("canvas");Pe.width=v.width.baseVal.value-2*K,Pe.height=v.height.baseVal.value-2*K;var Xe=1,Ke=1;je.naturalSize===!0?(Xe=x.naturalWidth/(v.width.baseVal.value-2*K)/ne,Ke=x.naturalHeight/(v.height.baseVal.value-2*K)/Me,Pe.width=x.naturalWidth/ne,Pe.height=x.naturalHeight/Me):je.width!==void 0&&je.height!==void 0&&(Xe=je.width/k.width,Ke=je.height/k.height,Pe.width*=Xe,Pe.height*=Ke);var at=Pe.getContext("2d");at.translate(Pe.width/2,Pe.height/2),at.rotate(M*Math.PI/180),at.scale(ne,Me),at.translate(-Pe.width/2,-Pe.height/2),at.drawImage(x,0,0,Pe.width,Pe.height);var St=document.createElement("canvas");St.width=k.width*Xe,St.height=k.height*Ke,St.getContext("2d").putImageData(at.getImageData((k.x-K)*Xe,(k.y-K)*Ke,k.width*Xe,k.height*Ke),0,0),He(St.toDataURL(je.imageType,je.imageQuality))})},F}(),Mt=function(){function F(v){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=F.instanceCounter++,this.styles=new At(this.instanceNo),this.target=v,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(F.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(v){this._zoomToCropEnabled=v,v?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(v){this._isGridVisible=v,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"gridLines",{get:function(){return this._gridLines},set:function(v){this._gridLines=v,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(v){this._rotationAngle=v,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"aspectRatio",{get:function(){var v;return(v=this._aspectRatio)!==null&&v!==void 0?v:this.aspectRatios[0]},set:function(v){this._aspectRatio=v},enumerable:!1,configurable:!0}),F.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},F.prototype.show=function(){this.showUI(),this.open()},F.prototype.close=function(v){v===void 0&&(v=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),v||this.closeEventListeners.forEach(function(x){return x()}),this._isOpen=!1)},F.prototype.addRenderEventListener=function(v){this.renderEventListeners.push(v)},F.prototype.removeRenderEventListener=function(v){this.renderEventListeners.indexOf(v)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(v),1)},F.prototype.addCloseEventListener=function(v){this.closeEventListeners.push(v)},F.prototype.removeCloseEventListener=function(v){this.closeEventListeners.indexOf(v)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(v),1)},F.prototype.setupResizeObserver=function(){var v=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){v.resize(v.target.clientWidth,v.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))},F.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var v=1*this.target.clientWidth/this.target.clientHeight,x=this.contentDiv.clientWidth/v>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*v:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=x+2*this.CANVAS_MARGINv+this.CANVAS_MARGIN?this.target.offsetTop-(v+this.CANVAS_MARGIN):0;this.coverDiv.style.top=x+"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},F.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},F.prototype.addTopToolbar=function(){var v=this;this.topToolbar=new rt,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 x=new vt;x.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(x);var k=[];this.aspectRatios.forEach(function(Ke){var at=new ut(et.getIcon(Ke.horizontal,Ke.vertical),Ke.horizontal===0&&Ke.vertical===0?"FREE":Ke.horizontal+":"+Ke.vertical);at.onClick=function(){return v.ratioButtonClicked(Ke)},k.push(at)}),this.aspectRatioButton=new st(et.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,x.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var K=new ut('',"Toggle grid");K.isActive=this.isGridVisible,K.onClick=function(){v.isGridVisible=!v.isGridVisible,K.isActive=v.isGridVisible},x.addButton(K);var M=new ut('',"Zoom to selection");if(M.isActive=this.zoomToCropEnabled,M.onClick=function(){v.zoomToCropEnabled=!v.zoomToCropEnabled,M.isActive=v.zoomToCropEnabled},x.addButton(M),!Tt.isLicensed){var ne=new tt;this.topToolbar.addElementBlock(ne);var Me=document.createElement("div");Me.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='',Me.appendChild(je),ne.addElement(Me)}var He=new vt;He.minWidth=3*this.toolbarHeight+"px",He.contentAlign="end",this.topToolbar.addButtonBlock(He);var Pe=new ut('',"OK");Pe.onClick=this.startRenderAndClose,He.addButton(Pe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Xe=new ut('',"Close");Xe.onClick=this.close,He.addButton(Xe),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Xe.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},F.prototype.addBottomToolbar=function(){var v=this;this.bottomToolbar=new rt,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 x=new vt;x.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(x);var k=new ut('',"Rotate left");k.onClick=this.rotateLeftButtonClicked,x.addButton(k);var K=new ut('',"Rotate right");K.onClick=this.rotateRightButtonClicked,x.addButton(K);var M=new tt;M.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(M),this.straightener=new ct("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(He){v.rotateBy(He),v.straightener.angle=v.rotationAngle},M.addElement(this.straightener.getUI());var ne=new vt;ne.minWidth=2*this.toolbarHeight+"px",ne.contentAlign="end",this.bottomToolbar.addButtonBlock(ne);var Me=new ut('',"Flip horizontal");Me.onClick=this.flipHorizontallyButtonClicked,ne.addButton(Me);var je=new ut('',"Flip vertical");je.onClick=this.flipVerticallyButtonClicked,ne.addButton(je)},F.prototype.ratioButtonClicked=function(v){this.aspectRatio=v,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},F.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=et.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},F.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ze(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},F.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},F.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},F.prototype.restoreState=function(v){if(v){var x=this.cropLayer.getRescaledRect(v.width,v.height,this.imageWidth,this.imageHeight,v.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(x),this.cropRectChanged(x),this.flippedHorizontally=v.flippedHorizontally,this.flippedVertically=v.flippedVertically,this.applyFlip(),this.rotationAngle=v.rotationAngle,this.applyRotation()}},F.prototype.clientToLocalCoordinates=function(v,x){var k=this.cropImage.getBoundingClientRect();return{x:v-k.left,y:x-k.top}},F.prototype.onWindowResize=function(){this.positionUI()},F.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var v=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=v+"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()},F.prototype.rotateLeftButtonClicked=function(){var v=this.rotationAngle-90;this.rotationAngle%90!=0&&(v+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(v)},F.prototype.rotateRightButtonClicked=function(){var v=this.rotationAngle+90;this.rotationAngle%90!=0&&(v-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(v)},F.prototype.rotateTo=function(v){v=(v=v>180?v-360:v)<=-180?v+360:v,this.rotationAngle=v,this.applyRotation()},F.prototype.rotateBy=function(v){this.rotateTo((this.rotationAngle+v)%360)},F.prototype.applyRotation=function(){var v=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var x=this.editingTargetRotationContainer.transform.baseVal.getItem(0);x.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(x,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=v},F.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},F.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},F.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},F.prototype.startRenderAndClose=function(){return it(this,void 0,void 0,function(){var v,x;return _t(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return v=k.sent(),x=this.getState(),this.renderEventListeners.forEach(function(K){return K(v,x)}),this.close(!0),[2]}})})},F.prototype.render=function(){return it(this,void 0,void 0,function(){var v;return _t(this,function(x){switch(x.label){case 0:return(v=new Ct).naturalSize=this.renderAtNaturalSize,v.imageType=this.renderImageType,v.imageQuality=this.renderImageQuality,v.width=this.renderWidth,v.height=this.renderHeight,this.unzoomFromCrop(),Ve.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,v.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 x.sent(),[4,v.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,x.sent()]}})})},F.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ye("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 Ye("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ye("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var v=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ye("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*v)+`px;
height: `+(this.toolbarHeight-2*v)+`px;
padding: `+v+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ye("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ye("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new We("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new We("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ye("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 Ye("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ye("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 Ye("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*v)+`px;
padding: `+v+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ye("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},F.instanceCounter=0,F}(),Nt=W("8hTe"),Wt=W.n(Nt),jt=/]*>/g;function Vt(F){var v=document.createElement("div");return v.innerHTML=F,v.childNodes.length===0?"":v.childNodes[0].nodeValue}var Kt=ue.a=function(F){var v=F.value,x=v===void 0?"":v,k=F.edit,K=k===void 0?!1:k,M=F.className,ne=F.showTextOnly,Me=F.showLines,je=F.replaces,He=F.zoomImg,Pe=F.hasMask,Xe=F.style,Ke=Xe===void 0?{}:Xe,at=F.stylesPrev,St=at===void 0?{}:at,xt=String(x),Et=Object(A.useRef)(),Ot=Object(A.useRef)(),Ht=Object(A.useState)(""),Ft=Object(B.a)(Ht,2),yt=Ft[0],Rt=Ft[1],Gt=Object(A.useState)("office"),Lt=Object(B.a)(Gt,2),Yt=Lt[0],It=Lt[1],kt=function(){var mt=new Mt(Ot.current);mt.displayMode="popup",mt.addRenderEventListener(function(){var Ut=Object(R.a)(e.a.mark(function ft(Bt){var wt;return e.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return Et.current.style.display="none",Pt.next=3,Object(fe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Bt}});case 3:wt=Pt.sent,wt!=null&&wt.id&&je(Ot.current.getAttribute("src").replace(V.a.API_SERVER,""),"/api/attachments/".concat(wt==null?void 0:wt.id,"?type=").concat(wt.content_type));case 5:case"end":return Pt.stop()}},ft)}));return function(ft){return Ut.apply(this,arguments)}}()),mt.show()},Zt=function(){var mt=new ht(Ot.current);mt.settings.displayMode="popup",mt.addEventListener("render",function(){var Ut=Object(R.a)(e.a.mark(function ft(Bt){var wt;return e.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(Et.current.style.display="none",!Ot.current){Pt.next=6;break}return Pt.next=4,Object(fe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Bt.dataUrl}});case 4:wt=Pt.sent,wt!=null&&wt.id&&je(Ot.current.getAttribute("src").replace(V.a.API_SERVER,""),"/api/attachments/".concat(wt==null?void 0:wt.id,"?type=").concat(wt.content_type));case 6:case"end":return Pt.stop()}},ft)}));return function(ft){return Ut.apply(this,arguments)}}()),mt.show(),window.markerArea=mt},Xt=Object(A.useMemo)(function(){Et.current&&(Et.current.style.zIndex=-1);try{var Dt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,mt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ut=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;xt=xt.replace(Dt,"("+V.a.API_SERVER+"/api/attachments/").replace(mt,'"'+V.a.API_SERVER+"/api/attachments/").replace(Ut,'"'+V.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 ft=P(xt),Bt=T();if(xt.match(/\[TOC\]/)&&(ft=ft.replace("[TOC]
",E()),y()),ft=ft.replace(/(__special_katext_id_\d+__)/g,function(Qt,Pt){var Jt=Bt[Pt],ti=Jt.type,ii=Jt.expression;return Object(ae.renderToString)(Vt(ii)||"",{displayMode:ti==="block",throwOnError:!1,output:"html"})}),ft=ft.replace(/▁/g,"\u2581\u2581\u2581"),b(),ne){var wt=document.createElement("div");return wt.innerHTML=ft,wt.innerText}return setTimeout(function(){return qt()},500),ft},[xt]),zt=Object(A.useRef)();m.WebkitLineClamp=Me,Me&&(Ke=Object(L.a)(Object(L.a)({},Ke),m));function $t(Dt){var mt=Dt.target;if(mt.tagName.toUpperCase()==="IMG"){if(He){var Ut=mt.getAttribute("src");Rt(Ut),It("image")}}else if(mt.tagName.toUpperCase()==="A"){var ft=mt.getAttribute("href");if(ft.indexOf("office")>-1)Dt.preventDefault(),Rt(ft),It("office");else if(ft.indexOf("application/pdf")>-1)Dt.preventDefault(),Rt(ft),It("pdf");else if(ft.indexOf("text/html")>-1)Dt.preventDefault(),Rt(ft),It("html");else if(ft.startsWith("#")){Dt.preventDefault();var Bt=document.getElementById(ft.replace("#",""));Bt&&Bt.scrollIntoView(!0)}}}var qt=function(){var mt,Ut=(mt=zt.current)===null||mt===void 0?void 0:mt.querySelectorAll("video");Ut==null||Ut.forEach(function(ft){if(ft.oncontextmenu=function(){return!1},ft.src.indexOf(".m3u8")>-1&&!ft.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var Bt=new G.a;Bt.loadSource(ft.src),Bt.attachMedia(ft)}}})};Object(A.useEffect)(function(){if(zt.current&&Xt&&(Xt.match(jt)&&window.PR.prettyPrint()),zt.current)return zt.current.addEventListener("click",$t),function(){zt.current.removeEventListener("click",$t),b(),y()}},[Xt,zt.current,$t]);var ei=function(mt){if(!K)return;mt.target.nodeName==="IMG"?(Et.current.style.zIndex=1,Et.current.style.display="flex",Et.current.style.width=mt.target.clientWidth+"px",Et.current.style.height=mt.target.clientHeight+"px",Et.current.style.top=mt.target.offsetTop+"px",Et.current.style.left=mt.target.offsetLeft+"px",Ot.current.src=mt.target.getAttribute("src")):Et.current.style.display="none"};return f.a.createElement("div",{style:{position:"relative"}},f.a.createElement("div",{ref:zt,style:Object(L.a)({},Ke),className:"".concat(M||""," markdown-body ").concat(Wt.a.mdBody),onMouseOver:ei,dangerouslySetInnerHTML:{__html:Xt}}),f.a.createElement("div",{ref:Et,className:Wt.a.button},f.a.createElement(H.a,null,f.a.createElement(j.a,{onClick:function(){return kt()}},"\u88C1\u526A"),f.a.createElement(j.a,{onClick:function(){return Zt()}},"\u7F16\u8F91"))),f.a.createElement("img",{ref:Ot,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),f.a.createElement(ie.a,{close:!0,data:yt,type:yt!=null&&yt.length?Yt:"",style:Object(L.a)({},St),onClose:function(){return Rt("")}}))}},BU3w:function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return R});var te=W("MNnm"),H="rc-util-key";function C(B){if(B.attachTo)return B.attachTo;var N=document.querySelector("head");return N||document.body}function j(B){var N,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(te.a)())return null;var A=document.createElement("style");if((N=e.csp)===null||N===void 0?void 0:N.nonce){var f;A.nonce=(f=e.csp)===null||f===void 0?void 0:f.nonce}A.innerHTML=B;var p=C(e),o=p.firstChild;return e.prepend&&p.prepend?p.prepend(A):e.prepend&&o?p.insertBefore(A,o):p.appendChild(A),A}var L=new Map;function R(B,N){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},A=C(e);if(!L.has(A)){var f=j("",e),p=f.parentNode;L.set(A,p),p.removeChild(f)}var o=Array.from(L.get(A).children).find(function(r){return r.tagName==="STYLE"&&r[H]===N});if(o){var a,n;if(((a=e.csp)===null||a===void 0?void 0:a.nonce)&&o.nonce!==((n=e.csp)===null||n===void 0?void 0:n.nonce)){var l;o.nonce=(l=e.csp)===null||l===void 0?void 0:l.nonce}return o.innerHTML!==B&&(o.innerHTML=B),o}var s=j(B,e);return s[H]=N,s}},"C/vA":function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return te});function te(H){const C=this;let j=!1,L;return function(){return j||(j=!0,L=H.apply(C,arguments)),L}}},"Cg/j":function(Qe,ue,W){"use strict";W.d(ue,"b",function(){return te}),W.d(ue,"a",function(){return H}),W.d(ue,"c",function(){return j}),W.d(ue,"d",function(){return L});var te;(function(R){R.serviceIds=new Map,R.DI_TARGET="$di$target",R.DI_DEPENDENCIES="$di$dependencies";function B(N){return N[R.DI_DEPENDENCIES]||[]}R.getServiceDependencies=B})(te||(te={}));const H=j("instantiationService");function C(R,B,N,e){B[te.DI_TARGET]===B?B[te.DI_DEPENDENCIES].push({id:R,index:N,optional:e}):(B[te.DI_DEPENDENCIES]=[{id:R,index:N,optional:e}],B[te.DI_TARGET]=B)}function j(R){if(te.serviceIds.has(R))return te.serviceIds.get(R);const B=function(N,e,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");C(B,N,A,!1)};return B.toString=()=>R,te.serviceIds.set(R,B),B}function L(R){return function(B,N,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");C(R,B,e,!0)}}},DlQD:function(Qe,ue,W){(function(te,H){Qe.exports=H()})(this,function(){"use strict";function te(de,re){for(var le=0;lede.length)&&(re=de.length);for(var le=0,z=new Array(re);le=de.length?{done:!0}:{done:!1,value:de[z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return le=de[Symbol.iterator](),le.next.bind(le)}function R(de,re){return re={exports:{}},de(re,re.exports),re.exports}var B=R(function(de){function re(){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 le(z){de.exports.defaults=z}de.exports={defaults:re(),getDefaults:re,changeDefaults:le}}),N=B.defaults,e=B.getDefaults,A=B.changeDefaults,f=/[&<>"']/,p=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,n={"&":"&","<":"<",">":">",'"':""","'":"'"},l=function(re){return n[re]};function s(de,re){if(re){if(f.test(de))return de.replace(p,l)}else if(o.test(de))return de.replace(a,l);return de}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(de){return de.replace(r,function(re,le){return le=le.toLowerCase(),le==="colon"?":":le.charAt(0)==="#"?le.charAt(1)==="x"?String.fromCharCode(parseInt(le.substring(2),16)):String.fromCharCode(+le.substring(1)):""})}var t=/(^|[^\[])\^/g;function y(de,re){de=de.source||de,re=re||"";var le={replace:function(Q,q){return q=q.source||q,q=q.replace(t,"$1"),de=de.replace(Q,q),le},getRegex:function(){return new RegExp(de,re)}};return le}var m=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(de,re,le){if(de){var z;try{z=decodeURIComponent(i(le)).replace(m,"").toLowerCase()}catch(Q){return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}re&&!g.test(le)&&(le=d(re,le));try{le=encodeURI(le).replace(/%25/g,"%")}catch(Q){return null}return le}var _={},u=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,c=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(de,re){_[" "+de]||(u.test(de)?_[" "+de]=de+"/":_[" "+de]=D(de,"/",!0)),de=_[" "+de];var le=de.indexOf(":")===-1;return re.substring(0,2)==="//"?le?re:de.replace(h,"$1")+re:re.charAt(0)==="/"?le?re:de.replace(c,"$1")+re:de+re}var T={exec:function(){}};function b(de){for(var re=1,le,z;re=0&&ve[Fe]==="\\";)we=!we;return we?"|":" |"}),z=le.split(/ \|/),Q=0;if(z.length>re)z.splice(re);else for(;z.length=z.length?Q.slice(z.length):Q}).join(`
`)}var ce=function(){function de(le){this.options=le||U}var re=de.prototype;return re.space=function(z){var Q=this.rules.block.newline.exec(z);if(Q)return Q[0].length>1?{type:"space",raw:Q[0]}:{raw:`
`}},re.code=function(z,Q){var q=this.rules.block.code.exec(z);if(q){var ee=Q[Q.length-1];if(ee&&ee.type==="paragraph")return{raw:q[0],text:q[0].trimRight()};var ve=q[0].replace(/^ {4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?ve:O(ve,`
`)}}},re.fences=function(z){var Q=this.rules.block.fences.exec(z);if(Q){var q=Q[0],ee=fe(q,Q[3]||"");return{type:"code",raw:q,lang:Q[2]?Q[2].trim():Q[2],text:ee}}},re.heading=function(z){var Q=this.rules.block.heading.exec(z);if(Q)return{type:"heading",raw:Q[0],depth:Q[1].length,text:Q[2]}},re.nptable=function(z){var Q=this.rules.block.nptable.exec(z);if(Q){var q={type:"table",header:G(Q[1].replace(/^ *| *\| *$/g,"")),align:Q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Q[3]?Q[3].replace(/\n$/,"").split(`
`):[],raw:Q[0]};if(q.header.length===q.align.length){var ee=q.align.length,ve;for(ve=0;ve ?/gm,"");return{type:"blockquote",raw:Q[0],text:q}}},re.list=function(z){var Q=this.rules.block.list.exec(z);if(Q){for(var q=Q[0],ee=Q[2],ve=ee.length>1,we=ee[ee.length-1]===")",Fe={type:"list",raw:q,ordered:ve,start:ve?+ee.slice(0,-1):"",loose:!1,items:[]},Ge=Q[0].match(this.rules.block.item),Je=!1,ze,qe,nt,$e,gt,ht,bt,pt=Ge.length,it=0;it1||this.options.smartLists&&nt!==ee)&&($e=Ge.slice(it+1).join(`
`),Fe.raw=Fe.raw.substring(0,Fe.raw.length-$e.length),it=pt-1)),gt=Je||/\n\n(?!\s*$)/.test(ze),it!==pt-1&&(Je=ze.charAt(ze.length-1)===`
`,gt||(gt=Je)),gt&&(Fe.loose=!0),ht=/^\[[ xX]\] /.test(ze),bt=void 0,ht&&(bt=ze[1]!==" ",ze=ze.replace(/^\[[ xX]\] +/,"")),Fe.items.push({type:"list_item",raw:q,task:ht,checked:bt,loose:gt,text:ze});return Fe}},re.html=function(z){var Q=this.rules.block.html.exec(z);if(Q)return{type:this.options.sanitize?"paragraph":"html",raw:Q[0],pre:!this.options.sanitizer&&(Q[1]==="pre"||Q[1]==="script"||Q[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Q[0]):V(Q[0]):Q[0]}},re.def=function(z){var Q=this.rules.block.def.exec(z);if(Q){Q[3]&&(Q[3]=Q[3].substring(1,Q[3].length-1));var q=Q[1].toLowerCase().replace(/\s+/g," ");return{tag:q,raw:Q[0],href:Q[2],title:Q[3]}}},re.table=function(z){var Q=this.rules.block.table.exec(z);if(Q){var q={type:"table",header:G(Q[1].replace(/^ *| *\| *$/g,"")),align:Q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Q[3]?Q[3].replace(/\n$/,"").split(`
`):[]};if(q.header.length===q.align.length){q.raw=Q[0];var ee=q.align.length,ve;for(ve=0;ve/i.test(ee[0])&&(Q=!1),!q&&/^<(pre|code|kbd|script)(\s|>)/i.test(ee[0])?q=!0:q&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ee[0])&&(q=!1),{type:this.options.sanitize?"text":"html",raw:ee[0],inLink:Q,inRawBlock:q,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):V(ee[0]):ee[0]}},re.link=function(z){var Q=this.rules.inline.link.exec(z);if(Q){var q=ae(Q[2],"()");if(q>-1){var ee=Q[0].indexOf("!")===0?5:4,ve=ee+Q[1].length+q;Q[2]=Q[2].substring(0,q),Q[0]=Q[0].substring(0,ve).trim(),Q[3]=""}var we=Q[2],Fe="";if(this.options.pedantic){var Ge=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(we);Ge?(we=Ge[1],Fe=Ge[3]):Fe=""}else Fe=Q[3]?Q[3].slice(1,-1):"";we=we.trim().replace(/^<([\s\S]*)>$/,"$1");var Je=ie(Q,{href:we&&we.replace(this.rules.inline._escapes,"$1"),title:Fe&&Fe.replace(this.rules.inline._escapes,"$1")},Q[0]);return Je}},re.reflink=function(z,Q){var q;if((q=this.rules.inline.reflink.exec(z))||(q=this.rules.inline.nolink.exec(z))){var ee=(q[2]||q[1]).replace(/\s+/g," ");if(ee=Q[ee.toLowerCase()],!ee||!ee.href){var ve=q[0].charAt(0);return{type:"text",raw:ve,text:ve}}var we=ie(q,ee,q[0]);return we}},re.strong=function(z,Q,q){q===void 0&&(q="");var ee=this.rules.inline.strong.start.exec(z);if(ee&&(!ee[1]||ee[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Q=Q.slice(-1*z.length);var ve=ee[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ve.lastIndex=0;for(var we;(ee=ve.exec(Q))!=null;)if(we=this.rules.inline.strong.middle.exec(Q.slice(0,ee.index+3)),we)return{type:"strong",raw:z.slice(0,we[0].length),text:z.slice(2,we[0].length-2)}}},re.em=function(z,Q,q){q===void 0&&(q="");var ee=this.rules.inline.em.start.exec(z);if(ee&&(!ee[1]||ee[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Q=Q.slice(-1*z.length);var ve=ee[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ve.lastIndex=0;for(var we;(ee=ve.exec(Q))!=null;)if(we=this.rules.inline.em.middle.exec(Q.slice(0,ee.index+2)),we)return{type:"em",raw:z.slice(0,we[0].length),text:z.slice(1,we[0].length-1)}}},re.codespan=function(z){var Q=this.rules.inline.code.exec(z);if(Q){var q=Q[2].replace(/\n/g," "),ee=/[^ ]/.test(q),ve=q.startsWith(" ")&&q.endsWith(" ");return ee&&ve&&(q=q.substring(1,q.length-1)),q=V(q,!0),{type:"codespan",raw:Q[0],text:q}}},re.br=function(z){var Q=this.rules.inline.br.exec(z);if(Q)return{type:"br",raw:Q[0]}},re.del=function(z){var Q=this.rules.inline.del.exec(z);if(Q)return{type:"del",raw:Q[0],text:Q[1]}},re.autolink=function(z,Q){var q=this.rules.inline.autolink.exec(z);if(q){var ee,ve;return q[2]==="@"?(ee=V(this.options.mangle?Q(q[1]):q[1]),ve="mailto:"+ee):(ee=V(q[1]),ve=ee),{type:"link",raw:q[0],text:ee,href:ve,tokens:[{type:"text",raw:ee,text:ee}]}}},re.url=function(z,Q){var q;if(q=this.rules.inline.url.exec(z)){var ee,ve;if(q[2]==="@")ee=V(this.options.mangle?Q(q[0]):q[0]),ve="mailto:"+ee;else{var we;do we=q[0],q[0]=this.rules.inline._backpedal.exec(q[0])[0];while(we!==q[0]);ee=V(q[0]),q[1]==="www."?ve="http://"+ee:ve=ee}return{type:"link",raw:q[0],text:ee,href:ve,tokens:[{type:"text",raw:ee,text:ee}]}}},re.inlineText=function(z,Q,q){var ee=this.rules.inline.text.exec(z);if(ee){var ve;return Q?ve=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):V(ee[0]):ee[0]:ve=V(this.options.smartypants?q(ee[0]):ee[0]),{type:"text",raw:ee[0],text:ve}}},de}(),J=P.noopTest,Z=P.edit,he=P.merge,X={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:J,table:J,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};X._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,X._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,X.def=Z(X.def).replace("label",X._label).replace("title",X._title).getRegex(),X.bullet=/(?:[*+-]|\d{1,9}[.)])/,X.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,X.item=Z(X.item,"gm").replace(/bull/g,X.bullet).getRegex(),X.list=Z(X.list).replace(/bull/g,X.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+X.def.source+")").getRegex(),X._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",X._comment=//,X.html=Z(X.html,"i").replace("comment",X._comment).replace("tag",X._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),X.paragraph=Z(X._paragraph).replace("hr",X.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",X._tag).getRegex(),X.blockquote=Z(X.blockquote).replace("paragraph",X.paragraph).getRegex(),X.normal=he({},X),X.gfm=he({},X.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*|$)"}),X.gfm.nptable=Z(X.gfm.nptable).replace("hr",X.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",X._tag).getRegex(),X.gfm.table=Z(X.gfm.table).replace("hr",X.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",X._tag).getRegex(),X.pedantic=he({},X.normal,{html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",X._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:J,paragraph:Z(X.normal._paragraph).replace("hr",X.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",X.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:J,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:J,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",$.punctuation=Z($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",$._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",$.em.start=Z($.em.start).replace(/punctuation/g,$._punctuation).getRegex(),$.em.middle=Z($.em.middle).replace(/punctuation/g,$._punctuation).replace(/overlapSkip/g,$._overlapSkip).getRegex(),$.em.endAst=Z($.em.endAst,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.em.endUnd=Z($.em.endUnd,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.strong.start=Z($.strong.start).replace(/punctuation/g,$._punctuation).getRegex(),$.strong.middle=Z($.strong.middle).replace(/punctuation/g,$._punctuation).replace(/blockSkip/g,$._blockSkip).getRegex(),$.strong.endAst=Z($.strong.endAst,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.strong.endUnd=Z($.strong.endUnd,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=Z($._blockSkip,"g").getRegex(),$.overlapSkip=Z($._overlapSkip,"g").getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._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])?)+(?![-_])/,$.autolink=Z($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=Z($.tag).replace("comment",X._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=Z($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=Z($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=Z($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=he({},$),$.pedantic=he({},$.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:Z(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=he({},$.normal,{escape:Z($.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(z="x"+z.toString(16)),re+=""+z+";";return re}var Ee=function(){function de(le){this.tokens=[],this.tokens.links=Object.create(null),this.options=le||Le,this.options.tokenizer=this.options.tokenizer||new ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var z={block:Re.normal,inline:Ie.normal};this.options.pedantic?(z.block=Re.pedantic,z.inline=Ie.pedantic):this.options.gfm&&(z.block=Re.gfm,this.options.breaks?z.inline=Ie.breaks:z.inline=Ie.gfm),this.tokenizer.rules=z}de.lex=function(z,Q){var q=new de(Q);return q.lex(z)};var re=de.prototype;return re.lex=function(z){return z=z.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(z,this.tokens,!0),this.inline(this.tokens),this.tokens},re.blockTokens=function(z,Q,q){Q===void 0&&(Q=[]),q===void 0&&(q=!0),z=z.replace(/^ +$/gm,"");for(var ee,ve,we,Fe;z;){if(ee=this.tokenizer.space(z)){z=z.substring(ee.raw.length),ee.type&&Q.push(ee);continue}if(ee=this.tokenizer.code(z,Q)){z=z.substring(ee.raw.length),ee.type?Q.push(ee):(Fe=Q[Q.length-1],Fe.raw+=`
`+ee.raw,Fe.text+=`
`+ee.text);continue}if(ee=this.tokenizer.fences(z)){z=z.substring(ee.raw.length),Q.push(ee);continue}if(ee=this.tokenizer.heading(z)){z=z.substring(ee.raw.length),Q.push(ee);continue}if(ee=this.tokenizer.nptable(z)){z=z.substring(ee.raw.length),Q.push(ee);continue}if(ee=this.tokenizer.hr(z)){z=z.substring(ee.raw.length),Q.push(ee);continue}if(ee=this.tokenizer.blockquote(z)){z=z.substring(ee.raw.length),ee.tokens=this.blockTokens(ee.text,[],q),Q.push(ee);continue}if(ee=this.tokenizer.list(z)){for(z=z.substring(ee.raw.length),we=ee.items.length,ve=0;ve0)for(;(Ge=this.tokenizer.rules.inline.reflinkSearch.exec(Fe))!=null;)Je.includes(Ge[0].slice(Ge[0].lastIndexOf("[")+1,-1))&&(Fe=Fe.slice(0,Ge.index)+"["+"a".repeat(Ge[0].length-2)+"]"+Fe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ge=this.tokenizer.rules.inline.blockSkip.exec(Fe))!=null;)Fe=Fe.slice(0,Ge.index)+"["+"a".repeat(Ge[0].length-2)+"]"+Fe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;z;){if(we=this.tokenizer.escape(z)){z=z.substring(we.raw.length),Q.push(we);continue}if(we=this.tokenizer.tag(z,q,ee)){z=z.substring(we.raw.length),q=we.inLink,ee=we.inRawBlock,Q.push(we);continue}if(we=this.tokenizer.link(z)){z=z.substring(we.raw.length),we.type==="link"&&(we.tokens=this.inlineTokens(we.text,[],!0,ee)),Q.push(we);continue}if(we=this.tokenizer.reflink(z,this.tokens.links)){z=z.substring(we.raw.length),we.type==="link"&&(we.tokens=this.inlineTokens(we.text,[],!0,ee)),Q.push(we);continue}if(we=this.tokenizer.strong(z,Fe,ve)){z=z.substring(we.raw.length),we.tokens=this.inlineTokens(we.text,[],q,ee),Q.push(we);continue}if(we=this.tokenizer.em(z,Fe,ve)){z=z.substring(we.raw.length),we.tokens=this.inlineTokens(we.text,[],q,ee),Q.push(we);continue}if(we=this.tokenizer.codespan(z)){z=z.substring(we.raw.length),Q.push(we);continue}if(we=this.tokenizer.br(z)){z=z.substring(we.raw.length),Q.push(we);continue}if(we=this.tokenizer.del(z)){z=z.substring(we.raw.length),we.tokens=this.inlineTokens(we.text,[],q,ee),Q.push(we);continue}if(we=this.tokenizer.autolink(z,_e)){z=z.substring(we.raw.length),Q.push(we);continue}if(!q&&(we=this.tokenizer.url(z,_e))){z=z.substring(we.raw.length),Q.push(we);continue}if(we=this.tokenizer.inlineText(z,ee,Ne)){z=z.substring(we.raw.length),ve=we.raw.slice(-1),Q.push(we);continue}if(z){var ze="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(ze);break}else throw new Error(ze)}}return Q},H(de,null,[{key:"rules",get:function(){return{block:Re,inline:Ie}}}]),de}(),Ae=B.defaults,Y=P.cleanUrl,se=P.escape,pe=function(){function de(le){this.options=le||Ae}var re=de.prototype;return re.code=function(z,Q,q){var ee=(Q||"").match(/\S*/)[0];if(this.options.highlight){var ve=this.options.highlight(z,ee);ve!=null&&ve!==z&&(q=!0,z=ve)}return ee?''+(q?z:se(z,!0))+`
`:""+(q?z:se(z,!0))+`
`},re.blockquote=function(z){return`
`+z+`
`},re.html=function(z){return z},re.heading=function(z,Q,q,ee){return this.options.headerIds?"
`:""+z+"
`},re.hr=function(){return this.options.xhtml?`
`:`
`},re.list=function(z,Q,q){var ee=Q?"ol":"ul",ve=Q&&q!==1?' start="'+q+'"':"";return"<"+ee+ve+`>
`+z+""+ee+`>
`},re.listitem=function(z){return""+z+`
`},re.checkbox=function(z){return" "},re.paragraph=function(z){return""+z+`
`},re.table=function(z,Q){return Q&&(Q=""+Q+""),`
`},re.tablerow=function(z){return`
`+z+`
`},re.tablecell=function(z,Q){var q=Q.header?"th":"td",ee=Q.align?"<"+q+' align="'+Q.align+'">':"<"+q+">";return ee+z+""+q+`>
`},re.strong=function(z){return""+z+""},re.em=function(z){return""+z+""},re.codespan=function(z){return""+z+""},re.br=function(){return this.options.xhtml?"
":"
"},re.del=function(z){return""+z+""},re.link=function(z,Q,q){if(z=Y(this.options.sanitize,this.options.baseUrl,z),z===null)return q;var ee='"+q+"",ee},re.image=function(z,Q,q){if(z=Y(this.options.sanitize,this.options.baseUrl,z),z===null)return q;var ee='
":">",ee},re.text=function(z){return z},de}(),ge=function(){function de(){}var re=de.prototype;return re.strong=function(z){return z},re.em=function(z){return z},re.codespan=function(z){return z},re.del=function(z){return z},re.html=function(z){return z},re.text=function(z){return z},re.link=function(z,Q,q){return""+q},re.image=function(z,Q,q){return""+q},re.br=function(){return""},de}(),ke=function(){function de(){this.seen={}}var re=de.prototype;return re.slug=function(z){var Q=z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Q)){var q=Q;do this.seen[q]++,Q=q+"-"+this.seen[q];while(this.seen.hasOwnProperty(Q))}return this.seen[Q]=0,Q},de}(),oe=B.defaults,me=P.unescape,be=function(){function de(le){this.options=le||oe,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ge,this.slugger=new ke}de.parse=function(z,Q){var q=new de(Q);return q.parse(z)};var re=de.prototype;return re.parse=function(z,Q){Q===void 0&&(Q=!0);var q="",ee,ve,we,Fe,Ge,Je,ze,qe,nt,$e,gt,ht,bt,pt,it,_t,Tt,Ve,At=z.length;for(ee=0;ee0&&it.tokens[0].type==="text"?(it.tokens[0].text=Ve+" "+it.tokens[0].text,it.tokens[0].tokens&&it.tokens[0].tokens.length>0&&it.tokens[0].tokens[0].type==="text"&&(it.tokens[0].tokens[0].text=Ve+" "+it.tokens[0].tokens[0].text)):it.tokens.unshift({type:"text",text:Ve}):pt+=Ve),pt+=this.parse(it.tokens,bt),nt+=this.renderer.listitem(pt,Tt,_t);q+=this.renderer.list(nt,gt,ht);continue}case"html":{q+=this.renderer.html($e.text);continue}case"paragraph":{q+=this.renderer.paragraph(this.parseInline($e.tokens));continue}case"text":{for(nt=$e.tokens?this.parseInline($e.tokens):$e.text;ee+1An error occurred:
"+Oe(we.message+"",!0)+"
";throw we}}Te.options=Te.setOptions=function(de){return xe(Te.defaults,de),Ue(Te.defaults),Te},Te.getDefaults=Se,Te.defaults=Be,Te.use=function(de){var re=xe({},de);if(de.renderer&&function(){var z=Te.defaults.renderer||new pe,Q=function(ve){var we=z[ve];z[ve]=function(){for(var Fe=arguments.length,Ge=new Array(Fe),Je=0;Je3:Ze.key!=4}))},rt=function ut(tt){return tt.map(function(Ze){var et=Ze.title.indexOf(z),st=Ze.title.substr(0,et),ot=Ze.title.substr(et+z.length),lt=r.a.createElement("span",null,st,r.a.createElement("span",{className:"c-blue"},z),ot,Object(m.o)()&&r.a.createElement(u.a,{placement:"right",title:z,content:function(){return Ye(Ze)},trigger:"hover"},r.a.createElement("span",{className:"iconfont icon-sandian ".concat($.a.actions)})));if(z!==""){var ct;if(et===-1&&!((ct=Ze.children)!==null&&ct!==void 0&&ct.length))return null}return Ze.children&&Ze.file_type===1?Object(e.a)(Object(e.a)({},Ze),{},{title:lt,key:Ze.key,children:ut(Ze.children)}):Object(e.a)(Object(e.a)({},Ze),{},{title:lt,key:Ze.key,isLeaf:!0})}).filter(function(Ze){return!!Ze})},dt=function ut(tt,Ze){for(var et,st=0;st-1}))!==null&&ot!==void 0&&ot.length?st.id:null}return null});Q(Ze),pt(!0),console.log("expandedKeys:",et),Je(et)};return console.log("loop(treeData):",rt(Tt)),r.a.createElement("div",{className:$.a.tree},r.a.createElement(ye,{style:{marginBottom:8},placeholder:"\u8F93\u5165\u5173\u952E\u5B57\u68C0\u7D22",onChange:vt}),r.a.createElement(Le,{multiple:!0,defaultExpandAll:!0,onSelect:At,onExpand:We,expandedKeys:Ge,selectedKeys:nt,autoExpandParent:bt,treeData:rt(Tt)}),r.a.createElement(fe,null),r.a.createElement(Z,null))},Ie=Object(t.a)(function(Ee){var Ae=Ee.user,Y=Ee.loading,se=Ee.globalSetting,pe=Ee.restful;return{user:Ae,globalSetting:se,restful:pe,loading:Y.models.index}})(Re),Ne=function(Ae){var Y,se,pe=Ae.user,ge=Ae.globalSetting,ke=Ae.loading,oe=Ae.dispatch,me=Ae.restful,be=Object(a.a)(Ae,["user","globalSetting","loading","dispatch","restful"]),xe=Object(s.useState)({content:"",message:"",status:0,contacts:[],address:"",data:[]}),Ce=Object(o.a)(xe,2),Oe=Ce[0],Se=Ce[1],Ue=Object(s.useState)(!0),Be=Object(o.a)(Ue,2),Te=Be[0],De=Be[1],de=p.a.useForm(),re=Object(o.a)(de,1),le=re[0],z=be.match.params,Q=function(){var ve=Object(A.a)(l.a.mark(function we(){return l.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:oe({type:"restful/getRestful"}),z.id&&oe({type:"restful/getRestfulDetail",payload:Object(e.a)({},z)});case 2:case"end":return Ge.stop()}},we)}));return function(){return ve.apply(this,arguments)}}();Object(s.useEffect)(function(){De(!0),Q()},[z.id]);var q=function(){oe({type:"restful/setActionTabs",payload:{key:"\u65B0\u5EFA\u540C\u7EA7\u76EE\u5F55"}})},ee=function(){var we;if((we=me.restful)!==null&&we!==void 0&&we.data){var Fe,Ge,Je=0;return(Fe=me.restful)===null||Fe===void 0||((Ge=Fe.data)===null||Ge===void 0)||Ge.map(function(ze){var qe;ze==null||((qe=ze.children)===null||qe===void 0)||qe.map(function(nt){nt.id==be.match.params.id&&(Je=ze.id)}),!ze.children&&!Je&&(Je=ze.id)}),Je}return 0};return r.a.createElement("section",null,r.a.createElement("aside",{className:"edu-container mt20"},r.a.createElement(N.a,null,r.a.createElement(N.a.Item,null,r.a.createElement(i.a,{to:"/"},"\u9996\u9875")),r.a.createElement(N.a.Item,null,r.a.createElement(i.a,{to:"/ch/rest"},"API\u6587\u6863"))),r.a.createElement("div",{className:"mt20"},r.a.createElement(j.a,{gutter:[20,20]},r.a.createElement(R.a,{flex:"300px"},r.a.createElement(Ie,be)),r.a.createElement(R.a,{flex:"1"},r.a.createElement("div",{className:E.a.info},r.a.createElement("h1",{style:{fontSize:28,paddingBottom:15,borderBottom:"1px solid #eaeaea",textAlign:"center"}},(Y=me.restfulDetail)===null||Y===void 0?void 0:Y.name),r.a.createElement(y.a,{value:(se=me.restfulDetail)===null||se===void 0?void 0:se.description}))))),Object(m.o)()&&r.a.createElement("div",{className:E.a.bar},r.a.createElement(j.a,null,!!ee()&&r.a.createElement(R.a,null,r.a.createElement(H.a,{title:"\u7F16\u8F91\u6587\u4EF6"},r.a.createElement(i.a,{to:"/ch/rest/edit/".concat(ee(),"/").concat(be.match.params.id),className:"icon-zhongmingming current"}))),r.a.createElement(R.a,null,r.a.createElement(H.a,{title:"\u6DFB\u52A0\u6587\u4EF6"},r.a.createElement(i.a,{to:"/ch/rest/edit/".concat(ee(),"/0"),className:"icon-tianjiatimu current"}))),r.a.createElement(R.a,null,r.a.createElement(H.a,{title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},r.a.createElement("span",{className:"icon-wenjianjia1 current",onClick:q})))))))},_e=ue.default=Object(t.a)(function(Ee){var Ae=Ee.user,Y=Ee.loading,se=Ee.globalSetting,pe=Ee.restful;return{user:Ae,globalSetting:se,restful:pe,loading:Y.models.index}})(Ne)},FWmy:function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return te});function te(H,C){if(!H)throw new Error(C?`Assertion failed (${C})`:"Assertion Failed")}},JYp7:function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return te});var te;(function(H){function C(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}H.is=C;const j=Object.freeze([]);function L(){return j}H.empty=L;function*R(t){yield t}H.single=R;function B(t){return t||j}H.from=B;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 A(t,y){for(const m of t)if(y(m))return!0;return!1}H.some=A;function f(t,y){for(const m of t)if(y(m))return m;return}H.find=f;function*p(t,y){for(const m of t)y(m)&&(yield m)}H.filter=p;function*o(t,y){let m=0;for(const g of t)yield y(g,m++)}H.map=o;function*a(...t){for(const y of t)for(const m of y)yield m}H.concat=a;function*n(t){for(const y of t)for(const m of y)yield m}H.concatNested=n;function l(t,y,m){let g=m;for(const E of t)g=y(g,E);return g}H.reduce=l;function*s(t,y,m=t.length){for(y<0&&(y+=t.length),m<0?m+=t.length:m>t.length&&(m=t.length);yg===E){const g=t[Symbol.iterator](),E=y[Symbol.iterator]();for(;;){const _=g.next(),u=E.next();if(_.done!==u.done)return!1;if(_.done)return!0;if(!m(_.value,u.value))return!1}}H.equals=i})(te||(te={}))},MI8n:function(Qe,ue,W){"use strict";W.d(ue,"c",function(){return L}),W.d(ue,"b",function(){return e}),W.d(ue,"e",function(){return A}),W.d(ue,"a",function(){return f}),W.d(ue,"d",function(){return p}),W.d(ue,"f",function(){return o});var te=W("/cxE"),H=W("pmY6"),C=W("24hK"),j=W("5Y4S"),L;(function(a){a.None=()=>H.a.None;function n(S){return(D,I=null,w)=>{let P=!1,U;return U=S(O=>P?void 0:(U?U.dispose():P=!0,D.call(I,O)),null,w),P&&U.dispose(),U}}a.once=n;function l(S,D){return m((I,w=null,P)=>S(U=>I.call(w,D(U)),null,P))}a.map=l;function s(S,D){return m((I,w=null,P)=>S(U=>{D(U),I.call(w,U)},null,P))}a.forEach=s;function r(S,D){return m((I,w=null,P)=>S(U=>D(U)&&I.call(w,U),null,P))}a.filter=r;function i(S){return S}a.signal=i;function t(...S){return(D,I=null,w)=>Object(H.e)(...S.map(P=>P(U=>D.call(I,U),null,w)))}a.any=t;function y(S,D,I){let w=I;return l(S,P=>(w=D(w,P),w))}a.reduce=y;function m(S){let D;const I=new e({onFirstListenerAdd(){D=S(I.fire,I)},onLastListenerRemove(){D.dispose()}});return I.event}function g(S,D,I=100,w=!1,P){let U,O,G,V=0;const ae=new e({leakWarningThreshold:P,onFirstListenerAdd(){U=S(ie=>{V++,O=D(O,ie),w&&!G&&(ae.fire(O),O=void 0),clearTimeout(G),G=setTimeout(()=>{const fe=O;O=void 0,G=void 0,(!w||V>1)&&ae.fire(fe),V=0},I)})},onLastListenerRemove(){U.dispose()}});return ae.event}a.debounce=g;function E(S,D=(I,w)=>I===w){let I=!0,w;return r(S,P=>{const U=I||!D(P,w);return I=!1,w=P,U})}a.latch=E;function _(S,D){return[a.filter(S,D),a.filter(S,I=>!D(I))]}a.split=_;function u(S,D=!1,I=[]){let w=I.slice(),P=S(G=>{w?w.push(G):O.fire(G)});const U=()=>{w&&w.forEach(G=>O.fire(G)),w=null},O=new e({onFirstListenerAdd(){P||(P=S(G=>O.fire(G)))},onFirstListenerDidAdd(){w&&(D?setTimeout(U):U())},onLastListenerRemove(){P&&P.dispose(),P=null}});return O.event}a.buffer=u;class h{constructor(S){this.event=S}map(S){return new h(l(this.event,S))}forEach(S){return new h(s(this.event,S))}filter(S){return new h(r(this.event,S))}reduce(S,D){return new h(y(this.event,S,D))}latch(){return new h(E(this.event))}debounce(S,D=100,I=!1,w){return new h(g(this.event,S,D,I,w))}on(S,D,I){return this.event(S,D,I)}once(S,D,I){return n(this.event)(S,D,I)}}function c(S){return new h(S)}a.chain=c;function d(S,D,I=w=>w){const w=(...G)=>O.fire(I(...G)),P=()=>S.on(D,w),U=()=>S.removeListener(D,w),O=new e({onFirstListenerAdd:P,onLastListenerRemove:U});return O.event}a.fromNodeEventEmitter=d;function T(S,D,I=w=>w){const w=(...G)=>O.fire(I(...G)),P=()=>S.addEventListener(D,w),U=()=>S.removeEventListener(D,w),O=new e({onFirstListenerAdd:P,onLastListenerRemove:U});return O.event}a.fromDOMEventEmitter=T;function b(S){return new Promise(D=>n(S)(D))}a.toPromise=b})(L||(L={}));class R{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${R._idPool++}`}start(a){this._stopWatch=new j.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 B=-1;class N{constructor(a,n=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=n,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let n=B;if(typeof this.customThreshold=="number"&&(n=this.customThreshold),n<=0||a{const r=this._stacks.get(l)||0;this._stacks.set(l,r-1)}}}class e{constructor(a){var n;this._disposed=!1,this._options=a,this._leakageMon=B>0?new N(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((n=this._options)===null||n===void 0?void 0:n._profName)?new R(this._options._profName):void 0}get event(){return this._event||(this._event=(a,n,l)=>{var s;this._listeners||(this._listeners=new C.a);const r=this._listeners.isEmpty();r&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(n?[a,n]:a);r&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,n);const t=(s=this._leakageMon)===null||s===void 0?void 0:s.check(this._listeners.size),y=Object(H.i)(()=>{if(t&&t(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const m=this._listeners&&!this._listeners.isEmpty();m||this._options.onLastListenerRemove(this)}});return l instanceof H.b?l.add(y):Array.isArray(l)&&l.push(y),y}),this._event}fire(a){var n,l;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new C.a);for(let s of this._listeners)this._deliveryQueue.push([s,a]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,r]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,r):s[0].call(s[1],r)}catch(i){Object(te.f)(i)}}(l=this._perfMon)===null||l===void 0||l.stop()}}dispose(){var a,n,l,s,r;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(s=(l=this._options)===null||l===void 0?void 0:l.onLastListenerRemove)===null||s===void 0||s.call(l),(r=this._leakageMon)===null||r===void 0||r.dispose())}}class A extends e{constructor(a){super(a);this._isPaused=0,this._eventQueue=new C.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 f extends A{constructor(a){var n;super(a);this._delay=(n=a.delay)!==null&&n!==void 0?n:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}class p{constructor(){this.buffers=[]}wrapEvent(a){return(n,l,s)=>a(r=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>n.call(l,r)):n.call(l,r)},void 0,s)}bufferEvents(a){const n=[];this.buffers.push(n);const l=a();return this.buffers.pop(),n.forEach(s=>s()),l}}class o{constructor(){this.listening=!1,this.inputEvent=L.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(Qe,ue,W){"use strict";(function(te,H){W.d(ue,"b",function(){return l}),W.d(ue,"i",function(){return t}),W.d(ue,"f",function(){return y}),W.d(ue,"d",function(){return m}),W.d(ue,"g",function(){return g}),W.d(ue,"h",function(){return E}),W.d(ue,"c",function(){return _}),W.d(ue,"k",function(){return u}),W.d(ue,"j",function(){return h}),W.d(ue,"a",function(){return c}),W.d(ue,"e",function(){return b});var C;const j="en";let L=!1,R=!1,B=!1,N=!1,e=!1,A=!1,f=!1,p,o=j,a,n;const l=typeof self=="object"?self:typeof te=="object"?te:{};let s;typeof l.vscode!="undefined"&&typeof l.vscode.process!="undefined"?s=l.vscode.process:typeof H!="undefined"&&(s=H);const r=typeof((C=s==null?void 0:s.versions)===null||C===void 0?void 0:C.electron)=="string"&&s.type==="renderer";if(typeof navigator=="object"&&!r)n=navigator.userAgent,L=n.indexOf("Windows")>=0,R=n.indexOf("Macintosh")>=0,f=(n.indexOf("Macintosh")>=0||n.indexOf("iPad")>=0||n.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,B=n.indexOf("Linux")>=0,A=!0,p=navigator.language,o=p;else if(typeof s=="object"){L=s.platform==="win32",R=s.platform==="darwin",B=s.platform==="linux",N=B&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,p=j,o=j;const S=s.env.VSCODE_NLS_CONFIG;if(S)try{const D=JSON.parse(S),I=D.availableLanguages["*"];p=D.locale,o=I||j,a=D._translationsConfigFile}catch(D){}e=!0}else console.error("Unable to resolve platform.");let i=0;R?i=1:L?i=3:B&&(i=2);const t=L,y=R,m=B,g=e,E=A,_=f,u=n,h=function(){if(l.setImmediate)return l.setImmediate.bind(l);if(typeof l.postMessage=="function"&&!l.importScripts){let I=[];l.addEventListener("message",P=>{if(P.data&&P.data.vscodeSetImmediateId)for(let U=0,O=I.length;U{const U=++w;I.push({id:U,callback:P}),l.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(s==null?void 0:s.nextTick)=="function")return s.nextTick.bind(s);const D=Promise.resolve();return I=>D.then(I)}(),c=R||f?2:L?1:3;let d=!0,T=!1;function b(){if(!T){T=!0;const S=new Uint8Array(2);S[0]=1,S[1]=2;const D=new Uint16Array(S.buffer);d=D[0]===(2<<8)+1}return d}}).call(this,W("IyRk"),W("Q2Ig"))},N0LK:function(Qe,ue,W){"use strict";W.d(ue,"C",function(){return te}),W.d(ue,"v",function(){return C}),W.d(ue,"s",function(){return j}),W.d(ue,"t",function(){return L}),W.d(ue,"U",function(){return R}),W.d(ue,"J",function(){return B}),W.d(ue,"O",function(){return N}),W.d(ue,"p",function(){return e}),W.d(ue,"T",function(){return A}),W.d(ue,"q",function(){return f}),W.d(ue,"N",function(){return p}),W.d(ue,"M",function(){return o}),W.d(ue,"Q",function(){return a}),W.d(ue,"u",function(){return n}),W.d(ue,"x",function(){return l}),W.d(ue,"I",function(){return s}),W.d(ue,"f",function(){return r}),W.d(ue,"h",function(){return i}),W.d(ue,"g",function(){return t}),W.d(ue,"i",function(){return y}),W.d(ue,"G",function(){return m}),W.d(ue,"H",function(){return g}),W.d(ue,"r",function(){return E}),W.d(ue,"R",function(){return _}),W.d(ue,"d",function(){return u}),W.d(ue,"e",function(){return h}),W.d(ue,"E",function(){return c}),W.d(ue,"F",function(){return d}),W.d(ue,"j",function(){return T}),W.d(ue,"z",function(){return b}),W.d(ue,"K",function(){return D}),W.d(ue,"L",function(){return I}),W.d(ue,"m",function(){return P}),W.d(ue,"k",function(){return O}),W.d(ue,"A",function(){return V}),W.d(ue,"a",function(){return ae}),W.d(ue,"n",function(){return ie}),W.d(ue,"l",function(){return fe}),W.d(ue,"D",function(){return ce}),W.d(ue,"B",function(){return J}),W.d(ue,"b",function(){return Z}),W.d(ue,"S",function(){return he}),W.d(ue,"o",function(){return X}),W.d(ue,"P",function(){return $}),W.d(ue,"w",function(){return ye}),W.d(ue,"c",function(){return Le}),W.d(ue,"y",function(){return Ne});function te(Y){return!Y||typeof Y!="string"?!0:Y.trim().length===0}const H=/{(\d+)}/g;function C(Y,...se){return se.length===0?Y:Y.replace(H,function(pe,ge){const ke=parseInt(ge,10);return isNaN(ke)||ke<0||ke>=se.length?pe:se[ke]})}function j(Y){return Y.replace(/[<>&]/g,function(se){switch(se){case"<":return"<";case">":return">";case"&":return"&";default:return se}})}function L(Y){return Y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function R(Y,se=" "){const pe=B(Y,se);return N(pe,se)}function B(Y,se){if(!Y||!se)return Y;const pe=se.length;if(pe===0||Y.length===0)return Y;let ge=0;for(;Y.indexOf(se,ge)===ge;)ge=ge+pe;return Y.substring(ge)}function N(Y,se){if(!Y||!se)return Y;const pe=se.length,ge=Y.length;if(pe===0||ge===0)return Y;let ke=ge,oe=-1;for(;!(oe=Y.lastIndexOf(se,ke-1),oe===-1||oe+pe!==ke);){if(oe===0)return"";ke=oe}return Y.substring(0,ke)}function e(Y){return Y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function A(Y){return Y.replace(/\*/g,"")}function f(Y,se,pe={}){if(!Y)throw new Error("Cannot create regex from empty string");se||(Y=L(Y)),pe.wholeWord&&(/\B/.test(Y.charAt(0))||(Y="\\b"+Y),/\B/.test(Y.charAt(Y.length-1))||(Y=Y+"\\b"));let ge="";return pe.global&&(ge+="g"),pe.matchCase||(ge+="i"),pe.multiline&&(ge+="m"),pe.unicode&&(ge+="u"),new RegExp(Y,ge)}function p(Y){if(Y.source==="^"||Y.source==="^$"||Y.source==="$"||Y.source==="^\\s*$")return!1;const se=Y.exec("");return!!(se&&Y.lastIndex===0)}function o(Y){return(Y.global?"g":"")+(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")}function a(Y){return Y.split(/\r\n|\r|\n/)}function n(Y){for(let se=0,pe=Y.length;se=0;pe--){const ge=Y.charCodeAt(pe);if(ge!==32&&ge!==9)return pe}return-1}function r(Y,se){return Yse?1:0}function i(Y,se,pe=0,ge=Y.length,ke=0,oe=se.length){for(;peCe)return 1}const me=ge-pe,be=oe-ke;return mebe?1:0}function t(Y,se){return y(Y,se,0,Y.length,0,se.length)}function y(Y,se,pe=0,ge=Y.length,ke=0,oe=se.length){for(;pe=128||Ce>=128)return i(Y.toLowerCase(),se.toLowerCase(),pe,ge,ke,oe);m(xe)&&(xe-=32),m(Ce)&&(Ce-=32);const Oe=xe-Ce;if(Oe===0)continue;return Oe}const me=ge-pe,be=oe-ke;return mebe?1:0}function m(Y){return Y>=97&&Y<=122}function g(Y){return Y>=65&&Y<=90}function E(Y,se){return Y.length===se.length&&y(Y,se)===0}function _(Y,se){const pe=se.length;return se.length>Y.length?!1:y(Y,se,0,pe)===0}function u(Y,se){let pe,ge=Math.min(Y.length,se.length);for(pe=0;pe1){const ge=Y.charCodeAt(se-2);if(c(ge))return T(ge,pe)}return pe}function D(Y,se){const pe=Re.getInstance(),ge=se,ke=Y.length,oe=b(Y,ke,se);se+=oe>=65536?2:1;let me=pe.getGraphemeBreakType(oe);for(;se=65536?2:1,me=xe}return se-ge}function I(Y,se){const pe=Re.getInstance(),ge=se,ke=S(Y,se);se-=ke>=65536?2:1;let oe=pe.getGraphemeBreakType(ke);for(;se>0;){const me=S(Y,se),be=pe.getGraphemeBreakType(me);if(Le(be,oe))break;se-=me>=65536?2:1,oe=be}return ge-se}const w=/(?:[\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 P(Y){return w.test(Y)}const U=/(?:[\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(Y){return U.test(Y)}const G=/^[\t\n\r\x20-\x7E]*$/;function V(Y){return G.test(Y)}const ae=/[\u2028\u2029]/;function ie(Y){return ae.test(Y)}function fe(Y){for(let se=0,pe=Y.length;se=11904&&Y<=55215||Y>=63744&&Y<=64255||Y>=65281&&Y<=65374}function J(Y){return Y>=127462&&Y<=127487||Y===8986||Y===8987||Y===9200||Y===9203||Y>=9728&&Y<=10175||Y===11088||Y===11093||Y>=127744&&Y<=128591||Y>=128640&&Y<=128764||Y>=128992&&Y<=129003||Y>=129280&&Y<=129535||Y>=129648&&Y<=129750}const Z=String.fromCharCode(65279);function he(Y){return!!(Y&&Y.length>0&&Y.charCodeAt(0)===65279)}function X(Y,se=!1){return Y?(se&&(Y=Y.replace(/\\./g,"")),Y.toLowerCase()!==Y):!1}function $(Y){const se=90-65+1;return Y=Y%(2*se),Yse[3*ge+1])ge=2*ge+1;else return se[3*ge+2];return 0}}Re._INSTANCE=null;function Ie(){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 Ne(Y,se){if(Y===0)return 0;const pe=_e(Y,se);if(pe!==void 0)return pe;const ge=S(se,Y);return Y-=Ee(ge),Y}function _e(Y,se){let pe=S(se,Y);for(Y-=Ee(pe);Ae(pe)||pe===65039||pe===8419;){if(Y===0)return;pe=S(se,Y),Y-=Ee(pe)}if(!J(pe))return;if(Y>=0){const ge=S(se,Y);ge===8205&&(Y-=Ee(ge))}return Y}function Ee(Y){return Y>=65536?2:1}function Ae(Y){return 127995<=Y&&Y<=127999}},NvD2:function(Qe,ue,W){"use strict";W.d(ue,"a",function(){return R});var te=W("Kwbf");function H(B,N){var e=new Set;return B.forEach(function(A){N.has(A)||e.add(A)}),e}function C(B){var N=B||{},e=N.disabled,A=N.disableCheckbox,f=N.checkable;return!!(e||A)||f===!1}function j(B,N,e,A){for(var f=new Set(B),p=new Set,o=0;o<=e;o+=1){var a=N.get(o)||new Set;a.forEach(function(r){var i=r.key,t=r.node,y=r.children,m=y===void 0?[]:y;f.has(i)&&!A(t)&&m.filter(function(g){return!A(g.node)}).forEach(function(g){f.add(g.key)})})}for(var n=new Set,l=e;l>=0;l-=1){var s=N.get(l)||new Set;s.forEach(function(r){var i=r.parent,t=r.node;if(A(t)||!r.parent||n.has(r.parent.key))return;if(A(r.parent.node)){n.add(i.key);return}var y=!0,m=!1;(i.children||[]).filter(function(g){return!A(g.node)}).forEach(function(g){var E=g.key,_=f.has(E);y&&!_&&(y=!1),!m&&(_||p.has(E))&&(m=!0)}),y&&f.add(i.key),m&&p.add(i.key),n.add(i.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(H(p,f))}}function L(B,N,e,A,f){for(var p=new Set(B),o=new Set(N),a=0;a<=A;a+=1){var n=e.get(a)||new Set;n.forEach(function(i){var t=i.key,y=i.node,m=i.children,g=m===void 0?[]:m;!p.has(t)&&!o.has(t)&&!f(y)&&g.filter(function(E){return!f(E.node)}).forEach(function(E){p.delete(E.key)})})}o=new Set;for(var l=new Set,s=A;s>=0;s-=1){var r=e.get(s)||new Set;r.forEach(function(i){var t=i.parent,y=i.node;if(f(y)||!i.parent||l.has(i.parent.key))return;if(f(i.parent.node)){l.add(t.key);return}var m=!0,g=!1;(t.children||[]).filter(function(E){return!f(E.node)}).forEach(function(E){var _=E.key,u=p.has(_);m&&!u&&(m=!1),!g&&(u||o.has(_))&&(g=!0)}),m||p.delete(t.key),g&&o.add(t.key),l.add(t.key)})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(H(o,p))}}function R(B,N,e,A){var f=[],p;A?p=A:p=C;var o=new Set(B.filter(function(s){var r=!!e[s];return r||f.push(s),r})),a=new Map,n=0;Object.keys(e).forEach(function(s){var r=e[s],i=r.level,t=a.get(i);t||(t=new Set,a.set(i,t)),t.add(r),n=Math.max(n,i)}),Object(te.a)(!f.length,"Tree missing follow keys: ".concat(f.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var l;return N===!0?l=j(o,a,n,p):l=L(o,N.halfCheckedKeys,a,n,p),l}},OZM5:function(Qe,ue,W){"use strict";W.d(ue,"b",function(){return A}),W.d(ue,"a",function(){return f}),W.d(ue,"k",function(){return p}),W.d(ue,"h",function(){return o}),W.d(ue,"i",function(){return a}),W.d(ue,"g",function(){return n}),W.d(ue,"c",function(){return l}),W.d(ue,"d",function(){return s}),W.d(ue,"j",function(){return t}),W.d(ue,"e",function(){return y}),W.d(ue,"f",function(){return m});var te=W("KQm4"),H=W("U8pU"),C=W("Ff2n"),j=W("q1tI"),L=W.n(j),R=W("Kwbf"),B=W("WaYH"),N=.25,e=2;function A(g,E){var _=g.slice(),u=_.indexOf(E);return u>=0&&_.splice(u,1),_}function f(g,E){var _=g.slice();return _.indexOf(E)===-1&&_.push(E),_}function p(g){return g.split("-")}function o(g,E){return"".concat(g,"-").concat(E)}function a(g){return g&&g.type&&g.type.isTreeNode}function n(g,E){var _=[g],u=E[g];function h(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];c.forEach(function(d){var T=d.key,b=d.children;_.push(T),h(b)})}return h(u.children),_}function l(g,E){var _=g.clientY,u=E.selectHandle.getBoundingClientRect(),h=u.top,c=u.bottom,d=u.height,T=Math.max(d*N,e);return _<=h+T?-1:_>=c-T?1:0}function s(g,E){if(!g)return;var _=E.multiple;return _?g.slice():g.length?[g[0]]:g}var r=function(E){return E};function i(g,E){if(!g)return[];var _=E||{},u=_.processProps,h=u===void 0?r:u,c=Array.isArray(g)?g:[g];return c.map(function(d){var T=d.children,b=Object(C.a)(d,["children"]),S=i(T,E);return L.a.createElement(B.a,Object.assign({},h(b)),S)})}function t(g){if(!g)return null;var E;if(Array.isArray(g))E={checkedKeys:g,halfCheckedKeys:void 0};else if(Object(H.a)(g)==="object")E={checkedKeys:g.checked||void 0,halfCheckedKeys:g.halfChecked||void 0};else return Object(R.a)(!1,"`checkedKeys` is not an array or an object"),null;return E}function y(g,E){var _=new Set;function u(h){if(_.has(h))return;var c=E[h];if(!c)return;_.add(h);var d=c.parent,T=c.node;if(T.disabled)return;d&&u(d.key)}return(g||[]).forEach(function(h){u(h)}),Object(te.a)(_)}function m(g){var E={};return Object.keys(g).forEach(function(_){(_.startsWith("data-")||_.startsWith("aria-"))&&(E[_]=g[_])}),E}},P48q:function(Qe,ue,W){Qe.exports={flex_box_center:"flex_box_center___BHtvi",flex_space_between:"flex_space_between___1noDr",flex_box_vertical_center:"flex_box_vertical_center___2UDAc",flex_box_center_end:"flex_box_center_end___2j8--",flex_box_column:"flex_box_column___3X60k",tree:"tree___2kCYs",actions:"actions___10Q_6"}},SJMd:function(Qe,ue){/**
* @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 W,te,H,C=!1,j,L;window.PR_SHOULD_USE_CONTINUATION=!0;var R,B;(function(){var N=window,e=["break,continue,do,else,for,if,return,while"],A=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],f=[A,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],p=[f,"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"],o=[f,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[f,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],n="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",l=[f,"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",r=[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"],i=[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"],y=[p,a,o,l,s,r,i,t],m=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,g="str",E="kwd",_="com",u="typ",h="lit",c="pun",d="pln",T="tag",b="dec",S="src",D="atn",I="atv",w="nocode",P="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(_e){for(var Ee=0,Ae=!1,Y=!1,se=0,pe=_e.length;se122||(z<65||le>90||Ue.push([Math.max(65,le)|32,Math.min(z,90)|32]),z<97||le>122||Ue.push([Math.max(97,le)&~32,Math.min(z,122)&~32]))}}Ue.sort(function(ve,we){return ve[0]-we[0]||we[1]-ve[1]});for(var Q=[],q=[],De=0;Deee[0]&&(ee[1]+1>ee[0]&&Te.push("-"),Te.push(me(ee[1])))}return Te.push("]"),Te.join("")}function xe(Oe){for(var Se=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")),Ue=Se.length,Be=[],Te=0,De=0;Te=2&&le==="["?Se[Te]=be(de):le!=="\\"&&(Se[Te]=de.replace(/[a-zA-Z]/g,function(q){var ee=q.charCodeAt(0);return"["+String.fromCharCode(ee&~32,ee|32)+"]"}))}return Se.join("")}for(var Ce=[],se=0,pe=_e.length;se=0;)Ae[Ce.charAt(Oe)]=xe;var Se=xe[1],Ue=""+Se;oe.hasOwnProperty(Ue)||(ke.push(Se),oe[Ue]=null)}ke.push(/[\0-\uffff]/),Y=U(ke)})();var se=Ee.length,pe=function(ge){for(var ke=ge.sourceCode,oe=ge.basePos,me=ge.sourceNode,be=[oe,d],xe=0,Ce=ke.match(Y)||[],Oe={},Se=0,Ue=Ce.length;Se=5&&Te.substring(0,5)==="lang-",de&&!(De&&typeof De[1]=="string")&&(de=!1,Te=S),de||(Oe[Be]=Te)}var z=xe;if(xe+=Be.length,!de)be.push(oe+z,Te);else{var Q=De[1],q=Be.indexOf(Q),ee=q+Q.length;De[2]&&(ee=Be.length-De[2].length,q=ee-Q.length);var ve=Te.substring(5);G(me,oe+z,Be.substring(0,q),pe,be),G(me,oe+z+q,Q,$(ve,Q),be),G(me,oe+z+ee,Be.substring(ee),pe,be)}}ge.decorations=be};return pe}function fe(_e){var Ee=[],Ae=[];_e.tripleQuotedStrings?Ee.push([g,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):_e.multiLineStrings?Ee.push([g,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ee.push([g,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),_e.verbatimStrings&&Ae.push([g,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=_e.hashComments;Y&&(_e.cStyleComments?(Y>1?Ee.push([_,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ee.push([_,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ae.push([g,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ee.push([_,/^#[^\r\n]*/,null,"#"])),_e.cStyleComments&&(Ae.push([_,/^\/\/[^\r\n]*/,null]),Ae.push([_,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var se=_e.regexLiterals;if(se){var pe=se>1?"":`
\r`,ge=pe?".":"[\\S\\s]",ke="/(?=[^/*"+pe+"])(?:[^/\\x5B\\x5C"+pe+"]|\\x5C"+ge+"|\\x5B(?:[^\\x5C\\x5D"+pe+"]|\\x5C"+ge+")*(?:\\x5D|$))+/";Ae.push(["lang-regex",RegExp("^"+P+"("+ke+")")])}var oe=_e.types;oe&&Ae.push([u,oe]);var me=(""+_e.keywords).replace(/^ | $/g,"");me.length&&Ae.push([E,new RegExp("^(?:"+me.replace(/[\s,]+/g,"|")+")\\b"),null]),Ee.push([d,/^\s+/,null,` \r
\xA0`]);var be="^.[^\\s\\w.$@'\"`/\\\\]*";return _e.regexLiterals&&(be+="(?!s*/)"),Ae.push([h,/^@[a-z_$][a-z_$@0-9]*/i,null],[u,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[d,/^[a-z_$][a-z_$@0-9]*/i,null],[h,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[d,/^\\[\s\S]?/,null],[c,new RegExp(be),null]),ie(Ee,Ae)}var ce=fe({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function J(_e,Ee,Ae){for(var Y=/(?:^|\s)nocode(?:\s|$)/,se=/\r\n?|\n/,pe=_e.ownerDocument,ge=pe.createElement("li");_e.firstChild;)ge.appendChild(_e.firstChild);var ke=[ge];function oe(Se){var Ue=Se.nodeType;if(Ue==1&&!Y.test(Se.className))if(Se.nodeName==="br")me(Se),Se.parentNode&&Se.parentNode.removeChild(Se);else for(var Be=Se.firstChild;Be;Be=Be.nextSibling)oe(Be);else if((Ue==3||Ue==4)&&Ae){var Te=Se.nodeValue,De=Te.match(se);if(De){var de=Te.substring(0,De.index);Se.nodeValue=de;var re=Te.substring(De.index+De[0].length);if(re){var le=Se.parentNode;le.insertBefore(pe.createTextNode(re),Se.nextSibling)}me(Se),de||Se.parentNode.removeChild(Se)}}}function me(Se){for(;!Se.nextSibling;)if(Se=Se.parentNode,!Se)return;function Ue(De,de){var re=de?De.cloneNode(!1):De,le=De.parentNode;if(le){var z=Ue(le,1),Q=De.nextSibling;z.appendChild(re);for(var q=Q;q;q=Q)Q=q.nextSibling,z.appendChild(q)}return re}for(var Be=Ue(Se.nextSibling,0),Te;(Te=Be.parentNode)&&Te.nodeType===1;)Be=Te;ke.push(Be)}for(var be=0;be=le&&(oe+=2),pe>=z&&(xe+=2)}}finally{Te&&(Te.style.display=De)}}var he={};function X(_e,Ee){for(var Ae=Ee.length;--Ae>=0;){var Y=Ee[Ae];he.hasOwnProperty(Y)?N.console&&console.warn("cannot override language handler %s",Y):he[Y]=_e}}function $(_e,Ee){return _e&&he.hasOwnProperty(_e)||(_e=/^\s*]*(?:>|$)/],[_,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[c,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^