You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
403 lines
1.1 MiB
403 lines
1.1 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[241,4,7,8,9,15],{"+92d":function(Be,oe,P){Be.exports=P.p+"static/b1.8d46544a.svg"},"+GGh":function(Be,oe){Be.exports="data:image/png;base64,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"},"+oxA":function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___1SA8P",flex_space_between:"flex_space_between___3iSxN",flex_box_vertical_center:"flex_box_vertical_center___2JAtS",flex_box_center_end:"flex_box_center_end___2w-PB",flex_box_column:"flex_box_column___2s4Ak",head:"head___3iBvF",node:"node____ISDx"}},"+ua5":function(Be,oe,P){},"/cxE":function(Be,oe,P){"use strict";P.d(oe,"f",function(){return O}),P.d(oe,"g",function(){return U}),P.d(oe,"h",function(){return m}),P.d(oe,"e",function(){return H}),P.d(oe,"b",function(){return N}),P.d(oe,"c",function(){return e}),P.d(oe,"d",function(){return A}),P.d(oe,"a",function(){return v});class te{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+`
|
|
|
|
`+f.stack):f},0)}}emit(f){this.listeners.forEach(l=>{l(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const k=new te;function O(f){H(f)||k.onUnexpectedError(f);return}function U(f){H(f)||k.onUnexpectedExternalError(f);return}function m(f){if(f instanceof Error){let{name:l,message:a}=f;const r=f.stacktrace||f.stack;return{$isError:!0,name:l,message:a,stack:r}}return f}const S="Canceled";function H(f){return f instanceof Error&&f.name===S&&f.message===S}function N(){const f=new Error(S);return f.name=f.message,f}function e(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function A(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class v extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"24hK":function(Be,oe,P){"use strict";P.d(oe,"a",function(){return k});class te{constructor(O){this.element=O,this.next=te.Undefined,this.prev=te.Undefined}}te.Undefined=new te(void 0);class k{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===te.Undefined}clear(){let O=this._first;for(;O!==te.Undefined;){const U=O.next;O.prev=te.Undefined,O.next=te.Undefined,O=U}this._first=te.Undefined,this._last=te.Undefined,this._size=0}unshift(O){return this._insert(O,!1)}push(O){return this._insert(O,!0)}_insert(O,U){const m=new te(O);if(this._first===te.Undefined)this._first=m,this._last=m;else if(U){const H=this._last;this._last=m,m.prev=H,H.next=m}else{const H=this._first;this._first=m,m.next=H,H.prev=m}this._size+=1;let S=!1;return()=>{S||(S=!0,this._remove(m))}}shift(){if(this._first===te.Undefined)return;{const O=this._first.element;return this._remove(this._first),O}}pop(){if(this._last===te.Undefined)return;{const O=this._last.element;return this._remove(this._last),O}}_remove(O){if(O.prev!==te.Undefined&&O.next!==te.Undefined){const U=O.prev;U.next=O.next,O.next.prev=U}else O.prev===te.Undefined&&O.next===te.Undefined?(this._first=te.Undefined,this._last=te.Undefined):O.next===te.Undefined?(this._last=this._last.prev,this._last.next=te.Undefined):O.prev===te.Undefined&&(this._first=this._first.next,this._first.prev=te.Undefined);this._size-=1}*[Symbol.iterator](){let O=this._first;for(;O!==te.Undefined;)yield O.element,O=O.next}}},"3/fG":function(Be,oe,P){"use strict";P.d(oe,"a",function(){return k});function te(O,U){let m;return U.length===0?m=O:m=O.replace(/\{(\d+)\}/g,function(S,H){const N=H[0];return typeof U[N]!="undefined"?U[N]:S}),m}function k(O,U,...m){return te(U,m)}},"5A5F":function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___3fvo9",flex_space_between:"flex_space_between___2dIWe",flex_box_vertical_center:"flex_box_vertical_center___213Et",flex_box_center_end:"flex_box_center_end___1GXlY",flex_box_column:"flex_box_column___2XTWO",wrap:"wrap___1JbzU",addQuestion:"addQuestion___3n7jZ",content:"content___2Crhb",left:"left___12ObT",filterPoint:"filterPoint___1wSyY",filterType:"filterType___32Vjx",btnWarp:"btnWarp___XLUgV",btn:"btn___33IXa",count:"count___2zHIG",btnActive:"btnActive___2vIUq",fold:"fold___26POp",action:"action___m_eZE",filterOrigin:"filterOrigin___OKol4",control:"control___1SAJX",search:"search___2AvaM",searchIcon:"searchIcon___2TozR",table:"table___1Q9AI",tabWarp:"tabWarp___3884f",customTable:"customTable___6Ubut","btn-style-1":"btn-style-1___m4kGi","btn-style-2":"btn-style-2___2uJ8s","btn-style-3":"btn-style-3___3kuYl",right:"right___Ie2u1",statistics:"statistics___TecQK",title:"title___1uK2v",statisticItem:"statisticItem___oBHb3",rate:"rate___15q55",dataName:"dataName___1uxmm",sort:"sort___1hyjY",rankHeader:"rankHeader___3MEZr",rankIcon:"rankIcon___t_Ggc",li:"li___3lR-W",myRecord:"myRecord___3MQJH",recordPrefix:"recordPrefix___3rIwK",mine:"mine___1LgRJ",avatar:"avatar___2X3bF",nickname:"nickname___3uP5f",myRank:"myRank___3GS-w",questionNumber:"questionNumber___3kBy-",titleWarp:"titleWarp___t0Zdh",hov:"hov___30B5q",statusText:"statusText___3pFTN",hovBtn:"hovBtn___3ciGX",tag:"tag___hllWE",problemsclose:"problemsclose___1X9HB",imgsrc:"imgsrc___3koep",sendModal:"sendModal___1P3qc",bottom:"bottom___1gmim",line:"line___psQHn",del:"del___1Qufp"}},"5VLF":function(Be,oe,P){"use strict";var te,k;function O(U,m,S){var H=function(N,e){return U.js_beautify(N,e)};return H.js=U.js_beautify,H.css=m.css_beautify,H.html=S.html_beautify,H.js_beautify=U.js_beautify,H.css_beautify=m.css_beautify,H.html_beautify=S.html_beautify,H}!(te=[P("6UM0"),P("TXwP"),P("psGv")],k=function(U,m,S){return O(U,m,S)}.apply(oe,te),k!==void 0&&(Be.exports=k))},"5Y4S":function(Be,oe,P){"use strict";P.d(oe,"a",function(){return O});var te=P("MNsG");const k=te.b.performance&&typeof te.b.performance.now=="function";class O{constructor(U){this._highResolution=k&&U,this._startTime=this._now(),this._stopTime=-1}static create(U=!0){return new O(U)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?te.b.performance.now():Date.now()}}},"6RRn":function(Be,oe,P){"use strict";var te=P("wCXF"),k=P("n6Qo");P.d(oe,"b",function(){return k.a});var O=P("IBYe"),U=P("6eGT"),m=P("hW8S");P.d(oe,"a",function(){return m.a}),oe.c=te.b},"6UM0":function(Be,oe,P){var te,k;(function(){var O;(function(){"use strict";var m=[function(e,A,v){var f=v(1).Beautifier,l=v(5).Options;function a(r,o){var s=new f(r,o);return s.beautify()}e.exports=a,e.exports.defaultOptions=function(){return new l}},function(e,A,v){var f=v(2).Output,l=v(3).Token,a=v(4),r=v(5).Options,o=v(7).Tokenizer,s=v(7).line_starters,i=v(7).positionable_operators,n=v(7).TOKEN;function t(L,z){return z.indexOf(L)!==-1}function b(L){return L.replace(/^\s+/g,"")}function y(L){for(var z={},$=0;$<L.length;$++)z[L[$].replace(/-/g,"_")]=L[$];return z}function g(L,z){return L&&L.type===n.RESERVED&&L.text===z}function E(L,z){return L&&L.type===n.RESERVED&&t(L.text,z)}var _=["case","return","do","if","throw","else","await","break","continue","async"],u=["before-newline","after-newline","preserve-newline"],c=y(u),p=[c.before_newline,c.preserve_newline],d={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function x(L,z){if(z.multiline_frame||z.mode===d.ForInitializer||z.mode===d.Conditional)return;L.remove_indent(z.start_line_index)}function h(L){L=L.replace(a.allLineBreaks,`
|
|
`);for(var z=[],$=L.indexOf(`
|
|
`);$!==-1;)z.push(L.substring(0,$)),L=L.substring($+1),$=L.indexOf(`
|
|
`);return L.length&&z.push(L),z}function T(L){return L===d.ArrayLiteral}function M(L){return t(L,[d.Expression,d.ForInitializer,d.Conditional])}function D(L,z){for(var $=0;$<L.length;$++){var he=L[$].trim();if(he.charAt(0)!==z)return!1}return!0}function w(L,z){for(var $=0,he=L.length,fe;$<he;$++)if(fe=L[$],fe&&fe.indexOf(z)!==0)return!1;return!0}function C(L,z){z=z||{},this._source_text=L||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new r(z)}C.prototype.create_flags=function(L,z){var $=0;L&&($=L.indentation_level,!this._output.just_added_newline()&&L.line_indent_level>$&&($=L.line_indent_level));var he={mode:z,parent:L,last_token:L?L.last_token:new l(n.START_BLOCK,""),last_word:L?L.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:$,alignment:0,line_indent_level:L?L.line_indent_level:$,start_line_index:this._output.get_line_number(),ternary_depth:0};return he},C.prototype._reset=function(L){var z=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,z),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(d.BlockStatement);var $=new o(L,this._options);return this._tokens=$.tokenize(),L},C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,z=this._reset(this._source_text),$=this._options.eol;this._options.eol==="auto"&&($=`
|
|
`,z&&a.lineBreak.test(z||"")&&($=z.match(a.lineBreak)[0]));for(var he=this._tokens.next();he;)this.handle_token(he),this._last_last_text=this._flags.last_token.text,this._flags.last_token=he,he=this._tokens.next();return L=this._output.get_code($),L},C.prototype.handle_token=function(L,z){L.type===n.START_EXPR?this.handle_start_expr(L):L.type===n.END_EXPR?this.handle_end_expr(L):L.type===n.START_BLOCK?this.handle_start_block(L):L.type===n.END_BLOCK?this.handle_end_block(L):L.type===n.WORD?this.handle_word(L):L.type===n.RESERVED?this.handle_word(L):L.type===n.SEMICOLON?this.handle_semicolon(L):L.type===n.STRING?this.handle_string(L):L.type===n.EQUALS?this.handle_equals(L):L.type===n.OPERATOR?this.handle_operator(L):L.type===n.COMMA?this.handle_comma(L):L.type===n.BLOCK_COMMENT?this.handle_block_comment(L,z):L.type===n.COMMENT?this.handle_comment(L,z):L.type===n.DOT?this.handle_dot(L):L.type===n.EOF?this.handle_eof(L):L.type===n.UNKNOWN?this.handle_unknown(L,z):this.handle_unknown(L,z)},C.prototype.handle_whitespace_and_comments=function(L,z){var $=L.newlines,he=this._options.keep_array_indentation&&T(this._flags.mode);if(L.comments_before)for(var fe=L.comments_before.next();fe;)this.handle_whitespace_and_comments(fe,z),this.handle_token(fe,z),fe=L.comments_before.next();if(he)for(var Ie=0;Ie<$;Ie+=1)this.print_newline(Ie>0,z);else if(this._options.max_preserve_newlines&&$>this._options.max_preserve_newlines&&($=this._options.max_preserve_newlines),this._options.preserve_newlines&&$>1){this.print_newline(!1,z);for(var Se=1;Se<$;Se+=1)this.print_newline(!0,z)}};var j=["async","break","continue","return","throw","yield"];C.prototype.allow_wrap_or_preserved_newline=function(L,z){if(z=z===void 0?!1:z,this._output.just_added_newline())return;var $=this._options.preserve_newlines&&L.newlines||z,he=t(this._flags.last_token.text,i)||t(L.text,i);if(he){var fe=t(this._flags.last_token.text,i)&&t(this._options.operator_position,p)||t(L.text,i);$=$&&fe}if($)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(E(this._flags.last_token,j))return;this._output.set_wrap_point()}},C.prototype.print_newline=function(L,z){if(!z&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var $=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&g($,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(L)&&(this._flags.multiline_frame=!0)},C.prototype.print_token_line_indentation=function(L){this._output.just_added_newline()&&(this._options.keep_array_indentation&&L.newlines&&(L.text==="["||T(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(L.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},C.prototype.print_token=function(L){if(this._output.raw){this._output.add_raw_token(L);return}if(this._options.comma_first&&L.previous&&L.previous.type===n.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var z=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(z),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(L),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(L),this._output.non_breaking_space=!0,this._output.add_token(L.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},C.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},C.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},C.prototype.set_mode=function(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},C.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&&x(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},C.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"]))},C.prototype.start_of_statement=function(L){var z=!1;return z=z||E(this._flags.last_token,["var","let","const"])&&L.type===n.WORD,z=z||g(this._flags.last_token,"do"),z=z||!(this._flags.parent.mode===d.ObjectLiteral&&this._flags.mode===d.Statement)&&E(this._flags.last_token,j)&&!L.newlines,z=z||g(this._flags.last_token,"else")&&!(g(L,"if")&&!L.comments_before),z=z||this._flags.last_token.type===n.END_EXPR&&(this._previous_flags.mode===d.ForInitializer||this._previous_flags.mode===d.Conditional),z=z||this._flags.last_token.type===n.WORD&&this._flags.mode===d.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==n.WORD&&L.type!==n.RESERVED,z=z||this._flags.mode===d.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||E(this._flags.last_token,["get","set"])),z?(this.set_mode(d.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,E(L,["do","for","if","while"])),!0):!1},C.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var z=d.Expression;if(L.text==="["){if(this._flags.last_token.type===n.WORD||this._flags.last_token.text===")"){E(this._flags.last_token,s)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode(z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}z=d.ArrayLiteral,T(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),t(this._flags.last_token.type,[n.START_EXPR,n.END_EXPR,n.WORD,n.OPERATOR,n.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===n.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,z=d.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,z=d.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,s)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L);else if(this._flags.last_token.type===n.WORD){this._output.space_before_token=!1;var $=this._tokens.peek(-3);if(this._options.space_after_named_function&&$){var he=this._tokens.peek(-4);E($,["async","function"])||$.text==="*"&&E(he,["async","function"])?this._output.space_before_token=!0:this._flags.mode===d.ObjectLiteral?($.text==="{"||$.text===","||$.text==="*"&&(he.text==="{"||he.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(L);(this._flags.last_token.type===n.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===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===n.START_BLOCK?this.print_newline():(this._flags.last_token.type===n.END_EXPR||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===n.COMMA)&&this.allow_wrap_or_preserved_newline(L,L.newlines),this.print_token(L),this.set_mode(z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},C.prototype.handle_end_expr=function(L){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&T(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===n.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(L),this.restore_mode(),x(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)},C.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var z=this._tokens.peek(),$=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===n.END_EXPR?(this.set_mode(d.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(d.BlockStatement):$&&(t($.text,[":",","])&&t(z.type,[n.STRING,n.WORD,n.RESERVED])||t(z.text,["get","set","..."])&&t($.type,[n.WORD,n.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t($.text,[":",","])?this.set_mode(d.BlockStatement):this.set_mode(d.ObjectLiteral):this._flags.last_token.type===n.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(d.BlockStatement):t(this._flags.last_token.type,[n.EQUALS,n.START_EXPR,n.COMMA,n.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 he=!z.comments_before&&z.text==="}",fe=he&&this._flags.last_word==="function"&&this._flags.last_token.type===n.END_EXPR;if(this._options.brace_preserve_inline){var Ie=0,Se=null;this._flags.inline_frame=!0;do if(Ie+=1,Se=this._tokens.peek(Ie-1),Se.newlines){this._flags.inline_frame=!1;break}while(Se.type!==n.EOF&&!(Se.type===n.END_BLOCK&&Se.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==n.OPERATOR&&(fe||this._flags.last_token.type===n.EQUALS||E(this._flags.last_token,_)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(T(this._previous_flags.mode)&&(this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.COMMA)&&((this._flags.last_token.type===n.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(L),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==n.OPERATOR&&this._flags.last_token.type!==n.START_EXPR&&(this._flags.last_token.type===n.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(L),this.indent(),!he&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},C.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===d.Statement;)this.restore_mode();var z=this._flags.last_token.type===n.START_BLOCK;this._flags.inline_frame&&!z?this._output.space_before_token=!0:this._options.brace_style==="expand"?z||this.print_newline():z||(T(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(L)},C.prototype.handle_word=function(L){if(L.type===n.RESERVED){if(t(L.text,["set","get"])&&this._flags.mode!==d.ObjectLiteral)L.type=n.WORD;else if(L.text==="import"&&t(this._tokens.peek().text,["(","."]))L.type=n.WORD;else if(t(L.text,["as","from"])&&!this._flags.import_block)L.type=n.WORD;else if(this._flags.mode===d.ObjectLiteral){var z=this._tokens.peek();z.text===":"&&(L.type=n.WORD)}}if(this.start_of_statement(L)?E(this._flags.last_token,["var","let","const"])&&L.type===n.WORD&&(this._flags.declaration_statement=!0):L.newlines&&!M(this._flags.mode)&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==n.EQUALS&&(this._options.preserve_newlines||!E(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(g(L,"while")){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&g(L,"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(L,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(L),this._flags.in_case=!0;return}if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L)),g(L,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===n.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD?E(this._flags.last_token,["get","set","new","export"])||E(this._flags.last_token,j)?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===n.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(M(this._flags.mode)||T(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var $="NONE";if(this._flags.last_token.type===n.END_BLOCK?this._previous_flags.inline_frame?$="SPACE":E(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?$="NEWLINE":($="SPACE",this._output.space_before_token=!0):$="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&this._flags.mode===d.BlockStatement?$="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&M(this._flags.mode)?$="SPACE":this._flags.last_token.type===n.STRING?$="NEWLINE":this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===d.ObjectLiteral&&t(this._last_last_text,["{",","]))?$="SPACE":this._flags.last_token.type===n.START_BLOCK?this._flags.inline_frame?$="SPACE":$="NEWLINE":this._flags.last_token.type===n.END_EXPR&&(this._output.space_before_token=!0,$="NEWLINE"),E(L,s)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?$="SPACE":$="NEWLINE"),E(L,["else","catch","finally"]))if((!(this._flags.last_token.type===n.END_BLOCK&&this._previous_flags.mode===d.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var he=this._output.current_line;he.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else $==="NEWLINE"?E(this._flags.last_token,_)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&E(L,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==n.END_EXPR?(this._flags.last_token.type!==n.START_EXPR||!E(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(g(L,"if")&&g(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):E(L,s)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&T(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():$==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===n.WORD||L.previous.type===n.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===n.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&g(L,"from")&&(this._flags.import_block=!1))},C.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var z=this._tokens.peek();this._flags.mode===d.Statement&&!(this._flags.if_block&&g(z,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},C.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===n.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L):L.text.startsWith("`")&&this._flags.last_token.type===n.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},C.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},C.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),this._output.space_before_token=!0,this._flags.declaration_statement?(M(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)):this._flags.mode===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(L)},C.prototype.handle_operator=function(L){var z=L.text==="*"&&(E(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[n.START_BLOCK,n.COMMA,n.END_BLOCK,n.SEMICOLON])),$=t(L.text,["-","+"])&&(t(this._flags.last_token.type,[n.START_BLOCK,n.START_EXPR,n.EQUALS,n.OPERATOR])||t(this._flags.last_token.text,s)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var he=!z;this.handle_whitespace_and_comments(L,he)}if(L.text==="*"&&this._flags.last_token.type===n.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===n.OPERATOR&&t(this._options.operator_position,p)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==n.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var fe=!0,Ie=!0,Se=!1;if(L.text===":"?this._flags.ternary_depth===0?fe=!1:(this._flags.ternary_depth-=1,Se=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!$&&!z&&this._options.preserve_newlines&&t(L.text,i)){var pe=L.text===":",Ce=pe&&Se,Me=pe&&!Se;switch(this._options.operator_position){case c.before_newline:this._output.space_before_token=!Me,this.print_token(L),(!pe||Ce)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case c.after_newline:this._output.space_before_token=!0,!pe||Ce?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case c.preserve_newline:Me||this.allow_wrap_or_preserved_newline(L),fe=!(this._output.just_added_newline()||Me),this._output.space_before_token=fe,this.print_token(L),this._output.space_before_token=!0;return}}if(z){this.allow_wrap_or_preserved_newline(L),fe=!1;var ge=this._tokens.peek();Ie=ge&&t(ge.type,[n.WORD,n.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),fe=this._flags.last_token.type===n.START_BLOCK,Ie=!1;else if(t(L.text,["--","++","!","~"])||$){if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),fe=!1,Ie=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var B=E(this._flags.last_token,_)&&L.newlines;B&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(B,!0)}this._flags.last_token.text===";"&&M(this._flags.mode)&&(fe=!0),this._flags.last_token.type===n.RESERVED?fe=!0:this._flags.last_token.type===n.END_EXPR?fe=!(this._flags.last_token.text==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===n.OPERATOR&&(fe=t(L.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(L.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Ie=!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||fe,this.print_token(L),this._output.space_before_token=Ie},C.prototype.handle_block_comment=function(L,z){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,z),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,z)},C.prototype.print_block_commment=function(L,z){var $=h(L.text),he,fe=!1,Ie=!1,Se=L.whitespace_before,pe=Se.length;if(this.print_newline(!1,z),this.print_token_line_indentation(L),this._output.add_token($[0]),this.print_newline(!1,z),$.length>1){for($=$.slice(1),fe=D($,"*"),Ie=w($,Se),fe&&(this._flags.alignment=1),he=0;he<$.length;he++)fe?(this.print_token_line_indentation(L),this._output.add_token(b($[he]))):Ie&&$[he]?(this.print_token_line_indentation(L),this._output.add_token($[he].substring(pe))):(this._output.current_line.set_indent(-1),this._output.add_token($[he])),this.print_newline(!1,z);this._flags.alignment=0}},C.prototype.handle_comment=function(L,z){L.newlines?this.print_newline(!1,z):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(L),this.print_newline(!1,z)},C.prototype.handle_dot=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),E(this._flags.last_token,_)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(L,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(L)},C.prototype.handle_unknown=function(L,z){this.print_token(L),L.text[L.text.length-1]===`
|
|
`&&this.print_newline(!1,z)},C.prototype.handle_eof=function(L){for(;this._flags.mode===d.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L)},e.exports.Beautifier=C},function(e){function A(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var l=new A(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},A.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},A.prototype.has_match=function(l){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(l))return!0;return!1},A.prototype.set_indent=function(l,a){this.is_empty()&&(this.__indent_count=l||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 l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__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(l){this.__items.push(l);var a=l.lastIndexOf(`
|
|
`);a!==-1?this.__character_count=l.length-a:this.__character_count+=l.length},A.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},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 l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function v(l,a){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),a=a||"",l.indent_level>0&&(a=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}v.prototype.get_indent_size=function(l,a){var r=this.__base_string_length;return a=a||0,l<0&&(r=0),r+=l*this.__indent_size,r+=a,r},v.prototype.get_indent_string=function(l,a){var r=this.__base_string;return a=a||0,l<0&&(l=0,r=""),a+=l*this.__indent_size,this.__ensure_cache(a),r+=this.__cache[a],r},v.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var l=this.__cache.length,a=0,r="";this.__indent_size&&l>=this.__indent_size&&(a=Math.floor(l/this.__indent_size),l-=a*this.__indent_size,r=new Array(a+1).join(this.__indent_string)),l&&(r+=new Array(l+1).join(" ")),this.__cache.push(r)};function f(l,a){this.__indent_cache=new v(l,a),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.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()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(l,a){return this.__indent_cache.get_indent_string(l,a)},f.prototype.get_indent_size=function(l,a){return this.__indent_cache.get_indent_size(l,a)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(l){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
|
|
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
|
|
`);return l!==`
|
|
`&&(r=r.replace(/[\n]/g,l)),r},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(l,a){return l=l||0,a=a||0,this.next_line.set_indent(l,a),this.__lines.length>1?(this.current_line.set_indent(l,a),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(l){for(var a=0;a<l.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},f.prototype.remove_indent=function(l){for(var a=this.__lines.length;l<a;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(l,a){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(l)!==0&&o.item(-1)!==a){this.__lines.splice(r+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=f},function(e){function A(v,f,l,a){this.type=v,this.text=f,this.comments_before=null,this.newlines=l||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 v="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",a="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",r="(?:\\\\u[0-9a-fA-F]{4}|["+v+l+"])",o="(?:\\\\u[0-9a-fA-F]{4}|["+f+l+a+"])*";A.identifier=new RegExp(r+o,"g"),A.identifierStart=new RegExp(r),A.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+l+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,v){var f=v(6).Options,l=["before-newline","after-newline","preserve-newline"];function a(r){f.call(this,r,"js");var o=this.raw_options.brace_style||null;o==="expand-strict"?this.raw_options.brace_style="expand":o==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var i=0;i<s.length;i++)s[i]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=s[i];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",l),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}a.prototype=new f,e.exports.Options=a},function(e){function A(l,a){this.raw_options=v(l,a),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}A.prototype._get_array=function(l,a){var r=this.raw_options[l],o=a||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},A.prototype._get_boolean=function(l,a){var r=this.raw_options[l],o=r===void 0?!!a:!!r;return o},A.prototype._get_characters=function(l,a){var r=this.raw_options[l],o=a||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},A.prototype._get_number=function(l,a){var r=this.raw_options[l];a=parseInt(a,10),isNaN(a)&&(a=0);var o=parseInt(r,10);return isNaN(o)&&(o=a),o},A.prototype._get_selection=function(l,a,r){var o=this._get_selection_list(l,a,r);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o[0]},A.prototype._get_selection_list=function(l,a,r){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[a[0]],!this._is_valid_selection(r,a))throw new Error("Invalid Default Value!");var o=this._get_array(l,r);if(!this._is_valid_selection(o,a))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o},A.prototype._is_valid_selection=function(l,a){return l.length&&a.length&&!l.some(function(r){return a.indexOf(r)===-1})};function v(l,a){var r={};l=f(l);var o;for(o in l)o!==a&&(r[o]=l[o]);if(a&&l[a])for(o in l[a])r[o]=l[a][o];return r}function f(l){var a={},r;for(r in l){var o=r.replace(/-/g,"_");a[o]=l[r]}return a}e.exports.Options=A,e.exports.normalizeOpts=f,e.exports.mergeOpts=v},function(e,A,v){var f=v(8).InputScanner,l=v(9).Tokenizer,a=v(9).TOKEN,r=v(13).Directives,o=v(4),s=v(12).Pattern,i=v(14).TemplatablePattern;function n(D,w){return w.indexOf(D)!==-1}var t={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},b=new r(/\/\*/,/\*\//),y=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,g=/[0-9]/,E=/[^\d\.]/,_=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),u=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";u=u.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),u="\\?\\.(?!\\d) "+u,u=u.replace(/ /g,"|");var c=new RegExp(u),p="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),d=p.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),x=new RegExp("^(?:"+d.join("|")+")$"),h,T=function(D,w){l.call(this,D,w),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var C=new s(this._input),j=new i(this._input).read_options(this._options);this.__patterns={template:j,identifier:j.starting_with(o.identifier).matching(o.identifierMatch),number:C.matching(y),punct:C.matching(c),comment:C.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:C.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:C.matching(/<!--/),html_comment_end:C.matching(/-->/),include:C.starting_with(/#include/).until_after(o.lineBreak),shebang:C.starting_with(/#!/).until_after(o.lineBreak),xml:C.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:j.until(/['\\\n\r\u2028\u2029]/),double_quote:j.until(/["\\\n\r\u2028\u2029]/),template_text:j.until(/[`\\$]/),template_expression:j.until(/[`}\\]/)}};T.prototype=new l,T.prototype._is_comment=function(D){return D.type===t.COMMENT||D.type===t.BLOCK_COMMENT||D.type===t.UNKNOWN},T.prototype._is_opening=function(D){return D.type===t.START_BLOCK||D.type===t.START_EXPR},T.prototype._is_closing=function(D,w){return(D.type===t.END_BLOCK||D.type===t.END_EXPR)&&w&&(D.text==="]"&&w.text==="["||D.text===")"&&w.text==="("||D.text==="}"&&w.text==="{")},T.prototype._reset=function(){h=!1},T.prototype._get_next_token=function(D,w){var C=null;this._readWhitespace();var j=this._input.peek();return j===null?this._create_token(t.EOF,""):(C=C||this._read_non_javascript(j),C=C||this._read_string(j),C=C||this._read_word(D),C=C||this._read_singles(j),C=C||this._read_comment(j),C=C||this._read_regexp(j,D),C=C||this._read_xml(j,D),C=C||this._read_punctuation(),C=C||this._create_token(t.UNKNOWN,this._input.next()),C)},T.prototype._read_word=function(D){var w;if(w=this.__patterns.identifier.read(),w!=="")return w=w.replace(o.allLineBreaks,`
|
|
`),!(D.type===t.DOT||D.type===t.RESERVED&&(D.text==="set"||D.text==="get"))&&x.test(w)?(w==="in"||w==="of")&&(D.type===t.WORD||D.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)},T.prototype._read_singles=function(D){var w=null;return D==="("||D==="["?w=this._create_token(t.START_EXPR,D):D===")"||D==="]"?w=this._create_token(t.END_EXPR,D):D==="{"?w=this._create_token(t.START_BLOCK,D):D==="}"?w=this._create_token(t.END_BLOCK,D):D===";"?w=this._create_token(t.SEMICOLON,D):D==="."&&E.test(this._input.peek(1))?w=this._create_token(t.DOT,D):D===","&&(w=this._create_token(t.COMMA,D)),w&&this._input.next(),w},T.prototype._read_punctuation=function(){var D=this.__patterns.punct.read();if(D!=="")return D==="="?this._create_token(t.EQUALS,D):D==="?."?this._create_token(t.DOT,D):this._create_token(t.OPERATOR,D)},T.prototype._read_non_javascript=function(D){var w="";if(D==="#"){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()+`
|
|
`);D=this._input.next();var C="#";if(this._input.hasNext()&&this._input.testChar(g)){do D=this._input.next(),C+=D;while(this._input.hasNext()&&D!=="#"&&D!=="=");return D==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(C+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(C+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,C)}this._input.back()}else if(D==="<"&&this._is_first_token()){if(w=this.__patterns.html_comment_start.read(),w){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)w+=this._input.next();return h=!0,this._create_token(t.COMMENT,w)}}else if(h&&D==="-"&&(w=this.__patterns.html_comment_end.read(),w))return h=!1,this._create_token(t.COMMENT,w);return null},T.prototype._read_comment=function(D){var w=null;if(D==="/"){var C="";if(this._input.peek(1)==="*"){C=this.__patterns.block_comment.read();var j=b.get_directives(C);j&&j.ignore==="start"&&(C+=b.readIgnored(this._input)),C=C.replace(o.allLineBreaks,`
|
|
`),w=this._create_token(t.BLOCK_COMMENT,C),w.directives=j}else this._input.peek(1)==="/"&&(C=this.__patterns.comment.read(),w=this._create_token(t.COMMENT,C))}return w},T.prototype._read_string=function(D){if(D==="`"||D==="'"||D==='"'){var w=this._input.next();return this.has_char_escapes=!1,D==="`"?w+=this._read_string_recursive("`",!0,"${"):w+=this._read_string_recursive(D),this.has_char_escapes&&this._options.unescape_strings&&(w=M(w)),this._input.peek()===D&&(w+=this._input.next()),w=w.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,w)}return null},T.prototype._allow_regexp_or_xml=function(D){return D.type===t.RESERVED&&n(D.text,["return","case","throw","else","do","typeof","yield"])||D.type===t.END_EXPR&&D.text===")"&&D.opened.previous.type===t.RESERVED&&n(D.opened.previous.text,["if","while","for"])||n(D.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},T.prototype._read_regexp=function(D,w){if(D==="/"&&this._allow_regexp_or_xml(w)){for(var C=this._input.next(),j=!1,L=!1;this._input.hasNext()&&(j||L||this._input.peek()!==D)&&!this._input.testChar(o.newline);)C+=this._input.peek(),j?j=!1:(j=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===D&&(C+=this._input.next(),C+=this._input.read(o.identifier)),this._create_token(t.STRING,C)}return null},T.prototype._read_xml=function(D,w){if(this._options.e4x&&D==="<"&&this._allow_regexp_or_xml(w)){var C="",j=this.__patterns.xml.read_match();if(j){for(var L=j[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),z=L.indexOf("{")===0,$=0;j;){var he=!!j[1],fe=j[2],Ie=!!j[j.length-1]||fe.slice(0,8)==="![CDATA[";if(!Ie&&(fe===L||z&&fe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(he?--$:++$),C+=j[0],$<=0)break;j=this.__patterns.xml.read_match()}return j||(C+=this._input.match(/[\s\S]*/g)[0]),C=C.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,C)}}return null};function M(D){for(var w="",C=0,j=new f(D),L=null;j.hasNext();)if(L=j.match(/([\s]|[^\\]|\\\\)+/g),L&&(w+=L[0]),j.peek()==="\\"){if(j.next(),j.peek()==="x")L=j.match(/x([0-9A-Fa-f]{2})/g);else if(j.peek()==="u")L=j.match(/u([0-9A-Fa-f]{4})/g);else{w+="\\",j.hasNext()&&(w+=j.next());continue}if(!L)return D;if(C=parseInt(L[1],16),C>126&&C<=255&&L[0].indexOf("x")===0)return D;if(C>=0&&C<32){w+="\\"+L[0];continue}else C===34||C===39||C===92?w+="\\"+String.fromCharCode(C):w+=String.fromCharCode(C)}return w}T.prototype._read_string_recursive=function(D,w,C){var j,L;D==="'"?L=this.__patterns.single_quote:D==='"'?L=this.__patterns.double_quote:D==="`"?L=this.__patterns.template_text:D==="}"&&(L=this.__patterns.template_expression);for(var z=L.read(),$="";this._input.hasNext();){if($=this._input.next(),$===D||!w&&o.newline.test($)){this._input.back();break}else $==="\\"&&this._input.hasNext()?(j=this._input.peek(),j==="x"||j==="u"?this.has_char_escapes=!0:j==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),$+=this._input.next()):C&&(C==="${"&&$==="$"&&this._input.peek()==="{"&&($+=this._input.next()),C===$&&(D==="`"?$+=this._read_string_recursive("}",w,"`"):$+=this._read_string_recursive("`",w,"${"),this._input.hasNext()&&($+=this._input.next())));$+=L.read(),z+=$}return z},e.exports.Tokenizer=T,e.exports.TOKEN=t,e.exports.positionable_operators=_.slice(),e.exports.line_starters=p.slice()},function(e){var A=RegExp.prototype.hasOwnProperty("sticky");function v(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},v.prototype.peek=function(f){var l=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(l=this.__input.charAt(f)),l},v.prototype.__match=function(f,l){f.lastIndex=l;var a=f.exec(this.__input);return a&&!(A&&f.sticky)&&(a.index!==l&&(a=null)),a},v.prototype.test=function(f,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(f,l):!1},v.prototype.testChar=function(f,l){var a=this.peek(l);return f.lastIndex=0,a!==null&&f.test(a)},v.prototype.match=function(f){var l=this.__match(f,this.__position);return l?this.__position+=l[0].length:l=null,l},v.prototype.read=function(f,l,a){var r="",o;return f&&(o=this.match(f),o&&(r+=o[0])),l&&(o||!f)&&(r+=this.readUntil(l,a)),r},v.prototype.readUntil=function(f,l){var a="",r=this.__position;f.lastIndex=this.__position;var o=f.exec(this.__input);return o?(r=o.index,l&&(r+=o[0].length)):r=this.__input_length,a=this.__input.substring(this.__position,r),this.__position=r,a},v.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},v.prototype.get_regexp=function(f,l){var a=null,r="g";return l&&A&&(r="y"),typeof f=="string"&&f!==""?a=new RegExp(f,r):f&&(a=new RegExp(f.source,r)),a},v.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(f){var l=this.__position,a=this.readUntilAfter(f);return this.__position=l,a},v.prototype.lookBack=function(f){var l=this.__position-1;return l>=f.length&&this.__input.substring(l-f.length,l).toLowerCase()===f},e.exports.InputScanner=v},function(e,A,v){var f=v(8).InputScanner,l=v(3).Token,a=v(10).TokenStream,r=v(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(i,n){this._input=new f(i),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var i,n=new l(o.START,""),t=null,b=[],y=new a;n.type!==o.EOF;){for(i=this._get_next_token(n,t);this._is_comment(i);)y.add(i),i=this._get_next_token(n,t);y.isEmpty()||(i.comments_before=y,y=new a),i.parent=t,this._is_opening(i)?(b.push(t),t=i):t&&this._is_closing(i,t)&&(i.opened=t,t.closed=i,t=b.pop(),i.parent=t),i.previous=n,n.next=i,this.__tokens.add(i),n=i}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(i,n){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(o.RAW,t):this._create_token(o.EOF,"")},s.prototype._is_comment=function(i){return!1},s.prototype._is_opening=function(i){return!1},s.prototype._is_closing=function(i,n){return!1},s.prototype._create_token=function(i,n){var t=new l(i,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=s,e.exports.TOKEN=o},function(e){function A(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__tokens[this.__position],this.__position+=1),v},A.prototype.peek=function(v){var f=null;return v=v||0,v+=this.__position,v>=0&&v<this.__tokens_length&&(f=this.__tokens[v]),f},A.prototype.add=function(v){this.__parent_token&&(v.parent=this.__parent_token),this.__tokens.push(v),this.__tokens_length+=1},e.exports.TokenStream=A},function(e,A,v){var f=v(12).Pattern;function l(a,r){f.call(this,a,r),r?this._line_regexp=this._input.get_regexp(r._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}l.prototype=new f,l.prototype.__set_whitespace_patterns=function(a,r){a+="\\t ",r+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+r+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+r+"]")},l.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var a=this._input.read(this._match_pattern);if(a===" ")this.whitespace_before_token=" ";else if(a){var r=this.__split(this._newline_regexp,a);this.newline_count=r.length-1,this.whitespace_before_token=r[this.newline_count]}return a},l.prototype.matching=function(a,r){var o=this._create();return o.__set_whitespace_patterns(a,r),o._update(),o},l.prototype._create=function(){return new l(this._input,this)},l.prototype.__split=function(a,r){a.lastIndex=0;for(var o=0,s=[],i=a.exec(r);i;)s.push(r.substring(o,i.index)),o=i.index+i[0].length,i=a.exec(r);return o<r.length?s.push(r.substring(o,r.length)):s.push(""),s},e.exports.WhitespacePattern=l},function(e){function A(v,f){this._input=v,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,f&&(this._starting_pattern=this._input.get_regexp(f._starting_pattern,!0),this._match_pattern=this._input.get_regexp(f._match_pattern,!0),this._until_pattern=this._input.get_regexp(f._until_pattern),this._until_after=f._until_after)}A.prototype.read=function(){var v=this._input.read(this._starting_pattern);return(!this._starting_pattern||v)&&(v+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),v},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(v){var f=this._create();return f._until_after=!0,f._until_pattern=this._input.get_regexp(v),f._update(),f},A.prototype.until=function(v){var f=this._create();return f._until_after=!1,f._until_pattern=this._input.get_regexp(v),f._update(),f},A.prototype.starting_with=function(v){var f=this._create();return f._starting_pattern=this._input.get_regexp(v,!0),f._update(),f},A.prototype.matching=function(v){var f=this._create();return f._match_pattern=this._input.get_regexp(v,!0),f._update(),f},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},e.exports.Pattern=A},function(e){function A(v,f){v=typeof v=="string"?v:v.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+f,"g")}A.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(v);l;)f[l[1]]=l[2],l=this.__directive_pattern.exec(v);return f},A.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=A},function(e,A,v){var f=v(12).Pattern,l={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(r,o){f.call(this,r,o),this.__template_pattern=null,this._disabled=Object.assign({},l),this._excluded=Object.assign({},l),o&&(this.__template_pattern=this._input.get_regexp(o.__template_pattern),this._excluded=Object.assign(this._excluded,o._excluded),this._disabled=Object.assign(this._disabled,o._disabled));var s=new f(r);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new f,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(r){var o=this._create();return o._disabled[r]=!0,o._update(),o},a.prototype.read_options=function(r){var o=this._create();for(var s in l)o._disabled[s]=r.templating.indexOf(s)===-1;return o._update(),o},a.prototype.exclude=function(r){var o=this._create();return o._excluded[r]=!0,o._update(),o},a.prototype.read=function(){var r="";this._match_pattern?r=this._input.read(this._starting_pattern):r=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),r+=o,o=this._read_template();return this._until_after&&(r+=this._input.readUntilAfter(this._until_pattern)),r},a.prototype.__set_templated_pattern=function(){var r=[];this._disabled.php||r.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||r.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||r.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(r.push(this.__patterns.django._starting_pattern.source),r.push(this.__patterns.django_value._starting_pattern.source),r.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||r.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&r.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+r.join("|")+")")},a.prototype._read_template=function(){var r="",o=this._input.peek();if(o==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(r=r||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(r=r||this.__patterns.handlebars_comment.read(),r=r||this.__patterns.handlebars_unescaped.read(),r=r||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(r=r||this.__patterns.django_value.read()),this._excluded.django||(r=r||this.__patterns.django_comment.read(),r=r||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(r=r||this.__patterns.smarty_comment.read(),r=r||this.__patterns.smarty_literal.read(),r=r||this.__patterns.smarty.read()));return r},e.exports.TemplatablePattern=a}],S={};function H(e){var A=S[e];if(A!==void 0)return A.exports;var v=S[e]={exports:{}};return m[e](v,v.exports,H),v.exports}var N=H(0);O=N})();var U=O;!(te=[],k=function(){return{js_beautify:U}}.apply(oe,te),k!==void 0&&(Be.exports=k))})()},"6eGT":function(Be,oe,P){"use strict";function te(k){return null}oe.a=te},"6nfa":function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___24EuS",flex_space_between:"flex_space_between___H0sq_",flex_box_vertical_center:"flex_box_vertical_center___lroQv",flex_box_center_end:"flex_box_center_end___2zqAg",flex_box_column:"flex_box_column___1sePp",row:"row___FQAuJ",title:"title___1l3-g",tagsWrap:"tagsWrap___18FE-",action:"action___asdVT",bar:"bar___M_nl0",name:"name___BKyJY",active:"active___1eybt",tagsBorderWrap:"tagsBorderWrap___1NzgL"}},"746U":function(Be,oe,P){"use strict";P.d(oe,"f",function(){return te}),P.d(oe,"l",function(){return k}),P.d(oe,"k",function(){return O}),P.d(oe,"j",function(){return U}),P.d(oe,"g",function(){return m}),P.d(oe,"m",function(){return S}),P.d(oe,"h",function(){return H}),P.d(oe,"n",function(){return N}),P.d(oe,"c",function(){return e}),P.d(oe,"a",function(){return A}),P.d(oe,"i",function(){return v}),P.d(oe,"o",function(){return f}),P.d(oe,"e",function(){return r}),P.d(oe,"d",function(){return o}),P.d(oe,"p",function(){return s}),P.d(oe,"b",function(){return i});function te(n){return Array.isArray(n)}function k(n){return typeof n=="string"}function O(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function U(n){return typeof n=="number"&&!isNaN(n)}function m(n){return n===!0||n===!1}function S(n){return typeof n=="undefined"}function H(n){return!N(n)}function N(n){return S(n)||n===null}function e(n,t){if(!n)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function A(n){if(N(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function v(n){return typeof n=="function"}function f(n,t){const b=Math.min(n.length,t.length);for(let y=0;y<b;y++)l(n[y],t[y])}function l(n,t){if(k(t)){if(typeof n!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(v(t)){try{if(n instanceof t)return}catch(b){}if(!N(n)&&n.constructor===t)return;if(t.length===1&&t.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function a(n){let t=[],b=Object.getPrototypeOf(n);for(;Object.prototype!==b;)t=t.concat(Object.getOwnPropertyNames(b)),b=Object.getPrototypeOf(b);return t}function r(n){const t=[];for(const b of a(n))typeof n[b]=="function"&&t.push(b);return t}function o(n,t){const b=g=>function(){const E=Array.prototype.slice.call(arguments,0);return t(g,E)};let y={};for(const g of n)y[g]=b(g);return y}function s(n){return n===null?void 0:n}function i(n,t="Unreachable"){throw new Error(t)}},"815F":function(Be,oe,P){"use strict";P.d(oe,"e",function(){return H}),P.d(oe,"c",function(){return e}),P.d(oe,"d",function(){return A}),P.d(oe,"a",function(){return f}),P.d(oe,"f",function(){return l}),P.d(oe,"b",function(){return a});var te=P("KQm4"),k=P("VTBJ"),O=P("Ff2n"),U=P("Zm9Q"),m=P("Kwbf"),S=P("OZM5");function H(r,o){return r!=null?r:o}function N(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=new Map;function s(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(t){var b=t.key,y=t.children;Object(m.a)(b!=null,"Tree node must have a certain key: [".concat(n).concat(b,"]"));var g=String(b);Object(m.a)(!o.has(g)||b===null||b===void 0,"Same 'key' exist in the Tree: ".concat(g)),o.set(g,!0),s(y,"".concat(n).concat(g," > "))})}s(r)}function e(r){function o(s){var i=Object(U.a)(s);return i.map(function(n){if(!Object(S.i)(n))return Object(m.a)(!n,"Tree/TreeNode can only accept TreeNode as children."),null;var t=n.key,b=n.props,y=b.children,g=Object(O.a)(b,["children"]),E=Object(k.a)({key:t},g),_=o(y);return _.length&&(E.children=_),E}).filter(function(n){return n})}return o(r)}function A(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=new Set(o===!0?[]:o),i=[];function n(t){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(y,g){var E=Object(S.h)(b?b.pos:"0",g),_=H(y.key,E),u=Object(k.a)(Object(k.a)({},y),{},{parent:b,pos:E,children:null,data:y,isStart:[].concat(Object(te.a)(b?b.isStart:[]),[g===0]),isEnd:[].concat(Object(te.a)(b?b.isEnd:[]),[g===t.length-1])});return i.push(u),o===!0||s.has(_)?u.children=n(y.children||[],u):u.children=[],u})}return n(r),i}function v(r,o,s){var i;s?typeof s=="string"?i=function(b){return b[s]}:typeof s=="function"&&(i=function(b){return s(b)}):i=function(b,y){return H(b.key,y)};function n(t,b,y){var g=t?t.children:r,E=t?Object(S.h)(y.pos,b):"0";if(t){var _=i(t,E),u={node:t,index:b,pos:E,key:_,parentPos:y.node?y.pos:null,level:y.level+1};o(u)}g&&g.forEach(function(c,p){n(c,p,{node:t,pos:E,level:y?y.level+1:-1})})}n(null)}function f(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.initWrapper,i=o.processEntity,n=o.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,b={},y={},g={posEntities:b,keyEntities:y};return s&&(g=s(g)||g),v(r,function(E){var _=E.node,u=E.index,c=E.pos,p=E.key,d=E.parentPos,x=E.level,h={node:_,index:u,key:p,pos:c,level:x},T=H(p,c);b[c]=h,y[T]=h,h.parent=b[d],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),i&&i(h,g)},t),n&&n(g),g}function l(r,o){var s=o.expandedKeys,i=o.selectedKeys,n=o.loadedKeys,t=o.loadingKeys,b=o.checkedKeys,y=o.halfCheckedKeys,g=o.dragOverNodeKey,E=o.dropPosition,_=o.keyEntities,u=_[r],c={eventKey:r,expanded:s.indexOf(r)!==-1,selected:i.indexOf(r)!==-1,loaded:n.indexOf(r)!==-1,loading:t.indexOf(r)!==-1,checked:b.indexOf(r)!==-1,halfChecked:y.indexOf(r)!==-1,pos:String(u?u.pos:""),dragOver:g===r&&E===0,dragOverGapTop:g===r&&E===-1,dragOverGapBottom:g===r&&E===1};return c}function a(r){var o=r.data,s=r.expanded,i=r.selected,n=r.checked,t=r.loaded,b=r.loading,y=r.halfChecked,g=r.dragOver,E=r.dragOverGapTop,_=r.dragOverGapBottom,u=r.pos,c=r.active,p=Object(k.a)(Object(k.a)({},o),{},{expanded:s,selected:i,checked:n,loaded:t,loading:b,halfChecked:y,dragOver:g,dragOverGapTop:E,dragOverGapBottom:_,pos:u,active:c});return"props"in p||Object.defineProperty(p,"props",{get:function(){return Object(m.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),r}}),p}},"8HAY":function(Be,oe,P){"use strict";P.d(oe,"a",function(){return m}),P.d(oe,"b",function(){return S}),P.d(oe,"d",function(){return H}),P.d(oe,"e",function(){return N}),P.d(oe,"c",function(){return e});var te=P("MI8n"),k=P("pmY6"),O=P("3/fG"),U=function(A,v,f,l){function a(r){return r instanceof f?r:new f(function(o){o(r)})}return new(f||(f=Promise))(function(r,o){function s(t){try{n(l.next(t))}catch(b){o(b)}}function i(t){try{n(l.throw(t))}catch(b){o(b)}}function n(t){t.done?r(t.value):a(t.value).then(s,i)}n((l=l.apply(A,v||[])).next())})};class m extends k.a{constructor(A,v="",f="",l=!0,a){super();this._onDidChange=this._register(new te.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=A,this._label=v,this._cssClass=f,this._enabled=l,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,v){return U(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(A))})}}class S extends k.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new te.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new te.b),this.onDidRun=this._onDidRun.event}run(A,v){return U(this,void 0,void 0,function*(){if(!A.enabled)return;this._onBeforeRun.fire({action:A});let f;try{yield this.runAction(A,v)}catch(l){f=l}this._onDidRun.fire({action:A,error:f})})}runAction(A,v){return U(this,void 0,void 0,function*(){yield A.run(v)})}}class H extends m{constructor(A){super(H.ID,A,A?"separator text":"separator");this.checked=!1,this.enabled=!1}}H.ID="vs.actions.separator";class N{constructor(A,v,f,l){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=A,this.label=v,this.class=l,this._actions=f}get actions(){return this._actions}dispose(){}run(){return U(this,void 0,void 0,function*(){})}}class e extends m{constructor(){super(e.ID,O.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8WcF":function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___2fahw",flex_space_between:"flex_space_between___1h4HM",flex_box_vertical_center:"flex_box_vertical_center___2kxeE",flex_box_center_end:"flex_box_center_end___OjPB4",flex_box_column:"flex_box_column___3zY1h",orderWrap:"orderWrap___VQuq1",orderIconWrap:"orderIconWrap___18q7W",orderAsc:"orderAsc___3WBGg",orderDesc:"orderDesc____ipxK",active:"active___3EMfI",cursorPointer:"cursorPointer___3og_L",orderTextWrap:"orderTextWrap___XQlmv"}},"8hTe":function(Be,oe,P){Be.exports={button:"button___1wy9m"}},"8mKB":function(Be,oe,P){"use strict";var te=P("rePB"),k=P("1OyB"),O=P("vuIU"),U=P("Ji7U"),m=P("md7G"),S=P("foSv"),H=P("q1tI"),N=P.n(H),e=P("m+aA"),A=P("TSYQ"),v=P.n(A),f=P("4IlW");function l(c){var p=c.pageXOffset,d="scrollLeft";if(typeof p!="number"){var x=c.document;p=x.documentElement[d],typeof p!="number"&&(p=x.body[d])}return p}function a(c){var p,d,x=c.ownerDocument,h=x.body,T=x&&x.documentElement,M=c.getBoundingClientRect();return p=M.left,d=M.top,p-=T.clientLeft||h.clientLeft||0,d-=T.clientTop||h.clientTop||0,{left:p,top:d}}function r(c){var p=a(c),d=c.ownerDocument,x=d.defaultView||d.parentWindow;return p.left+=l(x),p.left}function o(c){var p=s();return function(){var x=Object(S.a)(c),h;if(p){var T=Object(S.a)(this).constructor;h=Reflect.construct(x,arguments,T)}else h=x.apply(this,arguments);return Object(m.a)(this,h)}}function s(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(c){return!1}}var i=function(c){Object(U.a)(d,c);var p=o(d);function d(){var x;return Object(k.a)(this,d),x=p.apply(this,arguments),x.onHover=function(h){var T=x.props,M=T.onHover,D=T.index;M(h,D)},x.onClick=function(h){var T=x.props,M=T.onClick,D=T.index;M(h,D)},x.onKeyDown=function(h){var T=x.props,M=T.onClick,D=T.index;h.keyCode===13&&M(h,D)},x}return Object(O.a)(d,[{key:"getClassName",value:function(){var h=this.props,T=h.prefixCls,M=h.index,D=h.value,w=h.allowHalf,C=h.focused,j=M+1,L=T;return D===0&&M===0&&C?L+=" ".concat(T,"-focused"):w&&D+.5>=j&&D<j?(L+=" ".concat(T,"-half ").concat(T,"-active"),C&&(L+=" ".concat(T,"-focused"))):(L+=j<=D?" ".concat(T,"-full"):" ".concat(T,"-zero"),j===D&&C&&(L+=" ".concat(T,"-focused"))),L}},{key:"render",value:function(){var h=this.onHover,T=this.onClick,M=this.onKeyDown,D=this.props,w=D.disabled,C=D.prefixCls,j=D.character,L=D.characterRender,z=D.index,$=D.count,he=D.value,fe=typeof j=="function"?j(this.props):j,Ie=N.a.createElement("li",{className:this.getClassName()},N.a.createElement("div",{onClick:w?null:T,onKeyDown:w?null:M,onMouseMove:w?null:h,role:"radio","aria-checked":he>z?"true":"false","aria-posinset":z+1,"aria-setsize":$,tabIndex:w?-1:0},N.a.createElement("div",{className:"".concat(C,"-first")},fe),N.a.createElement("div",{className:"".concat(C,"-second")},fe)));return L&&(Ie=L(Ie,this.props)),Ie}}]),d}(N.a.Component);function n(c,p){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(c);p&&(x=x.filter(function(h){return Object.getOwnPropertyDescriptor(c,h).enumerable})),d.push.apply(d,x)}return d}function t(c){for(var p=1;p<arguments.length;p++){var d=arguments[p]!=null?arguments[p]:{};p%2?n(Object(d),!0).forEach(function(x){Object(te.a)(c,x,d[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):n(Object(d)).forEach(function(x){Object.defineProperty(c,x,Object.getOwnPropertyDescriptor(d,x))})}return c}function b(c){var p=y();return function(){var x=Object(S.a)(c),h;if(p){var T=Object(S.a)(this).constructor;h=Reflect.construct(x,arguments,T)}else h=x.apply(this,arguments);return Object(m.a)(this,h)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(c){return!1}}function g(){}var E=function(c){Object(U.a)(d,c);var p=b(d);function d(x){var h;Object(k.a)(this,d),h=p.call(this,x),h.onHover=function(M,D){var w=h.props.onHoverChange,C=h.getStarValue(D,M.pageX),j=h.state.cleanedValue;C!==j&&h.setState({hoverValue:C,cleanedValue:null}),w(C)},h.onMouseLeave=function(){var M=h.props.onHoverChange;h.setState({hoverValue:void 0,cleanedValue:null}),M(void 0)},h.onClick=function(M,D){var w=h.props.allowClear,C=h.state.value,j=h.getStarValue(D,M.pageX),L=!1;w&&(L=j===C),h.onMouseLeave(),h.changeValue(L?0:j),h.setState({cleanedValue:L?j:null})},h.onFocus=function(){var M=h.props.onFocus;h.setState({focused:!0}),M&&M()},h.onBlur=function(){var M=h.props.onBlur;h.setState({focused:!1}),M&&M()},h.onKeyDown=function(M){var D=M.keyCode,w=h.props,C=w.count,j=w.allowHalf,L=w.onKeyDown,z=w.direction,$=z==="rtl",he=h.state.value;D===f.a.RIGHT&&he<C&&!$?(j?he+=.5:he+=1,h.changeValue(he),M.preventDefault()):D===f.a.LEFT&&he>0&&!$||D===f.a.RIGHT&&he>0&&$?(j?he-=.5:he-=1,h.changeValue(he),M.preventDefault()):D===f.a.LEFT&&he<C&&$&&(j?he+=.5:he+=1,h.changeValue(he),M.preventDefault()),L&&L(M)},h.saveRef=function(M){return function(D){h.stars[M]=D}},h.saveRate=function(M){h.rate=M};var T=x.value;return T===void 0&&(T=x.defaultValue),h.stars={},h.state={value:T,focused:!1,cleanedValue:null},h}return Object(O.a)(d,[{key:"componentDidMount",value:function(){var h=this.props,T=h.autoFocus,M=h.disabled;T&&!M&&this.focus()}},{key:"getStarDOM",value:function(h){return Object(e.a)(this.stars[h])}},{key:"getStarValue",value:function(h,T){var M=this.props,D=M.allowHalf,w=M.direction,C=w==="rtl",j=h+1;if(D){var L=this.getStarDOM(h),z=r(L),$=L.clientWidth;(C&&T-z>$/2||!C&&T-z<$/2)&&(j-=.5)}return j}},{key:"focus",value:function(){var h=this.props.disabled;h||this.rate.focus()}},{key:"blur",value:function(){var h=this.props.disabled;h||this.rate.blur()}},{key:"changeValue",value:function(h){var T=this.props.onChange;"value"in this.props||this.setState({value:h}),T(h)}},{key:"render",value:function(){for(var h=this.props,T=h.count,M=h.allowHalf,D=h.style,w=h.prefixCls,C=h.disabled,j=h.className,L=h.character,z=h.characterRender,$=h.tabIndex,he=h.direction,fe=this.state,Ie=fe.value,Se=fe.hoverValue,pe=fe.focused,Ce=[],Me=C?"".concat(w,"-disabled"):"",ge=0;ge<T;ge+=1)Ce.push(N.a.createElement(i,{ref:this.saveRef(ge),index:ge,count:T,disabled:C,prefixCls:"".concat(w,"-star"),allowHalf:M,value:Se===void 0?Ie:Se,onClick:this.onClick,onHover:this.onHover,key:ge,character:L,characterRender:z,focused:pe}));var B=v()(w,Me,j,Object(te.a)({},"".concat(w,"-rtl"),he==="rtl"));return N.a.createElement("ul",{className:B,style:D,onMouseLeave:C?null:this.onMouseLeave,tabIndex:C?-1:$,onFocus:C?null:this.onFocus,onBlur:C?null:this.onBlur,onKeyDown:C?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},Ce)}}],[{key:"getDerivedStateFromProps",value:function(h,T){return"value"in h&&h.value!==void 0?t(t({},T),{},{value:h.value}):T}}]),d}(N.a.Component);E.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:g,character:"\u2605",onHoverChange:g,tabIndex:0,direction:"ltr"};var _=E,u=oe.a=_},"9Bee":function(Be,oe,P){"use strict";var te=P("DYRE"),k=P("zeV3"),O=P("+L6B"),U=P("2/Rp"),m=P("k1fw"),S=P("9og8"),H=P("tJVT"),N=P("WmNS"),e=P.n(N),A=P("q1tI"),v=P.n(A),f=P("vg9a"),l=P("DlQD"),a=P.n(l),r=P("rUJ1");function o(q,K){var G=q.match(/^(\s+)(?:```)/);if(G===null)return K;var Q=G[1];return K.split(`
|
|
`).map(function(ee){var V=ee.match(/^\s+/);if(V===null)return ee;var J=Object(H.a)(V,1),ne=J[0];return ne.length>=Q.length?ee.slice(Q.length):ee}).join(`
|
|
`)}var s=[],i=["<ul>"],n=new a.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){s.length=0,i=["<ul>"]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(q,K,G,Q){if(K>=q.length||q[K].level<=G)return K;var ee=q[K];Q.push("<li><a href='#"+ee.anchor+"'>"+ee.text+"</a>"),K++;var V=[];return K=g(q,K,ee.level,V),V.length>0&&(Q.push("<ul>"),V.forEach(function(J){Q.push(J)}),Q.push("</ul>")),Q.push("</li>"),K=g(q,K,G,Q),K}function E(){return g(s,0,0,i),i.push("</ul>"),i.join("")}var _={heading:function(K){var G=t.exec(K);if(G)return{type:"heading",raw:G[0],depth:G[1].length,text:G[2]}},fences:function(K){var G=this.rules.block.fences.exec(K);if(G){var Q=G[0],ee=o(Q,G[3]||""),V=G[2]?G[2].trim():G[2];if(["latex","katex","math"].indexOf(V)>=0){var J=p(),ne=ee;ee=J,d[J]={type:"block",expression:ne}}return{type:"code",raw:Q,lang:V,text:ee}}}},u=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,p=function(){return"__special_katext_id_".concat(c++,"__")},d={};function x(){return d}function h(){c=0,d={}}function T(q){return q=q.replace(u,function(K,G){var Q=p();return d[Q]={type:"inline",expression:G},Q}),q}var M=n.listitem;n.listitem=function(q){return M(T(q))};var D=n.paragraph;n.paragraph=function(q){return D(T(q))};var w=n.tablecell;n.tablecell=function(q,K){return w(T(q),K)},n.code=function(q,K,G){var Q=(K||"").match(/\S*/)[0];return Q?["latex","katex","math"].indexOf(Q)>=0?"<p class='editormd-tex'>".concat(q,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(K,'">').concat(G?q:Object(r.escape)(q,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(G?q:Object(r.escape)(q,!0))+"</code></pre>"},n.heading=function(q,K,G){var Q=this.options.headerPrefix+G.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:Q,level:K,text:q}),"<h"+K+' id="'+Q+'">'+q+"</h"+K+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:_,renderer:n});var C=a.a,j=P("SJMd"),L=P("ulZh"),z=P.n(L),$=P("m3rI"),he=P("Oy/b"),fe=P("p5ED"),Ie=P("ErOA"),Se=P("STEk");/* **********************************
|
|
cropro version 1.2.0
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
copyright Alan Mendelevich
|
|
see README and LICENSE for details
|
|
********************************** *//*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var pe=function(q,K){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(G,Q){G.__proto__=Q}||function(G,Q){for(var ee in Q)Object.prototype.hasOwnProperty.call(Q,ee)&&(G[ee]=Q[ee])})(q,K)};function Ce(q,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function G(){this.constructor=q}pe(q,K),q.prototype=K===null?Object.create(K):(G.prototype=K.prototype,new G)}function Me(q,K,G,Q){return new(G||(G=Promise))(function(ee,V){function J(ye){try{ae(Q.next(ye))}catch(be){V(be)}}function ne(ye){try{ae(Q.throw(ye))}catch(be){V(be)}}function ae(ye){var be;ye.done?ee(ye.value):(be=ye.value,be instanceof G?be:new G(function(Pe){Pe(be)})).then(J,ne)}ae((Q=Q.apply(q,K||[])).next())})}function ge(q,K){var G,Q,ee,V,J={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return V={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function ne(ae){return function(ye){return function(be){if(G)throw new TypeError("Generator is already executing.");for(;J;)try{if(G=1,Q&&(ee=2&be[0]?Q.return:be[0]?Q.throw||((ee=Q.return)&&ee.call(Q),0):Q.next)&&!(ee=ee.call(Q,be[1])).done)return ee;switch(Q=0,ee&&(be=[2&be[0],ee.value]),be[0]){case 0:case 1:ee=be;break;case 4:return J.label++,{value:be[1],done:!1};case 5:J.label++,Q=be[1],be=[0];continue;case 7:be=J.ops.pop(),J.trys.pop();continue;default:if(!(ee=J.trys,(ee=ee.length>0&&ee[ee.length-1])||be[0]!==6&&be[0]!==2)){J=0;continue}if(be[0]===3&&(!ee||be[1]>ee[0]&&be[1]<ee[3])){J.label=be[1];break}if(be[0]===6&&J.label<ee[1]){J.label=ee[1],ee=be;break}if(ee&&J.label<ee[2]){J.label=ee[2],J.ops.push(be);break}ee[2]&&J.ops.pop(),J.trys.pop();continue}be=K.call(q,J)}catch(Pe){be=[6,Pe],Q=0}finally{G=ee=0}if(5&be[0])throw be[1];return{value:be[0]?be[1]:void 0,done:!0}}([ae,ye])}}}var B=function(){function q(){}return q.addKey=function(K){q.key=K},Object.defineProperty(q,"isLicensed",{get:function(){return!!q.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(q.key)},enumerable:!1,configurable:!0}),q}(),R=function(){function q(){}return q.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},q.setAttributes=function(K,G){for(var Q=0,ee=G;Q<ee.length;Q++){var V=ee[Q],J=V[0],ne=V[1];K.setAttribute(J,ne)}},q.createRect=function(K,G,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return ee.setAttribute("width",K.toString()),ee.setAttribute("height",G.toString()),Q&&q.setAttributes(ee,Q),ee},q.createLine=function(K,G,Q,ee,V){var J=document.createElementNS("http://www.w3.org/2000/svg","line");return J.setAttribute("x1",K.toString()),J.setAttribute("y1",G.toString()),J.setAttribute("x2",Q.toString()),J.setAttribute("y2",ee.toString()),V&&q.setAttributes(J,V),J},q.createPolygon=function(K,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Q.setAttribute("points",K),G&&q.setAttributes(Q,G),Q},q.createCircle=function(K,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","circle");return Q.setAttribute("cx",(K/2).toString()),Q.setAttribute("cy",(K/2).toString()),Q.setAttribute("r",K.toString()),G&&q.setAttributes(Q,G),Q},q.createEllipse=function(K,G,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ee.setAttribute("cx",(K/2).toString()),ee.setAttribute("cy",(G/2).toString()),ee.setAttribute("rx",(K/2).toString()),ee.setAttribute("ry",(G/2).toString()),Q&&q.setAttributes(ee,Q),ee},q.createGroup=function(K){var G=document.createElementNS("http://www.w3.org/2000/svg","g");return K&&q.setAttributes(G,K),G},q.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},q.createMarker=function(K,G,Q,ee,V,J,ne){var ae=document.createElementNS("http://www.w3.org/2000/svg","marker");return q.setAttributes(ae,[["id",K],["orient",G],["markerWidth",Q.toString()],["markerHeight",ee.toString()],["refX",V.toString()],["refY",J.toString()]]),ae.appendChild(ne),ae},q.createText=function(K){var G=document.createElementNS("http://www.w3.org/2000/svg","text");return G.setAttribute("x","0"),G.setAttribute("y","0"),K&&q.setAttributes(G,K),G},q.createTSpan=function(K,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Q.textContent=K,G&&q.setAttributes(Q,G),Q},q.createImage=function(K){var G=document.createElementNS("http://www.w3.org/2000/svg","image");return K&&q.setAttributes(G,K),G},q.createPoint=function(K,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Q.x=K,Q.y=G,Q},q.createPath=function(K,G){var Q=document.createElementNS("http://www.w3.org/2000/svg","path");return Q.setAttribute("d",K),G&&q.setAttributes(Q,G),Q},q.createElement=function(K,G){var Q=document.createElementNS("http://www.w3.org/2000/svg",K);return G&&q.setAttributes(Q,G),Q},q.getHollowRectanglePath=function(K,G,Q,ee,V,J,ne,ae){return"M"+K+","+G+"V"+(G+ee)+"H"+(K+Q)+"V"+G+"H"+V+"V"+J+"H"+(V+ne)+"V"+(J+ae)+"H"+V+"V"+G+"Z"},q}(),I=function(){function q(K){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+K+"_"}return Object.defineProperty(q.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),q.prototype.addClass=function(K){return this.styleSheet===void 0&&this.addStyleSheet(),K.name=""+this.classNamePrefix+K.localName,this.classes.push(K),this.styleSheet.sheet.insertRule("."+K.name+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length),K},q.prototype.addRule=function(K){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(K),this.styleSheet.sheet.insertRule(K.selector+" {"+K.style+"}",this.styleSheet.sheet.cssRules.length)},q.prototype.addStyleSheet=function(){var K;this.styleSheet=document.createElement("style"),((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).appendChild(this.styleSheet),this.addRule(new W("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new W("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new W("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Y("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Y("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},q.prototype.removeStyleSheet=function(){var K;this.styleSheet&&(((K=this.styleSheetRoot)!==null&&K!==void 0?K:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},q}(),W=function(q,K){this.selector=q,this.style=K},Y=function(q,K){this.localName=q,this.style=K},F=function(){function q(){this.blocks=[],this.display=""}return q.prototype.addButtonBlock=function(K){K.className=this.blockClassName,K.buttonClassName=this.buttonClassName,K.buttonColorsClassName=this.buttonColorsClassName,K.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(K)},q.prototype.addElementBlock=function(K){K.className===void 0&&(K.className=this.blockClassName),this.blocks.push(K)},q.prototype.getUI=function(){var K=document.createElement("div");return K.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,K.style.display=this.display,this.blocks.forEach(function(G){return K.appendChild(G.getUI())}),K},q}(),le=function(){function q(){}return q.prototype.getUI=function(){var K=document.createElement("div");if(K.className=this.className,this.minWidth!==void 0&&(K.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":K.style.justifyContent="flex-start";break;case"center":K.style.justifyContent="center";break;case"end":K.style.justifyContent="flex-end"}return K.style.whiteSpace="nowrap",K},q}(),Ae=function(q){function K(){var G=q!==null&&q.apply(this,arguments)||this;return G.buttons=[],G}return Ce(K,q),K.prototype.addButton=function(G){G.className=this.buttonClassName,G.colorsClassName=this.buttonColorsClassName,G.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(G)},K.prototype.getUI=function(){var G=q.prototype.getUI.call(this);return this.buttons.forEach(function(Q){return G.appendChild(Q.getUI())}),G},K}(le),Ne=function(){function q(K,G){this._isActive=!1,this._isHidden=!1,this._icon=K,this.title=G,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(q.prototype,"icon",{get:function(){return this._icon},set:function(K){this._icon=K,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isActive",{get:function(){return this._isActive},set:function(K){this._isActive=K,this.adjustClassName()},enumerable:!1,configurable:!0}),q.prototype.getUI=function(){var K=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return K.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},q.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},q.prototype.hide=function(){this._isHidden=!0},q}(),ie=function(q){function K(){var G=q!==null&&q.apply(this,arguments)||this;return G.elements=[],G}return Ce(K,q),K.prototype.addElement=function(G){this.elements.push(G)},K.prototype.getUI=function(){var G=q.prototype.getUI.call(this);return this.elements.forEach(function(Q){return G.appendChild(Q)}),G},K}(le),de=function(){function q(K,G){this.horizontal=K,this.vertical=G}return Object.defineProperty(q.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),q.prototype.getVerticalLength=function(K){return K/this.ratio},q.prototype.getHorizontalLength=function(K){return K*this.ratio},q}(),we=function(){function q(){}return q.getIcon=function(K,G){if(K>0&&G>0){var Q=new de(K,G),ee=Q.ratio>=1?20:Q.getHorizontalLength(20),V=Q.ratio<1?20:Q.getVerticalLength(20),J=document.createElementNS("http://www.w3.org/2000/svg","svg");J.setAttribute("xmlns","http://www.w3.org/2000/svg"),J.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(J);var ne=R.createDefs();J.appendChild(ne);var ae=R.createElement("clipPath",[["id","text-bg-clip"]]);ne.appendChild(ae);var ye=R.createPath(R.getHollowRectanglePath((24-ee)/2,(24-V)/2,ee,V,(24-ee)/2+2,(24-V)/2+2,ee-4,V-4));J.appendChild(ye);var be=R.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);be.appendChild(R.createTSpan(K+":"+G)),J.appendChild(be);var Pe=be.getBBox();R.setAttributes(be,[["x",((24-Pe.width)/2).toString()],["y",((24-Pe.height)/2-Pe.y).toString()]]);var ze=R.createPath(R.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Pe.width))/2,(24-Math.ceil(Pe.height))/2,Math.ceil(Pe.width),Math.ceil(Pe.height)));return ae.appendChild(ze),R.setAttributes(ye,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(J),J.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},q}(),De=function(q){function K(G,Q,ee){var V=q.call(this,G,Q)||this;return V.isDropdownOpen=!1,V.onClick=V.dropdownButtonClicked,V.dropdownButtons=ee,V}return Ce(K,q),K.prototype.setupDropdown=function(){var G=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(Q){Q.className=G.className,Q.colorsClassName=G.colorsClassName,G.dropdownBlock.appendChild(Q.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},K.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},K.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},K.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},K.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},K.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},K}(Ne),Ke=function(){function q(K,G){this.GRIP_SIZE=10,this.color=K,this.fillColor=G,this.visual=R.createGroup(),this.visual.appendChild(R.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(R.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return q.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},q.prototype.setCenter=function(K,G){this.visual.childNodes.forEach(function(Q){return R.setAttributes(Q,[["cx",K.toString()],["cy",G.toString()]])})},q}(),Je=function(){function q(K,G,Q,ee){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=K,this.canvasHeight=G,this.margin=Q,this.container=ee,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(q.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(K){this._aspectRatio=K,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.gridContainer&&R.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(K){this._zoomFactor=K,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),q.prototype.open=function(){var K=this;this.cropShadeElement=R.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=R.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var G=0;G<this.numberOfGridLines;G++)this.horizontalGridLines.push(R.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(R.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(Q){return K.gridContainer.appendChild(Q)}),this.verticalGridLines.forEach(function(Q){return K.gridContainer.appendChild(Q)}),this.cropRectElement=R.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Ke(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},q.prototype.setCropRectangle=function(K){this.cropRect=K;var G=Object.assign({},this.cropRect);this.zoomFactor!==1&&(G.width=this.cropRect.width*this.zoomFactor,G.height=this.cropRect.height*this.zoomFactor,G.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-G.width/2,G.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-G.height/2),R.setAttributes(this.cropRectElement,[["x",G.x.toString()],["y",G.y.toString()],["width",G.width.toString()],["height",G.height.toString()]]);var Q=G.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(V,J){var ne=G.y+Q*(J+1);R.setAttributes(V,[["x1",""+G.x],["y1",""+ne],["x2",""+(G.x+G.width)],["y2",""+ne]])});var ee=G.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(V,J){var ne=G.x+ee*(J+1);R.setAttributes(V,[["x1",""+ne],["y1",""+G.y],["x2",""+ne],["y2",""+(G.y+G.height)]])}),R.setAttributes(this.cropShadeElement,[["d",R.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,G.x,G.y,G.width,G.height)]]),this.topLeftGrip.setCenter(G.x,G.y),this.topRightGrip.setCenter(G.x+G.width,G.y),this.bottomLeftGrip.setCenter(G.x,G.y+G.height),this.bottomRightGrip.setCenter(G.x+G.width,G.y+G.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},q.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)},q.prototype.clientToLocalCoordinates=function(K,G){var Q=this.container.getBoundingClientRect();return{x:K-Q.left+this.margin,y:G-Q.top+this.margin}},q.prototype.onPointerDown=function(K){this.container.setPointerCapture(K.pointerId),this.previousPoint=this.clientToLocalCoordinates(K.clientX,K.clientY),this.cropRectElement===K.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(K.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(K.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(K.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(K.target)&&(this.activeGrip=this.bottomRightGrip)},q.prototype.onPointerMove=function(K){if(this.isMoving)this.move(this.clientToLocalCoordinates(K.clientX,K.clientY));else if(this.activeGrip){var G=this.clientToLocalCoordinates(K.clientX,K.clientY);this.resize(G)}K.preventDefault()},q.prototype.onPointerUp=function(K){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(K.pointerId)},q.prototype.move=function(K){var G=K.x-this.previousPoint.x,Q=K.y-this.previousPoint.y;this.zoomFactor!==1&&(G=-G/this.zoomFactor,Q=-Q/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+G),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+Q),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=K},q.prototype.resize=function(K){var G=Object.assign({},this.cropRect),Q=K.x-this.previousPoint.x,ee=K.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:G.x+Q<this.margin&&(Q=this.margin-G.x),G.x+=Q,G.width=this.cropRect.x+this.cropRect.width-G.x;break;case this.bottomRightGrip:case this.topRightGrip:G.width+Q>this.canvasWidth*this.zoomFactor&&(Q=this.canvasWidth*this.zoomFactor-G.width),G.width+=Q}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(G.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(Q),G.height=this.aspectRatio.getVerticalLength(G.width)):(G.y+=ee,G.height=this.cropRect.y+this.cropRect.height-G.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?G.height=this.aspectRatio.getVerticalLength(G.width):G.height+=ee}G.width<10&&(G.x=this.cropRect.x,G.width=10),G.height<10&&(G.y=this.cropRect.y,G.height=10),this.previousPoint=K,G.x>=this.margin&&G.y>=this.margin&&G.x-this.margin+G.width<=this.canvasWidth&&G.y-this.margin+G.height<=this.canvasHeight&&(this.cropRect=G,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},q.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var K=this.cropRect.x+this.cropRect.width/2,G=this.cropRect.y+this.cropRect.height/2,Q=this.aspectRatio.getHorizontalLength(this.cropRect.height),ee=this.aspectRatio.getVerticalLength(this.cropRect.width);Q/this.canvasWidth<ee/this.canvasHeight?this.cropRect.width=Q:this.cropRect.height=ee,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=K-this.cropRect.width/2,this.cropRect.y=G-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)}},q.prototype.getRescaledRect=function(K,G,Q,ee,V,J){var ne=Q/K,ae=ee/G;return{x:(V.x-J)*ne+J,y:(V.y-J)*ae+J,width:V.width*ne,height:V.height*ae}},q.prototype.scaleCanvas=function(K,G){var Q=this.getRescaledRect(this.canvasWidth,this.canvasHeight,K,G,this.cropRect,this.margin);this.canvasWidth=K,this.canvasHeight=G,this.onCropChange&&this.onCropChange(Q),this.setCropRectangle(Q)},q}(),Ze=function(){function q(K){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=K,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(q.prototype,"angle",{get:function(){return this._angle},set:function(K){this._angle=K,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),q.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},q.prototype.onPointerDown=function(K){this.controlContainer.setPointerCapture(K.pointerId),this.isDragging=!0,this.previousPoint={x:K.clientX,y:K.clientY}},q.prototype.onPointerMove=function(K){this.isDragging&&(this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.previousPoint.x=K.clientX)},q.prototype.onPointerUp=function(K){this.isDragging&&this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(K.pointerId)},q.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var K=this.angleLabelText.getBBox();R.setAttributes(this.angleLabelElement,[["x",((this.width-K.width)/2).toString()],["y",(this.height/2).toString()]])}},q.prototype.positionScaleShape=function(){if(this.scaleShape){var K=this.scaleShape.transform.baseVal.getItem(0);K.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(K,0)}},q.prototype.getVisual=function(){var K=document.createElementNS("http://www.w3.org/2000/svg","svg");K.setAttribute("xmlns","http://www.w3.org/2000/svg"),K.setAttribute("width",this.width+"px"),K.setAttribute("height",this.height+"px"),K.setAttribute("viewBox","0 0 "+this.width+" "+this.height),K.style.flexShrink="0",document.body.appendChild(K);for(var G="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,Q=1;Q<=this.width/5+10;Q++){var ee=Q%5==0?this.height/3:this.height/6;G+="h4v"+-ee+"h1v"+ee}G+="v1H0Z",this.scaleShape=R.createPath(G);var V=R.createTransform();this.scaleShape.transform.baseVal.appendItem(V),K.appendChild(this.scaleShape),this.angleLabelElement=R.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=R.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var J=R.createTSpan("");return J.innerHTML="°",this.angleLabelElement.appendChild(J),K.appendChild(this.angleLabelElement),document.body.removeChild(K),K},q}(),Qe=function(){function q(){this.naturalSize=!1,this.imageType="image/png"}return q.prototype.rasterize=function(K,G,Q,ee,V,J,ne){var ae=this;return new Promise(function(ye){var be=document.createElement("canvas");be.width=K.width.baseVal.value-2*ee,be.height=K.height.baseVal.value-2*ee;var Pe=1,ze=1;ae.naturalSize===!0?(Pe=G.naturalWidth/(K.width.baseVal.value-2*ee)/J,ze=G.naturalHeight/(K.height.baseVal.value-2*ee)/ne,be.width=G.naturalWidth/J,be.height=G.naturalHeight/ne):ae.width!==void 0&&ae.height!==void 0&&(Pe=ae.width/Q.width,ze=ae.height/Q.height,be.width*=Pe,be.height*=ze);var qe=be.getContext("2d");qe.translate(be.width/2,be.height/2),qe.rotate(V*Math.PI/180),qe.scale(J,ne),qe.translate(-be.width/2,-be.height/2),qe.drawImage(G,0,0,be.width,be.height);var Xe=document.createElement("canvas");Xe.width=Q.width*Pe,Xe.height=Q.height*ze,Xe.getContext("2d").putImageData(qe.getImageData((Q.x-ee)*Pe,(Q.y-ee)*ze,Q.width*Pe,Q.height*ze),0,0),ye(Xe.toDataURL(ae.imageType,ae.imageQuality))})},q}(),ut=function(){function q(K){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=q.instanceCounter++,this.styles=new I(this.instanceNo),this.target=K,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(q.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(K){this._zoomToCropEnabled=K,K?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"gridLines",{get:function(){return this._gridLines},set:function(K){this._gridLines=K,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(K){this._rotationAngle=K,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"aspectRatio",{get:function(){var K;return(K=this._aspectRatio)!==null&&K!==void 0?K:this.aspectRatios[0]},set:function(K){this._aspectRatio=K},enumerable:!1,configurable:!0}),q.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},q.prototype.show=function(){this.showUI(),this.open()},q.prototype.close=function(K){K===void 0&&(K=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),K||this.closeEventListeners.forEach(function(G){return G()}),this._isOpen=!1)},q.prototype.addRenderEventListener=function(K){this.renderEventListeners.push(K)},q.prototype.removeRenderEventListener=function(K){this.renderEventListeners.indexOf(K)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(K),1)},q.prototype.addCloseEventListener=function(K){this.closeEventListeners.push(K)},q.prototype.removeCloseEventListener=function(K){this.closeEventListeners.indexOf(K)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(K),1)},q.prototype.setupResizeObserver=function(){var K=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){K.resize(K.target.clientWidth,K.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},q.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var K=1*this.target.clientWidth/this.target.clientHeight,G=this.contentDiv.clientWidth/K>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*K:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,Q=G+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/K;this.resize(G,Q)}},q.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},q.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",R.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},q.prototype.resize=function(K,G){this.imageWidth=Math.round(K),this.imageHeight=Math.round(G),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},q.prototype.setEditingTarget=function(){var K=document.createElement("canvas");K.width=this.target.naturalWidth,K.height=this.target.naturalHeight,K.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var G=K.toDataURL();R.setAttributes(this.editingTarget,[["href",G]]),this.setEditingTargetSize()},q.prototype.setTopLeft=function(){var K=this.target.getBoundingClientRect(),G=this.editorCanvas.getBoundingClientRect();this.left=K.left-G.left-this.CANVAS_MARGIN,this.top=K.top-G.top-this.CANVAS_MARGIN},q.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=R.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=R.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=R.createGroup(),this.editingTargetRotationScaleContainer=R.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var K=R.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(K);var G=R.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(G),this.editingTargetContainer=R.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},q.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},q.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=R.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Je(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},q.prototype.zoomToCrop=function(){if(this.cropRect){var K=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,G=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=K+"px "+G+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-K+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-G+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},q.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},q.prototype.cropRectChanged=function(K){this.cropRect=K,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},q.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},q.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"},q.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},q.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var K=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,G=this.target.offsetTop>K+this.CANVAS_MARGIN?this.target.offsetTop-(K+this.CANVAS_MARGIN):0;this.coverDiv.style.top=G+"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},q.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},q.prototype.addTopToolbar=function(){var K=this;this.topToolbar=new F,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 G=new Ae;G.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(G);var Q=[];this.aspectRatios.forEach(function(ze){var qe=new Ne(we.getIcon(ze.horizontal,ze.vertical),ze.horizontal===0&&ze.vertical===0?"FREE":ze.horizontal+":"+ze.vertical);qe.onClick=function(){return K.ratioButtonClicked(ze)},Q.push(qe)}),this.aspectRatioButton=new De(we.getIcon(0,0),"Aspect ratio",Q),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,G.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ee=new Ne('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");ee.isActive=this.isGridVisible,ee.onClick=function(){K.isGridVisible=!K.isGridVisible,ee.isActive=K.isGridVisible},G.addButton(ee);var V=new Ne('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(V.isActive=this.zoomToCropEnabled,V.onClick=function(){K.zoomToCropEnabled=!K.zoomToCropEnabled,V.isActive=K.zoomToCropEnabled},G.addButton(V),!B.isLicensed){var J=new ie;this.topToolbar.addElementBlock(J);var ne=document.createElement("div");ne.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var ae=document.createElement("a");ae.style.color="currentColor",ae.href="https://markerjs.com/products/cropro",ae.target="_blank",ae.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',ne.appendChild(ae),J.addElement(ne)}var ye=new Ae;ye.minWidth=3*this.toolbarHeight+"px",ye.contentAlign="end",this.topToolbar.addButtonBlock(ye);var be=new Ne('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");be.onClick=this.startRenderAndClose,ye.addButton(be),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(be.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Pe=new Ne('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Pe.onClick=this.close,ye.addButton(Pe),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Pe.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},q.prototype.addBottomToolbar=function(){var K=this;this.bottomToolbar=new F,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 G=new Ae;G.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(G);var Q=new Ne('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");Q.onClick=this.rotateLeftButtonClicked,G.addButton(Q);var ee=new Ne('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");ee.onClick=this.rotateRightButtonClicked,G.addButton(ee);var V=new ie;V.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(V),this.straightener=new Ze("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ye){K.rotateBy(ye),K.straightener.angle=K.rotationAngle},V.addElement(this.straightener.getUI());var J=new Ae;J.minWidth=2*this.toolbarHeight+"px",J.contentAlign="end",this.bottomToolbar.addButtonBlock(J);var ne=new Ne('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");ne.onClick=this.flipHorizontallyButtonClicked,J.addButton(ne);var ae=new Ne('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");ae.onClick=this.flipVerticallyButtonClicked,J.addButton(ae)},q.prototype.ratioButtonClicked=function(K){this.aspectRatio=K,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},q.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=we.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},q.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new de(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},q.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},q.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},q.prototype.restoreState=function(K){if(K){var G=this.cropLayer.getRescaledRect(K.width,K.height,this.imageWidth,this.imageHeight,K.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(G),this.cropRectChanged(G),this.flippedHorizontally=K.flippedHorizontally,this.flippedVertically=K.flippedVertically,this.applyFlip(),this.rotationAngle=K.rotationAngle,this.applyRotation()}},q.prototype.clientToLocalCoordinates=function(K,G){var Q=this.cropImage.getBoundingClientRect();return{x:K-Q.left,y:G-Q.top}},q.prototype.onWindowResize=function(){this.positionUI()},q.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var K=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=K+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},q.prototype.rotateLeftButtonClicked=function(){var K=this.rotationAngle-90;this.rotationAngle%90!=0&&(K+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(K)},q.prototype.rotateRightButtonClicked=function(){var K=this.rotationAngle+90;this.rotationAngle%90!=0&&(K-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(K)},q.prototype.rotateTo=function(K){K=(K=K>180?K-360:K)<=-180?K+360:K,this.rotationAngle=K,this.applyRotation()},q.prototype.rotateBy=function(K){this.rotateTo((this.rotationAngle+K)%360)},q.prototype.applyRotation=function(){var K=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var G=this.editingTargetRotationContainer.transform.baseVal.getItem(0);G.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(G,0);var Q=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/Q.width,this.imageHeight/Q.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=K},q.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},q.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},q.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},q.prototype.startRenderAndClose=function(){return Me(this,void 0,void 0,function(){var K,G;return ge(this,function(Q){switch(Q.label){case 0:return[4,this.render()];case 1:return K=Q.sent(),G=this.getState(),this.renderEventListeners.forEach(function(ee){return ee(K,G)}),this.close(!0),[2]}})})},q.prototype.render=function(){return Me(this,void 0,void 0,function(){var K;return ge(this,function(G){switch(G.label){case 0:return(K=new Qe).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.width=this.renderWidth,K.height=this.renderHeight,this.unzoomFromCrop(),R.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,K.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return G.sent(),[4,K.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,G.sent()]}})})},q.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Y("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 Y("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Y("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var K=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Y("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*K)+`px;
|
|
height: `+(this.toolbarHeight-2*K)+`px;
|
|
padding: `+K+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Y("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Y("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new W("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new W("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Y("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 Y("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Y("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 Y("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*K)+`px;
|
|
padding: `+K+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Y("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},q.instanceCounter=0,q}(),tt=P("8hTe"),xe=P.n(tt),Oe=/<pre[^>]*>/g;function Fe(q){var K=document.createElement("div");return K.innerHTML=q,K.childNodes.length===0?"":K.childNodes[0].nodeValue}var We=oe.a=function(q){var K=q.value,G=K===void 0?"":K,Q=q.edit,ee=Q===void 0?!1:Q,V=q.className,J=q.showTextOnly,ne=q.showLines,ae=q.replaces,ye=q.zoomImg,be=q.hasMask,Pe=q.style,ze=Pe===void 0?{}:Pe,qe=q.stylesPrev,Xe=qe===void 0?{}:qe,At=String(G),pt=Object(A.useRef)(),ot=Object(A.useRef)(),Mt=Object(A.useState)(""),Rt=Object(H.a)(Mt,2),wt=Rt[0],zt=Rt[1],vt=Object(A.useState)("office"),It=Object(H.a)(vt,2),Pt=It[0],yt=It[1],Jt=function(){var nt=new ut(ot.current);nt.displayMode="popup",nt.addRenderEventListener(function(){var it=Object(S.a)(e.a.mark(function rt(Ot){var at;return e.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return pt.current.style.display="none",_t.next=3,Object(Ie.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ot}});case 3:at=_t.sent,at!=null&&at.id&&ae(ot.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(at==null?void 0:at.id,"?type=").concat(at.content_type));case 5:case"end":return _t.stop()}},rt)}));return function(rt){return it.apply(this,arguments)}}()),nt.show()},dt=function(){var nt=new Se.a(ot.current);nt.settings.displayMode="popup",nt.addEventListener("render",function(){var it=Object(S.a)(e.a.mark(function rt(Ot){var at;return e.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:if(pt.current.style.display="none",!ot.current){_t.next=6;break}return _t.next=4,Object(Ie.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ot.dataUrl}});case 4:at=_t.sent,at!=null&&at.id&&ae(ot.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(at==null?void 0:at.id,"?type=").concat(at.content_type));case 6:case"end":return _t.stop()}},rt)}));return function(rt){return it.apply(this,arguments)}}()),nt.show(),window.markerArea=nt},st=Object(A.useMemo)(function(){pt.current&&(pt.current.style.zIndex=-1);try{var ht=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,nt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,it=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;At=At.replace(ht,"("+$.a.API_SERVER+"/api/attachments/").replace(nt,'"'+$.a.API_SERVER+"/api/attachments/").replace(it,'"'+$.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(Dt){}var rt=C(At),Ot=x();if(At.match(/\[TOC\]/)&&(rt=rt.replace("<p>[TOC]</p>",E()),b()),rt=rt.replace(/(__special_katext_id_\d+__)/g,function(Dt,_t){var en=Ot[_t],Zt=en.type,ft=en.expression;return Object(he.renderToString)(Fe(ft)||"",{displayMode:Zt==="block",throwOnError:!1,output:"html"})}),rt=rt.replace(/▁/g,"\u2581\u2581\u2581"),h(),J){var at=document.createElement("div");return at.innerHTML=rt,at.innerText}return setTimeout(function(){return mt()},500),rt},[At]),Le=Object(A.useRef)();y.WebkitLineClamp=ne,ne&&(ze=Object(m.a)(Object(m.a)({},ze),y));function ct(ht){var nt=ht.target;if(nt.tagName.toUpperCase()==="IMG"){if(ye){var it=nt.getAttribute("src");zt(it),yt("image")}}else if(nt.tagName.toUpperCase()==="A"){var rt=nt.getAttribute("href");if(rt.indexOf("office")>-1)ht.preventDefault(),zt(rt),yt("office");else if(rt.indexOf("application/pdf")>-1)ht.preventDefault(),zt(rt),yt("pdf");else if(rt.indexOf("text/html")>-1)ht.preventDefault(),zt(rt),yt("html");else if(rt.startsWith("#")){ht.preventDefault();var Ot=document.getElementById(rt.replace("#",""));Ot&&Ot.scrollIntoView(!0)}}}var mt=function(){var nt,it=(nt=Le.current)===null||nt===void 0?void 0:nt.querySelectorAll("video");it==null||it.forEach(function(rt){if(rt.oncontextmenu=function(){return!1},rt.src.indexOf(".m3u8")>-1&&!rt.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var Ot=new z.a;Ot.loadSource(rt.src),Ot.attachMedia(rt)}}})};Object(A.useEffect)(function(){if(Le.current&&st&&(st.match(Oe)&&window.PR.prettyPrint()),Le.current)return Le.current.addEventListener("click",ct),function(){Le.current.removeEventListener("click",ct),h(),b()}},[st,Le.current,ct]);var Ct=function(nt){if(!ee)return;nt.target.nodeName==="IMG"?(pt.current.style.zIndex=1,pt.current.style.display="flex",pt.current.style.width=nt.target.clientWidth+"px",pt.current.style.height=nt.target.clientHeight+"px",pt.current.style.top=nt.target.offsetTop+"px",pt.current.style.left=nt.target.offsetLeft+"px",ot.current.src=nt.target.getAttribute("src")):pt.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:Le,style:Object(m.a)({},ze),className:"".concat(V||""," markdown-body ").concat(xe.a.mdBody),onMouseOver:Ct,dangerouslySetInnerHTML:{__html:st}}),v.a.createElement("div",{ref:pt,className:xe.a.button},v.a.createElement(k.a,null,v.a.createElement(U.a,{onClick:function(){return Jt()}},"\u88C1\u526A"),v.a.createElement(U.a,{onClick:function(){return dt()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:ot,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),v.a.createElement(fe.a,{close:!0,data:wt,type:wt!=null&&wt.length?Pt:"",style:Object(m.a)({},Xe),onClose:function(){return zt("")}}))}},"9JIy":function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___Hq8-r",flex_space_between:"flex_space_between___3Nl1U",flex_box_vertical_center:"flex_box_vertical_center___1hgum",flex_box_center_end:"flex_box_center_end___i5ldC",flex_box_column:"flex_box_column____1u-K",table:"table___2yPMl"}},BJfS:function(Be,oe){var P=function(te){return te.replace(/[A-Z]/g,function(k){return"-"+k.toLowerCase()}).toLowerCase()};Be.exports=P},BU3w:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return S});var te=P("MNnm"),k="rc-util-key";function O(H){if(H.attachTo)return H.attachTo;var N=document.querySelector("head");return N||document.body}function U(H){var N,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(te.a)())return null;var A=document.createElement("style");if((N=e.csp)===null||N===void 0?void 0:N.nonce){var v;A.nonce=(v=e.csp)===null||v===void 0?void 0:v.nonce}A.innerHTML=H;var f=O(e),l=f.firstChild;return e.prepend&&f.prepend?f.prepend(A):e.prepend&&l?f.insertBefore(A,l):f.appendChild(A),A}var m=new Map;function S(H,N){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},A=O(e);if(!m.has(A)){var v=U("",e),f=v.parentNode;m.set(A,f),f.removeChild(v)}var l=Array.from(m.get(A).children).find(function(i){return i.tagName==="STYLE"&&i[k]===N});if(l){var a,r;if(((a=e.csp)===null||a===void 0?void 0:a.nonce)&&l.nonce!==((r=e.csp)===null||r===void 0?void 0:r.nonce)){var o;l.nonce=(o=e.csp)===null||o===void 0?void 0:o.nonce}return l.innerHTML!==H&&(l.innerHTML=H),l}var s=U(H,e);return s[k]=N,s}},BdwD:function(Be,oe,P){"use strict";var te=P("+L6B"),k=P("2/Rp"),O=P("0Owb"),U=P("k1fw"),m=P("q1tI"),S=P.n(m),H=P("FOrL"),N=P.n(H),e=function(v){var f=v.buttonProps,l=f===void 0?{}:f,a=v.styles,r=a===void 0?{}:a,o=v.imgStyles,s=o===void 0?{}:o,i=v.customText,n=v.ButtonText,t=v.ButtonClick,b=v.Buttonclass,y=v.ButtonTwo;return S.a.createElement("section",{className:"tc animated fadeIn",style:Object(U.a)(Object(U.a)({},{color:"#999",margin:"0 auto",padding:"100px 0"}),r)},S.a.createElement("img",{src:N.a,style:Object(U.a)(Object(U.a)({},{width:"200px",height:"150px"}),s)}),S.a.createElement("p",{className:"mt10 font14"},i||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),n&&S.a.createElement(k.a,Object(O.a)({className:b,onClick:t},l),n),y&&y)};oe.a=e},Bq7L:function(Be,oe){Be.exports="data:image/png;base64,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"},"C/vA":function(Be,oe,P){"use strict";P.d(oe,"a",function(){return te});function te(k){const O=this;let U=!1,m;return function(){return U||(U=!0,m=k.apply(O,arguments)),m}}},"Cg/j":function(Be,oe,P){"use strict";P.d(oe,"b",function(){return te}),P.d(oe,"a",function(){return k}),P.d(oe,"c",function(){return U}),P.d(oe,"d",function(){return m});var te;(function(S){S.serviceIds=new Map,S.DI_TARGET="$di$target",S.DI_DEPENDENCIES="$di$dependencies";function H(N){return N[S.DI_DEPENDENCIES]||[]}S.getServiceDependencies=H})(te||(te={}));const k=U("instantiationService");function O(S,H,N,e){H[te.DI_TARGET]===H?H[te.DI_DEPENDENCIES].push({id:S,index:N,optional:e}):(H[te.DI_DEPENDENCIES]=[{id:S,index:N,optional:e}],H[te.DI_TARGET]=H)}function U(S){if(te.serviceIds.has(S))return te.serviceIds.get(S);const H=function(N,e,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");O(H,N,A,!1)};return H.toString=()=>S,te.serviceIds.set(S,H),H}function m(S){return function(H,N,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");O(S,H,e,!0)}}},DlQD:function(Be,oe,P){(function(te,k){Be.exports=k()})(this,function(){"use strict";function te(G,Q){for(var ee=0;ee<Q.length;ee++){var V=Q[ee];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(G,V.key,V)}}function k(G,Q,ee){return Q&&te(G.prototype,Q),ee&&te(G,ee),G}function O(G,Q){if(!G)return;if(typeof G=="string")return U(G,Q);var ee=Object.prototype.toString.call(G).slice(8,-1);if(ee==="Object"&&G.constructor&&(ee=G.constructor.name),ee==="Map"||ee==="Set")return Array.from(G);if(ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ee))return U(G,Q)}function U(G,Q){(Q==null||Q>G.length)&&(Q=G.length);for(var ee=0,V=new Array(Q);ee<Q;ee++)V[ee]=G[ee];return V}function m(G,Q){var ee;if(typeof Symbol=="undefined"||G[Symbol.iterator]==null){if(Array.isArray(G)||(ee=O(G))||Q&&G&&typeof G.length=="number"){ee&&(G=ee);var V=0;return function(){return V>=G.length?{done:!0}:{done:!1,value:G[V++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ee=G[Symbol.iterator](),ee.next.bind(ee)}function S(G,Q){return Q={exports:{}},G(Q,Q.exports),Q.exports}var H=S(function(G){function Q(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ee(V){G.exports.defaults=V}G.exports={defaults:Q(),getDefaults:Q,changeDefaults:ee}}),N=H.defaults,e=H.getDefaults,A=H.changeDefaults,v=/[&<>"']/,f=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,r={"&":"&","<":"<",">":">",'"':""","'":"'"},o=function(Q){return r[Q]};function s(G,Q){if(Q){if(v.test(G))return G.replace(f,o)}else if(l.test(G))return G.replace(a,o);return G}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(G){return G.replace(i,function(Q,ee){return ee=ee.toLowerCase(),ee==="colon"?":":ee.charAt(0)==="#"?ee.charAt(1)==="x"?String.fromCharCode(parseInt(ee.substring(2),16)):String.fromCharCode(+ee.substring(1)):""})}var t=/(^|[^\[])\^/g;function b(G,Q){G=G.source||G,Q=Q||"";var ee={replace:function(J,ne){return ne=ne.source||ne,ne=ne.replace(t,"$1"),G=G.replace(J,ne),ee},getRegex:function(){return new RegExp(G,Q)}};return ee}var y=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(G,Q,ee){if(G){var V;try{V=decodeURIComponent(n(ee)).replace(y,"").toLowerCase()}catch(J){return null}if(V.indexOf("javascript:")===0||V.indexOf("vbscript:")===0||V.indexOf("data:")===0)return null}Q&&!g.test(ee)&&(ee=d(Q,ee));try{ee=encodeURI(ee).replace(/%25/g,"%")}catch(J){return null}return ee}var _={},u=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(G,Q){_[" "+G]||(u.test(G)?_[" "+G]=G+"/":_[" "+G]=M(G,"/",!0)),G=_[" "+G];var ee=G.indexOf(":")===-1;return Q.substring(0,2)==="//"?ee?Q:G.replace(c,"$1")+Q:Q.charAt(0)==="/"?ee?Q:G.replace(p,"$1")+Q:G+Q}var x={exec:function(){}};function h(G){for(var Q=1,ee,V;Q<arguments.length;Q++){ee=arguments[Q];for(V in ee)Object.prototype.hasOwnProperty.call(ee,V)&&(G[V]=ee[V])}return G}function T(G,Q){var ee=G.replace(/\|/g,function(ne,ae,ye){for(var be=!1,Pe=ae;--Pe>=0&&ye[Pe]==="\\";)be=!be;return be?"|":" |"}),V=ee.split(/ \|/),J=0;if(V.length>Q)V.splice(Q);else for(;V.length<Q;)V.push("");for(;J<V.length;J++)V[J]=V[J].trim().replace(/\\\|/g,"|");return V}function M(G,Q,ee){var V=G.length;if(V===0)return"";for(var J=0;J<V;){var ne=G.charAt(V-J-1);if(ne===Q&&!ee)J++;else if(ne!==Q&&ee)J++;else break}return G.substr(0,V-J)}function D(G,Q){if(G.indexOf(Q[1])===-1)return-1;for(var ee=G.length,V=0,J=0;J<ee;J++)if(G[J]==="\\")J++;else if(G[J]===Q[0])V++;else if(G[J]===Q[1]&&(V--,V<0))return J;return-1}function w(G){G&&G.sanitize&&!G.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var C={escape:s,unescape:n,edit:b,cleanUrl:E,resolveUrl:d,noopTest:x,merge:h,splitCells:T,rtrim:M,findClosingBracket:D,checkSanitizeDeprecation:w},j=H.defaults,L=C.rtrim,z=C.splitCells,$=C.escape,he=C.findClosingBracket;function fe(G,Q,ee){var V=Q.href,J=Q.title?$(Q.title):null,ne=G[1].replace(/\\([\[\]])/g,"$1");return G[0].charAt(0)!=="!"?{type:"link",raw:ee,href:V,title:J,text:ne}:{type:"image",raw:ee,href:V,title:J,text:$(ne)}}function Ie(G,Q){var ee=G.match(/^(\s+)(?:```)/);if(ee===null)return Q;var V=ee[1];return Q.split(`
|
|
`).map(function(J){var ne=J.match(/^\s+/);if(ne===null)return J;var ae=ne[0];return ae.length>=V.length?J.slice(V.length):J}).join(`
|
|
`)}var Se=function(){function G(ee){this.options=ee||j}var Q=G.prototype;return Q.space=function(V){var J=this.rules.block.newline.exec(V);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
|
|
`}},Q.code=function(V,J){var ne=this.rules.block.code.exec(V);if(ne){var ae=J[J.length-1];if(ae&&ae.type==="paragraph")return{raw:ne[0],text:ne[0].trimRight()};var ye=ne[0].replace(/^ {4}/gm,"");return{type:"code",raw:ne[0],codeBlockStyle:"indented",text:this.options.pedantic?ye:L(ye,`
|
|
`)}}},Q.fences=function(V){var J=this.rules.block.fences.exec(V);if(J){var ne=J[0],ae=Ie(ne,J[3]||"");return{type:"code",raw:ne,lang:J[2]?J[2].trim():J[2],text:ae}}},Q.heading=function(V){var J=this.rules.block.heading.exec(V);if(J)return{type:"heading",raw:J[0],depth:J[1].length,text:J[2]}},Q.nptable=function(V){var J=this.rules.block.nptable.exec(V);if(J){var ne={type:"table",header:z(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[],raw:J[0]};if(ne.header.length===ne.align.length){var ae=ne.align.length,ye;for(ye=0;ye<ae;ye++)/^ *-+: *$/.test(ne.align[ye])?ne.align[ye]="right":/^ *:-+: *$/.test(ne.align[ye])?ne.align[ye]="center":/^ *:-+ *$/.test(ne.align[ye])?ne.align[ye]="left":ne.align[ye]=null;for(ae=ne.cells.length,ye=0;ye<ae;ye++)ne.cells[ye]=z(ne.cells[ye],ne.header.length);return ne}}},Q.hr=function(V){var J=this.rules.block.hr.exec(V);if(J)return{type:"hr",raw:J[0]}},Q.blockquote=function(V){var J=this.rules.block.blockquote.exec(V);if(J){var ne=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:ne}}},Q.list=function(V){var J=this.rules.block.list.exec(V);if(J){for(var ne=J[0],ae=J[2],ye=ae.length>1,be=ae[ae.length-1]===")",Pe={type:"list",raw:ne,ordered:ye,start:ye?+ae.slice(0,-1):"",loose:!1,items:[]},ze=J[0].match(this.rules.block.item),qe=!1,Xe,At,pt,ot,Mt,Rt,wt,zt=ze.length,vt=0;vt<zt;vt++)Xe=ze[vt],ne=Xe,At=Xe.length,Xe=Xe.replace(/^ *([*+-]|\d+[.)]) */,""),~Xe.indexOf(`
|
|
`)&&(At-=Xe.length,Xe=this.options.pedantic?Xe.replace(/^ {1,4}/gm,""):Xe.replace(new RegExp("^ {1,"+At+"}","gm"),"")),vt!==zt-1&&(pt=this.rules.block.bullet.exec(ze[vt+1])[0],(ye?pt.length===1||!be&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==ae)&&(ot=ze.slice(vt+1).join(`
|
|
`),Pe.raw=Pe.raw.substring(0,Pe.raw.length-ot.length),vt=zt-1)),Mt=qe||/\n\n(?!\s*$)/.test(Xe),vt!==zt-1&&(qe=Xe.charAt(Xe.length-1)===`
|
|
`,Mt||(Mt=qe)),Mt&&(Pe.loose=!0),Rt=/^\[[ xX]\] /.test(Xe),wt=void 0,Rt&&(wt=Xe[1]!==" ",Xe=Xe.replace(/^\[[ xX]\] +/,"")),Pe.items.push({type:"list_item",raw:ne,task:Rt,checked:wt,loose:Mt,text:Xe});return Pe}},Q.html=function(V){var J=this.rules.block.html.exec(V);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):$(J[0]):J[0]}},Q.def=function(V){var J=this.rules.block.def.exec(V);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var ne=J[1].toLowerCase().replace(/\s+/g," ");return{tag:ne,raw:J[0],href:J[2],title:J[3]}}},Q.table=function(V){var J=this.rules.block.table.exec(V);if(J){var ne={type:"table",header:z(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
|
|
`):[]};if(ne.header.length===ne.align.length){ne.raw=J[0];var ae=ne.align.length,ye;for(ye=0;ye<ae;ye++)/^ *-+: *$/.test(ne.align[ye])?ne.align[ye]="right":/^ *:-+: *$/.test(ne.align[ye])?ne.align[ye]="center":/^ *:-+ *$/.test(ne.align[ye])?ne.align[ye]="left":ne.align[ye]=null;for(ae=ne.cells.length,ye=0;ye<ae;ye++)ne.cells[ye]=z(ne.cells[ye].replace(/^ *\| *| *\| *$/g,""),ne.header.length);return ne}}},Q.lheading=function(V){var J=this.rules.block.lheading.exec(V);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},Q.paragraph=function(V){var J=this.rules.block.paragraph.exec(V);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
|
|
`?J[1].slice(0,-1):J[1]}},Q.text=function(V,J){var ne=this.rules.block.text.exec(V);if(ne){var ae=J[J.length-1];return ae&&ae.type==="text"?{raw:ne[0],text:ne[0]}:{type:"text",raw:ne[0],text:ne[0]}}},Q.escape=function(V){var J=this.rules.inline.escape.exec(V);if(J)return{type:"escape",raw:J[0],text:$(J[1])}},Q.tag=function(V,J,ne){var ae=this.rules.inline.tag.exec(V);if(ae)return!J&&/^<a /i.test(ae[0])?J=!0:J&&/^<\/a>/i.test(ae[0])&&(J=!1),!ne&&/^<(pre|code|kbd|script)(\s|>)/i.test(ae[0])?ne=!0:ne&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ae[0])&&(ne=!1),{type:this.options.sanitize?"text":"html",raw:ae[0],inLink:J,inRawBlock:ne,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):$(ae[0]):ae[0]}},Q.link=function(V){var J=this.rules.inline.link.exec(V);if(J){var ne=he(J[2],"()");if(ne>-1){var ae=J[0].indexOf("!")===0?5:4,ye=ae+J[1].length+ne;J[2]=J[2].substring(0,ne),J[0]=J[0].substring(0,ye).trim(),J[3]=""}var be=J[2],Pe="";if(this.options.pedantic){var ze=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(be);ze?(be=ze[1],Pe=ze[3]):Pe=""}else Pe=J[3]?J[3].slice(1,-1):"";be=be.trim().replace(/^<([\s\S]*)>$/,"$1");var qe=fe(J,{href:be&&be.replace(this.rules.inline._escapes,"$1"),title:Pe&&Pe.replace(this.rules.inline._escapes,"$1")},J[0]);return qe}},Q.reflink=function(V,J){var ne;if((ne=this.rules.inline.reflink.exec(V))||(ne=this.rules.inline.nolink.exec(V))){var ae=(ne[2]||ne[1]).replace(/\s+/g," ");if(ae=J[ae.toLowerCase()],!ae||!ae.href){var ye=ne[0].charAt(0);return{type:"text",raw:ye,text:ye}}var be=fe(ne,ae,ne[0]);return be}},Q.strong=function(V,J,ne){ne===void 0&&(ne="");var ae=this.rules.inline.strong.start.exec(V);if(ae&&(!ae[1]||ae[1]&&(ne===""||this.rules.inline.punctuation.exec(ne)))){J=J.slice(-1*V.length);var ye=ae[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ye.lastIndex=0;for(var be;(ae=ye.exec(J))!=null;)if(be=this.rules.inline.strong.middle.exec(J.slice(0,ae.index+3)),be)return{type:"strong",raw:V.slice(0,be[0].length),text:V.slice(2,be[0].length-2)}}},Q.em=function(V,J,ne){ne===void 0&&(ne="");var ae=this.rules.inline.em.start.exec(V);if(ae&&(!ae[1]||ae[1]&&(ne===""||this.rules.inline.punctuation.exec(ne)))){J=J.slice(-1*V.length);var ye=ae[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ye.lastIndex=0;for(var be;(ae=ye.exec(J))!=null;)if(be=this.rules.inline.em.middle.exec(J.slice(0,ae.index+2)),be)return{type:"em",raw:V.slice(0,be[0].length),text:V.slice(1,be[0].length-1)}}},Q.codespan=function(V){var J=this.rules.inline.code.exec(V);if(J){var ne=J[2].replace(/\n/g," "),ae=/[^ ]/.test(ne),ye=ne.startsWith(" ")&&ne.endsWith(" ");return ae&&ye&&(ne=ne.substring(1,ne.length-1)),ne=$(ne,!0),{type:"codespan",raw:J[0],text:ne}}},Q.br=function(V){var J=this.rules.inline.br.exec(V);if(J)return{type:"br",raw:J[0]}},Q.del=function(V){var J=this.rules.inline.del.exec(V);if(J)return{type:"del",raw:J[0],text:J[1]}},Q.autolink=function(V,J){var ne=this.rules.inline.autolink.exec(V);if(ne){var ae,ye;return ne[2]==="@"?(ae=$(this.options.mangle?J(ne[1]):ne[1]),ye="mailto:"+ae):(ae=$(ne[1]),ye=ae),{type:"link",raw:ne[0],text:ae,href:ye,tokens:[{type:"text",raw:ae,text:ae}]}}},Q.url=function(V,J){var ne;if(ne=this.rules.inline.url.exec(V)){var ae,ye;if(ne[2]==="@")ae=$(this.options.mangle?J(ne[0]):ne[0]),ye="mailto:"+ae;else{var be;do be=ne[0],ne[0]=this.rules.inline._backpedal.exec(ne[0])[0];while(be!==ne[0]);ae=$(ne[0]),ne[1]==="www."?ye="http://"+ae:ye=ae}return{type:"link",raw:ne[0],text:ae,href:ye,tokens:[{type:"text",raw:ae,text:ae}]}}},Q.inlineText=function(V,J,ne){var ae=this.rules.inline.text.exec(V);if(ae){var ye;return J?ye=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ae[0]):$(ae[0]):ae[0]:ye=$(this.options.smartypants?ne(ae[0]):ae[0]),{type:"text",raw:ae[0],text:ye}}},G}(),pe=C.noopTest,Ce=C.edit,Me=C.merge,ge={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:pe,table:pe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ge._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ge._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ge.def=Ce(ge.def).replace("label",ge._label).replace("title",ge._title).getRegex(),ge.bullet=/(?:[*+-]|\d{1,9}[.)])/,ge.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ge.item=Ce(ge.item,"gm").replace(/bull/g,ge.bullet).getRegex(),ge.list=Ce(ge.list).replace(/bull/g,ge.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ge.def.source+")").getRegex(),ge._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",ge._comment=/<!--(?!-?>)[\s\S]*?-->/,ge.html=Ce(ge.html,"i").replace("comment",ge._comment).replace("tag",ge._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ge.paragraph=Ce(ge._paragraph).replace("hr",ge.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",ge._tag).getRegex(),ge.blockquote=Ce(ge.blockquote).replace("paragraph",ge.paragraph).getRegex(),ge.normal=Me({},ge),ge.gfm=Me({},ge.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*|$)"}),ge.gfm.nptable=Ce(ge.gfm.nptable).replace("hr",ge.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",ge._tag).getRegex(),ge.gfm.table=Ce(ge.gfm.table).replace("hr",ge.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",ge._tag).getRegex(),ge.pedantic=Me({},ge.normal,{html:Ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ge._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:pe,paragraph:Ce(ge.normal._paragraph).replace("hr",ge.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ge.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var B={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:pe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:pe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};B._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",B.punctuation=Ce(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",B._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",B.em.start=Ce(B.em.start).replace(/punctuation/g,B._punctuation).getRegex(),B.em.middle=Ce(B.em.middle).replace(/punctuation/g,B._punctuation).replace(/overlapSkip/g,B._overlapSkip).getRegex(),B.em.endAst=Ce(B.em.endAst,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.em.endUnd=Ce(B.em.endUnd,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.strong.start=Ce(B.strong.start).replace(/punctuation/g,B._punctuation).getRegex(),B.strong.middle=Ce(B.strong.middle).replace(/punctuation/g,B._punctuation).replace(/blockSkip/g,B._blockSkip).getRegex(),B.strong.endAst=Ce(B.strong.endAst,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.strong.endUnd=Ce(B.strong.endUnd,"g").replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=Ce(B._blockSkip,"g").getRegex(),B.overlapSkip=Ce(B._overlapSkip,"g").getRegex(),B._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._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])?)+(?![-_])/,B.autolink=Ce(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,B.tag=Ce(B.tag).replace("comment",ge._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,B._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,B.link=Ce(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=Ce(B.reflink).replace("label",B._label).getRegex(),B.reflinkSearch=Ce(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=Me({},B),B.pedantic=Me({},B.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:Ce(/^!?\[(label)\]\((.*?)\)/).replace("label",B._label).getRegex(),reflink:Ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B._label).getRegex()}),B.gfm=Me({},B.normal,{escape:Ce(B.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),B.gfm.url=Ce(B.gfm.url,"i").replace("email",B.gfm._extended_email).getRegex(),B.breaks=Me({},B.gfm,{br:Ce(B.br).replace("{2,}","*").getRegex(),text:Ce(B.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var R={block:ge,inline:B},I=H.defaults,W=R.block,Y=R.inline;function F(G){return G.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function le(G){var Q="",ee,V,J=G.length;for(ee=0;ee<J;ee++)V=G.charCodeAt(ee),Math.random()>.5&&(V="x"+V.toString(16)),Q+="&#"+V+";";return Q}var Ae=function(){function G(ee){this.tokens=[],this.tokens.links=Object.create(null),this.options=ee||I,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var V={block:W.normal,inline:Y.normal};this.options.pedantic?(V.block=W.pedantic,V.inline=Y.pedantic):this.options.gfm&&(V.block=W.gfm,this.options.breaks?V.inline=Y.breaks:V.inline=Y.gfm),this.tokenizer.rules=V}G.lex=function(V,J){var ne=new G(J);return ne.lex(V)};var Q=G.prototype;return Q.lex=function(V){return V=V.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(V,this.tokens,!0),this.inline(this.tokens),this.tokens},Q.blockTokens=function(V,J,ne){J===void 0&&(J=[]),ne===void 0&&(ne=!0),V=V.replace(/^ +$/gm,"");for(var ae,ye,be,Pe;V;){if(ae=this.tokenizer.space(V)){V=V.substring(ae.raw.length),ae.type&&J.push(ae);continue}if(ae=this.tokenizer.code(V,J)){V=V.substring(ae.raw.length),ae.type?J.push(ae):(Pe=J[J.length-1],Pe.raw+=`
|
|
`+ae.raw,Pe.text+=`
|
|
`+ae.text);continue}if(ae=this.tokenizer.fences(V)){V=V.substring(ae.raw.length),J.push(ae);continue}if(ae=this.tokenizer.heading(V)){V=V.substring(ae.raw.length),J.push(ae);continue}if(ae=this.tokenizer.nptable(V)){V=V.substring(ae.raw.length),J.push(ae);continue}if(ae=this.tokenizer.hr(V)){V=V.substring(ae.raw.length),J.push(ae);continue}if(ae=this.tokenizer.blockquote(V)){V=V.substring(ae.raw.length),ae.tokens=this.blockTokens(ae.text,[],ne),J.push(ae);continue}if(ae=this.tokenizer.list(V)){for(V=V.substring(ae.raw.length),be=ae.items.length,ye=0;ye<be;ye++)ae.items[ye].tokens=this.blockTokens(ae.items[ye].text,[],!1);J.push(ae);continue}if(ae=this.tokenizer.html(V)){V=V.substring(ae.raw.length),J.push(ae);continue}if(ne&&(ae=this.tokenizer.def(V))){V=V.substring(ae.raw.length),this.tokens.links[ae.tag]||(this.tokens.links[ae.tag]={href:ae.href,title:ae.title});continue}if(ae=this.tokenizer.table(V)){V=V.substring(ae.raw.length),J.push(ae);continue}if(ae=this.tokenizer.lheading(V)){V=V.substring(ae.raw.length),J.push(ae);continue}if(ne&&(ae=this.tokenizer.paragraph(V))){V=V.substring(ae.raw.length),J.push(ae);continue}if(ae=this.tokenizer.text(V,J)){V=V.substring(ae.raw.length),ae.type?J.push(ae):(Pe=J[J.length-1],Pe.raw+=`
|
|
`+ae.raw,Pe.text+=`
|
|
`+ae.text);continue}if(V){var ze="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(ze);break}else throw new Error(ze)}}return J},Q.inline=function(V){var J,ne,ae,ye,be,Pe,ze=V.length;for(J=0;J<ze;J++){Pe=V[J];switch(Pe.type){case"paragraph":case"text":case"heading":{Pe.tokens=[],this.inlineTokens(Pe.text,Pe.tokens);break}case"table":{for(Pe.tokens={header:[],cells:[]},ye=Pe.header.length,ne=0;ne<ye;ne++)Pe.tokens.header[ne]=[],this.inlineTokens(Pe.header[ne],Pe.tokens.header[ne]);for(ye=Pe.cells.length,ne=0;ne<ye;ne++)for(be=Pe.cells[ne],Pe.tokens.cells[ne]=[],ae=0;ae<be.length;ae++)Pe.tokens.cells[ne][ae]=[],this.inlineTokens(be[ae],Pe.tokens.cells[ne][ae]);break}case"blockquote":{this.inline(Pe.tokens);break}case"list":{for(ye=Pe.items.length,ne=0;ne<ye;ne++)this.inline(Pe.items[ne].tokens);break}}}return V},Q.inlineTokens=function(V,J,ne,ae,ye){J===void 0&&(J=[]),ne===void 0&&(ne=!1),ae===void 0&&(ae=!1),ye===void 0&&(ye="");var be,Pe=V,ze;if(this.tokens.links){var qe=Object.keys(this.tokens.links);if(qe.length>0)for(;(ze=this.tokenizer.rules.inline.reflinkSearch.exec(Pe))!=null;)qe.includes(ze[0].slice(ze[0].lastIndexOf("[")+1,-1))&&(Pe=Pe.slice(0,ze.index)+"["+"a".repeat(ze[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ze=this.tokenizer.rules.inline.blockSkip.exec(Pe))!=null;)Pe=Pe.slice(0,ze.index)+"["+"a".repeat(ze[0].length-2)+"]"+Pe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;V;){if(be=this.tokenizer.escape(V)){V=V.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.tag(V,ne,ae)){V=V.substring(be.raw.length),ne=be.inLink,ae=be.inRawBlock,J.push(be);continue}if(be=this.tokenizer.link(V)){V=V.substring(be.raw.length),be.type==="link"&&(be.tokens=this.inlineTokens(be.text,[],!0,ae)),J.push(be);continue}if(be=this.tokenizer.reflink(V,this.tokens.links)){V=V.substring(be.raw.length),be.type==="link"&&(be.tokens=this.inlineTokens(be.text,[],!0,ae)),J.push(be);continue}if(be=this.tokenizer.strong(V,Pe,ye)){V=V.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],ne,ae),J.push(be);continue}if(be=this.tokenizer.em(V,Pe,ye)){V=V.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],ne,ae),J.push(be);continue}if(be=this.tokenizer.codespan(V)){V=V.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.br(V)){V=V.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.del(V)){V=V.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],ne,ae),J.push(be);continue}if(be=this.tokenizer.autolink(V,le)){V=V.substring(be.raw.length),J.push(be);continue}if(!ne&&(be=this.tokenizer.url(V,le))){V=V.substring(be.raw.length),J.push(be);continue}if(be=this.tokenizer.inlineText(V,ae,F)){V=V.substring(be.raw.length),ye=be.raw.slice(-1),J.push(be);continue}if(V){var Xe="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(Xe);break}else throw new Error(Xe)}}return J},k(G,null,[{key:"rules",get:function(){return{block:W,inline:Y}}}]),G}(),Ne=H.defaults,ie=C.cleanUrl,de=C.escape,we=function(){function G(ee){this.options=ee||Ne}var Q=G.prototype;return Q.code=function(V,J,ne){var ae=(J||"").match(/\S*/)[0];if(this.options.highlight){var ye=this.options.highlight(V,ae);ye!=null&&ye!==V&&(ne=!0,V=ye)}return ae?'<pre><code class="'+this.options.langPrefix+de(ae,!0)+'">'+(ne?V:de(V,!0))+`</code></pre>
|
|
`:"<pre><code>"+(ne?V:de(V,!0))+`</code></pre>
|
|
`},Q.blockquote=function(V){return`<blockquote>
|
|
`+V+`</blockquote>
|
|
`},Q.html=function(V){return V},Q.heading=function(V,J,ne,ae){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+ae.slug(ne)+'">'+V+"</h"+J+`>
|
|
`:"<h"+J+">"+V+"</h"+J+`>
|
|
`},Q.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Q.list=function(V,J,ne){var ae=J?"ol":"ul",ye=J&&ne!==1?' start="'+ne+'"':"";return"<"+ae+ye+`>
|
|
`+V+"</"+ae+`>
|
|
`},Q.listitem=function(V){return"<li>"+V+`</li>
|
|
`},Q.checkbox=function(V){return"<input "+(V?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Q.paragraph=function(V){return"<p>"+V+`</p>
|
|
`},Q.table=function(V,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
|
|
<thead>
|
|
`+V+`</thead>
|
|
`+J+`</table>
|
|
`},Q.tablerow=function(V){return`<tr>
|
|
`+V+`</tr>
|
|
`},Q.tablecell=function(V,J){var ne=J.header?"th":"td",ae=J.align?"<"+ne+' align="'+J.align+'">':"<"+ne+">";return ae+V+"</"+ne+`>
|
|
`},Q.strong=function(V){return"<strong>"+V+"</strong>"},Q.em=function(V){return"<em>"+V+"</em>"},Q.codespan=function(V){return"<code>"+V+"</code>"},Q.br=function(){return this.options.xhtml?"<br/>":"<br>"},Q.del=function(V){return"<del>"+V+"</del>"},Q.link=function(V,J,ne){if(V=ie(this.options.sanitize,this.options.baseUrl,V),V===null)return ne;var ae='<a href="'+de(V)+'"';return J&&(ae+=' title="'+J+'"'),ae+=">"+ne+"</a>",ae},Q.image=function(V,J,ne){if(V=ie(this.options.sanitize,this.options.baseUrl,V),V===null)return ne;var ae='<img src="'+V+'" alt="'+ne+'"';return J&&(ae+=' title="'+J+'"'),ae+=this.options.xhtml?"/>":">",ae},Q.text=function(V){return V},G}(),De=function(){function G(){}var Q=G.prototype;return Q.strong=function(V){return V},Q.em=function(V){return V},Q.codespan=function(V){return V},Q.del=function(V){return V},Q.html=function(V){return V},Q.text=function(V){return V},Q.link=function(V,J,ne){return""+ne},Q.image=function(V,J,ne){return""+ne},Q.br=function(){return""},G}(),Ke=function(){function G(){this.seen={}}var Q=G.prototype;return Q.slug=function(V){var J=V.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(J)){var ne=J;do this.seen[ne]++,J=ne+"-"+this.seen[ne];while(this.seen.hasOwnProperty(J))}return this.seen[J]=0,J},G}(),Je=H.defaults,Ze=C.unescape,Qe=function(){function G(ee){this.options=ee||Je,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new Ke}G.parse=function(V,J){var ne=new G(J);return ne.parse(V)};var Q=G.prototype;return Q.parse=function(V,J){J===void 0&&(J=!0);var ne="",ae,ye,be,Pe,ze,qe,Xe,At,pt,ot,Mt,Rt,wt,zt,vt,It,Pt,yt,Jt=V.length;for(ae=0;ae<Jt;ae++){ot=V[ae];switch(ot.type){case"space":continue;case"hr":{ne+=this.renderer.hr();continue}case"heading":{ne+=this.renderer.heading(this.parseInline(ot.tokens),ot.depth,Ze(this.parseInline(ot.tokens,this.textRenderer)),this.slugger);continue}case"code":{ne+=this.renderer.code(ot.text,ot.lang,ot.escaped);continue}case"table":{for(At="",Xe="",Pe=ot.header.length,ye=0;ye<Pe;ye++)Xe+=this.renderer.tablecell(this.parseInline(ot.tokens.header[ye]),{header:!0,align:ot.align[ye]});for(At+=this.renderer.tablerow(Xe),pt="",Pe=ot.cells.length,ye=0;ye<Pe;ye++){for(qe=ot.tokens.cells[ye],Xe="",ze=qe.length,be=0;be<ze;be++)Xe+=this.renderer.tablecell(this.parseInline(qe[be]),{header:!1,align:ot.align[be]});pt+=this.renderer.tablerow(Xe)}ne+=this.renderer.table(At,pt);continue}case"blockquote":{pt=this.parse(ot.tokens),ne+=this.renderer.blockquote(pt);continue}case"list":{for(Mt=ot.ordered,Rt=ot.start,wt=ot.loose,Pe=ot.items.length,pt="",ye=0;ye<Pe;ye++)vt=ot.items[ye],It=vt.checked,Pt=vt.task,zt="",vt.task&&(yt=this.renderer.checkbox(It),wt?vt.tokens.length>0&&vt.tokens[0].type==="text"?(vt.tokens[0].text=yt+" "+vt.tokens[0].text,vt.tokens[0].tokens&&vt.tokens[0].tokens.length>0&&vt.tokens[0].tokens[0].type==="text"&&(vt.tokens[0].tokens[0].text=yt+" "+vt.tokens[0].tokens[0].text)):vt.tokens.unshift({type:"text",text:yt}):zt+=yt),zt+=this.parse(vt.tokens,wt),pt+=this.renderer.listitem(zt,Pt,It);ne+=this.renderer.list(pt,Mt,Rt);continue}case"html":{ne+=this.renderer.html(ot.text);continue}case"paragraph":{ne+=this.renderer.paragraph(this.parseInline(ot.tokens));continue}case"text":{for(pt=ot.tokens?this.parseInline(ot.tokens):ot.text;ae+1<Jt&&V[ae+1].type==="text";)ot=V[++ae],pt+=`
|
|
`+(ot.tokens?this.parseInline(ot.tokens):ot.text);ne+=J?this.renderer.paragraph(pt):pt;continue}default:{var dt='Token with "'+ot.type+'" type was not found.';if(this.options.silent){console.error(dt);return}else throw new Error(dt)}}}return ne},Q.parseInline=function(V,J){J=J||this.renderer;var ne="",ae,ye,be=V.length;for(ae=0;ae<be;ae++){ye=V[ae];switch(ye.type){case"escape":{ne+=J.text(ye.text);break}case"html":{ne+=J.html(ye.text);break}case"link":{ne+=J.link(ye.href,ye.title,this.parseInline(ye.tokens,J));break}case"image":{ne+=J.image(ye.href,ye.title,ye.text);break}case"strong":{ne+=J.strong(this.parseInline(ye.tokens,J));break}case"em":{ne+=J.em(this.parseInline(ye.tokens,J));break}case"codespan":{ne+=J.codespan(ye.text);break}case"br":{ne+=J.br();break}case"del":{ne+=J.del(this.parseInline(ye.tokens,J));break}case"text":{ne+=J.text(ye.text);break}default:{var Pe='Token with "'+ye.type+'" type was not found.';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return ne},G}(),ut=C.merge,tt=C.checkSanitizeDeprecation,xe=C.escape,Oe=H.getDefaults,Fe=H.changeDefaults,We=H.defaults;function q(G,Q,ee){if(typeof G=="undefined"||G===null)throw new Error("marked(): input parameter is undefined or null");if(typeof G!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(G)+", string expected");if(typeof Q=="function"&&(ee=Q,Q=null),Q=ut({},q.defaults,Q||{}),tt(Q),ee){var V=Q.highlight,J;try{J=Ae.lex(G,Q)}catch(be){return ee(be)}var ne=function(Pe){var ze;if(!Pe)try{ze=Qe.parse(J,Q)}catch(qe){Pe=qe}return Q.highlight=V,Pe?ee(Pe):ee(null,ze)};if(!V||V.length<3)return ne();if(delete Q.highlight,!J.length)return ne();var ae=0;q.walkTokens(J,function(be){be.type==="code"&&(ae++,setTimeout(function(){V(be.text,be.lang,function(Pe,ze){if(Pe)return ne(Pe);ze!=null&&ze!==be.text&&(be.text=ze,be.escaped=!0),ae--,ae===0&&ne()})},0))}),ae===0&&ne();return}try{var ye=Ae.lex(G,Q);return Q.walkTokens&&q.walkTokens(ye,Q.walkTokens),Qe.parse(ye,Q)}catch(be){if(be.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Q.silent)return"<p>An error occurred:</p><pre>"+xe(be.message+"",!0)+"</pre>";throw be}}q.options=q.setOptions=function(G){return ut(q.defaults,G),Fe(q.defaults),q},q.getDefaults=Oe,q.defaults=We,q.use=function(G){var Q=ut({},G);if(G.renderer&&function(){var V=q.defaults.renderer||new we,J=function(ye){var be=V[ye];V[ye]=function(){for(var Pe=arguments.length,ze=new Array(Pe),qe=0;qe<Pe;qe++)ze[qe]=arguments[qe];var Xe=G.renderer[ye].apply(V,ze);return Xe===!1&&(Xe=be.apply(V,ze)),Xe}};for(var ne in G.renderer)J(ne);Q.renderer=V}(),G.tokenizer&&function(){var V=q.defaults.tokenizer||new Se,J=function(ye){var be=V[ye];V[ye]=function(){for(var Pe=arguments.length,ze=new Array(Pe),qe=0;qe<Pe;qe++)ze[qe]=arguments[qe];var Xe=G.tokenizer[ye].apply(V,ze);return Xe===!1&&(Xe=be.apply(V,ze)),Xe}};for(var ne in G.tokenizer)J(ne);Q.tokenizer=V}(),G.walkTokens){var ee=q.defaults.walkTokens;Q.walkTokens=function(V){G.walkTokens(V),ee&&ee(V)}}q.setOptions(Q)},q.walkTokens=function(G,Q){for(var ee=m(G),V;!(V=ee()).done;){var J=V.value;Q(J);switch(J.type){case"table":{for(var ne=m(J.tokens.header),ae;!(ae=ne()).done;){var ye=ae.value;q.walkTokens(ye,Q)}for(var be=m(J.tokens.cells),Pe;!(Pe=be()).done;)for(var ze=Pe.value,qe=m(ze),Xe;!(Xe=qe()).done;){var At=Xe.value;q.walkTokens(At,Q)}break}case"list":{q.walkTokens(J.items,Q);break}default:J.tokens&&q.walkTokens(J.tokens,Q)}}},q.Parser=Qe,q.parser=Qe.parse,q.Renderer=we,q.TextRenderer=De,q.Lexer=Ae,q.lexer=Ae.lex,q.Tokenizer=Se,q.Slugger=Ke,q.parse=q;var K=q;return K})},FOrL:function(Be,oe,P){Be.exports=P.p+"static/nodata.a6b3f948.png"},FWmy:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return te});function te(k,O){if(!k)throw new Error(O?`Assertion failed (${O})`:"Assertion Failed")}},IBYe:function(Be,oe,P){"use strict";function te(k){return null}oe.a=te},JAbv:function(Be,oe){Be.exports="data:image/png;base64,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"},JYp7:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return te});var te;(function(k){function O(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}k.is=O;const U=Object.freeze([]);function m(){return U}k.empty=m;function*S(t){yield t}k.single=S;function H(t){return t||U}k.from=H;function N(t){return!t||t[Symbol.iterator]().next().done===!0}k.isEmpty=N;function e(t){return t[Symbol.iterator]().next().value}k.first=e;function A(t,b){for(const y of t)if(b(y))return!0;return!1}k.some=A;function v(t,b){for(const y of t)if(b(y))return y;return}k.find=v;function*f(t,b){for(const y of t)b(y)&&(yield y)}k.filter=f;function*l(t,b){let y=0;for(const g of t)yield b(g,y++)}k.map=l;function*a(...t){for(const b of t)for(const y of b)yield y}k.concat=a;function*r(t){for(const b of t)for(const y of b)yield y}k.concatNested=r;function o(t,b,y){let g=y;for(const E of t)g=b(g,E);return g}k.reduce=o;function*s(t,b,y=t.length){for(b<0&&(b+=t.length),y<0?y+=t.length:y>t.length&&(y=t.length);b<y;b++)yield t[b]}k.slice=s;function i(t,b=Number.POSITIVE_INFINITY){const y=[];if(b===0)return[y,t];const g=t[Symbol.iterator]();for(let E=0;E<b;E++){const _=g.next();if(_.done)return[y,k.empty()];y.push(_.value)}return[y,{[Symbol.iterator](){return g}}]}k.consume=i;function n(t,b,y=(g,E)=>g===E){const g=t[Symbol.iterator](),E=b[Symbol.iterator]();for(;;){const _=g.next(),u=E.next();if(_.done!==u.done)return!1;if(_.done)return!0;if(!y(_.value,u.value))return!1}}k.equals=n})(te||(te={}))},KOXS:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___4BHX-",flex_space_between:"flex_space_between___fH2oM",flex_box_vertical_center:"flex_box_vertical_center___TgSS9",flex_box_center_end:"flex_box_center_end___1vKaD",flex_box_column:"flex_box_column___1kCgI",input:"input___2mV-b",dropdown:"dropdown___1QKW2",menu:"menu___37CBn",text:"text___159fF",b1:"b1___2uGyF",b2:"b2___2DXw1"}},MEgm:function(Be,oe){Be.exports="data:image/png;base64,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"},MI8n:function(Be,oe,P){"use strict";P.d(oe,"c",function(){return m}),P.d(oe,"b",function(){return e}),P.d(oe,"e",function(){return A}),P.d(oe,"a",function(){return v}),P.d(oe,"d",function(){return f}),P.d(oe,"f",function(){return l});var te=P("/cxE"),k=P("pmY6"),O=P("24hK"),U=P("5Y4S"),m;(function(a){a.None=()=>k.a.None;function r(T){return(M,D=null,w)=>{let C=!1,j;return j=T(L=>C?void 0:(j?j.dispose():C=!0,M.call(D,L)),null,w),C&&j.dispose(),j}}a.once=r;function o(T,M){return y((D,w=null,C)=>T(j=>D.call(w,M(j)),null,C))}a.map=o;function s(T,M){return y((D,w=null,C)=>T(j=>{M(j),D.call(w,j)},null,C))}a.forEach=s;function i(T,M){return y((D,w=null,C)=>T(j=>M(j)&&D.call(w,j),null,C))}a.filter=i;function n(T){return T}a.signal=n;function t(...T){return(M,D=null,w)=>Object(k.e)(...T.map(C=>C(j=>M.call(D,j),null,w)))}a.any=t;function b(T,M,D){let w=D;return o(T,C=>(w=M(w,C),w))}a.reduce=b;function y(T){let M;const D=new e({onFirstListenerAdd(){M=T(D.fire,D)},onLastListenerRemove(){M.dispose()}});return D.event}function g(T,M,D=100,w=!1,C){let j,L,z,$=0;const he=new e({leakWarningThreshold:C,onFirstListenerAdd(){j=T(fe=>{$++,L=M(L,fe),w&&!z&&(he.fire(L),L=void 0),clearTimeout(z),z=setTimeout(()=>{const Ie=L;L=void 0,z=void 0,(!w||$>1)&&he.fire(Ie),$=0},D)})},onLastListenerRemove(){j.dispose()}});return he.event}a.debounce=g;function E(T,M=(D,w)=>D===w){let D=!0,w;return i(T,C=>{const j=D||!M(C,w);return D=!1,w=C,j})}a.latch=E;function _(T,M){return[a.filter(T,M),a.filter(T,D=>!M(D))]}a.split=_;function u(T,M=!1,D=[]){let w=D.slice(),C=T(z=>{w?w.push(z):L.fire(z)});const j=()=>{w&&w.forEach(z=>L.fire(z)),w=null},L=new e({onFirstListenerAdd(){C||(C=T(z=>L.fire(z)))},onFirstListenerDidAdd(){w&&(M?setTimeout(j):j())},onLastListenerRemove(){C&&C.dispose(),C=null}});return L.event}a.buffer=u;class c{constructor(T){this.event=T}map(T){return new c(o(this.event,T))}forEach(T){return new c(s(this.event,T))}filter(T){return new c(i(this.event,T))}reduce(T,M){return new c(b(this.event,T,M))}latch(){return new c(E(this.event))}debounce(T,M=100,D=!1,w){return new c(g(this.event,T,M,D,w))}on(T,M,D){return this.event(T,M,D)}once(T,M,D){return r(this.event)(T,M,D)}}function p(T){return new c(T)}a.chain=p;function d(T,M,D=w=>w){const w=(...z)=>L.fire(D(...z)),C=()=>T.on(M,w),j=()=>T.removeListener(M,w),L=new e({onFirstListenerAdd:C,onLastListenerRemove:j});return L.event}a.fromNodeEventEmitter=d;function x(T,M,D=w=>w){const w=(...z)=>L.fire(D(...z)),C=()=>T.addEventListener(M,w),j=()=>T.removeEventListener(M,w),L=new e({onFirstListenerAdd:C,onLastListenerRemove:j});return L.event}a.fromDOMEventEmitter=x;function h(T){return new Promise(M=>r(T)(M))}a.toPromise=h})(m||(m={}));class S{constructor(a){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${a}_${S._idPool++}`}start(a){this._stopWatch=new U.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}}}S._idPool=0;let H=-1;class N{constructor(a,r=Math.random().toString(18).slice(2,5)){this.customThreshold=a,this.name=r,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(a){let r=H;if(typeof this.customThreshold=="number"&&(r=this.customThreshold),r<=0||a<r)return;this._stacks||(this._stacks=new Map);const o=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),s=this._stacks.get(o)||0;if(this._stacks.set(o,s+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let i,n=0;for(const[t,b]of this._stacks)(!i||n<b)&&(i=t,n=b);console.warn(`[${this.name}] potential listener LEAK detected, having ${a} listeners already. MOST frequent listener (${n}):`),console.warn(i)}return()=>{const i=this._stacks.get(o)||0;this._stacks.set(o,i-1)}}}class e{constructor(a){var r;this._disposed=!1,this._options=a,this._leakageMon=H>0?new N(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new S(this._options._profName):void 0}get event(){return this._event||(this._event=(a,r,o)=>{var s;this._listeners||(this._listeners=new O.a);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const n=this._listeners.push(r?[a,r]:a);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,a,r);const t=(s=this._leakageMon)===null||s===void 0?void 0:s.check(this._listeners.size),b=Object(k.i)(()=>{if(t&&t(),!this._disposed&&(n(),this._options&&this._options.onLastListenerRemove)){const y=this._listeners&&!this._listeners.isEmpty();y||this._options.onLastListenerRemove(this)}});return o instanceof k.b?o.add(b):Array.isArray(o)&&o.push(b),b}),this._event}fire(a){var r,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new O.a);for(let s of this._listeners)this._deliveryQueue.push([s,a]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[s,i]=this._deliveryQueue.shift();try{typeof s=="function"?s.call(void 0,i):s[0].call(s[1],i)}catch(n){Object(te.f)(n)}}(o=this._perfMon)===null||o===void 0||o.stop()}}dispose(){var a,r,o,s,i;this._disposed||(this._disposed=!0,(a=this._listeners)===null||a===void 0||a.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(s=(o=this._options)===null||o===void 0?void 0:o.onLastListenerRemove)===null||s===void 0||s.call(o),(i=this._leakageMon)===null||i===void 0||i.dispose())}}class A extends e{constructor(a){super(a);this._isPaused=0,this._eventQueue=new O.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 v extends A{constructor(a){var r;super(a);this._delay=(r=a.delay)!==null&&r!==void 0?r:100}fire(a){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(a)}}class f{constructor(){this.buffers=[]}wrapEvent(a){return(r,o,s)=>a(i=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>r.call(o,i)):r.call(o,i)},void 0,s)}bufferEvents(a){const r=[];this.buffers.push(r);const o=a();return this.buffers.pop(),r.forEach(s=>s()),o}}class l{constructor(){this.listening=!1,this.inputEvent=m.None,this.inputEventListener=k.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(a){this.inputEvent=a,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=a(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Be,oe,P){"use strict";(function(te,k){P.d(oe,"b",function(){return o}),P.d(oe,"i",function(){return t}),P.d(oe,"f",function(){return b}),P.d(oe,"d",function(){return y}),P.d(oe,"g",function(){return g}),P.d(oe,"h",function(){return E}),P.d(oe,"c",function(){return _}),P.d(oe,"k",function(){return u}),P.d(oe,"j",function(){return c}),P.d(oe,"a",function(){return p}),P.d(oe,"e",function(){return h});var O;const U="en";let m=!1,S=!1,H=!1,N=!1,e=!1,A=!1,v=!1,f,l=U,a,r;const o=typeof self=="object"?self:typeof te=="object"?te:{};let s;typeof o.vscode!="undefined"&&typeof o.vscode.process!="undefined"?s=o.vscode.process:typeof k!="undefined"&&(s=k);const i=typeof((O=s==null?void 0:s.versions)===null||O===void 0?void 0:O.electron)=="string"&&s.type==="renderer";if(typeof navigator=="object"&&!i)r=navigator.userAgent,m=r.indexOf("Windows")>=0,S=r.indexOf("Macintosh")>=0,v=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=r.indexOf("Linux")>=0,A=!0,f=navigator.language,l=f;else if(typeof s=="object"){m=s.platform==="win32",S=s.platform==="darwin",H=s.platform==="linux",N=H&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,f=U,l=U;const T=s.env.VSCODE_NLS_CONFIG;if(T)try{const M=JSON.parse(T),D=M.availableLanguages["*"];f=M.locale,l=D||U,a=M._translationsConfigFile}catch(M){}e=!0}else console.error("Unable to resolve platform.");let n=0;S?n=1:m?n=3:H&&(n=2);const t=m,b=S,y=H,g=e,E=A,_=v,u=r,c=function(){if(o.setImmediate)return o.setImmediate.bind(o);if(typeof o.postMessage=="function"&&!o.importScripts){let D=[];o.addEventListener("message",C=>{if(C.data&&C.data.vscodeSetImmediateId)for(let j=0,L=D.length;j<L;j++){const z=D[j];if(z.id===C.data.vscodeSetImmediateId){D.splice(j,1),z.callback();return}}});let w=0;return C=>{const j=++w;D.push({id:j,callback:C}),o.postMessage({vscodeSetImmediateId:j},"*")}}if(typeof(s==null?void 0:s.nextTick)=="function")return s.nextTick.bind(s);const M=Promise.resolve();return D=>M.then(D)}(),p=S||v?2:m?1:3;let d=!0,x=!1;function h(){if(!x){x=!0;const T=new Uint8Array(2);T[0]=1,T[1]=2;const M=new Uint16Array(T.buffer);d=M[0]===(2<<8)+1}return d}}).call(this,P("IyRk"),P("Q2Ig"))},N0LK:function(Be,oe,P){"use strict";P.d(oe,"C",function(){return te}),P.d(oe,"v",function(){return O}),P.d(oe,"s",function(){return U}),P.d(oe,"t",function(){return m}),P.d(oe,"U",function(){return S}),P.d(oe,"J",function(){return H}),P.d(oe,"O",function(){return N}),P.d(oe,"p",function(){return e}),P.d(oe,"T",function(){return A}),P.d(oe,"q",function(){return v}),P.d(oe,"N",function(){return f}),P.d(oe,"M",function(){return l}),P.d(oe,"Q",function(){return a}),P.d(oe,"u",function(){return r}),P.d(oe,"x",function(){return o}),P.d(oe,"I",function(){return s}),P.d(oe,"f",function(){return i}),P.d(oe,"h",function(){return n}),P.d(oe,"g",function(){return t}),P.d(oe,"i",function(){return b}),P.d(oe,"G",function(){return y}),P.d(oe,"H",function(){return g}),P.d(oe,"r",function(){return E}),P.d(oe,"R",function(){return _}),P.d(oe,"d",function(){return u}),P.d(oe,"e",function(){return c}),P.d(oe,"E",function(){return p}),P.d(oe,"F",function(){return d}),P.d(oe,"j",function(){return x}),P.d(oe,"z",function(){return h}),P.d(oe,"K",function(){return M}),P.d(oe,"L",function(){return D}),P.d(oe,"m",function(){return C}),P.d(oe,"k",function(){return L}),P.d(oe,"A",function(){return $}),P.d(oe,"a",function(){return he}),P.d(oe,"n",function(){return fe}),P.d(oe,"l",function(){return Ie}),P.d(oe,"D",function(){return Se}),P.d(oe,"B",function(){return pe}),P.d(oe,"b",function(){return Ce}),P.d(oe,"S",function(){return Me}),P.d(oe,"o",function(){return ge}),P.d(oe,"P",function(){return B}),P.d(oe,"w",function(){return R}),P.d(oe,"c",function(){return I}),P.d(oe,"y",function(){return F});function te(ie){return!ie||typeof ie!="string"?!0:ie.trim().length===0}const k=/{(\d+)}/g;function O(ie,...de){return de.length===0?ie:ie.replace(k,function(we,De){const Ke=parseInt(De,10);return isNaN(Ke)||Ke<0||Ke>=de.length?we:de[Ke]})}function U(ie){return ie.replace(/[<>&]/g,function(de){switch(de){case"<":return"<";case">":return">";case"&":return"&";default:return de}})}function m(ie){return ie.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function S(ie,de=" "){const we=H(ie,de);return N(we,de)}function H(ie,de){if(!ie||!de)return ie;const we=de.length;if(we===0||ie.length===0)return ie;let De=0;for(;ie.indexOf(de,De)===De;)De=De+we;return ie.substring(De)}function N(ie,de){if(!ie||!de)return ie;const we=de.length,De=ie.length;if(we===0||De===0)return ie;let Ke=De,Je=-1;for(;!(Je=ie.lastIndexOf(de,Ke-1),Je===-1||Je+we!==Ke);){if(Je===0)return"";Ke=Je}return ie.substring(0,Ke)}function e(ie){return ie.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function A(ie){return ie.replace(/\*/g,"")}function v(ie,de,we={}){if(!ie)throw new Error("Cannot create regex from empty string");de||(ie=m(ie)),we.wholeWord&&(/\B/.test(ie.charAt(0))||(ie="\\b"+ie),/\B/.test(ie.charAt(ie.length-1))||(ie=ie+"\\b"));let De="";return we.global&&(De+="g"),we.matchCase||(De+="i"),we.multiline&&(De+="m"),we.unicode&&(De+="u"),new RegExp(ie,De)}function f(ie){if(ie.source==="^"||ie.source==="^$"||ie.source==="$"||ie.source==="^\\s*$")return!1;const de=ie.exec("");return!!(de&&ie.lastIndex===0)}function l(ie){return(ie.global?"g":"")+(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")}function a(ie){return ie.split(/\r\n|\r|\n/)}function r(ie){for(let de=0,we=ie.length;de<we;de++){const De=ie.charCodeAt(de);if(De!==32&&De!==9)return de}return-1}function o(ie,de=0,we=ie.length){for(let De=de;De<we;De++){const Ke=ie.charCodeAt(De);if(Ke!==32&&Ke!==9)return ie.substring(de,De)}return ie.substring(de,we)}function s(ie,de=ie.length-1){for(let we=de;we>=0;we--){const De=ie.charCodeAt(we);if(De!==32&&De!==9)return we}return-1}function i(ie,de){return ie<de?-1:ie>de?1:0}function n(ie,de,we=0,De=ie.length,Ke=0,Je=de.length){for(;we<De&&Ke<Je;we++,Ke++){let ut=ie.charCodeAt(we),tt=de.charCodeAt(Ke);if(ut<tt)return-1;if(ut>tt)return 1}const Ze=De-we,Qe=Je-Ke;return Ze<Qe?-1:Ze>Qe?1:0}function t(ie,de){return b(ie,de,0,ie.length,0,de.length)}function b(ie,de,we=0,De=ie.length,Ke=0,Je=de.length){for(;we<De&&Ke<Je;we++,Ke++){let ut=ie.charCodeAt(we),tt=de.charCodeAt(Ke);if(ut===tt)continue;if(ut>=128||tt>=128)return n(ie.toLowerCase(),de.toLowerCase(),we,De,Ke,Je);y(ut)&&(ut-=32),y(tt)&&(tt-=32);const xe=ut-tt;if(xe===0)continue;return xe}const Ze=De-we,Qe=Je-Ke;return Ze<Qe?-1:Ze>Qe?1:0}function y(ie){return ie>=97&&ie<=122}function g(ie){return ie>=65&&ie<=90}function E(ie,de){return ie.length===de.length&&b(ie,de)===0}function _(ie,de){const we=de.length;return de.length>ie.length?!1:b(ie,de,0,we)===0}function u(ie,de){let we,De=Math.min(ie.length,de.length);for(we=0;we<De;we++)if(ie.charCodeAt(we)!==de.charCodeAt(we))return we;return De}function c(ie,de){let we,De=Math.min(ie.length,de.length);const Ke=ie.length-1,Je=de.length-1;for(we=0;we<De;we++)if(ie.charCodeAt(Ke-we)!==de.charCodeAt(Je-we))return we;return De}function p(ie){return 55296<=ie&&ie<=56319}function d(ie){return 56320<=ie&&ie<=57343}function x(ie,de){return(ie-55296<<10)+(de-56320)+65536}function h(ie,de,we){const De=ie.charCodeAt(we);if(p(De)&&we+1<de){const Ke=ie.charCodeAt(we+1);if(d(Ke))return x(De,Ke)}return De}function T(ie,de){const we=ie.charCodeAt(de-1);if(d(we)&&de>1){const De=ie.charCodeAt(de-2);if(p(De))return x(De,we)}return we}function M(ie,de){const we=W.getInstance(),De=de,Ke=ie.length,Je=h(ie,Ke,de);de+=Je>=65536?2:1;let Ze=we.getGraphemeBreakType(Je);for(;de<Ke;){const Qe=h(ie,Ke,de),ut=we.getGraphemeBreakType(Qe);if(I(Ze,ut))break;de+=Qe>=65536?2:1,Ze=ut}return de-De}function D(ie,de){const we=W.getInstance(),De=de,Ke=T(ie,de);de-=Ke>=65536?2:1;let Je=we.getGraphemeBreakType(Ke);for(;de>0;){const Ze=T(ie,de),Qe=we.getGraphemeBreakType(Ze);if(I(Qe,Je))break;de-=Ze>=65536?2:1,Je=Qe}return De-de}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 C(ie){return w.test(ie)}const j=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L(ie){return j.test(ie)}const z=/^[\t\n\r\x20-\x7E]*$/;function $(ie){return z.test(ie)}const he=/[\u2028\u2029]/;function fe(ie){return he.test(ie)}function Ie(ie){for(let de=0,we=ie.length;de<we;de++)if(Se(ie.charCodeAt(de)))return!0;return!1}function Se(ie){return ie=+ie,ie>=11904&&ie<=55215||ie>=63744&&ie<=64255||ie>=65281&&ie<=65374}function pe(ie){return ie>=127462&&ie<=127487||ie===8986||ie===8987||ie===9200||ie===9203||ie>=9728&&ie<=10175||ie===11088||ie===11093||ie>=127744&&ie<=128591||ie>=128640&&ie<=128764||ie>=128992&&ie<=129003||ie>=129280&&ie<=129535||ie>=129648&&ie<=129750}const Ce=String.fromCharCode(65279);function Me(ie){return!!(ie&&ie.length>0&&ie.charCodeAt(0)===65279)}function ge(ie,de=!1){return ie?(de&&(ie=ie.replace(/\\./g,"")),ie.toLowerCase()!==ie):!1}function B(ie){const de=90-65+1;return ie=ie%(2*de),ie<de?String.fromCharCode(97+ie):String.fromCharCode(65+ie-de)}function R(ie){const de=W.getInstance();return de.getGraphemeBreakType(ie)}function I(ie,de){return ie===0?de!==5&&de!==7:ie===2&&de===3?!1:ie===4||ie===2||ie===3||(de===4||de===2||de===3)?!0:ie===8&&(de===8||de===9||de===11||de===12)||((ie===11||ie===9)&&(de===9||de===10)||((ie===12||ie===10)&&de===10||(de===5||de===13||(de===7||(ie===1||ie===13&&de===14)))))?!1:!(ie===6&&de===6)}class W{constructor(){this._data=Y()}static getInstance(){return W._INSTANCE||(W._INSTANCE=new W),W._INSTANCE}getGraphemeBreakType(ie){if(ie<32)return ie===10?3:ie===13?2:4;if(ie<127)return 0;const de=this._data,we=de.length/3;let De=1;for(;De<=we;)if(ie<de[3*De])De=2*De;else if(ie>de[3*De+1])De=2*De+1;else return de[3*De+2];return 0}}W._INSTANCE=null;function Y(){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 F(ie,de){if(ie===0)return 0;const we=le(ie,de);if(we!==void 0)return we;const De=T(de,ie);return ie-=Ae(De),ie}function le(ie,de){let we=T(de,ie);for(ie-=Ae(we);Ne(we)||we===65039||we===8419;){if(ie===0)return;we=T(de,ie),ie-=Ae(we)}if(!pe(we))return;if(ie>=0){const De=T(de,ie);De===8205&&(ie-=Ae(De))}return ie}function Ae(ie){return ie>=65536?2:1}function Ne(ie){return 127995<=ie&&ie<=127999}},NQs2:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___3K14R",flex_space_between:"flex_space_between___1KE7t",flex_box_vertical_center:"flex_box_vertical_center___3Yslx",flex_box_center_end:"flex_box_center_end___2RmV-",flex_box_column:"flex_box_column___3k3IQ",banner:"banner___3caau",content:"content___fxe_p",btns:"btns___Vv-WB",img_noactive:"img_noactive___s1naU",img_active:"img_active___11s7p",input_warp:"input_warp___3Y7JU"}},Nf5h:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return e}),P.d(oe,"i",function(){return o}),P.d(oe,"l",function(){return t}),P.d(oe,"f",function(){return E}),P.d(oe,"j",function(){return p}),P.d(oe,"d",function(){return Ne}),P.d(oe,"b",function(){return Ke}),P.d(oe,"h",function(){return ut}),P.d(oe,"g",function(){return Fe}),P.d(oe,"k",function(){return ne}),P.d(oe,"e",function(){return Rt}),P.d(oe,"c",function(){return dt});var te=P("5NDa"),k=P("5rEg"),O=P("tJVT"),U=P("q1tI"),m=P.n(U),S=P("NQs2"),H=P.n(S),N=function(Le){var ct=Le.dataSource,mt=ct===void 0?[]:ct,Ct=Le.bannerImg,ht=Le.img,nt=Le.imgWidth,it=nt===void 0?346:nt,rt=Le.title,Ot=Le.sunTitle,at=Le.bannerExtraContent,Dt=Le.placeholder,_t=Le.onChange,en=Object(U.useState)(""),Zt=Object(O.a)(en,2),ft=Zt[0],pn=Zt[1];return m.a.createElement("div",{className:H.a.banner,style:{backgroundImage:"url('".concat(Ct,"')"),backgroundPosition:"center",backgroundSize:"cover"}},m.a.createElement("div",{className:H.a.content},m.a.createElement("aside",null,m.a.createElement("p",{style:{marginBottom:"".concat(mt.length==0?"0":"")}},m.a.createElement("b",null,rt),m.a.createElement("span",null,Ot)),mt.length>0&&m.a.createElement("div",{className:H.a.btns},mt.map(function(lt,qt){return lt.buttonShow&&m.a.createElement(m.a.Fragment,null,lt.Button?lt.Button:m.a.createElement("div",{key:qt,onClick:lt.click},m.a.createElement("img",{src:lt.img,className:H.a.img_noactive}),m.a.createElement("img",{src:lt.img_active,className:H.a.img_active}),lt.name))})),at),mt.length>0&&m.a.createElement("div",{className:H.a.input_warp},m.a.createElement(k.a,{value:ft,onChange:function(qt){pn(qt.target.value)},placeholder:Dt,onPressEnter:function(){return _t(ft)},color:"#fff"}),m.a.createElement("i",{onClick:function(){return _t(ft)},className:"iconfont icon-sousuo9 font14 pl10 current"}))))},e=N,A=P("6nfa"),v=P.n(A),f=P("TSYQ"),l=P.n(f),a=P("9kvl"),r=function(Le){var ct=Le.dataSource,mt=ct===void 0?[]:ct,Ct=Le.value,ht=Le.onChange,nt=Le.className,it=Le.title,rt=Le.titleWidth,Ot=rt===void 0?56:rt,at=Le.style,Dt=at===void 0?{}:at,_t=Le.fontColor,en=_t===void 0?"#6A7283":_t,Zt=Le.isId,ft=Zt===void 0?!1:Zt,pn=Object(U.useState)(0),lt=Object(O.a)(pn,2),qt=lt[0],Lt=lt[1],on=Object(U.useState)(!1),Kt=Object(O.a)(on,2),kt=Kt[0],$t=Kt[1],an=Object(U.useRef)(null),cn=Object(a.g)();return Object(U.useEffect)(function(){if(mt.length!==0){var dn;(an==null||((dn=an.current)===null||dn===void 0)?void 0:dn.clientHeight)>98?Lt(1):Lt(0)}mt.length===0&&Lt(0)},[mt]),m.a.createElement("div",{className:l()(v.a.row,nt),style:Dt},m.a.createElement("div",{style:{width:Ot,marginTop:kt?12:4},className:v.a.title},it),m.a.createElement("div",{className:kt?"".concat(v.a.tagsWrap," ").concat(v.a.tagsBorderWrap):v.a.tagsWrap},m.a.createElement("div",{className:v.a.bar,style:qt>0?{height:qt===1?100:"auto",overflow:qt===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},m.a.createElement("div",{className:v.a.name,ref:an},mt==null?void 0:mt.map(function(dn){return m.a.createElement("span",{onClick:function(){return ht(ft?dn.id:dn.name)},key:ft?dn.id:dn.name,title:dn.name,style:{color:en},className:Ct===(ft?dn.id:dn.name)?v.a.active:""},dn.name)}))),!!qt&&m.a.createElement(U.Fragment,null,qt===1?m.a.createElement("div",{onClick:function(){var Mn;Lt(2),(an==null||((Mn=an.current)===null||Mn===void 0)?void 0:Mn.clientHeight)>205?$t(!0):$t(!1)},className:v.a.action},cn.formatMessage({id:"quantum.more"}),m.a.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):m.a.createElement("div",{onClick:function(){Lt(1),$t(!1)},className:v.a.action},cn.formatMessage({id:"quantum.back"}),m.a.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},o=r,s=P("cz0n"),i=P.n(s),n=function(Le){var ct=Le.dataSource,mt=ct===void 0?[]:ct,Ct=Le.value,ht=Le.onChange,nt=Le.className;return m.a.createElement("div",{className:l()(i.a.tabs,nt)},mt.map(function(it){return m.a.createElement("span",{onClick:function(){return ht(it.id)},className:Ct===it.id?i.a.active:"",key:it.id},it.name)}))},t=n,b=P("KOXS"),y=P.n(b),g=function(Le){var ct,mt=Le.dataSource,Ct=mt===void 0?[]:mt,ht=Le.value,nt=Le.onChange,it=Le.className,rt=Le.style,Ot=rt===void 0?{}:rt,at=Le.placeholder,Dt=Object(U.useState)(""),_t=Object(O.a)(Dt,2),en=_t[0],Zt=_t[1],ft=Object(U.useState)(""),pn=Object(O.a)(ft,2),lt=pn[0],qt=pn[1];Object(U.useEffect)(function(){var Kt;(Kt=JSON.stringify(ht))!==null&&Kt!==void 0&&Kt.includes("{")?(Zt(ht.id),qt(ht.value)):qt(ht)},[ht]);var Lt=function(){nt(lt||null,en||"")},on=function(kt){if(kt===en)return;Zt(kt),nt(lt,kt)};return m.a.createElement("div",{className:l()(y.a.input,it),style:Ot},!!Ct.length&&m.a.createElement("div",{className:y.a.dropdown},m.a.createElement("div",{className:y.a.text},(ct=Ct.find(function(Kt){return Kt.id===en}))===null||ct===void 0?void 0:ct.name,m.a.createElement("i",{className:"iconfont icon-zhankai4"}),m.a.createElement("b",{className:y.a.b1}),m.a.createElement("b",{className:y.a.b2})),m.a.createElement("div",{className:y.a.menu},Ct.map(function(Kt,kt){return m.a.createElement("div",{key:kt,onClick:function(){return on(Kt.id)}},Kt.name)}))),m.a.createElement(k.a,{onPressEnter:Lt,value:lt,onChange:function(kt){return qt(kt.target.value||"")},bordered:!1,placeholder:at}),m.a.createElement("i",{onClick:Lt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},E=g,_=P("f9pc"),u=P.n(_),c=function(Le){var ct=Le.value,mt=Le.onChange,Ct=Le.className,ht=Le.total,nt=Le.pageSize,it=Le.style,rt=it===void 0?{}:it,Ot=ct<2,at=ct>=Math.ceil(ht/nt);return ht<=nt?m.a.createElement(m.a.Fragment,null):m.a.createElement("div",{className:l()(u.a.quickPager,Ct),style:rt},m.a.createElement("div",{onClick:function(){Ot||mt(ct-1,"prev")},className:Ot?u.a.disabled:""},"\u4E0A\u4E00\u9875"),m.a.createElement("div",{onClick:function(){at||mt(ct+1,"next")},className:at?u.a.disabled:""},"\u4E0B\u4E00\u9875"))},p=c,d=P("T2oS"),x=P("W9HT"),h=P("pC0b"),T=P("GzdX"),M=P("5Dmo"),D=P("3S7+"),w=P("Oe0F"),C=P.n(w),j=P("m3rI"),L=P("1vsH"),z=P("JAbv"),$=P.n(z),he=P("Bq7L"),fe=P.n(he),Ie=P("MEgm"),Se=P.n(Ie),pe=P("BdwD"),Ce=function(Le){var ct=Le.className,mt=Le.dataSource,Ct=mt===void 0?[]:mt,ht=Le.col,nt=ht===void 0?4:ht,it=Le.right,rt=Le.bottom,Ot=rt===void 0?23:rt,at=Le.precision,Dt=at===void 0?0:at,_t=Le.wrapWidth,en=_t===void 0?1200:_t,Zt=Le.trackEventItems,ft=Le.loading,pn=Math.floor((en-(nt-1)*it)/nt);return m.a.createElement(x.a,{spinning:ft},m.a.createElement("div",{className:l()(C.a.list,ct)},!!Ct.length&&Ct.map(function(lt,qt){var Lt=lt.name,on=lt.id,Kt=lt.identifier,kt=lt.power,$t=lt.cover_image_id,an=lt.pic;return m.a.createElement("div",{className:C.a.wrap,key:on,style:{width:pn,marginRight:(1+qt)%nt===0?0:it+Dt,marginBottom:Ot}},m.a.createElement("a",{target:"_blank",href:"/shixuns/".concat(Kt,"/challenges"),className:C.a.li,onClick:function(dn){dn.preventDefault(),Zt&&Object(L.db)([Zt]),kt&&Object(L.S)("/shixuns/".concat(Kt,"/challenges"))}},m.a.createElement("div",{className:C.a.img},m.a.createElement("img",{className:C.a.cover,src:$t?"".concat(j.a.API_SERVER,"/api/attachments/").concat($t):"".concat(j.a.IMG_SERVER,"/").concat(an)}),lt.is_jupyter&&m.a.createElement("img",{className:C.a.sign,src:$.a}),lt.is_jupyter_lab&&m.a.createElement("img",{className:C.a.sign,src:fe.a}),lt.is_unity_3d&&m.a.createElement("img",{className:C.a.sign,src:Se.a})),m.a.createElement("div",{className:C.a.name},m.a.createElement(D.a,{title:Lt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},m.a.createElement("span",{className:C.a.e},Lt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),m.a.createElement("div",{className:C.a.tags},m.a.createElement(D.a,{placement:"bottom",title:"\u5173\u5361\u6570"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr3"}),m.a.createElement("span",null,lt.challenges_count))),!!lt.myshixuns_count&&m.a.createElement(D.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),m.a.createElement("span",null,lt.myshixuns_count))),m.a.createElement(D.a,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},m.a.createElement("span",null,m.a.createElement("span",null,lt.level))),m.a.createElement("div",{className:C.a.rate},m.a.createElement(T.a,{allowHalf:!0,disabled:!0,defaultValue:lt.score_info}),m.a.createElement("span",null,"\xA0",lt.score_info?"".concat(lt.score_info,"\u5206"):"5\u5206")))),!kt&&m.a.createElement("div",{className:C.a.lockWrap},m.a.createElement("img",{src:"".concat(j.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),m.a.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Ct.length&&m.a.createElement(pe.a,null)))},Me=Ce,ge=P("ZJlW"),B=P.n(ge),R=P("z4EP"),I=P.n(R),W=P("+GGh"),Y=P.n(W),F=P("cFMs"),le=P.n(F),Ae=function(Le){var ct=Le.className,mt=Le.dataSource,Ct=mt===void 0?[]:mt,ht=Le.col,nt=ht===void 0?4:ht,it=Le.right,rt=Le.bottom,Ot=rt===void 0?23:rt,at=Le.precision,Dt=at===void 0?0:at,_t=Le.wrapWidth,en=_t===void 0?1200:_t,Zt=Le.trackEventItems,ft=Le.loading,pn=Math.floor((en-(nt-1)*it)/nt);return m.a.createElement(x.a,{spinning:ft},m.a.createElement("div",{className:l()(B.a.list,ct)},!!Ct.length&&Ct.map(function(lt,qt){var Lt=lt.name,on=lt.id,Kt=lt.identifier,kt=lt.featured,$t=lt.school_name,an=lt.image_url,cn=lt.excellent;return m.a.createElement("div",{key:on,className:B.a.wrap,style:{width:pn,marginRight:(1+qt)%nt===0?0:it+Dt,marginBottom:Ot}},m.a.createElement("a",{target:"_blank",href:"/paths/".concat(Kt),className:B.a.li,onClick:function(Mn){Mn.preventDefault(),Zt&&Object(L.db)([Zt]),Object(L.S)("/paths/".concat(Kt))}},m.a.createElement("div",{className:B.a.img},m.a.createElement("img",{className:B.a.cover,src:"".concat(j.a.IMG_SERVER,"/").concat(an)}),kt===1&&m.a.createElement("img",{className:B.a.sign,src:I.a}),kt===2&&m.a.createElement("img",{className:B.a.sign,src:""}),kt===3&&m.a.createElement("img",{className:B.a.sign,src:Y.a}),kt===4&&m.a.createElement("img",{className:B.a.sign,src:""}),kt===5&&m.a.createElement("img",{className:B.a.sign,src:le.a})),m.a.createElement("div",{className:B.a.name},m.a.createElement(D.a,{title:Lt},m.a.createElement("span",{className:B.a.e},Lt))),m.a.createElement(D.a,{title:"\u53D1\u5E03\u5355\u4F4D\uFF1A".concat($t)},m.a.createElement("div",{className:B.a.unit},m.a.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),$t)),m.a.createElement("div",{className:B.a.tags},m.a.createElement(D.a,{placement:"bottom",title:"\u7AE0\u8282\u6570"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),m.a.createElement("span",null,lt.stages_count))),m.a.createElement(D.a,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),m.a.createElement("span",null,lt.members_count))),cn&&m.a.createElement("div",{className:B.a.tag},"\u5F00\u653E\u8BFE\u7A0B"))))}),!Ct.length&&m.a.createElement(pe.a,null)))},Ne=Ae,ie=P("iL++"),de=P.n(ie),we=P("xiVL"),De=function(Le){var ct=Le.className,mt=Le.dataSource,Ct=mt===void 0?[]:mt,ht=Le.col,nt=ht===void 0?4:ht,it=Le.right,rt=Le.bottom,Ot=rt===void 0?23:rt,at=Le.precision,Dt=at===void 0?0:at,_t=Le.wrapWidth,en=_t===void 0?1200:_t,Zt=Le.trackEventItems,ft=Le.loading,pn=Math.floor((en-(nt-1)*it)/nt);return m.a.createElement(x.a,{spinning:ft},m.a.createElement("div",{className:l()(de.a.list,ct)},!!Ct.length&&Ct.map(function(lt,qt){var Lt=lt.subject_identifier,on=lt.id,Kt=lt.identifier,kt=lt.power,$t=lt.is_public!=0&<.is_public;return m.a.createElement("div",{className:de.a.wrap,key:on,style:{width:pn,marginRight:(1+qt)%nt===0?0:it+Dt,marginBottom:Ot}},m.a.createElement("a",{className:de.a.li,onClick:function(cn){cn.preventDefault()}},m.a.createElement("div",{className:de.a.top},m.a.createElement(D.a,{title:lt.name},m.a.createElement("div",{className:de.a.name},lt.name)),m.a.createElement("img",{className:de.a.img,src:j.a.IMG_SERVER+"/images/"+lt.avatar_url}),m.a.createElement("div",{className:de.a.text},lt.creator),Lt&&m.a.createElement("div",{className:de.a.btns},m.a.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),m.a.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),$t&&m.a.createElement("div",{className:de.a.sign},"\u516C\u5F00")),m.a.createElement("div",{className:de.a.bottom},lt.visits>0&&m.a.createElement(D.a,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont icon-liulanyan"}),m.a.createElement("span",null,lt.visits))),lt.course_members_count>0&&m.a.createElement(D.a,{title:"\u6210\u5458",placement:"bottom"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont icon-chengyuan"}),lt.course_members_count)),lt.tasks_count>0&&m.a.createElement(D.a,{title:"\u4F5C\u4E1A",placement:"bottom"},m.a.createElement("span",null,m.a.createElement("i",{className:"iconfont icon-zuoye"}),lt.tasks_count)),lt.is_end?m.a.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):m.a.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),m.a.createElement("div",{className:de.a.lockWrap},lt.is_accessible?m.a.createElement(m.a.Fragment,null,Lt&&m.a.createElement("div",{onClick:function(){return Object(L.S)("/paths/".concat(Lt))}},"\u8FDB\u5165\u5B9E\u8DF5\u8BFE\u7A0B"),m.a.createElement("div",{onClick:function(cn){Zt&&Object(L.db)([Zt]),Object(L.S)(lt.first_category_url)}},"\u8FDB\u5165\u6559\u5B66\u8BFE\u5802")):m.a.createElement(m.a.Fragment,null,m.a.createElement("img",{src:"".concat(j.a.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),m.a.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165"))))}),!Ct.length&&m.a.createElement(pe.a,null)))},Ke=De,Je=P("f0W+"),Ze=P.n(Je),Qe=function(Le){var ct=Le.dataSource,mt=ct===void 0?[]:ct,Ct=Le.value,ht=Le.onChange,nt=Le.className,it=Le.style,rt=it===void 0?{}:it,Ot=Le.tabBarExtraContent;return m.a.createElement("div",{className:l()(Ze.a.tabs,nt),style:rt},m.a.createElement("div",{className:Ze.a.tabsWrap},mt.map(function(at,Dt){return m.a.createElement("div",{onClick:function(){return ht(at.id)},className:Ct===at.id?Ze.a.active:"",key:Dt},at.name)})),m.a.createElement("div",{className:Ze.a.tabBar},Ot))},ut=Qe,tt=P("9JIy"),xe=P.n(tt),Oe=function(Le){var ct=Le.className,mt=Le.style,Ct=mt===void 0?{}:mt,ht=Le.children;return m.a.createElement("div",{className:l()(xe.a.table,ct),style:Ct},ht)},Fe=Oe,We=P("qVdP"),q=P("jsC+"),K=P("lUTK"),G=P("BvKs"),Q=P("8WcF"),ee=P.n(Q),V=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}],J=function(Le){var ct,mt=Le.sortValue,Ct=Le.dropValue,ht=Le.className,nt=Le.onSort,it=Le.onDrop,rt=Le.dataSource,Ot=rt===void 0?V:rt;return m.a.createElement("div",{className:l()(ee.a.orderWrap,ht)},m.a.createElement(q.a,{overlay:m.a.createElement(G.a,null,Ot.map(function(at,Dt){return m.a.createElement(G.a.Item,{key:Dt,onClick:function(){return it(at.id)}},at.name)}))},m.a.createElement("span",{className:ee.a.orderTextWrap},(ct=Ot.find(function(at){return Ct===at.id}))===null||ct===void 0?void 0:ct.name)),m.a.createElement("span",{className:ee.a.orderIconWrap},m.a.createElement("span",{className:ee.a.orderAsc},m.a.createElement("i",{className:mt==="asc"?"iconfont icon-sanjiaoxing-up font12 ".concat(ee.a.cursorPointer," ").concat(ee.a.active):"iconfont icon-sanjiaoxing-up font12 ".concat(ee.a.cursorPointer),onClick:function(){return nt(mt==="asc"?"desc":"asc")}})),m.a.createElement("span",{className:ee.a.orderDesc},m.a.createElement("i",{className:mt==="desc"?"iconfont icon-sanjiaoxing-down font12 ".concat(ee.a.cursorPointer," ").concat(ee.a.active):"iconfont icon-sanjiaoxing-down font12 ".concat(ee.a.cursorPointer),onClick:function(){return nt(mt==="asc"?"desc":"asc")}}))))},ne=J,ae=P("+L6B"),ye=P("2/Rp"),be=P("0Owb"),Pe=P("9og8"),ze=P("PpiC"),qe=P("WmNS"),Xe=P.n(qe),At=P("siWv"),pt=P.n(At),ot=P("LvDl"),Mt=function(Le){var ct=Le.className,mt=Le.style,Ct=Le.children,ht=Le.loading,nt=ht===void 0?!1:ht,it=Le.openLoading,rt=Le.onClick,Ot=rt===void 0?function(){}:rt,at=Le.size,Dt=at===void 0?"middle":at,_t=Le.shape,en=_t===void 0?"round":_t,Zt=Le.type,ft=Zt===void 0?"default":Zt,pn=Object(ze.a)(Le,["className","style","children","loading","openLoading","onClick","size","shape","type"]),lt=Object(U.useState)(!1),qt=Object(O.a)(lt,2),Lt=qt[0],on=qt[1];return m.a.createElement(ye.a,Object(be.a)({onClick:Object(ot.throttle)(function(){var Kt=Object(Pe.a)(Xe.a.mark(function kt($t){return Xe.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return it&&on(!0),cn.prev=1,cn.next=4,Ot($t);case 4:cn.next=9;break;case 6:cn.prev=6,cn.t0=cn.catch(1),console.log("error",cn.t0);case 9:it&&on(!1);case 10:case"end":return cn.stop()}},kt,null,[[1,6]])}));return function(kt){return Kt.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:l()(pt.a.btn,pt.a["".concat(Dt,"-").concat(en)],ct),style:mt,size:Dt,shape:en,type:ft,loading:Lt||nt},pn),Ct)},Rt=Mt,wt=P("+oxA"),zt=P.n(wt),vt=function(Le){var ct=Le.className,mt=Le.style,Ct=Le.children,ht=Ct===void 0?null:Ct,nt=Le.onClick,it=Le.title;return m.a.createElement("div",{className:l()(zt.a.head,ct),style:mt},m.a.createElement("span",{className:"primary-hover",onClick:nt},m.a.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),m.a.createElement("b",{title:it},it),m.a.createElement("div",{className:zt.a.node},ht))},It=vt,Pt=P("fgAr"),yt=P.n(Pt),Jt=function(Le){var ct=Le.confirmShow,mt=ct===void 0?!0:ct,Ct=Le.confirmTitle,ht=Le.confirmClick,nt=Le.cancelShow,it=nt===void 0?!0:nt,rt=Le.cancelTitle,Ot=Le.cancelClick,at=Le.className,Dt=Le.style,_t=Le.confirmLoading,en=_t===void 0?!1:_t;return m.a.createElement("div",{className:l()(yt.a.btns,at),style:Dt},mt&&m.a.createElement(ye.a,{loading:en,onClick:ht,type:"primary",className:yt.a.confirm},Ct),it&&m.a.createElement(ye.a,{onClick:Ot,className:yt.a.cancel},rt))},dt=Jt},NvD2:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return S});var te=P("Kwbf");function k(H,N){var e=new Set;return H.forEach(function(A){N.has(A)||e.add(A)}),e}function O(H){var N=H||{},e=N.disabled,A=N.disableCheckbox,v=N.checkable;return!!(e||A)||v===!1}function U(H,N,e,A){for(var v=new Set(H),f=new Set,l=0;l<=e;l+=1){var a=N.get(l)||new Set;a.forEach(function(i){var n=i.key,t=i.node,b=i.children,y=b===void 0?[]:b;v.has(n)&&!A(t)&&y.filter(function(g){return!A(g.node)}).forEach(function(g){v.add(g.key)})})}for(var r=new Set,o=e;o>=0;o-=1){var s=N.get(o)||new Set;s.forEach(function(i){var n=i.parent,t=i.node;if(A(t)||!i.parent||r.has(i.parent.key))return;if(A(i.parent.node)){r.add(n.key);return}var b=!0,y=!1;(n.children||[]).filter(function(g){return!A(g.node)}).forEach(function(g){var E=g.key,_=v.has(E);b&&!_&&(b=!1),!y&&(_||f.has(E))&&(y=!0)}),b&&v.add(n.key),y&&f.add(n.key),r.add(n.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(k(f,v))}}function m(H,N,e,A,v){for(var f=new Set(H),l=new Set(N),a=0;a<=A;a+=1){var r=e.get(a)||new Set;r.forEach(function(n){var t=n.key,b=n.node,y=n.children,g=y===void 0?[]:y;!f.has(t)&&!l.has(t)&&!v(b)&&g.filter(function(E){return!v(E.node)}).forEach(function(E){f.delete(E.key)})})}l=new Set;for(var o=new Set,s=A;s>=0;s-=1){var i=e.get(s)||new Set;i.forEach(function(n){var t=n.parent,b=n.node;if(v(b)||!n.parent||o.has(n.parent.key))return;if(v(n.parent.node)){o.add(t.key);return}var y=!0,g=!1;(t.children||[]).filter(function(E){return!v(E.node)}).forEach(function(E){var _=E.key,u=f.has(_);y&&!u&&(y=!1),!g&&(u||l.has(_))&&(g=!0)}),y||f.delete(t.key),g&&l.add(t.key),o.add(t.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(k(l,f))}}function S(H,N,e,A){var v=[],f;A?f=A:f=O;var l=new Set(H.filter(function(s){var i=!!e[s];return i||v.push(s),i})),a=new Map,r=0;Object.keys(e).forEach(function(s){var i=e[s],n=i.level,t=a.get(n);t||(t=new Set,a.set(n,t)),t.add(i),r=Math.max(r,n)}),Object(te.a)(!v.length,"Tree missing follow keys: ".concat(v.slice(0,100).map(function(s){return"'".concat(s,"'")}).join(", ")));var o;return N===!0?o=U(l,a,r,f):o=m(l,N.halfCheckedKeys,a,r,f),o}},OZM5:function(Be,oe,P){"use strict";P.d(oe,"b",function(){return A}),P.d(oe,"a",function(){return v}),P.d(oe,"k",function(){return f}),P.d(oe,"h",function(){return l}),P.d(oe,"i",function(){return a}),P.d(oe,"g",function(){return r}),P.d(oe,"c",function(){return o}),P.d(oe,"d",function(){return s}),P.d(oe,"j",function(){return t}),P.d(oe,"e",function(){return b}),P.d(oe,"f",function(){return y});var te=P("KQm4"),k=P("U8pU"),O=P("Ff2n"),U=P("q1tI"),m=P.n(U),S=P("Kwbf"),H=P("WaYH"),N=.25,e=2;function A(g,E){var _=g.slice(),u=_.indexOf(E);return u>=0&&_.splice(u,1),_}function v(g,E){var _=g.slice();return _.indexOf(E)===-1&&_.push(E),_}function f(g){return g.split("-")}function l(g,E){return"".concat(g,"-").concat(E)}function a(g){return g&&g.type&&g.type.isTreeNode}function r(g,E){var _=[g],u=E[g];function c(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];p.forEach(function(d){var x=d.key,h=d.children;_.push(x),c(h)})}return c(u.children),_}function o(g,E){var _=g.clientY,u=E.selectHandle.getBoundingClientRect(),c=u.top,p=u.bottom,d=u.height,x=Math.max(d*N,e);return _<=c+x?-1:_>=p-x?1:0}function s(g,E){if(!g)return;var _=E.multiple;return _?g.slice():g.length?[g[0]]:g}var i=function(E){return E};function n(g,E){if(!g)return[];var _=E||{},u=_.processProps,c=u===void 0?i:u,p=Array.isArray(g)?g:[g];return p.map(function(d){var x=d.children,h=Object(O.a)(d,["children"]),T=n(x,E);return m.a.createElement(H.a,Object.assign({},c(h)),T)})}function t(g){if(!g)return null;var E;if(Array.isArray(g))E={checkedKeys:g,halfCheckedKeys:void 0};else if(Object(k.a)(g)==="object")E={checkedKeys:g.checked||void 0,halfCheckedKeys:g.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return E}function b(g,E){var _=new Set;function u(c){if(_.has(c))return;var p=E[c];if(!p)return;_.add(c);var d=p.parent,x=p.node;if(x.disabled)return;d&&u(d.key)}return(g||[]).forEach(function(c){u(c)}),Object(te.a)(_)}function y(g){var E={};return Object.keys(g).forEach(function(_){(_.startsWith("data-")||_.startsWith("aria-"))&&(E[_]=g[_])}),E}},Oe0F:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___1lU21",flex_space_between:"flex_space_between___3CfJd",flex_box_vertical_center:"flex_box_vertical_center___20q2h",flex_box_center_end:"flex_box_center_end___1jeZT",flex_box_column:"flex_box_column___2EyZF",list:"list___3Kz8E",wrap:"wrap___12_X7",lockWrap:"lockWrap___9zL4z",li:"li___2bcH1",cover:"cover___1j6mq",img:"img___3itdG",sign:"sign___1Bm21",name:"name___3H1zU",e:"e___1W7k4",tags:"tags___G1tID",rate:"rate___aZiJa"}},"SA+Z":function(Be,oe,P){var te=P("wTVA"),k=P("EbDI"),O=P("ZhPi"),U=P("wkBT");function m(S){return te(S)||k(S)||O(S)||U()}Be.exports=m,Be.exports.__esModule=!0,Be.exports.default=Be.exports},SJMd:function(Be,oe){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var P,te,k,O=!1,U,m;window.PR_SHOULD_USE_CONTINUATION=!0;var S,H;(function(){var N=window,e=["break,continue,do,else,for,if,return,while"],A=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],v=[A,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[v,"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"],l=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[v,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",o=[v,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",i=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],n=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],b=[f,a,l,o,s,i,n,t],y=/^(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",c="lit",p="pun",d="pln",x="tag",h="dec",T="src",M="atn",D="atv",w="nocode",C="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(le){for(var Ae=0,Ne=!1,ie=!1,de=0,we=le.length;de<we;++de){var De=le[de];if(De.ignoreCase)ie=!0;else if(/[a-z]/i.test(De.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,ie=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function Je(xe){var Oe=xe.charCodeAt(0);if(Oe!==92)return Oe;var Fe=xe.charAt(1);return Oe=Ke[Fe],Oe||("0"<=Fe&&Fe<="7"?parseInt(xe.substring(1),8):Fe==="u"||Fe==="x"?parseInt(xe.substring(2),16):xe.charCodeAt(1))}function Ze(xe){if(xe<32)return(xe<16?"\\x0":"\\x")+xe.toString(16);var Oe=String.fromCharCode(xe);return Oe==="\\"||Oe==="-"||Oe==="]"||Oe==="^"?"\\"+Oe:Oe}function Qe(xe){var Oe=xe.substring(1,xe.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Fe=[],We=Oe[0]==="^",q=["["];We&&q.push("^");for(var K=We?1:0,G=Oe.length;K<G;++K){var Q=Oe[K];if(/\\[bdsw]/i.test(Q))q.push(Q);else{var ee=Je(Q),V;K+2<G&&Oe[K+1]==="-"?(V=Je(Oe[K+2]),K+=2):V=ee,Fe.push([ee,V]),V<65||ee>122||(V<65||ee>90||Fe.push([Math.max(65,ee)|32,Math.min(V,90)|32]),V<97||ee>122||Fe.push([Math.max(97,ee)&~32,Math.min(V,122)&~32]))}}Fe.sort(function(ye,be){return ye[0]-be[0]||be[1]-ye[1]});for(var J=[],ne=[],K=0;K<Fe.length;++K){var ae=Fe[K];ae[0]<=ne[1]+1?ne[1]=Math.max(ne[1],ae[1]):J.push(ne=ae)}for(var K=0;K<J.length;++K){var ae=J[K];q.push(Ze(ae[0])),ae[1]>ae[0]&&(ae[1]+1>ae[0]&&q.push("-"),q.push(Ze(ae[1])))}return q.push("]"),q.join("")}function ut(xe){for(var Oe=xe.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")),Fe=Oe.length,We=[],q=0,K=0;q<Fe;++q){var G=Oe[q];if(G==="(")++K;else if(G.charAt(0)==="\\"){var Q=+G.substring(1);Q&&(Q<=K?We[Q]=-1:Oe[q]=Ze(Q))}}for(var q=1;q<We.length;++q)We[q]===-1&&(We[q]=++Ae);for(var q=0,K=0;q<Fe;++q){var G=Oe[q];if(G==="(")++K,We[K]||(Oe[q]="(?:");else if(G.charAt(0)==="\\"){var Q=+G.substring(1);Q&&Q<=K&&(Oe[q]="\\"+We[Q])}}for(var q=0;q<Fe;++q)Oe[q]==="^"&&Oe[q+1]!=="^"&&(Oe[q]="");if(xe.ignoreCase&&Ne)for(var q=0;q<Fe;++q){var G=Oe[q],ee=G.charAt(0);G.length>=2&&ee==="["?Oe[q]=Qe(G):ee!=="\\"&&(Oe[q]=G.replace(/[a-zA-Z]/g,function(ne){var ae=ne.charCodeAt(0);return"["+String.fromCharCode(ae&~32,ae|32)+"]"}))}return Oe.join("")}for(var tt=[],de=0,we=le.length;de<we;++de){var De=le[de];if(De.global||De.multiline)throw new Error(""+De);tt.push("(?:"+ut(De)+")")}return new RegExp(tt.join("|"),ie?"gi":"g")}function L(le,Ae){var Ne=/(?:^|\s)nocode(?:\s|$)/,ie=[],de=0,we=[],De=0;function Ke(Je){var Ze=Je.nodeType;if(Ze==1){if(Ne.test(Je.className))return;for(var Qe=Je.firstChild;Qe;Qe=Qe.nextSibling)Ke(Qe);var ut=Je.nodeName.toLowerCase();(ut==="br"||ut==="li")&&(ie[De]=`
|
|
`,we[De<<1]=de++,we[De++<<1|1]=Je)}else if(Ze==3||Ze==4){var tt=Je.nodeValue;tt.length&&(Ae?tt=tt.replace(/\r\n?/g,`
|
|
`):tt=tt.replace(/[ \t\r\n]+/g," "),ie[De]=tt,we[De<<1]=de,de+=tt.length,we[De++<<1|1]=Je)}}return Ke(le),{sourceCode:ie.join("").replace(/\n$/,""),spans:we}}function z(le,Ae,Ne,ie,de){if(!Ne)return;var we={sourceNode:le,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:Ae,decorations:null};ie(we),de.push.apply(de,we.decorations)}var $=/\S/;function he(le){for(var Ae=void 0,Ne=le.firstChild;Ne;Ne=Ne.nextSibling){var ie=Ne.nodeType;Ae=ie===1?Ae?le:Ne:ie===3&&$.test(Ne.nodeValue)?le:Ae}return Ae===le?void 0:Ae}function fe(le,Ae){var Ne={},ie;(function(){for(var De=le.concat(Ae),Ke=[],Je={},Ze=0,Qe=De.length;Ze<Qe;++Ze){var ut=De[Ze],tt=ut[3];if(tt)for(var xe=tt.length;--xe>=0;)Ne[tt.charAt(xe)]=ut;var Oe=ut[1],Fe=""+Oe;Je.hasOwnProperty(Fe)||(Ke.push(Oe),Je[Fe]=null)}Ke.push(/[\0-\uffff]/),ie=j(Ke)})();var de=Ae.length,we=function(De){for(var Ke=De.sourceCode,Je=De.basePos,Ze=De.sourceNode,Qe=[Je,d],ut=0,tt=Ke.match(ie)||[],xe={},Oe=0,Fe=tt.length;Oe<Fe;++Oe){var We=tt[Oe],q=xe[We],K=void 0,G;if(typeof q=="string")G=!1;else{var Q=Ne[We.charAt(0)];if(Q)K=We.match(Q[1]),q=Q[0];else{for(var ee=0;ee<de;++ee)if(Q=Ae[ee],K=We.match(Q[1]),K){q=Q[0];break}K||(q=d)}G=q.length>=5&&q.substring(0,5)==="lang-",G&&!(K&&typeof K[1]=="string")&&(G=!1,q=T),G||(xe[We]=q)}var V=ut;if(ut+=We.length,!G)Qe.push(Je+V,q);else{var J=K[1],ne=We.indexOf(J),ae=ne+J.length;K[2]&&(ae=We.length-K[2].length,ne=ae-J.length);var ye=q.substring(5);z(Ze,Je+V,We.substring(0,ne),we,Qe),z(Ze,Je+V+ne,J,B(ye,J),Qe),z(Ze,Je+V+ae,We.substring(ae),we,Qe)}}De.decorations=Qe};return we}function Ie(le){var Ae=[],Ne=[];le.tripleQuotedStrings?Ae.push([g,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):le.multiLineStrings?Ae.push([g,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ae.push([g,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),le.verbatimStrings&&Ne.push([g,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ie=le.hashComments;ie&&(le.cStyleComments?(ie>1?Ae.push([_,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ae.push([_,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([g,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ae.push([_,/^#[^\r\n]*/,null,"#"])),le.cStyleComments&&(Ne.push([_,/^\/\/[^\r\n]*/,null]),Ne.push([_,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var de=le.regexLiterals;if(de){var we=de>1?"":`
|
|
\r`,De=we?".":"[\\S\\s]",Ke="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+De+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+De+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+C+"("+Ke+")")])}var Je=le.types;Je&&Ne.push([u,Je]);var Ze=(""+le.keywords).replace(/^ | $/g,"");Ze.length&&Ne.push([E,new RegExp("^(?:"+Ze.replace(/[\s,]+/g,"|")+")\\b"),null]),Ae.push([d,/^\s+/,null,` \r
|
|
\xA0`]);var Qe="^.[^\\s\\w.$@'\"`/\\\\]*";return le.regexLiterals&&(Qe+="(?!s*/)"),Ne.push([c,/^@[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],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[d,/^\\[\s\S]?/,null],[p,new RegExp(Qe),null]),fe(Ae,Ne)}var Se=Ie({keywords:b,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function pe(le,Ae,Ne){for(var ie=/(?:^|\s)nocode(?:\s|$)/,de=/\r\n?|\n/,we=le.ownerDocument,De=we.createElement("li");le.firstChild;)De.appendChild(le.firstChild);var Ke=[De];function Je(Oe){var Fe=Oe.nodeType;if(Fe==1&&!ie.test(Oe.className))if(Oe.nodeName==="br")Ze(Oe),Oe.parentNode&&Oe.parentNode.removeChild(Oe);else for(var We=Oe.firstChild;We;We=We.nextSibling)Je(We);else if((Fe==3||Fe==4)&&Ne){var q=Oe.nodeValue,K=q.match(de);if(K){var G=q.substring(0,K.index);Oe.nodeValue=G;var Q=q.substring(K.index+K[0].length);if(Q){var ee=Oe.parentNode;ee.insertBefore(we.createTextNode(Q),Oe.nextSibling)}Ze(Oe),G||Oe.parentNode.removeChild(Oe)}}}function Ze(Oe){for(;!Oe.nextSibling;)if(Oe=Oe.parentNode,!Oe)return;function Fe(K,G){var Q=G?K.cloneNode(!1):K,ee=K.parentNode;if(ee){var V=Fe(ee,1),J=K.nextSibling;V.appendChild(Q);for(var ne=J;ne;ne=J)J=ne.nextSibling,V.appendChild(ne)}return Q}for(var We=Fe(Oe.nextSibling,0),q;(q=We.parentNode)&&q.nodeType===1;)We=q;Ke.push(We)}for(var Qe=0;Qe<Ke.length;++Qe)Je(Ke[Qe]);Ae===(Ae|0)&&Ke[0].setAttribute("value",Ae);var ut=we.createElement("ol");ut.className="linenums";for(var tt=Math.max(0,Ae-1|0)||0,Qe=0,xe=Ke.length;Qe<xe;++Qe)De=Ke[Qe],De.className="L"+(Qe+tt)%10,De.firstChild||De.appendChild(we.createTextNode("\xA0")),ut.appendChild(De);le.appendChild(ut)}function Ce(le){var Ae=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ae=Ae&&+Ae[1]<=8;var Ne=/\n/g,ie=le.sourceCode,de=ie.length,we=0,De=le.spans,Ke=De.length,Je=0,Ze=le.decorations,Qe=Ze.length,ut=0;Ze[Qe]=de;var tt,xe;for(xe=tt=0;xe<Qe;)Ze[xe]!==Ze[xe+2]?(Ze[tt++]=Ze[xe++],Ze[tt++]=Ze[xe++]):xe+=2;for(Qe=tt,xe=tt=0;xe<Qe;){for(var Oe=Ze[xe],Fe=Ze[xe+1],We=xe+2;We+2<=Qe&&Ze[We+1]===Fe;)We+=2;Ze[tt++]=Oe,Ze[tt++]=Fe,xe=We}Qe=Ze.length=tt;var q=le.sourceNode,K="";q&&(K=q.style.display,q.style.display="none");try{for(var G=null;Je<Ke;){var Q=De[Je],ee=De[Je+2]||de,V=Ze[ut+2]||de,We=Math.min(ee,V),J=De[Je+1],ne;if(J.nodeType!==1&&(ne=ie.substring(we,We))){Ae&&(ne=ne.replace(Ne,"\r")),J.nodeValue=ne;var ae=J.ownerDocument,ye=ae.createElement("span");ye.className=Ze[ut+1];var be=J.parentNode;be.replaceChild(ye,J),ye.appendChild(J),we<ee&&(De[Je+1]=J=ae.createTextNode(ie.substring(We,ee)),be.insertBefore(J,ye.nextSibling))}we=We,we>=ee&&(Je+=2),we>=V&&(ut+=2)}}finally{q&&(q.style.display=K)}}var Me={};function ge(le,Ae){for(var Ne=Ae.length;--Ne>=0;){var ie=Ae[Ne];Me.hasOwnProperty(ie)?N.console&&console.warn("cannot override language handler %s",ie):Me[ie]=le}}function B(le,Ae){return le&&Me.hasOwnProperty(le)||(le=/^\s*</.test(Ae)?"default-markup":"default-code"),Me[le]}ge(Se,["default-code"]),ge(fe([],[[d,/^[^<?]+/],[h,/^<!\w[^>]*(?:>|$)/],[_,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[p,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ge(fe([[d,/^[\s]+/,null,` \r
|
|
`],[D,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[x,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[M,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[p,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),ge(fe([],[[D,/^[\s\S]+/]]),["uq.val"]),ge(Ie({keywords:f,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),ge(Ie({keywords:"null,true,false"}),["json"]),ge(Ie({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),ge(Ie({keywords:l,cStyleComments:!0}),["java"]),ge(Ie({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ge(Ie({keywords:i,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ge(Ie({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ge(Ie({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ge(Ie({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ge(Ie({keywords:r,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ge(fe([],[[g,/^[\s\S]+/]]),["regex"]);function R(le){var Ae=le.langExtension;try{var Ne=L(le.sourceNode,le.pre),ie=Ne.sourceCode;le.sourceCode=ie,le.spans=Ne.spans,le.basePos=0,B(Ae,ie)(le),Ce(le)}catch(de){N.console&&console.log(de&&de.stack||de)}}function I(le,Ae,Ne){var ie=Ne||!1,de=Ae||null,we=document.createElement("div");we.innerHTML="<pre>"+le+"</pre>",we=we.firstChild,ie&&pe(we,ie,!0);var De={langExtension:de,numberLines:ie,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return R(De),we.innerHTML}function W(le,Ae){var Ne=Ae||document.body,ie=Ne.ownerDocument||document;function de(Q){return Ne.getElementsByTagName(Q)}for(var we=[de("pre"),de("code"),de("xmp")],De=[],Ke=0;Ke<we.length;++Ke)for(var Je=0,Ze=we[Ke].length;Je<Ze;++Je)De.push(we[Ke][Je]);we=null;var Qe=Date;Qe.now||(Qe={now:function(){return+new Date}});var ut=0,tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,xe=/\bprettyprint\b/,Oe=/\bprettyprinted\b/,Fe=/pre|xmp/i,We=/^code$/i,q=/^(?:pre|code|xmp)$/i,K={};function G(){for(var Q=N.PR_SHOULD_USE_CONTINUATION?Qe.now()+250:Infinity;ut<De.length&&Qe.now()<Q;ut++){for(var ee=De[ut],V=K,J=ee;J=J.previousSibling;){var ne=J.nodeType,ae=(ne===7||ne===8)&&J.nodeValue;if(ae?!/^\??prettify\b/.test(ae):ne!==3||/\S/.test(J.nodeValue))break;if(ae){V={},ae.replace(/\b(\w+)=([\w:.%+-]+)/g,function(zt,vt,It){V[vt]=It});break}}var ye=ee.className;if((V!==K||xe.test(ye))&&!Oe.test(ye)){for(var be=!1,Pe=ee.parentNode;Pe;Pe=Pe.parentNode){var ze=Pe.tagName;if(q.test(ze)&&Pe.className&&xe.test(Pe.className)){be=!0;break}}if(!be){ee.className+=" prettyprinted";var qe=V.lang;if(!qe){qe=ye.match(tt);var Xe;!qe&&(Xe=he(ee))&&We.test(Xe.tagName)&&(qe=Xe.className.match(tt)),qe&&(qe=qe[1])}var At;if(Fe.test(ee.tagName))At=1;else{var pt=ee.currentStyle,ot=ie.defaultView,Mt=pt?pt.whiteSpace:ot&&ot.getComputedStyle?ot.getComputedStyle(ee,null).getPropertyValue("white-space"):0;At=Mt&&Mt.substring(0,3)==="pre"}var Rt=V.linenums;(Rt=Rt==="true"||+Rt)||(Rt=ye.match(/\blinenums\b(?::(\d+))?/),Rt=Rt?Rt[1]&&Rt[1].length?+Rt[1]:!0:!1),Rt&&pe(ee,Rt,At);var wt={langExtension:qe,sourceNode:ee,numberLines:Rt,pre:At,sourceCode:null,basePos:null,spans:null,decorations:null};R(wt)}}}ut<De.length?N.setTimeout(G,250):typeof le=="function"&&le()}G()}var Y=N.PR={createSimpleLexer:fe,registerLangHandler:ge,sourceDecorator:Ie,PR_ATTRIB_NAME:M,PR_ATTRIB_VALUE:D,PR_COMMENT:_,PR_DECLARATION:h,PR_KEYWORD:E,PR_LITERAL:c,PR_NOCODE:w,PR_PLAIN:d,PR_PUNCTUATION:p,PR_SOURCE:T,PR_STRING:g,PR_TAG:x,PR_TYPE:u,prettyPrintOne:O?N.prettyPrintOne=I:S=I,prettyPrint:H=O?N.prettyPrint=W:H=W},F=N.define;typeof F=="function"&&F.amd&&F("google-code-prettify",[],function(){return Y})})()},STEk:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return ge});/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var te=function(B,R){return(te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,W){I.__proto__=W}||function(I,W){for(var Y in W)Object.prototype.hasOwnProperty.call(W,Y)&&(I[Y]=W[Y])})(B,R)};function k(B,R){function I(){this.constructor=B}te(B,R),B.prototype=R===null?Object.create(R):(I.prototype=R.prototype,new I)}function O(B,R,I,W){return new(I||(I=Promise))(function(Y,F){function le(ie){try{Ne(W.next(ie))}catch(de){F(de)}}function Ae(ie){try{Ne(W.throw(ie))}catch(de){F(de)}}function Ne(ie){var de;ie.done?Y(ie.value):(de=ie.value,de instanceof I?de:new I(function(we){we(de)})).then(le,Ae)}Ne((W=W.apply(B,R||[])).next())})}function U(B,R){var I,W,Y,F,le={label:0,sent:function(){if(1&Y[0])throw Y[1];return Y[1]},trys:[],ops:[]};return F={next:Ae(0),throw:Ae(1),return:Ae(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function Ae(Ne){return function(ie){return function(de){if(I)throw new TypeError("Generator is already executing.");for(;le;)try{if(I=1,W&&(Y=2&de[0]?W.return:de[0]?W.throw||((Y=W.return)&&Y.call(W),0):W.next)&&!(Y=Y.call(W,de[1])).done)return Y;switch(W=0,Y&&(de=[2&de[0],Y.value]),de[0]){case 0:case 1:Y=de;break;case 4:return le.label++,{value:de[1],done:!1};case 5:le.label++,W=de[1],de=[0];continue;case 7:de=le.ops.pop(),le.trys.pop();continue;default:if(!(Y=le.trys,(Y=Y.length>0&&Y[Y.length-1])||de[0]!==6&&de[0]!==2)){le=0;continue}if(de[0]===3&&(!Y||de[1]>Y[0]&&de[1]<Y[3])){le.label=de[1];break}if(de[0]===6&&le.label<Y[1]){le.label=Y[1],Y=de;break}if(Y&&le.label<Y[2]){le.label=Y[2],le.ops.push(de);break}Y[2]&&le.ops.pop(),le.trys.pop();continue}de=R.call(B,le)}catch(we){de=[6,we],W=0}finally{I=Y=0}if(5&de[0])throw de[1];return{value:de[0]?de[1]:void 0,done:!0}}([Ne,ie])}}}function m(){for(var B=0,R=0,I=arguments.length;R<I;R++)B+=arguments[R].length;var W=Array(B),Y=0;for(R=0;R<I;R++)for(var F=arguments[R],le=0,Ae=F.length;le<Ae;le++,Y++)W[Y]=F[le];return W}var S=function(){function B(){}return B.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},B.setAttributes=function(R,I){for(var W=0,Y=I;W<Y.length;W++){var F=Y[W],le=F[0],Ae=F[1];R.setAttribute(le,Ae)}},B.createRect=function(R,I,W){var Y=document.createElementNS("http://www.w3.org/2000/svg","rect");return Y.setAttribute("width",R.toString()),Y.setAttribute("height",I.toString()),W&&B.setAttributes(Y,W),Y},B.createLine=function(R,I,W,Y,F){var le=document.createElementNS("http://www.w3.org/2000/svg","line");return le.setAttribute("x1",R.toString()),le.setAttribute("y1",I.toString()),le.setAttribute("x2",W.toString()),le.setAttribute("y2",Y.toString()),F&&B.setAttributes(le,F),le},B.createPolygon=function(R,I){var W=document.createElementNS("http://www.w3.org/2000/svg","polygon");return W.setAttribute("points",R),I&&B.setAttributes(W,I),W},B.createCircle=function(R,I){var W=document.createElementNS("http://www.w3.org/2000/svg","circle");return W.setAttribute("cx",(R/2).toString()),W.setAttribute("cy",(R/2).toString()),W.setAttribute("r",R.toString()),I&&B.setAttributes(W,I),W},B.createEllipse=function(R,I,W){var Y=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Y.setAttribute("cx",(R/2).toString()),Y.setAttribute("cy",(I/2).toString()),Y.setAttribute("rx",(R/2).toString()),Y.setAttribute("ry",(I/2).toString()),W&&B.setAttributes(Y,W),Y},B.createGroup=function(R){var I=document.createElementNS("http://www.w3.org/2000/svg","g");return R&&B.setAttributes(I,R),I},B.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},B.createMarker=function(R,I,W,Y,F,le,Ae){var Ne=document.createElementNS("http://www.w3.org/2000/svg","marker");return B.setAttributes(Ne,[["id",R],["orient",I],["markerWidth",W.toString()],["markerHeight",Y.toString()],["refX",F.toString()],["refY",le.toString()]]),Ne.appendChild(Ae),Ne},B.createText=function(R){var I=document.createElementNS("http://www.w3.org/2000/svg","text");return I.setAttribute("x","0"),I.setAttribute("y","0"),R&&B.setAttributes(I,R),I},B.createTSpan=function(R,I){var W=document.createElementNS("http://www.w3.org/2000/svg","tspan");return W.textContent=R,I&&B.setAttributes(W,I),W},B.createImage=function(R){var I=document.createElementNS("http://www.w3.org/2000/svg","image");return R&&B.setAttributes(I,R),I},B.createPoint=function(R,I){var W=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return W.x=R,W.y=I,W},B.createPath=function(R,I){var W=document.createElementNS("http://www.w3.org/2000/svg","path");return W.setAttribute("d",R),I&&B.setAttributes(W,I),W},B}(),H=function(){function B(){}return B.addKey=function(R){B.key=R},Object.defineProperty(B,"isLicensed",{get:function(){return!!B.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(B.key)},enumerable:!1,configurable:!0}),B}(),N=function(){function B(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return B.prototype.rasterize=function(R,I,W){var Y=this;return new Promise(function(F){var le=W!==void 0?W:document.createElement("canvas");R===null&&(Y.markersOnly=!0,Y.naturalSize=!1);var Ae=document.createElementNS("http://www.w3.org/2000/svg","svg");Ae.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ae.setAttribute("width",I.width.baseVal.valueAsString),Ae.setAttribute("height",I.height.baseVal.valueAsString),Ae.setAttribute("viewBox","0 0 "+I.viewBox.baseVal.width.toString()+" "+I.viewBox.baseVal.height.toString()),Ae.innerHTML=I.innerHTML,Y.naturalSize===!0?(Ae.width.baseVal.value=R.naturalWidth,Ae.height.baseVal.value=R.naturalHeight):Y.width!==void 0&&Y.height!==void 0&&(Ae.width.baseVal.value=Y.width,Ae.height.baseVal.value=Y.height),le.width=Ae.width.baseVal.value,le.height=Ae.height.baseVal.value;var Ne=Ae.outerHTML,ie=le.getContext("2d");Y.markersOnly!==!0&&ie.drawImage(R,0,0,le.width,le.height);var de=window.URL,we=new Image(le.width,le.height);we.setAttribute("crossOrigin","anonymous");var De=new Blob([Ne],{type:"image/svg+xml"}),Ke=de.createObjectURL(De);we.onload=function(){ie.drawImage(we,0,0),de.revokeObjectURL(Ke);var Je=le.toDataURL(Y.imageType,Y.imageQuality);F(Je)},we.src=Ke})},B}(),e=function(){},A=function(){function B(R){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+R+"_"}return Object.defineProperty(B.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),B.prototype.addClass=function(R){return this.styleSheet===void 0&&this.addStyleSheet(),R.name=""+this.classNamePrefix+R.localName,this.classes.push(R),this.styleSheet.sheet.insertRule("."+R.name+" {"+R.style+"}",this.styleSheet.sheet.cssRules.length),R},B.prototype.addRule=function(R){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(R),this.styleSheet.sheet.insertRule(R.selector+" {"+R.style+"}",this.styleSheet.sheet.cssRules.length)},B.prototype.addStyleSheet=function(){var R;this.styleSheet=document.createElement("style"),((R=this.styleSheetRoot)!==null&&R!==void 0?R:document.head).appendChild(this.styleSheet),this.addRule(new v("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new v("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new v("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new f("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new f("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},B.prototype.removeStyleSheet=function(){var R;this.styleSheet&&(((R=this.styleSheetRoot)!==null&&R!==void 0?R:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},B}(),v=function(B,R){this.selector=B,this.style=R},f=function(B,R){this.localName=B,this.style=R},l=function(){function B(R,I,W,Y,F){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=R,this.displayMode=I,this.markerItems=W,this.uiStyleSettings=Y,this.styles=F,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return B.prototype.show=function(R){var I=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=R,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var W=document.createElement("div");W.className=this.toolbarBlockStyleClass.name,W.style.whiteSpace="nowrap",this.uiContainer.appendChild(W),this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(W,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(F){var le=document.createElement("div");le.className=""+I.toolbarButtonStyleClass.name,le.setAttribute("data-type-name",F.typeName),le.innerHTML=F.icon,le.addEventListener("click",function(){I.markerToolbarButtonClicked(le,F)}),I.buttons.push(le),I.markerButtons.push(le)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Y=document.createElement("div");Y.className=this.toolbarBlockStyleClass.name,Y.style.whiteSpace="nowrap",Y.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Y),this.addActionButton(Y,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Y,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},B.prototype.addButtonClickListener=function(R){this.buttonClickListeners.push(R)},B.prototype.removeButtonClickListener=function(R){this.buttonClickListeners.indexOf(R)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(R),1)},B.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},B.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var R=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var I=0;I<this.markerButtons.length;I++)I<R||I===R&&this.markerButtons.length-1===R?this.markerButtonBlock.appendChild(this.markerButtons[I]):(I===R&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[I]))}},B.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},B.prototype.resetButtonStyles=function(){var R=this;this.buttons.forEach(function(I){I.className=I.className.replace(R.uiStyleSettings.toolbarButtonStyleColorsClassName?R.uiStyleSettings.toolbarButtonStyleColorsClassName:R.toolbarButtonStyleColorsClass.name,"").trim(),I.className=I.className.replace(R.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?R.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:R.toolbarActiveButtonStyleColorsClass.name,"").trim(),I.className+=" "+(R.uiStyleSettings.toolbarButtonStyleColorsClassName?R.uiStyleSettings.toolbarButtonStyleColorsClassName:R.toolbarButtonStyleColorsClass.name)})},B.prototype.addActionButton=function(R,I,W){var Y=this,F=document.createElement("div");switch(F.className=""+this.toolbarButtonStyleClass.name,F.innerHTML=I,F.setAttribute("data-action",W),F.addEventListener("click",function(){Y.actionToolbarButtonClicked(F,W)}),W){case"select":F.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":F.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":F.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":F.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":F.style.fill=this.uiStyleSettings.closeButtonColor}R.appendChild(F),this.buttons.push(F)},B.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new f("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new f("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new f("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new f("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new f("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var R=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new f("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*R)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*R)+`px;
|
|
padding: `+R+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new f("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new v("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new v("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},B.prototype.markerToolbarButtonClicked=function(R,I){this.setActiveButton(R),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(W){return W("marker",I)}),this.markerButtonOverflowBlock.style.display="none"},B.prototype.actionToolbarButtonClicked=function(R,I){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(W){return W("action",I)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},B.prototype.setActiveButton=function(R){this.resetButtonStyles(),R.className=R.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),R.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},B.prototype.setActiveMarkerButton=function(R){var I=this.markerButtons.find(function(W){return W.getAttribute("data-type-name")===R});I&&this.setActiveButton(I)},B.prototype.setCurrentMarker=function(R){var I=this;this.currentMarker=R,this.buttons.filter(function(W){return/delete|notes/.test(W.getAttribute("data-action"))}).forEach(function(W){I.currentMarker===void 0?(W.style.fillOpacity="0.4",W.style.pointerEvents="none"):(W.style.fillOpacity="1",W.style.pointerEvents="all")})},B}(),a=function(){function B(R,I,W,Y){this.panels=[],this.panelButtons=[],this.markerjsContainer=R,this.displayMode=I,this.uiStyleSettings=W,this.styles=Y,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return B.prototype.addStyles=function(){var R;this.toolboxStyleClass=this.styles.addClass(new f("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 f("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var I=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new f("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new f("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new f("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 f("toolbox-panel-row_colors",`
|
|
background-color: `+((R=this.uiStyleSettings.toolboxBackgroundColor)!==null&&R!==void 0?R:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new f("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*I)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*I)+`px;
|
|
padding: `+I+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new f("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new v("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new v("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},B.prototype.show=function(R){var I;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=R,this.uiContainer.className=this.toolboxStyleClass.name+" "+((I=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&I!==void 0?I:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},B.prototype.setPanelButtons=function(R){var I,W,Y=this;this.panels=R,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((I=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&I!==void 0?I:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((W=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&W!==void 0?W:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(F){var le;F.uiStyleSettings=Y.uiStyleSettings;var Ae=document.createElement("div");Ae.className=Y.toolboxButtonStyleClass.name+" "+((le=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&le!==void 0?le:Y.toolboxButtonStyleColorsClass.name),Ae.innerHTML=F.icon,Ae.title=F.title,Ae.addEventListener("click",function(){Y.panelButtonClick(F)}),Y.panelButtons.push(Ae),Y.buttonRow.appendChild(Ae)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},B.prototype.panelButtonClick=function(R){var I=this,W=-1;if(R!==this.activePanel){W=this.panels.indexOf(R),this.panelRow.innerHTML="";var Y=R.getUi();Y.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Y),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=R}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){I.displayMode==="inline"?I.panelRow.style.display="none":I.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(F,le){var Ae,Ne;F.className=I.toolboxButtonStyleClass.name+" "+(le===W?""+((Ae=I.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ae!==void 0?Ae:I.toolboxActiveButtonStyleColorsClass.name):""+((Ne=I.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ne!==void 0?Ne:I.toolboxButtonStyleColorsClass.name))})},B}(),r=function(B,R){this.title=B,this.icon=R},o=function(B){function R(I,W,Y,F){var le=B.call(this,I,F||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return le.colors=[],le.addTransparent=!1,le.colorBoxes=[],le.colors=W,le.currentColor=Y,le.setCurrentColor=le.setCurrentColor.bind(le),le.getColorBox=le.getColorBox.bind(le),le}return k(R,B),R.prototype.getUi=function(){var I=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.whiteSpace="nowrap",this.colors.forEach(function(Y){var F=I.getColorBox(Y);W.appendChild(F),I.colorBoxes.push(F)}),W},R.prototype.getColorBox=function(I){var W=this,Y=this.uiStyleSettings.toolbarHeight/4,F=this.uiStyleSettings.toolbarHeight-Y,le=document.createElement("div");le.style.display="inline-block",le.style.boxSizing="content-box",le.style.width=F-2+"px",le.style.height=F-2+"px",le.style.padding="1px",le.style.marginRight="2px",le.style.marginBottom="2px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderRadius=(F+2)/2+"px",le.style.borderColor=I===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){W.setCurrentColor(I,le)});var Ae=document.createElement("div");return Ae.style.display="inline-block",Ae.style.width=F-2+"px",Ae.style.height=F-2+"px",Ae.style.backgroundColor=I,Ae.style.borderRadius=F/2+"px",I==="transparent"&&(Ae.style.fill=this.uiStyleSettings.toolboxAccentColor,Ae.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),le.appendChild(Ae),le},R.prototype.setCurrentColor=function(I,W){var Y=this;this.currentColor=I,this.colorBoxes.forEach(function(F){F.style.borderColor=F===W?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(I)},R}(r),s=function(){function B(R,I,W){this._state="new",this._isSelected=!1,this._container=R,this._overlayContainer=I,this.globalSettings=W,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(B.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),B.prototype.ownsTarget=function(R){return!1},Object.defineProperty(B.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),B.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},B.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},B.prototype.pointerDown=function(R,I){},B.prototype.dblClick=function(R,I){},B.prototype.manipulate=function(R){},B.prototype.pointerUp=function(R){this.stateChanged()},B.prototype.dispose=function(){},B.prototype.addMarkerVisualToContainer=function(R){this.container.childNodes.length>0?this.container.insertBefore(R,this.container.childNodes[0]):this.container.appendChild(R)},B.prototype.getState=function(){return{typeName:B.typeName,state:this.state,notes:this.notes}},B.prototype.restoreState=function(R){this._state=R.state,this.notes=R.notes},B.prototype.scale=function(R,I){},B.prototype.colorChanged=function(R){this.onColorChanged&&this.onColorChanged(R),this.stateChanged()},B.prototype.fillColorChanged=function(R){this.onFillColorChanged&&this.onFillColorChanged(R),this.stateChanged()},B.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var R=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),R.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(R)&&this.onStateChanged(this)}},B.typeName="MarkerBase",B}(),i=function(){function B(){this.findGripByVisual=this.findGripByVisual.bind(this)}return B.prototype.findGripByVisual=function(R){return this.topLeft.ownsTarget(R)?this.topLeft:this.topCenter.ownsTarget(R)?this.topCenter:this.topRight.ownsTarget(R)?this.topRight:this.centerLeft.ownsTarget(R)?this.centerLeft:this.centerRight.ownsTarget(R)?this.centerRight:this.bottomLeft.ownsTarget(R)?this.bottomLeft:this.bottomCenter.ownsTarget(R)?this.bottomCenter:this.bottomRight.ownsTarget(R)?this.bottomRight:void 0},B}(),n=function(){function B(){this.GRIP_SIZE=10,this.visual=S.createGroup(),this.visual.appendChild(S.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(S.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return B.prototype.ownsTarget=function(R){return R===this.visual||R===this.visual.childNodes[0]||R===this.visual.childNodes[1]},B}(),t=function(){function B(){}return B.toITransformMatrix=function(R){return{a:R.a,b:R.b,c:R.c,d:R.d,e:R.e,f:R.f}},B.toSVGMatrix=function(R,I){return R.a=I.a,R.b=I.b,R.c=I.c,R.d=I.d,R.e=I.e,R.f=I.f,R},B}(),b=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.left=0,F.top=0,F.width=0,F.height=0,F.defaultSize={x:50,y:20},F.offsetX=0,F.offsetY=0,F.rotationAngle=0,F.CB_DISTANCE=10,F._suppressMarkerCreateEvent=!1,F.container.transform.baseVal.appendItem(S.createTransform()),F.setupControlBox(),F}return k(R,B),Object.defineProperty(R.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"visual",{get:function(){return this._visual},set:function(I){this._visual=I;var W=S.createTransform();this._visual.transform.baseVal.appendItem(W)},enumerable:!1,configurable:!0}),R.prototype.ownsTarget=function(I){return!!B.prototype.ownsTarget.call(this,I)||!!(this.controlGrips.findGripByVisual(I)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(I))},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.state==="new"&&(this.left=I.x,this.top=I.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Y=this.unrotatePoint(I);if(this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.offsetX=Y.x-this.left,this.offsetY=Y.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(W),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(W)){this.activeGrip=this.rotatorGrip;var F=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=F.x-this.width/2,this.top=F.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},R.prototype.pointerUp=function(I){var W=this.state;B.prototype.pointerUp.call(this,I),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(I),this._state="select",W==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},R.prototype.moveVisual=function(I){this.visual.style.transform="translate("+I.x+"px, "+I.y+"px)"},R.prototype.manipulate=function(I){var W=this.unrotatePoint(I);this.state==="creating"?this.resize(I):this.state==="move"?(this.left=this.manipulationStartLeft+(W.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(W.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(W):this.state==="rotate"&&this.rotate(I)},R.prototype.resize=function(I){var W=this.manipulationStartLeft,Y=this.manipulationStartWidth,F=this.manipulationStartTop,le=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:W=this.manipulationStartLeft+I.x-this.manipulationStartX,Y=this.manipulationStartWidth+this.manipulationStartLeft-W;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Y=this.manipulationStartWidth+I.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:F=this.manipulationStartTop+I.y-this.manipulationStartY,le=this.manipulationStartHeight+this.manipulationStartTop-F;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:le=this.manipulationStartHeight+I.y-this.manipulationStartY}Y>=0?(this.left=W,this.width=Y):(this.left=W+Y,this.width=-Y),le>=0?(this.top=F,this.height=le):(this.top=F+le,this.height=-le),this.setSize()},R.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},R.prototype.rotate=function(I){if(Math.abs(I.x-this.centerX)>.1){var W=Math.sign(I.x-this.centerX);this.rotationAngle=180*Math.atan((I.y-this.centerY)/(I.x-this.centerX))/Math.PI+90*W,this.applyRotation()}},R.prototype.applyRotation=function(){var I=this.container.transform.baseVal.getItem(0);I.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(I,0)},R.prototype.rotatePoint=function(I){if(this.rotationAngle===0)return I;var W=this.container.getCTM(),Y=S.createPoint(I.x,I.y);return{x:(Y=Y.matrixTransform(W)).x,y:Y.y}},R.prototype.unrotatePoint=function(I){if(this.rotationAngle===0)return I;var W=this.container.getCTM();W=W.inverse();var Y=S.createPoint(I.x,I.y);return{x:(Y=Y.matrixTransform(W)).x,y:Y.y}},R.prototype.select=function(){B.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},R.prototype.deselect=function(){B.prototype.deselect.call(this),this.controlBox.style.display="none"},R.prototype.setupControlBox=function(){this.controlBox=S.createGroup();var I=S.createTransform();I.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(I),this.container.appendChild(this.controlBox),this.controlRect=S.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=S.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new i,this.addControlGrips(),this.controlBox.style.display="none"},R.prototype.adjustControlBox=function(){var I=this.controlBox.transform.baseVal.getItem(0);I.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(I,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()},R.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()},R.prototype.createGrip=function(){var I=new n;return I.visual.transform.baseVal.appendItem(S.createTransform()),this.controlBox.appendChild(I.visual),I},R.prototype.positionGrips=function(){var I=this.controlGrips.topLeft.GRIP_SIZE,W=-I/2,Y=W,F=(this.width+this.CB_DISTANCE)/2-I/2,le=(this.height+this.CB_DISTANCE)/2-I/2,Ae=this.height+this.CB_DISTANCE-I/2,Ne=this.width+this.CB_DISTANCE-I/2;this.positionGrip(this.controlGrips.topLeft.visual,W,Y),this.positionGrip(this.controlGrips.topCenter.visual,F,Y),this.positionGrip(this.controlGrips.topRight.visual,Ne,Y),this.positionGrip(this.controlGrips.centerLeft.visual,W,le),this.positionGrip(this.controlGrips.centerRight.visual,Ne,le),this.positionGrip(this.controlGrips.bottomLeft.visual,W,Ae),this.positionGrip(this.controlGrips.bottomCenter.visual,F,Ae),this.positionGrip(this.controlGrips.bottomRight.visual,Ne,Ae),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,F,Y-3*this.CB_DISTANCE)},R.prototype.positionGrip=function(I,W,Y){var F=I.transform.baseVal.getItem(0);F.setTranslate(W,Y),I.transform.baseVal.replaceItem(F,0)},R.prototype.hideControlBox=function(){this.controlBox.style.display="none"},R.prototype.showControlBox=function(){this.controlBox.style.display=""},R.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},B.prototype.getState.call(this))},R.prototype.restoreState=function(I){B.prototype.restoreState.call(this,I);var W=I;this.left=W.left,this.top=W.top,this.width=W.width,this.height=W.height,this.rotationAngle=W.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,W.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,W.containerTransformMatrix))},R.prototype.scale=function(I,W){B.prototype.scale.call(this,I,W);var Y=this.rotatePoint({x:this.left,y:this.top}),F=this.unrotatePoint({x:Y.x*I,y:Y.y*W});this.left=F.x,this.top=F.y,this.width=this.width*I,this.height=this.height*W,this.adjustControlBox()},R}(s),y=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.createVisual=F.createVisual.bind(F),F}return k(R,B),R.prototype.ownsTarget=function(I){return!(!B.prototype.ownsTarget.call(this,I)&&I!==this.visual)},R.prototype.createVisual=function(){this.visual=S.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)},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},R.prototype.manipulate=function(I){B.prototype.manipulate.call(this,I)},R.prototype.resize=function(I){B.prototype.resize.call(this,I),this.setSize()},R.prototype.setSize=function(){B.prototype.setSize.call(this),S.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},R.prototype.pointerUp=function(I){B.prototype.pointerUp.call(this,I),this.setSize()},R.prototype.setStrokeColor=function(I){this.strokeColor=I,this.visual&&S.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(I),this.stateChanged()},R.prototype.setFillColor=function(I){this.fillColor=I,this.visual&&S.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},R.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.visual&&S.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},R.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.visual&&S.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},R.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},B.prototype.getState.call(this))},R.prototype.restoreState=function(I){var W=I;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),B.prototype.restoreState.call(this,I),this.setSize()},R.prototype.scale=function(I,W){B.prototype.scale.call(this,I,W),this.setSize()},R.title="Rectangle marker",R}(b),g=function(B){function R(I,W,Y,F){var le=B.call(this,I,F||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return le.widths=[],le.widthBoxes=[],le.widths=W,le.currentWidth=Y,le.setCurrentWidth=le.setCurrentWidth.bind(le),le}return k(R,B),R.prototype.getUi=function(){var I=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.widths.forEach(function(Y){var F=document.createElement("div");F.style.display="flex",F.style.flexGrow="2",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=Y===I.currentWidth?I.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){I.setCurrentWidth(Y,F)}),W.appendChild(F);var le=document.createElement("div");le.innerText=Y.toString(),le.style.marginRight="5px",F.appendChild(le);var Ae=document.createElement("div");Ae.style.minHeight="20px",Ae.style.flexGrow="2",Ae.style.display="flex",Ae.style.alignItems="center";var Ne=document.createElement("hr");Ne.style.minWidth="20px",Ne.style.border="0px",Ne.style.borderTop=Y+"px solid "+I.uiStyleSettings.toolboxColor,Ne.style.flexGrow="2",Ae.appendChild(Ne),F.appendChild(Ae),I.widthBoxes.push(F)}),W},R.prototype.setCurrentWidth=function(I,W){var Y=this;this.currentWidth=I,this.widthBoxes.forEach(function(F){F.style.borderColor=F===W?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},R}(r),E=function(B){function R(I,W,Y,F){var le=B.call(this,I,F||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return le.styles=[],le.styleBoxes=[],le.styles=W,le.currentStyle=Y,le.setCurrentStyle=le.setCurrentStyle.bind(le),le}return k(R,B),R.prototype.getUi=function(){var I=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",this.styles.forEach(function(Y){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/I.styles.length-5+"%",F.style.borderColor=Y===I.currentStyle?I.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){I.setCurrentStyle(Y,F)}),W.appendChild(F);var le=document.createElement("div");le.style.minHeight="20px",le.style.flexGrow="2",le.style.overflow="hidden";var Ae=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+I.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Y!==""?'stroke-dasharray="'+Y+'"':"")+` />
|
|
</svg>`;le.innerHTML=Ae,F.appendChild(le),I.styleBoxes.push(F)}),W},R.prototype.setCurrentStyle=function(I,W){var Y=this;this.currentStyle=I,this.styleBoxes.forEach(function(F){F.style.borderColor=F===W?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},R}(r),_=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.strokeColor=Y.defaultColor,F.strokeWidth=Y.defaultStrokeWidth,F.strokeDasharray=Y.defaultStrokeDasharray,F.strokePanel=new o("Line color",Y.defaultColorSet,Y.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new g("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new E("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return k(R,B),Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=B.prototype.getState.call(this);return I.typeName=R.typeName,I},R.typeName="FrameMarker",R.title="Frame marker",R.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',R}(y),u=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},c=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.x1=0,F.y1=0,F.x2=0,F.y2=0,F.defaultLength=50,F.manipulationStartX=0,F.manipulationStartY=0,F.manipulationStartX1=0,F.manipulationStartY1=0,F.manipulationStartX2=0,F.manipulationStartY2=0,F.setupControlBox(),F}return k(R,B),R.prototype.ownsTarget=function(I){return!!B.prototype.ownsTarget.call(this,I)||!(!this.grip1.ownsTarget(I)&&!this.grip2.ownsTarget(I))},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.manipulationStartX=I.x,this.manipulationStartY=I.y,this.state==="new"&&(this.x1=I.x,this.y1=I.y,this.x2=I.x,this.y2=I.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(W)?this.activeGrip=this.grip1:this.grip2.ownsTarget(W)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},R.prototype.pointerUp=function(I){var W=this.state;B.prototype.pointerUp.call(this,I),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(I),this._state="select",W==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},R.prototype.adjustVisual=function(){},R.prototype.manipulate=function(I){this.state==="creating"?this.resize(I):this.state==="move"?(this.x1=this.manipulationStartX1+I.x-this.manipulationStartX,this.y1=this.manipulationStartY1+I.y-this.manipulationStartY,this.x2=this.manipulationStartX2+I.x-this.manipulationStartX,this.y2=this.manipulationStartY2+I.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(I)},R.prototype.resize=function(I){switch(this.activeGrip){case this.grip1:this.x1=I.x,this.y1=I.y;break;case this.grip2:case void 0:this.x2=I.x,this.y2=I.y}this.adjustVisual(),this.adjustControlBox()},R.prototype.select=function(){B.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},R.prototype.deselect=function(){B.prototype.deselect.call(this),this.controlBox.style.display="none"},R.prototype.setupControlBox=function(){this.controlBox=S.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},R.prototype.adjustControlBox=function(){this.positionGrips()},R.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},R.prototype.createGrip=function(){var I=new n;return I.visual.transform.baseVal.appendItem(S.createTransform()),this.controlBox.appendChild(I.visual),I},R.prototype.positionGrips=function(){var I=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-I/2,this.y1-I/2),this.positionGrip(this.grip2.visual,this.x2-I/2,this.y2-I/2)},R.prototype.positionGrip=function(I,W,Y){var F=I.transform.baseVal.getItem(0);F.setTranslate(W,Y),I.transform.baseVal.replaceItem(F,0)},R.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},B.prototype.getState.call(this))},R.prototype.restoreState=function(I){B.prototype.restoreState.call(this,I);var W=I;this.x1=W.x1,this.y1=W.y1,this.x2=W.x2,this.y2=W.y2},R.prototype.scale=function(I,W){B.prototype.scale.call(this,I,W),this.x1=this.x1*I,this.y1=this.y1*W,this.x2=this.x2*I,this.y2=this.y2*W,this.adjustVisual(),this.adjustControlBox()},R}(s),p=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.strokeColor=Y.defaultColor,F.strokeWidth=Y.defaultStrokeWidth,F.strokeDasharray=Y.defaultStrokeDasharray,F.strokePanel=new o("Line color",Y.defaultColorSet,Y.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new g("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new E("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return k(R,B),R.prototype.ownsTarget=function(I){return!(!B.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorLine&&I!==this.visibleLine)},R.prototype.createVisual=function(){this.visual=S.createGroup(),this.selectorLine=S.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=S.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)},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},R.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()),S.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),S.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),S.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},R.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},R.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},R.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},B.prototype.getState.call(this));return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){B.prototype.restoreState.call(this,I);var W=I;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.createVisual(),this.adjustVisual()},R.typeName="LineMarker",R.title="Line marker",R.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',R}(c),d=function(B){function R(I,W,Y,F){var le=B.call(this,I,F||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return le.fonts=[],le.fontBoxes=[],le.fonts=W,le.currentFont=Y,le.setCurrentFont=le.setCurrentFont.bind(le),le}return k(R,B),R.prototype.getUi=function(){var I=this,W=document.createElement("div");return W.style.overflow="hidden",W.style.flexGrow="2",this.fonts.forEach(function(Y){var F=document.createElement("div");F.style.display="inline-block",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/I.fonts.length-5+"%",F.style.borderColor=Y===I.currentFont?I.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){I.setCurrentFont(Y,F)}),W.appendChild(F);var le=document.createElement("div");le.style.display="flex",le.style.minHeight="20px",le.style.flexGrow="2",le.style.fontFamily=Y,le.style.overflow="hidden";var Ae=document.createElement("div");Ae.style.whiteSpace="nowrap",Ae.style.overflow="hidden",Ae.style.textOverflow="ellipsis",Ae.innerHTML="The quick brown fox jumps over the lazy dog",le.appendChild(Ae),F.appendChild(le),I.fontBoxes.push(F)}),W},R.prototype.setCurrentFont=function(I,W){var Y=this;this.currentFont=I,this.fontBoxes.forEach(function(F){F.style.borderColor=F===W?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},R}(r),x=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.color="transparent",F.padding=5,F.DEFAULT_TEXT="your text here",F.text=F.DEFAULT_TEXT,F.isMoved=!1,F.color=Y.defaultColor,F.fontFamily=Y.defaultFontFamily,F.defaultSize={x:100,y:30},F.setColor=F.setColor.bind(F),F.setFont=F.setFont.bind(F),F.renderText=F.renderText.bind(F),F.sizeText=F.sizeText.bind(F),F.textEditDivClicked=F.textEditDivClicked.bind(F),F.showTextEditor=F.showTextEditor.bind(F),F.setSize=F.setSize.bind(F),F.positionTextEditor=F.positionTextEditor.bind(F),F.colorPanel=new o("Color",Y.defaultColorSet,Y.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.fontFamilyPanel=new d("Font",Y.defaultFontFamilies,Y.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F}return k(R,B),R.prototype.ownsTarget=function(I){if(B.prototype.ownsTarget.call(this,I)||I===this.visual||I===this.textElement||I===this.bgRectangle)return!0;var W=!1;return this.textElement.childNodes.forEach(function(Y){Y===I&&(W=!0)}),W},R.prototype.createVisual=function(){this.visual=S.createGroup(),this.bgRectangle=S.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=S.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(S.createTransform()),this.textElement.transform.baseVal.appendItem(S.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.isMoved=!1,this.pointerDownPoint=I,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},R.prototype.renderText=function(){var I=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(W){I.textElement.appendChild(S.createTSpan(W.trim()===""?" ":W.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},R.prototype.getTextScale=function(){var I=this.textElement.getBBox(),W=1;if(I.width>0&&I.height>0){var Y=(1*this.width-this.width*this.padding*2/100)/I.width,F=(1*this.height-this.height*this.padding*2/100)/I.height;W=Math.min(Y,F)}return W},R.prototype.getTextPosition=function(I){var W=this.textElement.getBBox(),Y=0,F=0;return W.width>0&&W.height>0&&(Y=(this.width-W.width*I)/2,F=this.height/2-W.height*I/2),{x:Y,y:F}},R.prototype.sizeText=function(){var I=this.textElement.getBBox(),W=this.getTextScale(),Y=this.getTextPosition(W);Y.y-=I.y*W,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Y.x+"px, "+Y.y+"px) scale("+W+", "+W+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Y.x,Y.y),this.textElement.transform.baseVal.getItem(1).setScale(W,W))},R.prototype.manipulate=function(I){B.prototype.manipulate.call(this,I),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(I.x-this.pointerDownPoint.x)>5||Math.abs(I.y-this.pointerDownPoint.y)>5)},R.prototype.resize=function(I){B.prototype.resize.call(this,I),this.isMoved=!0,this.setSize(),this.sizeText()},R.prototype.setSize=function(){B.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(S.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),S.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},R.prototype.pointerUp=function(I){var W=this.state;W==="creating"&&(this._suppressMarkerCreateEvent=!0),B.prototype.pointerUp.call(this,I),this.setSize(),(W==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},R.prototype.showTextEditor=function(){var I=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(W){W.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var W=Number.parseFloat(I.textEditor.style.fontSize);I.textEditor.clientWidth>=Number.parseInt(I.textEditor.style.maxWidth)&&W>.9;)W-=.1,I.textEditor.style.fontSize=Math.max(W,.9)+"em"}),this.textEditor.addEventListener("keyup",function(W){W.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(W){if(W.clipboardData){var Y=W.clipboardData.getData("text"),F=window.getSelection();if(!F.rangeCount)return!1;F.deleteFromDocument(),F.getRangeAt(0).insertNode(document.createTextNode(Y)),W.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){I.textEditDivClicked(I.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},R.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var I=this.getTextScale(),W=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Y=this.textElement.getBBox(),F={x:Y.width*I,y:Y.height*I};W.x-=F.x/2,W.y-=F.y/2,this.textEditor.style.top=W.y+"px",this.textEditor.style.left=W.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-W.x+"px",this.textEditor.style.fontSize=Math.max(16*I,12)+"px",this.textElement.style.display="none"}},R.prototype.textEditDivClicked=function(I){this.text=I.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},R.prototype.select=function(){B.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},R.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),B.prototype.deselect.call(this)},R.prototype.dblClick=function(I,W){B.prototype.dblClick.call(this,I,W),this.showTextEditor()},R.prototype.setColor=function(I){this.textElement&&S.setAttributes(this.textElement,[["fill",I]]),this.color=I,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(I)},R.prototype.setFont=function(I){this.textElement&&S.setAttributes(this.textElement,[["font-family",I]]),this.fontFamily=I,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},R.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},R.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},B.prototype.getState.call(this));return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){var W=I;this.color=W.color,this.fontFamily=W.fontFamily,this.padding=W.padding,this.text=W.text,this.createVisual(),B.prototype.restoreState.call(this,I),this.setSize()},R.prototype.scale=function(I,W){B.prototype.scale.call(this,I,W),this.setSize(),this.sizeText(),this.positionTextEditor()},R.typeName="TextMarker",R.title="Text marker",R.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',R}(b),h=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.color="transparent",F.lineWidth=3,F.drawing=!1,F.pixelRatio=1,F.color=Y.defaultColor,F.lineWidth=Y.defaultStrokeWidth,F.pixelRatio=Y.freehandPixelRatio,F.setColor=F.setColor.bind(F),F.addCanvas=F.addCanvas.bind(F),F.finishCreation=F.finishCreation.bind(F),F.setLineWidth=F.setLineWidth.bind(F),F.colorPanel=new o("Color",Y.defaultColorSet,Y.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.lineWidthPanel=new g("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),F.lineWidthPanel.onWidthChanged=F.setLineWidth,F}return k(R,B),R.prototype.ownsTarget=function(I){return!(!B.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.drawingImage)},R.prototype.createVisual=function(){this.visual=S.createGroup(),this.drawingImage=S.createImage(),this.visual.appendChild(this.drawingImage);var I=S.createTransform();this.visual.transform.baseVal.appendItem(I),this.addMarkerVisualToContainer(this.visual)},R.prototype.pointerDown=function(I,W){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(I.x,I.y),this.drawing=!0):B.prototype.pointerDown.call(this,I,W)},R.prototype.manipulate=function(I){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(I.x,I.y),this.canvasContext.stroke()):B.prototype.manipulate.call(this,I)},R.prototype.resize=function(I){B.prototype.resize.call(this,I),S.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),S.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},R.prototype.pointerUp=function(I){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):B.prototype.pointerUp.call(this,I)},R.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)},R.prototype.select=function(){this.state==="creating"&&this.finishCreation(),B.prototype.select.call(this)},R.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),B.prototype.deselect.call(this)},R.prototype.finishCreation=function(){for(var I=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),W=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Y=W[0],F=W[1],le=W[2],Ae=W[3],Ne=!1,ie=0;ie<this.canvasElement.height;ie++)for(var de=0;de<this.canvasElement.width;de++)I.data[ie*this.canvasElement.width*4+4*de+3]>0&&(Ne=!0,ie<F&&(F=ie),de<Y&&(Y=de),ie>Ae&&(Ae=ie),de>le&&(le=de));if(Ne){this.left=Y/this.pixelRatio,this.top=F/this.pixelRatio,this.width=(le-Y)/this.pixelRatio,this.height=(Ae-F)/this.pixelRatio;var we=document.createElement("canvas");we.width=le-Y,we.height=Ae-F,we.getContext("2d").putImageData(this.canvasContext.getImageData(Y,F,le-Y,Ae-F),0,0),this.drawingImgUrl=we.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},R.prototype.setDrawingImage=function(){S.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),S.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},R.prototype.setColor=function(I){this.color=I,this.colorChanged(I)},R.prototype.setLineWidth=function(I){this.lineWidth=I},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=Object.assign({drawingImgUrl:this.drawingImgUrl},B.prototype.getState.call(this));return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){this.createVisual(),B.prototype.restoreState.call(this,I),this.drawingImgUrl=I.drawingImgUrl,this.setDrawingImage()},R.prototype.scale=function(I,W){B.prototype.scale.call(this,I,W),this.setDrawingImage()},R.typeName="FreehandMarker",R.title="Freehand marker",R.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',R}(b),T=function(B){function R(I,W,Y){var F=B.call(this,I,Y||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return F.typeBoxes=[],F.currentType=W,F.setCurrentType=F.setCurrentType.bind(F),F}return k(R,B),R.prototype.getUi=function(){var I=this,W=document.createElement("div");W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2";for(var Y=function(Ae){var Ne="both";switch(Ae){case 0:Ne="both";break;case 1:Ne="start";break;case 2:Ne="end";break;case 3:Ne="none"}var ie=document.createElement("div");if(ie.style.display="flex",ie.style.flexGrow="2",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=Ne===F.currentType?F.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){I.setCurrentType(Ne,ie)}),W.appendChild(ie),Ne==="both"||Ne==="start"){var de=document.createElement("div");de.style.display="flex",de.style.alignItems="center",de.style.minHeight="20px",de.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(F.uiStyleSettings!==void 0?F.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,de.style.marginLeft="5px",ie.appendChild(de)}var we=document.createElement("div");we.style.display="flex",we.style.alignItems="center",we.style.minHeight="20px",we.style.flexGrow="2";var De=document.createElement("hr");if(De.style.minWidth="20px",De.style.border="0px",De.style.borderTop="3px solid "+(F.uiStyleSettings!==void 0?F.uiStyleSettings.toolboxColor:"#eeeeee"),De.style.flexGrow="2",we.appendChild(De),ie.appendChild(we),Ne==="both"||Ne==="end"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(F.uiStyleSettings!==void 0?F.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ke.style.marginRight="5px",ie.appendChild(Ke)}F.typeBoxes.push(ie)},F=this,le=0;le<4;le++)Y(le);return W},R.prototype.setCurrentType=function(I,W){var Y=this;this.currentType=I,this.typeBoxes.forEach(function(F){F.style.borderColor=F===W?Y.uiStyleSettings!==void 0?Y.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},R}(r),M=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.arrowType="end",F.arrowBaseHeight=10,F.arrowBaseWidth=10,F.getArrowPoints=F.getArrowPoints.bind(F),F.setArrowType=F.setArrowType.bind(F),F.arrowTypePanel=new T("Arrow type","end"),F.arrowTypePanel.onArrowTypeChanged=F.setArrowType,F}return k(R,B),R.prototype.ownsTarget=function(I){return!(!B.prototype.ownsTarget.call(this,I)&&I!==this.arrow1&&I!==this.arrow2)},R.prototype.getArrowPoints=function(I,W){var Y=this.arrowBaseWidth+2*this.strokeWidth,F=this.arrowBaseHeight+2*this.strokeWidth;return I-Y/2+","+(W+F/2)+" "+I+","+(W-F/2)+" "+(I+Y/2)+","+(W+F/2)},R.prototype.createTips=function(){this.arrow1=S.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(S.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=S.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(S.createTransform()),this.visual.appendChild(this.arrow2)},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.state==="creating"&&this.createTips()},R.prototype.adjustVisual=function(){if(B.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",S.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),S.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.arrow1.transform.baseVal.getItem(0);W.setRotate(I,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(W,0);var Y=this.arrow2.transform.baseVal.getItem(0);Y.setRotate(I+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Y,0)}},R.prototype.setArrowType=function(I){this.arrowType=I,this.adjustVisual(),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=Object.assign({arrowType:this.arrowType},B.prototype.getState.call(this));return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){B.prototype.restoreState.call(this,I);var W=I;this.arrowType=W.arrowType,this.createTips(),this.adjustVisual()},R.typeName="ArrowMarker",R.title="Arrow marker",R.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',R}(p),D=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.fillColor=Y.defaultFillColor,F.strokeWidth=0,F.fillPanel=new o("Color",Y.defaultColorSet,Y.defaultFillColor),F.fillPanel.onColorChanged=F.setFillColor,F}return k(R,B),Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=B.prototype.getState.call(this);return I.typeName=R.typeName,I},R.typeName="CoverMarker",R.title="Cover marker",R.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',R}(y),w=function(B){function R(I,W,Y,F){var le=B.call(this,I,F||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return le.opacities=[],le.opacityBoxes=[],le.opacities=W,le.currentOpacity=Y,le.setCurrentOpacity=le.setCurrentOpacity.bind(le),le}return k(R,B),R.prototype.getUi=function(){var I=this,W=document.createElement("div");return W.style.display="flex",W.style.overflow="hidden",W.style.flexGrow="2",W.style.justifyContent="space-between",this.opacities.forEach(function(Y){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="center",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=Y===I.currentOpacity?I.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){I.setCurrentOpacity(Y,F)}),W.appendChild(F);var le=document.createElement("div");le.innerText=100*Y+"%",F.appendChild(le),I.opacityBoxes.push(F)}),W},R.prototype.setCurrentOpacity=function(I,W){var Y=this;this.currentOpacity=I,this.opacityBoxes.forEach(function(F){F.style.borderColor=F===W?Y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},R}(r),C=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.setOpacity=F.setOpacity.bind(F),F.fillColor=Y.defaultHighlightColor,F.strokeWidth=0,F.opacity=Y.defaultHighlightOpacity,F.fillPanel=new o("Color",Y.defaultColorSet,F.fillColor),F.fillPanel.onColorChanged=F.setFillColor,F.opacityPanel=new w("Opacity",Y.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return k(R,B),R.prototype.setOpacity=function(I){this.opacity=I,this.visual&&S.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=B.prototype.getState.call(this);return I.typeName=R.typeName,I},R.typeName="HighlightMarker",R.title="Highlight marker",R.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',R}(D),j='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',L=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.bgColor="transparent",F.tipPosition={x:0,y:0},F.tipBase1Position={x:0,y:0},F.tipBase2Position={x:0,y:0},F.tipMoving=!1,F.color=Y.defaultStrokeColor,F.bgColor=Y.defaultFillColor,F.fontFamily=Y.defaultFontFamily,F.defaultSize={x:100,y:30},F.setBgColor=F.setBgColor.bind(F),F.getTipPoints=F.getTipPoints.bind(F),F.positionTip=F.positionTip.bind(F),F.setTipPoints=F.setTipPoints.bind(F),F.colorPanel=new o("Text color",Y.defaultColorSet,F.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),F.colorPanel.onColorChanged=F.setColor,F.bgColorPanel=new o("Fill color",Y.defaultColorSet,F.bgColor,j),F.bgColorPanel.onColorChanged=F.setBgColor,F.fontFamilyPanel=new d("Font",Y.defaultFontFamilies,Y.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F.tipGrip=new n,F.tipGrip.visual.transform.baseVal.appendItem(S.createTransform()),F.controlBox.appendChild(F.tipGrip.visual),F}return k(R,B),R.prototype.ownsTarget=function(I){return B.prototype.ownsTarget.call(this,I)||this.tipGrip.ownsTarget(I)||this.tip===I},R.prototype.createTip=function(){S.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=S.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},R.prototype.pointerDown=function(I,W){this.state==="new"&&B.prototype.pointerDown.call(this,I,W),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(W)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):B.prototype.pointerDown.call(this,I,W)},R.prototype.pointerUp=function(I){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,B.prototype.pointerUp.call(this,I);else{var W=this.state==="creating";B.prototype.pointerUp.call(this,I),this.setTipPoints(W),this.positionTip()}},R.prototype.manipulate=function(I){if(this.tipMoving){var W=this.unrotatePoint(I);this.tipPosition={x:W.x-this.manipulationStartLeft,y:W.y-this.manipulationStartTop},this.positionTip()}else B.prototype.manipulate.call(this,I)},R.prototype.setBgColor=function(I){this.bgRectangle&&this.tip&&(S.setAttributes(this.bgRectangle,[["fill",I]]),S.setAttributes(this.tip,[["fill",I]])),this.bgColor=I,this.fillColorChanged(I)},R.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},R.prototype.setTipPoints=function(I){I===void 0&&(I=!1);var W=Math.min(this.height/2,15),Y=this.height/5;I&&(this.tipPosition={x:W+Y/2,y:this.height+20});var F=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?F<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Y=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:W,y:0},this.tipBase2Position={x:W+Y,y:0}):(this.tipBase1Position={x:0,y:W},this.tipBase2Position={x:0,y:W+Y}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?F<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Y=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-W-Y,y:0},this.tipBase2Position={x:this.width-W,y:0}):(this.tipBase1Position={x:this.width,y:W},this.tipBase2Position={x:this.width,y:W+Y}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?F<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Y=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-W-Y,y:this.height},this.tipBase2Position={x:this.width-W,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-W-Y},this.tipBase2Position={x:this.width,y:this.height-W}):F<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Y=this.width/5,W=Math.min(this.width/2,15),this.tipBase1Position={x:W,y:this.height},this.tipBase2Position={x:W+Y,y:this.height}):(this.tipBase1Position={x:0,y:this.height-W},this.tipBase2Position={x:0,y:this.height-W-Y})},R.prototype.resize=function(I){B.prototype.resize.call(this,I),this.positionTip()},R.prototype.positionTip=function(){S.setAttributes(this.tip,[["points",this.getTipPoints()]]);var I=this.tipGrip.visual.transform.baseVal.getItem(0);I.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(I,0)},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),R.prototype.select=function(){this.positionTip(),B.prototype.select.call(this)},R.prototype.getState=function(){var I=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},B.prototype.getState.call(this));return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){var W=I;this.bgColor=W.bgColor,this.tipPosition=W.tipPosition,B.prototype.restoreState.call(this,I),this.createTip(),this.setTipPoints()},R.prototype.scale=function(I,W){B.prototype.scale.call(this,I,W),this.tipPosition={x:this.tipPosition.x*I,y:this.tipPosition.y*W},this.positionTip()},R.typeName="CalloutMarker",R.title="Callout marker",R.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',R}(x),z=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.strokeColor=Y.defaultColor,F.strokeWidth=Y.defaultStrokeWidth,F.strokeDasharray=Y.defaultStrokeDasharray,F.fillColor=Y.defaultFillColor,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.setOpacity=F.setOpacity.bind(F),F.createVisual=F.createVisual.bind(F),F.strokePanel=new o("Line color",m(Y.defaultColorSet,["transparent"]),Y.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.fillPanel=new o("Fill color",m(Y.defaultColorSet,["transparent"]),F.fillColor,j),F.fillPanel.onColorChanged=F.setFillColor,F.strokeWidthPanel=new g("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new E("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F.opacityPanel=new w("Opacity",Y.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return k(R,B),R.prototype.ownsTarget=function(I){return!(!B.prototype.ownsTarget.call(this,I)&&I!==this.visual)},R.prototype.createVisual=function(){this.visual=S.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)},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.state==="new"&&(this.createVisual(),this.moveVisual(I),this._state="creating")},R.prototype.manipulate=function(I){B.prototype.manipulate.call(this,I)},R.prototype.resize=function(I){B.prototype.resize.call(this,I),this.setSize()},R.prototype.setSize=function(){B.prototype.setSize.call(this),S.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},R.prototype.pointerUp=function(I){B.prototype.pointerUp.call(this,I),this.setSize()},R.prototype.setStrokeColor=function(I){this.strokeColor=I,this.visual&&S.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(I),this.stateChanged()},R.prototype.setFillColor=function(I){this.fillColor=I,this.visual&&S.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(I),this.stateChanged()},R.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.visual&&S.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},R.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.visual&&S.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},R.prototype.setOpacity=function(I){this.opacity=I,this.visual&&S.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},B.prototype.getState.call(this));return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){var W=I;this.fillColor=W.fillColor,this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.opacity=W.opacity,this.createVisual(),B.prototype.restoreState.call(this,I),this.setSize()},R.prototype.scale=function(I,W){B.prototype.scale.call(this,I,W),this.setSize()},R.typeName="EllipseMarker",R.title="Ellipse marker",R.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',R}(b),$=function(B){function R(I,W,Y){return B.call(this,I,W,Y)||this}return k(R,B),Object.defineProperty(R.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),R.prototype.ownsTarget=function(I){return!(!B.prototype.ownsTarget.call(this,I)&&I!==this.tip1&&I!==this.tip2)},R.prototype.createTips=function(){this.tip1=S.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(S.createTransform()),this.visual.appendChild(this.tip1),this.tip2=S.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(S.createTransform()),this.visual.appendChild(this.tip2)},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.state==="creating"&&this.createTips()},R.prototype.adjustVisual=function(){if(B.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(S.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()]]),S.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 I=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),W=this.tip1.transform.baseVal.getItem(0);W.setRotate(I,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(W,0);var Y=this.tip2.transform.baseVal.getItem(0);Y.setRotate(I+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Y,0)}},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=B.prototype.getState.call(this);return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){B.prototype.restoreState.call(this,I),this.createTips(),this.adjustVisual()},R.typeName="MeasurementMarker",R.title="Measurement marker",R.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',R}(p),he=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.strokePanel.colors=Y.defaultColorSet,F.fillColor="transparent",F}return k(R,B),Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=B.prototype.getState.call(this);return I.typeName=R.typeName,I},R.typeName="EllipseFrameMarker",R.title="Ellipse frame marker",R.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',R}(z),fe=function(){function B(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(B.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),B.prototype.addUndoStep=function(R){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(R)||(this.undoStack.push(R),JSON.stringify(this.lastRedoStep)!==JSON.stringify(R)&&this.redoStack.splice(0,this.redoStack.length))},B.prototype.replaceLastUndoStep=function(R){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=R)},B.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},B.prototype.undo=function(){if(this.undoStack.length>1){var R=this.undoStack.pop();return R!==void 0&&this.redoStack.push(R),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},B.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},B}(),Ie=function(B){function R(I,W,Y){var F=B.call(this,I,W,Y)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.curveX=0,F.curveY=0,F.manipulationStartCurveX=0,F.manipulationStartCurveY=0,F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.positionGrips=F.positionGrips.bind(F),F.addControlGrips=F.addControlGrips.bind(F),F.adjustVisual=F.adjustVisual.bind(F),F.setupControlBox=F.setupControlBox.bind(F),F.resize=F.resize.bind(F),F.strokeColor=Y.defaultColor,F.strokeWidth=Y.defaultStrokeWidth,F.strokeDasharray=Y.defaultStrokeDasharray,F.strokePanel=new o("Line color",Y.defaultColorSet,Y.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new g("Line width",Y.defaultStrokeWidths,Y.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new E("Line style",Y.defaultStrokeDasharrays,Y.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return k(R,B),R.prototype.ownsTarget=function(I){return!(!B.prototype.ownsTarget.call(this,I)&&I!==this.visual&&I!==this.selectorCurve&&I!==this.visibleCurve&&!this.curveGrip.ownsTarget(I))},R.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},R.prototype.createVisual=function(){this.visual=S.createGroup(),this.selectorCurve=S.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=S.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)},R.prototype.pointerDown=function(I,W){B.prototype.pointerDown.call(this,I,W),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=I.x,this.curveY=I.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(W)&&(this.activeGrip=this.curveGrip,this._state="resize")},R.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),S.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),S.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),S.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},R.prototype.setupControlBox=function(){B.prototype.setupControlBox.call(this),this.curveControlLine1=S.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=S.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)},R.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,B.prototype.addControlGrips.call(this)},R.prototype.positionGrips=function(){B.prototype.positionGrips.call(this);var I=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-I/2,this.curveY-I/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()))},R.prototype.manipulate=function(I){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+I.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+I.y-this.manipulationStartY),B.prototype.manipulate.call(this,I)},R.prototype.resize=function(I){this.activeGrip===this.curveGrip&&(this.curveX=I.x,this.curveY=I.y),B.prototype.resize.call(this,I),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},R.prototype.setStrokeColor=function(I){this.strokeColor=I,this.adjustVisual(),this.colorChanged(I)},R.prototype.setStrokeWidth=function(I){this.strokeWidth=I,this.adjustVisual()},R.prototype.setStrokeDasharray=function(I){this.strokeDasharray=I,this.adjustVisual()},R.prototype.scale=function(I,W){this.curveX=this.curveX*I,this.curveY=this.curveY*W,B.prototype.scale.call(this,I,W)},Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),R.prototype.getState=function(){var I=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},B.prototype.getState.call(this));return I.typeName=R.typeName,I},R.prototype.restoreState=function(I){B.prototype.restoreState.call(this,I);var W=I;this.strokeColor=W.strokeColor,this.strokeWidth=W.strokeWidth,this.strokeDasharray=W.strokeDasharray,this.curveX=W.curveX,this.curveY=W.curveY,this.createVisual(),this.adjustVisual()},R.typeName="CurveMarker",R.title="Curve marker",R.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',R}(c),Se=function(){function B(R,I){I===void 0&&(I=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=R,this.cancelable=I}return Object.defineProperty(B.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),B.prototype.preventDefault=function(){this._defaultPrevented=!0},B}(),pe=function(B){function R(I,W,Y){var F=B.call(this,I,!1)||this;return F.dataUrl=W,F.state=Y,F}return k(R,B),R}(Se),Ce=function(B){function R(I,W,Y){Y===void 0&&(Y=!1);var F=B.call(this,I,Y)||this;return F.marker=W,F}return k(R,B),R}(Se),Me=function(){function B(){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 B.prototype.addEventListener=function(R,I){this[R].push(I)},B.prototype.removeEventListener=function(R,I){var W=this[R].indexOf(I);W>-1&&this[R].splice(W,1)},B}(),ge=function(){function B(R){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new u,this._isOpen=!1,this.undoRedoManager=new fe,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 Me,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=B.instanceCounter++,this.styles=new A(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=R,this.targetRoot=document.body,this.width=R.clientWidth,this.height=R.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(B.prototype,"ALL_MARKER_TYPES",{get:function(){return[_,h,M,x,he,z,C,L,$,D,p,Ie]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[_,h,M,x,z,C,L]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"BASIC_MARKER_TYPES",{get:function(){return[_,h,M,x,C]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(R){var I=this;this._availableMarkerTypes.splice(0),R.forEach(function(W){if(typeof W=="string"){var Y=I.ALL_MARKER_TYPES.find(function(F){return F.typeName===W});Y!==void 0&&I._availableMarkerTypes.push(Y)}else I._availableMarkerTypes.push(W)})},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(R){this._zoomLevel=R,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(B.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),B.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),H.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},B.prototype.show=function(){var R=this;this.styles.styleSheetRoot===void 0&&e.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=e.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(I){return I(new Se(R))})},B.prototype.render=function(){return O(this,void 0,void 0,function(){var R;return U(this,function(I){switch(I.label){case 0:return this.setCurrentMarker(),(R=new N).naturalSize=this.renderAtNaturalSize,R.imageType=this.renderImageType,R.imageQuality=this.renderImageQuality,R.markersOnly=this.renderMarkersOnly,R.width=this.renderWidth,R.height=this.renderHeight,[4,R.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return I.sent(),[4,R.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,I.sent()]}})})},B.prototype.close=function(R){var I=this;if(R===void 0&&(R=!1),this.isOpen){var W=!1;R||this.eventListeners.beforeclose.forEach(function(Y){var F=new Se(I,!0);Y(F),F.defaultPrevented&&(W=!0)}),W||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Y){return Y(new Se(I))}),this.detachEvents(),this._isOpen=!1)}},B.prototype.addMarkersToToolbar=function(){for(var R,I=[],W=0;W<arguments.length;W++)I[W]=arguments[W];(R=this._availableMarkerTypes).push.apply(R,I)},B.prototype.addRenderEventListener=function(R){this.addEventListener("render",function(I){R(I.dataUrl,I.state)})},B.prototype.removeRenderEventListener=function(R){},B.prototype.addCloseEventListener=function(R){this.addEventListener("close",function(){R()})},B.prototype.removeCloseEventListener=function(R){},B.prototype.setupResizeObserver=function(){var R=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){R.resize(R.target.clientWidth,R.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return R.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},B.prototype.onPopupTargetResize=function(){var R=1*this.target.clientWidth/this.target.clientHeight,I=this.editorCanvas.clientWidth/R>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*R:this.editorCanvas.clientWidth,W=I<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/R;this.resize(I,W)},B.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},B.prototype.resize=function(R,I){this._isResizing=!0;var W=R/this.imageWidth,Y=I/this.imageHeight;this.imageWidth=Math.round(R),this.imageHeight=Math.round(I),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(W,Y),this._isResizing=!1},B.prototype.scaleMarkers=function(R,I){var W,Y=this;this._currentMarker&&this._currentMarker instanceof x?this._currentMarker.scale(R,I):(W=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(F){F!==Y._currentMarker&&F.scale(R,I)}),W!==void 0&&this.setCurrentMarker(W)},B.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},B.prototype.setTopLeft=function(){var R=this.editingTarget.getBoundingClientRect(),I=this.editorCanvas.getBoundingClientRect();this.left=R.left-I.left,this.top=R.top-I.top},B.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},B.prototype.addDefs=function(){for(var R,I=[],W=0;W<arguments.length;W++)I[W]=arguments[W];this.defs=S.createDefs(),this.addDefsToImage(),(R=this.defs).append.apply(R,I)},B.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},B.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},B.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},B.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},B.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},B.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},B.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},B.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var R=document.createElement("a");R.href="https://markerjs.com/",R.target="_blank",R.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',R.title="Powered by marker.js",R.style.display="grid",R.style.alignItems="center",R.style.justifyItems="center",R.style.padding="3px",R.style.width="20px",R.style.height="20px",this.logoUI.appendChild(R),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},B.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")},B.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"},B.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},B.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 R=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=R+"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 l(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new a(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},B.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},B.prototype.removeMarker=function(R){this.markerImage.removeChild(R.container),this.markers.indexOf(R)>-1&&this.markers.splice(this.markers.indexOf(R),1),R.dispose()},B.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())},B.prototype.toolbarButtonClicked=function(R,I){if(R==="marker"&&I!==void 0)this.createNewMarker(I);else if(R==="action")switch(I){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()}},B.prototype.deleteSelectedMarker=function(){var R=this;if(this._currentMarker!==void 0){var I=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Y){var F=new Ce(R,R._currentMarker,!0);Y(F),F.defaultPrevented&&(I=!0)}),!I){var W=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Y){return Y(new Ce(R,W))})}}},B.prototype.clear=function(){var R=this,I=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(le){var Ae=new Ce(R,void 0,!0);le(Ae),Ae.defaultPrevented&&(I=!0)}),!I)){this.setCurrentMarker();for(var W=function(le){var Ae=Y.markers[le];Y.setCurrentMarker(Y.markers[le]),Y._currentMarker.dispose(),Y.markerImage.removeChild(Y._currentMarker.container),Y.markers.splice(Y.markers.indexOf(Y._currentMarker),1),Y.eventListeners.markerdelete.forEach(function(Ne){return Ne(new Ce(R,Ae))})},Y=this,F=this.markers.length-1;F>=0;F--)W(F);this.addUndoStep()}},Object.defineProperty(B.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),B.prototype.showNotesEditor=function(){var R;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=(R=this._currentMarker.notes)!==null&&R!==void 0?R:"",this.overlayContainer.appendChild(this.notesArea))},B.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)},B.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},B.prototype.addUndoStep=function(){var R=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var I=this.getState(),W=this.undoRedoManager.getLastUndoStep();if(!W||W.width===I.width&&W.height===I.height){var Y=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(I),Y<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(F){return F(new Se(R))})}else this.undoRedoManager.replaceLastUndoStep(I),this.eventListeners.statechange.forEach(function(F){return F(new Se(R))})}},B.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},B.prototype.undoStep=function(){var R=this,I=this.undoRedoManager.undo();I!==void 0&&(this.restoreState(I),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(W){return W(new Se(R))}))},B.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},B.prototype.redoStep=function(){var R=this,I=this.undoRedoManager.redo();I!==void 0&&(this.restoreState(I),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(W){return W(new Se(R))}))},B.prototype.stepZoom=function(){var R=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=R<this.zoomSteps.length-1?this.zoomSteps[R+1]:this.zoomSteps[0]},B.prototype.panTo=function(R){this.contentDiv.scrollBy({left:this.prevPanPoint.x-R.x,top:this.prevPanPoint.y-R.y}),this.prevPanPoint=R},B.prototype.startRenderAndClose=function(){return O(this,void 0,void 0,function(){var R,I,W=this;return U(this,function(Y){switch(Y.label){case 0:return[4,this.render()];case 1:return R=Y.sent(),I=this.getState(),this.eventListeners.render.forEach(function(F){return F(new pe(W,R,I))}),this.close(!0),[2]}})})},B.prototype.getState=function(R){R===!0&&this.setCurrentMarker();var I={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(W){return I.markers.push(W.getState())}),I},B.prototype.restoreState=function(R){var I=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);R.markers.forEach(function(W){var Y=I._availableMarkerTypes.find(function(le){return le.typeName===W.typeName});if(Y!==void 0){var F=I.addNewMarker(Y);F.restoreState(W),I.markers.push(F)}}),R.width&&R.height&&(R.width!==this.imageWidth||R.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/R.width,this.imageHeight/R.height),this.eventListeners.restorestate.forEach(function(W){return W(new Se(I))})},B.prototype.addNewMarker=function(R){var I=S.createGroup();return this.markerImage.appendChild(I),new R(I,this.overlayContainer,this.settings)},B.prototype.createNewMarker=function(R){var I,W=this;(I=typeof R=="string"?this._availableMarkerTypes.find(function(Y){return Y.typeName===R}):R)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(I),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(I.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Y){return Y(new Ce(W,W._currentMarker))}))},B.prototype.markerCreated=function(R){var I=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(R),this.setCurrentMarker(R),R instanceof h&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(h):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(W){return W(new Ce(I,I._currentMarker))})},B.prototype.colorChanged=function(R){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=R,this.settings.defaultStrokeColor=R)},B.prototype.fillColorChanged=function(R){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=R)},B.prototype.markerStateChanged=function(R){var I=this;this.eventListeners.markerchange.forEach(function(W){return W(new Ce(I,R))})},B.prototype.setCurrentMarker=function(R){var I=this;this._currentMarker!==R&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(W){return W(new Ce(I,I._currentMarker))})),this._currentMarker=R,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(W){return W(new Ce(I,I._currentMarker))}))},B.prototype.onPointerDown=function(R){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||R.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var I=this.markers.find(function(W){return W.ownsTarget(R.target)});I!==void 0?(this.setCurrentMarker(I),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(R.clientX,R.clientY),R.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:R.clientX,y:R.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(R.clientX,R.clientY))},B.prototype.onDblClick=function(R){if(this._isFocused||this.focus(),this.mode==="select"){var I=this.markers.find(function(W){return W.ownsTarget(R.target)});I!==void 0&&I!==this._currentMarker&&this.setCurrentMarker(I),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(R.clientX,R.clientY),R.target):this.setCurrentMarker()}},B.prototype.onPointerMove=function(R){this.touchPoints!==1&&R.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||R.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(R.clientX,R.clientY)):this.zoomLevel>1&&this.panTo({x:R.clientX,y:R.clientY}))},B.prototype.onPointerUp=function(R){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(R.clientX,R.clientY)),this.isDragging=!1,this.addUndoStep()},B.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},B.prototype.onKeyUp=function(R){this._currentMarker===void 0||this.notesArea!==void 0||R.key!=="Delete"&&R.key!=="Backspace"||this.deleteSelectedMarker()},B.prototype.clientToLocalCoordinates=function(R,I){var W=this.markerImage.getBoundingClientRect();return{x:(R-W.left)/this.zoomLevel,y:(I-W.top)/this.zoomLevel}},B.prototype.onWindowResize=function(){this.positionUI()},B.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var R=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=R+"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()},B.prototype.addLicenseKey=function(R){H.addKey(R)},B.prototype.addEventListener=function(R,I){this.eventListeners.addEventListener(R,I)},B.prototype.removeEventListener=function(R,I){this.eventListeners.removeEventListener(R,I)},B.prototype.renderState=function(R){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(R),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(B.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),B.prototype.focus=function(){var R=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(I){return I(new Se(R))}))},B.prototype.blur=function(){var R=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(I){return I(new Se(R))}))},B.instanceCounter=0,B}()},T8No:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return H}),P.d(oe,"e",function(){return N}),P.d(oe,"c",function(){return p}),P.d(oe,"b",function(){return d}),P.d(oe,"d",function(){return x}),P.d(oe,"f",function(){return M});var te=P("MNsG"),k=P("N0LK"),O=P("Cg/j");let U=te.k||"";const m=new Map;m.set("false",!1),m.set("true",!0),m.set("isMac",te.f),m.set("isLinux",te.d),m.set("isWindows",te.i),m.set("isWeb",te.h),m.set("isMacNative",te.f&&!te.h),m.set("isEdge",U.indexOf("Edg/")>=0),m.set("isFirefox",U.indexOf("Firefox")>=0),m.set("isChrome",U.indexOf("Chrome")>=0),m.set("isSafari",U.indexOf("Safari")>=0);const S=Object.prototype.hasOwnProperty;class H{static has(w){return f.create(w)}static equals(w,C){return l.create(w,C)}static regex(w,C){return g.create(w,C)}static not(w){return s.create(w)}static and(...w){return u.create(w,null)}static or(...w){return c.create(w,null,!0)}static deserialize(w,C=!1){return w?this._deserializeOrExpression(w,C):void 0}static _deserializeOrExpression(w,C){let j=w.split("||");return c.create(j.map(L=>this._deserializeAndExpression(L,C)),null,!0)}static _deserializeAndExpression(w,C){let j=w.split("&&");return u.create(j.map(L=>this._deserializeOne(L,C)),null)}static _deserializeOne(w,C){if(w=w.trim(),w.indexOf("!=")>=0){let j=w.split("!=");return o.create(j[0].trim(),this._deserializeValue(j[1],C))}if(w.indexOf("==")>=0){let j=w.split("==");return l.create(j[0].trim(),this._deserializeValue(j[1],C))}if(w.indexOf("=~")>=0){let j=w.split("=~");return g.create(j[0].trim(),this._deserializeRegexValue(j[1],C))}if(w.indexOf(" in ")>=0){let j=w.split(" in ");return a.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(w)){const j=w.split(">=");return t.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(w)){const j=w.split(">");return n.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(w)){const j=w.split("<=");return y.create(j[0].trim(),j[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(w)){const j=w.split("<");return b.create(j[0].trim(),j[1].trim())}return/^\!\s*/.test(w)?s.create(w.substr(1).trim()):f.create(w)}static _deserializeValue(w,C){if(w=w.trim(),w==="true")return!0;if(w==="false")return!1;let j=/^'([^']*)'$/.exec(w);return j?j[1].trim():w}static _deserializeRegexValue(w,C){if(Object(k.C)(w)){if(C)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let j=w.indexOf("/"),L=w.lastIndexOf("/");if(j===L||j<0){if(C)throw new Error(`bad regexp-value '${w}', missing /-enclosure`);return console.warn(`bad regexp-value '${w}', missing /-enclosure`),null}let z=w.slice(j+1,L),$=w[L+1]==="i"?"i":"";try{return new RegExp(z,$)}catch(he){if(C)throw new Error(`bad regexp-value '${w}', parse error: ${he}`);return console.warn(`bad regexp-value '${w}', parse error: ${he}`),null}}}function N(w,C){const j=w?w.substituteConstants():void 0,L=C?C.substituteConstants():void 0;return!j&&!L?!0:!j||!L?!1:j.equals(L)}function e(w,C){return w.cmp(C)}class A{constructor(){this.type=0}cmp(w){return this.type-w.type}equals(w){return w.type===this.type}substituteConstants(){return this}evaluate(w){return!1}serialize(){return"false"}keys(){return[]}negate(){return v.INSTANCE}}A.INSTANCE=new A;class v{constructor(){this.type=1}cmp(w){return this.type-w.type}equals(w){return w.type===this.type}substituteConstants(){return this}evaluate(w){return!0}serialize(){return"true"}keys(){return[]}negate(){return A.INSTANCE}}v.INSTANCE=new v;class f{constructor(w,C){this.key=w,this.negated=C,this.type=2}static create(w,C=null){const j=m.get(w);return typeof j=="boolean"?j?v.INSTANCE:A.INSTANCE:new f(w,C)}cmp(w){return w.type!==this.type?this.type-w.type:h(this.key,w.key)}equals(w){return w.type===this.type?this.key===w.key:!1}substituteConstants(){const w=m.get(this.key);return typeof w=="boolean"?w?v.INSTANCE:A.INSTANCE:this}evaluate(w){return!!w.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this)),this.negated}}class l{constructor(w,C,j){this.key=w,this.value=C,this.negated=j,this.type=4}static create(w,C,j=null){if(typeof C=="boolean")return C?f.create(w,j):s.create(w,j);const L=m.get(w);if(typeof L=="boolean"){const z=L?"true":"false";return C===z?v.INSTANCE:A.INSTANCE}return new l(w,C,j)}cmp(w){return w.type!==this.type?this.type-w.type:T(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){const w=m.get(this.key);if(typeof w=="boolean"){const C=w?"true":"false";return this.value===C?v.INSTANCE:A.INSTANCE}return this}evaluate(w){return w.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class a{constructor(w,C){this.key=w,this.valueKey=C,this.type=10,this.negated=null}static create(w,C){return new a(w,C)}cmp(w){return w.type!==this.type?this.type-w.type:T(this.key,this.valueKey,w.key,w.valueKey)}equals(w){return w.type===this.type?this.key===w.key&&this.valueKey===w.valueKey:!1}substituteConstants(){return this}evaluate(w){const C=w.getValue(this.valueKey),j=w.getValue(this.key);return Array.isArray(C)?C.indexOf(j)>=0:typeof j=="string"&&typeof C=="object"&&C!==null?S.call(C,j):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=r.create(this)),this.negated}}class r{constructor(w){this._actual=w,this.type=11}static create(w){return new r(w)}cmp(w){return w.type!==this.type?this.type-w.type:this._actual.cmp(w._actual)}equals(w){return w.type===this.type?this._actual.equals(w._actual):!1}substituteConstants(){return this}evaluate(w){return!this._actual.evaluate(w)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class o{constructor(w,C,j){this.key=w,this.value=C,this.negated=j,this.type=5}static create(w,C,j=null){if(typeof C=="boolean")return C?s.create(w,j):f.create(w,j);const L=m.get(w);if(typeof L=="boolean"){const z=L?"true":"false";return C===z?A.INSTANCE:v.INSTANCE}return new o(w,C,j)}cmp(w){return w.type!==this.type?this.type-w.type:T(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){const w=m.get(this.key);if(typeof w=="boolean"){const C=w?"true":"false";return this.value===C?A.INSTANCE:v.INSTANCE}return this}evaluate(w){return w.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}class s{constructor(w,C){this.key=w,this.negated=C,this.type=3}static create(w,C=null){const j=m.get(w);return typeof j=="boolean"?j?A.INSTANCE:v.INSTANCE:new s(w,C)}cmp(w){return w.type!==this.type?this.type-w.type:h(this.key,w.key)}equals(w){return w.type===this.type?this.key===w.key:!1}substituteConstants(){const w=m.get(this.key);return typeof w=="boolean"?w?A.INSTANCE:v.INSTANCE:this}evaluate(w){return!w.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}function i(w,C){if(typeof w=="string"){const j=parseFloat(w);isNaN(j)||(w=j)}return typeof w=="string"||typeof w=="number"?C(w):A.INSTANCE}class n{constructor(w,C,j){this.key=w,this.value=C,this.negated=j,this.type=12}static create(w,C,j=null){return i(C,L=>new n(w,L,j))}cmp(w){return w.type!==this.type?this.type-w.type:T(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class t{constructor(w,C,j){this.key=w,this.value=C,this.negated=j,this.type=13}static create(w,C,j=null){return i(C,L=>new t(w,L,j))}cmp(w){return w.type!==this.type?this.type-w.type:T(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class b{constructor(w,C,j){this.key=w,this.value=C,this.negated=j,this.type=14}static create(w,C,j=null){return i(C,L=>new b(w,L,j))}cmp(w){return w.type!==this.type?this.type-w.type:T(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=t.create(this.key,this.value,this)),this.negated}}class y{constructor(w,C,j){this.key=w,this.value=C,this.negated=j,this.type=15}static create(w,C,j=null){return i(C,L=>new y(w,L,j))}cmp(w){return w.type!==this.type?this.type-w.type:T(this.key,this.value,w.key,w.value)}equals(w){return w.type===this.type?this.key===w.key&&this.value===w.value:!1}substituteConstants(){return this}evaluate(w){return typeof this.value=="string"?!1:parseFloat(w.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}class g{constructor(w,C){this.key=w,this.regexp=C,this.type=7,this.negated=null}static create(w,C){return new g(w,C)}cmp(w){if(w.type!==this.type)return this.type-w.type;if(this.key<w.key)return-1;if(this.key>w.key)return 1;const C=this.regexp?this.regexp.source:"",j=w.regexp?w.regexp.source:"";return C<j?-1:C>j?1:0}equals(w){if(w.type===this.type){const C=this.regexp?this.regexp.source:"",j=w.regexp?w.regexp.source:"";return this.key===w.key&&C===j}return!1}substituteConstants(){return this}evaluate(w){let C=w.getValue(this.key);return this.regexp?this.regexp.test(C):!1}serialize(){const w=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${w}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this)),this.negated}}class E{constructor(w){this._actual=w,this.type=8}static create(w){return new E(w)}cmp(w){return w.type!==this.type?this.type-w.type:this._actual.cmp(w._actual)}equals(w){return w.type===this.type?this._actual.equals(w._actual):!1}substituteConstants(){return this}evaluate(w){return!this._actual.evaluate(w)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function _(w){let C=null;for(let j=0,L=w.length;j<L;j++){const z=w[j].substituteConstants();if(w[j]!==z&&C===null){C=[];for(let $=0;$<j;$++)C[$]=w[$]}C!==null&&(C[j]=z)}return C===null?w:C}class u{constructor(w,C){this.expr=w,this.negated=C,this.type=6}static create(w,C){return u._normalizeArr(w,C)}cmp(w){if(w.type!==this.type)return this.type-w.type;if(this.expr.length<w.expr.length)return-1;if(this.expr.length>w.expr.length)return 1;for(let C=0,j=this.expr.length;C<j;C++){const L=e(this.expr[C],w.expr[C]);if(L!==0)return L}return 0}equals(w){if(w.type===this.type){if(this.expr.length!==w.expr.length)return!1;for(let C=0,j=this.expr.length;C<j;C++)if(!this.expr[C].equals(w.expr[C]))return!1;return!0}return!1}substituteConstants(){const w=_(this.expr);return w===this.expr?this:u.create(w,this.negated)}evaluate(w){for(let C=0,j=this.expr.length;C<j;C++)if(!this.expr[C].evaluate(w))return!1;return!0}static _normalizeArr(w,C){const j=[];let L=!1;for(const z of w){if(!z)continue;if(z.type===1){L=!0;continue}if(z.type===0)return A.INSTANCE;if(z.type===6){j.push(...z.expr);continue}j.push(z)}if(j.length===0&&L)return v.INSTANCE;if(j.length===0)return;if(j.length===1)return j[0];j.sort(e);for(let z=1;z<j.length;z++)j[z-1].equals(j[z])&&(j.splice(z,1),z--);if(j.length===1)return j[0];for(;j.length>1;){const z=j[j.length-1];if(z.type!==9)break;j.pop();const $=j.pop(),he=j.length===0,fe=c.create(z.expr.map(Ie=>u.create([Ie,$],null)),null,he);fe&&(j.push(fe),j.sort(e))}return j.length===1?j[0]:new u(j,C)}serialize(){return this.expr.map(w=>w.serialize()).join(" && ")}keys(){const w=[];for(let C of this.expr)w.push(...C.keys());return w}negate(){if(!this.negated){const w=[];for(let C of this.expr)w.push(C.negate());this.negated=c.create(w,this,!0)}return this.negated}}class c{constructor(w,C){this.expr=w,this.negated=C,this.type=9}static create(w,C,j){return c._normalizeArr(w,C,j)}cmp(w){if(w.type!==this.type)return this.type-w.type;if(this.expr.length<w.expr.length)return-1;if(this.expr.length>w.expr.length)return 1;for(let C=0,j=this.expr.length;C<j;C++){const L=e(this.expr[C],w.expr[C]);if(L!==0)return L}return 0}equals(w){if(w.type===this.type){if(this.expr.length!==w.expr.length)return!1;for(let C=0,j=this.expr.length;C<j;C++)if(!this.expr[C].equals(w.expr[C]))return!1;return!0}return!1}substituteConstants(){const w=_(this.expr);return w===this.expr?this:c.create(w,this.negated,!1)}evaluate(w){for(let C=0,j=this.expr.length;C<j;C++)if(this.expr[C].evaluate(w))return!0;return!1}static _normalizeArr(w,C,j){let L=[],z=!1;if(w){for(let $=0,he=w.length;$<he;$++){const fe=w[$];if(!fe)continue;if(fe.type===0){z=!0;continue}if(fe.type===1)return v.INSTANCE;if(fe.type===9){L=L.concat(fe.expr);continue}L.push(fe)}if(L.length===0&&z)return A.INSTANCE;L.sort(e)}if(L.length===0)return;if(L.length===1)return L[0];for(let $=1;$<L.length;$++)L[$-1].equals(L[$])&&(L.splice($,1),$--);if(L.length===1)return L[0];if(j){for(let $=0;$<L.length;$++)for(let he=$+1;he<L.length;he++)M(L[$],L[he])&&(L.splice(he,1),he--);if(L.length===1)return L[0]}return new c(L,C)}serialize(){return this.expr.map(w=>w.serialize()).join(" || ")}keys(){const w=[];for(let C of this.expr)w.push(...C.keys());return w}negate(){if(!this.negated){let w=[];for(let C of this.expr)w.push(C.negate());for(;w.length>1;){const C=w.shift(),j=w.shift(),L=[];for(const $ of D(C))for(const he of D(j))L.push(u.create([$,he],null));const z=w.length===0;w.unshift(c.create(L,null,z))}this.negated=w[0]}return this.negated}}class p extends f{constructor(w,C,j){super(w,null);this._defaultValue=C,typeof j=="object"?p._info.push(Object.assign(Object.assign({},j),{key:w})):j!==!0&&p._info.push({key:w,description:j,type:C!=null?typeof C:void 0})}static all(){return p._info.values()}bindTo(w){return w.createKey(this.key,this._defaultValue)}getValue(w){return w.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(w){return l.create(this.key,w)}}p._info=[];const d=Object(O.c)("contextKeyService"),x="setContext";function h(w,C){return w<C?-1:w>C?1:0}function T(w,C,j,L){return w<j?-1:w>j?1:C<L?-1:C>L?1:0}function M(w,C){if(C.type===6&&w.type!==9&&w.type!==6){for(const z of C.expr)if(w.equals(z))return!0}const j=w.negate(),L=D(j).concat(D(C));L.sort(e);for(let z=0;z<L.length;z++){const $=L[z],he=$.negate();for(let fe=z+1;fe<L.length;fe++){const Ie=L[fe];if(he.equals(Ie))return!0}}return!1}function D(w){return w.type===9?w.expr:[w]}},TXwP:function(Be,oe,P){var te,k;(function(){var O;(function(){"use strict";var m=[,,function(e){function A(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var l=new A(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},A.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},A.prototype.has_match=function(l){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(l))return!0;return!1},A.prototype.set_indent=function(l,a){this.is_empty()&&(this.__indent_count=l||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 l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__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(l){this.__items.push(l);var a=l.lastIndexOf(`
|
|
`);a!==-1?this.__character_count=l.length-a:this.__character_count+=l.length},A.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},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 l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function v(l,a){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),a=a||"",l.indent_level>0&&(a=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}v.prototype.get_indent_size=function(l,a){var r=this.__base_string_length;return a=a||0,l<0&&(r=0),r+=l*this.__indent_size,r+=a,r},v.prototype.get_indent_string=function(l,a){var r=this.__base_string;return a=a||0,l<0&&(l=0,r=""),a+=l*this.__indent_size,this.__ensure_cache(a),r+=this.__cache[a],r},v.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var l=this.__cache.length,a=0,r="";this.__indent_size&&l>=this.__indent_size&&(a=Math.floor(l/this.__indent_size),l-=a*this.__indent_size,r=new Array(a+1).join(this.__indent_string)),l&&(r+=new Array(l+1).join(" ")),this.__cache.push(r)};function f(l,a){this.__indent_cache=new v(l,a),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.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()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(l,a){return this.__indent_cache.get_indent_string(l,a)},f.prototype.get_indent_size=function(l,a){return this.__indent_cache.get_indent_size(l,a)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(l){this.trim(!0);var a=this.current_line.pop();a&&(a[a.length-1]===`
|
|
`&&(a=a.replace(/\n+$/g,"")),this.current_line.push(a)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
|
|
`);return l!==`
|
|
`&&(r=r.replace(/[\n]/g,l)),r},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(l,a){return l=l||0,a=a||0,this.next_line.set_indent(l,a),this.__lines.length>1?(this.current_line.set_indent(l,a),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(l){for(var a=0;a<l.newlines;a++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},f.prototype.remove_indent=function(l){for(var a=this.__lines.length;l<a;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(l,a){for(var r=this.__lines.length-2;r>=0;){var o=this.__lines[r];if(o.is_empty())break;if(o.item(0).indexOf(l)!==0&&o.item(-1)!==a){this.__lines.splice(r+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},e.exports.Output=f},,,,function(e){function A(l,a){this.raw_options=v(l,a),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}A.prototype._get_array=function(l,a){var r=this.raw_options[l],o=a||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(o=r.concat()):typeof r=="string"&&(o=r.split(/[^a-zA-Z0-9_\/\-]+/)),o},A.prototype._get_boolean=function(l,a){var r=this.raw_options[l],o=r===void 0?!!a:!!r;return o},A.prototype._get_characters=function(l,a){var r=this.raw_options[l],o=a||"";return typeof r=="string"&&(o=r.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},A.prototype._get_number=function(l,a){var r=this.raw_options[l];a=parseInt(a,10),isNaN(a)&&(a=0);var o=parseInt(r,10);return isNaN(o)&&(o=a),o},A.prototype._get_selection=function(l,a,r){var o=this._get_selection_list(l,a,r);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o[0]},A.prototype._get_selection_list=function(l,a,r){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[a[0]],!this._is_valid_selection(r,a))throw new Error("Invalid Default Value!");var o=this._get_array(l,r);if(!this._is_valid_selection(o,a))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+a+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o},A.prototype._is_valid_selection=function(l,a){return l.length&&a.length&&!l.some(function(r){return a.indexOf(r)===-1})};function v(l,a){var r={};l=f(l);var o;for(o in l)o!==a&&(r[o]=l[o]);if(a&&l[a])for(o in l[a])r[o]=l[a][o];return r}function f(l){var a={},r;for(r in l){var o=r.replace(/-/g,"_");a[o]=l[r]}return a}e.exports.Options=A,e.exports.normalizeOpts=f,e.exports.mergeOpts=v},,function(e){var A=RegExp.prototype.hasOwnProperty("sticky");function v(f){this.__input=f||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},v.prototype.peek=function(f){var l=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(l=this.__input.charAt(f)),l},v.prototype.__match=function(f,l){f.lastIndex=l;var a=f.exec(this.__input);return a&&!(A&&f.sticky)&&(a.index!==l&&(a=null)),a},v.prototype.test=function(f,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(f,l):!1},v.prototype.testChar=function(f,l){var a=this.peek(l);return f.lastIndex=0,a!==null&&f.test(a)},v.prototype.match=function(f){var l=this.__match(f,this.__position);return l?this.__position+=l[0].length:l=null,l},v.prototype.read=function(f,l,a){var r="",o;return f&&(o=this.match(f),o&&(r+=o[0])),l&&(o||!f)&&(r+=this.readUntil(l,a)),r},v.prototype.readUntil=function(f,l){var a="",r=this.__position;f.lastIndex=this.__position;var o=f.exec(this.__input);return o?(r=o.index,l&&(r+=o[0].length)):r=this.__input_length,a=this.__input.substring(this.__position,r),this.__position=r,a},v.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},v.prototype.get_regexp=function(f,l){var a=null,r="g";return l&&A&&(r="y"),typeof f=="string"&&f!==""?a=new RegExp(f,r):f&&(a=new RegExp(f.source,r)),a},v.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(f){var l=this.__position,a=this.readUntilAfter(f);return this.__position=l,a},v.prototype.lookBack=function(f){var l=this.__position-1;return l>=f.length&&this.__input.substring(l-f.length,l).toLowerCase()===f},e.exports.InputScanner=v},,,,,function(e){function A(v,f){v=typeof v=="string"?v:v.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+f,"g")}A.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(v);l;)f[l[1]]=l[2],l=this.__directive_pattern.exec(v);return f},A.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=A},,function(e,A,v){var f=v(16).Beautifier,l=v(17).Options;function a(r,o){var s=new f(r,o);return s.beautify()}e.exports=a,e.exports.defaultOptions=function(){return new l}},function(e,A,v){var f=v(17).Options,l=v(2).Output,a=v(8).InputScanner,r=v(13).Directives,o=new r(/\/\*/,/\*\//),s=/\r\n|[\r\n]/,i=/\r\n|[\r\n]/g,n=/\s/,t=/(?:\s|\n)+/g,b=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,y=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function g(E,_){this._source_text=E||"",this._options=new f(_),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}g.prototype.eatString=function(E){var _="";for(this._ch=this._input.next();this._ch;){if(_+=this._ch,this._ch==="\\")_+=this._input.next();else if(E.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return _},g.prototype.eatWhitespace=function(E){for(var _=n.test(this._input.peek()),u=0;n.test(this._input.peek());)this._ch=this._input.next(),E&&this._ch===`
|
|
`&&((u===0||u<this._options.max_preserve_newlines)&&(u++,this._output.add_new_line(!0)));return _},g.prototype.foundNestedPseudoClass=function(){for(var E=0,_=1,u=this._input.peek(_);u;){if(u==="{")return!0;if(u==="(")E+=1;else if(u===")"){if(E===0)return!1;E-=1}else if(u===";"||u==="}")return!1;_++,u=this._input.peek(_)}return!1},g.prototype.print_string=function(E){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(E)},g.prototype.preserveSingleSpace=function(E){E&&(this._output.space_before_token=!0)},g.prototype.indent=function(){this._indentLevel++},g.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E=this._source_text,_=this._options.eol;_==="auto"&&(_=`
|
|
`,E&&s.test(E||"")&&(_=E.match(s)[0])),E=E.replace(i,`
|
|
`);var u=E.match(/^[\t ]*/)[0];this._output=new l(this._options,u),this._input=new a(E),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var c=0,p=!1,d=!1,x=!1,h=!1,T=!1,M=!1,D=this._ch,w=!1,C,j,L;C=this._input.read(t),j=C!=="",L=D,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),D=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var z=this._input.read(b),$=o.get_directives(z);$&&$.ignore==="start"&&(z+=o.readIgnored(this._input)),this.print_string(z),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(y)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(j),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var he=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);he.match(/[ :]$/)&&(he=this.eatString(": ").replace(/\s$/,""),this.print_string(he),this._output.space_before_token=!0),he=he.replace(/\s$/,""),he==="extend"?h=!0:he==="import"&&(T=!0),he in this.NESTED_AT_RULE?(this._nestedLevel+=1,he in this.CONDITIONAL_GROUP_RULE&&(x=!0)):!p&&c===0&&he.indexOf(":")!==-1&&(d=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(j),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")d&&(d=!1,this.outdent()),x?(x=!1,p=this._indentLevel>=this._nestedLevel):p=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&p&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(L==="("?this._output.space_before_token=!1:L!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),L==="{"&&this._output.trim(!0),T=!1,h=!1,d&&(this.outdent(),d=!1),this.print_string(this._ch),p=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var fe=0;fe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;fe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[fe])){w=!0;break}(p||x)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!h&&c===0?(this.print_string(":"),d||(d=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Ie=L==='"'||L==="'";this.preserveSingleSpace(Ie||j),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")w=!1,c===0?(d&&(this.outdent(),d=!1),h=!1,T=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),c++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),c&&(c--,this.outdent()));else{var Se=!1;this._input.lookBack("with")&&(Se=!0),this.preserveSingleSpace(j||Se),this.print_string(this._ch),d&&L==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),M=!0):(this.eatWhitespace(),c++,this.indent())}else if(this._ch===")")c&&(c--,this.outdent()),M&&this._input.peek()===";"&&this._options.selector_separator_newline&&(M=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!d||M)&&c===0&&!T&&!h?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!d&&c===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&n.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(j),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),n.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var pe=L==='"'||L==="'";this.preserveSingleSpace(pe||j),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&w&&this._output.add_new_line()}var Ce=this._output.get_code(_);return Ce},e.exports.Beautifier=g},function(e,A,v){var f=v(6).Options;function l(a){f.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var r=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||r;var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var s=0;s<o.length;s++)o[s]!=="expand"?this.brace_style="collapse":this.brace_style=o[s]}l.prototype=new f,e.exports.Options=l}],S={};function H(e){var A=S[e];if(A!==void 0)return A.exports;var v=S[e]={exports:{}};return m[e](v,v.exports,H),v.exports}var N=H(15);O=N})();var U=O;!(te=[],k=function(){return{css_beautify:U}}.apply(oe,te),k!==void 0&&(Be.exports=k))})()},Vhoy:function(Be,oe,P){"use strict";P.d(oe,"d",function(){return U}),P.d(oe,"e",function(){return m}),P.d(oe,"c",function(){return S}),P.d(oe,"b",function(){return H}),P.d(oe,"a",function(){return N});var te=P("MI8n");class k{constructor(){this._icons=new Map,this._onDidRegister=new te.b}add(e){const A=this._icons.get(e.id);A?e.description?A.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const O=new k,U=O;function m(e,A){return new H(e,A)}function S(e){return e?e.replace(/\$\((.*?)\)/g,(A,v)=>` ${v} `).trim():""}class H{constructor(e,A,v){this.id=e,this.definition=A,this.description=v,O.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var N;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const A=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function v(a){if(a instanceof H)return["codicon","codicon-"+a.id];const r=A.exec(a.id);if(!r)return v(H.error);let[,o,s]=r;const i=["codicon","codicon-"+o];return s&&i.push("codicon-modifier-"+s.substr(1)),i}e.asClassNameArray=v;function f(a){return v(a).join(" ")}e.asClassName=f;function l(a){return"."+v(a).join(".")}e.asCSSSelector=l})(N||(N={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(H||(H={}))},WaYH:function(Be,oe,P){"use strict";var te=P("rePB"),k=P("Ff2n"),O=P("VTBJ"),U=P("1OyB"),m=P("vuIU"),S=P("JX7q"),H=P("Ji7U"),N=P("LK+K"),e=P("q1tI"),A=P("TSYQ"),v=P.n(A),f=P("sboe"),l=P("OZM5"),a=function(E){var _=E.prefixCls,u=E.level,c=E.isStart,p=E.isEnd;if(!u)return null;for(var d="".concat(_,"-indent-unit"),x=[],h=0;h<u;h+=1){var T;x.push(e.createElement("span",{key:h,className:v()(d,(T={},Object(te.a)(T,"".concat(d,"-start"),c[h+1]),Object(te.a)(T,"".concat(d,"-end"),p[h+1]),Object(te.a)(T,"".concat(d,"-end-first-level"),!h&&p[0]),T))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(_,"-indent")},x)},r=a,o=P("815F"),s="open",i="close",n="---",t=function(g){Object(H.a)(_,g);var E=Object(N.a)(_);function _(){var u;return Object(U.a)(this,_),u=E.apply(this,arguments),u.state={dragNodeHighlight:!1},u.onSelectorClick=function(c){var p=u.props.context.onNodeClick;p(c,Object(o.b)(u.props)),u.isSelectable()?u.onSelect(c):u.onCheck(c)},u.onSelectorDoubleClick=function(c){var p=u.props.context.onNodeDoubleClick;p(c,Object(o.b)(u.props))},u.onSelect=function(c){if(u.isDisabled())return;var p=u.props.context.onNodeSelect;c.preventDefault(),p(c,Object(o.b)(u.props))},u.onCheck=function(c){if(u.isDisabled())return;var p=u.props,d=p.disableCheckbox,x=p.checked,h=u.props.context.onNodeCheck;if(!u.isCheckable()||d)return;c.preventDefault();var T=!x;h(c,Object(o.b)(u.props),T)},u.onMouseEnter=function(c){var p=u.props.context.onNodeMouseEnter;p(c,Object(o.b)(u.props))},u.onMouseLeave=function(c){var p=u.props.context.onNodeMouseLeave;p(c,Object(o.b)(u.props))},u.onContextMenu=function(c){var p=u.props.context.onNodeContextMenu;p(c,Object(o.b)(u.props))},u.onDragStart=function(c){var p=u.props.context.onNodeDragStart;c.stopPropagation(),u.setState({dragNodeHighlight:!0}),p(c,Object(S.a)(u));try{c.dataTransfer.setData("text/plain","")}catch(d){}},u.onDragEnter=function(c){var p=u.props.context.onNodeDragEnter;c.preventDefault(),c.stopPropagation(),p(c,Object(S.a)(u))},u.onDragOver=function(c){var p=u.props.context.onNodeDragOver;c.preventDefault(),c.stopPropagation(),p(c,Object(S.a)(u))},u.onDragLeave=function(c){var p=u.props.context.onNodeDragLeave;c.stopPropagation(),p(c,Object(S.a)(u))},u.onDragEnd=function(c){var p=u.props.context.onNodeDragEnd;c.stopPropagation(),u.setState({dragNodeHighlight:!1}),p(c,Object(S.a)(u))},u.onDrop=function(c){var p=u.props.context.onNodeDrop;c.preventDefault(),c.stopPropagation(),u.setState({dragNodeHighlight:!1}),p(c,Object(S.a)(u))},u.onExpand=function(c){var p=u.props.context.onNodeExpand;p(c,Object(o.b)(u.props))},u.setSelectHandle=function(c){u.selectHandle=c},u.getNodeState=function(){var c=u.props.expanded;return u.isLeaf()?null:c?s:i},u.hasChildren=function(){var c=u.props.eventKey,p=u.props.context.keyEntities,d=p[c]||{},x=d.children;return!!(x||[]).length},u.isLeaf=function(){var c=u.props,p=c.isLeaf,d=c.loaded,x=u.props.context.loadData,h=u.hasChildren();return p===!1?!1:p||!x&&!h||x&&d&&!h},u.isDisabled=function(){var c=u.props.disabled,p=u.props.context.disabled;return!!(p||c)},u.isCheckable=function(){var c=u.props.checkable,p=u.props.context.checkable;return!p||c===!1?!1:p},u.syncLoadData=function(c){var p=c.expanded,d=c.loading,x=c.loaded,h=u.props.context,T=h.loadData,M=h.onNodeLoad;if(d)return;T&&p&&!u.isLeaf()&&(!u.hasChildren()&&!x&&M(Object(o.b)(u.props)))},u.renderSwitcher=function(){var c=u.props,p=c.expanded,d=c.switcherIcon,x=u.props.context,h=x.prefixCls,T=x.switcherIcon,M=d||T;if(u.isLeaf())return e.createElement("span",{className:v()("".concat(h,"-switcher"),"".concat(h,"-switcher-noop"))},typeof M=="function"?M(Object(O.a)(Object(O.a)({},u.props),{},{isLeaf:!0})):M);var D=v()("".concat(h,"-switcher"),"".concat(h,"-switcher_").concat(p?s:i));return e.createElement("span",{onClick:u.onExpand,className:D},typeof M=="function"?M(Object(O.a)(Object(O.a)({},u.props),{},{isLeaf:!1})):M)},u.renderCheckbox=function(){var c=u.props,p=c.checked,d=c.halfChecked,x=c.disableCheckbox,h=u.props.context.prefixCls,T=u.isDisabled(),M=u.isCheckable();if(!M)return null;var D=typeof M!="boolean"?M:null;return e.createElement("span",{className:v()("".concat(h,"-checkbox"),p&&"".concat(h,"-checkbox-checked"),!p&&d&&"".concat(h,"-checkbox-indeterminate"),(T||x)&&"".concat(h,"-checkbox-disabled")),onClick:u.onCheck},D)},u.renderIcon=function(){var c=u.props.loading,p=u.props.context.prefixCls;return e.createElement("span",{className:v()("".concat(p,"-iconEle"),"".concat(p,"-icon__").concat(u.getNodeState()||"docu"),c&&"".concat(p,"-icon_loading"))})},u.renderSelector=function(){var c=u.state.dragNodeHighlight,p=u.props,d=p.title,x=p.selected,h=p.icon,T=p.loading,M=p.data,D=u.props.context,w=D.prefixCls,C=D.showIcon,j=D.icon,L=D.draggable,z=D.loadData,$=D.titleRender,he=u.isDisabled(),fe="".concat(w,"-node-content-wrapper"),Ie;if(C){var Se=h||j;Ie=Se?e.createElement("span",{className:v()("".concat(w,"-iconEle"),"".concat(w,"-icon__customize"))},typeof Se=="function"?Se(u.props):Se):u.renderIcon()}else z&&T&&(Ie=u.renderIcon());var pe;typeof d=="function"?pe=d(M):$?pe=$(M):pe=d;var Ce=e.createElement("span",{className:"".concat(w,"-title")},pe);return e.createElement("span",{ref:u.setSelectHandle,title:typeof d=="string"?d:"",className:v()("".concat(fe),"".concat(fe,"-").concat(u.getNodeState()||"normal"),!he&&(x||c)&&"".concat(w,"-node-selected"),!he&&L&&"draggable"),draggable:!he&&L||void 0,"aria-grabbed":!he&&L||void 0,onMouseEnter:u.onMouseEnter,onMouseLeave:u.onMouseLeave,onContextMenu:u.onContextMenu,onClick:u.onSelectorClick,onDoubleClick:u.onSelectorDoubleClick,onDragStart:L?u.onDragStart:void 0},Ie,Ce)},u}return Object(m.a)(_,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var c=this.props.selectable,p=this.props.context.selectable;return typeof c=="boolean"?c:p}},{key:"render",value:function(){var c,p=this.props,d=p.eventKey,x=p.className,h=p.style,T=p.dragOver,M=p.dragOverGapTop,D=p.dragOverGapBottom,w=p.isLeaf,C=p.isStart,j=p.isEnd,L=p.expanded,z=p.selected,$=p.checked,he=p.halfChecked,fe=p.loading,Ie=p.domRef,Se=p.active,pe=p.onMouseMove,Ce=Object(k.a)(p,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Me=this.props.context,ge=Me.prefixCls,B=Me.filterTreeNode,R=Me.draggable,I=Me.keyEntities,W=this.isDisabled(),Y=Object(l.f)(Ce),F=I[d]||{},le=F.level,Ae=j[j.length-1];return e.createElement("div",Object.assign({ref:Ie,className:v()(x,"".concat(ge,"-treenode"),(c={},Object(te.a)(c,"".concat(ge,"-treenode-disabled"),W),Object(te.a)(c,"".concat(ge,"-treenode-switcher-").concat(L?"open":"close"),!w),Object(te.a)(c,"".concat(ge,"-treenode-checkbox-checked"),$),Object(te.a)(c,"".concat(ge,"-treenode-checkbox-indeterminate"),he),Object(te.a)(c,"".concat(ge,"-treenode-selected"),z),Object(te.a)(c,"".concat(ge,"-treenode-loading"),fe),Object(te.a)(c,"".concat(ge,"-treenode-active"),Se),Object(te.a)(c,"".concat(ge,"-treenode-leaf-last"),Ae),Object(te.a)(c,"drag-over",!W&&T),Object(te.a)(c,"drag-over-gap-top",!W&&M),Object(te.a)(c,"drag-over-gap-bottom",!W&&D),Object(te.a)(c,"filter-node",B&&B(Object(o.b)(this.props))),c)),style:h,onDragEnter:R?this.onDragEnter:void 0,onDragOver:R?this.onDragOver:void 0,onDragLeave:R?this.onDragLeave:void 0,onDrop:R?this.onDrop:void 0,onDragEnd:R?this.onDragEnd:void 0,onMouseMove:pe},Y),e.createElement(r,{prefixCls:ge,level:le,isStart:C,isEnd:j}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),_}(e.Component),b=function(E){return e.createElement(f.a.Consumer,null,function(_){return e.createElement(t,Object.assign({},E,{context:_}))})};b.displayName="TreeNode",b.defaultProps={title:n},b.isTreeNode=1;var y=oe.a=b},Y1PL:function(Be,oe,P){"use strict";P.r(oe),P.d(oe,"ResizableTextArea",function(){return he});var te=P("wx14"),k=P("1OyB"),O=P("vuIU"),U=P("Ji7U"),m=P("LK+K"),S=P("q1tI"),H=P("VTBJ"),N=P("rePB"),e=P("Zm9Q"),A=P("Kwbf"),v=P("c+Xe"),f=P("m+aA"),l=P("bdgK"),a=new Map;function r(Se){Se.forEach(function(pe){var Ce,Me=pe.target;(Ce=a.get(Me))===null||Ce===void 0||Ce.forEach(function(ge){return ge(Me)})})}var o=new l.default(r),s=null,i=null;function n(Se,pe){a.has(Se)||(a.set(Se,new Set),o.observe(Se)),a.get(Se).add(pe)}function t(Se,pe){a.has(Se)&&(a.get(Se).delete(pe),a.get(Se).size||(o.unobserve(Se),a.delete(Se)))}var b=function(Se){Object(U.a)(Ce,Se);var pe=Object(m.a)(Ce);function Ce(){return Object(k.a)(this,Ce),pe.apply(this,arguments)}return Object(O.a)(Ce,[{key:"render",value:function(){return this.props.children}}]),Ce}(S.Component),y=S.createContext(null);function g(Se){var pe=Se.children,Ce=Se.onBatchResize,Me=S.useRef(0),ge=S.useRef([]),B=S.useContext(y),R=S.useCallback(function(I,W,Y){Me.current+=1;var F=Me.current;ge.current.push({size:I,element:W,data:Y}),Promise.resolve().then(function(){F===Me.current&&(Ce==null||Ce(ge.current),ge.current=[])}),B==null||B(I,W,Y)},[Ce,B]);return S.createElement(y.Provider,{value:R},pe)}function E(Se){var pe=Se.children,Ce=Se.disabled,Me=S.useRef(null),ge=S.useRef(null),B=S.useContext(y),R=S.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),I=S.isValidElement(pe)&&Object(v.c)(pe),W=I?pe.ref:null,Y=S.useMemo(function(){return Object(v.a)(W,Me)},[W,Me]),F=S.useRef(Se);F.current=Se;var le=S.useCallback(function(Ae){var Ne=F.current,ie=Ne.onResize,de=Ne.data,we=Ae.getBoundingClientRect(),De=we.width,Ke=we.height,Je=Ae.offsetWidth,Ze=Ae.offsetHeight,Qe=Math.floor(De),ut=Math.floor(Ke);if(R.current.width!==Qe||R.current.height!==ut||R.current.offsetWidth!==Je||R.current.offsetHeight!==Ze){var tt={width:Qe,height:ut,offsetWidth:Je,offsetHeight:Ze};R.current=tt;var xe=Je===Math.round(De)?De:Je,Oe=Ze===Math.round(Ke)?Ke:Ze,Fe=Object(H.a)(Object(H.a)({},tt),{},{offsetWidth:xe,offsetHeight:Oe});B==null||B(Fe,Ae,de),ie&&Promise.resolve().then(function(){ie(Fe,Ae)})}},[]);return S.useEffect(function(){var Ae=Object(f.a)(Me.current)||Object(f.a)(ge.current);return Ae&&!Ce&&n(Ae,le),function(){return t(Ae,le)}},[Me.current,Ce]),S.createElement(b,{ref:ge},I?S.cloneElement(pe,{ref:Y}):pe)}var _="rc-observer-key";function u(Se){var pe=Se.children,Ce=Object(e.a)(pe);return Ce.map(function(Me,ge){var B=(Me==null?void 0:Me.key)||"".concat(_,"-").concat(ge);return S.createElement(E,Object(te.a)({},Se,{key:B}),Me)})}u.Collection=g;var c=u,p=P("bT9E"),d=P("TSYQ"),x=P.n(d),h=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,T=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],M={},D;function w(Se){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=Se.getAttribute("id")||Se.getAttribute("data-reactid")||Se.getAttribute("name");if(pe&&M[Ce])return M[Ce];var Me=window.getComputedStyle(Se),ge=Me.getPropertyValue("box-sizing")||Me.getPropertyValue("-moz-box-sizing")||Me.getPropertyValue("-webkit-box-sizing"),B=parseFloat(Me.getPropertyValue("padding-bottom"))+parseFloat(Me.getPropertyValue("padding-top")),R=parseFloat(Me.getPropertyValue("border-bottom-width"))+parseFloat(Me.getPropertyValue("border-top-width")),I=T.map(function(Y){return"".concat(Y,":").concat(Me.getPropertyValue(Y))}).join(";"),W={sizingStyle:I,paddingSize:B,borderSize:R,boxSizing:ge};return pe&&Ce&&(M[Ce]=W),W}function C(Se){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;D||(D=document.createElement("textarea"),D.setAttribute("tab-index","-1"),D.setAttribute("aria-hidden","true"),document.body.appendChild(D)),Se.getAttribute("wrap")?D.setAttribute("wrap",Se.getAttribute("wrap")):D.removeAttribute("wrap");var ge=w(Se,pe),B=ge.paddingSize,R=ge.borderSize,I=ge.boxSizing,W=ge.sizingStyle;D.setAttribute("style","".concat(W,";").concat(h)),D.value=Se.value||Se.placeholder||"";var Y=Number.MIN_SAFE_INTEGER,F=Number.MAX_SAFE_INTEGER,le=D.scrollHeight,Ae;if(I==="border-box"?le+=R:I==="content-box"&&(le-=B),Ce!==null||Me!==null){D.value=" ";var Ne=D.scrollHeight-B;Ce!==null&&(Y=Ne*Ce,I==="border-box"&&(Y=Y+B+R),le=Math.max(Y,le)),Me!==null&&(F=Ne*Me,I==="border-box"&&(F=F+B+R),Ae=le>F?"":"hidden",le=Math.min(F,le))}return{height:le,minHeight:Y,maxHeight:F,overflowY:Ae,resize:"none"}}var j=P("Gytx"),L=P.n(j),z;(function(Se){Se[Se.NONE=0]="NONE",Se[Se.RESIZING=1]="RESIZING",Se[Se.RESIZED=2]="RESIZED"})(z||(z={}));var $=function(Se){Object(U.a)(Ce,Se);var pe=Object(m.a)(Ce);function Ce(Me){var ge;return Object(k.a)(this,Ce),ge=pe.call(this,Me),ge.nextFrameActionId=void 0,ge.resizeFrameId=void 0,ge.textArea=void 0,ge.saveTextArea=function(B){ge.textArea=B},ge.handleResize=function(B){var R=ge.state.resizeStatus,I=ge.props,W=I.autoSize,Y=I.onResize;if(R!==z.NONE)return;typeof Y=="function"&&Y(B),W&&ge.resizeOnNextFrame()},ge.resizeOnNextFrame=function(){cancelAnimationFrame(ge.nextFrameActionId),ge.nextFrameActionId=requestAnimationFrame(ge.resizeTextarea)},ge.resizeTextarea=function(){var B=ge.props.autoSize;if(!B||!ge.textArea)return;var R=B.minRows,I=B.maxRows,W=C(ge.textArea,!1,R,I);ge.setState({textareaStyles:W,resizeStatus:z.RESIZING},function(){cancelAnimationFrame(ge.resizeFrameId),ge.resizeFrameId=requestAnimationFrame(function(){ge.setState({resizeStatus:z.RESIZED},function(){ge.resizeFrameId=requestAnimationFrame(function(){ge.setState({resizeStatus:z.NONE}),ge.fixFirefoxAutoScroll()})})})})},ge.renderTextArea=function(){var B=ge.props,R=B.prefixCls,I=R===void 0?"rc-textarea":R,W=B.autoSize,Y=B.onResize,F=B.className,le=B.disabled,Ae=ge.state,Ne=Ae.textareaStyles,ie=Ae.resizeStatus,de=Object(p.a)(ge.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=x()(I,F,Object(N.a)({},"".concat(I,"-disabled"),le));"value"in de&&(de.value=de.value||"");var De=Object(H.a)(Object(H.a)(Object(H.a)({},ge.props.style),Ne),ie===z.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(c,{onResize:ge.handleResize,disabled:!(W||Y)},S.createElement("textarea",Object(te.a)({},de,{className:we,style:De,ref:ge.saveTextArea})))},ge.state={textareaStyles:{},resizeStatus:z.NONE},ge}return Object(O.a)(Ce,[{key:"componentDidUpdate",value:function(ge){(ge.value!==this.props.value||!L()(ge.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var ge=this.textArea.selectionStart,B=this.textArea.selectionEnd;this.textArea.setSelectionRange(ge,B)}}catch(R){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ce}(S.Component),he=$,fe=function(Se){Object(U.a)(Ce,Se);var pe=Object(m.a)(Ce);function Ce(Me){var ge;Object(k.a)(this,Ce),ge=pe.call(this,Me),ge.resizableTextArea=void 0,ge.focus=function(){ge.resizableTextArea.textArea.focus()},ge.saveTextArea=function(R){ge.resizableTextArea=R},ge.handleChange=function(R){var I=ge.props.onChange;ge.setValue(R.target.value,function(){ge.resizableTextArea.resizeTextarea()}),I&&I(R)},ge.handleKeyDown=function(R){var I=ge.props,W=I.onPressEnter,Y=I.onKeyDown;R.keyCode===13&&W&&W(R),Y&&Y(R)};var B=typeof Me.value=="undefined"||Me.value===null?Me.defaultValue:Me.value;return ge.state={value:B},ge}return Object(O.a)(Ce,[{key:"setValue",value:function(ge,B){"value"in this.props||this.setState({value:ge},B)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(he,Object(te.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ge){return"value"in ge?{value:ge.value}:null}}]),Ce}(S.Component),Ie=oe.default=fe},ZJlW:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___XZ1Hd",flex_space_between:"flex_space_between___2oG4i",flex_box_vertical_center:"flex_box_vertical_center___1UWtb",flex_box_center_end:"flex_box_center_end___1o2xT",flex_box_column:"flex_box_column___SlAE0",list:"list___1HvWe",wrap:"wrap___10sri",lockWrap:"lockWrap___2djiu",li:"li___2W_zn",cover:"cover___2FS3L",img:"img___cyxrw",sign:"sign___1cxDK",name:"name___3tYlu",e:"e___1-orw",unit:"unit___ycOgg",tags:"tags___2FRpJ",tag:"tag___1e0XO"}},ZW9T:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return j});var te=P("k1fw"),k=P("oBTY"),O=P("miYZ"),U=P("tsqr"),m=P("rAM+"),S=P("tJVT"),H=P("PpiC"),N=P("q1tI"),e=P.n(N),A=P("bdgK"),v=P("9og8"),f=P("WmNS"),l=P.n(f),a={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},r={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},o={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},s={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},i=P("5VLF"),n=P.n(i),t={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},b=function(z,$){return $.map(function(he){return{label:he,kind:z.languages.CompletionItemKind.Keyword,insertText:he}})},y=function(z){return Object.keys(t.tables).map(function($){return{label:$,kind:z.languages.CompletionItemKind.Variable,insertText:$}})},g=function(z,$){var he=t.tables[z];return he?he.map(function(fe){return{label:fe,kind:$.languages.CompletionItemKind.Field,insertText:fe}}):[]};function E(L,z,$,he,fe){var Ie=z.getWordUntilPosition($),Se={startLineNumber:$.lineNumber,endLineNumber:$.lineNumber,startColumn:Ie.startColumn,endColumn:Ie.endColumn},pe=he.map(function(Ce){return{label:Ce,kind:L.languages.CompletionItemKind.Keyword,insertText:Ce,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Se}});return fe.map(function(Ce){pe.push(Object(te.a)(Object(te.a)({},Ce),{},{range:Se}))}),pe}var _=function(L){t.languages.map(function(fe){return L.languages.registerDocumentFormattingEditProvider(fe,{provideDocumentFormattingEdits:function(Se,pe,Ce){return Object(v.a)(l.a.mark(function Me(){var ge;return l.a.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return ge=n()(Se.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),R.abrupt("return",[{range:Se.getFullModelRange(),text:ge}]);case 2:case"end":return R.stop()}},Me)}))()}}),fe});var z=o.quickKey.map(function(fe){return{label:fe.label,kind:L.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),$=s.quickKey.map(function(fe){return{label:fe.label,kind:L.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),he=r.quickKey.map(function(fe){return{label:fe.label,kind:L.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ie,Se){var pe=Ie.getWordUntilPosition(Se),Ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},Me=Ie.getLineContent(Se.lineNumber).substring(pe.startColumn-2,pe.endColumn);return{suggestions:[].concat(Object(k.a)(o.keywords.map(function(ge){return{label:ge,kind:L.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})),Object(k.a)(o.quickKey.map(function(ge){return{label:ge.label,kind:L.languages.CompletionItemKind.Function,documentation:ge.content,insertText:Me.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ie,Se){var pe=Ie.getWordUntilPosition(Se),Ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn};return{suggestions:Object(k.a)(a.keywords.map(function(Me){return{label:Me,kind:L.languages.CompletionItemKind.Function,documentation:Me,insertText:Me,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ie,Se){var pe=Ie.getWordUntilPosition(Se),Ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},Me=Ie.getLineContent(Se.lineNumber).substring(pe.startColumn-2,pe.endColumn);return{suggestions:[].concat(Object(k.a)(r.keywords.map(function(ge){return{label:ge,kind:L.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})),Object(k.a)(r.quickKey.map(function(ge){return{label:ge.label,kind:L.languages.CompletionItemKind.Function,documentation:ge.content,insertText:Me.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ie,Se){var pe=Ie.getWordUntilPosition(Se),Ce={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},Me=Ie.getLineContent(Se.lineNumber).substring(pe.startColumn-2,pe.endColumn);return{suggestions:[].concat(Object(k.a)(s.keywords.map(function(ge){return{label:ge,kind:L.languages.CompletionItemKind.Function,documentation:ge,insertText:ge,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})),Object(k.a)(s.quickKey.map(function(ge){return{label:ge.label,kind:L.languages.CompletionItemKind.Function,documentation:ge.content,insertText:Me.startsWith("#")?ge.content.replace(/#/,""):ge.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ce}})))}}})},u="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",c=P("fjLI"),p=P("LvDl"),d=P("+ua5");function x(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function h(){}var T=!1,M={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function D(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],z=L;if(Array.isArray(L)){for(var $=0;$<L.length;$++){var he=M[L[$]];if(he)return he}return z[0]}return M[z]||z}var w=null,C=oe.b=function(L){var z=L.width,$=z===void 0?"100%":z,he=L.height,fe=he===void 0?"100%":he,Ie=L.value,Se=L.language,pe=Se===void 0?"javascript":Se,Ce=L.style,Me=Ce===void 0?{}:Ce,ge=L.options,B=ge===void 0?{}:ge,R=L.overrideServices,I=R===void 0?{}:R,W=L.theme,Y=W===void 0?"vs-dark":W,F=L.onEditBlur,le=L.onSave,Ae=L.autoHeight,Ne=Ae===void 0?!1:Ae,ie=L.forbidCopy,de=ie===void 0?!1:ie,we=L.onChange,De=we===void 0?h:we,Ke=L.editorDidMount,Je=Ke===void 0?h:Ke,Ze=L.onFocus,Qe=Ze===void 0?h:Ze,ut=L.filename,tt=ut===void 0?"educoder.txt":ut,xe=L.errorLine,Oe=L.errorContent,Fe=Oe===void 0?"":Oe,We=Object(H.a)(L,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),q=Object(N.useRef)(),K=Object(N.useRef)({}),G=Object(N.useRef)(),Q=Object(N.useRef)(),ee=Object(N.useRef)(!1),V=Object(N.useRef)(),J=Object(N.useState)(!1),ne=Object(S.a)(J,2),ae=ne[0],ye=ne[1];function be(){var dt;return q.current&&(dt=new A.default(function(st){var Le=Object(m.a)(st),ct;try{for(Le.s();!(ct=Le.n()).done;){var mt=ct.value;(mt.target.offsetHeight>0||mt.target.offsetWidth>0)&&K.current.instance.layout()}}catch(Ct){Le.e(Ct)}finally{Le.f()}}),dt.observe(q.current)),dt}function Pe(){U.b.warn(decodeURIComponent(u))}var ze=function(){var st=K.current.instance;if(Ie!=null&&st&&ae){var Le=st.getModel();Le&&Ie!==Le.getValue()&&(T=!0,Le.setValue(Ie),st.layout(),T=!1)}};Object(N.useEffect)(function(){Q.current&&clearTimeout(Q.current),Q.current=setTimeout(function(){ze()},500)},[Ie,ae,K.current]),Object(N.useEffect)(function(){if(xe&&K.current&&K.current.instance){var dt=K.current.instance;dt.changeViewZones(function(Le){var ct=document.createElement("div");ct.style.padding="10px 20px",ct.style.width="calc(100% - 20px)",ct.className="my-error-line-wrp",ct.innerHTML=Fe,Le.addZone({afterLineNumber:xe||11,heightInLines:3,domNode:ct})});var st={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};dt.addOverlayWidget(st),dt.revealPositionInCenter({lineNumber:20,column:1})}},[xe,K.current,ae]);function qe(){var dt=K.current.instance;if(dt){var st=dt.getSelection(),Le=K.current.pastePos||{},ct=new w.Range(Le.startLineNumber||st.endLineNumber,Le.startColumn||st.endColumn,Le.endLineNumber||st.endLineNumber,Le.endColumn||st.endColumn);setTimeout(function(){dt.executeEdits("",[{range:ct,text:""}])},300)}}function Xe(dt){(window.navigator.platform.match("Mac")?dt.metaKey:dt.ctrlKey)&&dt.keyCode==83&&(dt.preventDefault(),le())}var At=function(){if(Ne&&K.current.instance){var st=K.current.instance.getContentHeight();yt(st<fe?fe:st)}else yt(fe)};function pt(dt){var st=document.createEvent("MouseEvents");st.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),dt.dispatchEvent(st)}function ot(dt,st){var Le=window.URL||window.webkitURL||window,ct=new Blob([st]),mt=document.createElementNS("http://www.w3.org/1999/xhtml","a");mt.href=Le.createObjectURL(ct),mt.download=dt,pt(mt)}Object(N.useEffect)(function(){At()},[At]),Object(N.useEffect)(function(){q.current&&!ae&&Promise.all([P.e(17),P.e(29)]).then(P.t.bind(null,"M/lh",7)).then(function(dt){try{w=dt,K.current.instance=w.editor.create(q.current,{value:Ie,language:D(pe),theme:Y,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},I);var st=K.current.instance,Le=c.d._menuItems,ct=Object(k.a)(Le).find(function(it){return it[0]._debugName=="EditorContext"}),mt=ct[1],Ct=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ht=function(rt,Ot){var at=rt._first;do{var Dt,_t,en=Ot.includes((Dt=at.element)===null||Dt===void 0||((_t=Dt.command)===null||_t===void 0)?void 0:_t.id);en&&rt._remove(at)}while(at=at.next)};if(Je(st,w),setTimeout(function(){At(),K.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ot(tt||"educoder.txt",st.getValue())}}),st.getDomNode().addEventListener("input",function(){G.current.autoFormat&&st.getAction("editor.action.formatDocument").run()})},500),K.current.subscription=st.onDidChangeModelContent(function(it){ee.current?clearTimeout(V.current):(At(),De(st.getValue(),it)),V.current=setTimeout(function(){ee.current=!1},500)}),window.Monaco||_(w,D(pe)),de&&(ht(mt,Ct),q.current.classList.add("noCopyPaste"),st.onKeyDown(function(it){var rt=it.keyCode,Ot=it.ctrlKey,at=it.metaKey;(rt===33||rt===52)&&(at||Ot)&&(Pe(),it.preventDefault())})),window.Monaco=w,F&&st.onDidBlurEditorWidget(function(){F(st.getValue())}),Qe&&st.onDidFocusEditorText(function(){Qe(st.getValue())}),de){st.addCommand(w.KeyMod.CtrlCmd|w.KeyCode.KEY_V,function(){return Pe(),null}),st.onDidPaste(function(it){K.current.pastePos=it});try{window.addEventListener("paste",qe)}catch(it){}}var nt=be();return ye(!0),function(){var it=K.current.instance;it.dispose();var rt=it.getModel();rt&&rt.dispose(),K.current.subscription&&K.current.subscription.dispose(),de&&window.removeEventListener("paste",qe),nt.unobserve(q.current)}}catch(it){}})},[]),Object(N.useEffect)(function(){var dt=K.current.instance;if(dt&&ae)return document.addEventListener("keydown",Xe,!1),function(){document.removeEventListener("keydown",Xe)}},[le,ae]),Object(N.useEffect)(function(){var dt=K.current.instance;if(dt&&ae){var st=D(pe);w.editor.setModelLanguage(dt.getModel(),st),console.log("language:",pe,dt.getModel(),st)}},[pe,ae]),Object(N.useEffect)(function(){var dt=K.current.instance;dt&&ae&&w.editor.setTheme(Y)},[Y,ae]),Object(N.useEffect)(function(){var dt=K.current.instance;G.current=B,dt&&ae&&(dt.updateOptions(Object(te.a)({},B)),setTimeout(function(){dt.getModel().updateOptions(Object(te.a)({},B))},200))},[JSON.stringify(B),ae]),Object(N.useEffect)(function(){var dt=K.current.instance;dt&&ae&&dt.layout()},[$,fe,ae]);var Mt=Object(N.useState)(x($)),Rt=Object(S.a)(Mt,2),wt=Rt[0],zt=Rt[1],vt=Object(N.useState)(x(fe)),It=Object(S.a)(vt,2),Pt=It[0],yt=It[1],Jt=Object(te.a)(Object(te.a)({},Me),{},{width:wt,height:Pt});return e.a.createElement("div",{className:"my-monaco-editor",ref:q,style:Jt})};function j(L){var z=L.width,$=z===void 0?"100%":z,he=L.height,fe=he===void 0?"100%":he,Ie=L.original,Se=L.modified,pe=L.language,Ce=L.options,Me=Ce===void 0?{}:Ce,ge=Object(N.useRef)(),B=Object(N.useState)(null),R=Object(S.a)(B,2),I=R[0],W=R[1];function Y(Ne){var ie;return ge.current&&(ie=new A.default(function(de){var we=Object(m.a)(de),De;try{for(we.s();!(De=we.n()).done;){var Ke=De.value;(Ke.target.offsetHeight>0||Ke.target.offsetWidth>0)&&Ne.layout()}}catch(Je){we.e(Je)}finally{we.f()}}),ie.observe(ge.current)),ie}Object(N.useEffect)(function(){ge.current&&Promise.all([P.e(17),P.e(29)]).then(P.t.bind(null,"M/lh",7)).then(function(Ne){w=Ne;var ie=w.editor.createDiffEditor(ge.current,Object(te.a)(Object(te.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Me),{},{wordWrap:!0}));W(ie);var de=Y(ie);return function(){ie.dispose();var we=ie.getModel();we&&we.dispose(),de.unobserve(ge.current)}})},[]),Object(N.useEffect)(function(){I&&I.setModel({original:w.editor.createModel(Ie,pe),modified:w.editor.createModel(Se,pe)})},[Ie,Se,pe,I]);var F=x($),le=x(fe),Ae={width:F,height:le};return e.a.createElement("div",{className:"my-diff-editor",ref:ge,style:Ae})}},a2OE:function(Be,oe){Be.exports="data:image/png;base64,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"},bT9E:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return k});var te=P("VTBJ");function k(O,U){var m=Object(te.a)({},O);return Array.isArray(U)&&U.forEach(function(S){delete m[S]}),m}},biw7:function(Be,oe,P){"use strict";var te=P("q1tI"),k=P.n(te),O=te.createContext(null);oe.a=O},cFMs:function(Be,oe){Be.exports="data:image/png;base64,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"},cz0n:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___G8W6i",flex_space_between:"flex_space_between___1p_ZB",flex_box_vertical_center:"flex_box_vertical_center___2wivF",flex_box_center_end:"flex_box_center_end___y5a20",flex_box_column:"flex_box_column___6oXp3",tabs:"tabs___sKski",active:"active___10xGM"}},"f0W+":function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___2AWuG",flex_space_between:"flex_space_between___4j1zo",flex_box_vertical_center:"flex_box_vertical_center___3dWcm",flex_box_center_end:"flex_box_center_end___qvHJi",flex_box_column:"flex_box_column___3Eier",tabs:"tabs___25WKT",tabsWrap:"tabsWrap___2lPJE",active:"active___gGp9s"}},f9pc:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___fO1Sq",flex_space_between:"flex_space_between___2MANs",flex_box_vertical_center:"flex_box_vertical_center___2x-su",flex_box_center_end:"flex_box_center_end___6bZNq",flex_box_column:"flex_box_column___CGTHC",quickPager:"quickPager___2XH6F",disabled:"disabled___2gPWV"}},fgAr:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___3W32R",flex_space_between:"flex_space_between___2uUoZ",flex_box_vertical_center:"flex_box_vertical_center___3Oxpz",flex_box_center_end:"flex_box_center_end___2tkyR",flex_box_column:"flex_box_column___2IFiF",btns:"btns___1c8D8",confirm:"confirm___2gIuB",cancel:"cancel___1ssuo"}},fjLI:function(Be,oe,P){"use strict";P.d(oe,"f",function(){return l}),P.d(oe,"b",function(){return a}),P.d(oe,"a",function(){return r}),P.d(oe,"d",function(){return o}),P.d(oe,"e",function(){return s}),P.d(oe,"c",function(){return i});var te=P("8HAY"),k=P("Vhoy"),O=P("MI8n"),U=P("JYp7"),m=P("pmY6"),S=P("24hK"),H=P("nnTU"),N=P("T8No"),e=P("Cg/j"),A=P("t9D7"),v=function(n,t,b,y){var g=arguments.length,E=g<3?t:y===null?y=Object.getOwnPropertyDescriptor(t,b):y,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(n,t,b,y);else for(var u=n.length-1;u>=0;u--)(_=n[u])&&(E=(g<3?_(E):g>3?_(t,b,E):_(t,b))||E);return g>3&&E&&Object.defineProperty(t,b,E),E},f=function(n,t){return function(b,y){t(b,y,n)}};function l(n){return n.command!==void 0}class a{constructor(n){this.id=a._idPool++,this._debugName=n}}a._idPool=0,a.CommandPalette=new a("CommandPalette"),a.EditorContext=new a("EditorContext"),a.SimpleEditorContext=new a("SimpleEditorContext"),a.EditorContextCopy=new a("EditorContextCopy"),a.EditorContextPeek=new a("EditorContextPeek"),a.MenubarEditMenu=new a("MenubarEditMenu"),a.MenubarCopy=new a("MenubarCopy"),a.MenubarGoMenu=new a("MenubarGoMenu"),a.MenubarSelectionMenu=new a("MenubarSelectionMenu"),a.InlineCompletionsActions=new a("InlineCompletionsActions");const r=Object(e.c)("menuService"),o=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new O.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:n=>n===a.CommandPalette}}addCommand(n){return this.addCommands(U.a.single(n))}addCommands(n){for(const t of n)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(m.i)(()=>{let t=!1;for(const b of n)t=this._commands.delete(b.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(n){return this._commands.get(n)}getCommands(){const n=new Map;return this._commands.forEach((t,b)=>n.set(b,t)),n}appendMenuItem(n,t){return this.appendMenuItems(U.a.single({id:n,item:t}))}appendMenuItems(n){const t=new Set,b=new S.a;for(const{id:y,item:g}of n){let E=this._menuItems.get(y);E||(E=new S.a,this._menuItems.set(y,E)),b.push(E.push(g)),t.add(y)}return this._onDidChangeMenu.fire(t),Object(m.i)(()=>{if(b.size>0){for(let y of b)y();this._onDidChangeMenu.fire(t),b.clear()}})}getMenuItems(n){let t;return this._menuItems.has(n)?t=[...this._menuItems.get(n)]:t=[],n===a.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(n){const t=new Set;for(const b of n)l(b)&&(t.add(b.command.id),b.alt&&t.add(b.alt.id));this._commands.forEach((b,y)=>{t.has(y)||n.push({command:b})})}};class s extends te.e{constructor(n,t,b,y){super(`submenuitem.${n.submenu.id}`,typeof n.title=="string"?n.title:n.title.value,[],"submenu");this.item=n,this._menuService=t,this._contextKeyService=b,this._options=y}get actions(){const n=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),b=t.getActions(this._options);t.dispose();for(const[,y]of b)y.length>0&&(n.push(...y),n.push(new te.d));return n.length&&n.pop(),n}}let i=class n{constructor(t,b,y,g,E){var _,u;if(this._commandService=E,this.id=t.id,this.label=(y==null?void 0:y.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(u=typeof t.tooltip=="string"?t.tooltip:(_=t.tooltip)===null||_===void 0?void 0:_.value)!==null&&u!==void 0?u:"",this.enabled=!t.precondition||g.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const c=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=g.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}this.item=t,this.alt=b?new n(b,void 0,y,g,E):void 0,this._options=y,A.d.isThemeIcon(t.icon)&&(this.class=k.a.asClassName(t.icon))}dispose(){}run(...t){var b,y;let g=[];return((b=this._options)===null||b===void 0?void 0:b.arg)&&(g=[...g,this._options.arg]),((y=this._options)===null||y===void 0?void 0:y.shouldForwardArgs)&&(g=[...g,...t]),this._commandService.executeCommand(this.id,...g)}};i=v([f(3,N.b),f(4,H.b)],i)},fyJ8:function(Be,oe,P){"use strict";var te=P("rePB"),k=P("VTBJ"),O=P("Ff2n"),U=P("U8pU"),m=P("q1tI"),S=P.n(m),H=P("TSYQ"),N=P.n(H),e=P("c+Xe"),A=P("sR1s");function v(o){return o&&Object(U.a)(o)==="object"&&!Array.isArray(o)&&!m.isValidElement(o)}function f(o){return typeof o=="string"?!0:Object(e.c)(o)}function l(o,s){var i,n=o.prefixCls,t=o.className,b=o.record,y=o.index,g=o.dataIndex,E=o.render,_=o.children,u=o.component,c=u===void 0?"td":u,p=o.colSpan,d=o.rowSpan,x=o.fixLeft,h=o.fixRight,T=o.firstFixLeft,M=o.lastFixLeft,D=o.firstFixRight,w=o.lastFixRight,C=o.appendNode,j=o.additionalProps,L=j===void 0?{}:j,z=o.ellipsis,$=o.align,he=o.rowType,fe=o.isSticky,Ie="".concat(n,"-cell"),Se,pe;if(_)pe=_;else{var Ce=Object(A.b)(b,g);if(pe=Ce,E){var Me=E(Ce,b,y);v(Me)?(pe=Me.children,Se=Me.props):pe=Me}}Object(U.a)(pe)==="object"&&!Array.isArray(pe)&&!m.isValidElement(pe)&&(pe=null),z&&(M||D)&&(pe=m.createElement("span",{className:"".concat(Ie,"-content")},pe));var ge=Se||{},B=ge.colSpan,R=ge.rowSpan,I=ge.style,W=ge.className,Y=Object(O.a)(ge,["colSpan","rowSpan","style","className"]),F=B!==void 0?B:p,le=R!==void 0?R:d;if(F===0||le===0)return null;var Ae={},Ne=typeof x=="number",ie=typeof h=="number";Ne&&(Ae.position="sticky",Ae.left=x),ie&&(Ae.position="sticky",Ae.right=h);var de={};$&&(de.textAlign=$);var we,De=z===!0?{showTitle:!0}:z;De&&(De.showTitle||he==="header")&&(typeof pe=="string"||typeof pe=="number"?we=pe.toString():m.isValidElement(pe)&&typeof pe.props.children=="string"&&(we=pe.props.children));var Ke=Object(k.a)(Object(k.a)(Object(k.a)({title:we},Y),L),{},{colSpan:F&&F!==1?F:null,rowSpan:le&&le!==1?le:null,className:N()(Ie,t,(i={},Object(te.a)(i,"".concat(Ie,"-fix-left"),Ne),Object(te.a)(i,"".concat(Ie,"-fix-left-first"),T),Object(te.a)(i,"".concat(Ie,"-fix-left-last"),M),Object(te.a)(i,"".concat(Ie,"-fix-right"),ie),Object(te.a)(i,"".concat(Ie,"-fix-right-first"),D),Object(te.a)(i,"".concat(Ie,"-fix-right-last"),w),Object(te.a)(i,"".concat(Ie,"-ellipsis"),z),Object(te.a)(i,"".concat(Ie,"-with-append"),C),Object(te.a)(i,"".concat(Ie,"-fix-sticky"),(Ne||ie)&&fe),i),L.className,W),style:Object(k.a)(Object(k.a)(Object(k.a)(Object(k.a)({},L.style),de),Ae),I),ref:f(c)?s:null});return m.createElement(c,Object.assign({},Ke),C,pe)}var a=m.forwardRef(l);a.displayName="Cell";var r=m.memo(a,function(o,s){return s.shouldCellUpdate?!s.shouldCellUpdate(s.record,o.record):!1});oe.a=r},hW8S:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return U}),P.d(oe,"c",function(){return m}),P.d(oe,"b",function(){return S});var te=P("VTBJ"),k=P("Ff2n"),O=P("Kwbf"),U="RC_TABLE_INTERNAL_COL_DEFINE";function m(H){var N=H.expandable,e=Object(k.a)(H,["expandable"]);return"expandable"in H?Object(te.a)(Object(te.a)({},e),N):e}function S(H){return Object.keys(H).reduce(function(N,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(N[e]=H[e]),N},{})}},"iL++":function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___2pHUo",flex_space_between:"flex_space_between___3Bfes",flex_box_vertical_center:"flex_box_vertical_center___1thiW",flex_box_center_end:"flex_box_center_end___3Zr7k",flex_box_column:"flex_box_column___3xe1a",list:"list___3rlGv",wrap:"wrap____oZzM",lockWrap:"lockWrap___24eY2",top:"top___3SCOc",sign:"sign____uZ_B",name:"name___2nHyM",img:"img___3Spn7",text:"text___1Pg2L",btns:"btns___Kr_Ti",bottom:"bottom___2_iOx"}},ic2d:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return U});var te=P("FWmy"),k=P("746U");class O{constructor(){this.data=new Map}add(m,S){te.a(k.l(m)),te.a(k.k(S)),te.a(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,S)}as(m){return this.data.get(m)||null}}const U=new O},k3GJ:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return He});var te=P("rePB"),k=P("ODXe"),O=P("Ff2n"),U=P("VTBJ"),m=P("q1tI"),S=P("TSYQ"),H=P.n(S),N=P("Zm9Q"),e=P("6cGi"),A=P("KQm4"),v=P("xEkU"),f=P.n(v),l=P("t23M");function a(se){var ve=Object(m.useRef)(),Ee=Object(m.useRef)(!1);function ue(){for(var X=arguments.length,re=new Array(X),Z=0;Z<X;Z++)re[Z]=arguments[Z];Ee.current||(f.a.cancel(ve.current),ve.current=f()(function(){se.apply(void 0,re)}))}return Object(m.useEffect)(function(){return function(){Ee.current=!0,f.a.cancel(ve.current)}},[]),ue}function r(se){var ve=Object(m.useRef)([]),Ee=Object(m.useState)({}),ue=Object(k.a)(Ee,2),X=ue[1],re=Object(m.useRef)(typeof se=="function"?se():se),Z=a(function(){var me=re.current;ve.current.forEach(function(Te){me=Te(me)}),ve.current=[],re.current=me,X({})});function ce(me){ve.current.push(me),Z()}return[re.current,ce]}var o=P("4IlW");function s(se,ve){var Ee,ue=se.prefixCls,X=se.id,re=se.active,Z=se.rtl,ce=se.tab,me=ce.key,Te=ce.tab,_e=ce.disabled,Re=ce.closeIcon,Ue=se.tabBarGutter,Ye=se.tabPosition,Ve=se.closable,$e=se.renderWrapper,St=se.removeAriaLabel,Ft=se.editable,Nt=se.onClick,Wt=se.onRemove,jt=se.onFocus,Ut="".concat(ue,"-tab");m.useEffect(function(){return Wt},[]);var Bt={};Ye==="top"||Ye==="bottom"?Bt[Z?"marginLeft":"marginRight"]=Ue:Bt.marginBottom=Ue;var tn=Ft&&Ve!==!1&&!_e;function Gt(Tt){if(_e)return;Nt(Tt)}function xn(Tt){Tt.preventDefault(),Tt.stopPropagation(),Ft.onEdit("remove",{key:me,event:Tt})}var ln=m.createElement("div",{key:me,ref:ve,className:H()(Ut,(Ee={},Object(te.a)(Ee,"".concat(Ut,"-with-remove"),tn),Object(te.a)(Ee,"".concat(Ut,"-active"),re),Object(te.a)(Ee,"".concat(Ut,"-disabled"),_e),Ee)),style:Bt,onClick:Gt},m.createElement("div",{role:"tab","aria-selected":re,id:X&&"".concat(X,"-tab-").concat(me),className:"".concat(Ut,"-btn"),"aria-controls":X&&"".concat(X,"-panel-").concat(me),"aria-disabled":_e,tabIndex:_e?null:0,onClick:function(Et){Et.stopPropagation(),Gt(Et)},onKeyDown:function(Et){[o.a.SPACE,o.a.ENTER].includes(Et.which)&&(Et.preventDefault(),Gt(Et))},onFocus:jt},Te),tn&&m.createElement("button",{type:"button","aria-label":St||"remove",tabIndex:0,className:"".concat(Ut,"-remove"),onClick:function(Et){Et.stopPropagation(),xn(Et)}},Re||Ft.removeIcon||"\xD7"));return $e&&(ln=$e(ln)),ln}var i=m.forwardRef(s),n={width:0,height:0,left:0,top:0};function t(se,ve,Ee){return Object(m.useMemo)(function(){for(var ue,X=new Map,re=ve.get((ue=se[0])===null||ue===void 0?void 0:ue.key)||n,Z=re.left+re.width,ce=0;ce<se.length;ce+=1){var me=se[ce].key,Te=ve.get(me);if(!Te){var _e;Te=ve.get((_e=se[ce-1])===null||_e===void 0?void 0:_e.key)||n}var Re=X.get(me)||Object(U.a)({},Te);Re.right=Z-Re.left-Re.width,X.set(me,Re)}return X},[se.map(function(ue){return ue.key}).join("_"),ve,Ee])}var b={width:0,height:0,left:0,top:0,right:0};function y(se,ve,Ee,ue,X){var re=X.tabs,Z=X.tabPosition,ce=X.rtl,me,Te,_e;["top","bottom"].includes(Z)?(me="width",Te=ce?"right":"left",_e=Math.abs(ve.left)):(me="height",Te="top",_e=-ve.top);var Re=ve[me],Ue=Ee[me],Ye=ue[me],Ve=Re;return Ue+Ye>Re&&(Ve=Re-Ye),Object(m.useMemo)(function(){if(!re.length)return[0,0];for(var $e=re.length,St=$e,Ft=0;Ft<$e;Ft+=1){var Nt=se.get(re[Ft].key)||b;if(Nt[Te]+Nt[me]>_e+Ve){St=Ft-1;break}}for(var Wt=0,jt=$e-1;jt>=0;jt-=1){var Ut=se.get(re[jt].key)||b;if(Ut[Te]<_e){Wt=jt+1;break}}return[Wt,St]},[se,_e,Ve,Z,re.map(function($e){return $e.key}).join("_"),ce])}var g=P("wx14"),E=P("1OyB"),_=P("vuIU"),u=P("JX7q"),c=P("Ji7U"),p=P("LK+K"),d=P("I8Z2"),x=P("bT9E"),h=P("2GS6"),T=P("Gytx"),M=P.n(T),D=P("U8pU"),w=/iPhone/i,C=/iPod/i,j=/iPad/i,L=/\bAndroid(?:.+)Mobile\b/i,z=/Android/i,$=/\bAndroid(?:.+)SD4930UR\b/i,he=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,fe=/Windows Phone/i,Ie=/\bWindows(?:.+)ARM\b/i,Se=/BlackBerry/i,pe=/BB10/i,Ce=/Opera Mini/i,Me=/\b(CriOS|Chrome)(?:.+)Mobile/i,ge=/Mobile(?:.+)Firefox\b/i;function B(se,ve){return se.test(ve)}function R(se){var ve=se||(typeof navigator!="undefined"?navigator.userAgent:""),Ee=(ve||"").split("[FBAN");if(typeof Ee[1]!="undefined"){var ue=Ee,X=Object(k.a)(ue,1);ve=X[0]}if(Ee=ve.split("Twitter"),typeof Ee[1]!="undefined"){var re=Ee,Z=Object(k.a)(re,1);ve=Z[0]}var ce={apple:{phone:B(w,ve)&&!B(fe,ve),ipod:B(C,ve),tablet:!B(w,ve)&&B(j,ve)&&!B(fe,ve),device:(B(w,ve)||B(C,ve)||B(j,ve))&&!B(fe,ve)},amazon:{phone:B($,ve),tablet:!B($,ve)&&B(he,ve),device:B($,ve)||B(he,ve)},android:{phone:!B(fe,ve)&&B($,ve)||!B(fe,ve)&&B(L,ve),tablet:!B(fe,ve)&&!B($,ve)&&!B(L,ve)&&(B(he,ve)||B(z,ve)),device:!B(fe,ve)&&(B($,ve)||B(he,ve)||B(L,ve)||B(z,ve))||B(/\bokhttp\b/i,ve)},windows:{phone:B(fe,ve),tablet:B(Ie,ve),device:B(fe,ve)||B(Ie,ve)},other:{blackberry:B(Se,ve),blackberry10:B(pe,ve),opera:B(Ce,ve),firefox:B(ge,ve),chrome:B(Me,ve),device:B(Se,ve)||B(pe,ve)||B(Ce,ve)||B(ge,ve)||B(Me,ve)},any:null,phone:null,tablet:null};return ce.any=ce.apple.device||ce.android.device||ce.windows.device||ce.other.device,ce.phone=ce.apple.phone||ce.android.phone||ce.windows.phone,ce.tablet=ce.apple.tablet||ce.android.tablet||ce.windows.tablet,ce}var I=Object(U.a)(Object(U.a)({},R()),{},{isMobile:R}),W=I;function Y(){}function F(se,ve,Ee){var ue=ve||"";return se.key||"".concat(ue,"item_").concat(Ee)}function le(se){return"".concat(se,"-menu-")}function Ae(se,ve){var Ee=-1;m.Children.forEach(se,function(ue){Ee+=1,ue&&ue.type&&ue.type.isMenuItemGroup?m.Children.forEach(ue.props.children,function(X){Ee+=1,ve(X,Ee)}):ve(ue,Ee)})}function Ne(se,ve,Ee){if(!se||Ee.find)return;m.Children.forEach(se,function(ue){if(ue){var X=ue.type;if(!X||!(X.isSubMenu||X.isMenuItem||X.isMenuItemGroup))return;ve.indexOf(ue.key)!==-1?Ee.find=!0:ue.props.children&&Ne(ue.props.children,ve,Ee)}})}var ie=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],de=function(ve){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ue=ve&&typeof ve.getBoundingClientRect=="function"&&ve.getBoundingClientRect().width;if(ue){if(Ee){var X=getComputedStyle(ve),re=X.marginLeft,Z=X.marginRight;ue+=+re.replace("px","")+ +Z.replace("px","")}ue=+ue.toFixed(6)}return ue||0},we=function(ve,Ee,ue){ve&&Object(D.a)(ve.style)==="object"&&(ve.style[Ee]=ue)},De=function(){return W.any},Ke=P("bdgK"),Je=P("i8i4"),Ze=P.n(Je),Qe=P("wgJM"),ut=P("l4aY"),tt=P("m+aA"),xe=P("c+Xe"),Oe=P("zT1h"),Fe=P("QC+M");function We(se,ve,Ee){return Ee?se[0]===ve[0]:se[0]===ve[0]&&se[1]===ve[1]}function q(se,ve,Ee){var ue=se[ve]||{};return Object(U.a)(Object(U.a)({},ue),Ee)}function K(se,ve,Ee,ue){for(var X=Ee.points,re=Object.keys(se),Z=0;Z<re.length;Z+=1){var ce=re[Z];if(We(se[ce].points,X,ue))return"".concat(ve,"-placement-").concat(ce)}return""}var G=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var se=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(se)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(se==null?void 0:se.substr(0,4)))},Q=P("MNnm");function ee(se,ve){var Ee={};return Ee[se.toLowerCase()]=ve.toLowerCase(),Ee["Webkit".concat(se)]="webkit".concat(ve),Ee["Moz".concat(se)]="moz".concat(ve),Ee["ms".concat(se)]="MS".concat(ve),Ee["O".concat(se)]="o".concat(ve.toLowerCase()),Ee}function V(se,ve){var Ee={animationend:ee("Animation","AnimationEnd"),transitionend:ee("Transition","TransitionEnd")};return se&&("AnimationEvent"in ve||delete Ee.animationend.animation,"TransitionEvent"in ve||delete Ee.transitionend.transition),Ee}var J=V(Object(Q.a)(),typeof window!="undefined"?window:{}),ne={};if(Object(Q.a)()){var ae=document.createElement("div");ne=ae.style}var ye={};function be(se){if(ye[se])return ye[se];var ve=J[se];if(ve)for(var Ee=Object.keys(ve),ue=Ee.length,X=0;X<ue;X+=1){var re=Ee[X];if(Object.prototype.hasOwnProperty.call(ve,re)&&re in ne)return ye[se]=ve[re],ye[se]}return""}var Pe=be("animationend"),ze=be("transitionend"),qe=!!(Pe&&ze),Xe=Pe||"animationend",At=ze||"transitionend";function pt(se,ve){if(!se)return null;if(Object(D.a)(se)==="object"){var Ee=ve.replace(/-\w/g,function(ue){return ue[1].toUpperCase()});return se[Ee]}return"".concat(se,"-").concat(ve)}var ot="none",Mt="appear",Rt="enter",wt="leave",zt="none",vt="prepare",It="start",Pt="active",yt="end";function Jt(se){var ve=Object(m.useRef)(!1),Ee=Object(m.useState)(se),ue=Object(k.a)(Ee,2),X=ue[0],re=ue[1];function Z(ce){ve.current||re(ce)}return Object(m.useEffect)(function(){return function(){ve.current=!0}},[]),[X,Z]}var dt=Object(Q.a)()?m.useLayoutEffect:m.useEffect,st=dt,Le=function(){var se=m.useRef(null);function ve(){Qe.a.cancel(se.current)}function Ee(ue){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;ve();var re=Object(Qe.a)(function(){X<=1?ue({isCanceled:function(){return re!==se.current}}):Ee(ue,X-1)});se.current=re}return m.useEffect(function(){return function(){ve()}},[]),[Ee,ve]},ct=[vt,It,Pt,yt],mt=!1,Ct=!0;function ht(se){return se===Pt||se===yt}var nt=function(se,ve){var Ee=m.useState(zt),ue=Object(k.a)(Ee,2),X=ue[0],re=ue[1],Z=Le(),ce=Object(k.a)(Z,2),me=ce[0],Te=ce[1];function _e(){re(vt)}return st(function(){if(X!==zt&&X!==yt){var Re=ct.indexOf(X),Ue=ct[Re+1],Ye=ve(X);Ye===mt?re(Ue):me(function(Ve){function $e(){if(Ve.isCanceled())return;re(Ue)}Ye===!0?$e():Promise.resolve(Ye).then($e)})}},[se,X]),m.useEffect(function(){return function(){Te()}},[]),[_e,X]},it=function(se){var ve=Object(m.useRef)(),Ee=Object(m.useRef)(se);Ee.current=se;var ue=m.useCallback(function(Z){Ee.current(Z)},[]);function X(Z){Z&&(Z.removeEventListener(At,ue),Z.removeEventListener(Xe,ue))}function re(Z){ve.current&&ve.current!==Z&&X(ve.current),Z&&Z!==ve.current&&(Z.addEventListener(At,ue),Z.addEventListener(Xe,ue),ve.current=Z)}return m.useEffect(function(){return function(){X(ve.current)}},[]),[re,X]};function rt(se,ve,Ee,ue){var X=ue.motionEnter,re=X===void 0?!0:X,Z=ue.motionAppear,ce=Z===void 0?!0:Z,me=ue.motionLeave,Te=me===void 0?!0:me,_e=ue.motionDeadline,Re=ue.motionLeaveImmediately,Ue=ue.onAppearPrepare,Ye=ue.onEnterPrepare,Ve=ue.onLeavePrepare,$e=ue.onAppearStart,St=ue.onEnterStart,Ft=ue.onLeaveStart,Nt=ue.onAppearActive,Wt=ue.onEnterActive,jt=ue.onLeaveActive,Ut=ue.onAppearEnd,Bt=ue.onEnterEnd,tn=ue.onLeaveEnd,Gt=ue.onVisibleChanged,xn=Jt(),ln=Object(k.a)(xn,2),Tt=ln[0],Et=ln[1],Yt=Jt(ot),Qt=Object(k.a)(Yt,2),gt=Qt[0],nn=Qt[1],yn=Jt(null),rn=Object(k.a)(yn,2),fn=rn[0],_n=rn[1],In=Object(m.useRef)(!1),Fn=Object(m.useRef)(null),Tn=Object(m.useRef)(!1),jn=Object(m.useRef)(null);function ni(){var bn=Ee();return bn||jn.current}var zn=Object(m.useRef)(!1);function Vn(bn){var sn=ni();if(bn&&!bn.deadline&&bn.target!==sn)return;var Ln;gt===Mt&&zn.current?Ln=Ut==null?void 0:Ut(sn,bn):gt===Rt&&zn.current?Ln=Bt==null?void 0:Bt(sn,bn):gt===wt&&zn.current&&(Ln=tn==null?void 0:tn(sn,bn)),Ln!==!1&&!Tn.current&&(nn(ot),_n(null))}var wn=it(Vn),Un=Object(k.a)(wn,1),Dn=Un[0],An=m.useMemo(function(){var bn,sn,Ln;switch(gt){case"appear":return bn={},Object(te.a)(bn,vt,Ue),Object(te.a)(bn,It,$e),Object(te.a)(bn,Pt,Nt),bn;case"enter":return sn={},Object(te.a)(sn,vt,Ye),Object(te.a)(sn,It,St),Object(te.a)(sn,Pt,Wt),sn;case"leave":return Ln={},Object(te.a)(Ln,vt,Ve),Object(te.a)(Ln,It,Ft),Object(te.a)(Ln,Pt,jt),Ln;default:return{}}},[gt]),_i=nt(gt,function(bn){if(bn===vt){var sn=An[vt];return sn?sn(ni()):mt}if(mn in An){var Ln;_n(((Ln=An[mn])===null||Ln===void 0?void 0:Ln.call(An,ni(),null))||null)}return mn===Pt&&(Dn(ni()),_e>0&&(clearTimeout(Fn.current),Fn.current=setTimeout(function(){Vn({deadline:!0})},_e))),Ct}),Ei=Object(k.a)(_i,2),Di=Ei[0],mn=Ei[1],hi=ht(mn);zn.current=hi,st(function(){Et(ve);var bn=In.current;if(In.current=!0,!se)return;var sn;!bn&&ve&&ce&&(sn=Mt),bn&&ve&&re&&(sn=Rt),(bn&&!ve&&Te||!bn&&Re&&!ve&&Te)&&(sn=wt),sn&&(nn(sn),Di())},[ve]),Object(m.useEffect)(function(){(gt===Mt&&!ce||gt===Rt&&!re||gt===wt&&!Te)&&nn(ot)},[ce,re,Te]),Object(m.useEffect)(function(){return function(){clearTimeout(Fn.current),Tn.current=!0}},[]),Object(m.useEffect)(function(){Tt!==void 0&>===ot&&(Gt==null||Gt(Tt))},[Tt,gt]);var Li=fn;return An[vt]&&mn===It&&(Li=Object(U.a)({transition:"none"},Li)),[gt,mn,Li,Tt!=null?Tt:ve]}var Ot=function(se){Object(c.a)(Ee,se);var ve=Object(p.a)(Ee);function Ee(){return Object(E.a)(this,Ee),ve.apply(this,arguments)}return Object(_.a)(Ee,[{key:"render",value:function(){return this.props.children}}]),Ee}(m.Component),at=Ot;function Dt(se){var ve=se;Object(D.a)(se)==="object"&&(ve=se.transitionSupport);function Ee(X){return!!(X.motionName&&ve)}var ue=m.forwardRef(function(X,re){var Z=X.visible,ce=Z===void 0?!0:Z,me=X.removeOnLeave,Te=me===void 0?!0:me,_e=X.forceRender,Re=X.children,Ue=X.motionName,Ye=X.leavedClassName,Ve=X.eventProps,$e=Ee(X),St=Object(m.useRef)(),Ft=Object(m.useRef)();function Nt(){try{return Object(tt.a)(St.current||Ft.current)}catch(nn){return null}}var Wt=rt($e,ce,Nt,X),jt=Object(k.a)(Wt,4),Ut=jt[0],Bt=jt[1],tn=jt[2],Gt=jt[3],xn=m.useRef(Gt);Gt&&(xn.current=!0);var ln=Object(m.useRef)(re);ln.current=re;var Tt=m.useCallback(function(nn){St.current=nn,Object(xe.b)(ln.current,nn)},[]),Et,Yt=Object(U.a)(Object(U.a)({},Ve),{},{visible:ce});if(!Re)Et=null;else if(Ut===ot||!Ee(X))Gt?Et=Re(Object(U.a)({},Yt),Tt):!Te&&xn.current?Et=Re(Object(U.a)(Object(U.a)({},Yt),{},{className:Ye}),Tt):_e?Et=Re(Object(U.a)(Object(U.a)({},Yt),{},{style:{display:"none"}}),Tt):Et=null;else{var Qt,gt;Bt===vt?gt="prepare":ht(Bt)?gt="active":Bt===It&&(gt="start"),Et=Re(Object(U.a)(Object(U.a)({},Yt),{},{className:H()(pt(Ue,Ut),(Qt={},Object(te.a)(Qt,pt(Ue,"".concat(Ut,"-").concat(gt)),gt),Object(te.a)(Qt,Ue,typeof Ue=="string"),Qt)),style:tn}),Tt)}return m.createElement(at,{ref:Ft},Et)});return ue.displayName="CSSMotion",ue}var _t=Dt(qe),en="add",Zt="keep",ft="remove",pn="removed";function lt(se){var ve;return se&&Object(D.a)(se)==="object"&&"key"in se?ve=se:ve={key:se},Object(U.a)(Object(U.a)({},ve),{},{key:String(ve.key)})}function qt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return se.map(lt)}function Lt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ee=[],ue=0,X=ve.length,re=qt(se),Z=qt(ve);re.forEach(function(Te){for(var _e=!1,Re=ue;Re<X;Re+=1){var Ue=Z[Re];if(Ue.key===Te.key){ue<Re&&(Ee=Ee.concat(Z.slice(ue,Re).map(function(Ye){return Object(U.a)(Object(U.a)({},Ye),{},{status:en})})),ue=Re),Ee.push(Object(U.a)(Object(U.a)({},Ue),{},{status:Zt})),ue+=1,_e=!0;break}}_e||Ee.push(Object(U.a)(Object(U.a)({},Te),{},{status:ft}))}),ue<X&&(Ee=Ee.concat(Z.slice(ue).map(function(Te){return Object(U.a)(Object(U.a)({},Te),{},{status:en})})));var ce={};Ee.forEach(function(Te){var _e=Te.key;ce[_e]=(ce[_e]||0)+1});var me=Object.keys(ce).filter(function(Te){return ce[Te]>1});return me.forEach(function(Te){Ee=Ee.filter(function(_e){var Re=_e.key,Ue=_e.status;return Re!==Te||Ue!==ft}),Ee.forEach(function(_e){_e.key===Te&&(_e.status=Zt)})}),Ee}var on=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Kt(se){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_t,Ee=function(ue){Object(c.a)(re,ue);var X=Object(p.a)(re);function re(){var Z;return Object(E.a)(this,re),Z=X.apply(this,arguments),Z.state={keyEntities:[]},Z.removeKey=function(ce){Z.setState(function(me){var Te=me.keyEntities;return{keyEntities:Te.map(function(_e){return _e.key!==ce?_e:Object(U.a)(Object(U.a)({},_e),{},{status:pn})})}})},Z}return Object(_.a)(re,[{key:"render",value:function(){var ce=this,me=this.state.keyEntities,Te=this.props,_e=Te.component,Re=Te.children,Ue=Te.onVisibleChanged,Ye=Object(O.a)(Te,["component","children","onVisibleChanged"]),Ve=_e||m.Fragment,$e={};return on.forEach(function(St){$e[St]=Ye[St],delete Ye[St]}),delete Ye.keys,m.createElement(Ve,Ye,me.map(function(St){var Ft=St.status,Nt=Object(O.a)(St,["status"]),Wt=Ft===en||Ft===Zt;return m.createElement(ve,Object(g.a)({},$e,{key:Nt.key,visible:Wt,eventProps:Nt,onVisibleChanged:function(Ut){Ue==null||Ue(Ut,{key:Nt.key}),Ut||ce.removeKey(Nt.key)}}),Re)}))}}],[{key:"getDerivedStateFromProps",value:function(ce,me){var Te=ce.keys,_e=me.keyEntities,Re=qt(Te),Ue=Lt(_e,Re);return{keyEntities:Ue.filter(function(Ye){var Ve=_e.find(function($e){var St=$e.key;return Ye.key===St});return!(Ve&&Ve.status===pn&&Ye.status===ft)})}}}]),re}(m.Component);return Ee.defaultProps={component:"div"},Ee}var kt=Kt(qe),$t=_t;function an(se){var ve=se.prefixCls,Ee=se.motion,ue=se.animation,X=se.transitionName;return Ee||(ue?{motionName:"".concat(ve,"-").concat(ue)}:X?{motionName:X}:null)}function cn(se){var ve=se.prefixCls,Ee=se.visible,ue=se.zIndex,X=se.mask,re=se.maskMotion,Z=se.maskAnimation,ce=se.maskTransitionName;if(!X)return null;var me={};return(re||ce||Z)&&(me=Object(U.a)({motionAppear:!0},an({motion:re,prefixCls:ve,transitionName:ce,animation:Z}))),m.createElement($t,Object(g.a)({},me,{visible:Ee,removeOnLeave:!0}),function(Te){var _e=Te.className;return m.createElement("div",{style:{zIndex:ue},className:H()("".concat(ve,"-mask"),_e)})})}var dn=P("9mu1"),Mn=P("o0o1"),Xn=P.n(Mn),Mi=P("HaE+"),ii=["measure","align",null,"motion"],gn=function(se,ve){var Ee=Object(m.useState)(null),ue=Object(k.a)(Ee,2),X=ue[0],re=ue[1],Z=Object(m.useRef)(),ce=Object(m.useRef)(!1);function me(Re){ce.current||re(Re)}function Te(){Qe.a.cancel(Z.current)}function _e(Re){Te(),Z.current=Object(Qe.a)(function(){me(function(Ue){switch(X){case"align":return"motion";case"motion":return"stable";default:}return Ue}),Re==null||Re()})}return Object(m.useEffect)(function(){me("measure")},[se]),Object(m.useEffect)(function(){switch(X){case"measure":ve();break;default:}X&&(Z.current=Object(Qe.a)(Object(Mi.a)(Xn.a.mark(function Re(){var Ue,Ye;return Xn.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:Ue=ii.indexOf(X),Ye=ii[Ue+1],Ye&&Ue!==-1&&me(Ye);case 3:case"end":return $e.stop()}},Re)}))))},[X]),Object(m.useEffect)(function(){return function(){ce.current=!0,Te()}},[]),[X,_e]},ri=function(se){var ve=m.useState({width:0,height:0}),Ee=Object(k.a)(ve,2),ue=Ee[0],X=Ee[1];function re(ce){X({width:ce.offsetWidth,height:ce.offsetHeight})}var Z=m.useMemo(function(){var ce={};if(se){var me=ue.width,Te=ue.height;se.indexOf("height")!==-1&&Te?ce.height=Te:se.indexOf("minHeight")!==-1&&Te&&(ce.minHeight=Te),se.indexOf("width")!==-1&&me?ce.width=me:se.indexOf("minWidth")!==-1&&me&&(ce.minWidth=me)}return ce},[se,ue]);return[Z,re]},fi=m.forwardRef(function(se,ve){var Ee=se.visible,ue=se.prefixCls,X=se.className,re=se.style,Z=se.children,ce=se.zIndex,me=se.stretch,Te=se.destroyPopupOnHide,_e=se.forceRender,Re=se.align,Ue=se.point,Ye=se.getRootDomNode,Ve=se.getClassNameFromAlign,$e=se.onAlign,St=se.onMouseEnter,Ft=se.onMouseLeave,Nt=se.onMouseDown,Wt=se.onTouchStart,jt=Object(m.useRef)(),Ut=Object(m.useRef)(),Bt=Object(m.useState)(),tn=Object(k.a)(Bt,2),Gt=tn[0],xn=tn[1],ln=ri(me),Tt=Object(k.a)(ln,2),Et=Tt[0],Yt=Tt[1];function Qt(){me&&Yt(Ye())}var gt=gn(Ee,Qt),nn=Object(k.a)(gt,2),yn=nn[0],rn=nn[1],fn=Object(m.useRef)();function _n(){return Ue||Ye}function In(){var wn;(wn=jt.current)===null||wn===void 0||wn.forceAlign()}function Fn(wn,Un){var Dn=Ve(Un);Gt!==Dn&&xn(Dn),yn==="align"&&(Gt!==Dn?Promise.resolve().then(function(){In()}):rn(function(){var An;(An=fn.current)===null||An===void 0||An.call(fn)}),$e==null||$e(wn,Un))}var Tn=Object(U.a)({},an(se));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(wn){var Un=Tn[wn];Tn[wn]=function(Dn,An){return rn(),Un==null?void 0:Un(Dn,An)}});function jn(){return new Promise(function(wn){fn.current=wn})}m.useEffect(function(){!Tn.motionName&&yn==="motion"&&rn()},[Tn.motionName,yn]),m.useImperativeHandle(ve,function(){return{forceAlign:In,getElement:function(){return Ut.current}}});var ni=Object(U.a)(Object(U.a)({},Et),{},{zIndex:ce,opacity:yn==="motion"||yn==="stable"||!Ee?void 0:0,pointerEvents:yn==="stable"?void 0:"none"},re),zn=!0;(Re==null?void 0:Re.points)&&(yn==="align"||yn==="stable")&&(zn=!1);var Vn=Z;return m.Children.count(Z)>1&&(Vn=m.createElement("div",{className:"".concat(ue,"-content")},Z)),m.createElement($t,Object(g.a)({visible:Ee,ref:Ut,leavedClassName:"".concat(ue,"-hidden")},Tn,{onAppearPrepare:jn,onEnterPrepare:jn,removeOnLeave:Te,forceRender:_e}),function(wn,Un){var Dn=wn.className,An=wn.style,_i=H()(ue,X,Gt,Dn);return m.createElement(dn.a,{target:_n(),key:"popup",ref:jt,monitorWindowResize:!0,disabled:zn,align:Re,onAlign:Fn},m.createElement("div",{ref:Un,className:_i,onMouseEnter:St,onMouseLeave:Ft,onMouseDownCapture:Nt,onTouchStartCapture:Wt,style:Object(U.a)(Object(U.a)({},An),ni)},Vn))})});fi.displayName="PopupInner";var Ti=fi,ke=m.forwardRef(function(se,ve){var Ee=se.prefixCls,ue=se.visible,X=se.zIndex,re=se.children,Z=se.mobile;Z=Z===void 0?{}:Z;var ce=Z.popupClassName,me=Z.popupStyle,Te=Z.popupMotion,_e=Te===void 0?{}:Te,Re=Z.popupRender,Ue=m.useRef();m.useImperativeHandle(ve,function(){return{forceAlign:function(){},getElement:function(){return Ue.current}}});var Ye=Object(U.a)({zIndex:X},me),Ve=re;return m.Children.count(re)>1&&(Ve=m.createElement("div",{className:"".concat(Ee,"-content")},re)),Re&&(Ve=Re(Ve)),m.createElement($t,Object(g.a)({visible:ue,ref:Ue,removeOnLeave:!0},_e),function($e,St){var Ft=$e.className,Nt=$e.style,Wt=H()(Ee,ce,Ft);return m.createElement("div",{ref:St,className:Wt,style:Object(U.a)(Object(U.a)({},Nt),Ye)},Ve)})});ke.displayName="MobilePopupInner";var Hn=ke,ai=["visible","mobile"],$n=m.forwardRef(function(se,ve){var Ee=se.visible,ue=se.mobile,X=Object(O.a)(se,ai),re=Object(m.useState)(Ee),Z=Object(k.a)(re,2),ce=Z[0],me=Z[1],Te=Object(m.useState)(!1),_e=Object(k.a)(Te,2),Re=_e[0],Ue=_e[1],Ye=Object(U.a)(Object(U.a)({},X),{},{visible:ce});Object(m.useEffect)(function(){me(Ee),Ee&&ue&&Ue(G())},[Ee,ue]);var Ve=Re?m.createElement(Hn,Object(g.a)({},Ye,{mobile:ue,ref:ve})):m.createElement(Ti,Object(g.a)({},Ye,{ref:ve}));return m.createElement("div",null,m.createElement(cn,Ye),Ve)});$n.displayName="Popup";var Qi=$n,Pi=m.createContext(null),Sn=Pi;function Jn(){}function si(){return""}function Zi(se){return se?se.ownerDocument:window.document}var Si=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function qi(se){var ve=function(Ee){Object(c.a)(X,Ee);var ue=Object(p.a)(X);function X(re){var Z;Object(E.a)(this,X),Z=ue.call(this,re),Z.popupRef=m.createRef(),Z.triggerRef=m.createRef(),Z.attachId=void 0,Z.clickOutsideHandler=void 0,Z.touchOutsideHandler=void 0,Z.contextMenuOutsideHandler1=void 0,Z.contextMenuOutsideHandler2=void 0,Z.mouseDownTimeout=void 0,Z.focusTime=void 0,Z.preClickTime=void 0,Z.preTouchTime=void 0,Z.delayTimer=void 0,Z.hasPopupMouseDown=void 0,Z.onMouseEnter=function(me){var Te=Z.props.mouseEnterDelay;Z.fireEvents("onMouseEnter",me),Z.delaySetPopupVisible(!0,Te,Te?null:me)},Z.onMouseMove=function(me){Z.fireEvents("onMouseMove",me),Z.setPoint(me)},Z.onMouseLeave=function(me){Z.fireEvents("onMouseLeave",me),Z.delaySetPopupVisible(!1,Z.props.mouseLeaveDelay)},Z.onPopupMouseEnter=function(){Z.clearDelayTimer()},Z.onPopupMouseLeave=function(me){var Te;if(me.relatedTarget&&!me.relatedTarget.setTimeout&&Object(ut.a)((Te=Z.popupRef.current)===null||Te===void 0?void 0:Te.getElement(),me.relatedTarget))return;Z.delaySetPopupVisible(!1,Z.props.mouseLeaveDelay)},Z.onFocus=function(me){Z.fireEvents("onFocus",me),Z.clearDelayTimer(),Z.isFocusToShow()&&(Z.focusTime=Date.now(),Z.delaySetPopupVisible(!0,Z.props.focusDelay))},Z.onMouseDown=function(me){Z.fireEvents("onMouseDown",me),Z.preClickTime=Date.now()},Z.onTouchStart=function(me){Z.fireEvents("onTouchStart",me),Z.preTouchTime=Date.now()},Z.onBlur=function(me){Z.fireEvents("onBlur",me),Z.clearDelayTimer(),Z.isBlurToHide()&&Z.delaySetPopupVisible(!1,Z.props.blurDelay)},Z.onContextMenu=function(me){me.preventDefault(),Z.fireEvents("onContextMenu",me),Z.setPopupVisible(!0,me)},Z.onContextMenuClose=function(){Z.isContextMenuToShow()&&Z.close()},Z.onClick=function(me){if(Z.fireEvents("onClick",me),Z.focusTime){var Te;if(Z.preClickTime&&Z.preTouchTime?Te=Math.min(Z.preClickTime,Z.preTouchTime):Z.preClickTime?Te=Z.preClickTime:Z.preTouchTime&&(Te=Z.preTouchTime),Math.abs(Te-Z.focusTime)<20)return;Z.focusTime=0}Z.preClickTime=0,Z.preTouchTime=0,Z.isClickToShow()&&(Z.isClickToHide()||Z.isBlurToHide())&&me&&me.preventDefault&&me.preventDefault();var _e=!Z.state.popupVisible;(Z.isClickToHide()&&!_e||_e&&Z.isClickToShow())&&Z.setPopupVisible(!Z.state.popupVisible,me)},Z.onPopupMouseDown=function(){if(Z.hasPopupMouseDown=!0,clearTimeout(Z.mouseDownTimeout),Z.mouseDownTimeout=window.setTimeout(function(){Z.hasPopupMouseDown=!1},0),Z.context){var me;(me=Z.context).onPopupMouseDown.apply(me,arguments)}},Z.onDocumentClick=function(me){if(Z.props.mask&&!Z.props.maskClosable)return;var Te=me.target,_e=Z.getRootDomNode(),Re=Z.getPopupDomNode();(!Object(ut.a)(_e,Te)||Z.isContextMenuOnly())&&!Object(ut.a)(Re,Te)&&!Z.hasPopupMouseDown&&Z.close()},Z.getRootDomNode=function(){var me=Z.props.getTriggerDOMNode;if(me)return me(Z.triggerRef.current);try{var Te=Object(tt.a)(Z.triggerRef.current);if(Te)return Te}catch(_e){}return Ze.a.findDOMNode(Object(u.a)(Z))},Z.getPopupClassNameFromAlign=function(me){var Te=[],_e=Z.props,Re=_e.popupPlacement,Ue=_e.builtinPlacements,Ye=_e.prefixCls,Ve=_e.alignPoint,$e=_e.getPopupClassNameFromAlign;return Re&&Ue&&Te.push(K(Ue,Ye,me,Ve)),$e&&Te.push($e(me)),Te.join(" ")},Z.getComponent=function(){var me=Z.props,Te=me.prefixCls,_e=me.destroyPopupOnHide,Re=me.popupClassName,Ue=me.onPopupAlign,Ye=me.popupMotion,Ve=me.popupAnimation,$e=me.popupTransitionName,St=me.popupStyle,Ft=me.mask,Nt=me.maskAnimation,Wt=me.maskTransitionName,jt=me.maskMotion,Ut=me.zIndex,Bt=me.popup,tn=me.stretch,Gt=me.alignPoint,xn=me.mobile,ln=me.forceRender,Tt=Z.state,Et=Tt.popupVisible,Yt=Tt.point,Qt=Z.getPopupAlign(),gt={};return Z.isMouseEnterToShow()&&(gt.onMouseEnter=Z.onPopupMouseEnter),Z.isMouseLeaveToHide()&&(gt.onMouseLeave=Z.onPopupMouseLeave),gt.onMouseDown=Z.onPopupMouseDown,gt.onTouchStart=Z.onPopupMouseDown,m.createElement(Qi,Object(g.a)({prefixCls:Te,destroyPopupOnHide:_e,visible:Et,point:Gt&&Yt,className:Re,align:Qt,onAlign:Ue,animation:Ve,getClassNameFromAlign:Z.getPopupClassNameFromAlign},gt,{stretch:tn,getRootDomNode:Z.getRootDomNode,style:St,mask:Ft,zIndex:Ut,transitionName:$e,maskAnimation:Nt,maskTransitionName:Wt,maskMotion:jt,ref:Z.popupRef,motion:Ye,mobile:xn,forceRender:ln}),typeof Bt=="function"?Bt():Bt)},Z.attachParent=function(me){Qe.a.cancel(Z.attachId);var Te=Z.props,_e=Te.getPopupContainer,Re=Te.getDocument,Ue=Z.getRootDomNode(),Ye;_e?(Ue||_e.length===0)&&(Ye=_e(Ue)):Ye=Re(Z.getRootDomNode()).body,Ye?Ye.appendChild(me):Z.attachId=Object(Qe.a)(function(){Z.attachParent(me)})},Z.getContainer=function(){var me=Z.props.getDocument,Te=me(Z.getRootDomNode()).createElement("div");return Te.style.position="absolute",Te.style.top="0",Te.style.left="0",Te.style.width="100%",Z.attachParent(Te),Te},Z.setPoint=function(me){var Te=Z.props.alignPoint;if(!Te||!me)return;Z.setState({point:{pageX:me.pageX,pageY:me.pageY}})},Z.handlePortalUpdate=function(){Z.state.prevPopupVisible!==Z.state.popupVisible&&Z.props.afterPopupVisibleChange(Z.state.popupVisible)},Z.triggerContextValue={onPopupMouseDown:Z.onPopupMouseDown};var ce;return"popupVisible"in re?ce=!!re.popupVisible:ce=!!re.defaultPopupVisible,Z.state={prevPopupVisible:ce,popupVisible:ce},Si.forEach(function(me){Z["fire".concat(me)]=function(Te){Z.fireEvents(me,Te)}}),Z}return Object(_.a)(X,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Z=this.props,ce=this.state;if(ce.popupVisible){var me;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(me=Z.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Oe.a)(me,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(me=me||Z.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Oe.a)(me,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(me=me||Z.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Oe.a)(me,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Oe.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Qe.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Z;return((Z=this.popupRef.current)===null||Z===void 0?void 0:Z.getElement())||null}},{key:"getPopupAlign",value:function(){var Z=this.props,ce=Z.popupPlacement,me=Z.popupAlign,Te=Z.builtinPlacements;return ce&&Te?q(Te,ce,me):me}},{key:"setPopupVisible",value:function(Z,ce){var me=this.props.alignPoint,Te=this.state.popupVisible;this.clearDelayTimer(),Te!==Z&&("popupVisible"in this.props||this.setState({popupVisible:Z,prevPopupVisible:Te}),this.props.onPopupVisibleChange(Z)),me&&ce&&Z&&this.setPoint(ce)}},{key:"delaySetPopupVisible",value:function(Z,ce,me){var Te=this,_e=ce*1e3;if(this.clearDelayTimer(),_e){var Re=me?{pageX:me.pageX,pageY:me.pageY}:null;this.delayTimer=window.setTimeout(function(){Te.setPopupVisible(Z,Re),Te.clearDelayTimer()},_e)}else this.setPopupVisible(Z,me)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(Z){var ce=this.props.children.props,me=this.props;return ce[Z]&&me[Z]?this["fire".concat(Z)]:ce[Z]||me[Z]}},{key:"isClickToShow",value:function(){var Z=this.props,ce=Z.action,me=Z.showAction;return ce.indexOf("click")!==-1||me.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Z=this.props.action;return Z==="contextMenu"||Z.length===1&&Z[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Z=this.props,ce=Z.action,me=Z.showAction;return ce.indexOf("contextMenu")!==-1||me.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Z=this.props,ce=Z.action,me=Z.hideAction;return ce.indexOf("click")!==-1||me.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Z=this.props,ce=Z.action,me=Z.showAction;return ce.indexOf("hover")!==-1||me.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Z=this.props,ce=Z.action,me=Z.hideAction;return ce.indexOf("hover")!==-1||me.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Z=this.props,ce=Z.action,me=Z.showAction;return ce.indexOf("focus")!==-1||me.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Z=this.props,ce=Z.action,me=Z.hideAction;return ce.indexOf("focus")!==-1||me.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Z;(Z=this.popupRef.current)===null||Z===void 0||Z.forceAlign()}}},{key:"fireEvents",value:function(Z,ce){var me=this.props.children.props[Z];me&&me(ce);var Te=this.props[Z];Te&&Te(ce)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Z=this.state.popupVisible,ce=this.props,me=ce.children,Te=ce.forceRender,_e=ce.alignPoint,Re=ce.className,Ue=ce.autoDestroy,Ye=m.Children.only(me),Ve={key:"trigger"};this.isContextMenuToShow()?Ve.onContextMenu=this.onContextMenu:Ve.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Ve.onClick=this.onClick,Ve.onMouseDown=this.onMouseDown,Ve.onTouchStart=this.onTouchStart):(Ve.onClick=this.createTwoChains("onClick"),Ve.onMouseDown=this.createTwoChains("onMouseDown"),Ve.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Ve.onMouseEnter=this.onMouseEnter,_e&&(Ve.onMouseMove=this.onMouseMove)):Ve.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Ve.onMouseLeave=this.onMouseLeave:Ve.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Ve.onFocus=this.onFocus,Ve.onBlur=this.onBlur):(Ve.onFocus=this.createTwoChains("onFocus"),Ve.onBlur=this.createTwoChains("onBlur"));var $e=H()(Ye&&Ye.props&&Ye.props.className,Re);$e&&(Ve.className=$e);var St=Object(U.a)({},Ve);Object(xe.c)(Ye)&&(St.ref=Object(xe.a)(this.triggerRef,Ye.ref));var Ft=m.cloneElement(Ye,St),Nt;return(Z||this.popupRef.current||Te)&&(Nt=m.createElement(se,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Z&&Ue&&(Nt=null),m.createElement(Sn.Provider,{value:this.triggerContextValue},Ft,Nt)}}],[{key:"getDerivedStateFromProps",value:function(Z,ce){var me=Z.popupVisible,Te={};return me!==void 0&&ce.popupVisible!==me&&(Te.popupVisible=me,Te.prevPopupVisible=ce.popupVisible),Te}}]),X}(m.Component);return ve.contextType=Sn,ve.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:si,getDocument:Zi,onPopupVisibleChange:Jn,afterPopupVisibleChange:Jn,onPopupAlign:Jn,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},ve}var Ni=qi(Fe.a),Wn={adjustX:1,adjustY:1},pi={topLeft:{points:["bl","tl"],overflow:Wn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Wn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Wn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Wn,offset:[4,0]}},ki={topLeft:{points:["bl","tl"],overflow:Wn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Wn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Wn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Wn,offset:[4,0]}},mi=pi,Pn=0,Nn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Bn=function(ve,Ee,ue){var X=le(Ee),re=ve.getState();ve.setState({defaultActiveFirst:Object(U.a)(Object(U.a)({},re.defaultActiveFirst),{},Object(te.a)({},X,ue))})},wi=function(se){Object(c.a)(Ee,se);var ve=Object(p.a)(Ee);function Ee(ue){var X;Object(E.a)(this,Ee),X=ve.call(this,ue),X.onDestroy=function(_e){X.props.onDestroy(_e)},X.onKeyDown=function(_e){var Re=_e.keyCode,Ue=X.menuInstance,Ye=X.props.store,Ve=X.getVisible();if(Re===o.a.ENTER)return X.onTitleClick(_e),Bn(Ye,X.props.eventKey,!0),!0;if(Re===o.a.RIGHT)return Ve?Ue.onKeyDown(_e):(X.triggerOpenChange(!0),Bn(Ye,X.props.eventKey,!0)),!0;if(Re===o.a.LEFT){var $e;if(Ve)$e=Ue.onKeyDown(_e);else return;return $e||(X.triggerOpenChange(!1),$e=!0),$e}return Ve&&(Re===o.a.UP||Re===o.a.DOWN)?Ue.onKeyDown(_e):void 0},X.onOpenChange=function(_e){X.props.onOpenChange(_e)},X.onPopupVisibleChange=function(_e){X.triggerOpenChange(_e,_e?"mouseenter":"mouseleave")},X.onMouseEnter=function(_e){var Re=X.props,Ue=Re.eventKey,Ye=Re.onMouseEnter,Ve=Re.store;Bn(Ve,X.props.eventKey,!1),Ye({key:Ue,domEvent:_e})},X.onMouseLeave=function(_e){var Re=X.props,Ue=Re.parentMenu,Ye=Re.eventKey,Ve=Re.onMouseLeave;Ue.subMenuInstance=Object(u.a)(X),Ve({key:Ye,domEvent:_e})},X.onTitleMouseEnter=function(_e){var Re=X.props,Ue=Re.eventKey,Ye=Re.onItemHover,Ve=Re.onTitleMouseEnter;Ye({key:Ue,hover:!0}),Ve({key:Ue,domEvent:_e})},X.onTitleMouseLeave=function(_e){var Re=X.props,Ue=Re.parentMenu,Ye=Re.eventKey,Ve=Re.onItemHover,$e=Re.onTitleMouseLeave;Ue.subMenuInstance=Object(u.a)(X),Ve({key:Ye,hover:!1}),$e({key:Ye,domEvent:_e})},X.onTitleClick=function(_e){var Re=Object(u.a)(X),Ue=Re.props;if(Ue.onTitleClick({key:Ue.eventKey,domEvent:_e}),Ue.triggerSubMenuAction==="hover")return;X.triggerOpenChange(!X.getVisible(),"click"),Bn(Ue.store,X.props.eventKey,!1)},X.onSubMenuClick=function(_e){typeof X.props.onClick=="function"&&X.props.onClick(X.addKeyPath(_e))},X.onSelect=function(_e){X.props.onSelect(_e)},X.onDeselect=function(_e){X.props.onDeselect(_e)},X.getPrefixCls=function(){return"".concat(X.props.rootPrefixCls,"-submenu")},X.getActiveClassName=function(){return"".concat(X.getPrefixCls(),"-active")},X.getDisabledClassName=function(){return"".concat(X.getPrefixCls(),"-disabled")},X.getSelectedClassName=function(){return"".concat(X.getPrefixCls(),"-selected")},X.getOpenClassName=function(){return"".concat(X.props.rootPrefixCls,"-submenu-open")},X.getVisible=function(){return X.state.isOpen},X.getMode=function(){return X.state.mode},X.saveMenuInstance=function(_e){X.menuInstance=_e},X.addKeyPath=function(_e){return Object(U.a)(Object(U.a)({},_e),{},{keyPath:(_e.keyPath||[]).concat(X.props.eventKey)})},X.triggerOpenChange=function(_e,Re){var Ue=X.props.eventKey,Ye=function(){X.onOpenChange({key:Ue,item:Object(u.a)(X),trigger:Re,open:_e})};Re==="mouseenter"?X.mouseenterTimeout=setTimeout(function(){Ye()},0):Ye()},X.isChildrenSelected=function(){var _e={find:!1};return Ne(X.props.children,X.props.selectedKeys,_e),_e.find},X.isInlineMode=function(){return X.getMode()==="inline"},X.adjustWidth=function(){if(!X.subMenuTitle||!X.menuInstance)return;var _e=Je.findDOMNode(X.menuInstance);if(_e.offsetWidth>=X.subMenuTitle.offsetWidth)return;_e.style.minWidth="".concat(X.subMenuTitle.offsetWidth,"px")},X.saveSubMenuTitle=function(_e){X.subMenuTitle=_e},X.getBaseProps=function(){var _e=Object(u.a)(X),Re=_e.props,Ue=X.getMode();return{mode:Ue==="horizontal"?"vertical":Ue,visible:X.getVisible(),level:Re.level+1,inlineIndent:Re.inlineIndent,focusable:!1,onClick:X.onSubMenuClick,onSelect:X.onSelect,onDeselect:X.onDeselect,onDestroy:X.onDestroy,selectedKeys:Re.selectedKeys,eventKey:"".concat(Re.eventKey,"-menu-"),openKeys:Re.openKeys,motion:Re.motion,onOpenChange:X.onOpenChange,subMenuOpenDelay:Re.subMenuOpenDelay,parentMenu:Object(u.a)(X),subMenuCloseDelay:Re.subMenuCloseDelay,forceSubMenuRender:Re.forceSubMenuRender,triggerSubMenuAction:Re.triggerSubMenuAction,builtinPlacements:Re.builtinPlacements,defaultActiveFirst:Re.store.getState().defaultActiveFirst[le(Re.eventKey)],multiple:Re.multiple,prefixCls:Re.rootPrefixCls,id:X.internalMenuId,manualRef:X.saveMenuInstance,itemIcon:Re.itemIcon,expandIcon:Re.expandIcon,direction:Re.direction}},X.getMotion=function(_e,Re){var Ue=Object(u.a)(X),Ye=Ue.haveRendered,Ve=X.props,$e=Ve.motion,St=Ve.rootPrefixCls,Ft=Object(U.a)(Object(U.a)({},$e),{},{leavedClassName:"".concat(St,"-hidden"),removeOnLeave:!1,motionAppear:Ye||!Re||_e!=="inline"});return Ft};var re=ue.store,Z=ue.eventKey,ce=re.getState(),me=ce.defaultActiveFirst;X.isRootMenu=!1;var Te=!1;return me&&(Te=me[Z]),Bn(re,Z,Te),X.state={mode:ue.mode,isOpen:ue.isOpen},X}return Object(_.a)(Ee,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var X=this,re=this.props,Z=re.mode,ce=re.parentMenu,me=re.manualRef,Te=re.isOpen,_e=function(){X.setState({mode:Z,isOpen:Te})},Re=Te!==this.state.isOpen,Ue=Z!==this.state.mode;if((Ue||Re)&&(Qe.a.cancel(this.updateStateRaf),Ue?this.updateStateRaf=Object(Qe.a)(_e):_e()),me&&me(this),Z!=="horizontal"||!(ce==null?void 0:ce.isRootMenu)||!Te)return;this.minWidthTimeout=setTimeout(function(){return X.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var X=this.props,re=X.onDestroy,Z=X.eventKey;re&&re(Z),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Qe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(X,re){var Z=this.getBaseProps();return m.createElement(ui,Object(g.a)({},Z,{id:this.internalMenuId,className:X,style:re}),this.props.children)}},{key:"renderChildren",value:function(){var X=this,re=this.getBaseProps(),Z=re.mode,ce=re.visible,me=re.forceSubMenuRender,Te=re.direction,_e=this.getMotion(Z,ce);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ce||me,!this.haveOpened)return m.createElement("div",null);var Re=H()("".concat(re.prefixCls,"-sub"),Object(te.a)({},"".concat(re.prefixCls,"-rtl"),Te==="rtl"));return this.isInlineMode()?m.createElement($t,Object(g.a)({visible:re.visible,forceRender:me},_e),function(Ue){var Ye=Ue.className,Ve=Ue.style,$e=H()(Re,Ye);return X.renderPopupMenu($e,Ve)}):this.renderPopupMenu(Re)}},{key:"render",value:function(){var X,re,Z,ce=Object(U.a)({},this.props),me=this.getVisible(),Te=this.getPrefixCls(),_e=this.isInlineMode(),Re=this.getMode(),Ue=H()(Te,"".concat(Te,"-").concat(Re),(X={},Object(te.a)(X,ce.className,!!ce.className),Object(te.a)(X,this.getOpenClassName(),me),Object(te.a)(X,this.getActiveClassName(),ce.active||me&&!_e),Object(te.a)(X,this.getDisabledClassName(),ce.disabled),Object(te.a)(X,this.getSelectedClassName(),this.isChildrenSelected()),X));this.internalMenuId||(ce.eventKey?this.internalMenuId="".concat(ce.eventKey,"$Menu"):(Pn+=1,this.internalMenuId="$__$".concat(Pn,"$Menu")));var Ye={},Ve={},$e={};ce.disabled||(Ye={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Ve={onClick:this.onTitleClick},$e={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var St={},Ft=ce.direction,Nt=Ft==="rtl";_e&&(Nt?St.paddingRight=ce.inlineIndent*ce.level:St.paddingLeft=ce.inlineIndent*ce.level);var Wt={};this.getVisible()&&(Wt={"aria-owns":this.internalMenuId});var jt=null;Re!=="horizontal"&&(jt=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(jt=m.createElement(this.props.expandIcon,Object(U.a)({},this.props))));var Ut=m.createElement("div",Object(g.a)({ref:this.saveSubMenuTitle,style:St,className:"".concat(Te,"-title"),role:"button"},$e,Ve,{"aria-expanded":me},Wt,{"aria-haspopup":"true",title:typeof ce.title=="string"?ce.title:void 0}),ce.title,jt||m.createElement("i",{className:"".concat(Te,"-arrow")})),Bt=this.renderChildren(),tn=((re=ce.parentMenu)===null||re===void 0?void 0:re.isRootMenu)?ce.parentMenu.props.getPopupContainer:function(_n){return _n.parentNode},Gt=Nn[Re],xn=ce.popupOffset?{offset:ce.popupOffset}:{},ln=H()((Z={},Object(te.a)(Z,ce.popupClassName,ce.popupClassName&&!_e),Object(te.a)(Z,"".concat(Te,"-rtl"),Nt),Z)),Tt=ce.disabled,Et=ce.triggerSubMenuAction,Yt=ce.subMenuOpenDelay,Qt=ce.forceSubMenuRender,gt=ce.subMenuCloseDelay,nn=ce.builtinPlacements;ie.forEach(function(_n){return delete ce[_n]}),delete ce.onClick;var yn=Nt?Object(U.a)(Object(U.a)({},ki),nn):Object(U.a)(Object(U.a)({},pi),nn);delete ce.direction;var rn=this.getBaseProps(),fn=_e?null:this.getMotion(rn.mode,rn.visible);return m.createElement("li",Object(g.a)({},ce,Ye,{className:Ue,role:"menuitem"}),m.createElement(Ni,{prefixCls:Te,popupClassName:H()("".concat(Te,"-popup"),ln),getPopupContainer:tn,builtinPlacements:yn,popupPlacement:Gt,popupVisible:_e?!1:me,popupAlign:xn,popup:_e?null:Bt,action:Tt||_e?[]:[Et],mouseEnterDelay:Yt,mouseLeaveDelay:gt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Qt,popupMotion:fn},Ut),_e?Bt:null)}}]),Ee}(m.Component);wi.defaultProps={onMouseEnter:Y,onMouseLeave:Y,onTitleMouseEnter:Y,onTitleMouseLeave:Y,onTitleClick:Y,manualRef:Y,mode:"vertical",title:""};var oi=Object(d.b)(function(se,ve){var Ee=se.openKeys,ue=se.activeKey,X=se.selectedKeys,re=ve.eventKey,Z=ve.subMenuKey;return{isOpen:Ee.indexOf(re)>-1,active:ue[Z]===re,selectedKeys:X}})(wi);oi.isSubMenu=!0;var ei=oi,Ui="menuitem-overflowed",Bi=.5,Fi=function(se){Object(c.a)(Ee,se);var ve=Object(p.a)(Ee);function Ee(){var ue;return Object(E.a)(this,Ee),ue=ve.apply(this,arguments),ue.resizeObserver=null,ue.mutationObserver=null,ue.originalTotalWidth=0,ue.overflowedItems=[],ue.menuItemSizes=[],ue.cancelFrameId=null,ue.state={lastVisibleIndex:void 0},ue.childRef=m.createRef(),ue.getMenuItemNodes=function(){var X=ue.props.prefixCls,re=ue.childRef.current;return re?[].slice.call(re.children).filter(function(Z){return Z.className.split(" ").indexOf("".concat(X,"-overflowed-submenu"))<0}):[]},ue.getOverflowedSubMenuItem=function(X,re,Z){var ce=ue.props,me=ce.overflowedIndicator,Te=ce.level,_e=ce.mode,Re=ce.prefixCls,Ue=ce.theme;if(Te!==1||_e!=="horizontal")return null;var Ye=ue.props.children[0],Ve=Ye.props,$e=Ve.children,St=Ve.title,Ft=Ve.style,Nt=Object(O.a)(Ve,["children","title","style"]),Wt=Object(U.a)({},Ft),jt="".concat(X,"-overflowed-indicator"),Ut="".concat(X,"-overflowed-indicator");re.length===0&&Z!==!0?Wt=Object(U.a)(Object(U.a)({},Wt),{},{display:"none"}):Z&&(Wt=Object(U.a)(Object(U.a)({},Wt),{},{visibility:"hidden",position:"absolute"}),jt="".concat(jt,"-placeholder"),Ut="".concat(Ut,"-placeholder"));var Bt=Ue?"".concat(Re,"-").concat(Ue):"",tn={};return ie.forEach(function(Gt){Nt[Gt]!==void 0&&(tn[Gt]=Nt[Gt])}),m.createElement(ei,Object(g.a)({title:me,className:"".concat(Re,"-overflowed-submenu"),popupClassName:Bt},tn,{key:jt,eventKey:Ut,disabled:!1,style:Wt}),re)},ue.setChildrenWidthAndResize=function(){if(ue.props.mode!=="horizontal")return;var X=ue.childRef.current;if(!X)return;var re=X.children;if(!re||re.length===0)return;var Z=X.children[re.length-1];we(Z,"display","inline-block");var ce=ue.getMenuItemNodes(),me=ce.filter(function(Te){return Te.className.split(" ").indexOf(Ui)>=0});me.forEach(function(Te){we(Te,"display","inline-block")}),ue.menuItemSizes=ce.map(function(Te){return de(Te,!0)}),me.forEach(function(Te){we(Te,"display","none")}),ue.overflowedIndicatorWidth=de(X.children[X.children.length-1],!0),ue.originalTotalWidth=ue.menuItemSizes.reduce(function(Te,_e){return Te+_e},0),ue.handleResize(),we(Z,"display","none")},ue.handleResize=function(){if(ue.props.mode!=="horizontal")return;var X=ue.childRef.current;if(!X)return;var re=de(X);ue.overflowedItems=[];var Z=0,ce;ue.originalTotalWidth>re+Bi&&(ce=-1,ue.menuItemSizes.forEach(function(me){Z+=me,Z+ue.overflowedIndicatorWidth<=re&&(ce+=1)})),ue.setState({lastVisibleIndex:ce})},ue}return Object(_.a)(Ee,[{key:"componentDidMount",value:function(){var X=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var re=this.childRef.current;if(!re)return;this.resizeObserver=new Ke.default(function(Z){Z.forEach(function(){var ce=X.cancelFrameId;cancelAnimationFrame(ce),X.cancelFrameId=requestAnimationFrame(X.setChildrenWidthAndResize)})}),[].slice.call(re.children).concat(re).forEach(function(Z){X.resizeObserver.observe(Z)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){X.resizeObserver.disconnect(),[].slice.call(re.children).concat(re).forEach(function(Z){X.resizeObserver.observe(Z)}),X.setChildrenWidthAndResize()}),this.mutationObserver.observe(re,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(X){var re=this,Z=this.state.lastVisibleIndex;return(X||[]).reduce(function(ce,me,Te){var _e=me;if(re.props.mode==="horizontal"){var Re=re.getOverflowedSubMenuItem(me.props.eventKey,[]);Z!==void 0&&re.props.className.indexOf("".concat(re.props.prefixCls,"-root"))!==-1&&(Te>Z&&(_e=m.cloneElement(me,{style:{display:"none"},eventKey:"".concat(me.props.eventKey,"-hidden"),className:"".concat(Ui)})),Te===Z+1&&(re.overflowedItems=X.slice(Z+1).map(function(Ye){return m.cloneElement(Ye,{key:Ye.props.eventKey,mode:"vertical-left"})}),Re=re.getOverflowedSubMenuItem(me.props.eventKey,re.overflowedItems)));var Ue=[].concat(Object(A.a)(ce),[Re,_e]);return Te===X.length-1&&Ue.push(re.getOverflowedSubMenuItem(me.props.eventKey,[],!0)),Ue}return[].concat(Object(A.a)(ce),[_e])},[])}},{key:"render",value:function(){var X=this.props,re=X.visible,Z=X.prefixCls,ce=X.overflowedIndicator,me=X.mode,Te=X.level,_e=X.tag,Re=X.children,Ue=X.theme,Ye=Object(O.a)(X,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Ve=_e;return m.createElement(Ve,Object(g.a)({ref:this.childRef},Ye),this.renderChildren(Re))}}]),Ee}(m.Component);Fi.defaultProps={tag:"div",className:""};var gi=Fi;function vi(se){return se.length?se.every(function(ve){return!!ve.props.disabled}):!0}function Kn(se,ve,Ee){var ue=se.getState();se.setState({activeKey:Object(U.a)(Object(U.a)({},ue.activeKey),{},Object(te.a)({},ve,Ee))})}function Qn(se){return se.eventKey||"0-menu-"}function li(se,ve){var Ee=ve,ue=se.children,X=se.eventKey;if(Ee){var re;if(Ae(ue,function(Z,ce){Z&&Z.props&&!Z.props.disabled&&Ee===F(Z,X,ce)&&(re=!0)}),re)return Ee}return Ee=null,se.defaultActiveFirst&&Ae(ue,function(Z,ce){!Ee&&Z&&!Z.props.disabled&&(Ee=F(Z,X,ce))}),Ee}function Zn(se){if(!se)return;var ve=this.instanceArray.indexOf(se);ve!==-1?this.instanceArray[ve]=se:this.instanceArray.push(se)}var ji=function(se){Object(c.a)(Ee,se);var ve=Object(p.a)(Ee);function Ee(ue){var X;return Object(E.a)(this,Ee),X=ve.call(this,ue),X.onKeyDown=function(re,Z){var ce=re.keyCode,me;if(X.getFlatInstanceArray().forEach(function(_e){_e&&_e.props.active&&_e.onKeyDown&&(me=_e.onKeyDown(re))}),me)return 1;var Te=null;return(ce===o.a.UP||ce===o.a.DOWN)&&(Te=X.step(ce===o.a.UP?-1:1)),Te?(re.preventDefault(),Kn(X.props.store,Qn(X.props),Te.props.eventKey),typeof Z=="function"&&Z(Te),1):void 0},X.onItemHover=function(re){var Z=re.key,ce=re.hover;Kn(X.props.store,Qn(X.props),ce?Z:null)},X.onDeselect=function(re){X.props.onDeselect(re)},X.onSelect=function(re){X.props.onSelect(re)},X.onClick=function(re){X.props.onClick(re)},X.onOpenChange=function(re){X.props.onOpenChange(re)},X.onDestroy=function(re){X.props.onDestroy(re)},X.getFlatInstanceArray=function(){return X.instanceArray},X.step=function(re){var Z=X.getFlatInstanceArray(),ce=X.props.store.getState().activeKey[Qn(X.props)],me=Z.length;if(!me)return null;re<0&&(Z=Z.concat().reverse());var Te=-1;if(Z.every(function(Ye,Ve){return Ye&&Ye.props.eventKey===ce?(Te=Ve,!1):!0}),!X.props.defaultActiveFirst&&Te!==-1&&vi(Z.slice(Te,me-1)))return;var _e=(Te+1)%me,Re=_e;do{var Ue=Z[Re];if(!Ue||Ue.props.disabled)Re=(Re+1)%me;else return Ue}while(Re!==_e);return null},X.renderCommonMenuItem=function(re,Z,ce){var me=X.props.store.getState(),Te=Object(u.a)(X),_e=Te.props,Re=F(re,_e.eventKey,Z),Ue=re.props;if(!Ue||typeof re.type=="string")return re;var Ye=Re===me.activeKey,Ve=Object(U.a)(Object(U.a)({mode:Ue.mode||_e.mode,level:_e.level,inlineIndent:_e.inlineIndent,renderMenuItem:X.renderMenuItem,rootPrefixCls:_e.prefixCls,index:Z,parentMenu:_e.parentMenu,manualRef:Ue.disabled?void 0:Object(h.a)(re.ref,Zn.bind(Object(u.a)(X))),eventKey:Re,active:!Ue.disabled&&Ye,multiple:_e.multiple,onClick:function(St){(Ue.onClick||Y)(St),X.onClick(St)},onItemHover:X.onItemHover,motion:_e.motion,subMenuOpenDelay:_e.subMenuOpenDelay,subMenuCloseDelay:_e.subMenuCloseDelay,forceSubMenuRender:_e.forceSubMenuRender,onOpenChange:X.onOpenChange,onDeselect:X.onDeselect,onSelect:X.onSelect,builtinPlacements:_e.builtinPlacements,itemIcon:Ue.itemIcon||X.props.itemIcon,expandIcon:Ue.expandIcon||X.props.expandIcon},ce),{},{direction:_e.direction});return(_e.mode==="inline"||De())&&(Ve.triggerSubMenuAction="click"),m.cloneElement(re,Object(U.a)(Object(U.a)({},Ve),{},{key:Re||Z}))},X.renderMenuItem=function(re,Z,ce){if(!re)return null;var me=X.props.store.getState(),Te={openKeys:me.openKeys,selectedKeys:me.selectedKeys,triggerSubMenuAction:X.props.triggerSubMenuAction,subMenuKey:ce};return X.renderCommonMenuItem(re,Z,Te)},ue.store.setState({activeKey:Object(U.a)(Object(U.a)({},ue.store.getState().activeKey),{},Object(te.a)({},ue.eventKey,li(ue,ue.activeKey)))}),X.instanceArray=[],X}return Object(_.a)(Ee,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(X){return this.props.visible||X.visible||this.props.className!==X.className||!M()(this.props.style,X.style)}},{key:"componentDidUpdate",value:function(X){var re=this.props,Z="activeKey"in re?re.activeKey:re.store.getState().activeKey[Qn(re)],ce=li(re,Z);if(ce!==Z)Kn(re.store,Qn(re),ce);else if("activeKey"in X){var me=li(X,X.activeKey);ce!==me&&Kn(re.store,Qn(re),ce)}}},{key:"render",value:function(){var X=this,re=Object(g.a)({},this.props);this.instanceArray=[];var Z=H()(re.prefixCls,re.className,"".concat(re.prefixCls,"-").concat(re.mode)),ce={className:Z,role:re.role||"menu"};re.id&&(ce.id=re.id),re.focusable&&(ce.tabIndex=0,ce.onKeyDown=this.onKeyDown);var me=re.prefixCls,Te=re.eventKey,_e=re.visible,Re=re.level,Ue=re.mode,Ye=re.overflowedIndicator,Ve=re.theme;return ie.forEach(function($e){return delete re[$e]}),delete re.onClick,m.createElement(gi,Object(g.a)({},re,{prefixCls:me,mode:Ue,tag:"ul",level:Re,theme:Ve,visible:_e,overflowedIndicator:Ye},ce),Object(N.a)(re.children).map(function($e,St){return X.renderMenuItem($e,St,Te||"0-menu-")}))}}]),Ee}(m.Component);ji.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Y};var Hi=Object(d.b)()(ji),ui=Hi,qn=P("Kwbf");function yi(se,ve,Ee){var ue=se.prefixCls,X=se.motion,re=se.defaultMotions,Z=re===void 0?{}:re,ce=se.openAnimation,me=se.openTransitionName,Te=ve.switchingModeFromInline;if(X)return X;if(Object(D.a)(ce)==="object"&&ce)Object(qn.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ce=="string")return{motionName:"".concat(ue,"-open-").concat(ce)};if(me)return{motionName:me};var _e=Z[Ee];return _e||(Te?null:Z.other)}var Wi=function(se){Object(c.a)(Ee,se);var ve=Object(p.a)(Ee);function Ee(ue){var X;Object(E.a)(this,Ee),X=ve.call(this,ue),X.onSelect=function(ce){var me=Object(u.a)(X),Te=me.props;if(Te.selectable){var _e=X.store.getState(),Re=_e.selectedKeys,Ue=ce.key;Te.multiple?Re=Re.concat([Ue]):Re=[Ue],"selectedKeys"in Te||X.store.setState({selectedKeys:Re}),Te.onSelect(Object(U.a)(Object(U.a)({},ce),{},{selectedKeys:Re}))}},X.onClick=function(ce){var me=X.getRealMenuMode(),Te=Object(u.a)(X),_e=Te.store,Re=Te.props.onOpenChange;me!=="inline"&&!("openKeys"in X.props)&&(_e.setState({openKeys:[]}),Re([])),X.props.onClick(ce)},X.onKeyDown=function(ce,me){X.innerMenu.getWrappedInstance().onKeyDown(ce,me)},X.onOpenChange=function(ce){var me=Object(u.a)(X),Te=me.props,_e=X.store.getState().openKeys.concat(),Re=!1,Ue=function(Ve){var $e=!1;if(Ve.open)$e=_e.indexOf(Ve.key)===-1,$e&&_e.push(Ve.key);else{var St=_e.indexOf(Ve.key);$e=St!==-1,$e&&_e.splice(St,1)}Re=Re||$e};Array.isArray(ce)?ce.forEach(Ue):Ue(ce),Re&&("openKeys"in X.props||X.store.setState({openKeys:_e}),Te.onOpenChange(_e))},X.onDeselect=function(ce){var me=Object(u.a)(X),Te=me.props;if(Te.selectable){var _e=X.store.getState().selectedKeys.concat(),Re=ce.key,Ue=_e.indexOf(Re);Ue!==-1&&_e.splice(Ue,1),"selectedKeys"in Te||X.store.setState({selectedKeys:_e}),Te.onDeselect(Object(U.a)(Object(U.a)({},ce),{},{selectedKeys:_e}))}},X.onMouseEnter=function(ce){X.restoreModeVerticalFromInline();var me=X.props.onMouseEnter;me&&me(ce)},X.onTransitionEnd=function(ce){var me=ce.propertyName==="width"&&ce.target===ce.currentTarget,Te=ce.target.className,_e=Object.prototype.toString.call(Te)==="[object SVGAnimatedString]"?Te.animVal:Te,Re=ce.propertyName==="font-size"&&_e.indexOf("anticon")>=0;(me||Re)&&X.restoreModeVerticalFromInline()},X.setInnerMenu=function(ce){X.innerMenu=ce},X.isRootMenu=!0;var re=ue.defaultSelectedKeys,Z=ue.defaultOpenKeys;return"selectedKeys"in ue&&(re=ue.selectedKeys||[]),"openKeys"in ue&&(Z=ue.openKeys||[]),X.store=Object(d.c)({selectedKeys:re,openKeys:Z,activeKey:{"0-menu-":li(ue,ue.activeKey)}}),X.state={switchingModeFromInline:!1,prevProps:ue,inlineOpenKeys:[],store:X.store},X}return Object(_.a)(Ee,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(X){var re=this.props,Z=re.siderCollapsed,ce=re.inlineCollapsed,me=re.onOpenChange;(!X.inlineCollapsed&&ce||!X.siderCollapsed&&Z)&&me([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var X=this.props.collapsedWidth,re=this.store,Z=this.prevOpenKeys,ce=this.getInlineCollapsed()&&(X===0||X==="0"||X==="0px");ce?(this.prevOpenKeys=re.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Z&&(this.store.setState({openKeys:Z}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var X=this.props.mode,re=this.state.switchingModeFromInline,Z=this.getInlineCollapsed();return re&&Z?"inline":Z?"vertical":X}},{key:"getInlineCollapsed",value:function(){var X=this.props,re=X.inlineCollapsed,Z=X.siderCollapsed;return Z!==void 0?Z:re}},{key:"restoreModeVerticalFromInline",value:function(){var X=this.state.switchingModeFromInline;X&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var X=Object(U.a)({},Object(x.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),re=this.getRealMenuMode();return X.className+=" ".concat(X.prefixCls,"-root"),X.direction==="rtl"&&(X.className+=" ".concat(X.prefixCls,"-rtl")),X=Object(U.a)(Object(U.a)({},X),{},{mode:re,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:yi(this.props,this.state,re)}),delete X.openAnimation,delete X.openTransitionName,m.createElement(d.a,{store:this.store},m.createElement(ui,Object(g.a)({},X,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(X,re){var Z=re.prevProps,ce=re.store,me=ce.getState(),Te={},_e={prevProps:X};return Z.mode==="inline"&&X.mode!=="inline"&&(_e.switchingModeFromInline=!0),"openKeys"in X?Te.openKeys=X.openKeys||[]:((X.inlineCollapsed&&!Z.inlineCollapsed||X.siderCollapsed&&!Z.siderCollapsed)&&(_e.switchingModeFromInline=!0,_e.inlineOpenKeys=me.openKeys,Te.openKeys=[]),(!X.inlineCollapsed&&Z.inlineCollapsed||!X.siderCollapsed&&Z.siderCollapsed)&&(Te.openKeys=re.inlineOpenKeys,_e.inlineOpenKeys=[])),Object.keys(Te).length&&ce.setState(Te),_e}}]),Ee}(m.Component);Wi.defaultProps={selectable:!0,onClick:Y,onSelect:Y,onOpenChange:Y,onDeselect:Y,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:m.createElement("span",null,"\xB7\xB7\xB7")};var Ci=Wi,ti=function(se){Object(c.a)(Ee,se);var ve=Object(p.a)(Ee);function Ee(){var ue;return Object(E.a)(this,Ee),ue=ve.apply(this,arguments),ue.onKeyDown=function(X){var re=X.keyCode;return re===o.a.ENTER?(ue.onClick(X),!0):void 0},ue.onMouseLeave=function(X){var re=ue.props,Z=re.eventKey,ce=re.onItemHover,me=re.onMouseLeave;ce({key:Z,hover:!1}),me({key:Z,domEvent:X})},ue.onMouseEnter=function(X){var re=ue.props,Z=re.eventKey,ce=re.onItemHover,me=re.onMouseEnter;ce({key:Z,hover:!0}),me({key:Z,domEvent:X})},ue.onClick=function(X){var re=ue.props,Z=re.eventKey,ce=re.multiple,me=re.onClick,Te=re.onSelect,_e=re.onDeselect,Re=re.isSelected,Ue={key:Z,keyPath:[Z],item:Object(u.a)(ue),domEvent:X};me(Ue),ce?Re?_e(Ue):Te(Ue):Re||Te(Ue)},ue.saveNode=function(X){ue.node=X},ue}return Object(_.a)(Ee,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var X=this.props;X.onDestroy&&X.onDestroy(X.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var X,re=Object(U.a)({},this.props),Z=H()(this.getPrefixCls(),re.className,(X={},Object(te.a)(X,this.getActiveClassName(),!re.disabled&&re.active),Object(te.a)(X,this.getSelectedClassName(),re.isSelected),Object(te.a)(X,this.getDisabledClassName(),re.disabled),X)),ce=Object(U.a)(Object(U.a)({},re.attribute),{},{title:typeof re.title=="string"?re.title:void 0,className:Z,role:re.role||"menuitem","aria-disabled":re.disabled});re.role==="option"?ce=Object(U.a)(Object(U.a)({},ce),{},{role:"option","aria-selected":re.isSelected}):(re.role===null||re.role==="none")&&(ce.role="none");var me={onClick:re.disabled?null:this.onClick,onMouseLeave:re.disabled?null:this.onMouseLeave,onMouseEnter:re.disabled?null:this.onMouseEnter},Te=Object(U.a)({},re.style);re.mode==="inline"&&(re.direction==="rtl"?Te.paddingRight=re.inlineIndent*re.level:Te.paddingLeft=re.inlineIndent*re.level),ie.forEach(function(Re){return delete re[Re]}),delete re.direction;var _e=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(_e=m.createElement(this.props.itemIcon,this.props)),m.createElement("li",Object(g.a)({},Object(x.a)(re,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ce,me,{style:Te,ref:this.saveNode}),re.children,_e)}}]),Ee}(m.Component);ti.isMenuItem=!0,ti.defaultProps={onSelect:Y,onMouseEnter:Y,onMouseLeave:Y,manualRef:Y};var ci=Object(d.b)(function(se,ve){var Ee=se.activeKey,ue=se.selectedKeys,X=ve.eventKey,re=ve.subMenuKey;return{active:Ee[re]===X,isSelected:Array.isArray(ue)?ue.indexOf(X)!==-1:ue===X}})(ti),Ai=ci,Gn=function(se){Object(c.a)(Ee,se);var ve=Object(p.a)(Ee);function Ee(){var ue;return Object(E.a)(this,Ee),ue=ve.apply(this,arguments),ue.renderInnerMenuItem=function(X){var re=ue.props,Z=re.renderMenuItem,ce=re.index;return Z(X,ce,ue.props.subMenuKey)},ue}return Object(_.a)(Ee,[{key:"render",value:function(){var X=Object(g.a)({},this.props),re=X.className,Z=re===void 0?"":re,ce=X.rootPrefixCls,me="".concat(ce,"-item-group-title"),Te="".concat(ce,"-item-group-list"),_e=X.title,Re=X.children;return ie.forEach(function(Ue){return delete X[Ue]}),delete X.direction,m.createElement("li",Object(g.a)({},X,{onClick:function(Ye){return Ye.stopPropagation()},className:"".concat(Z," ").concat(ce,"-item-group")}),m.createElement("div",{className:me,title:typeof _e=="string"?_e:void 0},_e),m.createElement("ul",{className:Te},m.Children.map(Re,this.renderInnerMenuItem)))}}]),Ee}(m.Component);Gn.isMenuItemGroup=!0,Gn.defaultProps={disabled:!0};var $i=Gn,Oi=function(ve){var Ee=ve.className,ue=ve.rootPrefixCls,X=ve.style;return m.createElement("li",{className:"".concat(Ee," ").concat(ue,"-item-divider"),style:X})};Oi.defaultProps={disabled:!0,className:"",style:{}};var er=Oi,Ki=Ci,Ri=P("eDIo");function kn(se,ve){var Ee=se.prefixCls,ue=se.editable,X=se.locale,re=se.style;return!ue||ue.showAdd===!1?null:m.createElement("button",{ref:ve,type:"button",className:"".concat(Ee,"-nav-add"),style:re,"aria-label":(X==null?void 0:X.addAriaLabel)||"Add tab",onClick:function(ce){ue.onEdit("add",{event:ce})}},ue.addIcon||"+")}var di=m.forwardRef(kn);function Gi(se,ve){var Ee=se.prefixCls,ue=se.id,X=se.tabs,re=se.locale,Z=se.mobile,ce=se.moreIcon,me=ce===void 0?"More":ce,Te=se.moreTransitionName,_e=se.style,Re=se.className,Ue=se.editable,Ye=se.tabBarGutter,Ve=se.rtl,$e=se.onTabClick,St=Object(m.useState)(!1),Ft=Object(k.a)(St,2),Nt=Ft[0],Wt=Ft[1],jt=Object(m.useState)(null),Ut=Object(k.a)(jt,2),Bt=Ut[0],tn=Ut[1],Gt="".concat(ue,"-more-popup"),xn="".concat(Ee,"-dropdown"),ln=Bt!==null?"".concat(Gt,"-").concat(Bt):null,Tt=re==null?void 0:re.dropdownAriaLabel,Et=m.createElement(Ki,{onClick:function(fn){var _n=fn.key,In=fn.domEvent;$e(_n,In),Wt(!1)},id:Gt,tabIndex:-1,role:"listbox","aria-activedescendant":ln,selectedKeys:[Bt],"aria-label":Tt!==void 0?Tt:"expanded dropdown"},X.map(function(rn){return m.createElement(Ai,{key:rn.key,id:"".concat(Gt,"-").concat(rn.key),role:"option","aria-controls":ue&&"".concat(ue,"-panel-").concat(rn.key),disabled:rn.disabled},rn.tab)}));function Yt(rn){for(var fn=X.filter(function(jn){return!jn.disabled}),_n=fn.findIndex(function(jn){return jn.key===Bt})||0,In=fn.length,Fn=0;Fn<In;Fn+=1){_n=(_n+rn+In)%In;var Tn=fn[_n];if(!Tn.disabled){tn(Tn.key);return}}}function Qt(rn){var fn=rn.which;if(!Nt){[o.a.DOWN,o.a.SPACE,o.a.ENTER].includes(fn)&&(Wt(!0),rn.preventDefault());return}switch(fn){case o.a.UP:Yt(-1),rn.preventDefault();break;case o.a.DOWN:Yt(1),rn.preventDefault();break;case o.a.ESC:Wt(!1);break;case o.a.SPACE:case o.a.ENTER:Bt!==null&&$e(Bt,rn);break}}Object(m.useEffect)(function(){var rn=document.getElementById(ln);rn&&rn.scrollIntoView&&rn.scrollIntoView(!1)},[Bt]),Object(m.useEffect)(function(){Nt||tn(null)},[Nt]);var gt=Object(te.a)({},Ve?"marginLeft":"marginRight",Ye);X.length||(gt.visibility="hidden",gt.order=1);var nn=H()(Object(te.a)({},"".concat(xn,"-rtl"),Ve)),yn=Z?null:m.createElement(Ri.a,{prefixCls:xn,overlay:Et,trigger:["hover"],visible:Nt,transitionName:Te,onVisibleChange:Wt,overlayClassName:nn,mouseEnterDelay:.1,mouseLeaveDelay:.1},m.createElement("button",{type:"button",className:"".concat(Ee,"-nav-more"),style:gt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Gt,id:"".concat(ue,"-more"),"aria-expanded":Nt,onKeyDown:Qt},me));return m.createElement("div",{className:H()("".concat(Ee,"-nav-operations"),Re),style:_e,ref:ve},yn,m.createElement(di,{prefixCls:Ee,locale:re,editable:Ue}))}var tr=m.forwardRef(Gi),bi=Object(m.createContext)(null),Ht=.1,Vt=.01,vn=20,Cn=Math.pow(.995,vn);function Rn(){var se=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(se)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(se.substr(0,4)))}function zi(se,ve){var Ee=Object(m.useState)(),ue=Object(k.a)(Ee,2),X=ue[0],re=ue[1],Z=Object(m.useState)(0),ce=Object(k.a)(Z,2),me=ce[0],Te=ce[1],_e=Object(m.useState)(0),Re=Object(k.a)(_e,2),Ue=Re[0],Ye=Re[1],Ve=Object(m.useState)(),$e=Object(k.a)(Ve,2),St=$e[0],Ft=$e[1],Nt=Object(m.useRef)();function Wt(Tt){var Et=Tt.touches[0],Yt=Et.screenX,Qt=Et.screenY;re({x:Yt,y:Qt}),window.clearInterval(Nt.current)}function jt(Tt){if(!X)return;Tt.preventDefault();var Et=Tt.touches[0],Yt=Et.screenX,Qt=Et.screenY;re({x:Yt,y:Qt});var gt=Yt-X.x,nn=Qt-X.y;ve(gt,nn);var yn=Date.now();Te(yn),Ye(yn-me),Ft({x:gt,y:nn})}function Ut(){if(!X)return;if(re(null),Ft(null),St){var Tt=St.x/Ue,Et=St.y/Ue,Yt=Math.abs(Tt),Qt=Math.abs(Et);if(Math.max(Yt,Qt)<Ht)return;var gt=Tt,nn=Et;Nt.current=window.setInterval(function(){if(Math.abs(gt)<Vt&&Math.abs(nn)<Vt){window.clearInterval(Nt.current);return}gt*=Cn,nn*=Cn,ve(gt*vn,nn*vn)},vn)}}var Bt=Object(m.useRef)(0),tn=Object(m.useRef)(!1),Gt=Object(m.useRef)();function xn(Tt){var Et=Tt.deltaX,Yt=Tt.deltaY,Qt=0,gt=Math.abs(Et),nn=Math.abs(Yt);gt===nn?Qt=Gt.current==="x"?Et:Yt:gt>nn?(Qt=Et,Gt.current="x"):(Qt=Yt,Gt.current="y");var yn=Date.now();yn-Bt.current>100&&(tn.current=!1),(ve(-Qt,-Qt)||tn.current)&&(Tt.preventDefault(),tn.current=!0),Bt.current=yn}var ln=Object(m.useRef)(null);ln.current={onTouchStart:Wt,onTouchMove:jt,onTouchEnd:Ut,onWheel:xn},m.useEffect(function(){function Tt(gt){ln.current.onTouchStart(gt)}function Et(gt){ln.current.onTouchMove(gt)}function Yt(gt){ln.current.onTouchEnd(gt)}function Qt(gt){ln.current.onWheel(gt)}return document.addEventListener("touchmove",Et,{passive:!1}),document.addEventListener("touchend",Yt,{passive:!1}),se.current.addEventListener("touchstart",Tt,{passive:!1}),se.current.addEventListener("wheel",Qt),function(){document.removeEventListener("touchmove",Et),document.removeEventListener("touchend",Yt)}},[])}function Ii(){var se=Object(m.useRef)(new Map);function ve(ue){return se.current.has(ue)||se.current.set(ue,m.createRef()),se.current.get(ue)}function Ee(ue){se.current.delete(ue)}return[ve,Ee]}function Vi(se,ve){var Ee=m.useRef(se),ue=m.useState({}),X=Object(k.a)(ue,2),re=X[1];function Z(ce){var me=typeof ce=="function"?ce(Ee.current):ce;me!==Ee.current&&ve(me,Ee.current),Ee.current=me,re({})}return[Ee.current,Z]}var Yi=function(ve){var Ee=ve.position,ue=ve.prefixCls,X=ve.extra;if(!X)return null;var re,Z=X;return Ee==="right"&&(re=Z.right||!Z.left&&Z||null),Ee==="left"&&(re=Z.left||null),re?m.createElement("div",{className:"".concat(ue,"-extra-content")},re):null};function nr(se,ve){var Ee,ue=m.useContext(bi),X=ue.prefixCls,re=ue.tabs,Z=se.className,ce=se.style,me=se.id,Te=se.animated,_e=se.activeKey,Re=se.rtl,Ue=se.extra,Ye=se.editable,Ve=se.locale,$e=se.tabPosition,St=se.tabBarGutter,Ft=se.children,Nt=se.onTabClick,Wt=se.onTabScroll,jt=Object(m.useRef)(),Ut=Object(m.useRef)(),Bt=Object(m.useRef)(),tn=Object(m.useRef)(),Gt=Ii(),xn=Object(k.a)(Gt,2),ln=xn[0],Tt=xn[1],Et=$e==="top"||$e==="bottom",Yt=Vi(0,function(un,Xt){Et&&Wt&&Wt({direction:un>Xt?"left":"right"})}),Qt=Object(k.a)(Yt,2),gt=Qt[0],nn=Qt[1],yn=Vi(0,function(un,Xt){!Et&&Wt&&Wt({direction:un>Xt?"top":"bottom"})}),rn=Object(k.a)(yn,2),fn=rn[0],_n=rn[1],In=Object(m.useState)(0),Fn=Object(k.a)(In,2),Tn=Fn[0],jn=Fn[1],ni=Object(m.useState)(0),zn=Object(k.a)(ni,2),Vn=zn[0],wn=zn[1],Un=Object(m.useState)(0),Dn=Object(k.a)(Un,2),An=Dn[0],_i=Dn[1],Ei=Object(m.useState)(0),Di=Object(k.a)(Ei,2),mn=Di[0],hi=Di[1],Li=Object(m.useState)(null),bn=Object(k.a)(Li,2),sn=bn[0],Ln=bn[1],Vr=Object(m.useState)(null),xr=Object(k.a)(Vr,2),Xi=xr[0],Yr=xr[1],Xr=Object(m.useState)(0),Tr=Object(k.a)(Xr,2),Jr=Tr[0],Qr=Tr[1],Zr=Object(m.useState)(0),Sr=Object(k.a)(Zr,2),qr=Sr[0],$r=Sr[1],ea=r(new Map),wr=Object(k.a)(ea,2),ta=wr[0],na=wr[1],hr=t(re,ta,Tn),Cr="".concat(X,"-nav-operations-hidden"),ir=0,rr=0;Et?Re?(ir=0,rr=Math.max(0,Tn-sn)):(ir=Math.min(0,sn-Tn),rr=0):(ir=Math.min(0,Xi-Vn),rr=0);function fr(un){return un<ir?[ir,!1]:un>rr?[rr,!1]:[un,!0]}var Ar=Object(m.useRef)(),ia=Object(m.useState)(),Or=Object(k.a)(ia,2),pr=Or[0],Rr=Or[1];function mr(){Rr(Date.now())}function gr(){window.clearTimeout(Ar.current)}zi(jt,function(un,Xt){var On=!1;function Yn(sr,or){sr(function(lr){var ur=fr(lr+or),Ji=Object(k.a)(ur,2),_r=Ji[0],Er=Ji[1];return On=Er,_r})}if(Et){if(sn>=Tn)return On;Yn(nn,un)}else{if(Xi>=Vn)return On;Yn(_n,Xt)}return gr(),mr(),On}),Object(m.useEffect)(function(){return gr(),pr&&(Ar.current=window.setTimeout(function(){Rr(0)},100)),gr},[pr]);function Ir(){var un=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_e,Xt=hr.get(un);if(!Xt)return;if(Et){var On=gt;Re?Xt.right<gt?On=Xt.right:Xt.right+Xt.width>gt+sn&&(On=Xt.right+Xt.width-sn):Xt.left<-gt?On=-Xt.left:Xt.left+Xt.width>-gt+sn&&(On=-(Xt.left+Xt.width-sn)),_n(0),nn(fr(On)[0])}else{var Yn=fn;Xt.top<-fn?Yn=-Xt.top:Xt.top+Xt.height>-fn+Xi&&(Yn=-(Xt.top+Xt.height-Xi)),nn(0),_n(fr(Yn)[0])}}var ra=y(hr,{width:sn,height:Xi,left:gt,top:fn},{width:An,height:mn},{width:Jr,height:qr},Object(U.a)(Object(U.a)({},se),{},{tabs:re})),Dr=Object(k.a)(ra,2),aa=Dr[0],sa=Dr[1],oa=re.map(function(un){var Xt=un.key;return m.createElement(i,{id:me,prefixCls:X,key:Xt,rtl:Re,tab:un,closable:un.closable,editable:Ye,active:Xt===_e,tabPosition:$e,tabBarGutter:St,renderWrapper:Ft,removeAriaLabel:Ve==null?void 0:Ve.removeAriaLabel,ref:ln(Xt),onClick:function(Yn){Nt(Xt,Yn)},onRemove:function(){Tt(Xt)},onFocus:function(){Ir(Xt),mr(),Re||(jt.current.scrollLeft=0),jt.current.scrollTop=0}})}),vr=a(function(){var un,Xt,On,Yn,sr,or,lr,ur,Ji,_r=((un=jt.current)===null||un===void 0?void 0:un.offsetWidth)||0,Er=((Xt=jt.current)===null||Xt===void 0?void 0:Xt.offsetHeight)||0,Fr=((On=tn.current)===null||On===void 0?void 0:On.offsetWidth)||0,jr=((Yn=tn.current)===null||Yn===void 0?void 0:Yn.offsetHeight)||0,fa=((sr=Bt.current)===null||sr===void 0?void 0:sr.offsetWidth)||0,pa=((or=Bt.current)===null||or===void 0?void 0:or.offsetHeight)||0;Ln(_r),Yr(Er),Qr(Fr),$r(jr);var Hr=(((lr=Ut.current)===null||lr===void 0?void 0:lr.offsetWidth)||0)-Fr,Wr=(((ur=Ut.current)===null||ur===void 0?void 0:ur.offsetHeight)||0)-jr;jn(Hr),wn(Wr);var Kr=(Ji=Bt.current)===null||Ji===void 0?void 0:Ji.className.includes(Cr);_i(Hr-(Kr?0:fa)),hi(Wr-(Kr?0:pa)),na(function(){var Gr=new Map;return re.forEach(function(ma){var zr=ma.key,cr=ln(zr).current;cr&&Gr.set(zr,{width:cr.offsetWidth,height:cr.offsetHeight,left:cr.offsetLeft,top:cr.offsetTop})}),Gr})}),la=re.slice(0,aa),ua=re.slice(sa+1),Lr=[].concat(Object(A.a)(la),Object(A.a)(ua)),ca=Object(m.useState)(),Mr=Object(k.a)(ca,2),da=Mr[0],ha=Mr[1],xi=hr.get(_e),Pr=Object(m.useRef)();function Nr(){f.a.cancel(Pr.current)}Object(m.useEffect)(function(){var un={};return xi&&(Et?(Re?un.right=xi.right:un.left=xi.left,un.width=xi.width):(un.top=xi.top,un.height=xi.height)),Nr(),Pr.current=f()(function(){ha(un)}),Nr},[xi,Et,Re]),Object(m.useEffect)(function(){Ir()},[_e,xi,hr,Et]),Object(m.useEffect)(function(){vr()},[Re,St,_e,re.map(function(un){return un.key}).join("_")]);var kr=!!Lr.length,ar="".concat(X,"-nav-wrap"),yr,br,Ur,Br;return Et?Re?(br=gt>0,yr=gt+sn<Tn):(yr=gt<0,br=-gt+sn<Tn):(Ur=fn<0,Br=-fn+Xi<Vn),m.createElement("div",{ref:ve,role:"tablist",className:H()("".concat(X,"-nav"),Z),style:ce,onKeyDown:function(){mr()}},m.createElement(Yi,{position:"left",extra:Ue,prefixCls:X}),m.createElement(l.a,{onResize:vr},m.createElement("div",{className:H()(ar,(Ee={},Object(te.a)(Ee,"".concat(ar,"-ping-left"),yr),Object(te.a)(Ee,"".concat(ar,"-ping-right"),br),Object(te.a)(Ee,"".concat(ar,"-ping-top"),Ur),Object(te.a)(Ee,"".concat(ar,"-ping-bottom"),Br),Ee)),ref:jt},m.createElement(l.a,{onResize:vr},m.createElement("div",{ref:Ut,className:"".concat(X,"-nav-list"),style:{transform:"translate(".concat(gt,"px, ").concat(fn,"px)"),transition:pr?"none":void 0}},oa,m.createElement(di,{ref:tn,prefixCls:X,locale:Ve,editable:Ye,style:{visibility:kr?"hidden":null}}),m.createElement("div",{className:H()("".concat(X,"-ink-bar"),Object(te.a)({},"".concat(X,"-ink-bar-animated"),Te.inkBar)),style:da}))))),m.createElement(tr,Object.assign({},se,{ref:Bt,prefixCls:X,tabs:Lr,className:!kr&&Cr})),m.createElement(Yi,{position:"right",extra:Ue,prefixCls:X}))}var dr=m.forwardRef(nr);function je(se){var ve=se.id,Ee=se.activeKey,ue=se.animated,X=se.tabPosition,re=se.rtl,Z=se.destroyInactiveTabPane,ce=m.useContext(bi),me=ce.prefixCls,Te=ce.tabs,_e=ue.tabPane,Re=Te.findIndex(function(Ue){return Ue.key===Ee});return m.createElement("div",{className:H()("".concat(me,"-content-holder"))},m.createElement("div",{className:H()("".concat(me,"-content"),"".concat(me,"-content-").concat(X),Object(te.a)({},"".concat(me,"-content-animated"),_e)),style:Re&&_e?Object(te.a)({},re?"marginRight":"marginLeft","-".concat(Re,"00%")):null},Te.map(function(Ue){return m.cloneElement(Ue.node,{key:Ue.key,prefixCls:me,tabKey:Ue.key,id:ve,animated:_e,active:Ue.key===Ee,destroyInactiveTabPane:Z})})))}function He(se){var ve=se.prefixCls,Ee=se.forceRender,ue=se.className,X=se.style,re=se.id,Z=se.active,ce=se.animated,me=se.destroyInactiveTabPane,Te=se.tabKey,_e=se.children,Re=m.useState(Ee),Ue=Object(k.a)(Re,2),Ye=Ue[0],Ve=Ue[1];m.useEffect(function(){Z?Ve(!0):me&&Ve(!1)},[Z,me]);var $e={};return Z||(ce?($e.visibility="hidden",$e.height=0,$e.overflowY="hidden"):$e.display="none"),m.createElement("div",{id:re&&"".concat(re,"-panel-").concat(Te),role:"tabpanel",tabIndex:Z?0:-1,"aria-labelledby":re&&"".concat(re,"-tab-").concat(Te),"aria-hidden":!Z,style:Object(U.a)(Object(U.a)({},$e),X),className:H()("".concat(ve,"-tabpane"),Z&&"".concat(ve,"-tabpane-active"),ue)},(Z||Ye||Ee)&&_e)}var Ge=0;function et(se){return Object(N.a)(se).map(function(ve){if(m.isValidElement(ve)){var Ee=ve.key!==void 0?String(ve.key):void 0;return Object(U.a)(Object(U.a)({key:Ee},ve.props),{},{node:ve})}return null}).filter(function(ve){return ve})}function xt(se,ve){var Ee,ue=se.id,X=se.prefixCls,re=X===void 0?"rc-tabs":X,Z=se.className,ce=se.children,me=se.direction,Te=se.activeKey,_e=se.defaultActiveKey,Re=se.editable,Ue=se.animated,Ye=se.tabPosition,Ve=Ye===void 0?"top":Ye,$e=se.tabBarGutter,St=se.tabBarStyle,Ft=se.tabBarExtraContent,Nt=se.locale,Wt=se.moreIcon,jt=se.moreTransitionName,Ut=se.destroyInactiveTabPane,Bt=se.renderTabBar,tn=se.onChange,Gt=se.onTabClick,xn=se.onTabScroll,ln=Object(O.a)(se,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Tt=et(ce),Et=me==="rtl",Yt;Ue===!1?Yt={inkBar:!1,tabPane:!1}:Yt=Object(U.a)({inkBar:!0,tabPane:!1},Ue!==!0?Ue:null);var Qt=Object(m.useState)(!1),gt=Object(k.a)(Qt,2),nn=gt[0],yn=gt[1];Object(m.useEffect)(function(){yn(Rn())},[]);var rn=Object(e.a)(function(){var mn;return(mn=Tt[0])===null||mn===void 0?void 0:mn.key},{value:Te,defaultValue:_e}),fn=Object(k.a)(rn,2),_n=fn[0],In=fn[1],Fn=Object(m.useState)(function(){return Tt.findIndex(function(mn){return mn.key===_n})}),Tn=Object(k.a)(Fn,2),jn=Tn[0],ni=Tn[1];Object(m.useEffect)(function(){var mn=Tt.findIndex(function(Li){return Li.key===_n});if(mn===-1){var hi;mn=Math.max(0,Math.min(jn,Tt.length-1)),In((hi=Tt[mn])===null||hi===void 0?void 0:hi.key)}ni(mn)},[Tt.map(function(mn){return mn.key}).join("_"),_n,jn]);var zn=Object(e.a)(null,{value:ue}),Vn=Object(k.a)(zn,2),wn=Vn[0],Un=Vn[1],Dn=Ve;nn&&!["left","right"].includes(Ve)&&(Dn="top"),Object(m.useEffect)(function(){ue||(Un("rc-tabs-".concat(Ge)),Ge+=1)},[]);function An(mn,hi){Gt==null||Gt(mn,hi),In(mn),tn==null||tn(mn)}var _i={id:wn,activeKey:_n,animated:Yt,tabPosition:Dn,rtl:Et,mobile:nn},Ei,Di=Object(U.a)(Object(U.a)({},_i),{},{editable:Re,locale:Nt,moreIcon:Wt,moreTransitionName:jt,tabBarGutter:$e,onTabClick:An,onTabScroll:xn,extra:Ft,style:St,panes:ce});return Bt?Ei=Bt(Di,dr):Ei=m.createElement(dr,Object.assign({},Di)),m.createElement(bi.Provider,{value:{tabs:Tt,prefixCls:re}},m.createElement("div",Object.assign({ref:ve,id:ue,className:H()(re,"".concat(re,"-").concat(Dn),(Ee={},Object(te.a)(Ee,"".concat(re,"-mobile"),nn),Object(te.a)(Ee,"".concat(re,"-editable"),Re),Object(te.a)(Ee,"".concat(re,"-rtl"),Et),Ee),Z)},ln),Ei,m.createElement(je,Object.assign({destroyInactiveTabPane:Ut},_i,{animated:Yt}))))}var bt=m.forwardRef(xt);bt.TabPane=He;var hn=bt,En=oe.b=hn},n6Qo:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return N});var te=P("q1tI"),k=P("biw7"),O=P("fyJ8");function U(e){var A=e.className,v=e.index,f=e.children,l=e.colSpan,a=e.rowSpan,r=te.useContext(k.a),o=r.prefixCls,s=r.fixedInfoList,i=s[v];return te.createElement(O.a,Object.assign({className:A,index:v,component:"td",prefixCls:o,record:null,dataIndex:null,render:function(){return{children:f,props:{colSpan:l,rowSpan:a}}}},i))}function m(e){return te.createElement("tr",Object.assign({},e))}function S(e){var A=e.children,v=te.useContext(k.a),f=v.prefixCls;return te.createElement("tfoot",{className:"".concat(f,"-summary")},A)}var H=oe.b=S,N={Cell:U,Row:m}},nEHx:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return te});var te;(function(k){k.DARK="dark",k.LIGHT="light",k.HIGH_CONTRAST="hc"})(te||(te={}))},nnTU:function(Be,oe,P){"use strict";P.d(oe,"b",function(){return H}),P.d(oe,"a",function(){return N});var te=P("MI8n"),k=P("JYp7"),O=P("pmY6"),U=P("24hK"),m=P("746U"),S=P("Cg/j");const H=Object(S.c)("commandService"),N=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new te.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,A){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!A)throw new Error("invalid command");return this.registerCommand({id:e,handler:A})}if(e.description){const r=[];for(let s of e.description.args)r.push(s.constraint);const o=e.handler;e.handler=function(s,...i){return Object(m.o)(i,r),o(s,...i)}}const{id:v}=e;let f=this._commands.get(v);f||(f=new U.a,this._commands.set(v,f));let l=f.unshift(e),a=Object(O.i)(()=>{l();const r=this._commands.get(v);(r==null?void 0:r.isEmpty())&&this._commands.delete(v)});return this._onDidRegisterCommand.fire(v),a}registerCommandAlias(e,A){return N.registerCommand(e,(v,...f)=>v.get(H).executeCommand(A,...f))}getCommand(e){const A=this._commands.get(e);return!A||A.isEmpty()?void 0:k.a.first(A)}getCommands(){const e=new Map;for(const A of this._commands.keys()){const v=this.getCommand(A);v&&e.set(A,v)}return e}};N.registerCommand("noop",()=>{})},p5ED:function(Be,oe,P){"use strict";var te=P("+L6B"),k=P("2/Rp"),O=P("5Dmo"),U=P("3S7+"),m=P("k1fw"),S=P("9og8"),H=P("tJVT"),N=P("WmNS"),e=P.n(N),A=P("q1tI"),v=P.n(A),f=P("vHTk"),l=P.n(f),a=P("yEEn"),r=P("ZW9T"),o=P("1vsH"),s=P("V0Rq"),i=P("m3rI");oe.a=function(n){var t,b,y,g,E,_,u,c=n.editOffice,p=c===void 0?"view":c,d=n.data,x=n.theme,h=n.type,T=n.filename,M=n.monacoEditor,D=n.className,w=n.style,C=n.close,j=n.onClose,L=n.hasMask,z=n.disabledDownload,$=Object(A.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),he=Object(H.a)($,2),fe=he[0],Ie=he[1],Se=Object(A.useState)(""),pe=Object(H.a)(Se,2),Ce=pe[0],Me=pe[1],ge=Object(A.useState)(),B=Object(H.a)(ge,2),R=B[0],I=B[1],W=window.ENV==="build"?"/react/build":"",Y=i.a.PROXY_SERVER||location.origin,F,le=1024*1024,Ae=10*le,Ne=Object(A.useRef)();(t=d)!==null&&t!==void 0&&t.startsWith("/api")&&h!=="txt"&&(d=(i.a.API_SERVER||location.origin)+d),h==="office"&&(F=Object(o.T)(d).filesize,F>Ae&&(h="other")),T&&M&&(M.filename=T),Object(A.useEffect)(function(){var De,Ke,Je=(De=document.cookie)===null||De===void 0||((Ke=De.replace(/\s/g,""))===null||Ke===void 0)?void 0:Ke.split(";");Je==null||Je.map(function(Ze){var Qe=Ze.split("=");Qe[0]==="_educoder_session"&&Me(Qe[1])})},[]),Object(A.useEffect)(function(){h==="office"&&ie()},[h,d]);var ie=function(){var De=Object(S.a)(e.a.mark(function Ke(){var Je,Ze,Qe;return e.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return console.log("data:",d),Je=d,d.startsWith("http")||(Je=location.origin+Je),Ze=new URL(Je).pathname.split("/").pop(),tt.next=6,Object(s.V)({attachment_id:Ze});case 6:Qe=tt.sent,I(Qe);case 8:case"end":return tt.stop()}},Ke)}));return function(){return De.apply(this,arguments)}}(),de=function(){if(d.startsWith("http")||d.startsWith("blob:")){we();return}Object(o.z)(T||"educoder",d,T)},we=function(){Object(o.x)(T||"educoder",decodeURIComponent(d))};return v.a.createElement("div",{style:Object(m.a)({},w||{}),className:"".concat(L&&l.a.bgBlack," ").concat(h?l.a.wrp:"hide")},C&&v.a.createElement("div",{className:l.a.close,ref:Ne},!z&&v.a.createElement(U.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Ne.current}},v.a.createElement("span",{onClick:we},v.a.createElement("i",{className:"icon-quxiaozhiding"}))),v.a.createElement(U.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Ne.current}},v.a.createElement("span",{className:"",onClick:j},v.a.createElement("i",{className:"icon-guanbi1"})))),v.a.createElement("div",{className:"".concat(l.a[D]," ").concat(D," ").concat(l.a.monaco," ").concat(h==="txt"?"show":"hide")},h==="txt"&&v.a.createElement(r.b,M)),h==="audio"&&v.a.createElement("audio",{src:"".concat(((b=d)===null||b===void 0?void 0:b.indexOf("http://"))>-1||((y=d)===null||y===void 0?void 0:y.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(d),autoPlay:!0}),h==="video"&&v.a.createElement(v.a.Fragment,null,((g=d)===null||g===void 0?void 0:g.indexOf("http"))>-1?v.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):v.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),h==="office"&&R&&v.a.createElement("iframe",{src:"".concat(W,"/office.html?key=").concat(R.key,"&url=").concat(Y+R.url,"&callbackUrl=").concat(Y+R.callbackUrl,"&fileType=").concat(R.fileType,"&title=").concat(R.title,"&model=").concat(p,"&officeServer=").concat(i.a.OFFICE_SERVER,"&disabledDownload=").concat(!!z)}),h==="html"&&v.a.createElement("iframe",{src:d+"&disposition=inline"}),h==="pdf"&&v.a.createElement("iframe",{src:"".concat(W,"/js/pdfview/index.html?url=").concat(d,"&disabledDownload=").concat(!!z)}),h==="image"&&v.a.createElement("img",{src:"".concat(((E=d)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((_=d)===null||_===void 0?void 0:_.indexOf("https://"))>-1||(u=d)!==null&&u!==void 0&&u.startsWith("/api")?"":"data:image/png;base64,").concat(d)}),h==="other"&&v.a.createElement("div",null,v.a.createElement(k.a,{type:"primary",size:"large",onClick:de},v.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),h==="download"&&v.a.createElement(k.a,{type:"primary",size:"large",onClick:de},v.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pIsd:function(Be,oe,P){var te=P("BJfS"),k=function(m){var S=/[height|width]$/;return S.test(m)},O=function(m){var S="",H=Object.keys(m);return H.forEach(function(N,e){var A=m[N];N=te(N),k(N)&&typeof A=="number"&&(A=A+"px"),A===!0?S+=N:A===!1?S+="not "+N:S+="("+N+": "+A+")",e<H.length-1&&(S+=" and ")}),S},U=function(m){var S="";return typeof m=="string"?m:m instanceof Array?(m.forEach(function(H,N){S+=O(H),N<m.length-1&&(S+=", ")}),S):O(m)};Be.exports=U},pmY6:function(Be,oe,P){"use strict";P.d(oe,"h",function(){return A}),P.d(oe,"g",function(){return f}),P.d(oe,"f",function(){return l}),P.d(oe,"e",function(){return a}),P.d(oe,"i",function(){return r}),P.d(oe,"b",function(){return o}),P.d(oe,"a",function(){return s}),P.d(oe,"d",function(){return i}),P.d(oe,"c",function(){return n});var te=P("C/vA"),k=P("JYp7");const O=!1;let U=null;function m(t){U=t}if(O){const t="__is_disposable_tracked__";m(new class{trackDisposable(b){const y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{b[t]||console.log(y)},3e3)}setParent(b,y){if(b&&b!==s.None)try{b[t]=!0}catch(g){}}markAsDisposed(b){if(b&&b!==s.None)try{b[t]=!0}catch(y){}}markAsSingleton(b){}})}function S(t){return U==null||U.trackDisposable(t),t}function H(t){U==null||U.markAsDisposed(t)}function N(t,b){U==null||U.setParent(t,b)}function e(t,b){if(!U)return;for(const y of t)U.setParent(y,b)}function A(t){return U==null||U.markAsSingleton(t),t}class v extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function f(t){return typeof t.dispose=="function"&&t.dispose.length===0}function l(t){if(k.a.is(t)){let b=[];for(const y of t)if(y)try{y.dispose()}catch(g){b.push(g)}if(b.length===1)throw b[0];if(b.length>1)throw new v(b);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function a(...t){const b=r(()=>l(t));return e(t,b),b}function r(t){const b=S({dispose:Object(te.a)(()=>{H(b),t()})});return b}class o{constructor(){this._toDispose=new Set,this._isDisposed=!1,S(this)}dispose(){if(this._isDisposed)return;H(this),this._isDisposed=!0,this.clear()}clear(){try{l(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return N(t,this),this._isDisposed?o.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}o.DISABLE_DISPOSED_WARNING=!1;class s{constructor(){this._store=new o,S(this),N(this._store,this)}dispose(){H(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}s.None=Object.freeze({dispose(){}});class i{constructor(){this._isDisposed=!1,S(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var b;if(this._isDisposed||t===this._value)return;(b=this._value)===null||b===void 0||b.dispose(),t&&N(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,H(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&N(t,null),t}}class n{constructor(t){this.object=t}dispose(){}}},psGv:function(Be,oe,P){var te,k;(function(){var O;(function(){"use strict";var H=[,,function(v){function f(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}f.prototype.clone_empty=function(){var r=new f(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},f.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},f.prototype.has_match=function(r){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(r))return!0;return!1},f.prototype.set_indent=function(r,o){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.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)},f.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},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(r){this.__items.push(r);var o=r.lastIndexOf(`
|
|
`);o!==-1?this.__character_count=r.length-o:this.__character_count+=r.length},f.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function l(r,o){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),o=o||"",r.indent_level>0&&(o=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}l.prototype.get_indent_size=function(r,o){var s=this.__base_string_length;return o=o||0,r<0&&(s=0),s+=r*this.__indent_size,s+=o,s},l.prototype.get_indent_string=function(r,o){var s=this.__base_string;return o=o||0,r<0&&(r=0,s=""),o+=r*this.__indent_size,this.__ensure_cache(o),s+=this.__cache[o],s},l.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},l.prototype.__add_column=function(){var r=this.__cache.length,o=0,s="";this.__indent_size&&r>=this.__indent_size&&(o=Math.floor(r/this.__indent_size),r-=o*this.__indent_size,s=new Array(o+1).join(this.__indent_string)),r&&(s+=new Array(r+1).join(" ")),this.__cache.push(s)};function a(r,o){this.__indent_cache=new l(r,o),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(r,o){return this.__indent_cache.get_indent_string(r,o)},a.prototype.get_indent_size=function(r,o){return this.__indent_cache.get_indent_size(r,o)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(r){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
|
|
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
|
|
`);return r!==`
|
|
`&&(s=s.replace(/[\n]/g,r)),s},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(r,o){return r=r||0,o=o||0,this.next_line.set_indent(r,o),this.__lines.length>1?(this.current_line.set_indent(r,o),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(r){for(var o=0;o<r.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},a.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},a.prototype.remove_indent=function(r){for(var o=this.__lines.length;r<o;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(r,o){for(var s=this.__lines.length-2;s>=0;){var i=this.__lines[s];if(i.is_empty())break;if(i.item(0).indexOf(r)!==0&&i.item(-1)!==o){this.__lines.splice(s+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},v.exports.Output=a},function(v){function f(l,a,r,o){this.type=l,this.text=a,this.comments_before=null,this.newlines=r||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}v.exports.Token=f},,,function(v){function f(r,o){this.raw_options=l(r,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}f.prototype._get_array=function(r,o){var s=this.raw_options[r],i=o||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(i=s.concat()):typeof s=="string"&&(i=s.split(/[^a-zA-Z0-9_\/\-]+/)),i},f.prototype._get_boolean=function(r,o){var s=this.raw_options[r],i=s===void 0?!!o:!!s;return i},f.prototype._get_characters=function(r,o){var s=this.raw_options[r],i=o||"";return typeof s=="string"&&(i=s.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),i},f.prototype._get_number=function(r,o){var s=this.raw_options[r];o=parseInt(o,10),isNaN(o)&&(o=0);var i=parseInt(s,10);return isNaN(i)&&(i=o),i},f.prototype._get_selection=function(r,o,s){var i=this._get_selection_list(r,o,s);if(i.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[r]+"'");return i[0]},f.prototype._get_selection_list=function(r,o,s){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[o[0]],!this._is_valid_selection(s,o))throw new Error("Invalid Default Value!");var i=this._get_array(r,s);if(!this._is_valid_selection(i,o))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[r]+"'");return i},f.prototype._is_valid_selection=function(r,o){return r.length&&o.length&&!r.some(function(s){return o.indexOf(s)===-1})};function l(r,o){var s={};r=a(r);var i;for(i in r)i!==o&&(s[i]=r[i]);if(o&&r[o])for(i in r[o])s[i]=r[o][i];return s}function a(r){var o={},s;for(s in r){var i=s.replace(/-/g,"_");o[i]=r[s]}return o}v.exports.Options=f,v.exports.normalizeOpts=a,v.exports.mergeOpts=l},,function(v){var f=RegExp.prototype.hasOwnProperty("sticky");function l(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}l.prototype.restart=function(){this.__position=0},l.prototype.back=function(){this.__position>0&&(this.__position-=1)},l.prototype.hasNext=function(){return this.__position<this.__input_length},l.prototype.next=function(){var a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},l.prototype.peek=function(a){var r=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(r=this.__input.charAt(a)),r},l.prototype.__match=function(a,r){a.lastIndex=r;var o=a.exec(this.__input);return o&&!(f&&a.sticky)&&(o.index!==r&&(o=null)),o},l.prototype.test=function(a,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(a,r):!1},l.prototype.testChar=function(a,r){var o=this.peek(r);return a.lastIndex=0,o!==null&&a.test(o)},l.prototype.match=function(a){var r=this.__match(a,this.__position);return r?this.__position+=r[0].length:r=null,r},l.prototype.read=function(a,r,o){var s="",i;return a&&(i=this.match(a),i&&(s+=i[0])),r&&(i||!a)&&(s+=this.readUntil(r,o)),s},l.prototype.readUntil=function(a,r){var o="",s=this.__position;a.lastIndex=this.__position;var i=a.exec(this.__input);return i?(s=i.index,r&&(s+=i[0].length)):s=this.__input_length,o=this.__input.substring(this.__position,s),this.__position=s,o},l.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},l.prototype.get_regexp=function(a,r){var o=null,s="g";return r&&f&&(s="y"),typeof a=="string"&&a!==""?o=new RegExp(a,s):a&&(o=new RegExp(a.source,s)),o},l.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},l.prototype.peekUntilAfter=function(a){var r=this.__position,o=this.readUntilAfter(a);return this.__position=r,o},l.prototype.lookBack=function(a){var r=this.__position-1;return r>=a.length&&this.__input.substring(r-a.length,r).toLowerCase()===a},v.exports.InputScanner=l},function(v,f,l){var a=l(8).InputScanner,r=l(3).Token,o=l(10).TokenStream,s=l(11).WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(t,b){this._input=new a(t),this._options=b||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};n.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var t,b=new r(i.START,""),y=null,g=[],E=new o;b.type!==i.EOF;){for(t=this._get_next_token(b,y);this._is_comment(t);)E.add(t),t=this._get_next_token(b,y);E.isEmpty()||(t.comments_before=E,E=new o),t.parent=y,this._is_opening(t)?(g.push(y),y=t):y&&this._is_closing(t,y)&&(t.opened=y,y.closed=t,y=g.pop(),t.parent=y),t.previous=b,b.next=t,this.__tokens.add(t),b=t}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(t,b){this._readWhitespace();var y=this._input.read(/.+/g);return y?this._create_token(i.RAW,y):this._create_token(i.EOF,"")},n.prototype._is_comment=function(t){return!1},n.prototype._is_opening=function(t){return!1},n.prototype._is_closing=function(t,b){return!1},n.prototype._create_token=function(t,b){var y=new r(t,b,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return y},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},v.exports.Tokenizer=n,v.exports.TOKEN=i},function(v){function f(l){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=l}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position<this.__tokens_length},f.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__tokens[this.__position],this.__position+=1),l},f.prototype.peek=function(l){var a=null;return l=l||0,l+=this.__position,l>=0&&l<this.__tokens_length&&(a=this.__tokens[l]),a},f.prototype.add=function(l){this.__parent_token&&(l.parent=this.__parent_token),this.__tokens.push(l),this.__tokens_length+=1},v.exports.TokenStream=f},function(v,f,l){var a=l(12).Pattern;function r(o,s){a.call(this,o,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new a,r.prototype.__set_whitespace_patterns=function(o,s){o+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var s=this.__split(this._newline_regexp,o);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return o},r.prototype.matching=function(o,s){var i=this._create();return i.__set_whitespace_patterns(o,s),i._update(),i},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(o,s){o.lastIndex=0;for(var i=0,n=[],t=o.exec(s);t;)n.push(s.substring(i,t.index)),i=t.index+t[0].length,t=o.exec(s);return i<s.length?n.push(s.substring(i,s.length)):n.push(""),n},v.exports.WhitespacePattern=r},function(v){function f(l,a){this._input=l,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,a&&(this._starting_pattern=this._input.get_regexp(a._starting_pattern,!0),this._match_pattern=this._input.get_regexp(a._match_pattern,!0),this._until_pattern=this._input.get_regexp(a._until_pattern),this._until_after=a._until_after)}f.prototype.read=function(){var l=this._input.read(this._starting_pattern);return(!this._starting_pattern||l)&&(l+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),l},f.prototype.read_match=function(){return this._input.match(this._match_pattern)},f.prototype.until_after=function(l){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(l),a._update(),a},f.prototype.until=function(l){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(l),a._update(),a},f.prototype.starting_with=function(l){var a=this._create();return a._starting_pattern=this._input.get_regexp(l,!0),a._update(),a},f.prototype.matching=function(l){var a=this._create();return a._match_pattern=this._input.get_regexp(l,!0),a._update(),a},f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){},v.exports.Pattern=f},function(v){function f(l,a){l=typeof l=="string"?l:l.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(l+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(l+/\sbeautify\signore:end\s/.source+a,"g")}f.prototype.get_directives=function(l){if(!l.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(l);r;)a[r[1]]=r[2],r=this.__directive_pattern.exec(l);return a},f.prototype.readIgnored=function(l){return l.readUntilAfter(this.__directives_end_ignore_pattern)},v.exports.Directives=f},function(v,f,l){var a=l(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(s,i){a.call(this,s,i),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),i&&(this.__template_pattern=this._input.get_regexp(i.__template_pattern),this._excluded=Object.assign(this._excluded,i._excluded),this._disabled=Object.assign(this._disabled,i._disabled));var n=new a(s);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new a,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(s){var i=this._create();return i._disabled[s]=!0,i._update(),i},o.prototype.read_options=function(s){var i=this._create();for(var n in r)i._disabled[n]=s.templating.indexOf(n)===-1;return i._update(),i},o.prototype.exclude=function(s){var i=this._create();return i._excluded[s]=!0,i._update(),i},o.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var i=this._read_template();i;)this._match_pattern?i+=this._input.read(this._match_pattern):i+=this._input.readUntil(this.__template_pattern),s+=i,i=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},o.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},o.prototype._read_template=function(){var s="",i=this._input.peek();if(i==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(s=s||this.__patterns.erb.read())}else i==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},v.exports.TemplatablePattern=o},,,,function(v,f,l){var a=l(19).Beautifier,r=l(20).Options;function o(s,i,n,t){var b=new a(s,i,n,t);return b.beautify()}v.exports=o,v.exports.defaultOptions=function(){return new r}},function(v,f,l){var a=l(20).Options,r=l(2).Output,o=l(21).Tokenizer,s=l(21).TOKEN,i=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,t=function(x,h){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=x.max_preserve_newlines,this.preserve_newlines=x.preserve_newlines,this._output=new r(x,h)};t.prototype.current_line_has_match=function(x){return this._output.current_line.has_match(x)},t.prototype.set_space_before_token=function(x,h){this._output.space_before_token=x,this._output.non_breaking_space=h},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(x){this._output.add_raw_token(x)},t.prototype.print_preserved_newlines=function(x){var h=0;x.type!==s.TEXT&&x.previous.type!==s.TEXT&&(h=x.newlines?1:0),this.preserve_newlines&&(h=x.newlines<this.max_preserve_newlines+1?x.newlines:this.max_preserve_newlines+1);for(var T=0;T<h;T++)this.print_newline(T>0);return h!==0},t.prototype.traverse_whitespace=function(x){return x.whitespace_before||x.newlines?(this.print_preserved_newlines(x)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(x){this._output.add_new_line(x)},t.prototype.print_token=function(x){x.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(x.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(x){return x=this.indent_level+(x||0),x<1?"":this._output.get_indent_string(x)};var b=function(x){for(var h=null,T=x.next;T.type!==s.EOF&&x.closed!==T;){if(T.type===s.ATTRIBUTE&&T.text==="type"){T.next&&T.next.type===s.EQUALS&&T.next.next&&T.next.next.type===s.VALUE&&(h=T.next.next.text);break}T=T.next}return h},y=function(x,h){var T=null,M=null;return h.closed?(x==="script"?T="text/javascript":x==="style"&&(T="text/css"),T=b(h)||T,T.search("text/css")>-1?M="css":T.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?M="javascript":T.search(/(text|application|dojo)\/(x-)?(html)/)>-1?M="html":T.search(/test\/null/)>-1&&(M="null"),M):null};function g(x,h){return h.indexOf(x)!==-1}function E(x,h,T){this.parent=x||null,this.tag=h?h.tag_name:"",this.indent_level=T||0,this.parser_token=h||null}function _(x){this._printer=x,this._current_frame=null}_.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},_.prototype.record_tag=function(x){var h=new E(this._current_frame,x,this._printer.indent_level);this._current_frame=h},_.prototype._try_pop_frame=function(x){var h=null;return x&&(h=x.parser_token,this._printer.indent_level=x.indent_level,this._current_frame=x.parent),h},_.prototype._get_frame=function(x,h){for(var T=this._current_frame;T&&!(x.indexOf(T.tag)!==-1);){if(h&&h.indexOf(T.tag)!==-1){T=null;break}T=T.parent}return T},_.prototype.try_pop=function(x,h){var T=this._get_frame([x],h);return this._try_pop_frame(T)},_.prototype.indent_to_tag=function(x){var h=this._get_frame(x);h&&(this._printer.indent_level=h.indent_level)};function u(x,h,T,M){this._source_text=x||"",h=h||{},this._js_beautify=T,this._css_beautify=M,this._tag_stack=null;var D=new a(h,"html");this._options=D,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}u.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,h=this._options.eol;this._options.eol==="auto"&&(h=`
|
|
`,x&&i.test(x)&&(h=x.match(i)[0])),x=x.replace(n,`
|
|
`);var T=x.match(/^[\t ]*/)[0],M={text:"",type:""},D=new c,w=new t(this._options,T),C=new o(x,this._options).tokenize();this._tag_stack=new _(w);for(var j=null,L=C.next();L.type!==s.EOF;)L.type===s.TAG_OPEN||L.type===s.COMMENT?(j=this._handle_tag_open(w,L,D,M),D=j):L.type===s.ATTRIBUTE||L.type===s.EQUALS||L.type===s.VALUE||L.type===s.TEXT&&!D.tag_complete?j=this._handle_inside_tag(w,L,D,C):L.type===s.TAG_CLOSE?j=this._handle_tag_close(w,L,D):L.type===s.TEXT?j=this._handle_text(w,L,D):w.add_raw_token(L),M=j,L=C.next();var z=w._output.get_code(h);return z},u.prototype._handle_tag_close=function(x,h,T){var M={text:h.text,type:h.type};return x.alignment_size=0,T.tag_complete=!0,x.set_space_before_token(h.newlines||h.whitespace_before!=="",!0),T.is_unformatted?x.add_raw_token(h):(T.tag_start_char==="<"&&(x.set_space_before_token(h.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&T.has_wrapped_attrs&&x.print_newline(!1)),x.print_token(h)),T.indent_content&&!(T.is_unformatted||T.is_content_unformatted)&&(x.indent(),T.indent_content=!1),!T.is_inline_element&&!(T.is_unformatted||T.is_content_unformatted)&&x.set_wrap_point(),M},u.prototype._handle_inside_tag=function(x,h,T,M){var D=T.has_wrapped_attrs,w={text:h.text,type:h.type};if(x.set_space_before_token(h.newlines||h.whitespace_before!=="",!0),T.is_unformatted)x.add_raw_token(h);else if(T.tag_start_char==="{"&&h.type===s.TEXT)x.print_preserved_newlines(h)?(h.newlines=0,x.add_raw_token(h)):x.print_token(h);else{if(h.type===s.ATTRIBUTE?(x.set_space_before_token(!0),T.attr_count+=1):(h.type===s.EQUALS||h.type===s.VALUE&&h.previous.type===s.EQUALS)&&x.set_space_before_token(!1),h.type===s.ATTRIBUTE&&T.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(x.traverse_whitespace(h),D=D||h.newlines!==0),this._is_wrap_attributes_force)){var C=T.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&T.attr_count===1){var j=!0,L=0,z;do{if(z=M.peek(L),z.type===s.ATTRIBUTE){j=!1;break}L+=1}while(L<4&&z.type!==s.EOF&&z.type!==s.TAG_CLOSE);C=!j}C&&(x.print_newline(!1),D=!0)}x.print_token(h),D=D||x.previous_token_wrapped(),T.has_wrapped_attrs=D}return w},u.prototype._handle_text=function(x,h,T){var M={text:h.text,type:"TK_CONTENT"};return T.custom_beautifier_name?this._print_custom_beatifier_text(x,h,T):T.is_unformatted||T.is_content_unformatted?x.add_raw_token(h):(x.traverse_whitespace(h),x.print_token(h)),M},u.prototype._print_custom_beatifier_text=function(x,h,T){var M=this;if(h.text!==""){var D=h.text,w,C=1,j="",L="";T.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?w=this._js_beautify:T.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?w=this._css_beautify:T.custom_beautifier_name==="html"&&(w=function(Se,pe){var Ce=new u(Se,pe,M._js_beautify,M._css_beautify);return Ce.beautify()}),this._options.indent_scripts==="keep"?C=0:this._options.indent_scripts==="separate"&&(C=-x.indent_level);var z=x.get_full_indent(C);if(D=D.replace(/\n[ \t]*$/,""),T.custom_beautifier_name!=="html"&&D[0]==="<"&&D.match(/^(<!--|<!\[CDATA\[)/)){var $=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(D);if(!$){x.add_raw_token(h);return}j=z+$[1]+`
|
|
`,D=$[4],$[5]&&(L=z+$[5]),D=D.replace(/\n[ \t]*$/,""),($[2]||$[3].indexOf(`
|
|
`)!==-1)&&($=$[3].match(/[ \t]+$/),$&&(h.whitespace_before=$[0]))}if(D)if(w){var he=function(){this.eol=`
|
|
`};he.prototype=this._options.raw_options;var fe=new he;D=w(z+D,fe)}else{var Ie=h.whitespace_before;Ie&&(D=D.replace(new RegExp(`
|
|
(`+Ie+")?","g"),`
|
|
`)),D=z+D.replace(/\n/g,`
|
|
`+z)}j&&(D?D=j+D+`
|
|
`+L:D=j+L),x.print_newline(!1),D&&(h.text=D,h.whitespace_before="",h.newlines=0,x.add_raw_token(h),x.print_newline(!0))}},u.prototype._handle_tag_open=function(x,h,T,M){var D=this._get_tag_open_token(h);return(T.is_unformatted||T.is_content_unformatted)&&!T.is_empty_element&&h.type===s.TAG_OPEN&&h.text.indexOf("</")===0?(x.add_raw_token(h),D.start_tag_token=this._tag_stack.try_pop(D.tag_name)):(x.traverse_whitespace(h),this._set_tag_position(x,h,D,T,M),D.is_inline_element||x.set_wrap_point(),x.print_token(h)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(D.alignment_size=h.text.length+1),!D.tag_complete&&!D.is_unformatted&&(x.alignment_size=D.alignment_size),D};var c=function(x,h){if(this.parent=x||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!h)this.tag_complete=!0;else{var T;this.tag_start_char=h.text[0],this.text=h.text,this.tag_start_char==="<"?(T=h.text.match(/^<([^\s>]*)/),this.tag_check=T?T[1]:""):(T=h.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=T?T[1]:"",(h.text.startsWith("{{#>")||h.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&h.next!==null?this.tag_check=h.next.text.split(" ")[0]:this.tag_check=h.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),h.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||h.closed&&h.closed.text==="/>";var M=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(M=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(M)))}};u.prototype._get_tag_open_token=function(x){var h=new c(this._tag_stack.get_parser_token(),x);return h.alignment_size=this._options.wrap_attributes_indent_size,h.is_end_tag=h.is_end_tag||g(h.tag_check,this._options.void_elements),h.is_empty_element=h.tag_complete||h.is_start_tag&&h.is_end_tag,h.is_unformatted=!h.tag_complete&&g(h.tag_check,this._options.unformatted),h.is_content_unformatted=!h.is_empty_element&&g(h.tag_check,this._options.content_unformatted),h.is_inline_element=g(h.tag_name,this._options.inline)||h.tag_name.includes("-")||h.tag_start_char==="{",h},u.prototype._set_tag_position=function(x,h,T,M,D){if(T.is_empty_element||(T.is_end_tag?T.start_tag_token=this._tag_stack.try_pop(T.tag_name):(this._do_optional_end_element(T)&&(T.is_inline_element||x.print_newline(!1)),this._tag_stack.record_tag(T),(T.tag_name==="script"||T.tag_name==="style")&&!(T.is_unformatted||T.is_content_unformatted)&&(T.custom_beautifier_name=y(T.tag_check,h)))),g(T.tag_check,this._options.extra_liners)&&(x.print_newline(!1),x._output.just_added_blankline()||x.print_newline(!0)),T.is_empty_element){if(T.tag_start_char==="{"&&T.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),T.indent_content=!0;var w=x.current_line_has_match(/{{#if/);w||x.print_newline(!1)}T.tag_name==="!--"&&D.type===s.TAG_CLOSE&&M.is_end_tag&&T.text.indexOf(`
|
|
`)===-1||(T.is_inline_element||T.is_unformatted||x.print_newline(!1),this._calcluate_parent_multiline(x,T))}else if(T.is_end_tag){var C=!1;C=T.start_tag_token&&T.start_tag_token.multiline_content,C=C||!T.is_inline_element&&!(M.is_inline_element||M.is_unformatted)&&!(D.type===s.TAG_CLOSE&&T.start_tag_token===M)&&D.type!=="TK_CONTENT",(T.is_content_unformatted||T.is_unformatted)&&(C=!1),C&&x.print_newline(!1)}else T.indent_content=!T.custom_beautifier_name,T.tag_start_char==="<"&&(T.tag_name==="html"?T.indent_content=this._options.indent_inner_html:T.tag_name==="head"?T.indent_content=this._options.indent_head_inner_html:T.tag_name==="body"&&(T.indent_content=this._options.indent_body_inner_html)),!(T.is_inline_element||T.is_unformatted)&&(D.type!=="TK_CONTENT"||T.is_content_unformatted)&&x.print_newline(!1),this._calcluate_parent_multiline(x,T)},u.prototype._calcluate_parent_multiline=function(x,h){h.parent&&x._output.just_added_newline()&&!((h.is_inline_element||h.is_unformatted)&&h.parent.is_inline_element)&&(h.parent.multiline_content=!0)};var p=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],d=["a","audio","del","ins","map","noscript","video"];u.prototype._do_optional_end_element=function(x){var h=null;if(x.is_empty_element||!x.is_start_tag||!x.parent)return;if(x.tag_name==="body")h=h||this._tag_stack.try_pop("head");else if(x.tag_name==="li")h=h||this._tag_stack.try_pop("li",["ol","ul"]);else if(x.tag_name==="dd"||x.tag_name==="dt")h=h||this._tag_stack.try_pop("dt",["dl"]),h=h||this._tag_stack.try_pop("dd",["dl"]);else if(x.parent.tag_name==="p"&&p.indexOf(x.tag_name)!==-1){var T=x.parent.parent;(!T||d.indexOf(T.tag_name)===-1)&&(h=h||this._tag_stack.try_pop("p"))}else x.tag_name==="rp"||x.tag_name==="rt"?(h=h||this._tag_stack.try_pop("rt",["ruby","rtc"]),h=h||this._tag_stack.try_pop("rp",["ruby","rtc"])):x.tag_name==="optgroup"?h=h||this._tag_stack.try_pop("optgroup",["select"]):x.tag_name==="option"?h=h||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):x.tag_name==="colgroup"?h=h||this._tag_stack.try_pop("caption",["table"]):x.tag_name==="thead"?(h=h||this._tag_stack.try_pop("caption",["table"]),h=h||this._tag_stack.try_pop("colgroup",["table"])):x.tag_name==="tbody"||x.tag_name==="tfoot"?(h=h||this._tag_stack.try_pop("caption",["table"]),h=h||this._tag_stack.try_pop("colgroup",["table"]),h=h||this._tag_stack.try_pop("thead",["table"]),h=h||this._tag_stack.try_pop("tbody",["table"])):x.tag_name==="tr"?(h=h||this._tag_stack.try_pop("caption",["table"]),h=h||this._tag_stack.try_pop("colgroup",["table"]),h=h||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(x.tag_name==="th"||x.tag_name==="td")&&(h=h||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),h=h||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return x.parent=this._tag_stack.get_parser_token(),h},v.exports.Beautifier=u},function(v,f,l){var a=l(6).Options;function r(o){a.call(this,o,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}r.prototype=new a,v.exports.Options=r},function(v,f,l){var a=l(9).Tokenizer,r=l(9).TOKEN,o=l(13).Directives,s=l(14).TemplatablePattern,i=l(12).Pattern,n={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:r.START,RAW:r.RAW,EOF:r.EOF},t=new o(/<\!--/,/-->/),b=function(y,g){a.call(this,y,g),this._current_tag_name="";var E=new s(this._input).read_options(this._options),_=new i(this._input);if(this.__patterns={word:E.until(/[\n\r\t <]/),single_quote:E.until_after(/'/),double_quote:E.until_after(/"/),attribute:E.until(/[\n\r\t =>]|\/>/),element_name:E.until(/[\n\r\t >\/]/),handlebars_comment:_.starting_with(/{{!--/).until_after(/--}}/),handlebars:_.starting_with(/{{/).until_after(/}}/),handlebars_open:_.until(/[\n\r\t }]/),handlebars_raw_close:_.until(/}}/),comment:_.starting_with(/<!--/).until_after(/-->/),cdata:_.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:_.starting_with(/<!\[/).until_after(/]>/),processing:_.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var u=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=_.matching(u).until_after(u)}};b.prototype=new a,b.prototype._is_comment=function(y){return!1},b.prototype._is_opening=function(y){return y.type===n.TAG_OPEN},b.prototype._is_closing=function(y,g){return y.type===n.TAG_CLOSE&&g&&((y.text===">"||y.text==="/>")&&g.text[0]==="<"||y.text==="}}"&&g.text[0]==="{"&&g.text[1]==="{")},b.prototype._reset=function(){this._current_tag_name=""},b.prototype._get_next_token=function(y,g){var E=null;this._readWhitespace();var _=this._input.peek();return _===null?this._create_token(n.EOF,""):(E=E||this._read_open_handlebars(_,g),E=E||this._read_attribute(_,y,g),E=E||this._read_close(_,g),E=E||this._read_raw_content(_,y,g),E=E||this._read_content_word(_),E=E||this._read_comment_or_cdata(_),E=E||this._read_processing(_),E=E||this._read_open(_,g),E=E||this._create_token(n.UNKNOWN,this._input.next()),E)},b.prototype._read_comment_or_cdata=function(y){var g=null,E=null,_=null;if(y==="<"){var u=this._input.peek(1);u==="!"&&(E=this.__patterns.comment.read(),E?(_=t.get_directives(E),_&&_.ignore==="start"&&(E+=t.readIgnored(this._input))):E=this.__patterns.cdata.read()),E&&(g=this._create_token(n.COMMENT,E),g.directives=_)}return g},b.prototype._read_processing=function(y){var g=null,E=null,_=null;if(y==="<"){var u=this._input.peek(1);(u==="!"||u==="?")&&(E=this.__patterns.conditional_comment.read(),E=E||this.__patterns.processing.read()),E&&(g=this._create_token(n.COMMENT,E),g.directives=_)}return g},b.prototype._read_open=function(y,g){var E=null,_=null;return g||y==="<"&&(E=this._input.next(),this._input.peek()==="/"&&(E+=this._input.next()),E+=this.__patterns.element_name.read(),_=this._create_token(n.TAG_OPEN,E)),_},b.prototype._read_open_handlebars=function(y,g){var E=null,_=null;return g||this._options.indent_handlebars&&y==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(E=this.__patterns.handlebars_comment.read(),E=E||this.__patterns.handlebars.read(),_=this._create_token(n.COMMENT,E)):(E=this.__patterns.handlebars_open.read(),_=this._create_token(n.TAG_OPEN,E))),_},b.prototype._read_close=function(y,g){var E=null,_=null;return g&&(g.text[0]==="<"&&(y===">"||y==="/"&&this._input.peek(1)===">")?(E=this._input.next(),y==="/"&&(E+=this._input.next()),_=this._create_token(n.TAG_CLOSE,E)):g.text[0]==="{"&&y==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),_=this._create_token(n.TAG_CLOSE,"}}"))),_},b.prototype._read_attribute=function(y,g,E){var _=null,u="";if(E&&E.text[0]==="<")if(y==="=")_=this._create_token(n.EQUALS,this._input.next());else if(y==='"'||y==="'"){var c=this._input.next();y==='"'?c+=this.__patterns.double_quote.read():c+=this.__patterns.single_quote.read(),_=this._create_token(n.VALUE,c)}else u=this.__patterns.attribute.read(),u&&(g.type===n.EQUALS?_=this._create_token(n.VALUE,u):_=this._create_token(n.ATTRIBUTE,u));return _},b.prototype._is_content_unformatted=function(y){return this._options.void_elements.indexOf(y)===-1&&(this._options.content_unformatted.indexOf(y)!==-1||this._options.unformatted.indexOf(y)!==-1)},b.prototype._read_raw_content=function(y,g,E){var _="";if(E&&E.text[0]==="{")_=this.__patterns.handlebars_raw_close.read();else if(g.type===n.TAG_CLOSE&&g.opened.text[0]==="<"&&g.text[0]!=="/"){var u=g.opened.text.substr(1).toLowerCase();if(u==="script"||u==="style"){var c=this._read_comment_or_cdata(y);if(c)return c.type=n.TEXT,c;_=this._input.readUntil(new RegExp("</"+u+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(u)&&(_=this._input.readUntil(new RegExp("</"+u+"[\\n\\r\\t ]*?>","ig")))}return _?this._create_token(n.TEXT,_):null},b.prototype._read_content_word=function(y){var g="";if(this._options.unformatted_content_delimiter&&(y===this._options.unformatted_content_delimiter[0]&&(g=this.__patterns.unformatted_content_delimiter.read())),g||(g=this.__patterns.word.read()),g)return this._create_token(n.TEXT,g)},v.exports.Tokenizer=b,v.exports.TOKEN=n}],N={};function e(v){var f=N[v];if(f!==void 0)return f.exports;var l=N[v]={exports:{}};return H[v](l,l.exports,e),l.exports}var A=e(18);O=A})();var U=O;if(!0)!(te=[P,P("6UM0"),P("TXwP")],k=function(H){var N=P("6UM0"),e=P("TXwP");return{html_beautify:function(A,v){return U(A,v,N.js_beautify,e.css_beautify)}}}.apply(oe,te),k!==void 0&&(Be.exports=k));else var m,S})()},pxMS:function(Be,oe,P){Be.exports=P.p+"static/program-banner.03adba1e.png"},"rAM+":function(Be,oe,P){"use strict";P.d(oe,"a",function(){return k});var te=P("Qw5x");function k(O,U){var m;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(m=Object(te.a)(O))||U&&O&&typeof O.length=="number"){m&&(O=m);var S=0,H=function(){};return{s:H,n:function(){return S>=O.length?{done:!0}:{done:!1,value:O[S++]}},e:function(f){throw f},f:H}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N=!0,e=!1,A;return{s:function(){m=O[Symbol.iterator]()},n:function(){var f=m.next();return N=f.done,f},e:function(f){e=!0,A=f},f:function(){try{!N&&m.return!=null&&m.return()}finally{if(e)throw A}}}}},rUJ1:function(Be,oe){const P=/[&<>"']/,te=/[&<>"']/g,k=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,U={"&":"&","<":"<",">":">",'"':""","'":"'"},m=_=>U[_];function S(_,u){if(u){if(P.test(_))return _.replace(te,m)}else if(k.test(_))return _.replace(O,m);return _}const H=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function N(_){return _.replace(H,(u,c)=>(c=c.toLowerCase(),c==="colon"?":":c.charAt(0)==="#"?c.charAt(1)==="x"?String.fromCharCode(parseInt(c.substring(2),16)):String.fromCharCode(+c.substring(1)):""))}const e=/(^|[^\[])\^/g;function A(_,u){_=_.source||_,u=u||"";const c={replace:(p,d)=>(d=d.source||d,d=d.replace(e,"$1"),_=_.replace(p,d),c),getRegex:()=>new RegExp(_,u)};return c}const v=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(_,u,c){if(_){let p;try{p=decodeURIComponent(N(c)).replace(v,"").toLowerCase()}catch(d){return null}if(p.indexOf("javascript:")===0||p.indexOf("vbscript:")===0||p.indexOf("data:")===0)return null}u&&!f.test(c)&&(c=i(u,c));try{c=encodeURI(c).replace(/%25/g,"%")}catch(p){return null}return c}const a={},r=/^[^:]+:\/*[^/]*$/,o=/^([^:]+:)[\s\S]*$/,s=/^([^:]+:\/*[^/]*)[\s\S]*$/;function i(_,u){a[" "+_]||(r.test(_)?a[" "+_]=_+"/":a[" "+_]=y(_,"/",!0)),_=a[" "+_];const c=_.indexOf(":")===-1;return u.substring(0,2)==="//"?c?u:_.replace(o,"$1")+u:u.charAt(0)==="/"?c?u:_.replace(s,"$1")+u:_+u}const n={exec:function(){}};function t(_){let u=1,c,p;for(;u<arguments.length;u++){c=arguments[u];for(p in c)Object.prototype.hasOwnProperty.call(c,p)&&(_[p]=c[p])}return _}function b(_,u){const c=_.replace(/\|/g,(x,h,T)=>{let M=!1,D=h;for(;--D>=0&&T[D]==="\\";)M=!M;return M?"|":" |"}),p=c.split(/ \|/);let d=0;if(p.length>u)p.splice(u);else for(;p.length<u;)p.push("");for(;d<p.length;d++)p[d]=p[d].trim().replace(/\\\|/g,"|");return p}function y(_,u,c){const p=_.length;if(p===0)return"";let d=0;for(;d<p;){const x=_.charAt(p-d-1);if(x===u&&!c)d++;else if(x!==u&&c)d++;else break}return _.substr(0,p-d)}function g(_,u){if(_.indexOf(u[1])===-1)return-1;const c=_.length;let p=0,d=0;for(;d<c;d++)if(_[d]==="\\")d++;else if(_[d]===u[0])p++;else if(_[d]===u[1]&&(p--,p<0))return d;return-1}function E(_){_&&_.sanitize&&!_.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}Be.exports={escape:S,unescape:N,edit:A,cleanUrl:l,resolveUrl:i,noopTest:n,merge:t,splitCells:b,rtrim:y,findClosingBracket:g,checkSanitizeDeprecation:E}},sR1s:function(Be,oe,P){"use strict";P.d(oe,"b",function(){return U}),P.d(oe,"a",function(){return m}),P.d(oe,"c",function(){return S}),P.d(oe,"d",function(){return H});var te=P("U8pU"),k="RC_TABLE_KEY";function O(N){return N==null?[]:Array.isArray(N)?N:[N]}function U(N,e){if(!e&&typeof e!="number")return N;for(var A=O(e),v=N,f=0;f<A.length;f+=1){if(!v)return null;var l=A[f];v=v[l]}return v}function m(N){var e=[],A={};return N.forEach(function(v){for(var f=v||{},l=f.key,a=f.dataIndex,r=l||O(a).join("-")||k;A[r];)r="".concat(r,"_next");A[r]=!0,e.push(r)}),e}function S(){var N={};function e(l,a){a&&Object.keys(a).forEach(function(r){var o=a[r];o&&Object(te.a)(o)==="object"?(l[r]=l[r]||{},e(l[r],o)):l[r]=o})}for(var A=arguments.length,v=new Array(A),f=0;f<A;f++)v[f]=arguments[f];return v.forEach(function(l){e(N,l)}),N}function H(N){return N!=null}},sboe:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return O});var te=P("q1tI"),k=P.n(te),O=te.createContext(null)},siWv:function(Be,oe,P){Be.exports={flex_box_center:"flex_box_center___3IH6S",flex_space_between:"flex_space_between___3AU-S",flex_box_vertical_center:"flex_box_vertical_center___1ykIO",flex_box_center_end:"flex_box_center_end___1aIQB",flex_box_column:"flex_box_column___2A_ra",btn:"btn___23gjd","mediacy-round":"mediacy-round___3vc8E","mediacy-default":"mediacy-default___2zIGi",default:"default___20Yio"}},t23M:function(Be,oe,P){"use strict";var te=P("VTBJ"),k=P("1OyB"),O=P("vuIU"),U=P("Ji7U"),m=P("LK+K"),S=P("q1tI"),H=P.n(S),N=P("m+aA"),e=P("Zm9Q"),A=P("Kwbf"),v=P("c+Xe"),f=P("bdgK"),l="rc-observer-key",a=function(r){Object(U.a)(s,r);var o=Object(m.a)(s);function s(){var i;return Object(k.a)(this,s),i=o.apply(this,arguments),i.resizeObserver=null,i.childNode=null,i.currentElement=null,i.state={width:0,height:0,offsetHeight:0,offsetWidth:0},i.onResize=function(n){var t=i.props.onResize,b=n[0].target,y=b.getBoundingClientRect(),g=y.width,E=y.height,_=b.offsetWidth,u=b.offsetHeight,c=Math.floor(g),p=Math.floor(E);if(i.state.width!==c||i.state.height!==p||i.state.offsetWidth!==_||i.state.offsetHeight!==u){var d={width:c,height:p,offsetWidth:_,offsetHeight:u};i.setState(d),t&&Promise.resolve().then(function(){t(Object(te.a)(Object(te.a)({},d),{},{offsetWidth:_,offsetHeight:u}))})}},i.setChildNode=function(n){i.childNode=n},i}return Object(O.a)(s,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var n=this.props.disabled;if(n){this.destroyObserver();return}var t=Object(N.a)(this.childNode||this),b=t!==this.currentElement;b&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var n=this.props.children,t=Object(e.a)(n);if(t.length>1)Object(A.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(A.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var b=t[0];if(S.isValidElement(b)&&Object(v.c)(b)){var y=b.ref;t[0]=S.cloneElement(b,{ref:Object(v.a)(y,this.setChildNode)})}return t.length===1?t[0]:t.map(function(g,E){return!S.isValidElement(g)||"key"in g&&g.key!==null?g:S.cloneElement(g,{key:"".concat(l,"-").concat(E)})})}}]),s}(S.Component);a.displayName="ResizeObserver",oe.a=a},t9D7:function(Be,oe,P){"use strict";P.d(oe,"b",function(){return H}),P.d(oe,"g",function(){return e}),P.d(oe,"d",function(){return A}),P.d(oe,"e",function(){return v}),P.d(oe,"a",function(){return f}),P.d(oe,"f",function(){return r}),P.d(oe,"c",function(){return o});var te=P("Vhoy"),k=P("MI8n"),O=P("pmY6"),U=P("Cg/j"),m=P("ic2d"),S=P("nEHx");const H=Object(U.c)("themeService");var N;(function(s){function i(n){return n&&typeof n=="object"&&typeof n.id=="string"}s.isThemeColor=i})(N||(N={}));function e(s){return{id:s}}var A;(function(s){function i(E){return E&&typeof E=="object"&&typeof E.id=="string"&&(typeof E.color=="undefined"||N.isThemeColor(E.color))}s.isThemeIcon=i;const n=new RegExp(`^\\$\\((${te.a.iconNameExpression}(?:${te.a.iconModifierExpression})?)\\)$`);function t(E){const _=n.exec(E);if(!_)return;let[,u]=_;return{id:u}}s.fromString=t;function b(E,_){let u=E.id;const c=u.lastIndexOf("~");return c!==-1&&(u=u.substring(0,c)),_&&(u=`${u}~${_}`),{id:u}}s.modify=b;function y(E,_){var u,c;return E.id===_.id&&((u=E.color)===null||u===void 0?void 0:u.id)===((c=_.color)===null||c===void 0?void 0:c.id)}s.isEqual=y;function g(E,_){return{id:E.id,color:_?e(_):void 0}}s.asThemeIcon=g,s.asClassNameArray=te.a.asClassNameArray,s.asClassName=te.a.asClassName,s.asCSSSelector=te.a.asCSSSelector})(A||(A={}));function v(s){switch(s){case S.a.DARK:return"vs-dark";case S.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};class l{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new k.b}onColorThemeChange(s){return this.themingParticipants.push(s),this.onThemingParticipantAddedEmitter.fire(s),Object(O.i)(()=>{const i=this.themingParticipants.indexOf(s);this.themingParticipants.splice(i,1)})}getThemingParticipants(){return this.themingParticipants}}let a=new l;m.a.add(f.ThemingContribution,a);function r(s){return a.onColorThemeChange(s)}class o extends O.a{constructor(s){super();this.themeService=s,this.theme=s.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(i=>this.onThemeChange(i)))}onThemeChange(s){this.theme=s,this.updateStyles()}updateStyles(){}}},ulZh:function(Be,oe,P){typeof window!="undefined"&&function(k,O){Be.exports=O()}(this,function(){return function(te){var k={};function O(U){if(k[U])return k[U].exports;var m=k[U]={i:U,l:!1,exports:{}};return te[U].call(m.exports,m,m.exports,O),m.l=!0,m.exports}return O.m=te,O.c=k,O.d=function(U,m,S){O.o(U,m)||Object.defineProperty(U,m,{enumerable:!0,get:S})},O.r=function(U){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(U,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(U,"__esModule",{value:!0})},O.t=function(U,m){if(m&1&&(U=O(U)),m&8)return U;if(m&4&&typeof U=="object"&&U&&U.__esModule)return U;var S=Object.create(null);if(O.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:U}),m&2&&typeof U!="string")for(var H in U)O.d(S,H,function(N){return U[N]}.bind(null,H));return S},O.n=function(U){var m=U&&U.__esModule?function(){return U.default}:function(){return U};return O.d(m,"a",m),m},O.o=function(U,m){return Object.prototype.hasOwnProperty.call(U,m)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(te,k,O){"use strict";var U=Object.prototype.hasOwnProperty,m="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__proto__||(m=!1));function H(v,f,l){this.fn=v,this.context=f,this.once=l||!1}function N(v,f,l,a,r){if(typeof l!="function")throw new TypeError("The listener must be a function");var o=new H(l,a||v,r),s=m?m+f:f;return v._events[s]?v._events[s].fn?v._events[s]=[v._events[s],o]:v._events[s].push(o):(v._events[s]=o,v._eventsCount++),v}function e(v,f){--v._eventsCount===0?v._events=new S:delete v._events[f]}function A(){this._events=new S,this._eventsCount=0}A.prototype.eventNames=function(){var f=[],l,a;if(this._eventsCount===0)return f;for(a in l=this._events)U.call(l,a)&&f.push(m?a.slice(1):a);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(l)):f},A.prototype.listeners=function(f){var l=m?m+f:f,a=this._events[l];if(!a)return[];if(a.fn)return[a.fn];for(var r=0,o=a.length,s=new Array(o);r<o;r++)s[r]=a[r].fn;return s},A.prototype.listenerCount=function(f){var l=m?m+f:f,a=this._events[l];return a?a.fn?1:a.length:0},A.prototype.emit=function(f,l,a,r,o,s){var i=m?m+f:f;if(!this._events[i])return!1;var n=this._events[i],t=arguments.length,b,y;if(n.fn){n.once&&this.removeListener(f,n.fn,void 0,!0);switch(t){case 1:return n.fn.call(n.context),!0;case 2:return n.fn.call(n.context,l),!0;case 3:return n.fn.call(n.context,l,a),!0;case 4:return n.fn.call(n.context,l,a,r),!0;case 5:return n.fn.call(n.context,l,a,r,o),!0;case 6:return n.fn.call(n.context,l,a,r,o,s),!0}for(y=1,b=new Array(t-1);y<t;y++)b[y-1]=arguments[y];n.fn.apply(n.context,b)}else{var g=n.length,E;for(y=0;y<g;y++){n[y].once&&this.removeListener(f,n[y].fn,void 0,!0);switch(t){case 1:n[y].fn.call(n[y].context);break;case 2:n[y].fn.call(n[y].context,l);break;case 3:n[y].fn.call(n[y].context,l,a);break;case 4:n[y].fn.call(n[y].context,l,a,r);break;default:if(!b)for(E=1,b=new Array(t-1);E<t;E++)b[E-1]=arguments[E];n[y].fn.apply(n[y].context,b)}}}return!0},A.prototype.on=function(f,l,a){return N(this,f,l,a,!1)},A.prototype.once=function(f,l,a){return N(this,f,l,a,!0)},A.prototype.removeListener=function(f,l,a,r){var o=m?m+f:f;if(!this._events[o])return this;if(!l)return e(this,o),this;var s=this._events[o];if(s.fn)s.fn===l&&(!r||s.once)&&(!a||s.context===a)&&e(this,o);else{for(var i=0,n=[],t=s.length;i<t;i++)(s[i].fn!==l||r&&!s[i].once||a&&s[i].context!==a)&&n.push(s[i]);n.length?this._events[o]=n.length===1?n[0]:n:e(this,o)}return this},A.prototype.removeAllListeners=function(f){var l;return f?(l=m?m+f:f,this._events[l]&&e(this,l)):(this._events=new S,this._eventsCount=0),this},A.prototype.off=A.prototype.removeListener,A.prototype.addListener=A.prototype.on,A.prefixed=m,A.EventEmitter=A,te.exports=A},"./node_modules/url-toolkit/src/url-toolkit.js":function(te,k,O){(function(U){var m=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,S=/^([^\/?#]*)([^]*)$/,H=/(?:\/|^)\.(?=\/)/g,N=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(A,v,f){if(f=f||{},A=A.trim(),v=v.trim(),!v){if(!f.alwaysNormalize)return A;var l=e.parseURL(A);if(!l)throw new Error("Error trying to parse base URL.");return l.path=e.normalizePath(l.path),e.buildURLFromParts(l)}var a=e.parseURL(v);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return f.alwaysNormalize?(a.path=e.normalizePath(a.path),e.buildURLFromParts(a)):v;var r=e.parseURL(A);if(!r)throw new Error("Error trying to parse base URL.");if(!r.netLoc&&r.path&&r.path[0]!=="/"){var o=S.exec(r.path);r.netLoc=o[1],r.path=o[2]}r.netLoc&&!r.path&&(r.path="/");var s={scheme:r.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(s.netLoc=r.netLoc,a.path[0]!=="/"))if(!a.path)s.path=r.path,a.params||(s.params=r.params,a.query||(s.query=r.query));else{var i=r.path,n=i.substring(0,i.lastIndexOf("/")+1)+a.path;s.path=e.normalizePath(n)}return s.path===null&&(s.path=f.alwaysNormalize?e.normalizePath(a.path):a.path),e.buildURLFromParts(s)},parseURL:function(A){var v=m.exec(A);return v?{scheme:v[1]||"",netLoc:v[2]||"",path:v[3]||"",params:v[4]||"",query:v[5]||"",fragment:v[6]||""}:null},normalizePath:function(A){for(A=A.split("").reverse().join("").replace(H,"");A.length!==(A=A.replace(N,"")).length;);return A.split("").reverse().join("")},buildURLFromParts:function(A){return A.scheme+A.netLoc+A.path+A.params+A.query+A.fragment}};te.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(te,k,O){function U(f){var l={};function a(o){if(l[o])return l[o].exports;var s=l[o]={i:o,l:!1,exports:{}};return f[o].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=f,a.c=l,a.i=function(o){return o},a.d=function(o,s,i){a.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:i})},a.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},a.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(s,"a",s),s},a.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},a.p="/",a.oe=function(o){throw console.error(o),o};var r=a(a.s=ENTRY_MODULE);return r.default||r}var m="[\\.|\\-|\\+|\\w|/|@]+",S="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+m+").*?\\)";function H(f){return(f+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function N(f){return!isNaN(1*f)}function e(f,l,a){var r={};r[a]=[];var o=l.toString(),s=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return r;for(var i=s[1],n=new RegExp("(\\\\n|\\W)"+H(i)+S,"g"),t;t=n.exec(o);){if(t[3]==="dll-reference")continue;r[a].push(t[3])}for(n=new RegExp("\\("+H(i)+'\\("(dll-reference\\s('+m+'))"\\)\\)'+S,"g");t=n.exec(o);)f[t[2]]||(r[a].push(t[1]),f[t[2]]=O(t[1]).m),r[t[2]]=r[t[2]]||[],r[t[2]].push(t[4]);for(var b=Object.keys(r),y=0;y<b.length;y++)for(var g=0;g<r[b[y]].length;g++)N(r[b[y]][g])&&(r[b[y]][g]=1*r[b[y]][g]);return r}function A(f){var l=Object.keys(f);return l.reduce(function(a,r){return a||f[r].length>0},!1)}function v(f,l){for(var a={main:[l]},r={main:[]},o={main:{}};A(a);)for(var s=Object.keys(a),i=0;i<s.length;i++){var n=s[i],t=a[n],b=t.pop();if(o[n]=o[n]||{},o[n][b]||!f[n][b])continue;o[n][b]=!0,r[n]=r[n]||[],r[n].push(b);for(var y=e(f,f[n][b],n),g=Object.keys(y),E=0;E<g.length;E++)a[g[E]]=a[g[E]]||[],a[g[E]]=a[g[E]].concat(y[g[E]])}return r}te.exports=function(f,l){l=l||{};var a={main:O.m},r=l.all?{main:Object.keys(a.main)}:v(a,f),o="";Object.keys(r).filter(function(b){return b!=="main"}).forEach(function(b){for(var y=0;r[b][y];)y++;r[b].push(y),a[b][y]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+b+" = ("+U.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+r[b].map(function(g){return""+JSON.stringify(g)+": "+a[b][g].toString()}).join(",")+`});
|
|
`}),o=o+"new (("+U.toString().replace("ENTRY_MODULE",JSON.stringify(f))+")({"+r.main.map(function(b){return""+JSON.stringify(b)+": "+a.main[b].toString()}).join(",")+"}))(self);";var s=new window.Blob([o],{type:"text/javascript"});if(l.bare)return s;var i=window.URL||window.webkitURL||window.mozURL||window.msURL,n=i.createObjectURL(s),t=new window.Worker(n);return t.objectURL=n,t}},"./src/config.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"hlsDefaultConfig",function(){return E}),O.d(k,"mergeConfig",function(){return u}),O.d(k,"enableStreamingMode",function(){return c});var U=O("./src/controller/abr-controller.ts"),m=O("./src/controller/audio-stream-controller.ts"),S=O("./src/controller/audio-track-controller.ts"),H=O("./src/controller/subtitle-stream-controller.ts"),N=O("./src/controller/subtitle-track-controller.ts"),e=O("./src/controller/buffer-controller.ts"),A=O("./src/controller/timeline-controller.ts"),v=O("./src/controller/cap-level-controller.ts"),f=O("./src/controller/fps-controller.ts"),l=O("./src/controller/eme-controller.ts"),a=O("./src/controller/cmcd-controller.ts"),r=O("./src/utils/xhr-loader.ts"),o=O("./src/utils/fetch-loader.ts"),s=O("./src/utils/cues.ts"),i=O("./src/utils/mediakeys-helper.ts"),n=O("./src/utils/logger.ts");function t(){return t=Object.assign||function(p){for(var d=1;d<arguments.length;d++){var x=arguments[d];for(var h in x)Object.prototype.hasOwnProperty.call(x,h)&&(p[h]=x[h])}return p},t.apply(this,arguments)}function b(p,d){var x=Object.keys(p);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(p);d&&(h=h.filter(function(T){return Object.getOwnPropertyDescriptor(p,T).enumerable})),x.push.apply(x,h)}return x}function y(p){for(var d=1;d<arguments.length;d++){var x=arguments[d]!=null?arguments[d]:{};d%2?b(Object(x),!0).forEach(function(h){g(p,h,x[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(x)):b(Object(x)).forEach(function(h){Object.defineProperty(p,h,Object.getOwnPropertyDescriptor(x,h))})}return p}function g(p,d,x){return d in p?Object.defineProperty(p,d,{value:x,enumerable:!0,configurable:!0,writable:!0}):p[d]=x,p}var E=y(y({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:r.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:U.default,bufferController:e.default,capLevelController:v.default,fpsController:f.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:i.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},_()),{},{subtitleStreamController:H.SubtitleStreamController,subtitleTrackController:N.default,timelineController:A.TimelineController,audioStreamController:m.default,audioTrackController:S.default,emeController:l.default,cmcdController:a.default});function _(){return{cueHandler:s.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function u(p,d){if((d.liveSyncDurationCount||d.liveMaxLatencyDurationCount)&&(d.liveSyncDuration||d.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(d.liveMaxLatencyDurationCount!==void 0&&(d.liveSyncDurationCount===void 0||d.liveMaxLatencyDurationCount<=d.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(d.liveMaxLatencyDuration!==void 0&&(d.liveSyncDuration===void 0||d.liveMaxLatencyDuration<=d.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},p,d)}function c(p){var d=p.loader;if(d!==o.default&&d!==r.default)n.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),p.progressive=!1;else{var x=Object(o.fetchSupported)();x&&(p.loader=o.default,p.progressive=!0,p.enableSoftwareAES=!0,n.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/polyfills/number.ts"),m=O("./src/utils/ewma-bandwidth-estimator.ts"),S=O("./src/events.ts"),H=O("./src/utils/buffer-helper.ts"),N=O("./src/errors.ts"),e=O("./src/types/loader.ts"),A=O("./src/utils/logger.ts");function v(a,r){for(var o=0;o<r.length;o++){var s=r[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function f(a,r,o){return r&&v(a.prototype,r),o&&v(a,o),a}var l=function(){function a(o){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=o;var s=o.config;this.bwEstimator=new m.default(s.abrEwmaSlowVoD,s.abrEwmaFastVoD,s.abrEwmaDefaultEstimate),this.registerListeners()}var r=a.prototype;return r.registerListeners=function(){var s=this.hls;s.on(S.Events.FRAG_LOADING,this.onFragLoading,this),s.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.on(S.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var s=this.hls;s.off(S.Events.FRAG_LOADING,this.onFragLoading,this),s.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),s.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),s.off(S.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(s,i){var n=i.frag;if(n.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=n,this.partCurrent=(t=i.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},r.onLevelLoaded=function(s,i){var n=this.hls.config;i.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var s=this.fragCurrent,i=this.partCurrent,n=this.hls,t=n.autoLevelEnabled,b=n.config,y=n.media;if(!s||!y)return;var g=i?i.stats:s.stats,E=i?i.duration:s.duration;if(g.aborted){A.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||y.paused||!y.playbackRate||!y.readyState)return;var _=performance.now()-g.loading.start,u=Math.abs(y.playbackRate);if(_<=500*E/u)return;var c=n.levels,p=n.minAutoLevel,d=c[s.level],x=g.total||Math.max(g.loaded,Math.round(E*d.maxBitrate/8)),h=Math.max(1,g.bwEstimate?g.bwEstimate/8:g.loaded*1e3/_),T=(x-g.loaded)/h,M=y.currentTime,D=(H.BufferHelper.bufferInfo(y,M,b.maxBufferHole).end-M)/u;if(D>=2*E/u||T<=D)return;var w=Number.POSITIVE_INFINITY,C;for(C=s.level-1;C>p;C--){var j=c[C].maxBitrate;if(w=E*j/(8*.8*h),w<D)break}if(w>=T)return;var L=this.bwEstimator.getEstimate();A.logger.warn("Fragment "+s.sn+(i?" part "+i.index:"")+" of level "+s.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+C+`
|
|
Current BW estimate: `+(Object(U.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+T.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+w.toFixed(3)+` s
|
|
Time to underbuffer: `+D.toFixed(3)+" s"),n.nextLoadLevel=C,this.bwEstimator.sample(_,g.loaded),this.clearTimer(),s.loader&&(this.fragCurrent=this.partCurrent=null,s.loader.abort()),n.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s,part:i,stats:g})},r.onFragLoaded=function(s,i){var n=i.frag,t=i.part;if(n.type===e.PlaylistLevelType.MAIN&&Object(U.isFiniteNumber)(n.sn)){var b=t?t.stats:n.stats,y=t?t.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var g=this.hls.levels[n.level],E=(g.loaded?g.loaded.bytes:0)+b.loaded,_=(g.loaded?g.loaded.duration:0)+y;g.loaded={bytes:E,duration:_},g.realBitrate=Math.round(8*E/_)}if(n.bitrateTest){var u={stats:b,frag:n,part:t,id:n.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,u),n.bitrateTest=!1}}},r.onFragBuffered=function(s,i){var n=i.frag,t=i.part,b=t?t.stats:n.stats;if(b.aborted)return;if(n.type!==e.PlaylistLevelType.MAIN||n.sn==="initSegment")return;var y=b.parsing.end-b.loading.start;this.bwEstimator.sample(y,b.loaded),b.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},r.onError=function(s,i){switch(i.details){case N.ErrorDetails.FRAG_LOAD_ERROR:case N.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var s=this.fragCurrent,i=this.partCurrent,n=this.hls,t=n.maxAutoLevel,b=n.config,y=n.minAutoLevel,g=n.media,E=i?i.duration:s?s.duration:0,_=g?g.currentTime:0,u=g&&g.playbackRate!==0?Math.abs(g.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():b.abrEwmaDefaultEstimate,p=(H.BufferHelper.bufferInfo(g,_,b.maxBufferHole).end-_)/u,d=this.findBestLevel(c,y,t,p,b.abrBandWidthFactor,b.abrBandWidthUpFactor);if(d>=0)return d;A.logger.trace((p?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var x=E?Math.min(E,b.maxStarvationDelay):b.maxStarvationDelay,h=b.abrBandWidthFactor,T=b.abrBandWidthUpFactor;if(!p){var M=this.bitrateTestDelay;if(M){var D=E?Math.min(E,b.maxLoadingDelay):b.maxLoadingDelay;x=D-M,A.logger.trace("bitrate test took "+Math.round(1e3*M)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*x)+" ms"),h=T=1}}return d=this.findBestLevel(c,y,t,p+x,h,T),Math.max(d,0)},r.findBestLevel=function(s,i,n,t,b,y){for(var g,E=this.fragCurrent,_=this.partCurrent,u=this.lastLoadedFragLevel,c=this.hls.levels,p=c[u],d=!!(p!=null&&(g=p.details)!==null&&g!==void 0&&g.live),x=p==null?void 0:p.codecSet,h=_?_.duration:E?E.duration:0,T=n;T>=i;T--){var M=c[T];if(!M||x&&M.codecSet!==x)continue;var D=M.details,w=(_?D==null?void 0:D.partTarget:D==null?void 0:D.averagetargetduration)||h,C=void 0;T<=u?C=b*s:C=y*s;var j=c[T].maxBitrate,L=j*w/C;if(A.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+T+"/"+Math.round(C)+"/"+j+"/"+w+"/"+t+"/"+L),C>j&&(!L||d&&!this.bitrateTestDelay||L<t))return T}return-1},f(a,[{key:"nextAutoLevel",get:function(){var s=this._nextAutoLevel,i=this.bwEstimator;if(s!==-1&&(!i||!i.canEstimate()))return s;var n=this.getNextABRAutoLevel();return s!==-1&&(n=Math.min(s,n)),n},set:function(s){this._nextAutoLevel=s}}]),a}();k.default=l},"./src/controller/audio-stream-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/polyfills/number.ts"),m=O("./src/controller/base-stream-controller.ts"),S=O("./src/events.ts"),H=O("./src/utils/buffer-helper.ts"),N=O("./src/controller/fragment-tracker.ts"),e=O("./src/types/level.ts"),A=O("./src/types/loader.ts"),v=O("./src/loader/fragment.ts"),f=O("./src/demux/chunk-cache.ts"),l=O("./src/demux/transmuxer-interface.ts"),a=O("./src/types/transmuxer.ts"),r=O("./src/controller/fragment-finders.ts"),o=O("./src/utils/discontinuities.ts"),s=O("./src/errors.ts"),i=O("./src/utils/logger.ts");function n(){return n=Object.assign||function(E){for(var _=1;_<arguments.length;_++){var u=arguments[_];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(E[c]=u[c])}return E},n.apply(this,arguments)}function t(E,_){E.prototype=Object.create(_.prototype),E.prototype.constructor=E,b(E,_)}function b(E,_){return b=Object.setPrototypeOf||function(c,p){return c.__proto__=p,c},b(E,_)}var y=100,g=function(E){t(_,E);function _(c,p){var d;return d=E.call(this,c,p,"[audio-stream-controller]")||this,d.videoBuffer=null,d.videoTrackCC=-1,d.waitingVideoCC=-1,d.audioSwitch=!1,d.trackId=-1,d.waitingData=null,d.mainDetails=null,d.bufferFlushed=!1,d._registerListeners(),d}var u=_.prototype;return u.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},u._registerListeners=function(){var p=this.hls;p.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.on(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.on(S.Events.ERROR,this.onError,this),p.on(S.Events.BUFFER_RESET,this.onBufferReset,this),p.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),p.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},u._unregisterListeners=function(){var p=this.hls;p.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),p.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),p.off(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),p.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),p.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),p.off(S.Events.ERROR,this.onError,this),p.off(S.Events.BUFFER_RESET,this.onBufferReset,this),p.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),p.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),p.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),p.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},u.onInitPtsFound=function(p,d){var x=d.frag,h=d.id,T=d.initPTS;if(h==="main"){var M=x.cc;this.initPTS[x.cc]=T,this.log("InitPTS for cc: "+M+" found from main: "+T),this.videoTrackCC=M,this.state===m.State.WAITING_INIT_PTS&&this.tick()}},u.startLoad=function(p){if(!this.levels){this.startPosition=p,this.state=m.State.STOPPED;return}var d=this.lastCurrentTime;this.stopLoad(),this.setInterval(y),this.fragLoadError=0,d>0&&p===-1?(this.log("Override startPosition with lastCurrentTime @"+d.toFixed(3)),this.state=m.State.IDLE):(this.loadedmetadata=!1,this.state=m.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=p,this.tick()},u.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_TRACK:{var p,d=this.levels,x=this.trackId,h=d==null||((p=d[x])===null||p===void 0)?void 0:p.details;if(h){if(this.waitForCdnTuneIn(h))break;this.state=m.State.WAITING_INIT_PTS}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var T,M=performance.now(),D=this.retryDate;(!D||M>=D||(T=this.media)!==null&&T!==void 0&&T.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=m.State.IDLE);break}case m.State.WAITING_INIT_PTS:{var w=this.waitingData;if(w){var C=w.frag,j=w.part,L=w.cache,z=w.complete;if(this.initPTS[C.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.FRAG_LOADING;var $=L.flush(),he={frag:C,part:j,payload:$,networkDetails:null};this._handleFragmentLoadProgress(he),z&&E.prototype._handleFragmentLoadComplete.call(this,he)}else if(this.videoTrackCC!==this.waitingVideoCC)i.logger.log("Waiting fragment cc ("+C.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var fe=this.getLoadPosition(),Ie=H.BufferHelper.bufferInfo(this.mediaBuffer,fe,this.config.maxBufferHole),Se=Object(r.fragmentWithinToleranceTest)(Ie.end,this.config.maxFragLookUpTolerance,C);Se<0&&(i.logger.log("Waiting fragment cc ("+C.cc+") @ "+C.start+" cancelled because another fragment at "+Ie.end+" is needed"),this.clearWaitingFragment())}}else this.state=m.State.IDLE}}this.onTickEnd()},u.clearWaitingFragment=function(){var p=this.waitingData;p&&(this.fragmentTracker.removeFragment(p.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.IDLE)},u.onTickEnd=function(){var p=this.media;if(!p||!p.readyState)return;var d=this.mediaBuffer?this.mediaBuffer:p,x=d.buffered;!this.loadedmetadata&&x.length&&(this.loadedmetadata=!0),this.lastCurrentTime=p.currentTime},u.doTickIdle=function(){var p,d,x=this.hls,h=this.levels,T=this.media,M=this.trackId,D=x.config;if(!h||!h[M])return;if(!T&&(this.startFragRequested||!D.startFragPrefetch))return;var w=h[M],C=w.details;if(!C||C.live&&this.levelLastLoaded!==M||this.waitForCdnTuneIn(C)){this.state=m.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,A.PlaylistLevelType.AUDIO));var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,A.PlaylistLevelType.AUDIO);if(j===null)return;var L=j.len,z=this.getMaxBufferLength(),$=this.audioSwitch;if(L>=z&&!$)return;if(!$&&this._streamEnded(j,C)){x.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=m.State.ENDED;return}var he=C.fragments,fe=he[0].start,Ie=j.end;if($){var Se=this.getLoadPosition();Ie=Se,C.PTSKnown&&Se<fe&&((j.end>fe||j.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),T.currentTime=fe+.05))}var pe=this.getNextFragment(Ie,C);if(!pe){this.bufferFlushed=!0;return}((p=pe.decryptdata)===null||p===void 0?void 0:p.keyFormat)==="identity"&&!((d=pe.decryptdata)!==null&&d!==void 0&&d.key)?this.loadKey(pe,C):this.loadFragment(pe,C,Ie)},u.getMaxBufferLength=function(){var p=E.prototype.getMaxBufferLength.call(this),d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,A.PlaylistLevelType.MAIN);return d===null?p:Math.max(p,d.len)},u.onMediaDetaching=function(){this.videoBuffer=null,E.prototype.onMediaDetaching.call(this)},u.onAudioTracksUpdated=function(p,d){var x=d.audioTracks;this.resetTransmuxer(),this.levels=x.map(function(h){return new e.Level(h)})},u.onAudioTrackSwitching=function(p,d){var x=!!d.url;this.trackId=d.id;var h=this.fragCurrent;h!=null&&h.loader&&h.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),x?this.setInterval(y):this.resetTransmuxer(),x?(this.audioSwitch=!0,this.state=m.State.IDLE):this.state=m.State.STOPPED,this.tick()},u.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},u.onLevelLoaded=function(p,d){this.mainDetails=d.details},u.onAudioTrackLoaded=function(p,d){var x,h=this.levels,T=d.details,M=d.id;if(!h){this.warn("Audio tracks were reset while loading level "+M);return}this.log("Track "+M+" loaded ["+T.startSN+","+T.endSN+"],duration:"+T.totalduration);var D=h[M],w=0;if(T.live||(x=D.details)!==null&&x!==void 0&&x.live){var C=this.mainDetails;if(T.fragments[0]||(T.deltaUpdateFailed=!0),T.deltaUpdateFailed||!C)return;!D.details&&T.hasProgramDateTime&&C.hasProgramDateTime?(Object(o.alignMediaPlaylistByPDT)(T,C),w=T.fragments[0].start):w=this.alignPlaylists(T,D.details)}D.details=T,this.levelLastLoaded=M,!this.startFragRequested&&(this.mainDetails||!T.live)&&this.setStartPosition(D.details,w),this.state===m.State.WAITING_TRACK&&!this.waitForCdnTuneIn(T)&&(this.state=m.State.IDLE),this.tick()},u._handleFragmentLoadProgress=function(p){var d,x=p.frag,h=p.part,T=p.payload,M=this.config,D=this.trackId,w=this.levels;if(!w){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+x.sn+" of level "+x.level+" will not be buffered");return}var C=w[D];console.assert(C,"Audio track is defined on fragment load progress");var j=C.details;console.assert(j,"Audio track details are defined on fragment load progress");var L=M.defaultAudioCodec||C.audioCodec||"mp4a.40.2",z=this.transmuxer;z||(z=this.transmuxer=new l.default(this.hls,A.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[x.cc],he=(d=x.initSegment)===null||d===void 0?void 0:d.data;if($!==void 0){var fe=!1,Ie=h?h.index:-1,Se=Ie!==-1,pe=new a.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,T.byteLength,Ie,Se);z.push(T,he,L,"",x,h,j.totalduration,fe,pe,$)}else{i.logger.log("Unknown video PTS for cc "+x.cc+", waiting for video PTS before demuxing audio frag "+x.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+D);var Ce=this.waitingData=this.waitingData||{frag:x,part:h,cache:new f.default,complete:!1},Me=Ce.cache;Me.push(new Uint8Array(T)),this.waitingVideoCC=this.videoTrackCC,this.state=m.State.WAITING_INIT_PTS}},u._handleFragmentLoadComplete=function(p){if(this.waitingData){this.waitingData.complete=!0;return}E.prototype._handleFragmentLoadComplete.call(this,p)},u.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},u.onBufferCreated=function(p,d){var x=d.tracks.audio;x&&(this.mediaBuffer=x.buffer),d.tracks.video&&(this.videoBuffer=d.tracks.video.buffer)},u.onFragBuffered=function(p,d){var x=d.frag,h=d.part;if(x.type!==A.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(h?" p: "+h.index:"")+" of level "+x.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}x.sn!=="initSegment"&&(this.fragPrevious=x,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(x,h)},u.onError=function(p,d){switch(d.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(A.PlaylistLevelType.AUDIO,d);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==m.State.ERROR&&this.state!==m.State.STOPPED&&(this.state=d.fatal?m.State.ERROR:m.State.IDLE,this.warn(d.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(d.parent==="audio"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var x=!0,h=this.getFwdBufferInfo(this.mediaBuffer,A.PlaylistLevelType.AUDIO);h&&h.len>.5&&(x=!this.reduceMaxBufferLength(h.len)),x&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,E.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},u.onBufferFlushed=function(p,d){var x=d.type;x===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},u._handleTransmuxComplete=function(p){var d,x="audio",h=this.hls,T=p.remuxResult,M=p.chunkMeta,D=this.getCurrentContext(M);if(!D){this.warn("The loading context changed while buffering fragment "+M.sn+" of level "+M.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(M.level);return}var w=D.frag,C=D.part,j=T.audio,L=T.text,z=T.id3,$=T.initSegment;if(this.fragContextChanged(w))return;if(this.state=m.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,w,M),h.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:w,id:x,tracks:$.tracks})),j){var he=j.startPTS,fe=j.endPTS,Ie=j.startDTS,Se=j.endDTS;C&&(C.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:he,endPTS:fe,startDTS:Ie,endDTS:Se}),w.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,he,fe,Ie,Se),this.bufferFragmentData(j,w,C,M)}if(z!=null&&(d=z.samples)!==null&&d!==void 0&&d.length){var pe=n({frag:w,id:x},z);h.trigger(S.Events.FRAG_PARSING_METADATA,pe)}if(L){var Ce=n({frag:w,id:x},L);h.trigger(S.Events.FRAG_PARSING_USERDATA,Ce)}},u._bufferInitSegment=function(p,d,x){if(this.state!==m.State.PARSING)return;p.video&&delete p.video;var h=p.audio;if(!h)return;h.levelCodec=h.codec,h.id="audio",this.log("Init audio buffer, container:"+h.container+", codecs[parsed]=["+h.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,p);var T=h.initSegment;if(T!=null&&T.byteLength){var M={type:"audio",frag:d,part:null,chunkMeta:x,parent:d.type,data:T};this.hls.trigger(S.Events.BUFFER_APPENDING,M)}this.tick()},u.loadFragment=function(p,d,x){var h=this.fragmentTracker.getState(p);this.fragCurrent=p,(this.audioSwitch||h===N.FragmentState.NOT_LOADED||h===N.FragmentState.PARTIAL)&&(p.sn==="initSegment"?this._loadInitSegment(p):d.live&&!Object(U.isFiniteNumber)(this.initPTS[p.cc])?(this.log("Waiting for video PTS in continuity counter "+p.cc+" of live stream before loading audio fragment "+p.sn+" of level "+this.trackId),this.state=m.State.WAITING_INIT_PTS):(this.startFragRequested=!0,E.prototype.loadFragment.call(this,p,d,x)))},u.completeAudioSwitch=function(){var p=this.hls,d=this.media,x=this.trackId;d&&(this.log("Switching audio track : flushing all audio"),E.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,p.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:x})},_}(m.default);k.default=g},"./src/controller/audio-track-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/controller/base-playlist-controller.ts"),H=O("./src/types/loader.ts");function N(l,a){for(var r=0;r<a.length;r++){var o=a[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(l,o.key,o)}}function e(l,a,r){return a&&N(l.prototype,a),r&&N(l,r),l}function A(l,a){l.prototype=Object.create(a.prototype),l.prototype.constructor=l,v(l,a)}function v(l,a){return v=Object.setPrototypeOf||function(o,s){return o.__proto__=s,o},v(l,a)}var f=function(l){A(a,l);function a(o){var s;return s=l.call(this,o,"[audio-track-controller]")||this,s.tracks=[],s.groupId=null,s.tracksInGroup=[],s.trackId=-1,s.trackName="",s.selectDefaultTrack=!0,s.registerListeners(),s}var r=a.prototype;return r.registerListeners=function(){var s=this.hls;s.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),s.on(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.on(U.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.on(U.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var s=this.hls;s.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),s.off(U.Events.LEVEL_LOADING,this.onLevelLoading,this),s.off(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),s.off(U.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),s.off(U.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,l.prototype.destroy.call(this)},r.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},r.onManifestParsed=function(s,i){this.tracks=i.audioTracks||[]},r.onAudioTrackLoaded=function(s,i){var n=i.id,t=i.details,b=this.tracksInGroup[n];if(!b){this.warn("Invalid audio track id "+n);return}var y=b.details;b.details=i.details,this.log("audioTrack "+n+" loaded ["+t.startSN+"-"+t.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,i,y))},r.onLevelLoading=function(s,i){this.switchLevel(i.level)},r.onLevelSwitching=function(s,i){this.switchLevel(i.level)},r.switchLevel=function(s){var i=this.hls.levels[s];if(!(i!=null&&i.audioGroupIds))return;var n=i.audioGroupIds[i.urlId];if(this.groupId!==n){this.groupId=n;var t=this.tracks.filter(function(y){return!n||y.groupId===n});this.selectDefaultTrack&&!t.some(function(y){return y.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var b={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(U.Events.AUDIO_TRACKS_UPDATED,b),this.selectInitialTrack()}},r.onError=function(s,i){if(l.prototype.onError.call(this,s,i),i.fatal||!i.context)return;i.context.type===H.PlaylistContextType.AUDIO_TRACK&&i.context.id===this.trackId&&i.context.groupId===this.groupId&&this.retryLoadingOrFail(i)},r.setAudioTrack=function(s){var i=this.tracksInGroup;if(s<0||s>=i.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var n=i[this.trackId];this.log("Now switching to audio-track index "+s);var t=i[s],b=t.id,y=t.groupId,g=y===void 0?"":y,E=t.name,_=t.type,u=t.url;if(this.trackId=s,this.trackName=E,this.selectDefaultTrack=!1,this.hls.trigger(U.Events.AUDIO_TRACK_SWITCHING,{id:b,groupId:g,name:E,type:_,url:u}),t.details&&!t.details.live)return;var c=this.switchParams(t.url,n==null?void 0:n.details);this.loadPlaylist(c)},r.selectInitialTrack=function(){var s=this.tracksInGroup;console.assert(s.length,"Initial audio track should be selected when tracks are known");var i=this.trackName,n=this.findTrackId(i)||this.findTrackId();n!==-1?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},r.findTrackId=function(s){for(var i=this.tracksInGroup,n=0;n<i.length;n++){var t=i[n];if((!this.selectDefaultTrack||t.default)&&(!s||s===t.name))return t.id}return-1},r.loadPlaylist=function(s){var i=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(i)){var n=i.id,t=i.groupId,b=i.url;if(s)try{b=s.addDirectives(b)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(U.Events.AUDIO_TRACK_LOADING,{url:b,id:n,groupId:t,deliveryDirectives:s||null})}},e(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(s){this.selectDefaultTrack=!1,this.setAudioTrack(s)}}]),a}(S.default);k.default=f},"./src/controller/base-playlist-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return e});var U=O("./src/polyfills/number.ts"),m=O("./src/types/level.ts"),S=O("./src/controller/level-helper.ts"),H=O("./src/utils/logger.ts"),N=O("./src/errors.ts"),e=function(){function A(f,l){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=H.logger.log.bind(H.logger,l+":"),this.warn=H.logger.warn.bind(H.logger,l+":"),this.hls=f}var v=A.prototype;return v.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},v.onError=function(l,a){a.fatal&&a.type===N.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},v.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},v.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},v.stopLoad=function(){this.canLoad=!1,this.clearTimer()},v.switchParams=function(l,a){var r=a==null?void 0:a.renditionReports;if(r)for(var o=0;o<r.length;o++){var s=r[o],i=""+s.URI;if(i===l.substr(-i.length)){var n=parseInt(s["LAST-MSN"]),t=parseInt(s["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var b=Math.min(a.age-a.partTarget,a.targetduration);t!==void 0&&b>a.partTarget&&(t+=1)}if(Object(U.isFiniteNumber)(n))return new m.HlsUrlParameters(n,Object(U.isFiniteNumber)(t)?t:void 0,m.HlsSkip.No)}}},v.loadPlaylist=function(l){},v.shouldLoadTrack=function(l){return this.canLoad&&l&&!!l.url&&(!l.details||l.details.live)},v.playlistLoaded=function(l,a,r){var o=this,s=a.details,i=a.stats,n=i.loading.end?Math.max(0,self.performance.now()-i.loading.end):0;if(s.advancedDateTime=Date.now()-n,s.live||r!=null&&r.live){if(s.reloaded(r),r&&this.log("live playlist "+l+" "+(s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:"MISSED")),r&&s.fragments.length>0&&Object(S.mergeDetails)(r,s),!this.canLoad||!s.live)return;var t,b=void 0,y=void 0;if(s.canBlockReload&&s.endSN&&s.advanced){var g=this.hls.config.lowLatencyMode,E=s.lastPartSn,_=s.endSN,u=s.lastPartIndex,c=u!==-1,p=E===_,d=g?0:u;c?(b=p?_+1:E,y=p?d:u+1):b=_+1;var x=s.age,h=x+s.ageHeader,T=Math.min(h-s.partTarget,s.targetduration*1.5);if(T>0){if(r&&T>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+T+" with playlist age: "+s.age),T=0;else{var M=Math.floor(T/s.targetduration);if(b+=M,y!==void 0){var D=Math.round(T%s.targetduration/s.partTarget);y+=D}this.log("CDN Tune-in age: "+s.ageHeader+"s last advanced "+x.toFixed(2)+"s goal: "+T+" skip sn "+M+" to part "+y)}s.tuneInGoal=T}if(t=this.getDeliveryDirectives(s,a.deliveryDirectives,b,y),g||!p){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(s,a.deliveryDirectives,b,y);var w=Object(S.computeReloadInterval)(s,i);b!==void 0&&s.canBlockReload&&(w-=s.partTarget||1),this.log("reload live playlist "+l+" in "+Math.round(w)+" ms"),this.timer=self.setTimeout(function(){return o.loadPlaylist(t)},w)}else this.clearTimer()},v.getDeliveryDirectives=function(l,a,r,o){var s=Object(m.getSkipValue)(l,r);return a!=null&&a.skip&&l.deltaUpdateFailed&&(r=a.msn,o=a.part,s=m.HlsSkip.No),new m.HlsUrlParameters(r,o,s)},v.retryLoadingOrFail=function(l){var a=this,r=this.hls.config,o=this.retryCount<r.levelLoadingMaxRetry;if(o){var s;if(this.retryCount++,l.details.indexOf("LoadTimeOut")>-1&&(s=l.context)!==null&&s!==void 0&&s.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+l.details+'"'),this.loadPlaylist();else{var i=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},i),this.warn("retry playlist loading #"+this.retryCount+" in "+i+' ms after "'+l.details+'"')}}else this.warn('cannot recover from error "'+l.details+'"'),this.clearTimer(),l.fatal=!0;return o},A}()},"./src/controller/base-stream-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"State",function(){return _}),O.d(k,"default",function(){return u});var U=O("./src/polyfills/number.ts"),m=O("./src/task-loop.ts"),S=O("./src/controller/fragment-tracker.ts"),H=O("./src/utils/buffer-helper.ts"),N=O("./src/utils/logger.ts"),e=O("./src/events.ts"),A=O("./src/errors.ts"),v=O("./src/types/transmuxer.ts"),f=O("./src/utils/mp4-tools.ts"),l=O("./src/utils/discontinuities.ts"),a=O("./src/controller/fragment-finders.ts"),r=O("./src/controller/level-helper.ts"),o=O("./src/loader/fragment-loader.ts"),s=O("./src/crypt/decrypter.ts"),i=O("./src/utils/time-ranges.ts"),n=O("./src/types/loader.ts");function t(c,p){for(var d=0;d<p.length;d++){var x=p[d];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(c,x.key,x)}}function b(c,p,d){return p&&t(c.prototype,p),d&&t(c,d),c}function y(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function g(c,p){c.prototype=Object.create(p.prototype),c.prototype.constructor=c,E(c,p)}function E(c,p){return E=Object.setPrototypeOf||function(x,h){return x.__proto__=h,x},E(c,p)}var _={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},u=function(c){g(p,c);function p(x,h,T){var M;return M=c.call(this)||this,M.hls=void 0,M.fragPrevious=null,M.fragCurrent=null,M.fragmentTracker=void 0,M.transmuxer=null,M._state=_.STOPPED,M.media=void 0,M.mediaBuffer=void 0,M.config=void 0,M.bitrateTest=!1,M.lastCurrentTime=0,M.nextLoadPosition=0,M.startPosition=0,M.loadedmetadata=!1,M.fragLoadError=0,M.retryDate=0,M.levels=null,M.fragmentLoader=void 0,M.levelLastLoaded=null,M.startFragRequested=!1,M.decrypter=void 0,M.initPTS=[],M.onvseeking=null,M.onvended=null,M.logPrefix="",M.log=void 0,M.warn=void 0,M.logPrefix=T,M.log=N.logger.log.bind(N.logger,T+":"),M.warn=N.logger.warn.bind(N.logger,T+":"),M.hls=x,M.fragmentLoader=new o.default(x.config),M.fragmentTracker=h,M.config=x.config,M.decrypter=new s.default(x,x.config),x.on(e.Events.KEY_LOADED,M.onKeyLoaded,y(M)),M}var d=p.prototype;return d.doTick=function(){this.onTickEnd()},d.onTickEnd=function(){},d.startLoad=function(h){},d.stopLoad=function(){this.fragmentLoader.abort();var h=this.fragCurrent;h&&this.fragmentTracker.removeFragment(h),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=_.STOPPED},d._streamEnded=function(h,T){var M=this.fragCurrent,D=this.fragmentTracker;if(!T.live&&M&&M.sn===T.endSN&&!h.nextStart){var w=D.getState(M);return w===S.FragmentState.PARTIAL||w===S.FragmentState.OK}return!1},d.onMediaAttached=function(h,T){var M=this.media=this.mediaBuffer=T.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),M.addEventListener("seeking",this.onvseeking),M.addEventListener("ended",this.onvended);var D=this.config;this.levels&&D.autoStartLoad&&this.state===_.STOPPED&&this.startLoad(D.startPosition)},d.onMediaDetaching=function(){var h=this.media;h!=null&&h.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),h&&(h.removeEventListener("seeking",this.onvseeking),h.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},d.onMediaSeeking=function(){var h=this.config,T=this.fragCurrent,M=this.media,D=this.mediaBuffer,w=this.state,C=M?M.currentTime:0,j=H.BufferHelper.bufferInfo(D||M,C,h.maxBufferHole);if(this.log("media seeking to "+(Object(U.isFiniteNumber)(C)?C.toFixed(3):C)+", state: "+w),w===_.ENDED)this.resetLoadingState();else if(T&&!j.len){var L=h.maxFragLookUpTolerance,z=T.start-L,$=T.start+T.duration+L,he=C>$;(C<z||he)&&(he&&T.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),T.loader.abort()),this.resetLoadingState())}M&&(this.lastCurrentTime=C),!this.loadedmetadata&&!j.len&&(this.nextLoadPosition=this.startPosition=C),this.tickImmediate()},d.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},d.onKeyLoaded=function(h,T){if(this.state!==_.KEY_LOADING||T.frag!==this.fragCurrent||!this.levels)return;this.state=_.IDLE;var M=this.levels[T.frag.level].details;M&&this.loadFragment(T.frag,M,T.frag.start)},d.onHandlerDestroying=function(){this.stopLoad(),c.prototype.onHandlerDestroying.call(this)},d.onHandlerDestroyed=function(){this.state=_.STOPPED,this.hls.off(e.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,c.prototype.onHandlerDestroyed.call(this)},d.loadKey=function(h,T){this.log("Loading key for "+h.sn+" of ["+T.startSN+"-"+T.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+h.level),this.state=_.KEY_LOADING,this.fragCurrent=h,this.hls.trigger(e.Events.KEY_LOADING,{frag:h})},d.loadFragment=function(h,T,M){this._loadFragForPlayback(h,T,M)},d._loadFragForPlayback=function(h,T,M){var D=this,w=function(j){if(D.fragContextChanged(h)){D.warn("Fragment "+h.sn+(j.part?" p: "+j.part.index:"")+" of level "+h.level+" was dropped during download."),D.fragmentTracker.removeFragment(h);return}h.stats.chunkCount++,D._handleFragmentLoadProgress(j)};this._doFragLoad(h,T,M,w).then(function(C){if(!C)return;D.fragLoadError=0;var j=D.state;if(D.fragContextChanged(h)){(j===_.FRAG_LOADING||j===_.BACKTRACKING||!D.fragCurrent&&j===_.PARSING)&&(D.fragmentTracker.removeFragment(h),D.state=_.IDLE);return}if("payload"in C&&(D.log("Loaded fragment "+h.sn+" of level "+h.level),D.hls.trigger(e.Events.FRAG_LOADED,C),D.state===_.BACKTRACKING)){D.fragmentTracker.backtrack(h,C),D.resetFragmentLoading(h);return}D._handleFragmentLoadComplete(C)}).catch(function(C){D.warn(C),D.resetFragmentLoading(h)})},d.flushMainBuffer=function(h,T,M){if(M===void 0&&(M=null),!(h-T))return;var D={startOffset:h,endOffset:T,type:M};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,D)},d._loadInitSegment=function(h){var T=this;this._doFragLoad(h).then(function(M){if(!M||T.fragContextChanged(h)||!T.levels)throw new Error("init load aborted");return M}).then(function(M){var D=T.hls,w=M.payload,C=h.decryptdata;if(w&&w.byteLength>0&&C&&C.key&&C.iv&&C.method==="AES-128"){var j=self.performance.now();return T.decrypter.webCryptoDecrypt(new Uint8Array(w),C.key.buffer,C.iv.buffer).then(function(L){var z=self.performance.now();return D.trigger(e.Events.FRAG_DECRYPTED,{frag:h,payload:L,stats:{tstart:j,tdecrypt:z}}),M.payload=L,M})}return M}).then(function(M){var D=T.fragCurrent,w=T.hls,C=T.levels;if(!C)throw new Error("init load aborted, missing levels");var j=C[h.level].details;console.assert(j,"Level details are defined when init segment is loaded");var L=h.stats;T.state=_.IDLE,T.fragLoadError=0,h.data=new Uint8Array(M.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),M.frag===D&&w.trigger(e.Events.FRAG_BUFFERED,{stats:L,frag:D,part:null,id:h.type}),T.tick()}).catch(function(M){T.warn(M),T.resetFragmentLoading(h)})},d.fragContextChanged=function(h){var T=this.fragCurrent;return!h||!T||h.level!==T.level||h.sn!==T.sn||h.urlId!==T.urlId},d.fragBufferedComplete=function(h,T){var M=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+h.type+" sn: "+h.sn+(T?" part: "+T.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+h.level+" "+i.default.toString(H.BufferHelper.getBuffered(M))),this.state=_.IDLE,this.tick()},d._handleFragmentLoadComplete=function(h){var T=this.transmuxer;if(!T)return;var M=h.frag,D=h.part,w=h.partsLoaded,C=!w||w.length===0||w.some(function(L){return!L}),j=new v.ChunkMetadata(M.level,M.sn,M.stats.chunkCount+1,0,D?D.index:-1,!C);T.flush(j)},d._handleFragmentLoadProgress=function(h){},d._doFragLoad=function(h,T,M,D){var w=this;if(M===void 0&&(M=null),!this.levels)throw new Error("frag load aborted, missing levels");if(M=Math.max(h.start,M||0),this.config.lowLatencyMode&&T){var C=T.partList;if(C&&D){M>h.end&&T.fragmentHint&&(h=T.fragmentHint);var j=this.getNextPart(C,h,M);if(j>-1){var L=C[j];return this.log("Loading part sn: "+h.sn+" p: "+L.index+" cc: "+h.cc+" of playlist ["+T.startSN+"-"+T.endSN+"] parts [0-"+j+"-"+(C.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+h.level+", target: "+parseFloat(M.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=_.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:h,part:C[j],targetBufferTime:M}),this.doFragPartsLoad(h,C,j,D).catch(function(z){return w.handleFragLoadError(z)})}else if(!h.url||this.loadedEndOfParts(C,M))return Promise.resolve(null)}}return this.log("Loading fragment "+h.sn+" cc: "+h.cc+" "+(T?"of ["+T.startSN+"-"+T.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+h.level+", target: "+parseFloat(M.toFixed(3))),Object(U.isFiniteNumber)(h.sn)&&!this.bitrateTest&&(this.nextLoadPosition=h.start+h.duration),this.state=_.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:h,targetBufferTime:M}),this.fragmentLoader.load(h,D).catch(function(z){return w.handleFragLoadError(z)})},d.doFragPartsLoad=function(h,T,M,D){var w=this;return new Promise(function(C,j){var L=[],z=function $(he){var fe=T[he];w.fragmentLoader.loadPart(h,fe,D).then(function(Ie){L[fe.index]=Ie;var Se=Ie.part;w.hls.trigger(e.Events.FRAG_LOADED,Ie);var pe=T[he+1];if(pe&&pe.fragment===h)$(he+1);else return C({frag:h,part:Se,partsLoaded:L})}).catch(j)};z(M)})},d.handleFragLoadError=function(h){var T=h.data;return T&&T.details===A.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(T.frag,T.part):this.hls.trigger(e.Events.ERROR,T),null},d._handleTransmuxerFlush=function(h){var T=this.getCurrentContext(h);if(!T||this.state!==_.PARSING){this.fragCurrent||(this.state=_.IDLE);return}var M=T.frag,D=T.part,w=T.level,C=self.performance.now();M.stats.parsing.end=C,D&&(D.stats.parsing.end=C),this.updateLevelTiming(M,D,w,h.partial)},d.getCurrentContext=function(h){var T=this.levels,M=h.level,D=h.sn,w=h.part;if(!T||!T[M])return this.warn("Levels object was unset while buffering fragment "+D+" of level "+M+". The current chunk will not be buffered."),null;var C=T[M],j=w>-1?Object(r.getPartWith)(C,D,w):null,L=j?j.fragment:Object(r.getFragmentWithSN)(C,D,this.fragCurrent);return L?{frag:L,part:j,level:C}:null},d.bufferFragmentData=function(h,T,M,D){if(!h||this.state!==_.PARSING)return;var w=h.data1,C=h.data2,j=w;if(w&&C&&(j=Object(f.appendUint8Array)(w,C)),!j||!j.length)return;var L={type:h.type,frag:T,part:M,chunkMeta:D,parent:T.type,data:j};this.hls.trigger(e.Events.BUFFER_APPENDING,L),h.dropped&&h.independent&&!M&&this.flushBufferGap(T)},d.flushBufferGap=function(h){var T=this.media;if(!T)return;if(!H.BufferHelper.isBuffered(T,T.currentTime)){this.flushMainBuffer(0,h.start);return}var M=T.currentTime,D=H.BufferHelper.bufferInfo(T,M,0),w=h.duration,C=Math.min(this.config.maxFragLookUpTolerance*2,w*.25),j=Math.max(Math.min(h.start-C,D.end-C),M+C);h.start-j>C&&this.flushMainBuffer(j,h.start)},d.getFwdBufferInfo=function(h,T){var M=this.config,D=this.getLoadPosition();if(!Object(U.isFiniteNumber)(D))return null;var w=H.BufferHelper.bufferInfo(h,D,M.maxBufferHole);if(w.len===0&&w.nextStart!==void 0){var C=this.fragmentTracker.getBufferedFrag(D,T);if(C&&w.nextStart<C.end)return H.BufferHelper.bufferInfo(h,D,Math.max(w.nextStart,M.maxBufferHole))}return w},d.getMaxBufferLength=function(h){var T=this.config,M;return h?M=Math.max(8*T.maxBufferSize/h,T.maxBufferLength):M=T.maxBufferLength,Math.min(M,T.maxMaxBufferLength)},d.reduceMaxBufferLength=function(h){var T=this.config,M=h||T.maxBufferLength;return T.maxMaxBufferLength>=M?(T.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+T.maxMaxBufferLength+"s"),!0):!1},d.getNextFragment=function(h,T){var M,D,w=T.fragments,C=w.length;if(!C)return null;var j=this.config,L=w[0].start,z;if(T.live){var $=j.initialLiveManifestSize;if(C<$)return this.warn("Not enough fragments to start playback (have: "+C+", need: "+$+")"),null;!T.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(z=this.getInitialLiveFragment(T,w),this.startPosition=z?this.hls.liveSyncPosition||z.start:h)}else h<=L&&(z=w[0]);if(!z){var he=j.lowLatencyMode?T.partEnd:T.fragmentEnd;z=this.getFragmentAtPosition(h,he,T)}return(M=z)!==null&&M!==void 0&&M.initSegment&&!((D=z)!==null&&D!==void 0&&D.initSegment.data)&&!this.bitrateTest&&(z=z.initSegment),z},d.getNextPart=function(h,T,M){for(var D=-1,w=!1,C=!0,j=0,L=h.length;j<L;j++){var z=h[j];if(C=C&&!z.independent,D>-1&&M<z.start)break;var $=z.loaded;!$&&(w||z.independent||C)&&z.fragment===T&&(D=j),w=$}return D},d.loadedEndOfParts=function(h,T){var M=h[h.length-1];return M&&T>M.start&&M.loaded},d.getInitialLiveFragment=function(h,T){var M=this.fragPrevious,D=null;if(M){if(h.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+M.programDateTime),D=Object(a.findFragmentByPDT)(T,M.endProgramDateTime,this.config.maxFragLookUpTolerance)),!D){var w=M.sn+1;if(w>=h.startSN&&w<=h.endSN){var C=T[w-h.startSN];M.cc===C.cc&&(D=C,this.log("Live playlist, switching playlist, load frag with next SN: "+D.sn))}D||(D=Object(a.findFragWithCC)(T,M.cc),D&&this.log("Live playlist, switching playlist, load frag with same CC: "+D.sn))}}else{var j=this.hls.liveSyncPosition;j!==null&&(D=this.getFragmentAtPosition(j,this.bitrateTest?h.fragmentEnd:h.edge,h))}return D},d.getFragmentAtPosition=function(h,T,M){var D=this.config,w=this.fragPrevious,C=M.fragments,j=M.endSN,L=M.fragmentHint,z=D.maxFragLookUpTolerance,$=!!(D.lowLatencyMode&&M.partList&&L);$&&L&&!this.bitrateTest&&(C=C.concat(L),j=L.sn);var he;if(h<T){var fe=h>T-z?0:z;he=Object(a.findFragmentByPTS)(w,C,h,fe)}else he=C[C.length-1];if(he){var Ie=he.sn-M.startSN,Se=w&&he.level===w.level,pe=C[Ie+1],Ce=this.fragmentTracker.getState(he);if(Ce===S.FragmentState.BACKTRACKED){he=null;for(var Me=Ie;C[Me]&&this.fragmentTracker.getState(C[Me])===S.FragmentState.BACKTRACKED;)w?he=C[Me--]:he=C[--Me];he||(he=pe)}else w&&he.sn===w.sn&&!$&&(Se&&(he.sn<j&&this.fragmentTracker.getState(pe)!==S.FragmentState.OK?(this.log("SN "+he.sn+" just loaded, load next one: "+pe.sn),he=pe):he=null))}return he},d.synchronizeToLiveEdge=function(h){var T=this.config,M=this.media;if(!M)return;var D=this.hls.liveSyncPosition,w=M.currentTime,C=h.fragments[0].start,j=h.edge,L=w>=C-T.maxFragLookUpTolerance&&w<=j;if(D!==null&&M.duration>D&&(w<D||!L)){var z=T.liveMaxLatencyDuration!==void 0?T.liveMaxLatencyDuration:T.liveMaxLatencyDurationCount*h.targetduration;(!L&&M.readyState<4||w<j-z)&&(this.loadedmetadata||(this.nextLoadPosition=D),M.readyState&&(this.warn("Playback: "+w.toFixed(3)+" is located too far from the end of live sliding playlist: "+j+", reset currentTime to : "+D.toFixed(3)),M.currentTime=D))}},d.alignPlaylists=function(h,T){var M=this.levels,D=this.levelLastLoaded,w=this.fragPrevious,C=D!==null?M[D]:null,j=h.fragments.length;if(!j)return this.warn("No fragments in live playlist"),0;var L=h.fragments[0].start,z=!T,$=h.alignedSliding&&Object(U.isFiniteNumber)(L);if(z||!$&&!L){Object(l.alignStream)(w,C,h);var he=h.fragments[0].start;return this.log("Live playlist sliding: "+he.toFixed(2)+" start-sn: "+(T?T.startSN:"na")+"->"+h.startSN+" prev-sn: "+(w?w.sn:"na")+" fragments: "+j),he}return L},d.waitForCdnTuneIn=function(h){var T=3;return h.live&&h.canBlockReload&&h.tuneInGoal>Math.max(h.partHoldBack,h.partTarget*T)},d.setStartPosition=function(h,T){var M=this.startPosition;if(M<T&&(M=-1),M===-1||this.lastCurrentTime===-1){var D=h.startTimeOffset;Object(U.isFiniteNumber)(D)?(M=T+D,D<0&&(M+=h.totalduration),M=Math.min(Math.max(T,M),T+h.totalduration),this.log("Start time offset "+D+" found in playlist, adjust startPosition to "+M),this.startPosition=M):h.live?M=this.hls.liveSyncPosition||T:this.startPosition=M=0,this.lastCurrentTime=M}this.nextLoadPosition=M},d.getLoadPosition=function(){var h=this.media,T=0;return this.loadedmetadata&&h?T=h.currentTime:this.nextLoadPosition&&(T=this.nextLoadPosition),T},d.handleFragLoadAborted=function(h,T){this.transmuxer&&h.sn!=="initSegment"&&h.stats.aborted&&(this.warn("Fragment "+h.sn+(T?" part"+T.index:"")+" of level "+h.level+" was aborted"),this.resetFragmentLoading(h))},d.resetFragmentLoading=function(h){(!this.fragCurrent||!this.fragContextChanged(h))&&(this.state=_.IDLE)},d.onFragmentOrKeyLoadError=function(h,T){if(T.fatal)return;var M=T.frag;if(!M||M.type!==h)return;var D=this.fragCurrent;console.assert(D&&M.sn===D.sn&&M.level===D.level&&M.urlId===D.urlId,"Frag load error must match current frag to retry");var w=this.config;if(this.fragLoadError+1<=w.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(M.level))return;var C=Math.min(Math.pow(2,this.fragLoadError)*w.fragLoadingRetryDelay,w.fragLoadingMaxRetryTimeout);this.warn("Fragment "+M.sn+" of "+h+" "+M.level+" failed to load, retrying in "+C+"ms"),this.retryDate=self.performance.now()+C,this.fragLoadError++,this.state=_.FRAG_LOADING_WAITING_RETRY}else T.levelRetry?(h===n.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=_.IDLE):(N.logger.error(T.details+" reaches max retry, redispatch as fatal ..."),T.fatal=!0,this.hls.stopLoad(),this.state=_.ERROR)},d.afterBufferFlushed=function(h,T,M){if(!h)return;var D=H.BufferHelper.getBuffered(h);this.fragmentTracker.detectEvictedFragments(T,D,M),this.state===_.ENDED&&this.resetLoadingState()},d.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=_.IDLE},d.resetLiveStartWhenNotLoaded=function(h){if(!this.loadedmetadata){this.startFragRequested=!1;var T=this.levels?this.levels[h].details:null;if(T!=null&&T.live)return this.startPosition=-1,this.setStartPosition(T,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},d.updateLevelTiming=function(h,T,M,D){var w=this,C=M.details;console.assert(!!C,"level.details must be defined");var j=Object.keys(h.elementaryStreams).reduce(function(L,z){var $=h.elementaryStreams[z];if($){var he=$.endPTS-$.startPTS;if(he<=0)return w.warn("Could not parse fragment "+h.sn+" "+z+" duration reliably ("+he+") resetting transmuxer to fallback to playlist timing"),w.resetTransmuxer(),L||!1;var fe=D?0:Object(r.updateFragPTSDTS)(C,h,$.startPTS,$.endPTS,$.startDTS,$.endDTS);return w.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:C,level:M,drift:fe,type:z,frag:h,start:$.startPTS,end:$.endPTS}),!0}return L},!1);j?(this.state=_.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:h,part:T})):this.resetLoadingState()},d.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},b(p,[{key:"state",get:function(){return this._state},set:function(h){var T=this._state;T!==h&&(this._state=h,this.log(T+"->"+h))}}]),p}(m.default)},"./src/controller/buffer-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return a});var U=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),S=O("./src/utils/logger.ts"),H=O("./src/errors.ts"),N=O("./src/utils/buffer-helper.ts"),e=O("./src/utils/mediasource-helper.ts"),A=O("./src/loader/fragment.ts"),v=O("./src/controller/buffer-operation-queue.ts"),f=Object(e.getMediaSource)(),l=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function r(s){var i=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var n=i.hls,t=i.media,b=i.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),t&&(i.updateMediaElementDuration(),n.trigger(m.Events.MEDIA_ATTACHED,{media:t})),b&&b.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},this._onMediaSourceClose=function(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.logger.log("[buffer-controller]: Media source ended")},this.hls=s,this._initSourceBuffer(),this.registerListeners()}var o=r.prototype;return o.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},o.destroy=function(){this.unregisterListeners(),this.details=null},o.registerListeners=function(){var i=this.hls;i.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(m.Events.BUFFER_RESET,this.onBufferReset,this),i.on(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.on(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.on(m.Events.BUFFER_EOS,this.onBufferEos,this),i.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.on(m.Events.FRAG_PARSED,this.onFragParsed,this),i.on(m.Events.FRAG_CHANGED,this.onFragChanged,this)},o.unregisterListeners=function(){var i=this.hls;i.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),i.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(m.Events.BUFFER_RESET,this.onBufferReset,this),i.off(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),i.off(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),i.off(m.Events.BUFFER_EOS,this.onBufferEos,this),i.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),i.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),i.off(m.Events.FRAG_PARSED,this.onFragParsed,this),i.off(m.Events.FRAG_CHANGED,this.onFragChanged,this)},o._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},o.onManifestParsed=function(i,n){var t=2;(n.audio&&!n.video||!n.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},o.onMediaAttaching=function(i,n){var t=this.media=n.media;if(t&&f){var b=this.mediaSource=new f;b.addEventListener("sourceopen",this._onMediaSourceOpen),b.addEventListener("sourceended",this._onMediaSourceEnded),b.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(b),this._objectUrl=t.src}},o.onMediaDetaching=function(){var i=this.media,n=this.mediaSource,t=this._objectUrl;if(n){if(S.logger.log("[buffer-controller]: media source detaching"),n.readyState==="open")try{n.endOfStream()}catch(b){S.logger.warn("[buffer-controller]: onMediaDetaching: "+b.message+" while calling endOfStream")}this.onBufferReset(),n.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("sourceended",this._onMediaSourceEnded),n.removeEventListener("sourceclose",this._onMediaSourceClose),i&&(t&&self.URL.revokeObjectURL(t),i.src===t?(i.removeAttribute("src"),i.load()):S.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(m.Events.MEDIA_DETACHED,void 0)},o.onBufferReset=function(){var i=this;this.getSourceBufferTypes().forEach(function(n){var t=i.sourceBuffer[n];try{t&&(i.removeBufferListeners(n),i.mediaSource&&i.mediaSource.removeSourceBuffer(t),i.sourceBuffer[n]=void 0)}catch(b){S.logger.warn("[buffer-controller]: Failed to reset the "+n+" buffer",b)}}),this._initSourceBuffer()},o.onBufferCodecs=function(i,n){var t=this,b=this.getSourceBufferTypes().length;if(Object.keys(n).forEach(function(y){if(b){var g=t.tracks[y];if(g&&typeof g.buffer.changeType=="function"){var E=n[y],_=E.codec,u=E.levelCodec,c=E.container,p=(g.levelCodec||g.codec).replace(l,"$1"),d=(u||_).replace(l,"$1");if(p!==d){var x=c+";codecs="+(u||_);t.appendChangeType(y,x)}}}else t.pendingTracks[y]=n[y]}),b)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},o.appendChangeType=function(i,n){var t=this,b=this.operationQueue,y={execute:function(){var E=t.sourceBuffer[i];E&&(S.logger.log("[buffer-controller]: changing "+i+" sourceBuffer type to "+n),E.changeType(n)),b.shiftAndExecuteNext(i)},onStart:function(){},onComplete:function(){},onError:function(E){S.logger.warn("[buffer-controller]: Failed to change "+i+" SourceBuffer type",E)}};b.append(y,i)},o.onBufferAppending=function(i,n){var t=this,b=this.hls,y=this.operationQueue,g=this.tracks,E=n.data,_=n.type,u=n.frag,c=n.part,p=n.chunkMeta,d=p.buffering[_],x=self.performance.now();d.start=x;var h=u.stats.buffering,T=c?c.stats.buffering:null;h.start===0&&(h.start=x),T&&T.start===0&&(T.start=x);var M=g.audio,D=_==="audio"&&p.id===1&&(M==null?void 0:M.container)==="audio/mpeg",w={execute:function(){if(d.executeStart=self.performance.now(),D){var j=t.sourceBuffer[_];if(j){var L=u.start-j.timestampOffset;Math.abs(L)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+u.start+" (delta: "+L+") sn: "+u.sn+")"),j.timestampOffset=u.start)}}t.appendExecutor(E,_)},onStart:function(){},onComplete:function(){var j=self.performance.now();d.executeEnd=d.end=j,h.first===0&&(h.first=j),T&&T.first===0&&(T.first=j);var L=t.sourceBuffer,z={};for(var $ in L)z[$]=N.BufferHelper.getBuffered(L[$]);t.appendError=0,t.hls.trigger(m.Events.BUFFER_APPENDED,{type:_,frag:u,part:c,chunkMeta:p,parent:u.type,timeRanges:z})},onError:function(j){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+_+" SourceBuffer",j);var L={type:H.ErrorTypes.MEDIA_ERROR,parent:u.type,details:H.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=H.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,L.details=H.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>b.config.appendErrorMaxRetry&&(S.logger.error("[buffer-controller]: Failed "+b.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),b.trigger(m.Events.ERROR,L)}};y.append(w,_)},o.onBufferFlushing=function(i,n){var t=this,b=this.operationQueue,y=function(E){return{execute:t.removeExecutor.bind(t,E,n.startOffset,n.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(m.Events.BUFFER_FLUSHED,{type:E})},onError:function(u){S.logger.warn("[buffer-controller]: Failed to remove from "+E+" SourceBuffer",u)}}};n.type?b.append(y(n.type),n.type):this.getSourceBufferTypes().forEach(function(g){b.append(y(g),g)})},o.onFragParsed=function(i,n){var t=this,b=n.frag,y=n.part,g=[],E=y?y.elementaryStreams:b.elementaryStreams;E[A.ElementaryStreamTypes.AUDIOVIDEO]?g.push("audiovideo"):(E[A.ElementaryStreamTypes.AUDIO]&&g.push("audio"),E[A.ElementaryStreamTypes.VIDEO]&&g.push("video"));var _=function(){var c=self.performance.now();b.stats.buffering.end=c,y&&(y.stats.buffering.end=c);var p=y?y.stats:b.stats;t.hls.trigger(m.Events.FRAG_BUFFERED,{frag:b,part:y,stats:p,id:b.type})};g.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+b.type+" level: "+b.level+" sn: "+b.sn),this.blockBuffers(_,g)},o.onFragChanged=function(i,n){this.flushBackBuffer()},o.onBufferEos=function(i,n){var t=this,b=this.getSourceBufferTypes().reduce(function(y,g){var E=t.sourceBuffer[g];return(!n.type||n.type===g)&&(E&&!E.ended&&(E.ended=!0,S.logger.log("[buffer-controller]: "+g+" sourceBuffer now EOS"))),y&&!!(!E||E.ended)},!0);b&&this.blockBuffers(function(){var y=t.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},o.onLevelUpdated=function(i,n){var t=n.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},o.flushBackBuffer=function(){var i=this.hls,n=this.details,t=this.media,b=this.sourceBuffer;if(!t||n===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var g=n.live&&i.config.liveBackBufferLength!==null?i.config.liveBackBufferLength:i.config.backBufferLength;if(!Object(U.isFiniteNumber)(g)||g<0)return;var E=t.currentTime,_=n.levelTargetDuration,u=Math.max(g,_),c=Math.floor(E/_)*_-u;y.forEach(function(p){var d=b[p];if(d){var x=N.BufferHelper.getBuffered(d);x.length>0&&c>x.start(0)&&(i.trigger(m.Events.BACK_BUFFER_REACHED,{bufferEnd:c}),n.live&&i.trigger(m.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:c}),i.trigger(m.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:c,type:p}))}})},o.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var i=this.details,n=this.hls,t=this.media,b=this.mediaSource,y=i.fragments[0].start+i.totalduration,g=t.duration,E=Object(U.isFiniteNumber)(b.duration)?b.duration:0;i.live&&n.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),b.duration=Infinity,this.updateSeekableRange(i)):(y>E&&y>g||!Object(U.isFiniteNumber)(g))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),b.duration=y)},o.updateSeekableRange=function(i){var n=this.mediaSource,t=i.fragments,b=t.length;if(b&&i.live&&n!==null&&n!==void 0&&n.setLiveSeekableRange){var y=Math.max(0,t[0].start),g=Math.max(y,y+i.totalduration);n.setLiveSeekableRange(y,g)}},o.checkPendingTracks=function(){var i=this.bufferCodecEventsExpected,n=this.operationQueue,t=this.pendingTracks,b=Object.keys(t).length;if(b&&!i||b===2){this.createSourceBuffers(t),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(m.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}y.forEach(function(g){n.executeNext(g)})}},o.createSourceBuffers=function(i){var n=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var b=0;for(var y in i)if(!n[y]){var g=i[y];if(!g)throw Error("source buffer exists for track "+y+", however track does not");var E=g.levelCodec||g.codec,_=g.container+";codecs="+E;S.logger.log("[buffer-controller]: creating sourceBuffer("+_+")");try{var u=n[y]=t.addSourceBuffer(_),c=y;this.addBufferListener(c,"updatestart",this._onSBUpdateStart),this.addBufferListener(c,"updateend",this._onSBUpdateEnd),this.addBufferListener(c,"error",this._onSBUpdateError),this.tracks[y]={buffer:u,codec:E,container:g.container,levelCodec:g.levelCodec,id:g.id},b++}catch(p){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+p.message),this.hls.trigger(m.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,mimeType:_})}}b&&this.hls.trigger(m.Events.BUFFER_CREATED,{tracks:this.tracks})},o._onSBUpdateStart=function(i){var n=this.operationQueue,t=n.current(i);t.onStart()},o._onSBUpdateEnd=function(i){var n=this.operationQueue,t=n.current(i);t.onComplete(),n.shiftAndExecuteNext(i)},o._onSBUpdateError=function(i,n){S.logger.error("[buffer-controller]: "+i+" SourceBuffer error",n),this.hls.trigger(m.Events.ERROR,{type:H.ErrorTypes.MEDIA_ERROR,details:H.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(i);t&&t.onError(n)},o.removeExecutor=function(i,n,t){var b=this.media,y=this.mediaSource,g=this.operationQueue,E=this.sourceBuffer,_=E[i];if(!b||!y||!_){S.logger.warn("[buffer-controller]: Attempting to remove from the "+i+" SourceBuffer, but it does not exist"),g.shiftAndExecuteNext(i);return}var u=Object(U.isFiniteNumber)(b.duration)?b.duration:Infinity,c=Object(U.isFiniteNumber)(y.duration)?y.duration:Infinity,p=Math.max(0,n),d=Math.min(t,u,c);d>p?(S.logger.log("[buffer-controller]: Removing ["+p+","+d+"] from the "+i+" SourceBuffer"),console.assert(!_.updating,i+" sourceBuffer must not be updating"),_.remove(p,d)):g.shiftAndExecuteNext(i)},o.appendExecutor=function(i,n){var t=this.operationQueue,b=this.sourceBuffer,y=b[n];if(!y){S.logger.warn("[buffer-controller]: Attempting to append to the "+n+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(n);return}y.ended=!1,console.assert(!y.updating,n+" sourceBuffer must not be updating"),y.appendBuffer(i)},o.blockBuffers=function(i,n){var t=this;if(n===void 0&&(n=this.getSourceBufferTypes()),!n.length){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(i);return}var b=this.operationQueue,y=n.map(function(g){return b.appendBlocker(g)});Promise.all(y).then(function(){i(),n.forEach(function(g){var E=t.sourceBuffer[g];(!E||!E.updating)&&b.shiftAndExecuteNext(g)})})},o.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},o.addBufferListener=function(i,n,t){var b=this.sourceBuffer[i];if(!b)return;var y=t.bind(this,i);this.listeners[i].push({event:n,listener:y}),b.addEventListener(n,y)},o.removeBufferListeners=function(i){var n=this.sourceBuffer[i];if(!n)return;this.listeners[i].forEach(function(t){n.removeEventListener(t.event,t.listener)})},r}()},"./src/controller/buffer-operation-queue.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return m});var U=O("./src/utils/logger.ts"),m=function(){function S(N){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=N}var H=S.prototype;return H.append=function(e,A){var v=this.queues[A];v.push(e),v.length===1&&this.buffers[A]&&this.executeNext(A)},H.insertAbort=function(e,A){var v=this.queues[A];v.unshift(e),this.executeNext(A)},H.appendBlocker=function(e){var A,v=new Promise(function(l){A=l}),f={execute:A,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,e),v},H.executeNext=function(e){var A=this.buffers,v=this.queues,f=A[e],l=v[e];if(l.length){var a=l[0];try{a.execute()}catch(r){U.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(r),(!f||!f.updating)&&(l.shift(),this.executeNext(e))}}},H.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},H.current=function(e){return this.queues[e][0]},S}()},"./src/controller/cap-level-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/events.ts");function m(N,e){for(var A=0;A<e.length;A++){var v=e[A];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(N,v.key,v)}}function S(N,e,A){return e&&m(N.prototype,e),A&&m(N,A),N}var H=function(){function N(A){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=A,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=N.prototype;return e.setStreamController=function(v){this.streamController=v},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var v=this.hls;v.on(U.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.on(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var v=this.hls;v.off(U.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.off(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(v,f){N.isLevelAllowed(f.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(f.droppedLevel)},e.onMediaAttaching=function(v,f){this.media=f.media instanceof HTMLVideoElement?f.media:null},e.onManifestParsed=function(v,f){var l=this.hls;this.restrictedLevels=[],this.firstLevel=f.firstLevel,l.config.capLevelToPlayerSize&&f.video&&this.startCapping()},e.onBufferCodecs=function(v,f){var l=this.hls;l.config.capLevelToPlayerSize&&f.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var v=this.hls.levels;if(v.length){var f=this.hls;f.autoLevelCapping=this.getMaxLevel(v.length-1),f.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=f.autoLevelCapping}}},e.getMaxLevel=function(v){var f=this,l=this.hls.levels;if(!l.length)return-1;var a=l.filter(function(r,o){return N.isLevelAllowed(o,f.restrictedLevels)&&o<=v});return this.clientRect=null,N.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},e.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var v=this.media,f={width:0,height:0};if(v){var l=v.getBoundingClientRect();f.width=l.width,f.height=l.height,!f.width&&!f.height&&(f.width=l.right-l.left||v.width||0,f.height=l.bottom-l.top||v.height||0)}return this.clientRect=f,f},N.isLevelAllowed=function(v,f){return f===void 0&&(f=[]),f.indexOf(v)===-1},N.getMaxLevelByMediaSize=function(v,f,l){if(!v||!v.length)return-1;for(var a=function(n,t){return t?n.width!==t.width||n.height!==t.height:!0},r=v.length-1,o=0;o<v.length;o+=1){var s=v[o];if((s.width>=f||s.height>=l)&&a(s,v[o+1])){r=o;break}}return r},S(N,[{key:"mediaWidth",get:function(){return this.getDimensions().width*N.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*N.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var v=1;try{v=self.devicePixelRatio}catch(f){}return v}}]),N}();k.default=H},"./src/controller/cmcd-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return a});var U=O("./src/events.ts"),m=O("./src/types/cmcd.ts"),S=O("./src/utils/buffer-helper.ts"),H=O("./src/utils/logger.ts");function N(r,o){for(var s=0;s<o.length;s++){var i=o[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function e(r,o,s){return o&&N(r.prototype,o),s&&N(r,s),r}function A(r,o){var s=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(s)return(s=s.call(r)).next.bind(s);if(Array.isArray(r)||(s=v(r))||o&&r&&typeof r.length=="number"){s&&(r=s);var i=0;return function(){return i>=r.length?{done:!0}:{done:!1,value:r[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(r,o){if(!r)return;if(typeof r=="string")return f(r,o);var s=Object.prototype.toString.call(r).slice(8,-1);if(s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set")return Array.from(r);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return f(r,o)}function f(r,o){(o==null||o>r.length)&&(o=r.length);for(var s=0,i=new Array(o);s<o;s++)i[s]=r[s];return i}function l(){return l=Object.assign||function(r){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]=s[i])}return r},l.apply(this,arguments)}var a=function(){function r(s){var i=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){i.initialized&&(i.starved=!0),i.buffering=!0},this.onPlaying=function(){i.initialized||(i.initialized=!0),i.buffering=!1},this.applyPlaylistData=function(b){try{i.apply(b,{ot:m.CMCDObjectType.MANIFEST,su:!i.initialized})}catch(y){H.logger.warn("Could not generate manifest CMCD data.",y)}},this.applyFragmentData=function(b){try{var y=b.frag,g=i.hls.levels[y.level],E=i.getObjectType(y),_={d:y.duration*1e3,ot:E};(E===m.CMCDObjectType.VIDEO||E===m.CMCDObjectType.AUDIO||E==m.CMCDObjectType.MUXED)&&(_.br=g.bitrate/1e3,_.tb=i.getTopBandwidth(E),_.bl=i.getBufferLength(E)),i.apply(b,_)}catch(u){H.logger.warn("Could not generate segment CMCD data.",u)}},this.hls=s;var n=this.config=s.config,t=n.cmcd;t!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||r.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var o=r.prototype;return o.registerListeners=function(){var i=this.hls;i.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.on(U.Events.BUFFER_CREATED,this.onBufferCreated,this)},o.unregisterListeners=function(){var i=this.hls;i.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),i.off(U.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},o.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},o.onMediaAttached=function(i,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},o.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},o.onBufferCreated=function(i,n){var t,b;this.audioBuffer=(t=n.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(b=n.tracks.video)===null||b===void 0?void 0:b.buffer},o.createData=function(){var i;return{v:m.CMCDVersion,sf:m.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(i=this.media)===null||i===void 0?void 0:i.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},o.apply=function(i,n){n===void 0&&(n={}),l(n,this.createData());var t=n.ot===m.CMCDObjectType.INIT||n.ot===m.CMCDObjectType.VIDEO||n.ot===m.CMCDObjectType.MUXED;if(this.starved&&t&&(n.bs=!0,n.su=!0,this.starved=!1),n.su==null&&(n.su=this.buffering),this.useHeaders){var b=r.toHeaders(n);if(!Object.keys(b).length)return;i.headers||(i.headers={}),l(i.headers,b)}else{var y=r.toQuery(n);if(!y)return;i.url=r.appendQueryToUri(i.url,y)}},o.getObjectType=function(i){var n=i.type;return n==="subtitle"?m.CMCDObjectType.TIMED_TEXT:i.sn==="initSegment"?m.CMCDObjectType.INIT:n==="audio"?m.CMCDObjectType.AUDIO:n==="main"?this.hls.audioTracks.length?m.CMCDObjectType.VIDEO:m.CMCDObjectType.MUXED:void 0},o.getTopBandwidth=function(i){for(var n=0,t=i===m.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,b=A(t),y;!(y=b()).done;){var g=y.value;g.bitrate>n&&(n=g.bitrate)}return n>0?n:NaN},o.getBufferLength=function(i){var n=this.hls.media,t=i===m.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!n)return NaN;var b=S.BufferHelper.bufferInfo(t,n.currentTime,this.config.maxBufferHole);return b.len*1e3},o.createPlaylistLoader=function(){var i=this.config.pLoader,n=this.applyPlaylistData,t=i||this.config.loader;return function(){function b(g){this.loader=void 0,this.loader=new t(g)}var y=b.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(E,_,u){n(E),this.loader.load(E,_,u)},e(b,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),b}()},o.createFragmentLoader=function(){var i=this.config.fLoader,n=this.applyFragmentData,t=i||this.config.loader;return function(){function b(g){this.loader=void 0,this.loader=new t(g)}var y=b.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(E,_,u){n(E),this.loader.load(E,_,u)},e(b,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),b}()},r.uuid=function(){var i=URL.createObjectURL(new Blob),n=i.toString();return URL.revokeObjectURL(i),n.substr(n.lastIndexOf("/")+1)},r.serialize=function(i){for(var n=[],t=function(D){return!Number.isNaN(D)&&D!=null&&D!==""&&D!==!1},b=function(D){return Math.round(D)},y=function(D){return b(D/100)*100},g=function(D){return encodeURIComponent(D)},E={br:b,d:b,bl:y,dl:y,mtp:y,nor:g,rtp:y,tb:b},_=Object.keys(i||{}).sort(),u=A(_),c;!(c=u()).done;){var p=c.value,d=i[p];if(!t(d))continue;if(p==="v"&&d===1)continue;if(p=="pr"&&d===1)continue;var x=E[p];x&&(d=x(d));var h=typeof d,T=void 0;p==="ot"||p==="sf"||p==="st"?T=p+"="+d:h==="boolean"?T=p:h==="number"?T=p+"="+d:T=p+"="+JSON.stringify(d),n.push(T)}return n.join(",")},r.toHeaders=function(i){for(var n=Object.keys(i),t={},b=["Object","Request","Session","Status"],y=[{},{},{},{}],g={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},E=0,_=n;E<_.length;E++){var u=_[E],c=g[u]!=null?g[u]:1;y[c][u]=i[u]}for(var p=0;p<y.length;p++){var d=r.serialize(y[p]);d&&(t["CMCD-"+b[p]]=d)}return t},r.toQuery=function(i){return"CMCD="+encodeURIComponent(r.serialize(i))},r.appendQueryToUri=function(i,n){if(!n)return i;var t=i.includes("?")?"&":"?";return""+i+t+n},r}()},"./src/controller/eme-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/utils/logger.ts"),H=O("./src/utils/mediakeys-helper.ts");function N(a,r){for(var o=0;o<r.length;o++){var s=r[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function e(a,r,o){return r&&N(a.prototype,r),o&&N(a,o),a}var A=3,v=function(r,o,s){var i={audioCapabilities:[],videoCapabilities:[]};return r.forEach(function(n){i.audioCapabilities.push({contentType:'audio/mp4; codecs="'+n+'"',robustness:s.audioRobustness||""})}),o.forEach(function(n){i.videoCapabilities.push({contentType:'video/mp4; codecs="'+n+'"',robustness:s.videoRobustness||""})}),[i]},f=function(r,o,s,i){switch(r){case H.KeySystems.WIDEVINE:return v(o,s,i);default:throw new Error("Unknown key-system: "+r)}},l=function(){function a(o){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=o,this._config=o.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var r=a.prototype;return r.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},r._registerListeners=function(){this.hls.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r._unregisterListeners=function(){this.hls.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(U.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r.getLicenseServerUrl=function(s){switch(s){case H.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+s+'"')},r._attemptKeySystemAccess=function(s,i,n){var t=this,b=f(s,i,n,this._drmSystemOptions);S.logger.log("Requesting encrypted media key-system access");var y=this.requestMediaKeySystemAccess(s,b);this.mediaKeysPromise=y.then(function(g){return t._onMediaKeySystemAccessObtained(s,g)}),y.catch(function(g){S.logger.error('Failed to obtain key-system "'+s+'" access:',g)})},r._onMediaKeySystemAccessObtained=function(s,i){var n=this;S.logger.log('Access for key-system "'+s+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:i,mediaKeySystemDomain:s};this._mediaKeysList.push(t);var b=Promise.resolve().then(function(){return i.createMediaKeys()}).then(function(y){return t.mediaKeys=y,S.logger.log('Media-keys created for key-system "'+s+'"'),n._onMediaKeysCreated(),y});return b.catch(function(y){S.logger.error("Failed to create media-keys:",y)}),b},r._onMediaKeysCreated=function(){var s=this;this._mediaKeysList.forEach(function(i){i.mediaKeysSession||(i.mediaKeysSession=i.mediaKeys.createSession(),s._onNewMediaKeySession(i.mediaKeysSession))})},r._onNewMediaKeySession=function(s){var i=this;S.logger.log("New key-system session "+s.sessionId),s.addEventListener("message",function(n){i._onKeySessionMessage(s,n.message)},!1)},r._onKeySessionMessage=function(s,i){S.logger.log("Got EME message event, creating license request"),this._requestLicense(i,function(n){S.logger.log("Received license data (length: "+(n&&n.byteLength)+"), updating key-session"),s.update(n)})},r.onMediaEncrypted=function(s){var i=this;if(S.logger.log('Media is encrypted using "'+s.initDataType+'" init data type'),!this.mediaKeysPromise){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var n=function(b){if(!i._media)return;i._attemptSetMediaKeys(b),i._generateRequestWithPreferredKeySession(s.initDataType,s.initData)};this.mediaKeysPromise.then(n).catch(n)},r._attemptSetMediaKeys=function(s){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var i=this._mediaKeysList[0];if(!i||!i.mediaKeys){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}S.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(i.mediaKeys),this._hasSetMediaKeys=!0}},r._generateRequestWithPreferredKeySession=function(s,i){var n=this,t=this._mediaKeysList[0];if(!t){S.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){S.logger.warn("Key-Session already initialized but requested again");return}var b=t.mediaKeysSession;if(!b){S.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!i){S.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}S.logger.log('Generating key-session request for "'+s+'" init data type'),t.mediaKeysSessionInitialized=!0,b.generateRequest(s,i).then(function(){S.logger.debug("Key-session generation succeeded")}).catch(function(y){S.logger.error("Error generating key-session request:",y),n.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},r._createLicenseXhr=function(s,i,n){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,s,i,n);var b=this._licenseXhrSetup;if(b)try{b.call(this.hls,t,s),b=void 0}catch(y){S.logger.error(y)}try{t.readyState||t.open("POST",s,!0),b&&b.call(this.hls,t,s)}catch(y){throw new Error("issue setting up KeySystem license XHR "+y)}return t},r._onLicenseRequestReadyStageChange=function(s,i,n,t){switch(s.readyState){case 4:if(s.status===200){this._requestLicenseFailureCount=0,S.logger.log("License request succeeded");var b=s.response,y=this._licenseResponseCallback;if(y)try{b=y.call(this.hls,s,i)}catch(E){S.logger.error(E)}t(b)}else{if(S.logger.error("License Request XHR failed ("+i+"). Status: "+s.status+" ("+s.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>A){this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var g=A-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+g+" attempts left"),this._requestLicense(n,t)}break}},r._generateLicenseRequestChallenge=function(s,i){switch(s.mediaKeySystemDomain){case H.KeySystems.WIDEVINE:return i}throw new Error("unsupported key-system: "+s.mediaKeySystemDomain)},r._requestLicense=function(s,i){S.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n){S.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(n.mediaKeySystemDomain),b=this._createLicenseXhr(t,s,i);S.logger.log("Sending license request to URL: "+t);var y=this._generateLicenseRequestChallenge(n,s);b.send(y)}catch(g){S.logger.error("Failure requesting DRM license: "+g),this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},r.onMediaAttached=function(s,i){if(!this._emeEnabled)return;var n=i.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)},r.onMediaDetached=function(){var s=this._media,i=this._mediaKeysList;if(!s)return;s.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(i.map(function(n){if(n.mediaKeysSession)return n.mediaKeysSession.close().catch(function(){})})).then(function(){return s.setMediaKeys(null)}).catch(function(){})},r.onManifestParsed=function(s,i){if(!this._emeEnabled)return;var n=i.levels.map(function(b){return b.audioCodec}).filter(function(b){return!!b}),t=i.levels.map(function(b){return b.videoCodec}).filter(function(b){return!!b});this._attemptKeySystemAccess(H.KeySystems.WIDEVINE,n,t)},e(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();k.default=l},"./src/controller/fps-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/events.ts"),m=O("./src/utils/logger.ts"),S=function(){function H(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var N=H.prototype;return N.setStreamController=function(A){this.streamController=A},N.registerListeners=function(){this.hls.on(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},N.unregisterListeners=function(){this.hls.off(U.Events.MEDIA_ATTACHING,this.onMediaAttaching)},N.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},N.onMediaAttaching=function(A,v){var f=this.hls.config;if(f.capLevelOnFPSDrop){var l=v.media instanceof self.HTMLVideoElement?v.media:null;this.media=l,l&&typeof l.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),f.fpsDroppedMonitoringPeriod)}},N.checkFPS=function(A,v,f){var l=performance.now();if(v){if(this.lastTime){var a=l-this.lastTime,r=f-this.lastDroppedFrames,o=v-this.lastDecodedFrames,s=1e3*r/a,i=this.hls;if(i.trigger(U.Events.FPS_DROP,{currentDropped:r,currentDecoded:o,totalDroppedFrames:f}),s>0&&r>i.config.fpsDroppedMonitoringThreshold*o){var n=i.currentLevel;m.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+n),n>0&&(i.autoLevelCapping===-1||i.autoLevelCapping>=n)&&(n=n-1,i.trigger(U.Events.FPS_DROP_LEVEL_CAPPING,{level:n,droppedLevel:i.currentLevel}),i.autoLevelCapping=n,this.streamController.nextLevelSwitch())}}this.lastTime=l,this.lastDroppedFrames=f,this.lastDecodedFrames=v}},N.checkFPSInterval=function(){var A=this.media;if(A)if(this.isVideoPlaybackQualityAvailable){var v=A.getVideoPlaybackQuality();this.checkFPS(A,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(A,A.webkitDecodedFrameCount,A.webkitDroppedFrameCount)},H}();k.default=S},"./src/controller/fragment-finders.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"findFragmentByPDT",function(){return S}),O.d(k,"findFragmentByPTS",function(){return H}),O.d(k,"fragmentWithinToleranceTest",function(){return N}),O.d(k,"pdtWithinToleranceTest",function(){return e}),O.d(k,"findFragWithCC",function(){return A});var U=O("./src/polyfills/number.ts"),m=O("./src/utils/binary-search.ts");function S(v,f,l){if(f===null||!Array.isArray(v)||!v.length||!Object(U.isFiniteNumber)(f))return null;var a=v[0].programDateTime;if(f<(a||0))return null;var r=v[v.length-1].endProgramDateTime;if(f>=(r||0))return null;l=l||0;for(var o=0;o<v.length;++o){var s=v[o];if(e(f,l,s))return s}return null}function H(v,f,l,a){l===void 0&&(l=0),a===void 0&&(a=0);var r=null;if(v?r=f[v.sn-f[0].sn+1]||null:l===0&&f[0].start===0&&(r=f[0]),r&&N(l,a,r)===0)return r;var o=m.default.search(f,N.bind(null,l,a));return o||r}function N(v,f,l){v===void 0&&(v=0),f===void 0&&(f=0);var a=Math.min(f,l.duration+(l.deltaPTS?l.deltaPTS:0));return l.start+l.duration-a<=v?1:l.start-a>v&&l.start?-1:0}function e(v,f,l){var a=Math.min(f,l.duration+(l.deltaPTS?l.deltaPTS:0))*1e3,r=l.endProgramDateTime||0;return r-a>v}function A(v,f){return m.default.search(v,function(l){return l.cc<f?1:l.cc>f?-1:0})}},"./src/controller/fragment-tracker.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"FragmentState",function(){return S}),O.d(k,"FragmentTracker",function(){return H});var U=O("./src/events.ts"),m=O("./src/types/loader.ts"),S;(function(A){A.NOT_LOADED="NOT_LOADED",A.BACKTRACKED="BACKTRACKED",A.APPENDING="APPENDING",A.PARTIAL="PARTIAL",A.OK="OK"})(S||(S={}));var H=function(){function A(f){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=f,this._registerListeners()}var v=A.prototype;return v._registerListeners=function(){var l=this.hls;l.on(U.Events.BUFFER_APPENDED,this.onBufferAppended,this),l.on(U.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(U.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var l=this.hls;l.off(U.Events.BUFFER_APPENDED,this.onBufferAppended,this),l.off(U.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(U.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(l,a){if(a===m.PlaylistLevelType.MAIN){var r=this.activeFragment,o=this.activeParts;if(!r)return null;if(o)for(var s=o.length;s--;){var i=o[s],n=i?i.end:r.appendedPTS;if(i.start<=l&&n!==void 0&&l<=n)return s>9&&(this.activeParts=o.slice(s-9)),i}else if(r.start<=l&&r.appendedPTS!==void 0&&l<=r.appendedPTS)return r}return this.getBufferedFrag(l,a)},v.getBufferedFrag=function(l,a){for(var r=this.fragments,o=Object.keys(r),s=o.length;s--;){var i=r[o[s]];if((i==null?void 0:i.body.type)===a&&i.buffered){var n=i.body;if(n.start<=l&&l<=n.end)return n}}return null},v.detectEvictedFragments=function(l,a,r){var o=this;Object.keys(this.fragments).forEach(function(s){var i=o.fragments[s];if(!i)return;if(!i.buffered){i.body.type===r&&o.removeFragment(i.body);return}var n=i.range[l];if(!n)return;n.time.some(function(t){var b=!o.isTimeBuffered(t.startPTS,t.endPTS,a);return b&&o.removeFragment(i.body),b})})},v.detectPartialFragments=function(l){var a=this,r=this.timeRanges,o=l.frag,s=l.part;if(!r||o.sn==="initSegment")return;var i=e(o),n=this.fragments[i];if(!n)return;Object.keys(r).forEach(function(t){var b=o.elementaryStreams[t];if(!b)return;var y=r[t],g=s!==null||b.partial===!0;n.range[t]=a.getBufferedTimes(o,s,g,y)}),n.backtrack=n.loaded=null,Object.keys(n.range).length?n.buffered=!0:this.removeFragment(n.body)},v.fragBuffered=function(l){var a=e(l),r=this.fragments[a];r&&(r.backtrack=r.loaded=null,r.buffered=!0)},v.getBufferedTimes=function(l,a,r,o){for(var s={time:[],partial:r},i=a?a.start:l.start,n=a?a.end:l.end,t=l.minEndPTS||n,b=l.maxStartPTS||i,y=0;y<o.length;y++){var g=o.start(y)-this.bufferPadding,E=o.end(y)+this.bufferPadding;if(b>=g&&t<=E){s.time.push({startPTS:Math.max(i,o.start(y)),endPTS:Math.min(n,o.end(y))});break}else if(i<E&&n>g)s.partial=!0,s.time.push({startPTS:Math.max(i,o.start(y)),endPTS:Math.min(n,o.end(y))});else if(n<=g)break}return s},v.getPartialFragment=function(l){var a=null,r,o,s,i=0,n=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(b){var y=t[b];if(!y)return;N(y)&&(o=y.body.start-n,s=y.body.end+n,l>=o&&l<=s&&(r=Math.min(l-o,s-l),i<=r&&(a=y.body,i=r)))}),a},v.getState=function(l){var a=e(l),r=this.fragments[a];return r?r.buffered?N(r)?S.PARTIAL:S.OK:r.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},v.backtrack=function(l,a){var r=e(l),o=this.fragments[r];if(!o||o.backtrack)return null;var s=o.backtrack=a||o.loaded;return o.loaded=null,s},v.getBacktrackData=function(l){var a=e(l),r=this.fragments[a];if(r){var o,s=r.backtrack;if(s!=null&&(o=s.payload)!==null&&o!==void 0&&o.byteLength)return s;this.removeFragment(l)}return null},v.isTimeBuffered=function(l,a,r){for(var o,s,i=0;i<r.length;i++){if(o=r.start(i)-this.bufferPadding,s=r.end(i)+this.bufferPadding,l>=o&&a<=s)return!0;if(a<=o)return!1}return!1},v.onFragLoaded=function(l,a){var r=a.frag,o=a.part;if(r.sn==="initSegment"||r.bitrateTest||o)return;var s=e(r);this.fragments[s]={body:r,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(l,a){var r=this,o=a.frag,s=a.part,i=a.timeRanges;if(o.type===m.PlaylistLevelType.MAIN)if(this.activeFragment=o,s){var n=this.activeParts;n||(this.activeParts=n=[]),n.push(s)}else this.activeParts=null;this.timeRanges=i,Object.keys(i).forEach(function(t){var b=i[t];if(r.detectEvictedFragments(t,b),!s)for(var y=0;y<b.length;y++)o.appendedPTS=Math.max(b.end(y),o.appendedPTS||0)})},v.onFragBuffered=function(l,a){this.detectPartialFragments(a)},v.hasFragment=function(l){var a=e(l);return!!this.fragments[a]},v.removeFragmentsInRange=function(l,a,r){var o=this;Object.keys(this.fragments).forEach(function(s){var i=o.fragments[s];if(!i)return;if(i.buffered){var n=i.body;n.type===r&&n.start<a&&n.end>l&&o.removeFragment(n)}})},v.removeFragment=function(l){var a=e(l);l.stats.loaded=0,l.clearElementaryStreamInfo(),delete this.fragments[a]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},A}();function N(A){var v,f;return A.buffered&&(((v=A.range.video)===null||v===void 0?void 0:v.partial)||((f=A.range.audio)===null||f===void 0?void 0:f.partial))}function e(A){return A.type+"_"+A.level+"_"+A.urlId+"_"+A.sn}},"./src/controller/gap-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"STALL_MINIMUM_DURATION_MS",function(){return N}),O.d(k,"MAX_START_GAP_JUMP",function(){return e}),O.d(k,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return A}),O.d(k,"SKIP_BUFFER_RANGE_START",function(){return v}),O.d(k,"default",function(){return f});var U=O("./src/utils/buffer-helper.ts"),m=O("./src/errors.ts"),S=O("./src/events.ts"),H=O("./src/utils/logger.ts"),N=250,e=2,A=.1,v=.05,f=function(){function l(r,o,s,i){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=r,this.media=o,this.fragmentTracker=s,this.hls=i}var a=l.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(o){var s=this.config,i=this.media,n=this.stalled,t=i.currentTime,b=i.seeking,y=this.seeking&&!b,g=!this.seeking&&b;if(this.seeking=b,t!==o){if(this.moved=!0,n!==null){if(this.stallReported){var E=self.performance.now()-n;H.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(E)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((g||y)&&(this.stalled=null),i.paused||i.ended||i.playbackRate===0||!U.BufferHelper.getBuffered(i).length)return;var _=U.BufferHelper.bufferInfo(i,t,0),u=_.len>0,c=_.nextStart||0;if(!u&&!c)return;if(b){var p=_.len>e,d=!c||c-t>e&&!this.fragmentTracker.getPartialFragment(t);if(p||d)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var x,h=Math.max(c,_.start||0)-t,T=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,M=T==null||((x=T.details)===null||x===void 0)?void 0:x.live,D=M?T.details.targetduration*2:e;if(h>0&&h<=D){this._trySkipBufferHole(null);return}}var w=self.performance.now();if(n===null){this.stalled=w;return}var C=w-n;!b&&C>=N&&this._reportStall(_.len);var j=U.BufferHelper.bufferInfo(i,t,s.maxBufferHole);this._tryFixBufferStall(j,C)},a._tryFixBufferStall=function(o,s){var i=this.config,n=this.fragmentTracker,t=this.media,b=t.currentTime,y=n.getPartialFragment(b);if(y){var g=this._trySkipBufferHole(y);if(g)return}o.len>i.maxBufferHole&&s>i.highBufferWatchdogPeriod*1e3&&(H.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(o){var s=this.hls,i=this.media,n=this.stallReported;n||(this.stallReported=!0,H.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+o+")"),s.trigger(S.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:o}))},a._trySkipBufferHole=function(o){for(var s=this.config,i=this.hls,n=this.media,t=n.currentTime,b=0,y=U.BufferHelper.getBuffered(n),g=0;g<y.length;g++){var E=y.start(g);if(t+s.maxBufferHole>=b&&t<E){var _=Math.max(E+v,n.currentTime+A);return H.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+_),this.moved=!0,this.stalled=null,n.currentTime=_,o&&i.trigger(S.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+_,frag:o}),_}b=y.end(g)}return 0},a._tryNudgeBuffer=function(){var o=this.config,s=this.hls,i=this.media,n=i.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<o.nudgeMaxRetry){var b=n+t*o.nudgeOffset;H.logger.warn("Nudging 'currentTime' from "+n+" to "+b),i.currentTime=b,s.trigger(S.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else H.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+o.nudgeMaxRetry+" nudges"),s.trigger(S.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},l}()},"./src/controller/id3-track-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/events.ts"),m=O("./src/utils/texttrack-utils.ts"),S=O("./src/demux/id3.ts"),H=.25,N=function(){function e(v){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=v,this._registerListeners()}var A=e.prototype;return A.destroy=function(){this._unregisterListeners()},A._registerListeners=function(){var f=this.hls;f.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(U.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.on(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A._unregisterListeners=function(){var f=this.hls;f.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(U.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.off(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},A.onMediaAttached=function(f,l){this.media=l.media},A.onMediaDetaching=function(){if(!this.id3Track)return;Object(m.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},A.getID3Track=function(f){if(!this.media)return;for(var l=0;l<f.length;l++){var a=f[l];if(a.kind==="metadata"&&a.label==="id3")return Object(m.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},A.onFragParsingMetadata=function(f,l){if(!this.media)return;var a=l.frag,r=l.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var o=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,s=0;s<r.length;s++){var i=S.getID3Frames(r[s].data);if(i){var n=r[s].pts,t=s<r.length-1?r[s+1].pts:a.end,b=t-n;b<=0&&(t=n+H);for(var y=0;y<i.length;y++){var g=i[y];if(!S.isTimeStampFrame(g)){var E=new o(n,t,"");E.value=g,this.id3Track.addCue(E)}}}}},A.onBufferFlushing=function(f,l){var a=l.startOffset,r=l.endOffset,o=l.type;if(!o||o==="audio"){var s=this.id3Track;s&&Object(m.removeCuesInRange)(s,a,r)}},e}();k.default=N},"./src/controller/latency-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return e});var U=O("./src/errors.ts"),m=O("./src/events.ts"),S=O("./src/utils/logger.ts");function H(A,v){for(var f=0;f<v.length;f++){var l=v[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(A,l.key,l)}}function N(A,v,f){return v&&H(A.prototype,v),f&&H(A,f),A}var e=function(){function A(f){var l=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return l.timeupdate()},this.hls=f,this.config=f.config,this.registerListeners()}var v=A.prototype;return v.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},v.registerListeners=function(){this.hls.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(m.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){this.hls.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(m.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(m.Events.ERROR,this.onError)},v.onMediaAttached=function(l,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},v.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},v.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},v.onLevelUpdated=function(l,a){var r=a.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},v.onError=function(l,a){if(a.details!==U.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,S.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},v.timeupdate=function(){var l=this.media,a=this.levelDetails;if(!l||!a)return;this.currentTime=l.currentTime;var r=this.computeLatency();if(r===null)return;this._latency=r;var o=this.config,s=o.lowLatencyMode,i=o.maxLiveSyncPlaybackRate;if(!s||i===1)return;var n=this.targetLatency;if(n===null)return;var t=r-n,b=Math.min(this.maxLatency,n+a.targetduration),y=t<b;if(a.live&&y&&t>.05&&this.forwardBufferLength>1){var g=Math.min(2,Math.max(1,i)),E=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;l.playbackRate=Math.min(g,Math.max(1,E))}else l.playbackRate!==1&&l.playbackRate!==0&&(l.playbackRate=1)},v.estimateLiveEdge=function(){var l=this.levelDetails;return l===null?null:l.edge+l.age},v.computeLatency=function(){var l=this.estimateLiveEdge();return l===null?null:l-this.currentTime},N(A,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var l=this.config,a=this.levelDetails;return l.liveMaxLatencyDuration!==void 0?l.liveMaxLatencyDuration:a?l.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var l=this.levelDetails;if(l===null)return null;var a=l.holdBack,r=l.partHoldBack,o=l.targetduration,s=this.config,i=s.liveSyncDuration,n=s.liveSyncDurationCount,t=s.lowLatencyMode,b=this.hls.userConfig,y=t&&r||a;(b.liveSyncDuration||b.liveSyncDurationCount||y===0)&&(y=i!==void 0?i:n*o);var g=o,E=1;return y+Math.min(this.stallCount*E,g)}},{key:"liveSyncPosition",get:function(){var l=this.estimateLiveEdge(),a=this.targetLatency,r=this.levelDetails;if(l===null||a===null||r===null)return null;var o=r.edge,s=l-a-this.edgeStalled,i=o-r.totalduration,n=o-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(i,s),n)}},{key:"drift",get:function(){var l=this.levelDetails;return l===null?1:l.drift}},{key:"edgeStalled",get:function(){var l=this.levelDetails;if(l===null)return 0;var a=(this.config.lowLatencyMode&&l.partTarget||l.targetduration)*3;return Math.max(l.age-a,0)}},{key:"forwardBufferLength",get:function(){var l=this.media,a=this.levelDetails;if(!l||!a)return 0;var r=l.buffered.length;return r?l.buffered.end(r-1):a.edge-this.currentTime}}]),A}()},"./src/controller/level-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return s});var U=O("./src/types/level.ts"),m=O("./src/events.ts"),S=O("./src/errors.ts"),H=O("./src/utils/codecs.ts"),N=O("./src/controller/level-helper.ts"),e=O("./src/controller/base-playlist-controller.ts"),A=O("./src/types/loader.ts");function v(){return v=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var b in t)Object.prototype.hasOwnProperty.call(t,b)&&(i[b]=t[b])}return i},v.apply(this,arguments)}function f(i,n){for(var t=0;t<n.length;t++){var b=n[t];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(i,b.key,b)}}function l(i,n,t){return n&&f(i.prototype,n),t&&f(i,t),i}function a(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,r(i,n)}function r(i,n){return r=Object.setPrototypeOf||function(b,y){return b.__proto__=y,b},r(i,n)}var o=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),s=function(i){a(n,i);function n(b){var y;return y=i.call(this,b,"[level-controller]")||this,y._levels=[],y._firstLevel=-1,y._startLevel=void 0,y.currentLevelIndex=-1,y.manualLevelIndex=-1,y.onParsedComplete=void 0,y._registerListeners(),y}var t=n.prototype;return t._registerListeners=function(){var y=this.hls;y.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(m.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var y=this.hls;y.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(m.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,i.prototype.destroy.call(this)},t.startLoad=function(){var y=this._levels;y.forEach(function(g){g.loadError=0}),i.prototype.startLoad.call(this)},t.onManifestLoaded=function(y,g){var E=[],_=[],u=[],c,p={},d,x=!1,h=!1,T=!1;if(g.levels.forEach(function(C){var j=C.attrs;x=x||!!(C.width&&C.height),h=h||!!C.videoCodec,T=T||!!C.audioCodec,o&&C.audioCodec&&C.audioCodec.indexOf("mp4a.40.34")!==-1&&(C.audioCodec=void 0);var L=C.bitrate+"-"+C.attrs.RESOLUTION+"-"+C.attrs.CODECS;d=p[L],d?d.url.push(C.url):(d=new U.Level(C),p[L]=d,E.push(d)),j&&(j.AUDIO&&Object(N.addGroupId)(d,"audio",j.AUDIO),j.SUBTITLES&&Object(N.addGroupId)(d,"text",j.SUBTITLES))}),(x||h)&&T&&(E=E.filter(function(C){var j=C.videoCodec,L=C.width,z=C.height;return!!j||!!(L&&z)})),E=E.filter(function(C){var j=C.audioCodec,L=C.videoCodec;return(!j||Object(H.isCodecSupportedInMp4)(j,"audio"))&&(!L||Object(H.isCodecSupportedInMp4)(L,"video"))}),g.audioTracks&&(_=g.audioTracks.filter(function(C){return!C.audioCodec||Object(H.isCodecSupportedInMp4)(C.audioCodec,"audio")}),Object(N.assignTrackIdsByGroup)(_)),g.subtitles&&(u=g.subtitles,Object(N.assignTrackIdsByGroup)(u)),E.length>0){c=E[0].bitrate,E.sort(function(C,j){return C.bitrate-j.bitrate}),this._levels=E;for(var M=0;M<E.length;M++)if(E[M].bitrate===c){this._firstLevel=M,this.log("manifest loaded, "+E.length+" level(s) found, first bitrate: "+c);break}var D=T&&!h,w={levels:E,audioTracks:_,subtitleTracks:u,firstLevel:this._firstLevel,stats:g.stats,audio:T,video:h,altAudio:!D&&_.some(function(C){return!!C.url})};this.hls.trigger(m.Events.MANIFEST_PARSED,w),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(m.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:g.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(y,g){if(i.prototype.onError.call(this,y,g),g.fatal)return;var E=g.context,_=this._levels[this.currentLevelIndex];if(E&&(E.type===A.PlaylistContextType.AUDIO_TRACK&&_.audioGroupIds&&E.groupId===_.audioGroupIds[_.urlId]||E.type===A.PlaylistContextType.SUBTITLE_TRACK&&_.textGroupIds&&E.groupId===_.textGroupIds[_.urlId])){this.redundantFailover(this.currentLevelIndex);return}var u=!1,c=!0,p;switch(g.details){case S.ErrorDetails.FRAG_LOAD_ERROR:case S.ErrorDetails.FRAG_LOAD_TIMEOUT:case S.ErrorDetails.KEY_LOAD_ERROR:case S.ErrorDetails.KEY_LOAD_TIMEOUT:if(g.frag){var d=this._levels[g.frag.level];d?(d.fragmentError++,d.fragmentError>this.hls.config.fragLoadingMaxRetry&&(p=g.frag.level)):p=g.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:E&&(E.deliveryDirectives&&(c=!1),p=E.level),u=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:p=g.level,u=!0;break}p!==void 0&&this.recoverLevel(g,p,u,c)},t.recoverLevel=function(y,g,E,_){var u=y.details,c=this._levels[g];if(c.loadError++,E){var p=this.retryLoadingOrFail(y);if(p)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(_){var d=c.url.length;if(d>1&&c.loadError<d)y.levelRetry=!0,this.redundantFailover(g);else if(this.manualLevelIndex===-1){var x=g===0?this._levels.length-1:g-1;this.currentLevelIndex!==x&&this._levels[x].loadError===0&&(this.warn(u+": switch to "+x),y.levelRetry=!0,this.hls.nextAutoLevel=x)}}},t.redundantFailover=function(y){var g=this._levels[y],E=g.url.length;if(E>1){var _=(g.urlId+1)%E;this.warn("Switching to redundant URL-id "+_),this._levels.forEach(function(u){u.urlId=_}),this.level=y}},t.onFragLoaded=function(y,g){var E=g.frag;if(E!==void 0&&E.type===A.PlaylistLevelType.MAIN){var _=this._levels[E.level];_!==void 0&&(_.fragmentError=0,_.loadError=0)}},t.onLevelLoaded=function(y,g){var E,_=g.level,u=g.details,c=this._levels[_];if(!c){var p;this.warn("Invalid level index "+_),(p=g.deliveryDirectives)!==null&&p!==void 0&&p.skip&&(u.deltaUpdateFailed=!0);return}_===this.currentLevelIndex?(c.fragmentError===0&&(c.loadError=0,this.retryCount=0),this.playlistLoaded(_,g,c.details)):(E=g.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(u.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(y,g){var E=this.hls.levels[this.currentLevelIndex];if(!E)return;if(E.audioGroupIds){for(var _=-1,u=this.hls.audioTracks[g.id].groupId,c=0;c<E.audioGroupIds.length;c++)if(E.audioGroupIds[c]===u){_=c;break}_!==E.urlId&&(E.urlId=_,this.startLoad())}},t.loadPlaylist=function(y){var g=this.currentLevelIndex,E=this._levels[g];if(this.canLoad&&E&&E.url.length>0){var _=E.urlId,u=E.url[_];if(y)try{u=y.addDirectives(u)}catch(c){this.warn("Could not construct new URL with HLS Delivery Directives: "+c)}this.log("Attempt loading level index "+g+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+_+" "+u),this.clearTimer(),this.hls.trigger(m.Events.LEVEL_LOADING,{url:u,level:g,id:_,deliveryDirectives:y||null})}},t.removeLevel=function(y,g){var E=function(c,p){return p!==g},_=this._levels.filter(function(u,c){return c!==y?!0:u.url.length>1&&g!==void 0?(u.url=u.url.filter(E),u.audioGroupIds&&(u.audioGroupIds=u.audioGroupIds.filter(E)),u.textGroupIds&&(u.textGroupIds=u.textGroupIds.filter(E)),u.urlId=0,!0):!1}).map(function(u,c){var p=u.details;return p!=null&&p.fragments&&p.fragments.forEach(function(d){d.level=c}),u});this._levels=_,this.hls.trigger(m.Events.LEVELS_UPDATED,{levels:_})},l(n,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var g,E=this._levels;if(E.length===0)return;if(this.currentLevelIndex===y&&(g=E[y])!==null&&g!==void 0&&g.details)return;if(y<0||y>=E.length){var _=y<0;if(this.hls.trigger(m.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:_,reason:"invalid level idx"}),_)return;y=Math.min(y,E.length-1)}this.clearTimer();var u=this.currentLevelIndex,c=E[u],p=E[y];this.log("switching to level "+y+" from "+u),this.currentLevelIndex=y;var d=v({},p,{level:y,maxBitrate:p.maxBitrate,uri:p.uri,urlId:p.urlId});delete d._urlId,this.hls.trigger(m.Events.LEVEL_SWITCHING,d);var x=p.details;if(!x||x.live){var h=this.switchParams(p.uri,c==null?void 0:c.details);this.loadPlaylist(h)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),n}(e.default)},"./src/controller/level-helper.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"addGroupId",function(){return S}),O.d(k,"assignTrackIdsByGroup",function(){return H}),O.d(k,"updatePTS",function(){return N}),O.d(k,"updateFragPTSDTS",function(){return A}),O.d(k,"mergeDetails",function(){return v}),O.d(k,"mapPartIntersection",function(){return f}),O.d(k,"mapFragmentIntersection",function(){return l}),O.d(k,"adjustSliding",function(){return a}),O.d(k,"addSliding",function(){return r}),O.d(k,"computeReloadInterval",function(){return o}),O.d(k,"getFragmentWithSN",function(){return s}),O.d(k,"getPartWith",function(){return i});var U=O("./src/polyfills/number.ts"),m=O("./src/utils/logger.ts");function S(n,t,b){switch(t){case"audio":n.audioGroupIds||(n.audioGroupIds=[]),n.audioGroupIds.push(b);break;case"text":n.textGroupIds||(n.textGroupIds=[]),n.textGroupIds.push(b);break}}function H(n){var t={};n.forEach(function(b){var y=b.groupId||"";b.id=t[y]=t[y]||0,t[y]++})}function N(n,t,b){var y=n[t],g=n[b];e(y,g)}function e(n,t){var b=t.startPTS;if(Object(U.isFiniteNumber)(b)){var y=0,g;t.sn>n.sn?(y=b-n.start,g=n):(y=n.start-b,g=t),g.duration!==y&&(g.duration=y)}else if(t.sn>n.sn){var E=n.cc===t.cc;E&&n.minEndPTS?t.start=n.start+(n.minEndPTS-n.start):t.start=n.start+n.duration}else t.start=Math.max(n.start-t.duration,0)}function A(n,t,b,y,g,E){var _=y-b;_<=0&&(m.logger.warn("Fragment should have a positive duration",t),y=b+t.duration,E=g+t.duration);var u=b,c=y,p=t.startPTS,d=t.endPTS;if(Object(U.isFiniteNumber)(p)){var x=Math.abs(p-b);Object(U.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(x,t.deltaPTS):t.deltaPTS=x,u=Math.max(b,p),b=Math.min(b,p),g=Math.min(g,t.startDTS),c=Math.min(y,d),y=Math.max(y,d),E=Math.max(E,t.endDTS)}t.duration=y-b;var h=b-t.start;t.appendedPTS=y,t.start=t.startPTS=b,t.maxStartPTS=u,t.startDTS=g,t.endPTS=y,t.minEndPTS=c,t.endDTS=E;var T=t.sn;if(!n||T<n.startSN||T>n.endSN)return 0;var M,D=T-n.startSN,w=n.fragments;for(w[D]=t,M=D;M>0;M--)e(w[M],w[M-1]);for(M=D;M<w.length-1;M++)e(w[M],w[M+1]);return n.fragmentHint&&e(w[w.length-1],n.fragmentHint),n.PTSKnown=n.alignedSliding=!0,h}function v(n,t){for(var b=null,y=n.fragments,g=y.length-1;g>=0;g--){var E=y[g].initSegment;if(E){b=E;break}}n.fragmentHint&&delete n.fragmentHint.endPTS;var _=0,u;if(l(n,t,function(M,D){M.relurl&&(_=M.cc-D.cc),Object(U.isFiniteNumber)(M.startPTS)&&Object(U.isFiniteNumber)(M.endPTS)&&(D.start=D.startPTS=M.startPTS,D.startDTS=M.startDTS,D.appendedPTS=M.appendedPTS,D.maxStartPTS=M.maxStartPTS,D.endPTS=M.endPTS,D.endDTS=M.endDTS,D.minEndPTS=M.minEndPTS,D.duration=M.endPTS-M.startPTS,D.duration&&(u=D),t.PTSKnown=t.alignedSliding=!0),D.elementaryStreams=M.elementaryStreams,D.loader=M.loader,D.stats=M.stats,D.urlId=M.urlId,M.initSegment&&(D.initSegment=M.initSegment,b=M.initSegment)}),b){var c=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;c.forEach(function(M){var D;(!M.initSegment||M.initSegment.relurl===((D=b)===null||D===void 0?void 0:D.relurl))&&(M.initSegment=b)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(M){return!M}),t.deltaUpdateFailed)){m.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var d=t.fragments;if(_){m.logger.warn("discontinuity sliding from playlist, take drift into account");for(var x=0;x<d.length;x++)d[x].cc+=_}t.skippedSegments&&(t.startCC=t.fragments[0].cc),f(n.partList,t.partList,function(M,D){D.elementaryStreams=M.elementaryStreams,D.stats=M.stats}),u?A(t,u,u.startPTS,u.endPTS,u.startDTS,u.endDTS):a(n,t),d.length&&(t.totalduration=t.edge-d[0].start),t.driftStartTime=n.driftStartTime,t.driftStart=n.driftStart;var h=t.advancedDateTime;if(t.advanced&&h){var T=t.edge;t.driftStart||(t.driftStartTime=h,t.driftStart=T),t.driftEndTime=h,t.driftEnd=T}else t.driftEndTime=n.driftEndTime,t.driftEnd=n.driftEnd,t.advancedDateTime=n.advancedDateTime}function f(n,t,b){if(n&&t)for(var y=0,g=0,E=n.length;g<=E;g++){var _=n[g],u=t[g+y];_&&u&&_.index===u.index&&_.fragment.sn===u.fragment.sn?b(_,u):y--}}function l(n,t,b){for(var y=t.skippedSegments,g=Math.max(n.startSN,t.startSN)-t.startSN,E=(n.fragmentHint?1:0)+(y?t.endSN:Math.min(n.endSN,t.endSN))-t.startSN,_=t.startSN-n.startSN,u=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,c=n.fragmentHint?n.fragments.concat(n.fragmentHint):n.fragments,p=g;p<=E;p++){var d=c[_+p],x=u[p];y&&!x&&p<y&&(x=t.fragments[p]=d),d&&x&&b(d,x)}}function a(n,t){var b=t.startSN+t.skippedSegments-n.startSN,y=n.fragments;if(b<0||b>=y.length)return;r(t,y[b].start)}function r(n,t){if(t){for(var b=n.fragments,y=n.skippedSegments;y<b.length;y++)b[y].start+=t;n.fragmentHint&&(n.fragmentHint.start+=t)}}function o(n,t){var b=1e3*n.levelTargetDuration,y=b/2,g=n.age,E=g>0&&g<b*3,_=t.loading.end-t.loading.start,u,c=n.availabilityDelay;if(n.updated===!1)if(E){var p=333*n.misses;u=Math.max(Math.min(y,_*2),p),n.availabilityDelay=(n.availabilityDelay||0)+u}else u=y;else E?(c=Math.min(c||b/2,g),n.availabilityDelay=c,u=c+b-g):u=b-_;return Math.round(u)}function s(n,t,b){if(!n||!n.details)return null;var y=n.details,g=y.fragments[t-y.startSN];return g||(g=y.fragmentHint,g&&g.sn===t?g:t<y.startSN&&b&&b.sn===t?b:null)}function i(n,t,b){if(!n||!n.details)return null;var y=n.details.partList;if(y)for(var g=y.length;g--;){var E=y[g];if(E.index===b&&E.fragment.sn===t)return E}return null}},"./src/controller/stream-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return y});var U=O("./src/polyfills/number.ts"),m=O("./src/controller/base-stream-controller.ts"),S=O("./src/is-supported.ts"),H=O("./src/events.ts"),N=O("./src/utils/buffer-helper.ts"),e=O("./src/controller/fragment-tracker.ts"),A=O("./src/types/loader.ts"),v=O("./src/loader/fragment.ts"),f=O("./src/demux/transmuxer-interface.ts"),l=O("./src/types/transmuxer.ts"),a=O("./src/controller/gap-controller.ts"),r=O("./src/errors.ts"),o=O("./src/utils/logger.ts");function s(g,E){for(var _=0;_<E.length;_++){var u=E[_];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}function i(g,E,_){return E&&s(g.prototype,E),_&&s(g,_),g}function n(g,E){g.prototype=Object.create(E.prototype),g.prototype.constructor=g,t(g,E)}function t(g,E){return t=Object.setPrototypeOf||function(u,c){return u.__proto__=c,u},t(g,E)}var b=100,y=function(g){n(E,g);function E(u,c){var p;return p=g.call(this,u,c,"[stream-controller]")||this,p.audioCodecSwap=!1,p.gapController=null,p.level=-1,p._forceStartLoad=!1,p.altAudio=!1,p.audioOnly=!1,p.fragPlaying=null,p.onvplaying=null,p.onvseeked=null,p.fragLastKbps=0,p.stalled=!1,p.couldBacktrack=!1,p.audioCodecSwitch=!1,p.videoBuffer=null,p._registerListeners(),p}var _=E.prototype;return _._registerListeners=function(){var c=this.hls;c.on(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(H.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.on(H.Events.ERROR,this.onError,this),c.on(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.on(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.on(H.Events.BUFFER_CREATED,this.onBufferCreated,this),c.on(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.on(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.on(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_._unregisterListeners=function(){var c=this.hls;c.off(H.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(H.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(H.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(H.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(H.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(H.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.off(H.Events.ERROR,this.onError,this),c.off(H.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.off(H.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.off(H.Events.BUFFER_CREATED,this.onBufferCreated,this),c.off(H.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.off(H.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.off(H.Events.FRAG_BUFFERED,this.onFragBuffered,this)},_.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},_.startLoad=function(c){if(this.levels){var p=this.lastCurrentTime,d=this.hls;if(this.stopLoad(),this.setInterval(b),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var x=d.startLevel;x===-1&&(d.config.testBandwidth?(x=0,this.bitrateTest=!0):x=d.nextAutoLevel),this.level=d.nextLoadLevel=x,this.loadedmetadata=!1}p>0&&c===-1&&(this.log("Override startPosition with lastCurrentTime @"+p.toFixed(3)),c=p),this.state=m.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=c,this.tick()}else this._forceStartLoad=!0,this.state=m.State.STOPPED},_.stopLoad=function(){this._forceStartLoad=!1,g.prototype.stopLoad.call(this)},_.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_LEVEL:{var c,p=this.levels,d=this.level,x=p==null||((c=p[d])===null||c===void 0)?void 0:c.details;if(x&&(!x.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(x))break;this.state=m.State.IDLE;break}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var h,T=self.performance.now(),M=this.retryDate;(!M||T>=M||(h=this.media)!==null&&h!==void 0&&h.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=m.State.IDLE)}break;default:break}this.onTickEnd()},_.onTickEnd=function(){g.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},_.doTickIdle=function(){var c,p,d=this.hls,x=this.levelLastLoaded,h=this.levels,T=this.media,M=d.config,D=d.nextLoadLevel;if(x===null||!T&&(this.startFragRequested||!M.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!h||!h[D])return;var w=h[D];this.level=d.nextLoadLevel=D;var C=w.details;if(!C||this.state===m.State.WAITING_LEVEL||C.live&&this.levelLastLoaded!==D){this.state=m.State.WAITING_LEVEL;return}var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:T,A.PlaylistLevelType.MAIN);if(j===null)return;var L=j.len,z=this.getMaxBufferLength(w.maxBitrate);if(L>=z)return;if(this._streamEnded(j,C)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(H.Events.BUFFER_EOS,$),this.state=m.State.ENDED;return}var he=j.end,fe=this.getNextFragment(he,C);if(this.couldBacktrack&&!this.fragPrevious&&fe&&fe.sn!=="initSegment"){var Ie=fe.sn-C.startSN;Ie>1&&(fe=C.fragments[Ie-1],this.fragmentTracker.removeFragment(fe))}if(fe&&this.fragmentTracker.getState(fe)===e.FragmentState.OK&&this.nextLoadPosition>he){var Se=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(T,Se,A.PlaylistLevelType.MAIN),fe=this.getNextFragment(this.nextLoadPosition,C)}if(!fe)return;fe.initSegment&&!fe.initSegment.data&&!this.bitrateTest&&(fe=fe.initSegment),((c=fe.decryptdata)===null||c===void 0?void 0:c.keyFormat)==="identity"&&!((p=fe.decryptdata)!==null&&p!==void 0&&p.key)?this.loadKey(fe,C):this.loadFragment(fe,C,he)},_.loadFragment=function(c,p,d){var x,h=this.fragmentTracker.getState(c);if(this.fragCurrent=c,h===e.FragmentState.BACKTRACKED){var T=this.fragmentTracker.getBacktrackData(c);if(T){this._handleFragmentLoadProgress(T),this._handleFragmentLoadComplete(T);return}else h=e.FragmentState.NOT_LOADED}h===e.FragmentState.NOT_LOADED||h===e.FragmentState.PARTIAL?c.sn==="initSegment"?this._loadInitSegment(c):this.bitrateTest?(c.bitrateTest=!0,this.log("Fragment "+c.sn+" of level "+c.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(c)):(this.startFragRequested=!0,g.prototype.loadFragment.call(this,c,p,d)):h===e.FragmentState.APPENDING?this.reduceMaxBufferLength(c.duration)&&this.fragmentTracker.removeFragment(c):((x=this.media)===null||x===void 0?void 0:x.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},_.getAppendedFrag=function(c){var p=this.fragmentTracker.getAppendedFrag(c,A.PlaylistLevelType.MAIN);return p&&"fragment"in p?p.fragment:p},_.getBufferedFrag=function(c){return this.fragmentTracker.getBufferedFrag(c,A.PlaylistLevelType.MAIN)},_.followingBufferedFrag=function(c){return c?this.getBufferedFrag(c.end+.5):null},_.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},_.nextLevelSwitch=function(){var c=this.levels,p=this.media;if(p!=null&&p.readyState){var d,x=this.getAppendedFrag(p.currentTime);if(x&&x.start>1&&this.flushMainBuffer(0,x.start-1),!p.paused&&c){var h=this.hls.nextLoadLevel,T=c[h],M=this.fragLastKbps;M&&this.fragCurrent?d=this.fragCurrent.duration*T.maxBitrate/(1e3*M)+1:d=0}else d=0;var D=this.getBufferedFrag(p.currentTime+d);if(D){var w=this.followingBufferedFrag(D);if(w){this.abortCurrentFrag();var C=w.maxStartPTS?w.maxStartPTS:w.start,j=w.duration,L=Math.max(D.end,C+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},_.abortCurrentFrag=function(){var c=this.fragCurrent;this.fragCurrent=null,c!=null&&c.loader&&c.loader.abort(),this.state===m.State.KEY_LOADING&&(this.state=m.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},_.flushMainBuffer=function(c,p){g.prototype.flushMainBuffer.call(this,c,p,this.altAudio?"video":null)},_.onMediaAttached=function(c,p){g.prototype.onMediaAttached.call(this,c,p);var d=p.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),d.addEventListener("playing",this.onvplaying),d.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,d,this.fragmentTracker,this.hls)},_.onMediaDetaching=function(){var c=this.media;c&&(c.removeEventListener("playing",this.onvplaying),c.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),g.prototype.onMediaDetaching.call(this)},_.onMediaPlaying=function(){this.tick()},_.onMediaSeeked=function(){var c=this.media,p=c?c.currentTime:null;Object(U.isFiniteNumber)(p)&&this.log("Media seeked to "+p.toFixed(3)),this.tick()},_.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(H.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},_.onManifestParsed=function(c,p){var d=!1,x=!1,h;p.levels.forEach(function(T){h=T.audioCodec,h&&(h.indexOf("mp4a.40.2")!==-1&&(d=!0),h.indexOf("mp4a.40.5")!==-1&&(x=!0))}),this.audioCodecSwitch=d&&x&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=p.levels,this.startFragRequested=!1},_.onLevelLoading=function(c,p){var d=this.levels;if(!d||this.state!==m.State.IDLE)return;var x=d[p.level];(!x.details||x.details.live&&this.levelLastLoaded!==p.level||this.waitForCdnTuneIn(x.details))&&(this.state=m.State.WAITING_LEVEL)},_.onLevelLoaded=function(c,p){var d,x=this.levels,h=p.level,T=p.details,M=T.totalduration;if(!x){this.warn("Levels were reset while loading level "+h);return}this.log("Level "+h+" loaded ["+T.startSN+","+T.endSN+"], cc ["+T.startCC+", "+T.endCC+"] duration:"+M);var D=this.fragCurrent;D&&(this.state===m.State.FRAG_LOADING||this.state===m.State.FRAG_LOADING_WAITING_RETRY)&&(D.level!==p.level&&D.loader&&(this.state=m.State.IDLE,D.loader.abort()));var w=x[h],C=0;if(T.live||(d=w.details)!==null&&d!==void 0&&d.live){if(T.fragments[0]||(T.deltaUpdateFailed=!0),T.deltaUpdateFailed)return;C=this.alignPlaylists(T,w.details)}if(w.details=T,this.levelLastLoaded=h,this.hls.trigger(H.Events.LEVEL_UPDATED,{details:T,level:h}),this.state===m.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(T))return;this.state=m.State.IDLE}this.startFragRequested?T.live&&this.synchronizeToLiveEdge(T):this.setStartPosition(T,C),this.tick()},_._handleFragmentLoadProgress=function(c){var p,d=c.frag,x=c.part,h=c.payload,T=this.levels;if(!T){this.warn("Levels were reset while fragment load was in progress. Fragment "+d.sn+" of level "+d.level+" will not be buffered");return}var M=T[d.level],D=M.details;if(!D){this.warn("Dropping fragment "+d.sn+" of level "+d.level+" after level details were reset");return}var w=M.videoCodec,C=D.PTSKnown||!D.live,j=(p=d.initSegment)===null||p===void 0?void 0:p.data,L=this._getAudioCodec(M),z=this.transmuxer=this.transmuxer||new f.default(this.hls,A.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=x?x.index:-1,he=$!==-1,fe=new l.ChunkMetadata(d.level,d.sn,d.stats.chunkCount,h.byteLength,$,he),Ie=this.initPTS[d.cc];z.push(h,j,L,w,d,x,D.totalduration,C,fe,Ie)},_.onAudioTrackSwitching=function(c,p){var d=this.altAudio,x=!!p.url,h=p.id;if(!x){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var T=this.fragCurrent;T!=null&&T.loader&&(this.log("Switching to main audio track, cancel main fragment load"),T.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var M=this.hls;d&&M.trigger(H.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),M.trigger(H.Events.AUDIO_TRACK_SWITCHED,{id:h})}},_.onAudioTrackSwitched=function(c,p){var d=p.id,x=!!this.hls.audioTracks[d].url;if(x){var h=this.videoBuffer;h&&this.mediaBuffer!==h&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=h)}this.altAudio=x,this.tick()},_.onBufferCreated=function(c,p){var d=p.tracks,x,h,T=!1;for(var M in d){var D=d[M];if(D.id==="main"){if(h=M,x=D,M==="video"){var w=d[M];w&&(this.videoBuffer=w.buffer)}}else T=!0}T&&x?(this.log("Alternate track found, use "+h+".buffered to schedule main fragment loading"),this.mediaBuffer=x.buffer):this.mediaBuffer=this.media},_.onFragBuffered=function(c,p){var d=p.frag,x=p.part;if(d&&d.type!==A.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(d)){this.warn("Fragment "+d.sn+(x?" p: "+x.index:"")+" of level "+d.level+" finished buffering, but was aborted. state: "+this.state),this.state===m.State.PARSED&&(this.state=m.State.IDLE);return}var h=x?x.stats:d.stats;this.fragLastKbps=Math.round(8*h.total/(h.buffering.end-h.loading.first)),d.sn!=="initSegment"&&(this.fragPrevious=d),this.fragBufferedComplete(d,x)},_.onError=function(c,p){switch(p.details){case r.ErrorDetails.FRAG_LOAD_ERROR:case r.ErrorDetails.FRAG_LOAD_TIMEOUT:case r.ErrorDetails.KEY_LOAD_ERROR:case r.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(A.PlaylistLevelType.MAIN,p);break;case r.ErrorDetails.LEVEL_LOAD_ERROR:case r.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==m.State.ERROR&&(p.fatal?(this.warn(""+p.details),this.state=m.State.ERROR):!p.levelRetry&&this.state===m.State.WAITING_LEVEL&&(this.state=m.State.IDLE));break;case r.ErrorDetails.BUFFER_FULL_ERROR:if(p.parent==="main"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var d=!0,x=this.getFwdBufferInfo(this.media,A.PlaylistLevelType.MAIN);x&&x.len>.5&&(d=!this.reduceMaxBufferLength(x.len)),d&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},_.checkBuffer=function(){var c=this.media,p=this.gapController;if(!c||!p||!c.readyState)return;var d=N.BufferHelper.getBuffered(c);!this.loadedmetadata&&d.length?(this.loadedmetadata=!0,this.seekToStartPos()):p.poll(this.lastCurrentTime),this.lastCurrentTime=c.currentTime},_.onFragLoadEmergencyAborted=function(){this.state=m.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},_.onBufferFlushed=function(c,p){var d=p.type;if(d!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var x=(d===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(x,d,A.PlaylistLevelType.MAIN)}},_.onLevelsUpdated=function(c,p){this.levels=p.levels},_.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},_.seekToStartPos=function(){var c=this.media,p=c.currentTime,d=this.startPosition;if(d>=0&&p<d){if(c.seeking){o.logger.log("could not seek to "+d+", already seeking at "+p);return}var x=N.BufferHelper.getBuffered(c),h=x.length?x.start(0):0,T=h-d;T>0&&(T<this.config.maxBufferHole||T<this.config.maxFragLookUpTolerance)&&(o.logger.log("adjusting start position by "+T+" to match buffer start"),d+=T,this.startPosition=d),this.log("seek to target start position "+d+" from current time "+p),c.currentTime=d}},_._getAudioCodec=function(c){var p=this.config.defaultAudioCodec||c.audioCodec;return this.audioCodecSwap&&p&&(this.log("Swapping audio codec"),p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5"),p},_._loadBitrateTestFrag=function(c){var p=this;this._doFragLoad(c).then(function(d){var x=p.hls;if(!d||x.nextLoadLevel||p.fragContextChanged(c))return;p.fragLoadError=0,p.state=m.State.IDLE,p.startFragRequested=!1,p.bitrateTest=!1;var h=c.stats;h.parsing.start=h.parsing.end=h.buffering.start=h.buffering.end=self.performance.now(),x.trigger(H.Events.FRAG_LOADED,d)})},_._handleTransmuxComplete=function(c){var p,d="main",x=this.hls,h=c.remuxResult,T=c.chunkMeta,M=this.getCurrentContext(T);if(!M){this.warn("The loading context changed while buffering fragment "+T.sn+" of level "+T.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(T.level);return}var D=M.frag,w=M.part,C=M.level,j=h.video,L=h.text,z=h.id3,$=h.initSegment,he=this.altAudio?void 0:h.audio;if(this.fragContextChanged(D))return;if(this.state=m.State.PARSING,$){$.tracks&&(this._bufferInitSegment(C,$.tracks,D,T),x.trigger(H.Events.FRAG_PARSING_INIT_SEGMENT,{frag:D,id:d,tracks:$.tracks}));var fe=$.initPTS,Ie=$.timescale;Object(U.isFiniteNumber)(fe)&&(this.initPTS[D.cc]=fe,x.trigger(H.Events.INIT_PTS_FOUND,{frag:D,id:d,initPTS:fe,timescale:Ie}))}if(j&&h.independent!==!1){if(C.details){var Se=j.startPTS,pe=j.endPTS,Ce=j.startDTS,Me=j.endDTS;if(w)w.elementaryStreams[j.type]={startPTS:Se,endPTS:pe,startDTS:Ce,endDTS:Me};else if(j.firstKeyFrame&&j.independent&&(this.couldBacktrack=!0),j.dropped&&j.independent){var ge=this.getLoadPosition()+this.config.maxBufferHole;if(ge<Se){this.backtrack(D);return}D.setElementaryStreamInfo(j.type,D.start,pe,D.start,Me,!0)}D.setElementaryStreamInfo(j.type,Se,pe,Ce,Me),this.bufferFragmentData(j,D,w,T)}}else if(h.independent===!1){this.backtrack(D);return}if(he){var B=he.startPTS,R=he.endPTS,I=he.startDTS,W=he.endDTS;w&&(w.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:B,endPTS:R,startDTS:I,endDTS:W}),D.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,B,R,I,W),this.bufferFragmentData(he,D,w,T)}if(z!=null&&(p=z.samples)!==null&&p!==void 0&&p.length){var Y={frag:D,id:d,samples:z.samples};x.trigger(H.Events.FRAG_PARSING_METADATA,Y)}if(L){var F={frag:D,id:d,samples:L.samples};x.trigger(H.Events.FRAG_PARSING_USERDATA,F)}},_._bufferInitSegment=function(c,p,d,x){var h=this;if(this.state!==m.State.PARSING)return;this.audioOnly=!!p.audio&&!p.video,this.altAudio&&!this.audioOnly&&delete p.audio;var T=p.audio,M=p.video,D=p.audiovideo;if(T){var w=c.audioCodec,C=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(w&&(w.indexOf("mp4a.40.5")!==-1?w="mp4a.40.2":w="mp4a.40.5"),T.metadata.channelCount!==1&&C.indexOf("firefox")===-1&&(w="mp4a.40.5")),C.indexOf("android")!==-1&&T.container!=="audio/mpeg"&&(w="mp4a.40.2",this.log("Android: force audio codec to "+w)),c.audioCodec&&c.audioCodec!==w&&this.log('Swapping manifest audio codec "'+c.audioCodec+'" for "'+w+'"'),T.levelCodec=w,T.id="main",this.log("Init audio buffer, container:"+T.container+", codecs[selected/level/parsed]=["+(w||"")+"/"+(c.audioCodec||"")+"/"+T.codec+"]")}M&&(M.levelCodec=c.videoCodec,M.id="main",this.log("Init video buffer, container:"+M.container+", codecs[level/parsed]=["+(c.videoCodec||"")+"/"+M.codec+"]")),D&&this.log("Init audiovideo buffer, container:"+D.container+", codecs[level/parsed]=["+(c.attrs.CODECS||"")+"/"+D.codec+"]"),this.hls.trigger(H.Events.BUFFER_CODECS,p),Object.keys(p).forEach(function(j){var L=p[j],z=L.initSegment;z!=null&&z.byteLength&&h.hls.trigger(H.Events.BUFFER_APPENDING,{type:j,data:z,frag:d,part:null,chunkMeta:x,parent:d.type})}),this.tick()},_.backtrack=function(c){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(c);var p=this.fragmentTracker.backtrack(c);this.fragPrevious=null,this.nextLoadPosition=c.start,p?this.resetFragmentLoading(c):this.state=m.State.BACKTRACKING},_.checkFragmentChanged=function(){var c=this.media,p=null;if(c&&c.readyState>1&&c.seeking===!1){var d=c.currentTime;if(N.BufferHelper.isBuffered(c,d)?p=this.getAppendedFrag(d):N.BufferHelper.isBuffered(c,d+.1)&&(p=this.getAppendedFrag(d+.1)),p){var x=this.fragPlaying,h=p.level;(!x||p.sn!==x.sn||x.level!==h||p.urlId!==x.urlId)&&(this.hls.trigger(H.Events.FRAG_CHANGED,{frag:p}),(!x||x.level!==h)&&this.hls.trigger(H.Events.LEVEL_SWITCHED,{level:h}),this.fragPlaying=p)}}},i(E,[{key:"nextLevel",get:function(){var c=this.nextBufferedFrag;return c?c.level:-1}},{key:"currentLevel",get:function(){var c=this.media;if(c){var p=this.getAppendedFrag(c.currentTime);if(p)return p.level}return-1}},{key:"nextBufferedFrag",get:function(){var c=this.media;if(c){var p=this.getAppendedFrag(c.currentTime);return this.followingBufferedFrag(p)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),E}(m.default)},"./src/controller/subtitle-stream-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"SubtitleStreamController",function(){return n});var U=O("./src/events.ts"),m=O("./src/utils/logger.ts"),S=O("./src/utils/buffer-helper.ts"),H=O("./src/controller/fragment-finders.ts"),N=O("./src/utils/discontinuities.ts"),e=O("./src/controller/level-helper.ts"),A=O("./src/controller/fragment-tracker.ts"),v=O("./src/controller/base-stream-controller.ts"),f=O("./src/types/loader.ts"),l=O("./src/types/level.ts");function a(t,b){for(var y=0;y<b.length;y++){var g=b[y];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(t,g.key,g)}}function r(t,b,y){return b&&a(t.prototype,b),y&&a(t,y),t}function o(t,b){t.prototype=Object.create(b.prototype),t.prototype.constructor=t,s(t,b)}function s(t,b){return s=Object.setPrototypeOf||function(g,E){return g.__proto__=E,g},s(t,b)}var i=500,n=function(t){o(b,t);function b(g,E){var _;return _=t.call(this,g,E,"[subtitle-stream-controller]")||this,_.levels=[],_.currentTrackId=-1,_.tracksBuffered=[],_.mainDetails=null,_._registerListeners(),_}var y=b.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var E=this.hls;E.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(U.Events.ERROR,this.onError,this),E.on(U.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),E.on(U.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),E.on(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),E.on(U.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),E.on(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var E=this.hls;E.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(U.Events.ERROR,this.onError,this),E.off(U.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),E.off(U.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),E.off(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),E.off(U.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),E.off(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=v.State.IDLE,this.setInterval(i),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(E,_){this.mainDetails=_.details},y.onSubtitleFragProcessed=function(E,_){var u=_.frag,c=_.success;if(this.fragPrevious=u,this.state=v.State.IDLE,!c)return;var p=this.tracksBuffered[this.currentTrackId];if(!p)return;for(var d,x=u.start,h=0;h<p.length;h++)if(x>=p[h].start&&x<=p[h].end){d=p[h];break}var T=u.start+u.duration;d?d.end=T:(d={start:x,end:T},p.push(d)),this.fragmentTracker.fragBuffered(u)},y.onBufferFlushing=function(E,_){var u=_.startOffset,c=_.endOffset;if(u===0&&c!==Number.POSITIVE_INFINITY){var p=this.currentTrackId,d=this.levels;if(!d.length||!d[p]||!d[p].details)return;var x=d[p].details,h=x.targetduration,T=c-h;if(T<=0)return;_.endOffsetSubtitles=Math.max(0,T),this.tracksBuffered.forEach(function(M){for(var D=0;D<M.length;){if(M[D].end<=T){M.shift();continue}else if(M[D].start<T)M[D].start=T;else break;D++}}),this.fragmentTracker.removeFragmentsInRange(u,T,f.PlaylistLevelType.SUBTITLE)}},y.onError=function(E,_){var u,c=_.frag;if(!c||c.type!==f.PlaylistLevelType.SUBTITLE)return;(u=this.fragCurrent)!==null&&u!==void 0&&u.loader&&this.fragCurrent.loader.abort(),this.state=v.State.IDLE},y.onSubtitleTracksUpdated=function(E,_){var u=this,c=_.subtitleTracks;this.tracksBuffered=[],this.levels=c.map(function(p){return new l.Level(p)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(p){u.tracksBuffered[p.id]=[]}),this.mediaBuffer=null},y.onSubtitleTrackSwitch=function(E,_){if(this.currentTrackId=_.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var u=this.levels[this.currentTrackId];u!=null&&u.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,u&&this.setInterval(i)},y.onSubtitleTrackLoaded=function(E,_){var u,c=_.details,p=_.id,d=this.currentTrackId,x=this.levels;if(!x.length)return;var h=x[d];if(p>=x.length||p!==d||!h)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,c.live||(u=h.details)!==null&&u!==void 0&&u.live){var T=this.mainDetails;if(c.deltaUpdateFailed||!T)return;var M=T.fragments[0];if(!h.details)c.hasProgramDateTime&&T.hasProgramDateTime?Object(N.alignMediaPlaylistByPDT)(c,T):M&&Object(e.addSliding)(c,M.start);else{var D=this.alignPlaylists(c,h.details);D===0&&M&&Object(e.addSliding)(c,M.start)}}if(h.details=c,this.levelLastLoaded=p,this.tick(),c.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var w=Object(H.findFragmentByPTS)(null,c.fragments,this.media.currentTime,0);w||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0)}},y._handleFragmentLoadComplete=function(E){var _=E.frag,u=E.payload,c=_.decryptdata,p=this.hls;if(this.fragContextChanged(_))return;if(u&&u.byteLength>0&&c&&c.key&&c.iv&&c.method==="AES-128"){var d=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(u),c.key.buffer,c.iv.buffer).then(function(x){var h=performance.now();p.trigger(U.Events.FRAG_DECRYPTED,{frag:_,payload:x,stats:{tstart:d,tdecrypt:h}})})}},y.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var E,_=this.currentTrackId,u=this.levels;if(!u.length||!u[_]||!u[_].details)return;var c=u[_].details,p=c.targetduration,d=this.config,x=this.media,h=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,x.currentTime-p,d.maxBufferHole),T=h.end,M=h.len,D=this.getMaxBufferLength()+p;if(M>D)return;console.assert(c,"Subtitle track details are defined on idle subtitle stream controller tick");var w=c.fragments,C=w.length,j=c.edge,L,z=this.fragPrevious;if(T<j){var $=d.maxFragLookUpTolerance;z&&c.hasProgramDateTime&&(L=Object(H.findFragmentByPDT)(w,z.endProgramDateTime,$)),L||(L=Object(H.findFragmentByPTS)(z,w,T,$),!L&&z&&z.start<w[0].start&&(L=w[0]))}else L=w[C-1];(E=L)!==null&&E!==void 0&&E.encrypted?(m.logger.log("Loading key for "+L.sn),this.state=v.State.KEY_LOADING,this.hls.trigger(U.Events.KEY_LOADING,{frag:L})):L&&this.fragmentTracker.getState(L)===A.FragmentState.NOT_LOADED&&this.loadFragment(L,c,T)}},y.loadFragment=function(E,_,u){this.fragCurrent=E,t.prototype.loadFragment.call(this,E,_,u)},r(b,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),b}(v.default)},"./src/controller/subtitle-track-controller.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/events.ts"),m=O("./src/utils/texttrack-utils.ts"),S=O("./src/controller/base-playlist-controller.ts"),H=O("./src/types/loader.ts");function N(a,r){for(var o=0;o<r.length;o++){var s=r[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(a,s.key,s)}}function e(a,r,o){return r&&N(a.prototype,r),o&&N(a,o),a}function A(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,v(a,r)}function v(a,r){return v=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},v(a,r)}var f=function(a){A(r,a);function r(s){var i;return i=a.call(this,s,"[subtitle-track-controller]")||this,i.media=null,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.selectDefaultTrack=!0,i.queuedDefaultTrack=-1,i.trackChangeListener=function(){return i.onTextTracksChanged()},i.asyncPollTrackChange=function(){return i.pollTrackChange(0)},i.useTextTrackPolling=!1,i.subtitlePollingInterval=-1,i.subtitleDisplay=!0,i.registerListeners(),i}var o=r.prototype;return o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},o.registerListeners=function(){var i=this.hls;i.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.on(U.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var i=this.hls;i.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),i.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),i.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(U.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(U.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(U.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),i.off(U.Events.ERROR,this.onError,this)},o.onMediaAttached=function(i,n){if(this.media=n.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},o.pollTrackChange=function(i){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,i)},o.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var i=l(this.media.textTracks);i.forEach(function(n){Object(m.clearCurrentCues)(n)}),this.subtitleTrack=-1,this.media=null},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},o.onManifestParsed=function(i,n){this.tracks=n.subtitleTracks},o.onSubtitleTrackLoaded=function(i,n){var t=n.id,b=n.details,y=this.trackId,g=this.tracksInGroup[y];if(!g){this.warn("Invalid subtitle track id "+t);return}var E=g.details;g.details=n.details,this.log("subtitle track "+t+" loaded ["+b.startSN+"-"+b.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,E))},o.onLevelLoading=function(i,n){this.switchLevel(n.level)},o.onLevelSwitching=function(i,n){this.switchLevel(n.level)},o.switchLevel=function(i){var n=this.hls.levels[i];if(!(n!=null&&n.textGroupIds))return;var t=n.textGroupIds[n.urlId];if(this.groupId!==t){var b=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(_){return!t||_.groupId===t});this.tracksInGroup=y;var g=this.findTrackId(b==null?void 0:b.name)||this.findTrackId();this.groupId=t;var E={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(U.Events.SUBTITLE_TRACKS_UPDATED,E),g!==-1&&this.setSubtitleTrack(g,b)}},o.findTrackId=function(i){for(var n=this.tracksInGroup,t=0;t<n.length;t++){var b=n[t];if((!this.selectDefaultTrack||b.default)&&(!i||i===b.name))return b.id}return-1},o.onError=function(i,n){if(a.prototype.onError.call(this,i,n),n.fatal||!n.context)return;n.context.type===H.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},o.loadPlaylist=function(i){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,b=n.groupId,y=n.url;if(i)try{y=i.addDirectives(y)}catch(g){this.warn("Could not construct new URL with HLS Delivery Directives: "+g)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(U.Events.SUBTITLE_TRACK_LOADING,{url:y,id:t,groupId:b,deliveryDirectives:i||null})}},o.toggleTrackModes=function(i){var n=this,t=this.media,b=this.subtitleDisplay,y=this.trackId;if(!t)return;var g=l(t.textTracks),E=g.filter(function(c){return c.groupId===n.groupId});if(i===-1)[].slice.call(g).forEach(function(c){c.mode="disabled"});else{var _=E[y];_&&(_.mode="disabled")}var u=E[i];u&&(u.mode=b?"showing":"hidden")},o.setSubtitleTrack=function(i,n){var t,b=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=i;return}if(this.trackId!==i&&this.toggleTrackModes(i),this.trackId===i&&(i===-1||(t=b[i])!==null&&t!==void 0&&t.details)||i<-1||i>=b.length)return;this.clearTimer();var y=b[i];if(this.log("Switching to subtitle track "+i),this.trackId=i,y){var g=y.id,E=y.groupId,_=E===void 0?"":E,u=y.name,c=y.type,p=y.url;this.hls.trigger(U.Events.SUBTITLE_TRACK_SWITCH,{id:g,groupId:_,name:u,type:c,url:p});var d=this.switchParams(y.url,n==null?void 0:n.details);this.loadPlaylist(d)}else this.hls.trigger(U.Events.SUBTITLE_TRACK_SWITCH,{id:i})},o.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var i=-1,n=l(this.media.textTracks),t=0;t<n.length;t++)if(n[t].mode==="hidden")i=t;else if(n[t].mode==="showing"){i=t;break}this.subtitleTrack!==i&&(this.subtitleTrack=i)},e(r,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1;var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(i,n)}}]),r}(S.default);function l(a){for(var r=[],o=0;o<a.length;o++){var s=a[o];s.kind==="subtitles"&&s.label&&r.push(a[o])}return r}k.default=f},"./src/controller/timeline-controller.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"TimelineController",function(){return l});var U=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),S=O("./src/utils/cea-608-parser.ts"),H=O("./src/utils/output-filter.ts"),N=O("./src/utils/webvtt-parser.ts"),e=O("./src/utils/texttrack-utils.ts"),A=O("./src/utils/imsc1-ttml-parser.ts"),v=O("./src/types/loader.ts"),f=O("./src/utils/logger.ts"),l=function(){function s(n){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this.captionsProperties=void 0,this.hls=n,this.config=n.config,this.Cues=n.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new H.default(this,"textTrack1"),b=new H.default(this,"textTrack2"),y=new H.default(this,"textTrack3"),g=new H.default(this,"textTrack4");this.cea608Parser1=new S.default(1,t,b),this.cea608Parser2=new S.default(3,y,g)}n.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),n.on(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),n.on(m.Events.FRAG_LOADING,this.onFragLoading,this),n.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),n.on(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),n.on(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),n.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),n.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var i=s.prototype;return i.destroy=function(){var t=this.hls;t.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(m.Events.FRAG_LOADING,this.onFragLoading,this),t.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},i.addCues=function(t,b,y,g,E){for(var _=!1,u=E.length;u--;){var c=E[u],p=r(c[0],c[1],b,y);if(p>=0&&(c[0]=Math.min(c[0],b),c[1]=Math.max(c[1],y),_=!0,p/(y-b)>.5))return}if(_||E.push([b,y]),this.config.renderTextTracksNatively){var d=this.captionsTracks[t];this.Cues.newCue(d,b,y,g)}else{var x=this.Cues.newCue(null,b,y,g);this.hls.trigger(m.Events.CUES_PARSED,{type:"captions",cues:x,track:t})}},i.onInitPtsFound=function(t,b){var y=this,g=b.frag,E=b.id,_=b.initPTS,u=b.timescale,c=this.unparsedVttFrags;E==="main"&&(this.initPTS[g.cc]=_,this.timescale[g.cc]=u),c.length&&(this.unparsedVttFrags=[],c.forEach(function(p){y.onFragLoaded(m.Events.FRAG_LOADED,p)}))},i.getExistingTrack=function(t){var b=this.media;if(b)for(var y=0;y<b.textTracks.length;y++){var g=b.textTracks[y];if(g[t])return g}return null},i.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},i.createNativeTrack=function(t){if(this.captionsTracks[t])return;var b=this.captionsProperties,y=this.captionsTracks,g=this.media,E=b[t],_=E.label,u=E.languageCode,c=this.getExistingTrack(t);if(c)y[t]=c,Object(e.clearCurrentCues)(y[t]),Object(e.sendAddTrackEvent)(y[t],g);else{var p=this.createTextTrack("captions",_,u);p&&(p[t]=!0,y[t]=p)}},i.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var b=this.captionsProperties[t];if(!b)return;var y=b.label,g={_id:t,label:y,kind:"captions",default:b.media?!!b.media.default:!1,closedCaptions:b.media};this.nonNativeCaptionsTracks[t]=g,this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[g]})},i.createTextTrack=function(t,b,y){var g=this.media;return g?g.addTextTrack(t,b,y):void 0},i.onMediaAttaching=function(t,b){this.media=b.media,this._cleanTracks()},i.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(b){Object(e.clearCurrentCues)(t[b]),delete t[b]}),this.nonNativeCaptionsTracks={}},i.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},i._cleanTracks=function(){var t=this.media;if(!t)return;var b=t.textTracks;if(b)for(var y=0;y<b.length;y++)Object(e.clearCurrentCues)(b[y])},i.onSubtitleTracksUpdated=function(t,b){var y=this;this.textTracks=[];var g=b.subtitleTracks||[],E=g.some(function(p){return p.textCodec===A.IMSC1_CODEC});if(this.config.enableWebVTT||E&&this.config.enableIMSC1){var _=this.tracks&&g&&this.tracks.length===g.length;if(this.tracks=g||[],this.config.renderTextTracksNatively){var u=this.media?this.media.textTracks:[];this.tracks.forEach(function(p,d){var x;if(d<u.length){for(var h=null,T=0;T<u.length;T++)if(a(u[T],p)){h=u[T];break}h&&(x=h)}x?Object(e.clearCurrentCues)(x):(x=y.createTextTrack("subtitles",p.name,p.lang),x&&(x.mode="disabled")),x&&(x.groupId=p.groupId,y.textTracks.push(x))})}else if(!_&&this.tracks&&this.tracks.length){var c=this.tracks.map(function(p){return{label:p.name,kind:p.type.toLowerCase(),default:p.default,subtitleTrack:p}});this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:c})}}},i.onManifestLoaded=function(t,b){var y=this;this.config.enableCEA708Captions&&b.captions&&b.captions.forEach(function(g){var E=/(?:CC|SERVICE)([1-4])/.exec(g.instreamId);if(!E)return;var _="textTrack"+E[1],u=y.captionsProperties[_];if(!u)return;u.label=g.name,g.lang&&(u.languageCode=g.lang),u.media=g})},i.onFragLoading=function(t,b){var y=this.cea608Parser1,g=this.cea608Parser2,E=this.lastSn,_=this.lastPartIndex;if(!this.enabled||!(y&&g))return;if(b.frag.type===v.PlaylistLevelType.MAIN){var u,c,p=b.frag.sn,d=(u=b==null||((c=b.part)===null||c===void 0)?void 0:c.index)!=null?u:-1;p===E+1||p===E&&d===_+1||(y.reset(),g.reset()),this.lastSn=p,this.lastPartIndex=d}},i.onFragLoaded=function(t,b){var y=b.frag,g=b.payload,E=this.initPTS,_=this.unparsedVttFrags;if(y.type===v.PlaylistLevelType.SUBTITLE)if(g.byteLength){if(!Object(U.isFiniteNumber)(E[y.cc])){_.push(b),E.length&&this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Missing initial subtitle PTS")});return}var u=y.decryptdata;if(u==null||u.key==null||u.method!=="AES-128"){var c=this.tracks[y.level],p=this.vttCCs;p[y.cc]||(p[y.cc]={start:y.start,prevCC:this.prevCC,new:!0},this.prevCC=y.cc),c&&c.textCodec===A.IMSC1_CODEC?this._parseIMSC1(y,g):this._parseVTTs(y,g,p)}}else this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Empty subtitle payload")})},i._parseIMSC1=function(t,b){var y=this,g=this.hls;Object(A.parseIMSC1)(b,this.initPTS[t.cc],this.timescale[t.cc],function(E){y._appendCues(E,t.level),g.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(E){f.logger.log("Failed to parse IMSC1: "+E),g.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:E})})},i._parseVTTs=function(t,b,y){var g=this,E=this.hls;Object(N.parseWebVTT)(b,this.initPTS[t.cc],this.timescale[t.cc],y,t.cc,t.start,function(_){g._appendCues(_,t.level),E.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(_){g._fallbackToIMSC1(t,b),f.logger.log("Failed to parse VTT cue: "+_),E.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:_})})},i._fallbackToIMSC1=function(t,b){var y=this,g=this.tracks[t.level];g.textCodec||Object(A.parseIMSC1)(b,this.initPTS[t.cc],this.timescale[t.cc],function(){g.textCodec=A.IMSC1_CODEC,y._parseIMSC1(t,b)},function(){g.textCodec="wvtt"})},i._appendCues=function(t,b){var y=this.hls;if(this.config.renderTextTracksNatively){var g=this.textTracks[b];if(g.mode==="disabled")return;t.forEach(function(u){return Object(e.addCueToTrack)(g,u)})}else{var E=this.tracks[b],_=E.default?"default":"subtitles"+b;y.trigger(m.Events.CUES_PARSED,{type:"subtitles",cues:t,track:_})}},i.onFragDecrypted=function(t,b){var y=b.frag;if(y.type===v.PlaylistLevelType.SUBTITLE){if(!Object(U.isFiniteNumber)(this.initPTS[y.cc])){this.unparsedVttFrags.push(b);return}this.onFragLoaded(m.Events.FRAG_LOADED,b)}},i.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},i.onFragParsingUserdata=function(t,b){var y=this.cea608Parser1,g=this.cea608Parser2;if(!this.enabled||!(y&&g))return;for(var E=0;E<b.samples.length;E++){var _=b.samples[E].bytes;if(_){var u=this.extractCea608Data(_);y.addData(b.samples[E].pts,u[0]),g.addData(b.samples[E].pts,u[1])}}},i.onBufferFlushing=function(t,b){var y=b.startOffset,g=b.endOffset,E=b.endOffsetSubtitles,_=b.type,u=this.media;if(!u||u.currentTime<g)return;if(!_||_==="video"){var c=this.captionsTracks;Object.keys(c).forEach(function(d){return Object(e.removeCuesInRange)(c[d],y,g)})}if(this.config.renderTextTracksNatively&&(y===0&&E!==void 0)){var p=this.textTracks;Object.keys(p).forEach(function(d){return Object(e.removeCuesInRange)(p[d],y,E)})}},i.extractCea608Data=function(t){for(var b=t[0]&31,y=2,g=[[],[]],E=0;E<b;E++){var _=t[y++],u=127&t[y++],c=127&t[y++],p=(4&_)!==0,d=3&_;if(u===0&&c===0)continue;p&&((d===0||d===1)&&(g[d].push(u),g[d].push(c)))}return g},s}();function a(s,i){return s&&s.label===i.name&&!(s.textTrack1||s.textTrack2)}function r(s,i,n,t){return Math.min(i,t)-Math.max(s,n)}function o(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return U});var U=function(){function m(H,N){this.subtle=void 0,this.aesIV=void 0,this.subtle=H,this.aesIV=N}var S=m.prototype;return S.decrypt=function(N,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,N)},m}()},"./src/crypt/aes-decryptor.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"removePadding",function(){return m}),O.d(k,"default",function(){return S});var U=O("./src/utils/typed-array.ts");function m(H){var N=H.byteLength,e=N&&new DataView(H.buffer).getUint8(N-1);return e?Object(U.sliceUint8)(H,0,N-e):H}var S=function(){function H(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var N=H.prototype;return N.uint8ArrayToUint32Array_=function(A){for(var v=new DataView(A),f=new Uint32Array(4),l=0;l<4;l++)f[l]=v.getUint32(l*4);return f},N.initTable=function(){var A=this.sBox,v=this.invSBox,f=this.subMix,l=f[0],a=f[1],r=f[2],o=f[3],s=this.invSubMix,i=s[0],n=s[1],t=s[2],b=s[3],y=new Uint32Array(256),g=0,E=0,_=0;for(_=0;_<256;_++)_<128?y[_]=_<<1:y[_]=_<<1^283;for(_=0;_<256;_++){var u=E^E<<1^E<<2^E<<3^E<<4;u=u>>>8^u&255^99,A[g]=u,v[u]=g;var c=y[g],p=y[c],d=y[p],x=y[u]*257^u*16843008;l[g]=x<<24|x>>>8,a[g]=x<<16|x>>>16,r[g]=x<<8|x>>>24,o[g]=x,x=d*16843009^p*65537^c*257^g*16843008,i[u]=x<<24|x>>>8,n[u]=x<<16|x>>>16,t[u]=x<<8|x>>>24,b[u]=x,g?(g=c^y[y[y[d^c]]],E^=y[y[E]]):g=E=1}},N.expandKey=function(A){for(var v=this.uint8ArrayToUint32Array_(A),f=!0,l=0;l<v.length&&f;)f=v[l]===this.key[l],l++;if(f)return;this.key=v;var a=this.keySize=v.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var r=this.ksRows=(a+6+1)*4,o,s,i=this.keySchedule=new Uint32Array(r),n=this.invKeySchedule=new Uint32Array(r),t=this.sBox,b=this.rcon,y=this.invSubMix,g=y[0],E=y[1],_=y[2],u=y[3],c,p;for(o=0;o<r;o++){if(o<a){c=i[o]=v[o];continue}p=c,o%a===0?(p=p<<8|p>>>24,p=t[p>>>24]<<24|t[p>>>16&255]<<16|t[p>>>8&255]<<8|t[p&255],p^=b[o/a|0]<<24):a>6&&o%a===4&&(p=t[p>>>24]<<24|t[p>>>16&255]<<16|t[p>>>8&255]<<8|t[p&255]),i[o]=c=(i[o-a]^p)>>>0}for(s=0;s<r;s++)o=r-s,s&3?p=i[o]:p=i[o-4],s<4||o<=4?n[s]=p:n[s]=g[t[p>>>24]]^E[t[p>>>16&255]]^_[t[p>>>8&255]]^u[t[p&255]],n[s]=n[s]>>>0},N.networkToHostOrderSwap=function(A){return A<<24|(A&65280)<<8|(A&16711680)>>8|A>>>24},N.decrypt=function(A,v,f){for(var l=this.keySize+6,a=this.invKeySchedule,r=this.invSBox,o=this.invSubMix,s=o[0],i=o[1],n=o[2],t=o[3],b=this.uint8ArrayToUint32Array_(f),y=b[0],g=b[1],E=b[2],_=b[3],u=new Int32Array(A),c=new Int32Array(u.length),p,d,x,h,T,M,D,w,C,j,L,z,$,he,fe=this.networkToHostOrderSwap;v<u.length;){for(C=fe(u[v]),j=fe(u[v+1]),L=fe(u[v+2]),z=fe(u[v+3]),T=C^a[0],M=z^a[1],D=L^a[2],w=j^a[3],$=4,he=1;he<l;he++)p=s[T>>>24]^i[M>>16&255]^n[D>>8&255]^t[w&255]^a[$],d=s[M>>>24]^i[D>>16&255]^n[w>>8&255]^t[T&255]^a[$+1],x=s[D>>>24]^i[w>>16&255]^n[T>>8&255]^t[M&255]^a[$+2],h=s[w>>>24]^i[T>>16&255]^n[M>>8&255]^t[D&255]^a[$+3],T=p,M=d,D=x,w=h,$=$+4;p=r[T>>>24]<<24^r[M>>16&255]<<16^r[D>>8&255]<<8^r[w&255]^a[$],d=r[M>>>24]<<24^r[D>>16&255]<<16^r[w>>8&255]<<8^r[T&255]^a[$+1],x=r[D>>>24]<<24^r[w>>16&255]<<16^r[T>>8&255]<<8^r[M&255]^a[$+2],h=r[w>>>24]<<24^r[T>>16&255]<<16^r[M>>8&255]<<8^r[D&255]^a[$+3],c[v]=fe(p^y),c[v+1]=fe(h^g),c[v+2]=fe(x^E),c[v+3]=fe(d^_),y=C,g=j,E=L,_=z,v=v+4}return c.buffer},H}()},"./src/crypt/decrypter.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return v});var U=O("./src/crypt/aes-crypto.ts"),m=O("./src/crypt/fast-aes-key.ts"),S=O("./src/crypt/aes-decryptor.ts"),H=O("./src/utils/logger.ts"),N=O("./src/utils/mp4-tools.ts"),e=O("./src/utils/typed-array.ts"),A=16,v=function(){function f(a,r,o){var s=o===void 0?{}:o,i=s.removePKCS7Padding,n=i===void 0?!0:i;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=a,this.config=r,this.removePKCS7Padding=n,n)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(b){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var l=f.prototype;return l.destroy=function(){this.observer=null},l.isSync=function(){return this.config.enableSoftwareAES},l.flush=function(){var r=this.currentResult;if(!r){this.reset();return}var o=new Uint8Array(r);return this.reset(),this.removePKCS7Padding?Object(S.removePadding)(o):o},l.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},l.decrypt=function(r,o,s,i){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(r),o,s);var n=this.flush();n&&i(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(r),o,s).then(i)},l.softwareDecrypt=function(r,o,s){var i=this.currentIV,n=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(r=Object(N.appendUint8Array)(t,r),this.remainderData=null);var b=this.getValidChunk(r);if(!b.length)return null;i&&(s=i);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new S.default),y.expandKey(o);var g=n;return this.currentResult=y.decrypt(b.buffer,0,s),this.currentIV=Object(e.sliceUint8)(b,-16).buffer,g||null},l.webCryptoDecrypt=function(r,o,s){var i=this,n=this.subtle;return(this.key!==o||!this.fastAesKey)&&(this.key=o,this.fastAesKey=new m.default(n,o)),this.fastAesKey.expandKey().then(function(t){if(!n)return Promise.reject(new Error("web crypto not initialized"));var b=new U.default(n,s);return b.decrypt(r.buffer,t)}).catch(function(t){return i.onWebCryptoError(t,r,o,s)})},l.onWebCryptoError=function(r,o,s,i){return H.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",r),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(o,s,i)},l.getValidChunk=function(r){var o=r,s=r.length-r.length%A;return s!==r.length&&(o=Object(e.sliceUint8)(r,0,s),this.remainderData=Object(e.sliceUint8)(r,s)),o},l.logOnce=function(r){if(!this.logEnabled)return;H.logger.log("[decrypter.ts]: "+r),this.logEnabled=!1},f}()},"./src/crypt/fast-aes-key.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return U});var U=function(){function m(H,N){this.subtle=void 0,this.key=void 0,this.subtle=H,this.key=N}var S=m.prototype;return S.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},m}()},"./src/demux/aacdemuxer.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/demux/base-audio-demuxer.ts"),m=O("./src/demux/adts.ts"),S=O("./src/utils/logger.ts"),H=O("./src/demux/id3.ts");function N(v,f){v.prototype=Object.create(f.prototype),v.prototype.constructor=v,e(v,f)}function e(v,f){return e=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},e(v,f)}var A=function(v){N(f,v);function f(a,r){var o;return o=v.call(this)||this,o.observer=void 0,o.config=void 0,o.observer=a,o.config=r,o}var l=f.prototype;return l.resetInitSegment=function(r,o,s){v.prototype.resetInitSegment.call(this,r,o,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:r,duration:s,inputTimeScale:9e4,dropped:0}},f.probe=function(r){if(!r)return!1;for(var o=H.getID3Data(r,0)||[],s=o.length,i=r.length;s<i;s++)if(m.probe(r,s))return S.logger.log("ADTS sync word found !"),!0;return!1},l.canParse=function(r,o){return m.canParse(r,o)},l.appendFrame=function(r,o,s){m.initTrackConfig(r,this.observer,o,s,r.manifestCodec);var i=m.appendFrame(r,o,s,this.initPTS,this.frameIndex);if(i&&i.missing===0)return i},f}(U.default);A.minProbeByteLength=9,k.default=A},"./src/demux/adts.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"getAudioConfig",function(){return H}),O.d(k,"isHeaderPattern",function(){return N}),O.d(k,"getHeaderLength",function(){return e}),O.d(k,"getFullFrameLength",function(){return A}),O.d(k,"canGetFrameLength",function(){return v}),O.d(k,"isHeader",function(){return f}),O.d(k,"canParse",function(){return l}),O.d(k,"probe",function(){return a}),O.d(k,"initTrackConfig",function(){return r}),O.d(k,"getFrameDuration",function(){return o}),O.d(k,"parseFrameHeader",function(){return s}),O.d(k,"appendFrame",function(){return i});var U=O("./src/utils/logger.ts"),m=O("./src/errors.ts"),S=O("./src/events.ts");function H(n,t,b,y){var g,E,_,u,c=navigator.userAgent.toLowerCase(),p=y,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];g=((t[b+2]&192)>>>6)+1;var x=(t[b+2]&60)>>>2;if(x>d.length-1){n.trigger(S.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+x});return}return _=(t[b+2]&1)<<2,_|=(t[b+3]&192)>>>6,U.logger.log("manifest codec:"+y+", ADTS type:"+g+", samplingIndex:"+x),/firefox/i.test(c)?x>=6?(g=5,u=new Array(4),E=x-3):(g=2,u=new Array(2),E=x):c.indexOf("android")!==-1?(g=2,u=new Array(2),E=x):(g=5,u=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&x>=6?E=x-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(x>=6&&_===1||/vivaldi/i.test(c))||!y&&_===1)&&(g=2,u=new Array(2)),E=x)),u[0]=g<<3,u[0]|=(x&14)>>1,u[1]|=(x&1)<<7,u[1]|=_<<3,g===5&&(u[1]|=(E&14)>>1,u[2]=(E&1)<<7,u[2]|=2<<2,u[3]=0),{config:u,samplerate:d[x],channelCount:_,codec:"mp4a.40."+g,manifestCodec:p}}function N(n,t){return n[t]===255&&(n[t+1]&246)===240}function e(n,t){return n[t+1]&1?7:9}function A(n,t){return(n[t+3]&3)<<11|n[t+4]<<3|(n[t+5]&224)>>>5}function v(n,t){return t+5<n.length}function f(n,t){return t+1<n.length&&N(n,t)}function l(n,t){return v(n,t)&&N(n,t)&&A(n,t)<=n.length-t}function a(n,t){if(f(n,t)){var b=e(n,t);if(t+b>=n.length)return!1;var y=A(n,t);if(y<=b)return!1;var g=t+y;return g===n.length||f(n,g)}return!1}function r(n,t,b,y,g){if(!n.samplerate){var E=H(t,b,y,g);if(!E)return;n.config=E.config,n.samplerate=E.samplerate,n.channelCount=E.channelCount,n.codec=E.codec,n.manifestCodec=E.manifestCodec,U.logger.log("parsed codec:"+n.codec+", rate:"+E.samplerate+", channels:"+E.channelCount)}}function o(n){return 1024*9e4/n}function s(n,t,b,y,g){var E=e(n,t),_=A(n,t);if(_-=E,_>0){var u=b+y*g;return{headerLength:E,frameLength:_,stamp:u}}}function i(n,t,b,y,g){var E=o(n.samplerate),_=s(t,b,y,g,E);if(_){var u=_.frameLength,c=_.headerLength,p=_.stamp,d=c+u,x=Math.max(0,b+d-t.length),h;x?(h=new Uint8Array(d-c),h.set(t.subarray(b+c,t.length),0)):h=t.subarray(b+c,b+d);var T={unit:h,pts:p};return x||n.samples.push(T),{sample:T,length:d,missing:x}}}},"./src/demux/base-audio-demuxer.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"initPTSFn",function(){return A});var U=O("./src/polyfills/number.ts"),m=O("./src/demux/id3.ts"),S=O("./src/demux/dummy-demuxed-track.ts"),H=O("./src/utils/mp4-tools.ts"),N=O("./src/utils/typed-array.ts"),e=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var f=v.prototype;return f.resetInitSegment=function(a,r,o){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},f.resetTimeStamp=function(){},f.resetContiguity=function(){},f.canParse=function(a,r){return!1},f.appendFrame=function(a,r,o){},f.demux=function(a,r){this.cachedData&&(a=Object(H.appendUint8Array)(this.cachedData,a),this.cachedData=null);var o=m.getID3Data(a,0),s=o?o.length:0,i,n,t=this._audioTrack,b=this._id3Track,y=o?m.getTimeStamp(o):void 0,g=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=A(y,r)),o&&o.length>0&&b.samples.push({pts:this.initPTS,dts:this.initPTS,data:o}),n=this.initPTS;s<g;){if(this.canParse(a,s)){var E=this.appendFrame(t,a,s);E?(this.frameIndex++,n=E.sample.pts,s+=E.length,i=s):s=g}else m.canParse(a,s)?(o=m.getID3Data(a,s),b.samples.push({pts:n,dts:n,data:o}),s+=o.length,i=s):s++;if(s===g&&i!==g){var _=Object(N.sliceUint8)(a,i);this.cachedData?this.cachedData=Object(H.appendUint8Array)(this.cachedData,_):this.cachedData=_}}return{audioTrack:t,avcTrack:Object(S.dummyTrack)(),id3Track:b,textTrack:Object(S.dummyTrack)()}},f.demuxSampleAes=function(a,r,o){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},f.flush=function(a){var r=this.cachedData;return r&&(this.cachedData=null,this.demux(r,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},f.destroy=function(){},v}(),A=function(f,l){return Object(U.isFiniteNumber)(f)?f*90:l*9e4};k.default=e},"./src/demux/chunk-cache.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return U});var U=function(){function S(){this.chunks=[],this.dataLength=0}var H=S.prototype;return H.push=function(e){this.chunks.push(e),this.dataLength+=e.length},H.flush=function(){var e=this.chunks,A=this.dataLength,v;if(e.length)e.length===1?v=e[0]:v=m(e,A);else return new Uint8Array(0);return this.reset(),v},H.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function m(S,H){for(var N=new Uint8Array(H),e=0,A=0;A<S.length;A++){var v=S[A];N.set(v,e),e+=v.length}return N}},"./src/demux/dummy-demuxed-track.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"dummyTrack",function(){return U});function U(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/utils/logger.ts"),m=function(){function S(N){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=N,this.bytesAvailable=N.byteLength,this.word=0,this.bitsAvailable=0}var H=S.prototype;return H.loadWord=function(){var e=this.data,A=this.bytesAvailable,v=e.byteLength-A,f=new Uint8Array(4),l=Math.min(4,A);if(l===0)throw new Error("no bytes available");f.set(e.subarray(v,v+l)),this.word=new DataView(f.buffer).getUint32(0),this.bitsAvailable=l*8,this.bytesAvailable-=l},H.skipBits=function(e){var A;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,A=e>>3,e-=A>>3,this.bytesAvailable-=A,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},H.readBits=function(e){var A=Math.min(this.bitsAvailable,e),v=this.word>>>32-A;return e>32&&U.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=A,this.bitsAvailable>0?this.word<<=A:this.bytesAvailable>0&&this.loadWord(),A=e-A,A>0&&this.bitsAvailable?v<<A|this.readBits(A):v},H.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},H.skipUEG=function(){this.skipBits(1+this.skipLZ())},H.skipEG=function(){this.skipBits(1+this.skipLZ())},H.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},H.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},H.readBoolean=function(){return this.readBits(1)===1},H.readUByte=function(){return this.readBits(8)},H.readUShort=function(){return this.readBits(16)},H.readUInt=function(){return this.readBits(32)},H.skipScalingList=function(e){for(var A=8,v=8,f,l=0;l<e;l++)v!==0&&(f=this.readEG(),v=(A+f+256)%256),A=v===0?A:v},H.readSPS=function(){var e=0,A=0,v=0,f=0,l,a,r,o=this.readUByte.bind(this),s=this.readBits.bind(this),i=this.readUEG.bind(this),n=this.readBoolean.bind(this),t=this.skipBits.bind(this),b=this.skipEG.bind(this),y=this.skipUEG.bind(this),g=this.skipScalingList.bind(this);o();var E=o();if(s(5),t(3),o(),y(),E===100||E===110||E===122||E===244||E===44||E===83||E===86||E===118||E===128){var _=i();if(_===3&&t(1),y(),y(),t(1),n())for(a=_!==3?8:12,r=0;r<a;r++)n()&&(r<6?g(16):g(64))}y();var u=i();if(u===0)i();else if(u===1)for(t(1),b(),b(),l=i(),r=0;r<l;r++)b();y(),t(1);var c=i(),p=i(),d=s(1);d===0&&t(1),t(1),n()&&(e=i(),A=i(),v=i(),f=i());var x=[1,1];if(n()&&n()){var h=o();switch(h){case 1:x=[1,1];break;case 2:x=[12,11];break;case 3:x=[10,11];break;case 4:x=[16,11];break;case 5:x=[40,33];break;case 6:x=[24,11];break;case 7:x=[20,11];break;case 8:x=[32,11];break;case 9:x=[80,33];break;case 10:x=[18,11];break;case 11:x=[15,11];break;case 12:x=[64,33];break;case 13:x=[160,99];break;case 14:x=[4,3];break;case 15:x=[3,2];break;case 16:x=[2,1];break;case 255:{x=[o()<<8|o(),o()<<8|o()];break}}}return{width:Math.ceil((c+1)*16-e*2-A*2),height:(2-d)*(p+1)*16-(d?2:4)*(v+f),pixelRatio:x}},H.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},S}();k.default=m},"./src/demux/id3.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"isHeader",function(){return U}),O.d(k,"isFooter",function(){return m}),O.d(k,"getID3Data",function(){return S}),O.d(k,"canParse",function(){return N}),O.d(k,"getTimeStamp",function(){return e}),O.d(k,"isTimeStampFrame",function(){return A}),O.d(k,"getID3Frames",function(){return f}),O.d(k,"decodeFrame",function(){return l}),O.d(k,"utf8ArrayToStr",function(){return i}),O.d(k,"testables",function(){return n});var U=function(g,E){return E+10<=g.length&&(g[E]===73&&g[E+1]===68&&g[E+2]===51&&(g[E+3]<255&&g[E+4]<255&&(g[E+6]<128&&g[E+7]<128&&g[E+8]<128&&g[E+9]<128)))},m=function(g,E){return E+10<=g.length&&(g[E]===51&&g[E+1]===68&&g[E+2]===73&&(g[E+3]<255&&g[E+4]<255&&(g[E+6]<128&&g[E+7]<128&&g[E+8]<128&&g[E+9]<128)))},S=function(g,E){for(var _=E,u=0;U(g,E);){u+=10;var c=H(g,E+6);u+=c,m(g,E+10)&&(u+=10),E+=u}return u>0?g.subarray(_,_+u):void 0},H=function(g,E){var _=0;return _=(g[E]&127)<<21,_|=(g[E+1]&127)<<14,_|=(g[E+2]&127)<<7,_|=g[E+3]&127,_},N=function(g,E){return U(g,E)&&H(g,E+6)+10<=g.length-E},e=function(g){for(var E=f(g),_=0;_<E.length;_++){var u=E[_];if(A(u))return s(u)}return},A=function(g){return g&&g.key==="PRIV"&&g.info==="com.apple.streaming.transportStreamTimestamp"},v=function(g){var E=String.fromCharCode(g[0],g[1],g[2],g[3]),_=H(g,4),u=10;return{type:E,size:_,data:g.subarray(u,u+_)}},f=function(g){for(var E=0,_=[];U(g,E);){var u=H(g,E+6);E+=10;for(var c=E+u;E+8<c;){var p=v(g.subarray(E)),d=l(p);d&&_.push(d),E+=p.size+10}m(g,E)&&(E+=10)}return _},l=function(g){return g.type==="PRIV"?a(g):g.type[0]==="W"?o(g):r(g)},a=function(g){if(g.size<2)return;var E=i(g.data,!0),_=new Uint8Array(g.data.subarray(E.length+1));return{key:g.type,info:E,data:_.buffer}},r=function(g){if(g.size<2)return;if(g.type==="TXXX"){var E=1,_=i(g.data.subarray(E),!0);E+=_.length+1;var u=i(g.data.subarray(E));return{key:g.type,info:_,data:u}}var c=i(g.data.subarray(1));return{key:g.type,data:c}},o=function(g){if(g.type==="WXXX"){if(g.size<2)return;var E=1,_=i(g.data.subarray(E),!0);E+=_.length+1;var u=i(g.data.subarray(E));return{key:g.type,info:_,data:u}}var c=i(g.data);return{key:g.type,data:c}},s=function(g){if(g.data.byteLength===8){var E=new Uint8Array(g.data),_=E[3]&1,u=(E[4]<<23)+(E[5]<<15)+(E[6]<<7)+E[7];return u/=45,_&&(u+=4772185884e-2),Math.round(u)}return},i=function(g,E){E===void 0&&(E=!1);var _=b();if(_){var u=_.decode(g);if(E){var c=u.indexOf("\0");return c!==-1?u.substring(0,c):u}return u.replace(/\0/g,"")}for(var p=g.length,d,x,h,T="",M=0;M<p;){if(d=g[M++],d===0&&E)return T;if(d===0||d===3)continue;switch(d>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:T+=String.fromCharCode(d);break;case 12:case 13:x=g[M++],T+=String.fromCharCode((d&31)<<6|x&63);break;case 14:x=g[M++],h=g[M++],T+=String.fromCharCode((d&15)<<12|(x&63)<<6|(h&63)<<0);break;default:}}return T},n={decodeTextFrame:r},t;function b(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/demux/base-audio-demuxer.ts"),m=O("./src/demux/id3.ts"),S=O("./src/utils/logger.ts"),H=O("./src/demux/mpegaudio.ts");function N(v,f){v.prototype=Object.create(f.prototype),v.prototype.constructor=v,e(v,f)}function e(v,f){return e=Object.setPrototypeOf||function(a,r){return a.__proto__=r,a},e(v,f)}var A=function(v){N(f,v);function f(){return v.apply(this,arguments)||this}var l=f.prototype;return l.resetInitSegment=function(r,o,s){v.prototype.resetInitSegment.call(this,r,o,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:r,duration:s,inputTimeScale:9e4,dropped:0}},f.probe=function(r){if(!r)return!1;for(var o=m.getID3Data(r,0)||[],s=o.length,i=r.length;s<i;s++)if(H.probe(r,s))return S.logger.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(r,o){return H.canParse(r,o)},l.appendFrame=function(r,o,s){return this.initPTS===null?void 0:H.appendFrame(r,o,s,this.initPTS,this.frameIndex)},f}(U.default);A.minProbeByteLength=4,k.default=A},"./src/demux/mp4demuxer.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/utils/mp4-tools.ts"),m=O("./src/demux/dummy-demuxed-track.ts"),S=function(){function H(e,A){this.remainderData=null,this.config=void 0,this.config=A}var N=H.prototype;return N.resetTimeStamp=function(){},N.resetInitSegment=function(){},N.resetContiguity=function(){},H.probe=function(A){return Object(U.findBox)({data:A,start:0,end:Math.min(A.length,16384)},["moof"]).length>0},N.demux=function(A){var v=A,f=Object(m.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(U.appendUint8Array)(this.remainderData,A));var l=Object(U.segmentValidRange)(v);this.remainderData=l.remainder,f.samples=l.valid||new Uint8Array}else f.samples=v;return{audioTrack:Object(m.dummyTrack)(),avcTrack:f,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},N.flush=function(){var A=Object(m.dummyTrack)();return A.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(m.dummyTrack)(),avcTrack:A,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},N.demuxSampleAes=function(A,v,f){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},N.destroy=function(){},H}();S.minProbeByteLength=1024,k.default=S},"./src/demux/mpegaudio.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"appendFrame",function(){return e}),O.d(k,"parseHeader",function(){return A}),O.d(k,"isHeaderPattern",function(){return v}),O.d(k,"isHeader",function(){return f}),O.d(k,"canParse",function(){return l}),O.d(k,"probe",function(){return a});var U=null,m=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],S=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],H=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],N=[0,1,1,4];function e(r,o,s,i,n){if(s+24>o.length)return;var t=A(o,s);if(t&&s+t.frameLength<=o.length){var b=t.samplesPerFrame*9e4/t.sampleRate,y=i+n*b,g={unit:o.subarray(s,s+t.frameLength),pts:y,dts:y};return r.config=[],r.channelCount=t.channelCount,r.samplerate=t.sampleRate,r.samples.push(g),{sample:g,length:t.frameLength,missing:0}}}function A(r,o){var s=r[o+1]>>3&3,i=r[o+1]>>1&3,n=r[o+2]>>4&15,t=r[o+2]>>2&3;if(s!==1&&n!==0&&n!==15&&t!==3){var b=r[o+2]>>1&1,y=r[o+3]>>6,g=s===3?3-i:i===3?3:4,E=m[g*14+n-1]*1e3,_=s===3?0:s===2?1:2,u=S[_*3+t],c=y===3?1:2,p=H[s][i],d=N[i],x=p*8*d,h=Math.floor(p*E/u+b)*d;if(U===null){var T=navigator.userAgent||"",M=T.match(/Chrome\/(\d+)/i);U=M?parseInt(M[1]):0}var D=!!U&&U<=87;return D&&i===2&&E>=224e3&&y===0&&(r[o+3]=r[o+3]|128),{sampleRate:u,channelCount:c,frameLength:h,samplesPerFrame:x}}}function v(r,o){return r[o]===255&&(r[o+1]&224)===224&&(r[o+1]&6)!==0}function f(r,o){return o+1<r.length&&v(r,o)}function l(r,o){var s=4;return v(r,o)&&s<=r.length-o}function a(r,o){if(o+1<r.length&&v(r,o)){var s=4,i=A(r,o),n=s;i!=null&&i.frameLength&&(n=i.frameLength);var t=o+n;return t===r.length||f(r,t)}return!1}},"./src/demux/sample-aes.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/crypt/decrypter.ts"),m=O("./src/demux/tsdemuxer.ts"),S=function(){function H(e,A,v){this.keyData=void 0,this.decrypter=void 0,this.keyData=v,this.decrypter=new U.default(e,A,{removePKCS7Padding:!1})}var N=H.prototype;return N.decryptBuffer=function(A,v){this.decrypter.decrypt(A,this.keyData.key.buffer,this.keyData.iv.buffer,v)},N.decryptAacSample=function(A,v,f,l){var a=A[v].unit,r=a.subarray(16,a.length-a.length%16),o=r.buffer.slice(r.byteOffset,r.byteOffset+r.length),s=this;this.decryptBuffer(o,function(i){var n=new Uint8Array(i);a.set(n,16),l||s.decryptAacSamples(A,v+1,f)})},N.decryptAacSamples=function(A,v,f){for(;;v++){if(v>=A.length){f();return}if(A[v].unit.length<32)continue;var l=this.decrypter.isSync();if(this.decryptAacSample(A,v,f,l),!l)return}},N.getAvcEncryptedData=function(A){for(var v=Math.floor((A.length-48)/160)*16+16,f=new Int8Array(v),l=0,a=32;a<=A.length-16;a+=160,l+=16)f.set(A.subarray(a,a+16),l);return f},N.getAvcDecryptedUnit=function(A,v){for(var f=new Uint8Array(v),l=0,a=32;a<=A.length-16;a+=160,l+=16)A.set(f.subarray(l,l+16),a);return A},N.decryptAvcSample=function(A,v,f,l,a,r){var o=Object(m.discardEPB)(a.data),s=this.getAvcEncryptedData(o),i=this;this.decryptBuffer(s.buffer,function(n){a.data=i.getAvcDecryptedUnit(o,n),r||i.decryptAvcSamples(A,v,f+1,l)})},N.decryptAvcSamples=function(A,v,f,l){if(A instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,f=0){if(v>=A.length){l();return}for(var a=A[v].units;!(f>=a.length);f++){var r=a[f];if(r.data.length<=48||r.type!==1&&r.type!==5)continue;var o=this.decrypter.isSync();if(this.decryptAvcSample(A,v,f,l,r,o),!o)return}}},H}();k.default=S},"./src/demux/transmuxer-interface.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return a});var U=O("./node_modules/webworkify-webpack/index.js"),m=O.n(U),S=O("./src/events.ts"),H=O("./src/demux/transmuxer.ts"),N=O("./src/utils/logger.ts"),e=O("./src/errors.ts"),A=O("./src/utils/mediasource-helper.ts"),v=O("./node_modules/eventemitter3/index.js"),f=O.n(v),l=Object(A.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function r(s,i,n,t){var b=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=s,this.id=i,this.onTransmuxComplete=n,this.onFlush=t;var y=s.config,g=function(p,d){d=d||{},d.frag=b.frag,d.id=b.id,s.trigger(p,d)};this.observer=new v.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,g),this.observer.on(S.Events.ERROR,g);var E={mp4:l.isTypeSupported("video/mp4"),mpeg:l.isTypeSupported("audio/mpeg"),mp3:l.isTypeSupported('audio/mp4; codecs="mp3"')},_=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){N.logger.log("demuxing in webworker");var u;try{u=this.worker=U("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),u.addEventListener("message",this.onwmsg),u.onerror=function(c){s.trigger(S.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(c.message+" ("+c.filename+":"+c.lineno+")")})},u.postMessage({cmd:"init",typeSupported:E,vendor:_,id:i,config:JSON.stringify(y)})}catch(c){N.logger.warn("Error in worker:",c),N.logger.error("Error while initializing DemuxerWorker, fallback to inline"),u&&self.URL.revokeObjectURL(u.objectURL),this.transmuxer=new H.default(this.observer,E,y,_,i),this.worker=null}}else this.transmuxer=new H.default(this.observer,E,y,_,i)}var o=r.prototype;return o.destroy=function(){var i=this.worker;if(i)i.removeEventListener("message",this.onwmsg),i.terminate(),this.worker=null;else{var n=this.transmuxer;n&&(n.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},o.push=function(i,n,t,b,y,g,E,_,u,c){var p=this;u.transmuxing.start=self.performance.now();var d=this.transmuxer,x=this.worker,h=g?g.start:y.start,T=y.decryptdata,M=this.frag,D=!(M&&y.cc===M.cc),w=!(M&&u.level===M.level),C=M?u.sn-M.sn:-1,j=this.part?u.part-this.part.index:1,L=!w&&(C===1||C===0&&j===1),z=self.performance.now();(w||C||y.stats.parsing.start===0)&&(y.stats.parsing.start=z),g&&(j||!L)&&(g.stats.parsing.start=z);var $=new H.TransmuxState(D,L,_,w,h);if(!L||D){N.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+`
|
|
discontinuity: `+D+`
|
|
trackSwitch: `+w+`
|
|
contiguous: `+L+`
|
|
accurateTimeOffset: `+_+`
|
|
timeOffset: `+h);var he=new H.TransmuxConfig(t,b,n,E,c);this.configureTransmuxer(he)}if(this.frag=y,this.part=g,x)x.postMessage({cmd:"demux",data:i,decryptdata:T,chunkMeta:u,state:$},i instanceof ArrayBuffer?[i]:[]);else if(d){var fe=d.push(i,T,u,$);Object(H.isPromise)(fe)?fe.then(function(Ie){p.handleTransmuxComplete(Ie)}):this.handleTransmuxComplete(fe)}},o.flush=function(i){var n=this;i.transmuxing.start=self.performance.now();var t=this.transmuxer,b=this.worker;if(b)b.postMessage({cmd:"flush",chunkMeta:i});else if(t){var y=t.flush(i);Object(H.isPromise)(y)?y.then(function(g){n.handleFlushResult(g,i)}):this.handleFlushResult(y,i)}},o.handleFlushResult=function(i,n){var t=this;i.forEach(function(b){t.handleTransmuxComplete(b)}),this.onFlush(n)},o.onWorkerMessage=function(i){var n=i.data,t=this.hls;switch(n.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(n.data);break}case"flush":{this.onFlush(n.data);break}default:{n.data=n.data||{},n.data.frag=this.frag,n.data.id=this.id,t.trigger(n.event,n.data);break}}},o.configureTransmuxer=function(i){var n=this.worker,t=this.transmuxer;n?n.postMessage({cmd:"configure",config:i}):t&&t.configure(i)},o.handleTransmuxComplete=function(i){i.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(i)},r}()},"./src/demux/transmuxer-worker.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return e});var U=O("./src/demux/transmuxer.ts"),m=O("./src/events.ts"),S=O("./src/utils/logger.ts"),H=O("./node_modules/eventemitter3/index.js"),N=O.n(H);function e(a){var r=new H.EventEmitter,o=function(i,n){a.postMessage({event:i,data:n})};r.on(m.Events.FRAG_DECRYPTED,o),r.on(m.Events.ERROR,o),a.addEventListener("message",function(s){var i=s.data;switch(i.cmd){case"init":{var n=JSON.parse(i.config);a.transmuxer=new U.default(r,i.typeSupported,n,i.vendor,i.id),Object(S.enableLogs)(n.debug),o("init",null);break}case"configure":{a.transmuxer.configure(i.config);break}case"demux":{var t=a.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Object(U.isPromise)(t)?t.then(function(g){A(a,g)}):A(a,t);break}case"flush":{var b=i.chunkMeta,y=a.transmuxer.flush(b);Object(U.isPromise)(y)?y.then(function(g){f(a,g,b)}):f(a,y,b);break}default:break}})}function A(a,r){if(l(r.remuxResult))return;var o=[],s=r.remuxResult,i=s.audio,n=s.video;i&&v(o,i),n&&v(o,n),a.postMessage({event:"transmuxComplete",data:r},o)}function v(a,r){r.data1&&a.push(r.data1.buffer),r.data2&&a.push(r.data2.buffer)}function f(a,r,o){r.forEach(function(s){A(a,s)}),a.postMessage({event:"flush",data:o})}function l(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return n}),O.d(k,"isPromise",function(){return y}),O.d(k,"TransmuxConfig",function(){return g}),O.d(k,"TransmuxState",function(){return E});var U=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/crypt/decrypter.ts"),H=O("./src/demux/aacdemuxer.ts"),N=O("./src/demux/mp4demuxer.ts"),e=O("./src/demux/tsdemuxer.ts"),A=O("./src/demux/mp3demuxer.ts"),v=O("./src/remux/mp4-remuxer.ts"),f=O("./src/remux/passthrough-remuxer.ts"),l=O("./src/demux/chunk-cache.ts"),a=O("./src/utils/mp4-tools.ts"),r=O("./src/utils/logger.ts"),o;try{o=self.performance.now.bind(self.performance)}catch(_){r.logger.debug("Unable to use Performance API on this environment"),o=self.Date.now}var s=[{demux:e.default,remux:v.default},{demux:N.default,remux:f.default},{demux:H.default,remux:v.default},{demux:A.default,remux:v.default}],i=1024;s.forEach(function(_){var u=_.demux;i=Math.max(i,u.minProbeByteLength)});var n=function(){function _(c,p,d,x,h){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new l.default,this.observer=c,this.typeSupported=p,this.config=d,this.vendor=x,this.id=h}var u=_.prototype;return u.configure=function(p){this.transmuxConfig=p,this.decrypter&&this.decrypter.reset()},u.push=function(p,d,x,h){var T=this,M=x.transmuxing;M.executeStart=o();var D=new Uint8Array(p),w=this.cache,C=this.config,j=this.currentTransmuxState,L=this.transmuxConfig;h&&(this.currentTransmuxState=h);var z=t(D,d);if(z&&z.method==="AES-128"){var $=this.getDecrypter();if(C.enableSoftwareAES){var he=$.softwareDecrypt(D,z.key.buffer,z.iv.buffer);if(!he)return M.executeEnd=o(),b(x);D=new Uint8Array(he)}else return this.decryptionPromise=$.webCryptoDecrypt(D,z.key.buffer,z.iv.buffer).then(function(Ae){var Ne=T.push(Ae,null,x);return T.decryptionPromise=null,Ne}),this.decryptionPromise}var fe=h||j,Ie=fe.contiguous,Se=fe.discontinuity,pe=fe.trackSwitch,Ce=fe.accurateTimeOffset,Me=fe.timeOffset,ge=L.audioCodec,B=L.videoCodec,R=L.defaultInitPts,I=L.duration,W=L.initSegmentData;if((Se||pe)&&this.resetInitSegment(W,ge,B,I),Se&&this.resetInitialTimestamp(R),Ie||this.resetContiguity(),this.needsProbing(D,Se,pe)){if(w.dataLength){var Y=w.flush();D=Object(a.appendUint8Array)(Y,D)}this.configureTransmuxer(D,L)}var F=this.transmux(D,z,Me,Ce,x),le=this.currentTransmuxState;return le.contiguous=!0,le.discontinuity=!1,le.trackSwitch=!1,M.executeEnd=o(),F},u.flush=function(p){var d=this,x=p.transmuxing;x.executeStart=o();var h=this.decrypter,T=this.cache,M=this.currentTransmuxState,D=this.decryptionPromise;if(D)return D.then(function(){return d.flush(p)});var w=[],C=M.timeOffset;if(h){var j=h.flush();j&&w.push(this.push(j,null,p))}var L=T.dataLength;T.reset();var z=this.demuxer,$=this.remuxer;if(!z||!$)return L>=i&&this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),x.executeEnd=o(),[b(p)];var he=z.flush(C);return y(he)?he.then(function(fe){return d.flushRemux(w,fe,p),w}):(this.flushRemux(w,he,p),w)},u.flushRemux=function(p,d,x){var h=d.audioTrack,T=d.avcTrack,M=d.id3Track,D=d.textTrack,w=this.currentTransmuxState,C=w.accurateTimeOffset,j=w.timeOffset;r.logger.log("[transmuxer.ts]: Flushed fragment "+x.sn+(x.part>-1?" p: "+x.part:"")+" of level "+x.level);var L=this.remuxer.remux(h,T,M,D,j,C,!0,this.id);p.push({remuxResult:L,chunkMeta:x}),x.transmuxing.executeEnd=o()},u.resetInitialTimestamp=function(p){var d=this.demuxer,x=this.remuxer;if(!d||!x)return;d.resetTimeStamp(p),x.resetTimeStamp(p)},u.resetContiguity=function(){var p=this.demuxer,d=this.remuxer;if(!p||!d)return;p.resetContiguity(),d.resetNextTimestamp()},u.resetInitSegment=function(p,d,x,h){var T=this.demuxer,M=this.remuxer;if(!T||!M)return;T.resetInitSegment(d,x,h),M.resetInitSegment(p,d,x)},u.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},u.transmux=function(p,d,x,h,T){var M;return d&&d.method==="SAMPLE-AES"?M=this.transmuxSampleAes(p,d,x,h,T):M=this.transmuxUnencrypted(p,x,h,T),M},u.transmuxUnencrypted=function(p,d,x,h){var T=this.demuxer.demux(p,d,!1,!this.config.progressive),M=T.audioTrack,D=T.avcTrack,w=T.id3Track,C=T.textTrack,j=this.remuxer.remux(M,D,w,C,d,x,!1,this.id);return{remuxResult:j,chunkMeta:h}},u.transmuxSampleAes=function(p,d,x,h,T){var M=this;return this.demuxer.demuxSampleAes(p,d,x).then(function(D){var w=M.remuxer.remux(D.audioTrack,D.avcTrack,D.id3Track,D.textTrack,x,h,!1,M.id);return{remuxResult:w,chunkMeta:T}})},u.configureTransmuxer=function(p,d){for(var x=this.config,h=this.observer,T=this.typeSupported,M=this.vendor,D=d.audioCodec,w=d.defaultInitPts,C=d.duration,j=d.initSegmentData,L=d.videoCodec,z,$=0,he=s.length;$<he;$++)if(s[$].demux.probe(p)){z=s[$];break}z||(r.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),z={demux:N.default,remux:f.default});var fe=this.demuxer,Ie=this.remuxer,Se=z.remux,pe=z.demux;(!Ie||!(Ie instanceof Se))&&(this.remuxer=new Se(h,x,T,M)),(!fe||!(fe instanceof pe))&&(this.demuxer=new pe(h,x,T),this.probe=pe.probe),this.resetInitSegment(j,D,L,C),this.resetInitialTimestamp(w)},u.needsProbing=function(p,d,x){return!this.demuxer||!this.remuxer||d||x},u.getDecrypter=function(){var p=this.decrypter;return p||(p=this.decrypter=new S.default(this.observer,this.config)),p},_}();function t(_,u){var c=null;return _.byteLength>0&&u!=null&&u.key!=null&&u.iv!==null&&u.method!=null&&(c=u),c}var b=function(u){return{remuxResult:{},chunkMeta:u}};function y(_){return"then"in _&&_.then instanceof Function}var g=function(u,c,p,d,x){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=u,this.videoCodec=c,this.initSegmentData=p,this.duration=d,this.defaultInitPts=x},E=function(u,c,p,d,x){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=u,this.contiguous=c,this.accurateTimeOffset=p,this.trackSwitch=d,this.timeOffset=x}},"./src/demux/tsdemuxer.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"discardEPB",function(){return b});var U=O("./src/demux/adts.ts"),m=O("./src/demux/mpegaudio.ts"),S=O("./src/demux/exp-golomb.ts"),H=O("./src/demux/id3.ts"),N=O("./src/demux/sample-aes.ts"),e=O("./src/events.ts"),A=O("./src/utils/mp4-tools.ts"),v=O("./src/utils/logger.ts"),f=O("./src/errors.ts"),l={video:1,audio:2,id3:3,text:4},a=function(){function y(E,_,u){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=E,this.config=_,this.typeSupported=u}y.probe=function(_){var u=y.syncOffset(_);return u<0?!1:(u&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+u+", junk ahead ?"),!0)},y.syncOffset=function(_){for(var u=Math.min(1e3,_.length-3*188),c=0;c<u;){if(_[c]===71&&_[c+188]===71&&_[c+2*188]===71)return c;c++}return-1},y.createTrack=function(_,u){return{container:_==="video"||_==="audio"?"video/mp2t":void 0,type:_,id:l[_],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:_==="audio"?u:void 0}};var g=y.prototype;return g.resetInitSegment=function(_,u,c){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=y.createTrack("video",c),this._audioTrack=y.createTrack("audio",c),this._id3Track=y.createTrack("id3",c),this._txtTrack=y.createTrack("text",c),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=_,this.videoCodec=u,this._duration=c},g.resetTimeStamp=function(){},g.resetContiguity=function(){var _=this._audioTrack,u=this._avcTrack,c=this._id3Track;_&&(_.pesData=null),u&&(u.pesData=null),c&&(c.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},g.demux=function(_,u,c,p){c===void 0&&(c=!1),p===void 0&&(p=!1),c||(this.sampleAes=null);var d,x=this._avcTrack,h=this._audioTrack,T=this._id3Track,M=x.pid,D=x.pesData,w=h.pid,C=T.pid,j=h.pesData,L=T.pesData,z=!1,$=this.pmtParsed,he=this._pmtId,fe=_.length;if(this.remainderData&&(_=Object(A.appendUint8Array)(this.remainderData,_),fe=_.length,this.remainderData=null),fe<188&&!p)return this.remainderData=_,{audioTrack:h,avcTrack:x,id3Track:T,textTrack:this._txtTrack};var Ie=Math.max(0,y.syncOffset(_));fe-=(fe+Ie)%188,fe<_.byteLength&&!p&&(this.remainderData=new Uint8Array(_.buffer,fe,_.buffer.byteLength-fe));for(var Se=Ie;Se<fe;Se+=188)if(_[Se]===71){var pe=!!(_[Se+1]&64),Ce=((_[Se+1]&31)<<8)+_[Se+2],Me=(_[Se+3]&48)>>4,ge=void 0;if(Me>1){if(ge=Se+5+_[Se+4],ge===Se+188)continue}else ge=Se+4;switch(Ce){case M:pe&&(D&&(d=i(D))&&this.parseAVCPES(d,!1),D={data:[],size:0}),D&&(D.data.push(_.subarray(ge,Se+188)),D.size+=Se+188-ge);break;case w:pe&&(j&&(d=i(j))&&(h.isAAC?this.parseAACPES(d):this.parseMPEGPES(d)),j={data:[],size:0}),j&&(j.data.push(_.subarray(ge,Se+188)),j.size+=Se+188-ge);break;case C:pe&&(L&&(d=i(L))&&this.parseID3PES(d),L={data:[],size:0}),L&&(L.data.push(_.subarray(ge,Se+188)),L.size+=Se+188-ge);break;case 0:pe&&(ge+=_[ge]+1),he=this._pmtId=o(_,ge);break;case he:{pe&&(ge+=_[ge]+1);var B=s(_,ge,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,c);M=B.avc,M>0&&(x.pid=M),w=B.audio,w>0&&(h.pid=w,h.isAAC=B.isAAC),C=B.id3,C>0&&(T.pid=C),z&&!$&&(v.logger.log("reparse from beginning"),z=!1,Se=Ie-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:z=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});x.pesData=D,h.pesData=j,T.pesData=L;var R={audioTrack:h,avcTrack:x,id3Track:T,textTrack:this._txtTrack};return p&&this.extractRemainingSamples(R),R},g.flush=function(){var _=this.remainderData;this.remainderData=null;var u;return _?u=this.demux(_,-1,!1,!0):u={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(u),this.sampleAes?this.decrypt(u,this.sampleAes):u},g.extractRemainingSamples=function(_){var u=_.audioTrack,c=_.avcTrack,p=_.id3Track,d=c.pesData,x=u.pesData,h=p.pesData,T;d&&(T=i(d))?(this.parseAVCPES(T,!0),c.pesData=null):c.pesData=d,x&&(T=i(x))?(u.isAAC?this.parseAACPES(T):this.parseMPEGPES(T),u.pesData=null):(x!=null&&x.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),u.pesData=x),h&&(T=i(h))?(this.parseID3PES(T),p.pesData=null):p.pesData=h},g.demuxSampleAes=function(_,u,c){var p=this.demux(_,c,!0,!this.config.progressive),d=this.sampleAes=new N.default(this.observer,this.config,u);return this.decrypt(p,d)},g.decrypt=function(_,u){return new Promise(function(c){var p=_.audioTrack,d=_.avcTrack;p.samples&&p.isAAC?u.decryptAacSamples(p.samples,0,function(){d.samples?u.decryptAvcSamples(d.samples,0,0,function(){c(_)}):c(_)}):d.samples&&u.decryptAvcSamples(d.samples,0,0,function(){c(_)})})},g.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},g.parseAVCPES=function(_,u){var c=this,p=this._avcTrack,d=this.parseAVCNALu(_.data),x=!1,h=this.avcSample,T,M=!1;_.data=null,h&&d.length&&!p.audFound&&(n(h,p),h=this.avcSample=r(!1,_.pts,_.dts,"")),d.forEach(function(D){switch(D.type){case 1:{T=!0,h||(h=c.avcSample=r(!0,_.pts,_.dts,"")),x&&(h.debug+="NDR "),h.frame=!0;var w=D.data;if(M&&w.length>4){var C=new S.default(w).readSliceType();(C===2||C===4||C===7||C===9)&&(h.key=!0)}break}case 5:T=!0,h||(h=c.avcSample=r(!0,_.pts,_.dts,"")),x&&(h.debug+="IDR "),h.key=!0,h.frame=!0;break;case 6:{T=!0,x&&h&&(h.debug+="SEI ");var j=new S.default(b(D.data));j.readUByte();for(var L=0,z=0,$=!1,he=0;!$&&j.bytesAvailable>1;){L=0;do he=j.readUByte(),L+=he;while(he===255);z=0;do he=j.readUByte(),z+=he;while(he===255);if(L===4&&j.bytesAvailable!==0){$=!0;var fe=j.readUByte();if(fe===181){var Ie=j.readUShort();if(Ie===49){var Se=j.readUInt();if(Se===1195456820){var pe=j.readUByte();if(pe===3){for(var Ce=j.readUByte(),Me=j.readUByte(),ge=31&Ce,B=[Ce,Me],R=0;R<ge;R++)B.push(j.readUByte()),B.push(j.readUByte()),B.push(j.readUByte());t(c._txtTrack.samples,{type:3,pts:_.pts,bytes:B})}}}}}else if(L===5&&j.bytesAvailable!==0){if($=!0,z>16){for(var I=[],W=0;W<16;W++)I.push(j.readUByte().toString(16)),(W===3||W===5||W===7||W===9)&&I.push("-");for(var Y=z-16,F=new Uint8Array(Y),le=0;le<Y;le++)F[le]=j.readUByte();t(c._txtTrack.samples,{pts:_.pts,payloadType:L,uuid:I.join(""),userData:Object(H.utf8ArrayToStr)(F),userDataBytes:F})}}else if(z<j.bytesAvailable)for(var Ae=0;Ae<z;Ae++)j.readUByte()}break}case 7:if(T=!0,M=!0,x&&h&&(h.debug+="SPS "),!p.sps){var Ne=new S.default(D.data),ie=Ne.readSPS();p.width=ie.width,p.height=ie.height,p.pixelRatio=ie.pixelRatio,p.sps=[D.data],p.duration=c._duration;for(var de=D.data.subarray(1,4),we="avc1.",De=0;De<3;De++){var Ke=de[De].toString(16);Ke.length<2&&(Ke="0"+Ke),we+=Ke}p.codec=we}break;case 8:T=!0,x&&h&&(h.debug+="PPS "),p.pps||(p.pps=[D.data]);break;case 9:T=!1,p.audFound=!0,h&&n(h,p),h=c.avcSample=r(!1,_.pts,_.dts,x?"AUD ":"");break;case 12:T=!1;break;default:T=!1,h&&(h.debug+="unknown NAL "+D.type+" ");break}if(h&&T){var Je=h.units;Je.push(D)}}),u&&h&&(n(h,p),this.avcSample=null)},g.getLastNalUnit=function(){var _,u=this.avcSample,c;if(!u||u.units.length===0){var p=this._avcTrack.samples;u=p[p.length-1]}if((_=u)!==null&&_!==void 0&&_.units){var d=u.units;c=d[d.length-1]}return c},g.parseAVCNALu=function(_){var u=_.byteLength,c=this._avcTrack,p=c.naluState||0,d=p,x=[],h=0,T,M,D,w=-1,C=0;for(p===-1&&(w=0,C=_[0]&31,p=0,h=1);h<u;){if(T=_[h++],!p){p=T?0:1;continue}if(p===1){p=T?0:2;continue}if(!T)p=3;else if(T===1){if(w>=0){var j={data:_.subarray(w,h-p-1),type:C};x.push(j)}else{var L=this.getLastNalUnit();if(L&&(d&&h<=4-d&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-d))),M=h-p-1,M>0)){var z=new Uint8Array(L.data.byteLength+M);z.set(L.data,0),z.set(_.subarray(0,M),L.data.byteLength),L.data=z,L.state=0}}h<u?(D=_[h]&31,w=h,C=D,p=0):p=-1}else p=0}if(w>=0&&p>=0){var $={data:_.subarray(w,u),type:C,state:p};x.push($)}if(x.length===0){var he=this.getLastNalUnit();if(he){var fe=new Uint8Array(he.data.byteLength+_.byteLength);fe.set(he.data,0),fe.set(_,he.data.byteLength),he.data=fe}}return c.naluState=p,x},g.parseAACPES=function(_){var u=0,c=this._audioTrack,p=this.aacOverFlow,d=_.data;if(p){this.aacOverFlow=null;var x=p.sample.unit.byteLength,h=Math.min(p.missing,x),T=x-h;p.sample.unit.set(d.subarray(0,h),T),c.samples.push(p.sample),u=p.missing}var M,D;for(M=u,D=d.length;M<D-1&&!U.isHeader(d,M);M++);if(M!==u){var w,C;if(M<D-1?(w="AAC PES did not start with ADTS header,offset:"+M,C=!1):(w="no ADTS header found in AAC PES",C=!0),v.logger.warn("parsing error:"+w),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:C,reason:w}),C)return}U.initTrackConfig(c,this.observer,d,M,this.audioCodec);var j;if(_.pts!==void 0)j=_.pts;else if(p){var L=U.getFrameDuration(c.samplerate);j=p.sample.pts+L}else{v.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var z=0;M<D;)if(U.isHeader(d,M)){if(M+5<D){var $=U.appendFrame(c,d,M,j,z);if($)if($.missing)this.aacOverFlow=$;else{M+=$.length,z++;continue}}break}else M++},g.parseMPEGPES=function(_){var u=_.data,c=u.length,p=0,d=0,x=_.pts;if(x===void 0){v.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;d<c;)if(m.isHeader(u,d)){var h=m.appendFrame(this._audioTrack,u,d,x,p);if(h)d+=h.length,p++;else break}else d++},g.parseID3PES=function(_){if(_.pts===void 0){v.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(_)},y}();a.minProbeByteLength=188;function r(y,g,E,_){return{key:y,frame:!1,pts:g,dts:E,units:[],debug:_,length:0}}function o(y,g){return(y[g+10]&31)<<8|y[g+11]}function s(y,g,E,_){var u={audio:-1,avc:-1,id3:-1,isAAC:!0},c=(y[g+1]&15)<<8|y[g+2],p=g+3+c-4,d=(y[g+10]&15)<<8|y[g+11];for(g+=12+d;g<p;){var x=(y[g+1]&31)<<8|y[g+2];switch(y[g]){case 207:if(!_){v.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:u.audio===-1&&(u.audio=x);break;case 21:u.id3===-1&&(u.id3=x);break;case 219:if(!_){v.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:u.avc===-1&&(u.avc=x);break;case 3:case 4:E?u.audio===-1&&(u.audio=x,u.isAAC=!1):v.logger.log("MPEG audio found, not supported in this browser");break;case 36:v.logger.warn("Unsupported HEVC stream type found");break;default:break}g+=((y[g+3]&15)<<8|y[g+4])+5}return u}function i(y){var g=0,E,_,u,c,p,d=y.data;if(!y||y.size===0)return null;for(;d[0].length<19&&d.length>1;){var x=new Uint8Array(d[0].length+d[1].length);x.set(d[0]),x.set(d[1],d[0].length),d[0]=x,d.splice(1,1)}E=d[0];var h=(E[0]<<16)+(E[1]<<8)+E[2];if(h===1){if(_=(E[4]<<8)+E[5],_&&_>y.size-6)return null;var T=E[7];T&192&&(c=(E[9]&14)*536870912+(E[10]&255)*4194304+(E[11]&254)*16384+(E[12]&255)*128+(E[13]&254)/2,T&64?(p=(E[14]&14)*536870912+(E[15]&255)*4194304+(E[16]&254)*16384+(E[17]&255)*128+(E[18]&254)/2,c-p>60*9e4&&(v.logger.warn(Math.round((c-p)/9e4)+"s delta between PTS and DTS, align them"),c=p)):p=c),u=E[8];var M=u+9;if(y.size<=M)return null;y.size-=M;for(var D=new Uint8Array(y.size),w=0,C=d.length;w<C;w++){E=d[w];var j=E.byteLength;if(M)if(M>j){M-=j;continue}else E=E.subarray(M),j-=M,M=0;D.set(E,g),g+=j}return _&&(_-=u+3),{data:D,pts:c,dts:p,len:_}}return null}function n(y,g){if(y.units.length&&y.frame){if(y.pts===void 0){var E=g.samples,_=E.length;if(_){var u=E[_-1];y.pts=u.pts,y.dts=u.dts}else{g.dropped++;return}}g.samples.push(y)}y.debug.length&&v.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function t(y,g){var E=y.length;if(E>0){if(g.pts>=y[E-1].pts)y.push(g);else for(var _=E-1;_>=0;_--)if(g.pts<y[_].pts){y.splice(_,0,g);break}}else y.push(g)}function b(y){for(var g=y.byteLength,E=[],_=1;_<g-2;)y[_]===0&&y[_+1]===0&&y[_+2]===3?(E.push(_+2),_+=2):_++;if(E.length===0)return y;var u=g-E.length,c=new Uint8Array(u),p=0;for(_=0;_<u;p++,_++)p===E[0]&&(p++,E.shift()),c[_]=y[p];return c}k.default=a},"./src/errors.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"ErrorTypes",function(){return U}),O.d(k,"ErrorDetails",function(){return m});var U;(function(S){S.NETWORK_ERROR="networkError",S.MEDIA_ERROR="mediaError",S.KEY_SYSTEM_ERROR="keySystemError",S.MUX_ERROR="muxError",S.OTHER_ERROR="otherError"})(U||(U={}));var m;(function(S){S.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",S.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",S.KEY_SYSTEM_NO_SESSION="keySystemNoSession",S.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",S.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",S.MANIFEST_LOAD_ERROR="manifestLoadError",S.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",S.MANIFEST_PARSING_ERROR="manifestParsingError",S.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",S.LEVEL_EMPTY_ERROR="levelEmptyError",S.LEVEL_LOAD_ERROR="levelLoadError",S.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",S.LEVEL_SWITCH_ERROR="levelSwitchError",S.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",S.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",S.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",S.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",S.FRAG_LOAD_ERROR="fragLoadError",S.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",S.FRAG_DECRYPT_ERROR="fragDecryptError",S.FRAG_PARSING_ERROR="fragParsingError",S.REMUX_ALLOC_ERROR="remuxAllocError",S.KEY_LOAD_ERROR="keyLoadError",S.KEY_LOAD_TIMEOUT="keyLoadTimeOut",S.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",S.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",S.BUFFER_APPEND_ERROR="bufferAppendError",S.BUFFER_APPENDING_ERROR="bufferAppendingError",S.BUFFER_STALLED_ERROR="bufferStalledError",S.BUFFER_FULL_ERROR="bufferFullError",S.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",S.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",S.INTERNAL_EXCEPTION="internalException",S.INTERNAL_ABORTED="aborted",S.UNKNOWN="unknown"})(m||(m={}))},"./src/events.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"Events",function(){return U});var U;(function(m){m.MEDIA_ATTACHING="hlsMediaAttaching",m.MEDIA_ATTACHED="hlsMediaAttached",m.MEDIA_DETACHING="hlsMediaDetaching",m.MEDIA_DETACHED="hlsMediaDetached",m.BUFFER_RESET="hlsBufferReset",m.BUFFER_CODECS="hlsBufferCodecs",m.BUFFER_CREATED="hlsBufferCreated",m.BUFFER_APPENDING="hlsBufferAppending",m.BUFFER_APPENDED="hlsBufferAppended",m.BUFFER_EOS="hlsBufferEos",m.BUFFER_FLUSHING="hlsBufferFlushing",m.BUFFER_FLUSHED="hlsBufferFlushed",m.MANIFEST_LOADING="hlsManifestLoading",m.MANIFEST_LOADED="hlsManifestLoaded",m.MANIFEST_PARSED="hlsManifestParsed",m.LEVEL_SWITCHING="hlsLevelSwitching",m.LEVEL_SWITCHED="hlsLevelSwitched",m.LEVEL_LOADING="hlsLevelLoading",m.LEVEL_LOADED="hlsLevelLoaded",m.LEVEL_UPDATED="hlsLevelUpdated",m.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",m.LEVELS_UPDATED="hlsLevelsUpdated",m.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",m.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",m.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",m.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",m.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",m.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",m.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",m.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",m.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",m.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",m.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",m.CUES_PARSED="hlsCuesParsed",m.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",m.INIT_PTS_FOUND="hlsInitPtsFound",m.FRAG_LOADING="hlsFragLoading",m.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",m.FRAG_LOADED="hlsFragLoaded",m.FRAG_DECRYPTED="hlsFragDecrypted",m.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",m.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",m.FRAG_PARSING_METADATA="hlsFragParsingMetadata",m.FRAG_PARSED="hlsFragParsed",m.FRAG_BUFFERED="hlsFragBuffered",m.FRAG_CHANGED="hlsFragChanged",m.FPS_DROP="hlsFpsDrop",m.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",m.ERROR="hlsError",m.DESTROYING="hlsDestroying",m.KEY_LOADING="hlsKeyLoading",m.KEY_LOADED="hlsKeyLoaded",m.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",m.BACK_BUFFER_REACHED="hlsBackBufferReached"})(U||(U={}))},"./src/hls.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return y});var U=O("./node_modules/url-toolkit/src/url-toolkit.js"),m=O.n(U),S=O("./src/loader/playlist-loader.ts"),H=O("./src/loader/key-loader.ts"),N=O("./src/controller/id3-track-controller.ts"),e=O("./src/controller/latency-controller.ts"),A=O("./src/controller/level-controller.ts"),v=O("./src/controller/fragment-tracker.ts"),f=O("./src/controller/stream-controller.ts"),l=O("./src/is-supported.ts"),a=O("./src/utils/logger.ts"),r=O("./src/config.ts"),o=O("./node_modules/eventemitter3/index.js"),s=O.n(o),i=O("./src/events.ts"),n=O("./src/errors.ts");function t(g,E){for(var _=0;_<E.length;_++){var u=E[_];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(g,u.key,u)}}function b(g,E,_){return E&&t(g.prototype,E),_&&t(g,_),g}var y=function(){g.isSupported=function(){return Object(l.isSupported)()};function g(_){_===void 0&&(_={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new o.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var u=this.config=Object(r.mergeConfig)(g.DefaultConfig,_);this.userConfig=_,Object(a.enableLogs)(u.debug),this._autoLevelCapping=-1,u.progressive&&Object(r.enableStreamingMode)(u);var c=u.abrController,p=u.bufferController,d=u.capLevelController,x=u.fpsController,h=this.abrController=new c(this),T=this.bufferController=new p(this),M=this.capLevelController=new d(this),D=new x(this),w=new S.default(this),C=new H.default(this),j=new N.default(this),L=this.levelController=new A.default(this),z=new v.FragmentTracker(this),$=this.streamController=new f.default(this,z);M.setStreamController($),D.setStreamController($);var he=[L,$];this.networkControllers=he;var fe=[w,C,h,T,M,D,j,z];this.audioTrackController=this.createController(u.audioTrackController,null,he),this.createController(u.audioStreamController,z,he),this.subtitleTrackController=this.createController(u.subtitleTrackController,null,he),this.createController(u.subtitleStreamController,z,he),this.createController(u.timelineController,null,fe),this.emeController=this.createController(u.emeController,null,fe),this.cmcdController=this.createController(u.cmcdController,null,fe),this.latencyController=this.createController(e.default,null,fe),this.coreComponents=fe}var E=g.prototype;return E.createController=function(u,c,p){if(u){var d=c?new u(this,c):new u(this);return p&&p.push(d),d}return null},E.on=function(u,c,p){p===void 0&&(p=this),this._emitter.on(u,c,p)},E.once=function(u,c,p){p===void 0&&(p=this),this._emitter.once(u,c,p)},E.removeAllListeners=function(u){this._emitter.removeAllListeners(u)},E.off=function(u,c,p,d){p===void 0&&(p=this),this._emitter.off(u,c,p,d)},E.listeners=function(u){return this._emitter.listeners(u)},E.emit=function(u,c,p){return this._emitter.emit(u,c,p)},E.trigger=function(u,c){if(this.config.debug)return this.emit(u,u,c);try{return this.emit(u,u,c)}catch(p){a.logger.error("An internal error happened while handling event "+u+'. Error message: "'+p.message+'". Here is a stacktrace:',p),this.trigger(i.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:u,error:p})}return!1},E.listenerCount=function(u){return this._emitter.listenerCount(u)},E.destroy=function(){a.logger.log("destroy"),this.trigger(i.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(u){return u.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(u){return u.destroy()}),this.coreComponents.length=0},E.attachMedia=function(u){a.logger.log("attachMedia"),this._media=u,this.trigger(i.Events.MEDIA_ATTACHING,{media:u})},E.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(i.Events.MEDIA_DETACHING,void 0),this._media=null},E.loadSource=function(u){this.stopLoad();var c=this.media,p=this.url,d=this.url=U.buildAbsoluteURL(self.location.href,u,{alwaysNormalize:!0});a.logger.log("loadSource:"+d),c&&p&&p!==d&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(c)),this.trigger(i.Events.MANIFEST_LOADING,{url:u})},E.startLoad=function(u){u===void 0&&(u=-1),a.logger.log("startLoad("+u+")"),this.networkControllers.forEach(function(c){c.startLoad(u)})},E.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(u){u.stopLoad()})},E.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},E.recoverMediaError=function(){a.logger.log("recoverMediaError");var u=this._media;this.detachMedia(),u&&this.attachMedia(u)},E.removeLevel=function(u,c){c===void 0&&(c=0),this.levelController.removeLevel(u,c)},b(g,[{key:"levels",get:function(){var u=this.levelController.levels;return u||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(u){a.logger.log("set currentLevel:"+u),this.loadLevel=u,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(u){a.logger.log("set nextLevel:"+u),this.levelController.manualLevel=u,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(u){a.logger.log("set loadLevel:"+u),this.levelController.manualLevel=u}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(u){this.levelController.nextLoadLevel=u}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(u){a.logger.log("set firstLevel:"+u),this.levelController.firstLevel=u}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(u){a.logger.log("set startLevel:"+u),u!==-1&&(u=Math.max(u,this.minAutoLevel)),this.levelController.startLevel=u}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(u){var c=!!u;c!==this.config.capLevelToPlayerSize&&(c?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=c)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(u){this._autoLevelCapping!==u&&(a.logger.log("set autoLevelCapping:"+u),this._autoLevelCapping=u)}},{key:"bandwidthEstimate",get:function(){var u=this.abrController.bwEstimator;return u?u.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var u=this.levels,c=this.config.minAutoBitrate;if(!u)return 0;for(var p=u.length,d=0;d<p;d++)if(u[d].maxBitrate>c)return d;return 0}},{key:"maxAutoLevel",get:function(){var u=this.levels,c=this.autoLevelCapping,p;return c===-1&&u&&u.length?p=u.length-1:p=c,p}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(u){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,u)}},{key:"audioTracks",get:function(){var u=this.audioTrackController;return u?u.audioTracks:[]}},{key:"audioTrack",get:function(){var u=this.audioTrackController;return u?u.audioTrack:-1},set:function(u){var c=this.audioTrackController;c&&(c.audioTrack=u)}},{key:"subtitleTracks",get:function(){var u=this.subtitleTrackController;return u?u.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var u=this.subtitleTrackController;return u?u.subtitleTrack:-1},set:function(u){var c=this.subtitleTrackController;c&&(c.subtitleTrack=u)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var u=this.subtitleTrackController;return u?u.subtitleDisplay:!1},set:function(u){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=u)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(u){this.config.lowLatencyMode=u}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return i.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return g.defaultConfig?g.defaultConfig:r.hlsDefaultConfig},set:function(u){g.defaultConfig=u}}]),g}();y.defaultConfig=void 0},"./src/is-supported.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"isSupported",function(){return S}),O.d(k,"changeTypeSupported",function(){return H});var U=O("./src/utils/mediasource-helper.ts");function m(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var N=Object(U.getMediaSource)();if(!N)return!1;var e=m(),A=N&&typeof N.isTypeSupported=="function"&&N.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!A&&!!v}function H(){var N,e=m();return typeof(e==null||((N=e.prototype)===null||N===void 0)?void 0:N.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return a}),O.d(k,"LoadError",function(){return o});var U=O("./src/polyfills/number.ts"),m=O("./src/errors.ts");function S(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,v(s,i)}function H(s){var i=typeof Map=="function"?new Map:void 0;return H=function(t){if(t===null||!A(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i!="undefined"){if(i.has(t))return i.get(t);i.set(t,b)}function b(){return N(t,arguments,f(this).constructor)}return b.prototype=Object.create(t.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v(b,t)},H(s)}function N(s,i,n){return e()?N=Reflect.construct:N=function(b,y,g){var E=[null];E.push.apply(E,y);var _=Function.bind.apply(b,E),u=new _;return g&&v(u,g.prototype),u},N.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function A(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function v(s,i){return v=Object.setPrototypeOf||function(t,b){return t.__proto__=b,t},v(s,i)}function f(s){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},f(s)}var l=Math.pow(2,17),a=function(){function s(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var i=s.prototype;return i.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},i.abort=function(){this.loader&&this.loader.abort()},i.load=function(t,b){var y=this,g=t.url;if(!g)return Promise.reject(new o({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(g?"part list":"url")));this.abort();var E=this.config,_=E.fLoader,u=E.loader;return new Promise(function(c,p){y.loader&&y.loader.destroy();var d=y.loader=t.loader=_?new _(E):new u(E),x=r(t),h={timeout:E.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:E.fragLoadingMaxRetryTimeout,highWaterMark:l};t.stats=d.stats,d.load(x,h,{onSuccess:function(M,D,w,C){y.resetLoader(t,d),c({frag:t,part:null,payload:M.data,networkDetails:C})},onError:function(M,D,w){y.resetLoader(t,d),p(new o({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:M,networkDetails:w}))},onAbort:function(M,D,w){y.resetLoader(t,d),p(new o({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:w}))},onTimeout:function(M,D,w){y.resetLoader(t,d),p(new o({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:w}))},onProgress:function(M,D,w,C){b&&b({frag:t,part:null,payload:w,networkDetails:C})}})})},i.loadPart=function(t,b,y){var g=this;this.abort();var E=this.config,_=E.fLoader,u=E.loader;return new Promise(function(c,p){g.loader&&g.loader.destroy();var d=g.loader=t.loader=_?new _(E):new u(E),x=r(t,b),h={timeout:E.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:E.fragLoadingMaxRetryTimeout,highWaterMark:l};b.stats=d.stats,d.load(x,h,{onSuccess:function(M,D,w,C){g.resetLoader(t,d),g.updateStatsFromPart(t,b);var j={frag:t,part:b,payload:M.data,networkDetails:C};y(j),c(j)},onError:function(M,D,w){g.resetLoader(t,d),p(new o({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:b,response:M,networkDetails:w}))},onAbort:function(M,D,w){t.stats.aborted=b.stats.aborted,g.resetLoader(t,d),p(new o({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:b,networkDetails:w}))},onTimeout:function(M,D,w){g.resetLoader(t,d),p(new o({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:b,networkDetails:w}))}})})},i.updateStatsFromPart=function(t,b){var y=t.stats,g=b.stats,E=g.total;if(y.loaded+=g.loaded,E){var _=Math.round(t.duration/b.duration),u=Math.min(Math.round(y.loaded/E),_),c=_-u,p=c*Math.round(y.loaded/u);y.total=y.loaded+p}else y.total=Math.max(y.loaded,y.total);var d=y.loading,x=g.loading;d.start?d.first+=x.first-x.start:(d.start=x.start,d.first=x.first),d.end=x.end},i.resetLoader=function(t,b){t.loader=null,this.loader===b&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),b.destroy()},s}();function r(s,i){i===void 0&&(i=null);var n=i||s,t={frag:s,part:i,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},b=n.byteRangeStartOffset,y=n.byteRangeEndOffset;return Object(U.isFiniteNumber)(b)&&Object(U.isFiniteNumber)(y)&&(t.rangeStart=b,t.rangeEnd=y),t}var o=function(s){S(i,s);function i(n){for(var t,b=arguments.length,y=new Array(b>1?b-1:0),g=1;g<b;g++)y[g-1]=arguments[g];return t=s.call.apply(s,[this].concat(y))||this,t.data=void 0,t.data=n,t}return i}(H(Error))},"./src/loader/fragment.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"ElementaryStreamTypes",function(){return a}),O.d(k,"BaseSegment",function(){return r}),O.d(k,"Fragment",function(){return o}),O.d(k,"Part",function(){return s});var U=O("./src/polyfills/number.ts"),m=O("./node_modules/url-toolkit/src/url-toolkit.js"),S=O.n(m),H=O("./src/utils/logger.ts"),N=O("./src/loader/level-key.ts"),e=O("./src/loader/load-stats.ts");function A(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,v(i,n)}function v(i,n){return v=Object.setPrototypeOf||function(b,y){return b.__proto__=y,b},v(i,n)}function f(i,n){for(var t=0;t<n.length;t++){var b=n[t];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(i,b.key,b)}}function l(i,n,t){return n&&f(i.prototype,n),t&&f(i,t),i}var a;(function(i){i.AUDIO="audio",i.VIDEO="video",i.AUDIOVIDEO="audiovideo"})(a||(a={}));var r=function(){function i(t){var b;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(b={},b[a.AUDIO]=null,b[a.VIDEO]=null,b[a.AUDIOVIDEO]=null,b),this.baseurl=t}var n=i.prototype;return n.setByteRange=function(b,y){var g=b.split("@",2),E=[];g.length===1?E[0]=y?y.byteRangeEndOffset:0:E[0]=parseInt(g[1]),E[1]=parseInt(g[0])+E[0],this._byteRange=E},l(i,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(m.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(b){this._url=b}}]),i}(),o=function(i){A(n,i);function n(b,y){var g;return g=i.call(this,y)||this,g._decryptdata=null,g.rawProgramDateTime=null,g.programDateTime=null,g.tagList=[],g.duration=0,g.sn=0,g.levelkey=void 0,g.type=void 0,g.loader=null,g.level=-1,g.cc=0,g.startPTS=void 0,g.endPTS=void 0,g.appendedPTS=void 0,g.startDTS=void 0,g.endDTS=void 0,g.start=0,g.deltaPTS=void 0,g.maxStartPTS=void 0,g.minEndPTS=void 0,g.stats=new e.LoadStats,g.urlId=0,g.data=void 0,g.bitrateTest=!1,g.title=null,g.initSegment=null,g.type=b,g}var t=n.prototype;return t.createInitializationVector=function(y){for(var g=new Uint8Array(16),E=12;E<16;E++)g[E]=y>>8*(15-E)&255;return g},t.setDecryptDataFromLevelKey=function(y,g){var E=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(E=N.LevelKey.fromURI(y.uri),E.method=y.method,E.iv=this.createInitializationVector(g),E.keyFormat="identity"),E},t.setElementaryStreamInfo=function(y,g,E,_,u,c){c===void 0&&(c=!1);var p=this.elementaryStreams,d=p[y];if(!d){p[y]={startPTS:g,endPTS:E,startDTS:_,endDTS:u,partial:c};return}d.startPTS=Math.min(d.startPTS,g),d.endPTS=Math.max(d.endPTS,E),d.startDTS=Math.min(d.startDTS,_),d.endDTS=Math.max(d.endDTS,u)},t.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[a.AUDIO]=null,y[a.VIDEO]=null,y[a.AUDIOVIDEO]=null},l(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&H.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(U.isFiniteNumber)(this.programDateTime))return null;var y=Object(U.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),n}(r),s=function(i){A(n,i);function n(t,b,y,g,E){var _;_=i.call(this,y)||this,_.fragOffset=0,_.duration=0,_.gap=!1,_.independent=!1,_.relurl=void 0,_.fragment=void 0,_.index=void 0,_.stats=new e.LoadStats,_.duration=t.decimalFloatingPoint("DURATION"),_.gap=t.bool("GAP"),_.independent=t.bool("INDEPENDENT"),_.relurl=t.enumeratedString("URI"),_.fragment=b,_.index=g;var u=t.enumeratedString("BYTERANGE");return u&&_.setByteRange(u,E),E&&(_.fragOffset=E.fragOffset+E.duration),_}return l(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var b=this.elementaryStreams;return!!(b.audio||b.video||b.audiovideo)}}]),n}(r)},"./src/loader/key-loader.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return H});var U=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/utils/logger.ts"),H=function(){function N(A){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=A,this._registerListeners()}var e=N.prototype;return e._registerListeners=function(){this.hls.on(U.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(U.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var f=this.loaders[v];f&&f.destroy()}this.loaders={}},e.onKeyLoading=function(v,f){var l=f.frag,a=l.type,r=this.loaders[a];if(!l.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var o=l.decryptdata.uri;if(o!==this.decrypturl||this.decryptkey===null){var s=this.hls.config;if(r&&(S.logger.warn("abort previous key loader for type:"+a),r.abort()),!o){S.logger.warn("key uri is falsy");return}var i=s.loader,n=l.loader=this.loaders[a]=new i(s);this.decrypturl=o,this.decryptkey=null;var t={url:o,frag:l,responseType:"arraybuffer"},b={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(t,b,y)}else this.decryptkey&&(l.decryptdata.key=this.decryptkey,this.hls.trigger(U.Events.KEY_LOADED,{frag:l}))},e.loadsuccess=function(v,f,l){var a=l.frag;if(!a.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(v.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(U.Events.KEY_LOADED,{frag:a})},e.loaderror=function(v,f){var l=f.frag,a=l.loader;a&&a.abort(),delete this.loaders[l.type],this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:l,response:v})},e.loadtimeout=function(v,f){var l=f.frag,a=l.loader;a&&a.abort(),delete this.loaders[l.type],this.hls.trigger(U.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:l})},N}()},"./src/loader/level-details.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"LevelDetails",function(){return N});var U=O("./src/polyfills/number.ts");function m(e,A){for(var v=0;v<A.length;v++){var f=A[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}function S(e,A,v){return A&&m(e.prototype,A),v&&m(e,v),e}var H=10,N=function(){function e(v){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=v}var A=e.prototype;return A.reloaded=function(f){if(!f){this.advanced=!0,this.updated=!0;return}var l=this.lastPartSn-f.lastPartSn,a=this.lastPartIndex-f.lastPartIndex;this.updated=this.endSN!==f.endSN||!!a||!!l,this.advanced=this.endSN>f.endSN||l>0||l===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(f.misses*.6):this.misses=f.misses+1,this.availabilityDelay=f.availabilityDelay},S(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(U.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||H}},{key:"drift",get:function(){var f=this.driftEndTime-this.driftStartTime;if(f>0){var l=this.driftEnd-this.driftStart;return l*1e3/f}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var f;return(f=this.fragments)!==null&&f!==void 0&&f.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"LevelKey",function(){return N});var U=O("./node_modules/url-toolkit/src/url-toolkit.js"),m=O.n(U);function S(e,A){for(var v=0;v<A.length;v++){var f=A[v];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}function H(e,A,v){return A&&S(e.prototype,A),v&&S(e,v),e}var N=function(){e.fromURL=function(v,f){return new e(v,f)},e.fromURI=function(v){return new e(v)};function e(A,v){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,v?this._uri=Object(U.buildAbsoluteURL)(A,v,{alwaysNormalize:!0}):this._uri=A}return H(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"LoadStats",function(){return U});var U=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return n});var U=O("./src/polyfills/number.ts"),m=O("./node_modules/url-toolkit/src/url-toolkit.js"),S=O.n(m),H=O("./src/loader/fragment.ts"),N=O("./src/loader/level-details.ts"),e=O("./src/loader/level-key.ts"),A=O("./src/utils/attr-list.ts"),v=O("./src/utils/logger.ts"),f=O("./src/utils/codecs.ts"),l=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,a=/#EXT-X-MEDIA:(.*)/g,r=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),o=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),s=/\.(mp4|m4s|m4v|m4a)$/i;function i(E){var _,u;return s.test((_=(u=m.parseURL(E))===null||u===void 0?void 0:u.path)!=null?_:"")}var n=function(){function E(){}return E.findGroup=function(u,c){for(var p=0;p<u.length;p++){var d=u[p];if(d.id===c)return d}},E.convertAVC1ToAVCOTI=function(u){var c=u.split(".");if(c.length>2){var p=c.shift()+".";return p+=parseInt(c.shift()).toString(16),p+=("000"+parseInt(c.shift()).toString(16)).substr(-4),p}return u},E.resolve=function(u,c){return m.buildAbsoluteURL(c,u,{alwaysNormalize:!0})},E.parseMasterPlaylist=function(u,c){var p=[],d={},x=!1;l.lastIndex=0;for(var h;(h=l.exec(u))!=null;)if(h[1]){var T=new A.AttrList(h[1]),M={attrs:T,bitrate:T.decimalInteger("AVERAGE-BANDWIDTH")||T.decimalInteger("BANDWIDTH"),name:T.NAME,url:E.resolve(h[2],c)},D=T.decimalResolution("RESOLUTION");D&&(M.width=D.width,M.height=D.height),t((T.CODECS||"").split(/[ ,]+/).filter(function(C){return C}),M),M.videoCodec&&M.videoCodec.indexOf("avc1")!==-1&&(M.videoCodec=E.convertAVC1ToAVCOTI(M.videoCodec)),p.push(M)}else if(h[3]){var w=new A.AttrList(h[3]);w["DATA-ID"]&&(x=!0,d[w["DATA-ID"]]=w)}return{levels:p,sessionData:x?d:null}},E.parseMasterPlaylistMedia=function(u,c,p,d){d===void 0&&(d=[]);var x,h=[],T=0;for(a.lastIndex=0;(x=a.exec(u))!==null;){var M=new A.AttrList(x[1]);if(M.TYPE===p){var D={attrs:M,bitrate:0,id:T++,groupId:M["GROUP-ID"],instreamId:M["INSTREAM-ID"],name:M.NAME||M.LANGUAGE||"",type:p,default:M.bool("DEFAULT"),autoselect:M.bool("AUTOSELECT"),forced:M.bool("FORCED"),lang:M.LANGUAGE,url:M.URI?E.resolve(M.URI,c):""};if(d.length){var w=E.findGroup(d,D.groupId)||d[0];b(D,w,"audioCodec"),b(D,w,"textCodec")}h.push(D)}}return h},E.parseLevelPlaylist=function(u,c,p,d,x){var h=new N.LevelDetails(c),T=h.fragments,M=null,D=0,w=0,C=0,j=0,L=null,z=new H.Fragment(d,c),$,he,fe,Ie=-1,Se=!1;for(r.lastIndex=0,h.m3u8=u;($=r.exec(u))!==null;){Se&&(Se=!1,z=new H.Fragment(d,c),z.start=C,z.sn=D,z.cc=j,z.level=p,M&&(z.initSegment=M,z.rawProgramDateTime=M.rawProgramDateTime));var pe=$[1];if(pe){z.duration=parseFloat(pe);var Ce=(" "+$[2]).slice(1);z.title=Ce||null,z.tagList.push(Ce?["INF",pe,Ce]:["INF",pe])}else if($[3])Object(U.isFiniteNumber)(z.duration)&&(z.start=C,fe&&(z.levelkey=fe),z.sn=D,z.level=p,z.cc=j,z.urlId=x,T.push(z),z.relurl=(" "+$[3]).slice(1),g(z,L),L=z,C+=z.duration,D++,w=0,Se=!0);else if($[4]){var Me=(" "+$[4]).slice(1);L?z.setByteRange(Me,L):z.setByteRange(Me)}else if($[5])z.rawProgramDateTime=(" "+$[5]).slice(1),z.tagList.push(["PROGRAM-DATE-TIME",z.rawProgramDateTime]),Ie===-1&&(Ie=T.length);else{if($=$[0].match(o),!$){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(he=1;he<$.length&&!(typeof $[he]!="undefined");he++);var ge=(" "+$[he]).slice(1),B=(" "+$[he+1]).slice(1),R=$[he+2]?(" "+$[he+2]).slice(1):"";switch(ge){case"PLAYLIST-TYPE":h.type=B.toUpperCase();break;case"MEDIA-SEQUENCE":D=h.startSN=parseInt(B);break;case"SKIP":{var I=new A.AttrList(B),W=I.decimalInteger("SKIPPED-SEGMENTS");if(Object(U.isFiniteNumber)(W)){h.skippedSegments=W;for(var Y=W;Y--;)T.unshift(null);D+=W}var F=I.enumeratedString("RECENTLY-REMOVED-DATERANGES");F&&(h.recentlyRemovedDateranges=F.split(" "));break}case"TARGETDURATION":h.targetduration=parseFloat(B);break;case"VERSION":h.version=parseInt(B);break;case"EXTM3U":break;case"ENDLIST":h.live=!1;break;case"#":(B||R)&&z.tagList.push(R?[B,R]:[B]);break;case"DIS":j++;case"GAP":z.tagList.push([ge]);break;case"BITRATE":z.tagList.push([ge,B]);break;case"DISCONTINUITY-SEQ":j=parseInt(B);break;case"KEY":{var le,Ae=new A.AttrList(B),Ne=Ae.enumeratedString("METHOD"),ie=Ae.URI,de=Ae.hexadecimalInteger("IV"),we=Ae.enumeratedString("KEYFORMATVERSIONS"),De=Ae.enumeratedString("KEYID"),Ke=(le=Ae.enumeratedString("KEYFORMAT"))!=null?le:"identity",Je=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Je.indexOf(Ke)>-1){v.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;Ne&&(fe=e.LevelKey.fromURL(c,ie),ie&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ne)>=0&&(fe.method=Ne,fe.keyFormat=Ke,De&&(fe.keyID=De),we&&(fe.keyFormatVersions=we),fe.iv=de));break}case"START":{var Ze=new A.AttrList(B),Qe=Ze.decimalFloatingPoint("TIME-OFFSET");Object(U.isFiniteNumber)(Qe)&&(h.startTimeOffset=Qe);break}case"MAP":{var ut=new A.AttrList(B);z.relurl=ut.URI,ut.BYTERANGE&&z.setByteRange(ut.BYTERANGE),z.level=p,z.sn="initSegment",fe&&(z.levelkey=fe),z.initSegment=null,M=z,Se=!0;break}case"SERVER-CONTROL":{var tt=new A.AttrList(B);h.canBlockReload=tt.bool("CAN-BLOCK-RELOAD"),h.canSkipUntil=tt.optionalFloat("CAN-SKIP-UNTIL",0),h.canSkipDateRanges=h.canSkipUntil>0&&tt.bool("CAN-SKIP-DATERANGES"),h.partHoldBack=tt.optionalFloat("PART-HOLD-BACK",0),h.holdBack=tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var xe=new A.AttrList(B);h.partTarget=xe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Oe=h.partList;Oe||(Oe=h.partList=[]);var Fe=w>0?Oe[Oe.length-1]:void 0,We=w++,q=new H.Part(new A.AttrList(B),z,c,We,Fe);Oe.push(q),z.duration+=q.duration;break}case"PRELOAD-HINT":{var K=new A.AttrList(B);h.preloadHint=K;break}case"RENDITION-REPORT":{var G=new A.AttrList(B);h.renditionReports=h.renditionReports||[],h.renditionReports.push(G);break}default:v.logger.warn("line parsed but not handled: "+$);break}}}L&&!L.relurl?(T.pop(),C-=L.duration,h.partList&&(h.fragmentHint=L)):h.partList&&(g(z,L),z.cc=j,h.fragmentHint=z);var Q=T.length,ee=T[0],V=T[Q-1];if(C+=h.skippedSegments*h.targetduration,C>0&&Q&&V){h.averagetargetduration=C/Q;var J=V.sn;h.endSN=J!=="initSegment"?J:0,ee&&(h.startCC=ee.cc,ee.initSegment||h.fragments.every(function(ne){return ne.relurl&&i(ne.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),z=new H.Fragment(d,c),z.relurl=V.relurl,z.level=p,z.sn="initSegment",ee.initSegment=z,h.needSidxRanges=!0))}else h.endSN=0,h.startCC=0;return h.fragmentHint&&(C+=h.fragmentHint.duration),h.totalduration=C,h.endCC=j,Ie>0&&y(T,Ie),h},E}();function t(E,_){["video","audio","text"].forEach(function(u){var c=E.filter(function(d){return Object(f.isCodecType)(d,u)});if(c.length){var p=c.filter(function(d){return d.lastIndexOf("avc1",0)===0||d.lastIndexOf("mp4a",0)===0});_[u+"Codec"]=p.length>0?p[0]:c[0],E=E.filter(function(d){return c.indexOf(d)===-1})}}),_.unknownCodecs=E}function b(E,_,u){var c=_[u];c&&(E[u]=c)}function y(E,_){for(var u=E[_],c=_;c--;){var p=E[c];if(!p)return;p.programDateTime=u.programDateTime-p.duration*1e3,u=p}}function g(E,_){E.rawProgramDateTime?E.programDateTime=Date.parse(E.rawProgramDateTime):_!=null&&_.programDateTime&&(E.programDateTime=_.endProgramDateTime),Object(U.isFiniteNumber)(E.programDateTime)||(E.programDateTime=null,E.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/polyfills/number.ts"),m=O("./src/events.ts"),S=O("./src/errors.ts"),H=O("./src/utils/logger.ts"),N=O("./src/utils/mp4-tools.ts"),e=O("./src/loader/m3u8-parser.ts"),A=O("./src/types/loader.ts"),v=O("./src/utils/attr-list.ts");function f(r){var o=r.type;switch(o){case A.PlaylistContextType.AUDIO_TRACK:return A.PlaylistLevelType.AUDIO;case A.PlaylistContextType.SUBTITLE_TRACK:return A.PlaylistLevelType.SUBTITLE;default:return A.PlaylistLevelType.MAIN}}function l(r,o){var s=r.url;return(s===void 0||s.indexOf("data:")===0)&&(s=o.url),s}var a=function(){function r(s){this.hls=void 0,this.loaders=Object.create(null),this.hls=s,this.registerListeners()}var o=r.prototype;return o.registerListeners=function(){var i=this.hls;i.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(m.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.on(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.unregisterListeners=function(){var i=this.hls;i.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(m.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),i.off(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.createInternalLoader=function(i){var n=this.hls.config,t=n.pLoader,b=n.loader,y=t||b,g=new y(n);return i.loader=g,this.loaders[i.type]=g,g},o.getInternalLoader=function(i){return this.loaders[i.type]},o.resetInternalLoader=function(i){this.loaders[i]&&delete this.loaders[i]},o.destroyInternalLoaders=function(){for(var i in this.loaders){var n=this.loaders[i];n&&n.destroy(),this.resetInternalLoader(i)}},o.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},o.onManifestLoading=function(i,n){var t=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:A.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},o.onLevelLoading=function(i,n){var t=n.id,b=n.level,y=n.url,g=n.deliveryDirectives;this.load({id:t,groupId:null,level:b,responseType:"text",type:A.PlaylistContextType.LEVEL,url:y,deliveryDirectives:g})},o.onAudioTrackLoading=function(i,n){var t=n.id,b=n.groupId,y=n.url,g=n.deliveryDirectives;this.load({id:t,groupId:b,level:null,responseType:"text",type:A.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:g})},o.onSubtitleTrackLoading=function(i,n){var t=n.id,b=n.groupId,y=n.url,g=n.deliveryDirectives;this.load({id:t,groupId:b,level:null,responseType:"text",type:A.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:g})},o.load=function(i){var n,t=this.hls.config,b=this.getInternalLoader(i);if(b){var y=b.context;if(y&&y.url===i.url){H.logger.trace("[playlist-loader]: playlist request ongoing");return}H.logger.log("[playlist-loader]: aborting previous loader for type: "+i.type),b.abort()}var g,E,_,u;switch(i.type){case A.PlaylistContextType.MANIFEST:g=t.manifestLoadingMaxRetry,E=t.manifestLoadingTimeOut,_=t.manifestLoadingRetryDelay,u=t.manifestLoadingMaxRetryTimeout;break;case A.PlaylistContextType.LEVEL:case A.PlaylistContextType.AUDIO_TRACK:case A.PlaylistContextType.SUBTITLE_TRACK:g=0,E=t.levelLoadingTimeOut;break;default:g=t.levelLoadingMaxRetry,E=t.levelLoadingTimeOut,_=t.levelLoadingRetryDelay,u=t.levelLoadingMaxRetryTimeout;break}if(b=this.createInternalLoader(i),(n=i.deliveryDirectives)!==null&&n!==void 0&&n.part){var c;if(i.type===A.PlaylistContextType.LEVEL&&i.level!==null?c=this.hls.levels[i.level].details:i.type===A.PlaylistContextType.AUDIO_TRACK&&i.id!==null?c=this.hls.audioTracks[i.id].details:i.type===A.PlaylistContextType.SUBTITLE_TRACK&&i.id!==null&&(c=this.hls.subtitleTracks[i.id].details),c){var p=c.partTarget,d=c.targetduration;p&&d&&(E=Math.min(Math.max(p*3,d*.8)*1e3,E))}}var x={timeout:E,maxRetry:g,retryDelay:_,maxRetryDelay:u,highWaterMark:0},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};b.load(i,x,h)},o.loadsuccess=function(i,n,t,b){if(b===void 0&&(b=null),t.isSidxRequest){this.handleSidxRequest(i,t),this.handlePlaylistLoaded(i,n,t,b);return}this.resetInternalLoader(t.type);var y=i.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(i,t,"no EXTM3U delimiter",b);return}n.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(i,n,t,b):this.handleMasterPlaylist(i,n,t,b)},o.loaderror=function(i,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!1,i)},o.loadtimeout=function(i,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!0)},o.handleMasterPlaylist=function(i,n,t,b){var y=this.hls,g=i.data,E=l(i,t),_=e.default.parseMasterPlaylist(g,E),u=_.levels,c=_.sessionData;if(!u.length){this.handleManifestParsingError(i,t,"no level found in manifest",b);return}var p=u.map(function(D){return{id:D.attrs.AUDIO,audioCodec:D.audioCodec}}),d=u.map(function(D){return{id:D.attrs.SUBTITLES,textCodec:D.textCodec}}),x=e.default.parseMasterPlaylistMedia(g,E,"AUDIO",p),h=e.default.parseMasterPlaylistMedia(g,E,"SUBTITLES",d),T=e.default.parseMasterPlaylistMedia(g,E,"CLOSED-CAPTIONS");if(x.length){var M=x.some(function(D){return!D.url});!M&&u[0].audioCodec&&!u[0].attrs.AUDIO&&(H.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),x.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v.AttrList({}),bitrate:0,url:""}))}y.trigger(m.Events.MANIFEST_LOADED,{levels:u,audioTracks:x,subtitles:h,captions:T,url:E,stats:n,networkDetails:b,sessionData:c})},o.handleTrackOrLevelPlaylist=function(i,n,t,b){var y=this.hls,g=t.id,E=t.level,_=t.type,u=l(i,t),c=Object(U.isFiniteNumber)(g)?g:0,p=Object(U.isFiniteNumber)(E)?E:c,d=f(t),x=e.default.parseLevelPlaylist(i.data,u,p,d,c);if(!x.fragments.length){y.trigger(m.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:u,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(_===A.PlaylistContextType.MANIFEST){var h={attrs:new v.AttrList({}),bitrate:0,details:x,name:"",url:u};y.trigger(m.Events.MANIFEST_LOADED,{levels:[h],audioTracks:[],url:u,stats:n,networkDetails:b,sessionData:null})}if(n.parsing.end=performance.now(),x.needSidxRanges){var T,M=(T=x.fragments[0].initSegment)===null||T===void 0?void 0:T.url;this.load({url:M,isSidxRequest:!0,type:_,level:E,levelDetails:x,id:g,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=x,this.handlePlaylistLoaded(i,n,t,b)},o.handleSidxRequest=function(i,n){var t=Object(N.parseSegmentIndex)(new Uint8Array(i.data));if(!t)return;var b=t.references,y=n.levelDetails;b.forEach(function(g,E){var _=g.info,u=y.fragments[E];u.byteRange.length===0&&u.setByteRange(String(1+_.end-_.start)+"@"+String(_.start)),u.initSegment&&u.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},o.handleManifestParsingError=function(i,n,t,b){this.hls.trigger(m.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===A.PlaylistContextType.MANIFEST,url:i.url,reason:t,response:i,context:n,networkDetails:b})},o.handleNetworkError=function(i,n,t,b){t===void 0&&(t=!1),H.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+i.type+" level: "+i.level+" id: "+i.id+' group-id: "'+i.groupId+'"');var y=S.ErrorDetails.UNKNOWN,g=!1,E=this.getInternalLoader(i);switch(i.type){case A.PlaylistContextType.MANIFEST:y=t?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,g=!0;break;case A.PlaylistContextType.LEVEL:y=t?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,g=!1;break;case A.PlaylistContextType.AUDIO_TRACK:y=t?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,g=!1;break;case A.PlaylistContextType.SUBTITLE_TRACK:y=t?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,g=!1;break}E&&this.resetInternalLoader(i.type);var _={type:S.ErrorTypes.NETWORK_ERROR,details:y,fatal:g,url:i.url,loader:E,context:i,networkDetails:n};b&&(_.response=b),this.hls.trigger(m.Events.ERROR,_)},o.handlePlaylistLoaded=function(i,n,t,b){var y=t.type,g=t.level,E=t.id,_=t.groupId,u=t.loader,c=t.levelDetails,p=t.deliveryDirectives;if(!(c!=null&&c.targetduration)){this.handleManifestParsingError(i,t,"invalid target duration",b);return}if(!u)return;c.live&&(u.getCacheAge&&(c.ageHeader=u.getCacheAge()||0),(!u.getCacheAge||isNaN(c.ageHeader))&&(c.ageHeader=0));switch(y){case A.PlaylistContextType.MANIFEST:case A.PlaylistContextType.LEVEL:this.hls.trigger(m.Events.LEVEL_LOADED,{details:c,level:g||0,id:E||0,stats:n,networkDetails:b,deliveryDirectives:p});break;case A.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(m.Events.AUDIO_TRACK_LOADED,{details:c,id:E||0,groupId:_||"",stats:n,networkDetails:b,deliveryDirectives:p});break;case A.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(m.Events.SUBTITLE_TRACK_LOADED,{details:c,id:E||0,groupId:_||"",stats:n,networkDetails:b,deliveryDirectives:p});break}},r}();k.default=a},"./src/polyfills/number.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"isFiniteNumber",function(){return U}),O.d(k,"MAX_SAFE_INTEGER",function(){return m});var U=Number.isFinite||function(S){return typeof S=="number"&&isFinite(S)},m=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(te,k,O){"use strict";O.r(k);var U=function(){function m(){}return m.getSilentFrame=function(H,N){switch(H){case"mp4a.40.2":if(N===1)return new Uint8Array([0,200,0,128,35,128]);if(N===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(N===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(N===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(N===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(N===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(N===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(N===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(N===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},m}();k.default=U},"./src/remux/mp4-generator.ts":function(te,k,O){"use strict";O.r(k);var U=Math.pow(2,32)-1,m=function(){function S(){}return S.init=function(){S.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var N;for(N in S.types)S.types.hasOwnProperty(N)&&(S.types[N]=[N.charCodeAt(0),N.charCodeAt(1),N.charCodeAt(2),N.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);S.HDLR_TYPES={video:e,audio:A};var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);S.STTS=S.STSC=S.STCO=f,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var l=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,l,r,l,a),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,v))},S.box=function(N){for(var e=8,A=arguments.length,v=new Array(A>1?A-1:0),f=1;f<A;f++)v[f-1]=arguments[f];for(var l=v.length,a=l;l--;)e+=v[l].byteLength;var r=new Uint8Array(e);for(r[0]=e>>24&255,r[1]=e>>16&255,r[2]=e>>8&255,r[3]=e&255,r.set(N,4),l=0,e=8;l<a;l++)r.set(v[l],e),e+=v[l].byteLength;return r},S.hdlr=function(N){return S.box(S.types.hdlr,S.HDLR_TYPES[N])},S.mdat=function(N){return S.box(S.types.mdat,N)},S.mdhd=function(N,e){e*=N;var A=Math.floor(e/(U+1)),v=Math.floor(e%(U+1));return S.box(S.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,N>>24&255,N>>16&255,N>>8&255,N&255,A>>24,A>>16&255,A>>8&255,A&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},S.mdia=function(N){return S.box(S.types.mdia,S.mdhd(N.timescale,N.duration),S.hdlr(N.type),S.minf(N))},S.mfhd=function(N){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,N>>24,N>>16&255,N>>8&255,N&255]))},S.minf=function(N){return N.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(N)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(N))},S.moof=function(N,e,A){return S.box(S.types.moof,S.mfhd(N),S.traf(A,e))},S.moov=function(N){for(var e=N.length,A=[];e--;)A[e]=S.trak(N[e]);return S.box.apply(null,[S.types.moov,S.mvhd(N[0].timescale,N[0].duration)].concat(A).concat(S.mvex(N)))},S.mvex=function(N){for(var e=N.length,A=[];e--;)A[e]=S.trex(N[e]);return S.box.apply(null,[S.types.mvex].concat(A))},S.mvhd=function(N,e){e*=N;var A=Math.floor(e/(U+1)),v=Math.floor(e%(U+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,N>>24&255,N>>16&255,N>>8&255,N&255,A>>24,A>>16&255,A>>8&255,A&255,v>>24,v>>16&255,v>>8&255,v&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return S.box(S.types.mvhd,f)},S.sdtp=function(N){var e=N.samples||[],A=new Uint8Array(4+e.length),v,f;for(v=0;v<e.length;v++)f=e[v].flags,A[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return S.box(S.types.sdtp,A)},S.stbl=function(N){return S.box(S.types.stbl,S.stsd(N),S.box(S.types.stts,S.STTS),S.box(S.types.stsc,S.STSC),S.box(S.types.stsz,S.STSZ),S.box(S.types.stco,S.STCO))},S.avc1=function(N){var e=[],A=[],v,f,l;for(v=0;v<N.sps.length;v++)f=N.sps[v],l=f.byteLength,e.push(l>>>8&255),e.push(l&255),e=e.concat(Array.prototype.slice.call(f));for(v=0;v<N.pps.length;v++)f=N.pps[v],l=f.byteLength,A.push(l>>>8&255),A.push(l&255),A=A.concat(Array.prototype.slice.call(f));var a=S.box(S.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|N.sps.length].concat(e).concat([N.pps.length]).concat(A))),r=N.width,o=N.height,s=N.pixelRatio[0],i=N.pixelRatio[1];return S.box(S.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>8&255,r&255,o>>8&255,o&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([s>>24,s>>16&255,s>>8&255,s&255,i>>24,i>>16&255,i>>8&255,i&255])))},S.esds=function(N){var e=N.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(N.config).concat([6,1,2]))},S.mp4a=function(N){var e=N.samplerate;return S.box(S.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,N.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),S.box(S.types.esds,S.esds(N)))},S.mp3=function(N){var e=N.samplerate;return S.box(S.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,N.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},S.stsd=function(N){return N.type==="audio"?!N.isAAC&&N.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(N)):S.box(S.types.stsd,S.STSD,S.mp4a(N)):S.box(S.types.stsd,S.STSD,S.avc1(N))},S.tkhd=function(N){var e=N.id,A=N.duration*N.timescale,v=N.width,f=N.height,l=Math.floor(A/(U+1)),a=Math.floor(A%(U+1));return S.box(S.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,v>>8&255,v&255,0,0,f>>8&255,f&255,0,0]))},S.traf=function(N,e){var A=S.sdtp(N),v=N.id,f=Math.floor(e/(U+1)),l=Math.floor(e%(U+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),S.box(S.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,l>>24,l>>16&255,l>>8&255,l&255])),S.trun(N,A.length+16+20+8+16+8+8),A)},S.trak=function(N){return N.duration=N.duration||4294967295,S.box(S.types.trak,S.tkhd(N),S.mdia(N))},S.trex=function(N){var e=N.id;return S.box(S.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},S.trun=function(N,e){var A=N.samples||[],v=A.length,f=12+16*v,l=new Uint8Array(f),a,r,o,s,i,n;for(e+=8+f,l.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),a=0;a<v;a++)r=A[a],o=r.duration,s=r.size,i=r.flags,n=r.cts,l.set([o>>>24&255,o>>>16&255,o>>>8&255,o&255,s>>>24&255,s>>>16&255,s>>>8&255,s&255,i.isLeading<<2|i.dependsOn,i.isDependedOn<<6|i.hasRedundancy<<4|i.paddingValue<<1|i.isNonSync,i.degradPrio&240<<8,i.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*a);return S.box(S.types.trun,l)},S.initSegment=function(N){S.types||S.init();var e=S.moov(N),A=new Uint8Array(S.FTYP.byteLength+e.byteLength);return A.set(S.FTYP),A.set(e,S.FTYP.byteLength),A},S}();m.types=void 0,m.HDLR_TYPES=void 0,m.STTS=void 0,m.STSC=void 0,m.STCO=void 0,m.STSZ=void 0,m.VMHD=void 0,m.SMHD=void 0,m.STSD=void 0,m.FTYP=void 0,m.DINF=void 0,k.default=m},"./src/remux/mp4-remuxer.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return n}),O.d(k,"normalizePts",function(){return t});var U=O("./src/polyfills/number.ts"),m=O("./src/remux/aac-helper.ts"),S=O("./src/remux/mp4-generator.ts"),H=O("./src/events.ts"),N=O("./src/errors.ts"),e=O("./src/utils/logger.ts"),A=O("./src/types/loader.ts"),v=O("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(E){for(var _=1;_<arguments.length;_++){var u=arguments[_];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&(E[c]=u[c])}return E},f.apply(this,arguments)}var l=10*1e3,a=1024,r=1152,o=null,s=null,i=!1,n=function(){function E(u,c,p,d){if(d===void 0&&(d=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=u,this.config=c,this.typeSupported=p,this.ISGenerated=!1,o===null){var x=navigator.userAgent||"",h=x.match(/Chrome\/(\d+)/i);o=h?parseInt(h[1]):0}if(s===null){var T=navigator.userAgent.match(/Safari\/(\d+)/i);s=T?parseInt(T[1]):0}i=!!o&&o<75||!!s&&s<600}var _=E.prototype;return _.destroy=function(){},_.resetTimeStamp=function(c){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=c},_.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},_.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},_.getVideoStartPts=function(c){var p=!1,d=c.reduce(function(x,h){var T=h.pts-x;return T<-4294967296?(p=!0,t(x,h.pts)):T>0?x:h.pts},c[0].pts);return p&&e.logger.debug("PTS rollover detected"),d},_.remux=function(c,p,d,x,h,T,M,D){var w,C,j,L,z,$,he=h,fe=h,Ie=c.pid>-1,Se=p.pid>-1,pe=p.samples.length,Ce=c.samples.length>0,Me=pe>1,ge=(!Ie||Ce)&&(!Se||Me)||this.ISGenerated||M;if(ge){this.ISGenerated||(j=this.generateIS(c,p,h));var B=this.isVideoContiguous,R=-1;if(Me&&(R=b(p.samples),!B&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,R>0){e.logger.warn("[mp4-remuxer]: Dropped "+R+" out of "+pe+" video samples due to a missing keyframe");var I=this.getVideoStartPts(p.samples);p.samples=p.samples.slice(R),p.dropped+=R,fe+=(p.samples[0].pts-I)/(p.timescale||9e4)}else R===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+pe+" video samples"),$=!1);if(this.ISGenerated){if(Ce&&Me){var W=this.getVideoStartPts(p.samples),Y=t(c.samples[0].pts,W)-W,F=Y/p.inputTimeScale;he+=Math.max(0,F),fe+=Math.max(0,-F)}if(Ce){if(c.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(c,p,h)),C=this.remuxAudio(c,he,this.isAudioContiguous,T,Se||Me||D===A.PlaylistLevelType.AUDIO?fe:void 0),Me){var le=C?C.endPTS-C.startPTS:0;p.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(c,p,h)),w=this.remuxVideo(p,fe,B,le)}}else Me&&(w=this.remuxVideo(p,fe,B,0));w&&(w.firstKeyFrame=R,w.independent=R!==-1)}}return this.ISGenerated&&(d.samples.length&&(z=this.remuxID3(d,h)),x.samples.length&&(L=this.remuxText(x,h))),{audio:C,video:w,initSegment:j,independent:$,text:L,id3:z}},_.generateIS=function(c,p,d){var x=c.samples,h=p.samples,T=this.typeSupported,M={},D=!Object(U.isFiniteNumber)(this._initPTS),w="audio/mp4",C,j,L;if(D&&(C=j=Infinity),c.config&&x.length&&(c.timescale=c.samplerate,c.isAAC||(T.mpeg?(w="audio/mpeg",c.codec=""):T.mp3&&(c.codec="mp3")),M.audio={id:"audio",container:w,codec:c.codec,initSegment:!c.isAAC&&T.mpeg?new Uint8Array(0):S.default.initSegment([c]),metadata:{channelCount:c.channelCount}},D&&(L=c.inputTimeScale,C=j=x[0].pts-Math.round(L*d))),p.sps&&p.pps&&h.length&&(p.timescale=p.inputTimeScale,M.video={id:"main",container:"video/mp4",codec:p.codec,initSegment:S.default.initSegment([p]),metadata:{width:p.width,height:p.height}},D)){L=p.inputTimeScale;var z=this.getVideoStartPts(h),$=Math.round(L*d);j=Math.min(j,t(h[0].dts,z)-$),C=Math.min(C,z-$)}if(Object.keys(M).length)return this.ISGenerated=!0,D&&(this._initPTS=C,this._initDTS=j),{tracks:M,initPTS:C,timescale:L}},_.remuxVideo=function(c,p,d,x){var h=c.inputTimeScale,T=c.samples,M=[],D=T.length,w=this._initPTS,C=this.nextAvcDts,j=8,L,z,$,he=Number.POSITIVE_INFINITY,fe=Number.NEGATIVE_INFINITY,Ie=0,Se=!1;if(!d||C===null){var pe=p*h,Ce=T[0].pts-t(T[0].dts,T[0].pts);C=pe-Ce}for(var Me=0;Me<D;Me++){var ge=T[Me];if(ge.pts=t(ge.pts-w,C),ge.dts=t(ge.dts-w,C),ge.dts>ge.pts){var B=9e4*.2;Ie=Math.max(Math.min(Ie,ge.pts-ge.dts),-1*B)}ge.dts<T[Me>0?Me-1:Me].dts&&(Se=!0)}Se&&T.sort(function(At,pt){var ot=At.dts-pt.dts,Mt=At.pts-pt.pts;return ot||Mt}),z=T[0].dts,$=T[T.length-1].dts;var R=Math.round(($-z)/(D-1));if(Ie<0){if(Ie<R*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(v.toMsFromMpegTsClock)(-R,!0)+" ms");for(var I=Ie,W=0;W<D;W++)T[W].dts=I=Math.max(I,T[W].pts-R),T[W].pts=Math.max(I,T[W].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(v.toMsFromMpegTsClock)(Ie,!0)+" ms to overcome this issue");for(var Y=0;Y<D;Y++)T[Y].dts=T[Y].dts+Ie}z=T[0].dts}if(d){var F=z-C,le=F>R,Ae=F<-1;if(le||Ae){le?e.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(F,!0)+" ms ("+F+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-F,!0)+" ms ("+F+"dts) overlapping between fragments detected"),z=C;var Ne=T[0].pts-F;T[0].dts=z,T[0].pts=Ne,e.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(Ne,!0)+"/"+Object(v.toMsFromMpegTsClock)(z,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(F,!0)+" ms")}}i&&(z=Math.max(0,z));for(var ie=0,de=0,we=0;we<D;we++){for(var De=T[we],Ke=De.units,Je=Ke.length,Ze=0,Qe=0;Qe<Je;Qe++)Ze+=Ke[Qe].data.length;de+=Ze,ie+=Je,De.length=Ze,De.dts=Math.max(De.dts,z),De.pts=Math.max(De.pts,De.dts,0),he=Math.min(De.pts,he),fe=Math.max(De.pts,fe)}$=T[D-1].dts;var ut=de+4*ie+8,tt;try{tt=new Uint8Array(ut)}catch(At){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:N.ErrorTypes.MUX_ERROR,details:N.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ut,reason:"fail allocating video mdat "+ut});return}var xe=new DataView(tt.buffer);xe.setUint32(0,ut),tt.set(S.default.types.mdat,4);for(var Oe=0;Oe<D;Oe++){for(var Fe=T[Oe],We=Fe.units,q=0,K=0,G=We.length;K<G;K++){var Q=We[K],ee=Q.data,V=Q.data.byteLength;xe.setUint32(j,V),j+=4,tt.set(ee,j),j+=V,q+=4+V}if(Oe<D-1)L=T[Oe+1].dts-Fe.dts;else{var J=this.config,ne=Fe.dts-T[Oe>0?Oe-1:Oe].dts;if(J.stretchShortVideoTrack&&this.nextAudioPts!==null){var ae=Math.floor(J.maxBufferHole*h),ye=(x?he+x*h:this.nextAudioPts)-Fe.pts;ye>ae?(L=ye-ne,L<0&&(L=ne),e.logger.log("[mp4-remuxer]: It is approximately "+ye/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=ne}else L=ne}var be=Math.round(Fe.pts-Fe.dts);M.push(new y(Fe.key,L,q,be))}if(M.length&&o&&o<70){var Pe=M[0].flags;Pe.dependsOn=2,Pe.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=C=$+L,this.isVideoContiguous=!0;var ze=S.default.moof(c.sequenceNumber++,z,f({},c,{samples:M})),qe="video",Xe={data1:ze,data2:tt,startPTS:he/h,endPTS:(fe+L)/h,startDTS:z/h,endDTS:C/h,type:qe,hasAudio:!1,hasVideo:!0,nb:M.length,dropped:c.dropped};return c.samples=[],c.dropped=0,console.assert(tt.length,"MDAT length must not be zero"),Xe},_.remuxAudio=function(c,p,d,x,h){var T=c.inputTimeScale,M=c.samplerate?c.samplerate:T,D=T/M,w=c.isAAC?a:r,C=w*D,j=this._initPTS,L=!c.isAAC&&this.typeSupported.mpeg,z=[],$=c.samples,he=L?0:8,fe=this.nextAudioPts||-1,Ie=p*T;if(this.isAudioContiguous=d=d||$.length&&fe>0&&(x&&Math.abs(Ie-fe)<9e3||Math.abs(t($[0].pts-j,Ie)-fe)<20*C),$.forEach(function(ee){ee.pts=t(ee.pts-j,Ie)}),!d||fe<0){if($=$.filter(function(ee){return ee.pts>=0}),!$.length)return;h===0?fe=0:x?fe=Math.max(0,Ie):fe=$[0].pts}if(c.isAAC)for(var Se=h!==void 0,pe=this.config.maxAudioFramesDrift,Ce=0,Me=fe;Ce<$.length;Ce++){var ge=$[Ce],B=ge.pts,R=B-Me,I=Math.abs(1e3*R/T);if(R<=-pe*C&&Se)Ce===0&&(e.logger.warn("Audio frame @ "+(B/T).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*R/T)+" ms."),this.nextAudioPts=fe=Me=B);else if(R>=pe*C&&I<l&&Se){var W=Math.round(R/C);Me=B-W*C,Me<0&&(W--,Me+=C),Ce===0&&(this.nextAudioPts=fe=Me),e.logger.warn("[mp4-remuxer]: Injecting "+W+" audio frame @ "+(Me/T).toFixed(3)+"s due to "+Math.round(1e3*R/T)+" ms gap.");for(var Y=0;Y<W;Y++){var F=Math.max(Me,0),le=m.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);le||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),le=ge.unit.subarray()),$.splice(Ce,0,{unit:le,pts:F}),Me+=C,Ce++}}ge.pts=Me,Me+=C}for(var Ae=null,Ne=null,ie,de=0,we=$.length;we--;)de+=$[we].unit.byteLength;for(var De=0,Ke=$.length;De<Ke;De++){var Je=$[De],Ze=Je.unit,Qe=Je.pts;if(Ne!==null){var ut=z[De-1];ut.duration=Math.round((Qe-Ne)/D)}else if(d&&c.isAAC&&(Qe=fe),Ae=Qe,de>0){de+=he;try{ie=new Uint8Array(de)}catch(ee){this.observer.emit(H.Events.ERROR,H.Events.ERROR,{type:N.ErrorTypes.MUX_ERROR,details:N.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:de,reason:"fail allocating audio mdat "+de});return}if(!L){var tt=new DataView(ie.buffer);tt.setUint32(0,de),ie.set(S.default.types.mdat,4)}}else return;ie.set(Ze,he);var xe=Ze.byteLength;he+=xe,z.push(new y(!0,w,xe,0)),Ne=Qe}var Oe=z.length;if(!Oe)return;var Fe=z[z.length-1];this.nextAudioPts=fe=Ne+D*Fe.duration;var We=L?new Uint8Array(0):S.default.moof(c.sequenceNumber++,Ae/D,f({},c,{samples:z}));c.samples=[];var q=Ae/T,K=fe/T,G="audio",Q={data1:We,data2:ie,startPTS:q,endPTS:K,startDTS:q,endDTS:K,type:G,hasAudio:!0,hasVideo:!1,nb:Oe};return this.isAudioContiguous=!0,console.assert(ie.length,"MDAT length must not be zero"),Q},_.remuxEmptyAudio=function(c,p,d,x){var h=c.inputTimeScale,T=c.samplerate?c.samplerate:h,M=h/T,D=this.nextAudioPts,w=(D!==null?D:x.startDTS*h)+this._initDTS,C=x.endDTS*h+this._initDTS,j=M*a,L=Math.ceil((C-w)/j),z=m.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!z){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],he=0;he<L;he++){var fe=w+he*j;$.push({unit:z,pts:fe,dts:fe})}return c.samples=$,this.remuxAudio(c,p,d,!1)},_.remuxID3=function(c,p){var d=c.samples.length;if(!d)return;for(var x=c.inputTimeScale,h=this._initPTS,T=this._initDTS,M=0;M<d;M++){var D=c.samples[M];D.pts=t(D.pts-h,p*x)/x,D.dts=t(D.dts-T,p*x)/x}var w=c.samples;return c.samples=[],{samples:w}},_.remuxText=function(c,p){var d=c.samples.length;if(!d)return;for(var x=c.inputTimeScale,h=this._initPTS,T=0;T<d;T++){var M=c.samples[T];M.pts=t(M.pts-h,p*x)/x}c.samples.sort(function(w,C){return w.pts-C.pts});var D=c.samples;return c.samples=[],{samples:D}},E}();function t(E,_){var u;if(_===null)return E;for(_<E?u=-8589934592:u=8589934592;Math.abs(E-_)>4294967296;)E+=u;return E}function b(E){for(var _=0;_<E.length;_++)if(E[_].key)return _;return-1}var y=function(_,u,c,p){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=u,this.size=c,this.cts=p,this.flags=new g(_)},g=function(_){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=_?2:1,this.isNonSync=_?0:1}},"./src/remux/passthrough-remuxer.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/polyfills/number.ts"),m=O("./src/utils/mp4-tools.ts"),S=O("./src/loader/fragment.ts"),H=O("./src/utils/logger.ts"),N=function(){function v(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var f=v.prototype;return f.destroy=function(){},f.resetTimeStamp=function(a){this.initPTS=a,this.lastEndDTS=null},f.resetNextTimestamp=function(){this.lastEndDTS=null},f.resetInitSegment=function(a,r,o){this.audioCodec=r,this.videoCodec=o,this.generateInitSegment(a),this.emitInitSegment=!0},f.generateInitSegment=function(a){var r=this.audioCodec,o=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var s=this.initData=Object(m.parseInitSegment)(a);r||(r=A(s.audio,S.ElementaryStreamTypes.AUDIO)),o||(o=A(s.video,S.ElementaryStreamTypes.VIDEO));var i={};s.audio&&s.video?i.audiovideo={container:"video/mp4",codec:r+","+o,initSegment:a,id:"main"}:s.audio?i.audio={container:"audio/mp4",codec:r,initSegment:a,id:"audio"}:s.video?i.video={container:"video/mp4",codec:o,initSegment:a,id:"main"}:H.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},f.remux=function(a,r,o,s,i){var n=this.initPTS,t=this.lastEndDTS,b={audio:void 0,video:void 0,text:s,id3:o,initSegment:void 0};Object(U.isFiniteNumber)(t)||(t=this.lastEndDTS=i||0);var y=r.samples;if(!y||!y.length)return b;var g={initPTS:void 0,timescale:1},E=this.initData;if((!E||!E.length)&&(this.generateInitSegment(y),E=this.initData),!E||!E.length)return H.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),b;this.emitInitSegment&&(g.tracks=this.initTracks,this.emitInitSegment=!1),Object(U.isFiniteNumber)(n)||(this.initPTS=g.initPTS=n=e(E,y,t));var _=Object(m.getDuration)(y,E),u=t,c=_+u;Object(m.offsetStartDTS)(E,y,n),_>0?this.lastEndDTS=c:(H.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var p=!!E.audio,d=!!E.video,x="";p&&(x+="audio"),d&&(x+="video");var h={data1:y,startPTS:u,startDTS:u,endPTS:c,endDTS:c,type:x,hasAudio:p,hasVideo:d,nb:1,dropped:0};return b.audio=h.type==="audio"?h:void 0,b.video=h.type!=="audio"?h:void 0,b.text=s,b.id3=o,b.initSegment=g,b},v}(),e=function(f,l,a){return Object(m.getStartDTS)(f,l)-a};function A(v,f){var l=v==null?void 0:v.codec;return l&&l.length>4?l:l==="hvc1"?"hvc1.1.c.L120.90":l==="av01"?"av01.0.04M.08":l==="avc1"||f===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}k.default=N},"./src/task-loop.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return U});var U=function(){function m(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var S=m.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(N){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,N),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},m}()},"./src/types/cmcd.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"CMCDVersion",function(){return U}),O.d(k,"CMCDObjectType",function(){return m}),O.d(k,"CMCDStreamingFormat",function(){return S}),O.d(k,"CMCDStreamType",function(){return H});var U=1,m;(function(N){N.MANIFEST="m",N.AUDIO="a",N.VIDEO="v",N.MUXED="av",N.INIT="i",N.CAPTION="c",N.TIMED_TEXT="tt",N.KEY="k",N.OTHER="o"})(m||(m={}));var S;(function(N){N.DASH="d",N.HLS="h",N.SMOOTH="s",N.OTHER="o"})(S||(S={}));var H;(function(N){N.VOD="v",N.LIVE="l"})(H||(H={}))},"./src/types/level.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"HlsSkip",function(){return S}),O.d(k,"getSkipValue",function(){return H}),O.d(k,"HlsUrlParameters",function(){return N}),O.d(k,"Level",function(){return e});function U(A,v){for(var f=0;f<v.length;f++){var l=v[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(A,l.key,l)}}function m(A,v,f){return v&&U(A.prototype,v),f&&U(A,f),A}var S;(function(A){A.No="",A.Yes="YES",A.v2="v2"})(S||(S={}));function H(A,v){var f=A.canSkipUntil,l=A.canSkipDateRanges,a=A.endSN,r=v!==void 0?v-a:0;return f&&r<f?l?S.v2:S.Yes:S.No}var N=function(){function A(f,l,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=f,this.part=l,this.skip=a}var v=A.prototype;return v.addDirectives=function(l){var a=new self.URL(l);return this.msn!==void 0&&a.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&a.searchParams.set("_HLS_part",this.part.toString()),this.skip&&a.searchParams.set("_HLS_skip",this.skip),a.toString()},A}(),e=function(){function A(v){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[v.url],this.attrs=v.attrs,this.bitrate=v.bitrate,v.details&&(this.details=v.details),this.id=v.id||0,this.name=v.name,this.width=v.width||0,this.height=v.height||0,this.audioCodec=v.audioCodec,this.videoCodec=v.videoCodec,this.unknownCodecs=v.unknownCodecs,this.codecSet=[v.videoCodec,v.audioCodec].filter(function(f){return f}).join(",").replace(/\.[^.,]+/g,"")}return m(A,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(f){var l=f%this.url.length;this._urlId!==l&&(this.details=void 0,this._urlId=l)}}]),A}()},"./src/types/loader.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"PlaylistContextType",function(){return U}),O.d(k,"PlaylistLevelType",function(){return m});var U;(function(S){S.MANIFEST="manifest",S.LEVEL="level",S.AUDIO_TRACK="audioTrack",S.SUBTITLE_TRACK="subtitleTrack"})(U||(U={}));var m;(function(S){S.MAIN="main",S.AUDIO="audio",S.SUBTITLE="subtitle"})(m||(m={}))},"./src/types/transmuxer.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"ChunkMetadata",function(){return U});var U=function(H,N,e,A,v,f){A===void 0&&(A=0),v===void 0&&(v=-1),f===void 0&&(f=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=m(),this.buffering={audio:m(),video:m(),audiovideo:m()},this.level=H,this.sn=N,this.id=e,this.size=A,this.part=v,this.partial=f};function m(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"AttrList",function(){return S});var U=/^(\d+)x(\d+)$/,m=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,S=function(){function H(e){typeof e=="string"&&(e=H.parseAttrList(e));for(var A in e)e.hasOwnProperty(A)&&(this[A]=e[A])}var N=H.prototype;return N.decimalInteger=function(A){var v=parseInt(this[A],10);return v>Number.MAX_SAFE_INTEGER?Infinity:v},N.hexadecimalInteger=function(A){if(this[A]){var v=(this[A]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var f=new Uint8Array(v.length/2),l=0;l<v.length/2;l++)f[l]=parseInt(v.slice(l*2,l*2+2),16);return f}else return null},N.hexadecimalIntegerAsNumber=function(A){var v=parseInt(this[A],16);return v>Number.MAX_SAFE_INTEGER?Infinity:v},N.decimalFloatingPoint=function(A){return parseFloat(this[A])},N.optionalFloat=function(A,v){var f=this[A];return f?parseFloat(f):v},N.enumeratedString=function(A){return this[A]},N.bool=function(A){return this[A]==="YES"},N.decimalResolution=function(A){var v=U.exec(this[A]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},H.parseAttrList=function(A){var v,f={},l='"';for(m.lastIndex=0;(v=m.exec(A))!==null;){var a=v[2];a.indexOf(l)===0&&a.lastIndexOf(l)===a.length-1&&(a=a.slice(1,-1)),f[v[1]]=a}return f},H}()},"./src/utils/binary-search.ts":function(te,k,O){"use strict";O.r(k);var U={search:function(S,H){for(var N=0,e=S.length-1,A=null,v=null;N<=e;){A=(N+e)/2|0,v=S[A];var f=H(v);if(f>0)N=A+1;else if(f<0)e=A-1;else return v}return null}};k.default=U},"./src/utils/buffer-helper.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"BufferHelper",function(){return S});var U=O("./src/utils/logger.ts"),m={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function H(){}return H.isBuffered=function(e,A){try{if(e){for(var v=H.getBuffered(e),f=0;f<v.length;f++)if(A>=v.start(f)&&A<=v.end(f))return!0}}catch(l){}return!1},H.bufferInfo=function(e,A,v){try{if(e){var f=H.getBuffered(e),l=[],a;for(a=0;a<f.length;a++)l.push({start:f.start(a),end:f.end(a)});return this.bufferedInfo(l,A,v)}}catch(r){}return{len:0,start:A,end:A,nextStart:void 0}},H.bufferedInfo=function(e,A,v){A=Math.max(0,A),e.sort(function(g,E){var _=g.start-E.start;return _||E.end-g.end});var f=[];if(v)for(var l=0;l<e.length;l++){var a=f.length;if(a){var r=f[a-1].end;e[l].start-r<v?e[l].end>r&&(f[a-1].end=e[l].end):f.push(e[l])}else f.push(e[l])}else f=e;for(var o=0,s,i=A,n=A,t=0;t<f.length;t++){var b=f[t].start,y=f[t].end;if(A+v>=b&&A<y)i=b,n=y,o=n-A;else if(A+v<b){s=b;break}}return{len:o,start:i||0,end:n||0,nextStart:s}},H.getBuffered=function(e){try{return e.buffered}catch(A){return U.logger.log("failed to get media.buffered",A),m}},H}()},"./src/utils/cea-608-parser.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"Row",function(){return n}),O.d(k,"CaptionScreen",function(){return t});var U=O("./src/utils/logger.ts"),m={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},S=function(c){var p=c;return m.hasOwnProperty(c)&&(p=m[c]),String.fromCharCode(p)},H=15,N=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},A={17:2,18:4,21:6,22:8,23:10,19:13,20:15},v={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},l=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],a;(function(u){u[u.ERROR=0]="ERROR",u[u.TEXT=1]="TEXT",u[u.WARNING=2]="WARNING",u[u.INFO=2]="INFO",u[u.DEBUG=3]="DEBUG",u[u.DATA=3]="DATA"})(a||(a={}));var r=function(){function u(){this.time=null,this.verboseLevel=a.ERROR}var c=u.prototype;return c.log=function(d,x){this.verboseLevel>=d&&U.logger.log(this.time+" ["+d+"] "+x)},u}(),o=function(c){for(var p=[],d=0;d<c.length;d++)p.push(c[d].toString(16));return p},s=function(){function u(p,d,x,h,T){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=p||"white",this.underline=d||!1,this.italics=x||!1,this.background=h||"black",this.flash=T||!1}var c=u.prototype;return c.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},c.setStyles=function(d){for(var x=["foreground","underline","italics","background","flash"],h=0;h<x.length;h++){var T=x[h];d.hasOwnProperty(T)&&(this[T]=d[T])}},c.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},c.equals=function(d){return this.foreground===d.foreground&&this.underline===d.underline&&this.italics===d.italics&&this.background===d.background&&this.flash===d.flash},c.copy=function(d){this.foreground=d.foreground,this.underline=d.underline,this.italics=d.italics,this.background=d.background,this.flash=d.flash},c.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},u}(),i=function(){function u(p,d,x,h,T,M){this.uchar=void 0,this.penState=void 0,this.uchar=p||" ",this.penState=new s(d,x,h,T,M)}var c=u.prototype;return c.reset=function(){this.uchar=" ",this.penState.reset()},c.setChar=function(d,x){this.uchar=d,this.penState.copy(x)},c.setPenState=function(d){this.penState.copy(d)},c.equals=function(d){return this.uchar===d.uchar&&this.penState.equals(d.penState)},c.copy=function(d){this.uchar=d.uchar,this.penState.copy(d.penState)},c.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},u}(),n=function(){function u(p){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var d=0;d<N;d++)this.chars.push(new i);this.logger=p,this.pos=0,this.currPenState=new s}var c=u.prototype;return c.equals=function(d){for(var x=!0,h=0;h<N;h++)if(!this.chars[h].equals(d.chars[h])){x=!1;break}return x},c.copy=function(d){for(var x=0;x<N;x++)this.chars[x].copy(d.chars[x])},c.isEmpty=function(){for(var d=!0,x=0;x<N;x++)if(!this.chars[x].isEmpty()){d=!1;break}return d},c.setCursor=function(d){this.pos!==d&&(this.pos=d),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>N&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=N)},c.moveCursor=function(d){var x=this.pos+d;if(d>1)for(var h=this.pos+1;h<x+1;h++)this.chars[h].setPenState(this.currPenState);this.setCursor(x)},c.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},c.insertChar=function(d){d>=144&&this.backSpace();var x=S(d);if(this.pos>=N){this.logger.log(a.ERROR,"Cannot insert "+d.toString(16)+" ("+x+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(x,this.currPenState),this.moveCursor(1)},c.clearFromPos=function(d){var x;for(x=d;x<N;x++)this.chars[x].reset()},c.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},c.clearToEndOfRow=function(){this.clearFromPos(this.pos)},c.getTextString=function(){for(var d=[],x=!0,h=0;h<N;h++){var T=this.chars[h].uchar;T!==" "&&(x=!1),d.push(T)}return x?"":d.join("")},c.setPenStyles=function(d){this.currPenState.setStyles(d);var x=this.chars[this.pos];x.setPenState(this.currPenState)},u}(),t=function(){function u(p){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var d=0;d<H;d++)this.rows.push(new n(p));this.logger=p,this.currRow=H-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var c=u.prototype;return c.reset=function(){for(var d=0;d<H;d++)this.rows[d].clear();this.currRow=H-1},c.equals=function(d){for(var x=!0,h=0;h<H;h++)if(!this.rows[h].equals(d.rows[h])){x=!1;break}return x},c.copy=function(d){for(var x=0;x<H;x++)this.rows[x].copy(d.rows[x])},c.isEmpty=function(){for(var d=!0,x=0;x<H;x++)if(!this.rows[x].isEmpty()){d=!1;break}return d},c.backSpace=function(){var d=this.rows[this.currRow];d.backSpace()},c.clearToEndOfRow=function(){var d=this.rows[this.currRow];d.clearToEndOfRow()},c.insertChar=function(d){var x=this.rows[this.currRow];x.insertChar(d)},c.setPen=function(d){var x=this.rows[this.currRow];x.setPenStyles(d)},c.moveCursor=function(d){var x=this.rows[this.currRow];x.moveCursor(d)},c.setCursor=function(d){this.logger.log(a.INFO,"setCursor: "+d);var x=this.rows[this.currRow];x.setCursor(d)},c.setPAC=function(d){this.logger.log(a.INFO,"pacData = "+JSON.stringify(d));var x=d.row-1;if(this.nrRollUpRows&&x<this.nrRollUpRows-1&&(x=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==x){for(var h=0;h<H;h++)this.rows[h].clear();var T=this.currRow+1-this.nrRollUpRows,M=this.lastOutputScreen;if(M){var D=M.rows[T].cueStartTime,w=this.logger.time;if(D&&w!==null&&D<w)for(var C=0;C<this.nrRollUpRows;C++)this.rows[x-this.nrRollUpRows+C+1].copy(M.rows[T+C])}}this.currRow=x;var j=this.rows[this.currRow];if(d.indent!==null){var L=d.indent,z=Math.max(L-1,0);j.setCursor(d.indent),d.color=j.chars[z].penState.foreground}var $={foreground:d.color,underline:d.underline,italics:d.italics,background:"black",flash:!1};this.setPen($)},c.setBkgData=function(d){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(d)),this.backSpace(),this.setPen(d),this.insertChar(32)},c.setRollUpRows=function(d){this.nrRollUpRows=d},c.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(a.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(a.TEXT,this.getDisplayText());var d=this.currRow+1-this.nrRollUpRows,x=this.rows.splice(d,1)[0];x.clear(),this.rows.splice(this.currRow,0,x),this.logger.log(a.INFO,"Rolling up")},c.getDisplayText=function(d){d=d||!1;for(var x=[],h="",T=-1,M=0;M<H;M++){var D=this.rows[M].getTextString();D&&(T=M+1,d?x.push("Row "+T+": '"+D+"'"):x.push(D.trim()))}return x.length>0&&(d?h="["+x.join(" | ")+"]":h=x.join(`
|
|
`)),h},c.getTextAndFormat=function(){return this.rows},u}(),b=function(){function u(p,d,x){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=p,this.outputFilter=d,this.mode=null,this.verbose=0,this.displayedMemory=new t(x),this.nonDisplayedMemory=new t(x),this.lastOutputScreen=new t(x),this.currRollUpRow=this.displayedMemory.rows[H-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=x}var c=u.prototype;return c.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[H-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},c.getHandler=function(){return this.outputFilter},c.setHandler=function(d){this.outputFilter=d},c.setPAC=function(d){this.writeScreen.setPAC(d)},c.setBkgData=function(d){this.writeScreen.setBkgData(d)},c.setMode=function(d){if(d===this.mode)return;this.mode=d,this.logger.log(a.INFO,"MODE="+d),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=d},c.insertChars=function(d){for(var x=0;x<d.length;x++)this.writeScreen.insertChar(d[x]);var h=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,h+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(a.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},c.ccRCL=function(){this.logger.log(a.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},c.ccBS=function(){if(this.logger.log(a.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},c.ccAOF=function(){},c.ccAON=function(){},c.ccDER=function(){this.logger.log(a.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},c.ccRU=function(d){this.logger.log(a.INFO,"RU("+d+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(d)},c.ccFON=function(){this.logger.log(a.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},c.ccRDC=function(){this.logger.log(a.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},c.ccTR=function(){this.logger.log(a.INFO,"TR"),this.setMode("MODE_TEXT")},c.ccRTD=function(){this.logger.log(a.INFO,"RTD"),this.setMode("MODE_TEXT")},c.ccEDM=function(){this.logger.log(a.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},c.ccCR=function(){this.logger.log(a.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},c.ccENM=function(){this.logger.log(a.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},c.ccEOC=function(){if(this.logger.log(a.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var d=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=d,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},c.ccTO=function(d){this.logger.log(a.INFO,"TO("+d+") - Tab Offset"),this.writeScreen.moveCursor(d)},c.ccMIDROW=function(d){var x={flash:!1};if(x.underline=d%2===1,x.italics=d>=46,x.italics)x.foreground="white";else{var h=Math.floor(d/2)-16,T=["white","green","blue","cyan","red","yellow","magenta"];x.foreground=T[h]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(x)),this.writeScreen.setPen(x)},c.outputDataUpdate=function(d){d===void 0&&(d=!1);var x=this.logger.time;if(x===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=x:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,x,this.lastOutputScreen),d&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:x),this.lastOutputScreen.copy(this.displayedMemory))},c.cueSplitAtTime=function(d){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,d,this.displayedMemory),this.cueStartTime=d))},u}(),y=function(){function u(p,d,x){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var h=new r;this.channels=[null,new b(p,d,h),new b(p+1,x,h)],this.cmdHistory=_(),this.logger=h}var c=u.prototype;return c.getHandler=function(d){return this.channels[d].getHandler()},c.setHandler=function(d,x){this.channels[d].setHandler(x)},c.addData=function(d,x){var h,T,M,D=!1;this.logger.time=d;for(var w=0;w<x.length;w+=2){if(T=x[w]&127,M=x[w+1]&127,T===0&&M===0)continue;if(this.logger.log(a.DATA,"["+o([x[w],x[w+1]])+"] -> ("+o([T,M])+")"),h=this.parseCmd(T,M),h||(h=this.parseMidrow(T,M)),h||(h=this.parsePAC(T,M)),h||(h=this.parseBackgroundAttributes(T,M)),!h&&(D=this.parseChars(T,M),D)){var C=this.currentChannel;if(C&&C>0){var j=this.channels[C];j.insertChars(D)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!h&&!D&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+o([T,M])+" orig: "+o([x[w],x[w+1]]))}},c.parseCmd=function(d,x){var h=this.cmdHistory,T=(d===20||d===28||d===21||d===29)&&x>=32&&x<=47,M=(d===23||d===31)&&x>=33&&x<=35;if(!(T||M))return!1;if(E(d,x,h))return g(null,null,h),this.logger.log(a.DEBUG,"Repeated command ("+o([d,x])+") is dropped"),!0;var D=d===20||d===21||d===23?1:2,w=this.channels[D];return d===20||d===21||d===28||d===29?x===32?w.ccRCL():x===33?w.ccBS():x===34?w.ccAOF():x===35?w.ccAON():x===36?w.ccDER():x===37?w.ccRU(2):x===38?w.ccRU(3):x===39?w.ccRU(4):x===40?w.ccFON():x===41?w.ccRDC():x===42?w.ccTR():x===43?w.ccRTD():x===44?w.ccEDM():x===45?w.ccCR():x===46?w.ccENM():x===47&&w.ccEOC():w.ccTO(x-32),g(d,x,h),this.currentChannel=D,!0},c.parseMidrow=function(d,x){var h=0;if((d===17||d===25)&&x>=32&&x<=47){if(d===17?h=1:h=2,h!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var T=this.channels[h];return T?(T.ccMIDROW(x),this.logger.log(a.DEBUG,"MIDROW ("+o([d,x])+")"),!0):!1}return!1},c.parsePAC=function(d,x){var h,T=this.cmdHistory,M=(d>=17&&d<=23||d>=25&&d<=31)&&x>=64&&x<=127,D=(d===16||d===24)&&x>=64&&x<=95;if(!(M||D))return!1;if(E(d,x,T))return g(null,null,T),!0;var w=d<=23?1:2;x>=64&&x<=95?h=w===1?e[d]:v[d]:h=w===1?A[d]:f[d];var C=this.channels[w];return C?(C.setPAC(this.interpretPAC(h,x)),g(d,x,T),this.currentChannel=w,!0):!1},c.interpretPAC=function(d,x){var h,T={color:null,italics:!1,indent:null,underline:!1,row:d};return x>95?h=x-96:h=x-64,T.underline=(h&1)===1,h<=13?T.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(h/2)]:h<=15?(T.italics=!0,T.color="white"):T.indent=Math.floor((h-16)/2)*4,T},c.parseChars=function(d,x){var h,T=null,M=null;if(d>=25?(h=2,M=d-8):(h=1,M=d),M>=17&&M<=19){var D;M===17?D=x+80:M===18?D=x+112:D=x+144,this.logger.log(a.INFO,"Special char '"+S(D)+"' in channel "+h),T=[D]}else d>=32&&d<=127&&(T=x===0?[d]:[d,x]);if(T){var w=o(T);this.logger.log(a.DEBUG,"Char codes = "+w.join(",")),g(d,x,this.cmdHistory)}return T},c.parseBackgroundAttributes=function(d,x){var h=(d===16||d===24)&&x>=32&&x<=47,T=(d===23||d===31)&&x>=45&&x<=47;if(!(h||T))return!1;var M,D={};d===16||d===24?(M=Math.floor((x-32)/2),D.background=l[M],x%2===1&&(D.background=D.background+"_semi")):x===45?D.background="transparent":(D.foreground="black",x===47&&(D.underline=!0));var w=d<=23?1:2,C=this.channels[w];return C.setBkgData(D),g(d,x,this.cmdHistory),!0},c.reset=function(){for(var d=0;d<Object.keys(this.channels).length;d++){var x=this.channels[d];x&&x.reset()}this.cmdHistory=_()},c.cueSplitAtTime=function(d){for(var x=0;x<this.channels.length;x++){var h=this.channels[x];h&&h.cueSplitAtTime(d)}},u}();function g(u,c,p){p.a=u,p.b=c}function E(u,c,p){return p.a===u&&p.b===c}function _(){return{a:null,b:null}}k.default=y},"./src/utils/codecs.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"isCodecType",function(){return m}),O.d(k,"isCodecSupportedInMp4",function(){return S});var U={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function m(H,N){var e=U[N];return!!e&&e[H.slice(0,4)]===!0}function S(H,N){return MediaSource.isTypeSupported((N||"video")+'/mp4;codecs="'+H+'"')}},"./src/utils/cues.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/utils/vttparser.ts"),m=O("./src/utils/webvtt-parser.ts"),S=O("./src/utils/texttrack-utils.ts"),H=/\s/,N={newCue:function(A,v,f,l){for(var a=[],r,o,s,i,n,t=self.VTTCue||self.TextTrackCue,b=0;b<l.rows.length;b++)if(r=l.rows[b],s=!0,i=0,n="",!r.isEmpty()){for(var y=0;y<r.chars.length;y++)H.test(r.chars[y].uchar)&&s?i++:(n+=r.chars[y].uchar,s=!1);r.cueStartTime=v,v===f&&(f+=1e-4),i>=16?i--:i++;var g=Object(U.fixLineBreaks)(n.trim()),E=Object(m.generateCueId)(v,f,g);(!A||!A.cues||!A.cues.getCueById(E))&&(o=new t(v,f,g),o.id=E,o.line=b+1,o.align="left",o.position=10+Math.min(80,Math.floor(i*8/32)*10),a.push(o))}return A&&a.length&&(a.sort(function(_,u){return _.line==="auto"||u.line==="auto"?0:_.line>8&&u.line>8?u.line-_.line:_.line-u.line}),a.forEach(function(_){return Object(S.addCueToTrack)(A,_)})),a}};k.default=N},"./src/utils/discontinuities.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"findFirstFragWithCC",function(){return H}),O.d(k,"shouldAlignOnDiscontinuities",function(){return N}),O.d(k,"findDiscontinuousReferenceFrag",function(){return e}),O.d(k,"adjustSlidingStart",function(){return v}),O.d(k,"alignStream",function(){return f}),O.d(k,"alignPDT",function(){return a}),O.d(k,"alignFragmentByPDTDelta",function(){return r}),O.d(k,"alignMediaPlaylistByPDT",function(){return o});var U=O("./src/polyfills/number.ts"),m=O("./src/utils/logger.ts"),S=O("./src/controller/level-helper.ts");function H(s,i){for(var n=null,t=0,b=s.length;t<b;t++){var y=s[t];if(y&&y.cc===i){n=y;break}}return n}function N(s,i,n){return!!(i.details&&(n.endCC>n.startCC||s&&s.cc<n.startCC))}function e(s,i){var n=s.fragments,t=i.fragments;if(!t.length||!n.length){m.logger.log("No fragments to align");return}var b=H(n,t[0].cc);if(!b||b&&!b.startPTS){m.logger.log("No frag in previous level to align on");return}return b}function A(s,i){if(s){var n=s.start+i;s.start=s.startPTS=n,s.endPTS=n+s.duration}}function v(s,i){for(var n=i.fragments,t=0,b=n.length;t<b;t++)A(n[t],s);i.fragmentHint&&A(i.fragmentHint,s),i.alignedSliding=!0}function f(s,i,n){if(!i)return;l(s,n,i),!n.alignedSliding&&i.details&&a(n,i.details),!n.alignedSliding&&i.details&&!n.skippedSegments&&Object(S.adjustSliding)(i.details,n)}function l(s,i,n){if(N(s,n,i)){var t=e(n.details,i);t&&Object(U.isFiniteNumber)(t.start)&&(m.logger.log("Adjusting PTS using last level due to CC increase within current level "+i.url),v(t.start,i))}}function a(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var n=i.fragments[0].programDateTime,t=s.fragments[0].programDateTime,b=(t-n)/1e3+i.fragments[0].start;b&&Object(U.isFiniteNumber)(b)&&(m.logger.log("Adjusting PTS using programDateTime delta "+(t-n)+"ms, sliding:"+b.toFixed(3)+" "+s.url+" "),v(b,s))}function r(s,i){var n=s.programDateTime;if(!n)return;var t=(n-i)/1e3;s.start=s.startPTS=t,s.endPTS=t+s.duration}function o(s,i){if(!i.fragments.length||!s.hasProgramDateTime||!i.hasProgramDateTime)return;var n=i.fragments[0].programDateTime,t=i.fragments[0].start,b=n-t*1e3;s.fragments.forEach(function(y){r(y,b)}),s.fragmentHint&&r(s.fragmentHint,b),s.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/utils/ewma.ts"),m=function(){function S(N,e,A){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=A,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new U.default(N),this.fast_=new U.default(e)}var H=S.prototype;return H.update=function(e,A){var v=this.slow_,f=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new U.default(e,v.getEstimate(),v.getTotalWeight())),this.fast_.halfLife!==A&&(this.fast_=new U.default(A,f.getEstimate(),f.getTotalWeight()))},H.sample=function(e,A){e=Math.max(e,this.minDelayMs_);var v=8*A,f=e/1e3,l=v/f;this.fast_.sample(f,l),this.slow_.sample(f,l)},H.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},H.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},H.destroy=function(){},S}();k.default=m},"./src/utils/ewma.ts":function(te,k,O){"use strict";O.r(k);var U=function(){function m(H,N,e){N===void 0&&(N=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=H,this.alpha_=H?Math.exp(Math.log(.5)/H):0,this.estimate_=N,this.totalWeight_=e}var S=m.prototype;return S.sample=function(N,e){var A=Math.pow(this.alpha_,N);this.estimate_=e*(1-A)+A*this.estimate_,this.totalWeight_+=N},S.getTotalWeight=function(){return this.totalWeight_},S.getEstimate=function(){if(this.alpha_){var N=1-Math.pow(this.alpha_,this.totalWeight_);if(N)return this.estimate_/N}return this.estimate_},m}();k.default=U},"./src/utils/fetch-loader.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"fetchSupported",function(){return r});var U=O("./src/polyfills/number.ts"),m=O("./src/loader/load-stats.ts"),S=O("./src/demux/chunk-cache.ts");function H(t,b){t.prototype=Object.create(b.prototype),t.prototype.constructor=t,f(t,b)}function N(t){var b=typeof Map=="function"?new Map:void 0;return N=function(g){if(g===null||!v(g))return g;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(typeof b!="undefined"){if(b.has(g))return b.get(g);b.set(g,E)}function E(){return e(g,arguments,l(this).constructor)}return E.prototype=Object.create(g.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),f(E,g)},N(t)}function e(t,b,y){return A()?e=Reflect.construct:e=function(E,_,u){var c=[null];c.push.apply(c,_);var p=Function.bind.apply(E,c),d=new p;return u&&f(d,u.prototype),d},e.apply(null,arguments)}function A(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function v(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function f(t,b){return f=Object.setPrototypeOf||function(g,E){return g.__proto__=E,g},f(t,b)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},l(t)}function a(){return a=Object.assign||function(t){for(var b=1;b<arguments.length;b++){var y=arguments[b];for(var g in y)Object.prototype.hasOwnProperty.call(y,g)&&(t[g]=y[g])}return t},a.apply(this,arguments)}function r(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var o=function(){function t(y){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=y.fetchSetup||i,this.controller=new self.AbortController,this.stats=new m.LoadStats}var b=t.prototype;return b.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},b.abortInternal=function(){var g=this.response;(!g||!g.ok)&&(this.stats.aborted=!0,this.controller.abort())},b.abort=function(){var g;this.abortInternal(),(g=this.callbacks)!==null&&g!==void 0&&g.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},b.load=function(g,E,_){var u=this,c=this.stats;if(c.loading.start)throw new Error("Loader can only be used once.");c.loading.start=self.performance.now();var p=s(g,this.controller.signal),d=_.onProgress,x=g.responseType==="arraybuffer",h=x?"byteLength":"length";this.context=g,this.config=E,this.callbacks=_,this.request=this.fetchSetup(g,p),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){u.abortInternal(),_.onTimeout(c,g,u.response)},E.timeout),self.fetch(this.request).then(function(T){if(u.response=u.loader=T,!T.ok){var M=T.status,D=T.statusText;throw new n(D||"fetch, bad network response",M,T)}return c.loading.first=Math.max(self.performance.now(),c.loading.start),c.total=parseInt(T.headers.get("Content-Length")||"0"),d&&Object(U.isFiniteNumber)(E.highWaterMark)?u.loadProgressively(T,c,g,E.highWaterMark,d):x?T.arrayBuffer():T.text()}).then(function(T){var M=u.response;self.clearTimeout(u.requestTimeout),c.loading.end=Math.max(self.performance.now(),c.loading.first),c.loaded=c.total=T[h];var D={url:M.url,data:T};d&&!Object(U.isFiniteNumber)(E.highWaterMark)&&d(c,g,T,M),_.onSuccess(D,c,g,M)}).catch(function(T){if(self.clearTimeout(u.requestTimeout),c.aborted)return;var M=T.code||0;_.onError({code:M,text:T.message},g,T.details)})},b.getCacheAge=function(){var g=null;if(this.response){var E=this.response.headers.get("age");g=E?parseFloat(E):null}return g},b.loadProgressively=function(g,E,_,u,c){u===void 0&&(u=0);var p=new S.default,d=g.body.getReader(),x=function h(){return d.read().then(function(T){if(T.done)return p.dataLength&&c(E,_,p.flush(),g),Promise.resolve(new ArrayBuffer(0));var M=T.value,D=M.length;return E.loaded+=D,D<u||p.dataLength?(p.push(M),p.dataLength>=u&&c(E,_,p.flush(),g)):c(E,_,M,g),h()}).catch(function(){return Promise.reject()})};return x()},t}();function s(t,b){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:b,headers:new self.Headers(a({},t.headers))};return t.rangeEnd&&y.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),y}function i(t,b){return new self.Request(t.url,b)}var n=function(t){H(b,t);function b(y,g,E){var _;return _=t.call(this,y)||this,_.code=void 0,_.details=void 0,_.code=g,_.details=E,_}return b}(N(Error));k.default=o},"./src/utils/imsc1-ttml-parser.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"IMSC1_CODEC",function(){return v}),O.d(k,"parseIMSC1",function(){return r});var U=O("./src/utils/mp4-tools.ts"),m=O("./src/utils/vttparser.ts"),S=O("./src/utils/vttcue.ts"),H=O("./src/demux/id3.ts"),N=O("./src/utils/timescale-conversion.ts"),e=O("./src/utils/webvtt-parser.ts");function A(){return A=Object.assign||function(u){for(var c=1;c<arguments.length;c++){var p=arguments[c];for(var d in p)Object.prototype.hasOwnProperty.call(p,d)&&(u[d]=p[d])}return u},A.apply(this,arguments)}var v="stpp.ttml.im1t",f=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,l=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,a={left:"start",center:"center",right:"end",start:"start",end:"end"};function r(u,c,p,d,x){var h=Object(U.findBox)(new Uint8Array(u),["mdat"]);if(h.length===0){x(new Error("Could not parse IMSC1 mdat"));return}var T=h[0],M=Object(H.utf8ArrayToStr)(new Uint8Array(u,T.start,T.end-T.start)),D=Object(N.toTimescaleFromScale)(c,1,p);try{d(o(M,D))}catch(w){x(w)}}function o(u,c){var p=new DOMParser,d=p.parseFromString(u,"text/xml"),x=d.getElementsByTagName("tt")[0];if(!x)throw new Error("Invalid ttml");var h={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},T=Object.keys(h).reduce(function(j,L){return j[L]=x.getAttribute("ttp:"+L)||h[L],j},{}),M=x.getAttribute("xml:space")!=="preserve",D=i(s(x,"styling","style")),w=i(s(x,"layout","region")),C=s(x,"body","[begin]");return[].map.call(C,function(j){var L=n(j,M);if(!L||!j.hasAttribute("begin"))return null;var z=g(j.getAttribute("begin"),T),$=g(j.getAttribute("dur"),T),he=g(j.getAttribute("end"),T);if(z===null)throw y(j);if(he===null){if($===null)throw y(j);he=z+$}var fe=new S.default(z-c,he-c,L);fe.id=Object(e.generateCueId)(fe.startTime,fe.endTime,fe.text);var Ie=w[j.getAttribute("region")],Se=D[j.getAttribute("style")];fe.position=10,fe.size=80;var pe=t(Ie,Se),Ce=pe.textAlign;if(Ce){var Me=a[Ce];Me&&(fe.lineAlign=Me),fe.align=Ce}return A(fe,pe),fe}).filter(function(j){return j!==null})}function s(u,c,p){var d=u.getElementsByTagName(c)[0];return d?[].slice.call(d.querySelectorAll(p)):[]}function i(u){return u.reduce(function(c,p){var d=p.getAttribute("xml:id");return d&&(c[d]=p),c},{})}function n(u,c){return[].slice.call(u.childNodes).reduce(function(p,d,x){var h;return d.nodeName==="br"&&x?p+`
|
|
`:(h=d.childNodes)!==null&&h!==void 0&&h.length?n(d,c):c?p+d.textContent.trim().replace(/\s+/g," "):p+d.textContent},"")}function t(u,c){var p="http://www.w3.org/ns/ttml#styling",d=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return d.reduce(function(x,h){var T=b(c,p,h)||b(u,p,h);return T&&(x[h]=T),x},{})}function b(u,c,p){return u.hasAttributeNS(c,p)?u.getAttributeNS(c,p):null}function y(u){return new Error("Could not parse ttml timestamp "+u)}function g(u,c){if(!u)return null;var p=Object(m.parseTimeStamp)(u);return p===null&&(f.test(u)?p=E(u,c):l.test(u)&&(p=_(u,c))),p}function E(u,c){var p=f.exec(u),d=(p[4]|0)+(p[5]|0)/c.subFrameRate;return(p[1]|0)*3600+(p[2]|0)*60+(p[3]|0)+d/c.frameRate}function _(u,c){var p=l.exec(u),d=Number(p[1]),x=p[2];switch(x){case"h":return d*3600;case"m":return d*60;case"ms":return d*1e3;case"f":return d/c.frameRate;case"t":return d/c.tickRate}return d}},"./src/utils/logger.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"enableLogs",function(){return e}),O.d(k,"logger",function(){return A});var U=function(){},m={trace:U,debug:U,log:U,warn:U,info:U,error:U},S=m;function H(v){var f=self.console[v];return f?f.bind(self.console,"["+v+"] >"):U}function N(v){for(var f=arguments.length,l=new Array(f>1?f-1:0),a=1;a<f;a++)l[a-1]=arguments[a];l.forEach(function(r){S[r]=v[r]?v[r].bind(v):H(r)})}function e(v){if(self.console&&v===!0||typeof v=="object"){N(v,"debug","log","info","warn","error");try{S.log()}catch(f){S=m}}else S=m}var A=S},"./src/utils/mediakeys-helper.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"KeySystems",function(){return U}),O.d(k,"requestMediaKeySystemAccess",function(){return m});var U;(function(S){S.WIDEVINE="com.widevine.alpha",S.PLAYREADY="com.microsoft.playready"})(U||(U={}));var m=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"getMediaSource",function(){return U});function U(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"bin2str",function(){return N}),O.d(k,"readUint16",function(){return e}),O.d(k,"readUint32",function(){return A}),O.d(k,"writeUint32",function(){return v}),O.d(k,"findBox",function(){return f}),O.d(k,"parseSegmentIndex",function(){return l}),O.d(k,"parseInitSegment",function(){return a}),O.d(k,"getStartDTS",function(){return r}),O.d(k,"getDuration",function(){return o}),O.d(k,"computeRawDurationFromSamples",function(){return s}),O.d(k,"offsetStartDTS",function(){return i}),O.d(k,"segmentValidRange",function(){return n}),O.d(k,"appendUint8Array",function(){return t});var U=O("./src/utils/typed-array.ts"),m=O("./src/loader/fragment.ts"),S=Math.pow(2,32)-1,H=[].push;function N(b){return String.fromCharCode.apply(null,b)}function e(b,y){"data"in b&&(y+=b.start,b=b.data);var g=b[y]<<8|b[y+1];return g<0?65536+g:g}function A(b,y){"data"in b&&(y+=b.start,b=b.data);var g=b[y]<<24|b[y+1]<<16|b[y+2]<<8|b[y+3];return g<0?4294967296+g:g}function v(b,y,g){"data"in b&&(y+=b.start,b=b.data),b[y]=g>>24,b[y+1]=g>>16&255,b[y+2]=g>>8&255,b[y+3]=g&255}function f(b,y){var g=[];if(!y.length)return g;var E,_,u;"data"in b?(E=b.data,_=b.start,u=b.end):(E=b,_=0,u=E.byteLength);for(var c=_;c<u;){var p=A(E,c),d=N(E.subarray(c+4,c+8)),x=p>1?c+p:u;if(d===y[0])if(y.length===1)g.push({data:E,start:c+8,end:x});else{var h=f({data:E,start:c+8,end:x},y.slice(1));h.length&&H.apply(g,h)}c=x}return g}function l(b){var y=f(b,["moov"]),g=y[0],E=g?g.end:null,_=f(b,["sidx"]);if(!_||!_[0])return null;var u=[],c=_[0],p=c.data[0],d=p===0?8:16,x=A(c,d);d+=4;var h=0,T=0;p===0?d+=8:d+=16,d+=2;var M=c.end+T,D=e(c,d);d+=2;for(var w=0;w<D;w++){var C=d,j=A(c,C);C+=4;var L=j&2147483647,z=(j&2147483648)>>>31;if(z===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=A(c,C);C+=4,u.push({referenceSize:L,subsegmentDuration:$,info:{duration:$/x,start:M,end:M+L-1}}),M+=L,C+=4,d=C}return{earliestPresentationTime:h,timescale:x,version:p,referencesCount:D,references:u,moovEndOffset:E}}function a(b){for(var y=[],g=f(b,["moov","trak"]),E=0;E<g.length;E++){var _=g[E],u=f(_,["tkhd"])[0];if(u){var c=u.data[u.start],p=c===0?12:20,d=A(u,p),x=f(_,["mdia","mdhd"])[0];if(x){c=x.data[x.start],p=c===0?12:20;var h=A(x,p),T=f(_,["mdia","hdlr"])[0];if(T){var M=N(T.data.subarray(T.start+8,T.start+12)),D={soun:m.ElementaryStreamTypes.AUDIO,vide:m.ElementaryStreamTypes.VIDEO}[M];if(D){var w=f(_,["mdia","minf","stbl","stsd"])[0],C=void 0;w&&(C=N(w.data.subarray(w.start+12,w.start+16))),y[d]={timescale:h,type:D},y[D]={timescale:h,id:d,codec:C}}}}}}var j=f(b,["moov","mvex","trex"]);return j.forEach(function(L){var z=A(L,4),$=y[z];$&&($.default={duration:A(L,12),flags:A(L,20)})}),y}function r(b,y){return f(y,["moof","traf"]).reduce(function(g,E){var _=f(E,["tfdt"])[0],u=_.data[_.start],c=f(E,["tfhd"]).reduce(function(p,d){var x=A(d,4),h=b[x];if(h){var T=A(_,4);u===1&&(T*=Math.pow(2,32),T+=A(_,8));var M=h.timescale||9e4,D=T/M;if(isFinite(D)&&(p===null||D<p))return D}return p},null);return c!==null&&isFinite(c)&&(g===null||c<g)?c:g},null)||0}function o(b,y){for(var g=0,E=0,_=0,u=f(b,["moof","traf"]),c=0;c<u.length;c++){var p=u[c],d=f(p,["tfhd"])[0],x=A(d,4),h=y[x];if(!h)continue;var T=h.default,M=A(d,0)|(T==null?void 0:T.flags),D=T==null?void 0:T.duration;M&8&&(M&2?D=A(d,12):D=A(d,8));for(var w=h.timescale||9e4,C=f(p,["trun"]),j=0;j<C.length;j++){if(D){var L=A(C[j],4);g=D*L}else g=s(C[j]);h.type===m.ElementaryStreamTypes.VIDEO?E+=g/w:h.type===m.ElementaryStreamTypes.AUDIO&&(_+=g/w)}}if(E===0&&_===0){var z=l(b);if(z!=null&&z.references)return z.references.reduce(function($,he){return $+he.info.duration||0},0)}return E||_}function s(b){var y=A(b,0),g=8;y&1&&(g+=4),y&4&&(g+=4);for(var E=0,_=A(b,4),u=0;u<_;u++){if(y&256){var c=A(b,g);E+=c,g+=4}y&512&&(g+=4),y&1024&&(g+=4),y&2048&&(g+=4)}return E}function i(b,y,g){f(y,["moof","traf"]).forEach(function(E){f(E,["tfhd"]).forEach(function(_){var u=A(_,4),c=b[u];if(!c)return;var p=c.timescale||9e4;f(E,["tfdt"]).forEach(function(d){var x=d.data[d.start],h=A(d,4);if(x===0)v(d,4,h-g*p);else{h*=Math.pow(2,32),h+=A(d,8),h-=g*p,h=Math.max(h,0);var T=Math.floor(h/(S+1)),M=Math.floor(h%(S+1));v(d,4,T),v(d,8,M)}})})})}function n(b){var y={valid:null,remainder:null},g=f(b,["moof"]);if(g){if(g.length<2)return y.remainder=b,y}else return y;var E=g[g.length-1];return y.valid=Object(U.sliceUint8)(b,0,E.start-8),y.remainder=Object(U.sliceUint8)(b,E.start-8),y}function t(b,y){var g=new Uint8Array(b.length+y.length);return g.set(b),g.set(y,b.length),g}},"./src/utils/output-filter.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"default",function(){return U});var U=function(){function m(H,N){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=H,this.trackName=N}var S=m.prototype;return S.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},S.newCue=function(N,e,A){(this.startTime===null||this.startTime>N)&&(this.startTime=N),this.endTime=e,this.screen=A,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},m}()},"./src/utils/texttrack-utils.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"sendAddTrackEvent",function(){return m}),O.d(k,"addCueToTrack",function(){return S}),O.d(k,"clearCurrentCues",function(){return H}),O.d(k,"removeCuesInRange",function(){return N}),O.d(k,"getCuesInRange",function(){return A});var U=O("./src/utils/logger.ts");function m(v,f){var l;try{l=new Event("addtrack")}catch(a){l=document.createEvent("Event"),l.initEvent("addtrack",!1,!1)}l.track=v,f.dispatchEvent(l)}function S(v,f){var l=v.mode;if(l==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(f.id))try{if(v.addCue(f),!v.cues.getCueById(f.id))throw new Error("addCue is failed for: "+f)}catch(r){U.logger.debug("[texttrack-utils]: "+r);var a=new self.TextTrackCue(f.startTime,f.endTime,f.text);a.id=f.id,v.addCue(a)}l==="disabled"&&(v.mode=l)}function H(v){var f=v.mode;if(f==="disabled"&&(v.mode="hidden"),v.cues)for(var l=v.cues.length;l--;)v.removeCue(v.cues[l]);f==="disabled"&&(v.mode=f)}function N(v,f,l){var a=v.mode;if(a==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var r=A(v.cues,f,l),o=0;o<r.length;o++)v.removeCue(r[o]);a==="disabled"&&(v.mode=a)}function e(v,f){if(f<v[0].startTime)return 0;var l=v.length-1;if(f>v[l].endTime)return-1;for(var a=0,r=l;a<=r;){var o=Math.floor((r+a)/2);if(f<v[o].startTime)r=o-1;else if(f>v[o].startTime&&a<l)a=o+1;else return o}return v[a].startTime-f<f-v[r].startTime?a:r}function A(v,f,l){var a=[],r=e(v,f);if(r>-1)for(var o=r,s=v.length;o<s;o++){var i=v[o];if(i.startTime>=f&&i.endTime<=l)a.push(i);else if(i.startTime>l)return a}return a}},"./src/utils/time-ranges.ts":function(te,k,O){"use strict";O.r(k);var U={toString:function(S){for(var H="",N=S.length,e=0;e<N;e++)H+="["+S.start(e).toFixed(3)+","+S.end(e).toFixed(3)+"]";return H}};k.default=U},"./src/utils/timescale-conversion.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"toTimescaleFromBase",function(){return m}),O.d(k,"toTimescaleFromScale",function(){return S}),O.d(k,"toMsFromMpegTsClock",function(){return H}),O.d(k,"toMpegTsClockFromTimescale",function(){return N});var U=9e4;function m(e,A,v,f){v===void 0&&(v=1),f===void 0&&(f=!1);var l=e*A*v;return f?Math.round(l):l}function S(e,A,v,f){return v===void 0&&(v=1),f===void 0&&(f=!1),m(e,A,1/v,f)}function H(e,A){return A===void 0&&(A=!1),m(e,1e3,1/U,A)}function N(e,A){return A===void 0&&(A=1),m(e,U,1/A)}},"./src/utils/typed-array.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"sliceUint8",function(){return U});function U(m,S,H){return Uint8Array.prototype.slice?m.slice(S,H):new Uint8Array(Array.prototype.slice.call(m,S,H))}},"./src/utils/vttcue.ts":function(te,k,O){"use strict";O.r(k),k.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var U=["","lr","rl"],m=["start","middle","end","left","right"];function S(v,f){if(typeof f!="string")return!1;if(!Array.isArray(v))return!1;var l=f.toLowerCase();return~v.indexOf(l)?l:!1}function H(v){return S(U,v)}function N(v){return S(m,v)}function e(v){for(var f=arguments.length,l=new Array(f>1?f-1:0),a=1;a<f;a++)l[a-1]=arguments[a];for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var s in o)v[s]=o[s]}return v}function A(v,f,l){var a=this,r={enumerable:!0};a.hasBeenReset=!1;var o="",s=!1,i=v,n=f,t=l,b=null,y="",g=!0,E="auto",_="start",u=50,c="middle",p=50,d="middle";Object.defineProperty(a,"id",e({},r,{get:function(){return o},set:function(h){o=""+h}})),Object.defineProperty(a,"pauseOnExit",e({},r,{get:function(){return s},set:function(h){s=!!h}})),Object.defineProperty(a,"startTime",e({},r,{get:function(){return i},set:function(h){if(typeof h!="number")throw new TypeError("Start time must be set to a number.");i=h,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",e({},r,{get:function(){return n},set:function(h){if(typeof h!="number")throw new TypeError("End time must be set to a number.");n=h,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",e({},r,{get:function(){return t},set:function(h){t=""+h,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",e({},r,{get:function(){return b},set:function(h){b=h,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",e({},r,{get:function(){return y},set:function(h){var T=H(h);if(T===!1)throw new SyntaxError("An invalid or illegal string was specified.");y=T,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",e({},r,{get:function(){return g},set:function(h){g=!!h,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",e({},r,{get:function(){return E},set:function(h){if(typeof h!="number"&&h!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");E=h,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",e({},r,{get:function(){return _},set:function(h){var T=N(h);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");_=T,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",e({},r,{get:function(){return u},set:function(h){if(h<0||h>100)throw new Error("Position must be between 0 and 100.");u=h,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",e({},r,{get:function(){return c},set:function(h){var T=N(h);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");c=T,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",e({},r,{get:function(){return p},set:function(h){if(h<0||h>100)throw new Error("Size must be between 0 and 100.");p=h,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",e({},r,{get:function(){return d},set:function(h){var T=N(h);if(!T)throw new SyntaxError("An invalid or illegal string was specified.");d=T,this.hasBeenReset=!0}})),a.displayState=void 0}return A.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},A}()},"./src/utils/vttparser.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"parseTimeStamp",function(){return S}),O.d(k,"fixLineBreaks",function(){return f}),O.d(k,"VTTParser",function(){return l});var U=O("./src/utils/vttcue.ts"),m=function(){function a(){}var r=a.prototype;return r.decode=function(s,i){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))},a}();function S(a){function r(s,i,n,t){return(s|0)*3600+(i|0)*60+(n|0)+parseFloat(t||0)}var o=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return o?parseFloat(o[2])>59?r(o[2],o[3],0,o[4]):r(o[1],o[2],o[3],o[4]):null}var H=function(){function a(){this.values=Object.create(null)}var r=a.prototype;return r.set=function(s,i){!this.get(s)&&i!==""&&(this.values[s]=i)},r.get=function(s,i,n){return n?this.has(s)?this.values[s]:i[n]:this.has(s)?this.values[s]:i},r.has=function(s){return s in this.values},r.alt=function(s,i,n){for(var t=0;t<n.length;++t)if(i===n[t]){this.set(s,i);break}},r.integer=function(s,i){/^-?\d+$/.test(i)&&this.set(s,parseInt(i,10))},r.percent=function(s,i){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(i)){var n=parseFloat(i);if(n>=0&&n<=100)return this.set(s,n),!0}return!1},a}();function N(a,r,o,s){var i=s?a.split(s):[a];for(var n in i){if(typeof i[n]!="string")continue;var t=i[n].split(o);if(t.length!==2)continue;var b=t[0],y=t[1];r(b,y)}}var e=new U.default(0,0,""),A=e.align==="middle"?"middle":"center";function v(a,r,o){var s=a;function i(){var b=S(a);if(b===null)throw new Error("Malformed timestamp: "+s);return a=a.replace(/^[^\sa-zA-Z-]+/,""),b}function n(b,y){var g=new H;N(b,function(u,c){var p;switch(u){case"region":for(var d=o.length-1;d>=0;d--)if(o[d].id===c){g.set(u,o[d].region);break}break;case"vertical":g.alt(u,c,["rl","lr"]);break;case"line":p=c.split(","),g.integer(u,p[0]),g.percent(u,p[0])&&g.set("snapToLines",!1),g.alt(u,p[0],["auto"]),p.length===2&&g.alt("lineAlign",p[1],["start",A,"end"]);break;case"position":p=c.split(","),g.percent(u,p[0]),p.length===2&&g.alt("positionAlign",p[1],["start",A,"end","line-left","line-right","auto"]);break;case"size":g.percent(u,c);break;case"align":g.alt(u,c,["start",A,"end","left","right"]);break}},/:/,/\s/),y.region=g.get("region",null),y.vertical=g.get("vertical","");var E=g.get("line","auto");E==="auto"&&e.line===-1&&(E=-1),y.line=E,y.lineAlign=g.get("lineAlign","start"),y.snapToLines=g.get("snapToLines",!0),y.size=g.get("size",100),y.align=g.get("align",A);var _=g.get("position","auto");_==="auto"&&e.position===50&&(_=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=_}function t(){a=a.replace(/^\s+/,"")}if(t(),r.startTime=i(),t(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);a=a.substr(3),t(),r.endTime=i(),t(),n(a,r)}function f(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}var l=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new m,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var r=a.prototype;return r.parse=function(s){var i=this;s&&(i.buffer+=i.decoder.decode(s,{stream:!0}));function n(){var _=i.buffer,u=0;for(_=f(_);u<_.length&&_[u]!=="\r"&&_[u]!==`
|
|
`;)++u;var c=_.substr(0,u);return _[u]==="\r"&&++u,_[u]===`
|
|
`&&++u,i.buffer=_.substr(u),c}function t(_){N(_,function(u,c){},/:/)}try{var b="";if(i.state==="INITIAL"){if(!/\r\n|\n/.test(i.buffer))return this;b=n();var y=b.match(/^()?WEBVTT([ \t].*)?$/);if(!y||!y[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var g=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;g?g=!1:b=n();switch(i.state){case"HEADER":/:/.test(b)?t(b):b||(i.state="ID");continue;case"NOTE":b||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(b)){i.state="NOTE";break}if(!b)continue;if(i.cue=new U.default(0,0,""),i.state="CUE",b.indexOf("-->")===-1){i.cue.id=b;continue}case"CUE":if(!i.cue){i.state="BADCUE";continue}try{v(b,i.cue,i.regionList)}catch(_){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":{var E=b.indexOf("-->")!==-1;if(!b||E&&(g=!0)){i.oncue&&i.cue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}if(i.cue===null)continue;i.cue.text&&(i.cue.text+=`
|
|
`),i.cue.text+=b}continue;case"BADCUE":b||(i.state="ID")}}}catch(_){i.state==="CUETEXT"&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state=i.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},r.flush=function(){var s=this;try{if((s.cue||s.state==="HEADER")&&(s.buffer+=`
|
|
|
|
`,s.parse()),s.state==="INITIAL"||s.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(i){s.onparsingerror&&s.onparsingerror(i)}return s.onflush&&s.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(te,k,O){"use strict";O.r(k),O.d(k,"generateCueId",function(){return l}),O.d(k,"parseWebVTT",function(){return r});var U=O("./src/polyfills/number.ts"),m=O("./src/utils/vttparser.ts"),S=O("./src/demux/id3.ts"),H=O("./src/utils/timescale-conversion.ts"),N=O("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,A=function(s,i,n){return n===void 0&&(n=0),s.substr(n,i.length)===i},v=function(s){var i=parseInt(s.substr(-3)),n=parseInt(s.substr(-6,2)),t=parseInt(s.substr(-9,2)),b=s.length>9?parseInt(s.substr(0,s.indexOf(":"))):0;if(!Object(U.isFiniteNumber)(i)||!Object(U.isFiniteNumber)(n)||!Object(U.isFiniteNumber)(t)||!Object(U.isFiniteNumber)(b))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+s);return i+=1e3*n,i+=60*1e3*t,i+=60*60*1e3*b,i},f=function(s){for(var i=5381,n=s.length;n;)i=i*33^s.charCodeAt(--n);return(i>>>0).toString()};function l(o,s,i){return f(o.toString())+f(s.toString())+f(i)}var a=function(s,i,n){var t=s[i],b=s[t.prevCC];if(!b||!b.new&&t.new){s.ccOffset=s.presentationOffset=t.start,t.new=!1;return}for(;(y=b)!==null&&y!==void 0&&y.new;){var y;s.ccOffset+=t.start-b.start,t.new=!1,t=b,b=s[t.prevCC]}s.presentationOffset=n};function r(o,s,i,n,t,b,y,g){var E=new m.VTTParser,_=Object(S.utf8ArrayToStr)(new Uint8Array(o)).trim().replace(e,`
|
|
`).split(`
|
|
`),u=[],c=Object(H.toMpegTsClockFromTimescale)(s,i),p="00:00.000",d=0,x=0,h,T=!0,M=!1;E.oncue=function(D){var w=n[t],C=n.ccOffset,j=(d-c)/9e4;if(w!=null&&w.new&&(x!==void 0?C=n.ccOffset=w.start:a(n,t,j)),j&&(C=j-n.presentationOffset),M){var L=D.endTime-D.startTime,z=Object(N.normalizePts)((D.startTime+C-x)*9e4,b*9e4)/9e4;D.startTime=z,D.endTime=z+L}var $=D.text.trim();D.text=decodeURIComponent(encodeURIComponent($)),D.id||(D.id=l(D.startTime,D.endTime,$)),D.endTime>0&&u.push(D)},E.onparsingerror=function(D){h=D},E.onflush=function(){if(h){g(h);return}y(u)},_.forEach(function(D){if(T)if(A(D,"X-TIMESTAMP-MAP=")){T=!1,M=!0,D.substr(16).split(",").forEach(function(w){A(w,"LOCAL:")?p=w.substr(6):A(w,"MPEGTS:")&&(d=parseInt(w.substr(7)))});try{x=v(p)/1e3}catch(w){M=!1,h=w}return}else D===""&&(T=!1);E.parse(D+`
|
|
`)}),E.flush()}},"./src/utils/xhr-loader.ts":function(te,k,O){"use strict";O.r(k);var U=O("./src/utils/logger.ts"),m=O("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,H=function(){function N(A){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=A?A.xhrSetup:null,this.stats=new m.LoadStats,this.retryDelay=0}var e=N.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var v=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),v&&(v.onreadystatechange=null,v.onprogress=null,v.readyState!==4&&(this.stats.aborted=!0,v.abort()))},e.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(v,f,l){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=v,this.config=f,this.callbacks=l,this.retryDelay=f.retryDelay,this.loadInternal()},e.loadInternal=function(){var v=this.config,f=this.context;if(!v)return;var l=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var r=this.xhrSetup;try{if(r)try{r(l,f.url)}catch(i){l.open("GET",f.url,!0),r(l,f.url)}l.readyState||l.open("GET",f.url,!0);var o=this.context.headers;if(o)for(var s in o)l.setRequestHeader(s,o[s])}catch(i){this.callbacks.onError({code:l.status,text:i.message},f,l);return}f.rangeEnd&&l.setRequestHeader("Range","bytes="+f.rangeStart+"-"+(f.rangeEnd-1)),l.onreadystatechange=this.readystatechange.bind(this),l.onprogress=this.loadprogress.bind(this),l.responseType=f.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout),l.send()},e.readystatechange=function(){var v=this.context,f=this.loader,l=this.stats;if(!v||!f)return;var a=f.readyState,r=this.config;if(l.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),l.loading.first===0&&(l.loading.first=Math.max(self.performance.now(),l.loading.start)),a===4){f.onreadystatechange=null,f.onprogress=null;var o=f.status;if(o>=200&&o<300){l.loading.end=Math.max(self.performance.now(),l.loading.first);var s,i;if(v.responseType==="arraybuffer"?(s=f.response,i=s.byteLength):(s=f.responseText,i=s.length),l.loaded=l.total=i,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(l,v,s,f),!this.callbacks)return;var t={url:f.responseURL,data:s};this.callbacks.onSuccess(t,l,v,f)}else l.retry>=r.maxRetry||o>=400&&o<499?(U.logger.error(o+" while loading "+v.url),this.callbacks.onError({code:o,text:f.statusText},v,f)):(U.logger.warn(o+" while loading "+v.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,r.maxRetryDelay),l.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout)},e.loadtimeout=function(){U.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(v){var f=this.stats;f.loaded=v.loaded,v.lengthComputable&&(f.total=v.total)},e.getCacheAge=function(){var v=null;if(this.loader&&S.test(this.loader.getAllResponseHeaders())){var f=this.loader.getResponseHeader("age");v=f?parseFloat(f):null}return v},N}();k.default=H}}).default})},vHTk:function(Be,oe,P){Be.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return Ze});var te=P("rePB"),k=P("VTBJ"),O=P("KQm4"),U=P("U8pU"),m=P("ODXe"),S=P("q1tI"),H=P("TSYQ"),N=P.n(H),e=P("Gytx"),A=P.n(e),v=P("Kwbf"),f=P("t23M"),l=P("qx4F"),a=P("6eGT"),r=P("IBYe"),o=P("Ff2n"),s=P("c+Xe"),i=P("fyJ8"),n=P("biw7");function t(xe,Oe,Fe,We,q){var K=Fe[xe]||{},G=Fe[Oe]||{},Q,ee;K.fixed==="left"?Q=We.left[xe]:G.fixed==="right"&&(ee=We.right[Oe]);var V=!1,J=!1,ne=!1,ae=!1,ye=Fe[Oe+1],be=Fe[xe-1];if(q==="rtl"){if(Q!==void 0){var Pe=be&&be.fixed==="left";ae=!Pe}else if(ee!==void 0){var ze=ye&&ye.fixed==="right";ne=!ze}}else if(Q!==void 0){var qe=ye&&ye.fixed==="left";V=!qe}else if(ee!==void 0){var Xe=be&&be.fixed==="right";J=!Xe}return{fixLeft:Q,fixRight:ee,lastFixLeft:V,firstFixRight:J,lastFixRight:ne,firstFixLeft:ae,isSticky:We.isSticky}}var b=P("sR1s");function y(xe){var Oe=xe.cells,Fe=xe.stickyOffsets,We=xe.flattenColumns,q=xe.rowComponent,K=xe.cellComponent,G=xe.onHeaderRow,Q=xe.index,ee=S.useContext(n.a),V=ee.prefixCls,J=ee.direction,ne;G&&(ne=G(Oe.map(function(ye){return ye.column}),Q));var ae=Object(b.a)(Oe.map(function(ye){return ye.column}));return S.createElement(q,Object.assign({},ne),Oe.map(function(ye,be){var Pe=ye.column,ze=t(ye.colStart,ye.colEnd,We,Fe,J),qe;return Pe&&Pe.onHeaderCell&&(qe=ye.column.onHeaderCell(Pe)),S.createElement(i.a,Object.assign({},ye,{ellipsis:Pe.ellipsis,align:Pe.align,component:K,prefixCls:V,key:ae[be]},ze,{additionalProps:qe,rowType:"header"}))}))}y.displayName="HeaderRow";var g=y;function E(xe){var Oe=[];function Fe(G,Q){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Oe[ee]=Oe[ee]||[];var V=Q,J=G.filter(Boolean).map(function(ne){var ae={key:ne.key,className:ne.className||"",children:ne.title,column:ne,colStart:V},ye=1,be=ne.children;return be&&be.length>0&&(ye=Fe(be,V,ee+1).reduce(function(Pe,ze){return Pe+ze},0),ae.hasSubColumns=!0),"colSpan"in ne&&(ye=ne.colSpan),"rowSpan"in ne&&(ae.rowSpan=ne.rowSpan),ae.colSpan=ye,ae.colEnd=ae.colStart+ye-1,Oe[ee].push(ae),V+=ye,ye});return J}Fe(xe,0);for(var We=Oe.length,q=function(Q){Oe[Q].forEach(function(ee){!("rowSpan"in ee)&&!ee.hasSubColumns&&(ee.rowSpan=We-Q)})},K=0;K<We;K+=1)q(K);return Oe}function _(xe){var Oe=xe.stickyOffsets,Fe=xe.columns,We=xe.flattenColumns,q=xe.onHeaderRow,K=S.useContext(n.a),G=K.prefixCls,Q=K.getComponent,ee=S.useMemo(function(){return E(Fe)},[Fe]),V=Q(["header","wrapper"],"thead"),J=Q(["header","row"],"tr"),ne=Q(["header","cell"],"th");return S.createElement(V,{className:"".concat(G,"-thead")},ee.map(function(ae,ye){var be=S.createElement(g,{key:ye,flattenColumns:We,cells:ae,stickyOffsets:Oe,rowComponent:J,cellComponent:ne,onHeaderRow:q,index:ye});return be}))}var u=_,c=P("hW8S");function p(xe){for(var Oe=xe.colWidths,Fe=xe.columns,We=xe.columCount,q=[],K=We||Fe.length,G=!1,Q=K-1;Q>=0;Q-=1){var ee=Oe[Q],V=Fe&&Fe[Q],J=V&&V[c.a];(ee||J||G)&&(q.unshift(S.createElement("col",Object.assign({key:Q,style:{width:ee,minWidth:ee}},J))),G=!0)}return S.createElement("colgroup",null,q)}var d=p;function x(xe,Oe){return Object(S.useMemo)(function(){for(var Fe=[],We=0;We<Oe;We+=1){var q=xe[We];if(q!==void 0)Fe[We]=q;else return null}return Fe},[xe.join("_"),Oe])}var h=S.forwardRef(function(xe,Oe){var Fe=xe.noData,We=xe.columns,q=xe.flattenColumns,K=xe.colWidths,G=xe.columCount,Q=xe.stickyOffsets,ee=xe.direction,V=xe.fixHeader,J=xe.offsetHeader,ne=xe.stickyClassName,ae=xe.onScroll,ye=Object(o.a)(xe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),be=S.useContext(n.a),Pe=be.prefixCls,ze=be.scrollbarSize,qe=be.isSticky,Xe=qe&&!V?0:ze,At=S.useRef(null),pt=S.useCallback(function(It){Object(s.b)(Oe,It),Object(s.b)(At,It)},[]);S.useEffect(function(){var It;function Pt(yt){var Jt=yt.currentTarget,dt=yt.deltaX;dt&&(ae({currentTarget:Jt,scrollLeft:Jt.scrollLeft+dt}),yt.preventDefault())}return(It=At.current)===null||It===void 0||It.addEventListener("wheel",Pt),function(){var yt;(yt=At.current)===null||yt===void 0||yt.removeEventListener("wheel",Pt)}},[]);var ot=q[q.length-1],Mt={fixed:ot?ot.fixed:null,onHeaderCell:function(){return{className:"".concat(Pe,"-cell-scrollbar")}}},Rt=Object(S.useMemo)(function(){return Xe?[].concat(Object(O.a)(We),[Mt]):We},[Xe,We]),wt=Object(S.useMemo)(function(){return Xe?[].concat(Object(O.a)(q),[Mt]):q},[Xe,q]),zt=Object(S.useMemo)(function(){var It=Q.right,Pt=Q.left;return Object(k.a)(Object(k.a)({},Q),{},{left:ee==="rtl"?[].concat(Object(O.a)(Pt.map(function(yt){return yt+Xe})),[0]):Pt,right:ee==="rtl"?It:[].concat(Object(O.a)(It.map(function(yt){return yt+Xe})),[0]),isSticky:qe})},[Xe,Q,qe]),vt=x(K,G);return S.createElement("div",{style:Object(k.a)({overflow:"hidden"},qe?{top:J}:{}),ref:pt,className:N()("".concat(Pe,"-header"),Object(te.a)({},ne,!!ne))},S.createElement("table",{style:{tableLayout:"fixed",visibility:Fe||vt?null:"hidden"}},S.createElement(d,{colWidths:vt?[].concat(Object(O.a)(vt),[Xe]):[],columCount:G+1,columns:wt}),S.createElement(u,Object.assign({},ye,{stickyOffsets:zt,columns:Rt,flattenColumns:wt}))))});h.displayName="FixedHeader";var T=h,M=S.createContext(null),D=M;function w(xe){var Oe=xe.prefixCls,Fe=xe.children,We=xe.component,q=xe.cellComponent,K=xe.fixHeader,G=xe.fixColumn,Q=xe.horizonScroll,ee=xe.className,V=xe.expanded,J=xe.componentWidth,ne=xe.colSpan,ae=S.useContext(n.a),ye=ae.scrollbarSize;return S.useMemo(function(){var be=Fe;return G&&(be=S.createElement("div",{style:{width:J-(K?ye:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Oe,"-expanded-row-fixed")},be)),S.createElement(We,{className:ee,style:{display:V?null:"none"}},S.createElement(i.a,{component:q,prefixCls:Oe,colSpan:ne},be))},[Fe,We,K,Q,ee,V,J,ne,ye])}var C=w;function j(xe){var Oe=xe.className,Fe=xe.style,We=xe.record,q=xe.index,K=xe.rowKey,G=xe.getRowKey,Q=xe.rowExpandable,ee=xe.expandedKeys,V=xe.onRow,J=xe.indent,ne=J===void 0?0:J,ae=xe.rowComponent,ye=xe.cellComponent,be=xe.childrenColumnName,Pe=S.useContext(n.a),ze=Pe.prefixCls,qe=Pe.fixedInfoList,Xe=S.useContext(D),At=Xe.fixHeader,pt=Xe.fixColumn,ot=Xe.horizonScroll,Mt=Xe.componentWidth,Rt=Xe.flattenColumns,wt=Xe.expandableType,zt=Xe.expandRowByClick,vt=Xe.onTriggerExpand,It=Xe.rowClassName,Pt=Xe.expandedRowClassName,yt=Xe.indentSize,Jt=Xe.expandIcon,dt=Xe.expandedRowRender,st=Xe.expandIconColumnIndex,Le=S.useState(!1),ct=Object(m.a)(Le,2),mt=ct[0],Ct=ct[1],ht=ee&&ee.has(xe.recordKey);S.useEffect(function(){ht&&Ct(!0)},[ht]);var nt=wt==="row"&&(!Q||Q(We)),it=wt==="nest",rt=be&&We&&We[be],Ot=nt||it,at;V&&(at=V(We,q));var Dt=function(on){if(zt&&Ot&&vt(We,on),at&&at.onClick){for(var Kt,kt=arguments.length,$t=new Array(kt>1?kt-1:0),an=1;an<kt;an++)$t[an-1]=arguments[an];(Kt=at).onClick.apply(Kt,[on].concat($t))}},_t;typeof It=="string"?_t=It:typeof It=="function"&&(_t=It(We,q,ne));var en=Object(b.a)(Rt),Zt=S.createElement(ae,Object.assign({},at,{"data-row-key":K,className:N()(Oe,"".concat(ze,"-row"),"".concat(ze,"-row-level-").concat(ne),_t,at&&at.className),style:Object(k.a)(Object(k.a)({},Fe),at?at.style:null),onClick:Dt}),Rt.map(function(Lt,on){var Kt=Lt.render,kt=Lt.dataIndex,$t=Lt.className,an=en[on],cn=qe[on],dn;on===(st||0)&&it&&(dn=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(yt*ne,"px")},className:"".concat(ze,"-row-indent indent-level-").concat(ne)}),Jt({prefixCls:ze,expanded:ht,expandable:rt,record:We,onExpand:vt})));var Mn;return Lt.onCell&&(Mn=Lt.onCell(We,q)),S.createElement(i.a,Object.assign({className:$t,ellipsis:Lt.ellipsis,align:Lt.align,component:ye,prefixCls:ze,key:an,record:We,index:q,dataIndex:kt,render:Kt,shouldCellUpdate:Lt.shouldCellUpdate},cn,{appendNode:dn,additionalProps:Mn}))})),ft;if(nt&&(mt||ht)){var pn=dt(We,q,ne+1,ht),lt=Pt&&Pt(We,q,ne);ft=S.createElement(C,{expanded:ht,className:N()("".concat(ze,"-expanded-row"),"".concat(ze,"-expanded-row-level-").concat(ne+1),lt),prefixCls:ze,fixHeader:At,fixColumn:pt,horizonScroll:ot,component:ae,componentWidth:Mt,cellComponent:ye,colSpan:Rt.length},pn)}var qt;return rt&&ht&&(qt=(We[be]||[]).map(function(Lt,on){var Kt=G(Lt,on);return S.createElement(j,Object.assign({},xe,{key:Kt,rowKey:Kt,record:Lt,recordKey:Kt,index:on,indent:ne+1}))})),S.createElement(S.Fragment,null,Zt,ft,qt)}j.displayName="BodyRow";var L=j,z=S.createContext(null),$=z;function he(xe){var Oe=xe.columnKey,Fe=xe.onColumnResize,We=S.useRef();return S.useEffect(function(){We.current&&Fe(Oe,We.current.offsetWidth)},[]),S.createElement(f.a,{onResize:function(K){var G=K.offsetWidth;Fe(Oe,G)}},S.createElement("td",{ref:We,style:{padding:0,border:0,height:0}},S.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function fe(xe){var Oe=xe.data,Fe=xe.getRowKey,We=xe.measureColumnWidth,q=xe.expandedKeys,K=xe.onRow,G=xe.rowExpandable,Q=xe.emptyNode,ee=xe.childrenColumnName,V=S.useContext($),J=V.onColumnResize,ne=S.useContext(n.a),ae=ne.prefixCls,ye=ne.getComponent,be=S.useContext(D),Pe=be.fixHeader,ze=be.horizonScroll,qe=be.flattenColumns,Xe=be.componentWidth;return S.useMemo(function(){var At=ye(["body","wrapper"],"tbody"),pt=ye(["body","row"],"tr"),ot=ye(["body","cell"],"td"),Mt;Oe.length?Mt=Oe.map(function(wt,zt){var vt=Fe(wt,zt);return S.createElement(L,{key:vt,rowKey:vt,record:wt,recordKey:vt,index:zt,rowComponent:pt,cellComponent:ot,expandedKeys:q,onRow:K,getRowKey:Fe,rowExpandable:G,childrenColumnName:ee})}):Mt=S.createElement(C,{expanded:!0,className:"".concat(ae,"-placeholder"),prefixCls:ae,fixHeader:Pe,fixColumn:ze,horizonScroll:ze,component:pt,componentWidth:Xe,cellComponent:ot,colSpan:qe.length},Q);var Rt=Object(b.a)(qe);return S.createElement(At,{className:"".concat(ae,"-tbody")},We&&S.createElement("tr",{"aria-hidden":"true",className:"".concat(ae,"-measure-row"),style:{height:0}},Rt.map(function(wt){return S.createElement(he,{key:wt,columnKey:wt,onColumnResize:J})})),Mt)},[Oe,ae,K,We,q,Fe,ye,Xe,Q,qe])}var Ie=S.memo(fe);Ie.displayName="Body";var Se=Ie,pe=P("wRmb"),Ce=P("xEkU"),Me=P.n(Ce);function ge(xe){var Oe=Object(S.useRef)(xe),Fe=Object(S.useState)({}),We=Object(m.a)(Fe,2),q=We[1],K=Object(S.useRef)(null),G=Object(S.useRef)([]);function Q(ee){K.current===null&&(G.current=[],K.current=Me()(function(){G.current.forEach(function(V){Oe.current=V(Oe.current)}),K.current=null,q({})})),G.current.push(ee)}return Object(S.useEffect)(function(){return function(){Me.a.cancel(K.current)}},[]),[Oe.current,Q]}function B(xe){var Oe=Object(S.useRef)(xe),Fe=Object(S.useRef)(null);function We(){window.clearTimeout(Fe.current)}function q(G){Oe.current=G,We(),Fe.current=window.setTimeout(function(){Oe.current=null,Fe.current=null},100)}function K(){return Oe.current}return Object(S.useEffect)(function(){return We},[]),[q,K]}function R(xe,Oe,Fe){var We=Object(S.useMemo)(function(){for(var q=[],K=[],G=0,Q=0,ee=0;ee<Oe;ee+=1)if(Fe==="rtl"){K[ee]=Q,Q+=xe[ee]||0;var V=Oe-ee-1;q[V]=G,G+=xe[V]||0}else{q[ee]=G,G+=xe[ee]||0;var J=Oe-ee-1;K[J]=Q,Q+=xe[J]||0}return{left:q,right:K}},[xe,Oe,Fe]);return We}var I=R;function W(xe){var Oe=xe.className,Fe=xe.children;return S.createElement("div",{className:Oe},Fe)}var Y=W,F=P("n6Qo");function le(xe){var Oe,Fe=xe.prefixCls,We=xe.record,q=xe.onExpand,K=xe.expanded,G=xe.expandable,Q="".concat(Fe,"-row-expand-icon");if(!G)return S.createElement("span",{className:N()(Q,"".concat(Fe,"-row-spaced"))});var ee=function(J){q(We,J),J.stopPropagation()};return S.createElement("span",{className:N()(Q,(Oe={},Object(te.a)(Oe,"".concat(Fe,"-row-expanded"),K),Object(te.a)(Oe,"".concat(Fe,"-row-collapsed"),!K),Oe)),onClick:ee})}function Ae(xe,Oe,Fe){var We=[];function q(K){(K||[]).forEach(function(G,Q){We.push(Oe(G,Q)),q(G[Fe])})}return q(xe),We}var Ne=P("zT1h"),ie=P("y0+3"),de=function(Oe,Fe){var We,q,K=Oe.scrollBodyRef,G=Oe.onScroll,Q=Oe.offsetScroll,ee=S.useContext(n.a),V=ee.prefixCls,J=((We=K.current)===null||We===void 0?void 0:We.scrollWidth)||0,ne=((q=K.current)===null||q===void 0?void 0:q.clientWidth)||0,ae=J&&ne*(ne/J),ye=S.useRef(),be=ge({scrollLeft:0,isHiddenScrollBar:!1}),Pe=Object(m.a)(be,2),ze=Pe[0],qe=Pe[1],Xe=S.useRef({delta:0,x:0}),At=S.useState(!1),pt=Object(m.a)(At,2),ot=pt[0],Mt=pt[1],Rt=function(){Mt(!1)},wt=function(yt){yt.persist(),Xe.current.delta=yt.pageX-ze.scrollLeft,Xe.current.x=0,Mt(!0),yt.preventDefault()},zt=function(yt){var Jt,dt=yt||((Jt=window)===null||Jt===void 0?void 0:Jt.event),st=dt.buttons;if(!ot||st===0){ot&&Mt(!1);return}var Le=Xe.current.x+yt.pageX-Xe.current.x-Xe.current.delta;Le<=0&&(Le=0),Le+ae>=ne&&(Le=ne-ae),G({scrollLeft:Le/ne*(J+2)}),Xe.current.x=yt.pageX},vt=function(){var yt=Object(ie.b)(K.current).top,Jt=yt+K.current.offsetHeight,dt=document.documentElement.scrollTop+window.innerHeight;Jt-Object(l.a)()<=dt||yt>=dt-Q?qe(function(st){return Object(k.a)(Object(k.a)({},st),{},{isHiddenScrollBar:!0})}):qe(function(st){return Object(k.a)(Object(k.a)({},st),{},{isHiddenScrollBar:!1})})},It=function(yt){qe(function(Jt){return Object(k.a)(Object(k.a)({},Jt),{},{scrollLeft:yt/J*ne||0})})};return S.useImperativeHandle(Fe,function(){return{setScrollLeft:It}}),S.useEffect(function(){var Pt=Object(Ne.a)(document.body,"mouseup",Rt,!1),yt=Object(Ne.a)(document.body,"mousemove",zt,!1);return vt(),function(){Pt.remove(),yt.remove()}},[ae,ot]),S.useEffect(function(){var Pt=Object(Ne.a)(window,"scroll",vt,!1),yt=Object(Ne.a)(window,"resize",vt,!1);return function(){Pt.remove(),yt.remove()}},[]),S.useEffect(function(){ze.isHiddenScrollBar||qe(function(Pt){var yt,Jt;return Object(k.a)(Object(k.a)({},Pt),{},{scrollLeft:K.current.scrollLeft/((yt=K.current)===null||yt===void 0?void 0:yt.scrollWidth)*((Jt=K.current)===null||Jt===void 0?void 0:Jt.clientWidth)})})},[ze.isHiddenScrollBar]),J<=ne||!ae||ze.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(l.a)(),width:ne,bottom:Q},className:"".concat(V,"-sticky-scroll")},S.createElement("div",{onMouseDown:wt,ref:ye,className:N()("".concat(V,"-sticky-scroll-bar"),Object(te.a)({},"".concat(V,"-sticky-scroll-bar-active"),ot)),style:{width:"".concat(ae,"px"),transform:"translate3d(".concat(ze.scrollLeft,"px, 0, 0)")}}))},we=S.forwardRef(de);function De(xe,Oe){return S.useMemo(function(){var Fe=!!xe;return{isSticky:Fe,stickyClassName:Fe?"".concat(Oe,"-sticky-header"):"",offsetHeader:Object(U.a)(xe)==="object"&&xe.offsetHeader||0,offsetScroll:Object(U.a)(xe)==="object"&&xe.offsetScroll||0}},[xe,Oe])}var Ke=[],Je={},Ze="rc-table-internal-hook",Qe=S.memo(function(xe){var Oe=xe.children;return Oe},function(xe,Oe){return A()(xe.props,Oe.props)?xe.pingLeft!==Oe.pingLeft||xe.pingRight!==Oe.pingRight:!1});function ut(xe){var Oe,Fe=xe.prefixCls,We=xe.className,q=xe.rowClassName,K=xe.style,G=xe.data,Q=xe.rowKey,ee=xe.scroll,V=xe.tableLayout,J=xe.direction,ne=xe.title,ae=xe.footer,ye=xe.summary,be=xe.id,Pe=xe.showHeader,ze=xe.components,qe=xe.emptyText,Xe=xe.onRow,At=xe.onHeaderRow,pt=xe.internalHooks,ot=xe.transformColumns,Mt=xe.internalRefs,Rt=xe.sticky,wt=G||Ke,zt=!!wt.length,vt=S.useState(0),It=Object(m.a)(vt,2),Pt=It[0],yt=It[1];S.useEffect(function(){yt(Object(l.a)())});var Jt=S.useMemo(function(){return Object(b.c)(ze,{})},[ze]),dt=S.useCallback(function(Ht,Vt){return Object(b.b)(Jt,Ht)||Vt},[Jt]),st=S.useMemo(function(){return typeof Q=="function"?Q:function(Ht){var Vt=Ht&&Ht[Q];return Vt}},[Q]),Le=Object(c.c)(xe),ct=Le.expandIcon,mt=Le.expandedRowKeys,Ct=Le.defaultExpandedRowKeys,ht=Le.defaultExpandAllRows,nt=Le.expandedRowRender,it=Le.onExpand,rt=Le.onExpandedRowsChange,Ot=Le.expandRowByClick,at=Le.rowExpandable,Dt=Le.expandIconColumnIndex,_t=Le.expandedRowClassName,en=Le.childrenColumnName,Zt=Le.indentSize,ft=ct||le,pn=en||"children",lt=S.useMemo(function(){return nt?"row":xe.expandable&&pt===Ze&&xe.expandable.__PARENT_RENDER_ICON__||wt.some(function(Ht){return Ht&&Object(U.a)(Ht)==="object"&&Ht[pn]})?"nest":!1},[!!nt,wt]),qt=S.useState(function(){return Ct||(ht?Ae(wt,st,pn):[])}),Lt=Object(m.a)(qt,2),on=Lt[0],Kt=Lt[1],kt=S.useMemo(function(){return new Set(mt||on||[])},[mt,on]),$t=S.useCallback(function(Ht){var Vt=st(Ht,wt.indexOf(Ht)),vn,Cn=kt.has(Vt);Cn?(kt.delete(Vt),vn=Object(O.a)(kt)):vn=[].concat(Object(O.a)(kt),[Vt]),Kt(vn),it&&it(!Cn,Ht),rt&&rt(vn)},[st,kt,wt,it,rt]),an=S.useState(0),cn=Object(m.a)(an,2),dn=cn[0],Mn=cn[1],Xn=Object(pe.b)(Object(k.a)(Object(k.a)(Object(k.a)({},xe),Le),{},{expandable:!!nt,expandedKeys:kt,getRowKey:st,onTriggerExpand:$t,expandIcon:ft,expandIconColumnIndex:Dt,direction:J}),pt===Ze?ot:null),Mi=Object(m.a)(Xn,2),ii=Mi[0],gn=Mi[1],ri=S.useMemo(function(){return{columns:ii,flattenColumns:gn}},[ii,gn]),fi=S.useRef(),Ti=S.useRef(),ke=S.useRef(),Hn=S.useState(!1),ai=Object(m.a)(Hn,2),$n=ai[0],Qi=ai[1],Pi=S.useState(!1),Sn=Object(m.a)(Pi,2),Jn=Sn[0],si=Sn[1],Zi=ge(new Map),Si=Object(m.a)(Zi,2),qi=Si[0],Ni=Si[1],Wn=Object(b.a)(gn),pi=Wn.map(function(Ht){return qi.get(Ht)}),ki=S.useMemo(function(){return pi},[pi.join("_")]),mi=I(ki,gn.length,J),Pn=ee&&Object(b.d)(ee.y),Nn=ee&&Object(b.d)(ee.x),Bn=Nn&&gn.some(function(Ht){var Vt=Ht.fixed;return Vt}),wi=S.useRef(),oi=De(Rt,Fe),ei=oi.isSticky,Ui=oi.offsetHeader,Bi=oi.offsetScroll,Fi=oi.stickyClassName,gi,vi,Kn;Pn&&(vi={overflowY:"scroll",maxHeight:ee.y}),Nn&&(gi={overflowX:"auto"},Pn||(vi={overflowY:"hidden"}),Kn={width:ee.x===!0?"auto":ee.x,minWidth:"100%"});var Qn=S.useCallback(function(Ht,Vt){Ni(function(vn){var Cn=new Map(vn);return Cn.set(Ht,Vt),Cn})},[]),li=B(null),Zn=Object(m.a)(li,2),ji=Zn[0],Hi=Zn[1];function ui(Ht,Vt){if(!Vt)return;typeof Vt=="function"?Vt(Ht):Vt.scrollLeft!==Ht&&(Vt.scrollLeft=Ht)}var qn=function(Vt){var vn=Vt.currentTarget,Cn=Vt.scrollLeft,Rn=typeof Cn=="number"?Cn:vn.scrollLeft,zi=vn||Je;if(!Hi()||Hi()===zi){var Ii;ji(zi),ui(Rn,Ti.current),ui(Rn,ke.current),ui(Rn,(Ii=wi.current)===null||Ii===void 0?void 0:Ii.setScrollLeft)}if(vn){var Vi=vn.scrollWidth,Yi=vn.clientWidth;Qi(Rn>0),si(Rn<Vi-Yi)}},yi=function(){ke.current&&qn({currentTarget:ke.current})},Wi=function(Vt){var vn=Vt.width;yi(),Mn(fi.current?fi.current.offsetWidth:vn)};S.useEffect(function(){return yi},[]),S.useEffect(function(){Nn&&yi()},[Nn]),S.useEffect(function(){pt===Ze&&Mt&&(Mt.body.current=ke.current)});var Ci=dt(["table"],"table"),ti=S.useMemo(function(){return V||(Bn?ee.x==="max-content"?"auto":"fixed":Pn||gn.some(function(Ht){var Vt=Ht.ellipsis;return Vt})?"fixed":"auto")},[Pn,Bn,gn,V]),ci,Ai={colWidths:ki,columCount:gn.length,stickyOffsets:mi,onHeaderRow:At,fixHeader:Pn},Gn=S.useMemo(function(){return zt?null:typeof qe=="function"?qe():qe},[zt,qe]),$i=S.createElement(Se,{data:wt,measureColumnWidth:Pn||Nn||ei,expandedKeys:kt,rowExpandable:at,getRowKey:st,onRow:Xe,emptyNode:Gn,childrenColumnName:pn}),Oi=S.createElement(d,{colWidths:gn.map(function(Ht){var Vt=Ht.width;return Vt}),columns:gn}),er=ye&&S.createElement(F.b,null,ye(wt)),Ki=dt(["body"]);if(Pn||ei){var Ri;typeof Ki=="function"?(Ri=Ki(wt,{scrollbarSize:Pt,ref:ke,onScroll:qn}),Ai.colWidths=gn.map(function(Ht,Vt){var vn=Ht.width,Cn=Vt===ii.length-1?vn-Pt:vn;return typeof Cn=="number"&&!Number.isNaN(Cn)?Cn:(Object(v.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ri=S.createElement("div",{style:Object(k.a)(Object(k.a)({},gi),vi),onScroll:qn,ref:ke,className:N()("".concat(Fe,"-body"))},S.createElement(Ci,{style:Object(k.a)(Object(k.a)({},Kn),{},{tableLayout:ti})},Oi,$i,er),ei&&S.createElement(we,{ref:wi,offsetScroll:Bi,scrollBodyRef:ke,onScroll:qn})),ci=S.createElement(S.Fragment,null,Pe!==!1&&S.createElement(T,Object.assign({noData:!wt.length},Ai,ri,{direction:J,offsetHeader:Ui,stickyClassName:Fi,ref:Ti,onScroll:qn})),Ri)}else ci=S.createElement("div",{style:Object(k.a)(Object(k.a)({},gi),vi),className:N()("".concat(Fe,"-content")),onScroll:qn,ref:ke},S.createElement(Ci,{style:Object(k.a)(Object(k.a)({},Kn),{},{tableLayout:ti})},Oi,Pe!==!1&&S.createElement(u,Object.assign({},Ai,ri)),$i,er));var kn=Object(c.b)(xe),di=S.createElement("div",Object.assign({className:N()(Fe,We,(Oe={},Object(te.a)(Oe,"".concat(Fe,"-rtl"),J==="rtl"),Object(te.a)(Oe,"".concat(Fe,"-ping-left"),$n),Object(te.a)(Oe,"".concat(Fe,"-ping-right"),Jn),Object(te.a)(Oe,"".concat(Fe,"-layout-fixed"),V==="fixed"),Object(te.a)(Oe,"".concat(Fe,"-fixed-header"),Pn),Object(te.a)(Oe,"".concat(Fe,"-fixed-column"),Bn),Object(te.a)(Oe,"".concat(Fe,"-scroll-horizontal"),Nn),Object(te.a)(Oe,"".concat(Fe,"-has-fix-left"),gn[0]&&gn[0].fixed),Object(te.a)(Oe,"".concat(Fe,"-has-fix-right"),gn[gn.length-1]&&gn[gn.length-1].fixed==="right"),Oe)),style:K,id:be,ref:fi},kn),S.createElement(Qe,{pingLeft:$n,pingRight:Jn,props:Object(k.a)(Object(k.a)({},xe),{},{stickyOffsets:mi,mergedExpandedKeys:kt})},ne&&S.createElement(Y,{className:"".concat(Fe,"-title")},ne(wt)),S.createElement("div",{className:"".concat(Fe,"-container")},ci),ae&&S.createElement(Y,{className:"".concat(Fe,"-footer")},ae(wt))));Nn&&(di=S.createElement(f.a,{onResize:Wi},di));var Gi=S.useMemo(function(){return{prefixCls:Fe,getComponent:dt,scrollbarSize:Pt,direction:J,fixedInfoList:gn.map(function(Ht,Vt){return t(Vt,Vt,gn,mi,J)}),isSticky:ei}},[Fe,dt,Pt,J,gn,mi,J,ei]),tr=S.useMemo(function(){return Object(k.a)(Object(k.a)({},ri),{},{tableLayout:ti,rowClassName:q,expandedRowClassName:_t,componentWidth:dn,fixHeader:Pn,fixColumn:Bn,horizonScroll:Nn,expandIcon:ft,expandableType:lt,expandRowByClick:Ot,expandedRowRender:nt,onTriggerExpand:$t,expandIconColumnIndex:Dt,indentSize:Zt})},[ri,ti,q,_t,dn,Pn,Bn,Nn,ft,lt,Ot,nt,$t,Dt,Zt]),bi=S.useMemo(function(){return{onColumnResize:Qn}},[Qn]);return S.createElement(n.a.Provider,{value:Gi},S.createElement(D.Provider,{value:tr},S.createElement($.Provider,{value:bi},di)))}ut.Column=r.a,ut.ColumnGroup=a.a,ut.Summary=F.a,ut.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var tt=oe.b=ut},wRmb:function(Be,oe,P){"use strict";P.d(oe,"a",function(){return A});var te=P("rePB"),k=P("KQm4"),O=P("VTBJ"),U=P("Ff2n"),m=P("q1tI"),S=P.n(m),H=P("Kwbf"),N=P("Zm9Q"),e=P("hW8S");function A(r){return Object(N.a)(r).filter(function(o){return m.isValidElement(o)}).map(function(o){var s=o.key,i=o.props,n=i.children,t=Object(U.a)(i,["children"]),b=Object(O.a)({key:s},t);return n&&(b.children=A(n)),b})}function v(r){return r.reduce(function(o,s){var i=s.fixed,n=i===!0?"left":i,t=s.children;return t&&t.length>0?[].concat(Object(k.a)(o),Object(k.a)(v(t).map(function(b){return Object(O.a)({fixed:n},b)}))):[].concat(Object(k.a)(o),[Object(O.a)(Object(O.a)({},s),{},{fixed:n})])},[])}function f(r){for(var o=!0,s=0;s<r.length;s+=1){var i=r[s];if(o&&i.fixed!=="left")o=!1;else if(!o&&i.fixed==="left"){Object(H.a)(!1,"Index ".concat(s-1," of `columns` missing `fixed='left'` prop."));break}}for(var n=!0,t=r.length-1;t>=0;t-=1){var b=r[t];if(n&&b.fixed!=="right")n=!1;else if(!n&&b.fixed==="right"){Object(H.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function l(r){return r.map(function(o){var s=o.fixed,i=Object(U.a)(o,["fixed"]),n=s;return s==="left"?n="right":s==="right"&&(n="left"),Object(O.a)({fixed:n},i)})}function a(r,o){var s=r.prefixCls,i=r.columns,n=r.children,t=r.expandable,b=r.expandedKeys,y=r.getRowKey,g=r.onTriggerExpand,E=r.expandIcon,_=r.rowExpandable,u=r.expandIconColumnIndex,c=r.direction,p=r.expandRowByClick,d=m.useMemo(function(){return i||A(n)},[i,n]),x=m.useMemo(function(){if(t){var M,D=u||0,w=d[D],C=(M={},Object(te.a)(M,e.a,{className:"".concat(s,"-expand-icon-col")}),Object(te.a)(M,"title",""),Object(te.a)(M,"fixed",w?w.fixed:null),Object(te.a)(M,"className","".concat(s,"-row-expand-icon-cell")),Object(te.a)(M,"render",function(z,$,he){var fe=y($,he),Ie=b.has(fe),Se=_?_($):!0,pe=E({prefixCls:s,expanded:Ie,expandable:Se,record:$,onExpand:g});return p?m.createElement("span",{onClick:function(Me){return Me.stopPropagation()}},pe):pe}),M),j=d.slice();return D>=0&&j.splice(D,0,C),j}return d},[t,d,y,b,E,c]),h=m.useMemo(function(){var M=x;return o&&(M=o(M)),M.length||(M=[{render:function(){return null}}]),M},[o,x,c]),T=m.useMemo(function(){return c==="rtl"?l(v(h)):v(h)},[h,c]);return[h,T]}oe.b=a},wwSX:function(Be,oe,P){Be.exports=P.p+"static/b2.2c844a2a.svg"},xiVL:function(Be,oe){Be.exports="data:image/png;base64,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"},xwll:function(Be,oe,P){Be.exports=P.p+"static/statistic-icon.df5f8e49.png"},"y0+3":function(Be,oe,P){"use strict";P.d(oe,"a",function(){return v}),P.d(oe,"b",function(){return l});var te=/margin|padding|width|height|max|min|offset/,k={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function U(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function m(a,r,o){if(r=r.toLowerCase(),o==="auto"){if(r==="height")return a.offsetHeight;if(r==="width")return a.offsetWidth}return r in k||(k[r]=te.test(r)),k[r]?parseFloat(o)||0:o}function S(a,r){var o=arguments.length,s=U(a);return r=O[r]?"cssFloat"in a.style?"cssFloat":"styleFloat":r,o===1?s:m(a,r,s[r]||a.style[r])}function H(a,r,o){var s=arguments.length;if(r=O[r]?"cssFloat"in a.style?"cssFloat":"styleFloat":r,s===3)return typeof o=="number"&&te.test(r)&&(o="".concat(o,"px")),a.style[r]=o,o;for(var i in r)r.hasOwnProperty(i)&&H(a,i,r[i]);return U(a)}function N(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function e(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function A(){var a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:r}}function v(){var a=document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:r}}function f(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function l(a){var r=a.getBoundingClientRect(),o=document.documentElement;return{left:r.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}},y3Jh:function(Be,oe,P){"use strict";P.r(oe);var te=P("5Dmo"),k=P("3S7+"),O=P("fV52"),U=P("3I+P"),m=P("g9YV"),S=P("wCAj"),H=P("Znn+"),N=P("ZTPi"),e=P("5NDa"),A=P("5rEg"),v=P("OaEy"),f=P("2fM7"),l=P("14J3"),a=P("BMrR"),r=P("jCWc"),o=P("kPKH"),s=P("7Kak"),i=P("9yH6"),n=P("lUTK"),t=P("BvKs"),b=P("2qtc"),y=P("kLXV"),g=P("miYZ"),E=P("tsqr"),_=P("k1fw"),u=P("oBTY"),c=P("+L6B"),p=P("2/Rp"),d=P("qVdP"),x=P("jsC+"),h=P("9og8"),T=P("tJVT"),M=P("WmNS"),D=P.n(M),w=P("q1tI"),C=P.n(w),j=P("Ty5D"),L=P("9kvl"),z=P("9Bee"),$=P("wd/R"),he=P.n($),fe=P("m3rI"),Ie=P("ErOA"),Se=P("5A5F"),pe=P.n(Se),Ce=P("xKgJ"),Me=P("zqRK"),ge=P.n(Me),B=P("+92d"),R=P.n(B),I=P("wwSX"),W=P.n(I),Y=P("zlzj"),F=P.n(Y),le=P("pxMS"),Ae=P.n(le),Ne=P("xwll"),ie=P.n(Ne),de=P("a2OE"),we=P.n(de),De=P("Nf5h"),Ke=P("LvDl"),Je=P.n(Ke),Ze=P("1vsH"),Qe=P("yDOu"),ut=P.n(Qe),tt=P("SVaM"),xe=function(Fe){var We,q,K,G,Q,ee,V,J,ne,ae,ye,be,Pe,ze,qe,Xe,At,pt=Fe.globalSetting,ot=Fe.user,Mt=Fe.dispatch,Rt=Object(j.h)(),wt={page:1,per_page:30,tag_discipline_id:[-1],source_discipline_id:[-1],status:null,difficulty:null,search:"",save_search:"",sort_by:null,sort_direction:null,filter:(Rt==null||((We=Rt.query)===null||We===void 0)?void 0:We.tab)||"public"},zt=Object(w.useState)(0),vt=Object(T.a)(zt,2),It=vt[0],Pt=vt[1],yt=Object(w.useState)(0),Jt=Object(T.a)(yt,2),dt=Jt[0],st=Jt[1],Le=Object(w.useState)(0),ct=Object(T.a)(Le,2),mt=ct[0],Ct=ct[1],ht=Object(w.useState)([]),nt=Object(T.a)(ht,2),it=nt[0],rt=nt[1],Ot=Object(w.useState)([]),at=Object(T.a)(Ot,2),Dt=at[0],_t=at[1],en=Object(w.useState)({}),Zt=Object(T.a)(en,2),ft=Zt[0],pn=Zt[1],lt=Object(w.useState)(!1),qt=Object(T.a)(lt,2),Lt=qt[0],on=qt[1],Kt=Object(w.useState)([]),kt=Object(T.a)(Kt,2),$t=kt[0],an=kt[1],cn=Object(w.useState)(!0),dn=Object(T.a)(cn,2),Mn=dn[0],Xn=dn[1],Mi=Object(w.useState)(null),ii=Object(T.a)(Mi,2),gn=ii[0],ri=ii[1],fi=Object(w.useState)(wt),Ti=Object(T.a)(fi,2),ke=Ti[0],Hn=Ti[1],ai=Object(w.useRef)(null),$n=Object(w.useRef)(null),Qi=Object(w.useState)([]),Pi=Object(T.a)(Qi,2),Sn=Pi[0],Jn=Pi[1],si=Object(w.useMemo)(function(){return["not_reviewed","under_review","review_finished"].includes(ke.filter)},[ke.filter]),Zi=Object(w.useState)(!1),Si=Object(T.a)(Zi,2),qi=Si[0],Ni=Si[1],Wn=Object(w.useState)(!1),pi=Object(T.a)(Wn,2),ki=pi[0],mi=pi[1],Pn=Object(w.useState)(""),Nn=Object(T.a)(Pn,2),Bn=Nn[0],wi=Nn[1],oi=Object(w.useState)([]),ei=Object(T.a)(oi,2),Ui=ei[0],Bi=ei[1],Fi=Object(w.useState)(!1),gi=Object(T.a)(Fi,2),vi=gi[0],Kn=gi[1],Qn=Object(w.useState)([]),li=Object(T.a)(Qn,2),Zn=li[0],ji=li[1],Hi=Object(w.useState)(!1),ui=Object(T.a)(Hi,2),qn=ui[0],yi=ui[1],Wi=Object(w.useState)(!1),Ci=Object(T.a)(Wi,2),ti=Ci[0],ci=Ci[1],Ai=ot.userInfo.identity==="teacher",Gn=function(){var je=Object(h.a)(D.a.mark(function He(Ge,et,xt){var bt,hn,En,se,ve;return D.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Ge.persist(),Ge!=null&&(bt=Ge.target)!==null&&bt!==void 0&&(hn=bt.style)!==null&&hn!==void 0&&hn.pointerEvents&&(Ge.target.style.pointerEvents="none"),ue.next=4,Object(Ie.a)("/api/practices/".concat(et.identifier,"/start"),{method:"get"});case 4:if(ve=ue.sent,!((ve==null?void 0:ve.status)===0)){ue.next=10;break}if(!xt){ue.next=9;break}return Object(Ze.S)("/problems/".concat(ve==null?void 0:ve.identifier,"/oj/").concat(et==null?void 0:et.identifier,"?tab=3")),ue.abrupt("return");case 9:Object(Ze.S)("/problems/".concat(ve==null?void 0:ve.identifier,"/oj/").concat(et==null?void 0:et.identifier));case 10:Ge!=null&&(En=Ge.target)!==null&&En!==void 0&&(se=En.style)!==null&&se!==void 0&&se.pointerEvents&&(Ge.target.style.pointerEvents="auto");case 11:case"end":return ue.stop()}},He)}));return function(Ge,et,xt){return je.apply(this,arguments)}}();Object(w.useEffect)(function(){var je=he()().add(0,"days").unix(),He=localStorage.getItem("problemsclose");if(!He){Kn(!0);return}je>parseInt(He)&&Kn(!0)},[]);var $i=["\u672A\u53D1\u5E03","\u5DF2\u516C\u5F00","\u672A\u5BA1\u6838","\u5BA1\u6838\u4E2D","\u672A\u516C\u5F00","\u672A\u901A\u8FC7"],Oi=[{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,render:function(He,Ge){return C.a.createElement("div",{className:pe.a.titleWarp},(ke==null?void 0:ke.filter)==="mine"?C.a.createElement("span",{className:pe.a.tag},$i[Ge.practice_status]):null,C.a.createElement("span",{title:He,className:pe.a.hov,onClick:function(xt){return Gn(xt,Ge)}},He))}},(ke==null?void 0:ke.filter)==="public"?{title:"\u9898\u89E3",dataIndex:"solution_count",width:100,sorter:!0,render:function(He,Ge){return C.a.createElement("span",{style:{display:"flex"}},C.a.createElement("span",{onClick:function(xt){return Gn(xt,Ge,!0)},className:"current"},He),(Ge==null?void 0:Ge.has_video_solution)&&C.a.createElement("img",{className:"ml5",src:ge.a}))}}:null,(ke==null?void 0:ke.filter)==="public"?{title:"\u901A\u8FC7\u7387",dataIndex:"pass_ratio",sorter:!0,width:90}:null,{title:"\u96BE\u5EA6",dataIndex:"difficulty",sorter:!0,align:"left",width:90,render:function(He){return C.a.createElement(C.a.Fragment,null,He===1&&C.a.createElement("span",{className:pe.a["btn-style-1"]},"\u7B80\u5355"),He===2&&C.a.createElement("span",{className:pe.a["btn-style-2"]},"\u9002\u4E2D"),He===3&&C.a.createElement("span",{className:pe.a["btn-style-3"]},"\u56F0\u96BE"))}},(ke==null?void 0:ke.filter)==="public"?{title:"\u4EBA\u6570",dataIndex:"user_count",align:"center",sorter:!0,width:80}:null,(ke==null?void 0:ke.filter)==="public"?{title:"\u72B6\u6001",dataIndex:"status",width:90,render:function(He,Ge){return Object(Ce.p)()?C.a.createElement(C.a.Fragment,null,gn===(Ge==null?void 0:Ge.identifier)?C.a.createElement("span",{className:pe.a.hovBtn,onClick:function(xt){return Gn(xt,Ge)}},"\u5F00\u542F\u5237\u9898"):C.a.createElement(C.a.Fragment,null,He===0&&C.a.createElement("span",{className:pe.a.statusText},"\u672A\u5F00\u542F"),He===1&&C.a.createElement("span",{className:pe.a.statusText},"\u8FDB\u884C\u4E2D"),He===2&&C.a.createElement("span",{className:pe.a.statusText},"\u5DF2\u901A\u8FC7"))):"-"}}:null,(ke==null?void 0:ke.filter)!=="public"?{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_disciplines_name",ellipsis:!0,width:200,render:function(He){return C.a.createElement("span",null,He==null?void 0:He.join("\u3001"))}}:null,(ke==null?void 0:ke.filter)==="all"?{title:"\u521B\u5EFA\u8005",dataIndex:"creator",ellipsis:!0,width:100}:null,(ke==null?void 0:ke.filter)!=="public"?{title:"\u66F4\u65B0\u65F6\u95F4",dataIndex:"updated_at",sorter:!0,width:180}:null,Object(Ce.w)()?{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"right",width:80,render:function(He,Ge){return C.a.createElement(x.a,{className:"ml10",overlay:Ii(Ge==null?void 0:Ge.identifier,Ge)},C.a.createElement("span",{style:{cursor:"default"},onClick:function(xt){return xt.preventDefault()}},C.a.createElement("span",null,"\u66F4\u591A"),C.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"c-grey-c iconfont icon-xiajiantou1"})))}}:Lt&&(ke==null?void 0:ke.filter)!=="public"?{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"right",width:80,render:function(He,Ge){return Ge!=null&&Ge.is_self&&(Ge==null?void 0:Ge.practice_status)!==1?C.a.createElement(x.a,{className:"ml10",overlay:Vi(Ge==null?void 0:Ge.identifier,Ge)},C.a.createElement("span",{style:{cursor:"default"},onClick:function(xt){return xt.preventDefault()}},C.a.createElement("span",null,"\u66F4\u591A"),C.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"c-grey-c iconfont icon-xiajiantou1"}))):"-"}}:null].filter(function(je){return!!je}),er=[{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,render:function(He,Ge){return C.a.createElement("span",{className:pe.a.hov,onClick:function(xt){return Gn(xt,Ge)}},He)}},{title:"\u96BE\u5EA6",dataIndex:"difficulty",sorter:!0,align:"left",width:90,render:function(He){return C.a.createElement(C.a.Fragment,null,He===1&&C.a.createElement("span",{className:pe.a["btn-style-1"]},"\u7B80\u5355"),He===2&&C.a.createElement("span",{className:pe.a["btn-style-2"]},"\u9002\u4E2D"),He===3&&C.a.createElement("span",{className:pe.a["btn-style-3"]},"\u56F0\u96BE"))}},(ke==null?void 0:ke.filter)==="not_reviewed"?{title:"\u521B\u5EFA\u8005",dataIndex:"creator",ellipsis:!0,width:100}:{title:"\u5BA1\u6838\u8005",dataIndex:"reviewer",ellipsis:!0,width:100},(ke==null?void 0:ke.filter)==="not_reviewed"?{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"submit_time",width:180}:null,(ke==null?void 0:ke.filter)==="under_review"?{title:"\u5F00\u59CB\u5BA1\u6838\u65F6\u95F4",dataIndex:"start_review_time",width:180}:null,(ke==null?void 0:ke.filter)==="review_finished"?{title:"\u6700\u540E\u5BA1\u6838\u65F6\u95F4",dataIndex:"review_time",width:180}:null,{title:"\u64CD\u4F5C",dataIndex:"action",key:"action",align:"center",width:120,render:function(He,Ge){var et;switch(ke==null?void 0:ke.filter){case"under_review":et=C.a.createElement("div",{style:{display:"flex"}},C.a.createElement(p.a,{type:"link",size:"small",onClick:function(bt){return Gn(bt,Ge)}},"\u5BA1\u6838"),C.a.createElement(p.a,{type:"link",style:{color:"#666"},size:"small",onClick:function(bt){return di({e:bt,record:Ge,op:"release"})}},"\u79FB\u51FA"));break;case"review_finished":et=C.a.createElement(p.a,{type:"link",size:"small",onClick:function(bt){Ni(!0),Ki(Ge)}},"\u5BA1\u6838\u8BB0\u5F55");break;default:et=C.a.createElement(p.a,{type:"link",block:!0,onClick:function(bt){return di({e:bt,record:Ge,op:"claim"})}},"\u5F00\u59CB\u5BA1\u6838");break}return et}}].filter(function(je){return!!je}),Ki=function(){var je=Object(h.a)(D.a.mark(function He(Ge){var et;return D.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return Bi([]),bt.next=3,Object(Ie.a)("/api/practices/".concat(Ge.identifier,"/review_list"),{method:"get"});case 3:et=bt.sent,Bi(et==null?void 0:et.reviews_list);case 5:case"end":return bt.stop()}},He)}));return function(Ge){return je.apply(this,arguments)}}(),Ri=[{title:"\u5BA1\u6838\u65F6\u95F4",dataIndex:"review_time",key:"review_time",render:function(He,Ge){return C.a.createElement("span",null,he()(He).format("YYYY-MM-DD HH:mm:ss"))}},{title:"\u5BA1\u6838\u8005",dataIndex:"reviewer",key:"reviewer"},{title:"\u5BA1\u6838\u7ED3\u679C",dataIndex:"status",width:120,key:"status",render:function(He,Ge){return He==="5"||He===5?C.a.createElement("div",{style:{display:"flex",alignItems:"center"}},C.a.createElement("div",{style:{color:"#333333",marginRight:"5px",whiteSpace:"nowrap"}},"\u672A\u901A\u8FC7"),C.a.createElement("div",{style:{color:"#0152d9",whiteSpace:"nowrap",cursor:"pointer"},onClick:function(){wi(Ge.description),mi(!0)}},"\u67E5\u770B\u539F\u56E0")):C.a.createElement("span",null,"\u5DF2\u901A\u8FC7")}}];Object(w.useEffect)(function(){tr(),kn(ke)},[]),Object(w.useEffect)(function(){if(it.length!==0){var je;(ai==null||((je=ai.current)===null||je===void 0)?void 0:je.clientHeight)>98&&Pt(1)}},[it]),Object(w.useEffect)(function(){if(Dt.length!==0){var je;($n==null||((je=$n.current)===null||je===void 0)?void 0:je.clientHeight)>98&&st(1)}},[Dt]),Object(w.useEffect)(function(){return Mt({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Mt({type:"globalSetting/setShowQuestionBackTop",payload:!0}),function(){Mt({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Mt({type:"globalSetting/setShowQuestionBackTop",payload:!1})}},[]),Object(w.useEffect)(function(){var je;(document.title==="\u4EBA\u5DE5\u667A\u80FD\u79D1\u7814\u670D\u52A1\u5E73\u53F0"||document.title==="\u9996\u9875"||document.title==="\u5B9E\u8DF5\u6559\u5B66\u5E73\u53F0"||(je=document.title)!==null&&je!==void 0&&je.includes("img"))&&(document.title="\u5728\u7EBF\u5237\u9898")},[pt]),Object(w.useEffect)(function(){return document.body.setAttribute("data-custom","initial"),function(){document.body.removeAttribute("data-custom")}},[]);var kn=function(){var je=Object(h.a)(D.a.mark(function He(Ge){var et,xt,bt,hn;return D.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return Ge.search=encodeURIComponent(Ge.search),bt=Je.a.cloneDeep(Ge),bt.tag_discipline_id=(et=bt.tag_discipline_id)!==null&&et!==void 0&&et.includes(-1)?[]:bt.tag_discipline_id,bt.source_discipline_id=(xt=bt.source_discipline_id)!==null&&xt!==void 0&&xt.includes(-1)?[]:bt.source_discipline_id,console.log(bt,"sendData"),Xn(!0),an([]),se.next=9,Object(Ie.a)("/api/practices.json",{method:"get",params:bt});case 9:hn=se.sent,Jn([]),Xn(!1),Ct(hn==null?void 0:hn.practices_count),an(hn==null?void 0:hn.practices_list),ji((hn==null?void 0:hn.recommend_subjects)||[]);case 15:case"end":return se.stop()}},He)}));return function(Ge){return je.apply(this,arguments)}}(),di=function(){var je=Object(h.a)(D.a.mark(function He(Ge){var et,xt,bt,hn,En,se;return D.a.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return et=Ge.op,xt=Ge.description,bt=Ge.record,hn=Ge.e,En={op:et,description:xt},Xn(!0),Ee.next=5,Object(Ie.a)("/api/practices/".concat(bt.identifier,"/review"),{method:"post",body:En});case 5:se=Ee.sent,Xn(!1),et==="claim"&&(se.status===0||se.status==="0")&&Gn(hn,bt),kn(ke);case 9:case"end":return Ee.stop()}},He)}));return function(Ge){return je.apply(this,arguments)}}(),Gi=function(){var je=Object(h.a)(D.a.mark(function He(Ge){var et;return D.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return Xn(!0),bt.next=3,Object(Ie.a)("/api/practices/".concat(Ge.identifier,"/publish"),{method:"post"});case 3:et=bt.sent,Xn(!1),kn(ke);case 6:case"end":return bt.stop()}},He)}));return function(Ge){return je.apply(this,arguments)}}(),tr=function(){var je=Object(h.a)(D.a.mark(function He(){var Ge,et,xt,bt,hn,En;return D.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ve.next=2,Object(Ie.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:return et=ve.sent,ve.next=5,Object(Ie.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source",position:"index"}});case 5:return xt=ve.sent,ve.next=8,Object(Ie.a)("/api/mypractices/rank_list",{method:"get",params:{}});case 8:bt=ve.sent,et!=null&&et.tag_disciplines&&(hn=[{id:-1,name:"\u5168\u90E8",count:et==null?void 0:et.totalCount}].concat(Object(u.a)(et==null?void 0:et.tag_disciplines)),rt(hn)),xt!=null&&xt.tag_disciplines&&(En=[{id:-1,name:"\u5168\u90E8",count:xt==null?void 0:xt.totalCount}].concat(Object(u.a)(xt==null?void 0:xt.tag_disciplines)),_t(En)),pn(bt||{}),on(bt==null||((Ge=bt.my_record)===null||Ge===void 0)?void 0:Ge.outsource);case 13:case"end":return ve.stop()}},He)}));return function(){return je.apply(this,arguments)}}(),bi=function(He,Ge){var et;ke.page=1;var xt=ke["".concat(Ge,"_discipline_id")];(et=ke["".concat(Ge,"_discipline_id")])!==null&&et!==void 0&&et.includes(He)?xt=xt.filter(function(bt){return bt!==He}):xt.push(He),He===-1?xt=[-1]:(xt=xt.filter(function(bt){return bt!==-1}),xt.length||(xt=[-1])),ke["".concat(Ge,"_discipline_id")]=xt,Hn(Object(_.a)({},ke)),kn(ke)},Ht=function(He,Ge){ke.page=1,ke[Ge]=typeof He=="number"?He:null,Hn(Object(_.a)({},ke)),kn(ke)},Vt=function(He){ke.page=1,ke.save_search=He,Hn(Object(_.a)({},ke))},vn=function(He,Ge,et){ke.page=He==null?void 0:He.current,ke.per_page=He==null?void 0:He.pageSize,et!=null&&et.order?(ke.sort_by=et==null?void 0:et.field,ke.sort_direction=(et==null?void 0:et.order)==="ascend"?"asc":"desc"):(ke.sort_by=null,ke.sort_direction=null),Hn(Object(_.a)({},ke)),kn(ke)},Cn=function(He){ke.page=1,ke.filter=He,ke.status=null,ke.practice_status=null,Hn(Object(_.a)({},ke)),kn(ke)},Rn=function(He,Ge){if((Ge==null?void 0:Ge.length)===0){E.b.warn("\u8BF7\u9009\u62E9\u8BD5\u9898");return}var et=function(){var xt=Object(h.a)(D.a.mark(function bt(){var hn,En;return D.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ve.next=2,Object(Ie.a)("/api/practices/batch_op.json",{method:"post",body:{identifier:Ge,op:He}});case 2:hn=ve.sent,(hn==null?void 0:hn.status)===0&&(En=$t.length===1&&ke.page!==1?ke.page-1:ke.page,ke.page=En,Hn(Object(_.a)({},ke)),kn(ke));case 4:case"end":return ve.stop()}},bt)}));return function(){return xt.apply(this,arguments)}}();if(He===-1){y.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5220\u9664\u786E\u8BA4",icon:null,className:"custom-modal-divider",content:"\u5220\u9664\u540E\u9898\u76EE\u5C06\u4E0D\u53EF\u518D\u627E\u56DE\u3002",onOk:et});return}et()},zi=C.a.createElement(t.a,null,(ke==null?void 0:ke.filter)==="public"?C.a.createElement(t.a.Item,{onClick:function(){return Rn(0,Sn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171"):[C.a.createElement(t.a.Item,{key:2,onClick:function(){return Rn(1,Sn)}},"\u6279\u91CF\u79FB\u5165\u516C\u5171"),C.a.createElement(t.a.Item,{key:1,onClick:function(){return Rn(0,Sn)}},"\u6279\u91CF\u79FB\u51FA\u516C\u5171")],Object(Ce.w)()&&C.a.createElement(t.a.Item,{onClick:function(){return nr()}},"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93"),(ke==null?void 0:ke.filter)!=="public"&&C.a.createElement(t.a.Item,{onClick:function(){return Rn(-1,Sn)}},"\u6279\u91CF\u5220\u9664")),Ii=function(He,Ge){return C.a.createElement(t.a,null,(Ge==null?void 0:Ge.practice_status)===1?C.a.createElement(t.a.Item,{onClick:function(){return Rn(0,[He])}},"\u79FB\u51FA\u516C\u5171"):C.a.createElement(t.a.Item,{onClick:function(){return Rn(1,[He])}},"\u79FB\u5165\u516C\u5171"),(ke==null?void 0:ke.filter)==="mine"?C.a.createElement(t.a.Item,{onClick:function(){return Gi(Ge)},disabled:![0,4,5].includes(Ge.practice_status)},[0,4,5].includes(Ge.practice_status)?"\u53D1\u5E03\u5BA1\u6838":"\u5DF2\u53D1\u5E03\u5BA1\u6838"):null,C.a.createElement(t.a.Item,{onClick:function(){return Object(Ze.S)("/problems/".concat(He,"/ojedit"))}},"\u7F16\u8F91"),(ke==null?void 0:ke.filter)!=="public"&&C.a.createElement(t.a.Item,{onClick:function(){return Rn(-1,[He])}},"\u5220\u9664"))},Vi=function(He,Ge){return C.a.createElement(t.a,null,C.a.createElement(t.a.Item,{onClick:function(){return Gi(Ge)},disabled:![0,4,5].includes(Ge.practice_status)},[0,4,5].includes(Ge.practice_status)?"\u53D1\u5E03\u5BA1\u6838":"\u5DF2\u53D1\u5E03\u5BA1\u6838"),C.a.createElement(t.a.Item,{onClick:function(){return Object(Ze.S)("/problems/".concat(He,"/ojedit"))}},"\u7F16\u8F91"),C.a.createElement(t.a.Item,{onClick:function(){return Rn(-1,[He])}},"\u5220\u9664"))},Yi=function(He){Jn(He)},nr=function(){if(!Sn.length){E.b.warn("\u8BF7\u9009\u62E9\u53D1\u9001\u81F3\u8BD5\u9898\u5E93\u7684\u7F16\u7A0B\u5237\u9898");return}var He=null;y.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93",icon:null,className:"custom-modal-divider",content:C.a.createElement("div",null,C.a.createElement("p",{className:"mt20"},"\u5DF2\u9009",C.a.createElement("span",{className:"c-light-primary"},Sn.length),"\u4E2D\u4E2A\u7F16\u7A0B\u5237\u9898\u53D1\u9001\u81F3\u8BD5\u9898\u5E93\u6210\u4E3A\u7F16\u7A0B\u9898"),C.a.createElement("div",null,"\u8BF7\u9009\u62E9\u7F16\u7A0B\u9898\u7684\u8BED\u8A00\uFF1A"),C.a.createElement(i.a.Group,{onChange:function(et){He=et.target.value,document.getElementById("send-to-modal").style.display="none"}},C.a.createElement(i.a,{value:"c"},"C"),C.a.createElement(i.a,{value:"c++"},"C++"),C.a.createElement(i.a,{value:"java"},"Java"),C.a.createElement(i.a,{value:"python"},"Python")),C.a.createElement("div",{id:"send-to-modal",style:{color:"#E30000",display:"none"}},"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00")),onOk:function(){var Ge=Object(h.a)(D.a.mark(function xt(){var bt;return D.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:if(He){En.next=3;break}return document.getElementById("send-to-modal").style.display="block",En.abrupt("return",Promise.reject());case 3:return En.next=5,Object(Ie.a)("/api/practices/send_to_item_bank.json",{method:"post",body:{identifiers:Sn,language:He}});case 5:bt=En.sent,(bt==null?void 0:bt.status)===0&&E.b.success("\u53D1\u9001\u6210\u529F");case 7:case"end":return En.stop()}},xt)}));function et(){return Ge.apply(this,arguments)}return et}()})},dr={selectedRowKeys:Sn,columnWidth:40,onChange:Yi};return C.a.createElement("section",{className:pe.a.wrap},C.a.createElement(De.a,{img:Ae.a,title:"\u7F16\u7A0B\u5237\u9898",sunTitle:"\u5FEB\u901F\u63D0\u9AD8\u7F16\u7A0B\u80FD\u529B",bannerExtraContent:C.a.createElement(x.a,{overlay:C.a.createElement(t.a,null,C.a.createElement(t.a.Item,{key:1,onClick:function(){L.d.push("/problems/add")}},"\u65B0\u5EFA\u9898\u76EE"),C.a.createElement(t.a.Item,{key:2,onClick:function(){L.d.push("/problems/batchAdd")}},"\u6279\u91CF\u5BFC\u5165\u9898\u76EE"))},C.a.createElement("div",{className:pe.a.addQuestion,style:{visibility:Object(Ce.w)()||Lt?"visible":"hidden"}},C.a.createElement("span",null,"\u65B0\u5EFA\u9898\u76EE")))}),C.a.createElement("div",{className:pe.a.content},C.a.createElement("div",{className:pe.a.left},C.a.createElement(a.a,{className:"".concat(pe.a.filterPoint," mb10"),align:"top"},C.a.createElement(o.a,{className:pe.a.filterType},"\u77E5\u8BC6\u70B9"),C.a.createElement(o.a,{className:pe.a.btnWarp,ref:ai,style:It>0?{height:It===1?76:"auto"}:{}},it==null?void 0:it.map(function(je){var He;return C.a.createElement("div",{onClick:function(){return bi(je.id,"tag")},key:je.id,className:ke!=null&&(He=ke.tag_discipline_id)!==null&&He!==void 0&&He.includes(je.id)?"".concat(pe.a.btn," ").concat(pe.a.btnActive):pe.a.btn},C.a.createElement("span",{title:je.name},je.name),C.a.createElement("span",{className:pe.a.count,style:{display:je.count?"block":"none"}},je.count))})),!!It&&C.a.createElement(o.a,{className:pe.a.fold},It===1?C.a.createElement("div",{onClick:function(){return Pt(2)},className:pe.a.action},"\u5C55\u5F00",C.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):C.a.createElement("div",{onClick:function(){return Pt(1)},className:pe.a.action},"\u6536\u8D77",C.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"})))),!!Dt.length&&C.a.createElement(a.a,{className:pe.a.filterPoint,align:"top",style:{marginBottom:22}},C.a.createElement(o.a,{className:pe.a.filterType},"\u6765\u6E90"),C.a.createElement(o.a,{className:pe.a.btnWarp,ref:$n,style:dt>0?{height:dt===1?76:"auto"}:{}},Dt==null?void 0:Dt.map(function(je){var He;return C.a.createElement("div",{onClick:function(){return bi(je.id,"source")},key:je.id,className:ke!=null&&(He=ke.source_discipline_id)!==null&&He!==void 0&&He.includes(je.id)?"".concat(pe.a.btn," ").concat(pe.a.btnActive):pe.a.btn},C.a.createElement("span",{title:je.name},je.name),C.a.createElement("span",{className:pe.a.count},je.count))}),!!dt&&C.a.createElement(o.a,{className:pe.a.fold},dt===1?C.a.createElement("div",{onClick:function(){return st(2)},className:pe.a.action},"\u5C55\u5F00",C.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-zhankai4"})):C.a.createElement("div",{onClick:function(){return st(1)},className:pe.a.action},"\u6536\u8D77",C.a.createElement("i",{style:{transform:"scale(0.5)"},className:"iconfont icon-shouqi3"}))))),C.a.createElement("div",{className:pe.a.control},C.a.createElement(f.a,{suffixIcon:C.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u96BE\u5EA6",value:ke==null?void 0:ke.difficulty,onChange:function(He){return Ht(He,"difficulty")}},C.a.createElement(f.a.Option,{value:1},"\u7B80\u5355"),C.a.createElement(f.a.Option,{value:2},"\u9002\u4E2D"),C.a.createElement(f.a.Option,{value:3},"\u56F0\u96BE")),Object(Ce.p)()&&ke.filter==="public"&&C.a.createElement(f.a,{suffixIcon:C.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:ke==null?void 0:ke.status,onChange:function(He){return Ht(He,"status")}},C.a.createElement(f.a.Option,{value:0},"\u672A\u5F00\u542F"),C.a.createElement(f.a.Option,{value:1},"\u8FDB\u884C\u4E2D"),C.a.createElement(f.a.Option,{value:2},"\u5DF2\u901A\u8FC7")),Object(Ce.p)()&&ke.filter==="mine"&&C.a.createElement(f.a,{suffixIcon:C.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:ke==null?void 0:ke.practice_status,onChange:function(He){return Ht(He,"practice_status")}},C.a.createElement(f.a.Option,{value:0},"\u672A\u53D1\u5E03"),C.a.createElement(f.a.Option,{value:1},"\u5DF2\u516C\u5F00"),C.a.createElement(f.a.Option,{value:2},"\u672A\u5BA1\u6838"),C.a.createElement(f.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),C.a.createElement(f.a.Option,{value:4},"\u672A\u516C\u5F00"),C.a.createElement(f.a.Option,{value:5},"\u672A\u901A\u8FC7")),Object(Ce.p)()&&ke.filter==="all"&&C.a.createElement(f.a,{suffixIcon:C.a.createElement("i",{className:"iconfont icon-a-bianzu11"}),allowClear:!0,placeholder:"\u72B6\u6001",value:ke==null?void 0:ke.practice_status,onChange:function(He){return Ht(He,"practice_status")}},C.a.createElement(f.a.Option,{value:0},"\u672A\u53D1\u5E03"),C.a.createElement(f.a.Option,{value:1},"\u5DF2\u516C\u5F00"),C.a.createElement(f.a.Option,{value:2},"\u672A\u5BA1\u6838"),C.a.createElement(f.a.Option,{value:3},"\u5BA1\u6838\u4E2D"),C.a.createElement(f.a.Option,{value:4},"\u672A\u516C\u5F00"),C.a.createElement(f.a.Option,{value:5},"\u672A\u901A\u8FC7")),C.a.createElement(A.a.Search,{className:pe.a.search,size:"large",suffix:C.a.createElement("i",{className:"iconfont icon-sousuo9 font14 ".concat(pe.a.searchIcon),onClick:function(){ke.page=1,ke.search=ke.save_search,Hn(Object(_.a)({},ke)),ke.save_search&&Object(tt.a)({name:ke.save_search,copywriting:ke.save_search,position:"Practice"}),kn(ke)}}),placeholder:Object(Ce.w)()?"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u3001\u521B\u5EFA\u8005\u641C\u7D22":"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",value:ke==null?void 0:ke.save_search,onChange:function(He){return Vt(He.target.value)},onSearch:function(He){ke.page=1,ke.search=ke.save_search,Hn(Object(_.a)({},ke)),He&&Object(tt.a)({name:He,copywriting:He,position:"Practice"}),kn(ke)}})),C.a.createElement("div",{className:pe.a.table},C.a.createElement("div",{className:pe.a.tabWarp,style:Object(Ce.w)()||Lt?{}:{height:10,border:0}},Object(Ce.w)()?C.a.createElement(N.a,{className:pe.a.tab,activeKey:si?"not_reviewed":ke.filter,onChange:Cn,tabBarExtraContent:!si&&C.a.createElement(x.a,{overlay:zi},C.a.createElement("span",{className:"ant-dropdown-link font14 current",onClick:function(He){return He.preventDefault()}},"\u6279\u91CF\u64CD\u4F5C"," ",C.a.createElement("i",{style:{display:"inline-block",transform:"scale(0.6)",fontSize:12},className:"iconfont icon-xiajiantou1"})))},C.a.createElement(N.a.TabPane,{tab:"\u516C\u5171",key:"public"}),C.a.createElement(N.a.TabPane,{tab:"\u5168\u90E8",key:"all"}),C.a.createElement(N.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),C.a.createElement(N.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):Lt?C.a.createElement(N.a,{className:pe.a.tab,activeKey:si?"not_reviewed":ke.filter,onChange:Cn},C.a.createElement(N.a.TabPane,{tab:"\u516C\u5171",key:"public"}),C.a.createElement(N.a.TabPane,{tab:"\u6211\u521B\u5EFA\u7684",key:"mine"}),C.a.createElement(N.a.TabPane,{tab:"\u5BA1\u6838\u5217\u8868",key:"not_reviewed"})):null),si?C.a.createElement("div",{className:pe.a.tabWarp,style:Object(Ce.w)()||Lt?{}:{height:10,border:0}},C.a.createElement(N.a,{className:pe.a.tab,activeKey:ke.filter,onChange:Cn},C.a.createElement(N.a.TabPane,{tab:"\u5F85\u5BA1\u6838",key:"not_reviewed"}),C.a.createElement(N.a.TabPane,{tab:"\u5BA1\u6838\u4E2D",key:"under_review"}),C.a.createElement(N.a.TabPane,{tab:"\u5DF2\u5BA1\u6838",key:"review_finished"}))):null,!(Object(Ce.w)()||Lt)&&Ai&&C.a.createElement("div",{className:pe.a.tabWarp2,style:{justifyContent:"end"}},qn?C.a.createElement(a.a,{align:"middle"},C.a.createElement(a.a,{onClick:function(){return ci(!0)},align:"middle",className:"current"},C.a.createElement("i",{className:"iconfont icon-yixuan mr10 c-light-primary font20"}),C.a.createElement("span",null,"\u5DF2\u9009",C.a.createElement("span",{className:"c-light-primary"},Sn.length),"\u4E2A")),C.a.createElement(p.a,{className:"mr20 ml40",ghost:!0,onClick:function(){yi(!1),Jn([])},type:"primary"},"\u53D6\u6D88"),C.a.createElement(p.a,{onClick:nr,ghost:!0,type:"primary"},"\u786E\u8BA4\u53D1\u9001")):C.a.createElement(p.a,{onClick:function(){return yi(!0)},type:"primary"},C.a.createElement("i",{className:"iconfont icon-fasong mr5"}),"\u53D1\u9001\u81F3\u8BD5\u9898\u5E93")),C.a.createElement(S.a,{rowSelection:Object(Ce.w)()||qn?dr:void 0,className:pe.a.customTable,dataSource:$t,bordered:!1,rowKey:function(He){return He.identifier},columns:si?er:Oi,rowClassName:pe.a.row,loading:Mn,onRow:function(He){return{onMouseEnter:function(et){ri(He==null?void 0:He.identifier)},onMouseLeave:function(et){ri(null)}}},onChange:vn,pagination:{pageSize:ke.per_page,total:mt,current:ke.page,showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,position:["bottomCenter"],showTotal:function(He){return C.a.createElement("span",{className:"mr10"},"\u5171",C.a.createElement("span",{className:"c-orange"},He),"\u6761\u6570\u636E")}}}))),C.a.createElement("div",{className:pe.a.right},C.a.createElement("div",{className:pe.a.statistics},C.a.createElement("img",{src:ie.a,alt:""}),C.a.createElement("div",{className:pe.a.title},"\u6211\u7684\u5237\u9898\u7EDF\u8BA1"),C.a.createElement(a.a,{justify:"space-between"},C.a.createElement(o.a,{className:pe.a.statisticItem},C.a.createElement("div",{className:pe.a.rate},Object(Ce.p)()?(ft==null||((q=ft.my_record)===null||q===void 0)?void 0:q.passed_ratio)||0:"-"),C.a.createElement("div",{className:pe.a.dataName},"\u901A\u8FC7\u7387(%)")),C.a.createElement(o.a,{className:pe.a.statisticItem},C.a.createElement("div",{className:pe.a.rate},Object(Ce.p)()?(ft==null||((K=ft.my_record)===null||K===void 0)?void 0:K.passed_count)||0:"-"),C.a.createElement("div",{className:pe.a.dataName},"\u5237\u9898\u6570")),C.a.createElement(o.a,{className:pe.a.statisticItem},C.a.createElement("div",{className:pe.a.rate},Object(Ce.p)()?ft==null||((G=ft.my_record)===null||G===void 0||((Q=G.time_count)===null||Q===void 0))?void 0:Q.toFixed(2):"-"),C.a.createElement("div",{className:pe.a.dataName},"\u7D2F\u8BA1\u65F6\u957F(h)")))),!!(ft!=null&&(ee=ft.rank_list)!==null&&ee!==void 0&&ee.length)&&C.a.createElement(C.a.Fragment,null,((V=ot.userInfo)===null||V===void 0?void 0:V.user_id)!=2&&Object(Ce.m)()&&(pt==null||((J=pt.setting)===null||J===void 0)?void 0:J.main_site)&&vi&&(Zn==null?void 0:Zn.length)>0&&C.a.createElement("div",{className:pe.a.problemsclose,style:{position:"relative"}},C.a.createElement(U.a,{autoplay:!0,pauseOnDotsHover:!0,style:{width:292,height:170,marginBottom:"10px",overflow:"hidden"}},Zn==null?void 0:Zn.map(function(je,He){return C.a.createElement("div",{style:{display:"flex"},key:He},C.a.createElement("a",{href:"/paths/".concat(je.identifier)},C.a.createElement("img",{style:{width:"292px",height:"170px",borderRadius:"4px"},src:fe.a.IMG_SERVER+"/"+je.image_url})))})),C.a.createElement("img",{className:pe.a.imgsrc,onClick:function(){localStorage.setItem("problemsclose",he()().add(1,"days").unix()+""),Kn(!1)},src:ut.a})),C.a.createElement("div",{className:pe.a.sort},C.a.createElement("div",{className:pe.a.rankHeader},C.a.createElement("img",{src:we.a,className:pe.a.rankIcon})),!!(ft!=null&&(ne=ft.my_record)!==null&&ne!==void 0&&ne.rank)&&C.a.createElement("div",{className:"".concat(pe.a.myRecord," ").concat(pe.a.li)},C.a.createElement("span",{className:"".concat(pe.a.recordPrefix," ").concat(pe.a.mine)},"\u6211\u7684"),C.a.createElement("img",{className:pe.a.avatar,src:fe.a.IMG_SERVER+"/images/"+(ft==null||((ae=ft.my_record)===null||ae===void 0)?void 0:ae.image_url)}),C.a.createElement("span",{title:ft==null||((ye=ft.my_record)===null||ye===void 0)?void 0:ye.nickname,className:pe.a.nickname},ft==null||((be=ft.my_record)===null||be===void 0)?void 0:be.nickname),C.a.createElement("span",{className:pe.a.myRank},(ft==null||((Pe=ft.my_record)===null||Pe===void 0)?void 0:Pe.rank)>999?"\u7B2C999+\u540D":"\u7B2C".concat(ft==null||((ze=ft.my_record)===null||ze===void 0)?void 0:ze.rank,"\u540D")),C.a.createElement("span",{className:pe.a.questionNumber},ft==null||((qe=ft.my_record)===null||qe===void 0)?void 0:qe.passed_count,"\u9898")),ft==null||((Xe=ft.rank_list)===null||Xe===void 0)?void 0:Xe.map(function(je,He){var Ge=He+1;return He===0&&(Ge=R.a),He===1&&(Ge=W.a),He===2&&(Ge=F.a),C.a.createElement("div",{className:pe.a.li,key:He},typeof Ge=="number"?C.a.createElement("span",{className:pe.a.recordPrefix},Ge):C.a.createElement("span",{className:pe.a.recordPrefix},C.a.createElement("img",{src:Ge})),C.a.createElement("img",{className:pe.a.avatar,src:fe.a.IMG_SERVER+"/images/"+(je==null?void 0:je.image_url)}),C.a.createElement("span",{title:je==null?void 0:je.nickname,className:pe.a.nickname},je==null?void 0:je.nickname),C.a.createElement("span",{className:pe.a.questionNumber},je.passed_count,"\u9898"))}))))),C.a.createElement(y.a,{title:"\u5BA1\u6838\u8BB0\u5F55",visible:qi,onOk:function(){},onCancel:function(){Ni(!1)},footer:null,closable:!0},C.a.createElement(S.a,{dataSource:Ui,columns:Ri})),C.a.createElement(y.a,{title:"\u672A\u901A\u8FC7\u539F\u56E0",visible:ki,onOk:function(){},onCancel:function(){mi(!1)},footer:null,closable:!0},C.a.createElement(z.a,{value:Bn})),C.a.createElement(y.a,{visible:ti,centered:!0,width:1e3,okText:"\u786E\u5B9A\u53D1\u9001",onCancel:function(){return ci(!1)},cancelText:"\u8FD4\u56DE\u5217\u8868",onOk:Object(h.a)(D.a.mark(function je(){return D.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:ci(!1),nr();case 2:case"end":return Ge.stop()}},je)})),title:"\u67E5\u770B\u5DF2\u9009"},C.a.createElement("div",{className:"font14 c-light-primary mb10"},"\u5DF2\u9009",Sn==null?void 0:Sn.length,"\u4E2A"),C.a.createElement("div",{style:{height:400,overflow:"auto"}},$t==null||((At=$t.filter(function(je){return Sn.includes(je.identifier)}))===null||At===void 0)?void 0:At.map(function(je,He){var Ge,et;return C.a.createElement("div",{key:He,className:pe.a.sendModal},C.a.createElement("div",{className:pe.a.li},C.a.createElement("p",null,je==null?void 0:je.name),C.a.createElement("div",{className:pe.a.bottom},C.a.createElement("span",{className:"c-grey-333"},"\u7F16\u7A0B\u9898"),C.a.createElement("i",{className:pe.a.line}),C.a.createElement("span",{className:"c-grey-333"},je.difficulty===1&&"\u7B80\u5355",je.difficulty===2&&"\u9002\u4E2D",je.difficulty===3&&"\u56F0\u96BE"),C.a.createElement("i",{className:pe.a.line}),C.a.createElement("span",null,"\u521B\u5EFA\u8005\xA0",C.a.createElement(k.a,{title:je==null?void 0:je.creator},C.a.createElement("span",{className:"c-grey-333"},(je==null||((Ge=je.creator)===null||Ge===void 0)?void 0:Ge.length)>6?(je==null||((et=je.creator)===null||et===void 0)?void 0:et.substr(0,3))+"...":je==null?void 0:je.creator))),C.a.createElement("i",{className:pe.a.line}),C.a.createElement("span",{className:pe.a.des},"\u66F4\u65B0\xA0",C.a.createElement("span",{className:"c-grey-333"},je==null?void 0:je.updated_at)))),C.a.createElement("div",{className:pe.a.del,onClick:function(){Jn(Sn.filter(function(bt){return bt!==je.identifier}))}},"\u5220\u9664"))}))))};oe.default=Object(L.a)(function(Oe){var Fe=Oe.user,We=Oe.globalSetting;return{user:Fe,globalSetting:We}})(xe)},yDOu:function(Be,oe){Be.exports="data:image/png;base64,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"},z4EP:function(Be,oe){Be.exports="data:image/png;base64,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"},zlzj:function(Be,oe,P){Be.exports=P.p+"static/b3.30079151.svg"},zqRK:function(Be,oe,P){Be.exports=P.p+"static/v.7a1274ca.svg"}}]);
|