// Do not edit this file; automatically generated.

/* eslint-disable */
;(function(root, factory) {
  if (typeof define === 'function' && define.amd) { // AMD
    define(["./blockly_compressed.js"], factory);
  } else if (typeof exports === 'object') { // Node.js
    module.exports = factory(require("./blockly_compressed.js"));
  } else { // Script
    root.dart = factory(root.Blockly);
    root.Blockly.Dart = root.dart.dartGenerator;
  }
}(this, function(__parent__) {
var $=__parent__.__namespace__;
var lists_create_empty$$module$build$src$generators$dart$lists=function(a,b){return["[]",Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},lists_create_with$$module$build$src$generators$dart$lists=function(a,b){const c=Array(a.itemCount_);for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$dart$dart_generator.NONE)||"null";return["["+c.join(", ")+"]",Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},lists_repeat$$module$build$src$generators$dart$lists=
function(a,b){const c=b.valueToCode(a,"ITEM",Order$$module$build$src$generators$dart$dart_generator.NONE)||"null";return["new List.filled("+(b.valueToCode(a,"NUM",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0")+", "+c+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_length$$module$build$src$generators$dart$lists=function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"[]")+".length",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},
lists_isEmpty$$module$build$src$generators$dart$lists=function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"[]")+".isEmpty",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_indexOf$$module$build$src$generators$dart$lists=function(a,b){const c=a.getFieldValue("END")==="FIRST"?"indexOf":"lastIndexOf",d=b.valueToCode(a,"FIND",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";b=(b.valueToCode(a,
"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"[]")+"."+c+"("+d+")";return a.workspace.options.oneBasedIndex?[b+" + 1",Order$$module$build$src$generators$dart$dart_generator.ADDITIVE]:[b,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_getIndex$$module$build$src$generators$dart$lists=function(a,b){function c(){const g=b.nameDB_.getDistinctName("tmp_list",$.NameType$$module$build$src$core$names.VARIABLE),h="List "+g+" = "+f+";\n";f=g;return h}
var d=a.getFieldValue("MODE")||"GET";const e=a.getFieldValue("WHERE")||"FROM_START";let f=b.valueToCode(a,"VALUE",e==="RANDOM"||e==="FROM_END"?Order$$module$build$src$generators$dart$dart_generator.NONE:Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"[]";if((e!=="RANDOM"||d!=="REMOVE")&&e!=="FROM_END"||f.match(/^\w+$/))switch(e){case "FIRST":if(d==="GET")return[f+".first",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="GET_REMOVE")return[f+".removeAt(0)",
Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="REMOVE")return f+".removeAt(0);\n";break;case "LAST":if(d==="GET")return[f+".last",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="GET_REMOVE")return[f+".removeLast()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="REMOVE")return f+".removeLast();\n";break;case "FROM_START":a=b.getAdjusted(a,"AT");if(d==="GET")return[f+"["+a+"]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];
if(d==="GET_REMOVE")return[f+".removeAt("+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="REMOVE")return f+".removeAt("+a+");\n";break;case "FROM_END":a=b.getAdjusted(a,"AT",1,!1,Order$$module$build$src$generators$dart$dart_generator.ADDITIVE);if(d==="GET")return[f+"["+f+".length - "+a+"]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="GET_REMOVE"||d==="REMOVE"){a=f+".removeAt("+f+".length - "+a+")";if(d==="GET_REMOVE")return[a,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];
if(d==="REMOVE")return a+";\n"}break;case "RANDOM":b.definitions_.import_dart_math="import 'dart:math' as Math;";if(d==="REMOVE")return d=b.nameDB_.getDistinctName("tmp_x",$.NameType$$module$build$src$core$names.VARIABLE),"int "+d+" = new Math.Random().nextInt("+f+".length);\n"+(f+".removeAt("+d+");\n");if(d==="GET")return[b.provideFunction_("lists_get_random_item",`
dynamic ${b.FUNCTION_NAME_PLACEHOLDER_}(List my_list) {
  int x = new Math.Random().nextInt(my_list.length);
  return my_list[x];
}
`)+"("+f+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="GET_REMOVE")return[b.provideFunction_("lists_remove_random_item",`
dynamic ${b.FUNCTION_NAME_PLACEHOLDER_}(List my_list) {
  int x = new Math.Random().nextInt(my_list.length);
  return my_list.removeAt(x);
}
`)+"("+f+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]}else{if(e==="RANDOM")return b.definitions_.import_dart_math="import 'dart:math' as Math;",d=c(),a=b.nameDB_.getDistinctName("tmp_x",$.NameType$$module$build$src$core$names.VARIABLE),d+("int "+a+" = new Math.Random().nextInt("+f+".length);\n")+(f+".removeAt("+a+");\n");if(d==="REMOVE")return d=b.getAdjusted(a,"AT",1,!1,Order$$module$build$src$generators$dart$dart_generator.ADDITIVE),c()+(f+".removeAt("+f+".length - "+
d+");\n");if(d==="GET")return d=b.getAdjusted(a,"AT",1),[b.provideFunction_("lists_get_from_end",`
dynamic ${b.FUNCTION_NAME_PLACEHOLDER_}(List my_list, num x) {
  x = my_list.length - x;
  return my_list[x];
}
`)+"("+f+", "+d+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];if(d==="GET_REMOVE")return d=b.getAdjusted(a,"AT",1),[b.provideFunction_("lists_remove_from_end",`
dynamic ${b.FUNCTION_NAME_PLACEHOLDER_}(List my_list, num x) {
  x = my_list.length - x;
  return my_list.removeAt(x);
}
`)+"("+f+", "+d+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]}throw Error("Unhandled combination (lists_getIndex).");},lists_setIndex$$module$build$src$generators$dart$lists=function(a,b){function c(){if(f.match(/^\w+$/))return"";const h=b.nameDB_.getDistinctName("tmp_list",$.NameType$$module$build$src$core$names.VARIABLE),k="List "+h+" = "+f+";\n";f=h;return k}const d=a.getFieldValue("MODE")||"GET";var e=a.getFieldValue("WHERE")||"FROM_START";let f=b.valueToCode(a,"LIST",
Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"[]";const g=b.valueToCode(a,"TO",Order$$module$build$src$generators$dart$dart_generator.ASSIGNMENT)||"null";switch(e){case "FIRST":if(d==="SET")return f+"[0] = "+g+";\n";if(d==="INSERT")return f+".insert(0, "+g+");\n";break;case "LAST":if(d==="SET")return c()+(f+"["+f+".length - 1] = "+g+";\n");if(d==="INSERT")return f+".add("+g+");\n";break;case "FROM_START":a=b.getAdjusted(a,"AT");if(d==="SET")return f+"["+a+"] = "+g+";\n";
if(d==="INSERT")return f+".insert("+a+", "+g+");\n";break;case "FROM_END":a=b.getAdjusted(a,"AT",1,!1,Order$$module$build$src$generators$dart$dart_generator.ADDITIVE);e=c();if(d==="SET")return e+(f+"["+f+".length - "+a+"] = "+g+";\n");if(d==="INSERT")return e+(f+".insert("+f+".length - "+a+", "+g+");\n");break;case "RANDOM":b.definitions_.import_dart_math="import 'dart:math' as Math;";a=c();e=b.nameDB_.getDistinctName("tmp_x",$.NameType$$module$build$src$core$names.VARIABLE);a+="int "+e+" = new Math.Random().nextInt("+
f+".length);\n";if(d==="SET")return a+(f+"["+e+"] = "+g+";\n");if(d==="INSERT")return a+(f+".insert("+e+", "+g+");\n")}throw Error("Unhandled combination (lists_setIndex).");},lists_getSublist$$module$build$src$generators$dart$lists=function(a,b){const c=b.valueToCode(a,"LIST",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"[]";var d=a.getFieldValue("WHERE1");const e=a.getFieldValue("WHERE2");if(c.match(/^\w+$/)||d!=="FROM_END"&&e==="FROM_START"){switch(d){case "FROM_START":d=
b.getAdjusted(a,"AT1");break;case "FROM_END":d=b.getAdjusted(a,"AT1",1,!1,Order$$module$build$src$generators$dart$dart_generator.ADDITIVE);d=c+".length - "+d;break;case "FIRST":d="0";break;default:throw Error("Unhandled option (lists_getSublist).");}switch(e){case "FROM_START":var f=b.getAdjusted(a,"AT2",1);break;case "FROM_END":f=b.getAdjusted(a,"AT2",0,!1,Order$$module$build$src$generators$dart$dart_generator.ADDITIVE);f=c+".length - "+f;break;case "LAST":break;default:throw Error("Unhandled option (lists_getSublist).");
}b=e==="LAST"?c+".sublist("+d+")":c+".sublist("+d+", "+f+")"}else f=b.getAdjusted(a,"AT1"),a=b.getAdjusted(a,"AT2"),b=b.provideFunction_("lists_get_sublist",`
List ${b.FUNCTION_NAME_PLACEHOLDER_}(List list, String where1, num at1, String where2, num at2) {
  int getAt(String where, num at) {
    if (where == 'FROM_END') {
      at = list.length - 1 - at;
    } else if (where == 'FIRST') {
      at = 0;
    } else if (where == 'LAST') {
      at = list.length - 1;
    } else if (where != 'FROM_START') {
      throw 'Unhandled option (lists_getSublist).';
    }
    return at;
  }
  at1 = getAt(where1, at1);
  at2 = getAt(where2, at2) + 1;
  return list.sublist(at1, at2);
}
`)+"("+c+", '"+d+"', "+f+", '"+e+"', "+a+")";return[b,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_sort$$module$build$src$generators$dart$lists=function(a,b){const c=b.valueToCode(a,"LIST",Order$$module$build$src$generators$dart$dart_generator.NONE)||"[]",d=a.getFieldValue("DIRECTION")==="1"?1:-1;a=a.getFieldValue("TYPE");return[b.provideFunction_("lists_sort",`
List ${b.FUNCTION_NAME_PLACEHOLDER_}(List list, String type, int direction) {
  var compareFuncs = {
    'NUMERIC': (a, b) => (direction * a.compareTo(b)).toInt(),
    'TEXT': (a, b) => direction * a.toString().compareTo(b.toString()),
    'IGNORE_CASE':
      (a, b) => direction *
      a.toString().toLowerCase().compareTo(b.toString().toLowerCase())
  };
  list = new List.from(list);
  var compare = compareFuncs[type];
  list.sort(compare);
  return list;
}
`)+"("+c+', "'+a+'", '+d+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_split$$module$build$src$generators$dart$lists=function(a,b){let c=b.valueToCode(a,"INPUT",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX);b=b.valueToCode(a,"DELIM",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";a=a.getFieldValue("MODE");if(a==="SPLIT")c||(c="''"),a="split";else if(a==="JOIN")c||(c="[]"),a="join";else throw Error("Unknown mode: "+a);return[c+
"."+a+"("+b+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},lists_reverse$$module$build$src$generators$dart$lists=function(a,b){return["new List.from("+(b.valueToCode(a,"LIST",Order$$module$build$src$generators$dart$dart_generator.NONE)||"[]")+".reversed)",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},controls_if$$module$build$src$generators$dart$logic=function(a,b){let c=0,d="",e,f;b.STATEMENT_PREFIX&&(d+=b.injectId(b.STATEMENT_PREFIX,a));do f=
b.valueToCode(a,"IF"+c,Order$$module$build$src$generators$dart$dart_generator.NONE)||"false",e=b.statementToCode(a,"DO"+c),b.STATEMENT_SUFFIX&&(e=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+e),d+=(c>0?"else ":"")+"if ("+f+") {\n"+e+"}",c++;while(a.getInput("IF"+c));if(a.getInput("ELSE")||b.STATEMENT_SUFFIX)e=a.getInput("ELSE")?b.statementToCode(a,"ELSE"):"",b.STATEMENT_SUFFIX&&(e=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT)+e),d+=" else {\n"+e+"}";return d+"\n"},logic_compare$$module$build$src$generators$dart$logic=
function(a,b){const c={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],d=c==="=="||c==="!="?Order$$module$build$src$generators$dart$dart_generator.EQUALITY:Order$$module$build$src$generators$dart$dart_generator.RELATIONAL,e=b.valueToCode(a,"A",d)||"0";a=b.valueToCode(a,"B",d)||"0";return[e+" "+c+" "+a,d]},logic_operation$$module$build$src$generators$dart$logic=function(a,b){const c=a.getFieldValue("OP")==="AND"?"&&":"||",d=c==="&&"?Order$$module$build$src$generators$dart$dart_generator.LOGICAL_AND:
Order$$module$build$src$generators$dart$dart_generator.LOGICAL_OR;let e=b.valueToCode(a,"A",d);a=b.valueToCode(a,"B",d);e||a?(b=c==="&&"?"true":"false",e||(e=b),a||(a=b)):a=e="false";return[e+" "+c+" "+a,d]},logic_negate$$module$build$src$generators$dart$logic=function(a,b){const c=Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX;return["!"+(b.valueToCode(a,"BOOL",c)||"true"),c]},logic_boolean$$module$build$src$generators$dart$logic=function(a,b){return[a.getFieldValue("BOOL")===
"TRUE"?"true":"false",Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},logic_null$$module$build$src$generators$dart$logic=function(a,b){return["null",Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},logic_ternary$$module$build$src$generators$dart$logic=function(a,b){const c=b.valueToCode(a,"IF",Order$$module$build$src$generators$dart$dart_generator.CONDITIONAL)||"false",d=b.valueToCode(a,"THEN",Order$$module$build$src$generators$dart$dart_generator.CONDITIONAL)||"null";
a=b.valueToCode(a,"ELSE",Order$$module$build$src$generators$dart$dart_generator.CONDITIONAL)||"null";return[c+" ? "+d+" : "+a,Order$$module$build$src$generators$dart$dart_generator.CONDITIONAL]},controls_repeat_ext$$module$build$src$generators$dart$loops=function(a,b){let c;c=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):b.valueToCode(a,"TIMES",Order$$module$build$src$generators$dart$dart_generator.ASSIGNMENT)||"0";let d=b.statementToCode(a,"DO");d=b.addLoopTrap(d,a);a="";const e=b.nameDB_.getDistinctName("count",
$.NameType$$module$build$src$core$names.VARIABLE);let f=c;c.match(/^\w+$/)||$.isNumber$$module$build$src$core$utils$string(c)||(f=b.nameDB_.getDistinctName("repeat_end",$.NameType$$module$build$src$core$names.VARIABLE),a+="var "+f+" = "+c+";\n");return a+("for (int "+e+" = 0; "+e+" < "+f+"; "+e+"++) {\n"+d+"}\n")},controls_whileUntil$$module$build$src$generators$dart$loops=function(a,b){const c=a.getFieldValue("MODE")==="UNTIL";let d=b.valueToCode(a,"BOOL",c?Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX:
Order$$module$build$src$generators$dart$dart_generator.NONE)||"false",e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);c&&(d="!"+d);return"while ("+d+") {\n"+e+"}\n"},controls_for$$module$build$src$generators$dart$loops=function(a,b){var c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"FROM",Order$$module$build$src$generators$dart$dart_generator.ASSIGNMENT)||"0",e=b.valueToCode(a,"TO",Order$$module$build$src$generators$dart$dart_generator.ASSIGNMENT)||"0";const f=b.valueToCode(a,"BY",
Order$$module$build$src$generators$dart$dart_generator.ASSIGNMENT)||"1";let g=b.statementToCode(a,"DO");g=b.addLoopTrap(g,a);if($.isNumber$$module$build$src$core$utils$string(d)&&$.isNumber$$module$build$src$core$utils$string(e)&&$.isNumber$$module$build$src$core$utils$string(f))b=Number(d)<=Number(e),a="for ("+c+" = "+d+"; "+c+(b?" <= ":" >= ")+e+"; "+c,c=Math.abs(Number(f)),a=c===1?a+(b?"++":"--"):a+((b?" += ":" -= ")+c),a+=") {\n"+g+"}\n";else{a="";let h=d;d.match(/^\w+$/)||$.isNumber$$module$build$src$core$utils$string(d)||
(h=b.nameDB_.getDistinctName(c+"_start",$.NameType$$module$build$src$core$names.VARIABLE),a+="var "+h+" = "+d+";\n");d=e;e.match(/^\w+$/)||$.isNumber$$module$build$src$core$utils$string(e)||(d=b.nameDB_.getDistinctName(c+"_end",$.NameType$$module$build$src$core$names.VARIABLE),a+="var "+d+" = "+e+";\n");e=b.nameDB_.getDistinctName(c+"_inc",$.NameType$$module$build$src$core$names.VARIABLE);a+="num "+e+" = ";a=$.isNumber$$module$build$src$core$utils$string(f)?a+(Math.abs(Number(f))+";\n"):a+("("+f+
").abs();\n");a+="if ("+h+" > "+d+") {\n";a+=b.INDENT+e+" = -"+e+";\n";a=a+"}\nfor ("+(c+" = "+h+"; "+e+" >= 0 ? "+c+" <= "+d+" : "+c+" >= "+d+"; "+c+" += "+e+") {\n"+g+"}\n")}return a},controls_forEach$$module$build$src$generators$dart$loops=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR")),d=b.valueToCode(a,"LIST",Order$$module$build$src$generators$dart$dart_generator.ASSIGNMENT)||"[]";let e=b.statementToCode(a,"DO");e=b.addLoopTrap(e,a);return"for (var "+c+" in "+d+") {\n"+e+"}\n"},
controls_flow_statements$$module$build$src$generators$dart$loops=function(a,b){let c="";b.STATEMENT_PREFIX&&(c+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(c+=b.injectId(b.STATEMENT_SUFFIX,a));if(b.STATEMENT_PREFIX){const d=a.getSurroundLoop();d&&!d.suppressPrefixSuffix&&(c+=b.injectId(b.STATEMENT_PREFIX,d))}switch(a.getFieldValue("FLOW")){case "BREAK":return c+"break;\n";case "CONTINUE":return c+"continue;\n"}throw Error("Unknown flow statement.");},math_number$$module$build$src$generators$dart$math=
function(a,b){a=Number(a.getFieldValue("NUM"));return a===Infinity?["double.infinity",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]:a===-Infinity?["-double.infinity",Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX]:[String(a),a<0?Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX:Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},math_arithmetic$$module$build$src$generators$dart$math=function(a,b){var c={ADD:[" + ",Order$$module$build$src$generators$dart$dart_generator.ADDITIVE],
MINUS:[" - ",Order$$module$build$src$generators$dart$dart_generator.ADDITIVE],MULTIPLY:[" * ",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE],DIVIDE:[" / ",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE],POWER:[null,Order$$module$build$src$generators$dart$dart_generator.NONE]}[a.getFieldValue("OP")];const d=c[0];c=c[1];const e=b.valueToCode(a,"A",c)||"0";a=b.valueToCode(a,"B",c)||"0";return d?[e+d+a,c]:(b.definitions_.import_dart_math="import 'dart:math' as Math;",
["Math.pow("+e+", "+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX])},math_single$$module$build$src$generators$dart$math=function(a,b){const c=a.getFieldValue("OP");let d;if(c==="NEG")return a=b.valueToCode(a,"NUM",Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX)||"0",a[0]==="-"&&(a=" "+a),["-"+a,Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX];b.definitions_.import_dart_math="import 'dart:math' as Math;";a=c==="ABS"||c.substring(0,
5)==="ROUND"?b.valueToCode(a,"NUM",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"0":c==="SIN"||c==="COS"||c==="TAN"?b.valueToCode(a,"NUM",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE)||"0":b.valueToCode(a,"NUM",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0";switch(c){case "ABS":d=a+".abs()";break;case "ROOT":d="Math.sqrt("+a+")";break;case "LN":d="Math.log("+a+")";break;case "EXP":d="Math.exp("+a+")";break;case "POW10":d="Math.pow(10,"+
a+")";break;case "ROUND":d=a+".round()";break;case "ROUNDUP":d=a+".ceil()";break;case "ROUNDDOWN":d=a+".floor()";break;case "SIN":d="Math.sin("+a+" / 180 * Math.pi)";break;case "COS":d="Math.cos("+a+" / 180 * Math.pi)";break;case "TAN":d="Math.tan("+a+" / 180 * Math.pi)"}if(d)return[d,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];switch(c){case "LOG10":d="Math.log("+a+") / Math.log(10)";break;case "ASIN":d="Math.asin("+a+") / Math.pi * 180";break;case "ACOS":d="Math.acos("+
a+") / Math.pi * 180";break;case "ATAN":d="Math.atan("+a+") / Math.pi * 180";break;default:throw Error("Unknown math operator: "+c);}return[d,Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE]},math_constant$$module$build$src$generators$dart$math=function(a,b){const c={PI:["Math.pi",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX],E:["Math.e",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE],
SQRT2:["Math.sqrt2",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX],SQRT1_2:["Math.sqrt1_2",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX],INFINITY:["double.infinity",Order$$module$build$src$generators$dart$dart_generator.ATOMIC]};a=a.getFieldValue("CONSTANT");a!=="INFINITY"&&(b.definitions_.import_dart_math="import 'dart:math' as Math;");return c[a]},math_number_property$$module$build$src$generators$dart$math=function(a,b){var c={EVEN:[" % 2 == 0",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE,
Order$$module$build$src$generators$dart$dart_generator.EQUALITY],ODD:[" % 2 == 1",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE,Order$$module$build$src$generators$dart$dart_generator.EQUALITY],WHOLE:[" % 1 == 0",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE,Order$$module$build$src$generators$dart$dart_generator.EQUALITY],POSITIVE:[" > 0",Order$$module$build$src$generators$dart$dart_generator.RELATIONAL,Order$$module$build$src$generators$dart$dart_generator.RELATIONAL],
NEGATIVE:[" < 0",Order$$module$build$src$generators$dart$dart_generator.RELATIONAL,Order$$module$build$src$generators$dart$dart_generator.RELATIONAL],DIVISIBLE_BY:[null,Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE,Order$$module$build$src$generators$dart$dart_generator.EQUALITY],PRIME:[null,Order$$module$build$src$generators$dart$dart_generator.NONE,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]};const d=a.getFieldValue("PROPERTY"),[e,f,g]=c[d];c=b.valueToCode(a,
"NUMBER_TO_CHECK",f)||"0";if(d==="PRIME")b.definitions_.import_dart_math="import 'dart:math' as Math;",a=b.provideFunction_("math_isPrime",`
bool ${b.FUNCTION_NAME_PLACEHOLDER_}(n) {
  // https://en.wikipedia.org/wiki/Primality_test#Naive_methods
  if (n == 2 || n == 3) {
    return true;
  }
  // False if n is null, negative, is 1, or not whole.
  // And false if n is divisible by 2 or 3.
  if (n == null || n <= 1 || n % 1 != 0 || n % 2 == 0 || n % 3 == 0) {
    return false;
  }
  // Check all the numbers of form 6k +/- 1, up to sqrt(n).
  for (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {
    if (n % (x - 1) == 0 || n % (x + 1) == 0) {
      return false;
    }
  }
  return true;
}
`)+"("+c+")";else if(d==="DIVISIBLE_BY"){a=b.valueToCode(a,"DIVISOR",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE)||"0";if(a==="0")return["false",Order$$module$build$src$generators$dart$dart_generator.ATOMIC];a=c+" % "+a+" == 0"}else a=c+e;return[a,g]},math_change$$module$build$src$generators$dart$math=function(a,b){const c=b.valueToCode(a,"DELTA",Order$$module$build$src$generators$dart$dart_generator.ADDITIVE)||"0";a=b.getVariableName(a.getFieldValue("VAR"));return a+" = ("+
a+" is num ? "+a+" : 0) + "+c+";\n"},math_on_list$$module$build$src$generators$dart$math=function(a,b){const c=a.getFieldValue("OP");a=b.valueToCode(a,"LIST",Order$$module$build$src$generators$dart$dart_generator.NONE)||"[]";switch(c){case "SUM":b=b.provideFunction_("math_sum",`
num ${b.FUNCTION_NAME_PLACEHOLDER_}(List<num> myList) {
  num sumVal = 0;
  myList.forEach((num entry) {sumVal += entry;});
  return sumVal;
}
`)+"("+a+")";break;case "MIN":b.definitions_.import_dart_math="import 'dart:math' as Math;";b=b.provideFunction_("math_min",`
num ${b.FUNCTION_NAME_PLACEHOLDER_}(List<num> myList) {
  if (myList.isEmpty) return null;
  num minVal = myList[0];
  myList.forEach((num entry) {minVal = Math.min(minVal, entry);});
  return minVal;
}
`)+"("+a+")";break;case "MAX":b.definitions_.import_dart_math="import 'dart:math' as Math;";b=b.provideFunction_("math_max",`
num ${b.FUNCTION_NAME_PLACEHOLDER_}(List<num> myList) {
  if (myList.isEmpty) return null;
  num maxVal = myList[0];
  myList.forEach((num entry) {maxVal = Math.max(maxVal, entry);});
  return maxVal;
}
`)+"("+a+")";break;case "AVERAGE":b=b.provideFunction_("math_mean",`
num ${b.FUNCTION_NAME_PLACEHOLDER_}(List myList) {
  // First filter list for numbers only.
  List localList = new List.from(myList);
  localList.removeWhere((a) => a is! num);
  if (localList.isEmpty) return null;
  num sumVal = 0;
  localList.forEach((var entry) {sumVal += entry;});
  return sumVal / localList.length;
}
`)+"("+a+")";break;case "MEDIAN":b=b.provideFunction_("math_median",`
num ${b.FUNCTION_NAME_PLACEHOLDER_}(List myList) {
  // First filter list for numbers only, then sort, then return middle value
  // or the average of two middle values if list has an even number of elements.
  List localList = new List.from(myList);
  localList.removeWhere((a) => a is! num);
  if (localList.isEmpty) return null;
  localList.sort((a, b) => (a - b));
  int index = localList.length ~/ 2;
  if (localList.length % 2 == 1) {
    return localList[index];
  } else {
    return (localList[index - 1] + localList[index]) / 2;
  }
}
`)+"("+a+")";break;case "MODE":b.definitions_.import_dart_math="import 'dart:math' as Math;";b=b.provideFunction_("math_modes",`
List ${b.FUNCTION_NAME_PLACEHOLDER_}(List values) {
  List modes = [];
  List counts = [];
  int maxCount = 0;
  for (int i = 0; i < values.length; i++) {
    var value = values[i];
    bool found = false;
    int thisCount;
    for (int j = 0; j < counts.length; j++) {
      if (counts[j][0] == value) {
        thisCount = ++counts[j][1];
        found = true;
        break;
      }
    }
    if (!found) {
      counts.add([value, 1]);
      thisCount = 1;
    }
    maxCount = Math.max(thisCount, maxCount);
  }
  for (int j = 0; j < counts.length; j++) {
    if (counts[j][1] == maxCount) {
        modes.add(counts[j][0]);
    }
  }
  return modes;
}
`)+"("+a+")";break;case "STD_DEV":b.definitions_.import_dart_math="import 'dart:math' as Math;";b=b.provideFunction_("math_standard_deviation",`
num ${b.FUNCTION_NAME_PLACEHOLDER_}(List myList) {
  // First filter list for numbers only.
  List numbers = new List.from(myList);
  numbers.removeWhere((a) => a is! num);
  if (numbers.isEmpty) return null;
  num n = numbers.length;
  num sum = 0;
  numbers.forEach((x) => sum += x);
  num mean = sum / n;
  num sumSquare = 0;
  numbers.forEach((x) => sumSquare += Math.pow(x - mean, 2));
  return Math.sqrt(sumSquare / n);
}
`)+"("+a+")";break;case "RANDOM":b.definitions_.import_dart_math="import 'dart:math' as Math;";b=b.provideFunction_("math_random_item",`
dynamic ${b.FUNCTION_NAME_PLACEHOLDER_}(List myList) {
  int x = new Math.Random().nextInt(myList.length);
  return myList[x];
}
`)+"("+a+")";break;default:throw Error("Unknown operator: "+c);}return[b,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},math_modulo$$module$build$src$generators$dart$math=function(a,b){const c=b.valueToCode(a,"DIVIDEND",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE)||"0";a=b.valueToCode(a,"DIVISOR",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE)||"0";return[c+" % "+a,Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE]},
math_constrain$$module$build$src$generators$dart$math=function(a,b){b.definitions_.import_dart_math="import 'dart:math' as Math;";const c=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0",d=b.valueToCode(a,"LOW",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0";a=b.valueToCode(a,"HIGH",Order$$module$build$src$generators$dart$dart_generator.NONE)||"double.infinity";return["Math.min(Math.max("+c+", "+d+"), "+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},
math_random_int$$module$build$src$generators$dart$math=function(a,b){b.definitions_.import_dart_math="import 'dart:math' as Math;";const c=b.valueToCode(a,"FROM",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0";return[b.provideFunction_("math_random_int",`
int ${b.FUNCTION_NAME_PLACEHOLDER_}(num a, num b) {
  if (a > b) {
    // Swap a and b to ensure a is smaller.
    num c = a;
    a = b;
    b = c;
  }
  return new Math.Random().nextInt(b - a + 1) + a;
}
`)+"("+c+", "+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},math_random_float$$module$build$src$generators$dart$math=function(a,b){b.definitions_.import_dart_math="import 'dart:math' as Math;";return["new Math.Random().nextDouble()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},math_atan2$$module$build$src$generators$dart$math=function(a,b){b.definitions_.import_dart_math="import 'dart:math' as Math;";const c=b.valueToCode(a,"X",Order$$module$build$src$generators$dart$dart_generator.NONE)||
"0";return["Math.atan2("+(b.valueToCode(a,"Y",Order$$module$build$src$generators$dart$dart_generator.NONE)||"0")+", "+c+") / Math.pi * 180",Order$$module$build$src$generators$dart$dart_generator.MULTIPLICATIVE]},procedures_defreturn$$module$build$src$generators$dart$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME"));var d="";b.STATEMENT_PREFIX&&(d+=b.injectId(b.STATEMENT_PREFIX,a));b.STATEMENT_SUFFIX&&(d+=b.injectId(b.STATEMENT_SUFFIX,a));d&&(d=b.prefixLines(d,b.INDENT));
let e="";b.INFINITE_LOOP_TRAP&&(e=b.prefixLines(b.injectId(b.INFINITE_LOOP_TRAP,a),b.INDENT));let f="";a.getInput("STACK")&&(f=b.statementToCode(a,"STACK"));let g="";a.getInput("RETURN")&&(g=b.valueToCode(a,"RETURN",Order$$module$build$src$generators$dart$dart_generator.NONE)||"");let h="";f&&g&&(h=d);g&&(g=b.INDENT+"return "+g+";\n");const k=g?"dynamic":"void",l=[],m=a.getVars();for(let n=0;n<m.length;n++)l[n]=b.getVariableName(m[n]);d=k+" "+c+"("+l.join(", ")+") {\n"+d+e+f+h+g+"}";d=b.scrub_(a,
d);b.definitions_["%"+c]=d;return null},procedures_callreturn$$module$build$src$generators$dart$procedures=function(a,b){const c=b.getProcedureName(a.getFieldValue("NAME")),d=[],e=a.getVars();for(let f=0;f<e.length;f++)d[f]=b.valueToCode(a,"ARG"+f,Order$$module$build$src$generators$dart$dart_generator.NONE)||"null";return[c+"("+d.join(", ")+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},procedures_callnoreturn$$module$build$src$generators$dart$procedures=function(a,b){return b.forBlock.procedures_callreturn(a,
b)[0]+";\n"},procedures_ifreturn$$module$build$src$generators$dart$procedures=function(a,b){let c="if ("+(b.valueToCode(a,"CONDITION",Order$$module$build$src$generators$dart$dart_generator.NONE)||"false")+") {\n";b.STATEMENT_SUFFIX&&(c+=b.prefixLines(b.injectId(b.STATEMENT_SUFFIX,a),b.INDENT));a.hasReturnValue_?(a=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.NONE)||"null",c+=b.INDENT+"return "+a+";\n"):c+=b.INDENT+"return;\n";return c+"}\n"},text$$module$build$src$generators$dart$text=
function(a,b){return[b.quote_(a.getFieldValue("TEXT")),Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},text_join$$module$build$src$generators$dart$text=function(a,b){switch(a.itemCount_){case 0:return["''",Order$$module$build$src$generators$dart$dart_generator.ATOMIC];case 1:return[(b.valueToCode(a,"ADD0",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".toString()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];default:const c=Array(a.itemCount_);
for(let d=0;d<a.itemCount_;d++)c[d]=b.valueToCode(a,"ADD"+d,Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return["["+c.join(",")+"].join()",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]}},text_append$$module$build$src$generators$dart$text=function(a,b){const c=b.getVariableName(a.getFieldValue("VAR"));a=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return c+" = ["+c+", "+a+"].join();\n"},text_length$$module$build$src$generators$dart$text=
function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".length",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_isEmpty$$module$build$src$generators$dart$text=function(a,b){return[(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".isEmpty",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_indexOf$$module$build$src$generators$dart$text=
function(a,b){const c=a.getFieldValue("END")==="FIRST"?"indexOf":"lastIndexOf",d=b.valueToCode(a,"FIND",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";b=(b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+"."+c+"("+d+")";return a.workspace.options.oneBasedIndex?[b+" + 1",Order$$module$build$src$generators$dart$dart_generator.ADDITIVE]:[b,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_charAt$$module$build$src$generators$dart$text=
function(a,b){const c=a.getFieldValue("WHERE")||"FROM_START",d=b.valueToCode(a,"VALUE",c==="FIRST"||c==="FROM_START"?Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX:Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";switch(c){case "FIRST":return[d+"[0]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];case "FROM_START":return a=b.getAdjusted(a,"AT"),[d+"["+a+"]",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];case "LAST":case "FROM_END":return a=
c==="LAST"?1:b.getAdjusted(a,"AT",1),[`${b.provideFunction_("text_get_from_end",`
String ${b.FUNCTION_NAME_PLACEHOLDER_}(String text, num x) {
  return text[text.length - x];
}
`)}(${d}, ${a})`,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX];case "RANDOM":return b.definitions_.import_dart_math="import 'dart:math' as Math;",[b.provideFunction_("text_random_letter",`
String ${b.FUNCTION_NAME_PLACEHOLDER_}(String text) {
  int x = new Math.Random().nextInt(text.length);
  return text[x];
}
`)+"("+d+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]}throw Error("Unhandled option (text_charAt).");},text_getSubstring$$module$build$src$generators$dart$text=function(a,b){var c=a.getFieldValue("WHERE1");const d=a.getFieldValue("WHERE2"),e=c!=="FROM_END"&&d==="FROM_START",f=b.valueToCode(a,"STRING",e?Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX:Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";if(c==="FIRST"&&d==="LAST")return[f,
Order$$module$build$src$generators$dart$dart_generator.NONE];if(f.match(/^'?\w+'?$/)||e){switch(c){case "FROM_START":c=b.getAdjusted(a,"AT1");break;case "FROM_END":c=b.getAdjusted(a,"AT1",1,!1,Order$$module$build$src$generators$dart$dart_generator.ADDITIVE);c=f+".length - "+c;break;case "FIRST":c="0";break;default:throw Error("Unhandled option (text_getSubstring).");}switch(d){case "FROM_START":var g=b.getAdjusted(a,"AT2",1);break;case "FROM_END":g=b.getAdjusted(a,"AT2",0,!1,Order$$module$build$src$generators$dart$dart_generator.ADDITIVE);
g=f+".length - "+g;break;case "LAST":break;default:throw Error("Unhandled option (text_getSubstring).");}b=d==="LAST"?f+".substring("+c+")":f+".substring("+c+", "+g+")"}else g=b.getAdjusted(a,"AT1"),a=b.getAdjusted(a,"AT2"),b=b.provideFunction_("text_get_substring",`
String ${b.FUNCTION_NAME_PLACEHOLDER_}(String text, String where1, num at1, String where2, num at2) {
  int getAt(String where, num at) {
    if (where == 'FROM_END') {
      at = text.length - 1 - at;
    } else if (where == 'FIRST') {
      at = 0;
    } else if (where == 'LAST') {
      at = text.length - 1;
    } else if (where != 'FROM_START') {
      throw 'Unhandled option (text_getSubstring).';
    }
    return at;
  }
  at1 = getAt(where1, at1);
  at2 = getAt(where2, at2) + 1;
  return text.substring(at1, at2);
}
`)+"("+f+", '"+c+"', "+g+", '"+d+"', "+a+")";return[b,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_changeCase$$module$build$src$generators$dart$text=function(a,b){const c={UPPERCASE:".toUpperCase()",LOWERCASE:".toLowerCase()",TITLECASE:null}[a.getFieldValue("CASE")];a=b.valueToCode(a,"TEXT",c?Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX:Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return[c?a+c:b.provideFunction_("text_toTitleCase",
`
String ${b.FUNCTION_NAME_PLACEHOLDER_}(String str) {
  RegExp exp = new RegExp(r'\\b');
  List<String> list = str.split(exp);
  final title = new StringBuffer();
  for (String part in list) {
    if (part.length > 0) {
      title.write(part[0].toUpperCase());
      if (part.length > 0) {
        title.write(part.substring(1).toLowerCase());
      }
    }
  }
  return title.toString();
}
`)+"("+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_trim$$module$build$src$generators$dart$text=function(a,b){const c={LEFT:".replaceFirst(new RegExp(r'^\\s+'), '')",RIGHT:".replaceFirst(new RegExp(r'\\s+$'), '')",BOTH:".trim()"}[a.getFieldValue("MODE")];return[(b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+c,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_print$$module$build$src$generators$dart$text=
function(a,b){return"print("+(b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''")+");\n"},text_prompt_ext$$module$build$src$generators$dart$text=function(a,b){b.definitions_.import_dart_html="import 'dart:html' as Html;";let c="Html.window.prompt("+(a.getField("TEXT")?b.quote_(a.getFieldValue("TEXT")):b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''")+", '')";a.getFieldValue("TYPE")==="NUMBER"&&(b.definitions_.import_dart_math=
"import 'dart:math' as Math;",c="Math.parseDouble("+c+")");return[c,Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_count$$module$build$src$generators$dart$text=function(a,b){const c=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";a=b.valueToCode(a,"SUB",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return[b.provideFunction_("text_count",`
int ${b.FUNCTION_NAME_PLACEHOLDER_}(String haystack, String needle) {
  if (needle.length == 0) {
    return haystack.length + 1;
  }
  int index = 0;
  int count = 0;
  while (index != -1) {
    index = haystack.indexOf(needle, index);
    if (index != -1) {
      count++;
     index += needle.length;
    }
  }
  return count;
}
`)+"("+c+", "+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},text_replace$$module$build$src$generators$dart$text=function(a,b){const c=b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''",d=b.valueToCode(a,"FROM",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";a=b.valueToCode(a,"TO",Order$$module$build$src$generators$dart$dart_generator.NONE)||"''";return[c+".replaceAll("+d+", "+a+")",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX]},
text_reverse$$module$build$src$generators$dart$text=function(a,b){return["new String.fromCharCodes("+(b.valueToCode(a,"TEXT",Order$$module$build$src$generators$dart$dart_generator.UNARY_POSTFIX)||"''")+".runes.toList().reversed)",Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX]},variables_get$$module$build$src$generators$dart$variables=function(a,b){return[b.getVariableName(a.getFieldValue("VAR")),Order$$module$build$src$generators$dart$dart_generator.ATOMIC]},variables_set$$module$build$src$generators$dart$variables=
function(a,b){const c=b.valueToCode(a,"VALUE",Order$$module$build$src$generators$dart$dart_generator.ASSIGNMENT)||"0";return b.getVariableName(a.getFieldValue("VAR"))+" = "+c+";\n"},Order$$module$build$src$generators$dart$dart_generator;
(function(a){a[a.ATOMIC=0]="ATOMIC";a[a.UNARY_POSTFIX=1]="UNARY_POSTFIX";a[a.UNARY_PREFIX=2]="UNARY_PREFIX";a[a.MULTIPLICATIVE=3]="MULTIPLICATIVE";a[a.ADDITIVE=4]="ADDITIVE";a[a.SHIFT=5]="SHIFT";a[a.BITWISE_AND=6]="BITWISE_AND";a[a.BITWISE_XOR=7]="BITWISE_XOR";a[a.BITWISE_OR=8]="BITWISE_OR";a[a.RELATIONAL=9]="RELATIONAL";a[a.EQUALITY=10]="EQUALITY";a[a.LOGICAL_AND=11]="LOGICAL_AND";a[a.LOGICAL_OR=12]="LOGICAL_OR";a[a.IF_NULL=13]="IF_NULL";a[a.CONDITIONAL=14]="CONDITIONAL";a[a.CASCADE=15]="CASCADE";
a[a.ASSIGNMENT=16]="ASSIGNMENT";a[a.NONE=99]="NONE"})(Order$$module$build$src$generators$dart$dart_generator||(Order$$module$build$src$generators$dart$dart_generator={}));
var DartGenerator$$module$build$src$generators$dart$dart_generator=class extends $.CodeGenerator$$module$build$src$core$generator{constructor(a="Dart"){super(a);this.isInitialized=!1;for(const b in Order$$module$build$src$generators$dart$dart_generator)a=Order$$module$build$src$generators$dart$dart_generator[b],typeof a!=="string"&&(this["ORDER_"+b]=a);this.addReservedWords("assert,break,case,catch,class,const,continue,default,do,else,enum,extends,false,final,finally,for,if,in,is,new,null,rethrow,return,super,switch,this,throw,true,try,var,void,while,with,print,identityHashCode,identical,BidirectionalIterator,Comparable,double,Function,int,Invocation,Iterable,Iterator,List,Map,Match,num,Pattern,RegExp,Set,StackTrace,String,StringSink,Type,bool,DateTime,Deprecated,Duration,Expando,Null,Object,RuneIterator,Runes,Stopwatch,StringBuffer,Symbol,Uri,Comparator,AbstractClassInstantiationError,ArgumentError,AssertionError,CastError,ConcurrentModificationError,CyclicInitializationError,Error,Exception,FallThroughError,FormatException,IntegerDivisionByZeroException,NoSuchMethodError,NullThrownError,OutOfMemoryError,RangeError,StackOverflowError,StateError,TypeError,UnimplementedError,UnsupportedError")}init(a){super.init(a);
this.nameDB_?this.nameDB_.reset():this.nameDB_=new $.Names$$module$build$src$core$names(this.RESERVED_WORDS_);this.nameDB_.setVariableMap(a.getVariableMap());this.nameDB_.populateVariables(a);this.nameDB_.populateProcedures(a);const b=[];var c=$.allDeveloperVariables$$module$build$src$core$variables(a);for(let d=0;d<c.length;d++)b.push(this.nameDB_.getName(c[d],$.NameType$$module$build$src$core$names.DEVELOPER_VARIABLE));a=$.allUsedVarModels$$module$build$src$core$variables(a);for(c=0;c<a.length;c++)b.push(this.nameDB_.getName(a[c].getId(),
$.NameType$$module$build$src$core$names.VARIABLE));b.length&&(this.definitions_.variables="var "+b.join(", ")+";");this.isInitialized=!0}finish(a){a&&(a=this.prefixLines(a,this.INDENT));a="main() {\n"+a+"}";const b=[],c=[];for(let d in this.definitions_){const e=this.definitions_[d];e.match(/^import\s/)?b.push(e):c.push(e)}a=super.finish(a);this.isInitialized=!1;this.nameDB_.reset();return(b.join("\n")+"\n\n"+c.join("\n\n")).replace(/\n\n+/g,"\n\n").replace(/\n*$/,"\n\n\n")+a}scrubNakedValue(a){return a+
";\n"}quote_(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/\$/g,"\\$").replace(/'/g,"\\'");return"'"+a+"'"}multiline_quote_(a){return a.split(/\n/g).map(this.quote_).join(" + '\\n' + \n")}scrub_(a,b,c=!1){let d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=$.wrap$$module$build$src$core$utils$string(e,this.COMMENT_WRAP-3),d=a.getProcedureDef?d+this.prefixLines(e+"\n","/// "):d+this.prefixLines(e+"\n","// "));for(let f=0;f<a.inputList.length;f++)a.inputList[f].type===
$.inputTypes$$module$build$src$core$inputs$input_types.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&(d+=this.prefixLines(e,"// "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c}getAdjusted(a,b,c=0,d=!1,e=Order$$module$build$src$generators$dart$dart_generator.NONE){a.workspace.options.oneBasedIndex&&c--;const f=a.workspace.options.oneBasedIndex?"1":"0";let g=e;c?g=Order$$module$build$src$generators$dart$dart_generator.ADDITIVE:
d&&(g=Order$$module$build$src$generators$dart$dart_generator.UNARY_PREFIX);a=this.valueToCode(a,b,g)||f;if(c===0&&!d)return a;if($.isNumber$$module$build$src$core$utils$string(a))return a=String(Number(a)+c),d&&(a=String(-Number(a))),a;c>0?a=`${a} + ${c}`:c<0&&(a=`${a} - ${-c}`);d&&(a=c?`-(${a})`:`-${a}`);Math.floor(e)>=Math.floor(g)&&(a=`(${a})`);return a}},module$build$src$generators$dart$dart_generator={};module$build$src$generators$dart$dart_generator.DartGenerator=DartGenerator$$module$build$src$generators$dart$dart_generator;
module$build$src$generators$dart$dart_generator.Order=Order$$module$build$src$generators$dart$dart_generator;var module$build$src$generators$dart$lists={};module$build$src$generators$dart$lists.lists_create_empty=lists_create_empty$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_create_with=lists_create_with$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_getIndex=lists_getIndex$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_getSublist=lists_getSublist$$module$build$src$generators$dart$lists;
module$build$src$generators$dart$lists.lists_indexOf=lists_indexOf$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_isEmpty=lists_isEmpty$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_length=lists_length$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_repeat=lists_repeat$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_reverse=lists_reverse$$module$build$src$generators$dart$lists;
module$build$src$generators$dart$lists.lists_setIndex=lists_setIndex$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_sort=lists_sort$$module$build$src$generators$dart$lists;module$build$src$generators$dart$lists.lists_split=lists_split$$module$build$src$generators$dart$lists;var controls_ifelse$$module$build$src$generators$dart$logic=controls_if$$module$build$src$generators$dart$logic,module$build$src$generators$dart$logic={};module$build$src$generators$dart$logic.controls_if=controls_if$$module$build$src$generators$dart$logic;module$build$src$generators$dart$logic.controls_ifelse=controls_if$$module$build$src$generators$dart$logic;module$build$src$generators$dart$logic.logic_boolean=logic_boolean$$module$build$src$generators$dart$logic;
module$build$src$generators$dart$logic.logic_compare=logic_compare$$module$build$src$generators$dart$logic;module$build$src$generators$dart$logic.logic_negate=logic_negate$$module$build$src$generators$dart$logic;module$build$src$generators$dart$logic.logic_null=logic_null$$module$build$src$generators$dart$logic;module$build$src$generators$dart$logic.logic_operation=logic_operation$$module$build$src$generators$dart$logic;module$build$src$generators$dart$logic.logic_ternary=logic_ternary$$module$build$src$generators$dart$logic;var controls_repeat$$module$build$src$generators$dart$loops=controls_repeat_ext$$module$build$src$generators$dart$loops,module$build$src$generators$dart$loops={};module$build$src$generators$dart$loops.controls_flow_statements=controls_flow_statements$$module$build$src$generators$dart$loops;module$build$src$generators$dart$loops.controls_for=controls_for$$module$build$src$generators$dart$loops;module$build$src$generators$dart$loops.controls_forEach=controls_forEach$$module$build$src$generators$dart$loops;
module$build$src$generators$dart$loops.controls_repeat=controls_repeat_ext$$module$build$src$generators$dart$loops;module$build$src$generators$dart$loops.controls_repeat_ext=controls_repeat_ext$$module$build$src$generators$dart$loops;module$build$src$generators$dart$loops.controls_whileUntil=controls_whileUntil$$module$build$src$generators$dart$loops;var math_round$$module$build$src$generators$dart$math=math_single$$module$build$src$generators$dart$math,math_trig$$module$build$src$generators$dart$math=math_single$$module$build$src$generators$dart$math,module$build$src$generators$dart$math={};module$build$src$generators$dart$math.math_arithmetic=math_arithmetic$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_atan2=math_atan2$$module$build$src$generators$dart$math;
module$build$src$generators$dart$math.math_change=math_change$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_constant=math_constant$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_constrain=math_constrain$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_modulo=math_modulo$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_number=math_number$$module$build$src$generators$dart$math;
module$build$src$generators$dart$math.math_number_property=math_number_property$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_on_list=math_on_list$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_random_float=math_random_float$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_random_int=math_random_int$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_round=math_single$$module$build$src$generators$dart$math;
module$build$src$generators$dart$math.math_single=math_single$$module$build$src$generators$dart$math;module$build$src$generators$dart$math.math_trig=math_single$$module$build$src$generators$dart$math;var procedures_defnoreturn$$module$build$src$generators$dart$procedures=procedures_defreturn$$module$build$src$generators$dart$procedures,module$build$src$generators$dart$procedures={};module$build$src$generators$dart$procedures.procedures_callnoreturn=procedures_callnoreturn$$module$build$src$generators$dart$procedures;module$build$src$generators$dart$procedures.procedures_callreturn=procedures_callreturn$$module$build$src$generators$dart$procedures;
module$build$src$generators$dart$procedures.procedures_defnoreturn=procedures_defreturn$$module$build$src$generators$dart$procedures;module$build$src$generators$dart$procedures.procedures_defreturn=procedures_defreturn$$module$build$src$generators$dart$procedures;module$build$src$generators$dart$procedures.procedures_ifreturn=procedures_ifreturn$$module$build$src$generators$dart$procedures;var text_prompt$$module$build$src$generators$dart$text=text_prompt_ext$$module$build$src$generators$dart$text,module$build$src$generators$dart$text={};module$build$src$generators$dart$text.text=text$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_append=text_append$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_changeCase=text_changeCase$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_charAt=text_charAt$$module$build$src$generators$dart$text;
module$build$src$generators$dart$text.text_count=text_count$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_getSubstring=text_getSubstring$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_indexOf=text_indexOf$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_isEmpty=text_isEmpty$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_join=text_join$$module$build$src$generators$dart$text;
module$build$src$generators$dart$text.text_length=text_length$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_print=text_print$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_prompt=text_prompt_ext$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_prompt_ext=text_prompt_ext$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_replace=text_replace$$module$build$src$generators$dart$text;
module$build$src$generators$dart$text.text_reverse=text_reverse$$module$build$src$generators$dart$text;module$build$src$generators$dart$text.text_trim=text_trim$$module$build$src$generators$dart$text;var module$build$src$generators$dart$variables={};module$build$src$generators$dart$variables.variables_get=variables_get$$module$build$src$generators$dart$variables;module$build$src$generators$dart$variables.variables_set=variables_set$$module$build$src$generators$dart$variables;var module$build$src$generators$dart$variables_dynamic={};module$build$src$generators$dart$variables_dynamic.variables_get_dynamic=variables_get$$module$build$src$generators$dart$variables;module$build$src$generators$dart$variables_dynamic.variables_set_dynamic=variables_set$$module$build$src$generators$dart$variables;var dartGenerator$$module$build$src$generators$dart=new DartGenerator$$module$build$src$generators$dart$dart_generator;dartGenerator$$module$build$src$generators$dart.addReservedWords("Html,Math");
var generators$$module$build$src$generators$dart=Object.assign({},module$build$src$generators$dart$lists,module$build$src$generators$dart$logic,module$build$src$generators$dart$loops,module$build$src$generators$dart$math,module$build$src$generators$dart$procedures,module$build$src$generators$dart$text,module$build$src$generators$dart$variables,module$build$src$generators$dart$variables_dynamic);
for(const a in generators$$module$build$src$generators$dart)dartGenerator$$module$build$src$generators$dart.forBlock[a]=generators$$module$build$src$generators$dart[a];var module$build$src$generators$dart={};module$build$src$generators$dart.DartGenerator=DartGenerator$$module$build$src$generators$dart$dart_generator;module$build$src$generators$dart.Order=Order$$module$build$src$generators$dart$dart_generator;module$build$src$generators$dart.dartGenerator=dartGenerator$$module$build$src$generators$dart;
module$build$src$generators$dart.__namespace__=$;
return module$build$src$generators$dart;
}));


//# sourceMappingURL=dart_compressed.js.map
