{"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/parseFromVisual.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","_context","Error","captureStackTrace","contextObj","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","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","command","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","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","TYPES","VARIABLE","CONST","RELATIONAL","LOGIC","ARITHMETIC","getOpType","expressionWalker","funcObj","paramsList","opType","opValue","arrayClass","expressionAST","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","delay","show","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","repeatNtimesHeader","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","reference_dimensions","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","lockexpression","CodeGenerator","toggle","toggleClass","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","expressionEdition","inputExpression","afterWhichElement","lockButton","editButton","ex","ok_button","cancel_button","focusout","keyup","parsed","mousedown","len","setSelectionRange","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","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","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","getVariable","search","variavel","system_functions","expressionParserToVisual","input_field","var_not_found","fun_not_found","ivprogCore","funcao","uniqueWords","Set","exp_obj","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","index_references","variable_and_value","reference_parent","inputWidth","textWidth","addVariablesToMenu","addFunctionsToMenu","addIVProgFunctionsToMenu","variable_fun","isVarInProgram","renderPreviousContent","appendSelectText","ret_function","isFunctionInProgram","function_called_obj","var_obj","var_fun","parameters_menu","AttribuitionsManagement","variable_render","openInputToValue","sub_menu","math","arrangement","conversion","is_there","include_constant","openInputToFunction","openInputToVariable","RepeatNTimesManagement","tmpStr","function_selected","field","rendered","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","downloadFile","change","uploadFile","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","checked","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","contentToSend","date","toISOString","toTimeString","replaceAll","blob","Blob","saveAs","oFReader","FileReader","readAsText","files","onload","oFREvent","txt","previousContent","prepareActivityToStudent","showInvalidFile","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;AACA;AACA;AACA;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,wEAAwE;AACxE,qCAAqC;AACrC;;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;AACA;;AAEA,iBAAiB,mBAAO,CAAC,oDAAc;;AAEvC,OAAO;AACP,Y;;;;;;;;;;;;ACziBA;AAAA;;AAEe;AACbA,eAAa,EAAE,MADF;AAEbC,OAAK,EAAE,MAFM;AAGbC,QAAM,EAAE,OAHK;AAIbC,cAAY,EAAE,mBAJD;AAKbC,cAAY,EAAE,gBALD;AAMbC,gBAAc,EAAE,kBANH;AAObC,YAAU,EAAE,WAPC;AAQbC,SAAO,EAAE,QARI;AASbC,YAAU,EAAE,WATC;AAUbC,YAAU,EAAE,WAVC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;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;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;AAC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AA,EAAzB;;;;;;;;;;;;;ACtCa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACda;AACb,8CAA8C,cAAc;AAC5D;AACA,kBAAkB,mBAAO,CAAC,yCAAW;AACrC;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,SAASgtB,UAAT,CAAqB7nB,KAArB,EAA4B8nB,MAA5B,EAAoC;AAClC,OAAK,IAAMC,GAAX,IAAkBD,MAAlB,EAA0B;AACxB,QAAGjc,MAAM,CAACmc,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCJ,MA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BAAO,CAAC,sEAAqB;AACnD,8BAA8B,mBAAO,CAAC,sFAA6B;AACnE,0BAA0B,mBAAO,CAAC,8EAAyB;AAC3D,gCAAgC,mBAAO,CAAC,0FAA+B;AACvE,iCAAiC,mBAAO,CAAC,gFAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACvBa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjBa;AACb,8CAA8C,cAAc;AAC5D;AACA,sBAAsB,mBAAO,CAAC,gEAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEO,SAASi/B,MAAT,GAAmB;AAC1B,MAAMC,WAAW,GAAGv3B,yEAAe,CAACC,eAAhB,EAApB,CAD0B,CAI1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMu3B,MAAM,GAAG,IAAI9kB,MAAM,CAAC+kB,UAAX,CAAsB,gBAAtB,EAAwC,EAAxC,CAAf;AACA,MAAMptC,UAAU,GAAG,IAAI2B,yDAAJ,CAAe,UAAf,EAA2B,IAA3B,CAAnB;AACA3B,YAAU,CAACyrB,IAAX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KAApC;AACAC,wCAAkC,GAAG,KAArC;AACA;AACD,GAtDD;AAwDAhR,aAAW,CAACgN,MAAZ;AACA,C","file":"main.057ebe8ca55b355184cd.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-2990HElHdCH6Vbze/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-2990uk8ialyLKrrD/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\":\"
Caso de teste $0 não executou com sucesso.
\",\"test_case_failed_exception\":\"
Caso de teste $0 falhou: $1\",\"test_case_exception\":\"Ocorreu uma exceção no caso de teste $0: $1\",\"invalid_type_conversion\":\"O valor $0 não pode ser convertido para o tipo $1\",\"invalid_read_type\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo da variável $3.\",\"invalid_read_type_array\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo aceito pela variável $3 que é um $4.\",\"inform_valid_identifier\":\"Informe um nome válido! O nome não pode ser uma palavra reservadas e deve começar com letras ou _ e conter apenas letras, números e _.\",\"inform_valid_global_duplicated\":\"Já existe uma variável global com o nome $0, você precisa de nomes distintos.\",\"inform_valid_variable_duplicated\":\"Já existe uma variável com o nome $0 na função $1, você precisa de nomes distintos.\",\"inform_valid_function_duplicated\":\"Já existe uma função com o nome $0, você precisa de nomes distintos.\",\"inform_valid_param_duplicated\":\"Já existe um parâmetro com o nome $0 na função $1, você precisa de nomes distintos.\",\"invalid_character\":\"O caractere $0 na linha $1 não pode ser utilizado neste contexto.\",\"annonymous_array_literal\":\"Erro na linha $0: a notação de vetor/matriz só permitida durante a inicialização de uma variável desse tipo. Ex: inteiro vec[3] ← {1,2,3}.\",\"invalid_matrix_literal_line\":\"A expressão $0 na linha $1 não possui um número de elementos igual a linha anterior. Todas as linhas de uma matriz devem ter a mesma quantidade de elementos.\",\"cannot_infer_matrix_line\":\"Não é possível inferir o número de linhas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_matrix_column\":\"Não é possível inferir o número de colunas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_vector_size\":\"Não é possível inferir o número de elementos do vetor $0 na linha $1. É necessário que ele seja inicializado ou que o valor seja informado de forma explícita\",\"matrix_to_vector_literal_attr\":\"Erro na linha $0: A expressão $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_literal_attr\":\"Erro na linha $0: A expressão $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_const_ref_full\":\"A variável $0 fornecida como parâmetro para a função $1 na linha $2 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_ref\":\"A variável $0 fornecida como parâmetro para a função $1 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_assignment_full\":\"Erro na linha $0: $1 é uma constante e portanto não pode ter seu valor alterado\",\"invalid_const_assignment\":\"$0 é uma constante e portanto não pode ter seu valor alterado\",\"array_init_not_literal\":\"Erro na linha $0: Vetor/Matriz só pode ser inicializado por literal. Ex: real vetor[] <- {1,2,3}\",\"array_exceeds_2d\":\"Erro na linha $0: O número máximo de dimensões que um arranjo pode ter é 2. Elemento de 3 ou mais dimensões encontrado!\",\"invalid_matrix_id_dimension\":\"Erro na linha $0: Você deve definir todas as dimensões da matriz quando uma delas é definida por uma variável! Ex: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Erro na linha $0: Não se pode inicializar um vetor que teve seu tamanho declarado utilizando uma variável! Utilize uma atribuição de vetores ou use um laço de repetição.\",\"invalid_matrix_init\":\"Erro na linha $0: Não se pode inicializar uma matrix que teve ao menos uma das suas dimensões declaradas utilizando uma variável! Utilize uma atribuição de matrizes ou use um laço de repetição.\",\"invalid_vector_assignment_full\":\"Erro na linha $0: Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $1 comporta $2 e $3 comporta $4!\",\"invalid_vector_assignment\":\"Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $0 comporta $1 e $2 comporta $3!\",\"invalid_matrix_assignment_full\":\"Erro na linha $0: Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $1 tem $2 linhas e $3 colunas, enquanto $4 possui $5 linhas e $6 colunas!\",\"invalid_matrix_assignment\":\"Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $0 tem $1 linhas e $2 colunas, enquanto $3 possui $4 linhas e $5 colunas!\",\"matrix_to_vector_attr\":\"Erro na linha $0: $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_attr\":\"Erro na linha $0: $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_matrix_index_assign_full\":\"Erro na linha $0: A posição $1 da matriz $2 aceita apenas vetores de tamanho $3, mas $4 tem tamanho $5\",\"invalid_matrix_index_assign\":\"A linha $0 da matriz $1 aceita apenas vetores de tamanho $2, mas $3 tem tamanho $4\",\"invalid_number_elements_vector\":\"Esperava-se por $0 elementos na linha $1 mas a expressão $2 possui $3 elementos.\",\"invalid_number_lines_matrix\":\"Esperava-se por uma matriz com $0 linhas na linha $1 mas a expressão $2 possui $3 linhas\",\"divsion_by_zero_full\":\"Erro na linha $0: A expressão $1 resulta em uma divisão por 0.\",\"divsion_by_zero\":\"A expressão $0 resulta em uma divisão por 0.\",\"undefined_tanget_value\":\"Erro na linha $0: A tangente de $1° não é indefinida.\",\"negative_log_value\":\"Erro na linha $0: Não se pode calcular o log de um valor negativo.\",\"invalid_string_index\":\"Erro na linha $0 durante a execução da função $1: $2 é um índice inválido para a cadeia de texto $3. Os valores válidos vão de 0 à $4\",\"negative_sqrt_value\":\"Erro na linha $0: Não é permitido calcular a raiz quadrada de um número negativo.\",\"exceeded_recursive_calls\":\"Erro na execução da linha $0: Número de chamadas recursivas execedeu o limite máximo definido!\",\"invalid_for_variable\":\"Erro na linha $0: A variavel $1 utilizada no comando repita_para deve ser do tipo inteiro.\",\"invalid_for_from\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'de' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_to\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'para' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_pass\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'passo' do comando repita_para deve ser do tipo inteiro.\",\"exceed_max_instructions\":\"Número de instruções excedeu o limite definido. Certifique-se que seu código não possui laços infinitos ou muitas chamadas de funções recursivas.\"},\"en\":{\"token_missing_one\":\"Syntax error: Expected $0 but found $1 at line:$2, column:$3\",\"token_missing_two\":\"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4\",\"eos_missing\":\"A new line or a ‘;’ is missing at line: $0, column: $1\",\"invalid_type\":\"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3\",\"invalid_array_dimension\":\"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.\",\"invalid_array_size\":\"The array at line $0 exceeds the maximum size of 2.\",\"extra_lines\":\"No text is allowed after '}' in 'program { … }'\",\"invalid_main_return\":\"The function $0 declared at line $2 must return $1.\",\"invalid_var_declaration\":\"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.\",\"invalid_break_command\":\"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.\",\"invalid_terminal\":\"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.\",\"const_not_init\":\"Error at line: $0, column: $1. A variable declared as const must be initialized.\",\"id_missing\":\"Expected an identifier but found $0 at line: $1, column: $2.\",\"invalid_id_format\":\"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.\",\"main_missing\":\"The main function was not found. You need to declare a function of return type void named main.\",\"invalid_global_var\":\"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.\",\"not_implemented\":\"Critial internal error: The system defined function $0 was not found.\",\"function_missing\":\"The function $0 was not found.\",\"function_missing_full\":\"The function $0 at line: $1, column: $2 was not found.\",\"invalid_parameters_size_full\":\"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.\",\"invalid_parameters_size\":\"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.\",\"invalid_ref_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_ref\":\"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_parameter_type_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.\",\"invalid_parameter_type\":\"The expression $0 provided as a parameter to the function $1 is not of the expected type.\",\"unknown_command_full\":\"Internal error: an unknown command found at line $0.\",\"unknown_command\":\"Internal error: an unknown command found.\",\"loop_condition_type_full\":\"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).\",\"loop_condition_type\":\"The condition $0 of the loop must be of type bool (true or false).\",\"endless_loop_full\":\"Possible infinite loop detected in your code. Check line $0.\",\"endless_loop\":\"Possible infinite loop detected in your code.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).\",\"if_condition_type\":\"The condition $0 in the if … else command must result in a bool (true or false).\",\"invalid_return_type_full\":\"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.\",\"invalid_return_type\":\"The expression doest not result in a type compatible with the function $0. Expected type: $1.\",\"invalid_void_return_full\":\"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2\",\"invalid_void_return\":\"The function $0 cannot return an empty expression, use an expression that results in a $1\",\"unexpected_break_command_full\":\"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.\",\"unexpected_break_command\":\"Critical error: a break command was found outside a valid context: loop or switch … case structure.\",\"invalid_dimension\":\"Array (vector or matrix) dimensions must be of type int.\",\"void_in_expression_full\":\"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.\",\"void_in_expression\":\"The function $0 cannot be used inside an expression since its return type is void.\",\"invalid_array_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.\",\"invalid_array_access\":\"Identifier $0 does not identify a valid vector or matrix.\",\"invalid_matrix_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.\",\"invalid_matrix_access\":\"Identifier $0 does not identify a valid matrix.\",\"matrix_column_outbounds_full\":\"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.\",\"matrix_column_outbounds\":\"The number of columns $0 is invalid for the matrix $1 which has $2 columns.\",\"matrix_line_outbounds_full\":\"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.\",\"matrix_line_outbounds\":\"The number of lines $0 is invalid for matrix $1 which has $2 lines.\",\"vector_line_outbounds_full\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_line_outbounds\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_not_matrix_full\":\"Error at line $0: $1 is not a matrix.\",\"vector_not_matrix\":\"$0 is not a matrix.\",\"invalid_infix_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.\",\"invalid_infix_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.\",\"invalid_unary_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.\",\"invalid_unary_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.\",\"unknown_op\":\"Critical error: Unknown operator $0.\",\"duplicate_function\":\"The function $0 at line: $1, column: $2 has already been declared.\",\"duplicate_variable\":\"The variable $0 at line: $1, column: $2 has already been declared.\",\"main_parameters\":\"The main function cannot have parameters.\",\"symbol_not_found_full\":\"The variable $0 at line: $1, column: $2 has not been declared.\",\"symbol_not_found\":\"The variable $0 has not been declared.\",\"array_dimension_not_int_full\":\"The array (vector or matrix) dimensions at line $0 must be of type int.\",\"array_dimension_not_int\":\"An array (vector or matrix) dimensions must be of type int.\",\"array_dimension_not_positive_full\":\"The array (vector or matrix) dimensions at line $0 must be positive.\",\"array_dimension_not_positive\":\"An array (vector or matrix) dimensions must be positive.\",\"incompatible_types_full\":\"It expected $0 but the expression $1 at line $2 results in $3.\",\"incompatible_types\":\"It expected $0 but the expression $1 results in $2.\",\"incompatible_types_array_full\":\"The expression $0 at line $2 is not compatible with type $1.\",\"incompatible_types_array\":\"The expression $0 is not compatible with type $1.\",\"invalid_case_type_full\":\"The case expression $0 at line $1 is not compatible with type $2.\",\"invalid_case_type\":\"The case expression $0 is not compatible with type $1.\",\"function_no_return\":\"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.\",\"invalid_array_literal_type_full\":\"Error at line $0: the expression $1 does not result in a compatible type.\",\"invalid_array_literal_type\":\"The expression $0 does not result in a compatible type.\",\"invalid_array_literal_line_full\":\"Error at line $0: it expected $1 lines but found $2.\",\"invalid_array_literal_line\":\"It expected $0 lines but found $1.\",\"invalid_array_literal_column_full\":\"Error at line $0: it expected $1 column but found $2.\",\"invalid_array_literal_column\":\"It expected $0 column but found $1.\",\"exceeded_input_request\":\"The amount of reads requested exceeded the amount of inputs available.\",\"test_case_few_reads\":\"Teste case $0 failed: there are available inputs remaining.\",\"test_case_failed\":\"
Test case $0 did not executed successfully.
\",\"test_case_failed_exception\":\"
Test case $0 failed: $1\",\"test_case_exception\":\"An exception has ocurred during the execution of test case $0: $1\",\"invalid_type_conversion\":\"The value $0 cannot be converted to type $1.\",\"invalid_read_type\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type of the variable $3.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable $3 of type $4.\",\"inform_valid_identifier\":\"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.\",\"inform_valid_global_duplicated\":\"A global variable named $0 already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named $0 already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named $0 already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named $0 already exists in function $1, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"annonymous_array_literal\":\"Error at line $0: the array notation is only permitted during initialization of an array variable. i. e.: int vec[3] ← {1, 2, 3}.\",\"invalid_matrix_literal_line\":\"The expression $0 at line $1 does not have the same number of elements as the last line. All lines of a matrix must have the same number of elements.\",\"cannot_infer_matrix_line\":\"It is not possible to infer the number of lines of matrix $0 at line $1. It must be initialized or have its lines explicitly declared.\",\"cannot_infer_matrix_column\":\"It is not possible to infer the number of columns of matrix $0 at line $1. It must be initialized or have its columns explicitly declared.\",\"cannot_infer_vector_size\":\"It is not possible to infer the number of elements of vector $0 at line $1. It must be initialized or have its size explicitly declard.\",\"matrix_to_vector_literal_attr\":\"Error at line $0: The expression $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_literal_attr\":\"Error at line $0: The expression $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_const_ref_full\":\"The variable $0 provided as a parameter to the function $1 at line $2 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_ref\":\"The variable $0 provided as a parameter to the function $1 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_assignment_full\":\"Error at line $0: $1 is a constant e therefore cannot have its value changed.\",\"invalid_const_assignment\":\"$0 is a constant e therefore cannot have its value changed.\",\"array_init_not_literal\":\"Error at line $0: An array (vector or matrix) can only be initialized by an array literal. i.e : real vector[] <- {1,2,3}\",\"array_exceeds_2d\":\"Error at line $0: The maximum number of dimensions an array can have is 2. An element of 3 or dimensions was found.\",\"invalid_matrix_id_dimension\":\"Error at line $0: You must define all dimensions of the matrix when one of them is defined by a variable! i.e: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Error at line $0: You cannot initialize a vector when its size is defined by a variable. Use a vector assignment or loop command.\",\"invalid_matrix_init\":\"Error at line $0: You cannot initialize a matrix when one of its dimensions is defined by a variable. Use a matrix assignment or loop command.\",\"invalid_vector_assignment_full\":\"Error at line $0: You can only assign a vector to another when both have the same number of elements. $1 has $2 and $3 has $4 elements!\",\"invalid_vector_assignment\":\"You can only assign a vector to another when both have the same number of elements. $0 has $1 and $2 has $3 elements!\",\"invalid_matrix_assignment_full\":\"Error at line $0: You can only assign a matrix to another when both have dimensions of the same size. $1 has $2 lines e $3 columns while $4 has $5 lines and $6 columns!\",\"invalid_matrix_assignment\":\"You can only assign a matrix to another when both have dimensions of the same size. $0 has $1 lines e $2 columns while $3 has $4 lines and $5 columns!\",\"matrix_to_vector_attr\":\"Error at line $0: $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_attr\":\"Error at line $0: $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_matrix_index_assign_full\":\"Error at line $0: The position $1 of the matrix $2 only accepts vectors of size $3 but $4 has size $5.\",\"invalid_matrix_index_assign\":\"The position $0 of the matrix $1 only accepts vectors of size $2 but $3 has size $4.\",\"invalid_number_elements_vector\":\"It expected $0 elements at line $1 but the expression $2 has $3 elements.\",\"invalid_number_lines_matrix\":\"It expected a matrix with $0 lines at line $1 but the expression $2 has $3 lines.\",\"divsion_by_zero_full\":\"Error at line $0: The expression $1 resuts in a division by zero.\",\"divsion_by_zero\":\"The expression $0 resuts in a division by zero.\",\"undefined_tanget_value\":\"Error at line $0: The tangent of $1° is undefined.\",\"negative_log_value\":\"Error at line $0: You cannot calculate the logarithm of a negative value.\",\"invalid_string_index\":\"Error at line $0 during the execution of the function $1: $2 is an invalid index for the text string $3. The valid indexes go from 0 to $4.\",\"negative_sqrt_value\":\"Error at line $0: It is not allowd to calculate the square root of a negative number.\",\"exceeded_recursive_calls\":\"Error during the execution of line $0: The number of recursive calls exceeded the allowed number of calls.\",\"invalid_for_variable\":\"Error at line $0: The variable $1 used in the repeat_for command must be of type int.\",\"invalid_for_from\":\"Error at line $0: The value $1 passed to the parameter 'from' of the repeat_for command must be of type int.\",\"invalid_for_to\":\"Error at line $0: The value $1 passed to the parameter 'to' of the repeat_for command must be of type int.\",\"invalid_for_pass\":\"Error at line $0: The value $1 passed to the parameter 'pass' of the repeat_for command must be of type int.\",\"exceed_max_instructions\":\"The number of instructions executed by your program exceed the defined limit. Check your code for infinite loops or excessive recursive functions calls.\"},\"es\":{\"token_missing_one\":\"Syntax error: Expected $0 but found $1 at line:$2, column:$3\",\"token_missing_two\":\"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4\",\"eos_missing\":\"A new line or a ‘;’ is missing at line: $0, column: $1\",\"invalid_type\":\"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3\",\"invalid_array_dimension\":\"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.\",\"invalid_array_size\":\"The array at line $0 exceeds the maximum size of 2.\",\"extra_lines\":\"No text is allowed after '}' in 'program { … }'\",\"invalid_main_return\":\"The function $0 declared at line $2 must return $1.\",\"invalid_var_declaration\":\"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.\",\"invalid_break_command\":\"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.\",\"invalid_terminal\":\"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.\",\"const_not_init\":\"Error at line: $0, column: $1. A variable declared as const must be initialized.\",\"id_missing\":\"Expected an identifier but found $0 at line: $1, column: $2.\",\"invalid_id_format\":\"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.\",\"main_missing\":\"The main function was not found. You need to declare a function of return type void named main.\",\"invalid_global_var\":\"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.\",\"not_implemented\":\"Critial internal error: The system defined function $0 was not found.\",\"function_missing\":\"The function $0 was not found.\",\"function_missing_full\":\"The function $0 at line: $1, column: $2 was not found.\",\"invalid_parameters_size_full\":\"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.\",\"invalid_parameters_size\":\"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.\",\"invalid_ref_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_ref\":\"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_parameter_type_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.\",\"invalid_parameter_type\":\"The expression $0 provided as a parameter to the function $1 is not of the expected type.\",\"unknown_command_full\":\"Internal error: an unknown command found at line $0.\",\"unknown_command\":\"Internal error: an unknown command found.\",\"loop_condition_type_full\":\"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).\",\"loop_condition_type\":\"The condition $0 of the loop must be of type bool (true or false).\",\"endless_loop_full\":\"Possible infinite loop detected in your code. Check line $0.\",\"endless_loop\":\"Possible infinite loop detected in your code.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).\",\"if_condition_type\":\"The condition $0 in the if … else command must result in a bool (true or false).\",\"invalid_return_type_full\":\"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.\",\"invalid_return_type\":\"The expression doest not result in a type compatible with the function $0. Expected type: $1.\",\"invalid_void_return_full\":\"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2\",\"invalid_void_return\":\"The function $0 cannot return an empty expression, use an expression that results in a $1\",\"unexpected_break_command_full\":\"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.\",\"unexpected_break_command\":\"Critical error: a break command was found outside a valid context: loop or switch … case structure.\",\"invalid_dimension\":\"Array (vector or matrix) dimensions must be of type int.\",\"void_in_expression_full\":\"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.\",\"void_in_expression\":\"The function $0 cannot be used inside an expression since its return type is void.\",\"invalid_array_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.\",\"invalid_array_access\":\"Identifier $0 does not identify a valid vector or matrix.\",\"invalid_matrix_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.\",\"invalid_matrix_access\":\"Identifier $0 does not identify a valid matrix.\",\"matrix_column_outbounds_full\":\"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.\",\"matrix_column_outbounds\":\"The number of columns $0 is invalid for the matrix $1 which has $2 columns.\",\"matrix_line_outbounds_full\":\"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.\",\"matrix_line_outbounds\":\"The number of lines $0 is invalid for matrix $1 which has $2 lines.\",\"vector_line_outbounds_full\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_line_outbounds\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_not_matrix_full\":\"Error at line $0: $1 is not a matrix.\",\"vector_not_matrix\":\"$0 is not a matrix.\",\"invalid_infix_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.\",\"invalid_infix_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.\",\"invalid_unary_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.\",\"invalid_unary_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.\",\"unknown_op\":\"Critical error: Unknown operator $0.\",\"duplicate_function\":\"The function $0 at line: $1, column: $2 has already been declared.\",\"duplicate_variable\":\"The variable $0 at line: $1, column: $2 has already been declared.\",\"main_parameters\":\"The main function cannot have parameters.\",\"symbol_not_found_full\":\"The variable $0 at line: $1, column: $2 has not been declared.\",\"symbol_not_found\":\"The variable $0 has not been declared.\",\"array_dimension_not_int_full\":\"The array (vector or matrix) dimensions at line $0 must be of type int.\",\"array_dimension_not_int\":\"An array (vector or matrix) dimensions must be of type int.\",\"array_dimension_not_positive_full\":\"The array (vector or matrix) dimensions at line $0 must be positive.\",\"array_dimension_not_positive\":\"An array (vector or matrix) dimensions must be positive.\",\"incompatible_types_full\":\"It expected $0 but the expression $1 at line $2 results in $3.\",\"incompatible_types\":\"It expected $0 but the expression $1 results in $2.\",\"incompatible_types_array_full\":\"The expression $0 at line $2 is not compatible with type $1.\",\"incompatible_types_array\":\"The expression $0 is not compatible with type $1.\",\"invalid_case_type_full\":\"The case expression $0 at line $1 is not compatible with type $2.\",\"invalid_case_type\":\"The case expression $0 is not compatible with type $1.\",\"function_no_return\":\"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.\",\"invalid_array_literal_type_full\":\"Error at line $0: the expression $1 does not result in a compatible type.\",\"invalid_array_literal_type\":\"The expression $0 does not result in a compatible type.\",\"invalid_array_literal_line_full\":\"Error at line $0: it expected $1 lines but found $2.\",\"invalid_array_literal_line\":\"It expected $0 lines but found $1.\",\"invalid_array_literal_column_full\":\"Error at line $0: it expected $1 column but found $2.\",\"invalid_array_literal_column\":\"It expected $0 column but found $1.\",\"exceeded_input_request\":\"The amount of reads requested exceeded the amount of inputs available.\",\"test_case_few_reads\":\"Teste case $0 failed: there are available inputs remaining.\",\"test_case_failed\":\"
Test case $0 did not executed successfully.
\",\"test_case_failed_exception\":\"
Test case $0 failed: $1\",\"test_case_exception\":\"An exception has ocurred during the execution of test case $0: $1\",\"invalid_type_conversion\":\"The value $0 cannot be converted to type $1.\",\"invalid_read_type\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type of the variable $3.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable $3 of type $4.\",\"inform_valid_identifier\":\"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.\",\"inform_valid_global_duplicated\":\"A global variable named $0 already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named $0 already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named $0 already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named $0 already exists in function $1, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"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\":\"
Caso de teste $0: OK
\",\"test_case_duration\":\"Levou $0ms\",\"test_suite_grade\":\"A sua solução alcançou $0% da nota.\",\"awaiting_input_message\":\"O seu programa está em execução e aguardando uma entrada! Digite algo e pressione ENTER...\",\"assessment-empty-expected-tooltip\":\"A saída gerada foi além do esperado\",\"assessment-empty-generated-tooltip\":\"O programa não gerou saídas suficientes\",\"testcase_autogen_unused_input\":\"A solução submetida não lê todas entradas disponíveis no caso de teste 1\",\"testcase_autogen_empty\":\"Sua solução não gerou qualquer saída para o caso de teste $0.\",\"success_execution\":\"Execução do programa finalizada!\",\"aborted_execution\":\"A execução do programa foi interrompida!\",\"unexpected_execution_error\":\"Erro inesperado durante a execução do programa.\"},\"en\":{\"test_case_success\":\"
Test case $0: OK
\",\"test_case_duration\":\"Took $0ms\",\"test_suite_grade\":\"Your solution scored $0% of the grade.\",\"awaiting_input_message\":\"Your program is running and awaiting for an input. Type something and press ENTER…\",\"assessment-empty-expected-tooltip\":\"The generated output was beyond the amount expected\",\"assessment-empty-generated-tooltip\":\"The program did not generate enough outputs\",\"testcase_autogen_unused_input\":\"The submitted solution does not read all inputs available in the test case $0\",\"testcase_autogen_empty\":\"Your solution did not generate any output for test case $0.\",\"success_execution\":\"Program execution finished!\",\"aborted_execution\":\"Program execution was aborted!\",\"unexpected_execution_error\":\"Unexpected error during program execution.\"},\"es\":{\"test_case_success\":\"
Test case $0: OK
\",\"test_case_duration\":\"Tardó $0ms\",\"test_suite_grade\":\"Su solución obtuvo $0% de la calificación.\",\"awaiting_input_message\":\"Su programa se está ejecutando y esperando una entrada. Escriba algo y presione ENTER ...\",\"assessment-empty-expected-tooltip\":\"The generated output was beyond the amount expected\",\"assessment-empty-generated-tooltip\":\"El programa no generó suficientes resultados.\",\"testcase_autogen_unused_input\":\"La solución presentada no lee todas las entradas disponibles en el caso de prueba 1\",\"testcase_autogen_empty\":\"Su solución no generó ningún resultado para el caso de prueba de $ 0.\",\"success_execution\":\"¡Ejecución del programa terminada!\",\"aborted_execution\":\"¡La ejecución del programa fue abortada!\",\"unexpected_execution_error\":\"Error inesperado durante la ejecución del programa.\"}}","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\",\"btn_add_var\":\"Adicionar variável\",\"btn_drag_and_drop_function\":\"Mover função\",\"btn_delete_function\":\"Excluir função\",\"expression_invalid\":\"Expressão inválida. Verifique a sintáxe antes de continuar.\",\"expression_undelcared_variable\":\"Variáveis não declaradas:\",\"expression_undeclared_function\":\"Funções não definidas:\",\"start\":\"inicio\",\"type_void\":\"vazio\",\"type_integer\":\"inteiro\",\"logic_operator_and\":\"E\",\"logic_operator_or\":\"OU\",\"logic_operator_not\":\"nao\",\"type_real\":\"real\",\"program\":\"programa\",\"type_text\":\"cadeia\",\"textvar_default_value\":\"texto\",\"type_boolean\":\"logico\",\"logic_value_true\":\"verdadeiro\",\"logic_value_false\":\"falso\",\"variable\":\"Variável\",\"command\":\"Comando\",\"new_parameter\":\"parametro\",\"new_variable\":\"variavel\",\"new_global\":\"global\",\"new_function\":\"nova_funcao\",\"matrix\":\"matriz\",\"vector\":\"vetor\",\"text_lock_expression\":\"Bloquear expressão\",\"text_unlock_expression\":\"Desbloquear expressão\",\"text_edit_expression\":\"Editar expressão manualmente\",\"text_edit_expression_confirm\":\"Confirmar edição\",\"text_edit_expression_cancel\":\"Cancelar edição\",\"text_add_function\":\"Adicionar uma nova função ao programa\",\"text_move_command\":\"Mover comando\",\"text_add_parameters\":\"Adicionar um novo parâmetro\",\"text_parameter_reference\":\"Definir parâmetro como passagem por referência\",\"text_parameter_copy\":\"Definir parâmetro como passagem por cópia\",\"text_comment_start\":\"Comentário inicial da função...\",\"text_comment_main\":\"Esta é a função principal...\",\"text_read_var\":\"Entrada/Leitura de dados\",\"text_write_var\":\"Saída/Escrita de dados\",\"text_command_read\":\"leia\",\"text_command_write\":\"escreva\",\"text_return\":\"devolva\",\"text_btn_return\":\"Devolver\",\"text_comment\":\"Comentário\",\"string_join_or\":\"ou\",\"matrix_info_string\":\"matriz de $0\",\"vector_info_string\":\"vetor de $0\",\"text_attribution\":\"Atribuição\",\"text_if\":\"se\",\"text_break\":\"pare\",\"text_else\":\"senao\",\"text_for\":\"repita_para\",\"text_code_while\":\"repita_enquanto\",\"text_code_do\":\"repita\",\"text_code_do_until\":\"ate_que\",\"text_command_do\":\"repita\",\"text_command_while\":\"repita enquanto\",\"text_command_do_until\":\"até que\",\"text_code_switch\":\"escolha\",\"text_code_case\":\"caso\",\"text_config_programming\":\"Programação\",\"text_config_programming_both\":\"Visual e textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Lógicos\",\"text_arithmetic_expression\":\"Aritméticos\",\"text_iftrue\":\"Se condição senão\",\"text_message_error_activity_file\":\"Aconteceu um erro ao processar a atividade.
Recarregue a página para tentar novamente.\",\"text_message_error_upload_file\":\"Não foi possível carregar o arquivo.
Verifique o conteúdo do arquivo e tente novamente.\",\"text_message_error_upload_close\":\"Fechar\",\"text_message_error_activity_reload\":\"Recarregar\",\"text_repeatNtimes\":\"Repita N vezes\",\"text_receives\":\"recebe\",\"text_whiletrue\":\"Enquanto verdadeiro\",\"text_dowhiletrue\":\"Repita até que verdadeiro\",\"text_switch\":\"Escolha\",\"text_functioncall\":\"Chamada de função\",\"text_value\":\"Valor\",\"text_operator\":\"Operador\",\"text_parentheses\":\"Parênteses\",\"text_change\":\"Alterar\",\"text_teacher_algorithm\":\"Algoritmo\",\"text_teacher_algorithm_include\":\"Incluir o algoritmo abaixo no exercício\",\"text_teacher_test_case\":\"Casos de teste\",\"text_teacher_config\":\"Configurações\",\"text_teacher_data_types\":\"Tipos de dados\",\"text_teacher_commands\":\"Comandos\",\"text_teacher_functions\":\"Funções\",\"text_teacher_create_functions\":\"Criar novas funções\",\"text_teacher_create_movement_functions\":\"Movimentar funções\",\"text_teacher_test_case_input\":\"Entrada\",\"text_teacher_test_case_output\":\"Saída\",\"text_teacher_test_case_actions\":\"Ações\",\"text_teacher_test_case_add\":\"Adicionar caso de teste\",\"text_header_ivprog_functions\":\"Funções do iVProg\",\"text_menu_functions_math\":\"Matemática\",\"text_menu_functions_text\":\"Texto\",\"text_menu_functions_array\":\"Arranjo\",\"text_menu_functions_conversion\":\"Conversão\",\"text_no_variable\":\"Nenhuma variável declarada\",\"text_no_variable_instruction\":\"Antes de utilizar uma variável, é necessário criá-la\",\"text_ivprog_description\":\"Programação Visual interativa na Internet\",\"tooltip_visual\":\"Programação visual\",\"tooltip_textual\":\"Programação textual\",\"tooltip_upload\":\"Upload de código fonte\",\"tooltip_download\":\"Download do código fonte\",\"tooltip_undo\":\"Desfazer\",\"tooltip_redo\":\"Refazer\",\"tooltip_run\":\"Executar o programa\",\"tooltip_evaluate\":\"Avaliar o programa\",\"tooltip_help\":\"Ajuda\",\"tooltip_add_global\":\"Adicionar variável global\",\"tooltip_hide_function\":\"Ocultar os elementos da função\",\"var_menu_select_var\":\"Selecione uma variável\",\"var_menu_select_all\":\"Selecione\",\"var_menu_select_function\":\"Selecione uma função\",\"expression_menu_select\":\"Construir uma expressão lógica\",\"inform_valid_content\":\"Informe o conteúdo!\",\"inform_valid_expression\":\"Construa uma expressão lógica!\",\"tooltip_terminal_clear\":\"Limpa o terminal removendo todos os textos já escritos e os pendentes.\",\"tooltip_terminal_show\":\"Exibe o terminal caso esteja escondido\",\"tooltip_terminal_hide\":\"Esconde o terminal caso não esteja escondido\",\"tooltip_menu_read\":\"Comando para receber dados pelo teclado\",\"tooltip_menu_write\":\"Comando para apresentar conteúdo ao usuário\",\"tooltip_menu_comments\":\"Bloco para comentários internos do programador\",\"tooltip_menu_attribution\":\"Comando para atribuir uma expressão a uma variável\",\"tooltip_menu_call_function\":\"Comando para realizar a chamada de uma função\",\"tooltip_menu_if_else\":\"Estrutura para que os comandos só sejam executados de acordo com as condições estabelecidas\",\"tooltip_menu_repeat_n_times\":\"Estrutura para executar um bloco de comandos repetidamente\",\"tooltip_menu_repeat_whiletrue\":\"Estrutura para repetir um bloco de comandos enquanto a condição for verdadeira\",\"tooltip_menu_repeat_dowhiletrue\":\"Estrutura que executa um bloco e o repete enquanto a condição for verdadeira\",\"tooltip_menu_repeat_switch\":\"Estrutura de escolha do bloco a ser executado\",\"tooltip_menu_repeat_return\":\"Comando para devolver o resultado e finalizar a função\",\"tooltip_move_var\":\"Mover variável\",\"tooltip_remove_var\":\"Excluir variável\",\"text_ivprog_version\":\"Versão\",\"text_teacher_filter\":\"Filtro\",\"text_teacher_filter_active\":\"Ativado\",\"text_teacher_filter_help\":\"Ao ativar o filtro, as modificações do iVProg estarão bloqueadas.\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duração\",\"assessment-detail-grade-label\":\"Nota\",\"assessment-detail-input-label\":\"Entradas\",\"assessment-detail-output-label\":\"Saídas\",\"assessment-detail-expected-label\":\"Esperava\",\"assessment-detail-generated-label\":\"Gerou\",\"assessment-detail-result-label\":\"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\",\"btn_add_var\":\"Add a variable\",\"btn_drag_and_drop_function\":\"Move function\",\"btn_delete_function\":\"Delete function\",\"expression_invalid\":\"Invalid expression. Check the syntax before proceeding.\",\"expression_undelcared_variable\":\"Undeclared variables:\",\"expression_undeclared_function\":\"Undefined functions:\",\"start\":\"main\",\"type_void\":\"void\",\"type_integer\":\"int\",\"logic_operator_and\":\"AND\",\"logic_operator_or\":\"OR\",\"logic_operator_not\":\"not\",\"type_real\":\"real\",\"program\":\"program\",\"type_text\":\"string\",\"textvar_default_value\":\"text\",\"type_boolean\":\"bool\",\"logic_value_true\":\"true\",\"logic_value_false\":\"false\",\"variable\":\"Variable\",\"command\":\"Command\",\"new_parameter\":\"parameter\",\"new_variable\":\"variable\",\"new_global\":\"global\",\"new_function\":\"new_function\",\"matrix\":\"matrix\",\"vector\":\"vector\",\"text_lock_expression\":\"Block expression\",\"text_unlock_expression\":\"Unlock expression\",\"text_edit_expression\":\"Edit expression manually\",\"text_edit_expression_confirm\":\"Confirm edition\",\"text_edit_expression_cancel\":\"Cancel edition\",\"text_add_function\":\"Add a new function to the program\",\"text_move_command\":\"Move command\",\"text_add_parameters\":\"Add a new parameter\",\"text_parameter_reference\":\"Define parameter passed by reference\",\"text_parameter_copy\":\"Define parameter passed by copy\",\"text_comment_start\":\"Function initial comment\",\"text_comment_main\":\"This is the main funcion\",\"text_read_var\":\"Input/Read data\",\"text_write_var\":\"Output/Write data\",\"text_command_read\":\"read\",\"text_command_write\":\"write\",\"text_return\":\"return\",\"text_btn_return\":\"Return\",\"text_comment\":\"Comment\",\"string_join_or\":\"or\",\"matrix_info_string\":\"matrix of $0\",\"vector_info_string\":\"vector of $0\",\"text_attribution\":\"Assignment\",\"text_if\":\"if\",\"text_break\":\"break\",\"text_else\":\"else\",\"text_for\":\"repeat_for\",\"text_code_while\":\"repeat_while\",\"text_code_do\":\"repeat\",\"text_code_do_until\":\"until\",\"text_command_do\":\"repeat\",\"text_command_while\":\"repeat while\",\"text_command_do_until\":\"until\",\"text_code_switch\":\"switch\",\"text_code_case\":\"case\",\"text_config_programming\":\"Programming\",\"text_config_programming_both\":\"Visual & Textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Logic\",\"text_arithmetic_expression\":\"Arithmetics\",\"text_iftrue\":\"If condition else\",\"text_message_error_activity_file\":\"There was an error processing the activity.
Reload the page to try again.\",\"text_message_error_upload_file\":\"It was not possible upload the file.
Verify the file's content and try again.\",\"text_message_error_upload_close\":\"Close\",\"text_message_error_activity_reload\":\"Reload\",\"text_repeatNtimes\":\"Repeat N times\",\"text_receives\":\"receives\",\"text_whiletrue\":\"While true\",\"text_dowhiletrue\":\"Repeat until true\",\"text_switch\":\"Switch\",\"text_functioncall\":\"Function call\",\"text_value\":\"Value\",\"text_operator\":\"Operator\",\"text_parentheses\":\"Parentheses\",\"text_change\":\"Modify\",\"text_teacher_algorithm\":\"Algorithm\",\"text_teacher_algorithm_include\":\"Include the algorithm below in the activity\",\"text_teacher_test_case\":\"Test cases\",\"text_teacher_config\":\"Configurations\",\"text_teacher_data_types\":\"Data types\",\"text_teacher_commands\":\"Commands\",\"text_teacher_functions\":\"Functions\",\"text_teacher_create_functions\":\"Create new functions\",\"text_teacher_create_movement_functions\":\"Move functions\",\"text_teacher_test_case_input\":\"Input\",\"text_teacher_test_case_output\":\"Output\",\"text_teacher_test_case_actions\":\"Actions\",\"text_teacher_test_case_add\":\"Add test case\",\"text_header_ivprog_functions\":\"iVProg Functions\",\"text_menu_functions_math\":\"Math\",\"text_menu_functions_text\":\"Text\",\"text_menu_functions_array\":\"Array\",\"text_menu_functions_conversion\":\"Conversion\",\"text_no_variable\":\"No variable declared\",\"text_no_variable_instruction\":\"Before using a variable, you need to create it\",\"text_ivprog_description\":\"Interactive and Visual Programming on the Internet\",\"tooltip_visual\":\"Visual programming\",\"tooltip_textual\":\"Textual programming\",\"tooltip_upload\":\"Upload source code\",\"tooltip_download\":\"Download source code\",\"tooltip_undo\":\"Undo\",\"tooltip_redo\":\"Redo\",\"tooltip_run\":\"Run the program\",\"tooltip_evaluate\":\"Evaluate the program\",\"tooltip_help\":\"Help\",\"tooltip_add_global\":\"Add a global variable\",\"tooltip_hide_function\":\"Hide function elements\",\"var_menu_select_var\":\"Select a variable\",\"var_menu_select_all\":\"Select\",\"var_menu_select_function\":\"Select a function\",\"expression_menu_select\":\"Construct a logic expression\",\"inform_valid_content\":\"Provide some data\",\"inform_valid_expression\":\"Construct a logic expression\",\"tooltip_terminal_clear\":\"Clears the terminal by removing all wrriten and pending text.\",\"tooltip_terminal_show\":\"Shows the terminal if it is hidden\",\"tooltip_terminal_hide\":\"Hides the terminal if it is not on display\",\"tooltip_menu_read\":\"Command to input data from keyboard\",\"tooltip_menu_write\":\"Command to present content to user\",\"tooltip_menu_comments\":\"Block to comments from developer\",\"tooltip_menu_attribution\":\"Command to assign an expression to a variable\",\"tooltip_menu_call_function\":\"Command to execute a function call\",\"tooltip_menu_if_else\":\"Structure in which command only run when the conditions are satisfied\",\"tooltip_menu_repeat_n_times\":\"Structure to execute a block of commands repeatedly\",\"tooltip_menu_repeat_whiletrue\":\"Structure to execute a block repeatdly while condition is true\",\"tooltip_menu_repeat_dowhiletrue\":\"Structure that executes a block and repeat while the condition is true\",\"tooltip_menu_repeat_switch\":\"Structure that choices the block to be executed\",\"tooltip_menu_repeat_return\":\"Command to return the result and finish the function\",\"tooltip_move_var\":\"Move variable\",\"tooltip_remove_var\":\"Delete variable\",\"text_ivprog_version\":\"Version\",\"text_teacher_filter\":\"Filter\",\"text_teacher_filter_active\":\"Activated\",\"text_teacher_filter_help\":\"By activating the filter modifications in iVProg will be blocked\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duration\",\"assessment-detail-grade-label\":\"Grade\",\"assessment-detail-input-label\":\"Inputs\",\"assessment-detail-output-label\":\"Outputs\",\"assessment-detail-expected-label\":\"Expected\",\"assessment-detail-generated-label\":\"Generated\",\"assessment-detail-result-label\":\"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\",\"btn_add_var\":\"Add a variable\",\"btn_drag_and_drop_function\":\"Mover función \",\"btn_delete_function\":\"Borrar función \",\"expression_invalid\":\"Expresión no válida. Verifique la sintaxis antes de continuar.\",\"expression_undelcared_variable\":\"Variables no declaradas:\",\"expression_undeclared_function\":\"Funcíon no declaradas:\",\"start\":\"main\",\"type_void\":\"void\",\"type_integer\":\"int\",\"logic_operator_and\":\"AND\",\"logic_operator_or\":\"OR\",\"logic_operator_not\":\"not\",\"type_real\":\"real\",\"program\":\"program\",\"type_text\":\"string\",\"textvar_default_value\":\"texto\",\"type_boolean\":\"bool\",\"logic_value_true\":\"true\",\"logic_value_false\":\"false\",\"variable\":\"Variable\",\"command\":\"Comando\",\"new_parameter\":\"parametro\",\"new_variable\":\"variable\",\"new_global\":\"global\",\"new_function\":\"nueva_función\",\"matrix\":\"matriz\",\"vector\":\"vector\",\"text_lock_expression\":\"Expresión de bloque \",\"text_unlock_expression\":\"Desbloquear expresión \",\"text_edit_expression\":\"Editar expresión manualmente \",\"text_edit_expression_confirm\":\"Confirmar edición\",\"text_edit_expression_cancel\":\"Cancelar edición\",\"text_add_function\":\"Agregar una nueva función al programa\",\"text_move_command\":\"Mover comando\",\"text_add_parameters\":\"Agregar un nuevo parámetro\",\"text_parameter_reference\":\"Define parameter passed by reference\",\"text_parameter_copy\":\"Define parameter passed by copy\",\"text_comment_start\":\"Comentario inicial de la función\",\"text_comment_main\":\"Esta es la función principal\",\"text_read_var\":\"Entrada/Lectura de dados\",\"text_write_var\":\"Salida/Escribir datos\",\"text_command_read\":\"read\",\"text_command_write\":\"write\",\"text_return\":\"return\",\"text_btn_return\":\"Devolución\",\"text_comment\":\"Comentario\",\"string_join_or\":\"or\",\"matrix_info_string\":\"matriz de $0\",\"vector_info_string\":\"vector de $0\",\"text_attribution\":\"Asignación\",\"text_if\":\"if\",\"text_break\":\"break\",\"text_else\":\"else\",\"text_for\":\"repeat_for\",\"text_code_while\":\"repeat_while\",\"text_code_do\":\"repeat\",\"text_code_do_until\":\"until\",\"text_command_do\":\"repeat\",\"text_command_while\":\"repeat while\",\"text_command_do_until\":\"until\",\"text_code_switch\":\"switch\",\"text_code_case\":\"case\",\"text_config_programming\":\"Programación\",\"text_config_programming_both\":\"Visual & Textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Lógicos\",\"text_arithmetic_expression\":\"Aritmética\",\"text_iftrue\":\"Si condicion sino\",\"text_message_error_activity_file\":\"Se produjo un error al procesar la actividad.
Recargar la página para volver a intentarlo.\",\"text_message_error_upload_file\":\"text_message_error_upload_file\",\"text_message_error_upload_close\":\"Close\",\"text_message_error_activity_reload\":\"Recargar\",\"text_repeatNtimes\":\"Repetir N veces\",\"text_receives\":\"receives\",\"text_whiletrue\":\"Mientras verdad\",\"text_dowhiletrue\":\"Repita hasta verdad\",\"text_switch\":\"Switch\",\"text_functioncall\":\"Llamada de función\",\"text_value\":\"Valor\",\"text_operator\":\"Operador\",\"text_parentheses\":\"Paréntesis\",\"text_change\":\"Modify\",\"text_teacher_algorithm\":\"Algorithm\",\"text_teacher_algorithm_include\":\"Incluir el algoritmo en la actividad.\",\"text_teacher_test_case\":\"Test cases\",\"text_teacher_config\":\"Configuraciones\",\"text_teacher_data_types\":\"Data types\",\"text_teacher_commands\":\"Commands\",\"text_teacher_functions\":\"Funciones\",\"text_teacher_create_functions\":\"Create new functions\",\"text_teacher_create_movement_functions\":\"Move functions\",\"text_teacher_test_case_input\":\"Input\",\"text_teacher_test_case_output\":\"Output\",\"text_teacher_test_case_actions\":\"Actions\",\"text_teacher_test_case_add\":\"Add test case\",\"text_header_ivprog_functions\":\"iVProg Functions\",\"text_menu_functions_math\":\"Math\",\"text_menu_functions_text\":\"Text\",\"text_menu_functions_array\":\"Array\",\"text_menu_functions_conversion\":\"Conversion\",\"text_no_variable\":\"No variable declared\",\"text_no_variable_instruction\":\"Antes de usar una variable, debe crearla\",\"text_ivprog_description\":\"Interactive and Visual Programming on the Internet\",\"tooltip_visual\":\"Visual programming\",\"tooltip_textual\":\"Textual programming\",\"tooltip_upload\":\"Upload source code\",\"tooltip_download\":\"Download source code\",\"tooltip_undo\":\"Undo\",\"tooltip_redo\":\"Redo\",\"tooltip_run\":\"Run the program\",\"tooltip_evaluate\":\"Evaluate the program\",\"tooltip_help\":\"Help\",\"tooltip_add_global\":\"Add a global variable\",\"tooltip_hide_function\":\"Hide function elements\",\"var_menu_select_var\":\"Select a variable\",\"var_menu_select_all\":\"Select\",\"var_menu_select_function\":\"Select a function\",\"expression_menu_select\":\"Construct a logic expression\",\"inform_valid_content\":\"Proporcionar algunos datos\",\"inform_valid_expression\":\"Construct a logic expression\",\"tooltip_terminal_clear\":\"Borra el terminal eliminando todo el texto escrito y pendiente.\",\"tooltip_terminal_show\":\"Muestra el terminal si está oculto.\",\"tooltip_terminal_hide\":\"Oculta el terminal si no está en exhibición\",\"tooltip_menu_read\":\"Command to input data from keyboard\",\"tooltip_menu_write\":\"Command to present content to user\",\"tooltip_menu_comments\":\"Block to comments from developer\",\"tooltip_menu_attribution\":\"Command to assign an expression to a variable\",\"tooltip_menu_call_function\":\"Command to execute a function call\",\"tooltip_menu_if_else\":\"Structure in which command only run when the conditions are satisfied\",\"tooltip_menu_repeat_n_times\":\"Structure to execute a block of commands repeatedly\",\"tooltip_menu_repeat_whiletrue\":\"Structure to execute a block repeatdly while condition is true\",\"tooltip_menu_repeat_dowhiletrue\":\"Structure that executes a block and repeat while the condition is true\",\"tooltip_menu_repeat_switch\":\"Structure that choices the block to be executed\",\"tooltip_menu_repeat_return\":\"Command to return the result and finish the function\",\"tooltip_move_var\":\"Move variable\",\"tooltip_remove_var\":\"Delete variable\",\"text_ivprog_version\":\"Version\",\"text_teacher_filter\":\"Filter\",\"text_teacher_filter_active\":\"Activated\",\"text_teacher_filter_help\":\"Al activar el filtro, las modificaciones en iVProg serán bloqueadas\",\"text_join_assessment_outputs\":\" ;\",\"assessment-detail-time-label\":\"Duration\",\"assessment-detail-grade-label\":\"Grade\",\"assessment-detail-input-label\":\"Inputs\",\"assessment-detail-output-label\":\"Outputs\",\"assessment-detail-expected-label\":\"Expected\",\"assessment-detail-generated-label\":\"Generated\",\"assessment-detail-result-label\":\"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 `\n \n \n \n \n \n \n :assessment-result:\n \n `;\n }\n\n static get DETAIL_TEMPLATE () {\n return `
\n
\n

:test-name:

\n

:time-label:: :time:ms

\n

:grade-label:: :grade:%

\n
\n
\n

:input-label:

\n
    \n
  • :input-list:
  • \n
\n
\n
\n

:output-label:

\n :output-result:\n
\n
`;\n }\n\n static get OUPUT_TABLE_TEMPLATE () {\n return `
\n \n \n \n \n \n \n :results:\n
:expected-label::generated-label::result-label:
\n
`;\n }\n\n static get OUTPUT_TEMPLATE () {\n return `$0\n $1\n $2`;\n }\n\n static get EMPTY_OUTPUT_TEMPLATE () {\n return `
\n $0
`;\n }\n\n static get FAILED_TEMPLATE () {\n return `

$0

`;\n }\n\n static get INPUT_INFO_TEMPLATE () {\n return `$1`;\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(/> *<');\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\", \"\" + diff_string);\n template = template.replace(\":class-result:\", \"assessment-string-diff\");\n }\n return template;\n }\n\n getDiffStringStyle (text, action) {\n const template = \"$1\"\n // Fix missing whitespace when its a single element\n text = text.replace(/\\s/g,\" \");\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 constructor (msg, id) {\n super(msg);\n this.id = id;\n this._context = {};\n if (Error.captureStackTrace) Error.captureStackTrace(this, SyntaxError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\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(\n LocalizedStrings.getError(message_id, context),\n message_id\n );\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 const error = createError(\"token_missing_one\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n token_missing_list: (expectedList, token) => {\n const line = expectedList.join(LocalizedStrings.getOR());\n const error = SyntaxErrorFactory.token_missing_one(line, token);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n id_missing: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"id_missing\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n eos_missing: (token) => {\n const context = [token.line, token.column];\n const error = createError(\"eos_missing\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_array_dimension: (typeName, token) => {\n const context = [token.line, token.column, typeName];\n const error = createError(\"invalid_array_dimension\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_array_size: (token) => {\n const context = [token.line];\n const error = createError(\"invalid_array_size\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_main_return: (name, typeName, token) => {\n const context = [name, typeName, token.line];\n const error = createError(\"invalid_main_return\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_var_declaration: (token) => {\n const context = [token.line];\n const error = createError(\"invalid_var_declaration\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_break_command: (cmdName, token) => {\n const context = [token.line, cmdName];\n const error = createError(\"invalid_break_command\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_terminal: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"invalid_terminal\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_type: (list, token) => {\n const line = list.join(LocalizedStrings.getOR());\n const context = [token.text, token.line, token.column, line];\n const error = createError(\"invalid_type\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n const_not_init: (token) => {\n const context = [token.line, token.column];\n const error = createError(\"const_not_init\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_id_format: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"invalid_id_format\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n duplicate_function: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"duplicate_function\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n main_parameters: () => {\n return createError(\"main_parameters\");\n },\n duplicate_variable: (token) => {\n const context = [token.text, token.line, token.column];\n const error = createError(\"duplicate_variable\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_character: (text, line, column) => {\n const context = [text, line];\n const error = createError(\"invalid_character\", context);\n error.context = { line: line, column: column };\n return error;\n },\n annonymous_array_literal: (token) => {\n const context = [token.line];\n const error = createError(\"annonymous_array_literal\", context);\n error.context = { line: token.line, column: token.column };\n return error;\n },\n invalid_matrix_literal_line: (exp, sourceInfo) => {\n const context = [exp, sourceInfo.line];\n const error = createError(\"invalid_matrix_literal_line\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_matrix_line: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_matrix_line\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_matrix_column: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_matrix_column\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n cannot_infer_vector_size: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n const error = createError(\"cannot_infer_vector_size\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n matrix_to_vector_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n const error = createError(\"matrix_to_vector_literal_attr\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n vector_to_matrix_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n const error = createError(\"vector_to_matrix_literal_attr\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n array_init_not_literal: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"array_init_not_literal\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n array_exceeds_2d: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"array_exceeds_2d\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_matrix_id_dimension: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_matrix_id_dimension\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_vector_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_vector_init\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_matrix_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n const error = createError(\"invalid_matrix_init\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 static createParser (input) {\n const lexerClass = LanguageService.getCurrentLexer();\n return new IVProgParser(input, lexerClass);\n }\n\n // \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 // \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 = [\n 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 (\n token.type === this.lexerClass.RK_CONST ||\n this.isVariableType(token)\n ) {\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(\n this.lexer.literalNames[this.lexerClass.RK_PROGRAM],\n token\n );\n }\n }\n\n checkOpenCurly (attempt = false) {\n const token = this.getToken();\n if (this.lexerClass.OPEN_CURLY !== token.type) {\n if (!attempt) throw SyntaxErrorFactory.token_missing_one(\"{\", token);\n else 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) throw SyntaxErrorFactory.token_missing_one(\"}\", token);\n else 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) throw SyntaxErrorFactory.eos_missing(eosToken);\n else 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(\n this.getTypeArray()\n ),\n 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(\n typeString,\n isConst,\n idString,\n sourceInfo,\n dimensions,\n dim1,\n dim2\n );\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(\n idString,\n typeString,\n initial,\n isConst\n );\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].concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration];\n }\n }\n }\n\n parseArrayDeclaration (\n typeString,\n isConst,\n idString,\n sourceInfo,\n dimensions,\n dim1,\n dim2\n ) {\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 (\n dim1 instanceof Expressions.VariableLiteral ||\n dim2 instanceof Expressions.VariableLiteral\n ) {\n dim_is_id = true;\n if (dimensions > 1 && (dim1 == null || dim2 == null)) {\n throw SyntaxErrorFactory.invalid_matrix_id_dimension(\n SourceInfo.createSourceInfo(equalsToken)\n );\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(\n SourceInfo.createSourceInfo(equalsToken)\n );\n } else {\n throw SyntaxErrorFactory.invalid_matrix_init(\n SourceInfo.createSourceInfo(equalsToken)\n );\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(\n idString,\n sourceInfo\n );\n }\n }\n\n if (dimensions === 1 && initial != null && !initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.matrix_to_vector_literal_attr(\n idString,\n expString,\n initial.sourceInfo\n );\n } else if (dimensions > 1 && initial != null && initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.vector_to_matrix_literal_attr(\n idString,\n expString,\n initial.sourceInfo\n );\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(\n idString,\n new ArrayType(typeString, dimensions),\n n_lines,\n n_columns,\n initial,\n isConst\n );\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].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(\n this.lexer.literalNames[this.lexerClass.RK_INTEGER],\n dimToken\n );\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(\n SourceInfo.createSourceInfo(invalid_token)\n );\n }\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(\n SourceInfo.createSourceInfo(beginArray)\n );\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(\n beginArray,\n endArray\n );\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(\n SourceInfo.createSourceInfo(beginArray)\n );\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(\n beginArray,\n endArray\n );\n if (lastSize == null) {\n lastSize = data.length;\n } else if (lastSize !== data.length) {\n const expString = this.inputStream.getText(\n beginArray.start,\n endArray.stop\n );\n throw SyntaxErrorFactory.invalid_matrix_literal_line(\n expString,\n sourceInfo\n );\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(\n functionID,\n returnType,\n formalParams,\n commandsBlock\n );\n if (functionID === null && !func.isMain) {\n throw SyntaxErrorFactory.invalid_main_return(\n LanguageDefinedFunction.getMainFunctionName(),\n this.lexer.literalNames[this.lexerClass.RK_VOID],\n token.line\n );\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) 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 (\n token.type !== this.lexerClass.ID &&\n token.type !== this.lexerClass.LIB_ID\n ) {\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 (\n token.type === this.lexerClass.ID &&\n this.insideScope(IVProgParser.FUNCTION)\n ) {\n return Types.VOID;\n } else if (\n token.type === this.lexerClass.RK_VOID &&\n this.insideScope(IVProgParser.FUNCTION)\n ) {\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 const cmd = this.parseCommand();\n if (cmd === null) 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 (\n token.type === this.lexerClass.RK_WHILE ||\n token.type === this.lexerClass.RK_WHILE_ALT\n ) {\n return this.parseWhile();\n } else if (\n token.type === this.lexerClass.RK_FOR ||\n token.type === this.lexerClass.RK_FOR_ALT\n ) {\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(\n this.lexer.literalNames[this.lexerClass.RK_DO_UNTIL],\n whileToken\n );\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(\n [this.lexer.literalNames[this.lexerClass.RK_IF], \"{\"],\n maybeIf\n );\n }\n this.popScope();\n const cmd = new Commands.IfThenElse(\n logicalExpression,\n cmdBlocks,\n elseBlock\n );\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(\n for_id,\n for_from,\n for_to,\n maybePass,\n commandsBlock\n );\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 const token = this.getToken();\n this.pos++;\n this.checkEOS();\n this.pos++;\n const command = new Commands.Break();\n command.sourceInfo = SourceInfo.createSourceInfo(token);\n return command;\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(\n id,\n lineExpression,\n columnExpression,\n exp\n );\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(\n [\"=\", \"(\"],\n equalOrParenthesis\n );\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(\n \"Error de sintaxe no comando repita_para: esperava-se \" +\n keyword +\n \" mas encontrou \" +\n from_token.text\n );\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(\n \"Error de sintaxe no comando repeita_para: \" +\n int_or_id.text +\n \" não é compativel com o esperado para o paramentro \" +\n keyword +\n \". O valor deve ser um inteiro ou variável.\"\n );\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(\n this.lexer.literalNames[this.lexerClass.RK_CASE],\n token\n );\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 } 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(\n convertFromString(token.text),\n this.parseTerm()\n );\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 } 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)\n ? this.functionTypes\n : 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
\n \n Terminal\n \n \n
\n
`;\n }\n\n static get INPUT_CARET_TEMPLATE () {\n return `\n
\n \n
\n
`;\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.input.setAttribute(\"autocomplete\", \"off\");\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(3);\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(3);\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 = `${text}`;\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(3);\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, \" \");\n return `${text}`;\n }\n\n getUserInputText (text) {\n if (text.trim().length == 0) {\n text = \" \";\n }\n return `${text}`;\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, \" \");\n t = t.replace(/\\s/g, \" \");\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, \" \");\n t = t.replace(/\\s/g, \" \");\n if (t.length != 0) this.write(t);\n } else {\n // console.debug(\"no newline\");\n output = output.replace(/\\t/g, \" \");\n output = output.replace(/\\s/g, \" \");\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 { parseExpression } from \"./util/parseFromVisual\";\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 parseExpression,\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), i18n_id);\n}\n\nfunction createSemanticError (i18n_id, context = []) {\n return new SemanticError(\n LocalizedStrings.getError(i18n_id, context),\n i18n_id\n );\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 const error = createSemanticError(\"symbol_not_found_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"function_missing_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\n \"array_dimension_not_int_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"unknown_command_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.unknown_command();\n }\n },\n unknown_command: () => {\n return createRuntimeError(\"unknown_command\");\n },\n incompatible_types_full: (\n left_type,\n left_dim,\n right_type,\n right_dim,\n exp,\n source_info\n ) => {\n if (source_info) {\n const context = [\n LocalizedStrings.translateType(left_type, left_dim),\n exp,\n source_info.line,\n LocalizedStrings.translateType(right_type, right_dim),\n ];\n const error = createSemanticError(\"incompatible_types_full\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.incompatible_types(\n left_type,\n left_dim,\n right_type,\n right_dim,\n exp\n );\n }\n },\n incompatible_types: (left_type, left_dim, right_type, right_dim, exp) => {\n const context = [\n LocalizedStrings.translateType(left_type, left_dim),\n exp,\n LocalizedStrings.translateType(right_type, right_dim),\n ];\n return createSemanticError(\"incompatible_types\", context);\n },\n incompatible_types_array_full: (exp, type, dim, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LocalizedStrings.translateType(type, dim),\n sourceInfo.line,\n sourceInfo.column,\n ];\n const error = createSemanticError(\n \"incompatible_types_array_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"loop_condition_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"endless_loop_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"if_condition_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n exp,\n LocalizedStrings.translateType(type, dim),\n sourceInfo.line,\n sourceInfo.column,\n ];\n const error = createSemanticError(\"invalid_case_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"void_in_expression_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_array_access_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_matrix_access_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"matrix_column_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"matrix_line_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"vector_line_outbounds_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\"vector_not_matrix_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n sourceInfo.line,\n id,\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createSemanticError(\"invalid_void_return_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n sourceInfo.line,\n id,\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createSemanticError(\"invalid_return_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\n \"invalid_parameters_size_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_parameters_size(\n id,\n expected,\n actual\n );\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 = [\n exp,\n LanguageDefinedFunction.getLocalName(fun_name),\n sourceInfo.line,\n ];\n const error = createSemanticError(\"invalid_parameter_type_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_ref_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"unexpected_break_command_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"invalid_array_literal_type_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"invalid_array_literal_line_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createRuntimeError(\n \"invalid_array_literal_column_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_array_literal_column(\n expected,\n actual\n );\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 = [\n sourceInfo.line,\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(type, dim),\n ];\n const error = createRuntimeError(\"invalid_unary_op_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_unary_op(opName, type, dim);\n }\n },\n invalid_unary_op: (expString, opName, type, dim) => {\n const context = [\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(type, dim),\n ];\n return createRuntimeError(\"invalid_unary_op\", context);\n },\n invalid_infix_op_full: (\n expString,\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight,\n sourceInfo\n ) => {\n if (sourceInfo) {\n const context = [\n sourceInfo.line,\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(typeLeft, dimLeft),\n LocalizedStrings.translateType(typeRight, dimRight),\n ];\n const error = createRuntimeError(\"invalid_infix_op_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_infix_op(\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight\n );\n }\n },\n invalid_infix_op: (\n expString,\n opName,\n typeLeft,\n dimLeft,\n typeRight,\n dimRight\n ) => {\n const context = [\n expString,\n LocalizedStrings.translateOp(opName),\n LocalizedStrings.translateType(typeLeft, dimLeft),\n LocalizedStrings.translateType(typeRight, dimRight),\n ];\n return createRuntimeError(\"invalid_infix_op\", context);\n },\n array_dimension_not_positive_full: (sourceInfo) => {\n if (sourceInfo) {\n const context = [sourceInfo.line];\n const error = createSemanticError(\n \"array_dimension_not_positive_full\",\n context\n );\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 = [\n source_info.line,\n exp,\n LocalizedStrings.translateType(type, dim),\n name,\n ];\n const error = createRuntimeError(\"invalid_read_type\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_read_type_array: (\n exp,\n typePos,\n dimPos,\n name,\n typeArray,\n dimArray,\n sourceInfo\n ) => {\n const context = [\n sourceInfo.line,\n exp,\n LocalizedStrings.translateType(typePos, dimPos),\n name,\n LocalizedStrings.translateType(typeArray, dimArray),\n ];\n const error = createRuntimeError(\"invalid_read_type_array\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\n },\n invalid_const_ref_full: (fun_name, exp, sourceInfo) => {\n if (sourceInfo) {\n const context = [\n exp,\n LanguageDefinedFunction.getLocalName(fun_name),\n sourceInfo.line,\n ];\n const error = createSemanticError(\"invalid_const_ref_full\", context);\n error.context = { line: sourceInfo.line, column: sourceInfo.column };\n return error;\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 const error = createSemanticError(\"invalid_const_ref\", context);\n return error;\n },\n invalid_const_assignment_full: (var_id, source_info) => {\n if (source_info) {\n const context = [source_info.line, var_id];\n const error = createSemanticError(\n \"invalid_const_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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: (\n left_id,\n left_size,\n right_id,\n right_size,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n left_id,\n left_size,\n right_id,\n right_size,\n ];\n const error = createRuntimeError(\n \"invalid_vector_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_vector_assignment(\n left_id,\n left_size,\n right_id,\n right_size\n );\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: (\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n ];\n const error = createRuntimeError(\n \"invalid_matrix_assignment_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_matrix_assignment(\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column\n );\n }\n },\n invalid_matrix_assignment: (\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column\n ) => {\n const context = [\n left_id,\n left_line,\n left_column,\n right_id,\n right_line,\n right_column,\n ];\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 const error = createSemanticError(\"matrix_to_vector_attr\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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 const error = createSemanticError(\"vector_to_matrix_attr\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_matrix_index_assign_full: (\n mat_id,\n mat_line,\n mat_size,\n exp,\n exp_size,\n source_info\n ) => {\n if (source_info) {\n const context = [\n source_info.line,\n mat_line,\n mat_id,\n mat_size,\n exp,\n exp_size,\n ];\n const error = createRuntimeError(\n \"invalid_matrix_index_assign_full\",\n context\n );\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n } else {\n return ProcessorErrorFactory.invalid_matrix_index_assign(\n mat_id,\n mat_line,\n mat_size,\n exp,\n exp_size\n );\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: (\n expected_num,\n exp,\n actual_num,\n source_info\n ) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n const error = createRuntimeError(\"invalid_number_elements_vector\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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 const error = createRuntimeError(\"invalid_number_lines_matrix\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n divsion_by_zero_full: (exp, source_info) => {\n if (source_info) {\n const context = [source_info.line, exp];\n const error = createRuntimeError(\"divsion_by_zero_full\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\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 const error = createRuntimeError(\"undefined_tanget_value\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n negative_log_value: (source_info) => {\n const error = createRuntimeError(\"negative_log_value\", [source_info.line]);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_string_index: (index, str, source_info) => {\n const local_fun_name = LanguageDefinedFunction.getLocalName(\"$charAt\");\n const context = [\n source_info.line,\n local_fun_name,\n index,\n str,\n str.length - 1,\n ];\n const error = createRuntimeError(\"invalid_string_index\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n negative_sqrt_value: (source_info) => {\n const error = createRuntimeError(\"negative_sqrt_value\", [source_info.line]);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n /**\n * @deprecated 01/10/2019\n */\n exceeded_recursive_calls: (source_info) => {\n const context = [source_info.line];\n const error = createRuntimeError(\"exceeded_recursive_calls\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_variable: (id, source_info) => {\n const context = [source_info.line, id];\n const error = createSemanticError(\"invalid_for_variable\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_from: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_from\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_to: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_to\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n invalid_for_pass: (exp, source_info) => {\n const context = [source_info.line, exp];\n const error = createSemanticError(\"invalid_for_pass\", context);\n error.context = { line: source_info.line, column: source_info.column };\n return error;\n },\n exceed_max_instructions: () => {\n return createRuntimeError(\"exceed_max_instructions\");\n },\n});\n\n","export class RuntimeError extends Error {\n constructor (msg, id) {\n super(msg);\n this.id = id;\n this._context = {};\n if (Error.captureStackTrace) Error.captureStackTrace(this, RuntimeError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\n }\n}\n","export class SemanticError extends Error {\n constructor (msg, id) {\n super(msg);\n this.id = id;\n this._context = {};\n if (Error.captureStackTrace) Error.captureStackTrace(this, SemanticError);\n }\n\n get context () {\n return this._context;\n }\n\n set context (contextObj) {\n this._context = contextObj;\n }\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 = await 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}\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}\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(3);\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}\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}\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}\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}\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}\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}\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}\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}\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}\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}\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}\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}\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}\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}\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(3);\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}\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} 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}\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(\n [],\n [new Commands.SysCall(isRealFun)]\n );\n const func = new Commands.Function(\n \"$isReal\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\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(\n \"$isInt\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\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(\n [],\n [new Commands.SysCall(isBoolFun)]\n );\n const func = new Commands.Function(\n \"$isBool\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\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(\n Types.REAL,\n Parsers.toReal(result.value)\n );\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(\n value,\n typeInfo.type,\n typeInfo.dim\n );\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castRealFun)]\n );\n const func = new Commands.Function(\n \"$castReal\",\n Types.REAL,\n [\n new Commands.FormalParameter(\n new MultiType([Types.INTEGER, Types.STRING]),\n \"val\",\n false\n ),\n ],\n block\n );\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(\n Types.INTEGER,\n Parsers.toInt(Math.floor(value))\n );\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return sto;\n }\n case Types.CHAR.ord: {\n const temp = new StoreValue(\n Types.INTEGER,\n Parsers.toInt(value.charCodeAt(0))\n );\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(\n Types.INTEGER,\n Parsers.toInt(result.value)\n );\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(\n value,\n typeInfo.type,\n typeInfo.dim\n );\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castIntFun)]\n );\n const func = new Commands.Function(\n \"$castInt\",\n Types.INTEGER,\n [\n new Commands.FormalParameter(\n new MultiType([Types.REAL, Types.STRING, Types.CHAR]),\n \"val\",\n false\n ),\n ],\n block\n );\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(\n value,\n typeInfo.type,\n typeInfo.dim\n );\n };\n\n const block = new Commands.CommandBlock(\n [],\n [new Commands.SysCall(castBoolFun)]\n );\n const func = new Commands.Function(\n \"$castBool\",\n Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, \"str\", false)],\n block\n );\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(\n [],\n [new Commands.SysCall(castStringFun)]\n );\n const func = new Commands.Function(\n \"$castString\",\n Types.STRING,\n [new Commands.FormalParameter(Types.ALL, \"str\", false)],\n block\n );\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(\n [],\n [new Commands.SysCall(castCharFun)]\n );\n const func = new Commands.Function(\n \"$castChar\",\n Types.CHAR,\n [new Commands.FormalParameter(Types.INTEGER, \"charCode\", false)],\n block\n );\n return func;\n}\n\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 let type = access_type;\n if (exp_type instanceof MultiType) {\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 (0 === access_type.dimensions - used_dims) {\n type = access_type.innerType; // enable a valid attempt to cast real <--> integer\n }\n if (\n !Config.enable_type_casting ||\n !Store.canImplicitTypeCast(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 = 1000;\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 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 const output = \"\" + text;\n if (output.indexOf(\"\\n\") !== -1) {\n const outputList = output.split(\"\\n\");\n const last = outputList.pop();\n outputList.forEach((t) => {\n //t = t.replace(/\\t/g, ' ');\n //t = t.replace(/\\s/g, \" \");\n if (t.length == 0) this.currentLine = null;\n else this.write(t, true);\n });\n //last = last.replace(/\\t/g, ' ');\n //last = last.replace(/\\s/g, \" \");\n if (last.length != 0) this.write(last);\n } else {\n //output = output.replace(/\\t/g, ' ');\n //output = output.replace(/\\s/g, \" \");\n this.write(output);\n }\n }\n}\n","import { IVProgParser } from \"../ast/ivprogParser\";\nimport * as Expressions from \"../ast/expressions\";\nimport { Types } from \"../typeSystem/types\";\nimport { convertBoolToString } from \"../typeSystem/parsers\";\n\nconst TYPES = {\n VARIABLE: \"var\",\n CONST: \"const\",\n FUNCTION: \"function\",\n RELATIONAL: \"relational\",\n LOGIC: \"logic\",\n ARITHMETIC: \"arithmetic\",\n};\n\nfunction translateOp (type, op) {\n switch (type) {\n case TYPES.ARITHMETIC:\n return op.value;\n case TYPES.RELATIONAL:\n return op.value;\n case TYPES.LOGIC: {\n if (op.ord === 11) {\n return \"and\";\n } else if (op.ord === 12) {\n return \"or\";\n } else {\n return \"not\";\n }\n }\n }\n}\n\nfunction getOpType (op) {\n switch (op.ord) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n return TYPES.ARITHMETIC;\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n return TYPES.RELATIONAL;\n default:\n return TYPES.LOGIC;\n }\n}\n\nfunction expressionWalker (expression) {\n let result;\n if (expression instanceof Expressions.VariableLiteral) {\n result = [\n { instance: \"expression\", type: TYPES.VARIABLE, value: expression.id },\n ];\n } else if (expression instanceof Expressions.FunctionCall) {\n const funcObj = {\n instance: \"expression\",\n type: TYPES.FUNCTION,\n value: expression.id,\n };\n const paramsList = expression.actualParameters.map((e) =>\n expressionWalker(e)\n );\n //const params = Array.prototype.concat.apply([], paramsList);\n funcObj.params = paramsList;\n result = [funcObj];\n } else if (expression instanceof Expressions.UnaryApp) {\n const left = expressionWalker(expression.left);\n const opType = getOpType(expression.op);\n const opValue = translateOp(opType, expression.op);\n result = [{ instance: \"operator\", type: opType, value: opValue }, ...left];\n } else if (expression instanceof Expressions.InfixApp) {\n const left = expressionWalker(expression.left);\n const right = expressionWalker(expression.right);\n const opType = getOpType(expression.op);\n const opValue = translateOp(opType, expression.op);\n result = [\n ...left,\n { instance: \"operator\", type: opType, value: opValue },\n ...right,\n ];\n } else if (expression instanceof Expressions.ArrayAccess) {\n const line = expressionWalker(expression.line);\n let arrayClass = \"vector\";\n let column = null;\n if (expression.column) {\n arrayClass = \"matrix\";\n column = expressionWalker(expression.column);\n }\n result = [\n {\n instance: \"expression\",\n type: TYPES.VARIABLE,\n class: arrayClass,\n column: column,\n line: line,\n value: expression.id,\n },\n ];\n } else if (expression instanceof Expressions.BoolLiteral) {\n const value = expression.value;\n result = [\n {\n instance: \"expression\",\n class: \"simple\",\n type: TYPES.CONST,\n value: convertBoolToString(value),\n },\n ];\n } else {\n let value = expression.value;\n if (expression.value.toNumber) {\n if (\n Types.REAL.isCompatible(expression.type) &&\n expression.value.decimalPlaces() == 0\n ) {\n value = expression.value.toFixed(2);\n } else {\n value = expression.value.toNumber();\n }\n }\n result = [\n {\n instance: \"expression\",\n class: \"simple\",\n type: TYPES.CONST,\n value: value,\n },\n ];\n }\n if (expression.parenthesis) return [\"(\", ...result, \")\"];\n else return result;\n}\n\nexport function parseExpression (text) {\n const parser = IVProgParser.createParser(text);\n const expressionAST = parser.parseExpressionOR();\n return expressionWalker(expressionAST);\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.} 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.} 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: ABAC -> ABAC\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, ' ');\n t = t.replace(/\\s/g, \" \");\n if (t.length == 0)\n this.currentLine = null;\n else\n this.write(t, true);\n });\n last = last.replace(/\\t/g, ' ');\n last = last.replace(/\\s/g, \" \");\n if (last.length != 0)\n this.write(last);\n } else {\n output = output.replace(/\\t/g, ' ');\n output = output.replace(/\\s/g, \" \");\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\t\t} \n\t\n\t$('.command_drag').popup({\n content : LocalizedStrings.getUI(\"text_move_command\"),\n delay: {\n show: 1000,\n hide: 0\n }\n });\n\t\t\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( ' ' );\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\nexport function repeatNtimesHeader (command_obj) {\n let ret = \"\";\n if (command_obj.var_attribution) {\n ret += '';\n ret += variableValueMenuCode(command_obj.var_attribution);\n ret += '';\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_from\")} `;\n ret += '';\n ret += variableValueMenuCode(command_obj.expression1);\n ret += '';\n }\n\n if (command_obj.expression2) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_to\")} `;\n ret += '';\n ret += variableValueMenuCode(command_obj.expression2);\n ret += '';\n }\n\n if (command_obj.expression3) {\n ret += ` ${LocalizedStrings.getUI(\"text_code_for_pass\")} `;\n ret += '';\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 ret += '';\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 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\nexport function 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\nexport function 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 variable_obj.reference_dimensions == 1\n ) {\n ret += \" [ \" + variableValueMenuCode(variable_obj.row) + \" ] \";\n } else 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 if (parameter_obj.reference)\n ret += \"&\";\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\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\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 = $('
');\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\t//console.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\t//console.log('é o mesmo command list');\n\t\t\t\t} else {\n\t\t\t\t\t//console.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\t//console.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\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\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\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 = $('');\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\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\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\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\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\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\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\t\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\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\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\tfindBeforeOrAfterCommandToAdd(el[0], event, function_obj, command_type);\n\t\t\t}\n\t\t} else {\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\tinsertCommandInBlockHierar(el[0], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t} else {\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\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\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}\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\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\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\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\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\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('switchcase') !== 'undefined') {\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\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\tif (is_in_else) {\n\n\t\t\tif (command_parent == command_target) {\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\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\tif (command_parent == command_target) {\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\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\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\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\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\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\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\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\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\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\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\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\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\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\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\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\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\n\t\t} else {\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\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';\nimport * as CodeGenerator from '../code_generator';\nimport { renderAlgorithm } from '../algorithm';\n\nexport function createFloatingCommand () {\n\treturn $('
x <— 1 + 1
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+LocalizedStrings.getUI('text_receives')+' '\n\t\t + '
');\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\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.expression_elements')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\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 = $('
');\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 = '
';\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 += '
';\n\tcontext_menu += '
+
';\n\tcontext_menu += '
-
';\n\tcontext_menu += '
*
';\n\tcontext_menu += '
/
';\n\tcontext_menu += '
%
';\n\tcontext_menu += '
Nenhum
';\n\tcontext_menu += '
';\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\t\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 = '
';\n\tcontext_menu += '
EXP OP EXP
';\n\tcontext_menu += '
OP EXP
';\n\tcontext_menu += '
( EXP )
';\n\tcontext_menu += '
';\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 = $('
');\n\t\t\tvar temp_exp_1 = $('
');\n\t\t\tvar temp_exp_2 = $('
');\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 = $('
');\n\t\t\tvar temp_exp = $('
');\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 = $('
(
');\n\t\t\tvar temp_exp = $('
');\n\t\t\tvar temp_par_2 = $('
)
');\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 = $('
');\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 = $('
');\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 = $('
'+command.expression[i]+'
');\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 = '
';\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 += '
';\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 = $('
');\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 = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_value')+'
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_operator')+'
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_parentheses')+'
';\n\t\tcontext_menu += '
';\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_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(attribution_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = attribution_dom.find('.expression_elements');\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = attribution_dom.find('.textual_expression');\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('');\n\t\tvar cancel_button = $('');\n\t\tvar input = $('');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tconsole.log('focosout event!');\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = ExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = ExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t$(attribution_dom.find('.textual_expression')[0]).toggle();\n\t\n\tattribution_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(attribution_dom.find('.expression_elements')[0]).toggle();\n\t\t\t\t$(attribution_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(attribution_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t\tif (command.lockexpression) {\n\t\t\t\tattribution_dom.find('.lock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tattribution_dom.find('.unlock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\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 = '
';\n\n\tfor (var tm in Models.ARITHMETIC_TYPES) {\n\n\t\tmenu_operations += '
'+LocalizedStrings.getUI('btn_arithmetic_' + tm)+'
';\n }\n menu_operations += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\t\n menu_operations += '
';\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$(' ( ').insertBefore(dom_object);\n\t$(' ) ').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 $('
'+LocalizedStrings.getUI('text_break')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+LocalizedStrings.getUI('text_break')+'
');\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 $('
'+LocalizedStrings.getUI('text_comment')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+'
');\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 = $('
');\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 = $('
');\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 = $('
');\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 = $('
');\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 = $(' ');\n\tvar exp_el_expr_el_1 = $('
');\n\tvar exp_el_expr_operand = $('
');\n\tvar exp_el_expr_el_2 = $('
');\n\tvar exp_el_par_2 = $(' ');\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 = $(' ');\n\tvar exp_el_expr_el_1 = $('
');\n\tvar exp_el_expr_operand = $('
');\n\tvar exp_el_expr_el_2 = $('
');\n\tvar exp_el_par_2 = $(' ');\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 += '
'+LocalizedStrings.getUI('expression_menu_select')+'
';\n\tstart_menu += '
'+LocalizedStrings.getUI('text_logic_expression')+' (EL == EL and EL)
';\n\tstart_menu += '
'+LocalizedStrings.getUI('text_arithmetic_expression')+' (EA < EA)
';\n\tstart_menu += '
';\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(' ');\n\t\n\tinitial_el_to_render.append(start_menu);\n\n\tinitial_el_to_render.append(' ');\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 = '
';\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 += ' '+LocalizedStrings.getUI('btn_break')+' ';\n\n\t} else {\n\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_break')+' ';\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_case')+' ';\n\n\t}\n\n\tmenu_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('.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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('
'+ LocalizedStrings.getUI('text_command_do') +'
' + LocalizedStrings.getUI('text_command_do_until') +'(x < 10)
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
' + LocalizedStrings.getUI('text_command_do') + ' ';\n\tret += '
';\n\tret += '
';\n\tret += ' ' + LocalizedStrings.getUI('text_command_do_until') + ' (
) ';\n\tret += '
';\n\tret += '
';\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\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[el.find('.conditional_expression').length - 1]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[el.find('.textual_expression').length - 1]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[el.find('.textual_expression').length - 1]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[el.find('.button_alternate_expression').length - 1]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\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_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(dowhiletrue_dom.find('.button_write_expression')[dowhiletrue_dom.find('.button_write_expression').length - 1]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(dowhiletrue_dom.find('.conditional_expression')[dowhiletrue_dom.find('.conditional_expression').length - 1]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('');\n\t\tvar cancel_button = $('');\n\t\tvar input = $('');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\tdowhiletrue_dom.find('.minimize_block_button').on('click', function(evt){\n\t\tdowhiletrue_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(dowhiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\tdowhiletrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(dowhiletrue_dom.find('.conditional_expression')[dowhiletrue_dom.find('.conditional_expression').length - 1]).toggle();\n\t\t\t\t$(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]).text(text);\n\t\t\t\t$(dowhiletrue_dom.find('.textual_expression')[dowhiletrue_dom.find('.textual_expression').length - 1]).toggle();\n\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\tdowhiletrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tdowhiletrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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 $('
funcao()
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
');\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\";\nimport * as Utils from '../utils';\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 = $('
');\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 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 '
'\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 } else if (expression_array[i - 1] == \"(\") {\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 '
'\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 = $('
(
');\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 = $('
)
');\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 = $('
(
');\nwindow.close_parentheses = $('
)
');\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 '
' +\n expression_content +\n \"
\"\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 '
+
';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '
';\n menu_final += getArithmeticOperators();\n menu_final += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '
';\n menu_final += getLogicOperators();\n menu_final += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '
';\n menu_final += getRelationalOperators();\n menu_final += \"
\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"
\";\n\n menu_final = $(menu_final);\n const div_temp = $(\n '
'\n );\n div_temp.append(menu_final);\n const div_higher = $('
');\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 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 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 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 '
+
';\n if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n if (types_included.length > 1) {\n menu_final +=\n '
' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '
';\n menu_final += getArithmeticOperators();\n menu_final += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '
';\n menu_final += getLogicOperators();\n menu_final += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '
';\n menu_final += getRelationalOperators();\n menu_final += \"
\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"
\";\n\n menu_final = $(menu_final);\n const div_temp = $('
');\n const div_higher = $('
');\n\n const button = $(\n ''\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 '
+
';\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 '
' +\n LocalizedStrings.getUI(\"text_arithmetic_expression\") +\n '
';\n menu_final += getArithmeticOperators();\n menu_final += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"text_logic_expression\") +\n '
';\n menu_final += getLogicOperators();\n menu_final += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"text_relational_expression\") +\n '
';\n menu_final += getRelationalOperators();\n menu_final += \"
\";\n } else {\n menu_final += getRelationalOperators();\n }\n }\n menu_final += \"
\";\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 '
'\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 '
+
';\n arithmetic_operators +=\n '
-
';\n arithmetic_operators +=\n '
*
';\n arithmetic_operators +=\n '
/
';\n arithmetic_operators +=\n '
%
';\n return arithmetic_operators;\n}\n\nfunction getLogicOperators () {\n let logic_operators;\n logic_operators =\n '
==
';\n logic_operators +=\n '
!=
';\n logic_operators +=\n '
' +\n LocalizedStrings.getUI(\"logic_operator_and\") +\n \"
\";\n logic_operators +=\n '
' +\n LocalizedStrings.getUI(\"logic_operator_or\") +\n \"
\";\n logic_operators +=\n '
' +\n LocalizedStrings.getUI(\"logic_operator_not\") +\n \"
\";\n return logic_operators;\n}\n\nfunction getRelationalOperators () {\n let relational_operators;\n relational_operators =\n '
>
';\n relational_operators +=\n '
<
';\n relational_operators +=\n '
==
';\n relational_operators +=\n '
!=
';\n relational_operators +=\n '
>=
';\n relational_operators +=\n '
<=
';\n return relational_operators;\n}\n\nfunction getSeparator () {\n return `
${LocalizedStrings.getUI(\n \"write_seprator_menu_text\"\n )}
`;\n}\n\nfunction getVariable (function_obj, search) {\n if (search == \")\" || search == \"(\") {\n return search;\n }\n\n if (search.instance == \"operator\") {\n var obj;\n switch (search.value) {\n case '+':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.plus); \n break;\n case '-':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.minus); \n break;\n case '*':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.multiplication); \n break;\n case '/':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.division); \n break;\n case '%':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_arithmetic, \n Models.ARITHMETIC_TYPES.module); \n break;\n case '>':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.greater_than); \n break;\n case '<':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.less_than); \n break;\n case '>=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to); \n break;\n case '<=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.less_than_or_equals_to); \n break;\n case '==':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.equals_to); \n break;\n case '!=':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_conditional, \n Models.ARITHMETIC_COMPARISON.not_equals_to); \n break;\n case 'and':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.and); \n break;\n case 'or':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.or); \n break;\n case 'not':\n obj = new Models.ExpressionOperator(\n Models.EXPRESSION_TYPES.exp_logic, \n Models.LOGIC_COMPARISON.not); \n break;\n }\n return obj;\n }\n\n if (search.instance == \"expression\" \n && search.type == \"const\") {\n if (search.value === true) {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n LocalizedStrings.getUI('logic_value_true'),\n null,\n null,\n true\n );\n return obj;\n }\n if (search.value === false) {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n LocalizedStrings.getUI('logic_value_false'),\n null,\n null,\n true\n );\n return obj;\n }\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n search.value,\n null,\n null,\n true\n );\n return obj;\n }\n\n var variavel = null;\n if (search.instance == \"expression\"\n && search.type == \"var\") {\n // 1. Procurar a variável na função:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n if (function_obj.variables_list[j].name == search.value) {\n variavel = function_obj.variables_list[j];\n break;\n }\n }\n\n // 2. Procurar a variável nas gloais: \n if (!variavel)\n for (var j = 0; j < program_obj.globals.length; j++) {\n if (program_obj.globals[j].name == search.value) {\n variavel = program_obj.globals[j];\n break;\n }\n }\n \n // 3. Procurar na lista de parâmetros: \n if (!variavel)\n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n if (function_obj.parameters_list[j].name == search.value) {\n variavel = function_obj.parameters_list[j];\n break;\n }\n }\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && !search.line) {\n\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n null,\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && search.class == \"vector\") {\n \n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n getVariable(function_obj, search.line[0]),\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"var\"\n && search.class == \"matrix\") {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n getVariable(function_obj, search.line[0]),\n getVariable(function_obj, search.column[0]),\n true\n );\n return obj;\n }\n\n if (search.instance == \"expression\"\n && search.type == \"function\") {\n var obj = new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n variavel,\n null,\n null,\n true\n );\n // Procurar a função para referência:\n for (var i = 0; i < program_obj.functions.length; i++) {\n if (program_obj.functions[i].name == search.value) {\n obj.function_called = program_obj.functions[i];\n }\n }\n\n // Se ainda não foi encontrada, procurar na biblioteca do iVProg:\n if (!obj.function_called) {\n for (var i = 0; i < window.system_functions.length; i++) {\n if (search.value.split(\".\")[1] && search.value.split(\".\")[1] \n == window.system_functions[i].identifier) {\n obj.function_called = window.system_functions[i];\n } else if (search.value == window.system_functions[i].identifier) {\n obj.function_called = window.system_functions[i];\n }\n }\n }\n\n obj.parameters_list = [];\n\n for (var i = 0; i < search.params.length; i++) {\n obj.parameters_list.push(getVariable(function_obj,search.params[i][0]));\n }\n return obj;\n }\n}\n\nexport function expressionParserToVisual (text, function_obj, input_field) {\n\n if (text.trim().length == 0) {\n return [new Models.VariableValueMenu(\n VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n )];\n }\n\n var var_not_found = [];\n var fun_not_found = [];\n var parsed;\n try {\n parsed = ivprogCore.parseExpression(text);\n } catch (ex) {\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_invalid'));\n }\n if (!parsed) return null;\n\n for (var i = 0; i < parsed.length; i++) {\n var variavel = null;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"var\") {\n // 1. Procurar a variável na função:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n if (function_obj.variables_list[j].name == parsed[i].value) {\n variavel = function_obj.variables_list[j];\n break;\n }\n }\n\n // 2. Procurar a variável nas globais: \n if (!variavel)\n for (var j = 0; j < program_obj.globals.length; j++) {\n if (program_obj.globals[j].name == parsed[i].value) {\n variavel = program_obj.globals[j];\n break;\n }\n }\n\n // 3. Procurar a variável nos parâmetros:\n if (!variavel)\n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n if (function_obj.parameters_list[j].name == parsed[i].value) {\n variavel = function_obj.parameters_list[j];\n break;\n }\n }\n \n if (!variavel)\n var_not_found.push(parsed[i].value);\n }\n\n var funcao;\n if (parsed[i].instance == \"expression\"\n && parsed[i].type == \"function\") {\n \n // Procurar a função para referência:\n for (var j = 0; j < program_obj.functions.length; j++) {\n if (program_obj.functions[j].name == parsed[i].value) {\n funcao = program_obj.functions[j];\n }\n }\n\n // Se ainda não encontrou, procurar na biblioteca do iVProg:\n if (!funcao) {\n for (var j = 0; j < window.system_functions.length; j++) {\n if (parsed[i].value.split(\".\")[1] && parsed[i].value.split(\".\")[1] \n == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n } else if (parsed[i].value == window.system_functions[j].identifier) {\n funcao = window.system_functions[j];\n }\n }\n }\n\n if (!funcao) {\n fun_not_found.push(parsed[i].value);\n }\n }\n}\n\n if (fun_not_found.length > 0) {\n let uniqueWords = [...new Set(fun_not_found)];\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_undeclared_function') + \" \" + uniqueWords.join(\", \"));\n return null;\n }\n\n if (var_not_found.length > 0) {\n let uniqueWords = [...new Set(var_not_found)];\n Utils.renderErrorMessage(input_field, LocalizedStrings.getUI('expression_undelcared_variable') + \" \" + uniqueWords.join(\", \"));\n return null;\n }\n\n var exp_obj = [];\n for (var i = 0; i < parsed.length; i++) {\n exp_obj.push(getVariable(function_obj, parsed[i]));\n }\n\n \n\n return exp_obj;\n}","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('
if (x < 1) { }
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
';\n\tret += ' ' + LocalizedStrings.getUI('text_if') + '';\n\tret += ' (
) ';\n\tret += ' ';\n\tret += '';\n\tret += ' ';\n\tret += '
';\n \tret += '
';\n\tret += '
' + LocalizedStrings.getUI('text_else') + ' ';\n\tret += '
';\n\tret += '
';\n\tret += '
';\n\tret += '
';\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\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\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, iftrue_dom) {\n\n\tiftrue_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(iftrue_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(iftrue_dom.find('.conditional_expression')[0]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(iftrue_dom.find('.textual_expression')[0]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('');\n\t\tvar cancel_button = $('');\n\t\tvar input = $('');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t$(iftrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\tiftrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(iftrue_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(iftrue_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(iftrue_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\tiftrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tiftrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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 $('
'+LocalizedStrings.getUI('text_command_read')+' var
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = '
'+LocalizedStrings.getUI('text_command_read')+' (
)
';\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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('
repita_para i de 0 ate 10 passo 1
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tlet ret = `
\n\t\t\n\t\t\n\t\t\n\t\t ${LocalizedStrings.getUI('text_for')}\n\t\t
\n\t\t
\n\t\t\n\t\t
\n\t\t
\n\t\t\n\t\t${LocalizedStrings.getUI(\"text_for_to\")} \n\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t\t \n\t\t
`;\n\tret += '
';\n\tret += '
';\n\tret += ' ';\n\tret += '
';\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('');\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('');\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\tif (command.lockexpression) {\n\t\ttry {\n\t\t\tvar text = CodeGenerator.repeatNtimesHeader(command);\n\t\t\tif (text) {\n\t\t\t\t$(el.find('.textual_expression')[0]).html(text);\n\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\n\t\t\t\t$(el.find('.attribution_expression')[0]).toggle();\n\t\t\t\t$(el.find('.span_command_spec.separator_character')[0]).toggle();\n\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(el.find('.pass_button')[0]).toggle();\n\t\t\t\t$(el.find('.incrementation_field')[0]).toggle();\n\n\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tcommand.lockexpression = false;\n\t\t}\n\t}\n\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\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('.minimize_block_button').on('click', function(evt){\n\t\trepeatNtimes_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(repeatNtimes_dom.find('.textual_expression')[0]).toggle();\n\t\n\trepeatNtimes_dom.find('.button_alternate_expression').on('click', function() {\n\t\tvar text = CodeGenerator.repeatNtimesHeader(command);\n\t\tif (text) {\n\t\t\t$(repeatNtimes_dom.find('.textual_expression')[0]).html(text);\n\t\t\t$(repeatNtimes_dom.find('.textual_expression')[0]).toggle();\n\n\t\t\t$(repeatNtimes_dom.find('.attribution_expression')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.span_command_spec.separator_character')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.pass_button')[0]).toggle();\n\t\t\t$(repeatNtimes_dom.find('.incrementation_field')[0]).toggle();\n\n\t\t\t$(repeatNtimes_dom.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\n\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\trepeatNtimes_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\trepeatNtimes_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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 = $('
');\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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_return')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+LocalizedStrings.getUI('text_return')+'
');\n\tel.data('command', command);\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\tel.append($(''));\n\n\t\tif (command.lockexpression) {\n\t\t\tif (command.variable_value_menu) {\n\t\t\t\ttry {\n\t\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.variable_value_menu);\n\t\t\t\t\tif (text) {\n\t\t\t\t\t\t$(el.find('.expression_elements')[0]).toggle();\n\t\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcommand.lockexpression = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tel.find('.expression_elements').remove();\n\t\tcommand.variable_value_menu = null;\n\t}\n\t\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, return_dom) {\n\n\treturn_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.variable_value_menu) {\n var text = CodeGenerator.elementExpressionCode(command.variable_value_menu);\n\t\t\tif (text) {\n\t\t\t\t$(return_dom.find('.expression_elements')[0]).toggle();\n\t\t\t\t$(return_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(return_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\t});\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 $('
'+LocalizedStrings.getUI('text_code_switch')+' ( x ) {
'+LocalizedStrings.getUI('text_code_case')+' 1:
'+LocalizedStrings.getUI('text_code_case')+' 2:
}
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
'+LocalizedStrings.getUI('text_code_switch')+' (
)
';\n\tret += '
';\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 = $('
'+LocalizedStrings.getUI('text_code_case')+'
:
');\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\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 // Verificar agora, quando trata-se de chamada de função, se a passagem de parâmetro é\n // por referência ou por cópia:\n var index_references = [];\n if (ref_object.function_called) {\n if (ref_object.function_called.parameters_list) {\n for (var i = 0; i < ref_object.function_called.parameters_list.length; i++) {\n if (ref_object.function_called.parameters_list[i].reference) {\n index_references.push(i)\n ref_object.parameters_list[i].reference = true\n ref_object.parameters_list[i].variable_and_value = VAR_OR_VALUE_TYPES.only_variable;\n if (ref_object.parameters_list[i].column)\n ref_object.parameters_list[i].column.reference_parent = true\n if (ref_object.parameters_list[i].row)\n ref_object.parameters_list[i].row.reference_parent = true\n }\n else {\n ref_object.parameters_list[i].reference = false;\n ref_object.parameters_list[i].variable_and_value = VAR_OR_VALUE_TYPES.all;\n if (ref_object.parameters_list[i].column)\n ref_object.parameters_list[i].column.reference_parent = false\n if (ref_object.parameters_list[i].row)\n ref_object.parameters_list[i].row.reference_parent = false\n }\n\n ref_object.parameters_list[i].reference_dimensions = ref_object.function_called.parameters_list[i].dimensions\n } \n }\n }\n\n let menu_var_or_value =\n '
';\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_variable) {\n menu_var_or_value =\n '
';\n menu_var_or_value += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"variable\");\n menu_var_or_value += '
';\n menu_var_or_value += \"
\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_value) {\n menu_var_or_value =\n '';\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 '
' +\n LocalizedStrings.getUI(\"text_value\") +\n \"
\";\n }\n\n if (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_function) {\n menu_var_or_value =\n '
';\n menu_var_or_value += \"
\";\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 '
' +\n LocalizedStrings.getUI(\"btn_function\");\n menu_var_or_value += '
';\n menu_var_or_value += \"
\";\n\n /* if (command.type == Models.COMMAND_TYPES.attribution) {\n menu_var_or_value += '
' + LocalizedStrings.getUI('text_change');\n menu_var_or_value += '
';\n menu_var_or_value += '
EXP OP EXP
';\n menu_var_or_value += '
OP EXP
';\n menu_var_or_value += '
( EXP )
';\n menu_var_or_value += '
';\n }*/\n }\n\n menu_var_or_value += \"
\";\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 // if (ref_object.reference_parent) {\n // menu_var_or_value\n // .find(\".text\")\n // .append(\"Opcional\");\n // return;\n // }\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(\"\" + LocalizedStrings.getUI(\"var_menu_select_var\") + \"\");\n break;\n case VAR_OR_VALUE_TYPES.all:\n menu_var_or_value\n .find(\".text\")\n .append(\"\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"\");\n break;\n case VAR_OR_VALUE_TYPES.variable_and_function:\n menu_var_or_value\n .find(\".text\")\n .append(\"\" + LocalizedStrings.getUI(\"var_menu_select_all\") + \"\");\n break;\n case VAR_OR_VALUE_TYPES.only_function:\n menu_var_or_value\n .find(\".text\")\n .append(\n \"\" + LocalizedStrings.getUI(\"var_menu_select_function\") + \"\"\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 '
' +\n variable_obj.function_called.name +\n \" ( \";\n } else {\n parameters_menu =\n '
' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \" ( \";\n }\n\n parameters_menu += \" )
\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 '
' +\n variable_obj.function_called.name +\n \" ( \";\n } else {\n parameters_menu =\n '
' +\n LocalizedStrings.translateInternalFunction(\n variable_obj.function_called.identifier,\n variable_obj.function_called.category\n ) +\n \" ( \";\n }\n\n for (\n let j = 0;\n j < variable_obj.function_called.parameters_list.length;\n j++\n ) {\n parameters_menu +=\n '
';\n if (j + 1 != variable_obj.function_called.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \" )
\";\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 '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 '
' +\n variable_obj.content.name +\n \"\";\n\n if (variable_obj.reference_dimensions >= 1)\n variable_render += '';\n else\n variable_render +=\n ' [
]';\n\n variable_render += \"
\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n if (variable_obj.reference)\n temp.reference_parent = true\n variable_obj.column = temp;\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 '
' +\n variable_obj.content.name +\n \"\";\n \n variable_render +=\n ' [
]';\n\n if (variable_obj.reference_dimensions == 0)\n variable_render +=\n ' [
] ';\n\n variable_render += \"
\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (variable_obj.reference)\n temp.reference_parent = true\n\n variable_obj.column = temp\n }\n if (!variable_obj.row) {\n var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (variable_obj.reference)\n temp.reference_parent = true\n\n variable_obj.row = temp\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\n if (variable_obj.reference_dimensions == 1) {\n variable_obj.column = null\n } else {\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 }\n } else {\n variable_render =\n '
' +\n variable_obj.content.name +\n \"\";\n\n variable_render += \"
\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n let context_menu =\n '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\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 += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 '
';\n\n if (isNaN(variable_obj.content)) {\n variable_render += variable_obj.content.split(\" \").join(\" \");\n } else {\n variable_render += variable_obj.content;\n }\n\n variable_render += \"\";\n variable_render += \"
\";\n\n variable_render = $(variable_render);\n\n dom_object.append(variable_render);\n\n var context_menu =\n '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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(' ');\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 '
' +\n LocalizedStrings.getUI(\"text_header_ivprog_functions\") +\n \"
\"\n );\n sub_menu.append(\n '
' +\n LocalizedStrings.getUI(\"text_menu_functions_math\") +\n '
'\n );\n sub_menu.append(\n '
' +\n LocalizedStrings.getUI(\"text_menu_functions_text\") +\n '
'\n );\n sub_menu.append(\n '
' +\n LocalizedStrings.getUI(\"text_menu_functions_array\") +\n '
'\n );\n sub_menu.append(\n '
' +\n LocalizedStrings.getUI(\"text_menu_functions_conversion\") +\n '
'\n );\n\n // Insert Math functions:\n for (let i = 0; i < window.system_functions.length; i++) {\n const t = $('
');\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 '
' +\n window.program_obj.functions[i].name +\n \"
\"\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 '
' +\n window.program_obj.globals[i].name +\n \"
\"\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 '
' +\n window.program_obj.globals[i].name +\n \"
\"\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 '
' +\n function_obj.parameters_list[i].name +\n \"
\"\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 '
' +\n function_obj.variables_list[i].name +\n \"
\"\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 '
' +\n LocalizedStrings.getUI(\"text_no_variable\") +\n \"
\"\n )\n );\n sub_menu.append(\n $(\n '
' +\n LocalizedStrings.getUI(\"text_no_variable_instruction\") +\n \"
\"\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 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(' ');\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 '
' +\n function_selected.name +\n \" ( \";\n } else {\n parameters_menu =\n '
' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \" ( \";\n }\n for (var j = 0; j < function_selected.parameters_list.length; j++) {\n parameters_menu +=\n '
';\n if (j + 1 != function_selected.parameters_list.length) {\n parameters_menu += \" , \";\n }\n }\n parameters_menu += \" )
\";\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\n if (function_selected.parameters_list[j].reference == true) {\n temp.reference = true;\n temp.variable_and_value = VAR_OR_VALUE_TYPES.only_variable;\n } else {\n temp.reference = false;\n temp.variable_and_value = VAR_OR_VALUE_TYPES.all;\n }\n temp.reference_dimensions = function_selected.parameters_list[j].dimensions\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 '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 '
' +\n function_selected.name +\n \" ( \";\n } else {\n parameters_menu =\n '
' +\n LocalizedStrings.translateInternalFunction(\n function_selected.identifier,\n function_selected.category\n ) +\n \" ( \";\n }\n\n parameters_menu += \" )
\";\n\n parameters_menu = $(parameters_menu);\n\n dom_object.append(parameters_menu);\n\n var context_menu =\n '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 '
' +\n variable_selected.name +\n \"\";\n\n if (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n \n variable_render +=\n ' [
]';\n }\n if (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n variable_render +=\n ' [
] ';\n \n variable_render +=\n ' [
]';\n \n }\n\n variable_render += \"
\";\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 var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n if (ref_object.reference)\n temp.reference_parent = true\n\n ref_object.column = temp\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 var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (ref_object.reference)\n temp.reference_parent = true\n\n ref_object.row = temp\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 var temp = new Models.VariableValueMenu(\n VAR_OR_VALUE_TYPES.all,\n null,\n null,\n null,\n true\n );\n\n if (ref_object.reference)\n temp.reference_parent = true\n\n ref_object.column = temp\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 '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\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 += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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 if ($selectedItem.data(\"clear\")) {\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 ''\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 = $('
');\n rendered.insertBefore(field);\n\n field.focus();\n field.val(ref_object.content);\n\n let context_menu =\n '
';\n context_menu +=\n '
' +\n LocalizedStrings.getUI(\"btn_clear\") +\n \"
\";\n\n /*if (command.type == Models.COMMAND_TYPES.attribution) {\n context_menu += '
' + LocalizedStrings.getUI('text_change');\n context_menu += '
';\n context_menu += '
EXP OP EXP
';\n context_menu += '
OP EXP
';\n context_menu += '
( EXP )
';\n context_menu += '
';\n }*/\n\n context_menu += \"
\";\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.split(\" \").join(\" \"));\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.split(\" \").join(\" \"));\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.split(\" \").join(\" \"));\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(' ');\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 rendered.empty();\n rendered.remove();\n dom_object.empty();\n dom_object.append(' ');\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 = $(\"\")\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';\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n\treturn $('
' + LocalizedStrings.getUI('text_command_while') + ' ( x < 10 )
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
' + LocalizedStrings.getUI('text_command_while') + ' ';\n\tret += ' (
) ';\n\tret += ' ';\n\tret += '
';\n\tret += '
';\n\tret += '
';\n\tret += ' ';\n\tret += '
';\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\tif (command.lockexpression) {\n\t\tif (command.expression) {\n\t\t\ttry {\n\t\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\tif (text) {\n\t\t\t\t\t$(el.find('.conditional_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.textual_expression')[0]).text(text);\n\t\t\t\t\t$(el.find('.textual_expression')[0]).toggle();\n\t\t\t\t\t$(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tcommand.lockexpression = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tel.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, whiletrue_dom) {\n\n\twhiletrue_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(whiletrue_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = $(whiletrue_dom.find('.conditional_expression')[0]);\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = $(whiletrue_dom.find('.textual_expression')[0]);\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.expression) {\n\t\t\tif (command.expression.length == 1 && command.expression[0].content == null && !command.expression[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('');\n\t\tvar cancel_button = $('');\n\t\tvar input = $('');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tconsole.log('focosout event!');\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.expression = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\twhiletrue_dom.find('.minimize_block_button').on('click', function(evt){\n\t\twhiletrue_dom.children('.ui.block_commands').toggle();\n\t\tcommand.collapsed = !command.collapsed;\n\t});\n\n\t$(whiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\n\twhiletrue_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.expression) {\n\t\t\tvar text = CodeGenerator.elementExpressionCode(command.expression);\n\t\t\tif (text) {\n\t\t\t\t$(whiletrue_dom.find('.conditional_expression')[0]).toggle();\n\t\t\t\t$(whiletrue_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(whiletrue_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n\t\t\t}\n\t\t}\n\n\t\tif (command.lockexpression) {\n\t\t\twhiletrue_dom.find('.lock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\twhiletrue_dom.find('.unlock').popup({\n\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\tdelay: {\n\t\t\t\t\tshow: 750,\n\t\t\t\t\thide: 0\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\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\";\nimport * as CodeGenerator from '../code_generator';\n\nexport function createFloatingCommand () {\n return $(\n '
' +\n LocalizedStrings.getUI(\"text_command_write\") +\n \" var
\"\n );\n}\n\nexport function renderCommand (command, function_obj) {\n const ret = `
\n \n \n ${LocalizedStrings.getUI(\n \"text_command_write\"\n )}\n (
\n )\n \n \n \n
`;\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 \n addHandlers(command, function_obj, el);\n\n if (command.content && command.lockexpression) {\n try {\n var text = CodeGenerator.elementExpressionCode(command.content);\n if (text) {\n $(el.find('.all_elements_write')[0]).toggle();\n $(el.find('.textual_expression')[0]).text(text);\n $(el.find('.textual_expression')[0]).toggle();\n $(el.find('.button_alternate_expression')[0]).toggleClass('unlock').toggleClass('lock');\n }\n } catch (e) {\n command.lockexpression = false;\n }\n }\n\n el.find('.unlock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\tel.find('.lock').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n });\n el.find('.button_write_expression').popup({\n\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression\"),\n\t\tdelay: {\n\t\t\tshow: 750,\n\t\t\thide: 0\n\t\t}\n\t});\n\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\n $(writer_dom.find('.textual_expression')[0]).toggle();\n\n writer_dom.find('.button_write_expression').on('click', function() {\n\n\t\twindow.expressionEdition = true;\n\t\twindow.inputExpression = null;\n\t\t\n\t\tvar afterWhichElement;\n\t\tvar lockButton = $(writer_dom.find('.button_alternate_expression')[0]);\n\t\tvar editButton = $(this);\n\n\t\tafterWhichElement = writer_dom.find('.all_elements_write');\n\n\t\tif (command.lockexpression) {\n\t\t\tafterWhichElement = writer_dom.find('.textual_expression');\n\t\t}\n\n\t\tvar text = \"\";\n\t\tif (command.content) {\n\t\t\tif (command.content.length == 1 && command.content[0].content == null && !command.content[0].function_called) {\n\t\t\t\ttext = \"\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\ttext = CodeGenerator.elementExpressionCode(command.content);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\ttext = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar ok_button = $('');\n\t\tvar cancel_button = $('');\n\t\tvar input = $('');\n\t\tinput.val(text);\n\n\t\tinput.focusout(function(evt) {\n\t\t\tok_button.click();\n\t\t\tevt.preventDefault();\n\t\t\treturn true;\n\t\t});\n\t\t\n\t\tinput.keyup(function(evt) {\n\t\t\tif (evt.keyCode == 27) { // esc\n\t\t\t\tcancel_button.click();\n\t\t\t} \n\t\t\tif (evt.keyCode == 13) { // enter\n\t\t\t\tok_button.click();\n\t\t\t}\n\t\t});\n\n\t\tok_button.click(function() {\n\t\t\tvar parsed = null;\n\t\t\tparsed = GenericExpressionManagement.expressionParserToVisual(input.val(), function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.content = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tcancel_button.mousedown(function(evt) {\n\t\t\tvar parsed = GenericExpressionManagement.expressionParserToVisual(text, function_obj, input);\n\t\t\tif (parsed) {\n\t\t\t\twindow.expressionEdition = false;\n\t\t\t\tcommand.content = parsed;\n\t\t\t\trenderAlgorithm();\n\t\t\t}\n\t\t});\n\n\t\tinput.insertAfter(afterWhichElement);\n\t\tinput.focus();\n\t\tcancel_button.insertAfter(input);\n\t\tok_button.insertAfter(input);\n\t\tvar len = text.length; \n\t\tinput[0].setSelectionRange(len, len); \n\n\t\tafterWhichElement.css('display', 'none');\n\t\tlockButton.css('display', 'none');\n\t\teditButton.css('display', 'none');\n\n\t\tok_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_confirm\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t\tcancel_button.popup({\n\t\t\tcontent : LocalizedStrings.getUI(\"text_edit_expression_cancel\"),\n\t\t\tdelay: {\n\t\t\t\tshow: 750,\n\t\t\t\thide: 0\n\t\t\t}\n\t\t});\n\t});\n\n\t\n\twriter_dom.find('.button_alternate_expression').on('click', function() {\n\t\tif (command.content) {\n var text = CodeGenerator.elementExpressionCode(command.content);\n\t\t\tif (text) {\n\t\t\t\t$(writer_dom.find('.all_elements_write')[0]).toggle();\n\t\t\t\t$(writer_dom.find('.textual_expression')[0]).text(text);\n\t\t\t\t$(writer_dom.find('.textual_expression')[0]).toggle();\n\t\t\t\t$(this).toggleClass('unlock').toggleClass('lock');\n\t\t\t\tcommand.lockexpression = !command.lockexpression;\n }\n \n if (command.lockexpression) {\n\t\t\t\twriter_dom.find('.lock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_unlock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\twriter_dom.find('.unlock').popup({\n\t\t\t\t\tcontent : LocalizedStrings.getUI(\"text_lock_expression\"),\n\t\t\t\t\tdelay: {\n\t\t\t\t\t\tshow: 750,\n\t\t\t\t\t\thide: 0\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\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 ' '\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 '
'\n );\n const new_div_item = $('
');\n div_parent_with_handler.append(\n $('')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('')\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 ' '\n );\n icon_add_item.insertAfter(dom_object);\n\n icon_add_item.on(\"click\", function (_event) {\n const div_parent_with_handler = $(\n '
'\n );\n div_parent_with_handler.append(\n $('')\n );\n div_parent_with_handler.append(new_div_item);\n div_parent_with_handler.append(\n $('')\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 = '
';\n \n if (function_obj.return_dimensions == 1) {\n ret += '
'+ LocalizedStrings.getUI(\"vector\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ]
';\n } else if (function_obj.return_dimensions == 2) {\n ret += '
'+ LocalizedStrings.getUI(\"matrix\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] [ ]
';\n } else {\n ret += '
'+LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`)+'
';\n }\n\n ret += '
';\n\n for (var tm in Types) {\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n\n ret += '
'\n + '' + LocalizedStrings.getUI('vector')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('matrix')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n ret += '
';\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 = '
';\n\n if (function_obj.function_comment) {\n //appender += renderComment(function_obj.function_comment, sequence, true, -1);\n }\n \n appender += '';\n\n appender += (function_obj.is_main ? '
' : '')\n + '';\n\n appender += '
'+LocalizedStrings.getUI(\"function\")+' ';\n\n if (function_obj.is_main) {\n appender += '
      ' + LocalizedStrings.getUI('type_void') + '       '+function_obj.name+'
'\n + ' (
';\n } else {\n appender += '
';\n\n appender += '
'+function_obj.name+'
' \n + ' (
';\n }\n \n appender += '
)
'\n + (function_obj.is_hidden ? ' ';\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\n appender.find('.minimize_function_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_hide_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('.move_function').popup({\n content : LocalizedStrings.getUI(\"btn_drag_and_drop_function\"),\n delay: {\n show: 1000,\n hide: 0\n }\n });\n\n appender.find('.remove_function_button').popup({\n content : LocalizedStrings.getUI(\"btn_delete_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n \n appender.find('.add_var_button_function').popup({\n content : LocalizedStrings.getUI(\"btn_add_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"attribution\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_attribution\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"functioncall\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_call_function\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"iftrue\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_if_else\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"comment\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_comments\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"reader\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_read\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"writer\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_write\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"repeatNtimes\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_n_times\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"whiletrue\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_whiletrue\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"dowhiletrue\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_dowhiletrue\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"switch\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_switch\"),\n position: 'right center',\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n appender.find('a[data-command=\"return\"]').popup({\n content : LocalizedStrings.getUI(\"tooltip_menu_repeat_return\"),\n position: 'right center',\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 appender.find('.add_parameter_button').popup({\n content : LocalizedStrings.getUI(\"text_add_parameters\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\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 if (i == (path_target.length - 1)) { // está na raiz\n var indice_na_raiz = function_obj.find('.command_container').index(path_target[i]);\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 \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 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 }).popup({\n content : LocalizedStrings.getUI(\"text_add_function\"),\n delay: {\n show: 750,\n hide: 0\n }\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 $('#download_file_button').on('click', function () {\n downloadFile();\n });\n\n $('#upload_file_button').on('click', function () {\n $('#ivph_file').click().off('change').change(uploadFile);\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 += '
';\n\n if (parameter_obj.reference)\n ret += '';\n else \n ret += '';\n\n ret += '
';\n\n if (parameter_obj.dimensions > 0) {\n ret += '
'+ 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 += '
';\n } else {\n ret += '
'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`)+'
';\n }\n\n ret += '
';\n\n \n for (const tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n\n ret += '
'\n + '' + LocalizedStrings.getUI('vector')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('matrix')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n ret += '
';\n\n ret += '
'+parameter_obj.name+'
';\n\n ret += '
';\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 ret.find('input:checkbox').change(function() {\n parameter_obj.reference = this.checked\n AlgorithmManagement.renderAlgorithm();\n });\n\n ret.find('.by_reference').popup({\n content : LocalizedStrings.getUI(\"text_parameter_reference\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n ret.find('.by_copy').popup({\n content : LocalizedStrings.getUI(\"text_parameter_copy\"),\n delay: {\n show: 750,\n hide: 0\n }\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 = $( \"\" );\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 = $( \"\" );\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}\n\nfunction downloadFile() {\n \n var contentToSend = '{}\\n::algorithm::';\n\n if (settingsProgrammingTypes == \"textual\") {\n contentToSend += ivprogCore.CodeEditor.getCode();\n } else {\n contentToSend += JSON.stringify(window.program_obj, function(key, value) {\n if (key == 'dom_object') {\n return;\n }\n return value;\n });\n }\n\n var date = new Date(); \n var temp = date.toISOString().split('T')[0] + \"_\" + date.toTimeString().split(' ')[0].replaceAll(':', '-');\n var blob = new Blob([contentToSend],\n { type: \"text/plain;charset=utf-8\" });\n \n saveAs(blob, \"ivprog-exported_\" + temp + \".ivph\");\n}\n\nfunction uploadFile (evt) {\n var oFReader = new FileReader();\n oFReader.readAsText(document.getElementById(\"ivph_file\").files[0]);\n oFReader.onload = function (oFREvent) {\n var txt = oFREvent.target.result;\n try {\n\n previousContent = txt;\n prepareActivityToStudent(txt);\n window.renderAlgorithm();\n $('.assessment_button').addClass('disabled');\n }\n catch (e) {\n showInvalidFile();\n }\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\";\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 += '
'+global_var.value.toFixed(1)+'
';\n\t\t} else {\n\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '
'+LocalizedStrings.getUI(`logic_value_${global_var.value}`)+'
';\n\t\t\t} else {\n\t\t\t\tret += '
'+global_var.value+'
';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '';\n\n\t\tif (global_var.dimensions == 1) {\n\t\t\tret += '';\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 += '';\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 += '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '';\n\t\t\tret += '
'+global_var.value[k].toFixed(1)+''+LocalizedStrings.getUI(`logic_value_${global_var.value[k]}`)+''+global_var.value[k]+''+'
';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\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 += '';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tret += ''+global_var.value[l][k].toFixed(1)+''+'';\n \t\t\t\t} \n \t\t\t\tret += '';\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 += '';\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 += ''+LocalizedStrings.getUI(`logic_value_${global_var.value[l][k]}`)+'';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += ''+global_var.value[l][k]+'';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.rows == 0) {\n\t\t\t\tret += '';\n\t\t\t}\n\t\t\tret += ''\n\t\t \t+ ' ';\n\t\t\tret += '';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\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\tglobal_container.find( \".ellipsis\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_move_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n\tglobal_container.find( \".remove_global\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_remove_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\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 = '
const: ';\n\n\telement += '
';\n \t\n \telement += '
';\n\n \tif (global_var.dimensions == 1) {\n \t\telement += '
'+ LocalizedStrings.getUI('vector')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ ] ';\n \t\telement += '
';\n \t} else if (global_var.dimensions == 2) {\n \t\telement += '
'+ LocalizedStrings.getUI('matrix')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ ] [ ] ';\n \t\telement += '
';\n \t} else {\n \t\telement += '
' + LocalizedStrings.getUI(`type_${global_var.type.toLowerCase()}`) + '
';\n \t}\n\telement += '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n\t}\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('vector')\n\t\t+ '
';\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 += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('matrix')\n\t\t+ '
';\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 += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n element += '
'+global_var.name+'
<— ';\n\n\telement += '
'+global_var.value+'
'; \n\n\telement += '
';\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 = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\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 = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\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 = $( \"\" );\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 = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\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 = $('').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 reference = false\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 this.reference = reference;\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 : '' + 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;\t\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\tvariable_container.find( \".ellipsis\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_move_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n\tvariable_container.find( \".remove_variable\" ).popup({\n content : LocalizedStrings.getUI(\"tooltip_remove_var\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n}\n\nexport function renderVariable (function_container, new_var, function_obj) {\n\n\tvar element = '
';\n\n\telement += '
';\n\n \tif (new_var.dimensions == 1) {\n \t\telement += '
'+ LocalizedStrings.getUI('vector') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ]
';\n \t} else if (new_var.dimensions == 2) {\n \t\telement += '
'+ LocalizedStrings.getUI('matrix') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] [ ]
';\n \t} else {\n \t\telement += '
' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`) + '
';\n \t}\n\telement += '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n\t}\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('vector')\n\t\t+ '
';\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 += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('matrix')\n\t\t+ '
';\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 += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n element += '
';\n\n element += '
'+new_var.name+'
';\n\n\telement += ' <—
'+new_var.value+'
'; \n\n\telement += '
';\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 += '
'+new_var.value.toFixed(1)+'
';\n\t\t} else {\n\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '
'+LocalizedStrings.getUI(`logic_value_${new_var.value}`)+'
';\n\t\t\t} else {\n\t\t\t\tret += '
'+new_var.value+'
';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '';\n\n\t\tif (new_var.dimensions == 1) {\n\t\t\tret += '';\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 += '';\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 += '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '';\n\t\t\tret += '
'+new_var.value[k].toFixed(1)+''+LocalizedStrings.getUI(`logic_value_${new_var.value[k]}`)+''+new_var.value[k]+''+'
';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\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 += '';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tret += ''+new_var.value[l][k].toFixed(1)+''+'';\n \t\t\t\t} \n \t\t\t\tret += '';\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 += '';\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 += ''+LocalizedStrings.getUI(`logic_value_${new_var.value[l][k]}`)+'';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += ''+new_var.value[l][k]+'';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (new_var.rows == 0) {\n\t\t\t\tret += '';\n\t\t\t}\n\t\t\tret += ''\n\t\t \t+ ' ';\n\t\t\tret += '';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\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 = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\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 = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\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 = $( \"\" );\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 = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\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":""}