1
0

main.d37a85f034d619e41454.js.map 1.6 MB

1
  1. {"version":3,"sources":["webpack://ivprogCore/webpack/universalModuleDefinition","webpack://ivprogCore/webpack/bootstrap","webpack://ivprogCore/./grammar/en/ivprog.g4","webpack://ivprogCore/./grammar/en/langFunctions.js","webpack://ivprogCore/./grammar/en/langLibs.js","webpack://ivprogCore/./grammar/index.js","webpack://ivprogCore/./grammar/pt/ivprog.g4","webpack://ivprogCore/./grammar/pt/langFunctions.js","webpack://ivprogCore/./grammar/pt/langLibs.js","webpack://ivprogCore/./i18n/error.csv","webpack://ivprogCore/./i18n/index.ts","webpack://ivprogCore/./i18n/message.csv","webpack://ivprogCore/./i18n/ui.csv","webpack://ivprogCore/./js/assessment/ivprogAssessment.js","webpack://ivprogCore/./js/assessment/output_matching/assessment_result.js","webpack://ivprogCore/./js/assessment/output_matching/output_matching.js","webpack://ivprogCore/./js/assessment/output_matching/output_result.js","webpack://ivprogCore/./js/ast/ast_helpers.js","webpack://ivprogCore/./js/ast/commands/arrayAssign.js","webpack://ivprogCore/./js/ast/commands/arrayDeclaration.js","webpack://ivprogCore/./js/ast/commands/assign.js","webpack://ivprogCore/./js/ast/commands/break.js","webpack://ivprogCore/./js/ast/commands/case.js","webpack://ivprogCore/./js/ast/commands/command.js","webpack://ivprogCore/./js/ast/commands/commandBlock.js","webpack://ivprogCore/./js/ast/commands/declaration.js","webpack://ivprogCore/./js/ast/commands/for.js","webpack://ivprogCore/./js/ast/commands/formalParameter.js","webpack://ivprogCore/./js/ast/commands/function.js","webpack://ivprogCore/./js/ast/commands/ifThenElse.js","webpack://ivprogCore/./js/ast/commands/index.js","webpack://ivprogCore/./js/ast/commands/repeatUntil.js","webpack://ivprogCore/./js/ast/commands/return.js","webpack://ivprogCore/./js/ast/commands/switch.js","webpack://ivprogCore/./js/ast/commands/sysCall.js","webpack://ivprogCore/./js/ast/commands/while.js","webpack://ivprogCore/./js/ast/error/syntaxError.js","webpack://ivprogCore/./js/ast/error/syntaxErrorFactory.js","webpack://ivprogCore/./js/ast/expressions/arrayAccess.js","webpack://ivprogCore/./js/ast/expressions/arrayLiteral.js","webpack://ivprogCore/./js/ast/expressions/boolLiteral.js","webpack://ivprogCore/./js/ast/expressions/charLiteral.js","webpack://ivprogCore/./js/ast/expressions/expression.js","webpack://ivprogCore/./js/ast/expressions/functionCall.js","webpack://ivprogCore/./js/ast/expressions/index.js","webpack://ivprogCore/./js/ast/expressions/infixApp.js","webpack://ivprogCore/./js/ast/expressions/intLiteral.js","webpack://ivprogCore/./js/ast/expressions/literal.js","webpack://ivprogCore/./js/ast/expressions/realLiteral.js","webpack://ivprogCore/./js/ast/expressions/stringLiteral.js","webpack://ivprogCore/./js/ast/expressions/unaryApp.js","webpack://ivprogCore/./js/ast/expressions/variableLiteral.js","webpack://ivprogCore/./js/ast/ivprogParser.js","webpack://ivprogCore/./js/ast/operators.ts","webpack://ivprogCore/./js/ast/sourceInfo.js","webpack://ivprogCore/./js/io/domConsole.js","webpack://ivprogCore/./js/io/input.js","webpack://ivprogCore/./js/io/output.js","webpack://ivprogCore/./js/main.js","webpack://ivprogCore/./js/memory/address.ts","webpack://ivprogCore/./js/memory/location.ts","webpack://ivprogCore/./js/processor/compatibilityTable.ts","webpack://ivprogCore/./js/processor/context.ts","webpack://ivprogCore/./js/processor/definedFunctions.js","webpack://ivprogCore/./js/processor/error/processorErrorFactory.js","webpack://ivprogCore/./js/processor/error/runtimeError.js","webpack://ivprogCore/./js/processor/error/semanticError.js","webpack://ivprogCore/./js/processor/ivprogProcessor.js","webpack://ivprogCore/./js/processor/lib/arrays.js","webpack://ivprogCore/./js/processor/lib/io.js","webpack://ivprogCore/./js/processor/lib/lang.js","webpack://ivprogCore/./js/processor/lib/math.js","webpack://ivprogCore/./js/processor/lib/strings.js","webpack://ivprogCore/./js/processor/modes.ts","webpack://ivprogCore/./js/processor/semantic/semanticAnalyser.js","webpack://ivprogCore/./js/processor/store/store.ts","webpack://ivprogCore/./js/processor/store/storeObject.ts","webpack://ivprogCore/./js/processor/store/storeObjectArray.ts","webpack://ivprogCore/./js/processor/store/storeObjectRef.ts","webpack://ivprogCore/./js/processor/store/store_object_array_ref.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value_ref.ts","webpack://ivprogCore/./js/processor/store/value/store_value.ts","webpack://ivprogCore/./js/processor/store/value/store_value_address.ts","webpack://ivprogCore/./js/processor/store/value/store_value_ref.ts","webpack://ivprogCore/./js/runner.js","webpack://ivprogCore/./js/services/i18nHelper.js","webpack://ivprogCore/./js/services/languageService.js","webpack://ivprogCore/./js/services/localizedStringsService.js","webpack://ivprogCore/./js/services/userLog.js","webpack://ivprogCore/./js/typeSystem/array_type.ts","webpack://ivprogCore/./js/typeSystem/multiType.ts","webpack://ivprogCore/./js/typeSystem/parsers.js","webpack://ivprogCore/./js/typeSystem/type.ts","webpack://ivprogCore/./js/typeSystem/types.ts","webpack://ivprogCore/./js/util/auto_gen_output.js","webpack://ivprogCore/./js/util/config.ts","webpack://ivprogCore/./js/util/editorMode2.js","webpack://ivprogCore/./js/util/iassignHelpers.js","webpack://ivprogCore/./js/util/inputTest.js","webpack://ivprogCore/./js/util/input_assessment.js","webpack://ivprogCore/./js/util/maybe.ts","webpack://ivprogCore/./js/util/outputTest.js","webpack://ivprogCore/./js/util/string_diff.js","webpack://ivprogCore/./js/util/testConsole.js","webpack://ivprogCore/./js/util/utils.js","webpack://ivprogCore/./js/visualUI/algorithm.js","webpack://ivprogCore/./js/visualUI/code_generator.js","webpack://ivprogCore/./js/visualUI/commands.js","webpack://ivprogCore/./js/visualUI/commands/attribution.js","webpack://ivprogCore/./js/visualUI/commands/break.js","webpack://ivprogCore/./js/visualUI/commands/comment.js","webpack://ivprogCore/./js/visualUI/commands/conditional_expression.js","webpack://ivprogCore/./js/visualUI/commands/contextualized_menu.js","webpack://ivprogCore/./js/visualUI/commands/dowhiletrue.js","webpack://ivprogCore/./js/visualUI/commands/functioncall.js","webpack://ivprogCore/./js/visualUI/commands/generic_expression.js","webpack://ivprogCore/./js/visualUI/commands/iftrue.js","webpack://ivprogCore/./js/visualUI/commands/reader.js","webpack://ivprogCore/./js/visualUI/commands/repeatNtimes.js","webpack://ivprogCore/./js/visualUI/commands/return.js","webpack://ivprogCore/./js/visualUI/commands/switch.js","webpack://ivprogCore/./js/visualUI/commands/variable_value_menu.js","webpack://ivprogCore/./js/visualUI/commands/whiletrue.js","webpack://ivprogCore/./js/visualUI/commands/writer.js","webpack://ivprogCore/./js/visualUI/functions.js","webpack://ivprogCore/./js/visualUI/globals.js","webpack://ivprogCore/./js/visualUI/ivprog_elements.js","webpack://ivprogCore/./js/visualUI/text_editor.js","webpack://ivprogCore/./js/visualUI/types.js","webpack://ivprogCore/./js/visualUI/utils.js","webpack://ivprogCore/./js/visualUI/variables.js"],"names":["main_function","$read","$write","$numElements","$matrixLines","$matrixColumns","$substring","$length","$uppercase","$lowercase","$charAt","$isReal","$isInt","$isBool","$castReal","$castInt","$castBool","$castString","$castChar","$sin","$cos","$tan","$sqrt","$pow","$log","$abs","$negate","$invert","$max","$min","$rand","$mathLib","$ioLib","$strLib","$arrayLib","$langLib","pt","lexer","PT","langFuncs","PTFuncs","langLibs","PTLibs","en","EN","ENFuncs","ENLibs","LocalizedStrings","LocalizedStringsService","StringTypes","line_i18n","AssessmentConfig","max_instruction_count","suspend_threshold","IVProgAssessment","ast_code","testCases","domConsole","old_config","JSON","parse","stringify","Config","setConfig","partialTests","map","t","name","OutputMatching","IVProgProcessor","input","output","testResult","om","eval","Promise","all","then","results","grade","i","length","result","writeToConsole","DOMConsole","INFO","MESSAGE","generateOutput","status","ERR","ERROR","error_msg","channel","toFixed","error","showErrorMessage","err","message","resolve","errorID","args","getError","msgID","info","getMessage","msgType","msg","getString","processString","writeRawHTML","OutputAssessmentResult","inputs","store","time","template","DETAIL_TEMPLATE","replace","getUI","input_spans","prepareInputList","output_rows","type","formatString","formatNumber","formatBool","prepareOutputTable","failed_text","FAILED_TEMPLATE","input_list","list","INPUT_INFO_TEMPLATE","value","read","join","OUPUT_TABLE_TEMPLATE","assessment_result","prepareResults","page","PAGE_TEMPLATE","result_class","formatOutput","expected_class","generated_class","OUTPUT_TEMPLATE","expected_tmpl","expected","generated_tmpl","generated","EMPTY_OUTPUT_TEMPLATE","final_result","g_string","e_string","g_string_tmpl","e_string_tmpl","diff","StringDiff","diff_vec","part","getDiffStringStyle","diff_string","reduce","prev","actual","text","action","INSERT","DELETE","EQUAL","val","str","RegExp","program","expected_output","test_name","refThis","InputAssessment","gen_output","OutputTest","registerInput","registerOutput","start_time","Date","now","interpretAST","sto","final_time","isInputAvailable","getErrorMessage","g_out","OutputResult","getPotentialOutputType","outputMatch","console","log","e_out","push","NUM_REGEX","test","BOOLEAN_REGEX","g_output","e_output","checkStrings","g_num","Decimal","e_num","checkNumbers","g_bool","TypeParser","e_bool","checkBoolean","decimalPlaces","Math","min","dp","ROUND_FLOOR","eq","toNumber","g_bool_text","e_bool_text","e_ouput","assessmentList","e_output_clean","trim","g_output_clean","NUM_IN_STRING_REGEX","expected_numbers","match","generated_numbers","g_val","e_val","numberGrade","r","BOOLEAN_IN_STRING_REGEX","expected_bools","generated_bools","boolGrade","dist","levenshteinDistance","gradeDiff","max","Number","isNaN","assessment_size","gradeAcc","finalGrade","createNumberResult","OutputMatchResult","createBoolResult","createStringResult","recover","_","start","_tokenStartCharIndex","stop","_input","index","getText","getErrorDisplay","line","_tokenStartLine","column","_tokenStartColumn","SyntaxErrorFactory","invalid_character","ArrayIndexAssign","id","lineExpression","columnExpression","expression","Assign","ArrayDeclaration","lines","columns","initial","isConst","Declaration","Command","Break","Case","commands","_sourceInfo","sourceInfo","CommandBlock","variables","For","for_id","for_from","for_to","for_pass","commandBlock","FormalParameter","byRef","variadic","Function","returnType","formalParameters","some","p","isCompatible","Types","VOID","IfThenElse","condition","ifTrue","ifFalse","RepeatUntil","While","Return","Switch","cases","SysCall","langFunc","SyntaxError","Error","captureStackTrace","createError","message_id","context","Object","freeze","extra_lines","token_missing_one","token","token_missing_list","expectedList","getOR","id_missing","eos_missing","invalid_array_dimension","typeName","invalid_array_size","invalid_main_return","invalid_var_declaration","invalid_break_command","cmdName","invalid_terminal","invalid_type","const_not_init","invalid_id_format","duplicate_function","main_parameters","duplicate_variable","_column","annonymous_array_literal","invalid_matrix_literal_line","exp","cannot_infer_matrix_line","cannot_infer_matrix_column","cannot_infer_vector_size","matrix_to_vector_literal_attr","vector_to_matrix_literal_attr","array_init_not_literal","array_exceeds_2d","invalid_matrix_id_dimension","invalid_vector_init","invalid_matrix_init","ArrayAccess","strLine","toString","strColumn","parenthesis","Expression","ArrayLiteral","valid","strList","arrayLiteral","element","validateSize","validateType","Literal","BoolLiteral","BOOLEAN","convertBoolToString","CharLiteral","CHAR","_parenthesis","flag","FunctionCall","actualParameters","isMainCall","LanguageDefinedFunction","getMainFunctionName","getLocalName","params","strParams","v","InfixApp","op","left","right","l","IntLiteral","INTEGER","convertToString","RealLiteral","REAL","StringLiteral","STRING","UnaryApp","VariableLiteral","UNDEFINED","IVProgParser","lexerClass","LanguageService","getCurrentLexer","inputStream","InputStream","AstHelpers","bind","tokenStream","CommonTokenStream","fill","pos","variableTypes","RK_INTEGER","RK_REAL","RK_BOOLEAN","RK_STRING","RK_CHARACTER","functionTypes","concat","RK_VOID","parsingArrayDimension","scope","getCurrentLangFuncs","definedFuncsNameList","definedVariablesStack","parseProgram","LT","BASE","pop","getToken","fetchedEOF","consumeNewLines","globalVars","functions","RK_PROGRAM","checkOpenCurly","pushVariableStack","RK_CONST","isVariableType","parseGlobalVariables","RK_FUNCTION","parseFunction","popVariableStack","checkCloseCurly","isEOF","global","literalNames","attempt","OPEN_CURLY","CLOSE_CURLY","OPEN_BRACE","CLOSE_BRACE","OPEN_PARENTHESIS","CLOSE_PARENTHESIS","eosToken","EOS","functionID","funcIDToken","indexOf","variableID","getCurrentVariableStack","decl","parseMaybeConst","checkEOS","constToken","typeString","parseType","parseDeclaration","getTypeArray","dim1","dim2","dimensions","SourceInfo","createSourceInfo","idString","parseID","checkVariableDuplicate","checkOpenBrace","parseArrayDimension","checkCloseBrace","parseArrayDeclaration","equalsToken","parseExpressionOR","declaration","Commands","commaToken","COMMA","n_lines","n_columns","dim_is_id","Expressions","parseArrayLiteral","isVector","expString","Parsers","ArrayType","find","dimToken","getIntLiteral","ID","parseVariable","openCurly","invalid_token","beginArray","data","maybeCurlyOpen","parseVectorList","parseExpressionList","endArray","createSourceInfoFromList","dataDim","lastSize","pushScope","FUNCTION","formalParams","funType","checkFunctionDuplicate","checkOpenParenthesis","checkCloseParenthesis","parseFormalParameters","commandsBlock","parseCommandBlock","func","isMain","popScope","reference","maybeIDToken","RK_REFERENCE","parameter","insideScope","LIB_ID","optionalCurly","variablesDecl","hasOpen","parsedCommand","cmd","parseCommand","Array","lastToken","varType","parseIDCommand","RK_RETURN","parseReturn","RK_WHILE","RK_WHILE_ALT","parseWhile","RK_FOR","RK_FOR_ALT","parseFor","RK_BREAK","BREAKABLE","parseBreak","RK_SWITCH","parseSwitchCase","RK_DO","parseRepeatUntil","RK_IF","parseIfThenElse","casesList","parseCases","whileToken","RK_DO_UNTIL","COMMAND","logicalExpression","cmdBlocks","maybeElse","RK_ELSE","maybeIf","elseBlock","for_token","id_token","parseForParameters","RK_FOR_FROM","RK_FOR_TO","maybePass","RK_FOR_PASS","refToken","isID","parseMaybeLibID","parseExpression","equalToken","equalOrParenthesis","funcCall","parseFunctionCallCommand","keyword_code","from_token","keyword","int_or_id","is_unary_op","SUM_OP","convertFromString","RK_CASE","nextToken","RK_DEFAULT","colonToken","COLON","block","defaultCase","setCommands","aCase","caseToken","exp1","parseExpressionAND","OR_OPERATOR","opToken","or","exp2","finalExp","parseExpressionNot","AND_OPERATOR","and","maybeNotToken","NOT_OPERATOR","not","parseExpressionRel","RELATIONAL_OPERATOR","relToken","rel","factor","parseFactor","sumOpToken","factor2","term","parseTerm","MULTI_OP","multOpToken","term2","getRealLiteral","getStringLiteral","CHARACTER","getCharLiteral","RK_TRUE","RK_FALSE","getBoolLiteral","parseIDTerm","parseParenthesisExp","tokenA","tokenB","firstIndex","secondIndex","parseFunctionCallExpression","getInternalName","parseActualParameters","funcName","getFunctionName","maybeToken","types","x","size","tokenIndex","elementID","disableMarginTop","cursorInterval","idleInterval","inputDiv","inputCMD","inputSpan","cursorRef","needInput","clearBtn","hideBtn","showBtn","termDiv","anyKey","actualID","substring","parent","document","getElementById","setup","inputListeners","hideInput","pending_writes","last_clear","_setupDom","_setupEvents","addEventListener","clearBtnClick","hideBtnClick","showBtnClick","event","keyCode","which","clearInterval","notifyListeners","_appendUserInput","innerHTML","currentLine","bashNode","createElement","classList","add","BASH_TEMPLATE","querySelector","INPUT_CARET_TEMPLATE","setAttribute","append","_setupCursor","window","$","popup","content","blinkCaretAndFocus","updateSpanText","stopBlinkCaret","focus","setInterval","style","visibility","scheduleNotify","forEach","splice","_appendTextLn","newLine","_appendText","USER","write_time","Utils","divClass","getClassForType","textDiv","insertBefore","getOutputText","scrollTerm","filter","removeChild","INPUT","getUserInputText","scrollTop","scrollHeight","display","top","marginTop","showInput","scrollIntoView","removeEventListener","cNode","cloneNode","parentNode","replaceChild","click","promise","outputList","split","write","clearPendingWrites","parentElement","childNodes","firstChild","clear","hide","notifyIdle","idle_input_interval","Input","Output","CodeEditor","initTextEditor","CodeEditorAll","setCode","getCode","updateEditor","disable","i18n","i18nHelper","valueToKey","object","key","prototype","hasOwnProperty","call","concatObjects","obj","libsObject","createSinFun","createCosFun","createTanFun","createSqrtFun","createPowFun","createLogFun","createAbsFun","createNegateFun","createInvertFun","createMaxFun","createMinFun","createRandFun","createInputFun","createOutputFun","createSubstringFun","createLengthFun","createUppercaseFun","createLowercaseFun","createrCharAtFun","createNumElementsFun","createMatrixLinesFun","createMatrixColumnsFun","createIsRealFun","createIsIntFun","createIsBoolFun","createCastRealFun","createCastIntFun","createCastBoolFun","createCastStringFun","createCastCharFun","funcsObject","localName","names","lib","getCurrentLangLibs","internalName","getFunction","libName","funName","createRuntimeError","i18n_id","RuntimeError","createSemanticError","SemanticError","ProcessorErrorFactory","symbol_not_found_full","symbol_not_found","function_missing_full","function_missing","main_missing","array_dimension_not_int_full","array_dimension_not_int","unknown_command_full","unknown_command","incompatible_types_full","left_type","left_dim","right_type","right_dim","source_info","translateType","incompatible_types","incompatible_types_array_full","dim","incompatible_types_array","loop_condition_type_full","loop_condition_type","endless_loop_full","endless_loop","if_condition_type_full","if_condition_type","invalid_global_var","not_implemented","invalid_case_type_full","invalid_case_type","void_in_expression_full","void_in_expression","invalid_array_access_full","invalid_array_access","invalid_matrix_access_full","invalid_matrix_access","matrix_column_outbounds_full","matrix_column_outbounds","matrix_line_outbounds_full","matrix_line_outbounds","vector_line_outbounds_full","vector_line_outbounds","vector_not_matrix_full","vector_not_matrix","function_no_return","invalid_void_return_full","invalid_void_return","invalid_return_type_full","invalid_return_type","invalid_parameters_size_full","invalid_parameters_size","invalid_parameter_type_full","fun_name","invalid_parameter_type","invalid_ref_full","invalid_ref","unexpected_break_command_full","unexpected_break_command","invalid_array_literal_type_full","invalid_array_literal_type","invalid_array_literal_line_full","invalid_array_literal_line","invalid_array_literal_column_full","invalid_array_literal_column","invalid_unary_op_full","opName","translateOp","invalid_unary_op","invalid_infix_op_full","typeLeft","dimLeft","typeRight","dimRight","invalid_infix_op","array_dimension_not_positive_full","array_dimension_not_positive","invalid_type_conversion","invalid_read_type","invalid_read_type_array","typePos","dimPos","typeArray","dimArray","invalid_const_ref_full","invalid_const_ref","invalid_const_assignment_full","var_id","invalid_const_assignment","invalid_vector_assignment_full","left_id","left_size","right_id","right_size","invalid_vector_assignment","invalid_matrix_assignment_full","left_line","left_column","right_line","right_column","invalid_matrix_assignment","matrix_to_vector_attr","vector_to_matrix_attr","invalid_matrix_index_assign_full","mat_id","mat_line","mat_size","exp_size","invalid_matrix_index_assign","invalid_number_elements_vector","expected_num","actual_num","invalid_number_lines_matrix","divsion_by_zero_full","divsion_by_zero","undefined_tanget_value","negative_log_value","invalid_string_index","local_fun_name","negative_sqrt_value","exceeded_recursive_calls","invalid_for_variable","invalid_for_from","invalid_for_to","invalid_for_pass","exceed_max_instructions","ast","globalStore","Store","stores","Context","forceKill","mode","Modes","RUN","function_call_stack","instruction_count","function_call_count","RETURN","BREAK","prepareState","Location","initGlobal","mainFunc","findMainFunction","runFunction","checkContext","executeCommands","MAIN_INTERNAL_ID","fun","funcStore","extendStore","associateParameters","variablesDeclarations","stoWithVars","finalSto","formal_params","effective_params","caller_store","callee_store","hasVariadic","j","formalParameter","associateVariadicParameter","actualParam","associateParameter","count","variadicCount","StoreValue","undefined","insertStore","actualParameter","callerStore","calleeStore","evaluateExpression","actualValue","shouldTypeCast","enable_type_casting","canImplicitTypeCast","inStore","realObj","getStoreObject","ref","ArrayStoreValue","values","get","array_type","addresses","getLocAddressOf","ArrayStoreValueRef","StoreValueAddress","StoreValueRef","setReferenceDimension","locAddress","varID","realValue","doImplicitCasting","cmds","executeCommand","PAUSE","ABORT","executeDeclaration","executeArrayIndexAssign","executeAssign","executeBreak","executeReturn","executeIfThenElse","executeRepeatUntil","executeWhile","executeFor","executeSwitch","executeFunctionCall","executeSysCall","findFunction","destroy","switchCases","lastStore","lastCaseCheckResult","ignoreSwitchCases","switchCase","isDefault","equalityInfixApp","Operators","EQ","initCmd","passValue","toInt","GE","checkEndGTBegin","GT","isForward","increment","ADD","whileBlock","forAsWhile","newCmdList","checkCondition","isTrue","funcType","real_value","stringInfo","applyStore","exp_type_string_info","exp_type_info","updateStore","mustBeArray","used_dims","lineSV","columnSV","canAccept","innerType","current_value","getAt","updateStoreArray","executeArrayDeclaration","temp","linesSV","columnsSV","evaluateArrayLiteral","valueList","evaluateUnaryApp","evaluateInfixApp","evaluateArrayAccess","evaluateVariableLiteral","evaluateLiteral","evaluateFunctionCall","max_call_stack","evaluateMatrix","storeValueMatrix","next","evaluateVector","exps","n_elements","actualValues","exp_str","newValue","vectors","vector","vec_type","isArray","col","readOnly","unaryApp","resultType","resultTypeAfterUnaryOp","ord","SUB","NOT","negated","infixApp","shouldImplicitCast","resultTypeAfterInfixOp","stringInfoLeft","infoLeft","stringInfoRight","infoRight","MULT","DIV","MOD","LE","NEQ","AND","OR","rightStr","leftStr","strLeft","strRight","plus","minus","times","divToInt","div","leftValue","rightValue","trunc","modulo","charCodeAt","gt","gte","lt","lte","numElementsFun","ALL","matrixLinesFun","matrix","matrixColumnsFun","writeFunction","totalSV","total","sendOutput","readFunction","requestInput","typeToConvert","realObject","getReferenceDimension","arrayInfo","getRefObj","stoValue","isRealFun","parser","createParser","isIntFun","isBoolFun","castRealFun","typeStringInfoArray","typeInfo","MultiType","castIntFun","floor","castBoolFun","castStringFun","castCharFun","valSV","String","fromCharCode","convertToRadians","degrees","acos","sinFun","angle","mod","sin","cosFun","cos","tanFun","tan","sqrtFun","isNeg","reject","sqrt","powFun","y","pow","logFun","isNegative","log10","absFun","abs","negateFun","invertFun","dividedBy","maxFun","numbers","sto_addrs","paramType","minFun","seed","a","m","c","randFun","createSetSeedFun","setSeedFun","substringFun","end","lengthFun","uppercaseFun","toUpperCase","lowercaseFun","toLowerCase","charAtFun","idx","charAt","SemanticAnalyser","stringCode","semantic","parseTree","analyseTree","symbolMap","currentFunction","n","symbol_map","findSymbol","pushMap","assertDeclarations","f","assertFunction","assertDeclaration","assertArrayDeclaration","insertSymbol","evaluateExpressionType","result_string_info","result_info","lineType","columnType","finalResult","resultTypeLeft","resultTypeRight","evaluateLiteralType","assertParameters","arrayTypeInfo","arrType","literal","last","e","strInfo","strExp","arrayDeclaration","evaluateVectorLiteralType","line_literal","formalParam","optional","assertReturn","popMap","checkCommand","checkCommands","var_type","from_type","to_type","pass_type","sType","hasDefault","caseType","lineExp","columnExp","exp_type","access_type","compatible","access_type_string_info","access_type_info","getMainFunction","actualParametersList","parameterList","assertVariadicParameter","param","assertParameter","expType","variable","shared","runner","ivprogLexer","editor","JsonEditor","analiser","semAna","proc","load","alert","identifier","opts","UI","warn","LanguageServiceExtended","iLMparameters","default_lang","lang","langInfo","Lexers","getLang","getDefaultLang","LanguageServiceNoLS","IVProgLocalizedStrings","langService","langsJsons","shouldListenToChange","type_string","category","Langs","_instance","getInstance","clicks","inRebuildMode","ActionTypes","INSERT_FUNCTION","REMOVE_FUNCTION","INSERT_GLOBAL_VAR","REMOVE_GLOBAL_VAR","RENAME_FUNCTION","RENAME_GLOBAL_VAR","SET_GLOBAL_CONST","CHANGE_FUNCTION_RETURN","CHANGE_GLOBAL_TYPE","CHANGE_GLOBAL_VALUE","INSERT_FUNCTION_PARAM","REMOVE_FUNCTION_PARAM","CHANGE_PARAM_TYPE","RENAME_FUNCTION_PARAM","INSERT_FUNCTION_VAR","REMOVE_FUNCTION_VAR","RENAME_FUNCTION_VAR","CHANGE_VAR_TYPE","CHANGE_VAR_VALUE","INSERT_COMMAND","REMOVE_COMMAND","CHANGE_COMMAND_EXP","CHANGE_ATTRIB_EXP","CHANGE_ATTRIB_VAR","MOVE_COMMAND","ENTER_CHANGE_VAR_NAME","ENTER_CHANGE_VAR_VALUE","ENTER_CHANGE_GLOBAL_NAME","ENTER_CHANGE_GLOBAL_VALUE","ENTER_CHANGE_PARAM_NAME","registerClick","details","registerUserEvent","command","registerEvent","registerSystemEvent","tag","getLogs","setRebuildMode","getLogsAsString","parseLogs","logData","toChar","debug","toReal","toBool","instance","bool","autoGenerateTestCaseOutput","program_text","copyTestCases","assign","analyseFromSource","resultList","InputTest","exec","result_final","inputList","showAlert","outputGenerated","CodeEditorMode","CodeMirror","indented","align","pushContext","state","indent","popContext","typeBefore","stream","prevToken","string","slice","typeAtEndOfLine","indentation","isTopScope","contains","words","word","propertyIsEnumerable","tokenComment","maybeEnd","ch","tokenize","defineMode","config","parserConfig","indentUnit","statementIndentUnit","dontAlignCalls","keywords","switchKeyword","caseKeyword","defaultKeyword","caseRegex","builtin","blockKeywords","defKeywords","atoms","hooks","multiLineStrings","indentStatements","namespaceSeparator","isPunctuationChar","numberStart","number","isOperatorChar","isIdentifierChar","isReservedIdentifier","curPunc","isDefKeyword","tokenString","tokenBase","backUp","eat","skipToEnd","eatWhile","cur","current","quote","escaped","maybeEOL","typeFirstDefinitions","eol","startState","basecolumn","startOfLine","ctx","sol","eatSpace","styleDefs","textAfter","Pass","firstChar","closing","dontIndentStatements","hook","switchBlock","allmanIndentation","caseTestRegex","electricInput","blockCommentStart","blockCommentEnd","blockCommentContinue","lineComment","fold","codeConfig","getCodeEditorModeConfig","ivprogKeywords","basicTypes","ivprogTypes","ivprogBlockKeywords","blocks","ivprogDefKeywords","def","mimes","prop","helperType","registerHelper","defineMIME","switchString","case_default","modeProps","parseActivityData","algorithm_in_ilm","logs","Maybe","none","prepareActivityToStudentHelper","ilm_cont","maybe_content","testcases","setTestCases","prog_type","settings_programming_type","settingsProgrammingType","settingsDataTypes","settings_data_types","settingsCommands","settings_commands","settingsFunctions","settings_functions","algorithmInIlm","settingsFilter","settings_filter","compareArray","b","elementA","elementB","compareTestcases","original","student","elementO","elementS","autoEval","originalData","callback","code","generate","getOrElse","getTestCases","con","TestConsole","autoAssessment","runTest","DIFF_DELETE","DIFF_INSERT","DIFF_EQUAL","diff_main","text1","text2","cursor_pos","_fix_unicode","editdiff","find_cursor_edit_diff","commonlength","diff_commonPrefix","commonprefix","diff_commonSuffix","commonsuffix","diffs","diff_compute_","unshift","diff_cleanupMerge","longtext","shorttext","hm","diff_halfMatch_","text1_a","text1_b","text2_a","text2_b","mid_common","diffs_a","diffs_b","diff_bisect_","text1_length","text2_length","max_d","ceil","v_offset","v_length","v1","v2","delta","front","k1start","k1end","k2start","k2end","d","k1","k1_offset","x1","y1","k2_offset","x2","diff_bisectSplit_","k2","y2","text1a","text2a","text1b","text2b","diffsb","pointermin","pointermax","pointermid","pointerstart","is_surrogate_pair_start","pointerend","is_surrogate_pair_end","diff_halfMatchI_","best_common","best_longtext_a","best_longtext_b","best_shorttext_a","best_shorttext_b","prefixLength","suffixLength","hm1","hm2","fix_unicode","pointer","count_delete","count_insert","text_delete","text_insert","previous_equality","ends_with_pair_start","stray","k","starts_with_pair_end","changes","charCode","remove_empty_tuples","tuples","ret","make_edit_splice","before","oldMiddle","newMiddle","after","oldText","newText","oldRange","newRange","oldLength","newLength","oldCursor","oldBefore","oldAfter","maybeNewCursor","editBefore","newCursor","newBefore","newAfter","oldPrefix","newPrefix","editAfter","cursor","oldSuffix","newSuffix","replaceRange","_type","scrollIt","destination","duration","easing","easings","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","pageYOffset","startTime","performance","getTime","documentHeight","body","offsetHeight","documentElement","clientHeight","windowHeight","innerHeight","getElementsByTagName","destinationOffset","offsetTop","destinationOffsetToScroll","round","scroll","timeFunction","requestAnimationFrame","isElementInViewport","el","rect","getBoundingClientRect","bottom","innerWidth","clientWidth","cacheMainList","cacheOp","fillCache","mainList","nullLexer","logicOpList","lOp","isKeyword","isValidIdentifier","identifier_str","validRegex","blockList","keywordsList","typeList","atomList","win","openAssessmentDetail","preventDefault","page_code","currentTarget","dataset","close","open","range","startAt","keys","sleep","ms","res","setTimeout","block_render","renderAlgorithm","draging","children","off","empty","program_obj","FunctionsManagement","globals","GlobalsManagement","blockAllEditingOptions","remove","globalsCode","has_error","n_code","functionsCode","function_obj","return_type","TEXT","return_dimensions","is_main","parameters_list","parametersCode","variables_list","variablesCode","commandsCode","command_obj","Models","breaksCode","comment","commentsCode","reader","readersCode","writer","writersCode","functioncall","functioncallsCode","attribution","attributionsCode","whiletrue","whiletruesCode","dowhiletrue","doWhilesCode","iftrue","iftruesCode","repeatNtimes","repeatNtimesCode","switchsCode","returnsCode","variable_value_menu","elementExpressionCode","_command_obj","variableValueMenuCode","switchcasesCode","switchcase","commands_block","var_attribution","expression1","expression2","expression3","itens","dom_object","commands_else","logicExpressionCode","first_operand","exp_logic","exp_arithmetic","arithmeticExpressionCode","operator","equals_to","not_equals_to","second_operand","greater_than","less_than","greater_than_or_equals_to","less_than_or_equals_to","expression_obj","type_op","item","multiplication","division","module","write_sep","function_called","variable_obj","is_return","translateInternalFunction","row","isBackslash","newline","comment_text","parameter_obj","is_constant","rows","removeCommand","dom_obj","function_container_active","createFloatingCommand","function_container","command_type","mouse_event","floatingObject","BreaksManagement","CommentsManagement","ReadersManagement","WritersManagement","AttributionsManagement","IftruesManagement","RepeatNtimesManagement","WhiletruesManagement","DowhiletruesManagement","SwitchesManagement","FunctioncallsManagement","ReturnsManagement","draggable","appendTo","mouseup","evt","manageCommand","hasClass","originalEvent","srcElement","closest","on","addGhostDiv","elementFromPoint","clientX","clientY","ghostDiv","css","target","pageX","divx","pageY","trigger","active_container","addGhostToEmptyBlock","container","addGhostToNotEmptyBlock","is","containerIf","containerElse","topIfDistance","bottomIfDistance","height","topElseDistance","bottomElseDistance","addGhostToFunctionArea","allfilhos","topDistances","bottomDistances","topD","botD","menorTop","apply","indiceTop","menorBot","indiceBot","insertAfter","undermouse","borderMouseDragCommand","each","removeClass","objLeft","offset","objTop","objRight","width","objBottom","addClass","renderCommand","element_reference","before_after_inside","createdElement","genericCreateCommand","VariableValueMenuManagement","only_value","only_variable","only_function","sc","variable_and_function","dragTrash","trash","fadeIn","fadeOut","findSingleElement","searching","query","findPathRecursive","starter_index","hierarquia_bottom_up","index_command","full_path","hier","parentsUntil","esta_correto","esta_na_div_correta","new_cmd","findNearbyCommandToAddInFunctionScope","hier_find","is_correct_context","sub_elemento","findBeforeOrAfterCommandToAdd","insertCommandInBlockHierar","all_str_path","hier_dom","hier_obj","el_jq","command_parent","recentComand","findNearbyCommandToAddInBlockScope","addCommandToSwitchCase","findBeforeOrAfterCommandToAddInsertBlock","node_list_commands","all_sub","menor_distancia","elemento_menor_distancia","antes","t_bot","t_top","borda_inferior","command_target","temp_parent","is_in_else","d_top","d_bot","findInBlockCorrectPlace","insertCommandInBlock","correct_div","is_in_if","which_case","case_div","findInBlockCorrectPlaceInSwitchCase","VariableValueMenu","addHandlers","ExpressionManagement","manageExpressionElements","ref_object","menu_var_or_value","selectedItem","expression_element","index_to_move","exp_op_exp","op_exp","par_exp_par","renderExpressionElements","expression_div","command_container","renderElement","renderOperator","temp_op","index_op","context_menu","dropdown","onChange","$selectedItem","renderMenuAddExpression","dom_append_menu","expression_append_new_expression","type_exp","temp_exp_1","temp_exp_2","temp_exp","temp_par_1","temp_par_2","renderExpression","menu_add_item","menu_add_item_seq","index_temp","addMenuItens","divs_expression","attribution_dom","CommandsManagement","renderMenuOperations","variable_selected","createExpressionAround","break_dom","renderTextComment","comment_dom","initial_el_to_render","renderStartMenu","main_div","renderLogicExpression","renderArithmeticExpression","restartMenu","renderArithmeticOperator","all_expression","expression_arithmetic","arithmetic_operator","element_to_append","menu_operator","selected","renderLogicOperator","expression_logic","logic_operator","exp_el_par_1","exp_el_expr_el_1","exp_el_expr_operand","exp_el_expr_el_2","exp_el_par_2","start_menu","html","selectOnKeydown","renderMenu","dom_where_render","dom_command","menu_div","collapsed","toggle","addCaseToSwitch","SwitchManagement","ContextualizedMenu","GenericExpressionManagement","dowhiletrue_dom","functioncall_dom","timer","div_to_render","expression_array","WatchJS","unwatch","watch","s","types_included","exp_conditional","renderElements","open_or_close","lixeira","posX","posY","Sortable","create","animation","ghostClass","group","put","sort","onStart","onMove","onEnd","onAdd","removeElement","indice","first","opening","div_temp","renderFinalAddElements","renderParenthesis","renderStartAddOperator","renderOperatorMenu","renderAddParenthesis","parentheses_activate","addParentheses","delay","show","actual_target","renderGhostParentheses","floating","comando_que_esta","comando_certo","open_parentheses","close_parentheses","inserir_open","inserir_close","evts","is_correct","index_in_array","count_opened","count_closed","expression_content","position","ghost_parenthesis","menu_final","getArithmeticOperators","getLogicOperators","getRelationalOperators","div_higher","sera","is_last","button","getSeparator","_value","_text","arithmetic_operators","logic_operators","relational_operators","iftrue_dom","reader_dom","togglePasso","var_incrementation","cond_exp","manageClearExpressionElements","repeatNtimes_dom","return_dom","renderCase","casediv","switch_dom","VAR_OR_VALUE_TYPES","variable_and_value_opt","value_and_function","size_field","variable_and_value","input_field","inputWidth","textWidth","addVariablesToMenu","addFunctionsToMenu","addIVProgFunctionsToMenu","variable_fun","isVarInProgram","renderPreviousContent","appendSelectText","ret_function","isFunctionInProgram","function_called_obj","system_functions","var_obj","var_fun","parameters_menu","AttribuitionsManagement","variable_render","replaceAll","openInputToValue","sub_menu","math","arrangement","conversion","is_there","include_constant","openInputToFunction","openInputToVariable","RepeatNTimesManagement","tmpStr","function_selected","field","rendered","focusout","fn","font","fakeEl","attr","whiletrue_dom","addHandlersManager","_function_obj","_writer_dom","item_div","content_element","writer_dom","handle","random","newIndex","oldIndex","replaceWith","newlineBtn","setPopup","_addHandlerIconAdd","insert_after","after_which","icon_add_item","_event","div_parent_with_handler","new_div_item","new_related_menu","addHandlerIconAdd","addContent","_ref_object","_menu_var_or_value","_ref_object_content","counter_new_functions","counter_new_parameters","ivprog_version","VersionInfo","version","globalChangeListeners","functionsChangeListeners","_testCases","isRunning","studentGrade","mainFunction","function_comment","addFunction","generator","CodeManagement","runCodeAssessment","AlgorithmManagement","insertContext","watchW","addFunctionHandler","new_function","renderFunction","addParameter","new_parameter","renderParameter","updateReturnType","new_type","new_dimensions","removeFunction","minimizeFunction","is_hidden","enableNameFunctionUpdate","VariablesManagement","slideToggle","renderFunctionReturn","function_element","tm","cont","appender","function_index","updateSequenceLocals","addSortableHandler","updateSequenceParameters","teste","sticky","scrollContext","observeChanges","onStick","onBottom","onUnstick","onReposition","onScroll","isVisible","onTop","elementTop","elementHeight","containerTop","containerHeight","evento_drag","updateProgramObjDrag","nodes","start_index","path_target","index_each","path_relative","indice_na_raiz","is_in_case_switch","command_start_point","block_to_insert","command_in_drag","prepareDragHandler","id_function","n_group","itemEl","to","from","initVisualUI","showStopButton","runCode","showRunButton","stopExecution","toggleVisualCoding","toggleTextualCoding","is_iassign","toggleConsole","full_screen","time_show","listWithHandle","updateSequenceFunction","listGlobalsHandle","updateSequenceGlobals","strCode","settingsProgrammingTypes","TextEditor","getEvaluationCallback","scheduleCall","is_running","removeParameter","parameter_container","updateParameterType","function_name","__","enableNameParameterUpdate","updateParameterName","parameter_var","new_name","parameter_obj_dom","variableNameAlreadyExists","name_var","updateFunctionName","function_var","function_obj_dom","functionNameAlreadyExists","opened_name_parameter","opened_input_parameter","parent_node","select","opened_name_function","opened_input","previousPadding","addFunctionChangeListener","addGlobalChangeListener","removeGlobalListener","removeFunctionListener","scheduled_call","cancelPendingInputRequests","counter_new_globals","addGlobal","is_from_click","new_global","newe","renderGlobal","toggleConstant","global_var","updateName","global_obj_dom","globalNameAlreadyExists","global_name","updateType","updateInitialValues","removeGlobal","global_container","alternateBooleanGlobalValue","value_container","alternateBooleanGlobalVectorValue","removeGlobalColumnVector","addGlobalColumnVector","removeColumnGlobalMatrix","addColumnGlobalMatrix","removeLineGlobalMatrix","addLineGlobalMatrix","n_l","alternateBooleanGlobalMatrixValue","renderValues","enableGlobalValueUpdate","enableGlobalVectorValueUpdate","enableGlobalMatrixValueUpdate","updateColumnsAndRowsText","enableNameUpdate","ff","complete_element","opened_name_value_matrix_global_v","opened_input_value_matrix_global_v","parseFloat","parseInt","opened_name_value_global_var","opened_input_value_global_ar","changed","opened_name_global","opened_input_global","input_name","opened_name_value_vector_global_","opened_input_value_vector_global_","COMMAND_TYPES","ARITHMETIC_TYPES","EXPRESSION_ELEMENTS","start_point","EXPRESSION_TYPES","ARITHMETIC_COMPARISON","LOGIC_COMPARISON","SYSTEM_FUNCTIONS_CATEGORIES","Variable","SystemFunction","Comment","Reader","Writer","Attribution","ExpressionOperator","ExpressionElement","ConditionalExpression","LogicExpression","has_neg","ArithmeticExpression","IfTrue","RepeatNTimes","WhileTrue","DoWhileTrue","SwitchCase","FunctionCallMenu","Program","function_to_add","function_to_receive","codeEditor","theme","lineNumbers","matchBrackets","autoCloseBrackets","fixedGutter","styleActiveLine","setOption","refresh","setValue","getValue","renderErrorMessage","dom_obj_target","message_text","transition","closable","movePopup","boundary","preserve","className","onHidden","$module","counter_new_variables","addVariable","is_in_click","new_var","renderVariable","variable_obj_dom","removeVariable","variable_container","function_associated","variable_var","alternateBooleanValue","enableValueUpdate","alternateBooleanVectorValue","enableVectorValueUpdate","removeColumnVector","addColumnVector","removeColumnMatrix","addColumnMatrix","removeLineMatrix","addLineMatrix","alternateBooleanMatrixValue","enableMatrixValueUpdate"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;QACA,QAAQ,oBAAoB;QAC5B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA,iBAAiB,4BAA4B;QAC7C;QACA;QACA,kBAAkB,2BAA2B;QAC7C;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;QACA;QACA;QACA,gBAAgB,uBAAuB;QACvC;;;QAGA;QACA;QACA;QACA;;;;;;;;;;;;;;;;;;;;;;;ACvJA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B,EAAE;AAC/D,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA,8DAA8D,+DAA+D;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA,6BAA6B,OAAO;AACpC;AACA,aAAa,qBAAqB;AAClC;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,+BAA+B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AACA,oCAAoC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,uDAAuD,OAAO;AAC9D;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,OAAO;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;AAIA;;;;AAIA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;;AAGA,OAAO;AACP;A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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;AC5GY;AACb,8CAA8C,cAAc;AAC5D;AACA,gBAAgB,mBAAO,CAAC,qDAAqB;AAC7C,oBAAoB,mBAAO,CAAC,+CAAkB;AAC9C,oBAAoB,mBAAO,CAAC,6DAAyB;AACrD,iBAAiB,mBAAO,CAAC,2CAAgB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qCAAqC;AAChE;AACA,+BAA+B,sCAAsC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qCAAqC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrNa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;ACPD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAEA;AAIA;;AAOA,SAAS8sB,UAAT,CAAqB3nB,KAArB,EAA4B4nB,MAA5B,EAAoC;AAClC,OAAK,IAAMC,GAAX,IAAkBD,MAAlB,EAA0B;AACxB,QAAGjc,MAAM,CAACmc,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCJ,MAArC,EAA6CC,GAA7C,CAAH,EAAqD;AACnD,UAAID,MAAM,CAACC,GAAD,CAAN,KAAgB7nB,KAApB,EAA2B;AACzB,eAAO6nB,GAAP;AACD;AACF;AACF;;AACD,SAAO,IAAP;AACD;;AAED,SAASI,aAAT,GAAiC;AAC/B,MAAMlrB,MAAM,GAAG,EAAf;;AACA,OAAK,IA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc,+BAA+B,cAAc;AAC1F;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qBAAqB;AAC5D;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc,+BAA+B,cAAc;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9Qa;AACb,8CAA8C,cAAc;AAC5D;AACA,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7Da;AACb,8CAA8C,cAAc;AAC5D;AACA,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C,4BAA4B,mBAAO,CAAC,kFAA2B;AAC/D,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrIa;AACb,8CAA8C,cAAc;AAC5D;AACA,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3Ba;AACb,8CAA8C,cAAc;AAC5D;AACA,2BAA2B,mBAAO,CAAC,oEAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBa;AACb,8CAA8C,cAAc;AAC5D;AACA,qBAAqB,mBAAO,CAAC,qEAAgC;AAC7D,8BAA8B,mBAAO,CAAC,gFAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrFa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;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,GAPc,CASd;;AACAymB,uCAAiC,GAAG,KAApC;AACAC,wCAAkC,GAAG,KAArC;AACA;AACD,GAtDD;AAwDApO,aAAW,CAACsL,MAAZ;AACA,C","file":"main.d37a85f034d619e41454.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ivprogCore\"] = factory();\n\telse\n\t\troot[\"ivprogCore\"] = factory();\n})(window, function() {\nreturn "," \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"main\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonpivprogCore\"] = window[\"webpackJsonpivprogCore\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([\"./js/main.js\",\"vendors~main\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-184237bid74CzAZob/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00026\\u0207\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0004;\\t;\\u0004<\\t<\\u0004=\\t=\\u0004>\\t>\\u0004\",\n \"?\\t?\\u0004@\\t@\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\",\n \"\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\\u0003\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\",\n \"\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\",\n \"\\u0005\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\",\n \"\\u0006\\u0003\\u0006\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\\f\",\n \"\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\r\\u0003\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0013\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0014\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0019\\u0003\\u0019\\u0003\\u0019\\u0003\",\n \"\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\",\n \"\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\",\n \"\\u001d\\u0003\\u001d\\u0003\\u001e\\u0003\\u001e\\u0003\\u001e\\u0003\\u001e\\u0003\",\n \"\\u001f\\u0003\\u001f\\u0003\\u001f\\u0003 \\u0003 \\u0003!\\u0003!\\u0003\\\"\\u0003\",\n \"\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003%\\u0003&\\u0003&\\u0003\\'\\u0003\",\n \"\\'\\u0003(\\u0003(\\u0003(\\u0005(\\u0148\\n(\\u0003)\\u0003)\\u0003*\\u0003*\",\n \"\\u0003+\\u0003+\\u0003,\\u0003,\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003\",\n \"-\\u0003-\\u0003-\\u0003-\\u0005-\\u015b\\n-\\u0003.\\u0003.\\u0003/\\u0003/\\u0003\",\n \"0\\u00030\\u00070\\u0163\\n0\\f0\\u000e0\\u0166\\u000b0\\u00031\\u00031\\u0003\",\n \"1\\u00031\\u00032\\u00062\\u016d\\n2\\r2\\u000e2\\u016e\\u00032\\u00032\\u0003\",\n \"2\\u00032\\u00052\\u0175\\n2\\u00032\\u00062\\u0178\\n2\\r2\\u000e2\\u0179\\u0003\",\n \"2\\u00032\\u00032\\u00032\\u00052\\u0180\\n2\\u00032\\u00062\\u0183\\n2\\r2\\u000e\",\n \"2\\u0184\\u00052\\u0187\\n2\\u00033\\u00063\\u018a\\n3\\r3\\u000e3\\u018b\\u0003\",\n \"3\\u00033\\u00063\\u0190\\n3\\r3\\u000e3\\u0191\\u00033\\u00063\\u0195\\n3\\r3\\u000e\",\n \"3\\u0196\\u00033\\u00033\\u00073\\u019b\\n3\\f3\\u000e3\\u019e\\u000b3\\u00033\",\n \"\\u00053\\u01a1\\n3\\u00034\\u00034\\u00054\\u01a5\\n4\\u00034\\u00064\\u01a8\\n\",\n \"4\\r4\\u000e4\\u01a9\\u00035\\u00035\\u00075\\u01ae\\n5\\f5\\u000e5\\u01b1\\u000b\",\n \"5\\u00035\\u00035\\u00036\\u00036\\u00056\\u01b7\\n6\\u00037\\u00037\\u00037\\u0005\",\n \"7\\u01bc\\n7\\u00037\\u00037\\u00038\\u00038\\u00038\\u00038\\u00039\\u00039\\u0003\",\n \":\\u0006:\\u01c7\\n:\\r:\\u000e:\\u01c8\\u0003:\\u0005:\\u01cc\\n:\\u0003;\\u0003\",\n \";\\u0003<\\u0003<\\u0003=\\u0003=\\u0003=\\u0003=\\u0005=\\u01d6\\n=\\u0003>\\u0003\",\n \">\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0005\",\n \">\\u01e3\\n>\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003@\\u0003\",\n \"@\\u0003@\\u0003@\\u0007@\\u01f0\\n@\\f@\\u000e@\\u01f3\\u000b@\\u0003@\\u0005\",\n \"@\\u01f6\\n@\\u0003@\\u0003@\\u0003@\\u0003@\\u0003@\\u0007@\\u01fd\\n@\\f@\\u000e\",\n \"@\\u0200\\u000b@\\u0003@\\u0003@\\u0005@\\u0204\\n@\\u0003@\\u0003@\\u0003\\u01fe\",\n \"\\u0002A\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\\t\\u0006\\u000b\\u0007\\r\\b\",\n \"\\u000f\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\\u0019\\u000e\\u001b\\u000f\",\n \"\\u001d\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\\'\\u0015)\\u0016+\\u0017\",\n \"-\\u0018/\\u00191\\u001a3\\u001b5\\u001c7\\u001d9\\u0002;\\u0002=\\u0002?\\u001e\",\n \"A\\u001fC E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[,]-_.a/c0e1g\\u0002i2k\\u0002m3o4q\\u0002\",\n \"s5u\\u0002w\\u0002y\\u0002{\\u0002}\\u0002\\u007f6\\u0003\\u0002\\u0012\\u0004\",\n \"\\u0002--//\\u0005\\u0002\\'\\',,11\\u0004\\u0002>>@@\\u0005\\u0002C\\\\aac|\\u0006\",\n \"\\u00022;C\\\\aac|\\u0003\\u00022;\\u0003\\u000223\\u0004\\u0002GGgg\\u0006\\u0002\",\n \"\\f\\f\\u000f\\u000f$$^^\\u0006\\u0002\\f\\f\\u000f\\u000f))^^\\u0004\\u0002\\u000b\",\n \"\\u000b\\\"\\\"\\u0004\\u0002\\f\\f\\u000f\\u000f\\u0005\\u00022;CHch\\u0003\\u0002\",\n \"29\\n\\u0002$$))^^ddhhppttvv\\u0003\\u000225\\u0002\\u021c\\u0002\\u0003\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\\u0002\\u0002\\u0007\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\t\\u0003\\u0002\\u0002\\u0002\\u0002\\u000b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\r\\u0003\\u0002\\u0002\\u0002\\u0002\\u000f\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\\u0002\\u0002\\u0013\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\\u0002\\u0002\\u0017\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\\u0002\\u0002\\u001b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\\u0002\\u0002\\u001f\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002!\\u0003\\u0002\\u0002\\u0002\\u0002#\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002%\\u0003\\u0002\\u0002\\u0002\\u0002\\'\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002)\\u0003\\u0002\\u0002\\u0002\\u0002+\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002-\\u0003\\u0002\\u0002\\u0002\\u0002/\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"1\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\\u0002\\u0002\\u0002\\u00025\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\\u0002\\u0002\\u0002?\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002A\\u0003\\u0002\\u0002\\u0002\\u0002C\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002E\\u0003\\u0002\\u0002\\u0002\\u0002G\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002I\\u0003\\u0002\\u0002\\u0002\\u0002K\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"M\\u0003\\u0002\\u0002\\u0002\\u0002O\\u0003\\u0002\\u0002\\u0002\\u0002Q\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002S\\u0003\\u0002\\u0002\\u0002\\u0002U\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002W\\u0003\\u0002\\u0002\\u0002\\u0002Y\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002[\\u0003\\u0002\\u0002\\u0002\\u0002]\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002_\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"c\\u0003\\u0002\\u0002\\u0002\\u0002e\\u0003\\u0002\\u0002\\u0002\\u0002i\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002m\\u0003\\u0002\\u0002\\u0002\\u0002o\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002s\\u0003\\u0002\\u0002\\u0002\\u0002\\u007f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0003\\u0081\\u0003\\u0002\\u0002\\u0002\\u0005\\u0089\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0007\\u008e\\u0003\\u0002\\u0002\\u0002\\t\\u0093\\u0003\\u0002\",\n \"\\u0002\\u0002\\u000b\\u0098\\u0003\\u0002\\u0002\\u0002\\r\\u009f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u000f\\u00a3\\u0003\\u0002\\u0002\\u0002\\u0011\\u00a8\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0013\\u00af\\u0003\\u0002\\u0002\\u0002\\u0015\\u00b4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0017\\u00be\\u0003\\u0002\\u0002\\u0002\\u0019\\u00c4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u001b\\u00cd\\u0003\\u0002\\u0002\\u0002\\u001d\\u00d4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u001f\\u00d8\\u0003\\u0002\\u0002\\u0002!\\u00e3\\u0003\\u0002\",\n \"\\u0002\\u0002#\\u00e8\\u0003\\u0002\\u0002\\u0002%\\u00eb\\u0003\\u0002\\u0002\",\n \"\\u0002\\'\\u00f0\\u0003\\u0002\\u0002\\u0002)\\u00f6\\u0003\\u0002\\u0002\\u0002\",\n \"+\\u00fd\\u0003\\u0002\\u0002\\u0002-\\u0103\\u0003\\u0002\\u0002\\u0002/\\u0109\",\n \"\\u0003\\u0002\\u0002\\u00021\\u0116\\u0003\\u0002\\u0002\\u00023\\u0119\\u0003\",\n \"\\u0002\\u0002\\u00025\\u011e\\u0003\\u0002\\u0002\\u00027\\u0124\\u0003\\u0002\",\n \"\\u0002\\u00029\\u0129\\u0003\\u0002\\u0002\\u0002;\\u012d\\u0003\\u0002\\u0002\",\n \"\\u0002=\\u0131\\u0003\\u0002\\u0002\\u0002?\\u0134\\u0003\\u0002\\u0002\\u0002\",\n \"A\\u0136\\u0003\\u0002\\u0002\\u0002C\\u0138\\u0003\\u0002\\u0002\\u0002E\\u013a\",\n \"\\u0003\\u0002\\u0002\\u0002G\\u013c\\u0003\\u0002\\u0002\\u0002I\\u013e\\u0003\",\n \"\\u0002\\u0002\\u0002K\\u0140\\u0003\\u0002\\u0002\\u0002M\\u0142\\u0003\\u0002\",\n \"\\u0002\\u0002O\\u0147\\u0003\\u0002\\u0002\\u0002Q\\u0149\\u0003\\u0002\\u0002\",\n \"\\u0002S\\u014b\\u0003\\u0002\\u0002\\u0002U\\u014d\\u0003\\u0002\\u0002\\u0002\",\n \"W\\u014f\\u0003\\u0002\\u0002\\u0002Y\\u015a\\u0003\\u0002\\u0002\\u0002[\\u015c\",\n \"\\u0003\\u0002\\u0002\\u0002]\\u015e\\u0003\\u0002\\u0002\\u0002_\\u0160\\u0003\",\n \"\\u0002\\u0002\\u0002a\\u0167\\u0003\\u0002\\u0002\\u0002c\\u0186\\u0003\\u0002\",\n \"\\u0002\\u0002e\\u01a0\\u0003\\u0002\\u0002\\u0002g\\u01a2\\u0003\\u0002\\u0002\",\n \"\\u0002i\\u01ab\\u0003\\u0002\\u0002\\u0002k\\u01b6\\u0003\\u0002\\u0002\\u0002\",\n \"m\\u01b8\\u0003\\u0002\\u0002\\u0002o\\u01bf\\u0003\\u0002\\u0002\\u0002q\\u01c3\",\n \"\\u0003\\u0002\\u0002\\u0002s\\u01cb\\u0003\\u0002\\u0002\\u0002u\\u01cd\\u0003\",\n \"\\u0002\\u0002\\u0002w\\u01cf\\u0003\\u0002\\u0002\\u0002y\\u01d5\\u0003\\u0002\",\n \"\\u0002\\u0002{\\u01e2\\u0003\\u0002\\u0002\\u0002}\\u01e4\\u0003\\u0002\\u0002\",\n \"\\u0002\\u007f\\u0203\\u0003\\u0002\\u0002\\u0002\\u0081\\u0082\\u0007r\\u0002\",\n \"\\u0002\\u0082\\u0083\\u0007t\\u0002\\u0002\\u0083\\u0084\\u0007q\\u0002\\u0002\",\n \"\\u0084\\u0085\\u0007i\\u0002\\u0002\\u0085\\u0086\\u0007t\\u0002\\u0002\\u0086\",\n \"\\u0087\\u0007c\\u0002\\u0002\\u0087\\u0088\\u0007o\\u0002\\u0002\\u0088\\u0004\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0089\\u008a\\u0007t\\u0002\\u0002\\u008a\\u008b\",\n \"\\u0007g\\u0002\\u0002\\u008b\\u008c\\u0007c\\u0002\\u0002\\u008c\\u008d\\u0007\",\n \"n\\u0002\\u0002\\u008d\\u0006\\u0003\\u0002\\u0002\\u0002\\u008e\\u008f\\u0007\",\n \"x\\u0002\\u0002\\u008f\\u0090\\u0007q\\u0002\\u0002\\u0090\\u0091\\u0007k\\u0002\",\n \"\\u0002\\u0091\\u0092\\u0007f\\u0002\\u0002\\u0092\\b\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0093\\u0094\\u0007d\\u0002\\u0002\\u0094\\u0095\\u0007q\\u0002\\u0002\\u0095\",\n \"\\u0096\\u0007q\\u0002\\u0002\\u0096\\u0097\\u0007n\\u0002\\u0002\\u0097\\n\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0098\\u0099\\u0007u\\u0002\\u0002\\u0099\\u009a\\u0007\",\n \"v\\u0002\\u0002\\u009a\\u009b\\u0007t\\u0002\\u0002\\u009b\\u009c\\u0007k\\u0002\",\n \"\\u0002\\u009c\\u009d\\u0007p\\u0002\\u0002\\u009d\\u009e\\u0007i\\u0002\\u0002\",\n \"\\u009e\\f\\u0003\\u0002\\u0002\\u0002\\u009f\\u00a0\\u0007k\\u0002\\u0002\\u00a0\",\n \"\\u00a1\\u0007p\\u0002\\u0002\\u00a1\\u00a2\\u0007v\\u0002\\u0002\\u00a2\\u000e\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00a3\\u00a4\\u0007e\\u0002\\u0002\\u00a4\\u00a5\",\n \"\\u0007j\\u0002\\u0002\\u00a5\\u00a6\\u0007c\\u0002\\u0002\\u00a6\\u00a7\\u0007\",\n \"t\\u0002\\u0002\\u00a7\\u0010\\u0003\\u0002\\u0002\\u0002\\u00a8\\u00a9\\u0007\",\n \"u\\u0002\\u0002\\u00a9\\u00aa\\u0007y\\u0002\\u0002\\u00aa\\u00ab\\u0007k\\u0002\",\n \"\\u0002\\u00ab\\u00ac\\u0007v\\u0002\\u0002\\u00ac\\u00ad\\u0007e\\u0002\\u0002\",\n \"\\u00ad\\u00ae\\u0007j\\u0002\\u0002\\u00ae\\u0012\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007e\\u0002\\u0002\\u00b0\\u00b1\\u0007c\\u0002\\u0002\\u00b1\",\n \"\\u00b2\\u0007u\\u0002\\u0002\\u00b2\\u00b3\\u0007g\\u0002\\u0002\\u00b3\\u0014\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00b4\\u00b5\\u0007q\\u0002\\u0002\\u00b5\\u00b6\",\n \"\\u0007v\\u0002\\u0002\\u00b6\\u00b7\\u0007j\\u0002\\u0002\\u00b7\\u00b8\\u0007\",\n \"g\\u0002\\u0002\\u00b8\\u00b9\\u0007t\\u0002\\u0002\\u00b9\\u00ba\\u0007y\\u0002\",\n \"\\u0002\\u00ba\\u00bb\\u0007k\\u0002\\u0002\\u00bb\\u00bc\\u0007u\\u0002\\u0002\",\n \"\\u00bc\\u00bd\\u0007g\\u0002\\u0002\\u00bd\\u0016\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007e\\u0002\\u0002\\u00bf\\u00c0\\u0007q\\u0002\\u0002\\u00c0\",\n \"\\u00c1\\u0007p\\u0002\\u0002\\u00c1\\u00c2\\u0007u\\u0002\\u0002\\u00c2\\u00c3\",\n \"\\u0007v\\u0002\\u0002\\u00c3\\u0018\\u0003\\u0002\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007h\\u0002\\u0002\\u00c5\\u00c6\\u0007w\\u0002\\u0002\\u00c6\\u00c7\\u0007\",\n \"p\\u0002\\u0002\\u00c7\\u00c8\\u0007e\\u0002\\u0002\\u00c8\\u00c9\\u0007v\\u0002\",\n \"\\u0002\\u00c9\\u00ca\\u0007k\\u0002\\u0002\\u00ca\\u00cb\\u0007q\\u0002\\u0002\",\n \"\\u00cb\\u00cc\\u0007p\\u0002\\u0002\\u00cc\\u001a\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00cd\\u00ce\\u0007t\\u0002\\u0002\\u00ce\\u00cf\\u0007g\\u0002\\u0002\\u00cf\",\n \"\\u00d0\\u0007v\\u0002\\u0002\\u00d0\\u00d1\\u0007w\\u0002\\u0002\\u00d1\\u00d2\",\n \"\\u0007t\\u0002\\u0002\\u00d2\\u00d3\\u0007p\\u0002\\u0002\\u00d3\\u001c\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00d4\\u00d5\\u0007h\\u0002\\u0002\\u00d5\\u00d6\\u0007\",\n \"q\\u0002\\u0002\\u00d6\\u00d7\\u0007t\\u0002\\u0002\\u00d7\\u001e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00d8\\u00d9\\u0007t\\u0002\\u0002\\u00d9\\u00da\\u0007g\\u0002\",\n \"\\u0002\\u00da\\u00db\\u0007r\\u0002\\u0002\\u00db\\u00dc\\u0007g\\u0002\\u0002\",\n \"\\u00dc\\u00dd\\u0007c\\u0002\\u0002\\u00dd\\u00de\\u0007v\\u0002\\u0002\\u00de\",\n \"\\u00df\\u0007a\\u0002\\u0002\\u00df\\u00e0\\u0007h\\u0002\\u0002\\u00e0\\u00e1\",\n \"\\u0007q\\u0002\\u0002\\u00e1\\u00e2\\u0007t\\u0002\\u0002\\u00e2 \\u0003\\u0002\",\n \"\\u0002\\u0002\\u00e3\\u00e4\\u0007h\\u0002\\u0002\\u00e4\\u00e5\\u0007t\\u0002\",\n \"\\u0002\\u00e5\\u00e6\\u0007q\\u0002\\u0002\\u00e6\\u00e7\\u0007o\\u0002\\u0002\",\n \"\\u00e7\\\"\\u0003\\u0002\\u0002\\u0002\\u00e8\\u00e9\\u0007v\\u0002\\u0002\\u00e9\",\n \"\\u00ea\\u0007q\\u0002\\u0002\\u00ea$\\u0003\\u0002\\u0002\\u0002\\u00eb\\u00ec\",\n \"\\u0007r\\u0002\\u0002\\u00ec\\u00ed\\u0007c\\u0002\\u0002\\u00ed\\u00ee\\u0007\",\n \"u\\u0002\\u0002\\u00ee\\u00ef\\u0007u\\u0002\\u0002\\u00ef&\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00f0\\u00f1\\u0007d\\u0002\\u0002\\u00f1\\u00f2\\u0007t\\u0002\\u0002\",\n \"\\u00f2\\u00f3\\u0007g\\u0002\\u0002\\u00f3\\u00f4\\u0007c\\u0002\\u0002\\u00f4\",\n \"\\u00f5\\u0007m\\u0002\\u0002\\u00f5(\\u0003\\u0002\\u0002\\u0002\\u00f6\\u00f7\",\n \"\\u0007t\\u0002\\u0002\\u00f7\\u00f8\\u0007g\\u0002\\u0002\\u00f8\\u00f9\\u0007\",\n \"r\\u0002\\u0002\\u00f9\\u00fa\\u0007g\\u0002\\u0002\\u00fa\\u00fb\\u0007c\\u0002\",\n \"\\u0002\\u00fb\\u00fc\\u0007v\\u0002\\u0002\\u00fc*\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00fd\\u00fe\\u0007w\\u0002\\u0002\\u00fe\\u00ff\\u0007p\\u0002\\u0002\\u00ff\",\n \"\\u0100\\u0007v\\u0002\\u0002\\u0100\\u0101\\u0007k\\u0002\\u0002\\u0101\\u0102\",\n \"\\u0007n\\u0002\\u0002\\u0102,\\u0003\\u0002\\u0002\\u0002\\u0103\\u0104\\u0007\",\n \"y\\u0002\\u0002\\u0104\\u0105\\u0007j\\u0002\\u0002\\u0105\\u0106\\u0007k\\u0002\",\n \"\\u0002\\u0106\\u0107\\u0007n\\u0002\\u0002\\u0107\\u0108\\u0007g\\u0002\\u0002\",\n \"\\u0108.\\u0003\\u0002\\u0002\\u0002\\u0109\\u010a\\u0007t\\u0002\\u0002\\u010a\",\n \"\\u010b\\u0007g\\u0002\\u0002\\u010b\\u010c\\u0007r\\u0002\\u0002\\u010c\\u010d\",\n \"\\u0007g\\u0002\\u0002\\u010d\\u010e\\u0007c\\u0002\\u0002\\u010e\\u010f\\u0007\",\n \"v\\u0002\\u0002\\u010f\\u0110\\u0007a\\u0002\\u0002\\u0110\\u0111\\u0007y\\u0002\",\n \"\\u0002\\u0111\\u0112\\u0007j\\u0002\\u0002\\u0112\\u0113\\u0007k\\u0002\\u0002\",\n \"\\u0113\\u0114\\u0007n\\u0002\\u0002\\u0114\\u0115\\u0007g\\u0002\\u0002\\u0115\",\n \"0\\u0003\\u0002\\u0002\\u0002\\u0116\\u0117\\u0007k\\u0002\\u0002\\u0117\\u0118\",\n \"\\u0007h\\u0002\\u0002\\u01182\\u0003\\u0002\\u0002\\u0002\\u0119\\u011a\\u0007\",\n \"g\\u0002\\u0002\\u011a\\u011b\\u0007n\\u0002\\u0002\\u011b\\u011c\\u0007u\\u0002\",\n \"\\u0002\\u011c\\u011d\\u0007g\\u0002\\u0002\\u011d4\\u0003\\u0002\\u0002\\u0002\",\n \"\\u011e\\u011f\\u0007h\\u0002\\u0002\\u011f\\u0120\\u0007c\\u0002\\u0002\\u0120\",\n \"\\u0121\\u0007n\\u0002\\u0002\\u0121\\u0122\\u0007u\\u0002\\u0002\\u0122\\u0123\",\n \"\\u0007g\\u0002\\u0002\\u01236\\u0003\\u0002\\u0002\\u0002\\u0124\\u0125\\u0007\",\n \"v\\u0002\\u0002\\u0125\\u0126\\u0007t\\u0002\\u0002\\u0126\\u0127\\u0007w\\u0002\",\n \"\\u0002\\u0127\\u0128\\u0007g\\u0002\\u0002\\u01288\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0129\\u012a\\u0007p\\u0002\\u0002\\u012a\\u012b\\u0007q\\u0002\\u0002\\u012b\",\n \"\\u012c\\u0007v\\u0002\\u0002\\u012c:\\u0003\\u0002\\u0002\\u0002\\u012d\\u012e\",\n \"\\u0007C\\u0002\\u0002\\u012e\\u012f\\u0007P\\u0002\\u0002\\u012f\\u0130\\u0007\",\n \"F\\u0002\\u0002\\u0130<\\u0003\\u0002\\u0002\\u0002\\u0131\\u0132\\u0007Q\\u0002\",\n \"\\u0002\\u0132\\u0133\\u0007T\\u0002\\u0002\\u0133>\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0134\\u0135\\u0007(\\u0002\\u0002\\u0135@\\u0003\\u0002\\u0002\\u0002\\u0136\",\n \"\\u0137\\u0007*\\u0002\\u0002\\u0137B\\u0003\\u0002\\u0002\\u0002\\u0138\\u0139\",\n \"\\u0007+\\u0002\\u0002\\u0139D\\u0003\\u0002\\u0002\\u0002\\u013a\\u013b\\u0007\",\n \"]\\u0002\\u0002\\u013bF\\u0003\\u0002\\u0002\\u0002\\u013c\\u013d\\u0007_\\u0002\",\n \"\\u0002\\u013dH\\u0003\\u0002\\u0002\\u0002\\u013e\\u013f\\u0007}\\u0002\\u0002\",\n \"\\u013fJ\\u0003\\u0002\\u0002\\u0002\\u0140\\u0141\\u0007\\u007f\\u0002\\u0002\",\n \"\\u0141L\\u0003\\u0002\\u0002\\u0002\\u0142\\u0143\\u0007.\\u0002\\u0002\\u0143\",\n \"N\\u0003\\u0002\\u0002\\u0002\\u0144\\u0145\\u0007>\\u0002\\u0002\\u0145\\u0148\",\n \"\\u0007/\\u0002\\u0002\\u0146\\u0148\\u0007\\u2192\\u0002\\u0002\\u0147\\u0144\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0147\\u0146\\u0003\\u0002\\u0002\\u0002\\u0148P\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0149\\u014a\\t\\u0002\\u0002\\u0002\\u014aR\\u0003\",\n \"\\u0002\\u0002\\u0002\\u014b\\u014c\\t\\u0003\\u0002\\u0002\\u014cT\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014d\\u014e\\u0005;\\u001e\\u0002\\u014eV\\u0003\\u0002\\u0002\",\n \"\\u0002\\u014f\\u0150\\u0005=\\u001f\\u0002\\u0150X\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0151\\u0152\\u0007@\\u0002\\u0002\\u0152\\u015b\\u0007?\\u0002\\u0002\\u0153\",\n \"\\u0154\\u0007?\\u0002\\u0002\\u0154\\u015b\\u0007?\\u0002\\u0002\\u0155\\u0156\",\n \"\\u0007>\\u0002\\u0002\\u0156\\u015b\\u0007?\\u0002\\u0002\\u0157\\u015b\\t\\u0004\",\n \"\\u0002\\u0002\\u0158\\u0159\\u0007#\\u0002\\u0002\\u0159\\u015b\\u0007?\\u0002\",\n \"\\u0002\\u015a\\u0151\\u0003\\u0002\\u0002\\u0002\\u015a\\u0153\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015a\\u0155\\u0003\\u0002\\u0002\\u0002\\u015a\\u0157\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015a\\u0158\\u0003\\u0002\\u0002\\u0002\\u015bZ\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015c\\u015d\\u0007<\\u0002\\u0002\\u015d\\\\\\u0003\\u0002\\u0002\\u0002\",\n \"\\u015e\\u015f\\u00059\\u001d\\u0002\\u015f^\\u0003\\u0002\\u0002\\u0002\\u0160\",\n \"\\u0164\\t\\u0005\\u0002\\u0002\\u0161\\u0163\\t\\u0006\\u0002\\u0002\\u0162\\u0161\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0163\\u0166\\u0003\\u0002\\u0002\\u0002\\u0164\\u0162\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0164\\u0165\\u0003\\u0002\\u0002\\u0002\\u0165`\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0166\\u0164\\u0003\\u0002\\u0002\\u0002\\u0167\\u0168\",\n \"\\u0005_0\\u0002\\u0168\\u0169\\u00070\\u0002\\u0002\\u0169\\u016a\\u0005_0\\u0002\",\n \"\\u016ab\\u0003\\u0002\\u0002\\u0002\\u016b\\u016d\\t\\u0007\\u0002\\u0002\\u016c\",\n \"\\u016b\\u0003\\u0002\\u0002\\u0002\\u016d\\u016e\\u0003\\u0002\\u0002\\u0002\\u016e\",\n \"\\u016c\\u0003\\u0002\\u0002\\u0002\\u016e\\u016f\\u0003\\u0002\\u0002\\u0002\\u016f\",\n \"\\u0187\\u0003\\u0002\\u0002\\u0002\\u0170\\u0171\\u00072\\u0002\\u0002\\u0171\",\n \"\\u0175\\u0007z\\u0002\\u0002\\u0172\\u0173\\u00072\\u0002\\u0002\\u0173\\u0175\",\n \"\\u0007Z\\u0002\\u0002\\u0174\\u0170\\u0003\\u0002\\u0002\\u0002\\u0174\\u0172\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0175\\u0177\\u0003\\u0002\\u0002\\u0002\\u0176\\u0178\",\n \"\\u0005u;\\u0002\\u0177\\u0176\\u0003\\u0002\\u0002\\u0002\\u0178\\u0179\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0179\\u0177\\u0003\\u0002\\u0002\\u0002\\u0179\\u017a\\u0003\",\n \"\\u0002\\u0002\\u0002\\u017a\\u0187\\u0003\\u0002\\u0002\\u0002\\u017b\\u017c\\u0007\",\n \"2\\u0002\\u0002\\u017c\\u0180\\u0007d\\u0002\\u0002\\u017d\\u017e\\u00072\\u0002\",\n \"\\u0002\\u017e\\u0180\\u0007D\\u0002\\u0002\\u017f\\u017b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u017f\\u017d\\u0003\\u0002\\u0002\\u0002\\u0180\\u0182\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0181\\u0183\\t\\b\\u0002\\u0002\\u0182\\u0181\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0183\\u0184\\u0003\\u0002\\u0002\\u0002\\u0184\\u0182\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0184\\u0185\\u0003\\u0002\\u0002\\u0002\\u0185\\u0187\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0186\\u016c\\u0003\\u0002\\u0002\\u0002\\u0186\\u0174\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0186\\u017f\\u0003\\u0002\\u0002\\u0002\\u0187d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0188\\u018a\\t\\u0007\\u0002\\u0002\\u0189\\u0188\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018a\\u018b\\u0003\\u0002\\u0002\\u0002\\u018b\\u0189\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018b\\u018c\\u0003\\u0002\\u0002\\u0002\\u018c\\u018d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018d\\u018f\\u00070\\u0002\\u0002\\u018e\\u0190\\t\\u0007\\u0002\\u0002\\u018f\",\n \"\\u018e\\u0003\\u0002\\u0002\\u0002\\u0190\\u0191\\u0003\\u0002\\u0002\\u0002\\u0191\",\n \"\\u018f\\u0003\\u0002\\u0002\\u0002\\u0191\\u0192\\u0003\\u0002\\u0002\\u0002\\u0192\",\n \"\\u01a1\\u0003\\u0002\\u0002\\u0002\\u0193\\u0195\\t\\u0007\\u0002\\u0002\\u0194\",\n \"\\u0193\\u0003\\u0002\\u0002\\u0002\\u0195\\u0196\\u0003\\u0002\\u0002\\u0002\\u0196\",\n \"\\u0194\\u0003\\u0002\\u0002\\u0002\\u0196\\u0197\\u0003\\u0002\\u0002\\u0002\\u0197\",\n \"\\u0198\\u0003\\u0002\\u0002\\u0002\\u0198\\u019c\\u00070\\u0002\\u0002\\u0199\",\n \"\\u019b\\t\\u0007\\u0002\\u0002\\u019a\\u0199\\u0003\\u0002\\u0002\\u0002\\u019b\",\n \"\\u019e\\u0003\\u0002\\u0002\\u0002\\u019c\\u019a\\u0003\\u0002\\u0002\\u0002\\u019c\",\n \"\\u019d\\u0003\\u0002\\u0002\\u0002\\u019d\\u019f\\u0003\\u0002\\u0002\\u0002\\u019e\",\n \"\\u019c\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a1\\u0005g4\\u0002\\u01a0\\u0189\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a0\\u0194\\u0003\\u0002\\u0002\\u0002\\u01a1f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a2\\u01a4\\t\\t\\u0002\\u0002\\u01a3\\u01a5\\t\\u0002\",\n \"\\u0002\\u0002\\u01a4\\u01a3\\u0003\\u0002\\u0002\\u0002\\u01a4\\u01a5\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01a5\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a8\\t\\u0007\",\n \"\\u0002\\u0002\\u01a7\\u01a6\\u0003\\u0002\\u0002\\u0002\\u01a8\\u01a9\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01a9\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a9\\u01aa\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01aah\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01af\\u0007$\\u0002\",\n \"\\u0002\\u01ac\\u01ae\\u0005k6\\u0002\\u01ad\\u01ac\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ae\\u01b1\\u0003\\u0002\\u0002\\u0002\\u01af\\u01ad\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01af\\u01b0\\u0003\\u0002\\u0002\\u0002\\u01b0\\u01b2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b2\\u01b3\\u0007$\\u0002\\u0002\",\n \"\\u01b3j\\u0003\\u0002\\u0002\\u0002\\u01b4\\u01b7\\n\\n\\u0002\\u0002\\u01b5\\u01b7\",\n \"\\u0005y=\\u0002\\u01b6\\u01b4\\u0003\\u0002\\u0002\\u0002\\u01b6\\u01b5\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b7l\\u0003\\u0002\\u0002\\u0002\\u01b8\\u01bb\\u0007\",\n \")\\u0002\\u0002\\u01b9\\u01bc\\u0005y=\\u0002\\u01ba\\u01bc\\n\\u000b\\u0002\\u0002\",\n \"\\u01bb\\u01b9\\u0003\\u0002\\u0002\\u0002\\u01bb\\u01ba\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01bc\\u01bd\\u0003\\u0002\\u0002\\u0002\\u01bd\\u01be\\u0007)\\u0002\\u0002\",\n \"\\u01ben\\u0003\\u0002\\u0002\\u0002\\u01bf\\u01c0\\t\\f\\u0002\\u0002\\u01c0\\u01c1\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01c1\\u01c2\\b8\\u0002\\u0002\\u01c2p\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01c3\\u01c4\\u0007=\\u0002\\u0002\\u01c4r\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01c5\\u01c7\\t\\r\\u0002\\u0002\\u01c6\\u01c5\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c7\\u01c8\\u0003\\u0002\\u0002\\u0002\\u01c8\\u01c6\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c8\\u01c9\\u0003\\u0002\\u0002\\u0002\\u01c9\\u01cc\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ca\\u01cc\\u0005q9\\u0002\\u01cb\\u01c6\\u0003\\u0002\\u0002\\u0002\\u01cb\",\n \"\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cct\\u0003\\u0002\\u0002\\u0002\\u01cd\",\n \"\\u01ce\\t\\u000e\\u0002\\u0002\\u01cev\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01d0\",\n \"\\t\\u000f\\u0002\\u0002\\u01d0x\\u0003\\u0002\\u0002\\u0002\\u01d1\\u01d2\\u0007\",\n \"^\\u0002\\u0002\\u01d2\\u01d6\\t\\u0010\\u0002\\u0002\\u01d3\\u01d6\\u0005}?\\u0002\",\n \"\\u01d4\\u01d6\\u0005{>\\u0002\\u01d5\\u01d1\\u0003\\u0002\\u0002\\u0002\\u01d5\",\n \"\\u01d3\\u0003\\u0002\\u0002\\u0002\\u01d5\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01d6\",\n \"z\\u0003\\u0002\\u0002\\u0002\\u01d7\\u01d8\\u0007^\\u0002\\u0002\\u01d8\\u01d9\",\n \"\\t\\u0011\\u0002\\u0002\\u01d9\\u01da\\u0005w<\\u0002\\u01da\\u01db\\u0005w<\\u0002\",\n \"\\u01db\\u01e3\\u0003\\u0002\\u0002\\u0002\\u01dc\\u01dd\\u0007^\\u0002\\u0002\",\n \"\\u01dd\\u01de\\u0005w<\\u0002\\u01de\\u01df\\u0005w<\\u0002\\u01df\\u01e3\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e0\\u01e1\\u0007^\\u0002\\u0002\\u01e1\\u01e3\\u0005\",\n \"w<\\u0002\\u01e2\\u01d7\\u0003\\u0002\\u0002\\u0002\\u01e2\\u01dc\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e2\\u01e0\\u0003\\u0002\\u0002\\u0002\\u01e3|\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e4\\u01e5\\u0007^\\u0002\\u0002\\u01e5\\u01e6\\u0007w\\u0002\",\n \"\\u0002\\u01e6\\u01e7\\u0005u;\\u0002\\u01e7\\u01e8\\u0005u;\\u0002\\u01e8\\u01e9\",\n \"\\u0005u;\\u0002\\u01e9\\u01ea\\u0005u;\\u0002\\u01ea~\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01eb\\u01ec\\u00071\\u0002\\u0002\\u01ec\\u01ed\\u00071\\u0002\\u0002\\u01ed\",\n \"\\u01f1\\u0003\\u0002\\u0002\\u0002\\u01ee\\u01f0\\n\\r\\u0002\\u0002\\u01ef\\u01ee\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f0\\u01f3\\u0003\\u0002\\u0002\\u0002\\u01f1\\u01ef\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f1\\u01f2\\u0003\\u0002\\u0002\\u0002\\u01f2\\u01f5\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f3\\u01f1\\u0003\\u0002\\u0002\\u0002\\u01f4\\u01f6\",\n \"\\u0007\\u000f\\u0002\\u0002\\u01f5\\u01f4\\u0003\\u0002\\u0002\\u0002\\u01f5\\u01f6\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f6\\u01f7\\u0003\\u0002\\u0002\\u0002\\u01f7\\u0204\",\n \"\\u0007\\f\\u0002\\u0002\\u01f8\\u01f9\\u00071\\u0002\\u0002\\u01f9\\u01fa\\u0007\",\n \",\\u0002\\u0002\\u01fa\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01fb\\u01fd\\u000b\",\n \"\\u0002\\u0002\\u0002\\u01fc\\u01fb\\u0003\\u0002\\u0002\\u0002\\u01fd\\u0200\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01fe\\u01ff\\u0003\\u0002\\u0002\\u0002\\u01fe\\u01fc\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01ff\\u0201\\u0003\\u0002\\u0002\\u0002\\u0200\\u01fe\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0201\\u0202\\u0007,\\u0002\\u0002\\u0202\\u0204\\u0007\",\n \"1\\u0002\\u0002\\u0203\\u01eb\\u0003\\u0002\\u0002\\u0002\\u0203\\u01f8\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0204\\u0205\\u0003\\u0002\\u0002\\u0002\\u0205\\u0206\\b\",\n \"@\\u0003\\u0002\\u0206\\u0080\\u0003\\u0002\\u0002\\u0002\\u001e\\u0002\\u0147\",\n \"\\u015a\\u0164\\u016e\\u0174\\u0179\\u017f\\u0184\\u0186\\u018b\\u0191\\u0196\\u019c\",\n \"\\u01a0\\u01a4\\u01a9\\u01af\\u01b6\\u01bb\\u01c8\\u01cb\\u01d5\\u01e2\\u01f1\\u01f5\",\n \"\\u01fe\\u0203\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_FOR_ALT = 15;\nivprog.RK_FOR_FROM = 16;\nivprog.RK_FOR_TO = 17;\nivprog.RK_FOR_PASS = 18;\nivprog.RK_BREAK = 19;\nivprog.RK_DO = 20;\nivprog.RK_DO_UNTIL = 21;\nivprog.RK_WHILE = 22;\nivprog.RK_WHILE_ALT = 23;\nivprog.RK_IF = 24;\nivprog.RK_ELSE = 25;\nivprog.RK_FALSE = 26;\nivprog.RK_TRUE = 27;\nivprog.RK_REFERENCE = 28;\nivprog.OPEN_PARENTHESIS = 29;\nivprog.CLOSE_PARENTHESIS = 30;\nivprog.OPEN_BRACE = 31;\nivprog.CLOSE_BRACE = 32;\nivprog.OPEN_CURLY = 33;\nivprog.CLOSE_CURLY = 34;\nivprog.COMMA = 35;\nivprog.EQUAL = 36;\nivprog.SUM_OP = 37;\nivprog.MULTI_OP = 38;\nivprog.AND_OPERATOR = 39;\nivprog.OR_OPERATOR = 40;\nivprog.RELATIONAL_OPERATOR = 41;\nivprog.COLON = 42;\nivprog.NOT_OPERATOR = 43;\nivprog.ID = 44;\nivprog.LIB_ID = 45;\nivprog.INTEGER = 46;\nivprog.REAL = 47;\nivprog.STRING = 48;\nivprog.CHARACTER = 49;\nivprog.WHITESPACE = 50;\nivprog.EOS = 51;\nivprog.COMMENTS = 52;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'program'\", \"'real'\", \"'void'\", \n \"'bool'\", \"'string'\", \"'int'\", \"'char'\", \n \"'switch'\", \"'case'\", \"'otherwise'\", \"'const'\", \n \"'function'\", \"'return'\", \"'for'\", \"'repeat_for'\", \n \"'from'\", \"'to'\", \"'pass'\", \"'break'\", \n \"'repeat'\", \"'until'\", \"'while'\", \"'repeat_while'\", \n \"'if'\", \"'else'\", \"'false'\", \"'true'\", \n \"'&'\", \"'('\", \"')'\", \"'['\", \"']'\", \"'{'\", \n \"'}'\", \"','\", null, null, null, null, \n null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_LOGICAL_NOT\", \"RK_LOGICAL_AND\", \n \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \n \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"main\",\n $read: \"read\",\n $write: \"write\",\n $numElements: \"total_of_elements\",\n $matrixLines: \"total_of_lines\",\n $matrixColumns: \"total_of_columns\",\n $substring: \"substring\",\n $length: \"length\",\n $uppercase: \"uppercase\",\n $lowercase: \"lowercase\",\n $charAt: \"char_at\",\n $isReal: \"is_real\",\n $isInt: \"is_integer\",\n $isBool: \"is_logic\",\n $castReal: \"to_real\",\n $castInt: \"to_integer\",\n $castBool: \"to_logic\",\n $castString: \"to_string\",\n $castChar: \"to_char\",\n $sin: \"sin\",\n $cos: \"cos\",\n $tan: \"tan\",\n $sqrt: \"sqrt\",\n $pow: \"pow\",\n $log: \"log\",\n $abs: \"abs\",\n $negate: \"negate\",\n $invert: \"invert\",\n $max: \"maximum\",\n $min: \"minimum\",\n $rand: \"random\"\n\n}","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Mathematic\",\n $ioLib: \"IO\",\n $strLib: \"Text\",\n $arrayLib: \"Array\",\n $langLib: \"Conversion\"\n}","import * as PT from \"./pt/ivprog.g4\";\nimport PTFuncs from \"./pt/langFunctions\";\nimport PTLibs from \"./pt/langLibs\";\nimport * as EN from \"./en/ivprog.g4\";\nimport ENFuncs from \"./en/langFunctions\";\nimport ENLibs from \"./en/langLibs\";\n/*import * as ES from \"./es/ivprog.g4\";\nimport ESFuncs from \"./es/langFunctions\";\nimport ESLibs from \"./es/langLibs\";*/\n\nexport default {\n pt: { lexer: PT.ivprog, langFuncs: PTFuncs, langLibs: PTLibs },\n en: { lexer: EN.ivprog, langFuncs: ENFuncs, langLibs: ENLibs },\n //es: {lexer: ES.ivprog, langFuncs: ESFuncs, langLibs: ESLibs}\n};\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-18423BweKd1GpxdNi/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00026\\u0222\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0004;\\t;\\u0004<\\t<\\u0004=\\t=\\u0004>\\t>\\u0004\",\n \"?\\t?\\u0004@\\t@\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\",\n \"\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\\u0003\",\n \"\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\\u0003\",\n \"\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0006\\u0003\",\n \"\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\",\n \"\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\",\n \"\\u0007\\u0003\\u0007\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\\f\",\n \"\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0014\\u0003\\u0014\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0019\\u0003\\u0019\\u0003\\u0019\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\",\n \"\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\",\n \"\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\\u001d\\u0003\\u001d\\u0003\",\n \"\\u001e\\u0003\\u001e\\u0003\\u001f\\u0003\\u001f\\u0003\\u001f\\u0003 \\u0003\",\n \" \\u0003!\\u0003!\\u0003\\\"\\u0003\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003\",\n \"%\\u0003&\\u0003&\\u0003\\'\\u0003\\'\\u0003(\\u0003(\\u0003(\\u0005(\\u0163\\n\",\n \"(\\u0003)\\u0003)\\u0003*\\u0003*\\u0003+\\u0003+\\u0003,\\u0003,\\u0003-\\u0003\",\n \"-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0005-\\u0176\\n-\\u0003\",\n \".\\u0003.\\u0003/\\u0003/\\u00030\\u00030\\u00070\\u017e\\n0\\f0\\u000e0\\u0181\",\n \"\\u000b0\\u00031\\u00031\\u00031\\u00031\\u00032\\u00062\\u0188\\n2\\r2\\u000e\",\n \"2\\u0189\\u00032\\u00032\\u00032\\u00032\\u00052\\u0190\\n2\\u00032\\u00062\\u0193\",\n \"\\n2\\r2\\u000e2\\u0194\\u00032\\u00032\\u00032\\u00032\\u00052\\u019b\\n2\\u0003\",\n \"2\\u00062\\u019e\\n2\\r2\\u000e2\\u019f\\u00052\\u01a2\\n2\\u00033\\u00063\\u01a5\",\n \"\\n3\\r3\\u000e3\\u01a6\\u00033\\u00033\\u00063\\u01ab\\n3\\r3\\u000e3\\u01ac\\u0003\",\n \"3\\u00063\\u01b0\\n3\\r3\\u000e3\\u01b1\\u00033\\u00033\\u00073\\u01b6\\n3\\f3\\u000e\",\n \"3\\u01b9\\u000b3\\u00033\\u00053\\u01bc\\n3\\u00034\\u00034\\u00054\\u01c0\\n4\",\n \"\\u00034\\u00064\\u01c3\\n4\\r4\\u000e4\\u01c4\\u00035\\u00035\\u00075\\u01c9\\n\",\n \"5\\f5\\u000e5\\u01cc\\u000b5\\u00035\\u00035\\u00036\\u00036\\u00056\\u01d2\\n\",\n \"6\\u00037\\u00037\\u00037\\u00057\\u01d7\\n7\\u00037\\u00037\\u00038\\u00038\\u0003\",\n \"8\\u00038\\u00039\\u00039\\u0003:\\u0006:\\u01e2\\n:\\r:\\u000e:\\u01e3\\u0003\",\n \":\\u0005:\\u01e7\\n:\\u0003;\\u0003;\\u0003<\\u0003<\\u0003=\\u0003=\\u0003=\\u0003\",\n \"=\\u0005=\\u01f1\\n=\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003\",\n \">\\u0003>\\u0003>\\u0003>\\u0005>\\u01fe\\n>\\u0003?\\u0003?\\u0003?\\u0003?\\u0003\",\n \"?\\u0003?\\u0003?\\u0003@\\u0003@\\u0003@\\u0003@\\u0007@\\u020b\\n@\\f@\\u000e\",\n \"@\\u020e\\u000b@\\u0003@\\u0005@\\u0211\\n@\\u0003@\\u0003@\\u0003@\\u0003@\\u0003\",\n \"@\\u0007@\\u0218\\n@\\f@\\u000e@\\u021b\\u000b@\\u0003@\\u0003@\\u0005@\\u021f\",\n \"\\n@\\u0003@\\u0003@\\u0003\\u0219\\u0002A\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\",\n \"\\t\\u0006\\u000b\\u0007\\r\\b\\u000f\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\",\n \"\\u0019\\u000e\\u001b\\u000f\\u001d\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\",\n \"\\'\\u0015)\\u0016+\\u0017-\\u0018/\\u00191\\u001a3\\u001b5\\u001c7\\u001d9\\u0002\",\n \";\\u0002=\\u0002?\\u001eA\\u001fC E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[,]-_.a/c0e1g\",\n \"\\u0002i2k\\u0002m3o4q\\u0002s5u\\u0002w\\u0002y\\u0002{\\u0002}\\u0002\\u007f\",\n \"6\\u0003\\u0002\\u0012\\u0004\\u0002--//\\u0005\\u0002\\'\\',,11\\u0004\\u0002\",\n \">>@@\\u0005\\u0002C\\\\aac|\\u0006\\u00022;C\\\\aac|\\u0003\\u00022;\\u0003\\u0002\",\n \"23\\u0004\\u0002GGgg\\u0006\\u0002\\f\\f\\u000f\\u000f$$^^\\u0006\\u0002\\f\\f\\u000f\",\n \"\\u000f))^^\\u0004\\u0002\\u000b\\u000b\\\"\\\"\\u0004\\u0002\\f\\f\\u000f\\u000f\\u0005\",\n \"\\u00022;CHch\\u0003\\u000229\\n\\u0002$$))^^ddhhppttvv\\u0003\\u000225\\u0002\",\n \"\\u0237\\u0002\\u0003\\u0003\\u0002\\u0002\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0007\\u0003\\u0002\\u0002\\u0002\\u0002\\t\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u000b\\u0003\\u0002\\u0002\\u0002\\u0002\\r\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u000f\\u0003\\u0002\\u0002\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0013\\u0003\\u0002\\u0002\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0017\\u0003\\u0002\\u0002\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001b\\u0003\\u0002\\u0002\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001f\\u0003\\u0002\\u0002\\u0002\\u0002!\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002#\\u0003\\u0002\\u0002\\u0002\\u0002%\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002\\'\\u0003\\u0002\\u0002\\u0002\\u0002)\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"+\\u0003\\u0002\\u0002\\u0002\\u0002-\\u0003\\u0002\\u0002\\u0002\\u0002/\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00021\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00025\\u0003\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002?\\u0003\\u0002\\u0002\\u0002\\u0002A\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002C\\u0003\\u0002\\u0002\\u0002\\u0002E\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"G\\u0003\\u0002\\u0002\\u0002\\u0002I\\u0003\\u0002\\u0002\\u0002\\u0002K\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002M\\u0003\\u0002\\u0002\\u0002\\u0002O\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002Q\\u0003\\u0002\\u0002\\u0002\\u0002S\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002U\\u0003\\u0002\\u0002\\u0002\\u0002W\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002Y\\u0003\\u0002\\u0002\\u0002\\u0002[\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"]\\u0003\\u0002\\u0002\\u0002\\u0002_\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002c\\u0003\\u0002\\u0002\\u0002\\u0002e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002i\\u0003\\u0002\\u0002\\u0002\\u0002m\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002o\\u0003\\u0002\\u0002\\u0002\\u0002s\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002\\u007f\\u0003\\u0002\\u0002\\u0002\\u0003\\u0081\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0005\\u008a\\u0003\\u0002\\u0002\\u0002\\u0007\\u008f\\u0003\\u0002\\u0002\\u0002\",\n \"\\t\\u0095\\u0003\\u0002\\u0002\\u0002\\u000b\\u009c\\u0003\\u0002\\u0002\\u0002\",\n \"\\r\\u00a3\\u0003\\u0002\\u0002\\u0002\\u000f\\u00ab\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0011\\u00b5\\u0003\\u0002\\u0002\\u0002\\u0013\\u00bd\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0015\\u00c2\\u0003\\u0002\\u0002\\u0002\\u0017\\u00cc\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0019\\u00d2\\u0003\\u0002\\u0002\\u0002\\u001b\\u00d9\\u0003\\u0002\\u0002\\u0002\",\n \"\\u001d\\u00e1\\u0003\\u0002\\u0002\\u0002\\u001f\\u00e6\\u0003\\u0002\\u0002\\u0002\",\n \"!\\u00f2\\u0003\\u0002\\u0002\\u0002#\\u00f5\\u0003\\u0002\\u0002\\u0002%\\u00f9\",\n \"\\u0003\\u0002\\u0002\\u0002\\'\\u00ff\\u0003\\u0002\\u0002\\u0002)\\u0104\\u0003\",\n \"\\u0002\\u0002\\u0002+\\u010b\\u0003\\u0002\\u0002\\u0002-\\u0113\\u0003\\u0002\",\n \"\\u0002\\u0002/\\u011c\\u0003\\u0002\\u0002\\u00021\\u012c\\u0003\\u0002\\u0002\",\n \"\\u00023\\u012f\\u0003\\u0002\\u0002\\u00025\\u0135\\u0003\\u0002\\u0002\\u0002\",\n \"7\\u013b\\u0003\\u0002\\u0002\\u00029\\u0146\\u0003\\u0002\\u0002\\u0002;\\u014a\",\n \"\\u0003\\u0002\\u0002\\u0002=\\u014c\\u0003\\u0002\\u0002\\u0002?\\u014f\\u0003\",\n \"\\u0002\\u0002\\u0002A\\u0151\\u0003\\u0002\\u0002\\u0002C\\u0153\\u0003\\u0002\",\n \"\\u0002\\u0002E\\u0155\\u0003\\u0002\\u0002\\u0002G\\u0157\\u0003\\u0002\\u0002\",\n \"\\u0002I\\u0159\\u0003\\u0002\\u0002\\u0002K\\u015b\\u0003\\u0002\\u0002\\u0002\",\n \"M\\u015d\\u0003\\u0002\\u0002\\u0002O\\u0162\\u0003\\u0002\\u0002\\u0002Q\\u0164\",\n \"\\u0003\\u0002\\u0002\\u0002S\\u0166\\u0003\\u0002\\u0002\\u0002U\\u0168\\u0003\",\n \"\\u0002\\u0002\\u0002W\\u016a\\u0003\\u0002\\u0002\\u0002Y\\u0175\\u0003\\u0002\",\n \"\\u0002\\u0002[\\u0177\\u0003\\u0002\\u0002\\u0002]\\u0179\\u0003\\u0002\\u0002\",\n \"\\u0002_\\u017b\\u0003\\u0002\\u0002\\u0002a\\u0182\\u0003\\u0002\\u0002\\u0002\",\n \"c\\u01a1\\u0003\\u0002\\u0002\\u0002e\\u01bb\\u0003\\u0002\\u0002\\u0002g\\u01bd\",\n \"\\u0003\\u0002\\u0002\\u0002i\\u01c6\\u0003\\u0002\\u0002\\u0002k\\u01d1\\u0003\",\n \"\\u0002\\u0002\\u0002m\\u01d3\\u0003\\u0002\\u0002\\u0002o\\u01da\\u0003\\u0002\",\n \"\\u0002\\u0002q\\u01de\\u0003\\u0002\\u0002\\u0002s\\u01e6\\u0003\\u0002\\u0002\",\n \"\\u0002u\\u01e8\\u0003\\u0002\\u0002\\u0002w\\u01ea\\u0003\\u0002\\u0002\\u0002\",\n \"y\\u01f0\\u0003\\u0002\\u0002\\u0002{\\u01fd\\u0003\\u0002\\u0002\\u0002}\\u01ff\",\n \"\\u0003\\u0002\\u0002\\u0002\\u007f\\u021e\\u0003\\u0002\\u0002\\u0002\\u0081\\u0082\",\n \"\\u0007r\\u0002\\u0002\\u0082\\u0083\\u0007t\\u0002\\u0002\\u0083\\u0084\\u0007\",\n \"q\\u0002\\u0002\\u0084\\u0085\\u0007i\\u0002\\u0002\\u0085\\u0086\\u0007t\\u0002\",\n \"\\u0002\\u0086\\u0087\\u0007c\\u0002\\u0002\\u0087\\u0088\\u0007o\\u0002\\u0002\",\n \"\\u0088\\u0089\\u0007c\\u0002\\u0002\\u0089\\u0004\\u0003\\u0002\\u0002\\u0002\",\n \"\\u008a\\u008b\\u0007t\\u0002\\u0002\\u008b\\u008c\\u0007g\\u0002\\u0002\\u008c\",\n \"\\u008d\\u0007c\\u0002\\u0002\\u008d\\u008e\\u0007n\\u0002\\u0002\\u008e\\u0006\",\n \"\\u0003\\u0002\\u0002\\u0002\\u008f\\u0090\\u0007x\\u0002\\u0002\\u0090\\u0091\",\n \"\\u0007c\\u0002\\u0002\\u0091\\u0092\\u0007|\\u0002\\u0002\\u0092\\u0093\\u0007\",\n \"k\\u0002\\u0002\\u0093\\u0094\\u0007q\\u0002\\u0002\\u0094\\b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0095\\u0096\\u0007n\\u0002\\u0002\\u0096\\u0097\\u0007q\\u0002\\u0002\",\n \"\\u0097\\u0098\\u0007i\\u0002\\u0002\\u0098\\u0099\\u0007k\\u0002\\u0002\\u0099\",\n \"\\u009a\\u0007e\\u0002\\u0002\\u009a\\u009b\\u0007q\\u0002\\u0002\\u009b\\n\\u0003\",\n \"\\u0002\\u0002\\u0002\\u009c\\u009d\\u0007e\\u0002\\u0002\\u009d\\u009e\\u0007\",\n \"c\\u0002\\u0002\\u009e\\u009f\\u0007f\\u0002\\u0002\\u009f\\u00a0\\u0007g\\u0002\",\n \"\\u0002\\u00a0\\u00a1\\u0007k\\u0002\\u0002\\u00a1\\u00a2\\u0007c\\u0002\\u0002\",\n \"\\u00a2\\f\\u0003\\u0002\\u0002\\u0002\\u00a3\\u00a4\\u0007k\\u0002\\u0002\\u00a4\",\n \"\\u00a5\\u0007p\\u0002\\u0002\\u00a5\\u00a6\\u0007v\\u0002\\u0002\\u00a6\\u00a7\",\n \"\\u0007g\\u0002\\u0002\\u00a7\\u00a8\\u0007k\\u0002\\u0002\\u00a8\\u00a9\\u0007\",\n \"t\\u0002\\u0002\\u00a9\\u00aa\\u0007q\\u0002\\u0002\\u00aa\\u000e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00ab\\u00ac\\u0007e\\u0002\\u0002\\u00ac\\u00ad\\u0007c\\u0002\",\n \"\\u0002\\u00ad\\u00ae\\u0007t\\u0002\\u0002\\u00ae\\u00af\\u0007c\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007e\\u0002\\u0002\\u00b0\\u00b1\\u0007v\\u0002\\u0002\\u00b1\",\n \"\\u00b2\\u0007g\\u0002\\u0002\\u00b2\\u00b3\\u0007t\\u0002\\u0002\\u00b3\\u00b4\",\n \"\\u0007g\\u0002\\u0002\\u00b4\\u0010\\u0003\\u0002\\u0002\\u0002\\u00b5\\u00b6\",\n \"\\u0007g\\u0002\\u0002\\u00b6\\u00b7\\u0007u\\u0002\\u0002\\u00b7\\u00b8\\u0007\",\n \"e\\u0002\\u0002\\u00b8\\u00b9\\u0007q\\u0002\\u0002\\u00b9\\u00ba\\u0007n\\u0002\",\n \"\\u0002\\u00ba\\u00bb\\u0007j\\u0002\\u0002\\u00bb\\u00bc\\u0007c\\u0002\\u0002\",\n \"\\u00bc\\u0012\\u0003\\u0002\\u0002\\u0002\\u00bd\\u00be\\u0007e\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007c\\u0002\\u0002\\u00bf\\u00c0\\u0007u\\u0002\\u0002\\u00c0\",\n \"\\u00c1\\u0007q\\u0002\\u0002\\u00c1\\u0014\\u0003\\u0002\\u0002\\u0002\\u00c2\",\n \"\\u00c3\\u0007e\\u0002\\u0002\\u00c3\\u00c4\\u0007q\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007p\\u0002\\u0002\\u00c5\\u00c6\\u0007v\\u0002\\u0002\\u00c6\\u00c7\\u0007\",\n \"t\\u0002\\u0002\\u00c7\\u00c8\\u0007c\\u0002\\u0002\\u00c8\\u00c9\\u0007t\\u0002\",\n \"\\u0002\\u00c9\\u00ca\\u0007k\\u0002\\u0002\\u00ca\\u00cb\\u0007q\\u0002\\u0002\",\n \"\\u00cb\\u0016\\u0003\\u0002\\u0002\\u0002\\u00cc\\u00cd\\u0007e\\u0002\\u0002\",\n \"\\u00cd\\u00ce\\u0007q\\u0002\\u0002\\u00ce\\u00cf\\u0007p\\u0002\\u0002\\u00cf\",\n \"\\u00d0\\u0007u\\u0002\\u0002\\u00d0\\u00d1\\u0007v\\u0002\\u0002\\u00d1\\u0018\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00d2\\u00d3\\u0007h\\u0002\\u0002\\u00d3\\u00d4\",\n \"\\u0007w\\u0002\\u0002\\u00d4\\u00d5\\u0007p\\u0002\\u0002\\u00d5\\u00d6\\u0007\",\n \"e\\u0002\\u0002\\u00d6\\u00d7\\u0007c\\u0002\\u0002\\u00d7\\u00d8\\u0007q\\u0002\",\n \"\\u0002\\u00d8\\u001a\\u0003\\u0002\\u0002\\u0002\\u00d9\\u00da\\u0007f\\u0002\",\n \"\\u0002\\u00da\\u00db\\u0007g\\u0002\\u0002\\u00db\\u00dc\\u0007x\\u0002\\u0002\",\n \"\\u00dc\\u00dd\\u0007q\\u0002\\u0002\\u00dd\\u00de\\u0007n\\u0002\\u0002\\u00de\",\n \"\\u00df\\u0007x\\u0002\\u0002\\u00df\\u00e0\\u0007c\\u0002\\u0002\\u00e0\\u001c\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00e1\\u00e2\\u0007r\\u0002\\u0002\\u00e2\\u00e3\",\n \"\\u0007c\\u0002\\u0002\\u00e3\\u00e4\\u0007t\\u0002\\u0002\\u00e4\\u00e5\\u0007\",\n \"c\\u0002\\u0002\\u00e5\\u001e\\u0003\\u0002\\u0002\\u0002\\u00e6\\u00e7\\u0007\",\n \"t\\u0002\\u0002\\u00e7\\u00e8\\u0007g\\u0002\\u0002\\u00e8\\u00e9\\u0007r\\u0002\",\n \"\\u0002\\u00e9\\u00ea\\u0007k\\u0002\\u0002\\u00ea\\u00eb\\u0007v\\u0002\\u0002\",\n \"\\u00eb\\u00ec\\u0007c\\u0002\\u0002\\u00ec\\u00ed\\u0007a\\u0002\\u0002\\u00ed\",\n \"\\u00ee\\u0007r\\u0002\\u0002\\u00ee\\u00ef\\u0007c\\u0002\\u0002\\u00ef\\u00f0\",\n \"\\u0007t\\u0002\\u0002\\u00f0\\u00f1\\u0007c\\u0002\\u0002\\u00f1 \\u0003\\u0002\",\n \"\\u0002\\u0002\\u00f2\\u00f3\\u0007f\\u0002\\u0002\\u00f3\\u00f4\\u0007g\\u0002\",\n \"\\u0002\\u00f4\\\"\\u0003\\u0002\\u0002\\u0002\\u00f5\\u00f6\\u0007c\\u0002\\u0002\",\n \"\\u00f6\\u00f7\\u0007v\\u0002\\u0002\\u00f7\\u00f8\\u0007g\\u0002\\u0002\\u00f8\",\n \"$\\u0003\\u0002\\u0002\\u0002\\u00f9\\u00fa\\u0007r\\u0002\\u0002\\u00fa\\u00fb\",\n \"\\u0007c\\u0002\\u0002\\u00fb\\u00fc\\u0007u\\u0002\\u0002\\u00fc\\u00fd\\u0007\",\n \"u\\u0002\\u0002\\u00fd\\u00fe\\u0007q\\u0002\\u0002\\u00fe&\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00ff\\u0100\\u0007r\\u0002\\u0002\\u0100\\u0101\\u0007c\\u0002\\u0002\",\n \"\\u0101\\u0102\\u0007t\\u0002\\u0002\\u0102\\u0103\\u0007g\\u0002\\u0002\\u0103\",\n \"(\\u0003\\u0002\\u0002\\u0002\\u0104\\u0105\\u0007t\\u0002\\u0002\\u0105\\u0106\",\n \"\\u0007g\\u0002\\u0002\\u0106\\u0107\\u0007r\\u0002\\u0002\\u0107\\u0108\\u0007\",\n \"k\\u0002\\u0002\\u0108\\u0109\\u0007v\\u0002\\u0002\\u0109\\u010a\\u0007c\\u0002\",\n \"\\u0002\\u010a*\\u0003\\u0002\\u0002\\u0002\\u010b\\u010c\\u0007c\\u0002\\u0002\",\n \"\\u010c\\u010d\\u0007v\\u0002\\u0002\\u010d\\u010e\\u0007g\\u0002\\u0002\\u010e\",\n \"\\u010f\\u0007a\\u0002\\u0002\\u010f\\u0110\\u0007s\\u0002\\u0002\\u0110\\u0111\",\n \"\\u0007w\\u0002\\u0002\\u0111\\u0112\\u0007g\\u0002\\u0002\\u0112,\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0113\\u0114\\u0007g\\u0002\\u0002\\u0114\\u0115\\u0007p\\u0002\",\n \"\\u0002\\u0115\\u0116\\u0007s\\u0002\\u0002\\u0116\\u0117\\u0007w\\u0002\\u0002\",\n \"\\u0117\\u0118\\u0007c\\u0002\\u0002\\u0118\\u0119\\u0007p\\u0002\\u0002\\u0119\",\n \"\\u011a\\u0007v\\u0002\\u0002\\u011a\\u011b\\u0007q\\u0002\\u0002\\u011b.\\u0003\",\n \"\\u0002\\u0002\\u0002\\u011c\\u011d\\u0007t\\u0002\\u0002\\u011d\\u011e\\u0007\",\n \"g\\u0002\\u0002\\u011e\\u011f\\u0007r\\u0002\\u0002\\u011f\\u0120\\u0007k\\u0002\",\n \"\\u0002\\u0120\\u0121\\u0007v\\u0002\\u0002\\u0121\\u0122\\u0007c\\u0002\\u0002\",\n \"\\u0122\\u0123\\u0007a\\u0002\\u0002\\u0123\\u0124\\u0007g\\u0002\\u0002\\u0124\",\n \"\\u0125\\u0007p\\u0002\\u0002\\u0125\\u0126\\u0007s\\u0002\\u0002\\u0126\\u0127\",\n \"\\u0007w\\u0002\\u0002\\u0127\\u0128\\u0007c\\u0002\\u0002\\u0128\\u0129\\u0007\",\n \"p\\u0002\\u0002\\u0129\\u012a\\u0007v\\u0002\\u0002\\u012a\\u012b\\u0007q\\u0002\",\n \"\\u0002\\u012b0\\u0003\\u0002\\u0002\\u0002\\u012c\\u012d\\u0007u\\u0002\\u0002\",\n \"\\u012d\\u012e\\u0007g\\u0002\\u0002\\u012e2\\u0003\\u0002\\u0002\\u0002\\u012f\",\n \"\\u0130\\u0007u\\u0002\\u0002\\u0130\\u0131\\u0007g\\u0002\\u0002\\u0131\\u0132\",\n \"\\u0007p\\u0002\\u0002\\u0132\\u0133\\u0007c\\u0002\\u0002\\u0133\\u0134\\u0007\",\n \"q\\u0002\\u0002\\u01344\\u0003\\u0002\\u0002\\u0002\\u0135\\u0136\\u0007h\\u0002\",\n \"\\u0002\\u0136\\u0137\\u0007c\\u0002\\u0002\\u0137\\u0138\\u0007n\\u0002\\u0002\",\n \"\\u0138\\u0139\\u0007u\\u0002\\u0002\\u0139\\u013a\\u0007q\\u0002\\u0002\\u013a\",\n \"6\\u0003\\u0002\\u0002\\u0002\\u013b\\u013c\\u0007x\\u0002\\u0002\\u013c\\u013d\",\n \"\\u0007g\\u0002\\u0002\\u013d\\u013e\\u0007t\\u0002\\u0002\\u013e\\u013f\\u0007\",\n \"f\\u0002\\u0002\\u013f\\u0140\\u0007c\\u0002\\u0002\\u0140\\u0141\\u0007f\\u0002\",\n \"\\u0002\\u0141\\u0142\\u0007g\\u0002\\u0002\\u0142\\u0143\\u0007k\\u0002\\u0002\",\n \"\\u0143\\u0144\\u0007t\\u0002\\u0002\\u0144\\u0145\\u0007q\\u0002\\u0002\\u0145\",\n \"8\\u0003\\u0002\\u0002\\u0002\\u0146\\u0147\\u0007p\\u0002\\u0002\\u0147\\u0148\",\n \"\\u0007c\\u0002\\u0002\\u0148\\u0149\\u0007q\\u0002\\u0002\\u0149:\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014a\\u014b\\u0007G\\u0002\\u0002\\u014b<\\u0003\\u0002\\u0002\",\n \"\\u0002\\u014c\\u014d\\u0007Q\\u0002\\u0002\\u014d\\u014e\\u0007W\\u0002\\u0002\",\n \"\\u014e>\\u0003\\u0002\\u0002\\u0002\\u014f\\u0150\\u0007(\\u0002\\u0002\\u0150\",\n \"@\\u0003\\u0002\\u0002\\u0002\\u0151\\u0152\\u0007*\\u0002\\u0002\\u0152B\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0153\\u0154\\u0007+\\u0002\\u0002\\u0154D\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0155\\u0156\\u0007]\\u0002\\u0002\\u0156F\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0157\\u0158\\u0007_\\u0002\\u0002\\u0158H\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0159\\u015a\\u0007}\\u0002\\u0002\\u015aJ\\u0003\\u0002\\u0002\\u0002\\u015b\",\n \"\\u015c\\u0007\\u007f\\u0002\\u0002\\u015cL\\u0003\\u0002\\u0002\\u0002\\u015d\",\n \"\\u015e\\u0007.\\u0002\\u0002\\u015eN\\u0003\\u0002\\u0002\\u0002\\u015f\\u0160\",\n \"\\u0007>\\u0002\\u0002\\u0160\\u0163\\u0007/\\u0002\\u0002\\u0161\\u0163\\u0007\",\n \"\\u2192\\u0002\\u0002\\u0162\\u015f\\u0003\\u0002\\u0002\\u0002\\u0162\\u0161\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0163P\\u0003\\u0002\\u0002\\u0002\\u0164\\u0165\\t\\u0002\",\n \"\\u0002\\u0002\\u0165R\\u0003\\u0002\\u0002\\u0002\\u0166\\u0167\\t\\u0003\\u0002\",\n \"\\u0002\\u0167T\\u0003\\u0002\\u0002\\u0002\\u0168\\u0169\\u0005;\\u001e\\u0002\",\n \"\\u0169V\\u0003\\u0002\\u0002\\u0002\\u016a\\u016b\\u0005=\\u001f\\u0002\\u016b\",\n \"X\\u0003\\u0002\\u0002\\u0002\\u016c\\u016d\\u0007@\\u0002\\u0002\\u016d\\u0176\",\n \"\\u0007?\\u0002\\u0002\\u016e\\u016f\\u0007?\\u0002\\u0002\\u016f\\u0176\\u0007\",\n \"?\\u0002\\u0002\\u0170\\u0171\\u0007>\\u0002\\u0002\\u0171\\u0176\\u0007?\\u0002\",\n \"\\u0002\\u0172\\u0176\\t\\u0004\\u0002\\u0002\\u0173\\u0174\\u0007#\\u0002\\u0002\",\n \"\\u0174\\u0176\\u0007?\\u0002\\u0002\\u0175\\u016c\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0175\\u016e\\u0003\\u0002\\u0002\\u0002\\u0175\\u0170\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0175\\u0172\\u0003\\u0002\\u0002\\u0002\\u0175\\u0173\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0176Z\\u0003\\u0002\\u0002\\u0002\\u0177\\u0178\\u0007<\\u0002\\u0002\\u0178\",\n \"\\\\\\u0003\\u0002\\u0002\\u0002\\u0179\\u017a\\u00059\\u001d\\u0002\\u017a^\\u0003\",\n \"\\u0002\\u0002\\u0002\\u017b\\u017f\\t\\u0005\\u0002\\u0002\\u017c\\u017e\\t\\u0006\",\n \"\\u0002\\u0002\\u017d\\u017c\\u0003\\u0002\\u0002\\u0002\\u017e\\u0181\\u0003\\u0002\",\n \"\\u0002\\u0002\\u017f\\u017d\\u0003\\u0002\\u0002\\u0002\\u017f\\u0180\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0180`\\u0003\\u0002\\u0002\\u0002\\u0181\\u017f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0182\\u0183\\u0005_0\\u0002\\u0183\\u0184\\u00070\\u0002\\u0002\",\n \"\\u0184\\u0185\\u0005_0\\u0002\\u0185b\\u0003\\u0002\\u0002\\u0002\\u0186\\u0188\",\n \"\\t\\u0007\\u0002\\u0002\\u0187\\u0186\\u0003\\u0002\\u0002\\u0002\\u0188\\u0189\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0189\\u0187\\u0003\\u0002\\u0002\\u0002\\u0189\\u018a\",\n \"\\u0003\\u0002\\u0002\\u0002\\u018a\\u01a2\\u0003\\u0002\\u0002\\u0002\\u018b\\u018c\",\n \"\\u00072\\u0002\\u0002\\u018c\\u0190\\u0007z\\u0002\\u0002\\u018d\\u018e\\u0007\",\n \"2\\u0002\\u0002\\u018e\\u0190\\u0007Z\\u0002\\u0002\\u018f\\u018b\\u0003\\u0002\",\n \"\\u0002\\u0002\\u018f\\u018d\\u0003\\u0002\\u0002\\u0002\\u0190\\u0192\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0191\\u0193\\u0005u;\\u0002\\u0192\\u0191\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0193\\u0194\\u0003\\u0002\\u0002\\u0002\\u0194\\u0192\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0194\\u0195\\u0003\\u0002\\u0002\\u0002\\u0195\\u01a2\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0196\\u0197\\u00072\\u0002\\u0002\\u0197\\u019b\\u0007d\\u0002\\u0002\",\n \"\\u0198\\u0199\\u00072\\u0002\\u0002\\u0199\\u019b\\u0007D\\u0002\\u0002\\u019a\",\n \"\\u0196\\u0003\\u0002\\u0002\\u0002\\u019a\\u0198\\u0003\\u0002\\u0002\\u0002\\u019b\",\n \"\\u019d\\u0003\\u0002\\u0002\\u0002\\u019c\\u019e\\t\\b\\u0002\\u0002\\u019d\\u019c\",\n \"\\u0003\\u0002\\u0002\\u0002\\u019e\\u019f\\u0003\\u0002\\u0002\\u0002\\u019f\\u019d\",\n \"\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a0\\u0003\\u0002\\u0002\\u0002\\u01a0\\u01a2\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a1\\u0187\\u0003\\u0002\\u0002\\u0002\\u01a1\\u018f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a1\\u019a\\u0003\\u0002\\u0002\\u0002\\u01a2d\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a3\\u01a5\\t\\u0007\\u0002\\u0002\\u01a4\\u01a3\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a5\\u01a6\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a4\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a7\\u01a8\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a8\\u01aa\\u00070\\u0002\\u0002\\u01a9\\u01ab\",\n \"\\t\\u0007\\u0002\\u0002\\u01aa\\u01a9\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01ac\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ac\\u01aa\\u0003\\u0002\\u0002\\u0002\\u01ac\\u01ad\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ad\\u01bc\\u0003\\u0002\\u0002\\u0002\\u01ae\\u01b0\",\n \"\\t\\u0007\\u0002\\u0002\\u01af\\u01ae\\u0003\\u0002\\u0002\\u0002\\u01b0\\u01b1\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01b2\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01b2\\u01b3\\u0003\\u0002\\u0002\\u0002\\u01b3\\u01b7\",\n \"\\u00070\\u0002\\u0002\\u01b4\\u01b6\\t\\u0007\\u0002\\u0002\\u01b5\\u01b4\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b6\\u01b9\\u0003\\u0002\\u0002\\u0002\\u01b7\\u01b5\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b7\\u01b8\\u0003\\u0002\\u0002\\u0002\\u01b8\\u01ba\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b9\\u01b7\\u0003\\u0002\\u0002\\u0002\\u01ba\\u01bc\\u0005\",\n \"g4\\u0002\\u01bb\\u01a4\\u0003\\u0002\\u0002\\u0002\\u01bb\\u01af\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01bcf\\u0003\\u0002\\u0002\\u0002\\u01bd\\u01bf\\t\\t\\u0002\\u0002\",\n \"\\u01be\\u01c0\\t\\u0002\\u0002\\u0002\\u01bf\\u01be\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01bf\\u01c0\\u0003\\u0002\\u0002\\u0002\\u01c0\\u01c2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c1\\u01c3\\t\\u0007\\u0002\\u0002\\u01c2\\u01c1\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c3\\u01c4\\u0003\\u0002\\u0002\\u0002\\u01c4\\u01c2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c4\\u01c5\\u0003\\u0002\\u0002\\u0002\\u01c5h\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c6\\u01ca\\u0007$\\u0002\\u0002\\u01c7\\u01c9\\u0005k6\\u0002\\u01c8\\u01c7\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01c9\\u01cc\\u0003\\u0002\\u0002\\u0002\\u01ca\\u01c8\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ca\\u01cb\\u0003\\u0002\\u0002\\u0002\\u01cb\\u01cd\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01cc\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cd\\u01ce\",\n \"\\u0007$\\u0002\\u0002\\u01cej\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01d2\\n\\n\\u0002\",\n \"\\u0002\\u01d0\\u01d2\\u0005y=\\u0002\\u01d1\\u01cf\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01d1\\u01d0\\u0003\\u0002\\u0002\\u0002\\u01d2l\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01d3\\u01d6\\u0007)\\u0002\\u0002\\u01d4\\u01d7\\u0005y=\\u0002\\u01d5\\u01d7\",\n \"\\n\\u000b\\u0002\\u0002\\u01d6\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01d6\\u01d5\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d7\\u01d8\\u0003\\u0002\\u0002\\u0002\\u01d8\\u01d9\",\n \"\\u0007)\\u0002\\u0002\\u01d9n\\u0003\\u0002\\u0002\\u0002\\u01da\\u01db\\t\\f\\u0002\",\n \"\\u0002\\u01db\\u01dc\\u0003\\u0002\\u0002\\u0002\\u01dc\\u01dd\\b8\\u0002\\u0002\",\n \"\\u01ddp\\u0003\\u0002\\u0002\\u0002\\u01de\\u01df\\u0007=\\u0002\\u0002\\u01df\",\n \"r\\u0003\\u0002\\u0002\\u0002\\u01e0\\u01e2\\t\\r\\u0002\\u0002\\u01e1\\u01e0\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e2\\u01e3\\u0003\\u0002\\u0002\\u0002\\u01e3\\u01e1\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e3\\u01e4\\u0003\\u0002\\u0002\\u0002\\u01e4\\u01e7\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e5\\u01e7\\u0005q9\\u0002\\u01e6\\u01e1\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e6\\u01e5\\u0003\\u0002\\u0002\\u0002\\u01e7t\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e8\\u01e9\\t\\u000e\\u0002\\u0002\\u01e9v\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01ea\\u01eb\\t\\u000f\\u0002\\u0002\\u01ebx\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ec\\u01ed\\u0007^\\u0002\\u0002\\u01ed\\u01f1\\t\\u0010\\u0002\\u0002\\u01ee\",\n \"\\u01f1\\u0005}?\\u0002\\u01ef\\u01f1\\u0005{>\\u0002\\u01f0\\u01ec\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01f0\\u01ee\\u0003\\u0002\\u0002\\u0002\\u01f0\\u01ef\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01f1z\\u0003\\u0002\\u0002\\u0002\\u01f2\\u01f3\\u0007^\\u0002\",\n \"\\u0002\\u01f3\\u01f4\\t\\u0011\\u0002\\u0002\\u01f4\\u01f5\\u0005w<\\u0002\\u01f5\",\n \"\\u01f6\\u0005w<\\u0002\\u01f6\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01f7\\u01f8\",\n \"\\u0007^\\u0002\\u0002\\u01f8\\u01f9\\u0005w<\\u0002\\u01f9\\u01fa\\u0005w<\\u0002\",\n \"\\u01fa\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01fb\\u01fc\\u0007^\\u0002\\u0002\",\n \"\\u01fc\\u01fe\\u0005w<\\u0002\\u01fd\\u01f2\\u0003\\u0002\\u0002\\u0002\\u01fd\",\n \"\\u01f7\\u0003\\u0002\\u0002\\u0002\\u01fd\\u01fb\\u0003\\u0002\\u0002\\u0002\\u01fe\",\n \"|\\u0003\\u0002\\u0002\\u0002\\u01ff\\u0200\\u0007^\\u0002\\u0002\\u0200\\u0201\",\n \"\\u0007w\\u0002\\u0002\\u0201\\u0202\\u0005u;\\u0002\\u0202\\u0203\\u0005u;\\u0002\",\n \"\\u0203\\u0204\\u0005u;\\u0002\\u0204\\u0205\\u0005u;\\u0002\\u0205~\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0206\\u0207\\u00071\\u0002\\u0002\\u0207\\u0208\\u00071\\u0002\",\n \"\\u0002\\u0208\\u020c\\u0003\\u0002\\u0002\\u0002\\u0209\\u020b\\n\\r\\u0002\\u0002\",\n \"\\u020a\\u0209\\u0003\\u0002\\u0002\\u0002\\u020b\\u020e\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020c\\u020a\\u0003\\u0002\\u0002\\u0002\\u020c\\u020d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020d\\u0210\\u0003\\u0002\\u0002\\u0002\\u020e\\u020c\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020f\\u0211\\u0007\\u000f\\u0002\\u0002\\u0210\\u020f\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0210\\u0211\\u0003\\u0002\\u0002\\u0002\\u0211\\u0212\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0212\\u021f\\u0007\\f\\u0002\\u0002\\u0213\\u0214\\u00071\\u0002\\u0002\\u0214\",\n \"\\u0215\\u0007,\\u0002\\u0002\\u0215\\u0219\\u0003\\u0002\\u0002\\u0002\\u0216\",\n \"\\u0218\\u000b\\u0002\\u0002\\u0002\\u0217\\u0216\\u0003\\u0002\\u0002\\u0002\\u0218\",\n \"\\u021b\\u0003\\u0002\\u0002\\u0002\\u0219\\u021a\\u0003\\u0002\\u0002\\u0002\\u0219\",\n \"\\u0217\\u0003\\u0002\\u0002\\u0002\\u021a\\u021c\\u0003\\u0002\\u0002\\u0002\\u021b\",\n \"\\u0219\\u0003\\u0002\\u0002\\u0002\\u021c\\u021d\\u0007,\\u0002\\u0002\\u021d\",\n \"\\u021f\\u00071\\u0002\\u0002\\u021e\\u0206\\u0003\\u0002\\u0002\\u0002\\u021e\",\n \"\\u0213\\u0003\\u0002\\u0002\\u0002\\u021f\\u0220\\u0003\\u0002\\u0002\\u0002\\u0220\",\n \"\\u0221\\b@\\u0003\\u0002\\u0221\\u0080\\u0003\\u0002\\u0002\\u0002\\u001e\\u0002\",\n \"\\u0162\\u0175\\u017f\\u0189\\u018f\\u0194\\u019a\\u019f\\u01a1\\u01a6\\u01ac\\u01b1\",\n \"\\u01b7\\u01bb\\u01bf\\u01c4\\u01ca\\u01d1\\u01d6\\u01e3\\u01e6\\u01f0\\u01fd\\u020c\",\n \"\\u0210\\u0219\\u021e\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_FOR_ALT = 15;\nivprog.RK_FOR_FROM = 16;\nivprog.RK_FOR_TO = 17;\nivprog.RK_FOR_PASS = 18;\nivprog.RK_BREAK = 19;\nivprog.RK_DO = 20;\nivprog.RK_DO_UNTIL = 21;\nivprog.RK_WHILE = 22;\nivprog.RK_WHILE_ALT = 23;\nivprog.RK_IF = 24;\nivprog.RK_ELSE = 25;\nivprog.RK_FALSE = 26;\nivprog.RK_TRUE = 27;\nivprog.RK_REFERENCE = 28;\nivprog.OPEN_PARENTHESIS = 29;\nivprog.CLOSE_PARENTHESIS = 30;\nivprog.OPEN_BRACE = 31;\nivprog.CLOSE_BRACE = 32;\nivprog.OPEN_CURLY = 33;\nivprog.CLOSE_CURLY = 34;\nivprog.COMMA = 35;\nivprog.EQUAL = 36;\nivprog.SUM_OP = 37;\nivprog.MULTI_OP = 38;\nivprog.AND_OPERATOR = 39;\nivprog.OR_OPERATOR = 40;\nivprog.RELATIONAL_OPERATOR = 41;\nivprog.COLON = 42;\nivprog.NOT_OPERATOR = 43;\nivprog.ID = 44;\nivprog.LIB_ID = 45;\nivprog.INTEGER = 46;\nivprog.REAL = 47;\nivprog.STRING = 48;\nivprog.CHARACTER = 49;\nivprog.WHITESPACE = 50;\nivprog.EOS = 51;\nivprog.COMMENTS = 52;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'programa'\", \"'real'\", \"'vazio'\", \n \"'logico'\", \"'cadeia'\", \"'inteiro'\", \"'caractere'\", \n \"'escolha'\", \"'caso'\", \"'contrario'\", \n \"'const'\", \"'funcao'\", \"'devolva'\", \"'para'\", \n \"'repita_para'\", \"'de'\", \"'ate'\", \"'passo'\", \n \"'pare'\", \"'repita'\", \"'ate_que'\", \"'enquanto'\", \n \"'repita_enquanto'\", \"'se'\", \"'senao'\", \n \"'falso'\", \"'verdadeiro'\", \"'&'\", \"'('\", \n \"')'\", \"'['\", \"']'\", \"'{'\", \"'}'\", \"','\", \n null, null, null, null, null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_LOGICAL_NOT\", \"RK_LOGICAL_AND\", \n \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \n \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"inicio\",\n $read: \"leia\",\n $write: \"escreva\",\n $numElements: \"total_de_elementos\",\n $matrixLines: \"total_de_linhas\",\n $matrixColumns: \"total_de_colunas\",\n $substring: \"subcadeia\",\n $length: \"comprimento\",\n $uppercase: \"caixa_alta\",\n $lowercase: \"caixa_baixa\",\n $charAt: \"caractere_na_posicao\",\n $isReal: \"e_real\",\n $isInt: \"e_inteiro\",\n $isBool: \"e_logico\",\n $castReal: \"como_real\",\n $castInt: \"como_inteiro\",\n $castBool: \"como_logico\",\n $castString: \"como_cadeia\",\n $castChar: \"como_caractere\",\n $sin: \"seno\",\n $cos: \"cosseno\",\n $tan: \"tangente\",\n $sqrt: \"raiz_quadrada\",\n $pow: \"potencia\",\n $log: \"logaritmo\",\n $abs: \"modulo\",\n $negate: \"trocar_sinal\",\n $invert: \"inverter_valor\",\n $max: \"maximo\",\n $min: \"minimo\",\n $rand: \"numero_aleatorio\"\n}","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Matematica\",\n $ioLib: \"ES\",\n $strLib: \"Texto\",\n $arrayLib: \"Arranjo\",\n $langLib: \"Conversao\"\n}","module.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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Caso de teste $0 não executou com sucesso.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Caso de teste $0 falhou</span>: $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 <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo aceito pela variável <span class='ivprog-error-varname'>$3</span> 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 <span class='ivprog-error-varname'>$0</span>, você precisa de nomes distintos.\",\"inform_valid_variable_duplicated\":\"Já existe uma variável com o nome <span class='ivprog-error-varname'>$0</span> na função <span class='ivprog-error-varname'>$1</span>, você precisa de nomes distintos.\",\"inform_valid_function_duplicated\":\"Já existe uma função com o nome <span class='ivprog-error-varname'>$0</span>, você precisa de nomes distintos.\",\"inform_valid_param_duplicated\":\"Já existe um parâmetro com o nome <span class='ivprog-error-varname'>$0</span> na função <span class='ivprog-error-varname'>$1</span>, você precisa de nomes distintos.\",\"invalid_character\":\"O caractere $0 na linha $1 não pode ser utilizado neste contexto.\",\"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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Test case $0 did not executed successfully.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Test case $0 failed</span>: $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 <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable <span class='ivprog-error-varname'>$3</span> 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 <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named <span class='ivprog-error-varname'>$0</span> already exists in function <span class='ivprog-error-varname'>$1</span>, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"> <span>Test case $0 did not executed successfully.</span></div>\",\"test_case_failed_exception\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$2\\\"> <span>Test case $0 failed</span>: $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 <span class='ivprog-error-varname'>$3</span>.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable <span class='ivprog-error-varname'>$3</span> 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 <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named <span class='ivprog-error-varname'>$0</span> already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named <span class='ivprog-error-varname'>$0</span> already exists in function <span class='ivprog-error-varname'>$1</span>, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"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.\"}}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Messages = require(\"./message.csv\");\nconst UI = require(\"./ui.csv\");\nconst Errors = require(\"./error.csv\");\nconst MessagesObj = Messages;\nconst UIObj = UI;\nconst ErrorsObj = Errors;\nconst i18n_data = {};\nfor (const key in UIObj) {\n const data = {};\n data['error'] = ErrorsObj[key];\n data['message'] = MessagesObj[key];\n data['ui'] = UIObj[key];\n i18n_data[key] = data;\n}\nexports.default = i18n_data;\n","module.exports = {\"pt\":{\"test_case_success\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Caso de teste $0</span>: OK</div>\",\"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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Test case $0</span>: OK</div>\",\"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\":\"<div class='assessment-div-detail' onClick='ivprogCore.openAssessmentDetail(event)' data-page=\\\"$1\\\"><span>Test case $0</span>: OK</div>\",\"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.\"}}","module.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\",\"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_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 verdadeiro então\",\"text_message_error_activity_file\":\"Aconteceu um erro ao processar a atividade. <br> Recarregue a página para tentar novamente.\",\"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\",\"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\":\"Resultado\",\"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\",\"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_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 true then\",\"text_message_error_activity_file\":\"There was an error processing the activity.<br> Reload the page to try again.\",\"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\",\"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\":\"Result\",\"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\",\"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_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 verdad entonces\",\"text_message_error_activity_file\":\"Se produjo un error al procesar la actividad.<br> Recargar la página para volver a intentarlo.\",\"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\",\"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\":\"Result\",\"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\"}}","import line_i18n from 'line-i18n'\nimport { IVProgProcessor } from \"./../processor/ivprogProcessor\";\nimport { DOMConsole} from \"./../io/domConsole\";\nimport * as LocalizedStringsService from \"../services/localizedStringsService\";\nimport { OutputMatching } from './output_matching/output_matching';\nimport { Config } from '../util/config';\n\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nconst StringTypes = line_i18n.StringTypes;\n\nconst AssessmentConfig = {\n max_instruction_count: 350250,\n suspend_threshold: 200\n}\n\nexport class IVProgAssessment {\n\n constructor (ast_code, testCases, domConsole) {\n this.ast_code = ast_code;\n this.testCases = testCases;\n this.domConsole = domConsole;\n this.old_config = JSON.parse(JSON.stringify(Config));\n Config.setConfig(AssessmentConfig);\n }\n\n runTest () {\n try {\n // loop test cases and show messages through domconsole\n const partialTests = this.testCases.map( (t, name) => {\n return new OutputMatching(new IVProgProcessor(this.ast_code), t.input, t.output, name);\n });\n const testResult = partialTests.map(om => om.eval());\n return Promise.all(testResult).then(results => {\n let grade = 0;\n for(let i = 0; i < results.length; i += 1) {\n const result = results[i];\n grade += result.grade;\n if(result.grade == 1) {\n this.writeToConsole(DOMConsole.INFO, StringTypes.MESSAGE,'test_case_success',\n result.name + 1, result.generateOutput());\n } else if (result.status == 1) {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed_exception',\n result.name + 1, result.error_msg, result.generateOutput());\n } else {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed',\n result.name + 1, result.generateOutput());\n }\n }\n grade /= results.length;\n const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n return grade;\n });\n // return testResult.then(function (total) {\n // const grade = total / this.testCases.length;\n // const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n // this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n // return Promise.resolve(grade)\n // }).catch(err => {\n // this.domConsole.err(\"Erro inesperado durante o cálculo da nota.\");// try and show error messages through domconsole\n // this.domConsole.err(err.message);\n // return Promise.resolve(0);\n // });\n } catch (error) {\n this.showErrorMessage(DOMConsole.ERR, StringTypes.MESSAGE, \"unexpected_execution_error\");\n this.domConsole.err(error.message);\n return Promise.resolve(0);\n } finally {\n Config.setConfig(this.old_config);\n }\n }\n\n showErrorMessage (errorID, ...args) {\n this.domConsole.err(LocalizedStrings.getError(errorID, args));\n }\n\n showInfoMessage (msgID, ...args) {\n this.domConsole.info(LocalizedStrings.getMessage(msgID, args));\n }\n\n writeToConsole (channel, msgType, msgID, ...args) {\n let msg = LocalizedStrings.getString(msgID, msgType);\n msg = LocalizedStrings.processString(msg, args);\n this.domConsole.writeRawHTML(msg, channel);\n }\n}\n","import StringDiff from \"./../../util/string_diff\";\nimport { LocalizedStrings } from './../../services/localizedStringsService'\n\nexport class OutputAssessmentResult {\n\n static get PAGE_TEMPLATE () {\n return `<!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv='content-type' content='text/html; charset=UTF-8'>\n <link rel='stylesheet' href='css/ivprog-assessment.css' type='text/css'/>\n </head>\n <body>\n :assessment-result:\n </body>\n </html>`;\n }\n\n static get DETAIL_TEMPLATE () {\n return `<div class='details-body'>\n <div class='details-header'>\n <h2>:test-name:</h2>\n <p>:time-label:: <span>:time:ms</span></p>\n <p>:grade-label:: <span>:grade:%</span></p>\n </div>\n <div>\n <h3>:input-label:</h3>\n <ul>\n <li>:input-list:</li>\n </ul>\n </div>\n <div>\n <h3>:output-label:</h3>\n :output-result:\n </div>\n </div>`;\n }\n\n static get OUPUT_TABLE_TEMPLATE () {\n return `<div class='detaisl-div-table'>\n <table class='assessment-output-table'>\n <tr>\n <th>:expected-label:</th>\n <th>:generated-label:</th>\n <th>:result-label:</th>\n </tr>\n :results:\n </table>\n </div>`;\n }\n\n static get OUTPUT_TEMPLATE () {\n return `<tr><td class=':class-expected:'>$0</td>\n <td class=':class-generated:'>$1</td>\n <td class=':class-result:'>$2</td></tr>`;\n }\n\n static get EMPTY_OUTPUT_TEMPLATE () {\n return `<div class='assessment-popup'><img class='assessment-empty-output' src='img/empty.svg'>\n <span class='assessment-popuptext'>$0</span></div>`;\n }\n\n static get FAILED_TEMPLATE () {\n return `<p class='assessment-failed-execution'><span class='assessment-failed-case'>✗</span>$0</p>`;\n }\n\n static get INPUT_INFO_TEMPLATE () {\n return `<span class='$0'>$1</span>`;\n }\n\n // Status code - it is not grade related!\n // 0 - Succesful execution\n // 1 - failed execution\n constructor (name, status, inputs, result, store, time, error_msg = '') {\n this.name = name;\n this.status = status;\n this.inputs = inputs;\n this.results = result;\n this.store = store;\n this.time = time;\n this.error_msg = error_msg;\n }\n\n get grade () {\n if(this.results == null) {\n return 0;\n }\n return this.results.reduce((prev, val) => prev + val.grade, 0) / this.results.length;\n }\n\n prepareResults () {\n let template = OutputAssessmentResult.DETAIL_TEMPLATE;\n const grade = (this.grade * 100).toFixed(2);\n const time = this.time || \"-\";\n template = template.replace(':test-name:', LocalizedStrings.getUI('assessment-detail-title', [this.name + 1]));\n template = template.replace(':time-label:', LocalizedStrings.getUI('assessment-detail-time-label'));\n template = template.replace(':time:', time);\n template = template.replace(':grade-label:', LocalizedStrings.getUI('assessment-detail-grade-label'));\n template = template.replace(':grade:', grade);\n const input_spans = this.prepareInputList(this.inputs);\n template = template.replace(':input-label:', LocalizedStrings.getUI('assessment-detail-input-label'));\n template = template.replace(':input-list:', input_spans);\n template = template.replace(':output-label:', LocalizedStrings.getUI('assessment-detail-output-label'));\n if(this.status == 0) {\n const output_rows = this.results.map(result => {\n if(result.type == \"string\") {\n return this.formatString(result);\n } else if (result.type == \"number\") {\n return this.formatNumber(result);\n } else {\n return this.formatBool(result);\n }\n }, this);\n template = template.replace(':output-result:', this.prepareOutputTable(output_rows));\n } else {\n let failed_text = OutputAssessmentResult.FAILED_TEMPLATE;\n failed_text = failed_text.replace(\"$0\", this.error_msg);\n template = template.replace(\":output-result:\", failed_text);\n }\n return template;\n }\n\n prepareInputList (input_list) {\n const list = input_list.map(input => {\n let template = OutputAssessmentResult.INPUT_INFO_TEMPLATE;\n template = template.replace(\"$1\", input.value);\n if(input.read) {\n template = template.replace(\"$0\", \"assessment-input-read\");\n } else {\n template = template.replace(\"$0\", \"assessment-input-unread\");\n }\n return template;\n }, this);\n return list.join(LocalizedStrings.getUI('text_join_assessment_outputs'));\n }\n\n prepareOutputTable (output_rows) {\n let template = OutputAssessmentResult.OUPUT_TABLE_TEMPLATE;\n template = template.replace(':expected-label:', LocalizedStrings.getUI('assessment-detail-expected-label'));\n template = template.replace(':generated-label:', LocalizedStrings.getUI('assessment-detail-generated-label'));\n template = template.replace(':result-label:', LocalizedStrings.getUI('assessment-detail-result-label'));\n template = template.replace(':results:', output_rows.join(''));\n return template;\n }\n\n generateOutput () {\n const assessment_result = this.prepareResults();\n let page = OutputAssessmentResult.PAGE_TEMPLATE;\n page = page.replace(':assessment-result:', assessment_result);\n page = page.replace(/(\\r|\\n|\\t)/gm,'').replace(/> *</g, '><');\n return page;\n }\n\n formatNumber (result) {\n const result_class = result.grade == 1 ? 'assessment-number-result' : 'assessment-number-result-failed';\n let template = this.formatOutput('assessment-number-expected',\n 'assessment-number-generated', result_class, result);\n return template\n }\n\n formatBool (result) {\n const result_class = result.grade == 1 ? 'assessment-bool-result' : 'assessment-bool-result-failed';\n let template = this.formatOutput('assessment-bool-expected',\n 'assessment-bool-generated', result_class, result);\n return template\n }\n\n formatOutput (expected_class, generated_class, result_class, result) {\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n template = template.replace(\":class-result:\", result_class);\n let expected_tmpl = result.expected;\n let generated_tmpl = result.generated;\n if(expected_tmpl == null) {\n expected_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-expected-tooltip'));\n } else if(generated_tmpl == null) {\n generated_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-generated-tooltip'));\n }\n template = template.replace(\"$0\", expected_tmpl);\n template = template.replace(\"$1\", generated_tmpl);\n const final_result = result.grade == 1 ? \"✓\" : \"✗\"\n template = template.replace(\"$2\", final_result);\n return template\n }\n\n formatString (result) {\n const expected_class = 'assessment-string-expected';\n const generated_class = 'assessment-string-generated';\n //const result_class = 'assessment-string-result';\n\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n //template = template.replace(\":class-result:\", result_class);\n\n const g_string = result.generated || \"\";\n const e_string = result.expected || \"\";\n // console.log(\"generated: \", g_string,\"expected: \", e_string);\n let g_string_tmpl = g_string;\n let e_string_tmpl = e_string;\n if(result.generated == null) {\n g_string_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-generated-tooltip'));\n } else if (result.expected == null) {\n e_string_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-expected-tooltip'));\n }\n template = template.replace(\"$0\", e_string_tmpl);\n template = template.replace(\"$1\", g_string_tmpl);\n if(result.grade == 1) {\n template = template.replace(\"$2\", \"✓\");\n template = template.replace(\":class-result:\", 'assessment-string-result');\n } else {\n const diff = StringDiff(g_string, e_string);\n // console.log(diff);\n const diff_vec = diff.map(part => this.getDiffStringStyle(part[1], part[0]), this);\n const diff_string = diff_vec.reduce((prev, actual) => prev + actual, \"\");\n template = template.replace(\"$2\", \"<span class='assessment-failed-case'>✗</span>\" + diff_string);\n template = template.replace(\":class-result:\", \"assessment-string-diff\");\n }\n return template;\n }\n\n getDiffStringStyle (text, action) {\n const template = \"<span class='$0'>$1</span>\"\n // Fix missing whitespace when its a single element\n text = text.replace(/\\s/g,\"&#160;\");\n switch(action) {\n case StringDiff.INSERT:\n return template.replace(\"$0\", \"stringdiff-insert\").replace(\"$1\", text);\n case StringDiff.DELETE:\n return template.replace(\"$0\", \"stringdiff-delete\").replace(\"$1\", text);\n case StringDiff.EQUAL:\n return template.replace(\"$0\", \"stringdiff-equal\").replace(\"$1\", text);\n }\n }\n}\n","import { Decimal } from 'decimal.js';\nimport { InputAssessment } from \"../../util/input_assessment\";\nimport { OutputTest } from \"../../util/outputTest\";\nimport { Config } from \"../../util/config\";\nimport { levenshteinDistance } from \"../../util/utils\";\nimport { OutputAssessmentResult } from './assessment_result';\nimport * as TypeParser from \"./../../typeSystem/parsers\";\nimport * as LocalizedStringsService from \"../../services/localizedStringsService\";\nimport * as OutputResult from \"./output_result\";\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport class OutputMatching {\n\n static get NUM_REGEX () {\n return /^[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)$/;\n }\n\n static get NUM_IN_STRING_REGEX () {\n return /[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)/g;\n }\n\n static get BOOLEAN_REGEX () {\n const str = `^(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})$`;\n return new RegExp(str);\n }\n\n static get BOOLEAN_IN_STRING_REGEX () {\n const str = `(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})`;\n return new RegExp(str, 'g');\n }\n\n constructor (program, input_list, expected_output, test_name) {\n this.program = program;\n this.name = test_name;\n this.input_list = input_list;\n this.expected_output = expected_output;\n }\n\n eval () {\n const refThis = this;\n const input = new InputAssessment(this.input_list);\n const gen_output = new OutputTest();\n this.program.registerInput(input);\n this.program.registerOutput(gen_output);\n const start_time = Date.now();\n return this.program.interpretAST().then( sto => {\n const final_time = Date.now() - start_time;\n if(input.isInputAvailable()) {\n return new OutputAssessmentResult(this.name, 1, input.input_list,\n null, sto, final_time, refThis.getErrorMessage('test_case_few_reads', this.name+1))\n }\n const result = gen_output.list.map((g_out, i) => {\n if(i >= this.expected_output.length) {\n return new OutputResult.OutputMatchResult(null, g_out, 0, this.getPotentialOutputType(g_out));\n }\n return this.outputMatch(g_out, this.expected_output[i]);\n }, this);\n if(this.expected_output.length > gen_output.list.length) {\n console.log(\"Saída insuficientes!\",this.expected_output.length,gen_output.list.length);\n for(let i = gen_output.list.length; i < this.expected_output.length; ++i) {\n const e_out = this.expected_output[i];\n result.push(new OutputResult.OutputMatchResult(e_out, null, 0, this.getPotentialOutputType(e_out)));\n }\n } else if (this.expected_output.length == 0 && this.expected_output.length == gen_output.list.length) {\n // no output expected....\n result.push(new OutputResult.OutputMatchResult(\"\", \"\", 1, \"string\"));\n }\n return new OutputAssessmentResult(this.name, 0, input.input_list, result, sto, final_time);\n }).catch(error => {\n return new OutputAssessmentResult(this.name, 1, input.input_list, null, null,\n null, refThis.getErrorMessage('test_case_exception', this.name + 1, error.message))\n });\n }\n\n getPotentialOutputType (output) {\n if(OutputMatching.NUM_REGEX.test(output)) {\n return \"number\";\n } else if (OutputMatching.BOOLEAN_REGEX.test(output)) {\n return \"bool\";\n } else {\n return \"string\";\n }\n }\n\n outputMatch (g_output, e_output) {\n if(OutputMatching.NUM_REGEX.test(e_output)) {\n if(!OutputMatching.NUM_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output);\n }\n const g_num = new Decimal(g_output);\n const e_num = new Decimal(e_output);\n return this.checkNumbers(g_num, e_num);\n } else if (OutputMatching.BOOLEAN_REGEX.test(e_output)) {\n if (!OutputMatching.BOOLEAN_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output)\n }\n const g_bool = TypeParser.toBool(g_output);\n const e_bool = TypeParser.toBool(e_output);\n return this.checkBoolean(g_bool, e_bool);\n } else {\n return this.checkStrings(g_output, e_output);\n }\n }\n\n checkNumbers (g_num, e_num) {\n const decimalPlaces = Math.min(e_num.dp(), Config.decimalPlaces);\n g_num = new Decimal(g_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n e_num = new Decimal(e_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n const result = g_num.eq(e_num);\n const grade = result ? 1 : 0;\n return OutputResult.createNumberResult(e_num.toNumber(), g_num.toNumber(), grade);\n }\n\n checkBoolean (g_bool, e_bool) {\n const grade = g_bool == e_bool ? 1 : 0;\n const g_bool_text = TypeParser.convertBoolToString(g_bool);\n const e_bool_text = TypeParser.convertBoolToString(e_bool);\n return OutputResult.createBoolResult(e_bool_text, g_bool_text, grade);\n }\n\n checkStrings (g_output, e_ouput) {\n const assessmentList = []\n let e_output_clean = e_ouput.trim();\n let g_output_clean = g_output.trim();\n if (OutputMatching.NUM_IN_STRING_REGEX.test(e_ouput)) {\n const expected_numbers = e_ouput.match(OutputMatching.NUM_IN_STRING_REGEX);\n const generated_numbers = g_output.match(OutputMatching.NUM_IN_STRING_REGEX) || [];\n const result = generated_numbers.map((val, i) => {\n if(i >= expected_numbers.length) {\n return OutputResult.createNumberResult(null, val, 0);\n }\n const g_val = new Decimal(val)\n const e_val = new Decimal(expected_numbers[i]);\n return this.checkNumbers(g_val, e_val);\n }, this);\n if(expected_numbers.length > generated_numbers.length) {\n for(let i = generated_numbers.length; i < expected_numbers.length; ++i) {\n result.push(OutputResult.createNumberResult(expected_numbers[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '');\n g_output_clean = g_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '');\n const numberGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(numberGrade);\n }\n if(OutputMatching.BOOLEAN_IN_STRING_REGEX.test(e_ouput)) {\n const expected_bools = e_ouput.match(OutputMatching.BOOLEAN_IN_STRING_REGEX);\n const generated_bools = g_output.match(OutputMatching.BOOLEAN_IN_STRING_REGEX) || [];\n const result = generated_bools.map((val, i) => {\n if(i >= expected_bools.length) {\n return OutputResult.createBoolResult(null, val, 0);\n }\n const g_bool = TypeParser.toBool(val);\n const e_bool = TypeParser.toBool(expected_bools[i]);\n return this.checkBoolean(g_bool, e_bool );\n }, this);\n if(expected_bools.length > generated_bools.length) {\n for(let i = generated_bools.length; i < expected_bools.length; ++i) {\n result.push(OutputResult.createBoolResult(expected_bools[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '');\n g_output_clean = g_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '');\n const boolGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(boolGrade);\n }\n const dist = levenshteinDistance(g_output_clean, e_output_clean);\n let gradeDiff = Math.max(0, e_output_clean.length - dist)/e_output_clean.length;\n gradeDiff = Number.isNaN(gradeDiff) ? 0 : gradeDiff;\n const assessment_size = assessmentList.length + 1;\n const gradeAcc = assessmentList.reduce((prev, val) => prev + val/assessment_size, 0);\n const finalGrade = 1 * (gradeDiff/assessment_size + gradeAcc);\n return OutputResult.createStringResult(e_ouput, g_output, finalGrade);\n }\n\n getErrorMessage (errorID, ...args) {\n return LocalizedStrings.getError(errorID, args);\n }\n}\n\n","\nexport function createNumberResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"number\");\n}\n\nexport function createBoolResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"bool\");\n}\n\nexport function createStringResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"string\");\n}\n\nexport class OutputMatchResult {\n\n constructor (expected, generated, grade, type) {\n this.expected = expected;\n this.generated = generated;\n this.grade = grade;\n this.type = type;\n }\n}","import { SyntaxErrorFactory } from \"./error/syntaxErrorFactory\";\n\nexport function recover (_) {\n const start = this._tokenStartCharIndex;\n const stop = this._input.index;\n let text = this._input.getText(start, stop);\n text = this.getErrorDisplay(text);\n const line = this._tokenStartLine;\n const column = this._tokenStartColumn;\n throw SyntaxErrorFactory.invalid_character(text, line, column);\n}\n","import { Assign } from './assign';\n\nexport class ArrayIndexAssign extends Assign {\n\n constructor (id, lineExpression, columnExpression, expression) {\n super(id, expression);\n this.line = lineExpression;\n this.column = columnExpression;\n }\n}\n","import { Declaration } from './declaration';\n\nexport class ArrayDeclaration extends Declaration {\n\n constructor (id, type, lines, columns, initial, isConst) {\n super(id, type, initial, isConst);\n this.lines = lines;\n this.columns = columns;\n }\n\n get isVector () {\n return this.columns == null;\n }\n}","import { Command } from './command';\n\nexport class Assign extends Command {\n \n constructor (id, expression) {\n super();\n this.id = id;\n this.expression = expression;\n }\n}","import { Command } from './command';\n\nexport class Break extends Command {\n\n constructor () {\n super();\n }\n}\n","import { Command } from './command';\n\nexport class Case extends Command {\n\n constructor (expression) {\n super();\n this.expression = expression;\n /**\n * @type {Command[]}\n */\n this.commands = [];\n }\n\n /**\n * \n * @param {Command[]} commands \n */\n setCommands (commands) {\n this.commands = commands;\n }\n\n get isDefault () {\n return this.expression === null;\n }\n}","export class Command {\n\n constructor () {\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n this._sourceInfo = sourceInfo;\n }\n\n get sourceInfo () {\n return this._sourceInfo;\n }\n}\n","export class CommandBlock {\n\t\n\tconstructor(variables, commands) {\n\t\tthis.variables = variables;\n\t\tthis.commands = commands;\n\t\tthis._sourceInfo = null;\n\t}\n\n\tset sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Command } from './command';\n\nexport class Declaration extends Command {\n \n constructor (id, type, initial, isConst) {\n super();\n this.id = id;\n this.type = type;\n this.initial = initial;\n this.isConst = isConst;\n }\n}\n","import { Command } from './command';\n\nexport class For extends Command {\n\n constructor (for_id, for_from, for_to, for_pass, commandBlock) {\n super();\n this.for_id = for_id;\n this.for_from = for_from;\n this.for_to = for_to;\n this.for_pass = for_pass;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n}","export class FormalParameter {\n\n constructor (type, id, byRef = false, variadic = false) {\n this.type = type;\n this.id = id;\n this.byRef = byRef;\n this.variadic = variadic;\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Types } from './../../typeSystem/types';\n\nexport class Function {\n\n /**\n * \n * @param {string} name \n * @param {import('./../../typeSystem/itype').IType} returnType \n * @param {import('./formalParameter').FormalParameter[]} formalParameters \n * @param {import('./commandBlock').CommandBlock} commandBlock \n */\n constructor(name, returnType, formalParameters, commandBlock) {\n this.name = name;\n this.returnType = returnType;\n this.formalParameters = formalParameters;\n this.commandBlock = commandBlock;\n this._sourceInfo = null;\n }\n\n get isMain () {\n return this.name === null && this.returnType.isCompatible(Types.VOID);\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get variablesDeclarations () {\n return this.commandBlock.variables;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n }\n \n hasVariadic () {\n return this.formalParameters.some( p => p.variadic);\n }\n}","import { Command } from './command';\n\nexport class IfThenElse extends Command {\n\n constructor (condition, ifTrue, ifFalse) {\n super();\n this.condition = condition;\n this.ifTrue = ifTrue;\n this.ifFalse = ifFalse;\n }\n}","import { Break } from './break';\nimport { Return } from './return';\nimport { Assign } from './assign';\nimport { ArrayIndexAssign } from './arrayAssign';\nimport { Declaration } from './declaration';\nimport { ArrayDeclaration } from './arrayDeclaration';\nimport { While } from './while';\nimport { For } from './for';\nimport { Function } from './function';\nimport { IfThenElse } from './ifThenElse';\nimport { CommandBlock } from './commandBlock';\nimport { RepeatUntil } from './repeatUntil';\nimport { Switch } from './switch';\nimport { Case } from './case';\nimport { SysCall } from './sysCall';\nimport { FormalParameter } from './formalParameter';\nimport { FunctionCall } from './../expressions/functionCall'; //Proxy to expression since they do exatcly the same thing\n\nexport {\n Break,\n Return,\n Assign,\n ArrayIndexAssign,\n Declaration,\n ArrayDeclaration,\n While,\n For,\n Function,\n IfThenElse,\n CommandBlock,\n RepeatUntil,\n Switch,\n Case,\n SysCall,\n FormalParameter,\n FunctionCall\n};","import { While } from './while';\n\nexport class RepeatUntil extends While {\n\n constructor(condition, commandBlock) {\n super(condition, commandBlock);\n }\n\n get testFirst () {\n return false;\n }\n \n}","import { Command } from './command';\n\nexport class Return extends Command {\n\n constructor(expression) {\n super();\n this.expression = expression;\n }\n \n}","import { Command } from './command';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from '../expressions/expression';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Case } from '.';\n\nexport class Switch extends Command {\n \n /**\n * \n * @param {Expression} expression \n * @param {Case[]} cases \n */\n constructor (expression, cases) {\n super();\n this.expression = expression;\n this.cases = cases;\n }\n}","/**\n * This class represents all the language defined functions.\n * The language processor uses the id provided here to properly execute the desired function.\n * The function is actually implemented inside the language processor.\n * All the functions can be found at: js/processor/definedFunctions.js\n */\nexport class SysCall {\n\n constructor (langFunc) {\n this.langFunc = langFunc;\n }\n}","import { Command } from './command';\n\nexport class While extends Command {\n\n constructor (expression, commandBlock) {\n super();\n this.expression = expression;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get testFirst () {\n \treturn true;\n }\n}","export class SyntaxError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, SyntaxError);\n }\n}\n","import * as LocalizedStringsService from './../../services/localizedStringsService';\nimport { SyntaxError } from './syntaxError';\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createError (message_id, context = []) {\n return new SyntaxError(LocalizedStrings.getError(message_id, context));\n}\n\nexport const SyntaxErrorFactory = Object.freeze({\n extra_lines: () => new SyntaxError(LocalizedStrings.getError(\"extra_lines\")),\n token_missing_one: (expected, token) => {\n const context = [expected, token.text, token.line, token.column];\n return createError(\"token_missing_one\", context);\n },\n token_missing_list: (expectedList, token) => {\n const line = expectedList.join(LocalizedStrings.getOR());\n return SyntaxErrorFactory.token_missing_one(line, token);\n },\n id_missing: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"id_missing\", context);\n },\n eos_missing: (token) => {\n const context = [token.line, token.column];\n return createError(\"eos_missing\", context);\n },\n invalid_array_dimension: (typeName, token) => {\n const context = [token.line, token.column, typeName];\n return createError(\"invalid_array_dimension\", context);\n },\n invalid_array_size: (token) => {\n const context = [token.line];\n return createError(\"invalid_array_size\", context);\n },\n invalid_main_return: (name, typeName, token) => {\n const context = [name, typeName, token.line];\n return createError(\"invalid_main_return\", context);\n },\n invalid_var_declaration: (token) => {\n const context = [token.line];\n return createError(\"invalid_var_declaration\", context);\n },\n invalid_break_command: (cmdName, token) => {\n const context = [token.line, cmdName];\n return createError(\"invalid_break_command\", context);\n },\n invalid_terminal: (token) => {\n const context = [token.text, token.line, token.column];\n return createError('invalid_terminal', context);\n },\n invalid_type: (list, token) => {\n const line = list.join(LocalizedStrings.getOR());\n const context = [token.text, token.line, token.column, line]\n return createError(\"invalid_type\", context);\n },\n const_not_init: (token) => {\n const context = [token.line, token.column];\n return createError(\"const_not_init\", context);\n },\n invalid_id_format: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"invalid_id_format\", context);\n },\n duplicate_function: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"duplicate_function\", context);\n },\n main_parameters: () => {\n return createError(\"main_parameters\");\n },\n duplicate_variable: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"duplicate_variable\", context);\n },\n invalid_character: (text, line, _column) => {\n const context = [text, line];\n return createError(\"invalid_character\", context);\n },\n annonymous_array_literal: (token) => {\n const context = [token.line];\n return createError(\"annonymous_array_literal\", context);\n },\n invalid_matrix_literal_line: (exp, sourceInfo) => {\n const context = [exp, sourceInfo.line];\n return createError(\"invalid_matrix_literal_line\", context);\n },\n cannot_infer_matrix_line: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_matrix_line\", context);\n },\n cannot_infer_matrix_column: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_matrix_column\", context);\n },\n cannot_infer_vector_size: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_vector_size\", context);\n },\n matrix_to_vector_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n return createError(\"matrix_to_vector_literal_attr\", context);\n },\n vector_to_matrix_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n return createError(\"vector_to_matrix_literal_attr\", context);\n },\n array_init_not_literal: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"array_init_not_literal\", context);\n },\n array_exceeds_2d: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"array_exceeds_2d\", context);\n },\n invalid_matrix_id_dimension: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_matrix_id_dimension\", context);\n },\n invalid_vector_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_vector_init\", context);\n },\n invalid_matrix_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_matrix_init\", context);\n }\n});\n","import { Expression } from './expression';\n\nexport class ArrayAccess extends Expression {\n\t\n\tconstructor (id, line, column) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.line = line;\n\t\tthis.column = column;\n\t}\n\n\ttoString () {\n\t\tconst strLine = this.line.toString();\n\t\tlet strColumn = null;\n\t\tif(this.column) {\n\t\t\tstrColumn = this.column.toString();\n\t\t}\n\t\tlet text = null;\n\t\tif(strColumn) {\n\t\t\ttext = `${this.id}[${strLine}][${strColumn}]`;\n\t\t} else {\n\t\t\ttext = `${this.id}[${strLine}]`;\n\t\t}\n\t\tif(this.parenthesis ){\n\t\t\treturn `(${text})`\n\t\t} else {\n\t\t\treturn text;\n\t\t}\n\t}\n}","import { Literal } from './literal';\n\nexport class ArrayLiteral extends Literal {\n \n /**\n * \n * @param {import('../../typeSystem/itype').IType} type \n * @param {import('./expression').Expression[]} value \n */\n constructor(type, value) {\n super(type);\n this.value = value;\n }\n\n get subtype () {\n const element = this.value[0];\n if (element instanceof ArrayLiteral) {\n return element.value[0].type;\n } else {\n return element.type;\n }\n }\n\n get lines () {\n return this.value.length;\n }\n\n get columns () {\n const element = this.value[0];\n if (!(element instanceof ArrayLiteral)){\n return null;\n } else {\n return element.value.length;\n }\n }\n\n get isVector () {\n return this.columns === null;\n }\n\n get isValid () {\n return this.validateSize() && this.validateType();\n }\n\n validateType () {\n const valid = true;\n // const subtype = this.subtype;\n // if(this.columns !== null) {\n // const len = this.lines;\n // const len2 = this.columns;\n // for (let i = len - 1; i >= 0 && valid; --i) {\n // for (let j = len2 - 1; j >= 0 && valid; --j) {\n // if(!this.value[i].value[j].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // } else {\n // const len = this.lines;\n // for (var i = len - 1; i >= 0 && valid; i--) {\n // if(!this.value[i].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // Cannot validate type since no information on variables literals are available\n return valid;\n }\n\n validateSize () {\n const valid = true;\n // if(this.columns !== null) {\n // const equalityTest = this.value.map(v => v.value.length)\n // .reduce((old, next) => {\n // console.log(next);\n // if (old == null) {\n // return next;\n // } else if (old === next) {\n // return old\n // } else {\n // return -1;\n // }\n // }, null);\n // valid = equalityTest !== -1;\n // }\n // check is now made inside IVProgParser.parseVectorList(...)\n return valid;\n }\n\n toString () {\n const strList = this.value.map(arrayLiteral => arrayLiteral.toString());\n const text = \"{\" + strList.join(',') + \"}\";\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}\n","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertBoolToString } from \"./../../typeSystem/parsers\";\n\nexport class BoolLiteral extends Literal {\n \n constructor(value) {\n super(Types.BOOLEAN);\n this.value = value;\n }\n\n toString () {\n const text = convertBoolToString(this.value);\n if(this.parenthesis) {\n return `(${text})`\n } else {\n return text;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class CharLiteral extends Literal {\n \n constructor(value) {\n super(Types.CHAR);\n this.value = value;\n }\n\n toString () {\n const text = `'${this.value}'`;\n if(this.parenthesis) {\n return `(${text})`\n } else {\n return text;\n }\n }\n}","export class Expression {\n\n constructor () {\n\t\tthis._sourceInfo = null;\n\t\tthis._parenthesis = false;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n\n\tset parenthesis (flag) {\n\t\tthis._parenthesis = flag;\n\t}\n\n\tget parenthesis () {\n\t\treturn this._parenthesis;\n\t}\n}","import { Expression } from './expression';\nimport { LanguageDefinedFunction } from '../../processor/definedFunctions';\n\nexport class FunctionCall extends Expression {\n\n\t/**\n\t * \n\t * @param {string} id \n\t * @param {Expression[]} actualParameters \n\t */\n\tconstructor (id, actualParameters) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.actualParameters = actualParameters;\n\t}\n\n\tget isMainCall () {\n\t\treturn this.id === null;\n\t}\n\n\tget parametersSize () {\n\t\treturn this.actualParameters.length;\n\t}\n\n\ttoString () {\n\t\tlet name = null;\n\t\tif(this.isMainCall) {\n\t\t\tname = LanguageDefinedFunction.getMainFunctionName();\n\t\t} else {\n\t\t\tname = LanguageDefinedFunction.getLocalName(this.id);\n\t\t}\n\t\tlet params = null;\n\t\tif(this.actualParameters.length == 0) {\n\t\t\tparams = \"()\";\n\t\t} else {\n\t\t\tconst strParams = this.actualParameters.map(v => v.toString());\n\t\t\tparams = \"(\" + strParams.join(\",\") + \")\";\n\t\t}\n\t\tif(this.parenthesis) {\n\t\t\treturn `(${name + params})`;\n\t\t} else {\n\t\t\treturn name + params;\n\t\t}\n\t}\n}","import { ArrayAccess } from './arrayAccess';\nimport { FunctionCall } from './functionCall';\nimport { IntLiteral } from './intLiteral';\nimport { RealLiteral } from './realLiteral';\nimport { BoolLiteral } from './boolLiteral';\nimport { CharLiteral } from './charLiteral'\nimport { StringLiteral } from './stringLiteral';\nimport { ArrayLiteral } from './arrayLiteral';\nimport { VariableLiteral } from './variableLiteral';\nimport { InfixApp } from './infixApp';\nimport { UnaryApp } from './unaryApp';\n\nexport {\n\tArrayAccess,\n\tFunctionCall,\n IntLiteral,\n RealLiteral,\n BoolLiteral,\n CharLiteral,\n StringLiteral,\n ArrayLiteral,\n VariableLiteral,\n InfixApp,\n UnaryApp\n};","import { Expression } from './expression';\n\nexport class InfixApp extends Expression {\n\n constructor(op, left, right) {\n super();\n this.op = op;\n this.left = left;\n this.right = right;\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n const r = this.right.toString();\n if(this.parenthesis) {\n return `(${l + op + r})`;\n } else {\n return l + op + r;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class IntLiteral extends Literal {\n \n constructor(value) {\n super(Types.INTEGER);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Expression } from './expression';\n\nexport class Literal extends Expression {\n \n constructor (type) {\n super();\n this.type = type;\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class RealLiteral extends Literal {\n \n constructor(value) {\n super(Types.REAL);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if (this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class StringLiteral extends Literal {\n \n constructor(value) {\n super(Types.STRING);\n this.value = value;\n }\n\n toString() {\n const text = '\"' + this.value + '\"';\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import {InfixApp} from './infixApp';\n\nexport class UnaryApp extends InfixApp {\n \n constructor (op, left) {\n super(op, left, null);\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n if(this.parenthesis) {\n return `(${op + l})`;\n } else {\n return op + l;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class VariableLiteral extends Literal {\n \n constructor(id) {\n super(Types.UNDEFINED);\n this.id = id;\n }\n\n toString () {\n if(this.parenthesis) {\n return `(${this.id})`;\n } else {\n return this.id;\n }\n }\n}","import { CommonTokenStream, InputStream } from 'antlr4/index';\nimport * as Expressions from './expressions';\nimport * as Commands from './commands';\nimport * as AstHelpers from \"./ast_helpers\";\nimport * as Parsers from '../typeSystem/parsers';\nimport { Types } from \"../typeSystem/types\";\nimport { ArrayType } from \"../typeSystem/array_type\";\nimport { SourceInfo } from './sourceInfo';\nimport { convertFromString } from './operators';\nimport { SyntaxErrorFactory } from './error/syntaxErrorFactory';\nimport { LanguageDefinedFunction } from '../processor/definedFunctions';\nimport { LanguageService } from '../services/languageService';\n\nexport class IVProgParser {\n\n static createParser (input) {\n const lexerClass = LanguageService.getCurrentLexer();\n return new IVProgParser(input, lexerClass);\n }\n\n // <BEGIN scope consts>\n static get BASE () {\n return 0;\n }\n static get FUNCTION () {\n return 1;\n }\n static get COMMAND () {\n return 2;\n }\n static get BREAKABLE () {\n return 4;\n }\n // </ END scope consts>\n\n constructor (input, lexerClass) {\n this.lexerClass = lexerClass;\n this.inputStream = new InputStream(input)\n this.lexer = new lexerClass(this.inputStream);\n this.lexer.recover = AstHelpers.recover.bind(this.lexer);\n this.tokenStream = new CommonTokenStream(this.lexer);\n this.tokenStream.fill();\n this.pos = 1;\n this.variableTypes = [this.lexerClass.RK_INTEGER,\n this.lexerClass.RK_REAL,\n this.lexerClass.RK_BOOLEAN,\n this.lexerClass.RK_STRING,\n this.lexerClass.RK_CHARACTER\n ];\n this.functionTypes = this.variableTypes.concat(this.lexerClass.RK_VOID);\n this.parsingArrayDimension = 0;\n this.scope = [];\n this.langFuncs = LanguageService.getCurrentLangFuncs();\n this.definedFuncsNameList = [];\n this.definedVariablesStack = [];\n }\n\n parseTree () {\n return this.parseProgram();\n }\n\n getToken (index = this.pos) {\n // if(index === null)\n // index = this.pos;\n return this.tokenStream.LT(index);\n }\n\n insideScope (scope) {\n if(this.scope.length <= 0) {\n return IVProgParser.BASE === scope;\n } else {\n return this.scope[this.scope.length-1] === scope;\n }\n }\n\n pushScope (scope) {\n this.scope.push(scope);\n }\n\n pushVariableStack () {\n this.definedVariablesStack.push([]);\n }\n\n popScope () {\n return this.scope.pop();\n }\n\n popVariableStack () {\n return this.definedVariablesStack.pop();\n }\n\n getCurrentVariableStack () {\n return this.definedVariablesStack[this.definedVariablesStack.length - 1];\n }\n\n isEOF () {\n this.getToken(this.pos);\n return this.tokenStream.fetchedEOF;\n }\n\n parseProgram () {\n this.consumeNewLines();\n const token = this.getToken();\n let globalVars = [];\n let functions = [];\n\n if(this.lexerClass.RK_PROGRAM === token.type) {\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.pushVariableStack();\n for(;;) {\n this.consumeNewLines();\n const token = this.getToken();\n if (token.type === this.lexerClass.RK_CONST || this.isVariableType(token)) {\n globalVars = globalVars.concat(this.parseGlobalVariables());\n } else if (token.type === this.lexerClass.RK_FUNCTION) {\n this.pushVariableStack();\n functions = functions.concat(this.parseFunction());\n this.popVariableStack();\n } else {\n break;\n }\n }\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n if(!this.isEOF()) {\n throw SyntaxErrorFactory.extra_lines();\n }\n this.popVariableStack();\n return {global: globalVars, functions: functions};\n } else {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_PROGRAM],\n token);\n }\n }\n\n checkOpenCurly (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_CURLY !== token.type){\n if(!attempt)\n throw SyntaxErrorFactory.token_missing_one('{', token);\n else\n return false;\n }\n return true;\n }\n\n checkCloseCurly (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_CURLY !== token.type){\n if(!attempt)\n throw SyntaxErrorFactory.token_missing_one('}', token);\n else\n return false;\n }\n return true;\n }\n\n /* It checks if the current token at position pos is a ']'.\n * As a check function it doesn't increment pos.\n *\n * @params bool:attempt, indicates that the token is optional. Defaults: false\n *\n * @returns true if the attempt is true and current token is '[',\n * false is attempt is true and current token is not '['\n **/\n checkOpenBrace (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_BRACE !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one('[', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseBrace (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_BRACE !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(']', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkOpenParenthesis (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_PARENTHESIS !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one('(', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseParenthesis (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_PARENTHESIS !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(')', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkEOS (attempt = false) {\n const eosToken = this.getToken();\n if (eosToken.type !== this.lexerClass.EOS) {\n if (!attempt)\n throw SyntaxErrorFactory.eos_missing(eosToken);\n else\n return false;\n }\n return true;\n }\n\n checkFunctionDuplicate (functionID, funcIDToken) {\n const id = functionID === null ? \"$main\" : functionID;\n const index = this.definedFuncsNameList.indexOf(id);\n if(index !== -1) {\n throw SyntaxErrorFactory.duplicate_function(funcIDToken);\n }\n this.definedFuncsNameList.push(id);\n }\n\n checkVariableDuplicate (variableID, sourceInfo) {\n const index = this.getCurrentVariableStack().indexOf(variableID);\n if(index !== -1) {\n throw SyntaxErrorFactory.duplicate_variable(sourceInfo);\n }\n this.getCurrentVariableStack().push(variableID);\n }\n\n consumeForSemiColon () {\n const eosToken = this.getToken();\n if (eosToken.type === this.lexerClass.EOS && eosToken.text.match(';')) {\n this.pos++;\n return; \n }\n throw SyntaxErrorFactory.token_missing_one(';', eosToken);\n }\n\n parseGlobalVariables () {\n const decl = this.parseMaybeConst();\n this.checkEOS();\n this.pos++;\n return decl;\n }\n\n /*\n * Checks if the next token is PR_CONST. It's only available\n * at global variables declaration level\n * @returns Declararion(const, type, id, initVal?)\n **/\n parseMaybeConst () {\n const constToken = this.getToken();\n if(constToken.type === this.lexerClass.RK_CONST) {\n this.pos++;\n const typeString = this.parseType();\n return this.parseDeclaration(typeString, true);\n } else if(this.isVariableType(constToken)) {\n const typeString = this.parseType();\n return this.parseDeclaration(typeString);\n } else {\n throw SyntaxErrorFactory.token_missing_list(\n [this.lexer.literalNames[this.lexerClass.RK_CONST]].concat(this.getTypeArray()), constToken);\n }\n\n }\n\n /*\n * Parses a declarion of the form: type --- id --- (= --- EAnd)?\n * @returns a list of Declararion(const, type, id, initVal?)\n **/\n parseDeclaration (typeString, isConst = false) {\n let initial = null;\n let dim1 = null;\n let dim2 = null;\n let dimensions = 0;\n const sourceInfo = SourceInfo.createSourceInfo(this.getToken())\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, sourceInfo);\n // Check for array or vector\n // ID[int/IDi?][int/IDj?]\n if (this.checkOpenBrace(true)) {\n this.pos += 1; \n this.consumeNewLines();\n dim1 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1\n if(this.checkOpenBrace(true)) {\n this.pos += 1;\n this.consumeNewLines();\n dim2 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1\n }\n return this.parseArrayDeclaration(typeString, isConst, idString, sourceInfo, dimensions, dim1, dim2);\n } else {\n const equalsToken = this.getToken();\n if(isConst && equalsToken.type !== this.lexerClass.EQUAL ) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if(equalsToken.type === this.lexerClass.EQUAL) {\n this.pos++;\n initial = this.parseExpressionOR();\n }\n const declaration = new Commands.Declaration(idString, typeString, initial, isConst);\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if(commaToken.type === this.lexerClass.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration]\n .concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration]\n }\n }\n }\n\n parseArrayDeclaration (typeString, isConst, idString, sourceInfo, dimensions, dim1, dim2) {\n const equalsToken = this.getToken();\n let n_lines = dim1;\n let n_columns = dim2;\n let initial = null;\n let dim_is_id = false;\n if(dim1 instanceof Expressions.VariableLiteral || dim2 instanceof Expressions.VariableLiteral) {\n dim_is_id = true;\n if(dimensions > 1 && (dim1 == null || dim2 == null)) {\n throw SyntaxErrorFactory.invalid_matrix_id_dimension(SourceInfo.createSourceInfo(equalsToken));\n }\n }\n if(isConst && equalsToken.type !== this.lexerClass.EQUAL ) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if(equalsToken.type === this.lexerClass.EQUAL) {\n if(dim_is_id) {\n if(dimensions == 1) {\n throw SyntaxErrorFactory.invalid_vector_init(SourceInfo.createSourceInfo(equalsToken));\n } else {\n throw SyntaxErrorFactory.invalid_matrix_init(SourceInfo.createSourceInfo(equalsToken));\n }\n }\n this.pos += 1\n initial = this.parseArrayLiteral(typeString);\n }\n if(initial == null && dim1 == null) {\n if(dimensions > 1) {\n throw SyntaxErrorFactory.cannot_infer_matrix_line(idString, sourceInfo);\n }\n throw SyntaxErrorFactory.cannot_infer_vector_size(idString, sourceInfo);\n }\n if(dimensions > 1) {\n if(initial == null && dim2 == null) {\n throw SyntaxErrorFactory.cannot_infer_matrix_column(idString, sourceInfo);\n }\n }\n\n if(dimensions === 1 && initial != null && !initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.matrix_to_vector_literal_attr(idString, expString, initial.sourceInfo);\n } else if (dimensions > 1 && initial != null && initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.vector_to_matrix_literal_attr(idString, expString, initial.sourceInfo);\n }\n\n if(dim1 == null) {\n n_lines = new Expressions.IntLiteral(Parsers.toInt(initial.lines));\n n_lines.sourceInfo = sourceInfo;\n }\n\n if (dimensions > 1) {\n if(dim2 == null) {\n n_columns = new Expressions.IntLiteral(Parsers.toInt(initial.columns));\n n_columns.sourceInfo = sourceInfo;\n } \n }\n const declaration = new Commands.ArrayDeclaration(idString,\n new ArrayType(typeString, dimensions), n_lines, n_columns, initial, isConst);\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if(commaToken.type === this.lexerClass.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration]\n .concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration]\n }\n }\n\n consumeNewLines () {\n let token = this.getToken();\n while(token.type === this.lexerClass.EOS && token.text.match('[\\r\\n]+')) {\n this.pos++;\n token = this.getToken();\n }\n }\n\n isVariableType (token) {\n return this.variableTypes.find(v => v === token.type);\n }\n\n /*\n * Reads the next token of the stream to check if it is a Integer or an ID.\n * @returns Integer | ID\n **/\n parseArrayDimension () {\n const dimToken = this.getToken();\n if(dimToken.type === this.lexerClass.INTEGER) {\n //parse as int literal\n this.pos++;\n return this.getIntLiteral(dimToken);\n } else if(dimToken.type === this.lexerClass.ID) {\n //parse as variable\n this.pos++;\n return this.parseVariable(dimToken);\n } else if(dimToken.type === this.lexerClass.CLOSE_BRACE) {\n return null;\n } else {\n throw SyntaxErrorFactory.invalid_array_dimension(this.lexer.literalNames[this.lexerClass.RK_INTEGER], dimToken);\n }\n }\n\n /*\n * Returns an object {type: 'int', value: value}.\n * It checks for binary and hexadecimal integers.\n * @returns object with fields type and value\n **/\n getIntLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.IntLiteral(Parsers.toInt(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getRealLiteral (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.RealLiteral(Parsers.toReal(token.text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getStringLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.StringLiteral(Parsers.toString(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getCharLiteral (token) {\n const text = token.text;\n const exp = new Expressions.CharLiteral(Parsers.toChar(text));\n exp.sourceInfo = SourceInfo.createSourceInfo(token);\n return exp;\n }\n\n getBoolLiteral (token) {\n const val = Parsers.toBool(token.text);\n const exp = new Expressions.BoolLiteral(val);\n exp.sourceInfo = SourceInfo.createSourceInfo(token);\n return exp;\n }\n\n parseArrayLiteral (typeString) {\n const openCurly = this.checkOpenCurly(true);\n if(!openCurly) {\n const invalid_token = this.getToken();\n throw SyntaxErrorFactory.array_init_not_literal(SourceInfo.createSourceInfo(invalid_token));\n }\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(SourceInfo.createSourceInfo(beginArray));\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n let data = null;\n const maybeCurlyOpen = this.checkOpenCurly(true);\n if(maybeCurlyOpen) {\n // This is potentially a list of vectors\n data = this.parseVectorList(typeString);\n } else {\n data = this.parseExpressionList();\n }\n this.consumeNewLines();\n this.checkCloseCurly()\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(beginArray, endArray);\n let dataDim = 1;\n if(data[0] instanceof Expressions.ArrayLiteral) {\n dataDim += 1;\n } else if(data.length == 1) {\n console.log(\"Talvez uma variável seja uma melhor opção\");\n }\n const type = new ArrayType(typeString, dataDim);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /** \n * Returns a list of ArrayLiterals. Helper function for parsing matrices\n */\n parseVectorList (typeString) {\n const list = [];\n let lastSize = null;\n for(;;) {\n this.checkOpenCurly();\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(SourceInfo.createSourceInfo(beginArray));\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n const data = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseCurly()\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(beginArray, endArray);\n if(lastSize == null) {\n lastSize = data.length;\n } else if (lastSize !== data.length) {\n const expString = this.inputStream.getText(beginArray.start, endArray.stop);\n throw SyntaxErrorFactory.invalid_matrix_literal_line(expString, sourceInfo);\n }\n const type = new ArrayType(typeString, 1);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n list.push(exp);\n const commaToken = this.getToken();\n if(commaToken.type !== this.lexerClass.COMMA) {\n break;\n } \n this.pos += 1;\n this.consumeNewLines();\n }\n if(list.length == 1) {\n console.log(\"Talvez um vetor seja uma melhor opção\");\n }\n return list\n }\n\n /*\n * Returns an object {type: 'variable', value: value}.\n * @returns object with fields type and value\n **/\n parseVariable (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.VariableLiteral(token.text);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /*\n * Returns an object representing a function. It has\n * four attributes: returnType, id, formalParams and block.\n * The block object has two attributes: declarations and commands\n **/\n parseFunction () {\n this.pushScope(IVProgParser.FUNCTION);\n let formalParams = [];\n const token = this.getToken();\n if(token.type !== this.lexerClass.RK_FUNCTION) {\n //throw SyntaxError.createError(this.lexer.literalNames[this.lexerClass.PR_FUNCAO], token);\n return null;\n }\n this.pos++;\n const funType = this.parseType();\n let dimensions = 0;\n if(this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n if(this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n }\n }\n const funcIDToken = this.getToken();\n const functionID = this.parseID();\n this.checkFunctionDuplicate(functionID, funcIDToken);\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n if (!this.checkCloseParenthesis(true)) {\n formalParams = this.parseFormalParameters(); // formal parameters \n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n } else {\n this.pos++;\n }\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n let returnType = funType;\n if(dimensions > 0) {\n returnType = new ArrayType(funType, dimensions);\n }\n const func = new Commands.Function(functionID, returnType, formalParams, commandsBlock);\n if (functionID === null && !func.isMain) {\n throw SyntaxErrorFactory.invalid_main_return(LanguageDefinedFunction.getMainFunctionName(),\n this.lexer.literalNames[this.lexerClass.RK_VOID],\n token.line);\n } else if (func.isMain && formalParams.length !== 0) {\n throw SyntaxErrorFactory.main_parameters();\n }\n this.popScope();\n return func;\n }\n\n /*\n * Parse the formal parameters of a function.\n * @returns a list of objects with the following attributes: type, id and dimensions.\n **/\n parseFormalParameters () {\n const list = [];\n for(;;) {\n let dimensions = 0;\n let reference = false;\n const typeString = this.parseType();\n let maybeIDToken = this.getToken();\n if(maybeIDToken.type === this.lexerClass.RK_REFERENCE) {\n reference = true;\n this.pos += 1;\n maybeIDToken = this.getToken();\n }\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, maybeIDToken);\n if (this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n if(this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n }\n }\n let type = null;\n if(dimensions > 0) {\n type = new ArrayType(typeString, dimensions);\n } else {\n type = typeString;\n }\n const parameter = new Commands.FormalParameter(type, idString, reference);\n parameter.sourceInfo = SourceInfo.createSourceInfo(maybeIDToken);\n list.push(parameter);\n const commaToken = this.getToken();\n if (commaToken.type !== this.lexerClass.COMMA)\n break;\n this.pos++;\n this.consumeNewLines();\n }\n return list;\n }\n\n parseID () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.ID) {\n throw SyntaxErrorFactory.id_missing(token);\n }\n this.pos++;\n if (this.insideScope(IVProgParser.FUNCTION)) {\n if (token.text === LanguageDefinedFunction.getMainFunctionName()){\n return null;\n }\n }\n return token.text;\n }\n\n parseMaybeLibID () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.ID && token.type !== this.lexerClass.LIB_ID) {\n throw SyntaxErrorFactory.id_missing(token);\n } \n this.pos++;\n return token.text;\n }\n\n parseType () {\n const token = this.getToken();\n if(token.type === this.lexerClass.ID && this.insideScope(IVProgParser.FUNCTION)) {\n return Types.VOID;\n } else if (token.type === this.lexerClass.RK_VOID && this.insideScope(IVProgParser.FUNCTION)) {\n this.pos++;\n return Types.VOID;\n } else if (this.isVariableType(token)) {\n this.pos++;\n switch(token.type) {\n case this.lexerClass.RK_INTEGER:\n return Types.INTEGER;\n case this.lexerClass.RK_BOOLEAN:\n return Types.BOOLEAN;\n case this.lexerClass.RK_REAL:\n return Types.REAL;\n case this.lexerClass.RK_STRING:\n return Types.STRING;\n case this.lexerClass.RK_CHARACTER:\n return Types.CHAR;\n default:\n break;\n }\n }\n \n throw SyntaxErrorFactory.invalid_type(this.getTypeArray(), token);\n }\n\n parseCommandBlock (optionalCurly = false) {\n let variablesDecl = [];\n const commands = [];\n let hasOpen = false;\n if (this.checkOpenCurly(optionalCurly)) {\n this.pos++;\n hasOpen = true;\n }\n this.consumeNewLines();\n let parsedCommand = false;\n for(;;) {\n\n const cmd = this.parseCommand();\n if (cmd === null)\n break;\n if(cmd !== -1) {\n if (cmd instanceof Array) {\n if(parsedCommand) {\n const lastToken = this.getToken(this.pos - 1);\n throw SyntaxErrorFactory.invalid_var_declaration(lastToken);\n }\n variablesDecl = variablesDecl.concat(cmd);\n } else {\n parsedCommand = true;\n commands.push(cmd);\n }\n }\n }\n this.consumeNewLines();\n if (hasOpen) {\n this.checkCloseCurly()\n this.pos++;\n this.consumeNewLines();\n }\n return new Commands.CommandBlock(variablesDecl, commands);\n }\n\n parseCommand () {\n const token = this.getToken();\n if (this.isVariableType(token)) {\n if(!this.insideScope(IVProgParser.FUNCTION)) {\n throw SyntaxErrorFactory.invalid_var_declaration(token);\n }\n this.pushScope(IVProgParser.BASE);\n const varType = this.parseType();\n this.popScope();\n const cmd = this.parseDeclaration(varType);\n this.checkEOS();\n this.pos++;\n return cmd;\n } else if (token.type === this.lexerClass.ID) {\n return this.parseIDCommand();\n } else if (token.type === this.lexerClass.LIB_ID) {\n return this.parseIDCommand();\n } else if (token.type === this.lexerClass.RK_RETURN) {\n return this.parseReturn();\n } else if (token.type === this.lexerClass.RK_WHILE || token.type === this.lexerClass.RK_WHILE_ALT) {\n return this.parseWhile();\n } else if (token.type === this.lexerClass.RK_FOR || token.type === this.lexerClass.RK_FOR_ALT) {\n return this.parseFor();\n } else if (token.type === this.lexerClass.RK_BREAK ) {\n if(!this.insideScope(IVProgParser.BREAKABLE)) {\n throw SyntaxErrorFactory.invalid_break_command(\n this.lexer.literalNames[this.lexerClass.RK_BREAK],\n token\n );\n }\n return this.parseBreak();\n } else if (token.type === this.lexerClass.RK_SWITCH) {\n return this.parseSwitchCase();\n } else if (token.type === this.lexerClass.RK_DO) {\n return this.parseRepeatUntil();\n } else if (token.type === this.lexerClass.RK_IF) {\n return this.parseIfThenElse();\n } else if (this.checkEOS(true)){\n this.pos++;\n return -1;\n } else {\n return null;\n }\n }\n\n parseSwitchCase () {\n this.pushScope(IVProgParser.BREAKABLE);\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.consumeNewLines();\n const casesList = this.parseCases();\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n\n this.popScope();\n return new Commands.Switch(exp, casesList);\n }\n\n parseRepeatUntil () {\n this.pos++;\n this.consumeNewLines();\n this.pushScope(IVProgParser.BREAKABLE);\n const commandsBlock = this.parseCommandBlock();\n this.consumeNewLines(); //Maybe not...\n const whileToken = this.getToken();\n if (whileToken.type !== this.lexerClass.RK_DO_UNTIL) {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_DO_UNTIL], whileToken);\n }\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const condition = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.checkEOS();\n this.popScope();\n return new Commands.RepeatUntil(condition, commandsBlock);\n }\n\n parseIfThenElse () {\n if(this.insideScope(IVProgParser.BREAKABLE)) {\n this.pushScope(IVProgParser.BREAKABLE);\n } else {\n this.pushScope(IVProgParser.COMMAND);\n }\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n\n const maybeElse = this.getToken();\n if(maybeElse.type === this.lexerClass.RK_ELSE) {\n this.pos++;\n this.consumeNewLines();\n const maybeIf = this.getToken();\n let elseBlock = null;\n if(this.checkOpenCurly(true)) {\n elseBlock = this.parseCommandBlock();\n } else if(maybeIf.type === this.lexerClass.RK_IF) {\n elseBlock = this.parseIfThenElse();\n } else {\n throw SyntaxErrorFactory.token_missing_list([this.lexer.literalNames[this.lexerClass.RK_IF], '{'], maybeIf);\n }\n this.popScope();\n const cmd = new Commands.IfThenElse(logicalExpression, cmdBlocks, elseBlock);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n this.popScope();\n\n const cmd = new Commands.IfThenElse(logicalExpression, cmdBlocks, null);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseFor () {\n this.pushScope(IVProgParser.BREAKABLE);\n const for_token = this.getToken();\n this.pos += 1;\n // parse ID\n const id_token = this.getToken();\n const id = this.parseID();\n const for_id = new Expressions.VariableLiteral(id);\n for_id.sourceInfo = SourceInfo.createSourceInfo(id_token);\n // END parse ID\n const for_from = this.parseForParameters(this.lexerClass.RK_FOR_FROM);\n const for_to = this.parseForParameters(this.lexerClass.RK_FOR_TO);\n const maybePass = this.parseForParameters(this.lexerClass.RK_FOR_PASS);\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.For(for_id, for_from, for_to, maybePass, commandsBlock);\n cmd.sourceInfo = SourceInfo.createSourceInfo(for_token);\n return cmd;\n }\n\n parseWhile () {\n this.pushScope(IVProgParser.BREAKABLE);\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.While(logicalExpression, cmdBlocks);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseBreak () {\n this.pos++;\n this.checkEOS();\n this.pos++;\n return new Commands.Break();\n }\n\n parseReturn () {\n this.pos++;\n let exp = null;\n if(!this.checkEOS(true)) {\n exp = this.parseExpressionOR();\n this.checkEOS();\n }\n this.pos++;\n return new Commands.Return(exp);\n }\n\n parseIDCommand () {\n const refToken = this.getToken();\n const isID = refToken.type === this.lexerClass.ID;\n const id = this.parseMaybeLibID();\n if(this.checkOpenBrace(true)) {\n this.pos++;\n let lineExpression = null;\n let columnExpression = null;\n this.consumeNewLines();\n lineExpression = this.parseExpression()\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n if (this.checkOpenBrace(true)) {\n this.pos++\n this.consumeNewLines();\n columnExpression = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n }\n const equalToken = this.getToken();\n if (equalToken.type !== this.lexerClass.EQUAL) {\n throw SyntaxErrorFactory.token_missing_one('=', equalToken);\n }\n this.pos++;\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.ArrayIndexAssign(id, lineExpression, columnExpression, exp);\n cmd.sourceInfo = SourceInfo.createSourceInfo(equalToken);\n return cmd;\n }\n const equalOrParenthesis = this.getToken();\n if (isID && equalOrParenthesis.type === this.lexerClass.EQUAL) {\n this.pos++\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.Assign(id, exp);\n cmd.sourceInfo = SourceInfo.createSourceInfo(equalOrParenthesis);\n return cmd;\n } else if (equalOrParenthesis.type === this.lexerClass.OPEN_PARENTHESIS) {\n const funcCall = this.parseFunctionCallCommand(id);\n this.checkEOS();\n this.pos++;\n return funcCall;\n } else if (isID) {\n throw SyntaxErrorFactory.token_missing_list(['=','('], equalOrParenthesis);\n } else {\n throw SyntaxErrorFactory.invalid_id_format(refToken);\n }\n }\n\n parseForParameters (keyword_code) {\n if(keyword_code === this.lexerClass.RK_FOR_PASS) {\n if(this.checkOpenCurly(true)) {\n return null;\n }\n }\n const from_token = this.getToken();\n if (from_token.type !== keyword_code) {\n // TODO better error message\n const keyword = this.lexer.literalNames[keyword_code];\n throw new Error(\"Error de sintaxe no comando repita_para: esperava-se \"+keyword+\" mas encontrou \"+from_token.text);\n }\n this.pos += 1;\n let int_or_id = this.getToken();\n let is_unary_op = false;\n let op = null;\n if(int_or_id.type === this.lexerClass.SUM_OP) {\n is_unary_op = true;\n op = int_or_id.text;\n this.pos += 1;\n int_or_id = this.getToken();\n }\n let for_from = null;\n if (int_or_id.type === this.lexerClass.ID) {\n for_from = new Expressions.VariableLiteral(this.parseID());\n for_from.sourceInfo = SourceInfo.createSourceInfo(int_or_id);\n } else if (int_or_id.type === this.lexerClass.INTEGER) {\n this.pos += 1;\n for_from = this.getIntLiteral(int_or_id);\n }\n if (for_from == null) {\n // TODO better error message\n const keyword = this.lexer.literalNames[keyword_code]; \n throw new Error(\"Error de sintaxe no comando repeita_para: \"+ int_or_id.text + \" não é compativel com o esperado para o paramentro \"+ keyword + \". O valor deve ser um inteiro ou variável.\");\n }\n if (is_unary_op) {\n for_from = new Expressions.UnaryApp(convertFromString(op), for_from);\n }\n return for_from;\n }\n\n parseCases () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.RK_CASE) {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_CASE], token);\n }\n this.pos++;\n const nextToken = this.getToken();\n if(nextToken.type === this.lexerClass.RK_DEFAULT) {\n this.pos++;\n const colonToken = this.getToken();\n if (colonToken.type !== this.lexerClass.COLON) {\n throw SyntaxErrorFactory.token_missing_one(':', colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const defaultCase = new Commands.Case(null);\n defaultCase.setCommands(block.commands);\n return [defaultCase];\n } else {\n const exp = this.parseExpressionOR();\n const colonToken = this.getToken();\n if (colonToken.type !== this.lexerClass.COLON) {\n throw SyntaxErrorFactory.token_missing_one(':', colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const aCase = new Commands.Case(exp);\n aCase.setCommands(block.commands);\n const caseToken = this.getToken();\n if(caseToken.type === this.lexerClass.RK_CASE) {\n return [aCase].concat(this.parseCases());\n } else {\n return [aCase];\n }\n }\n }\n\n /*\n * Parses an Expression following the structure:\n *\n * EOR => EAnd ( 'or' EOR)? #expression and\n *\n * EOR => ENot ('and' EOR)? #expression or\n *\n * ENot => 'not'? ER #expression not\n *\n * ER => E ((>=, <=, ==, >, <) E)? #expression relational\n *\n * E => factor ((+, -) E)? #expression\n *\n * factor=> term ((*, /, %) factor)?\n *\n * term => literal || arrayAccess || FuncCall || ID || '('EAnd')'\n **/\n parseExpressionOR () {\n let exp1 = this.parseExpressionAND();\n while (this.getToken().type === this.lexerClass.OR_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const or = convertFromString('or');\n this.consumeNewLines();\n const exp2 = this.parseExpressionAND();\n const finalExp = new Expressions.InfixApp(or, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp\n }\n return exp1;\n }\n\n parseExpressionAND () {\n let exp1 = this.parseExpressionNot();\n while (this.getToken().type === this.lexerClass.AND_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const and = convertFromString('and');\n this.consumeNewLines();\n const exp2 = this.parseExpressionNot();\n const finalExp = new Expressions.InfixApp(and, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpressionNot () {\n const maybeNotToken = this.getToken();\n if (maybeNotToken.type === this.lexerClass.NOT_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const not = convertFromString('not');\n const exp1 = this.parseExpressionRel();\n const finalExp = new Expressions.UnaryApp(not, exp1);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n return finalExp;\n \n } else {\n return this.parseExpressionRel();\n }\n }\n\n parseExpressionRel () {\n let exp1 = this.parseExpression();\n while (this.getToken().type === this.lexerClass.RELATIONAL_OPERATOR) {\n const relToken = this.getToken();\n this.pos++;\n const rel = convertFromString(relToken.text);\n const exp2 = this.parseExpression();\n const finalExp = new Expressions.InfixApp(rel, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(relToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpression () {\n let factor = this.parseFactor();\n while (this.getToken().type === this.lexerClass.SUM_OP) {\n const sumOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(sumOpToken.text);\n const factor2 = this.parseFactor();\n const finalExp = new Expressions.InfixApp(op, factor, factor2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(sumOpToken);\n factor = finalExp;\n }\n return factor;\n }\n\n parseFactor () {\n let term = this.parseTerm();\n while (this.getToken().type === this.lexerClass.MULTI_OP) {\n const multOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(multOpToken.text);\n const term2 =this.parseTerm();\n const finalExp = new Expressions.InfixApp(op, term, term2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(multOpToken);\n term = finalExp;\n }\n return term;\n }\n\n parseTerm () {\n const token = this.getToken();\n let sourceInfo = null;\n let exp = null;\n switch(token.type) {\n case this.lexerClass.SUM_OP:\n this.pos++;\n sourceInfo = SourceInfo.createSourceInfo(token);\n exp = new Expressions.UnaryApp(convertFromString(token.text), this.parseTerm());\n exp.sourceInfo = sourceInfo;\n return exp;\n case this.lexerClass.INTEGER:\n this.pos++;\n return this.getIntLiteral(token);\n case this.lexerClass.REAL:\n this.pos++;\n return this.getRealLiteral(token);\n case this.lexerClass.STRING:\n this.pos++;\n return this.getStringLiteral(token);\n case this.lexerClass.CHARACTER:\n this.pos++;\n return this.getCharLiteral(token);\n case this.lexerClass.RK_TRUE:\n case this.lexerClass.RK_FALSE:\n this.pos++;\n return this.getBoolLiteral(token);\n case this.lexerClass.OPEN_CURLY:\n // No more annonymous array\n // return this.parseArrayLiteral();\n throw SyntaxErrorFactory.annonymous_array_literal(token);\n case this.lexerClass.ID:\n case this.lexerClass.LIB_ID:\n return this.parseIDTerm();\n case this.lexerClass.OPEN_PARENTHESIS:\n return this.parseParenthesisExp();\n default:\n throw SyntaxErrorFactory.invalid_terminal(token);\n }\n }\n\n parseIDTerm () {\n const tokenA = this.getToken();\n const id = this.parseMaybeLibID();\n const isID = tokenA.type === this.lexerClass.ID;\n if(isID && this.checkOpenBrace(true)) {\n let tokenB = null;\n this.pos++;\n const firstIndex = this.parseExpression();\n let secondIndex = null;\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n if(this.checkOpenBrace(true)){\n this.pos++;\n secondIndex = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n }\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB); \n const exp = new Expressions.ArrayAccess(id, firstIndex, secondIndex);\n exp.sourceInfo = sourceInfo;\n return exp;\n\n } else if (this.checkOpenParenthesis(true)) {\n return this.parseFunctionCallExpression(id);\n } else if (isID) {\n const sourceInfo = SourceInfo.createSourceInfo(tokenA);\n const exp = new Expressions.VariableLiteral(id);\n exp.sourceInfo = sourceInfo;\n return exp;\n } else {\n throw SyntaxErrorFactory.invalid_id_format(tokenA);\n }\n }\n\n getFunctionName (id) {\n const name = LanguageDefinedFunction.getInternalName(id);\n if (name === null) {\n if (id === LanguageDefinedFunction.getMainFunctionName()) {\n return null;\n }\n return id;\n } else {\n return name;\n }\n }\n\n parseFunctionCallExpression (id) {\n const tokenA = this.getToken(this.pos - 1);\n const actualParameters = this.parseActualParameters();\n const tokenB = this.getToken(this.pos - 1);\n const funcName = this.getFunctionName(id);\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n const cmd = new Expressions.FunctionCall(funcName, actualParameters);\n cmd.sourceInfo = sourceInfo;\n return cmd;\n }\n\n parseFunctionCallCommand (id) {\n return this.parseFunctionCallExpression(id);\n }\n\n parseParenthesisExp () {\n this.checkOpenParenthesis();\n const tokenA = this.getToken();\n this.pos += 1;\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n const tokenB = this.getToken();\n this.pos += 1;\n exp.sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n exp.parenthesis = true;\n return exp;\n }\n\n parseActualParameters () {\n this.checkOpenParenthesis();\n this.pos++;\n if(this.checkCloseParenthesis(true)) {\n this.pos++;\n return [];\n }\n this.consumeNewLines();\n const list = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n return list;\n }\n\n parseExpressionList () {\n const list = [];\n for(;;) {\n const exp = this.parseExpressionOR();\n list.push(exp);\n const maybeToken = this.getToken();\n if (maybeToken.type !== this.lexerClass.COMMA) {\n break;\n } else {\n this.pos++;\n this.consumeNewLines();\n }\n }\n return list;\n }\n\n getTypeArray () {\n const types = this.insideScope(IVProgParser.FUNCTION) ? this.functionTypes : this.variableTypes;\n return types.map( x => this.lexer.literalNames[x]);\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertFromString = exports.Operators = void 0;\nexports.Operators = Object.freeze({\n ADD: { ord: 0, value: \"+\" },\n SUB: { ord: 1, value: \"-\" },\n MULT: { ord: 2, value: '*' },\n DIV: { ord: 3, value: '/' },\n MOD: { ord: 4, value: '%' },\n GT: { ord: 5, value: '>' },\n GE: { ord: 6, value: '>=' },\n LT: { ord: 7, value: '<' },\n LE: { ord: 8, value: '<=' },\n EQ: { ord: 9, value: '==' },\n NEQ: { ord: 10, value: '!=' },\n AND: { ord: 11, value: 'and' },\n OR: { ord: 12, value: 'or' },\n NOT: { ord: 13, value: 'not' }\n});\nfunction convertFromString(op) {\n switch (op) {\n case '+': return exports.Operators.ADD;\n case '-': return exports.Operators.SUB;\n case '*': return exports.Operators.MULT;\n case '/': return exports.Operators.DIV;\n case '%': return exports.Operators.MOD;\n case '>': return exports.Operators.GT;\n case '>=': return exports.Operators.GE;\n case '<': return exports.Operators.LT;\n case '<=': return exports.Operators.LE;\n case '==': return exports.Operators.EQ;\n case '!=': return exports.Operators.NEQ;\n case 'and': return exports.Operators.AND;\n case 'or': return exports.Operators.OR;\n case 'not': return exports.Operators.NOT;\n }\n return null;\n}\nexports.convertFromString = convertFromString;\n","export class SourceInfo {\n\n static createSourceInfo (token) {\n return new SourceInfo(token.line, token.column, token.text, token.text.length);\n }\n\n static createSourceInfoFromList (tokenA, tokenB) {\n const line = tokenA.line;\n const column = tokenA.column;\n // adapted from https://github.com/UNIVALI-LITE/Portugol-Studio/blob/master/core/src/main/java/br/univali/portugol/nucleo/analise/sintatica/Portugol.g\n // No idea why...\n const size = tokenB.tokenIndex + 1 - tokenA.tokenIndex\n return new SourceInfo(line, column, \"\", size);\n }\n\n constructor (line, column, text, size) {\n this.line = line;\n this.column = column;\n this.text = text;\n this.size = size;\n }\n\n}","import { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport * as Utils from \"./../util/utils\";\nimport { Config } from \"./../util/config\";\n\nexport class DOMConsole {\n static get BASH_TEMPLATE () {\n return `\n <div class=\"bash-title\">\n <i id=\"ivprog-console-clearbtn\" class=\"icon eraser\" style=\"float:left;padding-left: 5px\"></i>\n <span>Terminal</span>\n <i id=\"ivprog-console-showbtn\" class=\"icon window maximize outline\" style=\"float:right\"></i>\n <i id=\"ivprog-console-hidebtn\" class=\"icon window minimize outline\" style=\"float:right\"></i>\n </div>\n <div id='ivprog-term' class=\"bash-body\"></div>`;\n }\n\n static get INPUT_CARET_TEMPLATE () {\n return `\n <div id=\"cmd\">\n <span></span>\n <div id=\"cursor\"></div>\n </div>`;\n }\n\n static get USER () {\n return 0;\n }\n\n static get INFO () {\n return 1;\n }\n\n static get ERR () {\n return 2;\n }\n\n static get INPUT () {\n return 3;\n }\n\n constructor (elementID, disableMarginTop = false) {\n this.disableMarginTop = disableMarginTop;\n this.input = null;\n this.cursorInterval = null;\n this.idleInterval = null;\n this.inputDiv = null;\n this.inputCMD = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.needInput = false;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n this.termDiv = null;\n this.anyKey = false;\n let actualID = elementID;\n if (elementID[0] === \"#\") {\n actualID = elementID.substring(1);\n }\n this.parent = document.getElementById(actualID);\n this.setup();\n this.inputListeners = [];\n this.hideInput();\n this.pending_writes = [];\n this.last_clear = -1;\n }\n\n setup () {\n this._setupDom();\n this._setupEvents();\n }\n\n _setupEvents () {\n this.input.addEventListener(\"keydown\", this.registerInput.bind(this));\n this.clearBtn.addEventListener(\"click\", this.clearBtnClick.bind(this));\n this.hideBtn.addEventListener(\"click\", this.hideBtnClick.bind(this));\n this.showBtn.addEventListener(\"click\", this.showBtnClick.bind(this));\n }\n\n registerInput (event) {\n if (!this.needInput) {\n return;\n }\n const keyCode = event.which;\n if (keyCode === 13 || this.anyKey) {\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n let text = this.input.value;\n text = text.replace(\"[\\n\\r]+\", \"\");\n this.notifyListeners(text);\n this._appendUserInput(text);\n this.input.value = \"\";\n this.inputSpan.innerHTML = \"\";\n this.currentLine = null;\n }\n }\n\n _setupDom () {\n const bashNode = document.createElement(\"div\");\n bashNode.classList.add(\"bash\");\n bashNode.innerHTML = DOMConsole.BASH_TEMPLATE;\n this.termDiv = bashNode.querySelector(\"#ivprog-term\");\n this.termDiv.classList.add(\"ivprog-term-div\");\n this.inputDiv = document.createElement(\"div\");\n this.inputDiv.id = \"ivprog-terminal-inputdiv\";\n this.inputDiv.innerHTML = DOMConsole.INPUT_CARET_TEMPLATE;\n this.input = document.createElement(\"input\");\n this.input.setAttribute(\"name\", \"command\");\n this.input.setAttribute(\"value\", \"\");\n this.input.setAttribute(\"type\", \"text\");\n this.inputDiv.append(this.input);\n this.termDiv.append(this.inputDiv);\n bashNode.append(this.termDiv);\n this.parent.append(bashNode);\n this.inputCMD = this.inputDiv.querySelector(\"#cmd\");\n this.cursorRef = this.inputCMD.querySelector(\"#cursor\");\n this.inputSpan = this.inputCMD.querySelector(\"span\");\n this.clearBtn = bashNode.querySelector(\"#ivprog-console-clearbtn\");\n this.hideBtn = bashNode.querySelector(\"#ivprog-console-hidebtn\");\n this.showBtn = bashNode.querySelector(\"#ivprog-console-showbtn\");\n this._setupCursor();\n //Jquery tooltips....\n window\n .$(this.clearBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_clear\") });\n window\n .$(this.showBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_show\") });\n window\n .$(this.hideBtn)\n .popup({ content: LocalizedStrings.getUI(\"tooltip_terminal_hide\") });\n }\n\n _setupCursor () {\n this.inputCMD.addEventListener(\"click\", this.blinkCaretAndFocus.bind(this));\n //this.inputCMD.click();\n\n this.input.addEventListener(\"keyup\", this.updateSpanText.bind(this));\n this.input.addEventListener(\"blur\", this.stopBlinkCaret.bind(this));\n }\n\n blinkCaretAndFocus () {\n if (this.cursorInterval != null) {\n return;\n }\n this.input.focus();\n this.cursorInterval = window.setInterval(() => {\n if (this.cursorRef.style.visibility === \"visible\") {\n this.cursorRef.style.visibility = \"hidden\";\n } else {\n this.cursorRef.style.visibility = \"visible\";\n }\n }, 500);\n }\n\n updateSpanText () {\n this.inputSpan.innerHTML = this.input.value;\n if (this.idleInterval != null) window.clearInterval(this.idleInterval);\n this.scheduleNotify();\n }\n\n stopBlinkCaret () {\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n this.cursorRef.style.visibility = \"visible\";\n }\n\n notifyListeners (text) {\n this.inputListeners.forEach((resolve) => resolve(text));\n this.inputListeners.splice(0, this.inputListeners.length);\n this.hideInput();\n this.anyKey = false;\n }\n\n writeRawHTML (text, channel) {\n this._appendTextLn(text, channel, false);\n }\n\n write (text, newLine = false) {\n this._appendText(text, DOMConsole.USER, newLine);\n }\n\n info (text) {\n this._appendTextLn(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendTextLn(text, DOMConsole.ERR);\n }\n\n async _appendText (text, type, newLine = false) {\n // console.debug(\"Caling appendText\");\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(5);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n\n if (this.currentLine == null) {\n const divClass = this.getClassForType(type);\n const textDiv = document.createElement(\"div\");\n textDiv.classList.add(divClass);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = textDiv;\n }\n this.currentLine.innerHTML += this.getOutputText(text);\n if (newLine) {\n // console.debug(\"append newline\");\n this.currentLine = null;\n }\n this.scrollTerm();\n }\n\n async _appendTextLn (text, type, filter = true) {\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(5);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(type);\n const textDiv = document.createElement(\"div\");\n textDiv.classList.add(divClass);\n if (filter) textDiv.innerHTML = this.getOutputText(text);\n else textDiv.innerHTML = `<span>${text}</span>`;\n if (this.currentLine != null && this.currentLine.innerHTML.length === 0) {\n this.termDiv.removeChild(this.currentLine);\n }\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = null;\n this.scrollTerm();\n }\n\n async _appendUserInput (text) {\n const write_time = Date.now();\n this.pending_writes.push(0);\n await Utils.sleep(5);\n this.pending_writes.pop();\n if (this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(DOMConsole.INPUT);\n const textDiv = document.createElement(\"div\");\n textDiv.innerHTML = this.getUserInputText(text);\n textDiv.classList.add(divClass);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.currentLine = null;\n this.scrollTerm();\n }\n\n getOutputText (text) {\n text = text.replace(/\\s/g, \"&#160;\");\n return `<span>${text}</span>`;\n }\n\n getUserInputText (text) {\n if (text.trim().length == 0) {\n text = \"&nbsp;\";\n }\n return `<i class=\"icon keyboard outline\" style=\"float:left\"></i><span>${text}</span>`;\n }\n\n scrollTerm () {\n //scrollIt(this.inputDiv.previousSibling,200);\n this.termDiv.scrollTop = this.termDiv.scrollHeight;\n }\n\n focus () {\n this.termDiv.style.display = \"block\";\n // Is in draggable mode?\n if (!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"-160px\";\n }\n if (this.needInput) {\n this.showInput();\n this.scheduleNotify();\n }\n if (!Utils.isElementInViewport(this.termDiv))\n this.termDiv.scrollIntoView(false);\n this.scrollTerm();\n }\n\n hide () {\n if (this.needInput) {\n clearInterval(this.idleInterval);\n this.hideInput();\n this.needInput = true;\n }\n // Is in draggable mode?\n if (!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"0\";\n }\n this.termDiv.style.display = \"none\";\n }\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.INPUT:\n return \"ivprog-term-userInput\";\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n dispose () {\n this.input.removeEventListener(\"keyup\", this.updateSpanText.bind(this));\n this.input.removeEventListener(\"blur\", this.stopBlinkCaret.bind(this));\n this.input.removeEventListener(\"keydown\", this.registerInput.bind(this));\n this.inputCMD.removeEventListener(\n \"click\",\n this.blinkCaretAndFocus.bind(this)\n );\n this.clearBtn.removeEventListener(\"click\", this.clearBtnClick.bind(this));\n this.hideBtn.removeEventListener(\"click\", this.hideBtnClick.bind(this));\n this.showBtn.removeEventListener(\"click\", this.showBtnClick.bind(this));\n this.input = null;\n this.inputCMD = null;\n this.inputDiv = null;\n this.termDiv = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n this.currentLine = null;\n const cNode = this.parent.cloneNode(false);\n this.parent.parentNode.replaceChild(cNode, this.parent);\n if (this.cursorInterval != null) {\n clearInterval(this.cursorInterval);\n }\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n }\n }\n\n showInput () {\n this.needInput = true;\n this.inputDiv.style.display = \"block\";\n this.inputCMD.click();\n //this.inputCMD.scrollIntoView();\n this.scrollTerm();\n }\n\n hideInput () {\n this.needInput = false;\n this.inputDiv.style.display = \" none\";\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n }\n\n requestInput (anyKey = false) {\n const promise = new Promise((resolve, _) => {\n this.inputListeners.push(resolve);\n this.anyKey = anyKey;\n if (this.idleInterval == null) this.scheduleNotify();\n this.showInput();\n });\n return promise;\n }\n\n sendOutput (text) {\n //console.debug(text);\n let output = \"\" + text;\n if (output.indexOf(\"\\n\") !== -1) {\n //console.debug(\"newline\");\n const outputList = output.split(\"\\n\");\n let i = 0;\n for (; i < outputList.length - 1; i += 1) {\n //console.debug(\"newline write\");\n let t = outputList[i];\n t = t.replace(/\\t/g, \"&#x0020;&#x0020;\");\n t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length !== 0) {\n this.write(t);\n }\n this.write(\"\", true);\n }\n let t = outputList[i];\n t = t.replace(/\\t/g, \"&#x0020;&#x0020;\");\n t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length != 0) this.write(t);\n } else {\n // console.debug(\"no newline\");\n output = output.replace(/\\t/g, \"&#x0020;&#x0020;\");\n output = output.replace(/\\s/g, \"&#x0020;\");\n if (output.length != 0) this.write(output);\n }\n }\n\n clearPendingWrites () {\n this.last_clear = Date.now();\n }\n\n clear () {\n this.clearPendingWrites();\n while (this.inputDiv.parentElement.childNodes.length > 1) {\n this.inputDiv.parentElement.removeChild(\n this.inputDiv.parentElement.firstChild\n );\n }\n this.input.value = \"\";\n this.inputSpan.innerHTML = \"\";\n this.currentLine = null;\n }\n\n clearBtnClick () {\n this.clear();\n }\n\n showBtnClick () {\n this.focus();\n }\n\n hideBtnClick () {\n this.hide();\n }\n\n notifyIdle () {\n this.info(LocalizedStrings.getMessage(\"awaiting_input_message\"));\n this.inputCMD.click();\n }\n\n scheduleNotify () {\n this.idleInterval = window.setInterval(\n this.notifyIdle.bind(this),\n Config.idle_input_interval\n );\n }\n\n cancelPendingInputRequests () {\n this.inputListeners.forEach((resolve) => resolve(\"\"));\n this.inputListeners.splice(0, this.inputListeners.length);\n if (this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n this.input.value = \"\";\n this.inputSpan.innerHTML = \"\";\n this.currentLine = null;\n this.hideInput();\n this.anyKey = false;\n }\n}\n","export class Input {\n\n requestInput () {\n throw new Error(\"Must be implemented\");\n }\n\n cancelPendingInputRequests () {\n throw new Error(\"Must be implemented\");\n }\n}","export class Output {\n\n sendOutput (text) {\n throw new Error(\"Must be implemented\");\n }\n}","import { runner } from \"./runner\";\nimport {\n initVisualUI,\n addFunctionChangeListener,\n addGlobalChangeListener,\n removeFunctionListener,\n removeGlobalListener,\n getTestCases,\n} from \"./visualUI/functions\";\nimport * as LocalizedStringsService from \"./services/localizedStringsService\";\nimport { i18nHelper } from \"./services/i18nHelper\";\nimport {\n ActionTypes,\n getLogs,\n getLogsAsString,\n registerClick,\n registerUserEvent,\n parseLogs,\n} from \"./services/userLog\";\nimport {\n prepareActivityToStudentHelper,\n autoEval,\n} from \"./util/iassignHelpers\";\nimport { openAssessmentDetail } from \"./util/utils\";\nimport { Config } from \"./util/config\";\nimport * as CodeEditorAll from \"./visualUI/text_editor\";\nimport { autoGenerateTestCaseOutput } from \"./util/auto_gen_output\";\n\nconst CodeEditor = {\n initTextEditor: CodeEditorAll.initTextEditor,\n setCode: CodeEditorAll.setCode,\n getCode: CodeEditorAll.getCode,\n updateEditor: CodeEditorAll.updateEditor,\n disable: CodeEditorAll.disable,\n};\n\nconst i18n = i18nHelper.i18n;\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport {\n runner,\n initVisualUI,\n addFunctionChangeListener,\n addGlobalChangeListener,\n removeFunctionListener,\n removeGlobalListener,\n getTestCases,\n autoEval,\n prepareActivityToStudentHelper,\n LocalizedStrings,\n i18n,\n getLogs,\n getLogsAsString,\n registerClick,\n registerUserEvent,\n parseLogs,\n ActionTypes,\n CodeEditor,\n openAssessmentDetail,\n autoGenerateTestCaseOutput,\n Config,\n};\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Address = void 0;\nclass Address {\n /**\n *\n * @param {Number} id the address id\n * @param {never} value the value stored at this address\n */\n constructor(id, value) {\n this.id = id;\n this.value = value;\n }\n}\nexports.Address = Address;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Location = void 0;\nconst address_1 = require(\"./address\");\nclass LocationHolder {\n constructor() {\n this.data = [];\n this.address_id = 0;\n }\n /**\n *\n * @param {never} value the value to be allocated\n * @returns {number} - the address id\n */\n allocate(value) {\n const id = this.address_id;\n // console.log(\"Allocation address \"+ id);\n const address = new address_1.Address(id, value);\n this.data.push(address);\n this.address_id += 1;\n return id;\n }\n /**\n *\n * @param {number} id\n */\n deallocate(id) {\n const index = this.findIndex(id);\n // console.log(\"Deallocation address \"+ id);\n if (index !== -1) {\n this.data.splice(index, 1);\n return true;\n }\n return false;\n }\n /**\n *\n * @param {number} id\n * @returns {Address} the address identified by id\n */\n find(id) {\n let beg = 0;\n let end = this.data.length;\n // console.log(\"Finding address \"+id);\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return address;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return undefined;\n }\n getAddressAt(pos) {\n return this.data[pos];\n }\n /**\n *\n * @param {number} id address id\n * @returns {number} the index of the address identified by id\n */\n findIndex(id) {\n let beg = 0;\n let end = this.data.length;\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return med;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return -1;\n }\n updateAddress(id, value) {\n const index = this.findIndex(id);\n if (index === -1) {\n throw new Error(\"Invalid address...\" + id);\n }\n this.data[index].value = value;\n }\n clear() {\n for (let i = 0; i < this.data.length; i += 1) {\n delete this.data[i];\n }\n this.data = [];\n this.address_id = 0;\n }\n}\nconst inner_ref = new LocationHolder();\nexports.Location = Object.freeze({\n allocate: inner_ref.allocate.bind(inner_ref),\n deallocate: inner_ref.deallocate.bind(inner_ref),\n find: inner_ref.find.bind(inner_ref),\n updateAddress: inner_ref.updateAddress.bind(inner_ref),\n clear: inner_ref.clear.bind(inner_ref),\n size: () => inner_ref.data.length\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resultTypeAfterUnaryOp = exports.resultTypeAfterInfixOp = void 0;\nconst types_1 = require(\"../typeSystem/types\");\nconst operators_1 = require(\"../ast/operators\");\nconst multiType_1 = require(\"../typeSystem/multiType\");\nconst config_1 = require(\"../util/config\");\nfunction buildInfixAddTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n table[types_1.Types.INTEGER.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.INTEGER.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.REAL.ord][types_1.Types.INTEGER.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.INTEGER.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.REAL.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.STRING;\n table[types_1.Types.STRING.ord][types_1.Types.CHAR.ord] = types_1.Types.STRING;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.STRING;\n table[types_1.Types.CHAR.ord][types_1.Types.STRING.ord] = types_1.Types.STRING;\n return table;\n}\nfunction buildInfixMultiDivSubTable() {\n const table = [[], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n table[types_1.Types.INTEGER.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.INTEGER.ord] = types_1.Types.REAL;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.REAL;\n return table;\n}\nfunction buildInfixEqualityInequalityTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.BOOLEAN.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixRelationalTable() {\n const table = [[], [], [], [], []];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.REAL.ord][types_1.Types.REAL.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.STRING.ord][types_1.Types.STRING.ord] = types_1.Types.BOOLEAN;\n table[types_1.Types.CHAR.ord][types_1.Types.CHAR.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixAndOrTable() {\n const table = [[], [], [], []];\n table[types_1.Types.BOOLEAN.ord][types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n return table;\n}\nfunction buildInfixModTable() {\n const table = [[]];\n table[types_1.Types.INTEGER.ord][types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n return table;\n}\nfunction buildUnarySumSubList() {\n const list = [];\n list[types_1.Types.INTEGER.ord] = types_1.Types.INTEGER;\n list[types_1.Types.REAL.ord] = types_1.Types.REAL;\n return list;\n}\nfunction buildUnaryNegList() {\n const list = [];\n list[types_1.Types.BOOLEAN.ord] = types_1.Types.BOOLEAN;\n return list;\n}\nfunction buildInfixCompatibilityTable() {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(operators_1.Operators.ADD, buildInfixAddTable());\n compatibilityMap.set(operators_1.Operators.SUB, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.MULT, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.DIV, buildInfixMultiDivSubTable());\n compatibilityMap.set(operators_1.Operators.EQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(operators_1.Operators.NEQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(operators_1.Operators.GE, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.GT, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.LE, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.LT, buildInfixRelationalTable());\n compatibilityMap.set(operators_1.Operators.OR, buildInfixAndOrTable());\n compatibilityMap.set(operators_1.Operators.AND, buildInfixAndOrTable());\n compatibilityMap.set(operators_1.Operators.MOD, buildInfixModTable());\n return compatibilityMap;\n}\nfunction buildUnaryCompatibilityTable() {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(operators_1.Operators.ADD, buildUnarySumSubList());\n compatibilityMap.set(operators_1.Operators.SUB, buildUnarySumSubList());\n compatibilityMap.set(operators_1.Operators.NOT, buildUnaryNegList());\n return compatibilityMap;\n}\nconst infixMap = buildInfixCompatibilityTable();\nconst unaryMap = buildUnaryCompatibilityTable();\nfunction resultTypeAfterInfixOp(operator, leftExpressionType, rightExpressionType) {\n try {\n if (leftExpressionType instanceof multiType_1.MultiType && rightExpressionType instanceof multiType_1.MultiType) {\n let newMulti = [];\n for (let i = 0; i < leftExpressionType.types.length; ++i) {\n const typeA = leftExpressionType.types[i];\n for (let j = 0; j < rightExpressionType.types.length; ++i) {\n const typeB = rightExpressionType.types[j];\n newMulti.push(resultTypeAfterInfixOp(operator, typeA, typeB));\n }\n }\n newMulti = newMulti.filter(x => !x.isCompatible(types_1.Types.UNDEFINED));\n if (newMulti.length <= 0) {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return new multiType_1.MultiType([types_1.Types.INTEGER, types_1.Types.REAL]);\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n else {\n return new multiType_1.MultiType(newMulti);\n }\n }\n else if (leftExpressionType instanceof multiType_1.MultiType) {\n if (leftExpressionType.isCompatible(rightExpressionType)) {\n return resultTypeAfterInfixOp(operator, rightExpressionType, rightExpressionType);\n }\n else {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return rightExpressionType;\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n }\n else if (rightExpressionType instanceof multiType_1.MultiType) {\n if (rightExpressionType.isCompatible(leftExpressionType)) {\n return resultTypeAfterInfixOp(operator, leftExpressionType, leftExpressionType);\n }\n else {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n return leftExpressionType;\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n }\n const resultTable = infixMap.get(operator) || [];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const resultType = resultTable[leftExpressionType.ord][rightExpressionType.ord];\n if (resultType === null || resultType === undefined) {\n if (config_1.Config.enable_type_casting) {\n if (leftExpressionType.isCompatible(types_1.Types.INTEGER) || leftExpressionType.isCompatible(types_1.Types.REAL)) {\n if (rightExpressionType.isCompatible(types_1.Types.INTEGER) || rightExpressionType.isCompatible(types_1.Types.REAL)) {\n if (operator === operators_1.Operators.MOD) {\n return types_1.Types.INTEGER;\n }\n else if (operator.ord >= 5 && operator.ord <= 10) {\n return types_1.Types.BOOLEAN;\n }\n }\n }\n }\n return types_1.Types.UNDEFINED;\n }\n return resultType;\n }\n catch (e) {\n if (e instanceof TypeError) {\n return types_1.Types.UNDEFINED;\n }\n else {\n throw e;\n }\n }\n}\nexports.resultTypeAfterInfixOp = resultTypeAfterInfixOp;\nfunction resultTypeAfterUnaryOp(operator, leftExpressionType) {\n try {\n if (leftExpressionType instanceof multiType_1.MultiType) {\n let newMulti = [];\n for (let i = 0; i < leftExpressionType.types.length; ++i) {\n const type = leftExpressionType.types[i];\n newMulti.push(resultTypeAfterUnaryOp(operator, type));\n }\n newMulti = newMulti.filter(x => !x.isCompatible(types_1.Types.UNDEFINED));\n if (newMulti.length <= 0) {\n return types_1.Types.UNDEFINED;\n }\n return new multiType_1.MultiType(newMulti);\n }\n const resultTable = unaryMap.get(operator) || [];\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const resultType = resultTable[leftExpressionType.ord];\n if (resultType == null) {\n return types_1.Types.UNDEFINED;\n }\n return resultType;\n }\n catch (e) {\n if (e instanceof TypeError) {\n return types_1.Types.UNDEFINED;\n }\n else {\n throw e;\n }\n }\n}\nexports.resultTypeAfterUnaryOp = resultTypeAfterUnaryOp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nexports.Context = Object.freeze({\n BASE: Symbol('context:base'),\n BREAKABLE: Symbol('context:breakable'),\n FUNCTION: Symbol('context:function')\n});\n","import { LanguageService } from '../services/languageService';\nimport {createInputFun, createOutputFun} from './lib/io';\nimport {createLengthFun, createLowercaseFun,\n createrCharAtFun, createSubstringFun,\n createUppercaseFun} from './lib/strings';\nimport {createMatrixColumnsFun, createMatrixLinesFun,\n createNumElementsFun} from './lib/arrays';\nimport {createCastBoolFun, createCastIntFun,\n createCastRealFun, createCastStringFun,\n createIsBoolFun, createIsIntFun,\n createIsRealFun, createCastCharFun} from './lib/lang';\nimport {createAbsFun, createCosFun,\n createInvertFun, createLogFun,\n createMaxFun, createMinFun,\n createNegateFun, createPowFun,\n createSinFun, createSqrtFun,\n createTanFun, createRandFun} from './lib/math';\n\nfunction valueToKey (value, object) {\n for (const key in object) {\n if(Object.prototype.hasOwnProperty.call(object, key)){\n if (object[key] === value) {\n return key;\n }\n }\n }\n return null;\n}\n\nfunction concatObjects (...objs) {\n const result = {};\n for (let i = 0; i < objs.length; i++) {\n const obj = objs[i];\n for(const key in obj) {\n if(Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n }\n return result;\n}\n\nconst libsObject = {\n $mathLib: {\n $sin: createSinFun(),\n $cos: createCosFun(),\n $tan: createTanFun(),\n $sqrt: createSqrtFun(),\n $pow: createPowFun(),\n $log: createLogFun(),\n $abs: createAbsFun(),\n $negate: createNegateFun(),\n $invert: createInvertFun(),\n $max: createMaxFun(),\n $min: createMinFun(),\n $rand: createRandFun()\n },\n $ioLib: {\n $read: createInputFun(),\n $write: createOutputFun()\n },\n $strLib: {\n $substring: createSubstringFun(),\n $length: createLengthFun(),\n $uppercase: createUppercaseFun(),\n $lowercase: createLowercaseFun(),\n $charAt: createrCharAtFun(),\n },\n $arrayLib: {\n $numElements: createNumElementsFun(),\n $matrixLines: createMatrixLinesFun(),\n $matrixColumns: createMatrixColumnsFun()\n },\n $langLib: {\n $isReal: createIsRealFun(),\n $isInt: createIsIntFun(),\n $isBool: createIsBoolFun(),\n $castReal: createCastRealFun(),\n $castInt: createCastIntFun(),\n $castBool: createCastBoolFun(),\n $castString: createCastStringFun(),\n $castChar: createCastCharFun()\n }\n}\n\nconst funcsObject = concatObjects(libsObject.$ioLib, libsObject.$langLib,\n libsObject.$strLib, libsObject.$arrayLib);\n\nexport const LanguageDefinedFunction = Object.freeze({\n getMainFunctionName: () => LanguageService.getCurrentLangFuncs().main_function,\n getInternalName: (localName) => {\n if (localName.indexOf(\".\") !== -1) {\n const names = localName.split(\".\");\n const lib = valueToKey(names[0], LanguageService.getCurrentLangLibs());\n const internalName = valueToKey(names[1], LanguageService.getCurrentLangFuncs());\n if (lib === null || internalName === null) {\n return null;\n }\n return lib + \".\" + internalName;\n }\n const funcName = valueToKey(localName, LanguageService.getCurrentLangFuncs());\n if(funcName !== null) {\n if(funcsObject[funcName]) {\n return funcName;\n }\n }\n return null;\n },\n getFunction: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = names[0];\n const funName = names[1];\n return libsObject[libName][funName];\n }\n return funcsObject[internalName];\n },\n getLocalName: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = LanguageService.getCurrentLangLibs()[names[0]];\n const funName = LanguageService.getCurrentLangFuncs()[names[1]];\n return `${libName}.${funName}`;\n } else if (LanguageService.getCurrentLangFuncs()[internalName]) {\n return LanguageService.getCurrentLangFuncs()[internalName];\n } else { \n return internalName\n }\n }\n});","import { RuntimeError } from './runtimeError';\nimport { SemanticError } from './semanticError';\nimport * as LocalizedStringsService from './../../services/localizedStringsService';\nimport { LanguageDefinedFunction } from '../definedFunctions';\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createRuntimeError (i18n_id, context = []) {\n return new RuntimeError(LocalizedStrings.getError(i18n_id, context))\n}\n\nfunction createSemanticError (i18n_id, context = []) {\n return new SemanticError(LocalizedStrings.getError(i18n_id, context))\n}\n\nexport const ProcessorErrorFactory = Object.freeze({\n symbol_not_found_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"symbol_not_found_full\", context);\n } else {\n return ProcessorErrorFactory.symbol_not_found(id);\n }\n },\n symbol_not_found: (id) => {\n const context = [id];\n return createSemanticError(\"symbol_not_found\", context);\n },\n function_missing_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"function_missing_full\", context);\n } else {\n return ProcessorErrorFactory.function_missing(id);\n }\n },\n function_missing: (id) => {\n const context = [id];\n return createSemanticError(\"function_missing\", context);\n },\n main_missing: () => {\n return createSemanticError(\"main_missing\");\n },\n array_dimension_not_int_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"array_dimension_not_int_full\", context);\n } else {\n return ProcessorErrorFactory.array_dimension_not_int();\n }\n },\n array_dimension_not_int: () => {\n return createSemanticError(\"array_dimension_not_int\");\n },\n unknown_command_full: (sourceInfo)=> {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createRuntimeError(\"unknown_command_full\", context);\n } else {\n return ProcessorErrorFactory.unknown_command();\n }\n \n },\n unknown_command: ()=> {\n return createRuntimeError(\"unknown_command\");\n },\n incompatible_types_full: (left_type, left_dim, right_type, right_dim, exp, source_info) => {\n if(source_info) {\n const context = [LocalizedStrings.translateType(left_type, left_dim), exp, source_info.line,\n LocalizedStrings.translateType(right_type, right_dim)];\n return createSemanticError(\"incompatible_types_full\", context);\n } else {\n return ProcessorErrorFactory.incompatible_types(left_type, left_dim, right_type, right_dim, exp);\n }\n },\n incompatible_types: (left_type, left_dim, right_type, right_dim, exp) => {\n const context = [LocalizedStrings.translateType(left_type, left_dim), exp,\n LocalizedStrings.translateType(right_type, right_dim)];\n return createSemanticError(\"incompatible_types\", context);\n },\n incompatible_types_array_full: (exp, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LocalizedStrings.translateType(type, dim), sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"incompatible_types_array_full\", context);\n } else {\n return ProcessorErrorFactory.incompatible_types_array(exp, type, dim);\n }\n },\n incompatible_types_array: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"incompatible_types_array\", context);\n },\n loop_condition_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n return createSemanticError(\"loop_condition_type_full\", context);\n } else {\n return ProcessorErrorFactory.loop_condition_type(exp);\n }\n },\n loop_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"loop_condition_type\", context);\n },\n /**\n * @deprecated 01/10/2019\n */\n endless_loop_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"endless_loop_full\", context);\n } else {\n return ProcessorErrorFactory.endless_loop();\n }\n },\n endless_loop: () => {\n return createSemanticError(\"endless_loop\");\n },\n if_condition_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n return createSemanticError(\"if_condition_type_full\", context);\n } else {\n return ProcessorErrorFactory.if_condition_type(exp);\n }\n },\n if_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"if_condition_type\", context);\n },\n invalid_global_var: () => {\n return createRuntimeError(\"invalid_global_var\")\n },\n not_implemented: (id) => {\n const context = [id]\n return createRuntimeError(\"not_implemented\", context)\n },\n invalid_case_type_full: (exp, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LocalizedStrings.translateType(type, dim), sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_case_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_case_type(exp, type, dim);\n }\n },\n invalid_case_type: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_case_type\", context);\n },\n void_in_expression_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, id];\n return createSemanticError(\"void_in_expression_full\", context);\n } else {\n return ProcessorErrorFactory.void_in_expression(id);\n }\n },\n void_in_expression: (id) => {\n const context = [id];\n return createSemanticError(\"void_in_expression\", context);\n },\n invalid_array_access_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_array_access_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_access(id);\n }\n },\n invalid_array_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_array_access\", context);\n },\n invalid_matrix_access_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_matrix_access_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_access(id);\n }\n },\n invalid_matrix_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_matrix_access\", context);\n },\n matrix_column_outbounds_full: (id, value, columns, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, columns];\n return createRuntimeError(\"matrix_column_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.matrix_column_outbounds(id, value, columns);\n }\n },\n matrix_column_outbounds: (id, value, columns) => {\n const context = [value, id, columns];\n return createRuntimeError(\"matrix_column_outbounds\", context);\n },\n matrix_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n return createRuntimeError(\"matrix_line_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.matrix_line_outbounds(id, value, lines);\n }\n },\n matrix_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"matrix_line_outbounds\", context);\n },\n vector_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n return createRuntimeError(\"vector_line_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.vector_line_outbounds(id, value, lines);\n }\n },\n vector_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"vector_line_outbounds\", context);\n },\n vector_not_matrix_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id];\n return createRuntimeError(\"vector_not_matrix_full\", context);\n } else {\n return ProcessorErrorFactory.vector_not_matrix(id);\n }\n },\n vector_not_matrix: (id) => {\n const context = [id];\n return createRuntimeError(\"vector_not_matrix\", context);\n },\n function_no_return: (id) => {\n const context = [id];\n return createSemanticError(\"function_no_return\", context);\n },\n invalid_void_return_full: (id, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_void_return_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_void_return(id, type, dim);\n }\n },\n invalid_void_return: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_void_return_full\", context);\n },\n invalid_return_type_full: (id, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_return_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_return_type(id, type, dim);\n }\n },\n invalid_return_type: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_return_type\", context);\n },\n invalid_parameters_size_full: (id, expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, expected, actual];\n return createSemanticError(\"invalid_parameters_size_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_parameters_size(id, expected, actual);\n }\n },\n invalid_parameters_size: (id, expected, actual) => {\n const context = [id, expected, actual];\n return createSemanticError(\"invalid_parameters_size\", context);\n },\n invalid_parameter_type_full: (fun_name, exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name), sourceInfo.line];\n return createSemanticError(\"invalid_parameter_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_parameter_type(fun_name, exp);\n }\n },\n invalid_parameter_type: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n return createSemanticError(\"invalid_parameter_type_full\", context);\n },\n invalid_ref_full: (id, exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, id , sourceInfo.line];\n return createSemanticError(\"invalid_ref_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_ref(id, exp);\n }\n },\n invalid_ref: (id, exp) => {\n const context = [exp, id];\n return createSemanticError(\"invalid_ref\", context);\n },\n unexpected_break_command_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createRuntimeError(\"unexpected_break_command_full\", context);\n } else {\n return ProcessorErrorFactory.unexpected_break_command();\n }\n },\n unexpected_break_command: () => {\n return createRuntimeError(\"unexpected_break_command\");\n },\n invalid_array_literal_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, exp];\n return createRuntimeError(\"invalid_array_literal_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(exp);\n }\n },\n invalid_array_literal_type: (exp) => {\n const context = [exp];\n return createRuntimeError(\"invalid_array_literal_type\", context);\n },\n invalid_array_literal_line_full: (expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n return createRuntimeError(\"invalid_array_literal_line_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(expected, actual);\n }\n },\n invalid_array_literal_line: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_line\", context);\n },\n invalid_array_literal_column_full: (expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n return createRuntimeError(\"invalid_array_literal_column_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_column(expected, actual);\n }\n },\n invalid_array_literal_column: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_column\", context);\n },\n invalid_unary_op_full: (expString, opName, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_unary_op_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_unary_op(opName, type, dim);\n }\n },\n invalid_unary_op: (expString, opName, type, dim) => {\n const context = [expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_unary_op\", context);\n },\n invalid_infix_op_full: (expString, opName, typeLeft, dimLeft, typeRight, dimRight, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(typeLeft, dimLeft), LocalizedStrings.translateType(typeRight, dimRight)];\n return createRuntimeError(\"invalid_infix_op_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_infix_op(opName, typeLeft, dimLeft, typeRight, dimRight);\n }\n },\n invalid_infix_op: (expString, opName, typeLeft, dimLeft, typeRight, dimRight) => {\n const context = [expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(typeLeft, dimLeft), LocalizedStrings.translateType(typeRight, dimRight)];\n return createRuntimeError(\"invalid_infix_op\", context);\n },\n array_dimension_not_positive_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"array_dimension_not_positive_full\", context);\n } else {\n return ProcessorErrorFactory.array_dimension_not_positive();\n }\n },\n array_dimension_not_positive: () => {\n return createSemanticError(\"array_dimension_not_positive\");\n },\n invalid_type_conversion: (value, type, dim) => {\n const context = [value, LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_type_conversion\", context);\n },\n invalid_read_type: (exp, type, dim, name, source_info) => {\n const context = [source_info.line, exp, LocalizedStrings.translateType(type, dim), name];\n return createRuntimeError(\"invalid_read_type\", context)\n },\n invalid_read_type_array: (exp, typePos, dimPos, name, typeArray, dimArray, sourceInfo) => {\n const context = [sourceInfo.line, exp, LocalizedStrings.translateType(typePos, dimPos), name,LocalizedStrings.translateType(typeArray, dimArray)];\n return createRuntimeError(\"invalid_read_type_array\", context)\n },\n invalid_const_ref_full: (fun_name, exp, sourceInfo)=> {\n if(sourceInfo) {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name), sourceInfo.line];\n return createSemanticError(\"invalid_const_ref_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_const_ref(fun_name, exp);\n }\n },\n invalid_const_ref: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n return createSemanticError(\"invalid_const_ref\", context);\n },\n invalid_const_assignment_full: (var_id, source_info) => {\n if(source_info) {\n const context = [source_info.line, var_id];\n return createSemanticError(\"invalid_const_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_const_assignment(var_id);\n }\n },\n invalid_const_assignment: (var_id) => {\n const context = [var_id];\n return createSemanticError(\"invalid_const_assignment\", context);\n },\n invalid_vector_assignment_full: (left_id, left_size, right_id, right_size, source_info) => {\n if(source_info) {\n const context = [source_info.line, left_id, left_size, right_id, right_size]\n return createRuntimeError(\"invalid_vector_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_vector_assignment(left_id, left_size, right_id, right_size);\n }\n },\n invalid_vector_assignment: (left_id, left_size, right_id, right_size) => {\n const context = [left_id, left_size, right_id, right_size]\n return createRuntimeError(\"invalid_vector_assignment\", context);\n },\n invalid_matrix_assignment_full: (left_id, left_line, left_column, right_id, right_line, right_column, source_info) => {\n if(source_info) {\n const context = [source_info.line, left_id, left_line, left_column, right_id, right_line, right_column]\n return createRuntimeError(\"invalid_matrix_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_assignment(left_id, left_line, left_column, right_id, right_line, right_column);\n }\n },\n invalid_matrix_assignment: (left_id, left_line, left_column, right_id, right_line, right_column) => {\n const context = [left_id, left_line, left_column, right_id, right_line, right_column]\n return createRuntimeError(\"invalid_matrix_assignment\", context);\n },\n matrix_to_vector_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n return createSemanticError(\"matrix_to_vector_attr\", context);\n },\n vector_to_matrix_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n return createSemanticError(\"vector_to_matrix_attr\", context);\n },\n invalid_matrix_index_assign_full: (mat_id, mat_line, mat_size, exp, exp_size, source_info) => {\n if(source_info){\n const context = [source_info.line, mat_line, mat_id, mat_size, exp, exp_size];\n return createRuntimeError(\"invalid_matrix_index_assign_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_index_assign(mat_id, mat_line, mat_size, exp, exp_size)\n }\n },\n invalid_matrix_index_assign: (mat_id, mat_line, mat_size, exp, exp_size) =>{\n const context = [mat_line, mat_id, mat_size, exp, exp_size];\n return createRuntimeError(\"invalid_matrix_index_assign\", context);\n },\n invalid_number_elements_vector: (expected_num, exp, actual_num, source_info) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n return createRuntimeError(\"invalid_number_elements_vector\", context);\n },\n invalid_number_lines_matrix: (expected_num, exp, actual_num, source_info) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n return createRuntimeError(\"invalid_number_lines_matrix\", context);\n },\n divsion_by_zero_full: (exp, source_info) => {\n if(source_info) {\n const context = [source_info.line, exp];\n return createRuntimeError(\"divsion_by_zero_full\", context);\n } else {\n return ProcessorErrorFactory.divsion_by_zero(exp);\n }\n },\n divsion_by_zero: (exp) => {\n const context = [exp];\n return createRuntimeError(\"divsion_by_zero\", context);\n },\n undefined_tanget_value: (value, source_info) => {\n const context = [source_info.line, value];\n return createRuntimeError(\"undefined_tanget_value\", context);\n },\n negative_log_value: (source_info) => {\n return createRuntimeError(\"negative_log_value\",[source_info.line]);\n },\n invalid_string_index: (index, str, source_info) => {\n const local_fun_name = LanguageDefinedFunction.getLocalName(\"$charAt\");\n const context = [source_info.line, local_fun_name, index, str, str.length - 1];\n return createRuntimeError(\"invalid_string_index\", context);\n },\n negative_sqrt_value: (source_info) => {\n return createRuntimeError(\"negative_sqrt_value\",[source_info.line]);\n },\n /**\n * @deprecated 01/10/2019\n */\n exceeded_recursive_calls: (source_info) => {\n const context = [source_info.line];\n return createRuntimeError(\"exceeded_recursive_calls\", context);\n },\n invalid_for_variable: (id, source_info) => {\n const context = [source_info.line, id];\n return createSemanticError(\"invalid_for_variable\", context);\n },\n invalid_for_from: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_from\", context);\n },\n invalid_for_to: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_to\", context);\n },\n invalid_for_pass: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_pass\", context);\n },\n exceed_max_instructions: () => {\n return createRuntimeError('exceed_max_instructions');\n }\n});","export class RuntimeError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, RuntimeError);\n }\n}","export class SemanticError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, SemanticError);\n }\n}","import { Store } from \"./store/store\";\nimport { Modes } from \"./modes\";\nimport { Context } from \"./context\";\nimport { Types } from \"./../typeSystem/types\";\nimport { Operators } from \"./../ast/operators\";\nimport { LanguageDefinedFunction } from \"./definedFunctions\";\nimport {\n resultTypeAfterInfixOp,\n resultTypeAfterUnaryOp,\n} from \"./compatibilityTable\";\nimport * as Commands from \"./../ast/commands/\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Command } from \"./../ast/commands/command\";\nimport * as Expressions from \"./../ast/expressions/\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from \"./../ast/expressions/expression\";\nimport * as Utils from \"./../util/utils\";\nimport { ArrayType } from \"./../typeSystem/array_type\";\nimport { convertToString, toInt } from \"../typeSystem/parsers\";\nimport { Config } from \"../util/config\";\nimport { ProcessorErrorFactory } from \"./error/processorErrorFactory\";\nimport { RuntimeError } from \"./error/runtimeError\";\nimport { Location } from \"../memory/location\";\nimport { StoreValue } from \"./store/value/store_value\";\nimport { StoreValueRef } from \"./store/value/store_value_ref\";\nimport { ArrayStoreValue } from \"./store/value/array_store_value\";\nimport { ArrayStoreValueRef } from \"./store/value/array_store_value_ref\";\nimport { StoreValueAddress } from \"./store/value/store_value_address\";\nimport { LocalizedStrings } from \"../services/localizedStringsService\";\n\nexport class IVProgProcessor {\n static get MAIN_INTERNAL_ID () {\n return \"$main\";\n }\n\n constructor (ast) {\n this.ast = ast;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.input = null;\n this.forceKill = false;\n this.output = null;\n this.mode = Modes.RUN;\n /**\n * Stores the sourceInfo of every function call, command or expression\n */\n this.function_call_stack = [];\n this.instruction_count = 0;\n this.function_call_count = 0;\n }\n\n registerInput (input) {\n if (this.input !== null) this.input = null;\n this.input = input;\n }\n\n registerOutput (output) {\n if (this.output !== null) this.output = null;\n this.output = output;\n }\n\n checkContext (context) {\n return this.context[this.context.length - 1] === context;\n }\n\n ignoreSwitchCases (store) {\n if (store.mode === Modes.RETURN) {\n return true;\n } else if (store.mode === Modes.BREAK) {\n return true;\n } else {\n return false;\n }\n }\n\n prepareState () {\n if (this.stores !== null) {\n for (let i = 0; i < this.stores.length; i++) {\n delete this.stores[i];\n }\n this.stores = null;\n }\n if (this.globalStore !== null) this.globalStore = null;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.instruction_count = 0;\n this.mode = Modes.RUN;\n }\n\n async interpretAST () {\n this.prepareState();\n Location.clear();\n await this.initGlobal();\n const mainFunc = this.findMainFunction();\n if (mainFunc === null) {\n throw ProcessorErrorFactory.main_missing();\n }\n return this.runFunction(mainFunc, [], this.globalStore);\n }\n\n async initGlobal () {\n if (!this.checkContext(Context.BASE)) {\n return ProcessorErrorFactory.invalid_global_var();\n }\n return this.executeCommands(this.globalStore, this.ast.global);\n }\n\n findMainFunction () {\n return this.ast.functions.find((v) => v.isMain);\n }\n\n findFunction (name) {\n if (name.match(/^\\$.+$/)) {\n if (name === IVProgProcessor.MAIN_INTERNAL_ID) {\n return this.findMainFunction();\n }\n const fun = LanguageDefinedFunction.getFunction(name);\n if (!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find((v) => v.name === name);\n if (!val) {\n throw ProcessorErrorFactory.function_missing(name);\n }\n return val;\n }\n }\n\n async runFunction (func, actualParameters, store) {\n const funcName = func.isMain ? IVProgProcessor.MAIN_INTERNAL_ID : func.name;\n const funcStore = new Store(funcName);\n funcStore.extendStore(this.globalStore);\n await this.associateParameters(\n func.formalParameters,\n actualParameters,\n store,\n funcStore\n );\n this.context.push(Context.FUNCTION);\n this.stores.push(funcStore);\n const stoWithVars = await this.executeCommands(\n funcStore,\n func.variablesDeclarations\n );\n const finalSto = this.executeCommands(stoWithVars, func.commands);\n this.stores.pop();\n this.context.pop();\n return finalSto;\n }\n\n /**\n *\n * @param {import('./../ast/commands/formalParameter').FormalParameter[]} formal_params\n * @param {Expression[]} effective_params\n * @param {Store} caller_store\n * @param {Store} callee_store\n */\n async associateParameters (\n formal_params,\n effective_params,\n caller_store,\n callee_store\n ) {\n const funcName =\n callee_store.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : callee_store.name;\n\n const hasVariadic = formal_params.some((p) => p.variadic);\n\n if (\n (formal_params.length != effective_params.length && !hasVariadic) ||\n formal_params.length > effective_params.length\n ) {\n throw ProcessorErrorFactory.invalid_parameters_size(\n funcName,\n formal_params.length,\n effective_params.length\n );\n }\n for (\n let i = 0, j = 0;\n i < formal_params.length && j < effective_params.length;\n i += 1, j += 1\n ) {\n const formalParameter = formal_params[i];\n if (formalParameter.variadic) {\n [j, callee_store] = await this.associateVariadicParameter(\n funcName,\n formalParameter,\n j,\n effective_params,\n caller_store,\n callee_store\n );\n } else {\n const actualParam = effective_params[i];\n callee_store = await this.associateParameter(\n funcName,\n formalParameter,\n actualParam,\n caller_store,\n callee_store\n );\n }\n }\n return callee_store;\n }\n\n /**\n *\n * @param {string} funcName\n * @param {import('./../ast/commands/formalParameter').FormalParameter} formalParameter\n * @param {number} index\n * @param {Expression[]} effective_params\n * @param {Store} caller_store\n * @param {Store} callee_store\n */\n async associateVariadicParameter (\n funcName,\n formalParameter,\n index,\n effective_params,\n caller_store,\n callee_store\n ) {\n let i;\n let count = 1;\n for (i = index; i < effective_params.length; i += 1) {\n const actualParam = effective_params[i];\n callee_store = await this.associateParameter(\n funcName,\n formalParameter,\n actualParam,\n caller_store,\n callee_store,\n count\n );\n count += 1;\n }\n const variadicCount = new StoreValue(Types.INTEGER, count, undefined, true);\n callee_store.insertStore(`${formalParameter.id}.0`, variadicCount);\n return [i - 1, callee_store];\n }\n\n /**\n *\n * @param {string} funcName\n * @param {import('./../ast/commands/formalParameter').FormalParameter} formalParameter\n * @param {Expression} actualParameter\n * @param {Store} callerStore\n * @param {Store} calleeStore\n * @param {number} variadicCount The number of the current value being assigned to the variadic parameter, default 0\n */\n async associateParameter (\n funcName,\n formalParameter,\n actualParameter,\n callerStore,\n calleeStore,\n variadicCount = 0\n ) {\n const actualValue = await this.evaluateExpression(\n callerStore,\n actualParameter\n );\n\n let shouldTypeCast = false;\n\n if (!formalParameter.type.isCompatible(actualValue.type)) {\n if (\n Config.enable_type_casting &&\n !formalParameter.byRef &&\n Store.canImplicitTypeCast(formalParameter.type, actualValue.type)\n ) {\n shouldTypeCast = true;\n } else {\n throw ProcessorErrorFactory.invalid_parameter_type(\n funcName,\n actualParameter.toString()\n );\n }\n }\n\n if (formalParameter.byRef && !actualValue.inStore()) {\n throw ProcessorErrorFactory.invalid_ref(\n funcName,\n actualParameter.toString()\n );\n }\n\n if (formalParameter.byRef) {\n const realObj = callerStore.getStoreObject(actualValue.id);\n let ref = null;\n if (actualValue instanceof ArrayStoreValue) {\n // it's a vector or matrix...\n const values = actualValue.get();\n const array_type = actualValue.type;\n const addresses = values.map((v) =>\n realObj.getLocAddressOf(v.line, v.column)\n );\n const columns = actualValue.isVector() ? 0 : actualValue.columns;\n ref = new ArrayStoreValueRef(\n array_type,\n values,\n addresses,\n actualValue.lines,\n columns,\n realObj.id\n );\n } else {\n if (actualValue instanceof StoreValueAddress) {\n const line = actualValue.line;\n const column = actualValue.column;\n ref = new StoreValueRef(\n actualValue.type,\n actualValue.get(),\n realObj.getLocAddressOf(line, column),\n realObj.id\n );\n ref.setReferenceDimension(realObj.type.dimensions);\n } else {\n ref = new StoreValueRef(\n actualValue.type,\n actualValue.get(),\n realObj.locAddress,\n realObj.id\n );\n }\n }\n let varID = formalParameter.id;\n if (formalParameter.variadic) varID = `${varID}.${variadicCount}`;\n calleeStore.insertStore(varID, ref);\n } else {\n let realValue = actualValue;\n if (shouldTypeCast) {\n realValue = Store.doImplicitCasting(formalParameter.type, realValue);\n }\n let varID = formalParameter.id;\n if (formalParameter.variadic) varID = `${varID}.${variadicCount}`;\n calleeStore.insertStore(varID, realValue);\n }\n return calleeStore;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Command[]} cmds\n *\n * @returns {Promise<Store>}\n */\n async executeCommands (store, cmds) {\n // helper to partially apply a function, in this case executeCommand\n let sto = store;\n for (let i = 0; i < cmds.length; i += 1) {\n sto = await this.executeCommand(sto, cmds[i]);\n }\n return sto;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Command} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeCommand (store, cmd) {\n this.instruction_count += 1;\n if (this.instruction_count % Config.suspend_threshold == 0) {\n //every Config.suspend_threshold instruction should briefly delay its execution in order to allow the browser to process other things\n await Utils.sleep(5);\n }\n\n // Checks if it must interrupt the execution for some reason\n if (this.instruction_count >= Config.max_instruction_count) {\n throw ProcessorErrorFactory.exceed_max_instructions();\n } else if (this.forceKill) {\n throw \"FORCED_KILL!\";\n } else if (store.mode === Modes.PAUSE) {\n return this.executeCommand(store, cmd);\n } else if (store.mode === Modes.RETURN) {\n return store;\n } else if (\n this.checkContext(Context.BREAKABLE) &&\n store.mode === Modes.BREAK\n ) {\n return store;\n } else if (this.mode === Modes.ABORT) {\n throw LocalizedStrings.getMessage(\"aborted_execution\");\n }\n\n if (cmd instanceof Commands.Declaration) {\n return this.executeDeclaration(store, cmd);\n } else if (cmd instanceof Commands.ArrayIndexAssign) {\n return this.executeArrayIndexAssign(store, cmd);\n } else if (cmd instanceof Commands.Assign) {\n return this.executeAssign(store, cmd);\n } else if (cmd instanceof Commands.Break) {\n return this.executeBreak(store, cmd);\n } else if (cmd instanceof Commands.Return) {\n return this.executeReturn(store, cmd);\n } else if (cmd instanceof Commands.IfThenElse) {\n return this.executeIfThenElse(store, cmd);\n } else if (cmd instanceof Commands.RepeatUntil) {\n return this.executeRepeatUntil(store, cmd);\n } else if (cmd instanceof Commands.While) {\n return this.executeWhile(store, cmd);\n } else if (cmd instanceof Commands.For) {\n return this.executeFor(store, cmd);\n } else if (cmd instanceof Commands.Switch) {\n return this.executeSwitch(store, cmd);\n } else if (cmd instanceof Expressions.FunctionCall) {\n return this.executeFunctionCall(store, cmd);\n } else if (cmd instanceof Commands.SysCall) {\n return this.executeSysCall(store, cmd);\n } else {\n throw ProcessorErrorFactory.unknown_command(cmd.sourceInfo);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.SysCall} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeSysCall (store, cmd) {\n const func = cmd.langFunc.bind(this);\n return func(store, cmd);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.FunctionCall} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeFunctionCall (store, cmd) {\n let func = null;\n if (cmd.isMainCall) {\n func = this.findMainFunction();\n } else {\n func = this.findFunction(cmd.id);\n }\n this.function_call_stack.push(cmd.sourceInfo);\n const sto = await this.runFunction(func, cmd.actualParameters, store);\n sto.destroy();\n if (\n !Types.VOID.isCompatible(func.returnType) &&\n sto.mode !== Modes.RETURN\n ) {\n const funcName =\n func.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : func.name;\n throw ProcessorErrorFactory.function_no_return(funcName);\n } else {\n this.function_call_stack.pop();\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Switch} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeSwitch (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const switchCases = cmd.cases;\n let lastStore = store;\n let lastCaseCheckResult = false;\n for (\n let i = 0;\n i < switchCases.length && !this.ignoreSwitchCases(lastStore);\n i += 1\n ) {\n const switchCase = switchCases[i];\n if (lastCaseCheckResult || switchCase.isDefault) {\n lastStore = await this.executeCommands(lastStore, switchCase.commands);\n } else {\n const equalityInfixApp = new Expressions.InfixApp(\n Operators.EQ,\n cmd.expression,\n switchCase.expression\n );\n equalityInfixApp.sourceInfo = switchCase.sourceInfo;\n const result = await this.evaluateExpression(\n lastStore,\n equalityInfixApp\n );\n if (result.get()) {\n lastStore = await this.executeCommands(\n lastStore,\n switchCase.commands\n );\n }\n lastCaseCheckResult = result.get();\n }\n }\n this.context.pop();\n if (lastStore.mode === Modes.BREAK) {\n lastStore.mode = Modes.RUN;\n }\n return lastStore;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.For} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeFor (store, cmd) {\n //BEGIN for -> while rewrite\n const initCmd = new Commands.Assign(cmd.for_id.id, cmd.for_from);\n initCmd.sourceInfo = cmd.sourceInfo;\n // Assume for is iterating forward and that pass is not missing\n let passValue = cmd.for_pass;\n let condition = new Expressions.InfixApp(\n Operators.LT,\n cmd.for_id,\n cmd.for_to\n );\n\n if (cmd.for_pass == null) {\n passValue = new Expressions.IntLiteral(toInt(1));\n const checkEndGTBegin = await this.evaluateExpression(\n store,\n new Expressions.InfixApp(Operators.GE, cmd.for_to, cmd.for_from)\n );\n if (!checkEndGTBegin.get()) {\n passValue = new Expressions.IntLiteral(toInt(-1));\n condition = new Expressions.InfixApp(\n Operators.GT,\n cmd.for_id,\n cmd.for_to\n );\n }\n } else {\n const isForward = await this.evaluateExpression(\n store,\n new Expressions.InfixApp(\n Operators.GE,\n cmd.for_pass,\n new Expressions.IntLiteral(toInt(0))\n )\n );\n if (!isForward.get()) {\n condition = new Expressions.InfixApp(\n Operators.GT,\n cmd.for_id,\n cmd.for_to\n );\n }\n }\n\n condition.sourceInfo = cmd.sourceInfo;\n const increment = new Commands.Assign(\n cmd.for_id.id,\n new Expressions.InfixApp(Operators.ADD, cmd.for_id, passValue)\n );\n increment.sourceInfo = cmd.sourceInfo;\n const whileBlock = new Commands.CommandBlock(\n [],\n cmd.commands.concat(increment)\n );\n const forAsWhile = new Commands.While(condition, whileBlock);\n forAsWhile.sourceInfo = cmd.sourceInfo;\n //END for -> while rewrite\n const newCmdList = [initCmd, forAsWhile];\n return this.executeCommands(store, newCmdList);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.RepeatUntil} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeRepeatUntil (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const sto = await this.executeCommands(store, cmd.commands);\n if (sto.mode === Modes.BREAK) {\n this.context.pop();\n sto.mode = Modes.RUN;\n return sto;\n }\n const checkCondition = await this.evaluateExpression(sto, cmd.expression);\n if (!checkCondition.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(cmd.sourceInfo);\n }\n this.context.pop();\n if (checkCondition.get()) {\n return sto;\n } else {\n return this.executeCommand(sto, cmd);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.While} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeWhile (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const checkCondition = await this.evaluateExpression(store, cmd.expression);\n if (!checkCondition.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(\n cmd.expression.toString(),\n cmd.sourceInfo\n );\n }\n if (checkCondition.get()) {\n const sto = await this.executeCommands(store, cmd.commands);\n this.context.pop();\n if (sto.mode === Modes.BREAK) {\n sto.mode = Modes.RUN;\n return sto;\n }\n return this.executeCommand(sto, cmd);\n } else {\n this.context.pop();\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.IfThenElse} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeIfThenElse (store, cmd) {\n const isTrue = await this.evaluateExpression(store, cmd.condition);\n if (!isTrue.type.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.if_condition_type_full(\n cmd.condition.toString(),\n cmd.sourceInfo\n );\n }\n if (isTrue.get()) {\n return this.executeCommands(store, cmd.ifTrue.commands);\n } else if (cmd.ifFalse !== null) {\n if (cmd.ifFalse instanceof Commands.IfThenElse) {\n return this.executeCommand(store, cmd.ifFalse);\n } else {\n return this.executeCommands(store, cmd.ifFalse.commands);\n }\n } else {\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Return} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeReturn (store, cmd) {\n const funcName =\n store.name === IVProgProcessor.MAIN_INTERNAL_ID\n ? LanguageDefinedFunction.getMainFunctionName()\n : store.name;\n // console.log(funcName, store.name === IVProgProcessor.MAIN_INTERNAL_ID);\n const func = this.findFunction(store.name);\n const funcType = func.returnType;\n const value = await this.evaluateExpression(store, cmd.expression);\n if (value === null && funcType.isCompatible(Types.VOID)) {\n store.mode = Modes.RETURN;\n return store;\n }\n\n let real_value = value;\n if (value === null || !funcType.isCompatible(value.type)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(funcType, value.type)\n ) {\n const stringInfo = funcType.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_return_type_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n }\n real_value = Store.doImplicitCasting(funcType, value);\n }\n\n store.insertStore(\"$\", real_value);\n store.mode = Modes.RETURN;\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Break} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeBreak (store, cmd) {\n if (this.checkContext(Context.BREAKABLE)) {\n store.mode = Modes.BREAK;\n return store;\n } else {\n throw ProcessorErrorFactory.unexpected_break_command_full(cmd.sourceInfo);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Assign} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeAssign (store, cmd) {\n const inStore = store.applyStore(cmd.id);\n if (inStore.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const value = await this.evaluateExpression(store, cmd.expression);\n let realValue = value;\n if (!inStore.type.isCompatible(realValue.type)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(inStore.type, value.type)\n ) {\n realValue = Store.doImplicitCasting(inStore.type, realValue);\n } else {\n const stringInfo = inStore.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n }\n\n if (inStore instanceof ArrayStoreValue) {\n const columns = realValue.columns == null ? 0 : realValue.columns;\n if (inStore.lines !== realValue.lines || inStore.columns !== columns) {\n const exp = cmd.expression.toString();\n if (inStore.isVector()) {\n throw ProcessorErrorFactory.invalid_vector_assignment_full(\n cmd.id,\n inStore.lines,\n exp,\n realValue.lines,\n cmd.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.invalid_matrix_assignment_full(\n cmd.id,\n inStore.lines,\n inStore.columns,\n exp,\n realValue.lines,\n realValue.columns,\n cmd.sourceInfo\n );\n }\n }\n }\n\n store.updateStore(cmd.id, realValue);\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.ArrayIndexAssign} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeArrayIndexAssign (store, cmd) {\n const mustBeArray = store.applyStore(cmd.id);\n let used_dims = 0;\n if (mustBeArray.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (!(mustBeArray.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const lineSV = await this.evaluateExpression(store, cmd.line);\n if (!Types.INTEGER.isCompatible(lineSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n used_dims += 1;\n const line = lineSV.get().toNumber();\n const columnSV = await this.evaluateExpression(store, cmd.column);\n let column = null;\n if (columnSV != null) {\n if (!Types.INTEGER.isCompatible(columnSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n column = columnSV.get().toNumber();\n used_dims += 1;\n }\n const value = await this.evaluateExpression(store, cmd.expression);\n let actualValue = value;\n if (line >= mustBeArray.lines) {\n if (mustBeArray.isVector) {\n throw ProcessorErrorFactory.vector_line_outbounds_full(\n cmd.id,\n line,\n mustBeArray.lines,\n cmd.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.matrix_line_outbounds_full(\n cmd.id,\n line,\n mustBeArray.lines,\n cmd.sourceInfo\n );\n }\n } else if (line < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n if (column != null && mustBeArray.columns === 0) {\n throw ProcessorErrorFactory.vector_not_matrix_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (column != null) {\n if (column >= mustBeArray.columns) {\n throw ProcessorErrorFactory.matrix_column_outbounds_full(\n cmd.id,\n column,\n mustBeArray.columns,\n cmd.sourceInfo\n );\n } else if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n }\n\n if (!mustBeArray.type.canAccept(value.type, used_dims)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(mustBeArray.type.innerType, value.type)\n ) {\n const type = mustBeArray.type.innerType;\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n actualValue = Store.doImplicitCasting(mustBeArray.type.innerType, value);\n }\n\n const current_value = mustBeArray.getAt(line, column);\n if (current_value instanceof ArrayStoreValue) {\n if (\n current_value.lines !== actualValue.lines ||\n current_value.columns !== actualValue.columns\n ) {\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.invalid_matrix_index_assign_full(\n cmd.id,\n line,\n current_value.lines,\n exp,\n actualValue.lines,\n cmd.sourceInfo\n );\n }\n }\n\n return store.updateStoreArray(cmd.id, actualValue, line, column);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.Declaration} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeDeclaration (store, cmd) {\n if (cmd instanceof Commands.ArrayDeclaration) {\n return this.executeArrayDeclaration(store, cmd);\n } else {\n let temp = new StoreValue(cmd.type, null, null, cmd.isConst);\n if (cmd.initial !== null) {\n const value = await this.evaluateExpression(store, cmd.initial);\n let realValue = value;\n if (!value.type.isCompatible(cmd.type)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(cmd.type, value.type)\n ) {\n realValue = Store.doImplicitCasting(cmd.type, realValue);\n } else {\n const stringInfo = value.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp,\n cmd.sourceInfo\n );\n }\n }\n temp = new StoreValue(cmd.type, realValue.get(), null, cmd.isConst);\n }\n store.insertStore(cmd.id, temp);\n return store;\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Commands.ArrayDeclaration} cmd\n *\n * @returns {Promise<Store>}\n */\n async executeArrayDeclaration (store, cmd) {\n const linesSV = await this.evaluateExpression(store, cmd.lines);\n if (!Types.INTEGER.isCompatible(linesSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n const line = linesSV.get().toNumber();\n const columnsSV = await this.evaluateExpression(store, cmd.columns);\n let column = null;\n if (columnsSV !== null) {\n if (!Types.INTEGER.isCompatible(columnsSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n column = columnsSV.get().toNumber();\n if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n cmd.sourceInfo\n );\n }\n }\n let temp = new ArrayStoreValue(\n cmd.type,\n [],\n line,\n column,\n null,\n cmd.isConst\n );\n if (cmd.initial !== null) {\n // array can only be initialized by a literal....\n const valueList = await this.evaluateArrayLiteral(\n store,\n cmd.initial,\n cmd.type,\n line,\n column\n );\n temp = new ArrayStoreValue(\n cmd.type,\n valueList,\n line,\n column,\n null,\n cmd.isConst\n );\n }\n store.insertStore(cmd.id, temp);\n return store;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expression} exp\n *\n * @returns {Promise<import('./store/value/istore_value').IStoreValue>}\n */\n async evaluateExpression (store, exp) {\n this.instruction_count += 1;\n if (this.instruction_count % Config.suspend_threshold == 0) {\n //every Config.suspend_threshold instruction should briefly delay its execution in order to allow the browser to process other things\n await Utils.sleep(5);\n }\n if (this.mode === Modes.ABORT) {\n throw LocalizedStrings.getMessage(\"aborted_execution\");\n }\n if (this.instruction_count >= Config.max_instruction_count) {\n throw new Error(\n \"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.\"\n );\n }\n if (exp instanceof Expressions.UnaryApp) {\n return this.evaluateUnaryApp(store, exp);\n } else if (exp instanceof Expressions.InfixApp) {\n return this.evaluateInfixApp(store, exp);\n } else if (exp instanceof Expressions.ArrayAccess) {\n return this.evaluateArrayAccess(store, exp);\n } else if (exp instanceof Expressions.VariableLiteral) {\n return this.evaluateVariableLiteral(store, exp);\n } else if (exp instanceof Expressions.IntLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.RealLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.BoolLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.StringLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.CharLiteral) {\n return this.evaluateLiteral(store, exp);\n } else if (exp instanceof Expressions.ArrayLiteral) {\n throw new Error(\n \"Internal Error: The system should not eval an array literal.\"\n );\n } else if (exp instanceof Expressions.FunctionCall) {\n return this.evaluateFunctionCall(store, exp);\n }\n return null;\n }\n\n async evaluateFunctionCall (store, exp) {\n if (exp.isMainCall) {\n throw ProcessorErrorFactory.void_in_expression_full(\n LanguageDefinedFunction.getMainFunctionName(),\n exp.sourceInfo\n );\n }\n const func = this.findFunction(exp.id);\n if (Types.VOID.isCompatible(func.returnType)) {\n throw ProcessorErrorFactory.void_in_expression_full(\n exp.id,\n exp.sourceInfo\n );\n }\n if (this.function_call_stack.length >= Config.max_call_stack) {\n throw ProcessorErrorFactory.exceeded_recursive_calls(exp.sourceInfo);\n }\n this.function_call_stack.push(exp.sourceInfo);\n const sto = await this.runFunction(func, exp.actualParameters, store);\n if (sto.mode !== Modes.RETURN) {\n throw new Error(\n \"!!!Internal error: the function that was called did not have a return command or did not set the store mode properly -> \" +\n exp.id\n );\n }\n const val = sto.applyStore(\"$\");\n sto.destroy();\n this.function_call_stack.pop();\n return val;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exp\n * @param {ArrayType} type\n *\n * @returns {Promise<StoreValue[]>}\n */\n async evaluateArrayLiteral (store, exp, type, lines, columns) {\n if (!exp.isVector) {\n if (columns == null) {\n throw new Error(\n \"This should never happen: Vector cannot be initialized by a matrix\"\n );\n }\n const storeValueMatrix = await this.evaluateMatrix(\n store,\n exp,\n type,\n lines,\n columns\n );\n return storeValueMatrix.reduce((prev, next) => prev.concat(next), []);\n } else {\n if (columns != null) {\n throw new Error(\n \"This should never happen: Matrix cannot be initialized by a vector\"\n );\n }\n return this.evaluateVector(store, exp, type, lines);\n }\n }\n\n /**\n * Evalautes a list of literals and expression composing the vector\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exps\n * @param {ArrayType} type\n * @param {number} n_elements\n *\n * @returns {Promise<StoreValue[]>} store object list\n */\n async evaluateVector (store, exps, type, n_elements) {\n const values = exps.value;\n if (n_elements !== values.length) {\n throw ProcessorErrorFactory.invalid_number_elements_vector(\n n_elements,\n exps.toString(),\n values.length,\n exps.sourceInfo\n );\n }\n const actualValues = await Promise.all(\n values.map((exp) => this.evaluateExpression(store, exp))\n );\n return actualValues.map((v, index) => {\n if (!type.canAccept(v.type, 1)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type.innerType, v.type)\n ) {\n // const stringInfo = v.type.stringInfo();\n // const info = stringInfo[0];\n const exp_str = values[index].toString();\n // TODO - fix error message\n throw ProcessorErrorFactory.invalid_array_literal_type_full(\n exp_str,\n values[index].sourceInfo\n );\n }\n const newValue = Store.doImplicitCasting(type.innerType, v);\n return newValue;\n }\n return v;\n });\n }\n\n /**\n * Evaluates a list of array literals composing the matrix\n * @param {Store} store\n * @param {Expressions.ArrayLiteral} exps\n * @param {ArrayType} type\n *\n * @returns {Promise<StoreValue[][]>}\n */\n async evaluateMatrix (store, exps, type, lines, columns) {\n const values = exps.value;\n if (values.length !== lines) {\n throw ProcessorErrorFactory.invalid_number_lines_matrix(\n lines,\n exps.toString(),\n values.length,\n exps.sourceInfo\n );\n }\n const vectors = values.map((vector) => {\n const vec_type = new ArrayType(type.innerType, 1);\n return this.evaluateVector(store, vector, vec_type, columns);\n });\n return await Promise.all(vectors);\n }\n\n /**\n *\n * @param {Store} _\n * @param {import('../ast/expressions/literal').Literal} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateLiteral (_, exp) {\n return new StoreValue(exp.type, exp.value);\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.VariableLiteral} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateVariableLiteral (store, exp) {\n const val = store.applyStore(exp.id);\n return val;\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.ArrayAccess} exp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateArrayAccess (store, exp) {\n const mustBeArray = store.getStoreObject(exp.id);\n if (!(mustBeArray.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n exp.id,\n exp.sourceInfo\n );\n }\n const lineSV = await this.evaluateExpression(store, exp.line);\n if (!Types.INTEGER.isCompatible(lineSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(exp.sourceInfo);\n }\n const line = lineSV.get().toNumber();\n const columnSV = await this.evaluateExpression(store, exp.column);\n let column = null;\n if (columnSV !== null) {\n if (!Types.INTEGER.isCompatible(columnSV.type)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n exp.sourceInfo\n );\n }\n column = columnSV.get().toNumber();\n }\n if (line >= mustBeArray.lines) {\n if (mustBeArray.isVector) {\n throw ProcessorErrorFactory.vector_line_outbounds_full(\n exp.id,\n line,\n mustBeArray.lines,\n exp.sourceInfo\n );\n } else {\n throw ProcessorErrorFactory.matrix_line_outbounds_full(\n exp.id,\n line,\n mustBeArray.lines,\n exp.sourceInfo\n );\n }\n } else if (line < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n exp.sourceInfo\n );\n }\n if (column !== null && mustBeArray.columns === 0) {\n throw ProcessorErrorFactory.vector_not_matrix_full(\n exp.id,\n exp.sourceInfo\n );\n }\n if (column !== null) {\n if (column >= mustBeArray.columns) {\n throw ProcessorErrorFactory.matrix_column_outbounds_full(\n exp.id,\n column,\n mustBeArray.columns,\n exp.sourceInfo\n );\n } else if (column < 0) {\n throw ProcessorErrorFactory.array_dimension_not_positive_full(\n exp.sourceInfo\n );\n }\n }\n const result = mustBeArray.getAt(line, column);\n const type = mustBeArray.type.innerType;\n if (Array.isArray(result)) {\n const values = result.map((val, col) => {\n return new StoreValueAddress(\n type,\n val,\n line,\n col,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n });\n return new ArrayStoreValue(\n new ArrayType(type, 1),\n values,\n mustBeArray.columns,\n null,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n } else {\n return new StoreValueAddress(\n type,\n result,\n line,\n column,\n mustBeArray.id,\n mustBeArray.readOnly\n );\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.UnaryApp} unaryApp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateUnaryApp (store, unaryApp) {\n const left = await this.evaluateExpression(store, unaryApp.left);\n const resultType = resultTypeAfterUnaryOp(unaryApp.op, left.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n const stringInfo = left.type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_unary_op_full(\n unaryApp.op,\n info.type,\n info.dim,\n unaryApp.sourceInfo\n );\n }\n switch (unaryApp.op.ord) {\n case Operators.ADD.ord:\n return new StoreValue(resultType, left.get());\n case Operators.SUB.ord:\n return new StoreValue(resultType, left.get().negated());\n case Operators.NOT.ord:\n return new StoreValue(resultType, !left.get());\n default:\n throw new RuntimeError(\"!!!Critical Invalid UnaryApp \" + unaryApp.op);\n }\n }\n\n /**\n *\n * @param {Store} store\n * @param {Expressions.InfixApp} infixApp\n *\n * @returns {import('./store/value/istore_value').IStoreValue}\n */\n async evaluateInfixApp (store, infixApp) {\n const left = await this.evaluateExpression(store, infixApp.left);\n const right = await this.evaluateExpression(store, infixApp.right);\n let shouldImplicitCast = false;\n let resultType = resultTypeAfterInfixOp(infixApp.op, left.type, right.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n if (\n Config.enable_type_casting &&\n Store.canImplicitTypeCast(left.type, right.type)\n ) {\n shouldImplicitCast = true;\n } else {\n const stringInfoLeft = left.type.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = right.type.stringInfo();\n const infoRight = stringInfoRight[0];\n throw ProcessorErrorFactory.invalid_infix_op_full(\n infixApp.op,\n infoLeft.type,\n infoLeft.dim,\n infoRight.type,\n infoRight.dim,\n infixApp.sourceInfo\n );\n }\n }\n let result = null;\n switch (infixApp.op.ord) {\n case Operators.ADD.ord: {\n if (Types.STRING.isCompatible(left.type)) {\n const rightStr = convertToString(right.get(), right.type);\n return new StoreValue(resultType, left.get() + rightStr);\n } else if (Types.STRING.isCompatible(right.type)) {\n const leftStr = convertToString(left.get(), left.type);\n return new StoreValue(resultType, leftStr + right.get());\n } else if (Types.CHAR.isCompatible(left.type)) {\n const strLeft = convertToString(left.get(), left.type);\n const strRight = convertToString(right.get(), right.type);\n return new StoreValue(resultType, strLeft + strRight);\n } else {\n return new StoreValue(resultType, left.get().plus(right.get()));\n }\n }\n case Operators.SUB.ord:\n return new StoreValue(resultType, left.get().minus(right.get()));\n case Operators.MULT.ord: {\n result = left.get().times(right.get());\n return new StoreValue(resultType, result);\n }\n case Operators.DIV.ord: {\n if (right.get() == 0) {\n throw ProcessorErrorFactory.divsion_by_zero_full(\n infixApp.toString(),\n infixApp.sourceInfo\n );\n }\n if (Types.INTEGER.isCompatible(resultType))\n result = left.get().divToInt(right.get());\n else result = left.get().div(right.get());\n return new StoreValue(resultType, result);\n }\n case Operators.MOD.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (shouldImplicitCast) {\n resultType = Types.INTEGER;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.modulo(rightValue);\n return new StoreValue(resultType, result);\n }\n case Operators.GT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length > rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) > rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gt(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.GE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length >= rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) >= rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.LT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length < rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) < rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lt(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.LE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length <= rightValue.length;\n } else if (Types.CHAR.isCompatible(left.type)) {\n result = leftValue.charCodeAt(0) <= rightValue.charCodeAt(0);\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.EQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (\n Types.INTEGER.isCompatible(left.type) ||\n Types.REAL.isCompatible(left.type)\n ) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.eq(rightValue);\n } else {\n result = leftValue === rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.NEQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (\n Types.INTEGER.isCompatible(left.type) ||\n Types.REAL.isCompatible(left.type)\n ) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = !leftValue.eq(rightValue);\n } else {\n result = leftValue !== rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.AND.ord:\n return new StoreValue(resultType, left.get() && right.get());\n case Operators.OR.ord:\n return new StoreValue(resultType, left.get() || right.get());\n default:\n throw new RuntimeError(\"!!!Critical Invalid InfixApp \" + infixApp.op);\n }\n }\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\n\n/**\n * num_elements\n * matrix_lines\n * matrix_columns\n */\n\nexport function createNumElementsFun () {\n const numElementsFun = async (sto, _) => {\n const vector = sto.applyStore(\"vector\");\n const temp = new StoreValue(Types.INTEGER, toInt(vector.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(numElementsFun)]);\n const func = new Commands.Function('$numElements', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 1), 'vector', false)],\n block);\n return func;\n }\n\nexport function createMatrixLinesFun () {\n const matrixLinesFun = async (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixLinesFun)]);\n const func = new Commands.Function('$matrixLines', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n\nexport function createMatrixColumnsFun () {\n const matrixColumnsFun = async (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.columns));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixColumnsFun)]);\n const func = new Commands.Function('$matrixColumns', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n ","import * as Commands from \"./../../ast/commands\";\nimport { Modes } from \"../modes\";\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { Types } from \"./../../typeSystem/types\";\nimport { ProcessorErrorFactory } from \"./../error/processorErrorFactory\";\nimport { StoreValue } from \"../store/value/store_value\";\n\nexport function createOutputFun () {\n const writeFunction = async function (store, _) {\n const totalSV = store.applyStore(\"p1.0\");\n const total = totalSV.get();\n for (let i = 1; i < total; i += 1) {\n const val = store.applyStore(`p1.${i}`);\n this.output.sendOutput(Parsers.convertToString(val.get(), val.type));\n }\n store.mode = Modes.RETURN;\n return store;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(writeFunction)]\n );\n const func = new Commands.Function(\n \"$write\",\n Types.VOID,\n [new Commands.FormalParameter(Types.ALL, \"p1\", false, true)],\n block\n );\n return func;\n}\n\nexport function createInputFun () {\n const readFunction = async function (store, _) {\n const text = await this.input.requestInput();\n const typeToConvert = store.applyStore(\"p1\").type;\n let type = null;\n let result = null;\n try {\n if (typeToConvert.isCompatible(Types.INTEGER)) {\n result = Parsers.toInt(text.trim()).trunc();\n type = Types.INTEGER;\n } else if (typeToConvert.isCompatible(Types.REAL)) {\n result = Parsers.toReal(text.trim());\n type = Types.REAL;\n } else if (typeToConvert.isCompatible(Types.BOOLEAN)) {\n result = Parsers.toBool(text.trim());\n type = Types.BOOLEAN;\n } else if (typeToConvert.isCompatible(Types.STRING)) {\n result = Parsers.toString(text);\n type = Types.STRING;\n } else if (typeToConvert.isCompatible(Types.CHAR)) {\n result = Parsers.toChar(text);\n type = Types.CHAR;\n } else {\n throw new Error(\"!!!!Critical error: Unknown type in readFunction!!!!\");\n }\n } catch (_) {\n if (this.mode == Modes.ABORT) {\n store.mode = Modes.RETURN;\n return store;\n }\n const stringInfo = typeToConvert.stringInfo()[0];\n const realObject = store.getStoreObject(\"p1\");\n if (realObject.getReferenceDimension() > 0) {\n const arrayInfo = realObject.type.stringInfo()[0];\n const dim = realObject.getReferenceDimension();\n throw ProcessorErrorFactory.invalid_read_type_array(\n text,\n stringInfo.type,\n stringInfo.dim,\n realObject.getRefObj(),\n arrayInfo.type,\n dim,\n this.function_call_stack.pop()\n );\n }\n throw ProcessorErrorFactory.invalid_read_type(\n text,\n stringInfo.type,\n stringInfo.dim,\n realObject.getRefObj(),\n this.function_call_stack.pop()\n );\n }\n const stoValue = new StoreValue(type, result);\n store.updateStore(\"p1\", stoValue);\n store.mode = Modes.RETURN;\n return store;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(readFunction)]\n );\n const func = new Commands.Function(\n \"$read\",\n Types.VOID,\n [new Commands.FormalParameter(Types.ALL, \"p1\", true)],\n block\n );\n return func;\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { IVProgParser } from '../../ast/ivprogParser';\nimport { RealLiteral, IntLiteral, BoolLiteral } from '../../ast/expressions';\nimport { Modes } from '../modes';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\nimport { StoreValue } from '../store/value/store_value';\n\n/**\n * \n * is_real\n * is_int\n * is_bool\n * cast_real\n * cast_int\n * cast_bool\n * cast_string\n * cast_char\n */\n\nexport function createIsRealFun () {\n const isRealFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof RealLiteral) {\n result = true;\n }\n } catch (error) {\n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isRealFun)]);\n const func = new Commands.Function('$isReal', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createIsIntFun () {\n const isIntFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof IntLiteral) {\n result = true;\n }\n } catch { \n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isIntFun)]);\n const func = new Commands.Function('$isInt', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createIsBoolFun () {\n const isBoolFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n result = true;\n }\n } catch (error) { \n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isBoolFun)]);\n const func = new Commands.Function('$isBool', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastRealFun () {\n const castRealFun = async (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.INTEGER.ord: {\n value = value.toNumber();\n const temp = new StoreValue(Types.REAL, Parsers.toReal(value));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof RealLiteral) {\n const temp = new StoreValue(Types.REAL, result.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) {\n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.REAL.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castRealFun)]);\n const func = new Commands.Function('$castReal', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.STRING]), 'val', false)],\n block);\n return func;\n}\n\nexport function createCastIntFun () {\n const castIntFun = async (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.REAL.ord: {\n value = value.toNumber();\n const temp = new StoreValue(Types.INTEGER, Math.floor(value));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.CHAR.ord: {\n const temp = new StoreValue(Types.INTEGER, value.charCodeAt(0));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof IntLiteral) {\n const temp = new StoreValue(Types.INTEGER, result.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) { \n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.INTEGER.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castIntFun)]);\n const func = new Commands.Function('$castInt', Types.INTEGER,\n [new Commands.FormalParameter(new MultiType([Types.REAL, Types.STRING]), 'val', false)],\n block);\n return func;\n}\n\nexport function createCastBoolFun () {\n const castBoolFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const value = str.get(); \n const parser = IVProgParser.createParser(value);\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n const temp = new StoreValue(Types.BOOLEAN, val.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n } catch (error) { \n // ignore\n }\n const typeStringInfoArray = Types.BOOLEAN.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n throw ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castBoolFun)]);\n const func = new Commands.Function('$castBool', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastStringFun () {\n const castStringFun = async function (store, _) {\n const val = store.applyStore('str');\n const result = Parsers.convertToString(val.get(), val.type);\n const temp = new StoreValue(Types.STRING, result);\n store.insertStore(\"$\", temp);\n store.mode = Modes.RETURN;\n return store;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castStringFun)]);\n const func = new Commands.Function('$castString', Types.STRING,\n [new Commands.FormalParameter(Types.ALL, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastCharFun () {\n const castCharFun = (store, _) => {\n const valSV = store.applyStore('charCode');\n // Force the int value to the range [0, 255]\n const value = valSV.get().toNumber() & 0xFF;\n const result = String.fromCharCode(value);\n const temp = new StoreValue(Types.CHAR, result);\n store.insertStore(\"$\", temp);\n store.mode = Modes.RETURN;\n return store;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castCharFun)]);\n const func = new Commands.Function('$castChar', Types.CHAR,\n [new Commands.FormalParameter(Types.INTEGER, 'charCode', false)],\n block);\n return func;\n}","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport * as Parsers from \"./../../typeSystem/parsers\";\nimport { Decimal } from 'decimal.js';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/**\n * sin\n * cos\n * tan\n * sqrt\n * pow\n * log\n * abs\n * negate\n * invert\n * max\n * min\n */\n\nfunction convertToRadians(degrees) {\n return degrees.times(Decimal.acos(-1)).div(180);\n}\n\nexport function createSinFun () {\n const sinFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if(angle.eq(90)) {\n result = new Decimal(1);\n } else if (angle.eq(180)) {\n result = new Decimal(0);\n } else if (angle.eq(270)) {\n result = new Decimal(-1);\n } else {\n result = Decimal.sin(convertToRadians(angle));\n }\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sinFun)]);\n const func = new Commands.Function(\n \"$sin\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createCosFun () {\n const cosFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if (angle.eq(90)) {\n result = new Decimal(0);\n } else if (angle.eq(180)) {\n result = new Decimal(-1);\n } else if (angle.eq(270)) {\n result = new Decimal(0);\n }\n result = Decimal.cos(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(cosFun)]);\n const func = new Commands.Function(\n \"$cos\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createTanFun () {\n const tanFun = async function (sto, _) {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n if(angle.eq(90) || angle.eq(270)) {\n throw ProcessorErrorFactory.undefined_tanget_value(x.get().toNumber(),\n this.function_call_stack.pop());\n }\n const result = Decimal.tan(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(tanFun)]);\n const func = new Commands.Function(\n \"$tan\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createSqrtFun () {\n const sqrtFun = async function (sto, _) {\n const x = sto.applyStore('x');\n if(x.get().isNeg()) {\n return Promise.reject(ProcessorErrorFactory.negative_sqrt_value(this.function_call_stack.pop()));\n }\n const result = x.get().sqrt();\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sqrtFun)]);\n const func = new Commands.Function(\n \"$sqrt\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createPowFun () {\n const powFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const y = sto.applyStore('y');\n const result = x.get().pow(y.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(powFun)]);\n const func = new Commands.Function(\n \"$pow\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n ),\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"y\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createLogFun () {\n const logFun = async function (sto, _) {\n const x = sto.applyStore('x');\n if (x.get().isNegative()) {\n return Promise.reject(\n ProcessorErrorFactory.negative_log_value(this.function_call_stack.pop())\n );\n }\n const result = Decimal.log10(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(logFun)]);\n const func = new Commands.Function(\n \"$log\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createAbsFun () {\n const absFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().abs();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(absFun)]);\n const func = new Commands.Function(\n \"$abs\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createNegateFun () {\n const negateFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().negated();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(negateFun)]\n );\n const func = new Commands.Function(\n \"$negate\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createInvertFun() {\n const invertFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const result = Parsers.toReal(1).dividedBy(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(invertFun)]\n );\n const func = new Commands.Function(\n \"$invert\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.REAL]),\n \"x\",\n false\n )\n ],\n block\n );\n return func;\n}\n\nexport function createMaxFun () {\n const maxFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.max(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const paramType = new ArrayType(\n new MultiType([Types.INTEGER, Types.REAL]),\n 1\n );\n const block = new Commands.CommandBlock([], [new Commands.SysCall(maxFun)]);\n const func = new Commands.Function(\n \"$max\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, \"x\", false)],\n block\n );\n return func;\n}\n\nexport function createMinFun () {\n const minFun = async (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.min(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const paramType = new ArrayType(\n new MultiType([Types.INTEGER, Types.REAL]),\n 1\n );\n const block = new Commands.CommandBlock([], [new Commands.SysCall(minFun)]);\n const func = new Commands.Function(\n \"$min\",\n new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, \"x\", false)],\n block\n );\n return func;\n}\n\nlet seed = Date.now();\nexport function createRandFun() {\n const a = 16807;\n const m = 2147483647;\n const c = 12345;\n const randFun = async (sto, _) => {\n seed = (a * seed + c) % m;\n const val = seed / (m - 1);\n const temp = new StoreValue(Types.REAL, new Decimal(val));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n const block = new Commands.CommandBlock([], [new Commands.SysCall(randFun)]);\n const func = new Commands.Function(\"$rand\", Types.REAL, [], block);\n return func;\n}\n\nexport function createSetSeedFun() {\n const setSeedFun = async (sto, _) => {\n const value = sto.applyStore(\"x\");\n seed = value.get().toNumber();\n sto.mode = Modes.RETURN;\n return sto;\n };\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(setSeedFun)]\n );\n const func = new Commands.Function(\n \"$setSeed\",\n Types.VOID,\n [new Commands.FormalParameter(Types.INTEGER, \"x\", false)],\n block\n );\n return func;\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/*\n* substring\n* length\n* uppercase\n* lowercase\n* charAt\n**/\n\nexport function createSubstringFun () {\n const substringFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const start = sto.applyStore(\"start\");\n const end = sto.applyStore(\"end\");\n const result = str.get().substring(start.get(), end.get());\n const temp = new StoreValue(Types.STRING, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(substringFun)]);\n const func = new Commands.Function('$substring', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'start', false),\n new Commands.FormalParameter(Types.INTEGER, 'end', false)],\n block);\n return func;\n}\n\nexport function createLengthFun () {\n const lengthFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.INTEGER, toInt(str.value.length));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lengthFun)]);\n const func = new Commands.Function('$length', Types.INTEGER,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createUppercaseFun () {\n const uppercaseFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toUpperCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(uppercaseFun)]);\n const func = new Commands.Function('$uppercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createLowercaseFun () {\n const lowercaseFun = async (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toLowerCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lowercaseFun)]);\n const func = new Commands.Function('$lowercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createrCharAtFun () {\n const charAtFun = async function (sto, _) {\n const str = sto.applyStore(\"str\");\n const idx = sto.applyStore(\"index\");\n if (idx.get().toNumber() < 0 || idx.get().toNumber() >= str.get().length) {\n throw ProcessorErrorFactory.invalid_string_index(idx.get().toNumber(), str.get(),\n this.function_call_stack.pop());\n }\n const temp = new StoreValue(Types.CHAR, str.get().charAt(idx.get().toNumber()));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(charAtFun)]);\n const func = new Commands.Function('$charAt', Types.CHAR,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'index', false)],\n block);\n return func;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Modes = void 0;\nexports.Modes = Object.freeze({\n RETURN: Symbol('mode:return'),\n BREAK: Symbol('mode:break'),\n PAUSE: Symbol('mode:pause'),\n RUN: Symbol('mode:run'),\n ABORT: Symbol('mode:abort')\n});\n","import { ProcessorErrorFactory } from \"./../error/processorErrorFactory\";\nimport { LanguageDefinedFunction } from \"./../definedFunctions\";\nimport { LanguageService } from \"./../../services/languageService\";\nimport {\n ArrayDeclaration,\n While,\n For,\n Switch,\n Assign,\n Break,\n IfThenElse,\n Return,\n ArrayIndexAssign,\n} from \"../../ast/commands\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { Expression } from \"./../../ast/expressions/expression\";\nimport {\n InfixApp,\n UnaryApp,\n FunctionCall,\n IntLiteral,\n RealLiteral,\n StringLiteral,\n BoolLiteral,\n VariableLiteral,\n ArrayAccess,\n CharLiteral,\n} from \"../../ast/expressions\";\nimport { Literal } from \"../../ast/expressions/literal\";\nimport {\n resultTypeAfterInfixOp,\n resultTypeAfterUnaryOp,\n} from \"../compatibilityTable\";\nimport { Types } from \"../../typeSystem/types\";\nimport { ArrayType } from \"../../typeSystem/array_type\";\nimport { MultiType } from \"../../typeSystem/multiType\";\nimport { Config } from \"../../util/config\";\nimport { Store } from \"../store/store\";\nimport { IVProgParser } from \"../../ast/ivprogParser\";\n\nexport class SemanticAnalyser {\n static analyseFromSource (stringCode) {\n const parser = IVProgParser.createParser(stringCode);\n const semantic = new SemanticAnalyser(parser.parseTree());\n return semantic.analyseTree();\n }\n\n constructor (ast) {\n this.ast = ast;\n this.lexerClass = LanguageService.getCurrentLexer();\n const lexer = new this.lexerClass(null);\n this.literalNames = lexer.literalNames;\n this.symbolMap = null;\n this.currentFunction = null;\n }\n\n pushMap () {\n if (this.symbolMap === null) {\n this.symbolMap = { map: {}, next: null };\n } else {\n const n = { map: {}, next: this.symbolMap };\n this.symbolMap = n;\n }\n }\n\n popMap () {\n if (this.symbolMap !== null) {\n this.symbolMap = this.symbolMap.next;\n }\n }\n\n insertSymbol (id, typeInfo) {\n this.symbolMap.map[id] = typeInfo;\n }\n\n findSymbol (id, symbol_map) {\n if (!symbol_map.map[id]) {\n if (symbol_map.next) {\n return this.findSymbol(id, symbol_map.next);\n }\n return null;\n } else {\n return symbol_map.map[id];\n }\n }\n\n getMainFunction () {\n return this.ast.functions.find((v) => v.isMain);\n }\n\n findFunction (name) {\n if (name.match(/^\\$.+$/)) {\n const fun = LanguageDefinedFunction.getFunction(name);\n if (!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find((v) => v.name === name);\n if (!val) {\n return null;\n }\n return val;\n }\n }\n\n analyseTree () {\n const globalVars = this.ast.global;\n this.pushMap();\n this.assertDeclarations(globalVars);\n const functions = this.ast.functions;\n const mainFunc = functions.filter((f) => f.name === null);\n if (mainFunc.length <= 0) {\n throw ProcessorErrorFactory.main_missing();\n }\n for (let i = 0; i < functions.length; i++) {\n const fun = functions[i];\n this.assertFunction(fun);\n }\n return this.ast;\n }\n\n assertDeclarations (list) {\n for (let i = 0; i < list.length; i++) {\n this.assertDeclaration(list[i]);\n }\n }\n\n assertDeclaration (declaration) {\n if (declaration instanceof ArrayDeclaration) {\n this.assertArrayDeclaration(declaration);\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n lines: declaration.lines,\n columns: declaration.columns,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n } else {\n if (declaration.initial === null) {\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n return;\n }\n const resultType = this.evaluateExpressionType(declaration.initial);\n if (resultType instanceof MultiType) {\n if (!resultType.isCompatible(declaration.type)) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n result_info.type,\n result_info.dim,\n exp.toString(),\n declaration.sourceInfo\n );\n }\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n } else if (\n (!declaration.type.isCompatible(resultType) &&\n !Config.enable_type_casting) ||\n (!declaration.type.isCompatible(resultType) &&\n Config.enable_type_casting &&\n !Store.canImplicitTypeCast(declaration.type, resultType))\n ) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n result_info.type,\n result_info.dim,\n exp.toString(),\n declaration.sourceInfo\n );\n } else {\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n type: declaration.type,\n isConst: declaration.isConst,\n });\n }\n }\n }\n\n assertArrayDeclaration (declaration) {\n if (declaration.initial === null) {\n const lineType = this.evaluateExpressionType(declaration.lines);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n declaration.sourceInfo\n );\n }\n if (declaration.columns !== null) {\n const columnType = this.evaluateExpressionType(declaration.columns);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n declaration.sourceInfo\n );\n }\n }\n } else {\n this.evaluateArrayLiteral(declaration);\n }\n this.insertSymbol(declaration.id, {\n id: declaration.id,\n lines: declaration.lines,\n columns: declaration.columns,\n type: declaration.type,\n });\n return;\n }\n\n evaluateExpressionType (expression) {\n // TODO: Throw operator error in case type == UNDEFINED\n if (expression instanceof UnaryApp) {\n const op = expression.op;\n const resultType = this.evaluateExpressionType(expression.left);\n const finalResult = resultTypeAfterUnaryOp(op, resultType);\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfo = resultType.stringInfo();\n const info = stringInfo[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_unary_op_full(\n expString,\n op,\n info.type,\n info.dim,\n expression.sourceInfo\n );\n }\n return finalResult;\n } else if (expression instanceof InfixApp) {\n const op = expression.op;\n const resultTypeLeft = this.evaluateExpressionType(expression.left);\n const resultTypeRight = this.evaluateExpressionType(expression.right);\n const finalResult = resultTypeAfterInfixOp(\n op,\n resultTypeLeft,\n resultTypeRight\n );\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfoLeft = resultTypeLeft.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = resultTypeRight.stringInfo();\n const infoRight = stringInfoRight[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_infix_op_full(\n expString,\n op,\n infoLeft.type,\n infoLeft.dim,\n infoRight.type,\n infoRight.dim,\n expression.sourceInfo\n );\n }\n return finalResult;\n } else if (expression instanceof Literal) {\n return this.evaluateLiteralType(expression);\n } else if (expression instanceof FunctionCall) {\n if (expression.isMainCall) {\n throw ProcessorErrorFactory.void_in_expression_full(\n LanguageDefinedFunction.getMainFunctionName(),\n expression.sourceInfo\n );\n }\n const fun = this.findFunction(expression.id);\n if (fun === null) {\n throw ProcessorErrorFactory.function_missing_full(\n expression.id,\n expression.sourceInfo\n );\n }\n if (fun.returnType.isCompatible(Types.VOID)) {\n throw ProcessorErrorFactory.void_in_expression_full(\n expression.id,\n expression.sourceInfo\n );\n }\n this.assertParameters(fun, expression.actualParameters);\n return fun.returnType;\n } else if (expression instanceof ArrayAccess) {\n const arrayTypeInfo = this.findSymbol(expression.id, this.symbolMap);\n if (arrayTypeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n expression.id,\n expression.sourceInfo\n );\n }\n if (!(arrayTypeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n expression.id,\n expression.sourceInfo\n );\n }\n const lineType = this.evaluateExpressionType(expression.line);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n expression.sourceInfo\n );\n }\n if (expression.column !== null) {\n if (arrayTypeInfo.columns === null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(\n expression.id,\n expression.sourceInfo\n );\n }\n const columnType = this.evaluateExpressionType(expression.column);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n expression.sourceInfo\n );\n }\n }\n const arrType = arrayTypeInfo.type;\n if (expression.column !== null) {\n // indexing matrix\n return arrType.innerType;\n } else {\n if (arrayTypeInfo.columns === null) {\n return arrType.innerType;\n }\n return new ArrayType(arrType.innerType, 1);\n }\n }\n }\n\n evaluateLiteralType (literal) {\n if (literal instanceof IntLiteral) {\n return literal.type;\n } else if (literal instanceof RealLiteral) {\n return literal.type;\n } else if (literal instanceof StringLiteral) {\n return literal.type;\n } else if (literal instanceof BoolLiteral) {\n return literal.type;\n } else if (literal instanceof CharLiteral) {\n return literal.type;\n } else if (literal instanceof VariableLiteral) {\n const typeInfo = this.findSymbol(literal.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n literal.id,\n literal.sourceInfo\n );\n }\n if (typeInfo.type instanceof ArrayType) {\n return typeInfo.type;\n }\n return typeInfo.type;\n } else {\n // console.warn(\"Evaluating type only for an array literal...\");\n let last = null;\n if (literal.value.length === 1) {\n last = this.evaluateExpressionType(literal.value[0]);\n } else {\n for (let i = 0; i < literal.value.length; i++) {\n const e = this.evaluateExpressionType(literal.value[i]);\n if (last === null) {\n last = e;\n } else if (!last.isCompatible(e)) {\n const strInfo = last.stringInfo();\n const info = strInfo[0];\n const strExp = literal.toString();\n throw ProcessorErrorFactory.incompatible_types_array_full(\n strExp,\n info.type,\n info.dim,\n literal.sourceInfo\n );\n }\n }\n }\n if (last instanceof ArrayType) {\n return new ArrayType(last.innerType, last.dimensions + 1);\n }\n return new ArrayType(last, 1);\n }\n }\n\n evaluateArrayLiteral (arrayDeclaration) {\n const type = arrayDeclaration.type;\n const literal = arrayDeclaration.initial;\n // console.log(arrayDeclaration);\n if (arrayDeclaration.isVector) {\n this.evaluateVectorLiteralType(literal, type);\n } else {\n // TODO matrix type check\n for (let i = 0; i < literal.lines; ++i) {\n const line_literal = literal.value[i];\n this.evaluateVectorLiteralType(\n line_literal,\n new ArrayType(type.innerType, 1)\n );\n }\n }\n return true;\n }\n\n assertFunction (fun) {\n this.pushMap();\n this.currentFunction = fun;\n fun.formalParameters.forEach((formalParam) => {\n if (formalParam.type instanceof ArrayType) {\n if (formalParam.type.dimensions > 1) {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n lines: -1,\n columns: -1,\n type: formalParam.type,\n });\n } else {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n lines: -1,\n columns: null,\n type: formalParam.type,\n });\n }\n } else {\n this.insertSymbol(formalParam.id, {\n id: formalParam.id,\n type: formalParam.type,\n });\n }\n });\n this.assertDeclarations(fun.variablesDeclarations);\n const optional = fun.returnType.isCompatible(Types.VOID);\n const valid = this.assertReturn(fun, optional);\n if (!valid) {\n throw ProcessorErrorFactory.function_no_return(fun.name);\n }\n this.popMap();\n }\n\n assertReturn (fun, optional) {\n return fun.commands.reduce(\n (last, next) => this.checkCommand(fun.returnType, next, optional) || last,\n optional\n );\n }\n\n checkCommand (type, cmd, optional) {\n if (cmd instanceof While) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(\n cmd.expression.toString(),\n cmd.sourceInfo\n );\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof For) {\n const var_type = this.evaluateExpressionType(cmd.for_id);\n if (!var_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_variable(\n cmd.for_id,\n cmd.sourceInfo\n );\n }\n const from_type = this.evaluateExpressionType(cmd.for_from);\n if (!from_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_from(\n cmd.for_from,\n cmd.sourceInfo\n );\n }\n const to_type = this.evaluateExpressionType(cmd.for_to);\n if (!to_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_to(cmd.for_to, cmd.sourceInfo);\n }\n if (cmd.for_pass != null) {\n const pass_type = this.evaluateExpressionType(cmd.for_pass);\n if (!pass_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_pass(\n cmd.for_pass,\n cmd.sourceInfo\n );\n }\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof Switch) {\n const sType = this.evaluateExpressionType(cmd.expression);\n let result = optional;\n let hasDefault = false;\n for (let i = 0; i < cmd.cases.length; i++) {\n const aCase = cmd.cases[i];\n if (aCase.expression !== null) {\n const caseType = this.evaluateExpressionType(aCase.expression);\n if (!sType.isCompatible(caseType)) {\n const strInfo = sType.stringInfo();\n const info = strInfo[0];\n const strExp = aCase.expression.toString();\n throw ProcessorErrorFactory.invalid_case_type_full(\n strExp,\n info.type,\n info.dim,\n aCase.sourceInfo\n );\n }\n } else {\n hasDefault = true;\n }\n result = result && this.checkCommands(type, aCase.commands, result);\n }\n return result && hasDefault;\n } else if (cmd instanceof ArrayIndexAssign) {\n // TODO - rework!!!!!\n let used_dims = 0;\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (!(typeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const exp = cmd.expression;\n const lineExp = cmd.line;\n const lineType = this.evaluateExpressionType(lineExp);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n used_dims += 1;\n const columnExp = cmd.column;\n if (typeInfo.columns === null && columnExp !== null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(\n cmd.id,\n cmd.sourceInfo\n );\n } else if (columnExp !== null) {\n const columnType = this.evaluateExpressionType(columnExp);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(\n cmd.sourceInfo\n );\n }\n used_dims += 1;\n }\n // exp a single value exp or an array access\n const exp_type = this.evaluateExpressionType(exp);\n const access_type = typeInfo.type;\n\n let compatible = false;\n if (exp_type instanceof MultiType) {\n let type = access_type;\n if (access_type.dimensions - used_dims == 0) {\n type = access_type.innerType;\n } else {\n type = new ArrayType(\n access_type.innerType,\n Math.max(0, access_type.dimensions - used_dims)\n );\n }\n compatible = exp_type.isCompatible(type);\n } else {\n compatible = access_type.canAccept(exp_type, used_dims);\n }\n if (!compatible) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(access_type, exp_type)\n ) {\n const access_type_string_info = access_type.stringInfo();\n const access_type_info = access_type_string_info[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n access_type_info.type,\n access_type_info.dim - used_dims,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n return optional;\n } else if (cmd instanceof Assign) {\n // TODO - rework since there is no literal array assignment\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if (typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n if (typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n const exp = cmd.expression;\n const exp_type = this.evaluateExpressionType(exp);\n if (exp_type instanceof ArrayType) {\n if (!(typeInfo.type instanceof ArrayType)) {\n // TODO better error message\n throw new Error(\"Cannot assign an array to a non-array variable \");\n }\n // Both are arrays...\n // if both don't have same dimensions and type, cannot perform assignment\n if (!exp_type.isCompatible(typeInfo.type)) {\n if (\n exp_type.dimensions === typeInfo.type.dimensions &&\n !exp_type.innerType.isCompatible(typeInfo.type.innerType)\n ) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(\n typeInfo.type.innerType,\n exp_type.innerType\n )\n ) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n } else {\n switch (exp_type.dimensions) {\n case 1: {\n throw ProcessorErrorFactory.vector_to_matrix_attr(\n cmd.id,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n case 2: {\n throw ProcessorErrorFactory.matrix_to_vector_attr(\n cmd.id,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n }\n }\n } else if (!exp_type.isCompatible(typeInfo.type)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(typeInfo.type, exp_type)\n ) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n info.dim,\n exp_type_info.type,\n exp_type_info.dim,\n exp.toString(),\n cmd.sourceInfo\n );\n }\n }\n return optional;\n } else if (cmd instanceof Break) {\n return optional;\n } else if (cmd instanceof IfThenElse) {\n const resultType = this.evaluateExpressionType(cmd.condition);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.if_condition_type_full(\n cmd.condition.toString(),\n cmd.sourceInfo\n );\n }\n if (cmd.ifFalse instanceof IfThenElse) {\n return (\n this.checkCommands(type, cmd.ifTrue.commands, optional) &&\n this.checkCommand(type, cmd.ifFalse, optional)\n );\n } else if (cmd.ifFalse != null) {\n return (\n this.checkCommands(type, cmd.ifTrue.commands, optional) &&\n this.checkCommands(type, cmd.ifFalse.commands, optional)\n );\n } else {\n return this.checkCommands(type, cmd.ifTrue.commands, optional);\n }\n } else if (cmd instanceof FunctionCall) {\n let fun = null;\n if (cmd.isMainCall) {\n fun = this.getMainFunction();\n } else {\n fun = this.findFunction(cmd.id);\n }\n if (fun === null) {\n throw ProcessorErrorFactory.function_missing_full(\n cmd.id,\n cmd.sourceInfo\n );\n }\n this.assertParameters(fun, cmd.actualParameters);\n return optional;\n } else if (cmd instanceof Return) {\n const funcName = this.currentFunction.isMain\n ? LanguageDefinedFunction.getMainFunctionName()\n : this.currentFunction.name;\n if (cmd.expression === null && !type.isCompatible(Types.VOID)) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_void_return_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n } else if (cmd.expression !== null) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!type.isCompatible(resultType)) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type, resultType)\n ) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_return_type_full(\n funcName,\n info.type,\n info.dim,\n cmd.sourceInfo\n );\n }\n }\n return true;\n } else {\n return true;\n }\n }\n }\n\n checkCommands (type, cmds, optional) {\n return cmds.reduce(\n (last, next) => this.checkCommand(type, next, optional) || last,\n optional\n );\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {Expression[]} actualParametersList\n */\n assertParameters (fun, actualParametersList) {\n const parameterList = fun.formalParameters;\n if (\n parameterList.length > actualParametersList.length ||\n (parameterList.length !== actualParametersList.length &&\n !fun.hasVariadic())\n ) {\n throw ProcessorErrorFactory.invalid_parameters_size_full(\n fun.name,\n actualParametersList.length,\n fun.formalParameters.length,\n null\n );\n }\n\n for (\n let i = 0, j = 0;\n i < parameterList.length && j < actualParametersList.length;\n i += 1, j += 1\n ) {\n const formalParam = parameterList[i];\n if (formalParam.variadic && i + 1 !== parameterList.length) {\n throw \"A function variadic parameter must be its last parameter!\";\n }\n if (formalParam.variadic) {\n j = this.assertVariadicParameter(\n fun,\n formalParam,\n j,\n actualParametersList\n );\n } else {\n const param = actualParametersList[j];\n this.assertParameter(fun, formalParam, param);\n }\n }\n }\n\n evaluateVectorLiteralType (literal, type) {\n // console.log(literal);\n for (let i = 0; i < literal.value.length; i += 1) {\n const exp = literal.value[i];\n const expType = this.evaluateExpressionType(exp);\n let compatible = false;\n if (expType instanceof MultiType) {\n compatible = expType.isCompatible(type.innerType);\n } else {\n compatible = type.canAccept(expType, 1);\n }\n if (!compatible) {\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(type.innerType, expType)\n ) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = expType.stringInfo();\n const result_info = result_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(\n info.type,\n 0,\n result_info.type,\n result_info.dim,\n exp.toString(),\n literal.sourceInfo\n );\n }\n }\n }\n return type;\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {import('./../../ast/commands/formalParameter').FormalParameter} formalParam\n * @param {number} index\n * @param {Expression[]} actualParametersList\n */\n assertVariadicParameter (fun, formalParam, index, actualParametersList) {\n let i;\n for (i = index; i < actualParametersList.length; i += 1) {\n this.assertParameter(fun, formalParam, actualParametersList[i]);\n }\n return i - 1;\n }\n\n /**\n *\n * @param {import('./../../ast/commands/function').Function} fun\n * @param {import('./../../ast/commands/formalParameter').FormalParameter} formalParam\n * @param {Expression} actualParameter\n */\n assertParameter (fun, formalParam, actualParameter) {\n // const id = formalParam.id;\n if (formalParam.byRef) {\n if (actualParameter instanceof VariableLiteral) {\n const variable = this.findSymbol(actualParameter.id, this.symbolMap);\n if (variable.isConst) {\n throw ProcessorErrorFactory.invalid_const_ref_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n } else if (\n !(\n actualParameter instanceof VariableLiteral ||\n actualParameter instanceof ArrayAccess\n )\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n const resultType = this.evaluateExpressionType(actualParameter);\n if (\n resultType instanceof MultiType &&\n formalParam.type instanceof MultiType\n ) {\n let shared = 0;\n for (let j = 0; j < resultType.types.length; ++j) {\n const element = resultType.types[j];\n if (formalParam.type.types.indexOf(element) !== -1) {\n shared += 1;\n }\n }\n if (shared <= 0) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (\n (!resultType.isCompatible(Types.INTEGER) &&\n !resultType.isCompatible(Types.REAL)) ||\n formalParam.type.isCompatible(Types.INTEGER) ||\n formalParam.type.isCompatible(Types.REAL)\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n } else if (resultType instanceof MultiType) {\n if (!resultType.isCompatible(formalParam.type)) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (\n (!resultType.isCompatible(Types.INTEGER) &&\n !resultType.isCompatible(Types.REAL)) ||\n formalParam.type.isCompatible(Types.INTEGER) ||\n formalParam.type.isCompatible(Types.REAL)\n ) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n } else if (!formalParam.type.isCompatible(resultType)) {\n if (Config.enable_type_casting && !formalParam.byRef) {\n if (!Store.canImplicitTypeCast(formalParam.type, resultType)) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(\n fun.name,\n actualParameter.toString(),\n actualParameter.sourceInfo\n );\n }\n }\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Store = void 0;\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nconst modes_1 = require(\"../modes\");\nconst types_1 = require(\"../../typeSystem/types\");\nconst storeObject_1 = require(\"./storeObject\");\nconst storeObjectRef_1 = require(\"./storeObjectRef\");\nconst array_type_1 = require(\"../../typeSystem/array_type\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nconst store_value_1 = require(\"./value/store_value\");\nconst store_value_address_1 = require(\"./value/store_value_address\");\nconst store_value_ref_1 = require(\"./value/store_value_ref\");\nconst array_store_value_ref_1 = require(\"./value/array_store_value_ref\");\nconst store_object_array_ref_1 = require(\"./store_object_array_ref\");\nclass Store {\n constructor(name) {\n this.name = name;\n this.store = new Map();\n this.mode = modes_1.Modes.RUN;\n }\n static canImplicitTypeCast(castType, sourceType) {\n if (castType.isCompatible(types_1.Types.INTEGER) || castType.isCompatible(types_1.Types.REAL)) {\n if (sourceType.isCompatible(types_1.Types.INTEGER) || sourceType.isCompatible(types_1.Types.REAL)) {\n return true;\n }\n }\n return false;\n }\n static doImplicitCasting(castType, stoObj) {\n if (!Store.canImplicitTypeCast(castType, stoObj.type)) {\n throw new Error(\"!!!Critical error: attempted to type cast invalid types\");\n }\n if (castType.isCompatible(types_1.Types.INTEGER)) {\n return new store_value_1.StoreValue(types_1.Types.INTEGER, stoObj.get().trunc());\n }\n else {\n return new store_value_1.StoreValue(types_1.Types.REAL, stoObj.get());\n }\n }\n extendStore(nextStore) {\n this.nextStore = nextStore;\n }\n applyStore(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.applyStore(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n const val = this.store.get(id);\n let result = null;\n if (val.type instanceof array_type_1.ArrayType) {\n const array = val;\n const array_type = array.type;\n let l = 0, c = 0;\n const values = array.value.map(v => {\n if (array.isVector) {\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l++, undefined, array.id, array.readOnly);\n }\n else {\n if (c >= array.columns) {\n c = 0;\n l += 1;\n }\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l, c++, array.id, array.readOnly);\n }\n });\n result = new array_store_value_1.ArrayStoreValue(array_type, values, array.lines, array.columns, val.id, val.readOnly);\n }\n else {\n result = new store_value_1.StoreValue(val.type, val.value, val.id, val.readOnly);\n }\n return result;\n }\n updateStore(id, stoValue) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStore(id, stoValue);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n const array_value = stoValue;\n if (oldObj.isCompatible(array_value)) {\n if (oldObj.isVector) {\n array_value.get().forEach((val, index) => {\n oldObj.setAt(val, index, undefined);\n });\n }\n else {\n let line = 0;\n let column = 0;\n array_value.get().forEach((val) => {\n oldObj.setAt(val, line, column);\n column += 1;\n if (column >= oldObj.columns) {\n line += 1;\n column = 0;\n }\n });\n }\n return this;\n }\n }\n else if (oldObj.isCompatible(stoValue)) {\n const loc_address = oldObj.locAddress;\n location_1.Location.updateAddress(loc_address, stoValue.get());\n return this;\n }\n const oldType = oldObj.type;\n const stoType = stoValue.type;\n // TODO: better error message\n throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n }\n }\n /**\n * Method used to update regions of an array (vector or matrix). The should only be used when update an specific\n * possition since it will only update the required addresses.\n * @param {string} id the variable id to be updated\n * @param {IStoreValue} sto_value the value to be used in the update process\n * @param {number} line the line address of the vector/matrix\n * @param {number} column the matrix column, which can be undefined\n */\n updateStoreArray(id, sto_value, line, column) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStoreArray(id, sto_value, line, column);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n if (sto_value instanceof array_store_value_1.ArrayStoreValue) {\n // this must be a vector or matrix line update\n const actual_values = sto_value.get();\n if (oldObj.isVector && sto_value.isVector()) {\n for (let i = 0; i < sto_value.lines; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, i, undefined);\n }\n }\n else if (!oldObj.isVector && column == null && sto_value.isVector()) {\n for (let i = 0; i < oldObj.columns; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, line, i);\n }\n }\n else {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n }\n else {\n if (!oldObj.isVector && column == null) {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n oldObj.setAt(sto_value, line, column);\n }\n }\n else {\n throw new Error(\"Cannot update a non-array variable using updateStoreArray\");\n }\n // const oldType = oldObj.type;\n // const stoType = sto_value.type;\n // // TODO: better error message\n // throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n return this;\n }\n }\n /**\n * Inserts a new variable into the Store. This method should be used when declaring a new variable,\n * including the special return variable $.\n * @param id variable id\n * @param stoValue the value to be used as the initial value of id\n */\n insertStore(id, stoValue) {\n if (this.store.has(id)) {\n // TODO: better error message\n throw new Error(`${id} is already defined`);\n }\n // TODO check for array....\n let newObj;\n if (stoValue instanceof store_value_ref_1.StoreValueRef) {\n newObj = new storeObjectRef_1.StoreObjectRef(stoValue);\n }\n else if (stoValue instanceof array_store_value_ref_1.ArrayStoreValueRef) {\n newObj = new store_object_array_ref_1.StoreObjectArrayRef(stoValue, stoValue.lines, stoValue.columns);\n }\n else if (stoValue instanceof array_store_value_1.ArrayStoreValue) {\n const columns = stoValue.isVector() ? 0 : stoValue.columns;\n const addresses = [];\n const all_values = stoValue.get();\n if (all_values.length > 0) {\n for (let i = 0; i < stoValue.get().length; i += 1) {\n const val = all_values[i].get();\n addresses.push(location_1.Location.allocate(val));\n }\n }\n else {\n let total = stoValue.lines;\n total = stoValue.isVector() ? total : total * columns;\n for (let i = 0; i < total; i += 1) {\n addresses.push(location_1.Location.allocate(null));\n }\n }\n newObj = new storeObjectArray_1.StoreObjectArray(stoValue.type, stoValue.lines, columns, addresses, stoValue.isConst);\n }\n else {\n const loc_address = location_1.Location.allocate(stoValue.get());\n newObj = new storeObject_1.StoreObject(stoValue.type, loc_address, stoValue.isConst);\n }\n newObj.setID(id);\n this.store.set(id, newObj);\n return this;\n }\n /**\n * Helper function similar to applyStore. But it returns the actual object in the store be it ref or not\n * applyStore will return the refferenced object if the object in the store is a ref\n */\n getStoreObject(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.getStoreObject(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n return this.store.get(id);\n }\n destroy() {\n this.store.forEach(sto => sto.destroy(), this);\n }\n isDefined(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.isDefined(id);\n }\n else {\n return false;\n }\n }\n return true;\n }\n}\nexports.Store = Store;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObject = void 0;\nconst location_1 = require(\"../../memory/location\");\nclass StoreObject {\n /**\n *\n * @param {Type} type\n * @param {Number} loc_address\n * @param {Boolean} readOnly\n */\n constructor(type, loc_address, readOnly = false) {\n this._loc_address = loc_address;\n this._type = type;\n this._readOnly = readOnly;\n this._id = undefined;\n }\n setID(id) {\n this._id = id;\n }\n get id() {\n return this._id;\n }\n get inStore() {\n return this.id !== null;\n }\n get type() {\n return this._type;\n }\n /**\n * Returns the actual value stored at the loccation address present in this object.\n * The returned value is compatible with @prop{StoreObject.type}\n */\n get value() {\n const address = location_1.Location.find(this._loc_address);\n if (address != null) {\n return address.value;\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n get number() {\n throw new Error(\"DOT NOT USE THIS PROPERTY!\");\n }\n get readOnly() {\n return this._readOnly;\n }\n set readOnly(value) {\n this._readOnly = value;\n }\n isCompatible(another) {\n return this.type.isCompatible(another.type);\n }\n destroy() {\n return location_1.Location.deallocate(this._loc_address);\n }\n get locAddress() {\n return this._loc_address;\n }\n}\nexports.StoreObject = StoreObject;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectArray = void 0;\nconst storeObject_1 = require(\"./storeObject\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nclass StoreObjectArray extends storeObject_1.StoreObject {\n constructor(type, _lines, _columns, loc_addresses, readOnly = false) {\n super(type, -1, readOnly);\n this._lines = _lines;\n this._columns = _columns;\n this.loc_addresses = loc_addresses;\n }\n get lines() {\n return this._lines;\n }\n get columns() {\n return this._columns;\n }\n isCompatible(another) {\n if (another instanceof array_store_value_1.ArrayStoreValue) {\n const cols = another.columns == null ? 0 : another.columns;\n if (this.lines === another.lines && this.columns === cols) {\n return super.isCompatible(another);\n }\n }\n return false;\n }\n get isVector() {\n return this.type.dimensions === 1;\n }\n /**@override\n * Returns the list of values stored by this array.\n * All returned values are compatible with @prop{StoreObject.type}\n */\n get value() {\n const values = [];\n for (let i = 0; i < this.addresses.length; i += 1) {\n const address = location_1.Location.find(this.addresses[i]);\n if (address != null) {\n values.push(address.value);\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n return values;\n }\n destroy() {\n let bool = true;\n for (let i = 0; i < this.addresses.length; i += 1) {\n bool = bool && location_1.Location.deallocate(this.addresses[i]);\n }\n return bool;\n }\n /**\n * @override\n *\n * Returns the address that contains a list of all addresses of the values present in the array\n */\n get locAddress() {\n throw new Error(\"!!!Internal Error: Cannot invoke locAddress on StoreObjectArray\");\n }\n get addresses() {\n return this.loc_addresses;\n }\n getAt(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n const address = location_1.Location.find(this.addresses[index]);\n values.push(address.value);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n const address = location_1.Location.find(this.addresses[index]);\n return address.value;\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n throw new Error(\"!!!Internal Error: Attempting to insert a line into matrix \" + this.id);\n }\n const pos = this.getIndexOf(line, column);\n location_1.Location.updateAddress(this.addresses[pos], value.get());\n }\n getIndexOf(line, column) {\n return line * this.columns + column;\n }\n getLocAddressOf(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n values.push(this.addresses[index]);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n return this.addresses[index];\n }\n}\nexports.StoreObjectArray = StoreObjectArray;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectRef = void 0;\nconst storeObject_1 = require(\"./storeObject\");\nclass StoreObjectRef extends storeObject_1.StoreObject {\n /**\n *\n * @param {StoreObject} stoValue\n */\n constructor(stoValue) {\n super(stoValue.type, stoValue.getRefAddress(), false);\n this.refObj = stoValue.id;\n this.reference_dimension = stoValue.getReferenceDimension();\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n getReferenceDimension() {\n return this.reference_dimension;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectRef = StoreObjectRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreObjectArrayRef = void 0;\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nclass StoreObjectArrayRef extends storeObjectArray_1.StoreObjectArray {\n constructor(stoValue, lines, columns) {\n super(stoValue.type, lines, columns, stoValue.getAddresses(), false);\n this.refObj = stoValue.id;\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectArrayRef = StoreObjectArrayRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayStoreValue = void 0;\nconst array_type_1 = require(\"../../../typeSystem/array_type\");\nconst store_value_address_1 = require(\"./store_value_address\");\nclass ArrayStoreValue {\n constructor(type, values, lines, columns, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.values = values;\n this.lines = lines;\n this.columns = columns;\n }\n get() {\n return this.values;\n }\n /**\n * @deprecated\n * Potential not necessary since array access is occuring directly in the StoreObject\n * @param line\n * @param column\n */\n getAt(line, column) {\n console.log(\"Column \", column);\n if (this.isVector()) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = line * this.lines + col;\n values.push(this.values[index]);\n }\n const array_type = this.type;\n const vector_type = new array_type_1.ArrayType(array_type.innerType, array_type.dimensions - 1);\n return new ArrayStoreValue(vector_type, values, this.columns, 0, this.id, this.isConst);\n }\n const index = line * this.lines + column;\n console.log(\"Get at: \", index);\n return this.values[index];\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n let actual_line = line;\n let actual_column = column;\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector()) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n actual_column = actual_line;\n actual_line = 0;\n }\n else if (column == null) {\n if (!(value instanceof ArrayStoreValue)) {\n throw new Error(\"Attempting to insert a single value as a line of matrix \" + this.id);\n }\n const actual_values = value.get();\n for (let i = 0; i < this.columns; i += 1) {\n const pos = actual_line * this.columns + i;\n const val = actual_values[i];\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, val.get(), actual_line, i, this.id, this.isConst);\n }\n }\n const columns = this.columns == null ? 0 : this.columns;\n const pos = actual_line * columns + actual_column;\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, value.get(), line, column, this.id, this.isConst);\n }\n inStore() {\n return this.id != null;\n }\n isVector() {\n return this.type.dimensions == 1;\n }\n}\nexports.ArrayStoreValue = ArrayStoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayStoreValueRef = void 0;\nclass ArrayStoreValueRef {\n constructor(type, values, addresses, lines, columns, id) {\n this.type = type;\n this.values = values;\n this.addresses = addresses;\n this.lines = lines;\n this.columns = columns;\n this.id = id;\n this.isConst = false;\n }\n get() {\n return this.values;\n }\n getAddresses() {\n return this.addresses;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.ArrayStoreValueRef = ArrayStoreValueRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValue = void 0;\nclass StoreValue {\n constructor(type, value, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.value = value;\n }\n get() {\n return this.value;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.StoreValue = StoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValueAddress = void 0;\nconst store_value_1 = require(\"./store_value\");\nclass StoreValueAddress extends store_value_1.StoreValue {\n constructor(type, value, line, column, id, isConst = false) {\n super(type, value, id, isConst);\n this.line = line;\n this.column = column;\n }\n}\nexports.StoreValueAddress = StoreValueAddress;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StoreValueRef = void 0;\nclass StoreValueRef {\n constructor(type, value, loc_address, id) {\n this.type = type;\n this.value = value;\n this.loc_address = loc_address;\n this.id = id;\n this.isConst = false;\n this.reference_dimesion = 0;\n }\n get() {\n return this.value;\n }\n getRefAddress() {\n return this.loc_address;\n }\n inStore() {\n return this.id != null;\n }\n getReferenceDimension() {\n return this.reference_dimesion;\n }\n setReferenceDimension(dimension) {\n this.reference_dimesion = dimension;\n }\n}\nexports.StoreValueRef = StoreValueRef;\n","import { IVProgParser } from './ast/ivprogParser';\nimport { IVProgProcessor } from './processor/ivprogProcessor';\nimport {DOMConsole} from './io/domConsole';\nimport { LanguageService } from './services/languageService';\nimport { SemanticAnalyser } from './processor/semantic/semanticAnalyser';\nimport { Location } from \"./memory/location\";\n\nexport function runner () {\nconst ivprogLexer = LanguageService.getCurrentLexer();\n\n\n// const lexer = new ivprogLexer(new InputStream(input));\n// const stream = new CommonTokenStream(lexer);\n// stream.fill();\n// let i = 1;\n// let token = null;\n// while ((token = stream.LT(i)).type !== ivprogLexer.EOF && token.type !== ivprogLexer.WHITESPACE) {\n// console.log(`${token.type}-${token.text}`);\n// console.log('\\n')\n// i++;\n// }\n// const anaSin = new IVProgParser(input, ivprogLexer);\nconst editor = new window.JsonEditor('#json-renderer', {});\nconst domConsole = new DOMConsole(\"#console\", true);\ndomConsole.hide();\n// proc.interpretAST().then( sto => {\n// console.log(sto.applyStore('a'));\n// }).catch(e => console.log(e));\ntry {\n window.$('#btn').click( () => {\n const input = window.$('#input').val();\n const analiser = new IVProgParser(input, ivprogLexer);\n try {\n const data = analiser.parseTree();\n const semAna = new SemanticAnalyser(data);\n const proc = new IVProgProcessor(semAna.analyseTree());\n proc.registerInput(domConsole);\n domConsole.clear();\n proc.registerOutput(domConsole);\n proc.interpretAST().then(sto => {\n console.log(sto);\n editor.load(sto.store);\n console.log(Location.size());\n }).catch( e => {\n alert(e);\n console.log(e);\n console.log(Location.size());\n });\n } catch (error) {\n alert(error);\n console.log(error);\n console.log(Location.size());\n }\n \n });\n} catch(a) {\n console.log(a);\n}\n}\n","import line_i18n from \"line-i18n\";\nimport { LocalizedStrings } from \"./localizedStringsService\";\n\nconst StringTypes = line_i18n.StringTypes;\n\nexport const i18nHelper = Object.freeze({\n i18n: (identifier) => {\n var opts = identifier.split(':');\n var type = opts[0].toLowerCase();\n var id = opts[1];\n if (StringTypes.ERROR === type) {\n return LocalizedStrings.getError(id);\n } else if (StringTypes.MESSAGE === type) {\n return LocalizedStrings.getMessage(id); \n } else if (StringTypes.UI === type) {\n return LocalizedStrings.getUI(id);\n } else {\n console.warn(\"A string has been passed to the i18n helper function that was not in the form type:id -> \" + identifier);\n return LocalizedStrings.getString(identifier, type);\n }\n }\n});","/* global iLMparameters*/\nimport Lexers from \"./../../grammar/\";\nimport line_i18n from \"line-i18n\";\nimport { Config } from \"./../util/config\";\n\nclass LanguageServiceExtended extends line_i18n.LanguageServiceNoLS {\n constructor () {\n super(\n typeof iLMparameters === \"undefined\"\n ? Config.default_lang\n : iLMparameters.lang\n );\n }\n\n getDefaultLang () {\n return \"en\";\n }\n\n getCurrentLexer () {\n const langInfo = Lexers[this.getLang()];\n if (langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].lexer;\n } else {\n return langInfo.lexer;\n }\n }\n\n getCurrentLangFuncs () {\n const langInfo = Lexers[this.getLang()];\n if (langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].langFuncs;\n } else {\n return langInfo.langFuncs;\n }\n }\n\n getCurrentLangLibs () {\n const langInfo = Lexers[this.getLang()];\n if (langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].langLibs;\n }\n return langInfo.langLibs;\n }\n}\n\nexport const LanguageService = new LanguageServiceExtended();\n","import line_i18n from \"line-i18n\";\nimport { LanguageService } from \"./languageService\";\nimport { LanguageDefinedFunction } from \"./../processor/definedFunctions\";\nimport Langs from \"./../../i18n\";\nimport { Operators } from \"./../ast/operators\";\n\nclass IVProgLocalizedStrings extends line_i18n.LocalizedStrings {\n constructor (langService, langsJsons, shouldListenToChange = false) {\n super(langService, langsJsons, shouldListenToChange);\n }\n\n translateType (type, dim) {\n const type_string = this.getUI(`type_${type}`);\n switch (dim) {\n case 0:\n return type_string;\n default:\n if (dim > 1) return this.getUI(\"matrix_info_string\", [type_string]);\n else return this.getUI(\"vector_info_string\", [type_string]);\n }\n }\n\n translateOp (op) {\n switch (op.ord) {\n case Operators.AND.ord:\n case Operators.OR.ord:\n case Operators.NOT.ord:\n return this.getUI(`logic_operator_${op.value}`);\n default:\n return op.value;\n }\n }\n\n translateInternalFunction (name, category = null) {\n if (category == null) {\n return LanguageDefinedFunction.getLocalName(name);\n } else {\n return LanguageDefinedFunction.getLocalName(`${category}.${name}`);\n }\n }\n}\n\nexport const LocalizedStrings = Object.freeze(\n new IVProgLocalizedStrings(LanguageService, Langs, true)\n);\n\nlet _instance = null;\n\nexport function getInstance () {\n if (_instance == null) {\n _instance = new IVProgLocalizedStrings(LanguageService, Langs);\n }\n return _instance;\n}\n","let clicks = [];\nlet inRebuildMode = false;\n\nexport const ActionTypes = Object.freeze({\n // registerUserEvent payload:\n // (function_name, insert action)\n INSERT_FUNCTION:\"INSERT_FUNCTION\",\n // (function_name, remove action)\n REMOVE_FUNCTION:\"REMOVE_FUNCTION\",\n // (var_name,insert action, type, dim)\n INSERT_GLOBAL_VAR:\"INSERT_GLOBAL_VAR\",\n // (var name, remove action)\n REMOVE_GLOBAL_VAR:\"REMOVE_GLOBAL_VAR\",\n // (old function name, rename action, new function name)\n RENAME_FUNCTION:\"RENAME_FUNCTION\",\n // (old var name, rename action. new var name)\n RENAME_GLOBAL_VAR:\"RENAME_GLOBAL_VAR\",\n // (var name, set const action)\n SET_GLOBAL_CONST:\"SET_GLOBAL_CONST\",\n // (function name, change return action, type, dim)\n CHANGE_FUNCTION_RETURN:\"CHANGE_FUNCTION_RETURN\",\n // (var name, change type action, type, dim, rows?, columns?)\n CHANGE_GLOBAL_TYPE:\"CHANGE_GLOBAL_TYPE\",\n // (var name, change value action, value)\n CHANGE_GLOBAL_VALUE:\"CHANGE_GLOBAL_VALUE\",\n // (function name, insert param action, param varname, type, dim)\n INSERT_FUNCTION_PARAM:\"INSERT_FUNCTION_PARAM\",\n // (function name, remove param action, param varname)\n REMOVE_FUNCTION_PARAM:\"REMOVE_FUNCTION_PARAM\",\n // (function name, change param type action, type, dim)\n CHANGE_PARAM_TYPE:\"CHANGE_PARAM_TYPE\",\n // (function name, rename param action, old param name, new param name)\n RENAME_FUNCTION_PARAM:\"RENAME_FUNCTION_PARAM\",\n // (function name, insert var action, var name, type, dim)\n INSERT_FUNCTION_VAR:\"INSERT_FUCNTION_VAR\",\n // (function name, remove var action, var name)\n REMOVE_FUNCTION_VAR:\"REMOVE_FUNCTION_VAR\",\n // (function name, rename var action, old var name, new var name)\n RENAME_FUNCTION_VAR:\"RENAME_FUNCTION_VAR\",\n // (function name, change var type action, var name, type, dim, rows?, columns?)\n CHANGE_VAR_TYPE:\"CHANGE_VAR_TYPE\",\n // (function name, change var value action, var name, value)\n CHANGE_VAR_VALUE:\"CHANGE_VAR_VALUE\",\n // (function name, insert command action, command, path)\n INSERT_COMMAND:\"INSERT_COMMAND\",\n // (function name, remove command action, path)\n REMOVE_COMMAND:\"REMOVE_COMMAND\",\n // (function name, change command exp action, path, exp)\n CHANGE_COMMAND_EXP:\"CHANGE_COMMAND_EXP\",\n // (function name, change attrib exp action, path, exp)\n CHANGE_ATTRIB_EXP:\"CHANGE_ATTRIB_EXP\",\n // (function name, change attrib var action, path, var name, row_exp?, column_exp?)\n CHANGE_ATTRIB_VAR:\"CHANGE_ATTRIB_VAR\",\n // (function name, move command action, old path, new path)\n MOVE_COMMAND:\"MOVE_COMMAND\",\n // (function name, enter change name action, var name)\n ENTER_CHANGE_VAR_NAME:'ENTER_CHANGE_VAR_NAME',\n // (function name, enter change value action, var name)\n ENTER_CHANGE_VAR_VALUE:'ENTER_CHANGE_VAR_VALUE',\n // (var name, enter change name action)\n ENTER_CHANGE_GLOBAL_NAME:'ENTER_CHANGE_GLOBAL_NAME',\n // (var name, enter change value action)\n ENTER_CHANGE_GLOBAL_VALUE:'ENTER_CHANGE_GLOBAL_VALUE',\n // (function name, enter change name action, param name)\n ENTER_CHANGE_PARAM_NAME:'ENTER_CHANGE_PARAM_NAME',\n});\n\nexport function registerClick (x, y, details) {\n if (inRebuildMode) {\n return;\n }\n clicks.push([x, y, Date.now(), details]);\n}\n\nexport function registerUserEvent (command, action, ...params) {\n registerEvent('user_event', command, action, params);\n}\n\nexport function registerSystemEvent (command, action, ...params) {\n registerEvent('system_event', command, action, params);\n}\n\nfunction registerEvent (tag, command, action, params) {\n if (inRebuildMode) {\n return;\n }\n const event = {context: command, action: action, params:params};\n clicks.push([tag, Date.now(), event]);\n}\n\nexport function getLogs () {\n return clicks;\n}\n\nexport function setRebuildMode (flag) {\n inRebuildMode = flag;\n}\n\nexport function getLogsAsString () {\n return JSON.stringify(clicks);\n}\n\nexport function parseLogs (logData) {\n clicks = JSON.parse(logData);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayType = void 0;\nclass ArrayType {\n constructor(type, dimensions) {\n this.dimensions = dimensions;\n this.innerType = type;\n }\n get isVector() {\n return this.dimensions == 1;\n }\n isCompatible(another) {\n if (another instanceof ArrayType) {\n if (this.dimensions !== another.dimensions) {\n return false;\n }\n return this.innerType.isCompatible(another.innerType);\n }\n return false;\n }\n stringInfo() {\n const list = this.innerType.stringInfo();\n list.forEach(v => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const tmp = v;\n tmp.dim = this.dimensions;\n });\n return list;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n canAccept(another, used_dims) {\n const free_dims = this.dimensions - used_dims;\n if (another instanceof ArrayType) {\n return free_dims == another.dimensions && this.innerType.isCompatible(another.innerType);\n }\n else {\n return free_dims == 0 && this.innerType.isCompatible(another);\n }\n }\n}\nexports.ArrayType = ArrayType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MultiType = void 0;\nclass MultiType {\n constructor(types) {\n this.types = types;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n stringInfo() {\n let list = [];\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n list = list.concat(t.stringInfo());\n }\n return list;\n }\n isCompatible(another) {\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n if (another.isCompatible(t)) {\n return true;\n }\n }\n return false;\n }\n}\nexports.MultiType = MultiType;\n","import { LanguageService } from \"../services/languageService\";\nimport { Types } from \"./types\";\nimport Decimal from \"decimal.js\";\nimport { Config } from \"../util/config\";\n\nexport function toInt (str) {\n return new Decimal(str);\n}\n\nexport function toString (str) {\n let value = str.replace(/^\"/, \"\");\n value = value.replace(/\"$/, \"\");\n value = value.replace(/\\\\b/g, \"\\b\");\n value = value.replace(/\\\\t/g, \"\\t\");\n value = value.replace(/\\\\n/g, \"\\n\");\n value = value.replace(/\\\\r/g, \"\\r\");\n value = value.replace(/\\\\\"/g, '\"');\n value = value.replace(/\\\\'/g, \"'\");\n value = value.replace(/\\\\\\\\/g, \"\\\\\");\n return value;\n}\n\nexport function toChar (str) {\n console.debug(str, str.length);\n let value = str.replace(/^'/, \"\");\n value = value.replace(/'$/, \"\");\n value = value.replace(/\\\\b/g, \"\\b\");\n value = value.replace(/\\\\t/g, \"\\t\");\n value = value.replace(/\\\\n/g, \"\\n\");\n value = value.replace(/\\\\r/g, \"\\r\");\n value = value.replace(/\\\\\"/g, '\"');\n value = value.replace(/\\\\'/g, \"'\");\n value = value[0];\n return value;\n}\n\nexport function toReal (value) {\n return new Decimal(value);\n}\n\nexport function toBool (str) {\n const val = \"'\" + str + \"'\";\n const lexer = LanguageService.getCurrentLexer();\n const instance = new lexer(null);\n if (instance.literalNames[lexer.RK_TRUE] === val) {\n return true;\n } else if (instance.literalNames[lexer.RK_FALSE] === val) {\n return false;\n } else {\n // TODO: better error message\n throw new Error(str + \"not a valid boolean\");\n }\n}\n\nexport function convertBoolToString (bool) {\n const lexer = LanguageService.getCurrentLexer();\n const instance = new lexer(null);\n let result = null;\n if (bool) {\n result = instance.literalNames[lexer.RK_TRUE];\n } else {\n result = instance.literalNames[lexer.RK_FALSE];\n }\n return result.replace(/'/g, \"\");\n}\n\nexport function convertToString (value, type) {\n switch (type.ord) {\n case Types.INTEGER.ord:\n return value.toString();\n case Types.REAL.ord: {\n if (value.dp() <= 0) {\n return value.toFixed(1);\n } else {\n return value.toFixed(Config.decimalPlaces);\n }\n }\n case Types.BOOLEAN.ord:\n return convertBoolToString(value);\n default:\n return value;\n }\n}\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Type = void 0;\nclass Type {\n constructor(value, ord) {\n this.value = value;\n this.ord = ord;\n }\n stringInfo() {\n return [{ type: this.value, dim: 0 }];\n }\n isCompatible(another) {\n return this.value === another.value && this.ord === another.ord;\n }\n}\nexports.Type = Type;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromOrdToType = exports.Types = void 0;\nconst type_1 = require(\"./type\");\nconst multiType_1 = require(\"./multiType\");\nconst maybe_1 = require(\"../util/maybe\");\nconst INTEGER = new type_1.Type(\"integer\", 0);\nconst REAL = new type_1.Type(\"real\", 1);\nconst STRING = new type_1.Type(\"text\", 2);\nconst BOOLEAN = new type_1.Type(\"boolean\", 3);\nconst CHAR = new type_1.Type(\"char\", 4);\nconst VOID = new type_1.Type(\"void\", 5);\nconst UNDEFINED = new type_1.Type(\"undefined\", 6);\nconst ALL = new multiType_1.MultiType([INTEGER, REAL, STRING, CHAR, BOOLEAN]);\nexports.Types = Object.freeze({\n INTEGER: INTEGER,\n REAL: REAL,\n STRING: STRING,\n CHAR: CHAR,\n BOOLEAN: BOOLEAN,\n VOID: VOID,\n UNDEFINED: UNDEFINED,\n ALL: ALL\n});\nfunction fromOrdToType(ord) {\n const typeMap = exports.Types;\n for (const t in typeMap) {\n if (typeMap[t].ord && typeMap[t].ord === ord) {\n return maybe_1.Maybe.some(typeMap[t]);\n }\n }\n return maybe_1.Maybe.none();\n}\nexports.fromOrdToType = fromOrdToType;\n","import {SemanticAnalyser} from './../processor/semantic/semanticAnalyser';\nimport {IVProgProcessor} from './../processor/ivprogProcessor';\nimport { InputTest } from './inputTest';\nimport { OutputTest } from './outputTest';\nimport { LocalizedStrings } from './../services/localizedStringsService'\n\nexport function autoGenerateTestCaseOutput (program_text, testCases) {\n let copyTestCases = testCases.map((test) => Object.assign({}, test));\n try {\n const program = SemanticAnalyser.analyseFromSource(program_text);\n const resultList = testCases.map((test, id) => {\n const input = new InputTest(test.input);\n const output = new OutputTest();\n const exec = new IVProgProcessor(program);\n exec.registerInput(input);\n exec.registerOutput(output);\n return exec.interpretAST().then(_ => {\n return {id: id, program: exec};\n });\n });\n return Promise.all(resultList).then(result_final => {\n for(let i = 0; i < result_final.length; ++i) {\n const result = result_final[i];\n const output = result.program.output.list;\n const input = result.program.input;\n if(input.index != input.inputList.length) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_unused_input\", [result.id+1]));\n return Promise.resolve(false);\n }\n if(output.length == 0) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_empty\", [result.id+1]));\n }\n copyTestCases[result.id].output = output;\n }\n window.outputGenerated(copyTestCases);\n return Promise.resolve(true);\n });\n }catch (error) {\n return Promise.reject(error)\n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Config = void 0;\nclass ConfigObject {\n constructor() {\n this.decimalPlaces = 8;\n this.intConvertRoundMode = 2;\n this.default_lang = 'pt';\n this.enable_type_casting = true;\n this.idle_input_interval = 5000;\n this.suspend_threshold = 100;\n // this.max_instruction_count = 350250; - automated evaluation limit\n this.max_instruction_count = Number.MAX_SAFE_INTEGER;\n }\n setConfig(opts) {\n const otherConfig = opts;\n for (const key in otherConfig) {\n if (Object.prototype.hasOwnProperty.call(this, key)) {\n this[key] = otherConfig[key];\n }\n }\n }\n}\nconst config = new ConfigObject();\nexports.Config = config;\n","import { getCodeEditorModeConfig } from \"./utils\";\n\n/**\n * Source: https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/clike/clike.js\n * @author arijn Haverbeke and others\n * @author Lucas de Souza\n * @param {CodeMirror} CodeMirror \n */\nexport function CodeEditorMode (CodeMirror) {\n \"use strict\";\n\n function Context(indented, column, type, info, align, prev) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.info = info;\n this.align = align;\n this.prev = prev;\n }\n\n function pushContext(state, col, type, info) {\n let indent = state.indented;\n if (state.context && state.context.type == \"statement\" && type != \"statement\")\n indent = state.context.indented;\n return state.context = new Context(indent, col, type, info, null, state.context);\n }\n \n function popContext(state) {\n const t = state.context.type;\n if (t == \")\" || t == \"]\" || t == \"}\")\n state.indented = state.context.indented;\n return state.context = state.context.prev;\n }\n\n function typeBefore(stream, state, pos) {\n if (state.prevToken == \"variable\" || state.prevToken == \"type\") return true;\n if (/\\S(?:[^- ]>|[*\\]])\\s*$|\\*$/.test(stream.string.slice(0, pos))) return true;\n if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;\n }\n\n function isTopScope(context) {\n for (; ;) {\n if (!context || context.type == \"top\") return true;\n if (context.type == \"}\" && context.prev.info != \"namespace\") return false;\n context = context.prev;\n }\n }\n\n function contains(words, word) {\n if (typeof words === \"function\") {\n return words(word);\n } else {\n return Object.propertyIsEnumerable.call(words, word);\n }\n }\n\n function tokenComment(stream, state) {\n let maybeEnd = false, ch;\n while ((ch = stream.next())) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return \"comment\";\n }\n\n CodeMirror.defineMode(\"ivprog\", function (config, parserConfig) {\n const indentUnit = config.indentUnit,\n statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n dontAlignCalls = parserConfig.dontAlignCalls,\n keywords = parserConfig.keywords || {},\n switchKeyword = parserConfig.switchKeyword,\n caseKeyword = parserConfig.caseKeyword,\n defaultKeyword = parserConfig.defaultKeyword,\n caseRegex = new RegExp(`^\\\\s*(?:${caseKeyword} .*?:|${defaultKeyword}:|\\\\{\\\\}?|\\\\})$`),////,\n types = parserConfig.types || {},\n builtin = parserConfig.builtin || {},\n blockKeywords = parserConfig.blockKeywords || {},\n defKeywords = parserConfig.defKeywords || {},\n atoms = parserConfig.atoms || {},\n hooks = parserConfig.hooks || {},\n multiLineStrings = parserConfig.multiLineStrings,\n indentStatements = false,\n namespaceSeparator = null,\n isPunctuationChar = /[[\\]{}(),;:\\n]/,\n numberStart = /[\\d.]/,\n number = /^(?:0x[a-f\\d]+|0b[01]+|(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?)$/i,\n isOperatorChar = /[+\\-*%=<>!/&]/,\n isIdentifierChar = /[a-zA-Z0-9_]/,\n // An optional function that takes a {string} token and returns true if it\n // should be treated as a builtin.\n isReservedIdentifier = parserConfig.isReservedIdentifier || false;\n\n let curPunc, isDefKeyword;\n let tokenString = function () { /*SKIP*/};\n function tokenBase(stream, state) {\n const ch = stream.next();\n if (hooks[ch]) {\n const result = hooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == '\"') {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n }\n if (isPunctuationChar.test(ch)) {\n curPunc = ch;\n return null;\n }\n if (numberStart.test(ch)) {\n stream.backUp(1)\n if (stream.match(number)) return \"number\"\n stream.next()\n }\n if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return \"comment\";\n }\n }\n if (isOperatorChar.test(ch)) {\n while (!stream.match(/^\\/[/*]/, false) && stream.eat(isOperatorChar)) { /* SKIP */}\n return \"operator\";\n }\n stream.eatWhile(isIdentifierChar);\n if (namespaceSeparator) while (stream.match(namespaceSeparator))\n stream.eatWhile(isIdentifierChar);\n\n const cur = stream.current();\n if (contains(keywords, cur)) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n if (contains(defKeywords, cur)) isDefKeyword = true;\n return \"keyword\";\n }\n if (contains(types, cur)) return \"type\";\n if (contains(builtin, cur)\n || (isReservedIdentifier && isReservedIdentifier(cur))) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n return \"builtin\";\n }\n if (contains(atoms, cur)) return \"atom\";\n return \"variable\";\n }\n\n tokenString = function (quote) {\n return function (stream, state) {\n let escaped = false, next, end = false;\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) { end = true; break; }\n escaped = !escaped && next == \"\\\\\";\n }\n if (end || !(escaped || multiLineStrings))\n state.tokenize = null;\n return \"string\";\n };\n }\n\n function maybeEOL(stream, state) {\n if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))\n state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)\n }\n\n // Interface\n\n return {\n startState: function (basecolumn) {\n return {\n tokenize: null,\n context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", null, false),\n indented: 0,\n startOfLine: true,\n prevToken: null\n };\n },\n\n token: function (stream, state) {\n let ctx = state.context;\n if (stream.sol()) {\n if (ctx.align == null) ctx.align = false;\n state.indented = stream.indentation();\n state.startOfLine = true;\n }\n if (stream.eatSpace()) { maybeEOL(stream, state); return null; }\n curPunc = isDefKeyword = null;\n let style = (state.tokenize || tokenBase)(stream, state);\n if (style == \"comment\" || style == \"meta\") return style;\n if (ctx.align == null) ctx.align = true;\n\n if (curPunc == \";\" || curPunc == \":\" || (curPunc == \",\" && stream.match(/^\\s*(?:\\/\\/.*)?$/, false)))\n while (state.context.type == \"statement\") popContext(state);\n else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n else if (curPunc == \"}\") {\n while (ctx.type == \"statement\") ctx = popContext(state);\n if (ctx.type == \"}\") ctx = popContext(state);\n while (ctx.type == \"statement\") ctx = popContext(state);\n }\n else if (curPunc == ctx.type) popContext(state);\n else if (indentStatements &&\n (((ctx.type == \"}\" || ctx.type == \"top\") && curPunc != \";\") ||\n (ctx.type == \"statement\" && curPunc == \"newstatement\"))) {\n pushContext(state, stream.column(), \"statement\", stream.current());\n }\n\n if (style == \"variable\" &&\n ((state.prevToken == \"def\" ||\n (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&\n isTopScope(state.context) && stream.match(/^\\s*\\(/, false)))))\n style = \"def\";\n\n if (hooks.token) {\n const result = hooks.token(stream, state, style);\n if (result !== undefined) style = result;\n }\n\n if (style == \"def\" && parserConfig.styleDefs === false) style = \"variable\";\n\n state.startOfLine = false;\n state.prevToken = isDefKeyword ? \"def\" : style || curPunc;\n maybeEOL(stream, state);\n return style;\n },\n\n indent: function (state, textAfter) {\n if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;\n let ctx = state.context;\n const firstChar = textAfter && textAfter.charAt(0)\n const closing = firstChar == ctx.type;\n if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n if (parserConfig.dontIndentStatements)\n while (ctx.type == \"statement\" && parserConfig.dontIndentStatements.test(ctx.info))\n ctx = ctx.prev\n if (hooks.indent) {\n const hook = hooks.indent(state, ctx, textAfter, indentUnit);\n if (typeof hook == \"number\") return hook\n }\n const switchBlock = ctx.prev && ctx.prev.info == switchKeyword;\n if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {\n while (ctx.type != \"top\" && ctx.type != \"}\") ctx = ctx.prev\n return ctx.indented\n }\n if (ctx.type == \"statement\")\n return ctx.indented + (firstChar == \"{\" ? 0 : statementIndentUnit);\n if (ctx.align && (!dontAlignCalls || ctx.type != \")\"))\n return ctx.column + (closing ? 0 : 1);\n if (ctx.type == \")\" && !closing)\n return ctx.indented + statementIndentUnit;\n const caseTestRegex = new RegExp(`^(?:${caseKeyword}|${defaultKeyword})\\b`)\n return ctx.indented + (closing ? 0 : indentUnit) +\n (!closing && switchBlock && !caseTestRegex.test(textAfter) ? indentUnit : 0);\n },\n\n electricInput: caseRegex,\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: \"//\",\n fold: \"brace\"\n };\n });\n\n function words(str) {\n const obj = {}, words = str.split(\" \");\n for (let i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\n \n const codeConfig = getCodeEditorModeConfig();\n\n const ivprogKeywords = codeConfig.keywords.join(\" \");\n\n const basicTypes = words(codeConfig.types.join(\" \"));\n\n function ivprogTypes(identifier) {\n return contains(basicTypes, identifier);\n }\n\n const ivprogBlockKeywords = codeConfig.blocks.join(\" \");\n const ivprogDefKeywords = \"funcao const\";\n\n function def(mimes, mode) {\n if (typeof mimes == \"string\") mimes = [mimes];\n const words = [];\n function add(obj) {\n if (obj) {\n for (const prop in obj) if (Object.hasOwnProperty.call(obj, prop)) {\n words.push(prop);\n }\n }\n }\n add(mode.keywords);\n add(mode.types);\n add(mode.builtin);\n add(mode.atoms);\n if (words.length) {\n mode.helperType = mimes[0];\n CodeMirror.registerHelper(\"hintWords\", mimes[0], words);\n }\n\n for (let i = 0; i < mimes.length; ++i)\n CodeMirror.defineMIME(mimes[i], mode);\n }\n \n def([\"text/x-ivprog\"], {\n name: \"ivprog\",\n keywords: words(ivprogKeywords),\n types: ivprogTypes,\n blockKeywords: words(ivprogBlockKeywords),\n defKeywords: words(ivprogDefKeywords),\n typeFirstDefinitions: true,\n atoms: words(codeConfig.atoms.join(\" \")),\n switchKeyword: codeConfig.switchString,\n caseKeyword: codeConfig.case_default[0],\n defaultKeyword: codeConfig.case_default[1],\n modeProps: { fold: [\"brace\"] }\n });\n\n}\n","import { setTestCases, getTestCases } from \"../visualUI/functions\";\nimport { generate } from \"../visualUI/code_generator\";\nimport { IVProgAssessment } from \"../assessment/ivprogAssessment\";\nimport { TestConsole } from \"./testConsole\";\nimport { parseLogs } from \"./../services/userLog\";\nimport { SemanticAnalyser } from \"../processor/semantic/semanticAnalyser\";\nimport { Maybe } from \"./maybe\";\n\nfunction parseActivityData (data) {\n let algorithm_in_ilm = null;\n if (data.split(\"\\n::algorithm::\")[1]) {\n algorithm_in_ilm = data.split(\"\\n::algorithm::\")[1].split(\"\\n::logs::\")[0];\n const logs = data.split(\"\\n::algorithm::\")[1].split(\"\\n::logs::\")[1];\n if (logs != null) {\n parseLogs(logs);\n }\n }\n let content;\n try {\n content = JSON.parse(data.split(\"\\n::algorithm::\")[0]);\n content[\"algorithm_in_ilm\"] = algorithm_in_ilm;\n } catch (e) {\n console.error(e);\n return Maybe.none();\n }\n return Maybe.some(content);\n}\n\nexport function prepareActivityToStudentHelper (ilm_cont) {\n const maybe_content = parseActivityData(ilm_cont);\n return maybe_content.map((content) => {\n const testCases = content.testcases;\n setTestCases(testCases);\n\n let prog_type = null;\n if (content.settings_programming_type) {\n prog_type = content.settings_programming_type[0].value;\n } else {\n prog_type = \"visual\";\n }\n\n return {\n settingsProgrammingType: prog_type,\n settingsDataTypes: content.settings_data_types,\n settingsCommands: content.settings_commands,\n settingsFunctions: content.settings_functions,\n algorithmInIlm: content.algorithm_in_ilm,\n settingsFilter: content.settings_filter,\n };\n });\n}\n\nfunction compareArray (a, b) {\n for (let i = 0; i < a.length; ++i) {\n const elementA = a[i];\n const elementB = b[i];\n if (elementA != elementB) {\n return false;\n }\n }\n return true;\n}\n\nfunction compareTestcases (original, student) {\n if (original.length != student.length) {\n return false;\n }\n for (let i = 0; i < original.length; ++i) {\n const elementO = original[i];\n const elementS = student[i];\n if (!compareArray(elementO.input, elementS.input)) {\n return false;\n }\n if (!compareArray(elementO.output, elementS.output)) {\n return false;\n }\n }\n return true;\n}\n\nexport function autoEval (originalData, callback) {\n const code = generate();\n //console.debug(code);\n const original = parseActivityData(originalData).getOrElse(undefined);\n if (original == null) {\n alert(\"iAssign did not provide the original activity data!\");\n return callback(null);\n }\n if (code == null) {\n return callback(-1); // @FeedbackConvention Casos de teste vazios\n } else {\n if (!compareTestcases(original.testcases, getTestCases())) {\n return callback(-2); // @FeedbackConvention Casos de teste alterados pelo aluno\n }\n try {\n const ast_code = SemanticAnalyser.analyseFromSource(code);\n const con = new TestConsole([]);\n const autoAssessment = new IVProgAssessment(\n ast_code,\n original.testcases,\n con\n );\n autoAssessment\n .runTest()\n .then((grade) => callback(grade))\n .catch((err) => {\n console.log(err);\n callback(-5); // @FeedbackConvention Falha na execução\n });\n } catch (e) {\n console.error(e);\n callback(-5);\n }\n }\n}\n","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputTest extends Input {\n\n constructor (inputList) {\n super();\n this.index = 0;\n this.inputList = inputList;\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.inputList.length) { \n resolve(this.inputList[this.index]);\n this.index++;\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n}","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputAssessment extends Input {\n\n constructor (input_list) {\n super();\n this.index = 0;\n this.input_list = input_list.map((val) => {\n return {\"value\": val, \"read\": false};\n });\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.input_list.length) {\n const input = this.input_list[this.index];\n input.read = true;\n this.index += 1;\n resolve(input.value);\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n\n isInputAvailable () {\n return this.index < this.input_list.length;\n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Maybe = void 0;\n/**\n*\n* Maybe Monad\n* @Source: https://codewithstyle.info/advanced-functional-programming-in-typescript-maybe-monad/\n* @Modified by: @lucascalion - 28/08/2019\n*\n**/\nclass Maybe {\n constructor(value) {\n this.value = value;\n }\n static some(value) {\n if (!value) {\n throw Error(\"Provided value must not be empty\");\n }\n return new Maybe(value);\n }\n static none() {\n return new Maybe(null);\n }\n static fromValue(value) {\n return value ? Maybe.some(value) : Maybe.none();\n }\n getOrElse(defaultValue) {\n return this.value === null ? defaultValue : this.value;\n }\n map(f) {\n if (this.value === null) {\n return Maybe.none();\n }\n else {\n return Maybe.fromValue(f(this.value));\n }\n }\n}\nexports.Maybe = Maybe;\n","import { Output } from './../io/output';\n\nexport class OutputTest extends Output {\n\n constructor () {\n super();\n this.list = [];\n this.currentLine = null;\n }\n\n write (text, newLine = false) {\n if (this.currentLine == null) {\n this.currentLine = this.list.push('') - 1;\n }\n\n this.list[this.currentLine] += text;\n if (newLine) {\n this.currentLine = null;\n }\n }\n\n sendOutput (text) {\n let output = '' + text;\n if (output.indexOf('\\n') !== -1) {\n const outputList = output.split('\\n');\n let last = outputList.pop();\n outputList.forEach( t => {\n t = t.replace(/\\t/g, '&#x0020;&#x0020;');\n t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length == 0)\n this.currentLine = null;\n else\n this.write(t, true);\n });\n last = last.replace(/\\t/g, '&#x0020;&#x0020;');\n last = last.replace(/\\s/g, \"&#x0020;\");\n if (last.length != 0)\n this.write(last);\n } else {\n output = output.replace(/\\t/g, '&#x0020;&#x0020;');\n output = output.replace(/\\s/g, \"&#x0020;\");\n this.write(output);\n }\n }\n}\n","/**\n * Author: @jhchen - https://github.com/jhchen\n * Modified by: @lucascalion - 23/07/2019\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nconst DIFF_DELETE = -1;\nconst DIFF_INSERT = 1;\nconst DIFF_EQUAL = 0;\n\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n const editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n let commonlength = diff_commonPrefix(text1, text2);\n const commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n const commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n const diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n return diffs;\n}\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n let diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n const i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)]\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n const text1_length = text1.length;\n const text2_length = text2.length;\n const max_d = Math.ceil((text1_length + text2_length) / 2);\n const v_offset = max_d;\n const v_length = 2 * max_d;\n const v1 = new Array(v_length);\n const v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n const delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n const front = (delta % 2 !== 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n let k1start = 0;\n let k1end = 0;\n let k2start = 0;\n let k2end = 0;\n for (let d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (let k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n const k1_offset = v_offset + k1;\n let x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n let y1 = x1 - k1;\n while (\n x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n const k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n const x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detfrontected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (let k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n const k2_offset = v_offset + k2;\n let x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n let y2 = x2 - k2;\n while (\n x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n const k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n const x1 = v1[k1_offset];\n const y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n}\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n const text1a = text1.substring(0, x);\n const text2a = text2.substring(0, y);\n const text1b = text1.substring(x);\n const text2b = text2.substring(y);\n\n // Compute both diffs serially.\n const diffs = diff_main(text1a, text2a);\n const diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.<string>} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.<string>} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n const seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n let j = -1;\n let best_common = '';\n let best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n const prefixLength = diff_commonPrefix(\n longtext.substring(i), shorttext.substring(j));\n const suffixLength = diff_commonSuffix(\n longtext.substring(0, i), shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(\n j - suffixLength, j) + shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n const hm1 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n const hm2 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 2));\n let hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n let text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n const mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.\n let pointer = 0;\n let count_delete = 0;\n let count_insert = 0;\n let text_delete = '';\n let text_insert = '';\n let commonlength;\n let previous_equality;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) {\n const stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(0, -1);\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n const stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, [DIFF_EQUAL, text_insert.substring(0, commonlength)]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length - commonlength);\n text_delete = text_delete.substring(0, text_delete.length - commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n const n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete], [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC\n let changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xD800 && charCode <= 0xDBFF;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xDC00 && charCode <= 0xDFFF;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n const ret = [];\n for (let i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after]\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n const oldRange = typeof cursor_pos === 'number' ?\n { index: cursor_pos, length: 0 } : cursor_pos.oldRange;\n const newRange = typeof cursor_pos === 'number' ?\n null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n const oldLength = oldText.length;\n const newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n const oldCursor = oldRange.index;\n const oldBefore = oldText.slice(0, oldCursor);\n const oldAfter = oldText.slice(oldCursor);\n const maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n const newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n const newBefore = newText.slice(0, newCursor);\n const newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n const prefixLength = Math.min(oldCursor, newCursor);\n const oldPrefix = oldBefore.slice(0, prefixLength);\n const newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n const oldMiddle = oldBefore.slice(prefixLength);\n const newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n const cursor = oldCursor;\n const newBefore = newText.slice(0, cursor);\n const newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n const suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n const oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n const newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n const oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n const newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n const oldPrefix = oldText.slice(0, oldRange.index);\n const oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n const prefixLength = oldPrefix.length;\n const suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n const newPrefix = newText.slice(0, prefixLength);\n const newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n const oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n const newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nexport default diff;\n","import { DOMConsole } from \"../io/domConsole\";\nimport { getInstance } from \"../services/localizedStringsService\";\n\nconst LocalizedStrings = getInstance();\n\nexport class TestConsole {\n\n\n constructor (inputList) {\n this.index = 0;\n this.inputList = inputList;\n this.list = [];\n this.currentLine = null;\n }\n\n writeRawHTML (text) {\n this._appendTextLn(text);\n }\n write (text, newLine = false) {\n this._appendText(text, DOMConsole.USER, newLine);\n }\n\n info (text) {\n this._appendTextLn(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendTextLn(text, DOMConsole.ERR);\n }\n\n _appendText (text, _type, newLine = false) {\n if (this.currentLine == null) {\n this.currentLine = this.list.push('') - 1;\n }\n\n this.list[this.currentLine] += text;\n if (newLine) {\n this.currentLine = null;\n }\n }\n\n _appendTextLn (text) {\n this.list.push(text);\n this.currentLine = null;\n }\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n requestInput () {\n const promise = new Promise( (resolve, reject) => {\n if(this.index < this.inputList.length) {\n resolve(this.inputList[this.index]);\n this.index++;\n } else {\n reject(new Error(LocalizedStrings.getError(\"exceeded_input_request\")));\n }\n });\n return promise\n }\n\n sendOutput (text) {\n let output = '' + text;\n if (output.indexOf('\\n') !== -1) {\n const outputList = output.split('\\n');\n let last = outputList.pop();\n outputList.forEach( t => {\n t = t.replace(/\\t/g, '&#x0020;&#x0020;');\n t = t.replace(/\\s/g, \"&#x0020;\");\n if (t.length == 0)\n this.currentLine = null;\n else\n this.write(t, true);\n });\n last = last.replace(/\\t/g, '&#x0020;&#x0020;');\n last = last.replace(/\\s/g, \"&#x0020;\");\n if (last.length != 0)\n this.write(last);\n } else {\n output = output.replace(/\\t/g, '&#x0020;&#x0020;');\n output = output.replace(/\\s/g, \"&#x0020;\");\n this.write(output);\n }\n }\n}\n","import { LanguageService } from \"./../services/languageService\";\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport { Operators } from \"./../ast/operators\";\n\n/** \n * source: https://pawelgrzybek.com/page-scroll-in-vanilla-javascript/ \n * \n*/\nexport function scrollIt (destination, duration = 200, easing = 'linear', callback = null) {\n\n const easings = {\n linear(t) {\n return t;\n },\n easeInQuad(t) {\n return t * t;\n },\n easeOutQuad(t) {\n return t * (2 - t);\n },\n easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n easeInCubic(t) {\n return t * t * t;\n },\n easeOutCubic(t) {\n return (--t) * t * t + 1;\n },\n easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n easeInQuart(t) {\n return t * t * t * t;\n },\n easeOutQuart(t) {\n return 1 - (--t) * t * t * t;\n },\n easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t;\n },\n easeInQuint(t) {\n return t * t * t * t * t;\n },\n easeOutQuint(t) {\n return 1 + (--t) * t * t * t * t;\n },\n easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t;\n }\n };\n\n const start = window.pageYOffset;\n const startTime = 'now' in window.performance ? performance.now() : new Date().getTime();\n\n const documentHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);\n const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;\n const destinationOffset = typeof destination === 'number' ? destination : destination.offsetTop;\n const destinationOffsetToScroll = Math.round(documentHeight - destinationOffset < windowHeight ? documentHeight - windowHeight : destinationOffset);\n\n if ('requestAnimationFrame' in window === false) {\n window.scroll(0, destinationOffsetToScroll);\n if (callback) {\n callback();\n }\n return;\n }\n\n function scroll() {\n const now = 'now' in window.performance ? performance.now() : new Date().getTime();\n const time = Math.min(1, ((now - startTime) / duration));\n const timeFunction = easings[easing](time);\n window.scroll(0, Math.ceil((timeFunction * (destinationOffsetToScroll - start)) + start));\n\n if (window.pageYOffset === destinationOffsetToScroll) {\n if (callback) {\n callback();\n }\n return;\n }\n\n requestAnimationFrame(scroll);\n }\n\n scroll();\n}\n\n/**\n * \n * source: https://stackoverflow.com/a/16270434\n */\nexport function isElementInViewport (el) {\n const rect = el.getBoundingClientRect();\n\n return rect.bottom > 0 &&\n rect.right > 0 &&\n rect.left < (window.innerWidth || document.documentElement.clientWidth) &&\n rect.top < (window.innerHeight || document.documentElement.clientHeight);\n}\n\nlet cacheMainList = null;\nlet cacheOp = null;\n\nfunction fillCache () {\n if(cacheMainList == null) {\n cacheMainList = [];\n const mainList = [\"RK_PROGRAM\",\"RK_REAL\",\"RK_VOID\",\"RK_BOOLEAN\",\"RK_STRING\",\n \"RK_INTEGER\",\"RK_CHARACTER\",\"RK_SWITCH\",\"RK_CASE\",\"RK_DEFAULT\",\"RK_CONST\",\n \"RK_FUNCTION\",\"RK_RETURN\",\"RK_FOR\",\"RK_BREAK\",\"RK_DO\",\"RK_WHILE\",\"RK_IF\",\n \"RK_ELSE\",\"RK_FALSE\",\"RK_TRUE\"];\n const lexerClass = LanguageService.getCurrentLexer();\n const nullLexer = new lexerClass();\n for (let key = 0; key < mainList.length; ++key) {\n const word = mainList[key];\n const keyword = nullLexer.literalNames[lexerClass[word]];\n cacheMainList.push(keyword.substring(1, keyword.length-1));\n }\n }\n if(cacheOp == null) {\n cacheOp = []\n const logicOpList = [Operators.AND.value, Operators.OR.value, Operators.NOT.value];\n for (let op = 0; op < logicOpList.length; ++op) {\n const lOp = `logic_operator_${logicOpList[op]}`;\n cacheOp.push(LocalizedStrings.getUI(lOp))\n }\n }\n}\n\nexport function isKeyword (text) {\n fillCache();\n for (let key = 0; key < cacheMainList.length; ++key) {\n const keyword = cacheMainList[key];\n if(keyword == text) {\n return true;\n }\n }\n // not in main list, check op\n for (let op = 0; op < cacheOp.length; op++) {\n const lOp = cacheOp[op];\n if(lOp == text) {\n return true;\n }\n }\n return false;\n}\n\nexport function isValidIdentifier (identifier_str) {\n const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);\n if(!validRegex) {\n return false;\n }\n\treturn !isKeyword(identifier_str);\n}\n\nexport function getCodeEditorModeConfig () {\n const blockList = [\"RK_SWITCH\", \"RK_PROGRAM\",\"RK_CASE\",\"RK_DEFAULT\",\"RK_FOR\",\"RK_FOR_ALT\",\n \"RK_FUNCTION\",\"RK_DO\",\"RK_WHILE\",\"RK_WHILE_ALT\",\"RK_IF\",\"RK_ELSE\"]\n const keywordsList = [\"RK_CONST\",\"RK_RETURN\",\"RK_BREAK\",\"RK_FOR_FROM\",\"RK_FOR_TO\",\"RK_FOR_PASS\",\"RK_DO_UNTIL\"];\n const typeList = [\"RK_REAL\",\"RK_VOID\",\"RK_BOOLEAN\",\"RK_STRING\",\"RK_INTEGER\",\"RK_CHARACTER\"];\n const atomList = [\"RK_FALSE\", \"RK_TRUE\"];\n\n const case_default = [];\n const blocks = [];\n const keywords = [];\n const types = [];\n const atoms = []\n let switchString = \"\";\n\n cacheMainList = [];\n const lexerClass = LanguageService.getCurrentLexer();\n const nullLexer = new lexerClass();\n blockList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n keywords.push(value);\n blocks.push(value);\n if(v == \"RK_SWITCH\") {\n switchString = value;\n } else if (v == \"RK_CASE\" || v == \"RK_DEFAULT\") {\n case_default.push(value);\n }\n });\n keywordsList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n keywords.push(value);\n });\n typeList.forEach(v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n types.push(value);\n })\n atomList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n atoms.push(value);\n })\n \n cacheOp = []\n const logicOpList = [Operators.AND.value, Operators.OR.value, Operators.NOT.value];\n for (let op = 0; op < logicOpList.length; ++op) {\n const lOp = `logic_operator_${logicOpList[op]}`;\n const value = LocalizedStrings.getUI(lOp);\n cacheOp.push(value)\n keywords.push(value);\n }\n return {\n case_default: case_default,\n atoms: atoms,\n keywords: keywords,\n switchString: switchString,\n types: types,\n blocks: blocks\n }\n}\n\n/**\n * Source: https://gist.github.com/andrei-m/982927\n * @param {string} a \n * @param {string} b \n */\nexport function levenshteinDistance (a, b) {\n if(a.length == 0) return b.length; \n if(b.length == 0) return a.length; \n\n const matrix = [];\n\n // increment along the first column of each row\n let i;\n for(i = 0; i <= b.length; i++){\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for(j = 0; j <= a.length; j++){\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for(i = 1; i <= b.length; i++){\n for(j = 1; j <= a.length; j++){\n if(b.charCodeAt(i-1) == a.charCodeAt(j-1)){\n matrix[i][j] = matrix[i-1][j-1];\n } else {\n matrix[i][j] = Math.min(matrix[i-1][j-1] + 1, // substitution\n Math.min(matrix[i][j-1] + 1, // insertion\n matrix[i-1][j] + 1)); // deletion\n }\n }\n }\n return matrix[b.length][a.length];\n}\n\nlet win = null\nexport function openAssessmentDetail (event) {\n event.preventDefault();\n const page_code = event.currentTarget.dataset.page;\n if(win != null) {\n win.close()\n }\n win = window.open(\"\", \"DetailWindow\", \"width=550,height=600\");\n win.document.open();\n win.document.write(page_code);\n win.document.close();\n}\n\nexport function range (size, startAt = 0) {\n return [...Array(size).keys()].map(i => i + startAt);\n}\n\n/**\n * \n * @param {number} ms \n */\nexport async function sleep (ms) {\n return new Promise( (res, _) => setTimeout(res, ms));\n }\n","import * as GlobalsManagement from './globals';\nimport * as FunctionsManagement from './functions';\n\nwindow.block_render = false;\n\nexport function renderAlgorithm () {\n\tif (window.block_render) {\n\t\treturn;\n\t}\n\tif (window.draging) {\n\t\treturn;\n\t}\n\twindow.block_render = true;\n\n \t$('.all_functions').children().off();\n\t$('.all_functions').empty();\n\n\t$('.list_globals').children().off();\n\t$('.list_globals').empty();\t\n\n\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\tFunctionsManagement.renderFunction(window.program_obj.functions[i]);\n\t}\n\n\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\tGlobalsManagement.renderGlobal(window.program_obj.globals[i]);\n\t}\t\n\n\tsetTimeout(function(){ window.block_render = false; }, 100);\n\n\tif (settingsFilter && settingsFilter[0]) {\n blockAllEditingOptions();\n } \n}","/* eslint-disable @typescript-eslint/no-use-before-define */\n/* globals $*/\nimport { Types } from \"./types\";\nimport * as Models from \"./ivprog_elements\";\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport * as Utils from \"./utils\";\n\nexport function generate () {\n $(\".ivprog_visual_panel\")\n .find(\".error_icon\")\n .remove();\n\n let code = LocalizedStrings.getUI(\"program\") + \" { \";\n\n code += globalsCode();\n\n code += \"\\n\";\n\n let has_error = false;\n\n for (let i = 0; i < window.program_obj.functions.length; i++) {\n const n_code = functionsCode(window.program_obj.functions[i]);\n if (n_code == null) {\n has_error = true;\n }\n code += n_code;\n code += \"\\n\";\n }\n\n code += \"\\n}\";\n\n if (has_error) {\n return null;\n } else {\n return code;\n }\n}\n\nfunction functionsCode (function_obj) {\n let ret = \"\\n\\t\" + LocalizedStrings.getUI(\"function\") + \" \";\n\n const has_error = false;\n\n switch (function_obj.return_type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\");\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\");\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\");\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\");\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\");\n break;\n case Types.VOID:\n ret += LocalizedStrings.getUI(\"type_void\");\n break;\n }\n ret += \" \";\n\n if (function_obj.return_dimensions == 1) {\n ret += \"[] \";\n } else if (function_obj.return_dimensions == 2) {\n ret += \"[][] \";\n }\n if (function_obj.is_main) {\n ret += LocalizedStrings.getUI(\"start\");\n } else {\n ret += function_obj.name;\n }\n ret += \" ( \";\n for (let j = 0; j < function_obj.parameters_list.length; j++) {\n ret += parametersCode(function_obj.parameters_list[j]);\n if (j + 1 < function_obj.parameters_list.length) {\n ret += \", \";\n }\n }\n\n ret += \" ) {\";\n\n for (let j = 0; j < function_obj.variables_list.length; j++) {\n ret += variablesCode(function_obj.variables_list[j]);\n }\n\n for (let j = 0; j < function_obj.commands.length; j++) {\n //try {\n ret += commandsCode(function_obj.commands[j]);\n /*} catch (err) {\n\n has_error = true;\n\n console.error(err.message);\n\n var todos = $('body').find('.command_container');\n\n for (var i = 0; i < todos.length; i++) {\n if ($(todos[i]).data('command') == function_obj.commands[j]) {\n $( todos[i] ).prepend( ' <i class=\"ui icon red exclamation triangle error_icon\"></i> ' );\n break;\n }\n }\n\n }*/\n }\n\n ret += \"\\n\\t}\";\n\n if (has_error) {\n return null;\n } else {\n return ret;\n }\n}\n\nfunction commandsCode (command_obj, indentation = 2) {\n switch (command_obj.type) {\n case Models.COMMAND_TYPES.break:\n return breaksCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.comment:\n return commentsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.reader:\n return readersCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.writer:\n return writersCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.functioncall:\n return functioncallsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.attribution:\n return attributionsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.whiletrue:\n return whiletruesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.dowhiletrue:\n return doWhilesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.iftrue:\n return iftruesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.repeatNtimes:\n return repeatNtimesCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.switch:\n return switchsCode(command_obj, indentation);\n\n case Models.COMMAND_TYPES.return:\n return returnsCode(command_obj, indentation);\n }\n}\n\nfunction returnsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_return\");\n\n if (command_obj.variable_value_menu) {\n try {\n ret += \" \" + elementExpressionCode(command_obj.variable_value_menu);\n //ret += ' ' + variableValueMenuCode(command_obj.variable_value_menu, true);\n } catch (err) {\n //Empty block\n }\n }\n\n return ret;\n}\n\nfunction breaksCode (_command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_break\");\n\n return ret;\n}\n\nfunction switchsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_switch\") + \" ( \";\n\n ret += variableValueMenuCode(command_obj.variable);\n\n ret += \" ) { \";\n\n if (command_obj.cases) {\n for (let i = 0; i < command_obj.cases.length; i++) {\n ret += switchcasesCode(command_obj.cases[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n ret += \"} \";\n\n return ret;\n}\n\nfunction switchcasesCode (switchcase, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_case\") + \" \";\n ret += variableValueMenuCode(switchcase.variable_value_menu);\n ret += \" :\";\n\n if (switchcase.commands_block) {\n for (let i = 0; i < switchcase.commands_block.length; i++) {\n ret += commandsCode(switchcase.commands_block[i], indentation + 1);\n }\n }\n\n return ret;\n}\n\nfunction repeatNtimesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_for\") + \" \";\n\n if (command_obj.var_attribution) {\n ret += variableValueMenuCode(command_obj.var_attribution);\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_from\")} `;\n ret += variableValueMenuCode(command_obj.expression1);\n }\n\n if (command_obj.expression2) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_to\")} `;\n ret += variableValueMenuCode(command_obj.expression2);\n }\n\n if (command_obj.expression3) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_pass\")} `;\n switch (command_obj.expression3.itens[1]) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += \" +\";\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += \" -\";\n break;\n }\n ret += variableValueMenuCode(command_obj.expression3.itens[2]);\n }\n\n /*if (command_obj.var_incrementation) {\n ret += variableValueMenuCode(command_obj.var_incrementation);\n ret += ' <- ';\n ret += variableValueMenuCode(command_obj.expression3.itens[0]);\n\n switch (command_obj.expression3.itens[1]) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += ' + ';\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += ' - ';\n break;\n case Models.ARITHMETIC_TYPES.multiplication:\n ret += ' * ';\n break;\n case Models.ARITHMETIC_TYPES.division:\n ret += ' / ';\n break;\n case Models.ARITHMETIC_TYPES.module:\n ret += ' % ';\n break;\n }\n\n ret += variableValueMenuCode(command_obj.expression3.itens[2]);\n }*/\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n return ret;\n}\n\nfunction iftruesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_if\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n } else {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"} \" + LocalizedStrings.getUI(\"text_else\") + \" {\";\n\n if (command_obj.commands_else) {\n for (let i = 0; i < command_obj.commands_else.length; i++) {\n ret += commandsCode(command_obj.commands_else[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n\n return ret;\n}\n\nfunction doWhilesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_do\") + \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"} \" + LocalizedStrings.getUI(\"text_code_do_until\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n\n if (command_obj.expression) {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n return ret;\n}\n\nfunction whiletruesCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_code_while\");\n\n if (!command_obj.expression) {\n Utils.renderErrorMessage(\n command_obj.expression.dom_object,\n LocalizedStrings.getUI(\"inform_valid_expression\")\n );\n }\n\n /*switch (command_obj.expression.expression.type) {\n case Models.EXPRESSION_TYPES.exp_logic:\n ret += logicExpressionCode(command_obj.expression.expression);\n break;\n case Models.EXPRESSION_TYPES.exp_arithmetic:\n ret += arithmeticExpressionCode(command_obj.expression.expression);\n break;\n }*/\n if (command_obj.expression) {\n ret += \" ( \";\n ret += elementExpressionCode(command_obj.expression);\n ret += \" ) \";\n }\n\n ret += \" { \";\n\n if (command_obj.commands_block) {\n for (let i = 0; i < command_obj.commands_block.length; i++) {\n ret += commandsCode(command_obj.commands_block[i], indentation + 1);\n }\n }\n\n ret += \"\\n\";\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"}\";\n\n return ret;\n}\n\nfunction logicExpressionCode (expression) {\n let ret = \" ( \";\n\n if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.first_operand);\n } else if (\n expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.first_operand);\n } else {\n ret += variableValueMenuCode(expression.first_operand);\n }\n\n if (expression.operator) {\n switch (expression.operator) {\n case Models.LOGIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n case Models.LOGIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n case Models.LOGIC_COMPARISON.and:\n ret += \" && \";\n break;\n case Models.LOGIC_COMPARISON.or:\n ret += \" || \";\n break;\n }\n\n if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.second_operand);\n } else if (\n expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.second_operand);\n } else {\n ret += variableValueMenuCode(expression.second_operand);\n }\n }\n\n ret += \" ) \";\n\n return ret;\n}\n\nfunction arithmeticExpressionCode (expression) {\n let ret = \" ( \";\n\n if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.first_operand);\n } else if (\n expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.first_operand);\n } else {\n ret += variableValueMenuCode(expression.first_operand);\n }\n\n switch (expression.operator) {\n case Models.ARITHMETIC_COMPARISON.greater_than:\n ret += \" > \";\n break;\n case Models.ARITHMETIC_COMPARISON.less_than:\n ret += \" < \";\n break;\n case Models.ARITHMETIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n case Models.ARITHMETIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n case Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n ret += \" >= \";\n break;\n case Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n ret += \" <= \";\n break;\n }\n\n if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n ret += logicExpressionCode(expression.second_operand);\n } else if (\n expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic\n ) {\n ret += arithmeticExpressionCode(expression.second_operand);\n } else {\n ret += variableValueMenuCode(expression.second_operand);\n }\n\n ret += \" ) \";\n\n return ret;\n}\n\nfunction attributionsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += variableValueMenuCode(command_obj.variable) + \" <- \";\n\n /*for (var i = 0; i < command_obj.expression.length; i++) {\n ret += elementExpressionCode(command_obj.expression[i]);\n }*/\n ret += elementExpressionCode(command_obj.expression);\n\n return ret;\n}\n\nfunction elementExpressionCode (expression_obj) {\n let ret = \"\";\n\n for (let i = 0; i < expression_obj.length; i++) {\n if (expression_obj[i].type) {\n ret += variableValueMenuCode(expression_obj[i]);\n } else if (expression_obj[i].type_op) {\n switch (expression_obj[i].item) {\n case Models.ARITHMETIC_TYPES.plus:\n ret += \" + \";\n break;\n case Models.ARITHMETIC_TYPES.minus:\n ret += \" - \";\n break;\n case Models.ARITHMETIC_TYPES.multiplication:\n ret += \" * \";\n break;\n case Models.ARITHMETIC_TYPES.division:\n ret += \" / \";\n break;\n case Models.ARITHMETIC_TYPES.module:\n ret += \" % \";\n break;\n\n case Models.LOGIC_COMPARISON.equals_to:\n ret += \" == \";\n break;\n\n case Models.LOGIC_COMPARISON.not_equals_to:\n ret += \" != \";\n break;\n\n case Models.LOGIC_COMPARISON.and:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_and\") + \" \";\n break;\n\n case Models.LOGIC_COMPARISON.or:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_or\") + \" \";\n break;\n\n case Models.LOGIC_COMPARISON.not:\n ret += \" \" + LocalizedStrings.getUI(\"logic_operator_not\") + \" \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.greater_than:\n ret += \" > \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.less_than:\n ret += \" < \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n ret += \" >= \";\n break;\n\n case Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n ret += \" <= \";\n break;\n case Models.EXPRESSION_TYPES.write_sep:\n ret += \", \";\n break;\n }\n } else {\n ret += \" \" + expression_obj[i] + \" \";\n }\n }\n\n return ret;\n}\n\nfunction functioncallsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += variableValueMenuCode(command_obj.function_called);\n\n return ret;\n}\n\nfunction readersCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_command_read\") + \" ( \";\n\n ret += variableValueMenuCode(command_obj.variable_value_menu);\n\n ret += \" ) \";\n return ret;\n}\n\nfunction variableValueMenuCode (variable_obj, is_return = false) {\n let ret = \"\";\n try {\n if (variable_obj.function_called) {\n if (variable_obj.function_called.name) {\n ret += variable_obj.function_called.name + \" ( \";\n } else {\n ret +=\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) + \" ( \";\n }\n\n if (variable_obj.parameters_list) {\n for (let i = 0; i < variable_obj.parameters_list.length; i++) {\n ret += variableValueMenuCode(variable_obj.parameters_list[i]);\n if (i + 1 < variable_obj.parameters_list.length) {\n ret += \", \";\n }\n }\n }\n\n ret += \" )\";\n } else if (variable_obj.content.type) {\n ret += variable_obj.content.name;\n\n if (\n variable_obj.content.dimensions == 1 &&\n variable_obj.dimensions != 1\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.column) + \" ] \";\n }\n\n if (\n variable_obj.content.dimensions == 2 &&\n variable_obj.dimensions != 2\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.row) + \" ] \";\n ret += \" [ \" + variableValueMenuCode(variable_obj.column) + \" ] \";\n }\n } else {\n const content = String(variable_obj.content);\n if (isNaN(content)) {\n // console.debug(\"Content length: \", content.length);\n // console.debug(\"Char code at 0\", content.charCodeAt(0));\n const isBackslash = content.charCodeAt(0) === 92;\n if (content.length === 1 || (content.length === 2 && isBackslash)) {\n ret += `'${content}'`;\n } else {\n ret += '\"' + variable_obj.content + '\"';\n }\n } else if (content.length == 0) {\n ret += '\"\"';\n } else if (content.trim().length == 0) {\n ret += '\"' + content + '\"';\n } else {\n ret += variable_obj.content;\n }\n }\n } catch (err) {\n if (!is_return) {\n Utils.renderErrorMessage(\n variable_obj.dom_object,\n LocalizedStrings.getUI(\"inform_valid_content\")\n );\n throw err;\n }\n }\n\n return ret;\n}\n\nfunction writersCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += LocalizedStrings.getUI(\"text_command_write\") + \" ( \";\n\n /*for (var i = 0; i < command_obj.content.length; i++) {\n ret += variableValueMenuCode(command_obj.content[i]);\n\n if ((i + 1) < command_obj.content.length) {\n ret += ' + ';\n }\n }*/\n\n ret += elementExpressionCode(command_obj.content);\n if (command_obj.newline) {\n ret += ', \"\\\\n\"';\n }\n\n ret += \" ) \";\n return ret;\n}\n\nfunction commentsCode (command_obj, indentation) {\n let ret = \"\\n\";\n\n for (let i = 0; i < indentation; i++) {\n ret += \"\\t\";\n }\n\n ret += \"// \";\n\n ret += command_obj.comment_text.content;\n return ret;\n}\n\nfunction parametersCode (parameter_obj) {\n let ret = \"\";\n switch (parameter_obj.type) {\n case Types.INTEGER:\n ret += \" \" + LocalizedStrings.getUI(\"type_integer\") + \" \";\n break;\n case Types.REAL:\n ret += \" \" + LocalizedStrings.getUI(\"type_real\") + \" \";\n break;\n case Types.TEXT:\n ret += \" \" + LocalizedStrings.getUI(\"type_text\") + \" \";\n break;\n case Types.BOOLEAN:\n ret += \" \" + LocalizedStrings.getUI(\"type_boolean\") + \" \";\n break;\n case Types.CHAR:\n ret += \" \" + LocalizedStrings.getUI(\"type_char\") + \" \";\n break;\n }\n ret += parameter_obj.name + \"\";\n\n if (parameter_obj.dimensions == 1) {\n ret += \" []\";\n } else if (parameter_obj.dimensions == 2) {\n ret += \" [][]\";\n }\n return ret;\n}\n\nfunction variablesCode (variable_obj) {\n let ret = \"\";\n\n const temp = variable_obj;\n\n ret += \"\\n\\t\\t\";\n\n if (temp.is_constant) {\n ret += \"const \";\n }\n switch (temp.type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\") + \" \";\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\") + \" \";\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\") + \" \";\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\") + \" \";\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\") + \" \";\n break;\n }\n ret += temp.name + \" \";\n\n if (temp.dimensions == 1) {\n ret += \"[\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j];\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j].toFixed(2);\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += '\"' + temp.value[j] + '\"';\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n if (temp.value[j]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += \"'\" + temp.value[j] + \"'\";\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else if (temp.dimensions == 2) {\n ret += \"[\" + temp.rows + \"][\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k];\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k].toFixed(2);\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += '\"' + temp.value[j][k] + '\"';\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n if (temp.value[j][k]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += \"'\" + temp.value[j][k] + \"'\";\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else {\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- \" + temp.value;\n break;\n case Types.REAL:\n ret += \"<- \" + temp.value.toFixed(2);\n break;\n case Types.TEXT:\n ret += '<- \"' + temp.value + '\"';\n break;\n case Types.BOOLEAN:\n ret += \"<- \";\n if (temp.value) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n break;\n case Types.CHAR:\n ret += \"<- '\" + temp.value + \"'\";\n break;\n }\n }\n\n return ret;\n}\n\nfunction globalsCode () {\n let ret = \"\";\n\n if (window.program_obj.globals) {\n for (let i = 0; i < window.program_obj.globals.length; i++) {\n const temp = window.program_obj.globals[i];\n\n ret += \"\\n\\t\";\n\n if (temp.is_constant) {\n ret += \"const \";\n }\n switch (temp.type) {\n case Types.INTEGER:\n ret += LocalizedStrings.getUI(\"type_integer\");\n break;\n case Types.REAL:\n ret += LocalizedStrings.getUI(\"type_real\");\n break;\n case Types.TEXT:\n ret += LocalizedStrings.getUI(\"type_text\");\n break;\n case Types.BOOLEAN:\n ret += LocalizedStrings.getUI(\"type_boolean\");\n break;\n case Types.CHAR:\n ret += LocalizedStrings.getUI(\"type_char\");\n break;\n }\n ret += \" \" + temp.name + \" \";\n\n if (temp.dimensions == 1) {\n ret += \"[\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j];\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += temp.value[j].toFixed(2);\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += '\"' + temp.value[j] + '\"';\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n if (temp.value[j]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n for (let j = 0; j < temp.value.length; j++) {\n ret += \"'\" + temp.value[j] + \"'\";\n if (j + 1 < temp.value.length) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else if (temp.dimensions == 2) {\n ret += \"[\" + temp.rows + \"][\" + temp.columns + \"] \";\n\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k];\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.REAL:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += temp.value[j][k].toFixed(2);\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n break;\n case Types.TEXT:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += '\"' + temp.value[j][k] + '\"';\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.BOOLEAN:\n ret += \"<- {\";\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n if (temp.value[j][k]) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n case Types.CHAR:\n ret += \"<- {\";\n\n for (let j = 0; j < temp.rows; j++) {\n ret += \"{\";\n\n for (let k = 0; k < temp.columns; k++) {\n ret += \"'\" + temp.value[j][k] + \"'\";\n\n if (k + 1 < temp.columns) {\n ret += \", \";\n }\n }\n\n ret += \"}\";\n if (j + 1 < temp.rows) {\n ret += \", \";\n }\n }\n ret += \"}\";\n break;\n }\n } else {\n switch (temp.type) {\n case Types.INTEGER:\n ret += \"<- \" + temp.value;\n break;\n case Types.REAL:\n ret += \"<- \" + temp.value.toFixed(2);\n break;\n case Types.TEXT:\n ret += '<- \"' + temp.value + '\"';\n break;\n case Types.BOOLEAN:\n ret += \"<- \";\n if (temp.value) {\n ret += LocalizedStrings.getUI(\"logic_value_true\");\n } else {\n ret += LocalizedStrings.getUI(\"logic_value_false\");\n }\n break;\n case Types.CHAR:\n ret += \"<- '\" + temp.value + \"'\";\n break;\n }\n }\n }\n }\n\n return ret;\n}\n","import * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as CommentsManagement from './commands/comment';\nimport * as ReadersManagement from './commands/reader';\nimport * as WritersManagement from './commands/writer';\nimport * as AttributionsManagement from './commands/attribution';\nimport * as IftruesManagement from './commands/iftrue';\nimport * as RepeatNtimesManagement from './commands/repeatNtimes';\nimport * as WhiletruesManagement from './commands/whiletrue';\nimport * as DowhiletruesManagement from './commands/dowhiletrue';\nimport * as SwitchesManagement from './commands/switch';\nimport * as FunctioncallsManagement from './commands/functioncall';\nimport * as VariableValueMenuManagement from './commands/variable_value_menu';\nimport * as BreaksManagement from './commands/break';\nimport * as ReturnsManagement from './commands/return';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\n\n// let has_element_created_draged = false;\n// let which_element_is_draged = null;\n\nexport function removeCommand (command, function_obj, dom_obj) {\n\n\tregisterUserEvent(function_obj.name, ActionTypes.REMOVE_COMMAND, command.type, '/', 0);\n\n\tif (function_obj.commands.indexOf(command) > -1) {\n\t\tfunction_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\t// Utilize dois parantNode, pois o primeiro é o div de comandos\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').commands_block.indexOf(command) > -1) {\n\t\t\tdom_obj.parent().parent().data('command').commands_block.splice\n\t\t\t(dom_obj.parent().parent().data('command').commands_block.indexOf(command), 1);\n\t\t\treturn true;\n\t\t}\t\n\t} catch (err) {}\n\t\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').type == Models.COMMAND_TYPES.iftrue) {\n\t\t\tif (dom_obj.parent().parent().data('command').commands_else.indexOf(command) > -1) {\n\t\t\t\tdom_obj.parent().parent().data('command').commands_else.splice\n\t\t\t\t(dom_obj.parent().parent().data('command').commands_else.indexOf(command), 1);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t} catch (err) {}\n\n\tif (dom_obj.parent().data('switchcase')) {\n\t\tconsole.log(\"o que encontrei: \");\n\t\tconsole.log(dom_obj.parent().data('switchcase'));\n\t\tdom_obj.parent().data('switchcase').commands_block.splice(dom_obj.parent().data('switchcase').commands_block.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nwindow.function_container_active = null;\n\nexport function createFloatingCommand (function_obj, function_container, command_type, mouse_event) {\n\n\tvar floatingObject;\n\n\tswitch (command_type) {\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tfloatingObject = BreaksManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tfloatingObject = CommentsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tfloatingObject = ReadersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tfloatingObject = WritersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tfloatingObject = AttributionsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tfloatingObject = IftruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tfloatingObject = RepeatNtimesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tfloatingObject = WhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tfloatingObject = DowhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tfloatingObject = SwitchesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tfloatingObject = FunctioncallsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tfloatingObject = ReturnsManagement.createFloatingCommand();\n\t\t\tbreak;\n\t}\n\n\tfloatingObject.draggable().appendTo(\"body\");\n\n\t$('body').mouseup(function(evt) {\n\t manageCommand(function_obj, function_container, evt, command_type);\n\t $('body').off('mouseup');\n\t $('body').off('mouseover');\n\t});\n\n\tif (!function_container.hasClass('function_div') || function_container.length < 1) {\n\t\twindow.mouse_event = mouse_event;\n\t\tfunction_container = $(mouse_event.originalEvent.srcElement.closest('.function_div'));\n\t}\n\n\tconsole.log('function_container', function_container);\n\n\tfunction_container_active = function_container;\n\n\tfunction_container.find('.commands_list_div').on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\tfunction_container.find('.commands_list_div').find(\"*\").on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\n\tfunction_container.on('mouseout', function(event) {\n\t\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\t\tif (el.closest('.commands_list_div').length < 1) {\n\t\t\twindow.ghostDiv.remove();\n\t\t}\n\t});\n\t\n\tfloatingObject.css(\"position\", \"absolute\");\n\tmouse_event.type = \"mousedown.draggable\";\n\tmouse_event.target = floatingObject[0];\n\tfloatingObject.css(\"left\", mouse_event.pageX - window.divx);\n\tfloatingObject.css(\"top\", mouse_event.pageY);\n\tfloatingObject.trigger(mouse_event);\n}\n\nwindow.divx = 100;\nwindow.ghostDiv = $('<div class=\"ghost_div\">');\nwindow.active_container = null;\n\nfunction addGhostToEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.command_container');\n\n\tif (container.hasClass('switch')) {\n\t\tcontainer = $(evt.target).closest('.case_div');\t\t\n\t}\n\n\tif (!container.hasClass('dowhiletrue') && !container.hasClass('iftrue') && !container.hasClass('repeatNtimes') \n\t\t\t\t&& !container.hasClass('case_div') && !container.hasClass('whiletrue')) {\n\t\taddGhostToNotEmptyBlock(element, evt);\n\t\treturn;\n\t}\n\n\tif (window.active_container != null) {\n\t\tif (window.active_container.is(container)) {\n\t\t\tconsole.log('é o mesmo, não mudou!');\n\t\t} else {\n\t\t\tif (container.length < 1) {\n\t\t\t\tcontainer = element.closest('.commands_list_div');\n\t\t\t\tif (window.active_container.is(container)) {\n\t\t\t\t\tconsole.log('é o mesmo command list');\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('mudou para um command list');\n\t\t\t\t\twindow.active_container = container;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log('mudou para um outro container?');\n\t\t\t}\n\t\t}\n\t}\n\n\twindow.active_container = container;\n\tif (container.hasClass('iftrue')) {\n\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t$(containerIf).append(window.ghostDiv);\n\t\t} else {\n\t\t\t$(containerElse).append(window.ghostDiv);\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tcontainer.find('.case_commands_block').append(window.ghostDiv);\n\t} else {\n\t\tcontainer.find('.block_commands').append(window.ghostDiv);\n\t}\n\t\n}\n\nfunction addGhostToNotEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.dowhiletrue, .iftrue, .repeatNtimes, .case_div, .whiletrue');\n\n\t//console.log(\"\\n\\nNOT EMPTY: \", container);\n\n\t//if (window.active_container != null) {\n\t\t\n\t\t\n\t//}\n\n\tif (container.length < 1) {\n\t\tcontainer = element.closest('.commands_list_div');\n\t\twindow.active_container = container;\n\t\taddGhostToFunctionArea(element, evt);\n\t} else {\n\t\t//console.log('mudou para um outro container?');\n\t}\n\n\twindow.active_container = container;\n\n\t// quem está mais próximo? // Essa regra se aplica somente quando o over está sobre um comando\n\tvar allfilhos;\n\tconsole.log('olha o container: ', container);\n\tif (container.hasClass('iftrue')) {\n\t\t\n\t\tif ($(evt.target).closest('.data_block_if').length > 0) {\n\t\t\tallfilhos = container.find('.commands_if').children('.command_container');\n\t\t} else if ($(evt.target).closest('.data_block_else').length > 0) {\n\t\t\tallfilhos = container.find('.commands_else').children('.command_container');\n\t\t} else {\n\n\t\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t\tallfilhos = $(containerIf).children('.command_container');\n\t\t\t} else {\n\t\t\t\tallfilhos = $(containerElse).children('.command_container');\n\t\t\t}\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tallfilhos = container.children('.case_commands_block').children('.command_container');\n\t} else if (container.hasClass('commands_list_div')) {\n\t\tallfilhos = container.children('.command_container');\n\t} else {\n\t\tallfilhos = container.children('.block_commands').children('.command_container');\n\t}\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tconsole.log('topDistances\\n', topDistances, '\\nbottomDistances\\n', bottomDistances)\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n\n\tconsole.log('distancias: menorTop ', menorTop, ' menorBot ', menorBot);\n}\n\nfunction addGhostToFunctionArea (undermouse, evt) {\n\t$('.ghost_div').remove();\n\tvar allfilhos = undermouse.closest('.commands_list_div').children('.command_container');\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n\n}\n\nfunction addGhostDiv (evt) {\n\n\tvar undermouse = $(evt.target);\n\n\tif (undermouse.hasClass('ghost_div')) {\n\t\treturn;\n\t} else if (undermouse.hasClass('commands_list_div')) {\n\t\taddGhostToFunctionArea(undermouse, evt);\n\t\treturn;\n\t} else if (undermouse.hasClass('block_commands')) {\n\t\tif (undermouse.find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else if (undermouse.hasClass('case_div')) {\n\t\tif (undermouse.find('.case_commands_block').find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else {\n\t\t\n\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t\n\t} \n}\n\nfunction borderMouseDragCommand (function_obj, function_container, evt) {\n\n\tfunction_container.find('.over_command_drag').each(function( index ) {\n\t\t$(this).removeClass('over_command_drag');\n\t});\n\n\tvar prev = null;\n\n\tfunction_container.find('.commands_list_div').each(function( index ) { \n\t\tprev = $(this);\n\t\tif (prev) {\n\t\t\tvar objLeft = prev.offset().left;\n\t var objTop = prev.offset().top;\n\t var objRight = objLeft + prev.width();\n\t var objBottom = objTop + prev.height();\n\t if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n\t \tprev.addClass(\"over_command_drag\"); \n\t }\n\t }\n\t});\n\n\tfunction_container.find('.command_container').each(function( index ) { \n\t\tvar obj = $(this);\n\t\tvar objLeft = obj.offset().left;\n var objTop = obj.offset().top;\n var objRight = objLeft + obj.width();\n var objBottom = objTop + obj.height();\n if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n \tif (prev) {\n \t\tprev.removeClass('over_command_drag');\n \t}\n \tobj.addClass(\"over_command_drag\"); \n \treturn;\n }\n\t});\n}\n\n// before_after_inside: 1 -> before, 2 -> after, 3 -> inside\nexport function renderCommand (command, element_reference, before_after_inside, function_obj) {\n\tvar createdElement;\n\tswitch (command.type) {\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tcreatedElement = CommentsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tcreatedElement = BreaksManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tcreatedElement = ReadersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tcreatedElement = WritersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tcreatedElement = AttributionsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tcreatedElement = FunctioncallsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tcreatedElement = IftruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tcreatedElement = RepeatNtimesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tcreatedElement = WhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tcreatedElement = DowhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tcreatedElement = SwitchesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tcreatedElement = ReturnsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\t}\n\tswitch (before_after_inside) {\n\t\tcase 1:\n\t\t\tcreatedElement.insertBefore(element_reference);\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tcreatedElement.insertAfter(element_reference);\n\t\t\tbreak;\n\n\t\tcase 3: \n\t\t\telement_reference.append(createdElement);\n\t\t\tbreak;\n\t}\n\n}\n\nexport function genericCreateCommand (command_type) {\n\n\tswitch (command_type) {\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\treturn new Models.Break();\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\treturn new Models.Comment(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_value, LocalizedStrings.getUI('text_comment'), null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\treturn new Models.Reader(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\treturn new Models.Writer([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\treturn new Models.Attribution(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t[]);\n \n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\treturn new Models.FunctionCall(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_function, null, null, null, false), null);\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\treturn new Models.IfTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n//(var_attribution, var_incrementation, expression1, expression2, expression3, commands_block)\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\treturn new Models.RepeatNTimes(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false),\n\t\t\t\t\t\t\t\t\t\t null, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), null, null);\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\treturn new Models.WhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\treturn new Models.DoWhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\n\t\t\tvar sc = [new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true))];\n\n\t\t\treturn new Models.Switch(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true), sc);\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\treturn new Models.Return([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\t}\n}\n\nfunction dragTrash (event) {\n\n\t$('.ghost_div').remove();\n\n\tvar trash = $('<i class=\"ui icon trash alternate outline\"></i>');\n\t$('body').append(trash);\n\ttrash.css('position', 'absolute');\n\ttrash.css('top', event.clientY);\n\ttrash.css('left', event.clientX - 20);\n\ttrash.css('font-size', '3em');\n\ttrash.css('display', 'none');\n\n\tfunction_container_active.find('.commands_list_div').off('mousemove');\n\tfunction_container_active.find('.commands_list_div').find(\"*\").off('mousemove');\n\n\ttrash.fadeIn( 200, function() {\n\t\ttrash.fadeOut( 200, function() {\n\t\t\ttrash.remove();\n\t\t} );\n });\n}\n\nfunction findSingleElement (searching, query) {\n\n\tif (!searching || !query) {\n\t\treturn '';\n\t}\n\n\tif (searching.type == Models.COMMAND_TYPES.repeatNtimes || \n\t\tsearching.type == Models.COMMAND_TYPES.whiletrue ||\n\t\tsearching.type == Models.COMMAND_TYPES.dowhiletrue) {\n\n\t\tif (searching.commands_block) {\n\t\t\treturn '' + searching.commands_block.indexOf(query);\n\t\t} else {\n\t\t\treturn '0';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.iftrue) {\n\n\t\tif (searching.commands_block == null) {\n\t\t\tsearching.commands_block = [];\n\t\t}\n\t\tif (searching.commands_else == null) {\n\t\t\tsearching.commands_else = [];\n\t\t}\n\n\t\tconsole.log('\\n\\nveja onde: ', searching.commands_block, ' \\n\\nquery: ', query);\n\n\t\tif (searching.commands_block.indexOf(query) >= 0) {\n\t\t\treturn 'if[' + searching.commands_block.indexOf(query) + ']';\n\t\t} else {\n\t\t\treturn 'else[' + searching.commands_else.indexOf(query) + ']';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.switch) {\n\n\t\tfor (var i = 0; i < searching.cases.length; i++) {\n\t\t\tif (searching.cases[i].commands_block.indexOf(query) >= 0) {\n\t\t\t\treturn 'case[' + searching.cases[i].commands_block.indexOf(query) + ']';\n\t\t\t}\n\t\t}\n\n\t}\n\n}\n\nfunction findPathRecursive (starter_index, hierarquia_bottom_up, function_obj, index_command = -1, actual = null) {\n\tvar full_path = '';\n\t\n\tfor (var i = 0; i <= hierarquia_bottom_up.length; i ++) {\n\n\t\tconsole.log('\\n\\n:: ', i, ':\\n', hierarquia_bottom_up[i]);\n\n\t\tfull_path += findSingleElement(hierarquia_bottom_up[i], hierarquia_bottom_up[i + 1]) + '-';\n\t}\n\n\treturn full_path;\n}\n\nfunction manageCommand (function_obj, function_container, event, command_type) {\n\n\t$( \".created_element\" ).each(function( index ) { \n\t\t$(this).remove();\n\t});\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tif (el.hasClass('ghost_div')) {\n\t\tif (el.closest('.command_container').length < 1) {\n\t\t\t\n\n\t\t\tconsole.log('\\n\\nvou tentar!!!!');\n\n\t\t\tconsole.log(el.closest('.commands_list_div'), '\\n\\n');\n\n\t\t\tel.closest('.commands_list_div').css('height', el.closest('.commands_list_div').css('height') + 30);\n\t\t\t\n\t\t\t//$('.ghost_div').remove();\n\n\t\t\tel = el.closest('.commands_list_div');\n\t\t}\n\t}\n\n\tconsole.log('soltou no: ');\n\tconsole.log(el);\n\tconsole.log(el.data('fun'));\n\n\t// Primeiro verificar se ele soltou no espaço da função correta:\n\tvar hier = el.parentsUntil(\".all_functions\");\n\tvar esta_correto = false;\n\tvar esta_na_div_correta = false;\n\tif (el.hasClass(\"commands_list_div\")) {\n\t\testa_na_div_correta = true;\n\t} \n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (temp.hasClass(\"commands_list_div\")) {\n\t\t\testa_na_div_correta = true;\n\t\t} \n\t\tif (temp.data('fun') == function_obj) {\n\t\t\testa_correto = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!esta_correto) {\n\t\t// has_element_created_draged = false;\n\t\t// which_element_is_draged = null;\n\t\tdragTrash(event);\n\t\treturn;\n\t} else {\n\t\tif (!esta_na_div_correta) {\n\t\t\t// has_element_created_draged = false;\n\t\t\t// which_element_is_draged = null;\n\t\t\tdragTrash(event);\n\t\t\treturn;\n\t\t}\n\t}\n\tvar hierarquia_bottom_up = null;\n\t// Agora é descobrir qual o escopo para adicionar o comando:\n\tconsole.log('ev0');\n\t// Se o elemento clicado possuir o atributo \"fun\", então, é direto na div dos comandos:\n\tif (typeof el.data('fun') !== 'undefined') {\n\n\t\t// Se a lista de comandos estiver vazia, então é o primeiro.\n\t\t// Portanto, ele deve soltar o elemento obrigatoriamente no objeto vazio\n\t\tif ((el.data('fun').commands == null) || (el.data('fun').commands.length == 0)) {\n\t\t\t\t// pode adicionar \n\t\t\t\tel.data('fun').commands = [];\n\n\t\t\t\tvar new_cmd = genericCreateCommand(command_type);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', 0);\n\n\t\t\t\tel.data('fun').commands.push(new_cmd);\n\n\t\t\t\trenderCommand(new_cmd, $(function_container).find('.commands_list_div'), 3, function_obj);\n\t\t\t\n\t\t} else { // Entra nesse else, caso já existam outros comandos no bloco:\n\n\t\t\tfindNearbyCommandToAddInFunctionScope(el, event, $(function_container).find('.commands_list_div'), function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\tconsole.log(\"soltou em um comando\");\n\t\t// descobrir em qual comando ele soltou: \n\t\tvar hier_find = el.parentsUntil(\".commands_list_div\");\n\t\thierarquia_bottom_up = [];\n\t\tif (typeof el.data('command') !== 'undefined') {\n\t\t\thierarquia_bottom_up.push(el.data('command'));\n\t\t}\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\thierarquia_bottom_up.push($(hier_find[i]).data('command'));\n\t\t\t}\n\t\t}\n\t\tconsole.log(\"comando em que soltou: \");\n\t\tconsole.log(hierarquia_bottom_up[0]);\n\t\tconsole.log(\"hierarquia de baixo para cima na árvore, de onde ele soltou: \");\n\t\tfor (var i = 0; i < hierarquia_bottom_up.length; i++) {\n\t\t\tconsole.log(hierarquia_bottom_up[i]);\n\t\t}\n\n\t\t// Se for do tipo break, verificar se está no contexto correto: \n\t\t// Caso não esteja no contexto, apenas retorna sem dar continuidade:\n\t\tvar is_correct_context = false;\n\t\tif (command_type == Models.COMMAND_TYPES.break) {\n\t\t\tfor (var i = 0; i < hierarquia_bottom_up.length; i++) {\n\t\t\t\tif ((hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.repeatNtimes)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.whiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.dowhiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.switch)) {\n\n\t\t\t\t\tis_correct_context = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!is_correct_context) {\n\t\t\t\tconsole.error(\"Context not allowed to insert BREAK COMMAND!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// se a hierarquia possuir apenas um elemento, então está na raiz dos comandos: \n\t\tif (hierarquia_bottom_up.length == 1) {\n\t\t\tconsole.log('QQ1');\n\t\t\tvar sub_elemento = false;\n\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\tconsole.log('QQ2');\n\t\t\t\t\tfindBeforeOrAfterCommandToAdd(hier_find[i], event, function_obj, command_type);\n\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!sub_elemento) {\n\t\t\t\tconsole.log('QQ3');\n\t\t\t\tfindBeforeOrAfterCommandToAdd(el[0], event, function_obj, command_type);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log('QQ4');\n\t\t\t// caso exista mais de um elemento na hierarquia:\n\t\t\tif (typeof $(el).data('command') !== 'undefined') {\n\t\t\t\tconsole.log('QQ5');\n\t\t\t\tconsole.log(\"PPP1\");\n\t\t\t\tinsertCommandInBlockHierar(el[0], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t} else {\n\t\t\t\tconsole.log('QQ6');\n\t\t\t\tvar sub_elemento = false;\n\t\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\t\tconsole.log('QQ7');\n\t\t\t\t\t\tinsertCommandInBlockHierar(hier_find[i], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\t// has_element_created_draged = false;\n\t// which_element_is_draged = null;\n\n\tif (hierarquia_bottom_up) {\n\t\tconsole.log('\\n\\n:::índices::\\n\\n');\n\t\tvar i = hierarquia_bottom_up.length - 1;\n\t\tvar starter_index = window.program_obj.functions[window.program_obj.functions.indexOf(function_obj)].commands.indexOf(hierarquia_bottom_up[i]);\n\t\tvar all_str_path = starter_index + '-' + findPathRecursive(starter_index, hierarquia_bottom_up, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' , all_str_path);\n\t\tconsole.log('\\n\\nfull path: \\n\\n', all_str_path);\n\t\tconsole.log('fim dos índices');\n\t}\n\n\trenderAlgorithm();\n}\n\nfunction insertCommandInBlockHierar (el, event, function_obj, command_type, hier_dom, hier_obj) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\t\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.switch) ) {\n\n\t\tconsole.log('QQ17');\n\n\t\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t\tconsole.log('QQ18');\n\n\t\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' + el_jq.data('command').type, 0);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindNearbyCommandToAddInBlockScope(el, event, el, function_obj, command_type, command_parent);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// QUANDO FOR BLOCO DO TIPO IF OU SWITCH/CASE:\n\t\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\tconsole.log('QQ19');\n\t\t// entra neste bloco, se soltou o comando sobre outro comando dentro de um subbloco:\n\t\tfindBeforeOrAfterCommandToAddInsertBlock(el, event, function_obj, command_type);\n\t}\n}\n\nfunction findNearbyCommandToAddInBlockScope (el, event, node_list_commands, function_obj, command_type, command_parent) {\n\n\tconsole.log(\"\\n\\n\\n::COMANDOS:\\n\\n\", el, event, node_list_commands, function_obj, command_type, command_parent);\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tcommand_parent.commands_block.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAddInsertBlock (el, event, function_obj, command_type) {\n\n\tvar el_jq = $(el);\n\tvar command_parent = $(el.parentNode.parentNode).data('command');\n\tvar command_target = el_jq.data('command');\n\tvar temp_parent = $(el.parentNode.parentNode);\n\n\tvar is_in_else = false;\n\n\tif (!command_parent) {\n\t\tcommand_parent = el_jq.data('command');\n\t\ttemp_parent = el_jq;\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t}\n\t\t\tif (typeof temp.data('command') != 'undefined') {\n\t\t\t\tcommand_parent = temp.data('command');\n\t\t\t\ttemp_parent = temp;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tvar hier = el_jq.parentsUntil(\".command_container\");\n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\tis_in_else = true;\n\t\t}\n\t}\n\n\tif (command_parent == command_target) {\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ((command_parent.type != Models.COMMAND_TYPES.iftrue) && (command_parent.type != Models.COMMAND_TYPES.switch)) {\n\t\tvar hier = temp_parent.parentsUntil(\".all_cases_div\");\n\t\tconsole.log(\"vou procurar!!\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tconsole.log(\"estou vasculhando...\");\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('switchcase') !== 'undefined') {\n\t\t\t\tconsole.log(\"encontrei\");\n\t\t\t\tcommand_parent = temp.data('switchcase');\n\t\t\t\tis_in_else = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log('debugging:');\n\tconsole.log('el_jq');\n\tconsole.log(el_jq);\n\tconsole.log('command_parent');\n\tconsole.log(command_parent);\n\tconsole.log('command_target');\n\tconsole.log(command_target);\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tconsole.log('MMM1');\n\n\t\tif (is_in_else) {\n\n\t\t\tconsole.log('MMM2');\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('MMM3');\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log('MMM7');\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t} else {\n\t\t\tconsole.log('MMM4');\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('Nxxxx5');\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\t\t\t\t\tconsole.log('SSS4');\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('SSS5');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log('MMM6');\n\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t}\n\n\t\t\n\n\t} else {\n\t\tconsole.log('XXX1');\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tif (is_in_else) {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('MMM3');\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\t\t\t\t\tconsole.log('SSS1');\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tconsole.log('SSS2');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log('XXX2');\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\n\t\t} else {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('Nxxxx78');\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\t\tconsole.log('SSS6');\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('SSS7');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log('XXX3');\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\t}\n\n\t\t\n\t}\n}\n\nfunction insertCommandInBlock (el, event, function_obj, command_type) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\tcommand_parent.commands_block = [];\n\n\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t} else { // Se já tem algum comando no bloco:\n\t\t\tfindInBlockCorrectPlace(el, event, function_obj, command_type);\n\t\t}\n\n\t} else if (el_jq.data('command').type == Models.COMMAND_TYPES.iftrue) {\n\n\t\tconsole.log('QQ9');\n\t\t\n\t\t// no if ou no else?\n\t\tvar correct_div = $(document.elementFromPoint(event.pageX, event.pageY));\n\t\tvar is_in_if = true;\n\t\tif (correct_div.data('if')) {\n\t\t\tis_in_if = true;\n\t\t} else if (correct_div.data('else')) {\n\t\t\tis_in_if = false;\n\t\t} else {\n\t\t\tvar hier = correct_div.parentsUntil(\".command_container\");\n\t\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\t\tvar temp = $(hier[i]);\n\t\t\t\tif (typeof temp.data('if') !== 'undefined') {\n\t\t\t\t\tis_in_if = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\t\tis_in_if = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (is_in_if) {\n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_if'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_if'), event, function_obj, command_type);\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_else'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_else'), event, function_obj, command_type, true);\n\t\t\t}\n\n\t\t}\n\n\t} else { // é do tipo switch\n\t\tconsole.log(\"está tentando inserir em um switch que está na raiz!\");\n\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t}\n}\n\nfunction addCommandToSwitchCase (event, function_obj, command_type) {\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tvar which_case = el.data('switchcase');\n\tvar case_div = el;\n\t\n\tif (!which_case) {\n\t\tvar hier_find = el.parentsUntil(\".all_cases_div\");\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('switchcase') !== 'undefined') {\n\t\t\t\twhich_case = $(hier_find[i]).data('switchcase');\n\t\t\t\tcase_div = $(hier_find[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (which_case.commands_block == null || which_case.commands_block.length < 1) {\n\t\twhich_case.commands_block = [];\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\twhich_case.commands_block.push(recentComand);\n\t\trenderCommand(recentComand, case_div.find('.case_commands_block'), 3, function_obj);\n\t} else {\n\t\tfindInBlockCorrectPlaceInSwitchCase(which_case, case_div, event, function_obj, command_type);\n\t}\n\n}\n\n\n\n\nfunction findInBlockCorrectPlaceInSwitchCase (which_case, case_div, event, function_obj, command_type) {\n\n\tvar all_sub = case_div.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\twhich_case.commands_block.push(recentComand);\n\n\t\trenderCommand(recentComand, $(case_div.find('.case_commands_block')[0]), 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = which_case.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t which_case.commands_block.splice(index, 0, recentComand);\n\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t}\n\t}\n}\n\nfunction findInBlockCorrectPlace (el, event, function_obj, command_type, is_in_else = false) {\n\tvar el_jq = $(el);\n\tvar all_sub = el_jq.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\n\tconsole.log(\"menor_distancia: \");\n\tconsole.log(elemento_menor_distancia);\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\n\t\tconsole.log('QQ11');\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\t\t\tconsole.log('QQ15');\n\t\t\tcommand_parent.commands_else.push(recentComand);\n\t\t\tconsole.log('el_jq');\n\t\t\tconsole.log(el_jq);\n\t\t\tconsole.log(\"$(el_jq.find('.commands_else')[0]):: \");\n\t\t\tconsole.log($(el_jq.find('.commands_else')[0]));\n\n\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\n\t\t} else {\n\t\t\tconsole.log('QQ16');\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, $(el_jq.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\n\t} else {\n\n\t\tconsole.log('QQ12');\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\n\t\t\tvar index = command_parent.commands_else.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t} else {\n\t\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t}\n\t\t\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAdd (el, event, function_obj, command_type) {\n\tswitch ($(el).data('command').type) {\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tinsertCommandInBlock(el, event, function_obj, command_type);\n\t\t\treturn;\n\t}\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\n\t} else {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice((index + 1), 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n\nfunction findNearbyCommandToAddInFunctionScope (el, event, node_list_commands, function_obj, command_type) {\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tfunction_obj.commands.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', function_obj.commands.length - 1);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as ExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui attribution created_element\"> <i class=\"ui icon small arrow left\"></i> <span> x <&#8212; 1 + 1 </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\t\n\tvar el = $('<div class=\"ui attribution command_container\"><i class=\"ui icon small arrow left command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_attributed\"></div> <span class=\"text_attr_receives span_command_spec\">'+LocalizedStrings.getUI('text_receives')+'</span> '\n\t\t + '<div class=\"expression_elements\"></div> </div>');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.var_attributed'), function_obj);\n\n\tif (!command.expression || command.expression.length < 1) {\n\t\tvar exp = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\tcommand.expression.push(exp);\n\t}\n\n\taddHandlers(command, function_obj, el);\n\n\tExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.expression);\n\n\t//renderExpressionElements(command, function_obj, el);\n\n\treturn el;\n\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, selectedItem, expression_element) {\n\t\n\tvar index_to_move = expression_element.itens.indexOf(ref_object);\n\n\tswitch (selectedItem.data('exp')) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [expression_element.itens[index_to_move],\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\texpression_element.itens[index_to_move] ]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [expression_element.itens[index_to_move]]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\t}\n\n\trenderExpressionElements(command, function_obj, dom_object);\n\n}\n\nfunction renderExpressionElements (command, function_obj, el) {\n\tvar expression_div = el.find('.expression_elements');\n\tvar command_container;\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tcommand_container = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\texpression_div = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (command_container) {\n\t\texpression_div = command_container.find('.expression_elements');\n\t}\n\n\texpression_div.text('');\n\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tvar temp = $('<div class=\"expression_element\"></div>');\n\t\ttemp.data('ref_element', command.expression[i]);\n\t\ttemp.data('ref_index', i);\n\n\t\texpression_div.append(temp);\n\n\t\trenderElement(command, function_obj, temp, command.expression[i]);\n\t}\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar context_menu = '<div class=\"ui dropdown\"><div class=\"text\">';\n\n\tswitch (expression_element.itens[index_op]) {\n\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\tcontext_menu += '+';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\tcontext_menu += '-';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\tcontext_menu += '*';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\tcontext_menu += '/';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\tcontext_menu += '%';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.none:\n\t\t\tcontext_menu += '...';\n\t\t\tbreak;\n\t}\n\t\n\tcontext_menu += '</div><div class=\"menu\">';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.plus+'\">+</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.minus+'\">-</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.multiplication+'\">*</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.division+'\">/</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.module+'\">%</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.ARITHMETIC_TYPES.none+'\" data-text=\"...\">Nenhum</div>';\n\tcontext_menu += '</div></div>';\n\n\tcontext_menu = $(context_menu);\n\n\ttemp_op.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t expression_element.itens[index_op] = value;\n }\n\t});\n\n}\n\nfunction renderMenuAddExpression (command, function_obj, el, dom_append_menu, expression_append_new_expression) {\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tel = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom_append_menu.hasClass(\"expression_elements\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\tdom_append_menu = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar context_menu = '<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"ui icon arrow alternate circle right outline\"></i><div class=\"menu\">';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n\tcontext_menu += '<div class=\"item\" data-value=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n\tcontext_menu += '</div></div>';\n\n\tcontext_menu = $(context_menu);\n\n\tdom_append_menu.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t switch (value) {\n\t \tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t \tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\trenderExpressionElements(command, function_obj, el);\n }\n\t});\n\n}\n\nfunction renderElement (command, function_obj, el, expression_element) {\n\n\tswitch (expression_element.type_exp) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar temp_op = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp_1 = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp_2 = $('<div class=\"component_element\"></div>');\n\n\t\t\tel.append(temp_exp_1);\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp_2);\n\t\t\t\n\t\t\tif (expression_element.itens[0].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[0], temp_exp_1, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_1, expression_element.itens[0]);\n\t\t\t}\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 1);\n\n\t\t\tif (expression_element.itens[2].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[2], temp_exp_2, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_2, expression_element.itens[2]);\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar temp_op = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_exp = $('<div class=\"component_element\"></div>');\n\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp);\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 0);\n\n\t\t\tif (expression_element.itens[1].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[1], temp_exp, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[1]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar temp_par_1 = $('<div class=\"component_element\"> ( </div>');\n\t\t\tvar temp_exp = $('<div class=\"component_element\"></div>');\n\t\t\tvar temp_par_2 = $('<div class=\"component_element\"> ) </div>');\n\n\t\t\tel.append(temp_par_1);\n\t\t\tel.append(temp_exp);\n\n\t\t\tfor (var j = 0; j < expression_element.itens.length; j++) {\n\t\t\t\tif (expression_element.itens[j].type) {\n\t\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[j], temp_exp, function_obj, 2, expression_element);\n\t\t\t\t} else {\n\t\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\t//renderMenuAddExpression(command, function_obj, el, el, expression_element.itens);\n\n\t\t\tel.append(temp_par_2);\n\n\t\t\tbreak;\n\t}\n\n}\n\n\nfunction renderExpression (command, function_obj, el) {\n\n\tvar expression_div = el.find('.expression_elements');\n\texpression_div.text('');\n\n\tvar menu_add_item = $('<div class=\"menu_add_item\"></div>');\n\tmenu_add_item.data('index_add', 0);\n\n\texpression_div.append(menu_add_item);\n\t\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tif (command.expression[i].type) {\n\n\t\t\tvar temp = $('<div class=\"expression_element\"></div>');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t\tVariableValueMenu.renderMenu(command, command.expression[i], temp, function_obj);\n\n\t\t} else if (command.expression[i] == \"(\" || command.expression[i] == \")\") {\n\n\t\t\tvar temp = $('<div class=\"expression_element\">'+command.expression[i]+'</div>');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t} else {\n\n\t\t\tvar temp = '<div class=\"expression_element\">';\n\n\t\t\tswitch(command.expression[i]) {\n\t\t\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\t\t\ttemp += '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\t\t\ttemp += '-';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\t\t\ttemp += '*';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\t\t\ttemp += '/';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\t\t\ttemp += '%';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttemp += '</div>';\n\t\t\ttemp = $(temp);\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t}\n\t\t\n\t\tvar menu_add_item_seq = $('<div class=\"menu_add_item\"></div>');\n\t\tvar index_temp = (i + 1);\n\t\tmenu_add_item_seq.data('index_add', index_temp);\n\t\texpression_div.append(menu_add_item_seq);\n\n\t}\n\n\taddMenuItens(command, function_obj, el);\n\n}\n\nfunction addMenuItens (command, function_obj, expression_div) {\n\tvar divs_expression = expression_div.find('.menu_add_item');\n\n\tfor (var i = 0; i < divs_expression.length; i++) {\n\n\t\tvar temp = $(divs_expression[i]).data('index_add');\n\n\t\tvar context_menu = '<div class=\"ui dropdown context_menu_clear\"><i class=\"ui icon plus square outline\"></i><div class=\"menu\">';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"value\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_value')+'</div>';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"operator\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_operator')+'</div>';\n\t\tcontext_menu += '<div class=\"item\" data-option=\"parentheses\" data-index=\"'+temp+'\">'+LocalizedStrings.getUI('text_parentheses')+'</div>';\n\t\tcontext_menu += '</div></div>';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\t$(divs_expression[i]).append(context_menu);\n\n\t\tcontext_menu.dropdown({\n\t on: 'hover',\n\t onChange: function(value, text, $selectedItem) {\n \t\tswitch ($selectedItem.data('option')) {\n \t\t\tcase \"value\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"operator\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, Models.ARITHMETIC_TYPES.plus);\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"parentheses\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, \"(\");\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 1, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 2, 0, \")\");\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t }\n \t}\n\t });\n\n\t}\n}\n\n\nfunction addHandlers (command, function_obj, attribution_dom) {\n\n\tattribution_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, attribution_dom)) {\n\t\t\tattribution_dom.fadeOut(400, function() {\n\t\t\t\tattribution_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n\n\tattribution_dom.find('.button_refresh_attribution').on('click', function() {\n\t\trenderExpressionElements(command, function_obj, attribution_dom);\n\t});\n}\n\nexport function renderMenuOperations (command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected) {\n\n\t/*console.log(\"recebido o seguinte DOM: \");\n\tconsole.log(dom_object);\n\n\tif (dom_object.hasClass('var_attributed')) {\n\t\treturn;\n\t} else {\n\t\tvar hier = dom_object.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass('var_attributed') || $(hier[i]).hasClass('parameters_function_called')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t}\n\n\tdom_object.find('.context_menu_clear').remove();\n\n\n\tvar menu_operations = '<div class=\"ui dropdown menu_operations\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\n\tfor (var tm in Models.ARITHMETIC_TYPES) {\n\n\t\tmenu_operations += '<div class=\"item\" data-option=\"'+tm+'\">'+LocalizedStrings.getUI('btn_arithmetic_' + tm)+'</div>';\n }\n menu_operations += '<div class=\"item\" data-option=\"clear\">'+LocalizedStrings.getUI('btn_clear')+'</div>';\n\t\n menu_operations += '</div></div>';\n\n menu_operations = $(menu_operations);\n\n dom_object.append(menu_operations);\n\n menu_operations.dropdown({\n \tonChange: function(value, text, $selectedItem) {\n \t\tswitch ($($selectedItem).data('option')) {\n \t\t\tcase \"clear\":\n\t \t\t\t$(dom_object).text('');\n\t\t \t \tVariableValueMenu.renderMenu(command, ref_object, dom_object, function_obj);\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tcreateExpressionAround(command, ref_object, dom_object, function_obj);\n \t\t\t\tmenu_operations.find('.text').text('');\n \t\t}\n }\n });*/\n}\n\nfunction createExpressionAround (command, ref_object, dom_object, function_obj) {\n\t$('<span> ( </span>').insertBefore(dom_object);\n\t$('<span> ) </span>').insertAfter(dom_object);\n\n\tVariableValueMenu.renderMenu(command, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), dom_object, function_obj);\n}\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui comment created_element\"> <i class=\"ui icon small pause\"></i> <span> '+LocalizedStrings.getUI('text_break')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui comment command_container\"> <i class=\"ui icon small pause\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span>'+LocalizedStrings.getUI('text_break')+'</span> </div>');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, break_dom) {\n\n\tbreak_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, break_dom)) {\n\t\t\tbreak_dom.fadeOut(400, function() {\n\t\t\t\tbreak_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui comment created_element\"> <i class=\"ui icon small quote left\"></i> <span class=\"span_comment_text\" \"> '+LocalizedStrings.getUI('text_comment')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui comment command_container\"> <i class=\"ui icon small quote left command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_value_menu_div\"></div> <div class=\"div_comment_text\">'+'</div> </div>');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\trenderTextComment(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction renderTextComment (command, function_obj, el) {\n\tVariableValueMenu.renderMenu(command, command.comment_text, el.find('.var_value_menu_div'), function_obj, 20);\n}\n\nfunction addHandlers (command, function_obj, comment_dom) {\n\n\tcomment_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, comment_dom)) {\n\t\t\tcomment_dom.fadeOut(400, function() {\n\t\t\t\tcomment_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenuManagement from './variable_value_menu';\n\n\nexport function renderExpression (command, expression, function_obj, initial_el_to_render) {\n\n\texpression.dom_object = initial_el_to_render;\n\n\tif (expression.expression == null || expression.expression.length < 1) {\n\n\t\trenderStartMenu(command, expression, function_obj, initial_el_to_render);\n\n\t} else {\n\t\t\n\t\tvar main_div = $('<div class=\"expression_elements\"></div>');\n\n\t\tswitch (expression.expression.type) {\n\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\trenderLogicExpression(command, expression, expression.expression, function_obj, main_div, initial_el_to_render);\n\t\t\t\tbreak;\n\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\trenderArithmeticExpression(command, expression, expression.expression, function_obj, main_div);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tinitial_el_to_render.append(main_div);\t\n\t\tvar restartMenu = $('<div class=\"ui restart_expression\"><i class=\"ui icon undo\"></i></div>');\n\t\tinitial_el_to_render.append(restartMenu);\t\n\t\trestartMenu.on('click', function(e){\n\t \texpression.expression = null;\n\t \tinitial_el_to_render.empty();\n\t \trenderExpression(command, expression, function_obj, initial_el_to_render);\n\t \t});\n\t}\n}\n\nfunction renderArithmeticOperator (command, all_expression, expression_arithmetic, arithmetic_operator, function_obj, element_to_append) {\n\n\tvar menu_operator = $('<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"dropdown icon\"></i></div>');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '>',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than)\n\t },\n\t {\n\t name : '<',\n\t value : Models.ARITHMETIC_COMPARISON.less_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than)\n\t },\n\t {\n\t name : '==',\n\t value : Models.ARITHMETIC_COMPARISON.equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.ARITHMETIC_COMPARISON.not_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '>=',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to)\n\t },\n\t {\n\t name : '<=',\n\t value : Models.ARITHMETIC_COMPARISON.less_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than_or_equals_to)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_arithmetic.operator = value;\n\t }\n\t })\n\t;\n\n\telement_to_append.append(menu_operator);\n}\n\nfunction renderLogicOperator (command, all_expression, expression_logic, logic_operator, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar menu_operator = $('<div class=\"ui dropdown\"><div class=\"text\"></div><i class=\"dropdown icon\"></i></div>');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '==',\n\t value : Models.LOGIC_COMPARISON.equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.LOGIC_COMPARISON.not_equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '&&',\n\t value : Models.LOGIC_COMPARISON.and,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.and)\n\t },\n\t {\n\t name : '||',\n\t value : Models.LOGIC_COMPARISON.or,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.or)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \tif ($selectedItem) {\n\t\t \texpression_logic.operator = value;\n\t\t \tif (expression_logic.second_operand == null) {\n\t\t \t\texpression_logic.second_operand = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t \t\tinitial_el_to_render.empty();\n\t\t \t\trenderExpression(command, all_expression, function_obj, initial_el_to_render);\n\t\t \t}\n\t \t}\n\t }\n\t });\n\n\telement_to_append.append(menu_operator);\n\n}\n\n\nfunction renderLogicExpression (command, all_expression, expression_logic, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar exp_el_par_1 = $(' <span class=\"span_command_spec\"> </span> ');\n\tvar exp_el_expr_el_1 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_operand = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_el_2 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_par_2 = $(' <span class=\"span_command_spec\"> </span> ');\n\n\tif (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\n\trenderLogicOperator(command, all_expression, expression_logic, expression_logic.operator, function_obj, exp_el_expr_operand, initial_el_to_render);\n\n\telement_to_append.append(exp_el_expr_operand);\n\n\tif (expression_logic.second_operand) {\n\t\tif (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\t\trenderLogicExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else if (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\t\trenderArithmeticExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else {\n\t\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.second_operand, exp_el_expr_el_2, function_obj);\n\t\t}\n\n\t\telement_to_append.append(exp_el_expr_el_2);\n\t}\n\n\telement_to_append.append(exp_el_par_2);\n\n}\n\nfunction renderArithmeticExpression (command, all_expression, expression_arithmetic, function_obj, element_to_append) {\n\n\tvar exp_el_par_1 = $(' <span class=\"span_command_spec\"> </span> ');\n\tvar exp_el_expr_el_1 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_operand = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_expr_el_2 = $('<div class=\"expression_element\"></div>');\n\tvar exp_el_par_2 = $(' <span class=\"span_command_spec\"> </span> ');\n\n\n\tif (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\tif (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else if (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.second_operand, exp_el_expr_el_2, function_obj);\n\t}\n\n\trenderArithmeticOperator(command, all_expression, expression_arithmetic, expression_arithmetic.operator, function_obj, exp_el_expr_operand);\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\telement_to_append.append(exp_el_expr_operand);\n\telement_to_append.append(exp_el_expr_el_2);\n\telement_to_append.append(exp_el_par_2);\n}\n\nfunction renderStartMenu (command, expression, function_obj, initial_el_to_render) {\n\tvar start_menu = '';\n\tstart_menu += '<div class=\"ui dropdown menu_start_rendered\"><div class=\"text\"><i>'+LocalizedStrings.getUI('expression_menu_select')+'</i></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\tstart_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_TYPES.exp_logic+'\">'+LocalizedStrings.getUI('text_logic_expression')+' (EL == EL and EL)</div>';\n\tstart_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_TYPES.exp_arithmetic+'\">'+LocalizedStrings.getUI('text_arithmetic_expression')+' (EA < EA)</div>';\n\tstart_menu += '</div></div>';\n\tstart_menu = $(start_menu);\n\n\tstart_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tswitch ($selectedItem.data('exp')) {\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.LogicExpression(false, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tinitial_el_to_render.html('');\n\n\t\t\trenderExpression(command, expression, function_obj, initial_el_to_render);\n \t},\n \tselectOnKeydown: false\n\t});\n\n\tinitial_el_to_render.append(' <span class=\"span_command_spec\"> </span> ');\n\t\n\tinitial_el_to_render.append(start_menu);\n\n\tinitial_el_to_render.append(' <span class=\"span_command_spec\"> </span> ');\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as SwitchManagement from './switch';\n\nexport function renderMenu (command, dom_where_render, function_obj, dom_command) {\n\n\tvar menu_div = '<button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button> <div class=\"ui dropdown menu_commands pause\" ><i class=\"icon pause\"></i> <div class=\"menu\"> ';\n\n\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.break+'\"><i class=\"pause icon\"></i> '+LocalizedStrings.getUI('btn_break')+' </a>';\n\n\t} else {\n\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.break+'\"><i class=\"pause icon\"></i> '+LocalizedStrings.getUI('btn_break')+' </a>';\n\t\tmenu_div += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.switchcase+'\"><i class=\"pause icon\"></i> '+LocalizedStrings.getUI('btn_case')+' </a>';\n\n\t}\n\n\tmenu_div += '</div></div>';\n\n\tmenu_div = $(menu_div);\n \t\n\tdom_where_render.append(menu_div);\n\n\taddHandlers(command, dom_where_render, function_obj, dom_command);\n\n\tif (command.collapsed) {\n\t\tdom_command.children('.ui.block_commands').toggle();\n\t}\n}\n\nfunction addHandlers (command, dom_where_render, function_obj, dom_command) {\n\n\tdom_where_render.find('.minimize_block_button').on('click', function(evt){\n\t\tdom_command.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\tdom_where_render.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\t\n\tdom_where_render.find('.menu_commands a').on('click', function(evt){\n\n\t\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\t\t\tif (command.commands_block == null || command.commands_block.length == 0) {\n\n\t\t\t command.commands_block = [];\n\n\t\t\t var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n\t\t\t command.commands_block.push(new_cmd);\n\n\t\t\t CommandsManagement.renderCommand(new_cmd, dom_command.find('.block_commands'), 3, function_obj);\n\n\t\t\t } else {\n\t\t\t CommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t }\n\n\t\t} else {\n\n\t\t\tswitch ($(this).data('command')) {\n\t\t\t\tcase Models.COMMAND_TYPES.break:\n\t\t\t\t\tCommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.COMMAND_TYPES.switchcase:\n\t\t\t\t\taddCaseToSwitch(command, dom_where_render, function_obj, dom_command);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t});\n}\n\nfunction addCaseToSwitch (command, dom_where_render, function_obj, dom_command) {\n\t\n\tif ((command.cases == null)) {\n\t\tcommand.cases = [];\n\t}\n\t\n\tvar sc = new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\n\tcommand.cases.push(sc);\n\n\tSwitchManagement.renderCase(sc, command, function_obj, dom_command.find('.all_cases_div'));\n\n}\n\n\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui dowhiletrue created_element\"> <i class=\"ui icon small sync\"></i> <span> '+ LocalizedStrings.getUI('text_command_do') +' <br> ' + LocalizedStrings.getUI('text_command_do_until') +'(x < 10) </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui dowhiletrue command_container\"> <i class=\"ui icon small sync command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"ui context_menu\"></div> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_do') + ' </span>';\n\tret += '<div class=\"ui block_commands\" data-subblock=\"\" data-idcommand=\"\">';\n\tret += '</div>';\n\tret += ' <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_do_until') + ' </span> <span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"span_command_spec\"> ) </span>';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tif (command.expression) {\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, dowhiletrue_dom) {\n\n\tdowhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, dowhiletrue_dom)) {\n\t\t\tdowhiletrue_dom.fadeOut(400, function() {\n\t\t\t\tdowhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui functioncall created_element\"> <i class=\"hand point right icon\"></i> <span> funcao() </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui functioncall command_container\"> <i class=\"hand point right icon command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"var_value_menu_div\"></div> </div>');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.function_called, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, functioncall_dom) {\n\n\tfunctioncall_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, functioncall_dom)) {\n\t\t\tfunctioncall_dom.fadeOut(400, function() {\n\t\t\t\tfunctioncall_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import { Types } from \"../types\";\nimport * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as VariableValueMenuManagement from \"./variable_value_menu\";\nimport { registerUserEvent, ActionTypes } from \"../../services/userLog\";\nimport WatchJS from \"melanke-watchjs\";\n\nwindow.timer = false;\n\nexport function renderExpression (\n command,\n function_obj,\n div_to_render,\n expression_array\n) {\n div_to_render.empty();\n\n WatchJS.unwatch(command, \"expression\");\n WatchJS.watch(\n command,\n \"expression\",\n function () {\n if (window.timer) return;\n const m = div_to_render\n .find(\".single_element_expression\")\n .not(\".mouse_distance\")\n .not(\".add_parentheses\");\n let s = \"\";\n m.each(function (e) {\n if ($(this).hasClass(\"parentheses_in_expression\")) {\n s += $(this).text() + \" \";\n } else {\n s += $(this)\n .find(\".text\")\n .text();\n\n s += $(this)\n .find(\".var_name\")\n .text();\n\n s += $(this)\n .find(\".parameters_function_called\")\n .text();\n\n s += $(this)\n .find(\".value_rendered\")\n .text();\n\n s += \" \";\n }\n });\n if (s) {\n window.timer = true;\n } else {\n return;\n }\n registerUserEvent(\n function_obj.name,\n ActionTypes.CHANGE_COMMAND_EXP,\n command.type,\n \"/\",\n s\n );\n setTimeout(function () {\n window.timer = false;\n }, 200);\n },\n 20,\n true\n );\n\n if (command.type === Models.COMMAND_TYPES.attribution) {\n WatchJS.unwatch(command.variable);\n WatchJS.watch(\n command.variable,\n function () {\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n },\n 0\n );\n\n if (command.variable.content) {\n const types_included = [];\n\n if (\n command.variable.content.type == Types.INTEGER ||\n command.variable.content.type == Types.REAL\n ) {\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else if (command.variable.content.type == Types.BOOLEAN) {\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else if (command.variable.content.type == Types.TEXT) {\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n } else {\n console.log(\"NÃO RECONHECI! VEJA: \", command.variable.content.type);\n }\n\n renderElements(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n } else {\n div_to_render.text(\n LocalizedStrings.getUI(\"var_menu_select_var\").toLowerCase()\n );\n }\n } else {\n const types_included = [];\n types_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n types_included.push(Models.EXPRESSION_TYPES.exp_logic);\n if (command.type === Models.COMMAND_TYPES.writer)\n types_included.push(Models.EXPRESSION_TYPES.write_sep);\n types_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n renderElements(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n }\n\n div_to_render.children(\".mouse_distance\").addClass(\"mouse_distance_hidden\");\n div_to_render.children(\".higher_element\").on(\"mousemove\", function (evt) {\n if (!window.open_or_close) {\n $(this).css(\"position\", \"relative\", \"!important\");\n $(this)\n .children(\".mouse_distance\")\n .css(\"opacity\", \"1\");\n }\n });\n div_to_render.children(\".higher_element\").on(\"mouseout\", function (evt) {\n if (!window.open_or_close) {\n $(this).css(\"position\", \"absolute\", \"!important\");\n $(this)\n .children(\".mouse_distance\")\n .css(\"opacity\", \"0\");\n }\n });\n const lixeira = $('<div class=\"lixeira\" draggable=\"true\"></div>');\n\n div_to_render\n .find(\".single_element_expression\")\n .on(\"mousedown\", function (evt) {\n window.posX = evt.clientX;\n window.posY = evt.clientY;\n });\n\n Sortable.create(div_to_render[0], {\n animation: 100,\n ghostClass: \"ghost\",\n group: {\n name: \"shared\",\n put: false, // Do not allow items to be put into this list\n },\n draggable: \".single_element_expression\",\n sort: false,\n filter: \".not_allowed\",\n\n onStart: function () {\n $(\"body\").append(lixeira);\n lixeira.css(\"display\", \"block\");\n lixeira.css(\"top\", window.posY + 70, \"!important\");\n lixeira.css(\"left\", window.posX - 20, \"!important\");\n },\n onMove: function () {\n lixeira.addClass(\"color_test\");\n },\n onEnd: function () {\n lixeira.remove();\n div_to_render.find(\".ghost\").removeClass(\"ghost\");\n },\n });\n new Sortable(lixeira[0], {\n group: \"shared\",\n animation: 150,\n onAdd: function (evt) {\n lixeira.css(\"display\", \"none\");\n lixeira.find(\".single_element_expression\").remove();\n lixeira.css(\"background-color\", \"\");\n lixeira.remove();\n removeElement(evt, expression_array);\n renderExpression(command, function_obj, div_to_render, expression_array);\n },\n });\n}\n\nfunction removeElement (event, expression_array) {\n const indice = $(event.item).data(\"index\");\n const first = expression_array[0];\n console.log(\"indice: \", indice);\n if (expression_array[indice].type) {\n // if is alone in expression:\n if (expression_array.length == 1) {\n //function_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n expression_array.splice(0, 1);\n } else if (expression_array.length > 1) {\n if (indice > 0 && expression_array[indice - 1].type_op) {\n if (\n indice < expression_array.length &&\n expression_array[indice - 2] == \"(\" &&\n expression_array[indice + 1].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n }\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n if (\n indice - 2 < expression_array.length &&\n expression_array[indice - 2] == \"(\" &&\n expression_array[indice - 1] == \")\"\n ) {\n expression_array.splice(indice - 1, 1);\n expression_array.splice(indice - 2, 1);\n if (\n indice - 3 >= 0 &&\n indice - 3 < expression_array.length &&\n expression_array[indice - 3].type_op\n ) {\n expression_array.splice(indice - 3, 1);\n }\n }\n } else if (\n indice < expression_array.length - 1 &&\n expression_array[indice + 1].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n } else if (\n indice < expression_array.length - 1 &&\n indice > 0 &&\n expression_array[indice - 1] == \"(\" &&\n expression_array[indice + 1] == \")\"\n ) {\n if (indice > 1 && expression_array[indice - 2].type_op) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n expression_array.splice(indice - 2, 1);\n } else if (\n indice < expression_array.length - 2 &&\n expression_array[indice + 2].type_op\n ) {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n } else {\n expression_array.splice(indice + 1, 1);\n expression_array.splice(indice, 1);\n expression_array.splice(indice - 1, 1);\n }\n }\n }\n } else if (expression_array[indice].type_op) {\n // iVProg doesn't support operator remove\n } else {\n let opening = -1;\n let closing = -1;\n\n if (expression_array[indice] == \"(\") {\n opening = indice;\n for (var i = indice + 1; i < expression_array.length; i++) {\n if (expression_array[i] == \")\") {\n closing = i;\n break;\n }\n }\n } else {\n closing = indice;\n for (var i = indice - 1; i >= 0; i--) {\n if (expression_array[i] == \"(\") {\n opening = i;\n break;\n }\n }\n }\n\n if (expression_array[opening + 1].type_op) {\n expression_array.splice(closing, 1);\n expression_array.splice(opening + 1, 1);\n expression_array.splice(opening, 1);\n } else {\n expression_array.splice(closing, 1);\n expression_array.splice(opening, 1);\n }\n }\n // if expression is empty, add a new var value:\n if (expression_array.length == 0) {\n expression_array.push(\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n if (first != expression_array[0] && expression_array[0].type_op) {\n expression_array.splice(0, 1);\n }\n}\n\nfunction renderElements (\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n) {\n /*if (expression_array.length > 0) {\n\t\tif (!expression_array[0].type_op) {\n\t\t\trenderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n\t\t}\n\t}*/\n\n let i = 0;\n for (i = 0; i < expression_array.length; i++) {\n if (expression_array[i].type == \"var_value\") {\n const div_temp = $(\n '<div class=\"single_element_expression\" data-index=\"' + i + '\"></div>'\n );\n if (i == 0) {\n if (expression_array.length > 0 && !expression_array[0].type_op) {\n //renderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n }\n }\n VariableValueMenuManagement.renderMenu(\n command,\n expression_array[i],\n div_temp,\n function_obj\n );\n div_to_render.append(div_temp);\n } else if (expression_array[i] == \"(\" || expression_array[i] == \")\") {\n if (expression_array[i] == \")\") {\n renderFinalAddElements(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i\n );\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n } else if (\n expression_array[i] == \"(\" &&\n !expression_array[i + 1].type_op\n ) {\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n renderStartAddOperator(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i + 1\n );\n } else {\n renderParenthesis(\n div_to_render,\n expression_array[i],\n command,\n function_obj,\n i,\n expression_array\n );\n }\n } else {\n if (i == 0) {\n console.log(\"NEGAÇÃO NO PRIMEIRO ELEMENTO\");\n } else if (expression_array[i - 1] == \"(\") {\n console.log(\"NEGAÇÃO APÓS O PARÊNTESES\");\n }\n renderOperatorMenu(\n command,\n function_obj,\n div_to_render,\n expression_array[i],\n types_included,\n i,\n expression_array\n );\n }\n }\n\n renderFinalAddElements(\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n i,\n true\n );\n\n renderAddParenthesis(\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n );\n}\n\nwindow.parentheses_activate = false;\nwindow.open_or_close = null;\nfunction renderAddParenthesis (\n command,\n function_obj,\n div_to_render,\n expression_array,\n types_included\n) {\n const addParentheses = $(\n '<div class=\"single_element_expression add_parentheses not_allowed\"><img style=\"width: 15px; position: relative; top: 3px; left: 1px; height: 15px;\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAEjCAYAAAA48U27AAAasXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjarZtZkhw5km3/sYpeAkYFsByMIm8Hvfw+Fx4kg6zM7HolHaykOz3MzWA63EFh5c5//7/r/osfK8m7XGqzbub5yT33OHjT/Ofn8xp8fn+/n/Pjd+H3z11MX28jr4nX9PmFna/jB5+XX1+o+evz+fvnrq7Pm9i+TvT1C078fpKurPf7a5FfJ0rx83n4+rfrX18Y9u12vv6L6+u0Xyf/89+5EoxdOF+KLp4Ukv/8/blSYhWpp8Grvb9L1CeJ9+n9HVL71/g5/Wutvw7gz3d/xM//WFn6FQ73iezXAfZHnL4+D+WPz9PPy8TfVhTizyvH7yuyEZr//vMtfvfudu/53N3I5giXfd3Uj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7/Ge7+b994l/t+Q9P+l23nvX7/15zb3pUfZ5xZpi6dZLr/8cs4666yQp06M2Ubf5r5vbOwbuV7KaerftPl3Uqad/DepALQulhENnAAAAABJRU5ErkJggg==\"></div>'\n );\n div_to_render.append(addParentheses);\n addParentheses.popup({\n content: \"Adicionar parênteses\",\n delay: {\n show: 750,\n hide: 0,\n },\n });\n\n addParentheses.on(\"click\", function (mouse_event) {\n // verificar se já está ativado\n if (window.parentheses_activate) {\n return;\n }\n\n div_to_render.find(\".usepointer\").off(\"click\");\n\n window.parentheses_activate = true;\n\n window.open_or_close = \"open\";\n\n div_to_render.find(\".dropdown\").addClass(\"disabled\");\n\n div_to_render.find(\".ghost_element\").addClass(\"temp_class\");\n div_to_render.find(\".ghost_element\").removeClass(\"ghost_element\");\n\n const floatingObject = $('<div class=\"floating_parenthesis\"> ( </div>');\n floatingObject.draggable().appendTo(\"body\");\n floatingObject.css(\"position\", \"absolute\");\n mouse_event.type = \"mousedown.draggable\";\n mouse_event.target = floatingObject[0];\n floatingObject.css(\"left\", mouse_event.pageX + 10);\n floatingObject.css(\"top\", mouse_event.pageY + 10);\n floatingObject.trigger(mouse_event);\n\n div_to_render.on(\"mousemove\", function (evt) {\n let actual_target = null;\n if ($(evt.target).hasClass(\"single_element_expression\")) {\n actual_target = $(evt.target);\n } else {\n actual_target = $(evt.target).closest(\".single_element_expression\");\n }\n\n if (\n $(evt.target).hasClass(\"temp_class\") ||\n actual_target.length < 1 ||\n actual_target.hasClass(\"add_parentheses\") ||\n actual_target.hasClass(\"rendered_parentheses\") ||\n $(evt.target).hasClass(\"expression_elements\")\n ) {\n return;\n }\n renderGhostParentheses(\n actual_target,\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n });\n\n div_to_render.on(\"mouseleave\", function () {\n /*window.open_parentheses.remove();\n\t\t\twindow.close_parentheses.remove();*/\n });\n\n let floating;\n\n $(\"body\").on(\"mouseup\", function (evt) {\n if (window.open_or_close == \"open\") {\n window.open_or_close = \"close\";\n\n floatingObject.remove();\n\n var comando_que_esta = $(evt.target).closest(\".command_container\");\n var comando_certo = div_to_render.closest(\".command_container\");\n if (!comando_que_esta.is(comando_certo)) {\n window.parentheses_activate = false;\n div_to_render.find(\".temp_class\").addClass(\"ghost_element\");\n div_to_render.find(\".temp_class\").removeClass(\"temp_class\");\n div_to_render.off(\"mousemove\");\n div_to_render.off(\"mouseleave\");\n $(\"body\").off(\"mouseup\");\n window.open_parentheses.remove();\n window.close_parentheses.remove();\n window.inserir_open = -1;\n window.inserir_close = -1;\n window.open_or_close = null;\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n\n return;\n }\n\n window.open_parentheses.addClass(\"parentheses_fixed\");\n\n floating = $('<div class=\"floating_parenthesis\"> ) </div>');\n floating.draggable().appendTo(\"body\");\n floating.css(\"position\", \"absolute\");\n floating.css(\"left\", evt.pageX + 10);\n floating.css(\"top\", evt.pageY + 10);\n\n $(\"body\").on(\"mousemove\", function (evts) {\n floating.css(\"left\", evts.pageX + 10);\n floating.css(\"top\", evts.pageY + 10);\n });\n } else {\n floating.remove();\n\n window.open_parentheses.removeClass(\"parentheses_fixed\");\n\n div_to_render.off(\"mousemove\");\n div_to_render.off(\"mouseleave\");\n $(\"body\").off(\"mouseup\");\n\n setTimeout(function () {\n window.parentheses_activate = false;\n }, 50);\n\n var comando_que_esta = $(evt.target).closest(\".command_container\");\n var comando_certo = div_to_render.closest(\".command_container\");\n let is_correct = false;\n if (comando_que_esta.is(comando_certo)) {\n is_correct = true;\n }\n\n if (is_correct) {\n expression_array.splice(window.inserir_open, 0, \"(\");\n expression_array.splice(window.inserir_close, 0, \")\");\n }\n\n window.inserir_open = -1;\n window.inserir_close = -1;\n window.open_or_close = null;\n\n renderExpression(\n command,\n function_obj,\n div_to_render,\n expression_array\n );\n }\n });\n });\n}\n\nwindow.open_parentheses = $('<div class=\"parentheses_ghost\">(</div>');\nwindow.close_parentheses = $('<div class=\"parentheses_ghost\">)</div>');\nwindow.inserir_open = -1;\nwindow.inserir_close = -1;\nfunction renderGhostParentheses (\n actual_target,\n command,\n function_obj,\n div_to_render,\n expression_array\n) {\n /*window.open_parentheses.remove();\n\twindow.close_parentheses.remove();*/\n\n const index_in_array = actual_target.data(\"index\");\n\n if (\n expression_array[index_in_array] == \"(\" ||\n expression_array[index_in_array] == \")\"\n ) {\n return;\n }\n\n if (window.open_or_close == \"close\") {\n if (index_in_array < window.inserir_open) {\n return;\n }\n }\n\n // Tratando a situação quando é na primeira posição:\n\n if (index_in_array == 0) {\n if (expression_array[index_in_array].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n\n /*if (expression_array.length == 1) {\n\t\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\t\twindow.close_parentheses.insertAfter(actual_target);\n\t\t\t\t\twindow.inserir_close = index_in_array + 2;\n\t\t\t\t}*/\n\n //} else {\n var count_opened = 0;\n var count_closed = 0;\n for (var i = 0; i < expression_array.length; i++) {\n if (expression_array[i] == \"(\") {\n count_opened++;\n }\n if (expression_array[i] == \")\") {\n count_closed++;\n }\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n } else {\n if (expression_array[i].type == \"var_value\") {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n }\n }\n }\n }\n //}\n } else if (expression_array[index_in_array].type_op) {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n\n var count_opened = 0;\n var count_closed = 0;\n for (var i = 1; i < expression_array.length; i++) {\n // $('.slide-link[data-slide=\"0\"]')\n if (expression_array[i] == \"(\") {\n count_opened++;\n }\n if (expression_array[i] == \")\") {\n count_closed++;\n }\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (expression_array[i].type == \"var_value\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n\n break;\n } else {\n if (expression_array[i].type == \"var_value\") {\n if (expression_array[i].type == \"var_value\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + i + '\"]'\n )\n );\n window.inserir_close = i + 2;\n }\n break;\n }\n }\n }\n }\n }\n return;\n }\n\n // Tratando quando não é no índice 0:\n if (expression_array[index_in_array].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(actual_target);\n window.inserir_close = index_in_array + 2;\n }\n return;\n }\n\n if (expression_array[index_in_array].type_op) {\n // buscar para a esquerda primeiro:\n if (expression_array[index_in_array - 1] == \"(\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(actual_target);\n window.inserir_open = index_in_array;\n }\n } else if (expression_array[index_in_array - 1] == \")\") {\n // buscar a abertura\n var count_opened = 0;\n var count_closed = 0;\n for (var j = index_in_array - 1; j >= 0; j--) {\n if (expression_array[j] == \"(\") {\n count_opened++;\n }\n if (expression_array[j] == \")\") {\n count_closed++;\n }\n\n if (count_opened != count_closed) {\n } else {\n if (count_closed > 0) {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + j + '\"]'\n )\n );\n window.inserir_open = j;\n }\n break;\n }\n }\n }\n } else if (expression_array[index_in_array - 1].type == \"var_value\") {\n if (window.open_or_close == \"open\") {\n window.open_parentheses.insertBefore(\n div_to_render.find(\n '.single_element_expression[data-index=\"' +\n (index_in_array - 1) +\n '\"]'\n )\n );\n window.inserir_open = index_in_array - 1;\n }\n }\n\n // buscar para a direita agora:\n if (expression_array[index_in_array + 1] == \"(\") {\n // buscar o fechamento:\n\n var count_opened = 0;\n var count_closed = 0;\n for (var j = index_in_array + 1; j < expression_array.length; j++) {\n if (expression_array[j] == \"(\") {\n count_opened++;\n }\n if (expression_array[j] == \")\") {\n count_closed++;\n }\n\n if (count_opened != count_closed) {\n } else {\n if (count_opened > 0) {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' + j + '\"]'\n )\n );\n window.inserir_close = j + 2;\n }\n break;\n }\n }\n }\n } else if (expression_array[index_in_array + 1].type == \"var_value\") {\n if (window.open_or_close == \"close\") {\n window.close_parentheses.insertAfter(\n div_to_render.find(\n '.single_element_expression[data-index=\"' +\n (index_in_array + 1) +\n '\"]'\n )\n );\n window.inserir_close = index_in_array + 3;\n }\n }\n }\n}\n\nfunction renderParenthesis (\n div_to_render,\n expression_content,\n command,\n function_obj,\n position,\n expression_array\n) {\n const ghost_parenthesis = $(\n '<div class=\"single_element_expression parentheses_in_expression\" data-index=\"' +\n position +\n '\">' +\n expression_content +\n \"</div>\"\n );\n div_to_render.append(ghost_parenthesis);\n}\n\nfunction renderStartAddOperator (\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n position\n) {\n let menu_final =\n '<div class=\"ui dropdown disabled usepointer\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n const div_temp = $(\n '<div class=\"single_element_expression ghost_element mouse_distance\"></div>'\n );\n div_temp.append(menu_final);\n const div_higher = $('<div class=\"higher_element\"></div>');\n div_higher.append(div_temp);\n div_to_render.append(div_higher);\n menu_final.dropdown(\"set selected\", Models.ARITHMETIC_TYPES.minus);\n\n div_temp.on(\"click\", function () {\n if (!window.open_or_close) {\n const sera = position;\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n console.log(\"p1\");\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic,\n Models.ARITHMETIC_TYPES.minus\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0\n ) {\n console.log(\"p2\");\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic,\n Models.LOGIC_COMPARISON.equals_to\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0\n ) {\n console.log(\"p3\");\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional,\n Models.ARITHMETIC_COMPARISON.greater_than\n )\n );\n }\n\n renderExpression(command, function_obj, div_to_render, expression_array);\n }\n });\n}\n\nfunction renderFinalAddElements (\n div_to_render,\n types_included,\n expression_array,\n command,\n function_obj,\n position,\n is_last = false\n) {\n let menu_final =\n '<div class=\"ui dropdown disabled usepointer\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n const div_temp = $('<div class=\"simple_add mouse_distance\"></div>');\n const div_higher = $('<div class=\"higher_element\"></div>');\n\n const button = $(\n '<button class=\"ui button green add_expression\"><i class=\"plus circle inverted icon\"></i></button>'\n );\n div_temp.append(button);\n\n if (!is_last) {\n div_higher.append(div_temp);\n div_to_render.append(div_higher);\n //div_temp.append(menu_final);\n div_temp.css(\"opacity\", \"0\", \"!important\");\n } else {\n div_temp.removeClass(\"mouse_distance\");\n div_temp.css(\"opacity\", \"1\", \"!important\");\n //div_temp.append(menu_final);\n div_to_render.append(div_temp);\n }\n\n menu_final.dropdown(\"set selected\", Models.ARITHMETIC_TYPES.plus);\n\n div_temp.on(\"click\", function () {\n const sera = position;\n\n if (expression_array[sera] == \")\" && expression_array[sera - 1] == \"(\") {\n expression_array.splice(\n sera,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n renderExpression(command, function_obj, div_to_render, expression_array);\n return;\n }\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic,\n Models.ARITHMETIC_TYPES.plus\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n } else if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic,\n Models.LOGIC_COMPARISON.equals_to\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n } else if (\n types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0\n ) {\n expression_array.splice(\n sera,\n 0,\n new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional,\n Models.ARITHMETIC_COMPARISON.greater_than\n )\n );\n expression_array.splice(\n sera + 1,\n 0,\n new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n\n renderExpression(command, function_obj, div_to_render, expression_array);\n });\n}\n\nfunction renderOperatorMenu (\n command,\n function_obj,\n div_to_render,\n expression_element,\n types_included,\n position,\n expression_array\n) {\n let menu_final =\n '<div class=\"ui dropdown\"><div class=\"text\"> + </div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.write_sep) >= 0) {\n menu_final += getSeparator();\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '<div class=\"menu\">';\n menu_final += getArithmeticOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getArithmeticOperators();\n }\n }\n\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '<div class=\"menu\">';\n menu_final += getLogicOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getLogicOperators();\n }\n }\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '<div class=\"menu\">';\n menu_final += getRelationalOperators();\n menu_final += \"</div></div>\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"</div></div>\";\n\n menu_final = $(menu_final);\n menu_final.find(\".ivprog-write-sep\").popup({\n content: LocalizedStrings.getUI(\"write_seprator_menu_tooltip\"),\n delay: {\n show: 500,\n hide: 0,\n },\n });\n\n const div_temp = $(\n '<div class=\"single_element_expression not_allowed\" data-index=\"' +\n position +\n '\"></div>'\n );\n div_temp.append(menu_final);\n div_to_render.append(div_temp);\n menu_final.dropdown({\n onChange: function (_value, _text, $selectedItem) {\n expression_element.item = $selectedItem.data(\"value\");\n expression_element.type_op = $selectedItem.data(\"type\");\n },\n });\n\n menu_final.dropdown(\"set selected\", expression_element.item);\n}\n\nfunction getArithmeticOperators () {\n let arithmetic_operators;\n arithmetic_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.plus +\n '\">+</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.minus +\n '\">-</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.multiplication +\n '\">*</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.division +\n '\">/</div>';\n arithmetic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_arithmetic +\n '\" data-value=\"' +\n Models.ARITHMETIC_TYPES.module +\n '\">%</div>';\n return arithmetic_operators;\n}\n\nfunction getLogicOperators () {\n let logic_operators;\n logic_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.equals_to +\n '\">==</div>';\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.not_equals_to +\n '\">!=</div>';\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.and +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_and\") +\n \"</div>\";\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.or +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_or\") +\n \"</div>\";\n logic_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_logic +\n '\" data-value=\"' +\n Models.LOGIC_COMPARISON.not +\n '\">' +\n LocalizedStrings.getUI(\"logic_operator_not\") +\n \"</div>\";\n return logic_operators;\n}\n\nfunction getRelationalOperators () {\n let relational_operators;\n relational_operators =\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.greater_than +\n '\">></div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.less_than +\n '\"><</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.equals_to +\n '\">==</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.not_equals_to +\n '\">!=</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to +\n '\">>=</div>';\n relational_operators +=\n '<div class=\"item\" data-type=\"' +\n Models.EXPRESSION_TYPES.exp_conditional +\n '\" data-value=\"' +\n Models.ARITHMETIC_COMPARISON.less_than_or_equals_to +\n '\"><=</div>';\n return relational_operators;\n}\n\nfunction getSeparator () {\n return `<div class=\"item ivprog-write-sep\" data-type=\"${\n Models.EXPRESSION_TYPES.write_sep\n }\" data-value=\"${Models.EXPRESSION_TYPES.write_sep}\">${LocalizedStrings.getUI(\n \"write_seprator_menu_text\"\n )}</div>`;\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui iftrue created_element\"> <i class=\"ui icon small random\"></i> <span> if (x < 1) { } </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui iftrue command_container\"><div class=\"ui data_block_if\" data-if=\"true\"> <i class=\"ui icon small random command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <button class=\"ui icon button minimize_block_button tiny\"><i class=\"icon window minimize\"></i></button>';\n\tret += '<span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_if') + '</span>';\n\tret += ' <span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"span_command_spec\"> ) </span>';\n\tret += '<span> </span> ';\n\tret += '<div class=\"ui block_commands commands_if conditional_comands_block\" data-if=\"true\">';\n \tret += '</div></div>';\n\tret += '<div class=\"ui data_block_else\" data-else=\"true\"> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_else') + ' </span>';\n\tret += '<div class=\"ui block_commands commands_else conditional_comands_block\" data-else=\"true\">';\n\tret += '</div>';\n\tret += '<span></span></div>';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\tel.find('.data_block_if').data('command', command);\n\tel.find('.data_block_else').data('command', command);\n\tel.find('.commands_if').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.commands_if')[0]), 3, function_obj);\n\t\t}\n\t}\n\tif (command.commands_else) {\n\t\tfor (var j = 0; j < command.commands_else.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_else[j], $(el.find('.commands_else')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tif (command.collapsed) {\n\t\tel.children('.data_block_else').toggle();\n\t\t$(el.find('.block_commands')[0]).toggle();\n\t}\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, iftrue_dom) {\n\n\tiftrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, iftrue_dom)) {\n\t\t\tiftrue_dom.fadeOut(400, function() {\n\t\t\t\tiftrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n\n\tiftrue_dom.find('.minimize_block_button').on('click', function() {\n\t\tiftrue_dom.children('.data_block_else').toggle();\n\t\t$(iftrue_dom.find('.block_commands')[0]).toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n}","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui reader created_element\"> <i class=\"ui icon small download\"></i> <span> '+LocalizedStrings.getUI('text_command_read')+' var </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = '<div class=\"ui reader command_container\"> <i class=\"ui icon small download command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span class=\"span_command_spec\">'+LocalizedStrings.getUI('text_command_read')+' ( </span> <div class=\"var_value_menu_div\"></div> <span class=\"close_parentheses span_command_spec\">)</span> </div>';\n\t\n\tel = $(el);\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable_value_menu, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, reader_dom) {\n\treader_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, reader_dom)) {\n\t\t\treader_dom.fadeOut(400, function() {\n\t\t\t\treader_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui repeatNtimes created_element\"> <i class=\"ui icon small sync\"></i> <span> repita_para i de 0 ate 10 passo 1 <br> </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tlet ret = `<div class=\"ui repeatNtimes command_container\"> \n\t\t<i class=\"ui icon small sync command_drag\"></i>\n\t\t<i class=\"ui icon times red button_remove_command\"></i>\n\t\t<div class=\"ui context_menu\"></div> <span class=\"span_command_spec\"> ${LocalizedStrings.getUI('text_for')}\n\t\t</span> <div class=\"ui attribution_expression\">\n\t\t<div class=\"ui variable_attribution\"></div>\n\t\t<span class=\"text_receives span_command_spec\" style=\"margin-left: 10px;margin-right: 20px;\"></span>\n\t\t<div class=\"ui var_value_expression div_expression_st\"></div>\n\t\t</div>\n\t\t<span class=\"span_command_spec separator_character\" style=\"margin-left: 25px; margin-right: 15px;\">\n\t\t${LocalizedStrings.getUI(\"text_for_to\")} </span>\n\t\t<div class=\"conditional_expression\"></div> <div class=\"pass_button\"></div> \n\t\t<div class=\"ui incrementation_field\"><span class=\"text_inc_receives span_command_spec\"></span>\n\t\t<div class=\"ui first_operand\"></div><div class=\"ui operator\"></div>\n\t\t<div class=\"ui second_operand\"></div></div> <span class=\"span_command_spec\"> </span>'`;\n\tret += '<div class=\"ui block_commands\">';\n\tret += '</div>';\n\tret += '<span> </span>';\n\tret += '</div>';\n\t\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.var_attribution, el.find('.variable_attribution'), function_obj);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression2, function_obj, el.find('.conditional_expression'));\n\n\tVariableValueMenu.renderMenu(command, command.expression2, el.find('.conditional_expression'), function_obj);\t\n\t//GenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression2);\n\n\t//VariableValueMenu.renderMenu(command, command.var_incrementation, el.find('.incrementation_variable'), function_obj);\t\n\t//angle double right\n\tif (!command.expression1) {\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\t}\n\n\tel.find('.text_receives').text(LocalizedStrings.getUI(\"text_for_from\"));\n\tVariableValueMenu.renderMenu(command, command.expression1, el.find('.var_value_expression'), function_obj);\n\n\tif (!command.expression3) {\n\t\tel.find('.pass_button').html('<button class=\"ui\">' + LocalizedStrings.getUI(\"text_for_pass\") + '<i class=\"ui icon angle double right\"></i></button>');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\t\t/*var exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;*/\n\t} else {\n\t\tel.find('.pass_button').html('<button class=\"ui\">' + LocalizedStrings.getUI(\"text_for_pass\") + '<i class=\"ui icon angle double left\"></i></button>');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\n\t\trenderOperator(command, function_obj, el.find('.operator'), command.expression3, 1);\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], el.find('.second_operand'), function_obj);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\nfunction togglePasso (command) {\n\tif (!command.expression3) {\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;\n\t} else {\n\t\tcommand.expression3 = null;\n\t}\n\trenderAlgorithm();\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\tif (!command.expression3) {\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[command.var_attribution,\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\t\tcommand.expression3 = exp;\n\t\t\tcommand.var_incrementation = command.var_attribution;\n\n\t\t\tvar cond_exp = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tcommand.var_attribution, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\n\t\t\tcommand.expression2.expression = cond_exp;\n\t\t}\n\n\t\tdom_object.parent().find('.text_receives').text('de');\n\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\n\t\tdom_object.parent().find('.var_value_expression').empty();\n\t\t\n\t\tVariableValueMenu.renderMenu(command, command.expression1, dom_object.parent().find('.var_value_expression'), function_obj);\n\n\t\trenderAlgorithm();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\tdom_object.parent().find('.text_inc_receives').text('de');\n\t\t\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[0], dom_object.parent().find('.first_operand'), function_obj);\n\n\t\trenderOperator(command, function_obj, dom_object.parent().find('.operator'), command.expression3, 1);\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], dom_object.parent().find('.second_operand'), function_obj);\t\t\n\n\t}\n\n}\n\nexport function manageClearExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\t$(dom_object).parent().find('.text_receives').text('');\n\t\tcommand.expression1 = null;\n\t\t$(dom_object).parent().find('.var_value_expression').empty();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\t$(dom_object).parent().find('.text_inc_receives').text('');\n\t\tcommand.expression3 = null;\n\t\t$(dom_object).parent().find('.first_operand').empty();\n\t\t$(dom_object).parent().find('.operator').empty();\n\t\t$(dom_object).parent().find('.second_operand').empty();\n\t}\n}\n\nfunction addHandlers (command, function_obj, repeatNtimes_dom) {\n\n\trepeatNtimes_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, repeatNtimes_dom)) {\n\t\t\trepeatNtimes_dom.fadeOut(400, function() {\n\t\t\t\trepeatNtimes_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar menu_operator = $('<div class=\"ui dropdown\"><div class=\"text\"></div></div>');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '+',\n\t value : Models.ARITHMETIC_TYPES.plus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.plus)\n\t },\n\t {\n\t name : '-',\n\t value : Models.ARITHMETIC_TYPES.minus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.minus)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_element.itens[index_op] = value;\n\t }\n\t });\n\ttemp_op.append(menu_operator);\n}","import { Types } from '../types';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as Models from '../ivprog_elements';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui return created_element\"> <i class=\"ui icon small reply\"></i> <span> '+LocalizedStrings.getUI('text_return')+' </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('<div class=\"ui return command_container\"> <i class=\"ui icon small reply command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <span class=\"span_command_spec\"> '+LocalizedStrings.getUI('text_return')+' </span> <div class=\"expression_elements\"></div></div>');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tif (function_obj.return_type != Types.VOID) {\n\t\tif (!command.variable_value_menu) {\n\t\t\tcommand.variable_value_menu = [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)];\n\t\t}\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.variable_value_menu);\n\t} else {\n\t\tel.find('.expression_elements').remove();\n\t\tcommand.variable_value_menu = null;\n\t}\n\t\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, return_dom) {\n\n\treturn_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, return_dom)) {\n\t\t\treturn_dom.fadeOut(400, function() {\n\t\t\t\treturn_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui switch created_element\"> <i class=\"ui icon small random\"></i> <span> '+LocalizedStrings.getUI('text_code_switch')+' ( x ) { <br> '+LocalizedStrings.getUI('text_code_case')+' 1: <br> '+LocalizedStrings.getUI('text_code_case')+' 2: <br> } </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui switch command_container\"> <i class=\"ui icon small random command_drag\" ></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"ui context_menu\"></div> <span> '+LocalizedStrings.getUI('text_code_switch')+' ( <div class=\"ui variable_to_switch\"></div> ) <div class=\"ui all_cases_div\"></div></span>';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.variable_to_switch'), function_obj);\n\n\tif (command.cases) {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\trenderCase(command.cases[i], command, function_obj, el.find('.all_cases_div'));\n\t\t}\n\t}\n\n\treturn el;\n}\n\nexport function renderCase (switchcase, command, function_obj, el) {\n\n\tvar casediv = $('<div class=\"ui case_div\"><i class=\"ui icon times red button_remove_command\"></i><span>'+LocalizedStrings.getUI('text_code_case')+'</span> <div class=\"ui variable_case\"></div>: <div class=\"case_commands_block\"></div></div>');\n\n\tVariableValueMenu.renderMenu(command, switchcase.variable_value_menu, casediv.find('.variable_case'), function_obj);\n\n\tcasediv.data('switchcase', switchcase);\n\tcasediv.find('.case_commands_block').data('switchcase', switchcase);\n\n\tel.append(casediv);\n\n\tif (switchcase.commands_block) {\n\t\tfor (var j = 0; j < switchcase.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(switchcase.commands_block[j], $(casediv.find('.case_commands_block')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tcasediv.find('.button_remove_command').on('click', function() {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\tif (switchcase == command.cases[i]) {\n\t\t\t\tdelete command.cases[i];\n\t\t\t\tcommand.cases.splice(i, 1);\n\t\t\t\tcasediv.remove();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\n}\n\nfunction addHandlers (command, function_obj, switch_dom) {\n\n\tswitch_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, switch_dom)) {\n\t\t\tswitch_dom.fadeOut(400, function() {\n\t\t\t\tswitch_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as AttribuitionsManagement from \"./attribution\";\nimport * as RepeatNTimesManagement from \"./repeatNtimes\";\n\nexport const VAR_OR_VALUE_TYPES = Object.freeze({\n only_variable: 1,\n only_value: 2,\n only_function: 3,\n variable_and_function: 4,\n variable_and_value_opt: 5,\n value_and_function: 6,\n all: 7,\n});\n\nexport function renderMenu (\n command,\n ref_object,\n dom_object,\n function_obj,\n size_field = 2,\n expression_element\n) {\n // Verificar se o objeto atual trata-se de uma chamada de função e conferir se possui a quantidade correta de parâmetros\n // Caso não possua, tem que adicionar as variáveis que servirão de parâmetros:\n if (ref_object.function_called) {\n if (ref_object.function_called.parameters_list) {\n while (\n ref_object.function_called.parameters_list.length !=\n ref_object.parameters_list.length\n ) {\n if (\n ref_object.parameters_list.length >\n ref_object.function_called.parameters_list.length\n ) {\n ref_object.parameters_list.pop();\n } else {\n ref_object.parameters_list.push(\n new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )\n );\n }\n }\n }\n }\n\n let menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_variable) {\n menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu menu_only_vars\">';\n menu_var_or_value += \"</div>\";\n }\n\n if (\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function ||\n ref_object.variable_and_value ==\n VAR_OR_VALUE_TYPES.variable_and_value_opt ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"variable\");\n menu_var_or_value += '<div class=\"menu menu_only_vars\">';\n menu_var_or_value += \"</div></div>\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_value) {\n menu_var_or_value =\n '<input type=\"text\" class=\"width-dynamic\" size=\"' +\n size_field +\n '\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" />';\n }\n\n if (\n ref_object.variable_and_value ==\n VAR_OR_VALUE_TYPES.variable_and_value_opt ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_value +\n '\">' +\n LocalizedStrings.getUI(\"text_value\") +\n \"</div>\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_function) {\n menu_var_or_value =\n '<div class=\"ui dropdown menu_var_or_value_dom\" data-varmenu=\"true\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu menu_only_functions\">';\n menu_var_or_value += \"</div>\";\n }\n\n if (\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function ||\n ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all\n ) {\n menu_var_or_value +=\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_function +\n '\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"btn_function\");\n menu_var_or_value += '<div class=\"menu menu_only_functions\">';\n menu_var_or_value += \"</div></div>\";\n\n /* if (command.type == Models.COMMAND_TYPES.attribution) {\n menu_var_or_value += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n menu_var_or_value += '<div class=\"menu\">';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n menu_var_or_value += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n menu_var_or_value += '</div></div>';\n }*/\n }\n\n menu_var_or_value += \"</div></div>\";\n\n menu_var_or_value = $(menu_var_or_value);\n\n menu_var_or_value.find('.width-dynamic').on('input', function() {\n var input_field = $(this);\n var inputWidth = input_field.textWidth()+10;\n inputWidth = inputWidth<50?50:inputWidth;\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n dom_object.append(menu_var_or_value);\n\n ref_object.dom_object = menu_var_or_value;\n\n addHandlers(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n\n addVariablesToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n addFunctionsToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n addIVProgFunctionsToMenu(\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n );\n\n if (ref_object.content || ref_object.function_called) {\n if (ref_object.content) {\n // Verificar se a variável ainda existe:\n const variable_fun = isVarInProgram(ref_object.content, function_obj);\n if (variable_fun) {\n ref_object.content = variable_fun;\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n } else {\n if (ref_object.content && ref_object.content.type) {\n ref_object.content = null;\n appendSelectText(ref_object, menu_var_or_value);\n } else {\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n }\n }\n } else if (ref_object.function_called) {\n // Verificar se a função ainda existe:\n const ret_function = isFunctionInProgram(ref_object.function_called);\n if (ret_function) {\n ref_object.function_called = ret_function;\n renderPreviousContent(\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n );\n } else {\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n appendSelectText(ref_object, menu_var_or_value);\n }\n }\n } else {\n appendSelectText(ref_object, menu_var_or_value);\n }\n}\n\nfunction appendSelectText (ref_object, menu_var_or_value) {\n switch (ref_object.variable_and_value) {\n case VAR_OR_VALUE_TYPES.only_variable:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_var\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.all:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.variable_and_function:\n menu_var_or_value\n .find(\".text\")\n .append(\"<i>\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"</i>\");\n break;\n case VAR_OR_VALUE_TYPES.only_function:\n menu_var_or_value\n .find(\".text\")\n .append(\n \"<i>\" + LocalizedStrings.getUI(\"var_menu_select_function\") + \"</i>\"\n );\n break;\n }\n}\n\nfunction isFunctionInProgram (function_called_obj) {\n if (function_called_obj.name) {\n if (window.program_obj.functions) {\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i] == function_called_obj) {\n return window.program_obj.functions[i];\n }\n }\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i].name == function_called_obj.name) {\n return window.program_obj.functions[i];\n }\n }\n }\n } else if (function_called_obj.identifier) {\n for (var i = 0; i < window.system_functions.length; i++) {\n if (\n window.system_functions[i].identifier == function_called_obj.identifier\n ) {\n return window.system_functions[i];\n }\n }\n }\n\n return null;\n}\n\nfunction isVarInProgram (var_obj, function_obj) {\n // Verify in locals:\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i] == var_obj) {\n return function_obj.variables_list[i];\n }\n }\n }\n // Verify in parameters:\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i] == var_obj) {\n return function_obj.parameters_list[i];\n }\n }\n }\n // Verify in globals:\n if (window.program_obj.globals) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i] == var_obj) {\n return window.program_obj.globals[i];\n }\n }\n }\n\n // If not found, verify if the reference was lost\n if (var_obj) {\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i].name == var_obj.name) {\n return function_obj.variables_list[i];\n }\n }\n }\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i].name == var_obj.name) {\n return function_obj.parameters_list[i];\n }\n }\n }\n if (window.program_obj.globals) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i].name == var_obj.name) {\n return window.program_obj.globals[i];\n }\n }\n }\n }\n\n return null;\n}\n\nfunction renderPreviousContent (\n function_obj,\n menu_var_or_value,\n ref_object,\n dom_object,\n command,\n expression_element\n) {\n if (ref_object.function_called) {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else if (ref_object.content.type) {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else {\n menu_var_or_value.remove();\n variableValueMenuCode(\n command,\n ref_object,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n );\n }\n}\n\nfunction variableValueMenuCode (\n command,\n variable_obj,\n dom_object,\n function_obj,\n menu_var_or_value,\n expression_element\n) {\n if (variable_obj.content || variable_obj.function_called) {\n // Verificar se a variável ainda existe:\n const var_fun = isVarInProgram(variable_obj.content, function_obj);\n\n if (var_fun) {\n variable_obj.content = var_fun;\n } else {\n if (variable_obj.content && variable_obj.content.type) {\n variable_obj.content = null;\n appendSelectText(variable_obj, menu_var_or_value);\n }\n }\n } else {\n appendSelectText(variable_obj, menu_var_or_value);\n }\n\n if (variable_obj.content == null && variable_obj.function_called == null) {\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n return;\n }\n\n const ret = \"\";\n if (variable_obj.function_called) {\n if (\n variable_obj.function_called.parameters_list == null ||\n variable_obj.function_called.length == 0\n ) {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (variable_obj.function_called.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n variable_obj.function_called.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S1\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP1\");\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n } else {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (variable_obj.function_called.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n variable_obj.function_called.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n for (\n let j = 0;\n j < variable_obj.function_called.parameters_list.length;\n j++\n ) {\n parameters_menu +=\n '<div class=\"render_style_param parameter_' + j + '\"></div>';\n if (j + 1 != variable_obj.function_called.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n for (\n let j = 0;\n j < variable_obj.function_called.parameters_list.length;\n j++\n ) {\n renderMenu(\n command,\n variable_obj.parameters_list[j],\n parameters_menu.find(\".parameter_\" + j),\n function_obj,\n 2,\n expression_element\n );\n }\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(parameters_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S2\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP2\");\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n } else if (variable_obj.content.type) {\n let variable_render = \"\";\n\n if (variable_obj.content.dimensions == 1 && variable_obj.dimensions != 1) {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S3\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP3\");\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n if (!variable_obj.column) {\n variable_obj.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n\n variableValueMenuCode(\n command,\n variable_obj.column,\n $(variable_render.find(\".column_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else if (\n variable_obj.content.dimensions == 2 &&\n variable_obj.dimensions != 2\n ) {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n variable_render +=\n ' <span>[ </span> <div class=\"row_container\"></div> <span> ]</span>';\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ] </span>';\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S4\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP4\");\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n if (!variable_obj.column) {\n variable_obj.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n if (!variable_obj.row) {\n variable_obj.row = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n\n variableValueMenuCode(\n command,\n variable_obj.row,\n $(variable_render.find(\".row_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n variableValueMenuCode(\n command,\n variable_obj.column,\n $(variable_render.find(\".column_container\")),\n function_obj,\n menu_var_or_value,\n expression_element\n );\n } else {\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_obj.content.name +\n \"</span>\";\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n console.log('dom_object6');\n console.log(dom_object);\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n variable_render.append(context_menu);\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S5\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP5\");\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n } else {\n let variable_render;\n\n variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">';\n\n if (isNaN(variable_obj.content)) {\n variable_render += variable_obj.content.replaceAll(\" \", \"&nbsp;\");\n } else {\n variable_render += variable_obj.content;\n }\n\n variable_render += \"</span>\";\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n if (variable_obj.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n context_menu.insertAfter(variable_render);\n }\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S6\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP6\");\n dom_object.text(\"\");\n\n variable_obj.content = null;\n variable_obj.row = null;\n variable_obj.column = null;\n\n delete variable_obj.function_called;\n delete variable_obj.parameters_list;\n\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".context_menu_clear\").remove();\n dom_object.find(\".width-dynamic-minus\").remove();\n\n renderMenu(\n command,\n variable_obj,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n variable_render.on(\"click\", function (e) {\n variable_render.remove();\n variable_render.empty();\n variable_render.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n variable_obj,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n }\n}\n\nfunction addIVProgFunctionsToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_functions\");\n sub_menu.append(\n '<div class=\"divider\"></div><div class=\"header\">' +\n LocalizedStrings.getUI(\"text_header_ivprog_functions\") +\n \"</div>\"\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_math\") +\n '<div class=\"menu menu_math_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_text\") +\n '<div class=\"menu menu_text_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_array\") +\n '<div class=\"menu menu_arrangement_functions\"></div></div>'\n );\n sub_menu.append(\n '<div class=\"item\"><i class=\"dropdown icon\"></i>' +\n LocalizedStrings.getUI(\"text_menu_functions_conversion\") +\n '<div class=\"menu menu_conversion_functions\"></div></div>'\n );\n\n // Insert Math functions:\n for (let i = 0; i < window.system_functions.length; i++) {\n const t = $('<div class=\"item\"></div>');\n t.data(\"function_reference\", window.system_functions[i]);\n t.data(\"option\", VAR_OR_VALUE_TYPES.only_function);\n t.text(\n LocalizedStrings.translateInternalFunction(\n window.system_functions[i].identifier\n )\n );\n\n switch (window.system_functions[i].category) {\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.math:\n sub_menu.find(\".menu_math_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.text:\n sub_menu.find(\".menu_text_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement:\n sub_menu.find(\".menu_arrangement_functions\").append(t);\n break;\n case Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion:\n sub_menu.find(\".menu_conversion_functions\").append(t);\n break;\n }\n }\n}\n\nfunction addFunctionsToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_functions\");\n sub_menu.text(\"\");\n\n for (let i = 0; i < window.program_obj.functions.length; i++) {\n const temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_function +\n '\">' +\n window.program_obj.functions[i].name +\n \" </div>\"\n );\n temp.data(\"function_reference\", window.program_obj.functions[i]);\n sub_menu.append(temp);\n }\n}\n\nfunction addVariablesToMenu (\n function_obj,\n menu_var_or_value,\n ref_object,\n expression_element\n) {\n const sub_menu = menu_var_or_value.find(\".menu_only_vars\");\n sub_menu.text(\"\");\n let is_there = false;\n\n if (window.program_obj.globals) {\n if (ref_object.include_constant) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n window.program_obj.globals[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", window.program_obj.globals[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n } else {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (!window.program_obj.globals[i].is_constant) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n window.program_obj.globals[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", window.program_obj.globals[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n }\n }\n\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n function_obj.parameters_list[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", function_obj.parameters_list[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n var temp = $(\n '<div class=\"item\" data-option=\"' +\n VAR_OR_VALUE_TYPES.only_variable +\n '\">' +\n function_obj.variables_list[i].name +\n \" </div>\"\n );\n temp.data(\"variable_reference\", function_obj.variables_list[i]);\n sub_menu.append(temp);\n is_there = true;\n }\n }\n if (!is_there) {\n sub_menu.append(\n $(\n '<div class=\"header\">' +\n LocalizedStrings.getUI(\"text_no_variable\") +\n \"</div>\"\n )\n );\n sub_menu.append(\n $(\n '<div class=\"item disabled\">' +\n LocalizedStrings.getUI(\"text_no_variable_instruction\") +\n \"</div>\"\n )\n );\n }\n}\n\nfunction addHandlers (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n) {\n if (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n menu_var_or_value.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S7\");\n dom_object.find(\".var_name\").remove();\n switch ($selectedItem.data(\"option\")) {\n case VAR_OR_VALUE_TYPES.only_function:\n openInputToFunction(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $($selectedItem).data(\"function_reference\"),\n expression_element\n );\n break;\n\n case VAR_OR_VALUE_TYPES.only_value:\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n break;\n\n case VAR_OR_VALUE_TYPES.only_variable:\n openInputToVariable(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $($selectedItem).data(\"variable_reference\"),\n expression_element\n );\n break;\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n\n if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n RepeatNTimesManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n\n dom_object\n .find(\".width-dynamic\")\n .on(\"input\", function () {\n const inputWidth = $(this).textWidth() + 10;\n $(this).focus();\n\n const tmpStr = $(this).val();\n $(this).val(\"\");\n $(this).val(tmpStr);\n\n $(this).css({\n width: inputWidth,\n });\n })\n .trigger(\"input\");\n\n if (command.type == Models.COMMAND_TYPES.comment) {\n dom_object.parent().on(\"click\", function (e) {\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".value_rendered\").empty();\n dom_object.find(\".value_rendered\").remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n }\n}\n\nfunction openInputToFunction (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n function_selected,\n expression_element\n) {\n ref_object.function_called = function_selected;\n ref_object.parameters_list = [];\n\n if (\n function_selected.parameters_list != null &&\n function_selected.parameters_list.length > 0\n ) {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n if (function_selected.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n function_selected.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \"</i> <span> ( </span>\";\n }\n for (var j = 0; j < function_selected.parameters_list.length; j++) {\n parameters_menu +=\n '<div class=\"render_style_param parameter_' + j + '\"></div>';\n if (j + 1 != function_selected.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n for (var j = 0; j < function_selected.parameters_list.length; j++) {\n var temp;\n if (function_selected.parameters_list[j].dimensions > 0) {\n temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.variable_and_function,\n null,\n null,\n null,\n true,\n function_selected.parameters_list[j].dimensions\n );\n } else {\n temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n }\n ref_object.parameters_list.push(temp);\n renderMenu(\n command,\n temp,\n parameters_menu.find(\".parameter_\" + j),\n function_obj,\n 2,\n expression_element\n );\n }\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S8\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP7\");\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n } else {\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n var parameters_menu;\n\n if (function_selected.name) {\n parameters_menu =\n '<div class=\"parameters_function_called\"> ' +\n function_selected.name +\n \" <span> ( </span>\";\n } else {\n parameters_menu =\n '<div class=\"parameters_function_called\"> <i>' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \"</i> <span> ( </span>\";\n }\n\n parameters_menu += \"<span> ) </span></div>\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".parameters_function_called\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S9\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP8\");\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n }\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n }*/\n}\n\nfunction openInputToVariable (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n variable_selected,\n expression_element\n) {\n ref_object.content = variable_selected;\n\n menu_var_or_value.find(\".text\").text(\" \");\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n let variable_render =\n '<div class=\"variable_rendered\"> <span class=\"var_name\">' +\n variable_selected.name +\n \"</span>\";\n\n if (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n }\n if (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n variable_render +=\n ' <span>[ </span> <div class=\"row_container\"></div> <span> ]</span> ';\n variable_render +=\n ' <span>[ </span> <div class=\"column_container\"></div> <span> ]</span>';\n }\n\n variable_render += \"</div>\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n if (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n ref_object.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n renderMenu(\n command,\n ref_object.column,\n variable_render.find(\".column_container\"),\n function_obj,\n 2,\n expression_element\n );\n }\n if (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n ref_object.row = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n renderMenu(\n command,\n ref_object.row,\n variable_render.find(\".row_container\"),\n function_obj,\n 2,\n expression_element\n );\n\n ref_object.column = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n renderMenu(\n command,\n ref_object.column,\n variable_render.find(\".column_container\"),\n function_obj,\n 2,\n expression_element\n );\n }\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n console.log(\"dom_object 10: \");\n console.log(dom_object);\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n context_menu.insertAfter(dom_object.find(\".variable_rendered\"));\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n console.log(\"S10\");\n if ($selectedItem.data(\"clear\")) {\n console.log(\"PP9\");\n dom_object.text(\"\");\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n\n if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n RepeatNTimesManagement.manageClearExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected);\n }*/\n}\n\nfunction openInputToValue (\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n) {\n if (ref_object.content == null) {\n ref_object.content = \"\";\n }\n\n menu_var_or_value.find(\".text\").text(\" \");\n const field = $(\n '<input type=\"text\" size=\"2\" class=\"width-dynamic-minus\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" />'\n );\n field.insertBefore(dom_object.find(\".menu_var_or_value_dom\"));\n\n\n field.on('input', function() {\n var input_field = $(this);\n var inputWidth = input_field.textWidth()+10;\n inputWidth = inputWidth<50?50:inputWidth;\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n const rendered = $('<div class=\"value_rendered\"></div>');\n rendered.insertBefore(field);\n\n field.focus();\n field.val(ref_object.content);\n\n let context_menu =\n '<div class=\"ui dropdown context_menu_clear\"><div class=\"text\"></div><i class=\"dropdown icon\"></i><div class=\"menu\">';\n context_menu +=\n '<div class=\"item\" data-clear=\"true\">' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"</div>\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '<div class=\"item\"><i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('text_change');\n context_menu += '<div class=\"menu\">';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.exp_op_exp+'\">EXP OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.op_exp+'\">OP EXP</div>';\n context_menu += '<div class=\"item\" data-exp=\"'+Models.EXPRESSION_ELEMENTS.par_exp_par+'\">( EXP )</div>';\n context_menu += '</div></div>';\n }*/\n\n context_menu += \"</div></div>\";\n\n context_menu = $(context_menu);\n\n dom_object.find(\".menu_var_or_value_dom\").remove();\n\n if (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n context_menu.insertAfter(field);\n }\n\n context_menu.dropdown({\n onChange: function (value, text, $selectedItem) {\n if ($selectedItem.data(\"clear\")) {\n dom_object.text(\"\");\n\n dom_object.find(\".value_rendered\").remove();\n dom_object.find(\".context_menu_clear\").remove();\n dom_object.find(\".width-dynamic-minus\").remove();\n\n ref_object.content = null;\n ref_object.row = null;\n ref_object.column = null;\n\n delete ref_object.function_called;\n delete ref_object.parameters_list;\n\n renderMenu(\n command,\n ref_object,\n dom_object,\n function_obj,\n 2,\n expression_element\n );\n }\n\n if ($selectedItem.data(\"exp\")) {\n AttribuitionsManagement.manageExpressionElements(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n $selectedItem,\n expression_element\n );\n }\n },\n selectOnKeydown: false,\n });\n\n dom_object.find(\".width-dynamic-minus\").focusout(function () {\n /*if (\n $(this)\n .val()\n .trim()\n ) {\n ref_object.content = $(this)\n .val()\n .trim();\n }*/\n ref_object.content = $(this)\n .val();\n\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.replaceAll(\" \", \"&nbsp;\"));\n } else {\n rendered.text(ref_object.content);\n }\n $(this).remove();\n });\n\n dom_object.find(\".width-dynamic-minus\").on(\"keydown\", function (e) {\n const code = e.keyCode || e.which;\n if (code == 13) {\n /*if (\n $(this)\n .val()\n .trim()\n ) {\n ref_object.content = $(this)\n .val()\n .trim();\n }*/\n ref_object.content = $(this)\n .val();\n\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.replaceAll(\" \", \"&nbsp;\"));\n } else {\n rendered.text(ref_object.content);\n }\n\n $(this).remove();\n }\n if (code == 27) {\n if (isNaN(ref_object.content)) {\n rendered.html(ref_object.content.replaceAll(\" \", \"&nbsp;\"));\n } else {\n rendered.text(ref_object.content);\n }\n\n $(this).remove();\n }\n });\n\n if (command.type == Models.COMMAND_TYPES.comment) {\n /*rendered.parent().on('click', function(e) {\n rendered.parent().off();\n console.log(\"TTT14\");\n rendered.remove();\n rendered.empty();\n rendered.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n });*/\n }\n\n rendered.on(\"click\", function (e) {\n console.log(\"TTT2\");\n rendered.empty();\n rendered.remove();\n dom_object.empty();\n dom_object.append('<span class=\"menu_var_or_value_dom\"> </span>');\n\n openInputToValue(\n command,\n ref_object,\n dom_object,\n menu_var_or_value,\n function_obj,\n expression_element\n );\n });\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n AttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n }*/\n}\n\n$.fn.textWidth = function (text, font) {\n if (!$.fn.textWidth.fakeEl)\n $.fn.textWidth.fakeEl = $(\"<span>\")\n .hide()\n .appendTo(document.body);\n\n $.fn.textWidth.fakeEl\n .text(text || this.val() || this.text() || this.attr(\"placeholder\"))\n .css(\"font\", font || this.css(\"font\"));\n\n return $.fn.textWidth.fakeEl.width();\n};\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('<div class=\"ui whiletrue created_element\"> <i class=\"ui icon small sync\"></i> <span> ' + LocalizedStrings.getUI('text_command_while') + ' ( x < 10 ) <br> </span></div>');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '<div class=\"ui whiletrue command_container\"> <i class=\"ui icon small sync command_drag\"></i> <i class=\"ui icon times red button_remove_command\"></i> <div class=\"ui context_menu\"></div> <span class=\"span_command_spec\"> ' + LocalizedStrings.getUI('text_command_while') + ' </span>';\n\tret += '<span class=\"span_command_spec\"> ( </span> <div class=\"conditional_expression\"></div> <span class=\"span_command_spec\"> ) </span>';\n\tret += ' </span>';\n\tret += '<div class=\"ui block_commands\">';\n\tret += '</div>';\n\tret += '<span> </span>';\n\tret += '</div>';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, whiletrue_dom) {\n\n\twhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, whiletrue_dom)) {\n\t\t\twhiletrue_dom.fadeOut(400, function() {\n\t\t\t\twhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from \"../ivprog_elements\";\nimport { LocalizedStrings } from \"../../services/localizedStringsService\";\nimport * as VariableValueMenu from \"./variable_value_menu\";\nimport * as VariableValueMenuManagement from \"./variable_value_menu\";\nimport * as CommandsManagement from \"../commands\";\nimport * as GenericExpressionManagement from \"./generic_expression\";\n\nexport function createFloatingCommand () {\n return $(\n '<div class=\"ui writer created_element\"> <i class=\"ui icon small upload\"></i> <span> ' +\n LocalizedStrings.getUI(\"text_command_write\") +\n \" var </span></div>\"\n );\n}\n\nexport function renderCommand (command, function_obj) {\n const ret = `<div class=\"ui writer command_container\">\n <i class=\"ui icon small upload command_drag\"></i>\n <i class=\"ui icon times red button_remove_command\"></i>\n <span class=\"span_command_spec\">${LocalizedStrings.getUI(\n \"text_command_write\"\n )}\n ( </span><div class=\"all_elements_write\"></div>\n <span class=\"close_parentheses span_command_spec\">)</span>\n <img data-state=\"${command.newline ? \"on\" : \"false\"}\" src=\"${\n command.newline ? \"img/new_line.svg\" : \"img/no_new_line.svg\"\n }\" class=\"ivprog_newline_btn\"/>\n </div>`;\n const el = $(ret);\n el.data(\"command\", command);\n\n //renderExpression (command, function_obj, div_to_render, expression_array)\n\n GenericExpressionManagement.renderExpression(\n command,\n function_obj,\n el.find(\".all_elements_write\"),\n command.content\n );\n\n /*for (var i = 0; i < command.content.length; i ++) {\n\t\tvar new_div_item = $( '<div class=\"var_value_menu_div\"></div>' );\n\t\tvar div_parent_with_handler = $( '<div class=\"div_parent_handler\"></div>' );\n\t\tdiv_parent_with_handler.append($('<i class=\"ui icon ellipsis vertical inverted handler\"></i>'));\n\t\tdiv_parent_with_handler.append(new_div_item);\n\t\tdiv_parent_with_handler.append($('<i class=\"white inverted icon times handler\"></i>'));\n\n\t\tel.find('.all_elements_write').append(div_parent_with_handler);\n\t\tVariableValueMenu.renderMenu(command, command.content[i], new_div_item, function_obj);\n\n\t\taddHandlerIconAdd(el.find('.all_elements_write'), command, function_obj);\n\n\t\taddHandlersManager(command, function_obj, el, div_parent_with_handler, command.content[i]);\n\t}\n\n\tif (command.content.length == 0) {\n\t\taddHandlerIconAdd(el.find('.all_elements_write'), command, function_obj);\n\t}*/\n\n addHandlers(command, function_obj, el);\n return el;\n}\n\nfunction addHandlersManager (\n command,\n _function_obj,\n _writer_dom,\n item_div,\n content_element\n) {\n item_div.find(\".times\").on(\"click\", function () {\n for (let i = 0; i < command.content.length; i++) {\n if (command.content[i] == content_element) {\n delete command.content[i];\n command.content.splice(i, 1);\n\n item_div.children().off();\n item_div.off();\n item_div.fadeOut();\n\n if (command.content.length > 0) {\n item_div.next(\".icon_add_item_to_writer\").fadeOut();\n }\n break;\n }\n }\n });\n}\n\nfunction addHandlers (command, function_obj, writer_dom) {\n writer_dom.find(\".button_remove_command\").on(\"click\", function () {\n if (CommandsManagement.removeCommand(command, function_obj, writer_dom)) {\n writer_dom.fadeOut(400, function () {\n writer_dom.remove();\n });\n }\n });\n\n Sortable.create(writer_dom.find(\".all_elements_write\")[0], {\n handle: \".ellipsis\",\n animation: 100,\n ghostClass: \"ghost\",\n group: \"writer_\" + Math.floor(Math.random() * 10000000),\n draggable: \".div_parent_handler\",\n onEnd: function (evt) {\n command.content.splice(\n evt.newIndex,\n 0,\n command.content.splice(evt.oldIndex, 1)[0]\n );\n\n writer_dom.empty();\n writer_dom.replaceWith(renderCommand(command, function_obj));\n },\n });\n // Attach event handles for the newline button\n const newlineBtn = writer_dom.find(\".ivprog_newline_btn\");\n newlineBtn.on(\"click\", function () {\n const state = this.dataset.state;\n if (state === \"on\") {\n this.dataset.state = \"off\";\n command.newline = false;\n this.setAttribute(\"src\", \"img/no_new_line.svg\");\n } else {\n this.dataset.state = \"on\";\n command.newline = true;\n this.setAttribute(\"src\", \"img/new_line.svg\");\n }\n writer_dom.data(\"command\", command);\n setPopup(newlineBtn, command.newline);\n });\n // Attach jquery popup\n setPopup(newlineBtn, command.newline);\n}\n\nfunction setPopup (element, state) {\n if (element.popup(\"exists\")) {\n element.popup(\"destroy\");\n }\n const content = state\n ? LocalizedStrings.getUI(\"write_command_newline_on\")\n : LocalizedStrings.getUI(\"write_command_newline_off\");\n element.popup({\n content: content,\n delay: {\n show: 750,\n hide: 0,\n },\n });\n}\n\nfunction _addHandlerIconAdd (\n dom_object,\n command,\n function_obj,\n insert_after = false,\n after_which = null\n) {\n const icon_add_item = $(\n '<i class=\"ui icon plus square outline icon_add_item_to_writer\"></i> '\n );\n if (!insert_after) {\n dom_object.append(icon_add_item);\n } else {\n icon_add_item.insertAfter(after_which);\n }\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '<div class=\"div_parent_handler\" style=\"display:none;\"></div>'\n );\n const new_div_item = $('<div class=\"var_value_menu_div\"></div>');\n div_parent_with_handler.append(\n $('<i class=\"ui icon ellipsis vertical inverted handler\"></i>')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('<i class=\"white inverted icon times handler\"></i>')\n );\n div_parent_with_handler.insertAfter(icon_add_item);\n\n const new_related_menu = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n VariableValueMenu.renderMenu(\n command,\n new_related_menu,\n new_div_item,\n function_obj\n );\n\n addHandlerIconAdd(\n dom_object,\n command,\n function_obj,\n true,\n div_parent_with_handler\n );\n\n addHandlersManager(\n command,\n function_obj,\n dom_object,\n div_parent_with_handler,\n new_related_menu\n );\n let pos = 1;\n dom_object.find(\".icon_add_item_to_writer\").each(function () {\n if ($(this).get(0) === icon_add_item.get(0)) {\n command.content.splice(pos, 0, new_related_menu);\n } else {\n pos++;\n }\n });\n if (command.content.length == 1) {\n icon_add_item.remove();\n }\n div_parent_with_handler.fadeIn();\n });\n}\n\nexport function addContent (\n command,\n _ref_object,\n dom_object,\n _menu_var_or_value,\n function_obj,\n _ref_object_content\n) {\n if (dom_object.hasClass(\"var_value_menu_div\")) {\n const icon_add_item = $(\n '<i class=\"ui icon plus square outline icon_add_item_to_writer\"></i> '\n );\n icon_add_item.insertAfter(dom_object);\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '<div class=\"div_parent_handler\"></div>'\n );\n div_parent_with_handler.append(\n $('<i class=\"ui icon ellipsis vertical inverted handler\"></i>')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('<i class=\"white inverted icon times handler\"></i>')\n );\n\n div_parent_with_handler.insertAfter(icon_add_item);\n const new_related_menu = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n VariableValueMenu.renderMenu(\n command,\n new_related_menu,\n new_div_item,\n function_obj\n );\n\n addHandlersManager(\n command,\n function_obj,\n dom_object,\n div_parent_with_handler,\n new_related_menu\n );\n\n command.content.push(new_related_menu);\n\n if (command.content.length == 1) {\n icon_add_item.remove();\n }\n });\n }\n}\n","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as GlobalsManagement from './globals';\nimport * as VariablesManagement from './variables';\nimport * as CommandsManagement from './commands';\nimport * as CodeManagement from './code_generator';\nimport * as VariableValueMenu from './commands/variable_value_menu';\nimport { DOMConsole } from './../io/domConsole';\nimport { IVProgProcessor } from './../processor/ivprogProcessor';\nimport WatchJS from 'melanke-watchjs';\nimport { SemanticAnalyser } from '../processor/semantic/semanticAnalyser';\nimport { IVProgAssessment } from '../assessment/ivprogAssessment';\nimport * as AlgorithmManagement from './algorithm';\nimport * as Utils from './utils';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\nimport VersionInfo from './../../.ima_version.json';\nimport * as TextEditor from \"./text_editor\";\nimport { isValidIdentifier } from \"./../util/utils\";\nimport { Modes } from '../processor/modes';\n\nvar counter_new_functions = 0;\nvar counter_new_parameters = 0;\nvar ivprog_version = VersionInfo.version;\n\nconst globalChangeListeners = [];\nconst functionsChangeListeners = [];\nlet proc = null;\nlet domConsole = null;\nlet _testCases = [];\nlet isRunning = false;\nwindow.studentGrade = null;\nwindow.LocalizedStrings = LocalizedStrings;\nconst program = new Models.Program();\n\nwindow.system_functions = [];\n// Adding math functions:\nwindow.system_functions.push(new Models.SystemFunction('$sin', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$cos', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$tan', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$sqrt', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$pow', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$log', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$abs', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$negate', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$invert', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$max', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$min', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$rand', Types.REAL, 0, [],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\n// Adding text functions:\nwindow.system_functions.push(new Models.SystemFunction('$substring', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$length', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$uppercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$lowercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$charAt', Types.CHAR, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\n// Adding arrangement functions:\nwindow.system_functions.push(new Models.SystemFunction('$numElements', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 1)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixLines', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixColumns', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\n// Adding conversion functions:\nwindow.system_functions.push(new Models.SystemFunction('$isReal', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isInt', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castReal', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castInt', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castString', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castChar', Types.CHAR, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\n\nconsole.log(' ___ ___ ________ \\n / / / / / ____/ \\n / / / / / / \\n / / / / ______ ___ / /__ \\n / / / / / \\\\ / / / ___/ \\n / /______ / / / /\\\\ \\\\/ / / / \\n / / / / / / \\\\ / / /____ \\n/__________/ /___/ /___/ \\\\___/ /________/ \\n\\n Laboratório de Informática na Educação\\n http://line.ime.usp.br');\n\nconst mainFunction = new Models.Function(LocalizedStrings.getUI(\"start\"), Types.VOID, 0, [], true, false);\nmainFunction.function_comment = new Models.Comment(LocalizedStrings.getUI('text_comment_main'));\nprogram.addFunction(mainFunction);\n\nwindow.program_obj = program;\n\nwindow.generator = CodeManagement.generate;\nwindow.runCodeAssessment = runCodeAssessment;\nwindow.renderAlgorithm = AlgorithmManagement.renderAlgorithm;\nwindow.insertContext = false;\nwindow.watchW = WatchJS;\n\nWatchJS.watch(window.program_obj.globals, function(){\n if (window.insertContext) {\n setTimeout(function() {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }\n}, 1);\n\nWatchJS.watch(window.program_obj.functions, function(){\n if (window.insertContext) {\n setTimeout(function(){\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }\n}, 1);\n\nfunction addFunctionHandler () {\n\n\tconst new_function = new Models.Function(LocalizedStrings.getUI(\"new_function\") + \"_\" + counter_new_functions, Types.VOID, 0, [], false, false, [], new Models.Comment(LocalizedStrings.getUI('text_comment_start')));\n\tprogram.addFunction(new_function);\n\n\tcounter_new_functions ++;\n\n window.insertContext = true;\n registerUserEvent(new_function.name, ActionTypes.INSERT_FUNCTION);\n\n // var newe = renderFunction(new_function);\n renderFunction(new_function);\n /*newe.css('display', 'none');\n newe.fadeIn();*/\n}\n\nfunction addParameter (function_obj, function_container/*, is_from_click = false*/) {\n if (function_obj.parameters_list == null) {\n function_obj.parameters_list = [];\n }\n const new_parameter = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI(\"new_parameter\") + \"_\" + counter_new_parameters);\n function_obj.parameters_list.push(new_parameter);\n counter_new_parameters ++;\n registerUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_PARAM, new_parameter.name, Types.INTEGER, 0);\n //var newe = renderParameter(function_obj, new_parameter, function_container);\n renderParameter(function_obj, new_parameter, function_container);\n // if (is_from_click) {\n // newe.css('display', 'none');\n // newe.fadeIn();\n // }\n}\n\nfunction updateReturnType (function_obj, new_type, new_dimensions = 0) {\n registerUserEvent(function_obj.name, ActionTypes.CHANGE_FUNCTION_RETURN, new_type, new_dimensions);\n function_obj.return_type = new_type;\n function_obj.return_dimensions = new_dimensions;\n}\n\nfunction removeFunction (function_obj) {\n var index = program.functions.indexOf(function_obj);\n if (index > -1) {\n registerUserEvent(function_obj.name, ActionTypes.REMOVE_FUNCTION);\n program.functions.splice(index, 1);\n }\n}\n\nfunction minimizeFunction (function_obj) {\n function_obj.is_hidden = !function_obj.is_hidden;\n}\n\nfunction addHandlers (function_obj, function_container) {\n\n function_container.find('.ui.dropdown.function_return').dropdown({\n onChange: function(value, text, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateReturnType(function_obj, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n } else {\n updateReturnType(function_obj, Types[$selectedItem.data('type')]);\n }\n },\n selectOnKeydown: false\n });\n\n function_container.find( \".name_function_updated\" ).on('click', function(e){\n enableNameFunctionUpdate(function_obj, function_container);\n });\n\n function_container.find( \".add_parameter_button\" ).on('click', function(e){\n window.insertContext = true;\n addParameter(function_obj, function_container, true);\n });\n\n function_container.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\n function_container.find('.menu_commands a').on('click', function(evt){\n if (function_obj.commands == null || function_obj.commands.length == 0) {\n function_obj.commands = [];\n var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n function_obj.commands.push(new_cmd);\n\n CommandsManagement.renderCommand(new_cmd, function_container.find('.commands_list_div'), 3, function_obj);\n registerUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, $(this).data('command'), '/', 0);\n } else {\n CommandsManagement.createFloatingCommand(function_obj, function_container, $(this).data('command'), evt);\n }\n\n });\n\n function_container.find('.add_var_button_function').on('click', function(e){\n window.insertContext = true;\n VariablesManagement.addVariable(function_obj, function_container, true);\n });\n\n function_container.find('.remove_function_button').on('click', function(e){\n removeFunction(function_obj);\n function_container.fadeOut();\n });\n\n function_container.find('.minimize_function_button').on('click', function(e){\n minimizeFunction(function_obj);\n if (function_obj.is_hidden) {\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n function_container.find(\".function_area\").slideToggle();\n } else {\n function_container.find(\".function_area\").slideToggle(function(){\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n });\n }\n \n });\n}\n\n// Essa função imprime o tipo de retorno da função e cria o menu do tipo 'select' para alteração\nfunction renderFunctionReturn (function_obj, function_element) {\n\n var ret = '<div class=\"ui dropdown function_return\">';\n \n if (function_obj.return_dimensions == 1) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI(\"vector\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] </div>';\n } else if (function_obj.return_dimensions == 2) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI(\"matrix\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] [ ] </div>';\n } else {\n ret += '<div class=\"text\">'+LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"menu\">';\n\n for (var tm in Types) {\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions < 1 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"item ' + (function_obj.return_dimensions == 1 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n\n ret += '<div class=\"item ' + (function_obj.return_dimensions == 2 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (function_obj.return_type == tm.toLowerCase() && function_obj.return_dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n ret += '</div></div>';\n\n ret = $(ret);\n \n function_element.find('.function_return').append(ret);\n}\n\nvar cont = 0;\n\nexport function renderFunction (function_obj) {\n \n var appender = '<div class=\"ui secondary segment function_div list-group-item function_cont_'+cont+'\">';\n\n if (function_obj.function_comment) {\n //appender += renderComment(function_obj.function_comment, sequence, true, -1);\n }\n \n appender += '<span class=\"glyphicon glyphicon-move move_function\" aria-hidden=\"true\"><i class=\"icon sort alternate vertical\"></i></span>';\n\n appender += (function_obj.is_main ? '<div class=\"div_start_minimize_v\"> </div>' : '<button class=\"ui icon button large remove_function_button\"><i class=\"red icon times\"></i></button>')\n + '<button class=\"ui icon button tiny minimize_function_button\"><i class=\"icon window minimize\"></i></button>';\n\n appender += '<div class=\"function_signature_div\">'+LocalizedStrings.getUI(\"function\")+' ';\n\n if (function_obj.is_main) {\n appender += '<div class=\"function_name_div\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' + LocalizedStrings.getUI('type_void') + ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class=\"span_name_function\" >'+function_obj.name+'</span> </div> '\n + ' <span class=\"parethesis_function\">( </span> <div class=\"ui large labels parameters_list\">';\n } else {\n appender += '<div class=\"ui function_return\"></div>';\n\n appender += '<div class=\"function_name_div function_name_div_updated\"><span class=\"span_name_function name_function_updated\">'+function_obj.name+'</span> </div> ' \n + ' <span class=\"parethesis_function\"> ( </span> <i class=\"ui icon plus square outline add_parameter_button\"></i> <div class=\"ui large labels parameters_list container_parameters_list\">';\n }\n \n appender += '</div> <span class=\"parethesis_function\"> ) </span> </div>'\n + (function_obj.is_hidden ? ' <div class=\"function_area\" style=\"display: none;\"> ' : ' <div class=\"function_area\"> ');\n\n appender += '<div class=\"ui add_var_context add_var_button_function\" style=\"float: left;\"> <div class=\"ui icon button purple\"> ';\n\n appender += '<i class=\"icons\"><i class=\"icon superscript\" style=\"margin-top: -2px;margin-bottom: 2px;margin-left: 1px;margin-right: 1px;\"></i><i class=\"corner add icon inverted\" style=\"font-size: 9px;padding-top: 6px;padding-left: 9px;\"></i></i>';\n\n appender += '</div></div>';\n\n appender += '<div class=\"ui top attached segment variables_list_div\"></div>';\n\n appender += '<div class=\"ui bottom attached segment commands_list_div commands_cont_'+cont+'\">'\n + '<div class=\"ui rail\" style=\"width: 35px; margin-left: -36px;\"><div class=\"ui sticky sticky_cont_'+cont+'\" style=\"top: 50px !important;\">';\n\n\n appender += '<div class=\"ui icon button dropdown menu_commands orange\" > '\n + '<i class=\"icons\"><i class=\"icon code\" style=\"margin-top: -1px;margin-bottom: 1px;margin-right: 0px;\"></i><i class=\"corner add icon inverted\" style=\"font-size: 9px;padding-top: 6px;padding-left: 9px;\"></i></i>'\n + '<div class=\"menu\"> ';\n appender += '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.reader+'\"><i class=\"download icon\"></i> ' +LocalizedStrings.getUI('text_read_var')+ '</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.writer+'\"><i class=\"upload icon\"></i> '+LocalizedStrings.getUI('text_write_var')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.comment+'\"><i class=\"quote left icon\"></i> '+LocalizedStrings.getUI('text_comment')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.attribution+'\"><i class=\"arrow left icon\"></i> '+LocalizedStrings.getUI('text_attribution')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.functioncall+'\"><i class=\"hand point right icon\"></i> '+LocalizedStrings.getUI('text_functioncall')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.iftrue+'\" ><i class=\"random icon\"></i> '+LocalizedStrings.getUI('text_iftrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.repeatNtimes+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_repeatNtimes')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.whiletrue+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_whiletrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.dowhiletrue+'\"><i class=\"sync icon\"></i> '+LocalizedStrings.getUI('text_dowhiletrue')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.switch+'\"><i class=\"list icon\"></i> '+LocalizedStrings.getUI('text_switch')+'</a>'\n + '<a class=\"item\" data-command=\"'+Models.COMMAND_TYPES.return+'\"><i class=\"reply icon\"></i> '+LocalizedStrings.getUI('text_btn_return')+'</a>'\n + '</div></div>';\n\n\n appender += '</div></div>'\n +'</div>';\n\n appender += '</div></div>';\n\n appender = $(appender);\n\n $('.all_functions').append(appender);\n\n appender.data('fun', function_obj);\n appender.find('.commands_list_div').data('fun', function_obj);\n\n renderFunctionReturn(function_obj, appender);\n\n addHandlers(function_obj, appender);\n\n // Rendering parameters: \n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n renderParameter(function_obj, function_obj.parameters_list[j], appender);\n }\n\n // Rendering variables:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n VariablesManagement.renderVariable(appender, function_obj.variables_list[j], function_obj);\n }\n // Rendering commands:\n for (var j = 0; j < function_obj.commands.length; j++) {\n CommandsManagement.renderCommand(function_obj.commands[j], $(appender.find('.commands_list_div')[0]), 3, function_obj);\n }\n $('.minimize_function_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_hide_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n var function_index = program.functions.indexOf(function_obj);\n\n Sortable.create(appender.find(\".variables_list_div\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'local_vars_drag_' + function_index,\n onEnd: function (evt) {\n updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n\n addSortableHandler(appender.find(\".commands_list_div\")[0], function_index);\n\n if (!function_obj.is_main) {\n Sortable.create(appender.find(\".container_parameters_list\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'parameters_drag_' + program.functions.indexOf(function_obj),\n onEnd: function (evt) {\n updateSequenceParameters(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n }\n\n if (function_obj.commands.length > 0) {\n var teste = '.ui.sticky.sticky_cont_'+cont;\n $(teste).sticky({\n context: '.ui.bottom.attached.segment.commands_list_div.commands_cont_'+cont,\n scrollContext: '.ivprog_visual_panel',\n observeChanges: true,\n offset: 40,\n onStick: function (evt) {\n $(teste).css('top', '20px', 'important');\n }, \n onBottom: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onUnstick: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onReposition: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onScroll: function (evt) {\n $(teste).css('top', '20px', 'important');\n if (!isVisible($(teste), $(teste).parent())) {\n $(teste).removeClass('fixed');\n }\n },\n onTop: function (evt) {\n $(teste).css('top', '20px', 'important');\n }\n });\n }\n \n cont ++;\n\n return appender;\n}\n\nfunction isVisible (element, container) {\n\n var elementTop = $(element).offset().top,\n elementHeight = $(element).height(),\n containerTop = $(container).offset().top,\n containerHeight = $(container).height() - 30;\n\n return ((((elementTop - containerTop) + elementHeight) > 0)\n && ((elementTop - containerTop) < containerHeight));\n}\n\n\nwindow.evento_drag;\n\nfunction updateProgramObjDrag () {\n const nodes = Array.prototype.slice.call( $('.all_functions').children() );\n let function_index;\n var start_index;\n let function_obj;\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function (index) {\n const ref = $(this);\n if (ref.hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n start_index = index;\n function_obj = ref;\n }\n });\n\n const path_target = [];\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function () {\n if ($(this).hasClass('command_container')) {\n path_target.push(this);\n }\n });\n if (path_target.length == 0) {\n //console.log('soltou na raiz, na posição: ' + evento_drag.newIndex + ' mas ainda não sei de onde saiu ');\n } else {\n //console.log('soltou dentro de algum bloco, sequência vem logo abaixo (de baixo pra cima): ');\n //console.log(path_target);\n }\n\n var index_each = [];\n var path_relative = [];\n for (var i = path_target.length - 1; i >= 0; i --) {\n console.log('da vez', $(path_target[i + 1]));\n if (i == (path_target.length - 1)) { // está na raiz\n var indice_na_raiz = function_obj.find('.command_container').index(path_target[i]);\n console.log('índice na raiz: ', indice_na_raiz);\n } else {\n if ($(path_target[i + 1]).hasClass('iftrue')) {\n if ($(path_target[i]).parent().hasClass('commands_if')) {\n path_relative.push('if');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n } else {\n path_relative.push('else');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n }\n } else if ($(path_target[i + 1]).hasClass('dowhiletrue')) {\n path_relative.push('dowhiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('repeatNtimes')) {\n path_relative.push('repeatNtimes');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('whiletrue')) {\n path_relative.push('whiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('switch')) {\n path_relative.push('switch');\n //index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n }\n }\n }\n // var index_in_block = -1;\n const is_in_else = $(evento_drag.item).parent().hasClass('commands_else');\n\n // index_in_block = $(evento_drag.item).parent().find('.command_container').index(evento_drag.item);\n\n const is_in_case_switch = $(evento_drag.item).parent().hasClass('case_commands_block');\n // var index_case_of_switch = -1;\n // if (is_in_case_switch) {\n // index_case_of_switch = $(evento_drag.item).parent().parent().parent().find('.case_div').index($(evento_drag.item).parent().parent());\n // }\n\n /*console.log('path_relative:');\n console.log(path_relative);\n console.log('index_each:');\n console.log(index_each);\n console.log('index_in_block:');\n console.log(index_in_block);\n console.log('ele está em algum bloco de senão? ');\n console.log(is_in_else);\n console.log('ele está dentro de um case de switch?');\n console.log(is_in_case_switch);\n console.log('qual é o índice do case: ');\n console.log(index_case_of_switch);*/\n\n // encontrar o elemento na árvore:\n\n var command_start_point = window.program_obj.functions[function_index].commands[indice_na_raiz];\n var block_to_insert = command_start_point;\n for (var i = 0; i < index_each.length; i++) {\n if (path_relative[i] == \"else\") {\n block_to_insert = block_to_insert.commands_else[index_each[i]];\n } else if (path_relative[i] == \"switch\") {\n\n } else {\n block_to_insert = block_to_insert.commands_block[index_each[i]]\n }\n }\n\n //console.log('command_start_point', command_start_point);\n //console.log('block_to_insert', block_to_insert);\n\n // agora tem que alocar o comando na árvore, mas considerar as quatro situações:\n // (1) se está em um else ou (2) se está em switch ou (3) será um caso padrão ou (4) se será na raiz.\n \n if (path_target.length == 0) { // soltou na raiz:\n window.program_obj.functions[function_index].commands.splice(evento_drag.newIndex - 1, 0, command_in_drag);\n } else if (is_in_else) {\n if (block_to_insert.commands_else) {\n block_to_insert.commands_else.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_else = [];\n block_to_insert.commands_else.push(command_in_drag);\n }\n } else if (is_in_case_switch) {\n\n } else {\n // verificar se tem alguma coisa no bloco:\n if (block_to_insert.commands_block) {\n console.log(\"existe alguma coisa dentro do bloco, index: \", evento_drag.newIndex);\n block_to_insert.commands_block.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_block = [];\n block_to_insert.commands_block.push(command_in_drag);\n }\n }\n\n window.draging = false;\n renderAlgorithm();\n \n\n}\n\nfunction prepareDragHandler (evt) {\n window.draging = true;\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n command_in_drag = $(evt.item).data(\"command\");\n\n //console.log('$(evt.item).parent(): ');\n //console.log($(evt.item).parent());\n\n // descobrir qual das quatro situações:\n if ($(evt.item).parent().hasClass('commands_list_div')) { // está na raiz:\n if (function_obj.commands.indexOf(command_in_drag) > -1) {\n function_obj.commands.splice(function_obj.commands.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('commands_else')) { // está no else:\n if ($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_else.splice($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('case_commands_block')) { // está em um switch:\n\n } else { // caso padrão:\n if ($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_block.splice($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag), 1);\n }\n }\n\n}\n\nvar command_in_drag;\n\nfunction addSortableHandler (element, id_function) {\n \n var n_group = 'commands_drag_' + id_function;\n Sortable.create(element, {\n handle: '.command_drag',\n ghostClass: 'ghost',\n animation: 300,\n group: {name: n_group},\n onEnd: function (evt) {\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n registerUserEvent(function_obj.name, ActionTypes.MOVE_COMMAND, $(evt.item).data('command').type, '/', 'from: ' + evt.oldIndex + ' to: ' + evt.newIndex);\n //updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n var itemEl = evt.item; // dragged HTMLElement\n evt.to; // target list\n evt.from; // previous list\n evt.oldIndex; // element's old index within old parent\n evt.newIndex; // element's new index within new parent\n //console.log('::EVT::');\n //console.log(evt);\n\n window.evento_drag = evt;\n\n try {\n updateProgramObjDrag();\n } catch (e) {\n console.error(e);\n window.draging = false;\n }\n },\n onStart: function (evt) {\n //console.log(\"START::EVT::\");\n //console.log(evt);\n //console.log(\"\\n\\ncommand_in_drag\");\n try {\n prepareDragHandler(evt);\n } catch (e) {\n window.draging = false;\n }\n }\n });\n element = $(element);\n element.find(\".iftrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n addSortableHandler($(this).find(\".block_commands\")[1], id_function);\n });\n\n element.find(\".repeatNtimes\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".dowhiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".whiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".switch\").each(function( index ) {\n\n $(this).find(\".case_div\").each(function( index ) {\n addSortableHandler($(this).find(\".case_commands_block\")[0], id_function);\n });\n\n }); \n}\n\nexport function initVisualUI () {\n // MUST USE CONST, LET, OR VAR !!!!!!\n // const mainDiv = $('#visual-main-div');\n // fill mainDiv with functions and globals...\n // renderAlgorithm()...\n domConsole = new DOMConsole(\"ivprog-term-div\");\n domConsole.hide();\n $(document.getElementById(\"ivprog-term-div\")).draggable()\n $('.add_function_button').on('click', () => {\n addFunctionHandler();\n });\n $('.add_global_button').on('click', () => {\n window.insertContext = true;\n GlobalsManagement.addGlobal(program, true);\n });\n\n $('#run_button').on('click', function () {\n showStopButton();\n runCode();\n });\n\n $('#stop_button').on('click', function () {\n showRunButton();\n stopExecution();\n });\n\n $('.visual_coding_button').on('click', () => {\n toggleVisualCoding();\n });\n\n $('.textual_coding_button').on('click', () => {\n toggleTextualCoding();\n });\n\n $('.assessment').on('click', () => {\n is_iassign = true;\n runCodeAssessment();\n });\n\n $('.div_toggle_console').on('click', () => {\n toggleConsole();\n });\n $('.expand_button').on('click', () => {\n full_screen();\n });\n $('.help_button').on('click', () => {\n window.open('https://www.usp.br/line/ivprog/', '_blank');\n });\n $('.main_title h2').prop('title', LocalizedStrings.getUI('text_ivprog_description'));\n\n var time_show = 750;\n $('.visual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_visual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.textual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_textual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.upload_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_upload\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.download_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_download\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.undo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_undo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.redo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_redo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.run_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_run\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.assessment_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_evaluate\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.help_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_help\") + ' - ' + LocalizedStrings.getUI(\"text_ivprog_version\") + ' ' + ivprog_version,\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.add_global_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_add_global\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.div_toggle_console').popup({\n content : LocalizedStrings.getUI(\"tooltip_console\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n\n Sortable.create(listWithHandle, {\n handle: '.glyphicon-move',\n animation: 100,\n ghostClass: 'ghost',\n group: 'functions_divs_drag',\n onEnd: function (evt) {\n updateSequenceFunction(evt.oldIndex, evt.newIndex);\n }\n });\n\n var listGlobalsHandle = document.getElementById(\"listGlobalsHandle\");\n Sortable.create(listGlobalsHandle, {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'globals_divs_drag',\n onEnd: function (evt) {\n updateSequenceGlobals(evt.oldIndex, evt.newIndex);\n }\n });\n\n}\n\nexport function setTestCases (testCases) {\n _testCases = testCases;\n}\n\nexport function getTestCases () {\n // Deep clone of test cases to avoid unauthorized modification\n // TODO: It may be not possible to use this once custom test are fully implemented \n return JSON.parse(JSON.stringify(_testCases));\n}\n\nvar is_iassign = false;\n\nfunction updateSequenceParameters (oldIndex, newIndex, function_obj) {\n function_obj.parameters_list.splice(newIndex, 0, function_obj.parameters_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceLocals (oldIndex, newIndex, function_obj) {\n function_obj.variables_list.splice(newIndex, 0, function_obj.variables_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceGlobals (oldIndex, newIndex) {\n program_obj.globals.splice(newIndex, 0, program_obj.globals.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceFunction (oldIndex, newIndex) {\n program_obj.functions.splice(newIndex, 0, program_obj.functions.splice(oldIndex, 1)[0]);\n}\n\nfunction runCodeAssessment () {\n if (isRunning) {\n // cannot run assessment or it's already running\n return -1;\n }\n \n let strCode = null;\n\n is_iassign = false;\n\n window.studentGrade = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n // No code, so no assessment\n return -1;\n }\n\n toggleConsole(true);\n\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n isRunning = true;\n const runner = new IVProgAssessment(data, _testCases, domConsole);\n runner.runTest().then(grade => {\n if (!is_iassign) {\n parent.getEvaluationCallback(grade);\n } else {\n is_iassign = false;\n }\n isRunning = false;\n }).catch( err => {\n console.log(err);\n isRunning = false;\n });\n } catch (error) {\n isRunning = false;\n domConsole.err(error.message);\n console.log(error);\n if (!is_iassign) {\n parent.getEvaluationCallback(0);\n } else {\n is_iassign = false;\n }\n }\n return 0;\n}\n\nfunction runCode () {\n if (isRunning) {\n return;\n }\n let strCode = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n return;\n }\n \n toggleConsole(true);\n\n // if(domConsole == null)\n // domConsole = new DOMConsole(\"#ivprog-term\");\n //$(\"#ivprog-term\").slideDown(500);\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n proc = new IVProgProcessor(data);\n proc.registerInput(domConsole);\n proc.registerOutput(domConsole);\n $(\"#ivprog-term\").addClass('ivprog-term-active');\n isRunning = true;\n proc.interpretAST().then( _ => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(proc.mode === Modes.ABORT) {\n domConsole.info(LocalizedStrings.getMessage(\"aborted_execution\")); \n } else {\n domConsole.info(LocalizedStrings.getMessage(\"success_execution\"));\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }).catch(err => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(err instanceof Error) {\n domConsole.err(err.message);\n } else {\n domConsole.err(err);\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }) \n } catch (error) {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n isRunning = false;\n proc = null;\n showRunButton();\n domConsole.err(error.message);\n console.log(error);\n return true;\n }\n return false;\n },100);\n }\n \n}\n\nfunction toggleConsole (is_running) {\n\n if (is_running) {\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n if(domConsole != null)\n domConsole.focus();\n //$('#ivprog-term').css('margin-top', '-170px');\n return;\n } else {\n domConsole.hide();\n return;\n }\n\n if ($('#ivprog-term').css('min-height') == '160px') {\n // esconder\n $('.ivprog-term-div').css('display', 'none');\n $('#ivprog-term').css('min-height', '0');\n //$('#ivprog-term').css('margin-top', '-30px');\n //$('#ivprog-term').css('padding', '5px');\n } else {\n // mostrar\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n //$('#ivprog-term').css('margin-top', '-170px');\n }\n}\n\n// function waitToCloseConsole () {\n// domConsole.info(\"Aperte qualquer tecla para fechar...\");\n// const p = new Promise((resolve, _) => {\n// domConsole.requestInput(resolve, true);\n// });\n// p.then( _ => {\n// domConsole.dispose();\n// domConsole = null;\n// $(\"#ivprog-term\").hide();\n// })\n// }\n\nfunction toggleTextualCoding () {\n let code = null;\n if (settingsProgrammingTypes != \"textual\") {\n code = CodeManagement.generate();\n if (code == null) {\n return;\n }\n }\n\n\n $('.ivprog_visual_panel').css('display', 'none');\n $('.ivprog_textual_panel').css('display', 'block');\n $('.ivprog_textual_panel').removeClass('loading');\n TextEditor.updateEditor();\n if (code != null)\n TextEditor.setCode(code);\n //$('.ivprog_textual_code').text(code);\n\n $('.visual_coding_button').removeClass('active');\n $('.textual_coding_button').addClass('active');\n}\n\nfunction toggleVisualCoding () {\n $('.ivprog_textual_panel').addClass('loading');\n $('.ivprog_textual_panel').css('display', 'none');\n $('.ivprog_visual_panel').css('display', 'block');\n\n $('.textual_coding_button').removeClass('active');\n $('.visual_coding_button').addClass('active');\n}\n\nfunction removeParameter (function_obj, parameter_obj, parameter_container) {\n registerUserEvent(parameter_obj.name, ActionTypes.REMOVE_FUNCTION_PARAM, function_obj.name);\n var index = function_obj.parameters_list.indexOf(parameter_obj);\n if (index > -1) {\n window.insertContext = true;\n function_obj.parameters_list.splice(index, 1);\n }\n $(parameter_container).fadeOut();\n}\n\nfunction updateParameterType (parameter_obj, new_type, function_name, new_dimensions = 0) {\n registerUserEvent(parameter_obj.name, ActionTypes.CHANGE_PARAM_TYPE, function_name, new_type, new_dimensions);\n parameter_obj.type = new_type;\n parameter_obj.dimensions = new_dimensions;\n\n if (new_dimensions > 0) {\n parameter_obj.rows = new_dimensions;\n parameter_obj.columns = 2;\n }\n\n}\n\nfunction renderParameter (function_obj, parameter_obj, function_container) {\n let ret = \"\";\n\n ret += '<div class=\"ui label function_name_parameter pink\"><i class=\"ui icon ellipsis vertical inverted\"></i>';\n\n ret += '<div class=\"ui dropdown parameter_type\">';\n\n if (parameter_obj.dimensions > 0) {\n ret += '<div class=\"text\">'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`);\n if (parameter_obj.dimensions == 1) {\n ret += ' [ ] ';\n } else {\n ret += ' [ ] [ ] ';\n }\n ret += '</div>';\n } else {\n ret += '<div class=\"text\">'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`)+'</div>';\n }\n\n ret += '<div class=\"menu\">';\n\n \n for (const tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n\n\n ret += '<div class=\"item ' + (parameter_obj.dimensions == 1 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n\n ret += '<div class=\"item ' + (parameter_obj.dimensions == 2 ? ' selected ' : '') + '\">'\n + '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n + '<div class=\"menu\">';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '<div class=\"item ' + (parameter_obj.type == tm.toLowerCase() && parameter_obj.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n }\n ret += '</div></div>';\n\n ret += '</div></div>';\n\n ret += '<div class=\"parameter_div_edit\"><span class=\"span_name_parameter label_enable_name_parameter\">'+parameter_obj.name+'</span></div> ';\n\n ret += ' <i class=\"yellow inverted icon times remove_parameter\"></i></div>';\n\n ret = $(ret);\n \n function_container.find('.container_parameters_list').append(ret);\n\n ret.find('.remove_parameter').on('click', function(e){\n removeParameter(function_obj, parameter_obj, ret);\n });\n \n ret.find('.ui.dropdown.parameter_type').dropdown({\n onChange: function(_, __, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n } else {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name);\n }\n },\n selectOnKeydown: false\n });\n\n ret.find('.parameter_div_edit').on('click', function(e){\n registerUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_PARAM_NAME, parameter_obj.name);\n enableNameParameterUpdate(parameter_obj, ret, function_obj);\n });\n\n return ret;\n}\n\nfunction updateParameterName (parameter_var, new_name, parameter_obj_dom, function_obj) {\n \n if (parameter_var.name == new_name) {\n return;\n }\n\n if (isValidIdentifier(new_name)) {\n if (variableNameAlreadyExists(new_name, function_obj)) {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_param_duplicated', [new_name, function_obj.name]));\n } else {\n registerUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_PARAM, parameter_var.name, new_name);\n parameter_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction updateFunctionName (function_var, new_name, function_obj_dom) {\n \n if (function_var.name == new_name) {\n return;\n }\n \n if (isValidIdentifier(new_name)) {\n if (functionNameAlreadyExists(new_name)) {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_function_duplicated', [new_name]));\n } else {\n registerUserEvent(function_var.name, ActionTypes.RENAME_FUNCTION, new_name);\n function_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction functionNameAlreadyExists (function_name) {\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i].name == function_name) {\n return true;\n }\n }\n return false;\n}\n\nvar opened_name_parameter = false;\nvar opened_input_parameter = null;\nfunction enableNameParameterUpdate (parameter_obj, parent_node, function_obj) {\n if (opened_name_parameter) {\n opened_input_parameter.focus();\n return;\n }\n opened_name_parameter = true;\n parent_node = $(parent_node);\n\n var input_field;\n\n parent_node.find('.span_name_parameter').text('');\n input_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+parameter_obj.name+\"' />\" );\n input_field.insertBefore(parent_node.find('.span_name_parameter'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input_parameter = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n\n }\n if(code == 27) {\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n }\n });\n input_field.select();\n}\n\nvar opened_name_function = false;\nvar opened_input = null;\nvar previousPadding = null;\nfunction enableNameFunctionUpdate (function_obj, parent_node) {\n if (opened_name_function) {\n opened_input.focus();\n return;\n }\n parent_node = $(parent_node);\n parent_node.find('.span_name_function').text('');\n var input_field;\n if (!previousPadding) {\n previousPadding = parent_node.find('.span_name_function').css('padding-left');\n }\n parent_node.find('.span_name_function').css('padding-left', '0');\n parent_node.find('.span_name_function').css('padding-right', '0');\n \n input_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+function_obj.name+\"' />\" );\n input_field.insertBefore(parent_node.find('.span_name_function'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n if(code == 27) {\n\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n });\n input_field.select();\n \n}\n\nexport function addFunctionChangeListener (callback) {\n functionsChangeListeners.push(callback);\n return functionsChangeListeners.length - 1;\n}\n\nexport function addGlobalChangeListener (callback) {\n globalChangeListeners.push(callback);\n return globalChangeListeners.length - 1;\n}\n\nexport function removeGlobalListener (index) {\n globalChangeListeners.splice(index, 1);\n}\n\nexport function removeFunctionListener (index) {\n functionsChangeListeners.splice(index);\n}\n\nfunction scheduleCall (callback, time) {\n const scheduled_call = () => {\n const id = setInterval(() => {\n if(callback()) {\n clearInterval(id);\n }\n }, time)\n }\n scheduled_call();\n}\n\nfunction showRunButton () {\n document.getElementById('run_button').style.display = 'inline';\n document.getElementById('stop_button').style.display = 'none';\n}\n\nfunction showStopButton () {\n document.getElementById('run_button').style.display = 'none';\n document.getElementById('stop_button').style.display = 'inline';\n}\n\nfunction stopExecution () {\n domConsole.clearPendingWrites();\n domConsole.cancelPendingInputRequests();\n if(!isRunning) {\n return;\n }\n proc.mode = Modes.ABORT;\n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\n\nvar counter_new_globals = 0;\n\nexport function addGlobal (program, is_from_click = false) {\n\n\tvar new_global = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_global') + '_' + counter_new_globals, 0);\n\tcounter_new_globals ++;\n\n\tprogram.addGlobal(new_global);\n\n\tregisterUserEvent(new_global.name, ActionTypes.INSERT_GLOBAL_VAR);\n\tvar newe = renderGlobal(new_global);\n\n\tif (is_from_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n\n}\n\nfunction toggleConstant (global_var) {\n\tglobal_var.is_constant = !global_var.is_constant;\n\tregisterUserEvent(global_var.name, ActionTypes.SET_GLOBAL_CONST);\n}\n\nfunction updateName (global_var, new_name, global_obj_dom) {\n\n\tif (global_var.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (globalNameAlreadyExists(new_name)) {\n\t\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_global_duplicated'));\n\t\t} else {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.RENAME_GLOBAL_VAR, new_name);\n\t\t\tglobal_var.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_name'));\n\t}\n}\n\nfunction globalNameAlreadyExists (global_name) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i].name == global_name) {\n return true;\n }\n }\n return false;\n}\n\nfunction isValidIdentifier (identifier_str) {\n\treturn /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);\n}\n\nfunction updateType (global_var, new_type, new_dimensions = 0) {\n\tglobal_var.type = new_type;\n\tglobal_var.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tglobal_var.rows = new_dimensions;\n\t\tglobal_var.columns = 2;\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_VAR_TYPE, new_type,\n\t\tnew_dimensions, global_var.rows, global_var.columns);\n\tupdateInitialValues(global_var);\n}\n\nfunction removeGlobal (global_var, global_container) {\n\tvar index = window.program_obj.globals.indexOf(global_var);\n\tif (index > -1) {\n\t\twindow.insertContext = true;\n\t window.program_obj.globals.splice(index, 1);\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.REMOVE_GLOBAL_VAR);\n\tglobal_container.children().off();\n\tglobal_container.off();\n\tglobal_container.fadeOut();\n}\n\nfunction updateInitialValues (global_var) {\n\tif (global_var.type == Types.INTEGER) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0, 0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.REAL) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0.0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0.0, 0.0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = true;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [true, true];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 'A';\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = ['A', 'A'];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [['A', 'A'], ['A', 'A']];\n\t\t}\n\t}\n\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.name,\n\t\tglobal_var.value);\n}\n\nfunction alternateBooleanGlobalValue (global_var, value_container) {\n\tglobal_var.value = !global_var.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value}`));\n}\n\nfunction alternateBooleanGlobalVectorValue (global_var, index, value_container) {\n\tglobal_var.value[index] = !global_var.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[index]}`));\n}\n\nfunction removeGlobalColumnVector (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addGlobalColumnVector (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tglobal_var.value.push(0);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tglobal_var.value.push(0.0);\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tglobal_var.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tglobal_var.value.push(true);\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tglobal_var.value.push(LocalizedStrings.getUI('charvar_default_value'));\n\t}\n}\n\nfunction removeColumnGlobalMatrix (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\n\tfor (var i = 0; i < global_var.rows; i++) {\n\t\tglobal_var.value[i].splice(global_var.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnGlobalMatrix (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0);\n\t\t}\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0.0);\n\t\t}\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(true);\n\t\t}\n\t}\n\tif (global_var.type == Types.CHAR) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t}\n}\n\nfunction removeLineGlobalMatrix (global_var) {\n\tif (global_var.rows == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.rows --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addLineGlobalMatrix (global_var) {\n\tglobal_var.rows ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.CHAR) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n}\n\nfunction alternateBooleanGlobalMatrixValue (global_var, row, index, value_container) {\n\tglobal_var.value[row][index] = !global_var.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[row][index]}`));\n}\n\nfunction renderValues (global_var, global_container) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\n\tif (global_var.dimensions == 0) {\n\t\tif (global_var.type == Types.REAL) {\n\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+global_var.value.toFixed(1)+'</span> </div> ';\n\t\t} else {\n\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable boolean_simple_type\">'+LocalizedStrings.getUI(`logic_value_${global_var.value}`)+'</span> </div> ';\n\t\t\t} else {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+global_var.value+'</span> </div> ';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '<table class=\"tabela_var\">';\n\n\t\tif (global_var.dimensions == 1) {\n\t\t\tret += '<tr>';\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+global_var.value[k].toFixed(1)+'</span></td>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_vector_var\" data-index=\"'+k+'\">'+LocalizedStrings.getUI(`logic_value_${global_var.value[k]}`)+'</span></td>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+global_var.value[k]+'</span>'+'</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '</tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_vector_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_vector_column\"></i></div>';\n\t\t}\n\n\t\tif (global_var.dimensions == 2) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+global_var.value[l][k].toFixed(1)+'</span>'+'</td>';\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tif (global_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+LocalizedStrings.getUI(`logic_value_${global_var.value[l][k]}`)+'</span></td>';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+global_var.value[l][k]+'</span></td>';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.rows == 0) {\n\t\t\t\tret += '<tr><td></td></tr>';\n\t\t\t}\n\t\t\tret += '<tr><td colspan=\"'+global_var.columns+'\" class=\"tr_manage_lines\"><i class=\"ui icon minus square outline remove_global_matrix_line\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_line\"></i></td></tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_matrix_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_column\"></i></div>';\n\t\t}\n\t\t\n\t}\n\n\tglobal_container.find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\tret.find('.span_value_variable').data('associatedOject', global_var);\n\n\tret.find( \".boolean_simple_type\" ).on('click', function(e){\n\t\talternateBooleanGlobalValue(global_var, this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalValueUpdate(global_var, this.parentNode);\n\t});\n\n\tret.find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalVectorValue(global_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".vector_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalVectorValueUpdate(global_var, $(this).data('index'), this.parentNode);\n\t});\n\tret.find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveGlobalColumnVector(global_var);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddGlobalColumnVector(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalMatrixValue(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalMatrixValueUpdate(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t});\n\tglobal_container.find( \".div_valor_var\" ).append(ret);\n\n\n\tupdateColumnsAndRowsText(global_container, global_var);\n\n}\n\nfunction addHandlers (global_container) {\n\tvar global_var = global_container.data('associatedOject'); \n\t// Manage constant option:\n\tglobal_container.find( \".alternate_constant\" ).on('click', function(e){\n\t\ttoggleConstant(global_var);\n\n\t\t$( this ).removeClass( \"on off\" );\n\t\tif (global_var.is_constant) {\n\t\t\t$( this ).addClass( \"on\" );\n\t\t} else {\n\t\t\t$( this ).addClass( \"off\" );\n\t\t}\n\t});\n\n\t// Manage global name: \n\tglobal_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_NAME);\n\t\tenableNameUpdate(global_container);\n\t});\n\n\t// Menu to change type:\n\tglobal_container.find('.ui.dropdown.global_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')]);\n\t \t}\n\n\t \trenderValues(global_var, global_container);\n\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove global: \n\tglobal_container.find( \".remove_global\" ).on('click', function(e){\n\t\tremoveGlobal(global_var, global_container);\n\t});\n\n}\n\nfunction updateColumnsAndRowsText (global_container, global_var) {\n\tvar prev = global_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] [ ' + global_var.rows + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n}\n\nexport function renderGlobal (global_var) {\n\n\tvar element = '<div class=\"ui label global_container pink\"><i class=\"ui icon ellipsis vertical inverted\"></i><div class=\"global_const\">const: ';\n\n\telement += '<i class=\"ui icon toggle '+(global_var.is_constant?\"on\":\"off\")+' alternate_constant\"></i></div>';\n \t\n \telement += '<div class=\"ui dropdown global_type\">';\n\n \tif (global_var.dimensions == 1) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('vector')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ <span class=\"dimensions_0\"></span> ] ';\n \t\telement += '</div>';\n \t} else if (global_var.dimensions == 2) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('matrix')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ <span class=\"dimensions_0\"></span> ] [ <span class=\"dimensions_1\"></span> ] ';\n \t\telement += '</div>';\n \t} else {\n \t\telement += '<div class=\"text\">' + LocalizedStrings.getUI(`type_${global_var.type.toLowerCase()}`) + '</div>';\n \t}\n\telement += '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n\t}\n\n\n\telement += '<div class=\"item ' + (global_var.dimensions == 1 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n\n\telement += '<div class=\"item ' + (global_var.dimensions == 2 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (global_var.type == tm.toLowerCase() && global_var.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n element += '</div></div> <div class=\"editing_name_var\"> <span class=\"span_name_variable enable_edit_name_parameter\">'+global_var.name+'</span> </div> <span class=\"character_equals\"> <&#8212; </span> ';\n\n\telement += '<div class=\"ui div_valor_var\">'+global_var.value+'</div>'; \n\n\telement += ' <i class=\"yellow inverted icon times remove_global\"></i></div>';\n\n\tvar complete_element = $(element);\n\n\tcomplete_element.data('associatedOject', global_var);\n\n\t$('.list_globals').append(complete_element);\n\n\taddHandlers(complete_element);\n\n\trenderValues(global_var, complete_element);\n\n\tif (global_var.dimensions == 1) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t}\n\tif (global_var.dimensions == 2) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t\tcomplete_element.find('.dimensions_1').text(global_var.rows);\n\t}\n\n\treturn complete_element;\n}\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableGlobalMatrixValueUpdate (global_var, row, index, parent_node) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[row][index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[row][index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableGlobalValueUpdate (global_var, parent_node) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value.toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t\tvar inputWidth = input_field.textWidth()+10;\n\t\topened_input_value_global_ar = input_field;\n\t\tinput_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t\tinput_field.css({\n\t\t\t\twidth: inputWidth\n\t\t})\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t} else if (global_var.type == Types.CHAR) {\n\t\t\t\t\tglobal_var.value = input_field.val().charAt(0);\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = true;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else if (global_var.type == Types.CHAR) {\n\t\t\t\t\t\tglobal_var.value = input_field.val().charAt(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (global_container) {\n\n\tvar global_var = global_container.data('associatedOject'); \n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tglobal_container.find('.span_name_variable').text('');\n\tvar input_name = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+global_var.name+\"' />\" );\n\tinput_name.insertBefore(global_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t opened_input_global.focus();\n\n\t opened_input_global.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t} else {\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim()) {\n\t\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t} else {\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableGlobalVectorValueUpdate (global_var, index, parent_node) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ global_var.value[index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\n$.fn.textWidth = function(text, font) {\n \n if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('<span>').hide().appendTo(document.body);\n \n $.fn.textWidth.fakeEl.text(text || this.val() || this.text() || this.attr('placeholder')).css('font', font || this.css('font'));\n \n return $.fn.textWidth.fakeEl.width();\n};","import { Types } from \"./types\";\nimport WatchJS from \"melanke-watchjs\";\nimport * as AlgorithmManagement from \"./algorithm\";\n\nexport const COMMAND_TYPES = Object.freeze({\n function: \"function\",\n comment: \"comment\",\n reader: \"reader\",\n writer: \"writer\",\n attribution: \"attribution\",\n iftrue: \"iftrue\",\n repeatNtimes: \"repeatNtimes\",\n whiletrue: \"whiletrue\",\n dowhiletrue: \"dowhiletrue\",\n switch: \"switch\",\n switchcase: \"switchcase\",\n functioncall: \"functioncall\",\n break: \"break\",\n return: \"return\",\n});\n\nexport const ARITHMETIC_TYPES = Object.freeze({\n plus: \"plus\",\n minus: \"minus\",\n multiplication: \"multiplication\",\n division: \"division\",\n module: \"module\",\n none: \"none\",\n});\n\nexport const EXPRESSION_ELEMENTS = Object.freeze({\n exp_op_exp: \"exp_op_exp\",\n op_exp: \"op_exp\",\n par_exp_par: \"par_exp_par\",\n start_point: \"start_point\",\n});\n\nexport const EXPRESSION_TYPES = Object.freeze({\n exp_conditional: \"exp_conditional\",\n exp_logic: \"exp_logic\",\n exp_arithmetic: \"exp_arithmetic\",\n write_sep: \"write_separator\",\n});\n\nexport const ARITHMETIC_COMPARISON = Object.freeze({\n greater_than: \"greater_than\",\n less_than: \"less_than\",\n equals_to: \"equals_to\",\n not_equals_to: \"not_equals_to\",\n greater_than_or_equals_to: \"greater_than_or_equals_to\",\n less_than_or_equals_to: \"less_than_or_equals_to\",\n});\n\nexport const LOGIC_COMPARISON = Object.freeze({\n equals_to: \"equals_to\",\n not_equals_to: \"not_equals_to\",\n and: \"and\",\n or: \"or\",\n not: \"not\",\n});\n\nexport const SYSTEM_FUNCTIONS_CATEGORIES = Object.freeze({\n math: \"$mathLib\",\n text: \"$strLib\",\n arrangement: \"$arrayLib\",\n conversion: \"$langLib\",\n});\n\nexport class Variable {\n constructor (\n type,\n name,\n value,\n dimensions = 0,\n is_constant = false,\n rows = 0,\n columns = 0\n ) {\n this.type = type;\n this.name = name;\n this.value = value;\n this.dimensions = dimensions;\n this.is_constant = is_constant;\n this.rows = rows;\n this.columns = columns;\n }\n}\n\nexport class Function {\n constructor (\n name,\n return_type = Types.VOID,\n return_dimensions = 0,\n parameters_list = [],\n is_main = false,\n is_hidden = false,\n variables_list = [],\n function_comment = null,\n commands = []\n ) {\n this.type = COMMAND_TYPES.function;\n this.name = name;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.is_main = is_main;\n this.is_hidden = is_hidden;\n this.variables_list = variables_list;\n this.function_comment = function_comment;\n this.commands = commands;\n }\n}\n\nexport class SystemFunction {\n constructor (\n identifier,\n return_type,\n return_dimensions,\n parameters_list,\n function_comment = null,\n category\n ) {\n this.type = COMMAND_TYPES.function;\n this.identifier = identifier;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.function_comment = function_comment;\n this.category = category;\n }\n}\n\nexport class Comment {\n constructor (comment_text) {\n this.type = COMMAND_TYPES.comment;\n this.comment_text = comment_text;\n }\n}\n\nexport class Break {\n constructor () {\n this.type = COMMAND_TYPES.break;\n }\n}\n\nexport class Reader {\n constructor (variable_value_menu = new VariableValueMenu()) {\n this.type = COMMAND_TYPES.reader;\n this.variable_value_menu = variable_value_menu;\n }\n}\n\nexport class Writer {\n constructor (content, newline = true) {\n this.type = COMMAND_TYPES.writer;\n this.content = content;\n this.newline = newline;\n }\n}\n\nexport class Attribution {\n constructor (variable, expression = []) {\n this.type = COMMAND_TYPES.attribution;\n this.variable = variable;\n this.expression = expression;\n }\n}\n\nexport class ExpressionOperator {\n constructor (type_op, item) {\n this.type_op = type_op; // Logic, Arithmetic OR Relational\n this.item = item;\n }\n}\n\nexport class ExpressionElement {\n constructor (type_exp, itens = []) {\n this.type_exp = type_exp;\n this.itens = itens;\n }\n}\n\nexport class ConditionalExpression {\n constructor (expression) {\n this.type = EXPRESSION_TYPES.exp_conditional;\n this.expression = expression;\n }\n}\n\nexport class LogicExpression {\n constructor (has_neg, first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_logic;\n this.has_neg = has_neg;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class ArithmeticExpression {\n constructor (first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_arithmetic;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class IfTrue {\n constructor (expression, commands_block, commands_else) {\n this.type = COMMAND_TYPES.iftrue;\n this.expression = expression;\n this.commands_block = commands_block;\n this.commands_else = commands_else;\n }\n}\n\nexport class RepeatNTimes {\n constructor (\n var_attribution,\n var_incrementation,\n expression1,\n expression2,\n expression3,\n commands_block\n ) {\n this.type = COMMAND_TYPES.repeatNtimes;\n this.var_attribution = var_attribution;\n this.var_incrementation = var_incrementation;\n this.expression1 = expression1;\n this.expression2 = expression2;\n this.expression3 = expression3;\n this.commands_block = commands_block;\n }\n}\n\nexport class WhileTrue {\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.whiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class DoWhileTrue {\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.dowhiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class Switch {\n constructor (variable, cases = []) {\n this.type = COMMAND_TYPES.switch;\n this.variable = variable;\n this.cases = cases;\n }\n}\n\nexport class Return {\n constructor (variable_value_menu) {\n this.type = COMMAND_TYPES.return;\n this.variable_value_menu = variable_value_menu;\n }\n}\n\nexport class SwitchCase {\n constructor (variable_value_menu, commands_block = []) {\n this.type = COMMAND_TYPES.switchcase;\n this.variable_value_menu = variable_value_menu;\n this.commands_block = commands_block;\n }\n}\n\nexport class FunctionCall {\n constructor (function_called, parameters_list) {\n this.type = COMMAND_TYPES.functioncall;\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class VariableValueMenu {\n constructor (\n variable_and_value = 7,\n content = null,\n row = null,\n column = null,\n include_constant = true,\n dimensions = 0\n ) {\n this.type = \"var_value\";\n this.variable_and_value = variable_and_value;\n this.content = content;\n this.row = row;\n this.column = column;\n this.include_constant = include_constant;\n this.dimensions = dimensions;\n }\n}\n\nexport class FunctionCallMenu {\n constructor (function_called = null, parameters_list = []) {\n this.type = \"function_call\";\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class Program {\n constructor () {\n this.functions = [];\n this.globals = [];\n }\n\n addFunction (function_to_add) {\n WatchJS.watch(\n function_to_add.parameters_list,\n function () {\n if (window.insertContext) {\n setTimeout(function () {\n AlgorithmManagement.renderAlgorithm();\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n },\n 1\n );\n\n WatchJS.watch(\n function_to_add.variables_list,\n function () {\n if (window.insertContext) {\n setTimeout(function () {\n AlgorithmManagement.renderAlgorithm();\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n },\n 1\n );\n\n this.functions.push(function_to_add);\n }\n\n addVariable (function_to_receive, variable) {\n if (this.functions[function_to_receive].variable === null) {\n this.functions[function_to_receive].variables_list = [];\n }\n this.functions[function_to_receive].variables_list.push(variable);\n }\n\n addGlobal (variable) {\n this.globals.push(variable);\n }\n}\n","import * as CodeMirror from \"codemirror\";\nimport \"codemirror/addon/edit/closebrackets\";\nimport \"codemirror/addon/edit/matchbrackets\";\n// import \"codemirror/addon/hint/show-hint\";\n// import \"codemirror/addon/hint/anyword-hint\";\nimport \"codemirror/addon/selection/active-line\";\nimport { CodeEditorMode } from \"./../util/editorMode2\"\nCodeEditorMode(CodeMirror);\n\nlet codeEditor = null;\n\nexport function initTextEditor (element) {\n let id = element;\n if (element[0] == '#') {\n id = element.substring(1);\n }\n codeEditor = CodeMirror.fromTextArea(document.getElementById(id), {\n theme: \"ttcn\",\n value: \"\",\n mode: \"text/x-ivprog\",\n indentUnit: 4,\n lineNumbers: true,\n matchBrackets: true,\n autoCloseBrackets: true,\n fixedGutter: true,\n styleActiveLine: true,\n readOnly: true\n });\n}\n\nexport function disable (flag) {\n codeEditor.setOption(\"readOnly\", flag);\n updateEditor();\n}\n\nexport function updateEditor () {\n codeEditor.refresh();\n}\n\nexport function setCode (code) {\n codeEditor.setValue(code);\n}\n\nexport function getCode () {\n return codeEditor.getValue();\n}\n","export const Types = Object.freeze({\n INTEGER: \"integer\",\n REAL: \"real\",\n TEXT: \"text\",\n CHAR: 'char',\n BOOLEAN: \"boolean\",\n VOID: \"void\"\n});","\nexport function renderErrorMessage (dom_obj_target, message_text) {\n\n\tdom_obj_target.popup({\n\t\thtml : '<i class=\"ui icon inverted exclamation triangle yellow\"></i>' + message_text,\n\t\ttransition : \"fade up\",\n\t\ton : 'click',\n \t\tclosable : true,\n \t\tmovePopup : true,\n \t\tboundary : window,\n \t\tpreserve : false,\n \t\ttarget : false,\n\t\tclassName : {\n\t\t popup : 'ui popup invalid-identifier'\n\t\t},\n\t\tonHidden : function($module) {\n\t\t\tdom_obj_target.popup('destroy');\n\t\t}\n\n\t}).popup('toggle');\n\n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\nimport { isValidIdentifier } from \"./../util/utils\";\n\nvar counter_new_variables = 0;\n\nexport function addVariable (function_obj, function_container, is_in_click = false) {\n\tvar new_var = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_variable') + '_' + counter_new_variables, 0);\n\tif (function_obj.variables_list == null) {\n\t\tfunction_obj.variables_list = [];\n\t}\n\tfunction_obj.variables_list.push(new_var);\n\n\tcounter_new_variables ++;\n\n\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_VAR, new_var.name, Types.INTEGER, 0);\n\tvar newe = renderVariable(function_container, new_var, function_obj);\n\n\tif (is_in_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n}\n\nfunction updateName (variable_obj, new_name, variable_obj_dom, function_obj) {\n\n\tif (variable_obj.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (variableNameAlreadyExists(new_name, function_obj)) {\n\t\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_variable_duplicated', [new_name, function_obj.name]));\n\t\t} else {\n\t\t\tregisterUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_VAR, variable_obj.name, new_name);\n\t\t\tvariable_obj.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_identifier'));\n\t}\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tif (function_obj.parameters_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tif (function_obj.variables_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nfunction removeVariable (variable_obj, variable_container, function_name) {\n\tvar function_associated = variable_container.data('associatedFunction');\n\tregisterUserEvent(function_name, ActionTypes.REMOVE_FUNCTION_VAR, variable_obj.name);\n\n\tvar index = function_associated.variables_list.indexOf(variable_obj);\n\tif (index > -1) {\n\t window.insertContext = true;\n\t delete function_associated.variables_list[index];\n\t function_associated.variables_list.splice(index, 1);\n\t}\n\tvariable_container.children().off();\n\tvariable_container.off();\n\tvariable_container.fadeOut();\n}\n\nfunction updateType (variable_obj, new_type, function_name, new_dimensions = 0) {\n\tvariable_obj.type = new_type;\t\t\n\tvariable_obj.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tvariable_obj.rows = new_dimensions;\n\t\tvariable_obj.columns = 2;\n\t}\n\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, variable_obj.name,\n\t\tnew_type, new_dimensions, variable_obj.rows, variable_obj.columns);\n\n\tupdateInitialValues(variable_obj, function_name);\n}\n\nfunction addHandlers (variable_obj, variable_container, function_obj) {\n\n\t// Manage variable name: \n\tvariable_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_VAR_NAME, variable_obj.name);\n\t\tenableNameUpdate(variable_obj, variable_container, function_obj);\n\t});\n\n\t// Menu to change type:\n\tvariable_container.find('.ui.dropdown.variable_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name);\n\t \t}\n\n\t \trenderValues(variable_obj, variable_container, function_obj.name);\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove variable: \n\tvariable_container.find( \".remove_variable\" ).on('click', function(e){\n\t\tremoveVariable(variable_obj, variable_container, function_obj.name);\n\t});\n\n}\n\nexport function renderVariable (function_container, new_var, function_obj) {\n\n\tvar element = '<div class=\"ui label variable_container pink\"><i class=\"ui icon ellipsis vertical inverted\"></i>';\n\n\telement += '<div class=\"ui dropdown variable_type\">';\n\n \tif (new_var.dimensions == 1) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('vector') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] </div>';\n \t} else if (new_var.dimensions == 2) {\n \t\telement += '<div class=\"text\">'+ LocalizedStrings.getUI('matrix') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] [ ] </div>';\n \t} else {\n \t\telement += '<div class=\"text\">' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`) + '</div>';\n \t}\n\telement += '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 0 ? ' selected ' : '') + '\" data-type=\"'+tm+'\" >'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n\t}\n\n\n\telement += '<div class=\"item ' + (new_var.dimensions == 1 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('vector')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 1 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"1\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n\n\telement += '<div class=\"item ' + (new_var.dimensions == 2 ? ' selected ' : '') + '\">'\n\t\t+ '<i class=\"dropdown icon\"></i>' + LocalizedStrings.getUI('matrix')\n\t\t+ '<div class=\"menu\">';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '<div class=\"item ' + (new_var.type == tm.toLowerCase() && new_var.dimensions == 2 ? ' selected ' : '') + '\" data-text=\"'+ LocalizedStrings.getUI('matrix')+':'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+' [ ] \" data-type=\"'+tm+'\" data-dimensions=\"2\"> '+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'</div>';\n \t}\n\telement += '</div></div>';\n\n element += '</div></div> ';\n\n element += '<div class=\"editing_name_var\"><span class=\"span_name_variable enable_edit_name_variable\">'+new_var.name+'</span> </div>';\n\n\telement += ' <span class=\"character_equals\"> <&#8212; </span> <div class=\"ui div_valor_var\">'+new_var.value+'</div>'; \n\n\telement += ' <i class=\"yellow inverted icon times remove_variable\"></i></div>';\n\n\telement = $(element);\n\n\telement.data('associatedFunction', function_obj);\n\n\tfunction_container.find('.variables_list_div').append(element);\n\n\taddHandlers(new_var, element, function_obj);\n\n\trenderValues(new_var, element, function_obj.name);\n\n\treturn element;\n}\n\nfunction updateColumnsAndRowsText (variable_container, variable_var) {\n\tvar prev = variable_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] [ ' + variable_var.rows + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n}\n\nfunction renderValues (new_var, variable_container, function_name) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\t\t\n\tif (new_var.dimensions == 0) {\n\t\tif (new_var.type == Types.REAL) {\n\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+new_var.value.toFixed(1)+'</span> </div> ';\n\t\t} else {\n\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable boolean_simple_type\">'+LocalizedStrings.getUI(`logic_value_${new_var.value}`)+'</span> </div> ';\n\t\t\t} else {\n\t\t\t\tret += '<div class=\"created_div_valor_var\"><span class=\"span_value_variable simple_var\">'+new_var.value+'</span> </div> ';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '<table class=\"tabela_var\">';\n\n\t\tif (new_var.dimensions == 1) {\n\t\t\tret += '<tr>';\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+new_var.value[k].toFixed(1)+'</span></td>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_vector_var\" data-index=\"'+k+'\">'+LocalizedStrings.getUI(`logic_value_${new_var.value[k]}`)+'</span></td>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '<td><span class=\"span_value_variable vector_var\" data-index=\"'+k+'\">'+new_var.value[k]+'</span>'+'</td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '</tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_vector_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_vector_column\"></i></div>';\n\t\t}\n\n\t\tif (new_var.dimensions == 2) {\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+new_var.value[l][k].toFixed(1)+'</span>'+'</td>';\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '<tr>';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tif (new_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable boolean_matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+LocalizedStrings.getUI(`logic_value_${new_var.value[l][k]}`)+'</span></td>';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += '<td><span class=\"span_value_variable matrix_var\" data-index=\"'+k+'\" data-row=\"'+l+'\">'+new_var.value[l][k]+'</span></td>';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '</tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (new_var.rows == 0) {\n\t\t\t\tret += '<tr><td></td></tr>';\n\t\t\t}\n\t\t\tret += '<tr><td colspan=\"'+new_var.columns+'\" class=\"tr_manage_lines\"><i class=\"ui icon minus square outline remove_global_matrix_line\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_line\"></i></td></tr>';\n\t\t\tret += '</table>';\n\n\t\t\tret += '<div class=\"buttons_manage_columns\"><i class=\"ui icon minus square outline remove_global_matrix_column\"></i>'\n\t\t \t+ ' <i class=\"ui icon plus square outline add_global_matrix_column\"></i></div>';\n\t\t}\n\t\t\n\t}\n\n\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\t$(ret).find('.span_value_variable').\t\tdata('associatedOject', new_var);\n\n\t$( ret ).find( \".boolean_simple_type\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name, new_var.value);\n\t\talternateBooleanValue(new_var, this.parentNode);\n\t});\n\t$( ret ).find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableValueUpdate(new_var, this.parentNode, function_name);\n\t});\n\n\t$( ret ).find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanVectorValue(new_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".vector_var\" ).on('click', function(e){\n\t\tenableVectorValueUpdate(new_var, $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( ret ).find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanMatrixValue(new_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableMatrixValueUpdate(new_var, $(this).data('row'), $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( variable_container ).find( \".div_valor_var\" ).append(ret);\n\n\tupdateColumnsAndRowsText(variable_container, new_var);\n\n}\n\nfunction alternateBooleanMatrixValue (var_obj, row, index, value_container) {\n\tvar_obj.value[row][index] = !var_obj.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[row][index]}`));\n}\n\nfunction addLineMatrix (var_obj) {\n\tvar_obj.rows ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.CHAR) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n}\n\nfunction removeLineMatrix (var_obj) {\n\tif (var_obj.rows == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.rows --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction addColumnMatrix (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0.0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(true);\n\t\t}\n\t}\n\tif (var_obj.type == Types.CHAR) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(LocalizedStrings.getUI('charvar_default_value'));\n\t\t}\n\t}\n}\n\nfunction removeColumnMatrix (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\n\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\tvar_obj.value[i].splice(var_obj.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnVector (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar_obj.value.push(0);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar_obj.value.push(0.0);\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar_obj.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar_obj.value.push(true);\n\t}\n\tif (var_obj.type == Types.CHAR) {\n\t\tvar_obj.value.push(LocalizedStrings.getUI('charvar_default_value'));\n\t}\n}\n\nfunction removeColumnVector (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction alternateBooleanValue (var_obj, value_container) {\n\tvar_obj.value = !var_obj.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value}`));\n}\n\nfunction alternateBooleanVectorValue (var_obj, index, value_container) {\n\tvar_obj.value[index] = !var_obj.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[index]}`));\n}\n\nfunction updateInitialValues (variable_obj, function_name) {\n\tif (variable_obj.type == Types.INTEGER) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0, 0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.REAL) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0.0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0.0, 0.0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.TEXT) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.BOOLEAN) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = true;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [true, true];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.CHAR) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 'A';\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = ['A', 'A'];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [['A', 'A'], ['A', 'A']];\n\t\t}\n\t}\n\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, variable_obj.name, variable_obj.value);\n}\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableVectorValueUpdate (var_obj, index, parent_node, function_name) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableValueUpdate (var_obj, parent_node, function_name) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tvar input_field;\n\n\tparent_node.find('.span_value_variable').text('');\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value.toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_global_ar = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tlet changed = false;\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else{\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else if (var_obj.type == Types.CHAR) {\n\t\t\t\t\t\tvar_obj.value = input_field.val().charAt(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (variable_obj, variable_container, function_obj) {\n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tvariable_container.find('.span_name_variable').text('');\n\n\tvar input_name;\n\n\tinput_name = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"+variable_obj.name+\"' />\" );\n\tinput_name.insertBefore(variable_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t input_name.focus();\t\t\t\t\t\n\n\t var tmpStr = input_name.val();\n\t\tinput_name.val('');\n\t\tinput_name.val(tmpStr);\n\n\t input_name.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t} else {\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim().length > 0) {\n\t\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t} else {\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableMatrixValueUpdate (var_obj, row, index, parent_node, function_name) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[row][index].toFixed(1) + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"<input type='text' class='width-dynamic input_name_function' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' value='\"\n\t\t\t+ var_obj.value[row][index] + \"' />\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\t\t\t\t\t\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n"],"sourceRoot":""}