!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vcat=t():e.vcat=t()}(this,(function(){return(()=>{var e={186:e=>{e.exports={pt:{token_missing_one:"Erro de sintaxe: Espera-se $0, mas encontrou-se $1 na linha:$2, coluna:$3",token_missing_two:"Erro de sintaxe: Esperava-se $0 ou $1 mas encontrou-se $2 na liha:$3, coluna: $4",eos_missing:"Falta uma nova linha ou ; na linha: $0, coluna: $1",invalid_type:"$0 na linha: $1, coluna: $2 é um tipo inválido. Os tipos válidos são: $3",invalid_array_dimension:"A dimensão inválida na linha: $0, coluna: $1. Insira um $2 ou identificador válido do mesmo tipo.",invalid_array_size:"O tamnho do vetor/matriz excede o máximo de 2 na linha $0",extra_lines:"Nenhum texto é permitido após '}' em 'programa {...}'",invalid_main_return:"A função $0 declarada na linha $2 deve retornar $1.",invalid_var_declaration:"Erro na linha $0: variáveis só podem ser declaradas no corpo principal da função e nas primeiras linhas, antes de qualquer comando.",invalid_break_command:"Erro na linha $0. O comando $1 não pode ser usado fora de uma estrutura de repetição ou 'escolha...caso'",invalid_terminal:"Não é possível utilizar $0 na expressão da linha: $1, coluna: $2. Tente um valor númerico, variável ou chamada de função.",const_not_init:"Erro na linha: $0, coluna: $1. Uma variável declarada como const deve ser inicializada",id_missing:"Esperava-se um identificador, mas encontrou-se $0 na linha: $1, coluna: $2",invalid_id_format:"$0 na linha: $1, coluna: $2 não é um identificador válido. O símbolo '.' não é permitido neste contexto.",main_missing:"A função principal não foi encontrada",invalid_global_var:"Erro crítico: Chamada inválida da função initGlobal fora do contexto BASE",not_implemented:"Erro interno crítico: A função definida pelo sistema $0 não foi implementada.",function_missing:"A função $0 não foi encontrada",function_missing_full:"A função $0 na linha: $1, coluna: $2 não foi encontrada",invalid_parameters_size_full:"Erro na linha $0: a quantidade de parâmetros fornecidos à função $1 está incorreta. Esperava-se $2, encontrou-se $3.",invalid_parameters_size:"A quantidade de parâmetros fornecidos à função $0 está incorreta. Esperava-se $1, encontrou-se $2",invalid_ref_full:"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é válida para esta função. Use uma variável ou posição de vetor.",invalid_ref:"A expressão $0 fornecida como parâmetro para a função $1 não é válida para esta função. Use uma variável ou posição de vetor.",invalid_parameter_type_full:"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é compatível com o tipo esperado.",invalid_parameter_type:"A expressão $0 fornecida como parâmetro para a função $1 não é compatível com o tipo esperado.",unknown_command_full:"Erro interno crítico: comando desconhecido encontrado na linha $0",unknown_command:"Erro interno crítico: comando desconhecido encontrado!",loop_condition_type_full:"Erro na linha: $0, coluna $1: a condição $2 do laço de repetição deve ser do tipo lógico",loop_condition_type:"A condição $0 do laço de repetição deve ser do tipo lógico",endless_loop_full:"Possível laço infinito detectado no seu código. Verifique a linha $0",endless_loop:"Possível laço infinito detectado no seu código.",for_condition_type_full:"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico",for_condition_type:"A condição de parada $0 do comando para(...) deve ser do tipo lógico",if_condition_type_full:"Erro na linha: $0, coluna $1: a condição $2 do comando se...senao deve ser do tipo lógico",if_condition_type:"A condição $0 do comando se...senao deve ser do tipo lógico",invalid_return_type_full:"Erro na linha $0: a expressão não produz um tipo compatível com a função $1. Tipo esperado: $2.",invalid_return_type:"A expressão não produz um tipo compatível com a função $0. Tipo esperado: $1.",invalid_void_return_full:"Erro na linha $0: a função $1 não pode retornar uma expressão vazia, use uma espressão do tipo $2",invalid_void_return:"A função $0 não pode retornar uma expressão vazia, use uma espressão do tipo $1",unexpected_break_command_full:"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso na linha $0",unexpected_break_command:"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso",invalid_dimension:"As dimensões de um vetor/matriz devem ser do tipo inteiro",void_in_expression_full:"Erro na linha: $0, coluna: $1: a função $2 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",void_in_expression:"A função $0 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio",invalid_array_access_full:"Identificador $0 na linha: $1, coluna: $2 não se refere a um vetor/matriz válido",invalid_array_access:"Identificador $0 não se refere a um vetor/matriz válido",invalid_matrix_access_full:"Identificador $0 na linha: $1, coluna: $2 não se refere a uma matriz válida",invalid_matrix_access:"Identificador $0 não se refere a uma matriz válida",matrix_column_outbounds_full:"Erro na linha $0: número de colunas $1 é inválido para a matriz $2 que possui $3 colunas",matrix_column_outbounds:"Número de colunas $0 é inválido para a matriz $1 que possui $2 colunas",matrix_line_outbounds_full:"Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas",matrix_line_outbounds:"Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas",vector_line_outbounds_full:"Erro na linha $0: O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.",vector_line_outbounds:"O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.",vector_not_matrix_full:"Erro na linha $0: $1 não é uma matriz",vector_not_matrix:"$0 não é uma matriz",invalid_infix_op_full:"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado aos tipos $3 e $4",invalid_infix_op:"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado aos tipos $2 e $3",invalid_unary_op_full:"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado ao tipo $3",invalid_unary_op:"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado ao tipo $2",unknown_op:"Erro interno crítico: Operação $0 desconhecida",duplicate_function:"A função $0 na linha: $1, coluna: $2 já foi definida anteriormente.",duplicate_variable:"A variável $0 na linha: $1, coluna: $2 já foi declarada anteriormente.",main_parameters:"A função inicio não pode ter parâmetros.",symbol_not_found_full:"A variável $0 na linha: $1, coluna: $2 não foi declarada",symbol_not_found:"A variável $0 não foi declarada",array_dimension_not_int_full:"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser do tipo inteiro.",array_dimension_not_int:"As dimensões de um arranjo (vetor ou matriz) devem ser do tipo inteiro.",array_dimension_not_positive_full:"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser valores positivos.",array_dimension_not_positive:"As dimensões de um arranjo (vetor ou matriz) devem ser valores positivos.",incompatible_types_full:"Era esperado um $0 mas a expressão $1 na linha $2 resulta em $3.",incompatible_types:"Era esperado um $0 mas a expressão $1 resulta em $2.",incompatible_types_array_full:"A expressão $0 na linha $2 é incompatível com o tipo $1.",incompatible_types_array:"A expressão $0 é incompatível com o tipo $1.",invalid_case_type_full:"O caso $0 na linha $1 é incompatível com o tipo $2.",invalid_case_type:"O caso $0 é incompatível com o tipo $1.",function_no_return:"A função $0 não possui um comando de devolução acessível. Toda função deve ter ao menos um comando 'devolva' no seu corpo principal.",invalid_array_literal_type_full:"Erro na linha $0: a expressão $1 não resulta em um tipo compatível.",invalid_array_literal_type:"A expressão $0 não resulta em um tipo compatível.",invalid_array_literal_line_full:"Erro na linha $0: esperava-se $1 linhas mas encontrou $2.",invalid_array_literal_line:"Esperava-se $0 linhas mas encontrou $1.",invalid_array_literal_column_full:"Erro na linha $0: esperava-se $1 colunas mas encontrou $2.",invalid_array_literal_column:"Esperava-se $0 colunas mas encontrou $1.",exceeded_input_request:"A quantidade de leituras requisitadas execedeu a quantidade de entradas disponíveis.",test_case_few_reads:"Caso de teste $0 falhou: ainda restam entradas!",test_case_failed:"
Caso de teste $0 não executou com sucesso.
",test_case_failed_exception:"
Caso de teste $0 falhou: $1",test_case_exception:"Ocorreu uma exceção no caso de teste $0: $1",invalid_type_conversion:"O valor $0 não pode ser convertido para o tipo $1",invalid_read_type:"Erro na linha $0: A entrada \"$1\" não é do tipo $2, que é o tipo da variável $3.",invalid_read_type_array:"Erro na linha $0: A entrada \"$1\" não é do tipo $2, que é o tipo aceito pela variável $3 que é um $4.",inform_valid_identifier:"Informe um nome válido! O nome não pode ser uma palavra reservadas e deve começar com letras ou _ e conter apenas letras, números e _.",inform_valid_global_duplicated:"Já existe uma variável global com o nome $0, você precisa de nomes distintos.",inform_valid_variable_duplicated:"Já existe uma variável com o nome $0 na função $1, você precisa de nomes distintos.",inform_valid_function_duplicated:"Já existe uma função com o nome $0, você precisa de nomes distintos.",inform_valid_param_duplicated:"Já existe um parâmetro com o nome $0 na função $1, você precisa de nomes distintos.",invalid_character:"O caractere $0 na linha $1 não pode ser utilizado neste contexto.",invalid_syntax:"O iVProg não reconhece o texto $0 na linha $1. Certifique-se que não há erro de digitação ou caractere inválido.",annonymous_array_literal:"Erro na linha $0: a notação de vetor/matriz só permitida durante a inicialização de uma variável desse tipo. Ex: inteiro vec[3] ← {1,2,3}.",invalid_matrix_literal_line:"A expressão $0 na linha $1 não possui um número de elementos igual a linha anterior. Todas as linhas de uma matriz devem ter a mesma quantidade de elementos.",cannot_infer_matrix_line:"Não é possível inferir o número de linhas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.",cannot_infer_matrix_column:"Não é possível inferir o número de colunas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.",cannot_infer_vector_size:"Não é possível inferir o número de elementos do vetor $0 na linha $1. É necessário que ele seja inicializado ou que o valor seja informado de forma explícita",matrix_to_vector_literal_attr:"Erro na linha $0: A expressão $1 representa uma matriz e não pode ser atribuída ao vetor $2.",vector_to_matrix_literal_attr:"Erro na linha $0: A expressão $1 representa um vetor e não pode ser atribuído a matriz $2.",invalid_const_ref_full:"A variável $0 fornecida como parâmetro para a função $1 na linha $2 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.",invalid_const_ref:"A variável $0 fornecida como parâmetro para a função $1 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.",invalid_const_assignment_full:"Erro na linha $0: $1 é uma constante e portanto não pode ter seu valor alterado",invalid_const_assignment:"$0 é uma constante e portanto não pode ter seu valor alterado",array_init_not_literal:"Erro na linha $0: Vetor/Matriz só pode ser inicializado por literal. Ex: real vetor[] <- {1,2,3}",array_exceeds_2d:"Erro na linha $0: O número máximo de dimensões que um arranjo pode ter é 2. Elemento de 3 ou mais dimensões encontrado!",invalid_matrix_id_dimension:"Erro na linha $0: Você deve definir todas as dimensões da matriz quando uma delas é definida por uma variável! Ex: real mat1[var][5], mat2[5][var]",invalid_vector_init:"Erro na linha $0: Não se pode inicializar um vetor que teve seu tamanho declarado utilizando uma variável! Utilize uma atribuição de vetores ou use um laço de repetição.",invalid_matrix_init:"Erro na linha $0: Não se pode inicializar uma matrix que teve ao menos uma das suas dimensões declaradas utilizando uma variável! Utilize uma atribuição de matrizes ou use um laço de repetição.",invalid_vector_assignment_full:"Erro na linha $0: Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $1 comporta $2 e $3 comporta $4!",invalid_vector_assignment:"Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $0 comporta $1 e $2 comporta $3!",invalid_matrix_assignment_full:"Erro na linha $0: Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $1 tem $2 linhas e $3 colunas, enquanto $4 possui $5 linhas e $6 colunas!",invalid_matrix_assignment:"Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $0 tem $1 linhas e $2 colunas, enquanto $3 possui $4 linhas e $5 colunas!",matrix_to_vector_attr:"Erro na linha $0: $1 representa uma matriz e não pode ser atribuída ao vetor $2.",vector_to_matrix_attr:"Erro na linha $0: $1 representa um vetor e não pode ser atribuído a matriz $2.",invalid_matrix_index_assign_full:"Erro na linha $0: A posição $1 da matriz $2 aceita apenas vetores de tamanho $3, mas $4 tem tamanho $5",invalid_matrix_index_assign:"A linha $0 da matriz $1 aceita apenas vetores de tamanho $2, mas $3 tem tamanho $4",invalid_number_elements_vector:"Esperava-se por $0 elementos na linha $1 mas a expressão $2 possui $3 elementos.",invalid_number_lines_matrix:"Esperava-se por uma matriz com $0 linhas na linha $1 mas a expressão $2 possui $3 linhas",divsion_by_zero_full:"Erro na linha $0: A expressão $1 resulta em uma divisão por 0.",divsion_by_zero:"A expressão $0 resulta em uma divisão por 0.",undefined_tanget_value:"Erro na linha $0: A tangente de $1° não é indefinida.",negative_log_value:"Erro na linha $0: Não se pode calcular o log de um valor negativo.",invalid_string_index:"Erro na linha $0 durante a execução da função $1: $2 é um índice inválido para a cadeia de texto $3. Os valores válidos vão de 0 à $4",negative_sqrt_value:"Erro na linha $0: Não é permitido calcular a raiz quadrada de um número negativo.",exceeded_recursive_calls:"Erro na execução da linha $0: Número de chamadas recursivas execedeu o limite máximo definido!",invalid_for_variable:"Erro na linha $0: A variavel $1 utilizada no comando repita_para deve ser do tipo inteiro.",invalid_for_from:"Erro na linha $0: O valor $1 passado para o parâmetro 'de' do comando repita_para deve ser do tipo inteiro.",invalid_for_to:"Erro na linha $0: O valor $1 passado para o parâmetro 'para' do comando repita_para deve ser do tipo inteiro.",invalid_for_pass:"Erro na linha $0: O valor $1 passado para o parâmetro 'passo' do comando repita_para deve ser do tipo inteiro.",exceed_max_instructions:"Número de instruções excedeu o limite definido. Certifique-se que seu código não possui laços infinitos ou muitas chamadas de funções recursivas."},en:{token_missing_one:"Syntax error: Expected $0 but found $1 at line:$2, column:$3",token_missing_two:"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4",eos_missing:"A new line or a ‘;’ is missing at line: $0, column: $1",invalid_type:"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3",invalid_array_dimension:"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.",invalid_array_size:"The array at line $0 exceeds the maximum size of 2.",extra_lines:"No text is allowed after '}' in 'program { … }'",invalid_main_return:"The function $0 declared at line $2 must return $1.",invalid_var_declaration:"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.",invalid_break_command:"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.",invalid_terminal:"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.",const_not_init:"Error at line: $0, column: $1. A variable declared as const must be initialized.",id_missing:"Expected an identifier but found $0 at line: $1, column: $2.",invalid_id_format:"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.",main_missing:"The main function was not found. You need to declare a function of return type void named main.",invalid_global_var:"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.",not_implemented:"Critial internal error: The system defined function $0 was not found.",function_missing:"The function $0 was not found.",function_missing_full:"The function $0 at line: $1, column: $2 was not found.",invalid_parameters_size_full:"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.",invalid_parameters_size:"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.",invalid_ref_full:"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.",invalid_ref:"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.",invalid_parameter_type_full:"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.",invalid_parameter_type:"The expression $0 provided as a parameter to the function $1 is not of the expected type.",unknown_command_full:"Internal error: an unknown command found at line $0.",unknown_command:"Internal error: an unknown command found.",loop_condition_type_full:"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).",loop_condition_type:"The condition $0 of the loop must be of type bool (true or false).",endless_loop_full:"Possible infinite loop detected in your code. Check line $0.",endless_loop:"Possible infinite loop detected in your code.",for_condition_type_full:"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico",for_condition_type:"A condição de parada $0 do comando para(...) deve ser do tipo lógico",if_condition_type_full:"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).",if_condition_type:"The condition $0 in the if … else command must result in a bool (true or false).",invalid_return_type_full:"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.",invalid_return_type:"The expression doest not result in a type compatible with the function $0. Expected type: $1.",invalid_void_return_full:"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2",invalid_void_return:"The function $0 cannot return an empty expression, use an expression that results in a $1",unexpected_break_command_full:"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.",unexpected_break_command:"Critical error: a break command was found outside a valid context: loop or switch … case structure.",invalid_dimension:"Array (vector or matrix) dimensions must be of type int.",void_in_expression_full:"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.",void_in_expression:"The function $0 cannot be used inside an expression since its return type is void.",invalid_array_access_full:"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.",invalid_array_access:"Identifier $0 does not identify a valid vector or matrix.",invalid_matrix_access_full:"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.",invalid_matrix_access:"Identifier $0 does not identify a valid matrix.",matrix_column_outbounds_full:"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.",matrix_column_outbounds:"The number of columns $0 is invalid for the matrix $1 which has $2 columns.",matrix_line_outbounds_full:"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.",matrix_line_outbounds:"The number of lines $0 is invalid for matrix $1 which has $2 lines.",vector_line_outbounds_full:"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.",vector_line_outbounds:"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.",vector_not_matrix_full:"Error at line $0: $1 is not a matrix.",vector_not_matrix:"$0 is not a matrix.",invalid_infix_op_full:"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.",invalid_infix_op:"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.",invalid_unary_op_full:"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.",invalid_unary_op:"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.",unknown_op:"Critical error: Unknown operator $0.",duplicate_function:"The function $0 at line: $1, column: $2 has already been declared.",duplicate_variable:"The variable $0 at line: $1, column: $2 has already been declared.",main_parameters:"The main function cannot have parameters.",symbol_not_found_full:"The variable $0 at line: $1, column: $2 has not been declared.",symbol_not_found:"The variable $0 has not been declared.",array_dimension_not_int_full:"The array (vector or matrix) dimensions at line $0 must be of type int.",array_dimension_not_int:"An array (vector or matrix) dimensions must be of type int.",array_dimension_not_positive_full:"The array (vector or matrix) dimensions at line $0 must be positive.",array_dimension_not_positive:"An array (vector or matrix) dimensions must be positive.",incompatible_types_full:"It expected $0 but the expression $1 at line $2 results in $3.",incompatible_types:"It expected $0 but the expression $1 results in $2.",incompatible_types_array_full:"The expression $0 at line $2 is not compatible with type $1.",incompatible_types_array:"The expression $0 is not compatible with type $1.",invalid_case_type_full:"The case expression $0 at line $1 is not compatible with type $2.",invalid_case_type:"The case expression $0 is not compatible with type $1.",function_no_return:"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.",invalid_array_literal_type_full:"Error at line $0: the expression $1 does not result in a compatible type.",invalid_array_literal_type:"The expression $0 does not result in a compatible type.",invalid_array_literal_line_full:"Error at line $0: it expected $1 lines but found $2.",invalid_array_literal_line:"It expected $0 lines but found $1.",invalid_array_literal_column_full:"Error at line $0: it expected $1 column but found $2.",invalid_array_literal_column:"It expected $0 column but found $1.",exceeded_input_request:"The amount of reads requested exceeded the amount of inputs available.",test_case_few_reads:"Teste case $0 failed: there are available inputs remaining.",test_case_failed:"
Test case $0 did not executed successfully.
",test_case_failed_exception:"
Test case $0 failed: $1",test_case_exception:"An exception has ocurred during the execution of test case $0: $1",invalid_type_conversion:"The value $0 cannot be converted to type $1.",invalid_read_type:"Error at line $0: The input \"$1\" is not of type $2 which is the type of the variable $3.",invalid_read_type_array:"Error at line $0: The input \"$1\" is not of type $2 which is the type accepted by the variable $3 of type $4.",inform_valid_identifier:"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.",inform_valid_global_duplicated:"A global variable named $0 already exists, you need distinct names for each gloval variable.",inform_valid_variable_duplicated:"A variable named $0 already exists, you need distinct names for each variable.",inform_valid_function_duplicated:"A function named $0 already exists, you need distinct names for each function.",inform_valid_param_duplicated:"A parameter named $0 already exists in function $1, you need distinc names for each parameter.",invalid_character:"The character $0 at line $1 cannot be used in this context.",invalid_syntax:"iVProg does not recognize the text $0 at line $1. Check for typos or invalid character.",annonymous_array_literal:"Error at line $0: the array notation is only permitted during initialization of an array variable. i. e.: int vec[3] ← {1, 2, 3}.",invalid_matrix_literal_line:"The expression $0 at line $1 does not have the same number of elements as the last line. All lines of a matrix must have the same number of elements.",cannot_infer_matrix_line:"It is not possible to infer the number of lines of matrix $0 at line $1. It must be initialized or have its lines explicitly declared.",cannot_infer_matrix_column:"It is not possible to infer the number of columns of matrix $0 at line $1. It must be initialized or have its columns explicitly declared.",cannot_infer_vector_size:"It is not possible to infer the number of elements of vector $0 at line $1. It must be initialized or have its size explicitly declard.",matrix_to_vector_literal_attr:"Error at line $0: The expression $1 represents a matrix and cannot be assigned to the vector $2.",vector_to_matrix_literal_attr:"Error at line $0: The expression $1 represents a vector and cannot be assigned to the matrix $2.",invalid_const_ref_full:"The variable $0 provided as a parameter to the function $1 at line $2 is a constant and cannot be used in this context. Use a non-constant variable or vector position.",invalid_const_ref:"The variable $0 provided as a parameter to the function $1 is a constant and cannot be used in this context. Use a non-constant variable or vector position.",invalid_const_assignment_full:"Error at line $0: $1 is a constant e therefore cannot have its value changed.",invalid_const_assignment:"$0 is a constant e therefore cannot have its value changed.",array_init_not_literal:"Error at line $0: An array (vector or matrix) can only be initialized by an array literal. i.e : real vector[] <- {1,2,3}",array_exceeds_2d:"Error at line $0: The maximum number of dimensions an array can have is 2. An element of 3 or dimensions was found.",invalid_matrix_id_dimension:"Error at line $0: You must define all dimensions of the matrix when one of them is defined by a variable! i.e: real mat1[var][5], mat2[5][var]",invalid_vector_init:"Error at line $0: You cannot initialize a vector when its size is defined by a variable. Use a vector assignment or loop command.",invalid_matrix_init:"Error at line $0: You cannot initialize a matrix when one of its dimensions is defined by a variable. Use a matrix assignment or loop command.",invalid_vector_assignment_full:"Error at line $0: You can only assign a vector to another when both have the same number of elements. $1 has $2 and $3 has $4 elements!",invalid_vector_assignment:"You can only assign a vector to another when both have the same number of elements. $0 has $1 and $2 has $3 elements!",invalid_matrix_assignment_full:"Error at line $0: You can only assign a matrix to another when both have dimensions of the same size. $1 has $2 lines e $3 columns while $4 has $5 lines and $6 columns!",invalid_matrix_assignment:"You can only assign a matrix to another when both have dimensions of the same size. $0 has $1 lines e $2 columns while $3 has $4 lines and $5 columns!",matrix_to_vector_attr:"Error at line $0: $1 represents a matrix and cannot be assigned to the vector $2.",vector_to_matrix_attr:"Error at line $0: $1 represents a vector and cannot be assigned to the matrix $2.",invalid_matrix_index_assign_full:"Error at line $0: The position $1 of the matrix $2 only accepts vectors of size $3 but $4 has size $5.",invalid_matrix_index_assign:"The position $0 of the matrix $1 only accepts vectors of size $2 but $3 has size $4.",invalid_number_elements_vector:"It expected $0 elements at line $1 but the expression $2 has $3 elements.",invalid_number_lines_matrix:"It expected a matrix with $0 lines at line $1 but the expression $2 has $3 lines.",divsion_by_zero_full:"Error at line $0: The expression $1 resuts in a division by zero.",divsion_by_zero:"The expression $0 resuts in a division by zero.",undefined_tanget_value:"Error at line $0: The tangent of $1° is undefined.",negative_log_value:"Error at line $0: You cannot calculate the logarithm of a negative value.",invalid_string_index:"Error at line $0 during the execution of the function $1: $2 is an invalid index for the text string $3. The valid indexes go from 0 to $4.",negative_sqrt_value:"Error at line $0: It is not allowd to calculate the square root of a negative number.",exceeded_recursive_calls:"Error during the execution of line $0: The number of recursive calls exceeded the allowed number of calls.",invalid_for_variable:"Error at line $0: The variable $1 used in the repeat_for command must be of type int.",invalid_for_from:"Error at line $0: The value $1 passed to the parameter 'from' of the repeat_for command must be of type int.",invalid_for_to:"Error at line $0: The value $1 passed to the parameter 'to' of the repeat_for command must be of type int.",invalid_for_pass:"Error at line $0: The value $1 passed to the parameter 'pass' of the repeat_for command must be of type int.",exceed_max_instructions:"The number of instructions executed by your program exceed the defined limit. Check your code for infinite loops or excessive recursive functions calls."},es:{token_missing_one:"Syntax error: Expected $0 but found $1 at line:$2, column:$3",token_missing_two:"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4",eos_missing:"A new line or a ‘;’ is missing at line: $0, column: $1",invalid_type:"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3",invalid_array_dimension:"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.",invalid_array_size:"The array at line $0 exceeds the maximum size of 2.",extra_lines:"No text is allowed after '}' in 'program { … }'",invalid_main_return:"The function $0 declared at line $2 must return $1.",invalid_var_declaration:"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.",invalid_break_command:"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.",invalid_terminal:"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.",const_not_init:"Error at line: $0, column: $1. A variable declared as const must be initialized.",id_missing:"Expected an identifier but found $0 at line: $1, column: $2.",invalid_id_format:"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.",main_missing:"The main function was not found. You need to declare a function of return type void named main.",invalid_global_var:"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.",not_implemented:"Critial internal error: The system defined function $0 was not found.",function_missing:"The function $0 was not found.",function_missing_full:"The function $0 at line: $1, column: $2 was not found.",invalid_parameters_size_full:"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.",invalid_parameters_size:"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.",invalid_ref_full:"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.",invalid_ref:"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.",invalid_parameter_type_full:"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.",invalid_parameter_type:"The expression $0 provided as a parameter to the function $1 is not of the expected type.",unknown_command_full:"Internal error: an unknown command found at line $0.",unknown_command:"Internal error: an unknown command found.",loop_condition_type_full:"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).",loop_condition_type:"The condition $0 of the loop must be of type bool (true or false).",endless_loop_full:"Possible infinite loop detected in your code. Check line $0.",endless_loop:"Possible infinite loop detected in your code.",for_condition_type_full:"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico",for_condition_type:"A condição de parada $0 do comando para(...) deve ser do tipo lógico",if_condition_type_full:"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).",if_condition_type:"The condition $0 in the if … else command must result in a bool (true or false).",invalid_return_type_full:"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.",invalid_return_type:"The expression doest not result in a type compatible with the function $0. Expected type: $1.",invalid_void_return_full:"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2",invalid_void_return:"The function $0 cannot return an empty expression, use an expression that results in a $1",unexpected_break_command_full:"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.",unexpected_break_command:"Critical error: a break command was found outside a valid context: loop or switch … case structure.",invalid_dimension:"Array (vector or matrix) dimensions must be of type int.",void_in_expression_full:"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.",void_in_expression:"The function $0 cannot be used inside an expression since its return type is void.",invalid_array_access_full:"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.",invalid_array_access:"Identifier $0 does not identify a valid vector or matrix.",invalid_matrix_access_full:"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.",invalid_matrix_access:"Identifier $0 does not identify a valid matrix.",matrix_column_outbounds_full:"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.",matrix_column_outbounds:"The number of columns $0 is invalid for the matrix $1 which has $2 columns.",matrix_line_outbounds_full:"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.",matrix_line_outbounds:"The number of lines $0 is invalid for matrix $1 which has $2 lines.",vector_line_outbounds_full:"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.",vector_line_outbounds:"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.",vector_not_matrix_full:"Error at line $0: $1 is not a matrix.",vector_not_matrix:"$0 is not a matrix.",invalid_infix_op_full:"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.",invalid_infix_op:"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.",invalid_unary_op_full:"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.",invalid_unary_op:"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.",unknown_op:"Critical error: Unknown operator $0.",duplicate_function:"The function $0 at line: $1, column: $2 has already been declared.",duplicate_variable:"The variable $0 at line: $1, column: $2 has already been declared.",main_parameters:"The main function cannot have parameters.",symbol_not_found_full:"The variable $0 at line: $1, column: $2 has not been declared.",symbol_not_found:"The variable $0 has not been declared.",array_dimension_not_int_full:"The array (vector or matrix) dimensions at line $0 must be of type int.",array_dimension_not_int:"An array (vector or matrix) dimensions must be of type int.",array_dimension_not_positive_full:"The array (vector or matrix) dimensions at line $0 must be positive.",array_dimension_not_positive:"An array (vector or matrix) dimensions must be positive.",incompatible_types_full:"It expected $0 but the expression $1 at line $2 results in $3.",incompatible_types:"It expected $0 but the expression $1 results in $2.",incompatible_types_array_full:"The expression $0 at line $2 is not compatible with type $1.",incompatible_types_array:"The expression $0 is not compatible with type $1.",invalid_case_type_full:"The case expression $0 at line $1 is not compatible with type $2.",invalid_case_type:"The case expression $0 is not compatible with type $1.",function_no_return:"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.",invalid_array_literal_type_full:"Error at line $0: the expression $1 does not result in a compatible type.",invalid_array_literal_type:"The expression $0 does not result in a compatible type.",invalid_array_literal_line_full:"Error at line $0: it expected $1 lines but found $2.",invalid_array_literal_line:"It expected $0 lines but found $1.",invalid_array_literal_column_full:"Error at line $0: it expected $1 column but found $2.",invalid_array_literal_column:"It expected $0 column but found $1.",exceeded_input_request:"The amount of reads requested exceeded the amount of inputs available.",test_case_few_reads:"Teste case $0 failed: there are available inputs remaining.",test_case_failed:"
Test case $0 did not executed successfully.
",test_case_failed_exception:"
Test case $0 failed: $1",test_case_exception:"An exception has ocurred during the execution of test case $0: $1",invalid_type_conversion:"The value $0 cannot be converted to type $1.",invalid_read_type:"Error at line $0: The input \"$1\" is not of type $2 which is the type of the variable $3.",invalid_read_type_array:"Error at line $0: The input \"$1\" is not of type $2 which is the type accepted by the variable $3 of type $4.",inform_valid_identifier:"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.",inform_valid_global_duplicated:"A global variable named $0 already exists, you need distinct names for each gloval variable.",inform_valid_variable_duplicated:"A variable named $0 already exists, you need distinct names for each variable.",inform_valid_function_duplicated:"A function named $0 already exists, you need distinct names for each function.",inform_valid_param_duplicated:"A parameter named $0 already exists in function $1, you need distinc names for each parameter.",invalid_character:"The character $0 at line $1 cannot be used in this context.",invalid_syntax:"iVProg does not recognize the text $0 at line $1. Check for typos or invalid character.",annonymous_array_literal:"Error at line $0: the array notation is only permitted during initialization of an array variable. i. e.: int vec[3] ← {1, 2, 3}.",invalid_matrix_literal_line:"The expression $0 at line $1 does not have the same number of elements as the last line. All lines of a matrix must have the same number of elements.",cannot_infer_matrix_line:"It is not possible to infer the number of lines of matrix $0 at line $1. It must be initialized or have its lines explicitly declared.",cannot_infer_matrix_column:"It is not possible to infer the number of columns of matrix $0 at line $1. It must be initialized or have its columns explicitly declared.",cannot_infer_vector_size:"It is not possible to infer the number of elements of vector $0 at line $1. It must be initialized or have its size explicitly declard.",matrix_to_vector_literal_attr:"Error at line $0: The expression $1 represents a matrix and cannot be assigned to the vector $2.",vector_to_matrix_literal_attr:"Error at line $0: The expression $1 represents a vector and cannot be assigned to the matrix $2.",invalid_const_ref_full:"The variable $0 provided as a parameter to the function $1 at line $2 is a constant and cannot be used in this context. Use a non-constant variable or vector position.",invalid_const_ref:"The variable $0 provided as a parameter to the function $1 is a constant and cannot be used in this context. Use a non-constant variable or vector position.",invalid_const_assignment_full:"Error at line $0: $1 is a constant e therefore cannot have its value changed.",invalid_const_assignment:"$0 is a constant e therefore cannot have its value changed.",array_init_not_literal:"Error at line $0: An array (vector or matrix) can only be initialized by an array literal. i.e : real vector[] <- {1,2,3}",array_exceeds_2d:"Error at line $0: The maximum number of dimensions an array can have is 2. An element of 3 or dimensions was found.",invalid_matrix_id_dimension:"Error at line $0: You must define all dimensions of the matrix when one of them is defined by a variable! i.e: real mat1[var][5], mat2[5][var]",invalid_vector_init:"Error at line $0: You cannot initialize a vector when its size is defined by a variable. Use a vector assignment or loop command.",invalid_matrix_init:"Error at line $0: You cannot initialize a matrix when one of its dimensions is defined by a variable. Use a matrix assignment or loop command.",invalid_vector_assignment_full:"Error at line $0: You can only assign a vector to another when both have the same number of elements. $1 has $2 and $3 has $4 elements!",invalid_vector_assignment:"You can only assign a vector to another when both have the same number of elements. $0 has $1 and $2 has $3 elements!",invalid_matrix_assignment_full:"Error at line $0: You can only assign a matrix to another when both have dimensions of the same size. $1 has $2 lines e $3 columns while $4 has $5 lines and $6 columns!",invalid_matrix_assignment:"You can only assign a matrix to another when both have dimensions of the same size. $0 has $1 lines e $2 columns while $3 has $4 lines and $5 columns!",matrix_to_vector_attr:"Error at line $0: $1 represents a matrix and cannot be assigned to the vector $2.",vector_to_matrix_attr:"Error at line $0: $1 represents a vector and cannot be assigned to the matrix $2.",invalid_matrix_index_assign_full:"Error at line $0: The position $1 of the matrix $2 only accepts vectors of size $3 but $4 has size $5.",invalid_matrix_index_assign:"The position $0 of the matrix $1 only accepts vectors of size $2 but $3 has size $4.",invalid_number_elements_vector:"It expected $0 elements at line $1 but the expression $2 has $3 elements.",invalid_number_lines_matrix:"It expected a matrix with $0 lines at line $1 but the expression $2 has $3 lines.",divsion_by_zero_full:"Error at line $0: The expression $1 resuts in a division by zero.",divsion_by_zero:"The expression $0 resuts in a division by zero.",undefined_tanget_value:"Error at line $0: The tangent of $1° is undefined.",negative_log_value:"Error at line $0: You cannot calculate the logarithm of a negative value.",invalid_string_index:"Error at line $0 during the execution of the function $1: $2 is an invalid index for the text string $3. The valid indexes go from 0 to $4.",negative_sqrt_value:"Error at line $0: It is not allowd to calculate the square root of a negative number.",exceeded_recursive_calls:"Error during the execution of line $0: The number of recursive calls exceeded the allowed number of calls.",invalid_for_variable:"Error at line $0: The variable $1 used in the repeat_for command must be of type int.",invalid_for_from:"Error at line $0: The value $1 passed to the parameter 'from' of the repeat_for command must be of type int.",invalid_for_to:"Error at line $0: The value $1 passed to the parameter 'to' of the repeat_for command must be of type int.",invalid_for_pass:"Error at line $0: The value $1 passed to the parameter 'pass' of the repeat_for command must be of type int.",exceed_max_instructions:"The number of instructions executed by your program exceed the defined limit. Check your code for infinite loops or excessive recursive functions calls."}}},597:e=>{e.exports={pt:{test_case_success:"
Caso de teste $0: OK
",test_case_duration:"Levou $0ms",test_suite_grade:"A sua solução alcançou $0% da nota.",awaiting_input_message:"O seu programa está em execução e aguardando uma entrada! Digite algo e pressione ENTER...","assessment-empty-expected-tooltip":"A saída gerada foi além do esperado","assessment-empty-generated-tooltip":"O programa não gerou saídas suficientes",testcase_autogen_unused_input:"A solução submetida não lê todas entradas disponíveis no caso de teste 1",testcase_autogen_empty:"Sua solução não gerou qualquer saída para o caso de teste $0.",success_execution:"Execução do programa finalizada!",aborted_execution:"A execução do programa foi interrompida!",unexpected_execution_error:"Erro inesperado durante a execução do programa."},en:{test_case_success:"
Test case $0: OK
",test_case_duration:"Took $0ms",test_suite_grade:"Your solution scored $0% of the grade.",awaiting_input_message:"Your program is running and awaiting for an input. Type something and press ENTER…","assessment-empty-expected-tooltip":"The generated output was beyond the amount expected","assessment-empty-generated-tooltip":"The program did not generate enough outputs",testcase_autogen_unused_input:"The submitted solution does not read all inputs available in the test case $0",testcase_autogen_empty:"Your solution did not generate any output for test case $0.",success_execution:"Program execution finished!",aborted_execution:"Program execution was aborted!",unexpected_execution_error:"Unexpected error during program execution."},es:{test_case_success:"
Test case $0: OK
",test_case_duration:"Tardó $0ms",test_suite_grade:"Su solución obtuvo $0% de la calificación.",awaiting_input_message:"Su programa se está ejecutando y esperando una entrada. Escriba algo y presione ENTER ...","assessment-empty-expected-tooltip":"The generated output was beyond the amount expected","assessment-empty-generated-tooltip":"El programa no generó suficientes resultados.",testcase_autogen_unused_input:"La solución presentada no lee todas las entradas disponibles en el caso de prueba 1",testcase_autogen_empty:"Su solución no generó ningún resultado para el caso de prueba de $ 0.",success_execution:"¡Ejecución del programa terminada!",aborted_execution:"¡La ejecución del programa fue abortada!",unexpected_execution_error:"Error inesperado durante la ejecución del programa."}}},548:e=>{e.exports={pt:{function:"funcao",btn_clear:"Limpar",btn_function:"Função",btn_arithmetic_plus:"Adição",btn_arithmetic_minus:"Subtração",btn_arithmetic_multiplication:"Multiplicação",btn_arithmetic_division:"Divisão",btn_arithmetic_module:"Módulo",btn_break:"Pare",btn_case:"Caso",btn_add_var:"Adicionar variável",btn_drag_and_drop_function:"Mover função",btn_delete_function:"Excluir função",expression_invalid:"Expressão inválida. Verifique a sintáxe antes de continuar.",expression_undelcared_variable:"Variáveis não declaradas:",expression_undeclared_function:"Funções não definidas:",start:"inicio",type_void:"vazio",type_integer:"inteiro",logic_operator_and:"E",logic_operator_or:"OU",logic_operator_not:"nao",type_real:"real",program:"programa",type_text:"cadeia",textvar_default_value:"texto",type_boolean:"logico",logic_value_true:"verdadeiro",logic_value_false:"falso",variable:"Variável",command:"Comando",new_parameter:"parametro",new_variable:"variavel",new_global:"global",new_function:"nova_funcao",matrix:"matriz",vector:"vetor",text_lock_expression:"Bloquear expressão",text_unlock_expression:"Desbloquear expressão",text_edit_expression:"Editar expressão manualmente",text_edit_expression_confirm:"Confirmar edição",text_edit_expression_cancel:"Cancelar edição",text_add_function:"Adicionar uma nova função ao programa",text_move_command:"Mover comando",text_add_parameters:"Adicionar um novo parâmetro",text_parameter_reference:"Definir parâmetro como passagem por referência",text_parameter_copy:"Definir parâmetro como passagem por cópia",text_comment_start:"Comentário inicial da função...",text_comment_main:"Esta é a função principal...",text_read_var:"Entrada/Leitura de dados",text_write_var:"Saída/Escrita de dados",text_command_read:"leia",text_command_write:"escreva",text_return:"devolva",text_btn_return:"Devolver",text_comment:"Comentário",string_join_or:"ou",matrix_info_string:"matriz de $0",vector_info_string:"vetor de $0",text_attribution:"Atribuição",text_if:"se",text_break:"pare",text_else:"senao",text_for:"repita_para",text_code_while:"repita_enquanto",text_code_do:"repita",text_code_do_until:"ate_que",text_command_do:"repita",text_command_while:"repita enquanto",text_command_do_until:"até que",text_code_switch:"escolha",text_code_case:"caso",text_config_programming:"Programação",text_config_programming_both:"Visual e textual",text_config_programming_textual:"Textual",text_config_programming_visual:"Visual",text_logic_expression:"Lógicos",text_arithmetic_expression:"Aritméticos",text_iftrue:"Se condição senão",text_message_error_activity_file:"Aconteceu um erro ao processar a atividade.
Recarregue a página para tentar novamente.",text_message_error_upload_file:"Não foi possível carregar o arquivo.
Verifique o conteúdo do arquivo e tente novamente.",text_message_error_upload_close:"Fechar",text_message_error_activity_reload:"Recarregar",text_repeatNtimes:"Repita N vezes",text_receives:"recebe",text_whiletrue:"Enquanto verdadeiro",text_dowhiletrue:"Repita até que verdadeiro",text_switch:"Escolha",text_functioncall:"Chamada de função",text_value:"Valor",text_operator:"Operador",text_parentheses:"Parênteses",text_change:"Alterar",text_teacher_algorithm:"Algoritmo",text_teacher_algorithm_include:"Incluir o algoritmo abaixo no exercício",text_teacher_test_case:"Casos de teste",text_teacher_config:"Configurações",text_teacher_data_types:"Tipos de dados",text_teacher_commands:"Comandos",text_teacher_functions:"Funções",text_teacher_create_functions:"Criar novas funções",text_teacher_create_movement_functions:"Movimentar funções",text_teacher_test_case_input:"Entrada",text_teacher_test_case_output:"Saída",text_teacher_test_case_actions:"Ações",text_teacher_test_case_add:"Adicionar caso de teste",text_header_ivprog_functions:"Funções do iVProg",text_menu_functions_math:"Matemática",text_menu_functions_text:"Texto",text_menu_functions_array:"Arranjo",text_menu_functions_conversion:"Conversão",text_no_variable:"Nenhuma variável declarada",text_no_variable_instruction:"Antes de utilizar uma variável, é necessário criá-la",text_ivprog_description:"Programação Visual interativa na Internet",tooltip_visual:"Programação visual",tooltip_textual:"Programação textual",tooltip_upload:"Upload de código fonte",tooltip_download:"Download do código fonte",tooltip_undo:"Desfazer",tooltip_redo:"Refazer",tooltip_run:"Executar o programa",tooltip_evaluate:"Avaliar o programa",tooltip_help:"Ajuda",tooltip_add_global:"Adicionar variável global",tooltip_hide_function:"Ocultar os elementos da função",var_menu_select_var:"Selecione uma variável",var_menu_select_all:"Selecione",var_menu_select_function:"Selecione uma função",expression_menu_select:"Construir uma expressão lógica",inform_valid_content:"Informe o conteúdo!",inform_valid_expression:"Construa uma expressão lógica!",tooltip_terminal_clear:"Limpa o terminal removendo todos os textos já escritos e os pendentes.",tooltip_terminal_show:"Exibe o terminal caso esteja escondido",tooltip_terminal_hide:"Esconde o terminal caso não esteja escondido",tooltip_menu_read:"Comando para receber dados pelo teclado",tooltip_menu_write:"Comando para apresentar conteúdo ao usuário",tooltip_menu_comments:"Bloco para comentários internos do programador",tooltip_menu_attribution:"Comando para atribuir uma expressão a uma variável",tooltip_menu_call_function:"Comando para realizar a chamada de uma função",tooltip_menu_if_else:"Estrutura para que os comandos só sejam executados de acordo com as condições estabelecidas",tooltip_menu_repeat_n_times:"Estrutura para executar um bloco de comandos repetidamente",tooltip_menu_repeat_whiletrue:"Estrutura para repetir um bloco de comandos enquanto a condição for verdadeira",tooltip_menu_repeat_dowhiletrue:"Estrutura que executa um bloco e o repete enquanto a condição for verdadeira",tooltip_menu_repeat_switch:"Estrutura de escolha do bloco a ser executado",tooltip_menu_repeat_return:"Comando para devolver o resultado e finalizar a função",tooltip_move_var:"Mover variável",tooltip_remove_var:"Excluir variável",text_ivprog_version:"Versão",text_teacher_filter:"Filtro",text_teacher_filter_active:"Ativado",text_teacher_filter_help:"Ao ativar o filtro, as modificações do iVProg estarão bloqueadas.",text_join_assessment_outputs:" ; ","assessment-detail-time-label":"Duração","assessment-detail-grade-label":"Nota","assessment-detail-input-label":"Entradas","assessment-detail-output-label":"Saídas","assessment-detail-expected-label":"Esperava","assessment-detail-generated-label":"Gerou","assessment-detail-result-label":"Correção","assessment-detail-title":"Caso de Teste $0",text_teacher_generate_outputs:"Gerar saídas",text_teacher_generate_outputs_algorithm:"Antes de gerar as saídas, elabore um algoritmo!",text_code_for_from:"de",text_code_for_to:"ate",text_code_for_pass:"passo",text_for_from:"de",text_for_to:"até",text_for_pass:"passo",text_relational_expression:"Relacionais",write_command_newline_on:"Quebra de linha ativada",write_command_newline_off:" Quebra de linha desativada",write_seprator_menu_text:"Espaço",initial_program_code:"programa {\\n\\n\\t\\tfuncao vazio inicio () {\\n\\t\\t\\t// Inicie seu codigo aqui!\\n\\t\\t}\\n}",type_char:"caractere",charvar_default_value:"A",write_seprator_menu_tooltip:"Separador para imprimir mais valores/variáveis"},en:{function:"function",btn_clear:"Clean",btn_function:"Function",btn_arithmetic_plus:"Addition",btn_arithmetic_minus:"Subtraction",btn_arithmetic_multiplication:"Multiplication",btn_arithmetic_division:"Division",btn_arithmetic_module:"Remainder",btn_break:"break",btn_case:"Case",btn_add_var:"Add a variable",btn_drag_and_drop_function:"Move function",btn_delete_function:"Delete function",expression_invalid:"Invalid expression. Check the syntax before proceeding.",expression_undelcared_variable:"Undeclared variables:",expression_undeclared_function:"Undefined functions:",start:"main",type_void:"void",type_integer:"int",logic_operator_and:"AND",logic_operator_or:"OR",logic_operator_not:"not",type_real:"real",program:"program",type_text:"string",textvar_default_value:"text",type_boolean:"bool",logic_value_true:"true",logic_value_false:"false",variable:"Variable",command:"Command",new_parameter:"parameter",new_variable:"variable",new_global:"global",new_function:"new_function",matrix:"matrix",vector:"vector",text_lock_expression:"Block expression",text_unlock_expression:"Unlock expression",text_edit_expression:"Edit expression manually",text_edit_expression_confirm:"Confirm edition",text_edit_expression_cancel:"Cancel edition",text_add_function:"Add a new function to the program",text_move_command:"Move command",text_add_parameters:"Add a new parameter",text_parameter_reference:"Define parameter passed by reference",text_parameter_copy:"Define parameter passed by copy",text_comment_start:"Function initial comment",text_comment_main:"This is the main funcion",text_read_var:"Input/Read data",text_write_var:"Output/Write data",text_command_read:"read",text_command_write:"write",text_return:"return",text_btn_return:"Return",text_comment:"Comment",string_join_or:"or",matrix_info_string:"matrix of $0",vector_info_string:"vector of $0",text_attribution:"Assignment",text_if:"if",text_break:"break",text_else:"else",text_for:"repeat_for",text_code_while:"repeat_while",text_code_do:"repeat",text_code_do_until:"until",text_command_do:"repeat",text_command_while:"repeat while",text_command_do_until:"until",text_code_switch:"switch",text_code_case:"case",text_config_programming:"Programming",text_config_programming_both:"Visual & Textual",text_config_programming_textual:"Textual",text_config_programming_visual:"Visual",text_logic_expression:"Logic",text_arithmetic_expression:"Arithmetics",text_iftrue:"If condition else",text_message_error_activity_file:"There was an error processing the activity.
Reload the page to try again.",text_message_error_upload_file:"It was not possible upload the file.
Verify the file's content and try again.",text_message_error_upload_close:"Close",text_message_error_activity_reload:"Reload",text_repeatNtimes:"Repeat N times",text_receives:"receives",text_whiletrue:"While true",text_dowhiletrue:"Repeat until true",text_switch:"Switch",text_functioncall:"Function call",text_value:"Value",text_operator:"Operator",text_parentheses:"Parentheses",text_change:"Modify",text_teacher_algorithm:"Algorithm",text_teacher_algorithm_include:"Include the algorithm below in the activity",text_teacher_test_case:"Test cases",text_teacher_config:"Configurations",text_teacher_data_types:"Data types",text_teacher_commands:"Commands",text_teacher_functions:"Functions",text_teacher_create_functions:"Create new functions",text_teacher_create_movement_functions:"Move functions",text_teacher_test_case_input:"Input",text_teacher_test_case_output:"Output",text_teacher_test_case_actions:"Actions",text_teacher_test_case_add:"Add test case",text_header_ivprog_functions:"iVProg Functions",text_menu_functions_math:"Math",text_menu_functions_text:"Text",text_menu_functions_array:"Array",text_menu_functions_conversion:"Conversion",text_no_variable:"No variable declared",text_no_variable_instruction:"Before using a variable, you need to create it",text_ivprog_description:"Interactive and Visual Programming on the Internet",tooltip_visual:"Visual programming",tooltip_textual:"Textual programming",tooltip_upload:"Upload source code",tooltip_download:"Download source code",tooltip_undo:"Undo",tooltip_redo:"Redo",tooltip_run:"Run the program",tooltip_evaluate:"Evaluate the program",tooltip_help:"Help",tooltip_add_global:"Add a global variable",tooltip_hide_function:"Hide function elements",var_menu_select_var:"Select a variable",var_menu_select_all:"Select",var_menu_select_function:"Select a function",expression_menu_select:"Construct a logic expression",inform_valid_content:"Provide some data",inform_valid_expression:"Construct a logic expression",tooltip_terminal_clear:"Clears the terminal by removing all wrriten and pending text.",tooltip_terminal_show:"Shows the terminal if it is hidden",tooltip_terminal_hide:"Hides the terminal if it is not on display",tooltip_menu_read:"Command to input data from keyboard",tooltip_menu_write:"Command to present content to user",tooltip_menu_comments:"Block to comments from developer",tooltip_menu_attribution:"Command to assign an expression to a variable",tooltip_menu_call_function:"Command to execute a function call",tooltip_menu_if_else:"Structure in which command only run when the conditions are satisfied",tooltip_menu_repeat_n_times:"Structure to execute a block of commands repeatedly",tooltip_menu_repeat_whiletrue:"Structure to execute a block repeatdly while condition is true",tooltip_menu_repeat_dowhiletrue:"Structure that executes a block and repeat while the condition is true",tooltip_menu_repeat_switch:"Structure that choices the block to be executed",tooltip_menu_repeat_return:"Command to return the result and finish the function",tooltip_move_var:"Move variable",tooltip_remove_var:"Delete variable",text_ivprog_version:"Version",text_teacher_filter:"Filter",text_teacher_filter_active:"Activated",text_teacher_filter_help:"By activating the filter modifications in iVProg will be blocked",text_join_assessment_outputs:" ; ","assessment-detail-time-label":"Duration","assessment-detail-grade-label":"Grade","assessment-detail-input-label":"Inputs","assessment-detail-output-label":"Outputs","assessment-detail-expected-label":"Expected","assessment-detail-generated-label":"Generated","assessment-detail-result-label":"Correction","assessment-detail-title":"Test Case $0",text_teacher_generate_outputs:"Generate outputs",text_teacher_generate_outputs_algorithm:"Before generating the outputs you need to create an algorithm",text_code_for_from:"from",text_code_for_to:"to",text_code_for_pass:"pass",text_for_from:"from",text_for_to:"to",text_for_pass:"pass",text_relational_expression:"Relational",write_command_newline_on:" Line break is on",write_command_newline_off:" Line break is off",write_seprator_menu_text:"Spacer",initial_program_code:"program {\\n\\n\\t\\tfunction void main () {\\n\\t\\t\\t// Start your code here!\\n\\t\\t}\\n}",type_char:"char",charvar_default_value:"A",write_seprator_menu_tooltip:"Separator used to print more values/variables"},es:{function:"function",btn_clear:"Limpiar",btn_function:"Funcíon",btn_arithmetic_plus:"Adición",btn_arithmetic_minus:"Sustracción",btn_arithmetic_multiplication:"Multiplicación",btn_arithmetic_division:"División",btn_arithmetic_module:"Resto",btn_break:"break",btn_case:"Caso",btn_add_var:"Add a variable",btn_drag_and_drop_function:"Mover función",btn_delete_function:"Borrar función",expression_invalid:"Expresión no válida. Verifique la sintaxis antes de continuar.",expression_undelcared_variable:"Variables no declaradas:",expression_undeclared_function:"Funcíon no declaradas:",start:"main",type_void:"void",type_integer:"int",logic_operator_and:"AND",logic_operator_or:"OR",logic_operator_not:"not",type_real:"real",program:"program",type_text:"string",textvar_default_value:"texto",type_boolean:"bool",logic_value_true:"true",logic_value_false:"false",variable:"Variable",command:"Comando",new_parameter:"parametro",new_variable:"variable",new_global:"global",new_function:"nueva_función",matrix:"matriz",vector:"vector",text_lock_expression:"Expresión de bloque",text_unlock_expression:"Desbloquear expresión",text_edit_expression:"Editar expresión manualmente",text_edit_expression_confirm:"Confirmar edición",text_edit_expression_cancel:"Cancelar edición",text_add_function:"Agregar una nueva función al programa",text_move_command:"Mover comando",text_add_parameters:"Agregar un nuevo parámetro",text_parameter_reference:"Define parameter passed by reference",text_parameter_copy:"Define parameter passed by copy",text_comment_start:"Comentario inicial de la función",text_comment_main:"Esta es la función principal",text_read_var:"Entrada/Lectura de dados",text_write_var:"Salida/Escribir datos",text_command_read:"read",text_command_write:"write",text_return:"return",text_btn_return:"Devolución",text_comment:"Comentario",string_join_or:"or",matrix_info_string:"matriz de $0",vector_info_string:"vector de $0",text_attribution:"Asignación",text_if:"if",text_break:"break",text_else:"else",text_for:"repeat_for",text_code_while:"repeat_while",text_code_do:"repeat",text_code_do_until:"until",text_command_do:"repeat",text_command_while:"repeat while",text_command_do_until:"until",text_code_switch:"switch",text_code_case:"case",text_config_programming:"Programación",text_config_programming_both:"Visual & Textual",text_config_programming_textual:"Textual",text_config_programming_visual:"Visual",text_logic_expression:"Lógicos",text_arithmetic_expression:"Aritmética",text_iftrue:"Si condicion sino",text_message_error_activity_file:"Se produjo un error al procesar la actividad.
Recargar la página para volver a intentarlo.",text_message_error_upload_file:"text_message_error_upload_file",text_message_error_upload_close:"Close",text_message_error_activity_reload:"Recargar",text_repeatNtimes:"Repetir N veces",text_receives:"receives",text_whiletrue:"Mientras verdad",text_dowhiletrue:"Repita hasta verdad",text_switch:"Switch",text_functioncall:"Llamada de función",text_value:"Valor",text_operator:"Operador",text_parentheses:"Paréntesis",text_change:"Modify",text_teacher_algorithm:"Algorithm",text_teacher_algorithm_include:"Incluir el algoritmo en la actividad.",text_teacher_test_case:"Test cases",text_teacher_config:"Configuraciones",text_teacher_data_types:"Data types",text_teacher_commands:"Commands",text_teacher_functions:"Funciones",text_teacher_create_functions:"Create new functions",text_teacher_create_movement_functions:"Move functions",text_teacher_test_case_input:"Input",text_teacher_test_case_output:"Output",text_teacher_test_case_actions:"Actions",text_teacher_test_case_add:"Add test case",text_header_ivprog_functions:"iVProg Functions",text_menu_functions_math:"Math",text_menu_functions_text:"Text",text_menu_functions_array:"Array",text_menu_functions_conversion:"Conversion",text_no_variable:"No variable declared",text_no_variable_instruction:"Antes de usar una variable, debe crearla",text_ivprog_description:"Interactive and Visual Programming on the Internet",tooltip_visual:"Visual programming",tooltip_textual:"Textual programming",tooltip_upload:"Upload source code",tooltip_download:"Download source code",tooltip_undo:"Undo",tooltip_redo:"Redo",tooltip_run:"Run the program",tooltip_evaluate:"Evaluate the program",tooltip_help:"Help",tooltip_add_global:"Add a global variable",tooltip_hide_function:"Hide function elements",var_menu_select_var:"Select a variable",var_menu_select_all:"Select",var_menu_select_function:"Select a function",expression_menu_select:"Construct a logic expression",inform_valid_content:"Proporcionar algunos datos",inform_valid_expression:"Construct a logic expression",tooltip_terminal_clear:"Borra el terminal eliminando todo el texto escrito y pendiente.",tooltip_terminal_show:"Muestra el terminal si está oculto.",tooltip_terminal_hide:"Oculta el terminal si no está en exhibición",tooltip_menu_read:"Command to input data from keyboard",tooltip_menu_write:"Command to present content to user",tooltip_menu_comments:"Block to comments from developer",tooltip_menu_attribution:"Command to assign an expression to a variable",tooltip_menu_call_function:"Command to execute a function call",tooltip_menu_if_else:"Structure in which command only run when the conditions are satisfied",tooltip_menu_repeat_n_times:"Structure to execute a block of commands repeatedly",tooltip_menu_repeat_whiletrue:"Structure to execute a block repeatdly while condition is true",tooltip_menu_repeat_dowhiletrue:"Structure that executes a block and repeat while the condition is true",tooltip_menu_repeat_switch:"Structure that choices the block to be executed",tooltip_menu_repeat_return:"Command to return the result and finish the function",tooltip_move_var:"Move variable",tooltip_remove_var:"Delete variable",text_ivprog_version:"Version",text_teacher_filter:"Filter",text_teacher_filter_active:"Activated",text_teacher_filter_help:"Al activar el filtro, las modificaciones en iVProg serán bloqueadas",text_join_assessment_outputs:" ;","assessment-detail-time-label":"Duration","assessment-detail-grade-label":"Grade","assessment-detail-input-label":"Inputs","assessment-detail-output-label":"Outputs","assessment-detail-expected-label":"Expected","assessment-detail-generated-label":"Generated","assessment-detail-result-label":"Correction","assessment-detail-title":"Test Case $0",text_teacher_generate_outputs:"Generate outputs",text_teacher_generate_outputs_algorithm:"Antes de generar las salidas necesita crear un algoritmo",text_code_for_from:"from",text_code_for_to:"to",text_code_for_pass:"pass",text_for_from:"from",text_for_to:"to",text_for_pass:"pass",text_relational_expression:"Relational",write_command_newline_on:"El salto de línea está activado",write_command_newline_off:"El salto de línea está desactivado",write_seprator_menu_text:"Spacer",initial_program_code:"program {\\n\\n\\t\\tfunction void main () {\\n\\t\\t\\t// Start your code here!\\n\\t\\t}\\n}",type_char:"char",charvar_default_value:"A",write_seprator_menu_tooltip:"Separator used to print more values/variables"}}},228:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{e.exports=function(e){if(Array.isArray(e))return e}},646:(e,t,n)=>{var r=n(228);e.exports=function(e){if(Array.isArray(e))return r(e)}},506:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},926:e=>{function t(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=e.apply(n,r);function s(e){t(a,i,o,s,u,"next",e)}function u(e){t(a,i,o,s,u,"throw",e)}s(void 0)}))}}},575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},100:(e,t,n)=>{var r=n(489),i=n(67);function o(t,n,a){return i()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},o.apply(null,arguments)}e.exports=o},913:e=>{function t(e,t){for(var n=0;n{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},525:(e,t,n)=>{var r=n(331);function i(t,n,o){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}},i(t,n,o||t)}e.exports=i},754:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t},205:(e,t,n)=>{var r=n(489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},430:e=>{e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},67:e=>{e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},860:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},884:e=>{e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}},521:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},206:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},585:(e,t,n)=>{var r=n(8),i=n(506);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},489:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t},38:(e,t,n)=>{var r=n(858),i=n(884),o=n(379),a=n(521);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()}},331:(e,t,n)=>{var r=n(754);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},655:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},319:(e,t,n)=>{var r=n(646),i=n(860),o=n(379),a=n(206);e.exports=function(e){return r(e)||i(e)||o(e)||a()}},8:e=>{function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t},379:(e,t,n)=>{var r=n(228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},957:(e,t,n)=>{var r=n(754),i=n(489),o=n(430),a=n(100);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},s(t)}e.exports=s},757:(e,t,n)=>{e.exports=n(666)},776:function(e,t,n){var r;!function(i){"use strict";var o,a,s,u=9e15,c=1e9,l="0123456789abcdef",f="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",p="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",d={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},h=!0,m="[DecimalError] ",_=m+"Invalid argument: ",v=m+"Precision limit exceeded",y=m+"crypto unavailable",g=Math.floor,x=Math.pow,b=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,w=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,E=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,$=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,R=1e7,k=f.length-1,T=p.length-1,N={name:"[object Decimal]"};function I(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;tn)throw Error(_+e)}function A(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=x(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==x(10,t-2)-1||(s==o/2||0==s)&&0==(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==x(10,t-3)-1,a}function C(e,t,n){for(var r,i,o=[0],a=0,s=e.length;an-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}N.absoluteValue=N.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)},N.ceil=function(){return O(new this.constructor(this),this.e+1,2)},N.comparedTo=N.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,u=o.s,c=e.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(t=0,n=(r=a.length)<(i=s.length)?r:i;ts[t]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},N.cosine=N.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i=t.d.length;i<32?r=(1/Z(4,n=Math.ceil(i/3))).toString():(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=W(e,1,t.times(r),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,Q(r,n)),r.precision=e,r.rounding=t,O(2==s||3==s?n.neg():n,e,t,!0)):new r(1):new r(NaN)},N.cubeRoot=N.cbrt=function(){var e,t,n,r,i,o,a,s,u,c,l=this,f=l.constructor;if(!l.isFinite()||l.isZero())return new f(l);for(h=!1,(o=l.s*x(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new f(o.toString()):(n=I(l.d),(o=((e=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=x(n,1/3),e=g((e+1)/3)-(e%3==(e<0?-1:2)),(r=new f(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=l.s),a=(e=f.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=L(c.plus(l).times(s),c.plus(u),a+2,1),I(s.d).slice(0,a)===(n=I(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(O(r,e+1,1),t=!r.times(r).times(r).eq(l));break}if(!i&&(O(s,e+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return h=!0,O(r,e,f.rounding,t)},N.decimalPlaces=N.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-g(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},N.dividedBy=N.div=function(e){return L(this,new this.constructor(e))},N.dividedToIntegerBy=N.divToInt=function(e){var t=this.constructor;return O(L(this,new t(e),0,1,1),t.precision,t.rounding)},N.equals=N.eq=function(e){return 0===this.cmp(e)},N.floor=function(){return O(new this.constructor(this),this.e+1,3)},N.greaterThan=N.gt=function(e){return this.cmp(e)>0},N.greaterThanOrEqualTo=N.gte=function(e){var t=this.cmp(e);return 1==t||0===t},N.hyperbolicCosine=N.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/Z(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=W(a,1,o.times(t),new a(1),!0);for(var u,c=e,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return O(o,a.precision=n,a.rounding=r,!0)},N.hyperbolicSine=N.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=W(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=W(o,2,i=i.times(1/Z(5,e)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=t,o.rounding=n,O(i,t,n,!0)},N.hyperbolicTangent=N.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,L(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},N.inverseCosine=N.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?P(n,i,o):new n(0):new n(NaN):t.isZero()?P(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=P(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},N.inverseHyperbolicCosine=N.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,h=!1,n=n.times(n).minus(1).sqrt().plus(n),h=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},N.inverseHyperbolicSine=N.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,h=!1,n=n.times(n).plus(1).sqrt().plus(n),h=!0,r.precision=e,r.rounding=t,n.ln())},N.inverseHyperbolicTangent=N.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=n=r-i.e,i=L(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},N.inverseSine=N.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=P(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},N.inverseTangent=N.atan=function(){var e,t,n,r,i,o,a,s,u,c=this,l=c.constructor,f=l.precision,p=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&f+4<=T)return(a=P(l,f+4,p).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(f+4<=T)return(a=P(l,f+4,p).times(.5)).s=c.s,a}for(l.precision=s=f+10,l.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(h=!1,t=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==e;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<this.d.length-2},N.isNaN=function(){return!this.s},N.isNegative=N.isNeg=function(){return this.s<0},N.isPositive=N.isPos=function(){return this.s>0},N.isZero=function(){return!!this.d&&0===this.d[0]},N.lessThan=N.lt=function(e){return this.cmp(e)<0},N.lessThanOrEqualTo=N.lte=function(e){return this.cmp(e)<1},N.logarithm=N.log=function(e){var t,n,r,i,o,a,s,u,c=this,l=c.constructor,f=l.precision,p=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(h=!1,a=q(c,s=f+5),r=t?F(l,s+10):q(e,s),A((u=L(a,r,s,1)).d,i=f,p))do{if(a=q(c,s+=10),r=t?F(l,s+10):q(e,s),u=L(a,r,s,1),!o){+I(u.d).slice(i+1,i+15)+1==1e14&&(u=O(u,f+1,0));break}}while(A(u.d,i+=10,p));return h=!0,O(u,f,p)},N.minus=N.sub=function(e){var t,n,r,i,o,a,s,u,c,l,f,p,d=this,m=d.constructor;if(e=new m(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new m(e.d||d.s!==e.s?d:NaN):e=new m(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(c=d.d,p=e.d,s=m.precision,u=m.rounding,!c[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!c[0])return new m(3===u?-0:0);e=new m(d)}return h?O(e,s,u):e}if(n=g(e.e/7),l=g(d.e/7),c=c.slice(),o=l-n){for((f=o<0)?(t=c,o=-o,a=p.length):(t=p,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((f=(r=c.length)<(a=p.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=p.length;r>o;){if(c[--r](a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),t=0;i;)t=(c[--i]=c[i]+l[i]+t)/R|0,c[i]%=R;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=G(c,r),h?O(e,s,u):e},N.precision=N.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(_+e);return n.d?(t=M(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},N.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)},N.sine=N.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return W(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=W(e,2,t=t.times(1/Z(5,n)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,Q(r,n)),r.precision=e,r.rounding=t,O(s>2?n.neg():n,e,t,!0)):new r(NaN)},N.squareRoot=N.sqrt=function(){var e,t,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(h=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=I(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=g((u+1)/2)-(u<0||u%2),r=new l(t=c==1/0?"1e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(L(a,o,n+2,1)).times(.5),I(o.d).slice(0,n)===(t=I(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(O(r,u+1,1),e=!r.times(r).eq(a));break}if(!i&&(O(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return h=!0,O(r,u,l.rounding,e)},N.tangent=N.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=L(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,O(2==s||4==s?n.neg():n,e,t,!0)):new r(NaN)},N.times=N.mul=function(e){var t,n,r,i,o,a,s,u,c,l=this,f=l.constructor,p=l.d,d=(e=new f(e)).d;if(e.s*=l.s,!(p&&p[0]&&d&&d[0]))return new f(!e.s||p&&!p[0]&&!d||d&&!d[0]&&!p?NaN:p&&d?0*e.s:e.s/0);for(n=g(l.e/7)+g(e.e/7),(u=p.length)<(c=d.length)&&(o=p,p=d,d=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)s=o[i]+d[r]*p[i-r-1]+t,o[i--]=s%R|0,t=s/R|0;o[i]=(o[i]+t)%R|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=G(o,n),h?O(e,f.precision,f.rounding):e},N.toBinary=function(e,t){return J(this,2,e,t)},N.toDecimalPlaces=N.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(S(e,0,c),void 0===t?t=r.rounding:S(t,0,8),O(n,e+n.e+1,t))},N.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=D(r,!0):(S(e,0,c),void 0===t?t=i.rounding:S(t,0,8),n=D(r=O(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},N.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=D(i):(S(e,0,c),void 0===t?t=o.rounding:S(t,0,8),n=D(r=O(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},N.toFraction=function(e){var t,n,r,i,o,a,s,u,c,l,f,p,d=this,m=d.d,v=d.constructor;if(!m)return new v(d);if(c=n=new v(1),r=u=new v(0),a=(o=(t=new v(r)).e=M(m)-d.e-1)%7,t.d[0]=x(10,a<0?7+a:a),null==e)e=o>0?t:c;else{if(!(s=new v(e)).isInt()||s.lt(c))throw Error(_+s);e=s.gt(t)?o>0?t:c:s}for(h=!1,s=new v(I(m)),l=v.precision,v.precision=o=7*m.length*2;f=L(s,t,0,1,1),1!=(i=n.plus(f.times(r))).cmp(e);)n=r,r=i,i=c,c=u.plus(f.times(i)),u=i,i=t,t=s.minus(f.times(i)),s=i;return i=L(e.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=d.s,p=L(c,r,o,1).minus(d).abs().cmp(L(u,n,o,1).minus(d).abs())<1?[c,r]:[u,n],v.precision=l,h=!0,p},N.toHexadecimal=N.toHex=function(e,t){return J(this,16,e,t)},N.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:S(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(h=!1,n=L(n,e,0,t,1).times(e),h=!0,O(n)):(e.s=n.s,n=e),n},N.toNumber=function(){return+this},N.toOctal=function(e,t){return J(this,8,e,t)},N.toPower=N.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,c=+(e=new u(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new u(x(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return O(s,r,o);if((t=g(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=U(u,s,n,r),e.s<0?new u(1).div(i):O(i,r,o);if((a=s.s)<0){if(tu.maxE+1||t0?a/0:0):(h=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=V(e.times(q(s,r+n)),r)).d&&A((i=O(i,r+5,1)).d,r,o)&&(t=r+10,+I((i=O(V(e.times(q(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=O(i,r+1,0))),i.s=a,h=!0,u.rounding=o,O(i,r,o))},N.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=D(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(S(e,1,c),void 0===t?t=i.rounding:S(t,0,8),n=D(r=O(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},N.toSignificantDigits=N.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(S(e,1,c),void 0===t?t=n.rounding:S(t,0,8)),O(new n(this),e,t)},N.toString=function(){var e=this,t=e.constructor,n=D(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},N.truncated=N.trunc=function(){return O(new this.constructor(this),this.e+1,1)},N.valueOf=N.toJSON=function(){var e=this,t=e.constructor,n=D(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var L=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;)e.shift()}return function(r,i,o,s,u,c){var l,f,p,d,h,m,_,v,y,x,b,w,E,$,k,T,N,I,S,A,C=r.constructor,L=r.s==i.s?1:-1,D=r.d,G=i.d;if(!(D&&D[0]&&G&&G[0]))return new C(r.s&&i.s&&(D?!G||D[0]!=G[0]:G)?D&&0==D[0]||!G?0*L:L/0:NaN);for(c?(h=1,f=r.e-i.e):(c=R,h=7,f=g(r.e/h)-g(i.e/h)),S=G.length,N=D.length,x=(y=new C(L)).d=[],p=0;G[p]==(D[p]||0);p++);if(G[p]>(D[p]||0)&&f--,null==o?($=o=C.precision,s=C.rounding):$=u?o+(r.e-i.e)+1:o,$<0)x.push(1),m=!0;else{if($=$/h+2|0,p=0,1==S){for(d=0,G=G[0],$++;(p1&&(G=e(G,d,c),D=e(D,d,c),S=G.length,N=D.length),T=S,w=(b=D.slice(0,S)).length;w=c/2&&++I;do{d=0,(l=t(G,b,S,w))<0?(E=b[0],S!=w&&(E=E*c+(b[1]||0)),(d=E/I|0)>1?(d>=c&&(d=c-1),1==(l=t(_=e(G,d,c),b,v=_.length,w=b.length))&&(d--,n(_,S=10;d/=10)p++;y.e=p+f*h-1,O(y,u?o+y.e+1:o,s,m)}return y}}();function O(e,t,n,r){var i,o,a,s,u,c,l,f,p,d=e.constructor;e:if(null!=t){if(!(f=e.d))return e;for(i=1,s=f[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,u=(l=f[p=0])/x(10,i-a-1)%10|0;else if((p=Math.ceil((o+1)/7))>=(s=f.length)){if(!r)break e;for(;s++<=p;)f.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=f[p],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/x(10,i-a-1)%10|0}if(r=r||t<0||void 0!==f[p+1]||(a<0?l:l%x(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/x(10,i-a):0:f[p-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=x(10,(7-t%7)%7),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=p,s=1,p--):(f.length=p+1,s=x(10,7-o),f[p]=a>0?(l/x(10,i-a)%x(10,a)|0)*s:0),c)for(;;){if(0==p){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,f[0]==R&&(f[0]=1));break}if(f[p]+=s,f[p]!=R)break;f[p--]=0,s=1}for(o=f.length;0===f[--o];)f.pop()}return h&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+B(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+B(-i-1)+o,n&&(r=n-a)>0&&(o+=B(r))):i>=a?(o+=B(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+B(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=B(r))),o}function G(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function F(e,t,n){if(t>k)throw h=!0,n&&(e.precision=n),Error(v);return O(new e(f),t,1,!0)}function P(e,t,n){if(t>T)throw Error(v);return O(new e(p),t,n,!0)}function M(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function B(e){for(var t="";e--;)t+="0";return t}function U(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(h=!1;;){if(n%2&&X((o=o.times(t)).d,a)&&(i=!0),0===(n=g(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}X((t=t.times(t)).d,a)}return h=!0,o}function K(e){return 1&e.d[e.d.length-1]}function z(e,t,n){for(var r,i=new e(t[0]),o=0;++o17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(h=!1,u=m):u=t,s=new p(.03125);e.e>-2;)e=e.times(s),f+=5;for(u+=r=Math.log(x(2,f))/Math.LN10*2+5|0,n=o=a=new p(1),p.precision=u;;){if(o=O(o.times(e),u,1),n=n.times(++l),I((s=a.plus(L(o,n,u,1))).d).slice(0,u)===I(a.d).slice(0,u)){for(i=f;i--;)a=O(a.times(a),u,1);if(null!=t)return p.precision=m,a;if(!(c<3&&A(a.d,u-r,d,c)))return O(a,p.precision=m,d,h=!0);p.precision=u+=10,n=o=s=new p(1),l=0,c++}a=s}}function q(e,t){var n,r,i,o,a,s,u,c,l,f,p,d=1,m=e,_=m.d,v=m.constructor,y=v.rounding,g=v.precision;if(m.s<0||!_||!_[0]||!m.e&&1==_[0]&&1==_.length)return new v(_&&!_[0]?-1/0:1!=m.s?NaN:_?0:m);if(null==t?(h=!1,l=g):l=t,v.precision=l+=10,r=(n=I(_)).charAt(0),!(Math.abs(o=m.e)<15e14))return c=F(v,l+2,g).times(o+""),m=q(new v(r+"."+n.slice(1)),l-10).plus(c),v.precision=g,null==t?O(m,g,y,h=!0):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=I((m=m.times(e)).d)).charAt(0),d++;for(o=m.e,r>1?(m=new v("0."+n),o++):m=new v(r+"."+n.slice(1)),f=m,u=a=m=L(m.minus(1),m.plus(1),l,1),p=O(m.times(m),l,1),i=3;;){if(a=O(a.times(p),l,1),I((c=u.plus(L(a,new v(i),l,1))).d).slice(0,l)===I(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(F(v,l+2,g).times(o+""))),u=L(u,new v(d),l,1),null!=t)return v.precision=g,u;if(!A(u.d,l-10,y,s))return O(u,v.precision=g,y,h=!0);v.precision=l+=10,c=a=m=L(f.minus(1),f.plus(1),l,1),p=O(m.times(m),l,1),i=s=1}u=c,i+=2}}function j(e){return String(e.s*e.s/0)}function H(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),re.constructor.maxE?(e.d=null,e.e=NaN):e.e0?(c=+t.slice(a+1),t=t.substring(2,a)):t=t.slice(2),s=(a=t.indexOf("."))>=0,r=e.constructor,s&&(a=(u=(t=t.replace(".","")).length)-a,i=U(r,new r(n),a,2*a)),a=f=(l=C(t,n,R)).length-1;0===l[a];--a)l.pop();return a<0?new r(0*e.s):(e.e=G(l,f),e.d=l,h=!1,s&&(e=L(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?x(2,c):o.pow(2,c))),h=!0,e)}function W(e,t,n,r,i){var o,a,s,u,c=e.precision,l=Math.ceil(c/7);for(h=!1,u=n.times(n),s=new e(r);;){if(a=L(s.times(u),new e(t++*t++),c,1),s=i?r.plus(a):r.minus(a),r=L(a.times(u),new e(t++*t++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return h=!0,a.d.length=l+1,a}function Z(e,t){for(var n=e;--t;)n*=e;return n}function Q(e,t){var n,r=t.s<0,i=P(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return s=r?4:1,t;if((n=t.divToInt(i)).isZero())s=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return s=K(n)?r?2:3:r?4:1,t;s=K(n)?r?1:4:r?3:2}return t.minus(i).abs()}function J(e,t,n,r){var i,o,s,u,f,p,d,h,m,_=e.constructor,v=void 0!==n;if(v?(S(n,1,c),void 0===r?r=_.rounding:S(r,0,8)):(n=_.precision,r=_.rounding),e.isFinite()){for(v?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(s=(d=D(e)).indexOf("."))>=0&&(d=d.replace(".",""),(m=new _(1)).e=d.length-s,m.d=C(D(m),10,i),m.e=m.d.length),o=f=(h=C(d,10,i)).length;0==h[--f];)h.pop();if(h[0]){if(s<0?o--:((e=new _(e)).d=h,e.e=o,h=(e=L(e,m,n,r,0,i)).d,o=e.e,p=a),s=h[n],u=i/2,p=p||void 0!==h[n+1],p=r<4?(void 0!==s||p)&&(0===r||r===(e.s<0?3:2)):s>u||s===u&&(4===r||p||6===r&&1&h[n-1]||r===(e.s<0?8:7)),h.length=n,p)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(f=h.length;!h[f-1];--f);for(s=0,d="";s1)if(16==t||8==t){for(s=16==t?4:3,--f;f%s;f++)d+="0";for(f=(h=C(d,i,t)).length;!h[f-1];--f);for(s=1,d="1.";sf)for(o-=f;o--;)d+="0";else ot)return e.length=t,!0}function ee(e){return new this(e).abs()}function te(e){return new this(e).acos()}function ne(e){return new this(e).acosh()}function re(e,t){return new this(e).plus(t)}function ie(e){return new this(e).asin()}function oe(e){return new this(e).asinh()}function ae(e){return new this(e).atan()}function se(e){return new this(e).atanh()}function ue(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?P(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=P(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(L(e,t,o,1)),t=P(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(L(e,t,o,1)):(n=P(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function ce(e){return new this(e).cbrt()}function le(e){return O(e=new this(e),e.e+1,2)}function fe(e){if(!e||"object"!=typeof e)throw Error(m+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,c,"rounding",0,8,"toExpNeg",-u,0,"toExpPos",0,u,"maxE",0,u,"minE",-u,0,"modulo",0,9];for(t=0;t=o[t+1]&&r<=o[t+2]))throw Error(_+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=d[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(_+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(y);this[n]=!0}else this[n]=!1}return this}function pe(e){return new this(e).cos()}function de(e){return new this(e).cosh()}function he(e,t){return new this(e).div(t)}function me(e){return new this(e).exp()}function _e(e){return O(e=new this(e),e.e+1,3)}function ve(){var e,t,n=new this(0);for(h=!1,e=0;e=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(y);for(t=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function Ie(e){return O(e=new this(e),e.e+1,this.rounding)}function Se(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Ae(e){return new this(e).sin()}function Ce(e){return new this(e).sinh()}function Le(e){return new this(e).sqrt()}function Oe(e,t){return new this(e).sub(t)}function De(e){return new this(e).tan()}function Ge(e){return new this(e).tanh()}function Fe(e){return O(e=new this(e),e.e+1,1)}(o=function e(t){var n,r,i;function o(e){var t,n,r,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,e instanceof o)return i.s=e.s,void(h?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e=10;n/=10)t++;return void(h?t>o.maxE?(i.e=NaN,i.d=null):t0)throw new Error("RegExp has capture groups: "+x+"\nUse (?: … ) instead");if(!m.lineBreaks&&x.test("\n"))throw new Error("Rule should declare lineBreaks: "+x);d.push(o(g))}}var b=i&&i.fallback,w=n&&!b?"ym":"gm",E=n||b?"":"|";return!0===f&&(w+="u"),{regexp:new RegExp(a(d)+E,w),groups:p,fast:u,error:i||l}}function p(e,t,n){var r=e&&(e.push||e.next);if(r&&!n[r])throw new Error("Missing state '"+r+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var d=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};d.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},d.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedThrow:this.queuedThrow}},d.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},d.prototype.popState=function(){this.setState(this.stack.pop())},d.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var h=n?function(e,t){return e.exec(t)}:function(e,t){var n=e.exec(t);return 0===n[0].length?null:n};function m(){return this.value}if(d.prototype._getGroup=function(e){for(var t=this.groups.length,n=0;n{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(e,t,n){var r=l;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return I()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=$(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=c(e,t,n);if("normal"===u.type){if(r=n.done?d:f,u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l="suspendedStart",f="suspendedYield",p="executing",d="completed",h={};function m(){}function _(){}function v(){}var y={};y[o]=function(){return this};var g=Object.getPrototypeOf,x=g&&g(g(N([])));x&&x!==n&&r.call(x,o)&&(y=x);var b=v.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function E(e,t){function n(i,o,a,s){var u=c(e[i],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function $(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,$(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function N(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Config:()=>l,IVProgProcessor:()=>An,LocalizedStrings:()=>Pn,Location:()=>vn,Modes:()=>Se,SemanticAnalyser:()=>In,Settings:()=>Gn,autoGenerateTestCaseOutput:()=>On,i18n:()=>Fn,levenshteinDistance:()=>Ct,openAssessmentDetail:()=>Ot,parseCode:()=>nn,parseExpression:()=>tn,processData:()=>Mt});var e,t=n(575),i=n.n(t),o=n(913),a=n.n(o),s=n(713),u=n.n(s),c=function(){function e(){i()(this,e),u()(this,"decimalPlaces",void 0),u()(this,"intConvertRoundMode",void 0),u()(this,"default_lang",void 0),u()(this,"enable_type_casting",void 0),u()(this,"idle_input_interval",void 0),u()(this,"suspend_threshold",void 0),u()(this,"max_instruction_count",void 0),u()(this,"activity_programming_type",void 0),u()(this,"activity_functions",void 0),u()(this,"activity_datatypes",void 0),u()(this,"activity_commands",void 0),u()(this,"activity_filter",void 0),this.decimalPlaces=8,this.intConvertRoundMode=2,this.default_lang="pt",this.enable_type_casting=!0,this.idle_input_interval=5e3,this.suspend_threshold=1e3,this.max_instruction_count=Number.MAX_SAFE_INTEGER,this.activity_programming_type=new Map,this.activity_functions=new Map,this.activity_datatypes=new Map,this.activity_commands=new Map,this.activity_filter=new Map}return a()(e,[{key:"setConfig",value:function(e){var t=e;for(var n in t)Object.prototype.hasOwnProperty.call(this,n)&&(this[n]=t[n])}}]),e}(),l=new c,f=function(){function e(e,t){void 0===t&&(t="pt"),this.lsKey=e,this.defaultLang=t,this.listeners=[],this.document=document,this.setupListener()}return e.prototype.setupListener=function(){var e=this;null!==this.document&&this.document.addEventListener("storage",(function(t){t.key===e.lsKey&&e.listeners.forEach((function(e){return e()}))}))},e.prototype.getLang=function(){var e=localStorage.getItem(this.lsKey);return null==e?(console.warn("Internal Error: User language information has not been set. Returning default..."),this.getDefaultLang()):e},e.prototype.getDefaultLang=function(){return this.defaultLang},e.prototype.registerLanguageChangeListener=function(e){this.listeners.push(e)},e}();!function(e){e.ERROR="error",e.MESSAGE="message",e.UI="ui"}(e||(e={}));var p=function(){function t(e,t,n){var r=this;void 0===n&&(n=!1),this.service=e,this.i18nData=t,this.listenToChange=n,this.document=document,this.listenToChange&&e.registerLanguageChangeListener((function(){r.updateTagText()}))}return t.prototype.getString=function(e,t){var n=this.i18nData[this.service.getLang()];return n?n[t]&&n[t][e]?n[t][e]:this.getDefaultString(e,t):(console.warn("Internal Error. The language set at ivprog.lang is not valid: "+this.service.getLang()),this.getDefaultString(e,t))},t.prototype.getDefaultString=function(e,t){var n=this.i18nData[this.service.getDefaultLang()];return n[t]?n[t][e]?n[t][e]:"{MISSING_I18N_IDENTIFIER: "+e+"}":"{MISSING_I18N_TYPE_IDENTIFIER: "+t+"}"},t.prototype.getOR=function(){return this.getUI("string_join_or")},t.prototype.getError=function(t,n){void 0===n&&(n=[]);var r=this.getString(t,e.ERROR);return this.processString(r,n)},t.prototype.getMessage=function(t,n){void 0===n&&(n=[]);var r=this.getString(t,e.MESSAGE);return this.processString(r,n)},t.prototype.getUI=function(t,n){void 0===n&&(n=[]);var r=this.getString(t,e.UI);return this.processString(r,n)},t.prototype.processString=function(e,t){for(var n=0;n";var n=t.split(":"),r=n[0].toLowerCase(),i=n[1];return e.ERROR===r?this.getError(i):e.MESSAGE===r?this.getMessage(i):e.UI===r?this.getUI(i):(console.warn(" A string has been passed to the i18n helper function that was not in the form type:id -> "+t),this.getString(i,r))},t}();const d={LanguageService:f,LanguageServiceNoLS:function(){function e(e){this.lang=e,this.listeners=[]}return e.prototype.setupListener=function(){},e.prototype.notifyChange=function(){this.listeners.forEach((function(e){return e()}))},e.prototype.setLang=function(e){this.lang=e,this.notifyChange()},e.prototype.getLang=function(){return this.lang},e.prototype.getDefaultLang=function(){return this.lang},e.prototype.registerLanguageChangeListener=function(e){this.listeners.push(e)},e}(),LocalizedStrings:p,StringTypes:e};var h=n(205),m=n.n(h),_=n(585),v=n.n(_),y=n(754),g=n.n(y),x=n(597),b=n(548),w=n(186),E={};for(var $ in b){var R={};R.error=w[$],R.message=x[$],R.ui=b[$],E[$]=R}const k=E;var T=n(38),N=n.n(T),I=n(655),S=n.n(I),A=n(271);function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=|==|<=|>|<|!=/,COLON:/:/,STRING:C(O(),z),CHARACTER:C(L(),K),EOS:{match:/;\r?\n?|[\r\n]+/,lineBreaks:!0},WHITESPACE:/(?: |\t)+/,RK_REFERENCE:RegExp(e.commands.RK_REFERENCE),ID:{match:RegExp("[a-zA-Z_][a-zA-Z0-9_]*"),type:r},DOT:/\./,ERROR:{match:/[\$?`]/,error:!0}};Object.entries(i).forEach((function(e){var t=N()(e,2),r=t[0];return t[1],n[r]=r}));var o=A.compile(i);return new F(t,o,n,e)}var q=V({commands:{RK_VOID:"vazio",RK_PROGRAM:"programa",RK_SWITCH:"escolha",RK_CASE:"caso",RK_DEFAULT:"contrario",RK_CONST:"const",RK_FUNCTION:"funcao",RK_RETURN:"devolva",RK_FOR:"para",RK_FOR_ALT:"repita_para",RK_FOR_FROM:"de",RK_FOR_TO:"ate",RK_FOR_PASS:"passo",RK_BREAK:"pare",RK_DO:"repita",RK_DO_UNTIL:"ate_que",RK_WHILE:"enquanto",RK_WHILE_ALT:"repita_enquanto",RK_IF:"se",RK_ELSE:"senao",RK_REFERENCE:"&"},boolVal:{RK_FALSE:"falso",RK_TRUE:"verdadeiro"},logicOp:{RK_LOGICAL_NOT:"nao",RK_LOGICAL_AND:"E",RK_LOGICAL_OR:"OU"},types:{RK_REAL:"real",RK_INTEGER:"inteiro",RK_BOOLEAN:"logico",RK_CHARACTER:"caractere",RK_STRING:"cadeia"},langLibs:{$mathLib:"Matematica",$ioLib:"ES",$strLib:"Texto",$arrayLib:"Arranjo",$langLib:"Conversao"},langFuncs:{main_function:"inicio",$read:"leia",$write:"escreva",$numElements:"total_de_elementos",$matrixLines:"total_de_linhas",$matrixColumns:"total_de_colunas",$substring:"subcadeia",$length:"comprimento",$uppercase:"caixa_alta",$lowercase:"caixa_baixa",$charAt:"caractere_na_posicao",$isReal:"e_real",$isInt:"e_inteiro",$isBool:"e_logico",$castReal:"como_real",$castInt:"como_inteiro",$castBool:"como_logico",$castString:"como_cadeia",$castChar:"como_caractere",$sin:"seno",$cos:"cosseno",$tan:"tangente",$sqrt:"raiz_quadrada",$pow:"potencia",$log:"logaritmo",$abs:"modulo",$negate:"trocar_sinal",$invert:"inverter_valor",$max:"maximo",$min:"minimo",$rand:"numero_aleatorio"}}),j=V({commands:{RK_VOID:"vazio",RK_PROGRAM:"program",RK_SWITCH:"switch",RK_CASE:"case",RK_DEFAULT:"otherwise",RK_CONST:"const",RK_FUNCTION:"function",RK_RETURN:"return",RK_FOR:"for",RK_FOR_ALT:"repeat_for",RK_FOR_FROM:"from",RK_FOR_TO:"to",RK_FOR_PASS:"pass",RK_BREAK:"break",RK_DO:"repeat",RK_DO_UNTIL:"until",RK_WHILE:"while",RK_WHILE_ALT:"repeat_while",RK_IF:"if",RK_ELSE:"else",RK_REFERENCE:"&"},boolVal:{RK_FALSE:"false",RK_TRUE:"true"},logicOp:{RK_LOGICAL_NOT:"not",RK_LOGICAL_AND:"AND",RK_LOGICAL_OR:"OR"},types:{RK_REAL:"real",RK_INTEGER:"int",RK_BOOLEAN:"bool",RK_CHARACTER:"char",RK_STRING:"string"},langLibs:{$mathLib:"Mathematics",$ioLib:"IO",$strLib:"Text",$arrayLib:"Array",$langLib:"Conversion"},langFuncs:{main_function:"main",$read:"read",$write:"write",$numElements:"total_of_elements",$matrixLines:"total_of_lines",$matrixColumns:"total_of_columns",$substring:"substring",$length:"length",$uppercase:"uppercase",$lowercase:"lowercase",$charAt:"char_at",$isReal:"is_real",$isInt:"is_integer",$isBool:"is_logic",$castReal:"to_real",$castInt:"to_integer",$castBool:"to_logic",$castString:"to_string",$castChar:"to_char",$sin:"sin",$cos:"cos",$tan:"tan",$sqrt:"sqrt",$pow:"pow",$log:"log",$abs:"abs",$negate:"negate",$invert:"invert",$max:"maximum",$min:"minimum",$rand:"random"}}),H={};H.pt=q,H.en=j;const Y=H;var W=new(function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(){return i()(this,o),r.call(this,"undefined"==typeof iLMparameters?l.default_lang:iLMparameters.lang)}return a()(o,[{key:"getDefaultLang",value:function(){return"en"}},{key:"getCurrentLexer",value:function(){var e=Y[this.getLang()];return null==e?Y[this.getDefaultLang()]:e}},{key:"getCurrentLangFuncs",value:function(){var e=Y[this.getLang()];return null==e?Y[this.getDefaultLang()].getLangFuncs():e.getLangFuncs()}},{key:"getCurrentLangLibs",value:function(){var e=Y[this.getLang()];return null==e?Y[this.getDefaultLang()].getLangLibs():e.getLangLibs()}}]),o}(d.LanguageServiceNoLS)),Z=n(757),Q=n.n(Z),J=n(926),X=n.n(J),ee=function(){function e(){i()(this,e),this._sourceInfo=null}return a()(e,[{key:"sourceInfo",set:function(e){this._sourceInfo=e},get:function(){return this._sourceInfo}}]),e}();var te=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(){return i()(this,o),r.call(this)}return o}(ee);var ne=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this)).expression=e,t}return o}(ee);var re=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){var n;return i()(this,o),(n=r.call(this)).id=e,n.expression=t,n}return o}(ee);var ie=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t,n,a){var s;return i()(this,o),(s=r.call(this,e,a)).line=t,s.column=n,s}return o}(re);var oe=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t,n,a){var s;return i()(this,o),(s=r.call(this)).id=e,s.type=t,s.initial=n,s.isConst=a,s}return o}(ee);var ae=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t,n,a,s,u){var c;return i()(this,o),(c=r.call(this,e,t,s,u)).lines=n,c.columns=a,c}return a()(o,[{key:"isVector",get:function(){return null==this.columns}}]),o}(oe);var se=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){var n;return i()(this,o),(n=r.call(this)).expression=e,n.commandBlock=t,n}return a()(o,[{key:"commands",get:function(){return this.commandBlock.commands}},{key:"testFirst",get:function(){return!0}}]),o}(ee);var ue=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t,n,a,s){var u;return i()(this,o),(u=r.call(this)).for_id=e,u.for_from=t,u.for_to=n,u.for_pass=a,u.commandBlock=s,u}return a()(o,[{key:"commands",get:function(){return this.commandBlock.commands}}]),o}(ee),ce=function(){function e(t,n){i()(this,e),u()(this,"value",void 0),u()(this,"ord",void 0),this.value=t,this.ord=n}return a()(e,[{key:"stringInfo",value:function(){return[{type:this.value,dim:0}]}},{key:"isCompatible",value:function(e){return this.value===e.value&&this.ord===e.ord}}]),e}(),le=function(){function e(t){i()(this,e),this.types=t}return a()(e,[{key:"stringInfo",value:function(){for(var e=[],t=0;t2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];i()(this,e),this.type=t,this.id=n,this.byRef=r,this.variadic=o,this._sourceInfo=null}return a()(e,[{key:"sourceInfo",set:function(e){this._sourceInfo=e},get:function(){return this._sourceInfo}}]),e}();var Ie=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){var n;return i()(this,o),(n=r.call(this)).id=e,n.actualParameters=t,n}return a()(o,[{key:"toString",value:function(){var e;e=this.isMainCall?Rt.getMainFunctionName():Rt.getLocalName(this.id);var t=null;return t=0==this.actualParameters.length?"()":"("+this.actualParameters.map((function(e){return e.toString()})).join(",")+")",this.parenthesis?"(".concat(e+t,")"):e+t}},{key:"isMainCall",get:function(){return null===this.id}},{key:"parametersSize",get:function(){return this.actualParameters.length}}]),o}($e),Se=Object.freeze({RETURN:Symbol("mode:return"),BREAK:Symbol("mode:break"),PAUSE:Symbol("mode:pause"),RUN:Symbol("mode:run"),ABORT:Symbol("mode:abort")}),Ae=n(776),Ce=n.n(Ae);function Le(e){return new(Ce())(e)}function Oe(e){var t=e.replace(/^"/,"");return(t=(t=(t=(t=(t=(t=(t=t.replace(/"$/,"")).replace(/\\b/g,"\b")).replace(/\\t/g,"\t")).replace(/\\n/g,"\n")).replace(/\\r/g,"\r")).replace(/\\"/g,'"')).replace(/\\'/g,"'")).replace(/\\\\/g,"\\")}function De(e){var t=e.replace(/^'/,"");return(t=(t=(t=(t=(t=(t=(t=t.replace(/'$/,"")).replace(/\\b/g,"\b")).replace(/\\t/g,"\t")).replace(/\\n/g,"\n")).replace(/\\r/g,"\r")).replace(/\\"/g,'"')).replace(/\\'/g,"'"))[0]}function Ge(e){return new(Ce())(e)}function Fe(e){var t=e,n=W.getCurrentLexer();if(n.getReservedKeys()[n.getRules().RK_TRUE]===t)return!0;if(n.getReservedKeys()[n.getRules().RK_FALSE]===t)return!1;throw new Error(e+"not a valid boolean")}function Pe(e){var t=W.getCurrentLexer();return(e?t.getReservedKeys()[t.getRules().RK_TRUE]:t.getReservedKeys()[t.getRules().RK_FALSE]).replace(/'/g,"")}function Me(e,t){switch(t.ord){case ge.INTEGER.ord:return e.toString();case ge.REAL.ord:return e.dp()<=0?e.toFixed(1):e.toFixed(l.decimalPlaces);case ge.BOOLEAN.ord:return Pe(e);default:return e}}var Be=n(506),Ue=n.n(Be),Ke=n(957),ze=n.n(Ke);var Ve=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){var n;return i()(this,o),(n=r.call(this,e)).id=t,n._context={},Error.captureStackTrace&&Error.captureStackTrace(Ue()(n),o),n}return a()(o,[{key:"context",get:function(){return this._context},set:function(e){this._context=e}}]),o}(ze()(Error));var qe=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){var n;return i()(this,o),(n=r.call(this,e)).id=t,n._context={},Error.captureStackTrace&&Error.captureStackTrace(Ue()(n),o),n}return a()(o,[{key:"context",get:function(){return this._context},set:function(e){this._context=e}}]),o}(ze()(Error));function je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=It();return new Ve(n.getError(e,t),e)}function He(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=It();return new qe(n.getError(e,t),e)}var Ye=Object.freeze({symbol_not_found_full:function(e,t){if(t){var n=He("symbol_not_found_full",[e,t.line,t.column]);return n.context={line:t.line,column:t.column},n}return Ye.symbol_not_found(e)},symbol_not_found:function(e){return He("symbol_not_found",[e])},function_missing_full:function(e,t){if(t){var n=He("function_missing_full",[e,t.line,t.column]);return n.context={line:t.line,column:t.column},n}return Ye.function_missing(e)},function_missing:function(e){return He("function_missing",[e])},main_missing:function(){return He("main_missing")},array_dimension_not_int_full:function(e){if(e){var t=He("array_dimension_not_int_full",[e.line]);return t.context={line:e.line,column:e.column},t}return Ye.array_dimension_not_int()},array_dimension_not_int:function(){return He("array_dimension_not_int")},unknown_command_full:function(e){if(e){var t=je("unknown_command_full",[e.line]);return t.context={line:e.line,column:e.column},t}return Ye.unknown_command()},unknown_command:function(){return je("unknown_command")},incompatible_types_full:function(e,t,n,r,i,o){var a=It();if(o){var s=He("incompatible_types_full",[a.translateType(e,t),i,o.line,a.translateType(n,r)]);return s.context={line:o.line,column:o.column},s}return Ye.incompatible_types(e,t,n,r,i)},incompatible_types:function(e,t,n,r,i){var o=It();return He("incompatible_types",[o.translateType(e,t),i,o.translateType(n,r)])},incompatible_types_array_full:function(e,t,n,r){var i=It();if(r){var o=He("incompatible_types_array_full",[e,i.translateType(t,n),r.line,r.column]);return o.context={line:r.line,column:r.column},o}return Ye.incompatible_types_array(e,t,n)},incompatible_types_array:function(e,t,n){return He("incompatible_types_array",[e,It().translateType(t,n)])},loop_condition_type_full:function(e,t){if(t){var n=He("loop_condition_type_full",[t.line,t.column,e]);return n.context={line:t.line,column:t.column},n}return Ye.loop_condition_type(e)},loop_condition_type:function(e){return He("loop_condition_type",[e])},endless_loop_full:function(e){if(e){var t=He("endless_loop_full",[e.line]);return t.context={line:e.line,column:e.column},t}return Ye.endless_loop()},endless_loop:function(){return He("endless_loop")},if_condition_type_full:function(e,t){if(t){var n=He("if_condition_type_full",[t.line,t.column,e]);return n.context={line:t.line,column:t.column},n}return Ye.if_condition_type(e)},if_condition_type:function(e){return He("if_condition_type",[e])},invalid_global_var:function(){return je("invalid_global_var")},not_implemented:function(e){return je("not_implemented",[e])},invalid_case_type_full:function(e,t,n,r){var i=It();if(r){var o=He("invalid_case_type_full",[e,i.translateType(t,n),r.line,r.column]);return o.context={line:r.line,column:r.column},o}return Ye.invalid_case_type(e,t,n)},invalid_case_type:function(e,t,n){return He("invalid_case_type",[e,It().translateType(t,n)])},void_in_expression_full:function(e,t){if(t){var n=He("void_in_expression_full",[t.line,t.column,e]);return n.context={line:t.line,column:t.column},n}return Ye.void_in_expression(e)},void_in_expression:function(e){return He("void_in_expression",[e])},invalid_array_access_full:function(e,t){if(t){var n=He("invalid_array_access_full",[e,t.line,t.column]);return n.context={line:t.line,column:t.column},n}return Ye.invalid_array_access(e)},invalid_array_access:function(e){return He("invalid_array_access",[e])},invalid_matrix_access_full:function(e,t){if(t){var n=He("invalid_matrix_access_full",[e,t.line,t.column]);return n.context={line:t.line,column:t.column},n}return Ye.invalid_matrix_access(e)},invalid_matrix_access:function(e){return He("invalid_matrix_access",[e])},matrix_column_outbounds_full:function(e,t,n,r){if(r){var i=je("matrix_column_outbounds_full",[r.line,t,e,n]);return i.context={line:r.line,column:r.column},i}return Ye.matrix_column_outbounds(e,t,n)},matrix_column_outbounds:function(e,t,n){return je("matrix_column_outbounds",[t,e,n])},matrix_line_outbounds_full:function(e,t,n,r){if(r){var i=je("matrix_line_outbounds_full",[r.line,t,e,n]);return i.context={line:r.line,column:r.column},i}return Ye.matrix_line_outbounds(e,t,n)},matrix_line_outbounds:function(e,t,n){return je("matrix_line_outbounds",[t,e,n])},vector_line_outbounds_full:function(e,t,n,r){if(r){var i=je("vector_line_outbounds_full",[r.line,t,e,n]);return i.context={line:r.line,column:r.column},i}return Ye.vector_line_outbounds(e,t,n)},vector_line_outbounds:function(e,t,n){return je("vector_line_outbounds",[t,e,n])},vector_not_matrix_full:function(e,t){if(t){var n=je("vector_not_matrix_full",[t.line,e]);return n.context={line:t.line,column:t.column},n}return Ye.vector_not_matrix(e)},vector_not_matrix:function(e){return je("vector_not_matrix",[e])},function_no_return:function(e){return He("function_no_return",[e])},invalid_void_return_full:function(e,t,n,r){var i=It();if(r){var o=He("invalid_void_return_full",[r.line,e,i.translateType(t,n)]);return o.context={line:r.line,column:r.column},o}return Ye.invalid_void_return(e,t,n)},invalid_void_return:function(e,t,n){return He("invalid_void_return_full",[e,It().translateType(t,n)])},invalid_return_type_full:function(e,t,n,r){var i=It();if(r){var o=He("invalid_return_type_full",[r.line,e,i.translateType(t,n)]);return o.context={line:r.line,column:r.column},o}return Ye.invalid_return_type(e,t,n)},invalid_return_type:function(e,t,n){return He("invalid_return_type",[e,It().translateType(t,n)])},invalid_parameters_size_full:function(e,t,n,r){if(r){var i=He("invalid_parameters_size_full",[r.line,e,t,n]);return i.context={line:r.line,column:r.column},i}return Ye.invalid_parameters_size(e,t,n)},invalid_parameters_size:function(e,t,n){return He("invalid_parameters_size",[e,t,n])},invalid_parameter_type_full:function(e,t,n){if(n){var r=He("invalid_parameter_type_full",[t,Rt.getLocalName(e),n.line]);return r.context={line:n.line,column:n.column},r}return Ye.invalid_parameter_type(e,t)},invalid_parameter_type:function(e,t){return He("invalid_parameter_type_full",[t,Rt.getLocalName(e)])},invalid_ref_full:function(e,t,n){if(n){var r=He("invalid_ref_full",[t,e,n.line]);return r.context={line:n.line,column:n.column},r}return Ye.invalid_ref(e,t)},invalid_ref:function(e,t){return He("invalid_ref",[t,e])},unexpected_break_command_full:function(e){if(e){var t=je("unexpected_break_command_full",[e.line]);return t.context={line:e.line,column:e.column},t}return Ye.unexpected_break_command()},unexpected_break_command:function(){return je("unexpected_break_command")},invalid_array_literal_type_full:function(e,t){if(t){var n=je("invalid_array_literal_type_full",[t.line,e]);return n.context={line:t.line,column:t.column},n}return Ye.invalid_array_literal_type(e)},invalid_array_literal_type:function(e){return je("invalid_array_literal_type",[e])},invalid_array_literal_line_full:function(e,t,n){if(n){var r=je("invalid_array_literal_line_full",[n.line,e,t]);return r.context={line:n.line,column:n.column},r}return Ye.invalid_array_literal_type(e,t)},invalid_array_literal_line:function(e,t){return je("invalid_array_literal_line",[e,t])},invalid_array_literal_column_full:function(e,t,n){if(n){var r=je("invalid_array_literal_column_full",[n.line,e,t]);return r.context={line:n.line,column:n.column},r}return Ye.invalid_array_literal_column(e,t)},invalid_array_literal_column:function(e,t){return je("invalid_array_literal_column",[e,t])},invalid_unary_op_full:function(e,t,n,r,i){var o=It();if(i){var a=je("invalid_unary_op_full",[i.line,e,o.translateOp(t),o.translateType(n,r)]);return a.context={line:i.line,column:i.column},a}return Ye.invalid_unary_op(t,n,r)},invalid_unary_op:function(e,t,n,r){var i=It();return je("invalid_unary_op",[e,i.translateOp(t),i.translateType(n,r)])},invalid_infix_op_full:function(e,t,n,r,i,o,a){var s=It();if(a){var u=je("invalid_infix_op_full",[a.line,e,s.translateOp(t),s.translateType(n,r),s.translateType(i,o)]);return u.context={line:a.line,column:a.column},u}return Ye.invalid_infix_op(t,n,r,i,o)},invalid_infix_op:function(e,t,n,r,i,o){var a=It();return je("invalid_infix_op",[e,a.translateOp(t),a.translateType(n,r),a.translateType(i,o)])},array_dimension_not_positive_full:function(e){if(e){var t=He("array_dimension_not_positive_full",[e.line]);return t.context={line:e.line,column:e.column},t}return Ye.array_dimension_not_positive()},array_dimension_not_positive:function(){return He("array_dimension_not_positive")},invalid_type_conversion:function(e,t,n){return je("invalid_type_conversion",[e,It().translateType(t,n)])},invalid_read_type:function(e,t,n,r,i){var o=It(),a=je("invalid_read_type",[i.line,e,o.translateType(t,n),r]);return a.context={line:i.line,column:i.column},a},invalid_read_type_array:function(e,t,n,r,i,o,a){var s=It(),u=je("invalid_read_type_array",[a.line,e,s.translateType(t,n),r,s.translateType(i,o)]);return u.context={line:a.line,column:a.column},u},invalid_const_ref_full:function(e,t,n){if(n){var r=He("invalid_const_ref_full",[t,Rt.getLocalName(e),n.line]);return r.context={line:n.line,column:n.column},r}return Ye.invalid_const_ref(e,t)},invalid_const_ref:function(e,t){return He("invalid_const_ref",[t,Rt.getLocalName(e)])},invalid_const_assignment_full:function(e,t){if(t){var n=He("invalid_const_assignment_full",[t.line,e]);return n.context={line:t.line,column:t.column},n}return Ye.invalid_const_assignment(e)},invalid_const_assignment:function(e){return He("invalid_const_assignment",[e])},invalid_vector_assignment_full:function(e,t,n,r,i){if(i){var o=je("invalid_vector_assignment_full",[i.line,e,t,n,r]);return o.context={line:i.line,column:i.column},o}return Ye.invalid_vector_assignment(e,t,n,r)},invalid_vector_assignment:function(e,t,n,r){return je("invalid_vector_assignment",[e,t,n,r])},invalid_matrix_assignment_full:function(e,t,n,r,i,o,a){if(a){var s=je("invalid_matrix_assignment_full",[a.line,e,t,n,r,i,o]);return s.context={line:a.line,column:a.column},s}return Ye.invalid_matrix_assignment(e,t,n,r,i,o)},invalid_matrix_assignment:function(e,t,n,r,i,o){return je("invalid_matrix_assignment",[e,t,n,r,i,o])},matrix_to_vector_attr:function(e,t,n){var r=He("matrix_to_vector_attr",[n.line,t,e]);return r.context={line:n.line,column:n.column},r},vector_to_matrix_attr:function(e,t,n){var r=He("vector_to_matrix_attr",[n.line,t,e]);return r.context={line:n.line,column:n.column},r},invalid_matrix_index_assign_full:function(e,t,n,r,i,o){if(o){var a=je("invalid_matrix_index_assign_full",[o.line,t,e,n,r,i]);return a.context={line:o.line,column:o.column},a}return Ye.invalid_matrix_index_assign(e,t,n,r,i)},invalid_matrix_index_assign:function(e,t,n,r,i){return je("invalid_matrix_index_assign",[t,e,n,r,i])},invalid_number_elements_vector:function(e,t,n,r){var i=je("invalid_number_elements_vector",[e,r.line,t,n]);return i.context={line:r.line,column:r.column},i},invalid_number_lines_matrix:function(e,t,n,r){var i=je("invalid_number_lines_matrix",[e,r.line,t,n]);return i.context={line:r.line,column:r.column},i},divsion_by_zero_full:function(e,t){if(t){var n=je("divsion_by_zero_full",[t.line,e]);return n.context={line:t.line,column:t.column},n}return Ye.divsion_by_zero(e)},divsion_by_zero:function(e){return je("divsion_by_zero",[e])},undefined_tanget_value:function(e,t){var n=je("undefined_tanget_value",[t.line,e]);return n.context={line:t.line,column:t.column},n},negative_log_value:function(e){var t=je("negative_log_value",[e.line]);return t.context={line:e.line,column:e.column},t},invalid_string_index:function(e,t,n){var r=Rt.getLocalName("$charAt"),i=je("invalid_string_index",[n.line,r,e,t,t.length-1]);return i.context={line:n.line,column:n.column},i},negative_sqrt_value:function(e){var t=je("negative_sqrt_value",[e.line]);return t.context={line:e.line,column:e.column},t},exceeded_recursive_calls:function(e){var t=je("exceeded_recursive_calls",[e.line]);return t.context={line:e.line,column:e.column},t},invalid_for_variable:function(e,t){var n=He("invalid_for_variable",[t.line,e]);return n.context={line:t.line,column:t.column},n},invalid_for_from:function(e,t){var n=He("invalid_for_from",[t.line,e]);return n.context={line:t.line,column:t.column},n},invalid_for_to:function(e,t){var n=He("invalid_for_to",[t.line,e]);return n.context={line:t.line,column:t.column},n},invalid_for_pass:function(e,t){var n=He("invalid_for_pass",[t.line,e]);return n.context={line:t.line,column:t.column},n},exceed_max_instructions:function(){return je("exceed_max_instructions")}}),We=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];i()(this,e),u()(this,"type",void 0),u()(this,"id",void 0),u()(this,"isConst",void 0),u()(this,"value",void 0),this.type=t,this.id=r,this.isConst=o,this.value=n}return a()(e,[{key:"get",value:function(){return this.value}},{key:"inStore",value:function(){return null!=this.id}}]),e}(),Ze=function(){function e(t,n){i()(this,e),this.dimensions=n,u()(this,"innerType",void 0),this.innerType=t}return a()(e,[{key:"isCompatible",value:function(t){return t instanceof e&&this.dimensions===t.dimensions&&this.innerType.isCompatible(t.innerType)}},{key:"stringInfo",value:function(){var e=this,t=this.innerType.stringInfo();return t.forEach((function(t){t.dim=e.dimensions})),t}},{key:"canAccept",value:function(t,n){var r=this.dimensions-n;return t instanceof e?r==t.dimensions&&this.innerType.isCompatible(t.innerType):0==r&&this.innerType.isCompatible(t)}},{key:"isVector",get:function(){return 1==this.dimensions}},{key:"value",get:function(){}},{key:"ord",get:function(){}}]),e}();var Qe=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t,n){var a;return i()(this,o),(a=r.call(this)).id=e,a.line=t,a.column=n,a}return a()(o,[{key:"toString",value:function(){var e=this.line.toString(),t=null;this.column&&(t=this.column.toString());var n;return n=t?"".concat(this.id,"[").concat(e,"][").concat(t,"]"):"".concat(this.id,"[").concat(e,"]"),this.parenthesis?"(".concat(n,")"):n}}]),o}($e);var Je=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this)).type=e,t}return o}($e);var Xe=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this,ge.INTEGER)).value=e,t}return a()(o,[{key:"toString",value:function(){var e=Me(this.value,this.type);return this.parenthesis?"(".concat(e,")"):e}}]),o}(Je);var et=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this,ge.REAL)).value=e,t}return a()(o,[{key:"toString",value:function(){var e=Me(this.value,this.type);return this.parenthesis?"(".concat(e,")"):e}}]),o}(Je);var tt=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this,ge.BOOLEAN)).value=e,t}return a()(o,[{key:"toString",value:function(){var e=Pe(this.value);return this.parenthesis?"(".concat(e,")"):e}}]),o}(Je);var nt=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this,ge.CHAR)).value=e,t}return a()(o,[{key:"toString",value:function(){var e="'".concat(this.value,"'");return this.parenthesis?"(".concat(e,")"):e}}]),o}(Je);var rt=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this,ge.STRING)).value=e,t}return a()(o,[{key:"toString",value:function(){var e='"'+this.value+'"';return this.parenthesis?"(".concat(e,")"):e}}]),o}(Je);var it=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){var n;return i()(this,o),(n=r.call(this,e)).value=t,n}return a()(o,[{key:"validateType",value:function(){return!0}},{key:"validateSize",value:function(){return!0}},{key:"toString",value:function(){var e="{"+this.value.map((function(e){return e.toString()})).join(",")+"}";return this.parenthesis?"(".concat(e,")"):e}},{key:"subtype",get:function(){var e=this.value[0];return e instanceof o?e.value[0].type:e.type}},{key:"lines",get:function(){return this.value.length}},{key:"columns",get:function(){var e=this.value[0];return e instanceof o?e.value.length:null}},{key:"isVector",get:function(){return null===this.columns}},{key:"isValid",get:function(){return this.validateSize()&&this.validateType()}}]),o}(Je);var ot=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this,ge.UNDEFINED)).id=e,t}return a()(o,[{key:"toString",value:function(){return this.parenthesis?"(".concat(this.id,")"):this.id}}]),o}(Je);var at=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t,n){var a;return i()(this,o),(a=r.call(this)).op=e,a.left=t,a.right=n,a}return a()(o,[{key:"toString",value:function(){var e=this.left.toString(),t=this.op.value,n=this.right.toString();return this.parenthesis?"(".concat(e+t+n,")"):e+t+n}}]),o}($e);var st=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){return i()(this,o),r.call(this,e,t,null)}return a()(o,[{key:"toString",value:function(){var e=this.left.toString(),t=this.op.value;return this.parenthesis?"(".concat(t+e,")"):t+e}}]),o}(at),ut=function(){function e(t,n,r,o){i()(this,e),this.line=t,this.column=n,this.text=r,this.size=o}return a()(e,null,[{key:"createSourceInfo",value:function(t){return new e(t.line,t.col,t.text,t.text.length)}},{key:"createSourceInfoFromList",value:function(t,n){return new e(t.line,t.col,"",n.offset+1-t.offset)}}]),e}(),ct=Object.freeze({ADD:{ord:0,value:"+"},SUB:{ord:1,value:"-"},MULT:{ord:2,value:"*"},DIV:{ord:3,value:"/"},MOD:{ord:4,value:"%"},GT:{ord:5,value:">"},GE:{ord:6,value:">="},LT:{ord:7,value:"<"},LE:{ord:8,value:"<="},EQ:{ord:9,value:"=="},NEQ:{ord:10,value:"!="},AND:{ord:11,value:"and"},OR:{ord:12,value:"or"},NOT:{ord:13,value:"not"}});function lt(e){switch(e){case"+":return ct.ADD;case"-":return ct.SUB;case"*":return ct.MULT;case"/":return ct.DIV;case"%":return ct.MOD;case">":return ct.GT;case">=":return ct.GE;case"<":return ct.LT;case"<=":return ct.LE;case"==":return ct.EQ;case"!=":return ct.NEQ;case"and":return ct.AND;case"or":return ct.OR;case"not":return ct.NOT}return null}var ft=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t){var n;return i()(this,o),(n=r.call(this,e)).id=t,n._context={},Error.captureStackTrace&&Error.captureStackTrace(Ue()(n),o),n}return a()(o,[{key:"context",get:function(){return this._context},set:function(e){this._context=e}}]),o}(ze()(Error)),pt=It();function dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new ft(pt.getError(e,t),e)}var ht=Object.freeze({extra_lines:function(){return new ft(pt.getError("extra_lines"))},token_missing_one:function(e,t){var n=dt("token_missing_one",[e,t.text,t.line,t.col]);return n.context={line:t.line,column:t.col},n},token_missing_list:function(e,t){var n=e.join(pt.getOR()),r=ht.token_missing_one(n,t);return r.context={line:t.line,column:t.col},r},id_missing:function(e){var t=dt("id_missing",[e.text,e.line,e.col]);return t.context={line:e.line,column:e.col},t},eos_missing:function(e){var t=dt("eos_missing",[e.line,e.col]);return t.context={line:e.line,column:e.col},t},invalid_array_dimension:function(e,t){var n=dt("invalid_array_dimension",[t.line,t.col,e]);return n.context={line:t.line,column:t.col},n},invalid_array_size:function(e){var t=dt("invalid_array_size",[e.line]);return t.context={line:e.line,column:e.col},t},invalid_main_return:function(e,t,n){var r=dt("invalid_main_return",[e,t,n.line]);return r.context={line:n.line,column:n.col},r},invalid_var_declaration:function(e){var t=dt("invalid_var_declaration",[e.line]);return t.context={line:e.line,column:e.col},t},invalid_break_command:function(e,t){var n=dt("invalid_break_command",[t.line,e]);return n.context={line:t.line,column:t.col},n},invalid_terminal:function(e){var t=dt("invalid_terminal",[e.text,e.line,e.col]);return t.context={line:e.line,column:e.col},t},invalid_type:function(e,t){var n=e.join(pt.getOR()),r=dt("invalid_type",[t.text,t.line,t.col,n]);return r.context={line:t.line,column:t.col},r},const_not_init:function(e){var t=dt("const_not_init",[e.line,e.col]);return t.context={line:e.line,column:e.col},t},invalid_id_format:function(e){var t=dt("invalid_id_format",[e.text,e.line,e.col]);return t.context={line:e.line,column:e.col},t},duplicate_function:function(e){var t=dt("duplicate_function",[e.text,e.line,e.col]);return t.context={line:e.line,column:e.col},t},main_parameters:function(){return dt("main_parameters")},duplicate_variable:function(e){var t=dt("duplicate_variable",[e.text,e.line,e.col]);return t.context={line:e.line,column:e.col},t},invalid_character:function(e,t,n){var r=dt("invalid_character",[e,t]);return r.context={line:t,column:n},r},annonymous_array_literal:function(e){var t=dt("annonymous_array_literal",[e.line]);return t.context={line:e.line,column:e.col},t},invalid_matrix_literal_line:function(e,t){var n=dt("invalid_matrix_literal_line",[e,t.line]);return n.context={line:t.line,column:t.column},n},cannot_infer_matrix_line:function(e,t){var n=dt("cannot_infer_matrix_line",[e,t.line]);return n.context={line:t.line,column:t.column},n},cannot_infer_matrix_column:function(e,t){var n=dt("cannot_infer_matrix_column",[e,t.line]);return n.context={line:t.line,column:t.column},n},cannot_infer_vector_size:function(e,t){var n=dt("cannot_infer_vector_size",[e,t.line]);return n.context={line:t.line,column:t.column},n},matrix_to_vector_literal_attr:function(e,t,n){var r=dt("matrix_to_vector_literal_attr",[n.line,t,e]);return r.context={line:n.line,column:n.column},r},vector_to_matrix_literal_attr:function(e,t,n){var r=dt("vector_to_matrix_literal_attr",[n.line,t,e]);return r.context={line:n.line,column:n.column},r},array_init_not_literal:function(e){var t=dt("array_init_not_literal",[e.line]);return t.context={line:e.line,column:e.column},t},array_exceeds_2d:function(e){var t=dt("array_exceeds_2d",[e.line]);return t.context={line:e.line,column:e.column},t},invalid_matrix_id_dimension:function(e){var t=dt("invalid_matrix_id_dimension",[e.line]);return t.context={line:e.line,column:e.column},t},invalid_vector_init:function(e){var t=dt("invalid_vector_init",[e.line]);return t.context={line:e.line,column:e.column},t},invalid_matrix_init:function(e){var t=dt("invalid_matrix_init",[e.line]);return t.context={line:e.line,column:e.column},t},invalid_syntax:function(e,t,n){var r=dt("invalid_syntax",[e,t]);return r.context={line:t,column:n},r}}),mt=function(){function e(t,n){i()(this,e),this.ivprogLexer=n,this.inputStream=t,this.lexer=n.lexer,this.tokenStream=[],this.pos=0,this.ruleNames=n.getRules(),this.variableTypes=Object.entries(this.ivprogLexer.getTypeKeys()).map((function(e){var t=N()(e,2),n=t[0];return t[1],n})),this.functionTypes=this.variableTypes.concat(this.ruleNames.RK_VOID),this.parsingArrayDimension=0,this.scope=[],this.langFuncs=this.ivprogLexer.getLangFuncs(),this.definedFuncsNameList=[],this.definedVariablesStack=[]}return a()(e,null,[{key:"createParser",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=W.getCurrentLexer(),i=new e(t,r);return n&&i.fill(),i}},{key:"BASE",get:function(){return 0}},{key:"FUNCTION",get:function(){return 1}},{key:"COMMAND",get:function(){return 2}},{key:"BREAKABLE",get:function(){return 4}},{key:"EOF_TOKEN",get:function(){return{text:null,line:-1,col:-1,value:null,offset:-1,lineBreaks:!1,type:"EOF"}}}]),a()(e,[{key:"fill",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?this.tokenStream=t:(this.tokenStream=Array.from(this.lexer.reset(this.inputStream)),this.tokenStream=this.tokenStream.filter((function(t){if(t.type===e.ruleNames.ERROR){var n=t.text,r=t.line,i=t.col;throw ht.invalid_syntax(n,r,i)}return t.type!==e.ruleNames.WHITESPACE&&t.type!==e.ruleNames.COMMENTS})))}},{key:"parseTree",value:function(){return this.parseProgram()}},{key:"getToken",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pos;return t>=this.tokenStream.length?e.EOF_TOKEN:this.tokenStream[t]}},{key:"insideScope",value:function(t){return this.scope.length<=0?e.BASE===t:this.scope[this.scope.length-1]===t}},{key:"pushScope",value:function(e){this.scope.push(e)}},{key:"pushVariableStack",value:function(){this.definedVariablesStack.push([])}},{key:"popScope",value:function(){return this.scope.pop()}},{key:"popVariableStack",value:function(){return this.definedVariablesStack.pop()}},{key:"getCurrentVariableStack",value:function(){return this.definedVariablesStack[this.definedVariablesStack.length-1]}},{key:"isEOF",value:function(){return this.getToken(this.pos).type===e.EOF_TOKEN.type}},{key:"parseProgram",value:function(){this.consumeNewLines();var e=this.getToken(),t=[],n=[];if(this.ruleNames.RK_PROGRAM===e.type){for(this.pos++,this.consumeNewLines(),this.checkOpenCurly(),this.pos++,this.pushVariableStack();;){this.consumeNewLines();var r=this.getToken();if(r.type===this.ruleNames.RK_CONST||this.isVariableType(r))t=t.concat(this.parseGlobalVariables());else{if(r.type!==this.ruleNames.RK_FUNCTION)break;this.pushVariableStack(),n=n.concat(this.parseFunction()),this.popVariableStack()}}if(this.consumeNewLines(),this.checkCloseCurly(),this.pos++,this.consumeNewLines(),!this.isEOF())throw console.log(this.getToken()),ht.extra_lines();return this.popVariableStack(),{global:t,functions:n}}throw ht.token_missing_one(this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_PROGRAM],e)}},{key:"checkOpenCurly",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getToken();if(this.ruleNames.OPEN_CURLY!==t.type){if(e)return!1;throw ht.token_missing_one("{",t)}return!0}},{key:"checkCloseCurly",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getToken();if(this.ruleNames.CLOSE_CURLY!==t.type){if(e)return!1;throw ht.token_missing_one("}",t)}return!0}},{key:"checkOpenBrace",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getToken();if(this.ruleNames.OPEN_BRACE!==t.type){if(e)return!1;throw ht.token_missing_one("[",t)}return!0}},{key:"checkCloseBrace",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getToken();if(this.ruleNames.CLOSE_BRACE!==t.type){if(e)return!1;throw ht.token_missing_one("]",t)}return!0}},{key:"checkOpenParenthesis",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getToken();if(this.ruleNames.OPEN_PARENTHESIS!==t.type){if(e)return!1;throw ht.token_missing_one("(",t)}return!0}},{key:"checkCloseParenthesis",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getToken();if(this.ruleNames.CLOSE_PARENTHESIS!==t.type){if(e)return!1;throw ht.token_missing_one(")",t)}return!0}},{key:"checkEOS",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getToken();if(t.type!==this.ruleNames.EOS){if(e)return!1;throw ht.eos_missing(t)}return!0}},{key:"checkFunctionDuplicate",value:function(e,t){var n=null===e?"$main":e;if(-1!==this.definedFuncsNameList.indexOf(n))throw ht.duplicate_function(t);this.definedFuncsNameList.push(n)}},{key:"checkVariableDuplicate",value:function(e,t){if(-1!==this.getCurrentVariableStack().indexOf(e))throw ht.duplicate_variable(t);this.getCurrentVariableStack().push(e)}},{key:"consumeForSemiColon",value:function(){var e=this.getToken();if(e.type!==this.ruleNames.EOS||!e.text.match("^;$"))throw ht.token_missing_one(";",e);this.pos++}},{key:"parseGlobalVariables",value:function(){var e=this.parseMaybeConst();return this.checkEOS(),this.pos++,e}},{key:"parseMaybeConst",value:function(){var e=this.getToken();if(e.type===this.ruleNames.RK_CONST){this.pos++;var t=this.parseType();return this.parseDeclaration(t,!0)}if(this.isVariableType(e)){var n=this.parseType();return this.parseDeclaration(n)}throw ht.token_missing_list([this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_CONST]].concat(this.getTypeArray()),e)}},{key:"parseDeclaration",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null,r=null,i=null,o=0,a=ut.createSourceInfo(this.getToken()),s=this.parseID();if(this.checkVariableDuplicate(s,a),this.checkOpenBrace(!0))return this.pos+=1,this.consumeNewLines(),r=this.parseArrayDimension(),this.consumeNewLines(),this.checkCloseBrace(),this.pos+=1,o+=1,this.checkOpenBrace(!0)&&(this.pos+=1,this.consumeNewLines(),i=this.parseArrayDimension(),this.consumeNewLines(),this.checkCloseBrace(),this.pos+=1,o+=1),this.parseArrayDeclaration(e,t,s,a,o,r,i);var u=this.getToken();if(t&&u.type!==this.ruleNames.ASSIGNMENT)throw ht.const_not_init(a);u.type===this.ruleNames.ASSIGNMENT&&(this.pos++,n=this.parseExpressionOR());var c=new oe(s,e,n,t);c.sourceInfo=a;var l=this.getToken();return l.type===this.ruleNames.COMMA?(this.pos++,this.consumeNewLines(),[c].concat(this.parseDeclaration(e,t))):[c]}},{key:"parseArrayDeclaration",value:function(e,t,n,r,i,o,a){var s=this.getToken(),u=o,c=a,l=null,f=!1;if((o instanceof ot||a instanceof ot)&&(f=!0,i>1&&(null==o||null==a)))throw ht.invalid_matrix_id_dimension(ut.createSourceInfo(s));if(t&&s.type!==this.ruleNames.ASSIGNMENT)throw ht.const_not_init(r);if(s.type===this.ruleNames.ASSIGNMENT){if(f)throw 1==i?ht.invalid_vector_init(ut.createSourceInfo(s)):ht.invalid_matrix_init(ut.createSourceInfo(s));this.pos+=1,l=this.parseArrayLiteral(e)}if(null==l&&null==o){if(i>1)throw ht.cannot_infer_matrix_line(n,r);throw ht.cannot_infer_vector_size(n,r)}if(i>1&&null==l&&null==a)throw ht.cannot_infer_matrix_column(n,r);if(1===i&&null!=l&&!l.isVector){var p=l.toString();throw ht.matrix_to_vector_literal_attr(n,p,l.sourceInfo)}if(i>1&&null!=l&&l.isVector){var d=l.toString();throw ht.vector_to_matrix_literal_attr(n,d,l.sourceInfo)}null==o&&((u=new Xe(Le(l.lines))).sourceInfo=r),i>1&&null==a&&((c=new Xe(Le(l.columns))).sourceInfo=r);var h=new ae(n,new Ze(e,i),u,c,l,t);return h.sourceInfo=r,this.getToken().type===this.ruleNames.COMMA?(this.pos++,this.consumeNewLines(),[h].concat(this.parseDeclaration(e,t))):[h]}},{key:"consumeNewLines",value:function(){for(var e=this.getToken();e&&e.type===this.ruleNames.EOS&&e.text.match("^[\r\n]+$");)this.pos++,e=this.getToken()}},{key:"isVariableType",value:function(e){return this.variableTypes.find((function(t){return t===e.type}))}},{key:"parseArrayDimension",value:function(){var e=this.getToken();if(e.type===this.ruleNames.INTEGER)return this.pos++,this.getIntLiteral(e);if(e.type===this.ruleNames.ID)return this.pos++,this.parseVariable(e);if(e.type===this.ruleNames.CLOSE_BRACE)return null;throw ht.invalid_array_dimension(this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_INTEGER],e)}},{key:"getIntLiteral",value:function(e){var t=e.text,n=ut.createSourceInfo(e),r=new Xe(Le(t));return r.sourceInfo=n,r}},{key:"getRealLiteral",value:function(e){var t=ut.createSourceInfo(e),n=new et(Ge(e.text));return n.sourceInfo=t,n}},{key:"getStringLiteral",value:function(e){var t=e.text,n=ut.createSourceInfo(e),r=new rt(Oe(t));return r.sourceInfo=n,r}},{key:"getCharLiteral",value:function(e){var t=e.text,n=new nt(De(t));return n.sourceInfo=ut.createSourceInfo(e),n}},{key:"getBoolLiteral",value:function(e){var t=Fe(e.text),n=new tt(t);return n.sourceInfo=ut.createSourceInfo(e),n}},{key:"parseArrayLiteral",value:function(e){if(!this.checkOpenCurly(!0)){var t=this.getToken();throw ht.array_init_not_literal(ut.createSourceInfo(t))}var n=this.getToken();if(this.parsingArrayDimension>=2)throw ht.array_exceeds_2d(ut.createSourceInfo(n));this.pos+=1,this.parsingArrayDimension+=1,this.consumeNewLines();var r;r=this.checkOpenCurly(!0)?this.parseVectorList(e):this.parseExpressionList(),this.consumeNewLines(),this.checkCloseCurly();var i=this.getToken();this.pos+=1,this.parsingArrayDimension-=1;var o=ut.createSourceInfoFromList(n,i),a=1;r[0]instanceof it?a+=1:1==r.length&&console.log("Talvez uma variável seja uma melhor opção");var s=new Ze(e,a),u=new it(s,r);return u.sourceInfo=o,u}},{key:"parseVectorList",value:function(e){for(var t=[],n=null;;){this.checkOpenCurly();var r=this.getToken();if(this.parsingArrayDimension>=2)throw ht.array_exceeds_2d(ut.createSourceInfo(r));this.pos+=1,this.parsingArrayDimension+=1,this.consumeNewLines();var i=this.parseExpressionList();this.consumeNewLines(),this.checkCloseCurly();var o=this.getToken();this.pos+=1,this.parsingArrayDimension-=1;var a=ut.createSourceInfoFromList(r,o);if(null==n)n=i.length;else if(n!==i.length){var s=this.inputStream.substring(r.offset,o.offset+o.text.length);throw ht.invalid_matrix_literal_line(s,a)}var u=new Ze(e,1),c=new it(u,i);if(c.sourceInfo=a,t.push(c),this.getToken().type!==this.ruleNames.COMMA)break;this.pos+=1,this.consumeNewLines()}return 1==t.length&&console.log("Talvez um vetor seja uma melhor opção"),t}},{key:"parseVariable",value:function(e){var t=ut.createSourceInfo(e),n=new ot(e.text);return n.sourceInfo=t,n}},{key:"parseFunction",value:function(){this.pushScope(e.FUNCTION);var t=[],n=this.getToken();if(n.type!==this.ruleNames.RK_FUNCTION)return null;this.pos++;var r=this.parseType(),i=0;this.checkOpenBrace(!0)&&(this.pos++,this.checkCloseBrace(),this.pos++,i++,this.checkOpenBrace(!0)&&(this.pos++,this.checkCloseBrace(),this.pos++,i++));var o=this.getToken(),a=this.parseID();this.checkFunctionDuplicate(a,o),this.checkOpenParenthesis(),this.pos++,this.consumeNewLines(),this.checkCloseParenthesis(!0)||(t=this.parseFormalParameters(),this.consumeNewLines(),this.checkCloseParenthesis()),this.pos++,this.consumeNewLines();var s=this.parseCommandBlock(),u=r;i>0&&(u=new Ze(r,i));var c=new xe(a,u,t,s);if(null===a&&!c.isMain)throw ht.invalid_main_return(Rt.getMainFunctionName(),this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_VOID],n.line);if(c.isMain&&0!==t.length)throw ht.main_parameters();return this.popScope(),c.sourceInfo=ut.createSourceInfo(o),c}},{key:"parseFormalParameters",value:function(){for(var e=[];;){var t=0,n=!1,r=this.parseType(),i=this.getToken();i.type===this.ruleNames.RK_REFERENCE&&(n=!0,this.pos+=1,i=this.getToken());var o=this.parseID();this.checkVariableDuplicate(o,i),this.checkOpenBrace(!0)&&(this.pos+=1,t+=1,this.checkCloseBrace(),this.pos+=1,this.checkOpenBrace(!0)&&(this.pos+=1,t+=1,this.checkCloseBrace(),this.pos+=1));var a;a=t>0?new Ze(r,t):r;var s=new Ne(a,o,n);if(s.sourceInfo=ut.createSourceInfo(i),e.push(s),this.getToken().type!==this.ruleNames.COMMA)break;this.pos++,this.consumeNewLines()}return e}},{key:"parseID",value:function(){var t=this.getToken();if(t.type!==this.ruleNames.ID)throw ht.id_missing(t);return this.pos++,this.insideScope(e.FUNCTION)&&t.text===Rt.getMainFunctionName()?null:t.text}},{key:"parseMaybeLibID",value:function(){var e=this.getToken();if(e.type!==this.ruleNames.ID)throw ht.id_missing(e);if(this.getToken(this.pos+1).type===this.ruleNames.DOT){this.pos+=2;var t=this.getToken();if(t.type!==this.ruleNames.ID)throw ht.id_missing(t);return this.pos++,"".concat(e.text,".").concat(t.text)}return this.pos++,e.text}},{key:"parseType",value:function(){var t=this.getToken();if(t.type===this.ruleNames.ID&&this.insideScope(e.FUNCTION))return ge.VOID;if(t.type===this.ruleNames.RK_VOID&&this.insideScope(e.FUNCTION))return this.pos++,ge.VOID;if(this.isVariableType(t))switch(this.pos++,t.type){case this.ruleNames.RK_INTEGER:return ge.INTEGER;case this.ruleNames.RK_BOOLEAN:return ge.BOOLEAN;case this.ruleNames.RK_REAL:return ge.REAL;case this.ruleNames.RK_STRING:return ge.STRING;case this.ruleNames.RK_CHARACTER:return ge.CHAR}throw ht.invalid_type(this.getTypeArray(),t)}},{key:"parseCommandBlock",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[],n=[],r=!1;this.checkOpenCurly(e)&&(this.pos++,r=!0),this.consumeNewLines();for(var i=!1;;){var o=this.parseCommand();if(null===o)break;if(-1!==o)if(o instanceof Array){if(i){var a=this.getToken(this.pos-1);throw ht.invalid_var_declaration(a)}t=t.concat(o)}else i=!0,n.push(o)}return this.consumeNewLines(),r&&(this.checkCloseCurly(),this.pos++,this.consumeNewLines()),new we(t,n)}},{key:"parseCommand",value:function(){var t=this.getToken();if(this.isVariableType(t)){if(!this.insideScope(e.FUNCTION))throw ht.invalid_var_declaration(t);this.pushScope(e.BASE);var n=this.parseType();this.popScope();var r=this.parseDeclaration(n);return this.checkEOS(),this.pos++,r}if(t.type===this.ruleNames.ID)return this.parseIDCommand();if(t.type===this.ruleNames.DOT)throw ht.invalid_syntax(t.text,t.line,t.col);if(t.type===this.ruleNames.RK_RETURN)return this.parseReturn();if(t.type===this.ruleNames.RK_WHILE||t.type===this.ruleNames.RK_WHILE_ALT)return this.parseWhile();if(t.type===this.ruleNames.RK_FOR||t.type===this.ruleNames.RK_FOR_ALT)return this.parseFor();if(t.type===this.ruleNames.RK_BREAK){if(!this.insideScope(e.BREAKABLE))throw ht.invalid_break_command(this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_BREAK],t);return this.parseBreak()}return t.type===this.ruleNames.RK_SWITCH?this.parseSwitchCase():t.type===this.ruleNames.RK_DO?this.parseRepeatUntil():t.type===this.ruleNames.RK_IF?this.parseIfThenElse():this.checkEOS(!0)?(this.pos++,-1):null}},{key:"parseSwitchCase",value:function(){var t=this.getToken();this.pushScope(e.BREAKABLE),this.pos++,this.checkOpenParenthesis(),this.pos++,this.consumeNewLines();var n=this.parseExpressionOR();this.consumeNewLines(),this.checkCloseParenthesis(),this.pos++,this.consumeNewLines(),this.checkOpenCurly(),this.pos++,this.consumeNewLines();var r=this.parseCases();this.consumeNewLines(),this.checkCloseCurly(),this.pos++,this.consumeNewLines(),this.popScope();var i=new Re(n,r);return i.sourceInfo=ut.createSourceInfo(t),i}},{key:"parseRepeatUntil",value:function(){var t=this.getToken();this.pos++,this.consumeNewLines(),this.pushScope(e.BREAKABLE);var n=this.parseCommandBlock();this.consumeNewLines();var r=this.getToken();if(r.type!==this.ruleNames.RK_DO_UNTIL)throw ht.token_missing_one(this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_DO_UNTIL],r);this.pos++,this.checkOpenParenthesis(),this.pos++,this.consumeNewLines();var i=this.parseExpressionOR();this.consumeNewLines(),this.checkCloseParenthesis(),this.pos++,this.checkEOS(),this.popScope();var o=new Ee(i,n);return o.sourceInfo=ut.createSourceInfo(t),o}},{key:"parseIfThenElse",value:function(){this.insideScope(e.BREAKABLE)?this.pushScope(e.BREAKABLE):this.pushScope(e.COMMAND);var t=this.getToken();this.pos++,this.checkOpenParenthesis(),this.pos++,this.consumeNewLines();var n=this.parseExpressionOR();this.consumeNewLines(),this.checkCloseParenthesis(),this.pos++,this.consumeNewLines();var r=this.parseCommandBlock();if(this.getToken().type===this.ruleNames.RK_ELSE){this.pos++,this.consumeNewLines();var i=this.getToken(),o=null;if(this.checkOpenCurly(!0))o=this.parseCommandBlock();else{if(i.type!==this.ruleNames.RK_IF)throw ht.token_missing_list([this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_IF],"{"],i);o=this.parseIfThenElse()}this.popScope();var a=new be(n,r,o);return a.sourceInfo=ut.createSourceInfo(t),a}this.popScope();var s=new be(n,r,null);return s.sourceInfo=ut.createSourceInfo(t),s}},{key:"parseFor",value:function(){this.pushScope(e.BREAKABLE);var t=this.getToken();this.pos+=1;var n=this.getToken(),r=this.parseID(),i=new ot(r);i.sourceInfo=ut.createSourceInfo(n);var o=this.parseForParameters(this.ruleNames.RK_FOR_FROM),a=this.parseForParameters(this.ruleNames.RK_FOR_TO),s=this.parseForParameters(this.ruleNames.RK_FOR_PASS);this.consumeNewLines();var u=this.parseCommandBlock();this.popScope();var c=new ue(i,o,a,s,u);return c.sourceInfo=ut.createSourceInfo(t),c}},{key:"parseWhile",value:function(){this.pushScope(e.BREAKABLE);var t=this.getToken();this.pos++,this.checkOpenParenthesis(),this.pos++,this.consumeNewLines();var n=this.parseExpressionOR();this.consumeNewLines(),this.checkCloseParenthesis(),this.pos++,this.consumeNewLines();var r=this.parseCommandBlock();this.popScope();var i=new se(n,r);return i.sourceInfo=ut.createSourceInfo(t),i}},{key:"parseBreak",value:function(){var e=this.getToken();this.pos++,this.checkEOS(),this.pos++;var t=new te;return t.sourceInfo=ut.createSourceInfo(e),t}},{key:"parseReturn",value:function(){var e=this.getToken();this.pos++;var t=null;this.checkEOS(!0)||(t=this.parseExpressionOR(),this.checkEOS()),this.pos++;var n=new ne(t);return n.sourceInfo=ut.createSourceInfo(e),n}},{key:"parseIDCommand",value:function(){var e=this.getToken(),t=this.parseMaybeLibID(),n=-1===t.indexOf(".");if(this.checkOpenBrace(!0)){this.pos++;var r,i=null;this.consumeNewLines(),r=this.parseExpression(),this.consumeNewLines(),this.checkCloseBrace(),this.pos++,this.checkOpenBrace(!0)&&(this.pos++,this.consumeNewLines(),i=this.parseExpression(),this.consumeNewLines(),this.checkCloseBrace(),this.pos++);var o=this.getToken();if(o.type!==this.ruleNames.ASSIGNMENT)throw ht.token_missing_one("<-",o);this.pos++;var a=this.parseExpressionOR();this.checkEOS(),this.pos++;var s=new ie(t,r,i,a);return s.sourceInfo=ut.createSourceInfo(o),s}var u=this.getToken();if(n&&u.type===this.ruleNames.ASSIGNMENT){this.pos++;var c=this.parseExpressionOR();this.checkEOS(),this.pos++;var l=new re(t,c);return l.sourceInfo=ut.createSourceInfo(u),l}if(u.type===this.ruleNames.OPEN_PARENTHESIS){var f=this.parseFunctionCallCommand(t);return this.checkEOS(),this.pos++,f}throw n?ht.token_missing_list(["<-","("],u):ht.invalid_id_format(e)}},{key:"parseForParameters",value:function(e){if(e===this.ruleNames.RK_FOR_PASS&&this.checkOpenCurly(!0))return null;var t=this.getToken();if(t.type!==e){var n=this.ivprogLexer.getReservedKeys()[e];throw new Error("Error de sintaxe no comando repita_para: esperava-se "+n+" mas encontrou "+t.text)}this.pos+=1;var r=this.getToken(),i=!1,o=null;r.type===this.ruleNames.SUM_OP&&(i=!0,o=r.text,this.pos+=1,r=this.getToken());var a=null;if(r.type===this.ruleNames.ID?(a=new ot(this.parseID())).sourceInfo=ut.createSourceInfo(r):r.type===this.ruleNames.INTEGER&&(this.pos+=1,a=this.getIntLiteral(r)),null==a){var s=this.ivprogLexer.getReservedKeys()[e];throw new Error("Error de sintaxe no comando repeita_para: "+r.text+" não é compativel com o esperado para o paramentro "+s+". O valor deve ser um inteiro ou variável.")}return i&&(a=new st(lt(o),a)),a}},{key:"parseCases",value:function(){var e=this.getToken();if(e.type!==this.ruleNames.RK_CASE)throw ht.token_missing_one(this.ivprogLexer.getReservedKeys()[this.ruleNames.RK_CASE],e);if(this.pos++,this.getToken().type===this.ruleNames.RK_DEFAULT){this.pos++;var t=this.getToken();if(t.type!==this.ruleNames.COLON)throw ht.token_missing_one(":",t);this.pos++,this.consumeNewLines();var n=this.parseCommandBlock(!0),r=new ke(null);return r.sourceInfo=ut.createSourceInfo(e),r.setCommands(n.commands),[r]}var i=this.parseExpressionOR(),o=this.getToken();if(o.type!==this.ruleNames.COLON)throw ht.token_missing_one(":",o);this.pos++,this.consumeNewLines();var a=this.parseCommandBlock(!0),s=new ke(i);return s.sourceInfo=ut.createSourceInfo(e),s.setCommands(a.commands),this.getToken().type===this.ruleNames.RK_CASE?[s].concat(this.parseCases()):[s]}},{key:"parseExpressionOR",value:function(){for(var e=this.parseExpressionAND();this.getToken().type===this.ruleNames.RK_LOGICAL_OR;){var t=this.getToken();this.pos++;var n=lt("or");this.consumeNewLines();var r=this.parseExpressionAND(),i=new at(n,e,r);i.sourceInfo=ut.createSourceInfo(t),e=i}return e}},{key:"parseExpressionAND",value:function(){for(var e=this.parseExpressionNot();this.getToken().type===this.ruleNames.RK_LOGICAL_AND;){var t=this.getToken();this.pos++;var n=lt("and");this.consumeNewLines();var r=this.parseExpressionNot(),i=new at(n,e,r);i.sourceInfo=ut.createSourceInfo(t),e=i}return e}},{key:"parseExpressionNot",value:function(){if(this.getToken().type===this.ruleNames.RK_LOGICAL_NOT){var e=this.getToken();this.pos++;var t=lt("not"),n=this.parseExpressionRel(),r=new st(t,n);return r.sourceInfo=ut.createSourceInfo(e),r}return this.parseExpressionRel()}},{key:"parseExpressionRel",value:function(){for(var e=this.parseExpression();this.getToken().type===this.ruleNames.RELATIONAL_OPERATOR;){var t=this.getToken();this.pos++;var n=lt(t.text),r=this.parseExpression(),i=new at(n,e,r);i.sourceInfo=ut.createSourceInfo(t),e=i}return e}},{key:"parseExpression",value:function(){for(var e=this.parseFactor();this.getToken().type===this.ruleNames.SUM_OP;){var t=this.getToken();this.pos++;var n=lt(t.text),r=this.parseFactor(),i=new at(n,e,r);i.sourceInfo=ut.createSourceInfo(t),e=i}return e}},{key:"parseFactor",value:function(){for(var e=this.parseTerm();this.getToken().type===this.ruleNames.MULTI_OP;){var t=this.getToken();this.pos++;var n=lt(t.text),r=this.parseTerm(),i=new at(n,e,r);i.sourceInfo=ut.createSourceInfo(t),e=i}return e}},{key:"parseTerm",value:function(){var e=this.getToken(),t=null,n=null;switch(e.type){case this.ruleNames.SUM_OP:return this.pos++,t=ut.createSourceInfo(e),(n=new st(lt(e.text),this.parseTerm())).sourceInfo=t,n;case this.ruleNames.INTEGER:return this.pos++,this.getIntLiteral(e);case this.ruleNames.REAL:return this.pos++,this.getRealLiteral(e);case this.ruleNames.STRING:return this.pos++,this.getStringLiteral(e);case this.ruleNames.CHARACTER:return this.pos++,this.getCharLiteral(e);case this.ruleNames.RK_TRUE:case this.ruleNames.RK_FALSE:return this.pos++,this.getBoolLiteral(e);case this.ruleNames.OPEN_CURLY:throw ht.annonymous_array_literal(e);case this.ruleNames.ID:return this.parseIDTerm();case this.ruleNames.OPEN_PARENTHESIS:return this.parseParenthesisExp();default:throw ht.invalid_terminal(e)}}},{key:"parseIDTerm",value:function(){var e=this.getToken(),t=this.parseMaybeLibID(),n=-1===t.indexOf(".");if(n&&this.checkOpenBrace(!0)){var r=null;this.pos++;var i=this.parseExpression(),o=null;this.consumeNewLines(),this.checkCloseBrace(),r=this.getToken(),this.pos++,this.checkOpenBrace(!0)&&(this.pos++,o=this.parseExpression(),this.consumeNewLines(),this.checkCloseBrace(),r=this.getToken(),this.pos++);var a=ut.createSourceInfoFromList(e,r),s=new Qe(t,i,o);return s.sourceInfo=a,s}if(this.checkOpenParenthesis(!0))return this.parseFunctionCallExpression(t);if(n){var u=ut.createSourceInfo(e),c=new ot(t);return c.sourceInfo=u,c}throw ht.invalid_id_format(e)}},{key:"getFunctionName",value:function(e){var t=Rt.getInternalName(e);return null===t?e===Rt.getMainFunctionName()?null:e:t}},{key:"parseFunctionCallExpression",value:function(e){var t=-1===e.indexOf(".")?1:3,n=this.getToken(this.pos-t),r=this.parseActualParameters(),i=this.getToken(this.pos-1),o=this.getFunctionName(e),a=ut.createSourceInfoFromList(n,i),s=new Ie(o,r);return s.sourceInfo=a,s}},{key:"parseFunctionCallCommand",value:function(e){return this.parseFunctionCallExpression(e)}},{key:"parseParenthesisExp",value:function(){this.checkOpenParenthesis();var e=this.getToken();this.pos+=1,this.consumeNewLines();var t=this.parseExpressionOR();this.consumeNewLines(),this.checkCloseParenthesis();var n=this.getToken();return this.pos+=1,t.sourceInfo=ut.createSourceInfoFromList(e,n),t.parenthesis=!0,t}},{key:"parseActualParameters",value:function(){if(this.checkOpenParenthesis(),this.pos++,this.checkCloseParenthesis(!0))return this.pos++,[];this.consumeNewLines();var e=this.parseExpressionList();return this.consumeNewLines(),this.checkCloseParenthesis(),this.pos++,e}},{key:"parseExpressionList",value:function(){for(var e=[];;){var t=this.parseExpressionOR();if(e.push(t),this.getToken().type!==this.ruleNames.COMMA)break;this.pos++,this.consumeNewLines()}return e}},{key:"getTypeArray",value:function(){var t=this;return(this.insideScope(e.FUNCTION)?this.functionTypes:this.variableTypes).map((function(e){return t.lexer.literalNames[e]}))}}]),e}(),_t=n(319),vt=n.n(_t);function yt(e){return e.times(Ae.Decimal.acos(-1)).div(180)}var gt=Date.now();function xt(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===e)return n;return null}var bt,wt,Et={$mathLib:{$sin:(bt=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=r.get().mod(360),null,o=i.eq(90)?new Ae.Decimal(1):i.eq(180)?new Ae.Decimal(0):i.eq(270)?new Ae.Decimal(-1):Ae.Decimal.sin(yt(i)),a=new We(ge.REAL,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),wt=new we([],[new Te(bt)]),new xe("$sin",ge.REAL,[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],wt)),$cos:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=r.get().mod(360),o=null,i.eq(90)?o=new Ae.Decimal(0):i.eq(180)?o=new Ae.Decimal(-1):i.eq(270)&&(o=new Ae.Decimal(0)),o=Ae.Decimal.cos(yt(i)),a=new We(ge.REAL,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$cos",ge.REAL,[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],t)}(),$tan:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.applyStore("x"),!(i=r.get().mod(360)).eq(90)&&!i.eq(270)){e.next=4;break}throw Ye.undefined_tanget_value(r.get().toNumber(),this.function_call_stack.pop());case 4:return o=Ae.Decimal.tan(yt(i)),a=new We(ge.REAL,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$tan",ge.REAL,[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],t)}(),$sqrt:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.applyStore("x")).get().isNeg()){e.next=3;break}return e.abrupt("return",Promise.reject(Ye.negative_sqrt_value(this.function_call_stack.pop())));case 3:return i=r.get().sqrt(),o=new We(ge.REAL,i),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$sqrt",ge.REAL,[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],t)}(),$pow:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=t.applyStore("y"),o=r.get().pow(i.get()),a=new We(ge.REAL,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$pow",ge.REAL,[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1),new Ne(new le([ge.INTEGER,ge.REAL]),"y",!1)],t)}(),$log:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.applyStore("x")).get().isNegative()){e.next=3;break}return e.abrupt("return",Promise.reject(Ye.negative_log_value(this.function_call_stack.pop())));case 3:return i=Ae.Decimal.log10(r.get()),o=new We(ge.REAL,i),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$log",ge.REAL,[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],t)}(),$abs:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=r.get().abs(),o=new We(r.type,i),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$abs",new le([ge.INTEGER,ge.REAL]),[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],t)}(),$negate:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=r.get().negated(),o=new We(r.type,i),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$negate",new le([ge.INTEGER,ge.REAL]),[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],t)}(),$invert:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=Ge(1).dividedBy(r.get()),o=new We(ge.REAL,i),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$invert",ge.REAL,[new Ne(new le([ge.INTEGER,ge.REAL]),"x",!1)],t)}(),$max:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=r.get().map((function(e){return e.get()})),o=Ae.Decimal.max.apply(Ae.Decimal,vt()(i)),a=new We(r.type.innerType,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new Ze(new le([ge.INTEGER,ge.REAL]),1),n=new we([],[new Te(e)]);return new xe("$max",new le([ge.INTEGER,ge.REAL]),[new Ne(t,"x",!1)],n)}(),$min:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("x"),i=r.get().map((function(e){return e.get()})),o=Ae.Decimal.min.apply(Ae.Decimal,vt()(i)),a=new We(r.type.innerType,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new Ze(new le([ge.INTEGER,ge.REAL]),1),n=new we([],[new Te(e)]);return new xe("$min",new le([ge.INTEGER,ge.REAL]),[new Ne(t,"x",!1)],n)}(),$rand:function(){var e=2147483647,t=function(){var t=X()(Q().mark((function t(n,r){var i,o;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=(gt=(16807*gt+12345)%e)/(e-1),o=new We(ge.REAL,new Ae.Decimal(i)),n.insertStore("$",o),n.mode=Se.RETURN,t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),n=new we([],[new Te(t)]);return new xe("$rand",ge.REAL,[],n)}()},$ioLib:{$read:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c,l,f;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.input.requestInput();case 2:if(r=e.sent,i=t.applyStore("p1").type,o=null,a=null,e.prev=6,!i.isCompatible(ge.INTEGER)){e.next=12;break}a=Le(r.trim()).trunc(),o=ge.INTEGER,e.next=33;break;case 12:if(!i.isCompatible(ge.REAL)){e.next=17;break}a=Ge(r.trim()),o=ge.REAL,e.next=33;break;case 17:if(!i.isCompatible(ge.BOOLEAN)){e.next=22;break}a=Fe(r.trim()),o=ge.BOOLEAN,e.next=33;break;case 22:if(!i.isCompatible(ge.STRING)){e.next=27;break}a=Oe(r),o=ge.STRING,e.next=33;break;case 27:if(!i.isCompatible(ge.CHAR)){e.next=32;break}a=De(r),o=ge.CHAR,e.next=33;break;case 32:throw new Error("!!!!Critical error: Unknown type in readFunction!!!!");case 33:e.next=47;break;case 35:if(e.prev=35,e.t0=e.catch(6),this.mode!=Se.ABORT){e.next=40;break}return t.mode=Se.RETURN,e.abrupt("return",t);case 40:if(s=i.stringInfo()[0],!((u=t.getStoreObject("p1")).getReferenceDimension()>0)){e.next=46;break}throw c=u.type.stringInfo()[0],l=u.getReferenceDimension(),Ye.invalid_read_type_array(r,s.type,s.dim,u.getRefObj(),c.type,l,this.function_call_stack.pop());case 46:throw Ye.invalid_read_type(r,s.type,s.dim,u.getRefObj(),this.function_call_stack.pop());case 47:return f=new We(o,a),t.updateStore("p1",f),t.mode=Se.RETURN,e.abrupt("return",t);case 51:case"end":return e.stop()}}),e,this,[[6,35]])})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$read",ge.VOID,[new Ne(ge.ALL,"p1",!0)],t)}(),$write:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=t.applyStore("p1.0"),i=r.get(),o=1;o=r.get().length)){e.next=4;break}throw Ye.invalid_string_index(i.get().toNumber(),r.get(),this.function_call_stack.pop());case 4:return o=new We(ge.CHAR,r.get().charAt(i.get().toNumber())),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$charAt",ge.CHAR,[new Ne(ge.STRING,"str",!1),new Ne(ge.INTEGER,"index",!1)],t)}()},$arrayLib:{$numElements:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("vector"),i=new We(ge.INTEGER,Le(r.lines)),t.mode=Se.RETURN,t.insertStore("$",i),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$numElements",ge.INTEGER,[new Ne(new Ze(ge.ALL,1),"vector",!1)],t)}(),$matrixLines:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("matrix"),i=new We(ge.INTEGER,Le(r.lines)),t.mode=Se.RETURN,t.insertStore("$",i),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$matrixLines",ge.INTEGER,[new Ne(new Ze(ge.ALL,2),"matrix",!1)],t)}(),$matrixColumns:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("matrix"),i=new We(ge.INTEGER,Le(r.columns)),t.mode=Se.RETURN,t.insertStore("$",i),e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$matrixColumns",ge.INTEGER,[new Ne(new Ze(ge.ALL,2),"matrix",!1)],t)}()},$langLib:{$isReal:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.applyStore("str"),i=mt.createParser(r.get()),o=!1;try{i.parseTerm()instanceof et&&(o=!0)}catch(e){}return a=new We(ge.BOOLEAN,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$isReal",ge.BOOLEAN,[new Ne(ge.STRING,"str",!1)],t)}(),$isInt:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.applyStore("str"),i=mt.createParser(r.get()),o=!1;try{i.parseTerm()instanceof Xe&&(o=!0)}catch(e){}return a=new We(ge.BOOLEAN,o),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$isInt",ge.BOOLEAN,[new Ne(ge.STRING,"str",!1)],t)}(),$isBool:function(){var e=new we([],[new Te((function(e,t){var n=e.applyStore("str"),r=mt.createParser(n.get()),i=!1;try{r.parseTerm()instanceof tt&&(i=!0)}catch(e){}var o=new We(ge.BOOLEAN,i);return e.insertStore("$",o),e.mode=Se.RETURN,e}))]);return new xe("$isBool",ge.BOOLEAN,[new Ne(ge.STRING,"str",!1)],e)}(),$castReal:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c,l;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.applyStore("val"),i=r.get(),e.t0=r.type.ord,e.next=e.t0===ge.INTEGER.ord?5:e.t0===ge.STRING.ord?10:22;break;case 5:return i=i.toNumber(),o=new We(ge.REAL,Ge(i)),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 10:if(a=mt.createParser(i),e.prev=11,!((s=a.parseTerm())instanceof et)){e.next=18;break}return u=new We(ge.REAL,Ge(s.value)),t.insertStore("$",u),t.mode=Se.RETURN,e.abrupt("return",t);case 18:e.next=22;break;case 20:e.prev=20,e.t1=e.catch(11);case 22:throw c=ge.REAL.stringInfo(),l=c[0],Ye.invalid_type_conversion(i,l.type,l.dim);case 25:case"end":return e.stop()}}),e,null,[[11,20]])})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$castReal",ge.REAL,[new Ne(new le([ge.INTEGER,ge.STRING]),"val",!1)],t)}(),$castInt:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c,l,f;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.applyStore("val"),i=r.get(),e.t0=r.type.ord,e.next=e.t0===ge.REAL.ord?5:e.t0===ge.CHAR.ord?10:e.t0===ge.STRING.ord?14:26;break;case 5:return i=i.toNumber(),o=new We(ge.INTEGER,Le(Math.floor(i))),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 10:return a=new We(ge.INTEGER,Le(i.charCodeAt(0))),t.insertStore("$",a),t.mode=Se.RETURN,e.abrupt("return",t);case 14:if(s=mt.createParser(i),e.prev=15,!((u=s.parseTerm())instanceof Xe)){e.next=22;break}return c=new We(ge.INTEGER,Le(u.value)),t.insertStore("$",c),t.mode=Se.RETURN,e.abrupt("return",t);case 22:e.next=26;break;case 24:e.prev=24,e.t1=e.catch(15);case 26:throw l=ge.INTEGER.stringInfo(),f=l[0],Ye.invalid_type_conversion(i,f.type,f.dim);case 29:case"end":return e.stop()}}),e,null,[[15,24]])})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$castInt",ge.INTEGER,[new Ne(new le([ge.REAL,ge.STRING,ge.CHAR]),"val",!1)],t)}(),$castBool:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.applyStore("str"),i=r.get(),o=mt.createParser(i),e.prev=3,!((a=o.parseTerm())instanceof tt)){e.next=10;break}return s=new We(ge.BOOLEAN,a.value),t.insertStore("$",s),t.mode=Se.RETURN,e.abrupt("return",t);case 10:e.next=14;break;case 12:e.prev=12,e.t0=e.catch(3);case 14:throw u=ge.BOOLEAN.stringInfo(),c=u[0],Ye.invalid_type_conversion(i,c.type,c.dim);case 17:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$castBool",ge.BOOLEAN,[new Ne(ge.STRING,"str",!1)],t)}(),$castString:function(){var e=function(){var e=X()(Q().mark((function e(t,n){var r,i,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore("str"),i=Me(r.get(),r.type),o=new We(ge.STRING,i),t.insertStore("$",o),t.mode=Se.RETURN,e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),t=new we([],[new Te(e)]);return new xe("$castString",ge.STRING,[new Ne(ge.ALL,"str",!1)],t)}(),$castChar:function(){var e=new we([],[new Te((function(e,t){var n=255&e.applyStore("charCode").get().toNumber(),r=String.fromCharCode(n),i=new We(ge.CHAR,r);return e.insertStore("$",i),e.mode=Se.RETURN,e}))]);return new xe("$castChar",ge.CHAR,[new Ne(ge.INTEGER,"charCode",!1)],e)}()}},$t=function(){for(var e={},t=0;t2&&void 0!==arguments[2]&&arguments[2];return i()(this,o),r.call(this,e,t,n)}return a()(o,[{key:"translateType",value:function(e,t){var n=this.getUI("type_".concat(e));return 0===t?n:t>1?this.getUI("matrix_info_string",[n]):this.getUI("vector_info_string",[n])}},{key:"translateOp",value:function(e){switch(e.ord){case ct.AND.ord:case ct.OR.ord:case ct.NOT.ord:return this.getUI("logic_operator_".concat(e.value));default:return e.value}}},{key:"translateInternalFunction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null==t?Rt.getLocalName(e):Rt.getLocalName("".concat(t,".").concat(e))}}]),o}(d.LocalizedStrings),Tt=Object.freeze(new kt(W,k)),Nt=new kt(W,k);function It(){return Nt}var St=d.StringTypes,At=Object.freeze({i18n:function(e){var t=e.split(":"),n=t[0].toLowerCase(),r=t[1];return St.ERROR===n?Tt.getError(r):St.MESSAGE===n?Tt.getMessage(r):St.UI===n?Tt.getUI(r):(console.warn("A string has been passed to the i18n helper function that was not in the form type:id -> "+e),Tt.getString(e,n))}});function Ct(e,t){if(0==e.length)return t.length;if(0==t.length)return e.length;var n,r,i=[];for(n=0;n<=t.length;n++)i[n]=[n];for(r=0;r<=e.length;r++)i[0][r]=r;for(n=1;n<=t.length;n++)for(r=1;r<=e.length;r++)t.charCodeAt(n-1)==e.charCodeAt(r-1)?i[n][r]=i[n-1][r-1]:i[n][r]=Math.min(i[n-1][r-1]+1,Math.min(i[n][r-1]+1,i[n-1][r]+1));return i[t.length][e.length]}var Lt=null;function Ot(e){e.preventDefault();var t=e.currentTarget.dataset.page;null!=Lt&&Lt.close(),(Lt=window.open("","DetailWindow","width=550,height=600")).document.open(),Lt.document.write(t),Lt.document.close()}function Dt(e){return Gt.apply(this,arguments)}function Gt(){return(Gt=X()(Q().mark((function e(t){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){return setTimeout(e,t)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ft(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0})).map((function(e){return e.split(",")})).map((function(e){var n={};return e.forEach((function(e,r){return n[t[r]]=e})),n})),l=c.reduce(r,new Map),f=function(){var e=X()(Q().mark((function e(t){var n,r,i;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(s).concat(t.file),r=o.find((function(e){return e.webkitRelativePath==n})),e.next=4,r.text();case 4:return i=e.sent,e.abrupt("return",i);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),p={},d=0,l.forEach((function(e,t){var r=[];e.forEach(function(){var e=X()(Q().mark((function e(i,o){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=i.sort((function(e,t){return parseInt(e.timestamp)-parseInt(t.timestamp)})),d++,i.forEach(function(){var e=X()(Q().mark((function e(i,a,s){var u,c,l,p,h,m,_,v,y,g;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d++,(u={}).grade=Math.max(0,parseFloat(i.grade)),u.timestamp=parseInt(i.timestamp),u.student_id=o,u.TES=0,u.DES=0,u["D/T"]=0,c="",!(a>0)){e.next=19;break}return u.TES=parseInt(i.timestamp)-parseInt(s[a-1].timestamp),e.next=13,f(s[a-1]);case 13:if(l=e.sent,1!=(p=window.ivprogCore.prepareActivityToStudentHelper(l).getOrElse(1))){e.next=18;break}return console.error("A submission from ".concat(o," to ").concat(t," is invalid")),e.abrupt("return");case 18:c=n(p.algorithmInIlm);case 19:return e.next=21,f(i);case 21:if(h=e.sent,2!=(m=window.ivprogCore.prepareActivityToStudentHelper(h).getOrElse(2))){e.next=26;break}return console.error("A submission from ".concat(o," to ").concat(t," is invalid")),e.abrupt("return");case 26:_=n(m.algorithmInIlm),""===c&&(v=JSON.parse(h.split("::logs::")[1]),null==(y=v[0])?u.TES=0:4===y.length?u.TES=parseInt(i.timestamp)-Math.floor(parseInt(y[2])/1e3):u.TES=parseInt(i.timestamp)-Math.floor(parseInt(y[1])/1e3)),u.DES=window.ivprogCore.levenshteinDistance(c,_),g=0===u.TES?0:u.DES/u.TES,u["D/T"]=isNaN(g)?0:g,r.push(u),d--;case 33:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()),d--;case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),p[t]=r})),_=setInterval((function(){if(0==d)for(var e in clearInterval(_),p){var t="",n="student_id,";n+=m(e);var r,i=Ft(p[e]);try{for(i.s();!(r=i.n()).done;){var o=r.value;t+="".concat(o.student_id,","),t+="".concat(o.TES,","),t+="".concat(o.DES,","),t+="".concat(o.grade,","),t+="".concat(o["D/T"],","),t+="".concat(o.timestamp),t+="\n"}}catch(e){i.e(e)}finally{i.f()}h("".concat(e,".csv"),"".concat(n,"\n").concat(t))}}),1e3);case 15:case"end":return i.stop()}}),i)}))))}var Bt="var",Ut="const",Kt="relational",zt="logic",Vt="arithmetic";function qt(e,t){switch(e){case Vt:case Kt:return t.value;case zt:return 11===t.ord?"and":12===t.ord?"or":"not"}}function jt(e){switch(e.ord){case 0:case 1:case 2:case 3:case 4:return Vt;case 5:case 6:case 7:case 8:case 9:case 10:return Kt;default:return zt}}function Ht(e){var t=e.commands.map(Wt),n=e.isDefault?null:en(e.expression);return{type:"switchcase",line:e.sourceInfo.line,expression:n,commands:t}}function Yt(e){var t=en(e.condition),n=e.ifTrue.commands.map(Wt),r=[];return e.ifFalse&&(r=e.ifFalse instanceof we?e.ifFalse.commands.map(Wt):[Yt(e.ifFalse)]),{type:"iftrue",expression:t,ifTrue:n,ifFalse:r}}function Wt(e){var t,n,r,i,o,a=null;if(e instanceof Ie)a=function(e){var t=e.id;-1!==t.indexOf(".")&&(t=t.split(".")[1]);var n=e.actualParameters.map(en);if("$write"===t){var r=n[n.length-1][0],i=r.value&&null!==r.value.match(/^\n$/);return{type:"writer",newLine:i,content:i?n.slice(0,n.length-1):n}}return"$read"===t?{type:"reader",variable:n[0]}:{type:"functioncall",parameters_list:n,name:e.id}}(e);else if(e instanceof re)a=function(e){var t=null;if(e instanceof ie){var n=en(e.line),r="vector",i=null;e.column&&(r="matrix",i=en(e.column)),t=[{instance:"expression",type:Bt,class:r,column:i,line:n,value:e.id}]}else t=[{instance:"expression",type:Bt,value:e.id}];return{type:"attribution",variable:t,expression:en(e.expression)}}(e);else if(e instanceof be)a=Yt(e);else if(e instanceof se)i=en((r=e).expression),o=r.commands.map(Wt),a={type:r.testFirst?"whiletrue":"dowhiletrue",expression:i,commands:o};else if(e instanceof te)a={type:"break"};else if(e instanceof ne)a={type:"return",expression:en(e.expression)};else if(e instanceof Re)a={type:"switch",expression:en((n=e).expression),cases:n.cases.map(Ht)};else{if(!(e instanceof ue))throw new Error("not implemented");a={type:"repeatNtimes",var_attribution:en((t=e).for_id),var_initial:en(t.for_from),condition:en(t.for_to),step_expression:t.for_pass?en(t.for_pass):[],commands:t.commands.map(Wt)}}return a.line=e.sourceInfo.line,a}function Zt(e){var t={name:e.name,line:e.sourceInfo.line,return_type:"",return_dimensions:0,parameters_list:[],variables_list:[],commands:[]};return e.returnType instanceof Ze?(t.return_type=e.returnType.innerType.value,t.return_dimensions=e.returnType.dimensions):t.return_type=e.returnType.value,t.parameters_list=e.formalParameters.map(Qt),t.variables_list=e.variablesDeclarations.map(Jt),t.commands=e.commands.map(Wt),t}function Qt(e){var t={name:e.id,line:e.sourceInfo.line,type:"",rows:0,columns:0,dimension:0,value:0,is_const:!1,reference:e.byRef};return e.type instanceof Ze?(t.type=e.type.innerType.value,t.dimension=e.type.dimensions):t.type=e.type.value,t}function Jt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={name:e.id,line:e.sourceInfo.line,type:"",rows:0,columns:0,dimension:0,value:0,is_const:!1};if(n.is_const=t&&e.isConst,e instanceof ae){var r=en(e.lines).pop();if(n.type=e.type.innerType.value,e.isVector){n.columns=r.value,n.dimension=1;var i=e.initial.value.map((function(e){return Xt(e)}));n.value=i}else{var o=en(e.columns).pop();n.dimension=2,n.rows=r.value,n.columns=o.value;var a=e.initial.value.map((function(e){return e.value.map((function(e){return Xt(e)}))}));n.value=a}}else n.type=e.type.value,n.value=Xt(e.initial);return n}function Xt(e){if(e instanceof st){var t=Xt(e.left);if(jt(e.op)!==Vt)throw new Error("invalid variable initial value: "+e.toString());return"".concat(e.op.value).concat(t)}if(e instanceof tt)return Pe(e.value);if(e instanceof Je){var n=e.value;return e.value.toNumber&&(n=ge.REAL.isCompatible(e.type)&&0==e.value.decimalPlaces()?Number(e.value.toFixed(2)):e.value.toNumber()),n}throw new Error("invalid variable initial value: "+e.toString())}function en(e){var t;if(e instanceof ot)t=[{instance:"expression",type:Bt,value:e.id}];else if(e instanceof Ie){var n={instance:"expression",type:"function",value:e.id},r=e.actualParameters.map((function(e){return en(e)}));n.params=r,t=[n]}else if(e instanceof st){var i=en(e.left),o=jt(e.op);t=[{instance:"operator",type:o,value:qt(o,e.op)}].concat(vt()(i))}else if(e instanceof at){var a=en(e.left),s=en(e.right),u=jt(e.op),c=qt(u,e.op);t=[].concat(vt()(a),[{instance:"operator",type:u,value:c}],vt()(s))}else if(e instanceof Qe){var l=en(e.line),f="vector",p=null;e.column&&(f="matrix",p=en(e.column)),t=[{instance:"expression",type:Bt,class:f,column:p,line:l,value:e.id}]}else if(e instanceof tt){var d=e.value;t=[{instance:"expression",class:"simple",type:Ut,value:Pe(d)}]}else{var h=e.value;e.value.toNumber&&(h=ge.REAL.isCompatible(e.type)&&0==e.value.decimalPlaces()?Number(e.value.toFixed(2)):e.value.toNumber()),t=[{instance:"expression",class:"simple",type:Ut,value:h}]}return e.parenthesis?["("].concat(vt()(t),[")"]):t}function tn(e){return en(mt.createParser(e).parseExpressionOR())}function nn(e){for(var t=mt.createParser(e,!1),n=new Map,r=[],i=0,o=Array.from(t.lexer.reset(e));i=5&&e.ord<=10)return ge.BOOLEAN}return ge.UNDEFINED}return s}catch(e){if(e instanceof TypeError)return ge.UNDEFINED;throw e}}function hn(e,t){try{if(t instanceof le){for(var n=[],r=0;ri.id?t=r:n=r}}},{key:"getAddressAt",value:function(e){return this.data[e]}},{key:"findIndex",value:function(e){for(var t=0,n=this.data.length;ti.id?t=r:n=r}return-1}},{key:"updateAddress",value:function(e,t){var n=this.findIndex(e);if(-1===n)throw new Error("Invalid address..."+e);this.data[n].value=t}},{key:"clear",value:function(){for(var e=0;e2&&void 0!==arguments[2]&&arguments[2];i()(this,e),u()(this,"_type",void 0),u()(this,"_loc_address",void 0),u()(this,"_readOnly",void 0),u()(this,"_id",void 0),this._loc_address=n,this._type=t,this._readOnly=r,this._id=void 0}return a()(e,[{key:"setID",value:function(e){this._id=e}},{key:"isCompatible",value:function(e){return this.type.isCompatible(e.type)}},{key:"destroy",value:function(){return vn.deallocate(this._loc_address)}},{key:"id",get:function(){return this._id}},{key:"inStore",get:function(){return null!==this.id}},{key:"type",get:function(){return this._type}},{key:"value",get:function(){var e=vn.find(this._loc_address);if(null!=e)return e.value;throw new Error("!!!Critical Error: variable "+this.id+" does not have a valid address. Loc-Address "+this.locAddress)}},{key:"number",get:function(){throw new Error("DOT NOT USE THIS PROPERTY!")}},{key:"readOnly",get:function(){return this._readOnly},set:function(e){this._readOnly=e}},{key:"locAddress",get:function(){return this._loc_address}}]),e}();var gn=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),t=r.call(this,e.type,e.getRefAddress(),!1),u()(Ue()(t),"refObj",void 0),u()(Ue()(t),"reference_dimension",void 0),t.refObj=e.id,t.reference_dimension=e.getReferenceDimension(),t}return a()(o,[{key:"getRefObj",value:function(){return this.refObj}},{key:"getReferenceDimension",value:function(){return this.reference_dimension}},{key:"destroy",value:function(){return!1}},{key:"isRef",get:function(){return!0}}]),o}(yn);var xn=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e,t,n,a,s){var u,c=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return i()(this,o),(u=r.call(this,e,t,s,c)).line=n,u.column=a,u}return o}(We),bn=function(){function e(t,n,r,o,a){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];i()(this,e),u()(this,"type",void 0),u()(this,"id",void 0),u()(this,"isConst",void 0),u()(this,"lines",void 0),u()(this,"columns",void 0),u()(this,"values",void 0),this.type=t,this.id=a,this.isConst=s,this.values=n,this.lines=r,this.columns=o}return a()(e,[{key:"get",value:function(){return this.values}},{key:"getAt",value:function(t,n){if(console.log("Column ",n),this.isVector()){if(null!=n)throw new Error(this.id+" is not a matrix!");n=t,t=0}else if(null==n){for(var r=[],i=0;i4&&void 0!==arguments[4]&&arguments[4];return i()(this,o),(s=r.call(this,e,-1,u))._lines=t,s._columns=n,s.loc_addresses=a,s}return a()(o,[{key:"isCompatible",value:function(e){if(e instanceof bn){var t=null==e.columns?0:e.columns;if(this.lines===e.lines&&this.columns===t)return En()(g()(o.prototype),"isCompatible",this).call(this,e)}return!1}},{key:"destroy",value:function(){for(var e=!0,t=0;t=r.columns&&(a=0,o+=1),new xn(i.innerType,e,o,a++,r.id,r.readOnly))}));n=new bn(i,s,r.lines,r.columns,t.id,t.readOnly)}else n=new We(t.type,t.value,t.id,t.readOnly);return n}},{key:"updateStore",value:function(e,t){if(this.store.has(e)){var n=this.store.get(e);if(n.readOnly)throw new Error("Cannot change value of a read only variable: "+e);if(n instanceof $n){var r=t;if(n.isCompatible(r)){if(n.isVector)r.get().forEach((function(e,t){n.setAt(e,t,void 0)}));else{var i=0,o=0;r.get().forEach((function(e){n.setAt(e,i,o),(o+=1)>=n.columns&&(i+=1,o=0)}))}return this}}else if(n.isCompatible(t)){var a=n.locAddress;return vn.updateAddress(a,t.get()),this}var s=n.type,u=t.type;throw new Error("".concat(s.value," is not compatible with type ").concat(u.value," given"))}if(null!=this.nextStore)return this.nextStore.updateStore(e,t),this;throw new Error("Variable ".concat(e," not found."))}},{key:"updateStoreArray",value:function(e,t,n,r){if(this.store.has(e)){var i=this.store.get(e);if(i.readOnly)throw new Error("Cannot change value of a read only variable: "+e);if(!(i instanceof $n))throw new Error("Cannot update a non-array variable using updateStoreArray");if(t instanceof bn){var o=t.get();if(i.isVector&&t.isVector())for(var a=0;a0)for(var a=0;a1?t.insertSymbol(e.id,{id:e.id,lines:-1,columns:-1,type:e.type}):t.insertSymbol(e.id,{id:e.id,lines:-1,columns:null,type:e.type}):t.insertSymbol(e.id,{id:e.id,type:e.type})})),this.assertDeclarations(e.variablesDeclarations);var n=e.returnType.isCompatible(ge.VOID);if(!this.assertReturn(e,n))throw Ye.function_no_return(e.name);this.popMap()}},{key:"assertReturn",value:function(e,t){var n=this;return e.commands.reduce((function(r,i){return n.checkCommand(e.returnType,i,t)||r}),t)}},{key:"checkCommand",value:function(e,t,n){if(t instanceof se){if(!this.evaluateExpressionType(t.expression).isCompatible(ge.BOOLEAN))throw Ye.loop_condition_type_full(t.expression.toString(),t.sourceInfo);return this.checkCommands(e,t.commands,n),!1}if(t instanceof ue){if(!this.evaluateExpressionType(t.for_id).isCompatible(ge.INTEGER))throw Ye.invalid_for_variable(t.for_id,t.sourceInfo);if(!this.evaluateExpressionType(t.for_from).isCompatible(ge.INTEGER))throw Ye.invalid_for_from(t.for_from,t.sourceInfo);if(!this.evaluateExpressionType(t.for_to).isCompatible(ge.INTEGER))throw Ye.invalid_for_to(t.for_to,t.sourceInfo);if(null!=t.for_pass&&!this.evaluateExpressionType(t.for_pass).isCompatible(ge.INTEGER))throw Ye.invalid_for_pass(t.for_pass,t.sourceInfo);return this.checkCommands(e,t.commands,n),!1}if(t instanceof Re){for(var r=this.evaluateExpressionType(t.expression),i=n,o=!1,a=0;at.length||n.length!==t.length&&!e.hasVariadic())throw Ye.invalid_parameters_size_full(e.name,t.length,e.formalParameters.length,null);for(var r=0,i=0;rr.length)){t.next=4;break}throw Ye.invalid_parameters_size(a,n.length,r.length);case 4:u=0,c=0;case 5:if(!(u5&&void 0!==b[5]?b[5]:0,e.next=3,this.evaluateExpression(i,r);case 3:if(s=e.sent,u=!1,n.type.isCompatible(s.type)){e.next=11;break}if(!l.enable_type_casting||n.byRef||!Nn.canImplicitTypeCast(n.type,s.type)){e.next=10;break}u=!0,e.next=11;break;case 10:throw Ye.invalid_parameter_type(t,r.toString());case 11:if(!n.byRef||s.inStore()){e.next=13;break}throw Ye.invalid_ref(t,r.toString());case 13:return n.byRef?(c=i.getStoreObject(s.id),f=null,s instanceof bn?(p=s.get(),d=s.type,h=p.map((function(e){return c.getLocAddressOf(e.line,e.column)})),m=s.isVector()?0:s.columns,f=new kn(d,p,h,s.lines,m,c.id)):s instanceof xn?(_=s.line,v=s.column,(f=new Rn(s.type,s.get(),c.getLocAddressOf(_,v),c.id)).setReferenceDimension(c.type.dimensions)):f=new Rn(s.type,s.get(),c.locAddress,c.id),y=n.id,n.variadic&&(y="".concat(y,".").concat(a)),o.insertStore(y,f)):(g=s,u&&(g=Nn.doImplicitCasting(n.type,g)),x=n.id,n.variadic&&(x="".concat(x,".").concat(a)),o.insertStore(x,g)),e.abrupt("return",o);case 15:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r,i){return S.apply(this,arguments)})},{key:"executeCommands",value:(I=X()(Q().mark((function e(t,n){var r,i;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t,i=0;case 2:if(!(i=l.max_instruction_count)){e.next=8;break}throw Ye.exceed_max_instructions();case 8:if(!this.forceKill){e.next=12;break}throw"FORCED_KILL!";case 12:if(t.mode!==Se.PAUSE){e.next=16;break}return e.abrupt("return",this.executeCommand(t,n));case 16:if(t.mode!==Se.RETURN){e.next=20;break}return e.abrupt("return",t);case 20:if(!this.checkContext(Sn.BREAKABLE)||t.mode!==Se.BREAK){e.next=24;break}return e.abrupt("return",t);case 24:if(this.mode!==Se.ABORT){e.next=26;break}throw Tt.getMessage("aborted_execution");case 26:if(!(n instanceof oe)){e.next=30;break}return e.abrupt("return",this.executeDeclaration(t,n));case 30:if(!(n instanceof ie)){e.next=34;break}return e.abrupt("return",this.executeArrayIndexAssign(t,n));case 34:if(!(n instanceof re)){e.next=38;break}return e.abrupt("return",this.executeAssign(t,n));case 38:if(!(n instanceof te)){e.next=42;break}return e.abrupt("return",this.executeBreak(t,n));case 42:if(!(n instanceof ne)){e.next=46;break}return e.abrupt("return",this.executeReturn(t,n));case 46:if(!(n instanceof be)){e.next=50;break}return e.abrupt("return",this.executeIfThenElse(t,n));case 50:if(!(n instanceof Ee)){e.next=54;break}return e.abrupt("return",this.executeRepeatUntil(t,n));case 54:if(!(n instanceof se)){e.next=58;break}return e.abrupt("return",this.executeWhile(t,n));case 58:if(!(n instanceof ue)){e.next=62;break}return e.abrupt("return",this.executeFor(t,n));case 62:if(!(n instanceof Re)){e.next=66;break}return e.abrupt("return",this.executeSwitch(t,n));case 66:if(!(n instanceof Ie)){e.next=70;break}return e.abrupt("return",this.executeFunctionCall(t,n));case 70:if(!(n instanceof Te)){e.next=74;break}return e.abrupt("return",this.executeSysCall(t,n));case 74:throw Ye.unknown_command(n.sourceInfo);case 75:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"executeSysCall",value:(k=X()(Q().mark((function e(t,n){var r;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.langFunc.bind(this),e.abrupt("return",r(t,n));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"executeFunctionCall",value:(R=X()(Q().mark((function t(n,r){var i,o,a;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=null,i=r.isMainCall?this.findMainFunction():this.findFunction(r.id),this.function_call_stack.push(r.sourceInfo),t.next=5,this.runFunction(i,r.actualParameters,n);case 5:if((o=t.sent).destroy(),ge.VOID.isCompatible(i.returnType)||o.mode===Se.RETURN){t.next=12;break}throw a=i.name===e.MAIN_INTERNAL_ID?Rt.getMainFunctionName():i.name,Ye.function_no_return(a);case 12:return this.function_call_stack.pop(),t.abrupt("return",n);case 14:case"end":return t.stop()}}),t,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"executeSwitch",value:($=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.context.push(Sn.BREAKABLE),r=n.cases,i=t,o=!1,a=0;case 5:if(!(a=r.lines)){e.next=34;break}if(!r.isVector){e.next=31;break}throw Ye.vector_line_outbounds_full(n.id,a,r.lines,n.sourceInfo);case 31:throw Ye.matrix_line_outbounds_full(n.id,a,r.lines,n.sourceInfo);case 32:e.next=36;break;case 34:if(!(a<0)){e.next=36;break}throw Ye.array_dimension_not_positive_full(n.sourceInfo);case 36:if(null==u||0!==r.columns){e.next=38;break}throw Ye.vector_not_matrix_full(n.id,n.sourceInfo);case 38:if(null==u){e.next=45;break}if(!(u>=r.columns)){e.next=43;break}throw Ye.matrix_column_outbounds_full(n.id,u,r.columns,n.sourceInfo);case 43:if(!(u<0)){e.next=45;break}throw Ye.array_dimension_not_positive_full(n.sourceInfo);case 45:if(r.type.canAccept(c.type,i)){e.next=55;break}if(l.enable_type_casting&&Nn.canImplicitTypeCast(r.type.innerType,c.type)){e.next=54;break}throw p=r.type.innerType,d=p.stringInfo(),h=d[0],m=c.type.stringInfo(),_=m[0],v=n.expression.toString(),Ye.incompatible_types_full(h.type,h.dim,_.type,_.dim,v,n.sourceInfo);case 54:f=Nn.doImplicitCasting(r.type.innerType,c);case 55:if(!((y=r.getAt(a,u))instanceof bn)){e.next=60;break}if(y.lines===f.lines&&y.columns===f.columns){e.next=60;break}throw g=n.expression.toString(),Ye.invalid_matrix_index_assign_full(n.id,a,y.lines,g,f.lines,n.sourceInfo);case 60:return e.abrupt("return",t.updateStoreArray(n.id,f,a,u));case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"executeDeclaration",value:(m=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c,f;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n instanceof ae)){e.next=4;break}return e.abrupt("return",this.executeArrayDeclaration(t,n));case 4:if(r=new We(n.type,null,null,n.isConst),null===n.initial){e.next=22;break}return e.next=8,this.evaluateExpression(t,n.initial);case 8:if(i=e.sent,o=i,i.type.isCompatible(n.type)){e.next=21;break}if(!l.enable_type_casting||!Nn.canImplicitTypeCast(n.type,i.type)){e.next=15;break}o=Nn.doImplicitCasting(n.type,o),e.next=21;break;case 15:throw a=i.type.stringInfo(),s=a[0],u=i.type.stringInfo(),c=u[0],f=n.expression.toString(),Ye.incompatible_types_full(s.type,s.dim,c.type,c.dim,f,n.sourceInfo);case 21:r=new We(n.type,o.get(),null,n.isConst);case 22:return t.insertStore(n.id,r),e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"executeArrayDeclaration",value:(h=X()(Q().mark((function e(t,n){var r,i,o,a,s,u;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.evaluateExpression(t,n.lines);case 2:if(r=e.sent,ge.INTEGER.isCompatible(r.type)){e.next=5;break}throw Ye.array_dimension_not_int_full(n.sourceInfo);case 5:return i=r.get().toNumber(),e.next=8,this.evaluateExpression(t,n.columns);case 8:if(o=e.sent,a=null,null===o){e.next=16;break}if(ge.INTEGER.isCompatible(o.type)){e.next=13;break}throw Ye.array_dimension_not_int_full(n.sourceInfo);case 13:if(!((a=o.get().toNumber())<0)){e.next=16;break}throw Ye.array_dimension_not_positive_full(n.sourceInfo);case 16:if(s=new bn(n.type,[],i,a,null,n.isConst),null===n.initial){e.next=22;break}return e.next=20,this.evaluateArrayLiteral(t,n.initial,n.type,i,a);case 20:u=e.sent,s=new bn(n.type,u,i,a,null,n.isConst);case 22:return t.insertStore(n.id,s),e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"evaluateExpression",value:(d=X()(Q().mark((function e(t,n){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.instruction_count+=1,this.instruction_count%l.suspend_threshold!=0){e.next=4;break}return e.next=4,Dt(3);case 4:if(this.mode!==Se.ABORT){e.next=6;break}throw Tt.getMessage("aborted_execution");case 6:if(!(this.instruction_count>=l.max_instruction_count)){e.next=8;break}throw new Error("Número de instruções excedeu o limite definido. Verifique se seu código não possui laços infinitos ou muitas chamadas de funções recursivas.");case 8:if(!(n instanceof st)){e.next=12;break}return e.abrupt("return",this.evaluateUnaryApp(t,n));case 12:if(!(n instanceof at)){e.next=16;break}return e.abrupt("return",this.evaluateInfixApp(t,n));case 16:if(!(n instanceof Qe)){e.next=20;break}return e.abrupt("return",this.evaluateArrayAccess(t,n));case 20:if(!(n instanceof ot)){e.next=24;break}return e.abrupt("return",this.evaluateVariableLiteral(t,n));case 24:if(!(n instanceof Xe)){e.next=28;break}return e.abrupt("return",this.evaluateLiteral(t,n));case 28:if(!(n instanceof et)){e.next=32;break}return e.abrupt("return",this.evaluateLiteral(t,n));case 32:if(!(n instanceof tt)){e.next=36;break}return e.abrupt("return",this.evaluateLiteral(t,n));case 36:if(!(n instanceof rt)){e.next=40;break}return e.abrupt("return",this.evaluateLiteral(t,n));case 40:if(!(n instanceof nt)){e.next=44;break}return e.abrupt("return",this.evaluateLiteral(t,n));case 44:if(!(n instanceof it)){e.next=48;break}throw new Error("Internal Error: The system should not eval an array literal.");case 48:if(!(n instanceof Ie)){e.next=50;break}return e.abrupt("return",this.evaluateFunctionCall(t,n));case 50:return e.abrupt("return",null);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"evaluateFunctionCall",value:(p=X()(Q().mark((function e(t,n){var r,i,o;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.isMainCall){e.next=2;break}throw Ye.void_in_expression_full(Rt.getMainFunctionName(),n.sourceInfo);case 2:if(r=this.findFunction(n.id),!ge.VOID.isCompatible(r.returnType)){e.next=5;break}throw Ye.void_in_expression_full(n.id,n.sourceInfo);case 5:if(!(this.function_call_stack.length>=l.max_call_stack)){e.next=7;break}throw Ye.exceeded_recursive_calls(n.sourceInfo);case 7:return this.function_call_stack.push(n.sourceInfo),e.next=10,this.runFunction(r,n.actualParameters,t);case 10:if((i=e.sent).mode===Se.RETURN){e.next=13;break}throw new Error("!!!Internal error: the function that was called did not have a return command or did not set the store mode properly -> "+n.id);case 13:return o=i.applyStore("$"),i.destroy(),this.function_call_stack.pop(),e.abrupt("return",o);case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"evaluateArrayLiteral",value:(f=X()(Q().mark((function e(t,n,r,i,o){var a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.isVector){e.next=9;break}if(null!=o){e.next=3;break}throw new Error("This should never happen: Vector cannot be initialized by a matrix");case 3:return e.next=5,this.evaluateMatrix(t,n,r,i,o);case 5:return a=e.sent,e.abrupt("return",a.reduce((function(e,t){return e.concat(t)}),[]));case 9:if(null==o){e.next=11;break}throw new Error("This should never happen: Matrix cannot be initialized by a vector");case 11:return e.abrupt("return",this.evaluateVector(t,n,r,i));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r,i){return f.apply(this,arguments)})},{key:"evaluateVector",value:(c=X()(Q().mark((function e(t,n,r,i){var o,a,s=this;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.value,i===o.length){e.next=3;break}throw Ye.invalid_number_elements_vector(i,n.toString(),o.length,n.sourceInfo);case 3:return e.next=5,Promise.all(o.map((function(e){return s.evaluateExpression(t,e)})));case 5:return a=e.sent,e.abrupt("return",a.map((function(e,t){if(!r.canAccept(e.type,1)){if(!l.enable_type_casting||!Nn.canImplicitTypeCast(r.innerType,e.type)){var n=o[t].toString();throw Ye.invalid_array_literal_type_full(n,o[t].sourceInfo)}return Nn.doImplicitCasting(r.innerType,e)}return e})));case 7:case"end":return e.stop()}}),e)}))),function(e,t,n,r){return c.apply(this,arguments)})},{key:"evaluateMatrix",value:(u=X()(Q().mark((function e(t,n,r,i,o){var a,s,u=this;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=n.value).length===i){e.next=3;break}throw Ye.invalid_number_lines_matrix(i,n.toString(),a.length,n.sourceInfo);case 3:return s=a.map((function(e){var n=new Ze(r.innerType,1);return u.evaluateVector(t,e,n,o)})),e.next=6,Promise.all(s);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)}))),function(e,t,n,r,i){return u.apply(this,arguments)})},{key:"evaluateLiteral",value:(s=X()(Q().mark((function e(t,n){return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new We(n.type,n.value));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return s.apply(this,arguments)})},{key:"evaluateVariableLiteral",value:(o=X()(Q().mark((function e(t,n){var r;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.applyStore(n.id),e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)}))),function(e,t){return o.apply(this,arguments)})},{key:"evaluateArrayAccess",value:(r=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c,l;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=t.getStoreObject(n.id)).type instanceof Ze){e.next=3;break}throw Ye.invalid_array_access_full(n.id,n.sourceInfo);case 3:return e.next=5,this.evaluateExpression(t,n.line);case 5:if(i=e.sent,ge.INTEGER.isCompatible(i.type)){e.next=8;break}throw Ye.array_dimension_not_int_full(n.sourceInfo);case 8:return o=i.get().toNumber(),e.next=11,this.evaluateExpression(t,n.column);case 11:if(a=e.sent,s=null,null===a){e.next=17;break}if(ge.INTEGER.isCompatible(a.type)){e.next=16;break}throw Ye.array_dimension_not_int_full(n.sourceInfo);case 16:s=a.get().toNumber();case 17:if(!(o>=r.lines)){e.next=25;break}if(!r.isVector){e.next=22;break}throw Ye.vector_line_outbounds_full(n.id,o,r.lines,n.sourceInfo);case 22:throw Ye.matrix_line_outbounds_full(n.id,o,r.lines,n.sourceInfo);case 23:e.next=27;break;case 25:if(!(o<0)){e.next=27;break}throw Ye.array_dimension_not_positive_full(n.sourceInfo);case 27:if(null===s||0!==r.columns){e.next=29;break}throw Ye.vector_not_matrix_full(n.id,n.sourceInfo);case 29:if(null===s){e.next=36;break}if(!(s>=r.columns)){e.next=34;break}throw Ye.matrix_column_outbounds_full(n.id,s,r.columns,n.sourceInfo);case 34:if(!(s<0)){e.next=36;break}throw Ye.array_dimension_not_positive_full(n.sourceInfo);case 36:if(u=r.getAt(o,s),c=r.type.innerType,!Array.isArray(u)){e.next=43;break}return l=u.map((function(e,t){return new xn(c,e,o,t,r.id,r.readOnly)})),e.abrupt("return",new bn(new Ze(c,1),l,r.columns,null,r.id,r.readOnly));case 43:return e.abrupt("return",new xn(c,u,o,s,r.id,r.readOnly));case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"evaluateUnaryApp",value:(n=X()(Q().mark((function e(t,n){var r,i,o,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.evaluateExpression(t,n.left);case 2:if(r=e.sent,i=hn(n.op,r.type),!ge.UNDEFINED.isCompatible(i)){e.next=8;break}throw o=r.type.stringInfo(),a=o[0],Ye.invalid_unary_op_full(n.op,a.type,a.dim,n.sourceInfo);case 8:e.t0=n.op.ord,e.next=e.t0===ct.ADD.ord?11:e.t0===ct.SUB.ord?12:e.t0===ct.NOT.ord?13:14;break;case 11:return e.abrupt("return",new We(i,r.get()));case 12:return e.abrupt("return",new We(i,r.get().negated()));case 13:return e.abrupt("return",new We(i,!r.get()));case 14:throw new Ve("!!!Critical Invalid UnaryApp "+n.op);case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"evaluateInfixApp",value:(t=X()(Q().mark((function e(t,n){var r,i,o,a,s,u,c,f,p,d,h,m,_,v,y,g,x,b,w,E,$,R,k,T,N,I,S;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.evaluateExpression(t,n.left);case 2:return r=e.sent,e.next=5,this.evaluateExpression(t,n.right);case 5:if(i=e.sent,o=!1,a=dn(n.op,r.type,i.type),!ge.UNDEFINED.isCompatible(a)){e.next=18;break}if(!l.enable_type_casting||!Nn.canImplicitTypeCast(r.type,i.type)){e.next=13;break}o=!0,e.next=18;break;case 13:throw s=r.type.stringInfo(),u=s[0],c=i.type.stringInfo(),f=c[0],Ye.invalid_infix_op_full(n.op,u.type,u.dim,f.type,f.dim,n.sourceInfo);case 18:p=null,e.t0=n.op.ord,e.next=e.t0===ct.ADD.ord?22:e.t0===ct.SUB.ord?39:e.t0===ct.MULT.ord?40:e.t0===ct.DIV.ord?42:e.t0===ct.MOD.ord?46:e.t0===ct.GT.ord?51:e.t0===ct.GE.ord?55:e.t0===ct.LT.ord?59:e.t0===ct.LE.ord?63:e.t0===ct.EQ.ord?67:e.t0===ct.NEQ.ord?71:e.t0===ct.AND.ord?75:e.t0===ct.OR.ord?76:77;break;case 22:if(!ge.STRING.isCompatible(r.type)){e.next=27;break}return d=Me(i.get(),i.type),e.abrupt("return",new We(a,r.get()+d));case 27:if(!ge.STRING.isCompatible(i.type)){e.next=32;break}return h=Me(r.get(),r.type),e.abrupt("return",new We(a,h+i.get()));case 32:if(!ge.CHAR.isCompatible(r.type)){e.next=38;break}return m=Me(r.get(),r.type),_=Me(i.get(),i.type),e.abrupt("return",new We(a,m+_));case 38:return e.abrupt("return",new We(a,r.get().plus(i.get())));case 39:return e.abrupt("return",new We(a,r.get().minus(i.get())));case 40:return p=r.get().times(i.get()),e.abrupt("return",new We(a,p));case 42:if(0!=i.get()){e.next=44;break}throw Ye.divsion_by_zero_full(n.toString(),n.sourceInfo);case 44:return p=ge.INTEGER.isCompatible(a)?r.get().divToInt(i.get()):r.get().div(i.get()),e.abrupt("return",new We(a,p));case 46:return v=r.get(),y=i.get(),o&&(a=ge.INTEGER,v=v.trunc(),y=y.trunc()),p=v.modulo(y),e.abrupt("return",new We(a,p));case 51:return g=r.get(),x=i.get(),ge.STRING.isCompatible(r.type)?p=g.length>x.length:ge.CHAR.isCompatible(r.type)?p=g.charCodeAt(0)>x.charCodeAt(0):(o&&(a=ge.BOOLEAN,g=g.trunc(),x=x.trunc()),p=g.gt(x)),e.abrupt("return",new We(a,p));case 55:return b=r.get(),w=i.get(),ge.STRING.isCompatible(r.type)?p=b.length>=w.length:ge.CHAR.isCompatible(r.type)?p=b.charCodeAt(0)>=w.charCodeAt(0):(o&&(a=ge.BOOLEAN,b=b.trunc(),w=w.trunc()),p=b.gte(w)),e.abrupt("return",new We(a,p));case 59:return E=r.get(),$=i.get(),ge.STRING.isCompatible(r.type)?p=E.length<$.length:ge.CHAR.isCompatible(r.type)?p=E.charCodeAt(0)<$.charCodeAt(0):(o&&(a=ge.BOOLEAN,E=E.trunc(),$=$.trunc()),p=E.lt($)),e.abrupt("return",new We(a,p));case 63:return R=r.get(),k=i.get(),ge.STRING.isCompatible(r.type)?p=R.length<=k.length:ge.CHAR.isCompatible(r.type)?p=R.charCodeAt(0)<=k.charCodeAt(0):(o&&(a=ge.BOOLEAN,R=R.trunc(),k=k.trunc()),p=R.lte(k)),e.abrupt("return",new We(a,p));case 67:return T=r.get(),N=i.get(),ge.INTEGER.isCompatible(r.type)||ge.REAL.isCompatible(r.type)?(o&&(a=ge.BOOLEAN,T=T.trunc(),N=N.trunc()),p=T.eq(N)):p=T===N,e.abrupt("return",new We(a,p));case 71:return I=r.get(),S=i.get(),ge.INTEGER.isCompatible(r.type)||ge.REAL.isCompatible(r.type)?(o&&(a=ge.BOOLEAN,I=I.trunc(),S=S.trunc()),p=!I.eq(S)):p=I!==S,e.abrupt("return",new We(a,p));case 75:return e.abrupt("return",new We(a,r.get()&&i.get()));case 76:return e.abrupt("return",new We(a,r.get()||i.get()));case 77:throw new Ve("!!!Critical Invalid InfixApp "+n.op);case 78:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();var Cn=function(e){m()(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)});function o(e){var t;return i()(this,o),(t=r.call(this)).index=0,t.inputList=e,t}return a()(o,[{key:"requestInput",value:function(){var e=this;return new Promise((function(t,n){e.index1&&void 0!==arguments[1]&&arguments[1];null==this.currentLine&&(this.currentLine=this.list.push("")-1),this.list[this.currentLine]+=e,t&&(this.currentLine=null)}},{key:"sendOutput",value:function(e){var t=this,n=""+e;if(-1!==n.indexOf("\n")){var r=n.split("\n"),i=r.pop();r.forEach((function(e){0==e.length?t.currentLine=null:t.write(e,!0)})),0!=i.length&&this.write(i)}else this.write(n)}}]),o}(function(){function e(){i()(this,e)}return a()(e,[{key:"sendOutput",value:function(e){throw new Error("Must be implemented")}},{key:"writeRawHTML",value:function(e,t){throw new Error("Must be implemented")}},{key:"write",value:function(e){throw new Error("Must be implemented")}},{key:"info",value:function(e){throw new Error("Must be implemented")}},{key:"err",value:function(e){throw new Error("Must be implemented")}}],[{key:"USER",get:function(){return 0}},{key:"INFO",get:function(){return 1}},{key:"ERR",get:function(){return 2}},{key:"INPUT",get:function(){return 3}}]),e}());function On(e,t,n){return Dn.apply(this,arguments)}function Dn(){return Dn=X()(Q().mark((function e(t,n,r){var i,o,a,s,u,c,l,f;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.map((function(e){return Object.assign({},e)})),e.prev=1,o=In.analyseFromSource(t),a=n.map(function(){var e=X()(Q().mark((function e(t,n){var r,i,a;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new Cn(t.input),i=new Ln,(a=new An(o)).registerInput(r),a.registerOutput(i),e.next=7,a.interpretAST();case 7:return e.abrupt("return",{id:n,program:a});case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),e.next=6,Promise.all(a);case 6:s=e.sent,u=0;case 8:if(!(u