function imcs_layoutengine(){
  var $intern_0 = '', $intern_1 = 0, $intern_2 = 'gwt.codesvr=', $intern_3 = 'gwt.hosted=', $intern_4 = 'gwt.hybrid', $intern_5 = 'imcs_layoutengine', $intern_6 = '__gwt_marker_imcs_layoutengine', $intern_7 = '<script id="', $intern_8 = '"><\/script>', $intern_9 = 'SCRIPT', $intern_10 = '#', $intern_11 = '?', $intern_12 = '/', $intern_13 = 1, $intern_14 = 'base', $intern_15 = 'img', $intern_16 = 'clear.cache.gif', $intern_17 = 'meta', $intern_18 = 'name', $intern_19 = 'gwt:property', $intern_20 = 'content', $intern_21 = '=', $intern_22 = 'gwt:onPropertyErrorFn', $intern_23 = 'Bad handler "', $intern_24 = '" for "gwt:onPropertyErrorFn"', $intern_25 = 'gwt:onLoadErrorFn', $intern_26 = '" for "gwt:onLoadErrorFn"', $intern_27 = 'Single-script hosted mode not yet implemented. See issue ', $intern_28 = 'http://code.google.com/p/google-web-toolkit/issues/detail?id=2079', $intern_29 = '5734914FD858B0D08E9039060A5AF047', $intern_30 = ':', $intern_31 = 'DOMContentLoaded', $intern_32 = 50;
  var $wnd = window, $doc = document, gwtOnLoad, bodyDone, base = $intern_0, metaProps = {}, values = [], providers = [], answers = [], softPermutationId = $intern_1, onLoadErrorFunc, propertyErrorFunc;
  if (!$wnd.__gwt_stylesLoaded) {
    $wnd.__gwt_stylesLoaded = {};
  }
  if (!$wnd.__gwt_scriptsLoaded) {
    $wnd.__gwt_scriptsLoaded = {};
  }
  function isHostedMode(){
    var result = false;
    try {
      var query = $wnd.location.search;
      return (query.indexOf($intern_2) != -1 || (query.indexOf($intern_3) != -1 || $wnd.external && $wnd.external.gwtOnLoad)) && query.indexOf($intern_4) == -1;
    }
     catch (e) {
    }
    isHostedMode = function(){
      return result;
    }
    ;
    return result;
  }

  function maybeStartModule(){
    if (gwtOnLoad && bodyDone) {
      gwtOnLoad(onLoadErrorFunc, $intern_5, base, softPermutationId);
    }
  }

  function computeScriptBase(){
    var thisScript, markerId = $intern_6, markerScript;
    $doc.write($intern_7 + markerId + $intern_8);
    markerScript = $doc.getElementById(markerId);
    thisScript = markerScript && markerScript.previousSibling;
    while (thisScript && thisScript.tagName != $intern_9) {
      thisScript = thisScript.previousSibling;
    }
    function getDirectoryOfFile(path){
      var hashIndex = path.lastIndexOf($intern_10);
      if (hashIndex == -1) {
        hashIndex = path.length;
      }
      var queryIndex = path.indexOf($intern_11);
      if (queryIndex == -1) {
        queryIndex = path.length;
      }
      var slashIndex = path.lastIndexOf($intern_12, Math.min(queryIndex, hashIndex));
      return slashIndex >= $intern_1?path.substring($intern_1, slashIndex + $intern_13):$intern_0;
    }

    ;
    if (thisScript && thisScript.src) {
      base = getDirectoryOfFile(thisScript.src);
    }
    if (base == $intern_0) {
      var baseElements = $doc.getElementsByTagName($intern_14);
      if (baseElements.length > $intern_1) {
        base = baseElements[baseElements.length - $intern_13].href;
      }
       else {
        base = getDirectoryOfFile($doc.location.href);
      }
    }
     else if (base.match(/^\w+:\/\//)) {
    }
     else {
      var img = $doc.createElement($intern_15);
      img.src = base + $intern_16;
      base = getDirectoryOfFile(img.src);
    }
    if (markerScript) {
      markerScript.parentNode.removeChild(markerScript);
    }
  }

  function processMetas(){
    var metas = document.getElementsByTagName($intern_17);
    for (var i = $intern_1, n = metas.length; i < n; ++i) {
      var meta = metas[i], name_0 = meta.getAttribute($intern_18), content;
      if (name_0) {
        if (name_0 == $intern_19) {
          content = meta.getAttribute($intern_20);
          if (content) {
            var value_0, eq = content.indexOf($intern_21);
            if (eq >= $intern_1) {
              name_0 = content.substring($intern_1, eq);
              value_0 = content.substring(eq + $intern_13);
            }
             else {
              name_0 = content;
              value_0 = $intern_0;
            }
            metaProps[name_0] = value_0;
          }
        }
         else if (name_0 == $intern_22) {
          content = meta.getAttribute($intern_20);
          if (content) {
            try {
              propertyErrorFunc = eval(content);
            }
             catch (e) {
              alert($intern_23 + content + $intern_24);
            }
          }
        }
         else if (name_0 == $intern_25) {
          content = meta.getAttribute($intern_20);
          if (content) {
            try {
              onLoadErrorFunc = eval(content);
            }
             catch (e) {
              alert($intern_23 + content + $intern_26);
            }
          }
        }
      }
    }
  }

  __gwt_isKnownPropertyValue = function(propName, propValue){
    return propValue in values[propName];
  }
  ;
  __gwt_getMetaProperty = function(name_0){
    var value_0 = metaProps[name_0];
    return value_0 == null?null:value_0;
  }
  ;
  imcs_layoutengine.onScriptLoad = function(gwtOnLoadFunc){
    imcs_layoutengine = null;
    gwtOnLoad = gwtOnLoadFunc;
    maybeStartModule();
  }
  ;
  if (isHostedMode()) {
    alert($intern_27 + $intern_28);
    return;
  }
  computeScriptBase();
  processMetas();
  try {
    var strongName;
    strongName = $intern_29;
    var idx = strongName.indexOf($intern_30);
    if (idx != -1) {
      softPermutationId = Number(strongName.substring(idx + $intern_13));
    }
  }
   catch (e) {
    return;
  }
  var onBodyDoneTimerId;
  function onBodyDone(){
    if (!bodyDone) {
      bodyDone = true;
      maybeStartModule();
      if ($doc.removeEventListener) {
        $doc.removeEventListener($intern_31, onBodyDone, false);
      }
      if (onBodyDoneTimerId) {
        clearInterval(onBodyDoneTimerId);
      }
    }
  }

  if ($doc.addEventListener) {
    $doc.addEventListener($intern_31, function(){
      onBodyDone();
    }
    , false);
  }
  var onBodyDoneTimerId = setInterval(function(){
    if (/loaded|complete/.test($doc.readyState)) {
      onBodyDone();
    }
  }
  , $intern_32);
}

imcs_layoutengine();
(function () {var $gwt_version = "2.7.0";var $wnd = window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '5734914FD858B0D08E9039060A5AF047';var $intern_0 = 'object', $intern_1 = 2147483647, $intern_2 = 'java.lang', $intern_3 = 'com.google.gwt.core.client', $intern_4 = {5:1, 25:1}, $intern_5 = 'com.google.gwt.core.client.impl', $intern_6 = 'fromIndex: ', $intern_7 = 10000, $intern_8 = 4194303, $intern_9 = 1048575, $intern_10 = 524288, $intern_11 = 4194304, $intern_12 = 17592186044416, $intern_13 = -9223372036854775808, $intern_14 = {5:1, 6:1, 8:1}, $intern_15 = 1000000000, $intern_16 = 'java.awt.geom', $intern_17 = {15:1, 5:1, 6:1}, $intern_18 = 1.52587890625E-5, $intern_19 = 0.25, $intern_20 = -Infinity, $intern_21 = {30:1}, $intern_22 = 'java.util', $intern_23 = {94:1}, $intern_24 = {30:1, 56:1}, $intern_25 = {30:1, 69:1}, $intern_26 = 'PriorityQueue', $intern_27 = 15525485, $intern_28 = 5.9604644775390625E-8, $intern_29 = 16777216, $intern_30 = 'subMap: ', $intern_31 = ' less than ', $intern_32 = {5:1, 6:1, 47:1, 8:1}, $intern_33 = {5:1, 29:1, 36:1, 82:1}, $intern_34 = 'ORTHOGONAL', $intern_35 = 1.0000000001E9, $intern_36 = -1.0000000001E9, $intern_37 = 0.01, $intern_38 = 'lv.lumii.diagramlayout', $intern_39 = 'lv.lumii.dialoglayout', $intern_40 = 'LEFT', $intern_41 = 'RIGHT', $intern_42 = 'CENTER', $intern_43 = 'TOP', $intern_44 = 'BOTTOM', $intern_45 = {5:1, 6:1, 275:1}, $intern_46 = {5:1, 6:1, 8:1, 38:1}, $intern_47 = 'VerticalBox', $intern_48 = 'HorizontalBox', $intern_49 = 'lv.lumii.dialoglayout.components', $intern_50 = 100000, $intern_51 = -9999, $intern_52 = 'lv.lumii.layoutengine', $intern_53 = Infinity, $intern_54 = {95:1, 5:1, 6:1}, $intern_55 = 9.0E-6, $intern_56 = {14:1, 5:1, 6:1}, $intern_57 = 'Lines connected to lines are not supported yet.', $intern_58 = 'A diagram cannot have INHERITED as its style.', $intern_59 = 'Lines conneting to lines not implemented yet', $intern_60 = 'error in nested lines', $intern_61 = {87:1}, $intern_62 = 1.7976931348623157E308, $intern_63 = -1.7976931348623157E308, $intern_64 = 'Lines cannot connect boxes between diagrams.', $intern_65 = 'At least one side must be allowed.', $intern_66 = 'Lines conneting to lines not implemented yet.', $intern_67 = 'The number of points is less than 2.', $intern_68 = 'Lines connecting to lines not implemented yet.', $intern_69 = 'lv.lumii.layoutengine.obstacleGraph', $intern_70 = {29:1, 21:1, 24:1, 59:1}, $intern_71 = -2147483648, $intern_72 = 'Only vertical line outside label segments on horizontal line segments can be updated.', $intern_73 = {5:1, 6:1, 8:1, 187:1}, $intern_74 = {70:1}, $intern_75 = {5:1, 29:1, 36:1, 86:1}, $intern_76 = 0.002, $intern_77 = {5:1, 6:1, 8:1, 166:1}, $intern_78 = 'lv.lumii.layoutengine.flowLayout', $intern_79 = 'lv.lumii.layoutengine.flowLayout.horizontalOrdering', $intern_80 = 'Check failed!', $intern_81 = 'lv.lumii.layoutengine.flowLayout.horizontalOrdering.pqtree', $intern_82 = 'lv.lumii.layoutengine.funcmin', $intern_83 = {186:1, 5:1, 6:1}, $intern_84 = 'lv.lumii.layoutengine.polyomino', $intern_85 = 'lv.lumii.layoutengine.springembedder', $intern_86 = 3.141592653589793, $intern_87 = 'lv.lumii.layoutengine.universalLayout', $intern_88 = 'lv.lumii.layoutengine.util', $intern_89 = 'com.google.gwt.lang';
var _, com_google_gwt_lang_ModuleUtils_initFnList, com_google_gwt_lang_JavaClassHierarchySetupUtil_prototypesByTypeId = {}, com_google_gwt_lang_CollapsedPropertyHolder_permutationId = -1;
function com_google_gwt_lang_JavaClassHierarchySetupUtil_typeMarkerFn__V(){
}

function com_google_gwt_lang_JavaClassHierarchySetupUtil_portableObjCreate__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(obj){
  function F(){
  }

  ;
  F.prototype = obj || {};
  return new F;
}

function com_google_gwt_lang_JavaClassHierarchySetupUtil_modernizeBrowser__V(){
  !Array.isArray && (Array.isArray = function(vArg){
    return Object.prototype.toString.call(vArg) === '[object Array]';
  }
  );
}

function com_google_gwt_lang_JavaClassHierarchySetupUtil_maybeGetClassLiteralFromPlaceHolder__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(entry){
  return entry instanceof Array?entry[0]:null;
}

function com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V(){
}

function com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(typeId, superTypeId, castableTypeMap){
  var prototypesByTypeId = com_google_gwt_lang_JavaClassHierarchySetupUtil_prototypesByTypeId;
  var createSubclassPrototype = com_google_gwt_lang_JavaClassHierarchySetupUtil_createSubclassPrototype__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2;
  var maybeGetClassLiteralFromPlaceHolder = com_google_gwt_lang_JavaClassHierarchySetupUtil_maybeGetClassLiteralFromPlaceHolder__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2;
  var prototype = prototypesByTypeId[typeId];
  var clazz = maybeGetClassLiteralFromPlaceHolder(prototype);
  if (prototype && !clazz) {
    _ = prototype;
  }
   else {
    _ = prototypesByTypeId[typeId] = !superTypeId?{}:createSubclassPrototype(superTypeId);
    _.java_lang_Object_castableTypeMap$ = castableTypeMap;
    _.constructor = _;
    !superTypeId && (_.java_lang_Object_typeMarker$ = com_google_gwt_lang_JavaClassHierarchySetupUtil_typeMarkerFn__V);
  }
  for (var i = 3; i < arguments.length; ++i) {
    arguments[i].prototype = _;
  }
  clazz && (_.java_lang_Object__1_1_1clazz$ = clazz);
}

function com_google_gwt_lang_JavaClassHierarchySetupUtil_createSubclassPrototype__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(superTypeId){
  var prototypesByTypeId = com_google_gwt_lang_JavaClassHierarchySetupUtil_prototypesByTypeId;
  return com_google_gwt_lang_JavaClassHierarchySetupUtil_portableObjCreate__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(prototypesByTypeId[superTypeId]);
}

function com_google_gwt_lang_ModuleUtils_setGwtProperty__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2V(propertyName, propertyValue){
  typeof window === $intern_0 && typeof window['$gwt'] === $intern_0 && (window['$gwt'][propertyName] = propertyValue);
}

function com_google_gwt_lang_ModuleUtils_registerEntry__Lcom_google_gwt_core_client_JavaScriptObject_2(){
  return com_google_gwt_core_client_impl_Impl_entry__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2;
}

function com_google_gwt_lang_ModuleUtils_gwtOnLoad__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2V(errFn, modName, modBase, softPermutationId){
  com_google_gwt_lang_ModuleUtils_ensureModuleInit__V();
  var initFnList = com_google_gwt_lang_ModuleUtils_initFnList;
  $moduleName = modName;
  $moduleBase = modBase;
  com_google_gwt_lang_CollapsedPropertyHolder_permutationId = softPermutationId;
  function initializeModules(){
    for (var i = 0; i < initFnList.length; i++) {
      initFnList[i]();
    }
  }

  if (errFn) {
    try {
      $entry(initializeModules)();
    }
     catch (e) {
      errFn(modName, e);
    }
  }
   else {
    $entry(initializeModules)();
  }
}

function com_google_gwt_lang_ModuleUtils_ensureModuleInit__V(){
  com_google_gwt_lang_ModuleUtils_initFnList == null && (com_google_gwt_lang_ModuleUtils_initFnList = []);
}

function com_google_gwt_lang_ModuleUtils_addInitFunctions__V(){
  com_google_gwt_lang_ModuleUtils_ensureModuleInit__V();
  var initFnList = com_google_gwt_lang_ModuleUtils_initFnList;
  for (var i = 0; i < arguments.length; i++) {
    initFnList.push(arguments[i]);
  }
}

function java_lang_Object_$toString__Ljava_lang_Object_2Ljava_lang_String_2(this$static){
  return java_lang_Class_$getName__Ljava_lang_Class_2Ljava_lang_String_2(java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(this$static)) + '@' + (java_lang_Object_hashCode_1_1I_1_1devirtual$__Ljava_lang_Object_2I(this$static) >>> 0).toString(16);
}

function java_lang_Object_Object__V(){
}

function java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(this$static, other){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(this$static)?java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this$static, other):com_google_gwt_lang_Cast_hasJavaObjectVirtualDispatch__Ljava_lang_Object_2Z(this$static)?this$static.equals__Ljava_lang_Object_2Z$(other):com_google_gwt_lang_Cast_isJavaArray__Ljava_lang_Object_2Z(this$static)?this$static === other:this$static === other;
}

function java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(this$static){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(this$static)?com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1String_12_1classLit:com_google_gwt_lang_Cast_hasJavaObjectVirtualDispatch__Ljava_lang_Object_2Z(this$static)?this$static.java_lang_Object__1_1_1clazz$:com_google_gwt_lang_Cast_isJavaArray__Ljava_lang_Object_2Z(this$static)?this$static.java_lang_Object__1_1_1clazz$:com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1JavaScriptObject_12_1classLit;
}

function java_lang_Object_hashCode_1_1I_1_1devirtual$__Ljava_lang_Object_2I(this$static){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(this$static)?java_lang_String$HashCache_getHashCode__Ljava_lang_String_2I(this$static):com_google_gwt_lang_Cast_hasJavaObjectVirtualDispatch__Ljava_lang_Object_2Z(this$static)?this$static.hashCode__I$():com_google_gwt_lang_Cast_isJavaArray__Ljava_lang_Object_2Z(this$static)?com_google_gwt_core_client_impl_Impl_getHashCode__Ljava_lang_Object_2I(this$static):com_google_gwt_core_client_impl_Impl_getHashCode__Ljava_lang_Object_2I(this$static);
}

function java_lang_Object_toString_1_1Ljava_1lang_1String_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_String_2(this$static){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(this$static)?this$static:com_google_gwt_lang_Cast_hasJavaObjectVirtualDispatch__Ljava_lang_Object_2Z(this$static)?this$static.toString__Ljava_lang_String_2$():com_google_gwt_lang_Cast_isJavaArray__Ljava_lang_Object_2Z(this$static)?java_lang_Object_$toString__Ljava_lang_Object_2Ljava_lang_String_2(this$static):this$static.toString?this$static.toString():'[JavaScriptObject]';
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(1, null, {}, java_lang_Object_Object__V);
_.equals__Ljava_lang_Object_2Z$ = function java_lang_Object_equals__Ljava_lang_Object_2Z(other){
  return this === other;
}
;
_.getClass__Ljava_lang_Class_2$ = function java_lang_Object_getClass__Ljava_lang_Class_2(){
  return this.java_lang_Object__1_1_1clazz$;
}
;
_.hashCode__I$ = function java_lang_Object_hashCode__I(){
  return com_google_gwt_core_client_impl_Impl_getHashCode__Ljava_lang_Object_2I(this);
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Object_toString__Ljava_lang_String_2(){
  return java_lang_Object_$toString__Ljava_lang_Object_2Ljava_lang_String_2(this);
}
;
_.toString = function(){
  return this.toString__Ljava_lang_String_2$();
}
;
com_google_gwt_lang_Cast_stringCastMap = {5:1, 304:1, 29:1, 2:1};
com_google_gwt_lang_JavaClassHierarchySetupUtil_modernizeBrowser__V();
function com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(src_0, dstId){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(src_0) && !!com_google_gwt_lang_Cast_stringCastMap[dstId] || src_0.java_lang_Object_castableTypeMap$ && !!src_0.java_lang_Object_castableTypeMap$[dstId];
}

function com_google_gwt_lang_Cast_charToString__CLjava_lang_String_2(x_0){
  return String.fromCharCode(x_0);
}

function com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(src_0, dstId){
  if (src_0 != null && !com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(src_0, dstId)) {
    throw new java_lang_ClassCastException_ClassCastException__V;
  }
  return src_0;
}

function com_google_gwt_lang_Cast_dynamicCastJso__Ljava_lang_Object_2Ljava_lang_Object_2(src_0){
  if (src_0 != null && !(!com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(src_0) && !com_google_gwt_lang_Util_hasTypeMarker__Ljava_lang_Object_2Z(src_0))) {
    throw new java_lang_ClassCastException_ClassCastException__V;
  }
  return src_0;
}

function com_google_gwt_lang_Cast_dynamicCastToString__Ljava_lang_Object_2Ljava_lang_Object_2(src_0){
  if (src_0 != null && !com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(src_0)) {
    throw new java_lang_ClassCastException_ClassCastException__V;
  }
  return src_0;
}

function com_google_gwt_lang_Cast_hasJavaObjectVirtualDispatch__Ljava_lang_Object_2Z(src_0){
  return !com_google_gwt_lang_Cast_instanceofArray__Ljava_lang_Object_2Z(src_0) && com_google_gwt_lang_Util_hasTypeMarker__Ljava_lang_Object_2Z(src_0);
}

function com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(src_0, dstId){
  return src_0 != null && com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(src_0, dstId);
}

function com_google_gwt_lang_Cast_instanceOfJso__Ljava_lang_Object_2Z(src_0){
  return src_0 != null && !com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(src_0) && !com_google_gwt_lang_Util_hasTypeMarker__Ljava_lang_Object_2Z(src_0);
}

function com_google_gwt_lang_Cast_instanceofArray__Ljava_lang_Object_2Z(src_0){
  return Array.isArray(src_0);
}

function com_google_gwt_lang_Cast_isJavaArray__Ljava_lang_Object_2Z(src_0){
  return com_google_gwt_lang_Cast_instanceofArray__Ljava_lang_Object_2Z(src_0) && com_google_gwt_lang_Util_hasTypeMarker__Ljava_lang_Object_2Z(src_0);
}

function com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(src_0){
  return typeof src_0 === 'string';
}

function com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(src_0){
  return src_0 == null?null:src_0;
}

function com_google_gwt_lang_Cast_narrow_1byte__DB(x_0){
  return x_0 << 24 >> 24;
}

function com_google_gwt_lang_Cast_round_1int__DI(x_0){
  return ~~Math.max(Math.min(x_0, $intern_1), -2147483648);
}

function com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(o){
  if (o != null) {
    throw new java_lang_ClassCastException_ClassCastException__V;
  }
  return null;
}

var com_google_gwt_lang_Cast_stringCastMap;
function java_lang_Class_$ensureNamesAreInitialized__Ljava_lang_Class_2V(this$static){
  if (this$static.java_lang_Class_typeName != null) {
    return;
  }
  java_lang_Class_initializeNames__Ljava_lang_Class_2V(this$static);
}

function java_lang_Class_$getName__Ljava_lang_Class_2Ljava_lang_String_2(this$static){
  java_lang_Class_$ensureNamesAreInitialized__Ljava_lang_Class_2V(this$static);
  return this$static.java_lang_Class_typeName;
}

function java_lang_Class_Class__V(){
  ++java_lang_Class_nextSequentialId;
  this.java_lang_Class_typeName = null;
  this.java_lang_Class_simpleName = null;
  this.java_lang_Class_packageName = null;
  this.java_lang_Class_compoundName = null;
  this.java_lang_Class_canonicalName = null;
  this.java_lang_Class_typeId = null;
  this.java_lang_Class_arrayLiterals = null;
}

function java_lang_Class_createClassObject__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2(packageName, compoundClassName){
  var clazz;
  clazz = new java_lang_Class_Class__V;
  clazz.java_lang_Class_packageName = packageName;
  clazz.java_lang_Class_compoundName = compoundClassName;
  return clazz;
}

function java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2(packageName, compoundClassName, typeId){
  var clazz;
  clazz = java_lang_Class_createClassObject__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2(packageName, compoundClassName);
  java_lang_Class_maybeSetClassLiteral__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2V(typeId, clazz);
  return clazz;
}

function java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2(packageName, compoundClassName, typeId, enumConstantsFunc){
  var clazz;
  clazz = java_lang_Class_createClassObject__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2(packageName, compoundClassName);
  java_lang_Class_maybeSetClassLiteral__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2V(typeId, clazz);
  clazz.java_lang_Class_modifiers = enumConstantsFunc?8:0;
  clazz.java_lang_Class_enumConstantsFunc = enumConstantsFunc;
  return clazz;
}

function java_lang_Class_createForInterface__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_Class_2(packageName, compoundClassName){
  var clazz;
  clazz = java_lang_Class_createClassObject__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2(packageName, compoundClassName);
  clazz.java_lang_Class_modifiers = 2;
  return clazz;
}

function java_lang_Class_createForPrimitive__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2(className, primitiveTypeId){
  var clazz;
  clazz = java_lang_Class_createClassObject__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2('', className);
  clazz.java_lang_Class_typeId = primitiveTypeId;
  clazz.java_lang_Class_modifiers = 1;
  return clazz;
}

function java_lang_Class_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(leafClass, dimensions){
  var arrayLiterals = leafClass.java_lang_Class_arrayLiterals = leafClass.java_lang_Class_arrayLiterals || [];
  return arrayLiterals[dimensions] || (arrayLiterals[dimensions] = leafClass.private$java_lang_Class$createClassLiteralForArray__ILjava_lang_Class_2(dimensions));
}

function java_lang_Class_getPrototypeForClass__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2(clazz){
  if (clazz.isPrimitive__Z()) {
    return null;
  }
  var typeId = clazz.java_lang_Class_typeId;
  var prototype = com_google_gwt_lang_JavaClassHierarchySetupUtil_prototypesByTypeId[typeId];
  return prototype;
}

function java_lang_Class_initializeNames__Ljava_lang_Class_2V(clazz){
  if (clazz.isArray__Z()) {
    var componentType = clazz.java_lang_Class_componentType;
    componentType.isPrimitive__Z()?(clazz.java_lang_Class_typeName = '[' + componentType.java_lang_Class_typeId):!componentType.isArray__Z()?(clazz.java_lang_Class_typeName = '[L' + componentType.getName__Ljava_lang_String_2() + ';'):(clazz.java_lang_Class_typeName = '[' + componentType.getName__Ljava_lang_String_2());
    clazz.java_lang_Class_canonicalName = componentType.getCanonicalName__Ljava_lang_String_2() + '[]';
    clazz.java_lang_Class_simpleName = componentType.getSimpleName__Ljava_lang_String_2() + '[]';
    return;
  }
  var packageName = clazz.java_lang_Class_packageName;
  var compoundName = clazz.java_lang_Class_compoundName;
  compoundName = compoundName.split('/');
  clazz.java_lang_Class_typeName = java_lang_Class_join__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2('.', [packageName, java_lang_Class_join__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2('$', compoundName)]);
  clazz.java_lang_Class_canonicalName = java_lang_Class_join__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2('.', [packageName, java_lang_Class_join__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2('.', compoundName)]);
  clazz.java_lang_Class_simpleName = compoundName[compoundName.length - 1];
}

function java_lang_Class_join__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2(separator, strings){
  var i = 0;
  while (!strings[i] || strings[i] == '') {
    i++;
  }
  var result = strings[i++];
  for (; i < strings.length; i++) {
    if (!strings[i] || strings[i] == '') {
      continue;
    }
    result += separator + strings[i];
  }
  return result;
}

function java_lang_Class_maybeSetClassLiteral__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2V(typeId, clazz){
  var proto;
  if (!typeId) {
    return;
  }
  clazz.java_lang_Class_typeId = typeId;
  var prototype = java_lang_Class_getPrototypeForClass__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2(clazz);
  if (!prototype) {
    com_google_gwt_lang_JavaClassHierarchySetupUtil_prototypesByTypeId[typeId] = [clazz];
    return;
  }
  prototype.java_lang_Object__1_1_1clazz$ = clazz;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(167, 1, {}, java_lang_Class_Class__V);
_.private$java_lang_Class$createClassLiteralForArray__ILjava_lang_Class_2 = function java_lang_Class_createClassLiteralForArray__ILjava_lang_Class_2(dimensions){
  var clazz;
  clazz = new java_lang_Class_Class__V;
  clazz.java_lang_Class_modifiers = 4;
  dimensions > 1?(clazz.java_lang_Class_componentType = java_lang_Class_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(this, dimensions - 1)):(clazz.java_lang_Class_componentType = this);
  return clazz;
}
;
_.getCanonicalName__Ljava_lang_String_2 = function java_lang_Class_getCanonicalName__Ljava_lang_String_2(){
  java_lang_Class_$ensureNamesAreInitialized__Ljava_lang_Class_2V(this);
  return this.java_lang_Class_canonicalName;
}
;
_.getName__Ljava_lang_String_2 = function java_lang_Class_getName__Ljava_lang_String_2(){
  return java_lang_Class_$getName__Ljava_lang_Class_2Ljava_lang_String_2(this);
}
;
_.getSimpleName__Ljava_lang_String_2 = function java_lang_Class_getSimpleName__Ljava_lang_String_2(){
  java_lang_Class_$ensureNamesAreInitialized__Ljava_lang_Class_2V(this);
  return this.java_lang_Class_simpleName;
}
;
_.isArray__Z = function java_lang_Class_isArray__Z(){
  return (this.java_lang_Class_modifiers & 4) != 0;
}
;
_.isPrimitive__Z = function java_lang_Class_isPrimitive__Z(){
  return (this.java_lang_Class_modifiers & 1) != 0;
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Class_toString__Ljava_lang_String_2(){
  return ((this.java_lang_Class_modifiers & 2) != 0?'interface ':(this.java_lang_Class_modifiers & 1) != 0?'':'class ') + (java_lang_Class_$ensureNamesAreInitialized__Ljava_lang_Class_2V(this) , this.java_lang_Class_typeName);
}
;
_.java_lang_Class_modifiers = 0;
var java_lang_Class_nextSequentialId = 1;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Object', 1), com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1JavaScriptObject_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_3, 'JavaScriptObject$', 0), com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Class_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Class', 167);
function client_IMCSLayoutEngineEntryPoint_$registerWrapper__Lclient_IMCSLayoutEngineEntryPoint_2V(){
  IMCSDiagramLayout = function(arrangeStyle, fastAdd){
    this.jObj = new lv_lumii_diagramlayout_IMCSDiagramLayout_IMCSDiagramLayout__Ljava_lang_String_2V(arrangeStyle);
    this.jObj.lv_lumii_diagramlayout_IMCSDiagramLayout_fastAdd = fastAdd;
    this.addBox = function(boxId, x_0, y_0, w, h){
      return this.jObj.addBox__DDDDDZ(boxId, x_0, y_0, w, h);
    }
    ;
    this.addLine = function(lineId, srcId, tgtId, settings){
      var jPoints = null;
      if (settings.points && settings.points.length >= 2) {
        jPoints = new java_util_ArrayList_ArrayList__V;
        for (var i = 0; i < settings.points.length; i++) {
          var jPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(settings.points[i].x, settings.points[i].y);
          jPoints.add__Ljava_lang_Object_2Z(jPoint);
        }
      }
      return this.jObj.addLine__DDDLjava_lang_String_2IILjava_util_ArrayList_2Z(lineId, srcId, tgtId, settings.lineType, settings.startSides?settings.startSides:15, settings.endSides?settings.endSides:15, jPoints);
    }
    ;
    this.addLineLabel = function(labelId, lineId, w, h, placement){
      return this.jObj.addLineLabel__DDDDLjava_lang_String_2Z(labelId, lineId, w, h, placement);
    }
    ;
    this.removeLine = function(lineId){
      var al = this.jObj.removeLine__DLjava_util_ArrayList_2(lineId);
      if (!al)
        return null;
      var retVal = [];
      var n = al.size__I();
      for (var i = 0; i < n; i++) {
        var id_0 = al.get__ILjava_lang_Object_2(i);
        retVal.push(id_0);
      }
      return retVal;
    }
    ;
    this.removeBox = function(boxId){
      var al = this.jObj.removeBox__DLjava_util_ArrayList_2(boxId);
      if (!al)
        return null;
      var retVal = [];
      var n = al.size__I();
      for (var i = 0; i < n; i++) {
        var id_0 = al.get__ILjava_lang_Object_2(i);
        retVal.push(id_0);
      }
      return retVal;
    }
    ;
    this.moveBox = function(boxId, newX, newY){
      return this.jObj.moveBox__DDDZ(boxId, newX, newY);
    }
    ;
    this.resizeBox = function(boxId, w, h){
      return this.jObj.resizeBox__DDDZ(boxId, w, h);
    }
    ;
    this.moveLine = function(lineId, srcId, tgtId, points){
      var jPoints = null;
      if (points) {
        jPoints = new java_util_ArrayList_ArrayList__V;
        for (var i = 0; i < points.length; i++) {
          var jPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(points[i].x, points[i].y);
          jPoints.add__Ljava_lang_Object_2Z(jPoint);
        }
      }
      return this.jObj.moveLine__DDDLjava_util_ArrayList_2Z(lineId, srcId, tgtId, jPoints);
    }
    ;
    this.arrangeIncrementally = function(){
      return this.convertLayoutInfo(this.jObj.arrangeIncrementally__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2());
    }
    ;
    this.arrangeFromScratch = function(){
      return this.convertLayoutInfo(this.jObj.arrangeFromScratch__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2());
    }
    ;
    this.getLayout = function(){
      return this.convertLayoutInfo(this.jObj.getLayout__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2());
    }
    ;
    this.convertLayoutInfo = function(info){
      retVal = {boxes:{}, lines:{}, labels:{}};
      var m = info.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes;
      var s = m.keySet__Ljava_util_Set_2();
      var it = s.iterator__Ljava_util_Iterator_2();
      while (it.hasNext__Z()) {
        var key = it.next__Ljava_lang_Object_2();
        var item_0 = m.get__Ljava_lang_Object_2Ljava_lang_Object_2(key);
        retVal.boxes[key.doubleValue__D()] = {x:item_0.java_awt_geom_Rectangle2D$Double_x, y:item_0.java_awt_geom_Rectangle2D$Double_y, width:item_0.java_awt_geom_Rectangle2D$Double_width, height:item_0.java_awt_geom_Rectangle2D$Double_height};
      }
      m = info.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_lines;
      s = m.keySet__Ljava_util_Set_2();
      it = s.iterator__Ljava_util_Iterator_2();
      while (it.hasNext__Z()) {
        var key = it.next__Ljava_lang_Object_2();
        var item_0 = m.get__Ljava_lang_Object_2Ljava_lang_Object_2(key);
        var n = item_0.size__I();
        var arr = [];
        for (var i = 0; i < n; i++) {
          var p = item_0.get__ILjava_lang_Object_2(i);
          arr.push({x:p.java_awt_geom_Point2D$Double_x, y:p.java_awt_geom_Point2D$Double_y});
        }
        retVal.lines[key.doubleValue__D()] = arr;
      }
      m = info.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels;
      s = m.keySet__Ljava_util_Set_2();
      it = s.iterator__Ljava_util_Iterator_2();
      while (it.hasNext__Z()) {
        var key = it.next__Ljava_lang_Object_2();
        var item_0 = m.get__Ljava_lang_Object_2Ljava_lang_Object_2(key);
        retVal.labels[key.doubleValue__D()] = {x:item_0.java_awt_geom_Rectangle2D$Double_x, y:item_0.java_awt_geom_Rectangle2D$Double_y, width:item_0.java_awt_geom_Rectangle2D$Double_width, height:item_0.java_awt_geom_Rectangle2D$Double_height};
      }
      return retVal;
    }
    ;
    return this;
  }
  ;
  IMCSDialogLayout = function(jsCallback){
    this.jThis = new lv_lumii_dialoglayout_IMCSDialogLayout_IMCSDialogLayout__Ljava_lang_Object_2V(jsCallback);
    this.loadStarted = function(rComponent){
      this.jThis.loadStarted__DV(rComponent);
    }
    ;
    this.loadFinished = function(rComponent){
      this.jThis.loadFinished__DV(rComponent);
    }
    ;
    this.loadAndLayout = function(rForm){
      this.jThis.loadAndLayout__DV(rForm);
    }
    ;
    this.refreshAndLayout = function(rRootComponent, formWidth, formHeight){
      this.jThis.refreshAndLayout__DIIV(rRootComponent, formWidth, formHeight);
    }
    ;
    return this;
  }
  ;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(25, 1, $intern_4);
_.getMessage__Ljava_lang_String_2 = function java_lang_Throwable_getMessage__Ljava_lang_String_2(){
  return this.java_lang_Throwable_detailMessage;
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Throwable_toString__Ljava_lang_String_2(){
  var className, msg;
  className = java_lang_Class_$getName__Ljava_lang_Class_2Ljava_lang_String_2(this.java_lang_Object__1_1_1clazz$);
  msg = this.getMessage__Ljava_lang_String_2();
  return msg != null?className + ': ' + msg:className;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Throwable_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Throwable', 25);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(144, 25, $intern_4);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Exception_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Exception', 144);
function java_lang_RuntimeException_RuntimeException__V(){
  com_google_gwt_core_client_impl_StackTraceCreator_captureStackTrace__Ljava_lang_Throwable_2Ljava_lang_Object_2V(this, this.java_lang_Throwable_detailMessage);
}

function java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V(message){
  this.java_lang_Throwable_detailMessage = message;
  com_google_gwt_core_client_impl_StackTraceCreator_captureStackTrace__Ljava_lang_Throwable_2Ljava_lang_Object_2V(this, this.java_lang_Throwable_detailMessage);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(40, 144, $intern_4, java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1RuntimeException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'RuntimeException', 40);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(188, 40, $intern_4);
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1impl_1JavaScriptExceptionBase_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_5, 'JavaScriptExceptionBase', 188);
function com_google_gwt_core_client_JavaScriptException_$clinit__V(){
  com_google_gwt_core_client_JavaScriptException_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  com_google_gwt_core_client_JavaScriptException_NOT_1SET = new java_lang_Object_Object__V;
}

function com_google_gwt_core_client_JavaScriptException_$ensureInit__Lcom_google_gwt_core_client_JavaScriptException_2V(this$static){
  var exception;
  if (this$static.com_google_gwt_core_client_JavaScriptException_message == null) {
    exception = com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(this$static.com_google_gwt_core_client_JavaScriptException_e) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_core_client_JavaScriptException_NOT_1SET)?null:this$static.com_google_gwt_core_client_JavaScriptException_e;
    this$static.com_google_gwt_core_client_JavaScriptException_name = exception == null?'null':com_google_gwt_lang_Cast_instanceOfJso__Ljava_lang_Object_2Z(exception)?com_google_gwt_core_client_JavaScriptException_getExceptionName0__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2(com_google_gwt_lang_Cast_dynamicCastJso__Ljava_lang_Object_2Ljava_lang_Object_2(exception)):com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(exception)?'String':java_lang_Class_$getName__Ljava_lang_Class_2Ljava_lang_String_2(java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(exception));
    this$static.com_google_gwt_core_client_JavaScriptException_description = this$static.com_google_gwt_core_client_JavaScriptException_description + ': ' + (com_google_gwt_lang_Cast_instanceOfJso__Ljava_lang_Object_2Z(exception)?com_google_gwt_core_client_JavaScriptException_getExceptionDescription0__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2(com_google_gwt_lang_Cast_dynamicCastJso__Ljava_lang_Object_2Ljava_lang_Object_2(exception)):exception + '');
    this$static.com_google_gwt_core_client_JavaScriptException_message = '(' + this$static.com_google_gwt_core_client_JavaScriptException_name + ') ' + this$static.com_google_gwt_core_client_JavaScriptException_description;
  }
}

function com_google_gwt_core_client_JavaScriptException_JavaScriptException__Ljava_lang_Object_2V(e){
  com_google_gwt_core_client_JavaScriptException_$clinit__V();
  this.java_lang_Throwable_detailMessage = null;
  this.com_google_gwt_core_client_JavaScriptException_description = '';
  this.com_google_gwt_core_client_JavaScriptException_e = e;
  this.com_google_gwt_core_client_JavaScriptException_description = '';
}

function com_google_gwt_core_client_JavaScriptException_getExceptionDescription0__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2(e){
  return e == null?null:e.message;
}

function com_google_gwt_core_client_JavaScriptException_getExceptionName0__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2(e){
  return e == null?null:e.name;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(97, 188, {97:1, 5:1, 25:1}, com_google_gwt_core_client_JavaScriptException_JavaScriptException__Ljava_lang_Object_2V);
_.getMessage__Ljava_lang_String_2 = function com_google_gwt_core_client_JavaScriptException_getMessage__Ljava_lang_String_2(){
  com_google_gwt_core_client_JavaScriptException_$ensureInit__Lcom_google_gwt_core_client_JavaScriptException_2V(this);
  return this.com_google_gwt_core_client_JavaScriptException_message;
}
;
_.getThrown__Ljava_lang_Object_2 = function com_google_gwt_core_client_JavaScriptException_getThrown__Ljava_lang_Object_2(){
  return com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(this.com_google_gwt_core_client_JavaScriptException_e) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_core_client_JavaScriptException_NOT_1SET)?null:this.com_google_gwt_core_client_JavaScriptException_e;
}
;
var com_google_gwt_core_client_JavaScriptException_NOT_1SET;
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1JavaScriptException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_3, 'JavaScriptException', 97);
function com_google_gwt_core_client_JsDate_now__D(){
  if (Date.now) {
    return Date.now();
  }
  return (new Date).getTime();
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(276, 1, {});
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1Scheduler_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_3, 'Scheduler', 276);
function com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction, thisObj, args){
  return jsFunction.apply(thisObj, args);
  var _;
}

function com_google_gwt_core_client_impl_Impl_enter__Z(){
  var now_0;
  if (com_google_gwt_core_client_impl_Impl_entryDepth != 0) {
    now_0 = com_google_gwt_core_client_JsDate_now__D();
    if (now_0 - com_google_gwt_core_client_impl_Impl_watchdogEntryDepthLastScheduled > 2000) {
      com_google_gwt_core_client_impl_Impl_watchdogEntryDepthLastScheduled = now_0;
      com_google_gwt_core_client_impl_Impl_watchdogEntryDepthTimerId = $wnd.setTimeout(com_google_gwt_core_client_impl_Impl_watchdogEntryDepthRun__V, 10);
    }
  }
  if (com_google_gwt_core_client_impl_Impl_entryDepth++ == 0) {
    com_google_gwt_core_client_impl_SchedulerImpl_$flushEntryCommands__Lcom_google_gwt_core_client_impl_SchedulerImpl_2V((com_google_gwt_core_client_impl_SchedulerImpl_$clinit__V() , com_google_gwt_core_client_impl_SchedulerImpl_INSTANCE));
    return true;
  }
  return false;
}

function com_google_gwt_core_client_impl_Impl_entry__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(jsFunction){
  return function(){
    return com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction, this, arguments);
    var _;
  }
  ;
}

function com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction, thisObj, args){
  var initialEntry;
  initialEntry = com_google_gwt_core_client_impl_Impl_enter__Z();
  try {
    return com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction, thisObj, args);
  }
   finally {
    com_google_gwt_core_client_impl_Impl_exit__ZV(initialEntry);
  }
}

function com_google_gwt_core_client_impl_Impl_exit__ZV(initialEntry){
  initialEntry && com_google_gwt_core_client_impl_SchedulerImpl_$flushFinallyCommands__Lcom_google_gwt_core_client_impl_SchedulerImpl_2V((com_google_gwt_core_client_impl_SchedulerImpl_$clinit__V() , com_google_gwt_core_client_impl_SchedulerImpl_INSTANCE));
  --com_google_gwt_core_client_impl_Impl_entryDepth;
  if (initialEntry) {
    if (com_google_gwt_core_client_impl_Impl_watchdogEntryDepthTimerId != -1) {
      com_google_gwt_core_client_impl_Impl_watchdogEntryDepthCancel__IV(com_google_gwt_core_client_impl_Impl_watchdogEntryDepthTimerId);
      com_google_gwt_core_client_impl_Impl_watchdogEntryDepthTimerId = -1;
    }
  }
}

function com_google_gwt_core_client_impl_Impl_getHashCode__Ljava_lang_Object_2I(o){
  return o.$H || (o.$H = ++com_google_gwt_core_client_impl_Impl_sNextHashId);
}

function com_google_gwt_core_client_impl_Impl_reportToBrowser__Ljava_lang_Object_2V(e){
  $wnd.setTimeout(function(){
    throw e;
  }
  , 0);
}

function com_google_gwt_core_client_impl_Impl_watchdogEntryDepthCancel__IV(timerId){
  $wnd.clearTimeout(timerId);
}

function com_google_gwt_core_client_impl_Impl_watchdogEntryDepthRun__V(){
  com_google_gwt_core_client_impl_Impl_entryDepth != 0 && (com_google_gwt_core_client_impl_Impl_entryDepth = 0);
  com_google_gwt_core_client_impl_Impl_watchdogEntryDepthTimerId = -1;
}

var com_google_gwt_core_client_impl_Impl_entryDepth = 0, com_google_gwt_core_client_impl_Impl_sNextHashId = 0, com_google_gwt_core_client_impl_Impl_watchdogEntryDepthLastScheduled = 0, com_google_gwt_core_client_impl_Impl_watchdogEntryDepthTimerId = -1;
function com_google_gwt_core_client_impl_SchedulerImpl_$clinit__V(){
  com_google_gwt_core_client_impl_SchedulerImpl_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  com_google_gwt_core_client_impl_SchedulerImpl_INSTANCE = new com_google_gwt_core_client_impl_SchedulerImpl_SchedulerImpl__V;
}

function com_google_gwt_core_client_impl_SchedulerImpl_$flushEntryCommands__Lcom_google_gwt_core_client_impl_SchedulerImpl_2V(this$static){
  var oldQueue, rescheduled;
  if (this$static.com_google_gwt_core_client_impl_SchedulerImpl_entryCommands) {
    rescheduled = null;
    do {
      oldQueue = this$static.com_google_gwt_core_client_impl_SchedulerImpl_entryCommands;
      this$static.com_google_gwt_core_client_impl_SchedulerImpl_entryCommands = null;
      rescheduled = com_google_gwt_core_client_impl_SchedulerImpl_runScheduledTasks__Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2(oldQueue, rescheduled);
    }
     while (this$static.com_google_gwt_core_client_impl_SchedulerImpl_entryCommands);
    this$static.com_google_gwt_core_client_impl_SchedulerImpl_entryCommands = rescheduled;
  }
}

function com_google_gwt_core_client_impl_SchedulerImpl_$flushFinallyCommands__Lcom_google_gwt_core_client_impl_SchedulerImpl_2V(this$static){
  var oldQueue, rescheduled;
  if (this$static.com_google_gwt_core_client_impl_SchedulerImpl_finallyCommands) {
    rescheduled = null;
    do {
      oldQueue = this$static.com_google_gwt_core_client_impl_SchedulerImpl_finallyCommands;
      this$static.com_google_gwt_core_client_impl_SchedulerImpl_finallyCommands = null;
      rescheduled = com_google_gwt_core_client_impl_SchedulerImpl_runScheduledTasks__Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2(oldQueue, rescheduled);
    }
     while (this$static.com_google_gwt_core_client_impl_SchedulerImpl_finallyCommands);
    this$static.com_google_gwt_core_client_impl_SchedulerImpl_finallyCommands = rescheduled;
  }
}

function com_google_gwt_core_client_impl_SchedulerImpl_SchedulerImpl__V(){
}

function com_google_gwt_core_client_impl_SchedulerImpl_push__Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_impl_SchedulerImpl$Task_2Lcom_google_gwt_core_client_JsArray_2(queue, task){
  !queue && (queue = []);
  queue[queue.length] = task;
  return queue;
}

function com_google_gwt_core_client_impl_SchedulerImpl_runScheduledTasks__Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2(tasks, rescheduled){
  var e, i, j, t;
  for (i = 0 , j = tasks.length; i < j; i++) {
    t = tasks[i];
    try {
      t[1]?t[0].nullMethod() && (rescheduled = com_google_gwt_core_client_impl_SchedulerImpl_push__Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_impl_SchedulerImpl$Task_2Lcom_google_gwt_core_client_JsArray_2(rescheduled, t)):t[0].nullMethod();
    }
     catch ($e0) {
      $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25)) {
        e = $e0;
        com_google_gwt_core_client_impl_Impl_reportToBrowser__Ljava_lang_Object_2V(com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(e, 97)?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(e, 97).getThrown__Ljava_lang_Object_2():e);
      }
       else 
        throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    }
  }
  return rescheduled;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(207, 276, {}, com_google_gwt_core_client_impl_SchedulerImpl_SchedulerImpl__V);
var com_google_gwt_core_client_impl_SchedulerImpl_INSTANCE;
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1impl_1SchedulerImpl_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_5, 'SchedulerImpl', 207);
function com_google_gwt_core_client_impl_StackTraceCreator_$clinit__V(){
  com_google_gwt_core_client_impl_StackTraceCreator_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  var c, enforceLegacy;
  enforceLegacy = !(!!Error.stackTraceLimit || 'stack' in new Error);
  c = new com_google_gwt_core_client_impl_StackTraceCreator$CollectorModernNoSourceMap_StackTraceCreator$CollectorModernNoSourceMap__V;
  com_google_gwt_core_client_impl_StackTraceCreator_collector = enforceLegacy?new com_google_gwt_core_client_impl_StackTraceCreator$CollectorLegacy_StackTraceCreator$CollectorLegacy__V:c;
}

function com_google_gwt_core_client_impl_StackTraceCreator_captureStackTrace__Ljava_lang_Throwable_2Ljava_lang_Object_2V(throwable, reference){
  com_google_gwt_core_client_impl_StackTraceCreator_$clinit__V();
  com_google_gwt_core_client_impl_StackTraceCreator_collector.collect__Ljava_lang_Object_2Ljava_lang_Object_2V(throwable, reference);
}

function com_google_gwt_core_client_impl_StackTraceCreator_extractFunctionName__Ljava_lang_String_2Ljava_lang_String_2(fnName){
  var fnRE = /function(?:\s+([\w$]+))?\s*\(/;
  var match_0 = fnRE.exec(fnName);
  return match_0 && match_0[1] || 'anonymous';
}

var com_google_gwt_core_client_impl_StackTraceCreator_collector;
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(287, 1, {});
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1impl_1StackTraceCreator$Collector_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_5, 'StackTraceCreator/Collector', 287);
function com_google_gwt_core_client_impl_StackTraceCreator$CollectorLegacy_StackTraceCreator$CollectorLegacy__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(189, 287, {}, com_google_gwt_core_client_impl_StackTraceCreator$CollectorLegacy_StackTraceCreator$CollectorLegacy__V);
_.collect__Ljava_lang_Object_2Ljava_lang_Object_2V = function com_google_gwt_core_client_impl_StackTraceCreator$CollectorLegacy_collect__Ljava_lang_Object_2Ljava_lang_Object_2V(t, thrownIgnored){
  var seen = {}, com_google_gwt_core_client_impl_StackTraceCreator_getFunctionName__Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_String_2_name_0;
  t.fnStack = [];
  var callee = arguments.callee.caller;
  while (callee) {
    var name_0 = (com_google_gwt_core_client_impl_StackTraceCreator_$clinit__V() , callee.name || (callee.name = com_google_gwt_core_client_impl_StackTraceCreator_extractFunctionName__Ljava_lang_String_2Ljava_lang_String_2(callee.toString())));
    t.fnStack.push(name_0);
    var keyName = ':' + name_0;
    var withThisName = seen[keyName];
    if (withThisName) {
      var i, j;
      for (i = 0 , j = withThisName.length; i < j; i++) {
        if (withThisName[i] === callee) {
          return;
        }
      }
    }
    (withThisName || (seen[keyName] = [])).push(callee);
    callee = callee.caller;
  }
}
;
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1impl_1StackTraceCreator$CollectorLegacy_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_5, 'StackTraceCreator/CollectorLegacy', 189);
function com_google_gwt_core_client_impl_StackTraceCreator$CollectorModern_$clinit__V(){
  com_google_gwt_core_client_impl_StackTraceCreator$CollectorModern_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  Error.stackTraceLimit = 64;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(288, 287, {});
_.collect__Ljava_lang_Object_2Ljava_lang_Object_2V = function com_google_gwt_core_client_impl_StackTraceCreator$CollectorModern_collect__Ljava_lang_Object_2Ljava_lang_Object_2V(t, jsThrown){
  function fixIE(e){
    if (!('stack' in e)) {
      try {
        throw e;
      }
       catch (ignored) {
      }
    }
    return e;
  }

  var backingJsError;
  typeof jsThrown == 'string'?(backingJsError = fixIE(new Error(jsThrown))):jsThrown instanceof Object && 'stack' in jsThrown?(backingJsError = jsThrown):(backingJsError = fixIE(new Error));
  t.__gwt$backingJsError = backingJsError;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1impl_1StackTraceCreator$CollectorModern_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_5, 'StackTraceCreator/CollectorModern', 288);
function com_google_gwt_core_client_impl_StackTraceCreator$CollectorModernNoSourceMap_StackTraceCreator$CollectorModernNoSourceMap__V(){
  com_google_gwt_core_client_impl_StackTraceCreator$CollectorModern_$clinit__V();
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(190, 288, {}, com_google_gwt_core_client_impl_StackTraceCreator$CollectorModernNoSourceMap_StackTraceCreator$CollectorModernNoSourceMap__V);
var com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1core_1client_1impl_1StackTraceCreator$CollectorModernNoSourceMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_5, 'StackTraceCreator/CollectorModernNoSourceMap', 190);
function com_google_gwt_core_shared_impl_InternalPreconditions_checkArraySize__IV(size_0){
  if (size_0 < 0) {
    throw new java_lang_NegativeArraySizeException_NegativeArraySizeException__Ljava_lang_String_2V('Negative array size: ' + size_0);
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkArrayType__ZLjava_lang_Object_2V(expression, errorMessage){
  if (!expression) {
    throw new java_lang_ArrayStoreException_ArrayStoreException__Ljava_lang_String_2V('' + errorMessage);
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZV(expression){
  if (!expression) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__V;
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZLjava_lang_Object_2V(expression, errorMessage){
  if (!expression) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('' + errorMessage);
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZLjava_lang_String_2_3Ljava_lang_Object_2V(expression, errorMessageArgs){
  if (!expression) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V(com_google_gwt_core_shared_impl_InternalPreconditions_format__Ljava_lang_String_2_3Ljava_lang_Object_2Ljava_lang_String_2('%s > %s', errorMessageArgs));
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(expression){
  if (!expression) {
    throw new java_util_NoSuchElementException_NoSuchElementException__V;
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalPositionIndexes__IIIV(start_0, end, size_0){
  if (start_0 < 0) {
    throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V($intern_6 + start_0 + ' < 0');
  }
  if (end > size_0) {
    throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V('toIndex: ' + end + ' > size ' + size_0);
  }
  if (start_0 > end) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_6 + start_0 + ' > toIndex: ' + end);
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkElement__ZLjava_lang_Object_2V(expression){
  if (!expression) {
    throw new java_util_NoSuchElementException_NoSuchElementException__Ljava_lang_String_2V;
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, size_0){
  if (index_0 < 0 || index_0 >= size_0) {
    throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V('Index: ' + index_0 + ', Size: ' + size_0);
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(reference){
  if (reference == null) {
    throw new java_lang_NullPointerException_NullPointerException__V;
  }
  return reference;
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2V(reference, errorMessage){
  if (reference == null) {
    throw new java_lang_NullPointerException_NullPointerException__Ljava_lang_String_2V('' + errorMessage);
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkPositionIndex__IIV(index_0, size_0){
  if (index_0 < 0 || index_0 > size_0) {
    throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V('Index: ' + index_0 + ', Size: ' + size_0);
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(expression){
  if (!expression) {
    throw new java_lang_IllegalStateException_IllegalStateException__V;
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZLjava_lang_Object_2V(expression){
  if (!expression) {
    throw new java_lang_IllegalStateException_IllegalStateException__Ljava_lang_String_2V;
  }
}

function com_google_gwt_core_shared_impl_InternalPreconditions_format__Ljava_lang_String_2_3Ljava_lang_Object_2Ljava_lang_String_2(template, args){
  var builder, i, placeholderStart, templateStart;
  template = '' + template;
  builder = new java_lang_StringBuilder_StringBuilder__IV(template.length + 16 * args.length);
  templateStart = 0;
  i = 0;
  while (i < args.length) {
    placeholderStart = template.indexOf('%s', templateStart);
    if (placeholderStart == -1) {
      break;
    }
    java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_String_2Ljava_lang_StringBuilder_2(builder, template.substr(templateStart, placeholderStart - templateStart));
    java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_Object_2Ljava_lang_StringBuilder_2(builder, args[i++]);
    templateStart = placeholderStart + 2;
  }
  java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_String_2Ljava_lang_StringBuilder_2(builder, java_lang_String__1_1substr__Ljava_lang_String_2IILjava_lang_String_2(template, templateStart, template.length - templateStart));
  if (i < args.length) {
    builder.java_lang_AbstractStringBuilder_string += ' [';
    java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_Object_2Ljava_lang_StringBuilder_2(builder, args[i++]);
    while (i < args.length) {
      builder.java_lang_AbstractStringBuilder_string += ', ';
      java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_Object_2Ljava_lang_StringBuilder_2(builder, args[i++]);
    }
    builder.java_lang_AbstractStringBuilder_string += ']';
  }
  return builder.java_lang_AbstractStringBuilder_string;
}

function com_google_gwt_lang_Array_cloneSubrange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2(array, toIndex){
  var result;
  result = array.slice(0, toIndex);
  com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(array), array.java_lang_Object_castableTypeMap$, array.__elementTypeId$, array.__elementTypeCategory$, result);
  return result;
}

function com_google_gwt_lang_Array_createFrom___3Ljava_lang_Object_2I_3Ljava_lang_Object_2(array, length_0){
  var result;
  result = com_google_gwt_lang_Array_initializeArrayElementsWithDefaults__IILjava_lang_Object_2(0, length_0);
  com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(array), array.java_lang_Object_castableTypeMap$, array.__elementTypeId$, array.__elementTypeCategory$, result);
  return result;
}

function com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(clazz, dimensions){
  return java_lang_Class_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(clazz, dimensions);
}

function com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(leafClassLiteral, castableTypeMap, elementTypeId, length_0, elementTypeCategory, dimensions){
  var result;
  result = com_google_gwt_lang_Array_initializeArrayElementsWithDefaults__IILjava_lang_Object_2(elementTypeCategory, length_0);
  com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(leafClassLiteral, dimensions), castableTypeMap, elementTypeId, elementTypeCategory, result);
  return result;
}

function com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, count){
  return com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IIILjava_lang_Object_2(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, 0, count);
}

function com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IIILjava_lang_Object_2(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, index_0, count){
  var elementTypeCategory, i, isLastDim, length_0, result;
  length_0 = dimExprs[index_0];
  isLastDim = index_0 == count - 1;
  elementTypeCategory = isLastDim?leafElementTypeCategory:0;
  result = com_google_gwt_lang_Array_initializeArrayElementsWithDefaults__IILjava_lang_Object_2(elementTypeCategory, length_0);
  com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(leafClassLiteral, count - index_0), castableTypeMapExprs[index_0], elementTypeIds[index_0], elementTypeCategory, result);
  if (!isLastDim) {
    ++index_0;
    for (i = 0; i < length_0; ++i) {
      result[i] = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IIILjava_lang_Object_2(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, index_0, count);
    }
  }
  return result;
}

function com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(arrayClass, castableTypeMap, elementTypeId, elementTypeCategory, array){
  array.java_lang_Object__1_1_1clazz$ = arrayClass;
  array.java_lang_Object_castableTypeMap$ = castableTypeMap;
  array.java_lang_Object_typeMarker$ = com_google_gwt_lang_JavaClassHierarchySetupUtil_typeMarkerFn__V;
  array.__elementTypeId$ = elementTypeId;
  array.__elementTypeCategory$ = elementTypeCategory;
  return array;
}

function com_google_gwt_lang_Array_initializeArrayElementsWithDefaults__IILjava_lang_Object_2(elementTypeCategory, length_0){
  var array = new Array(length_0);
  var initValue;
  switch (elementTypeCategory) {
    case 6:
      initValue = {l:0, m:0, h:0};
      break;
    case 7:
      initValue = 0;
      break;
    case 8:
      initValue = false;
      break;
    default:return array;
  }
  for (var i = 0; i < length_0; ++i) {
    array[i] = initValue;
  }
  return array;
}

function com_google_gwt_lang_Array_nativeArraySplice__Ljava_lang_Object_2ILjava_lang_Object_2IIZV(src_0, srcOfs, dest, destOfs, len, overwrite){
  if (src_0 === dest) {
    src_0 = src_0.slice(srcOfs, srcOfs + len);
    srcOfs = 0;
  }
  for (var batchStart = srcOfs, end = srcOfs + len; batchStart < end;) {
    var batchEnd = Math.min(batchStart + $intern_7, end);
    len = batchEnd - batchStart;
    Array.prototype.splice.apply(dest, [destOfs, overwrite?len:0].concat(src_0.slice(batchStart, batchEnd)));
    batchStart = batchEnd;
    destOfs += len;
  }
}

function com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(array, index_0, value_0){
  var elementTypeId;
  if (value_0 != null) {
    switch (array.__elementTypeCategory$) {
      case 4:
        if (!com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(value_0)) {
          throw new java_lang_ArrayStoreException_ArrayStoreException__V;
        }

        break;
      case 0:
        {
          elementTypeId = array.__elementTypeId$;
          if (!com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(value_0, elementTypeId)) {
            throw new java_lang_ArrayStoreException_ArrayStoreException__V;
          }
          break;
        }

      case 2:
        if (!(!com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(value_0) && !com_google_gwt_lang_Util_hasTypeMarker__Ljava_lang_Object_2Z(value_0))) {
          throw new java_lang_ArrayStoreException_ArrayStoreException__V;
        }

        break;
      case 1:
        {
          elementTypeId = array.__elementTypeId$;
          if (!(!com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(value_0) && !com_google_gwt_lang_Util_hasTypeMarker__Ljava_lang_Object_2Z(value_0)) && !com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(value_0, elementTypeId)) {
            throw new java_lang_ArrayStoreException_ArrayStoreException__V;
          }
          break;
        }

    }
  }
  return array[index_0] = value_0;
}

function com_google_gwt_lang_Exceptions_cacheJavaScriptException__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptException_2V(e, jse){
  if (e && typeof e == $intern_0) {
    try {
      e.__gwt$exception = jse;
    }
     catch (ignored) {
    }
  }
}

function com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2(e){
  var jse;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(e, 97)) {
    jse = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(e, 97);
    if (com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(jse.com_google_gwt_core_client_JavaScriptException_e) !== com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_client_JavaScriptException_$clinit__V() , com_google_gwt_core_client_JavaScriptException_NOT_1SET))) {
      return com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(jse.com_google_gwt_core_client_JavaScriptException_e) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_core_client_JavaScriptException_NOT_1SET)?null:jse.com_google_gwt_core_client_JavaScriptException_e;
    }
  }
  return e;
}

function com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2(e){
  var jse;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(e, 25)) {
    return e;
  }
  jse = e && e.__gwt$exception;
  if (!jse) {
    jse = new com_google_gwt_core_client_JavaScriptException_JavaScriptException__Ljava_lang_Object_2V(e);
    com_google_gwt_core_client_impl_StackTraceCreator_captureStackTrace__Ljava_lang_Throwable_2Ljava_lang_Object_2V(jse, e);
    com_google_gwt_lang_Exceptions_cacheJavaScriptException__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptException_2V(e, jse);
  }
  return jse;
}

function com_google_gwt_lang_LongLibBase_create__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0){
  var a0, a1, a2;
  a0 = value_0 & $intern_8;
  a1 = value_0 >> 22 & $intern_8;
  a2 = value_0 < 0?$intern_9:0;
  return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a0, a1, a2);
}

function com_google_gwt_lang_LongLibBase_create__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a){
  return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a.l, a.m, a.h);
}

function com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(l, m, h){
  return {l:l, m:m, h:h};
}

function com_google_gwt_lang_LongLibBase_divMod__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2ZLcom_google_gwt_lang_LongLibBase$LongEmul_2(a, b, computeRemainder){
  var aIsCopy, aIsMinValue, aIsNegative, bpower, c, negative;
  if (b.l == 0 && b.m == 0 && b.h == 0) {
    throw new java_lang_ArithmeticException_ArithmeticException__Ljava_lang_String_2V;
  }
  if (a.l == 0 && a.m == 0 && a.h == 0) {
    computeRemainder && (com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, 0));
    return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, 0);
  }
  if (b.h == $intern_10 && b.m == 0 && b.l == 0) {
    return com_google_gwt_lang_LongLibBase_divModByMinValue__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ZLcom_google_gwt_lang_LongLibBase$LongEmul_2(a, computeRemainder);
  }
  negative = false;
  if (b.h >> 19 != 0) {
    b = com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(b);
    negative = true;
  }
  bpower = com_google_gwt_lang_LongLibBase_powerOfTwo__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(b);
  aIsNegative = false;
  aIsMinValue = false;
  aIsCopy = false;
  if (a.h == $intern_10 && a.m == 0 && a.l == 0) {
    aIsMinValue = true;
    aIsNegative = true;
    if (bpower == -1) {
      a = com_google_gwt_lang_LongLibBase_create__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2((com_google_gwt_lang_LongLib$Const_$clinit__V() , com_google_gwt_lang_LongLib$Const_MAX_1VALUE));
      aIsCopy = true;
      negative = !negative;
    }
     else {
      c = com_google_gwt_lang_LongLib_shr__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(a, bpower);
      negative && com_google_gwt_lang_LongLibBase_negate__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V(c);
      computeRemainder && (com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, 0));
      return c;
    }
  }
   else if (a.h >> 19 != 0) {
    aIsNegative = true;
    a = com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a);
    aIsCopy = true;
    negative = !negative;
  }
  if (bpower != -1) {
    return com_google_gwt_lang_LongLibBase_divModByShift__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IZZZLcom_google_gwt_lang_LongLibBase$LongEmul_2(a, bpower, negative, aIsNegative, computeRemainder);
  }
  if (!com_google_gwt_lang_LongLib_gte__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b)) {
    computeRemainder && (aIsNegative?(com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a)):(com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a.l, a.m, a.h)));
    return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, 0);
  }
  return com_google_gwt_lang_LongLibBase_divModHelper__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2ZZZZLcom_google_gwt_lang_LongLibBase$LongEmul_2(aIsCopy?a:com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a.l, a.m, a.h), b, negative, aIsNegative, aIsMinValue, computeRemainder);
}

function com_google_gwt_lang_LongLibBase_divModByMinValue__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ZLcom_google_gwt_lang_LongLibBase$LongEmul_2(a, computeRemainder){
  if (a.h == $intern_10 && a.m == 0 && a.l == 0) {
    computeRemainder && (com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, 0));
    return com_google_gwt_lang_LongLibBase_create__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2((com_google_gwt_lang_LongLib$Const_$clinit__V() , com_google_gwt_lang_LongLib$Const_ONE));
  }
  computeRemainder && (com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a.l, a.m, a.h));
  return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, 0);
}

function com_google_gwt_lang_LongLibBase_divModByShift__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IZZZLcom_google_gwt_lang_LongLibBase$LongEmul_2(a, bpower, negative, aIsNegative, computeRemainder){
  var c;
  c = com_google_gwt_lang_LongLib_shr__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(a, bpower);
  negative && com_google_gwt_lang_LongLibBase_negate__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V(c);
  if (computeRemainder) {
    a = com_google_gwt_lang_LongLibBase_maskRight__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(a, bpower);
    aIsNegative?(com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a)):(com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a.l, a.m, a.h));
  }
  return c;
}

function com_google_gwt_lang_LongLibBase_divModHelper__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2ZZZZLcom_google_gwt_lang_LongLibBase$LongEmul_2(a, b, negative, aIsNegative, aIsMinValue, computeRemainder){
  var bshift, gte, quotient, shift_0, com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a1_0, com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a2_0, com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a0_0;
  shift_0 = com_google_gwt_lang_LongLibBase_numberOfLeadingZeros__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(b) - com_google_gwt_lang_LongLibBase_numberOfLeadingZeros__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(a);
  bshift = com_google_gwt_lang_LongLib_shl__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(b, shift_0);
  quotient = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, 0);
  while (shift_0 >= 0) {
    gte = com_google_gwt_lang_LongLibBase_trialSubtract__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, bshift);
    if (gte) {
      shift_0 < 22?(quotient.l |= 1 << shift_0 , undefined):shift_0 < 44?(quotient.m |= 1 << shift_0 - 22 , undefined):(quotient.h |= 1 << shift_0 - 44 , undefined);
      if (a.l == 0 && a.m == 0 && a.h == 0) {
        break;
      }
    }
    com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a1_0 = bshift.m;
    com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a2_0 = bshift.h;
    com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a0_0 = bshift.l;
    com_google_gwt_lang_LongLibBase_setH__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(bshift, com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a2_0 >>> 1);
    bshift.m = com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a1_0 >>> 1 | (com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a2_0 & 1) << 21;
    bshift.l = com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a0_0 >>> 1 | (com_google_gwt_lang_LongLibBase_toShru1__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V_a1_0 & 1) << 21;
    --shift_0;
  }
  negative && com_google_gwt_lang_LongLibBase_negate__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V(quotient);
  if (computeRemainder) {
    if (aIsNegative) {
      com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a);
      aIsMinValue && (com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLib_sub__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(com_google_gwt_lang_LongLibBase_remainder, (com_google_gwt_lang_LongLib$Const_$clinit__V() , com_google_gwt_lang_LongLib$Const_ONE)));
    }
     else {
      com_google_gwt_lang_LongLibBase_remainder = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a.l, a.m, a.h);
    }
  }
  return quotient;
}

function com_google_gwt_lang_LongLibBase_maskRight__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(a, bits){
  var b0, b1, b2;
  if (bits <= 22) {
    b0 = a.l & (1 << bits) - 1;
    b1 = b2 = 0;
  }
   else if (bits <= 44) {
    b0 = a.l;
    b1 = a.m & (1 << bits - 22) - 1;
    b2 = 0;
  }
   else {
    b0 = a.l;
    b1 = a.m;
    b2 = a.h & (1 << bits - 44) - 1;
  }
  return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(b0, b1, b2);
}

function com_google_gwt_lang_LongLibBase_negate__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V(a){
  var neg0, neg1, neg2;
  neg0 = ~a.l + 1 & $intern_8;
  neg1 = ~a.m + (neg0 == 0?1:0) & $intern_8;
  neg2 = ~a.h + (neg0 == 0 && neg1 == 0?1:0) & $intern_9;
  com_google_gwt_lang_LongLibBase_setL__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, neg0);
  com_google_gwt_lang_LongLibBase_setM__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, neg1);
  com_google_gwt_lang_LongLibBase_setH__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, neg2);
}

function com_google_gwt_lang_LongLibBase_numberOfLeadingZeros__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(a){
  var b1, b2;
  b2 = java_lang_Integer_numberOfLeadingZeros__II(a.h);
  if (b2 == 32) {
    b1 = java_lang_Integer_numberOfLeadingZeros__II(a.m);
    return b1 == 32?java_lang_Integer_numberOfLeadingZeros__II(a.l) + 32:b1 + 20 - 10;
  }
   else {
    return b2 - 12;
  }
}

function com_google_gwt_lang_LongLibBase_powerOfTwo__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(a){
  var h, l, m;
  l = a.l;
  if ((l & l - 1) != 0) {
    return -1;
  }
  m = a.m;
  if ((m & m - 1) != 0) {
    return -1;
  }
  h = a.h;
  if ((h & h - 1) != 0) {
    return -1;
  }
  if (h == 0 && m == 0 && l == 0) {
    return -1;
  }
  if (h == 0 && m == 0 && l != 0) {
    return java_lang_Integer_numberOfTrailingZeros__II(l);
  }
  if (h == 0 && m != 0 && l == 0) {
    return java_lang_Integer_numberOfTrailingZeros__II(m) + 22;
  }
  if (h != 0 && m == 0 && l == 0) {
    return java_lang_Integer_numberOfTrailingZeros__II(h) + 44;
  }
  return -1;
}

function com_google_gwt_lang_LongLibBase_setH__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, x_0){
  a.h = x_0;
}

function com_google_gwt_lang_LongLibBase_setL__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, x_0){
  a.l = x_0;
}

function com_google_gwt_lang_LongLibBase_setM__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, x_0){
  a.m = x_0;
}

function com_google_gwt_lang_LongLibBase_toDoubleHelper__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(a){
  return a.l + a.m * $intern_11 + a.h * $intern_12;
}

function com_google_gwt_lang_LongLibBase_trialSubtract__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b){
  var sum0, sum1, sum2;
  sum2 = a.h - b.h;
  if (sum2 < 0) {
    return false;
  }
  sum0 = a.l - b.l;
  sum1 = a.m - b.m + (sum0 >> 22);
  sum2 += sum1 >> 22;
  if (sum2 < 0) {
    return false;
  }
  com_google_gwt_lang_LongLibBase_setL__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, sum0 & $intern_8);
  com_google_gwt_lang_LongLibBase_setM__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, sum1 & $intern_8);
  com_google_gwt_lang_LongLibBase_setH__Lcom_google_gwt_lang_LongLibBase$LongEmul_2IV(a, sum2 & $intern_9);
  return true;
}

var com_google_gwt_lang_LongLibBase_remainder;
function com_google_gwt_lang_LongLib_add__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a, b){
  var sum0, sum1, sum2;
  sum0 = a.l + b.l;
  sum1 = a.m + b.m + (sum0 >> 22);
  sum2 = a.h + b.h + (sum1 >> 22);
  return {l:sum0 & $intern_8, m:sum1 & $intern_8, h:sum2 & $intern_9};
}

function com_google_gwt_lang_LongLib_eq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b){
  return a.l == b.l && a.m == b.m && a.h == b.h;
}

function com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0){
  var a0, a1, a2, negative, result;
  if (java_lang_Double_isNaN__DZ(value_0)) {
    return com_google_gwt_lang_LongLib$Const_$clinit__V() , com_google_gwt_lang_LongLib$Const_ZERO;
  }
  if (value_0 < $intern_13) {
    return com_google_gwt_lang_LongLib$Const_$clinit__V() , com_google_gwt_lang_LongLib$Const_MIN_1VALUE;
  }
  if (value_0 >= 9223372036854775807) {
    return com_google_gwt_lang_LongLib$Const_$clinit__V() , com_google_gwt_lang_LongLib$Const_MAX_1VALUE;
  }
  negative = false;
  if (value_0 < 0) {
    negative = true;
    value_0 = -value_0;
  }
  a2 = 0;
  if (value_0 >= $intern_12) {
    a2 = com_google_gwt_lang_Cast_round_1int__DI(value_0 / $intern_12);
    value_0 -= a2 * $intern_12;
  }
  a1 = 0;
  if (value_0 >= $intern_11) {
    a1 = com_google_gwt_lang_Cast_round_1int__DI(value_0 / $intern_11);
    value_0 -= a1 * $intern_11;
  }
  a0 = com_google_gwt_lang_Cast_round_1int__DI(value_0);
  result = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(a0, a1, a2);
  negative && com_google_gwt_lang_LongLibBase_negate__Lcom_google_gwt_lang_LongLibBase$LongEmul_2V(result);
  return result;
}

function com_google_gwt_lang_LongLib_fromInt__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0){
  var rebase, result;
  if (value_0 > -129 && value_0 < 128) {
    rebase = value_0 + 128;
    com_google_gwt_lang_LongLib_boxedValues == null && (com_google_gwt_lang_LongLib_boxedValues = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1lang_1LongLibBase$LongEmul_12_1classLit, $intern_14, 309, 256, 0, 1));
    result = com_google_gwt_lang_LongLib_boxedValues[rebase];
    !result && (result = com_google_gwt_lang_LongLib_boxedValues[rebase] = com_google_gwt_lang_LongLibBase_create__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0));
    return result;
  }
  return com_google_gwt_lang_LongLibBase_create__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0);
}

function com_google_gwt_lang_LongLib_gt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b){
  var signa, signb;
  signa = a.h >> 19;
  signb = b.h >> 19;
  return signa == 0?signb != 0 || a.h > b.h || a.h == b.h && a.m > b.m || a.h == b.h && a.m == b.m && a.l > b.l:!(signb == 0 || a.h < b.h || a.h == b.h && a.m < b.m || a.h == b.h && a.m == b.m && a.l <= b.l);
}

function com_google_gwt_lang_LongLib_gte__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b){
  var signa, signb;
  signa = a.h >> 19;
  signb = b.h >> 19;
  return signa == 0?signb != 0 || a.h > b.h || a.h == b.h && a.m > b.m || a.h == b.h && a.m == b.m && a.l >= b.l:!(signb == 0 || a.h < b.h || a.h == b.h && a.m < b.m || a.h == b.h && a.m == b.m && a.l < b.l);
}

function com_google_gwt_lang_LongLib_lt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b){
  return !com_google_gwt_lang_LongLib_gte__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b);
}

function com_google_gwt_lang_LongLib_mul__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a, b){
  var a0, a1, a2, a3, a4, b0, b1, b2, b3, b4, c0, c00, c01, c1, c10, c11, c12, c13, c2, c22, c23, c24, p0, p1, p2, p3, p4;
  a0 = a.l & 8191;
  a1 = a.l >> 13 | (a.m & 15) << 9;
  a2 = a.m >> 4 & 8191;
  a3 = a.m >> 17 | (a.h & 255) << 5;
  a4 = (a.h & 1048320) >> 8;
  b0 = b.l & 8191;
  b1 = b.l >> 13 | (b.m & 15) << 9;
  b2 = b.m >> 4 & 8191;
  b3 = b.m >> 17 | (b.h & 255) << 5;
  b4 = (b.h & 1048320) >> 8;
  p0 = a0 * b0;
  p1 = a1 * b0;
  p2 = a2 * b0;
  p3 = a3 * b0;
  p4 = a4 * b0;
  if (b1 != 0) {
    p1 += a0 * b1;
    p2 += a1 * b1;
    p3 += a2 * b1;
    p4 += a3 * b1;
  }
  if (b2 != 0) {
    p2 += a0 * b2;
    p3 += a1 * b2;
    p4 += a2 * b2;
  }
  if (b3 != 0) {
    p3 += a0 * b3;
    p4 += a1 * b3;
  }
  b4 != 0 && (p4 += a0 * b4);
  c00 = p0 & $intern_8;
  c01 = (p1 & 511) << 13;
  c0 = c00 + c01;
  c10 = p0 >> 22;
  c11 = p1 >> 9;
  c12 = (p2 & 262143) << 4;
  c13 = (p3 & 31) << 17;
  c1 = c10 + c11 + c12 + c13;
  c22 = p2 >> 18;
  c23 = p3 >> 5;
  c24 = (p4 & 4095) << 8;
  c2 = c22 + c23 + c24;
  c1 += c0 >> 22;
  c0 &= $intern_8;
  c2 += c1 >> 22;
  c1 &= $intern_8;
  c2 &= $intern_9;
  return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(c0, c1, c2);
}

function com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a){
  var neg0, neg1, neg2;
  neg0 = ~a.l + 1 & $intern_8;
  neg1 = ~a.m + (neg0 == 0?1:0) & $intern_8;
  neg2 = ~a.h + (neg0 == 0 && neg1 == 0?1:0) & $intern_9;
  return com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(neg0, neg1, neg2);
}

function com_google_gwt_lang_LongLib_neq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, b){
  return a.l != b.l || a.m != b.m || a.h != b.h;
}

function com_google_gwt_lang_LongLib_or__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a, b){
  return {l:a.l | b.l, m:a.m | b.m, h:a.h | b.h};
}

function com_google_gwt_lang_LongLib_shl__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(a, n){
  var res0, res1, res2;
  n &= 63;
  if (n < 22) {
    res0 = a.l << n;
    res1 = a.m << n | a.l >> 22 - n;
    res2 = a.h << n | a.m >> 22 - n;
  }
   else if (n < 44) {
    res0 = 0;
    res1 = a.l << n - 22;
    res2 = a.m << n - 22 | a.l >> 44 - n;
  }
   else {
    res0 = 0;
    res1 = 0;
    res2 = a.l << n - 44;
  }
  return {l:res0 & $intern_8, m:res1 & $intern_8, h:res2 & $intern_9};
}

function com_google_gwt_lang_LongLib_shr__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(a, n){
  var a2, negative, res0, res1, res2;
  n &= 63;
  a2 = a.h;
  negative = (a2 & $intern_10) != 0;
  negative && (a2 |= -1048576);
  if (n < 22) {
    res2 = a2 >> n;
    res1 = a.m >> n | a2 << 22 - n;
    res0 = a.l >> n | a.m << 22 - n;
  }
   else if (n < 44) {
    res2 = negative?$intern_9:0;
    res1 = a2 >> n - 22;
    res0 = a.m >> n - 22 | a2 << 44 - n;
  }
   else {
    res2 = negative?$intern_9:0;
    res1 = negative?$intern_8:0;
    res0 = a2 >> n - 44;
  }
  return {l:res0 & $intern_8, m:res1 & $intern_8, h:res2 & $intern_9};
}

function com_google_gwt_lang_LongLib_shru__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(a, n){
  var a2, res0, res1, res2;
  n &= 63;
  a2 = a.h & $intern_9;
  if (n < 22) {
    res2 = a2 >>> n;
    res1 = a.m >> n | a2 << 22 - n;
    res0 = a.l >> n | a.m << 22 - n;
  }
   else if (n < 44) {
    res2 = 0;
    res1 = a2 >>> n - 22;
    res0 = a.m >> n - 22 | a.h << 44 - n;
  }
   else {
    res2 = 0;
    res1 = 0;
    res0 = a2 >>> n - 44;
  }
  return {l:res0 & $intern_8, m:res1 & $intern_8, h:res2 & $intern_9};
}

function com_google_gwt_lang_LongLib_sub__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a, b){
  var sum0, sum1, sum2;
  sum0 = a.l - b.l;
  sum1 = a.m - b.m + (sum0 >> 22);
  sum2 = a.h - b.h + (sum1 >> 22);
  return {l:sum0 & $intern_8, m:sum1 & $intern_8, h:sum2 & $intern_9};
}

function com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(a){
  if (com_google_gwt_lang_LongLib_eq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, (com_google_gwt_lang_LongLib$Const_$clinit__V() , com_google_gwt_lang_LongLib$Const_MIN_1VALUE))) {
    return $intern_13;
  }
  if (!com_google_gwt_lang_LongLib_gte__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(a, com_google_gwt_lang_LongLib$Const_ZERO)) {
    return -com_google_gwt_lang_LongLibBase_toDoubleHelper__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a));
  }
  return a.l + a.m * $intern_11 + a.h * $intern_12;
}

function com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(a){
  return a.l | a.m << 22;
}

function com_google_gwt_lang_LongLib_toString__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Ljava_lang_String_2(a){
  var digits, rem, res, tenPowerLong, zeroesNeeded;
  if (a.l == 0 && a.m == 0 && a.h == 0) {
    return '0';
  }
  if (a.h == $intern_10 && a.m == 0 && a.l == 0) {
    return '-9223372036854775808';
  }
  if (a.h >> 19 != 0) {
    return '-' + com_google_gwt_lang_LongLib_toString__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Ljava_lang_String_2(com_google_gwt_lang_LongLib_neg__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a));
  }
  rem = a;
  res = '';
  while (!(rem.l == 0 && rem.m == 0 && rem.h == 0)) {
    tenPowerLong = com_google_gwt_lang_LongLib_fromInt__ILcom_google_gwt_lang_LongLibBase$LongEmul_2($intern_15);
    rem = com_google_gwt_lang_LongLibBase_divMod__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2ZLcom_google_gwt_lang_LongLibBase$LongEmul_2(rem, tenPowerLong, true);
    digits = '' + com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLibBase_remainder);
    if (!(rem.l == 0 && rem.m == 0 && rem.h == 0)) {
      zeroesNeeded = 9 - digits.length;
      for (; zeroesNeeded > 0; zeroesNeeded--) {
        digits = '0' + digits;
      }
    }
    res = digits + res;
  }
  return res;
}

function com_google_gwt_lang_LongLib_xor__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(a, b){
  return {l:a.l ^ b.l, m:a.m ^ b.m, h:a.h ^ b.h};
}

var com_google_gwt_lang_LongLib_boxedValues;
function com_google_gwt_lang_LongLib$Const_$clinit__V(){
  com_google_gwt_lang_LongLib$Const_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  com_google_gwt_lang_LongLib$Const_MAX_1VALUE = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2($intern_8, $intern_8, 524287);
  com_google_gwt_lang_LongLib$Const_MIN_1VALUE = com_google_gwt_lang_LongLibBase_create0__IIILcom_google_gwt_lang_LongLibBase$LongEmul_2(0, 0, $intern_10);
  com_google_gwt_lang_LongLib$Const_ONE = com_google_gwt_lang_LongLib_fromInt__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(1);
  com_google_gwt_lang_LongLib_fromInt__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(2);
  com_google_gwt_lang_LongLib$Const_ZERO = com_google_gwt_lang_LongLib_fromInt__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(0);
}

var com_google_gwt_lang_LongLib$Const_MAX_1VALUE, com_google_gwt_lang_LongLib$Const_MIN_1VALUE, com_google_gwt_lang_LongLib$Const_ONE, com_google_gwt_lang_LongLib$Const_ZERO;
function com_google_gwt_lang_Util_hasTypeMarker__Ljava_lang_Object_2Z(o){
  return o.java_lang_Object_typeMarker$ === com_google_gwt_lang_JavaClassHierarchySetupUtil_typeMarkerFn__V;
}

function com_google_gwt_lang_imcs_1_1layoutengine_1_1EntryMethodHolder_init__V(){
  client_IMCSLayoutEngineEntryPoint_$registerWrapper__Lclient_IMCSLayoutEngineEntryPoint_2V();
}

function java_awt_geom_Line2D_$ptLineDist__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2D(this$static, pt){
  return java_lang_Math_sqrt__DD(java_awt_geom_Line2D_ptLineDistSq__DDDDDDD(this$static.java_awt_geom_Line2D$Double_x1, this$static.java_awt_geom_Line2D$Double_y1, this$static.java_awt_geom_Line2D$Double_x2, this$static.java_awt_geom_Line2D$Double_y2, pt.java_awt_geom_Point2D$Double_x, pt.java_awt_geom_Point2D$Double_y));
}

function java_awt_geom_Line2D_$relativeCCW__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2I(this$static, p){
  return java_awt_geom_Line2D_relativeCCW__DDDDDDI(this$static.java_awt_geom_Line2D$Double_x1, this$static.java_awt_geom_Line2D$Double_y1, this$static.java_awt_geom_Line2D$Double_x2, this$static.java_awt_geom_Line2D$Double_y2, p.java_awt_geom_Point2D$Double_x, p.java_awt_geom_Point2D$Double_y);
}

function java_awt_geom_Line2D_linesIntersect__DDDDDDDDZ(x1, y1, x2, y2, x3, y3, x4, y4){
  return java_awt_geom_Line2D_relativeCCW__DDDDDDI(x1, y1, x2, y2, x3, y3) * java_awt_geom_Line2D_relativeCCW__DDDDDDI(x1, y1, x2, y2, x4, y4) <= 0 && java_awt_geom_Line2D_relativeCCW__DDDDDDI(x3, y3, x4, y4, x1, y1) * java_awt_geom_Line2D_relativeCCW__DDDDDDI(x3, y3, x4, y4, x2, y2) <= 0;
}

function java_awt_geom_Line2D_ptLineDistSq__DDDDDDD(x1, y1, x2, y2, px, py){
  var dotprod, lenSq, projlenSq;
  x2 -= x1;
  y2 -= y1;
  px -= x1;
  py -= y1;
  dotprod = px * x2 + py * y2;
  projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
  lenSq = px * px + py * py - projlenSq;
  lenSq < 0 && (lenSq = 0);
  return lenSq;
}

function java_awt_geom_Line2D_ptSegDistSq__DDDDDDD(x1, y1, x2, y2, px, py){
  var dotprod, lenSq, projlenSq;
  x2 -= x1;
  y2 -= y1;
  px -= x1;
  py -= y1;
  dotprod = px * x2 + py * y2;
  if (dotprod <= 0) {
    projlenSq = 0;
  }
   else {
    px = x2 - px;
    py = y2 - py;
    dotprod = px * x2 + py * y2;
    dotprod <= 0?(projlenSq = 0):(projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2));
  }
  lenSq = px * px + py * py - projlenSq;
  lenSq < 0 && (lenSq = 0);
  return lenSq;
}

function java_awt_geom_Line2D_relativeCCW__DDDDDDI(x1, y1, x2, y2, px, py){
  var ccw;
  x2 -= x1;
  y2 -= y1;
  px -= x1;
  py -= y1;
  ccw = px * y2 - py * x2;
  if (ccw == 0) {
    ccw = px * x2 + py * y2;
    if (ccw > 0) {
      px -= x2;
      py -= y2;
      ccw = px * x2 + py * y2;
      ccw < 0 && (ccw = 0);
    }
  }
  return ccw < 0?-1:ccw > 0?1:0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(301, 1, {6:1});
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Line2D_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_16, 'Line2D', 301);
function java_awt_geom_Line2D$Double_$setLine__Ljava_awt_geom_Line2D$Double_2DDDDV(this$static, x1, y1, x2, y2){
  this$static.java_awt_geom_Line2D$Double_x1 = x1;
  this$static.java_awt_geom_Line2D$Double_y1 = y1;
  this$static.java_awt_geom_Line2D$Double_x2 = x2;
  this$static.java_awt_geom_Line2D$Double_y2 = y2;
}

function java_awt_geom_Line2D$Double_Line2D$Double__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V(p1, p2){
  java_awt_geom_Line2D$Double_$setLine__Ljava_awt_geom_Line2D$Double_2DDDDV(this, p1.java_awt_geom_Point2D$Double_x, p1.java_awt_geom_Point2D$Double_y, p2.java_awt_geom_Point2D$Double_x, p2.java_awt_geom_Point2D$Double_y);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(157, 301, {5:1, 6:1}, java_awt_geom_Line2D$Double_Line2D$Double__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V);
_.java_awt_geom_Line2D$Double_x1 = 0;
_.java_awt_geom_Line2D$Double_x2 = 0;
_.java_awt_geom_Line2D$Double_y1 = 0;
_.java_awt_geom_Line2D$Double_y2 = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Line2D$Double_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_16, 'Line2D/Double', 157);
function java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(this$static, pt){
  var px, py;
  px = pt.java_awt_geom_Point2D$Double_x - this$static.java_awt_geom_Point2D$Double_x;
  py = pt.java_awt_geom_Point2D$Double_y - this$static.java_awt_geom_Point2D$Double_y;
  return Math.sqrt(px * px + py * py);
}

function java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(this$static, obj){
  var p2d;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(obj, 67)) {
    p2d = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obj, 67);
    return this$static.java_awt_geom_Point2D$Double_x == p2d.java_awt_geom_Point2D$Double_x && this$static.java_awt_geom_Point2D$Double_y == p2d.java_awt_geom_Point2D$Double_y;
  }
  return this$static === obj;
}

function java_awt_geom_Point2D_$setLocation__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V(this$static, p){
  java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(this$static, p.java_awt_geom_Point2D$Double_x, p.java_awt_geom_Point2D$Double_y);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(67, 1, {67:1, 6:1});
_.equals__Ljava_lang_Object_2Z$ = function java_awt_geom_Point2D_equals__Ljava_lang_Object_2Z(obj){
  return java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(this, obj);
}
;
_.hashCode__I$ = function java_awt_geom_Point2D_hashCode__I(){
  var bits;
  bits = java_lang_Double_doubleToLongBits__DJ(this.java_awt_geom_Point2D$Double_x);
  bits = com_google_gwt_lang_LongLib_xor__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(bits, com_google_gwt_lang_LongLib_mul__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.java_awt_geom_Point2D$Double_y), {l:31, m:0, h:0}));
  return com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(bits) ^ com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_shr__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(bits, 32));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Point2D_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_16, 'Point2D', 67);
function java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(this$static, x_0, y_0){
  this$static.java_awt_geom_Point2D$Double_x = x_0;
  this$static.java_awt_geom_Point2D$Double_y = y_0;
}

function java_awt_geom_Point2D$Double_Point2D$Double__V(){
}

function java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, y_0){
  this.java_awt_geom_Point2D$Double_x = x_0;
  this.java_awt_geom_Point2D$Double_y = y_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(3, 67, {67:1, 3:1, 5:1, 6:1}, java_awt_geom_Point2D$Double_Point2D$Double__V, java_awt_geom_Point2D$Double_Point2D$Double__DDV);
_.toString__Ljava_lang_String_2$ = function java_awt_geom_Point2D$Double_toString__Ljava_lang_String_2(){
  return 'Point2D.Double[' + this.java_awt_geom_Point2D$Double_x + ', ' + this.java_awt_geom_Point2D$Double_y + ']';
}
;
_.java_awt_geom_Point2D$Double_x = 0;
_.java_awt_geom_Point2D$Double_y = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Point2D$Double_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_16, 'Point2D/Double', 3);
function java_awt_geom_RectangularShape_$getMaxX__Ljava_awt_geom_RectangularShape_2D(this$static){
  return this$static.java_awt_geom_Rectangle2D$Double_x + this$static.java_awt_geom_Rectangle2D$Double_width;
}

function java_awt_geom_RectangularShape_$getMaxY__Ljava_awt_geom_RectangularShape_2D(this$static){
  return this$static.java_awt_geom_Rectangle2D$Double_y + this$static.java_awt_geom_Rectangle2D$Double_height;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(296, 1, {6:1});
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1RectangularShape_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_16, 'RectangularShape', 296);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(136, 296, {136:1, 6:1});
_.equals__Ljava_lang_Object_2Z$ = function java_awt_geom_Rectangle2D_equals__Ljava_lang_Object_2Z(obj){
  var r2d;
  if (obj === this) {
    return true;
  }
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(obj, 136)) {
    r2d = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obj, 136);
    return this.java_awt_geom_Rectangle2D$Double_x == r2d.java_awt_geom_Rectangle2D$Double_x && this.java_awt_geom_Rectangle2D$Double_y == r2d.java_awt_geom_Rectangle2D$Double_y && this.java_awt_geom_Rectangle2D$Double_width == r2d.java_awt_geom_Rectangle2D$Double_width && this.java_awt_geom_Rectangle2D$Double_height == r2d.java_awt_geom_Rectangle2D$Double_height;
  }
  return false;
}
;
_.hashCode__I$ = function java_awt_geom_Rectangle2D_hashCode__I(){
  var bits;
  bits = java_lang_Double_doubleToLongBits__DJ(this.java_awt_geom_Rectangle2D$Double_x);
  bits = com_google_gwt_lang_LongLib_add__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(bits, com_google_gwt_lang_LongLib_mul__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.java_awt_geom_Rectangle2D$Double_y), {l:37, m:0, h:0}));
  bits = com_google_gwt_lang_LongLib_add__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(bits, com_google_gwt_lang_LongLib_mul__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.java_awt_geom_Rectangle2D$Double_width), {l:43, m:0, h:0}));
  bits = com_google_gwt_lang_LongLib_add__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(bits, com_google_gwt_lang_LongLib_mul__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.java_awt_geom_Rectangle2D$Double_height), {l:47, m:0, h:0}));
  return com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(bits) ^ com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_shr__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(bits, 32));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Rectangle2D_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_16, 'Rectangle2D', 136);
function java_awt_geom_Rectangle2D$Double_$setRect__Ljava_awt_geom_Rectangle2D$Double_2DDDDV(this$static, x_0, y_0, w, h){
  this$static.java_awt_geom_Rectangle2D$Double_x = x_0;
  this$static.java_awt_geom_Rectangle2D$Double_y = y_0;
  this$static.java_awt_geom_Rectangle2D$Double_width = w;
  this$static.java_awt_geom_Rectangle2D$Double_height = h;
}

function java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__V(){
}

function java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(x_0, y_0, w, h){
  java_awt_geom_Rectangle2D$Double_$setRect__Ljava_awt_geom_Rectangle2D$Double_2DDDDV(this, x_0, y_0, w, h);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(22, 136, {136:1, 22:1, 5:1, 6:1}, java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__V, java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV);
_.toString__Ljava_lang_String_2$ = function java_awt_geom_Rectangle2D$Double_toString__Ljava_lang_String_2(){
  return java_lang_Class_$ensureNamesAreInitialized__Ljava_lang_Class_2V(com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Rectangle2D$Double_12_1classLit) , com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Rectangle2D$Double_12_1classLit.java_lang_Class_typeName + '[x=' + this.java_awt_geom_Rectangle2D$Double_x + ',y=' + this.java_awt_geom_Rectangle2D$Double_y + ',w=' + this.java_awt_geom_Rectangle2D$Double_width + ',h=' + this.java_awt_geom_Rectangle2D$Double_height + ']';
}
;
_.java_awt_geom_Rectangle2D$Double_height = 0;
_.java_awt_geom_Rectangle2D$Double_width = 0;
_.java_awt_geom_Rectangle2D$Double_x = 0;
_.java_awt_geom_Rectangle2D$Double_y = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Rectangle2D$Double_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_16, 'Rectangle2D/Double', 22);
function java_lang_AbstractStringBuilder_AbstractStringBuilder__Ljava_lang_String_2V(string){
  this.java_lang_AbstractStringBuilder_string = string;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(146, 1, {});
_.toString__Ljava_lang_String_2$ = function java_lang_AbstractStringBuilder_toString__Ljava_lang_String_2(){
  return this.java_lang_AbstractStringBuilder_string;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1AbstractStringBuilder_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'AbstractStringBuilder', 146);
function java_lang_ArithmeticException_ArithmeticException__Ljava_lang_String_2V(){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, 'divide by zero');
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(195, 40, $intern_4, java_lang_ArithmeticException_ArithmeticException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1ArithmeticException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'ArithmeticException', 195);
function java_lang_ArrayStoreException_ArrayStoreException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_lang_ArrayStoreException_ArrayStoreException__Ljava_lang_String_2V(message){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, message);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(117, 40, $intern_4, java_lang_ArrayStoreException_ArrayStoreException__V, java_lang_ArrayStoreException_ArrayStoreException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1ArrayStoreException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'ArrayStoreException', 117);
function java_lang_Boolean_$clinit__V(){
  java_lang_Boolean_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  java_lang_Boolean_FALSE = new java_lang_Boolean_Boolean__ZV(false);
  java_lang_Boolean_TRUE = new java_lang_Boolean_Boolean__ZV(true);
}

function java_lang_Boolean_$compareTo__Ljava_lang_Boolean_2Ljava_lang_Boolean_2I(this$static, b){
  return java_lang_Boolean_compare__ZZI(this$static.java_lang_Boolean_value, b.java_lang_Boolean_value);
}

function java_lang_Boolean_Boolean__ZV(value_0){
  this.java_lang_Boolean_value = value_0;
}

function java_lang_Boolean_compare__ZZI(x_0, y_0){
  return x_0 == y_0?0:x_0?1:-1;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(96, 1, {5:1, 96:1, 29:1}, java_lang_Boolean_Boolean__ZV);
_.compareTo__Ljava_lang_Object_2I = function java_lang_Boolean_compareTo__Ljava_lang_Object_2I(b){
  return java_lang_Boolean_$compareTo__Ljava_lang_Boolean_2Ljava_lang_Boolean_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 96));
}
;
_.equals__Ljava_lang_Object_2Z$ = function java_lang_Boolean_equals__Ljava_lang_Object_2Z(o){
  return com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 96) && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 96).java_lang_Boolean_value == this.java_lang_Boolean_value;
}
;
_.hashCode__I$ = function java_lang_Boolean_hashCode__I(){
  return this.java_lang_Boolean_value?1231:1237;
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Boolean_toString__Ljava_lang_String_2(){
  return '' + this.java_lang_Boolean_value;
}
;
_.java_lang_Boolean_value = false;
var java_lang_Boolean_FALSE, java_lang_Boolean_TRUE;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Boolean_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Boolean', 96);
function java_lang_ClassCastException_ClassCastException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_lang_ClassCastException_ClassCastException__Ljava_lang_String_2V(message){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, message);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(83, 40, $intern_4, java_lang_ClassCastException_ClassCastException__V, java_lang_ClassCastException_ClassCastException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1ClassCastException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'ClassCastException', 83);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(132, 1, {5:1, 132:1});
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Number_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Number', 132);
function java_lang_Double_$clinit__V(){
  java_lang_Double_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  java_lang_Double_powers = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [1.3407807929942597E154, 1.157920892373162E77, 3.4028236692093846E38, 1.8446744073709552E19, 4294967296, 65536, 256, 16, 4, 2]);
  java_lang_Double_invPowers = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [7.458340731200207E-155, 8.636168555094445E-78, 2.9387358770557188E-39, 5.421010862427522E-20, 2.3283064365386963E-10, $intern_18, 0.00390625, 0.0625, $intern_19, 0.5]);
}

function java_lang_Double_$compareTo__Ljava_lang_Double_2Ljava_lang_Double_2I(this$static, b){
  return java_lang_Double_compare__DDI(this$static.java_lang_Double_value, b.java_lang_Double_value);
}

function java_lang_Double_Double__DV(value_0){
  java_lang_Double_$clinit__V();
  this.java_lang_Double_value = value_0;
}

function java_lang_Double_compare__DDI(x_0, y_0){
  java_lang_Double_$clinit__V();
  if (x_0 < y_0) {
    return -1;
  }
  if (x_0 > y_0) {
    return 1;
  }
  if (x_0 == y_0) {
    return 0;
  }
  return java_lang_Double_isNaN__DZ(x_0)?java_lang_Double_isNaN__DZ(y_0)?0:1:-1;
}

function java_lang_Double_doubleToLongBits__DJ(value_0){
  java_lang_Double_$clinit__V();
  var bit, exp_0, i, ihi, ilo, negative;
  if (java_lang_Double_isNaN__DZ(value_0)) {
    return {l:0, m:0, h:524160};
  }
  negative = false;
  if (value_0 == 0) {
    return 1 / value_0 == $intern_20?{l:0, m:0, h:$intern_10}:{l:0, m:0, h:0};
  }
  if (value_0 < 0) {
    negative = true;
    value_0 = -value_0;
  }
  if (!isFinite(value_0) && !isNaN(value_0)) {
    return negative?{l:0, m:0, h:1048320}:{l:0, m:0, h:524032};
  }
  exp_0 = 0;
  if (value_0 < 1) {
    bit = 512;
    for (i = 0; i < 10; ++i , bit >>= 1) {
      if (value_0 < java_lang_Double_invPowers[i] && exp_0 - bit >= -1023) {
        value_0 *= java_lang_Double_powers[i];
        exp_0 -= bit;
      }
    }
    if (value_0 < 1 && exp_0 - 1 >= -1023) {
      value_0 *= 2;
      --exp_0;
    }
  }
   else if (value_0 >= 2) {
    bit = 512;
    for (i = 0; i < 10; ++i , bit >>= 1) {
      if (value_0 >= java_lang_Double_powers[i]) {
        value_0 *= java_lang_Double_invPowers[i];
        exp_0 += bit;
      }
    }
  }
  exp_0 > -1023?(value_0 -= 1):(value_0 *= 0.5);
  ihi = com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0 * 1048576);
  value_0 -= com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(ihi) * 9.5367431640625E-7;
  ilo = com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0 * 4503599627370496);
  ihi = com_google_gwt_lang_LongLib_or__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(ihi, com_google_gwt_lang_LongLib_fromInt__ILcom_google_gwt_lang_LongLibBase$LongEmul_2(exp_0 + 1023 << 20));
  negative && (ihi = com_google_gwt_lang_LongLib_or__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(ihi, {l:0, m:512, h:0}));
  return com_google_gwt_lang_LongLib_or__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(com_google_gwt_lang_LongLib_shl__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(ihi, 32), ilo);
}

function java_lang_Double_isNaN__DZ(x_0){
  java_lang_Double_$clinit__V();
  return isNaN(x_0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(11, 132, {5:1, 29:1, 11:1, 132:1}, java_lang_Double_Double__DV);
_.compareTo__Ljava_lang_Object_2I = function java_lang_Double_compareTo__Ljava_lang_Object_2I(b){
  return java_lang_Double_$compareTo__Ljava_lang_Double_2Ljava_lang_Double_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 11));
}
;
_.equals__Ljava_lang_Object_2Z$ = function java_lang_Double_equals__Ljava_lang_Object_2Z(o){
  return com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 11) && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 11).java_lang_Double_value == this.java_lang_Double_value;
}
;
_.hashCode__I$ = function java_lang_Double_hashCode__I(){
  return com_google_gwt_lang_Cast_round_1int__DI(this.java_lang_Double_value);
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Double_toString__Ljava_lang_String_2(){
  return '' + this.java_lang_Double_value;
}
;
_.java_lang_Double_value = 0;
var java_lang_Double_invPowers, java_lang_Double_powers;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Double_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Double', 11);
function java_lang_Enum_$compareTo__Ljava_lang_Enum_2Ljava_lang_Enum_2I(this$static, other){
  return this$static.java_lang_Enum_ordinal - other.java_lang_Enum_ordinal;
}

function java_lang_Enum_$toString__Ljava_lang_Enum_2Ljava_lang_String_2(this$static){
  return this$static.java_lang_Enum_name != null?this$static.java_lang_Enum_name:'' + this$static.java_lang_Enum_ordinal;
}

function java_lang_Enum_Enum__Ljava_lang_String_2IV(name_0, ordinal){
  this.java_lang_Enum_name = name_0;
  this.java_lang_Enum_ordinal = ordinal;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(36, 1, {5:1, 29:1, 36:1});
_.compareTo__Ljava_lang_Object_2I = function java_lang_Enum_compareTo__Ljava_lang_Object_2I(other){
  return java_lang_Enum_$compareTo__Ljava_lang_Enum_2Ljava_lang_Enum_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(other, 36));
}
;
_.equals__Ljava_lang_Object_2Z$ = function java_lang_Enum_equals__Ljava_lang_Object_2Z(other){
  return this === other;
}
;
_.hashCode__I$ = function java_lang_Enum_hashCode__I(){
  return com_google_gwt_core_client_impl_Impl_getHashCode__Ljava_lang_Object_2I(this);
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Enum_toString__Ljava_lang_String_2(){
  return java_lang_Enum_$toString__Ljava_lang_Enum_2Ljava_lang_String_2(this);
}
;
_.java_lang_Enum_ordinal = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Enum_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Enum', 36);
function java_lang_IllegalArgumentException_IllegalArgumentException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V(message){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, message);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(42, 40, $intern_4, java_lang_IllegalArgumentException_IllegalArgumentException__V, java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1IllegalArgumentException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'IllegalArgumentException', 42);
function java_lang_IllegalStateException_IllegalStateException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_lang_IllegalStateException_IllegalStateException__Ljava_lang_String_2V(){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, 'Unable to add element to queue');
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(174, 40, $intern_4, java_lang_IllegalStateException_IllegalStateException__V, java_lang_IllegalStateException_IllegalStateException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1IllegalStateException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'IllegalStateException', 174);
function java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V(message){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, message);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(85, 40, $intern_4, java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__V, java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1IndexOutOfBoundsException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'IndexOutOfBoundsException', 85);
function java_lang_Integer_$compareTo__Ljava_lang_Integer_2Ljava_lang_Integer_2I(this$static, b){
  return java_lang_Integer_compare__III(this$static.java_lang_Integer_value, b.java_lang_Integer_value);
}

function java_lang_Integer_Integer__IV(value_0){
  this.java_lang_Integer_value = value_0;
}

function java_lang_Integer_compare__III(x_0, y_0){
  return x_0 < y_0?-1:x_0 > y_0?1:0;
}

function java_lang_Integer_numberOfLeadingZeros__II(i){
  var m, n, y_0;
  if (i < 0) {
    return 0;
  }
   else if (i == 0) {
    return 32;
  }
   else {
    y_0 = -(i >> 16);
    m = y_0 >> 16 & 16;
    n = 16 - m;
    i = i >> m;
    y_0 = i - 256;
    m = y_0 >> 16 & 8;
    n += m;
    i <<= m;
    y_0 = i - 4096;
    m = y_0 >> 16 & 4;
    n += m;
    i <<= m;
    y_0 = i - 16384;
    m = y_0 >> 16 & 2;
    n += m;
    i <<= m;
    y_0 = i >> 14;
    m = y_0 & ~(y_0 >> 1);
    return n + 2 - m;
  }
}

function java_lang_Integer_numberOfTrailingZeros__II(i){
  var r, rtn;
  if (i == 0) {
    return 32;
  }
   else {
    rtn = 0;
    for (r = 1; (r & i) == 0; r <<= 1) {
      ++rtn;
    }
    return rtn;
  }
}

function java_lang_Integer_valueOf__ILjava_lang_Integer_2(i){
  var rebase, result;
  if (i > -129 && i < 128) {
    rebase = i + 128;
    result = (java_lang_Integer$BoxedValues_$clinit__V() , java_lang_Integer$BoxedValues_boxedValues)[rebase];
    !result && (result = java_lang_Integer$BoxedValues_boxedValues[rebase] = new java_lang_Integer_Integer__IV(i));
    return result;
  }
  return new java_lang_Integer_Integer__IV(i);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(9, 132, {5:1, 29:1, 9:1, 132:1}, java_lang_Integer_Integer__IV);
_.compareTo__Ljava_lang_Object_2I = function java_lang_Integer_compareTo__Ljava_lang_Object_2I(b){
  return java_lang_Integer_$compareTo__Ljava_lang_Integer_2Ljava_lang_Integer_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 9));
}
;
_.equals__Ljava_lang_Object_2Z$ = function java_lang_Integer_equals__Ljava_lang_Object_2Z(o){
  return com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 9) && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 9).java_lang_Integer_value == this.java_lang_Integer_value;
}
;
_.hashCode__I$ = function java_lang_Integer_hashCode__I(){
  return this.java_lang_Integer_value;
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Integer_toString__Ljava_lang_String_2(){
  return '' + this.java_lang_Integer_value;
}
;
_.java_lang_Integer_value = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Integer_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Integer', 9);
function java_lang_Integer$BoxedValues_$clinit__V(){
  java_lang_Integer$BoxedValues_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  java_lang_Integer$BoxedValues_boxedValues = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Integer_12_1classLit, $intern_14, 9, 256, 0, 1);
}

var java_lang_Integer$BoxedValues_boxedValues;
function java_lang_Long_$compareTo__Ljava_lang_Long_2Ljava_lang_Long_2I(this$static, b){
  return java_lang_Long_compare__JJI(this$static.java_lang_Long_value, b.java_lang_Long_value);
}

function java_lang_Long_Long__JV(value_0){
  this.java_lang_Long_value = value_0;
}

function java_lang_Long_compare__JJI(x_0, y_0){
  return com_google_gwt_lang_LongLib_lt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(x_0, y_0)?-1:com_google_gwt_lang_LongLib_gt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(x_0, y_0)?1:0;
}

function java_lang_Long_valueOf__JLjava_lang_Long_2(i){
  var rebase, result;
  if (com_google_gwt_lang_LongLib_gt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(i, {l:4194175, m:$intern_8, h:$intern_9}) && com_google_gwt_lang_LongLib_lt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(i, {l:128, m:0, h:0})) {
    rebase = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(i) + 128;
    result = (java_lang_Long$BoxedValues_$clinit__V() , java_lang_Long$BoxedValues_boxedValues)[rebase];
    !result && (result = java_lang_Long$BoxedValues_boxedValues[rebase] = new java_lang_Long_Long__JV(i));
    return result;
  }
  return new java_lang_Long_Long__JV(i);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(51, 132, {5:1, 29:1, 51:1, 132:1}, java_lang_Long_Long__JV);
_.compareTo__Ljava_lang_Object_2I = function java_lang_Long_compareTo__Ljava_lang_Object_2I(b){
  return java_lang_Long_$compareTo__Ljava_lang_Long_2Ljava_lang_Long_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 51));
}
;
_.doubleValue__D = function java_lang_Long_doubleValue__D(){
  return com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(this.java_lang_Long_value);
}
;
_.equals__Ljava_lang_Object_2Z$ = function java_lang_Long_equals__Ljava_lang_Object_2Z(o){
  return com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 51) && com_google_gwt_lang_LongLib_eq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 51).java_lang_Long_value, this.java_lang_Long_value);
}
;
_.hashCode__I$ = function java_lang_Long_hashCode__I(){
  return com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(this.java_lang_Long_value);
}
;
_.toString__Ljava_lang_String_2$ = function java_lang_Long_toString__Ljava_lang_String_2(){
  return '' + com_google_gwt_lang_LongLib_toString__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Ljava_lang_String_2(this.java_lang_Long_value);
}
;
_.java_lang_Long_value = {l:0, m:0, h:0};
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Long_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'Long', 51);
function java_lang_Long$BoxedValues_$clinit__V(){
  java_lang_Long$BoxedValues_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  java_lang_Long$BoxedValues_boxedValues = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Long_12_1classLit, $intern_14, 51, 256, 0, 1);
}

var java_lang_Long$BoxedValues_boxedValues;
function java_lang_Math_abs__DD(x_0){
  return x_0 <= 0?0 - x_0:x_0;
}

function java_lang_Math_abs__II(x_0){
  return x_0 < 0?-x_0:x_0;
}

function java_lang_Math_acos__DD(x_0){
  return Math.acos(x_0);
}

function java_lang_Math_atan__DD(x_0){
  return Math.atan(x_0);
}

function java_lang_Math_ceil__DD(x_0){
  return Math.ceil(x_0);
}

function java_lang_Math_cos__DD(x_0){
  return Math.cos(x_0);
}

function java_lang_Math_floor__DD(x_0){
  return Math.floor(x_0);
}

function java_lang_Math_max__DDD(x_0, y_0){
  return x_0 > y_0?x_0:y_0;
}

function java_lang_Math_max__III(x_0, y_0){
  return x_0 > y_0?x_0:y_0;
}

function java_lang_Math_min__DDD(x_0, y_0){
  return x_0 < y_0?x_0:y_0;
}

function java_lang_Math_min__III(x_0, y_0){
  return x_0 < y_0?x_0:y_0;
}

function java_lang_Math_pow__DDD(x_0, exp_0){
  return Math.pow(x_0, exp_0);
}

function java_lang_Math_round0__DD(x_0){
  return Math.round(x_0);
}

function java_lang_Math_signum__DD(d){
  return d > 0?1:d < 0?-1:0;
}

function java_lang_Math_sin__DD(x_0){
  return Math.sin(x_0);
}

function java_lang_Math_sqrt__DD(x_0){
  return Math.sqrt(x_0);
}

function java_lang_NegativeArraySizeException_NegativeArraySizeException__Ljava_lang_String_2V(message){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, message);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(256, 40, $intern_4, java_lang_NegativeArraySizeException_NegativeArraySizeException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1NegativeArraySizeException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'NegativeArraySizeException', 256);
function java_lang_NullPointerException_NullPointerException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_lang_NullPointerException_NullPointerException__Ljava_lang_String_2V(message){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, message);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(168, 40, $intern_4, java_lang_NullPointerException_NullPointerException__V, java_lang_NullPointerException_NullPointerException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1NullPointerException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'NullPointerException', 168);
function java_lang_String_$charAt__Ljava_lang_String_2IC(this$static, index_0){
  return this$static.charCodeAt(index_0);
}

function java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this$static, other){
  return this$static === other;
}

function java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z(this$static, other){
  if (other == null) {
    return false;
  }
  if (this$static == other) {
    return true;
  }
  return this$static.length == other.length && this$static.toLowerCase() == other.toLowerCase();
}

function java_lang_String__1_1substr__Ljava_lang_String_2IILjava_lang_String_2(str, beginIndex, len){
  return str.substr(beginIndex, len);
}

function java_lang_String_compareTo__Ljava_lang_String_2Ljava_lang_String_2I(thisStr, otherStr){
  if (thisStr == otherStr) {
    return 0;
  }
  return thisStr < otherStr?-1:1;
}

function java_lang_String_compareTo_1Ljava_1lang_1Object_1_1I_1_1devirtual$__Ljava_lang_Comparable_2Ljava_lang_Object_2I(this$static, other){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(this$static)?java_lang_String_compareTo__Ljava_lang_String_2Ljava_lang_String_2I(this$static, com_google_gwt_lang_Cast_dynamicCastToString__Ljava_lang_Object_2Ljava_lang_Object_2(other)):this$static.compareTo__Ljava_lang_Object_2I(other);
}

var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1String_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'String', 2);
function java_lang_String$HashCache_$clinit__V(){
  java_lang_String$HashCache_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  java_lang_String$HashCache_back = {};
  java_lang_String$HashCache_front = {};
}

function java_lang_String$HashCache_compute__Ljava_lang_String_2I(str){
  var hashCode, i, n, nBatch;
  hashCode = 0;
  n = str.length;
  nBatch = n - 4;
  i = 0;
  while (i < nBatch) {
    hashCode = str.charCodeAt(i + 3) + 31 * (str.charCodeAt(i + 2) + 31 * (str.charCodeAt(i + 1) + 31 * (str.charCodeAt(i) + 31 * hashCode)));
    hashCode = ~~hashCode;
    i += 4;
  }
  while (i < n) {
    hashCode = hashCode * 31 + java_lang_String_$charAt__Ljava_lang_String_2IC(str, i++);
  }
  hashCode = ~~hashCode;
  return hashCode;
}

function java_lang_String$HashCache_getHashCode__Ljava_lang_String_2I(str){
  java_lang_String$HashCache_$clinit__V();
  var key = ':' + str;
  var result = java_lang_String$HashCache_front[key];
  if (result != null) {
    return result;
  }
  result = java_lang_String$HashCache_back[key];
  result == null && (result = java_lang_String$HashCache_compute__Ljava_lang_String_2I(str));
  java_lang_String$HashCache_increment__V();
  return java_lang_String$HashCache_front[key] = result;
}

function java_lang_String$HashCache_increment__V(){
  if (java_lang_String$HashCache_count == 256) {
    java_lang_String$HashCache_back = java_lang_String$HashCache_front;
    java_lang_String$HashCache_front = {};
    java_lang_String$HashCache_count = 0;
  }
  ++java_lang_String$HashCache_count;
}

var java_lang_String$HashCache_back, java_lang_String$HashCache_count = 0, java_lang_String$HashCache_front;
function java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_Object_2Ljava_lang_StringBuilder_2(this$static, x_0){
  this$static.java_lang_AbstractStringBuilder_string += x_0;
  return this$static;
}

function java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_String_2Ljava_lang_StringBuilder_2(this$static, x_0){
  this$static.java_lang_AbstractStringBuilder_string += x_0;
  return this$static;
}

function java_lang_StringBuilder_StringBuilder__IV(){
  java_lang_AbstractStringBuilder_AbstractStringBuilder__Ljava_lang_String_2V.call(this, '');
}

function java_lang_StringBuilder_StringBuilder__Ljava_lang_String_2V(s){
  java_lang_AbstractStringBuilder_AbstractStringBuilder__Ljava_lang_String_2V.call(this, s);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(133, 146, {304:1}, java_lang_StringBuilder_StringBuilder__IV, java_lang_StringBuilder_StringBuilder__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1StringBuilder_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'StringBuilder', 133);
function java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(src_0, srcOfs, dest, destOfs, len){
  var destArray, destComp, destEnd, destType, destlen, srcArray, srcComp, srcType, srclen;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2V(src_0, 'src');
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2V(dest, 'dest');
  srcType = java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(src_0);
  destType = java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(dest);
  com_google_gwt_core_shared_impl_InternalPreconditions_checkArrayType__ZLjava_lang_Object_2V((srcType.java_lang_Class_modifiers & 4) != 0, 'srcType is not an array');
  com_google_gwt_core_shared_impl_InternalPreconditions_checkArrayType__ZLjava_lang_Object_2V((destType.java_lang_Class_modifiers & 4) != 0, 'destType is not an array');
  srcComp = srcType.java_lang_Class_componentType;
  destComp = destType.java_lang_Class_componentType;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkArrayType__ZLjava_lang_Object_2V((srcComp.java_lang_Class_modifiers & 1) != 0?srcComp == destComp:(destComp.java_lang_Class_modifiers & 1) == 0, "Array types don't match");
  srclen = src_0.length;
  destlen = dest.length;
  if (srcOfs < 0 || destOfs < 0 || len < 0 || srcOfs + len > srclen || destOfs + len > destlen) {
    throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__V;
  }
  if (((srcComp.java_lang_Class_modifiers & 1) == 0 || (srcComp.java_lang_Class_modifiers & 4) != 0) && srcType != destType) {
    srcArray = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(src_0, 8);
    destArray = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(dest, 8);
    if (com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(src_0) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(dest) && srcOfs < destOfs) {
      srcOfs += len;
      for (destEnd = destOfs + len; destEnd-- > destOfs;) {
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(destArray, destEnd, srcArray[--srcOfs]);
      }
    }
     else {
      for (destEnd = destOfs + len; destOfs < destEnd;) {
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(destArray, destOfs++, srcArray[srcOfs++]);
      }
    }
  }
   else 
    len > 0 && com_google_gwt_lang_Array_nativeArraySplice__Ljava_lang_Object_2ILjava_lang_Object_2IIZV(src_0, srcOfs, dest, destOfs, len, true);
}

function java_lang_UnsupportedOperationException_UnsupportedOperationException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V(message){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, message);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(31, 40, $intern_4, java_lang_UnsupportedOperationException_UnsupportedOperationException__V, java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1UnsupportedOperationException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_2, 'UnsupportedOperationException', 31);
function java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this$static, c){
  var changed, e, e$iterator;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(c);
  changed = false;
  for (e$iterator = c.iterator__Ljava_util_Iterator_2(); e$iterator.hasNext__Z();) {
    e = e$iterator.next__Ljava_lang_Object_2();
    changed = changed | this$static.add__Ljava_lang_Object_2Z(e);
  }
  return changed;
}

function java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(this$static, o, remove){
  var e, iter;
  for (iter = this$static.iterator__Ljava_util_Iterator_2(); iter.hasNext__Z();) {
    e = iter.next__Ljava_lang_Object_2();
    if (com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(o) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(e) || o != null && java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(o, e)) {
      remove && iter.remove__V();
      return true;
    }
  }
  return false;
}

function java_util_AbstractCollection_$containsAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this$static, c){
  var e, e$iterator;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(c);
  for (e$iterator = c.iterator__Ljava_util_Iterator_2(); e$iterator.hasNext__Z();) {
    e = e$iterator.next__Ljava_lang_Object_2();
    if (!this$static.contains__Ljava_lang_Object_2Z(e)) {
      return false;
    }
  }
  return true;
}

function java_util_AbstractCollection_$removeAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this$static, c){
  var changed, iter, o;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(c);
  changed = false;
  for (iter = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static); iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    o = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I()) , iter.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(iter.java_util_AbstractList$IteratorImpl_last = iter.java_util_AbstractList$IteratorImpl_i++));
    if (c.contains__Ljava_lang_Object_2Z(o)) {
      java_util_AbstractList$IteratorImpl_$remove__Ljava_util_AbstractList$IteratorImpl_2V(iter);
      changed = true;
    }
  }
  return changed;
}

function java_util_AbstractCollection_$toString__Ljava_util_AbstractCollection_2Ljava_lang_String_2(this$static){
  var comma, e, e$iterator, sb;
  sb = new java_lang_StringBuilder_StringBuilder__Ljava_lang_String_2V('[');
  comma = false;
  for (e$iterator = this$static.iterator__Ljava_util_Iterator_2(); e$iterator.hasNext__Z();) {
    e = e$iterator.next__Ljava_lang_Object_2();
    comma?(sb.java_lang_AbstractStringBuilder_string += ', ' , sb):(comma = true);
    sb.java_lang_AbstractStringBuilder_string += e === this$static?'(this Collection)':'' + e;
  }
  sb.java_lang_AbstractStringBuilder_string += ']';
  return sb.java_lang_AbstractStringBuilder_string;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(290, 1, $intern_21);
_.add__Ljava_lang_Object_2Z = function java_util_AbstractCollection_add__Ljava_lang_Object_2Z(o){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Add not supported on this collection');
}
;
_.addAll__Ljava_util_Collection_2Z = function java_util_AbstractCollection_addAll__Ljava_util_Collection_2Z(c){
  return java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this, c);
}
;
_.contains__Ljava_lang_Object_2Z = function java_util_AbstractCollection_contains__Ljava_lang_Object_2Z(o){
  return java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(this, o, false);
}
;
_.containsAll__Ljava_util_Collection_2Z = function java_util_AbstractCollection_containsAll__Ljava_util_Collection_2Z(c){
  return java_util_AbstractCollection_$containsAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this, c);
}
;
_.isEmpty__Z = function java_util_AbstractCollection_isEmpty__Z(){
  return this.size__I() == 0;
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_AbstractCollection_remove__Ljava_lang_Object_2Z(o){
  return java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(this, o, true);
}
;
_.toArray___3Ljava_lang_Object_2 = function java_util_AbstractCollection_toArray___3Ljava_lang_Object_2(){
  return this.toArray___3Ljava_lang_Object_2_3Ljava_lang_Object_2(com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, this.size__I(), 3, 1));
}
;
_.toArray___3Ljava_lang_Object_2_3Ljava_lang_Object_2 = function java_util_AbstractCollection_toArray___3Ljava_lang_Object_2_3Ljava_lang_Object_2(a){
  var i, it, size_0;
  size_0 = this.size__I();
  a.length < size_0 && (a = com_google_gwt_lang_Array_createFrom___3Ljava_lang_Object_2I_3Ljava_lang_Object_2(a, size_0));
  it = this.iterator__Ljava_util_Iterator_2();
  for (i = 0; i < size_0; ++i) {
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(a, i, it.next__Ljava_lang_Object_2());
  }
  a.length > size_0 && com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(a, size_0, null);
  return a;
}
;
_.toString__Ljava_lang_String_2$ = function java_util_AbstractCollection_toString__Ljava_lang_String_2(){
  return java_util_AbstractCollection_$toString__Ljava_util_AbstractCollection_2Ljava_lang_String_2(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractCollection_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractCollection', 290);
function java_util_AbstractMap_$containsEntry__Ljava_util_AbstractMap_2Ljava_util_Map$Entry_2Z(this$static, entry){
  var key, ourValue, value_0;
  key = entry.getKey__Ljava_lang_Object_2();
  value_0 = entry.getValue__Ljava_lang_Object_2();
  ourValue = this$static.get__Ljava_lang_Object_2Ljava_lang_Object_2(key);
  if (!(com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(value_0) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(ourValue) || value_0 != null && java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(value_0, ourValue))) {
    return false;
  }
  if (ourValue == null && !this$static.containsKey__Ljava_lang_Object_2Z(key)) {
    return false;
  }
  return true;
}

function java_util_AbstractMap_$implFindEntry__Ljava_util_AbstractMap_2Ljava_lang_Object_2ZLjava_util_Map$Entry_2(this$static, key, remove){
  var entry, iter, k;
  for (iter = this$static.entrySet__Ljava_util_Set_2().iterator__Ljava_util_Iterator_2(); iter.hasNext__Z();) {
    entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.next__Ljava_lang_Object_2(), 45);
    k = entry.getKey__Ljava_lang_Object_2();
    if (com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(key) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(k) || key != null && java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(key, k)) {
      if (remove) {
        entry = new java_util_AbstractMap$SimpleEntry_AbstractMap$SimpleEntry__Ljava_lang_Object_2Ljava_lang_Object_2V(entry.getKey__Ljava_lang_Object_2(), entry.getValue__Ljava_lang_Object_2());
        iter.remove__V();
      }
      return entry;
    }
  }
  return null;
}

function java_util_AbstractMap_$toString__Ljava_util_AbstractMap_2Ljava_lang_Object_2Ljava_lang_String_2(this$static, o){
  return o === this$static?'(this Map)':'' + o;
}

function java_util_AbstractMap_getEntryKeyOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(entry){
  return !entry?null:entry.java_util_AbstractMap$AbstractEntry_key;
}

function java_util_AbstractMap_getEntryValueOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(entry){
  return !entry?null:entry.getValue__Ljava_lang_Object_2();
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(289, 1, $intern_23);
_.package_private$java_util_AbstractMap$containsEntry__Ljava_util_Map$Entry_2Z = function java_util_AbstractMap_containsEntry__Ljava_util_Map$Entry_2Z(entry){
  return java_util_AbstractMap_$containsEntry__Ljava_util_AbstractMap_2Ljava_util_Map$Entry_2Z(this, entry);
}
;
_.containsKey__Ljava_lang_Object_2Z = function java_util_AbstractMap_containsKey__Ljava_lang_Object_2Z(key){
  return !!java_util_AbstractMap_$implFindEntry__Ljava_util_AbstractMap_2Ljava_lang_Object_2ZLjava_util_Map$Entry_2(this, key, false);
}
;
_.equals__Ljava_lang_Object_2Z$ = function java_util_AbstractMap_equals__Ljava_lang_Object_2Z(obj){
  var entry, entry$iterator, otherMap;
  if (obj === this) {
    return true;
  }
  if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(obj, 94)) {
    return false;
  }
  otherMap = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obj, 94);
  if (this.size__I() != otherMap.size__I()) {
    return false;
  }
  for (entry$iterator = otherMap.entrySet__Ljava_util_Set_2().iterator__Ljava_util_Iterator_2(); entry$iterator.hasNext__Z();) {
    entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(entry$iterator.next__Ljava_lang_Object_2(), 45);
    if (!this.package_private$java_util_AbstractMap$containsEntry__Ljava_util_Map$Entry_2Z(entry)) {
      return false;
    }
  }
  return true;
}
;
_.get__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractMap_get__Ljava_lang_Object_2Ljava_lang_Object_2(key){
  return java_util_AbstractMap_getEntryValueOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(java_util_AbstractMap_$implFindEntry__Ljava_util_AbstractMap_2Ljava_lang_Object_2ZLjava_util_Map$Entry_2(this, key, false));
}
;
_.hashCode__I$ = function java_util_AbstractMap_hashCode__I(){
  return java_util_Collections_hashCode__Ljava_lang_Iterable_2I(this.entrySet__Ljava_util_Set_2());
}
;
_.keySet__Ljava_util_Set_2 = function java_util_AbstractMap_keySet__Ljava_util_Set_2(){
  return new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this);
}
;
_.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractMap_put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(key, value_0){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Put not supported on this map');
}
;
_.remove__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractMap_remove__Ljava_lang_Object_2Ljava_lang_Object_2(key){
  return java_util_AbstractMap_getEntryValueOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(java_util_AbstractMap_$implFindEntry__Ljava_util_AbstractMap_2Ljava_lang_Object_2ZLjava_util_Map$Entry_2(this, key, true));
}
;
_.size__I = function java_util_AbstractMap_size__I(){
  return this.entrySet__Ljava_util_Set_2().size__I();
}
;
_.toString__Ljava_lang_String_2$ = function java_util_AbstractMap_toString__Ljava_lang_String_2(){
  var comma, entry, entry$iterator, sb;
  sb = new java_lang_StringBuilder_StringBuilder__Ljava_lang_String_2V('{');
  comma = false;
  for (entry$iterator = this.entrySet__Ljava_util_Set_2().iterator__Ljava_util_Iterator_2(); entry$iterator.hasNext__Z();) {
    entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(entry$iterator.next__Ljava_lang_Object_2(), 45);
    comma?(sb.java_lang_AbstractStringBuilder_string += ', ' , sb):(comma = true);
    java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_String_2Ljava_lang_StringBuilder_2(sb, java_util_AbstractMap_$toString__Ljava_util_AbstractMap_2Ljava_lang_Object_2Ljava_lang_String_2(this, entry.getKey__Ljava_lang_Object_2()));
    sb.java_lang_AbstractStringBuilder_string += '=';
    java_lang_StringBuilder_$append__Ljava_lang_StringBuilder_2Ljava_lang_String_2Ljava_lang_StringBuilder_2(sb, java_util_AbstractMap_$toString__Ljava_util_AbstractMap_2Ljava_lang_Object_2Ljava_lang_String_2(this, entry.getValue__Ljava_lang_Object_2()));
  }
  sb.java_lang_AbstractStringBuilder_string += '}';
  return sb.java_lang_AbstractStringBuilder_string;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMap', 289);
function java_util_AbstractHashMap_$elementAdded__Ljava_util_AbstractHashMap_2V(this$static){
  ++this$static.java_util_AbstractHashMap_size;
  java_util_ConcurrentModificationDetector_structureChanged__Ljava_lang_Object_2V(this$static);
}

function java_util_AbstractHashMap_$elementRemoved__Ljava_util_AbstractHashMap_2V(this$static){
  --this$static.java_util_AbstractHashMap_size;
  java_util_ConcurrentModificationDetector_structureChanged__Ljava_lang_Object_2V(this$static);
}

function java_util_AbstractHashMap_$reset__Ljava_util_AbstractHashMap_2V(this$static){
  this$static.java_util_AbstractHashMap_hashCodeMap = new java_util_InternalJsHashCodeMap_InternalJsHashCodeMap__V;
  this$static.java_util_AbstractHashMap_hashCodeMap.java_util_InternalJsHashCodeMap_host = this$static;
  this$static.java_util_AbstractHashMap_stringMap = new java_util_InternalJsStringMap_InternalJsStringMap__V;
  this$static.java_util_AbstractHashMap_stringMap.java_util_InternalJsStringMap_host = this$static;
  this$static.java_util_AbstractHashMap_size = 0;
  java_util_ConcurrentModificationDetector_structureChanged__Ljava_lang_Object_2V(this$static);
}

function java_util_AbstractHashMap_AbstractHashMap__IFV(ignored, alsoIgnored){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZLjava_lang_Object_2V(ignored >= 0, 'Negative initial capacity');
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZLjava_lang_Object_2V(alsoIgnored >= 0, 'Non-positive load factor');
  java_util_AbstractHashMap_$reset__Ljava_util_AbstractHashMap_2V(this);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(134, 289, $intern_23);
_.clear__V = function java_util_AbstractHashMap_clear__V(){
  java_util_AbstractHashMap_$reset__Ljava_util_AbstractHashMap_2V(this);
}
;
_.containsKey__Ljava_lang_Object_2Z = function java_util_AbstractHashMap_containsKey__Ljava_lang_Object_2Z(key){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(key)?key == null?!!java_util_InternalJsHashCodeMap_$getEntry__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this.java_util_AbstractHashMap_hashCodeMap, null):!(java_util_InternalJsStringMap_$at__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_stringMap, key) === undefined):!!java_util_InternalJsHashCodeMap_$getEntry__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this.java_util_AbstractHashMap_hashCodeMap, key);
}
;
_.containsValue__Ljava_lang_Object_2Z = function java_util_AbstractHashMap_containsValue__Ljava_lang_Object_2Z(value_0){
  return java_util_InternalJsStringMap_$containsValue__Ljava_util_InternalJsStringMap_2Ljava_lang_Object_2Z(this.java_util_AbstractHashMap_stringMap, value_0) || java_util_InternalJsHashCodeMap_$containsValue__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Z(this.java_util_AbstractHashMap_hashCodeMap, value_0);
}
;
_.entrySet__Ljava_util_Set_2 = function java_util_AbstractHashMap_entrySet__Ljava_util_Set_2(){
  return new java_util_AbstractHashMap$EntrySet_AbstractHashMap$EntrySet__Ljava_util_AbstractHashMap_2V(this);
}
;
_.get__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractHashMap_get__Ljava_lang_Object_2Ljava_lang_Object_2(key){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(key)?key == null?java_util_AbstractMap_getEntryValueOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(java_util_InternalJsHashCodeMap_$getEntry__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this.java_util_AbstractHashMap_hashCodeMap, null)):java_util_InternalJsStringMap_$at__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_stringMap, key):java_util_AbstractMap_getEntryValueOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(java_util_InternalJsHashCodeMap_$getEntry__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this.java_util_AbstractHashMap_hashCodeMap, key));
}
;
_.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractHashMap_put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(key, value_0){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(key)?key == null?java_util_InternalJsHashCodeMap_$put__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_hashCodeMap, null, value_0):java_util_InternalJsStringMap_$put__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_stringMap, key, value_0):java_util_InternalJsHashCodeMap_$put__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_hashCodeMap, key, value_0);
}
;
_.remove__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractHashMap_remove__Ljava_lang_Object_2Ljava_lang_Object_2(key){
  return com_google_gwt_lang_Cast_isJavaString__Ljava_lang_Object_2Z(key)?key == null?java_util_InternalJsHashCodeMap_$remove__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_hashCodeMap, null):java_util_InternalJsStringMap_$remove__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_stringMap, key):java_util_InternalJsHashCodeMap_$remove__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_AbstractHashMap_hashCodeMap, key);
}
;
_.size__I = function java_util_AbstractHashMap_size__I(){
  return this.java_util_AbstractHashMap_size;
}
;
_.java_util_AbstractHashMap_size = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractHashMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractHashMap', 134);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(291, 290, $intern_24);
_.equals__Ljava_lang_Object_2Z$ = function java_util_AbstractSet_equals__Ljava_lang_Object_2Z(o){
  var other;
  if (o === this) {
    return true;
  }
  if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 56)) {
    return false;
  }
  other = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 56);
  if (other.size__I() != this.size__I()) {
    return false;
  }
  return java_util_AbstractCollection_$containsAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this, other);
}
;
_.hashCode__I$ = function java_util_AbstractSet_hashCode__I(){
  return java_util_Collections_hashCode__Ljava_lang_Iterable_2I(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractSet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractSet', 291);
function java_util_AbstractHashMap$EntrySet_$contains__Ljava_util_AbstractHashMap$EntrySet_2Ljava_lang_Object_2Z(this$static, o){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 45)) {
    return java_util_AbstractMap_$containsEntry__Ljava_util_AbstractMap_2Ljava_util_Map$Entry_2Z(this$static.java_util_AbstractHashMap$EntrySet_this$01, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 45));
  }
  return false;
}

function java_util_AbstractHashMap$EntrySet_AbstractHashMap$EntrySet__Ljava_util_AbstractHashMap_2V(this$0){
  this.java_util_AbstractHashMap$EntrySet_this$01 = this$0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(191, 291, $intern_24, java_util_AbstractHashMap$EntrySet_AbstractHashMap$EntrySet__Ljava_util_AbstractHashMap_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_AbstractHashMap$EntrySet_contains__Ljava_lang_Object_2Z(o){
  return java_util_AbstractHashMap$EntrySet_$contains__Ljava_util_AbstractHashMap$EntrySet_2Ljava_lang_Object_2Z(this, o);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_AbstractHashMap$EntrySet_iterator__Ljava_util_Iterator_2(){
  return new java_util_AbstractHashMap$EntrySetIterator_AbstractHashMap$EntrySetIterator__Ljava_util_AbstractHashMap_2V(this.java_util_AbstractHashMap$EntrySet_this$01);
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_AbstractHashMap$EntrySet_remove__Ljava_lang_Object_2Z(entry){
  var key;
  if (java_util_AbstractHashMap$EntrySet_$contains__Ljava_util_AbstractHashMap$EntrySet_2Ljava_lang_Object_2Z(this, entry)) {
    key = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(entry, 45).getKey__Ljava_lang_Object_2();
    this.java_util_AbstractHashMap$EntrySet_this$01.remove__Ljava_lang_Object_2Ljava_lang_Object_2(key);
    return true;
  }
  return false;
}
;
_.size__I = function java_util_AbstractHashMap$EntrySet_size__I(){
  return this.java_util_AbstractHashMap$EntrySet_this$01.size__I();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractHashMap$EntrySet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractHashMap/EntrySet', 191);
function java_util_AbstractHashMap$EntrySetIterator_$hasNext__Ljava_util_AbstractHashMap$EntrySetIterator_2Z(this$static){
  if (this$static.java_util_AbstractHashMap$EntrySetIterator_current.hasNext__Z()) {
    return true;
  }
  if (this$static.java_util_AbstractHashMap$EntrySetIterator_current != this$static.java_util_AbstractHashMap$EntrySetIterator_stringMapEntries) {
    return false;
  }
  this$static.java_util_AbstractHashMap$EntrySetIterator_current = new java_util_InternalJsHashCodeMap$1_InternalJsHashCodeMap$1__Ljava_util_InternalJsHashCodeMap_2V(this$static.java_util_AbstractHashMap$EntrySetIterator_this$01.java_util_AbstractHashMap_hashCodeMap);
  return this$static.java_util_AbstractHashMap$EntrySetIterator_current.hasNext__Z();
}

function java_util_AbstractHashMap$EntrySetIterator_AbstractHashMap$EntrySetIterator__Ljava_util_AbstractHashMap_2V(this$0){
  this.java_util_AbstractHashMap$EntrySetIterator_this$01 = this$0;
  this.java_util_AbstractHashMap$EntrySetIterator_stringMapEntries = java_util_InternalJsStringMap_$entries__Ljava_util_InternalJsStringMap_2Ljava_util_Iterator_2(this.java_util_AbstractHashMap$EntrySetIterator_this$01.java_util_AbstractHashMap_stringMap);
  this.java_util_AbstractHashMap$EntrySetIterator_current = this.java_util_AbstractHashMap$EntrySetIterator_stringMapEntries;
  java_util_ConcurrentModificationDetector_setModCount__Ljava_lang_Object_2IV(this, this$0._gwt_modCount);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(192, 1, {}, java_util_AbstractHashMap$EntrySetIterator_AbstractHashMap$EntrySetIterator__Ljava_util_AbstractHashMap_2V);
_.hasNext__Z = function java_util_AbstractHashMap$EntrySetIterator_hasNext__Z(){
  return java_util_AbstractHashMap$EntrySetIterator_$hasNext__Ljava_util_AbstractHashMap$EntrySetIterator_2Z(this);
}
;
_.next__Ljava_lang_Object_2 = function java_util_AbstractHashMap$EntrySetIterator_next__Ljava_lang_Object_2(){
  return java_util_ConcurrentModificationDetector_checkStructuralChange__Ljava_lang_Object_2Ljava_util_Iterator_2V(this.java_util_AbstractHashMap$EntrySetIterator_this$01, this) , com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(java_util_AbstractHashMap$EntrySetIterator_$hasNext__Ljava_util_AbstractHashMap$EntrySetIterator_2Z(this)) , this.java_util_AbstractHashMap$EntrySetIterator_last = this.java_util_AbstractHashMap$EntrySetIterator_current , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.java_util_AbstractHashMap$EntrySetIterator_current.next__Ljava_lang_Object_2(), 45);
}
;
_.remove__V = function java_util_AbstractHashMap$EntrySetIterator_remove__V(){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(!!this.java_util_AbstractHashMap$EntrySetIterator_last);
  java_util_ConcurrentModificationDetector_checkStructuralChange__Ljava_lang_Object_2Ljava_util_Iterator_2V(this.java_util_AbstractHashMap$EntrySetIterator_this$01, this);
  this.java_util_AbstractHashMap$EntrySetIterator_last.remove__V();
  this.java_util_AbstractHashMap$EntrySetIterator_last = null;
  java_util_ConcurrentModificationDetector_recordLastKnownStructure__Ljava_lang_Object_2Ljava_util_Iterator_2V(this.java_util_AbstractHashMap$EntrySetIterator_this$01, this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractHashMap$EntrySetIterator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractHashMap/EntrySetIterator', 192);
function java_util_AbstractList_$equals__Ljava_util_AbstractList_2Ljava_lang_Object_2Z(this$static, o){
  var elem, elem$iterator, elemOther, iterOther, other;
  if (o === this$static) {
    return true;
  }
  if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 69)) {
    return false;
  }
  other = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 69);
  if (this$static.size__I() != other.size__I()) {
    return false;
  }
  iterOther = other.iterator__Ljava_util_Iterator_2();
  for (elem$iterator = this$static.iterator__Ljava_util_Iterator_2(); elem$iterator.hasNext__Z();) {
    elem = elem$iterator.next__Ljava_lang_Object_2();
    elemOther = iterOther.next__Ljava_lang_Object_2();
    if (!(com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(elem) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(elemOther) || elem != null && java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(elem, elemOther))) {
      return false;
    }
  }
  return true;
}

function java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(this$static, toFind){
  var i, n;
  for (i = 0 , n = this$static.java_util_LinkedList_size; i < n; ++i) {
    if (java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(toFind, java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(this$static, i))) {
      return i;
    }
  }
  return -1;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(292, 290, $intern_25);
_.add__ILjava_lang_Object_2V = function java_util_AbstractList_add__ILjava_lang_Object_2V(index_0, element){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Add not supported on this list');
}
;
_.add__Ljava_lang_Object_2Z = function java_util_AbstractList_add__Ljava_lang_Object_2Z(obj){
  this.add__ILjava_lang_Object_2V(this.size__I(), obj);
  return true;
}
;
_.equals__Ljava_lang_Object_2Z$ = function java_util_AbstractList_equals__Ljava_lang_Object_2Z(o){
  return java_util_AbstractList_$equals__Ljava_util_AbstractList_2Ljava_lang_Object_2Z(this, o);
}
;
_.hashCode__I$ = function java_util_AbstractList_hashCode__I(){
  return java_util_Collections_hashCode__Ljava_util_List_2I(this);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_AbstractList_iterator__Ljava_util_Iterator_2(){
  return new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this);
}
;
_.listIterator__ILjava_util_ListIterator_2 = function java_util_AbstractList_listIterator__ILjava_util_ListIterator_2(from){
  return new java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(this, from);
}
;
_.remove__ILjava_lang_Object_2 = function java_util_AbstractList_remove__ILjava_lang_Object_2(index_0){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Remove not supported on this list');
}
;
_.set__ILjava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractList_set__ILjava_lang_Object_2Ljava_lang_Object_2(index_0, o){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Set not supported on this list');
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractList', 292);
function java_util_AbstractList$IteratorImpl_$hasNext__Ljava_util_AbstractList$IteratorImpl_2Z(this$static){
  return this$static.java_util_AbstractList$IteratorImpl_i < this$static.java_util_AbstractList$IteratorImpl_this$01.size__I();
}

function java_util_AbstractList$IteratorImpl_$next__Ljava_util_AbstractList$IteratorImpl_2Ljava_lang_Object_2(this$static){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this$static.java_util_AbstractList$IteratorImpl_i < this$static.java_util_AbstractList$IteratorImpl_this$01.size__I());
  return this$static.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(this$static.java_util_AbstractList$IteratorImpl_last = this$static.java_util_AbstractList$IteratorImpl_i++);
}

function java_util_AbstractList$IteratorImpl_$remove__Ljava_util_AbstractList$IteratorImpl_2V(this$static){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(this$static.java_util_AbstractList$IteratorImpl_last != -1);
  this$static.java_util_AbstractList$IteratorImpl_this$01.remove__ILjava_lang_Object_2(this$static.java_util_AbstractList$IteratorImpl_last);
  this$static.java_util_AbstractList$IteratorImpl_i = this$static.java_util_AbstractList$IteratorImpl_last;
  this$static.java_util_AbstractList$IteratorImpl_last = -1;
}

function java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$0){
  this.java_util_AbstractList$IteratorImpl_this$01 = this$0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(7, 1, {}, java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V);
_.hasNext__Z = function java_util_AbstractList$IteratorImpl_hasNext__Z(){
  return java_util_AbstractList$IteratorImpl_$hasNext__Ljava_util_AbstractList$IteratorImpl_2Z(this);
}
;
_.next__Ljava_lang_Object_2 = function java_util_AbstractList$IteratorImpl_next__Ljava_lang_Object_2(){
  return java_util_AbstractList$IteratorImpl_$next__Ljava_util_AbstractList$IteratorImpl_2Ljava_lang_Object_2(this);
}
;
_.remove__V = function java_util_AbstractList$IteratorImpl_remove__V(){
  java_util_AbstractList$IteratorImpl_$remove__Ljava_util_AbstractList$IteratorImpl_2V(this);
}
;
_.java_util_AbstractList$IteratorImpl_i = 0;
_.java_util_AbstractList$IteratorImpl_last = -1;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractList$IteratorImpl_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractList/IteratorImpl', 7);
function java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(this$0, start_0){
  this.java_util_AbstractList$ListIteratorImpl_this$01 = this$0;
  java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V.call(this, this$0);
  com_google_gwt_core_shared_impl_InternalPreconditions_checkPositionIndex__IIV(start_0, this$0.size__I());
  this.java_util_AbstractList$IteratorImpl_i = start_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(99, 7, {}, java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV);
_.nextIndex__I = function java_util_AbstractList$ListIteratorImpl_nextIndex__I(){
  return this.java_util_AbstractList$IteratorImpl_i;
}
;
_.previous__Ljava_lang_Object_2 = function java_util_AbstractList$ListIteratorImpl_previous__Ljava_lang_Object_2(){
  return com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this.java_util_AbstractList$IteratorImpl_i > 0) , this.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(this.java_util_AbstractList$IteratorImpl_last = --this.java_util_AbstractList$IteratorImpl_i);
}
;
_.previousIndex__I = function java_util_AbstractList$ListIteratorImpl_previousIndex__I(){
  return this.java_util_AbstractList$IteratorImpl_i - 1;
}
;
_.set__Ljava_lang_Object_2V = function java_util_AbstractList$ListIteratorImpl_set__Ljava_lang_Object_2V(o){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(this.java_util_AbstractList$IteratorImpl_last != -1);
  this.java_util_AbstractList$ListIteratorImpl_this$01.set__ILjava_lang_Object_2Ljava_lang_Object_2(this.java_util_AbstractList$IteratorImpl_last, o);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractList$ListIteratorImpl_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractList/ListIteratorImpl', 99);
function java_util_AbstractList$SubList_AbstractList$SubList__Ljava_util_List_2IIV(wrapped, fromIndex, toIndex){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalPositionIndexes__IIIV(fromIndex, toIndex, wrapped.java_util_ArrayList_array.length);
  this.java_util_AbstractList$SubList_wrapped = wrapped;
  this.java_util_AbstractList$SubList_fromIndex = fromIndex;
  this.java_util_AbstractList$SubList_size = toIndex - fromIndex;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(135, 292, $intern_25, java_util_AbstractList$SubList_AbstractList$SubList__Ljava_util_List_2IIV);
_.add__ILjava_lang_Object_2V = function java_util_AbstractList$SubList_add__ILjava_lang_Object_2V(index_0, element){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkPositionIndex__IIV(index_0, this.java_util_AbstractList$SubList_size);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(this.java_util_AbstractList$SubList_wrapped, this.java_util_AbstractList$SubList_fromIndex + index_0, element);
  ++this.java_util_AbstractList$SubList_size;
}
;
_.get__ILjava_lang_Object_2 = function java_util_AbstractList$SubList_get__ILjava_lang_Object_2(index_0){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, this.java_util_AbstractList$SubList_size);
  return java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.java_util_AbstractList$SubList_wrapped, this.java_util_AbstractList$SubList_fromIndex + index_0);
}
;
_.remove__ILjava_lang_Object_2 = function java_util_AbstractList$SubList_remove__ILjava_lang_Object_2(index_0){
  var result;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, this.java_util_AbstractList$SubList_size);
  result = java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.java_util_AbstractList$SubList_wrapped, this.java_util_AbstractList$SubList_fromIndex + index_0);
  --this.java_util_AbstractList$SubList_size;
  return result;
}
;
_.set__ILjava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractList$SubList_set__ILjava_lang_Object_2Ljava_lang_Object_2(index_0, element){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, this.java_util_AbstractList$SubList_size);
  return java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this.java_util_AbstractList$SubList_wrapped, this.java_util_AbstractList$SubList_fromIndex + index_0, element);
}
;
_.size__I = function java_util_AbstractList$SubList_size__I(){
  return this.java_util_AbstractList$SubList_size;
}
;
_.java_util_AbstractList$SubList_fromIndex = 0;
_.java_util_AbstractList$SubList_size = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractList$SubList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractList/SubList', 135);
function java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(this$static){
  var outerIter;
  outerIter = this$static.java_util_AbstractMap$1_this$01.entrySet__Ljava_util_Set_2().iterator__Ljava_util_Iterator_2();
  return new java_util_AbstractMap$1$1_AbstractMap$1$1__Ljava_util_AbstractMap$1_2V(outerIter);
}

function java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$0){
  this.java_util_AbstractMap$1_this$01 = this$0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(23, 291, $intern_24, java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_AbstractMap$1_contains__Ljava_lang_Object_2Z(key){
  return this.java_util_AbstractMap$1_this$01.containsKey__Ljava_lang_Object_2Z(key);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_AbstractMap$1_iterator__Ljava_util_Iterator_2(){
  return java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(this);
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_AbstractMap$1_remove__Ljava_lang_Object_2Z(key){
  if (this.java_util_AbstractMap$1_this$01.containsKey__Ljava_lang_Object_2Z(key)) {
    this.java_util_AbstractMap$1_this$01.remove__Ljava_lang_Object_2Ljava_lang_Object_2(key);
    return true;
  }
  return false;
}
;
_.size__I = function java_util_AbstractMap$1_size__I(){
  return this.java_util_AbstractMap$1_this$01.size__I();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMap$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMap/1', 23);
function java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(this$static){
  var entry;
  entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_AbstractMap$1$1_val$outerIter2.next__Ljava_lang_Object_2(), 45);
  return entry.getKey__Ljava_lang_Object_2();
}

function java_util_AbstractMap$1$1_AbstractMap$1$1__Ljava_util_AbstractMap$1_2V(val$outerIter){
  this.java_util_AbstractMap$1$1_val$outerIter2 = val$outerIter;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(193, 1, {}, java_util_AbstractMap$1$1_AbstractMap$1$1__Ljava_util_AbstractMap$1_2V);
_.hasNext__Z = function java_util_AbstractMap$1$1_hasNext__Z(){
  return this.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();
}
;
_.next__Ljava_lang_Object_2 = function java_util_AbstractMap$1$1_next__Ljava_lang_Object_2(){
  return java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(this);
}
;
_.remove__V = function java_util_AbstractMap$1$1_remove__V(){
  this.java_util_AbstractMap$1$1_val$outerIter2.remove__V();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMap$1$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMap/1/1', 193);
function java_util_AbstractMap$2_$iterator__Ljava_util_AbstractMap$2_2Ljava_util_Iterator_2(this$static){
  var outerIter;
  outerIter = this$static.java_util_AbstractMap$2_this$01.entrySet__Ljava_util_Set_2().iterator__Ljava_util_Iterator_2();
  return new java_util_AbstractMap$2$1_AbstractMap$2$1__Ljava_util_AbstractMap$2_2V(outerIter);
}

function java_util_AbstractMap$2_AbstractMap$2__Ljava_util_AbstractMap_2V(this$0){
  this.java_util_AbstractMap$2_this$01 = this$0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(119, 290, $intern_21, java_util_AbstractMap$2_AbstractMap$2__Ljava_util_AbstractMap_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_AbstractMap$2_contains__Ljava_lang_Object_2Z(value_0){
  return this.java_util_AbstractMap$2_this$01.containsValue__Ljava_lang_Object_2Z(value_0);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_AbstractMap$2_iterator__Ljava_util_Iterator_2(){
  return java_util_AbstractMap$2_$iterator__Ljava_util_AbstractMap$2_2Ljava_util_Iterator_2(this);
}
;
_.size__I = function java_util_AbstractMap$2_size__I(){
  return this.java_util_AbstractMap$2_this$01.size__I();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMap$2_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMap/2', 119);
function java_util_AbstractMap$2$1_$next__Ljava_util_AbstractMap$2$1_2Ljava_lang_Object_2(this$static){
  var entry;
  entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_AbstractMap$2$1_val$outerIter2.next__Ljava_lang_Object_2(), 45);
  return entry.getValue__Ljava_lang_Object_2();
}

function java_util_AbstractMap$2$1_AbstractMap$2$1__Ljava_util_AbstractMap$2_2V(val$outerIter){
  this.java_util_AbstractMap$2$1_val$outerIter2 = val$outerIter;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(194, 1, {}, java_util_AbstractMap$2$1_AbstractMap$2$1__Ljava_util_AbstractMap$2_2V);
_.hasNext__Z = function java_util_AbstractMap$2$1_hasNext__Z(){
  return this.java_util_AbstractMap$2$1_val$outerIter2.hasNext__Z();
}
;
_.next__Ljava_lang_Object_2 = function java_util_AbstractMap$2$1_next__Ljava_lang_Object_2(){
  return java_util_AbstractMap$2$1_$next__Ljava_util_AbstractMap$2$1_2Ljava_lang_Object_2(this);
}
;
_.remove__V = function java_util_AbstractMap$2$1_remove__V(){
  this.java_util_AbstractMap$2$1_val$outerIter2.remove__V();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMap$2$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMap/2/1', 194);
function java_util_AbstractMap$AbstractEntry_$setValue__Ljava_util_AbstractMap$AbstractEntry_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, value_0){
  var oldValue;
  oldValue = this$static.java_util_AbstractMap$AbstractEntry_value;
  this$static.java_util_AbstractMap$AbstractEntry_value = value_0;
  return oldValue;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(118, 1, {118:1, 45:1});
_.equals__Ljava_lang_Object_2Z$ = function java_util_AbstractMap$AbstractEntry_equals__Ljava_lang_Object_2Z(other){
  var entry;
  if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(other, 45)) {
    return false;
  }
  entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(other, 45);
  return java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(this.java_util_AbstractMap$AbstractEntry_key, entry.getKey__Ljava_lang_Object_2()) && java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(this.java_util_AbstractMap$AbstractEntry_value, entry.getValue__Ljava_lang_Object_2());
}
;
_.getKey__Ljava_lang_Object_2 = function java_util_AbstractMap$AbstractEntry_getKey__Ljava_lang_Object_2(){
  return this.java_util_AbstractMap$AbstractEntry_key;
}
;
_.getValue__Ljava_lang_Object_2 = function java_util_AbstractMap$AbstractEntry_getValue__Ljava_lang_Object_2(){
  return this.java_util_AbstractMap$AbstractEntry_value;
}
;
_.hashCode__I$ = function java_util_AbstractMap$AbstractEntry_hashCode__I(){
  return java_util_Objects_hashCode__Ljava_lang_Object_2I(this.java_util_AbstractMap$AbstractEntry_key) ^ java_util_Objects_hashCode__Ljava_lang_Object_2I(this.java_util_AbstractMap$AbstractEntry_value);
}
;
_.setValue__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractMap$AbstractEntry_setValue__Ljava_lang_Object_2Ljava_lang_Object_2(value_0){
  return java_util_AbstractMap$AbstractEntry_$setValue__Ljava_util_AbstractMap$AbstractEntry_2Ljava_lang_Object_2Ljava_lang_Object_2(this, value_0);
}
;
_.toString__Ljava_lang_String_2$ = function java_util_AbstractMap$AbstractEntry_toString__Ljava_lang_String_2(){
  return this.java_util_AbstractMap$AbstractEntry_key + '=' + this.java_util_AbstractMap$AbstractEntry_value;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMap$AbstractEntry_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMap/AbstractEntry', 118);
function java_util_AbstractMap$SimpleEntry_AbstractMap$SimpleEntry__Ljava_lang_Object_2Ljava_lang_Object_2V(key, value_0){
  this.java_util_AbstractMap$AbstractEntry_key = key;
  this.java_util_AbstractMap$AbstractEntry_value = value_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(98, 118, {118:1, 98:1, 45:1}, java_util_AbstractMap$SimpleEntry_AbstractMap$SimpleEntry__Ljava_lang_Object_2Ljava_lang_Object_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMap$SimpleEntry_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMap/SimpleEntry', 98);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(294, 1, {45:1});
_.equals__Ljava_lang_Object_2Z$ = function java_util_AbstractMapEntry_equals__Ljava_lang_Object_2Z(other){
  var entry;
  if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(other, 45)) {
    return false;
  }
  entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(other, 45);
  return java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(this.getKey__Ljava_lang_Object_2(), entry.getKey__Ljava_lang_Object_2()) && java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(this.getValue__Ljava_lang_Object_2(), entry.getValue__Ljava_lang_Object_2());
}
;
_.hashCode__I$ = function java_util_AbstractMapEntry_hashCode__I(){
  return java_util_Objects_hashCode__Ljava_lang_Object_2I(this.getKey__Ljava_lang_Object_2()) ^ java_util_Objects_hashCode__Ljava_lang_Object_2I(this.getValue__Ljava_lang_Object_2());
}
;
_.toString__Ljava_lang_String_2$ = function java_util_AbstractMapEntry_toString__Ljava_lang_String_2(){
  return this.getKey__Ljava_lang_Object_2() + '=' + this.getValue__Ljava_lang_Object_2();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractMapEntry_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractMapEntry', 294);
function java_util_AbstractNavigableMap_$containsEntry__Ljava_util_AbstractNavigableMap_2Ljava_util_Map$Entry_2Z(this$static, entry){
  var key, lookupEntry;
  key = entry.getKey__Ljava_lang_Object_2();
  lookupEntry = this$static.package_private$java_util_AbstractNavigableMap$getEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(key);
  return !!lookupEntry && java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(lookupEntry.java_util_AbstractMap$AbstractEntry_value, entry.getValue__Ljava_lang_Object_2());
}

function java_util_AbstractNavigableMap_$containsKey__Ljava_util_AbstractNavigableMap_2Ljava_lang_Object_2Z(this$static, k){
  return !!this$static.package_private$java_util_AbstractNavigableMap$getEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(k);
}

function java_util_AbstractNavigableMap_getKeyOrNSE__Ljava_util_Map$Entry_2Ljava_lang_Object_2(entry){
  if (!entry) {
    throw new java_util_NoSuchElementException_NoSuchElementException__V;
  }
  return entry.java_util_AbstractMap$AbstractEntry_key;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(302, 289, $intern_23);
_.package_private$java_util_AbstractMap$containsEntry__Ljava_util_Map$Entry_2Z = function java_util_AbstractNavigableMap_containsEntry__Ljava_util_Map$Entry_2Z(entry){
  return java_util_AbstractNavigableMap_$containsEntry__Ljava_util_AbstractNavigableMap_2Ljava_util_Map$Entry_2Z(this, entry);
}
;
_.containsKey__Ljava_lang_Object_2Z = function java_util_AbstractNavigableMap_containsKey__Ljava_lang_Object_2Z(k){
  return java_util_AbstractNavigableMap_$containsKey__Ljava_util_AbstractNavigableMap_2Ljava_lang_Object_2Z(this, k);
}
;
_.entrySet__Ljava_util_Set_2 = function java_util_AbstractNavigableMap_entrySet__Ljava_util_Set_2(){
  return new java_util_AbstractNavigableMap$EntrySet_AbstractNavigableMap$EntrySet__Ljava_util_AbstractNavigableMap_2V(this);
}
;
_.get__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractNavigableMap_get__Ljava_lang_Object_2Ljava_lang_Object_2(k){
  return java_util_AbstractMap_getEntryValueOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(this.package_private$java_util_AbstractNavigableMap$getEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(k));
}
;
_.keySet__Ljava_util_Set_2 = function java_util_AbstractNavigableMap_keySet__Ljava_util_Set_2(){
  return new java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractNavigableMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractNavigableMap', 302);
function java_util_AbstractNavigableMap$EntrySet_AbstractNavigableMap$EntrySet__Ljava_util_AbstractNavigableMap_2V(this$0){
  this.java_util_AbstractNavigableMap$EntrySet_this$01 = this$0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(159, 291, $intern_24, java_util_AbstractNavigableMap$EntrySet_AbstractNavigableMap$EntrySet__Ljava_util_AbstractNavigableMap_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_AbstractNavigableMap$EntrySet_contains__Ljava_lang_Object_2Z(o){
  return com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 45) && java_util_AbstractNavigableMap_$containsEntry__Ljava_util_AbstractNavigableMap_2Ljava_util_Map$Entry_2Z(this.java_util_AbstractNavigableMap$EntrySet_this$01, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 45));
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_AbstractNavigableMap$EntrySet_iterator__Ljava_util_Iterator_2(){
  return this.java_util_AbstractNavigableMap$EntrySet_this$01.package_private$java_util_AbstractNavigableMap$entryIterator__Ljava_util_Iterator_2();
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_AbstractNavigableMap$EntrySet_remove__Ljava_lang_Object_2Z(o){
  var entry;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 45)) {
    entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 45);
    return this.java_util_AbstractNavigableMap$EntrySet_this$01.package_private$java_util_AbstractNavigableMap$removeEntry__Ljava_util_Map$Entry_2Z(entry);
  }
  return false;
}
;
_.size__I = function java_util_AbstractNavigableMap$EntrySet_size__I(){
  return this.java_util_AbstractNavigableMap$EntrySet_this$01.size__I();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractNavigableMap$EntrySet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractNavigableMap/EntrySet', 159);
function java_util_AbstractNavigableMap$NavigableKeySet_$iterator__Ljava_util_AbstractNavigableMap$NavigableKeySet_2Ljava_util_Iterator_2(this$static){
  var entryIterator;
  entryIterator = this$static.java_util_AbstractNavigableMap$NavigableKeySet_map.entrySet__Ljava_util_Set_2().java_util_AbstractNavigableMap$EntrySet_this$01.package_private$java_util_AbstractNavigableMap$entryIterator__Ljava_util_Iterator_2();
  return new java_util_AbstractNavigableMap$NavigableKeySet$1_AbstractNavigableMap$NavigableKeySet$1__Ljava_util_AbstractNavigableMap$NavigableKeySet_2V(entryIterator);
}

function java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V(map_0){
  this.java_util_AbstractNavigableMap$NavigableKeySet_map = map_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(116, 291, $intern_24, java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_AbstractNavigableMap$NavigableKeySet_contains__Ljava_lang_Object_2Z(o){
  return java_util_AbstractNavigableMap_$containsKey__Ljava_util_AbstractNavigableMap_2Ljava_lang_Object_2Z(this.java_util_AbstractNavigableMap$NavigableKeySet_map, o);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_AbstractNavigableMap$NavigableKeySet_iterator__Ljava_util_Iterator_2(){
  return java_util_AbstractNavigableMap$NavigableKeySet_$iterator__Ljava_util_AbstractNavigableMap$NavigableKeySet_2Ljava_util_Iterator_2(this);
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_AbstractNavigableMap$NavigableKeySet_remove__Ljava_lang_Object_2Z(o){
  if (java_util_AbstractNavigableMap_$containsKey__Ljava_util_AbstractNavigableMap_2Ljava_lang_Object_2Z(this.java_util_AbstractNavigableMap$NavigableKeySet_map, o)) {
    this.java_util_AbstractNavigableMap$NavigableKeySet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(o);
    return true;
  }
  return false;
}
;
_.size__I = function java_util_AbstractNavigableMap$NavigableKeySet_size__I(){
  return this.java_util_AbstractNavigableMap$NavigableKeySet_map.size__I();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractNavigableMap$NavigableKeySet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractNavigableMap/NavigableKeySet', 116);
function java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(this$static){
  var entry;
  entry = java_util_TreeMap$EntryIterator_$next__Ljava_util_TreeMap$EntryIterator_2Ljava_lang_Object_2(this$static.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2);
  return entry.getKey__Ljava_lang_Object_2();
}

function java_util_AbstractNavigableMap$NavigableKeySet$1_AbstractNavigableMap$NavigableKeySet$1__Ljava_util_AbstractNavigableMap$NavigableKeySet_2V(val$entryIterator){
  this.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2 = val$entryIterator;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(255, 1, {}, java_util_AbstractNavigableMap$NavigableKeySet$1_AbstractNavigableMap$NavigableKeySet$1__Ljava_util_AbstractNavigableMap$NavigableKeySet_2V);
_.hasNext__Z = function java_util_AbstractNavigableMap$NavigableKeySet$1_hasNext__Z(){
  return this.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2.java_util_TreeMap$EntryIterator_iter.hasNext__Z();
}
;
_.next__Ljava_lang_Object_2 = function java_util_AbstractNavigableMap$NavigableKeySet$1_next__Ljava_lang_Object_2(){
  return java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(this);
}
;
_.remove__V = function java_util_AbstractNavigableMap$NavigableKeySet$1_remove__V(){
  java_util_TreeMap$EntryIterator_$remove__Ljava_util_TreeMap$EntryIterator_2V(this.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractNavigableMap$NavigableKeySet$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractNavigableMap/NavigableKeySet/1', 255);
function java_util_AbstractQueue_$remove__Ljava_util_AbstractQueue_2Ljava_lang_Object_2(this$static){
  var e;
  e = java_util_PriorityQueue_$poll__Ljava_util_PriorityQueue_2Ljava_lang_Object_2(this$static);
  com_google_gwt_core_shared_impl_InternalPreconditions_checkElement__ZLjava_lang_Object_2V(e != null);
  return e;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(293, 290, $intern_21);
_.add__Ljava_lang_Object_2Z = function java_util_AbstractQueue_add__Ljava_lang_Object_2Z(o){
  return com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZLjava_lang_Object_2V(java_util_PriorityQueue_$offer__Ljava_util_PriorityQueue_2Ljava_lang_Object_2Z(this, o)) , true;
}
;
_.addAll__Ljava_util_Collection_2Z = function java_util_AbstractQueue_addAll__Ljava_util_Collection_2Z(c){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(c);
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZLjava_lang_Object_2V(c != this, "Can't add a queue to itself");
  return java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this, c);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractQueue_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractQueue', 293);
function java_util_AbstractSequentialList_$add__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2V(this$static, index_0, element){
  var iter;
  iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static, index_0);
  java_util_LinkedList$ListIteratorImpl_$add__Ljava_util_LinkedList$ListIteratorImpl_2Ljava_lang_Object_2V(iter, element);
}

function java_util_AbstractSequentialList_$addAll__Ljava_util_AbstractSequentialList_2ILjava_util_Collection_2Z(this$static, index_0, c){
  var e, e$iterator, iter, modified;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(c);
  modified = false;
  iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static, index_0);
  for (e$iterator = c.iterator__Ljava_util_Iterator_2(); e$iterator.hasNext__Z();) {
    e = e$iterator.next__Ljava_lang_Object_2();
    java_util_LinkedList$ListIteratorImpl_$add__Ljava_util_LinkedList$ListIteratorImpl_2Ljava_lang_Object_2V(iter, e);
    modified = true;
  }
  return modified;
}

function java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(this$static, index_0){
  var iter;
  iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static, index_0);
  try {
    return com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value;
  }
   catch ($e0) {
    $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 106)) {
      throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V("Can't get element " + index_0);
    }
     else 
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
  }
}

function java_util_AbstractSequentialList_$remove__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(this$static, index_0){
  var iter, old;
  iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static, index_0);
  try {
    old = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value);
    java_util_LinkedList$ListIteratorImpl_$remove__Ljava_util_LinkedList$ListIteratorImpl_2V(iter);
    return old;
  }
   catch ($e0) {
    $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 106)) {
      throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V("Can't remove element " + index_0);
    }
     else 
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(300, 292, $intern_25);
_.add__ILjava_lang_Object_2V = function java_util_AbstractSequentialList_add__ILjava_lang_Object_2V(index_0, element){
  java_util_AbstractSequentialList_$add__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2V(this, index_0, element);
}
;
_.get__ILjava_lang_Object_2 = function java_util_AbstractSequentialList_get__ILjava_lang_Object_2(index_0){
  return java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(this, index_0);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_AbstractSequentialList_iterator__Ljava_util_Iterator_2(){
  return java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this, 0);
}
;
_.remove__ILjava_lang_Object_2 = function java_util_AbstractSequentialList_remove__ILjava_lang_Object_2(index_0){
  return java_util_AbstractSequentialList_$remove__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(this, index_0);
}
;
_.set__ILjava_lang_Object_2Ljava_lang_Object_2 = function java_util_AbstractSequentialList_set__ILjava_lang_Object_2Ljava_lang_Object_2(index_0, element){
  var iter, old;
  iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this, index_0);
  try {
    old = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value);
    com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(!!iter.java_util_LinkedList$ListIteratorImpl_lastNode);
    iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value = element;
    return old;
  }
   catch ($e0) {
    $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 106)) {
      throw new java_lang_IndexOutOfBoundsException_IndexOutOfBoundsException__Ljava_lang_String_2V("Can't set element " + index_0);
    }
     else 
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
  }
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1AbstractSequentialList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'AbstractSequentialList', 300);
function java_util_ArrayList_$$init__Ljava_util_ArrayList_2V(this$static){
  this$static.java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
}

function java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(this$static, index_0, o){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkPositionIndex__IIV(index_0, this$static.java_util_ArrayList_array.length);
  java_util_ArrayList_splice___3Ljava_lang_Object_2IILjava_lang_Object_2V(this$static.java_util_ArrayList_array, index_0, 0, o);
}

function java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static, o){
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array, this$static.java_util_ArrayList_array.length, o);
  return true;
}

function java_util_ArrayList_$addAll__Ljava_util_ArrayList_2ILjava_util_Collection_2Z(this$static, c){
  var cArray, len;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkPositionIndex__IIV(0, this$static.java_util_ArrayList_array.length);
  cArray = com_google_gwt_lang_Array_cloneSubrange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2(c.java_util_ArrayList_array, c.java_util_ArrayList_array.length);
  len = cArray.length;
  if (len == 0) {
    return false;
  }
  com_google_gwt_lang_Array_nativeArraySplice__Ljava_lang_Object_2ILjava_lang_Object_2IIZV(cArray, 0, this$static.java_util_ArrayList_array, 0, cArray.length, false);
  return true;
}

function java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(this$static, c){
  var cArray, len;
  cArray = c.toArray___3Ljava_lang_Object_2();
  len = cArray.length;
  if (len == 0) {
    return false;
  }
  java_util_ArrayList_$insertAt__Ljava_util_ArrayList_2I_3Ljava_lang_Object_2V(this$static, this$static.java_util_ArrayList_array.length, cArray);
  return true;
}

function java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static, index_0){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, this$static.java_util_ArrayList_array.length);
  return this$static.java_util_ArrayList_array[index_0];
}

function java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(this$static, o, index_0){
  for (; index_0 < this$static.java_util_ArrayList_array.length; ++index_0) {
    if (java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(o, this$static.java_util_ArrayList_array[index_0])) {
      return index_0;
    }
  }
  return -1;
}

function java_util_ArrayList_$insertAt__Ljava_util_ArrayList_2I_3Ljava_lang_Object_2V(this$static, index_0, values){
  com_google_gwt_lang_Array_nativeArraySplice__Ljava_lang_Object_2ILjava_lang_Object_2IIZV(values, 0, this$static.java_util_ArrayList_array, index_0, values.length, false);
}

function java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static, index_0){
  var previous;
  previous = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, this$static.java_util_ArrayList_array.length) , this$static.java_util_ArrayList_array[index_0]);
  java_util_ArrayList_splice___3Ljava_lang_Object_2IIV(this$static.java_util_ArrayList_array, index_0, 1);
  return previous;
}

function java_util_ArrayList_$remove__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static, o){
  var i;
  i = java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(this$static, o, 0);
  if (i == -1) {
    return false;
  }
  java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static, i);
  return true;
}

function java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static, index_0, o){
  var previous;
  previous = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, this$static.java_util_ArrayList_array.length) , this$static.java_util_ArrayList_array[index_0]);
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array, index_0, o);
  return previous;
}

function java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2(this$static){
  return com_google_gwt_lang_Array_cloneSubrange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2(this$static.java_util_ArrayList_array, this$static.java_util_ArrayList_array.length);
}

function java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this$static, out){
  var i, size_0;
  size_0 = this$static.java_util_ArrayList_array.length;
  out.length < size_0 && (out = com_google_gwt_lang_Array_createFrom___3Ljava_lang_Object_2I_3Ljava_lang_Object_2(out, size_0));
  for (i = 0; i < size_0; ++i) {
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(out, i, this$static.java_util_ArrayList_array[i]);
  }
  out.length > size_0 && com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(out, size_0, null);
  return out;
}

function java_util_ArrayList_ArrayList__V(){
  java_util_ArrayList_$$init__Ljava_util_ArrayList_2V(this);
}

function java_util_ArrayList_ArrayList__IV(initialCapacity){
  java_util_ArrayList_$$init__Ljava_util_ArrayList_2V(this);
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZLjava_lang_Object_2V(initialCapacity >= 0, 'Initial capacity must not be negative');
}

function java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(c){
  java_util_ArrayList_$$init__Ljava_util_ArrayList_2V(this);
  java_util_ArrayList_$insertAt__Ljava_util_ArrayList_2I_3Ljava_lang_Object_2V(this, 0, c.toArray___3Ljava_lang_Object_2());
}

function java_util_ArrayList_splice___3Ljava_lang_Object_2IIV(array, index_0, deleteCount){
  array.splice(index_0, deleteCount);
}

function java_util_ArrayList_splice___3Ljava_lang_Object_2IILjava_lang_Object_2V(array, index_0, deleteCount, value_0){
  array.splice(index_0, deleteCount, value_0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(4, 292, {5:1, 6:1, 4:1, 30:1, 69:1, 274:1}, java_util_ArrayList_ArrayList__V, java_util_ArrayList_ArrayList__IV, java_util_ArrayList_ArrayList__Ljava_util_Collection_2V);
_.add__ILjava_lang_Object_2V = function java_util_ArrayList_add__ILjava_lang_Object_2V(index_0, o){
  java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(this, index_0, o);
}
;
_.add__Ljava_lang_Object_2Z = function java_util_ArrayList_add__Ljava_lang_Object_2Z(o){
  return java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this, o);
}
;
_.addAll__Ljava_util_Collection_2Z = function java_util_ArrayList_addAll__Ljava_util_Collection_2Z(c){
  return java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(this, c);
}
;
_.contains__Ljava_lang_Object_2Z = function java_util_ArrayList_contains__Ljava_lang_Object_2Z(o){
  return java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(this, o, 0) != -1;
}
;
_.get__ILjava_lang_Object_2 = function java_util_ArrayList_get__ILjava_lang_Object_2(index_0){
  return java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this, index_0);
}
;
_.isEmpty__Z = function java_util_ArrayList_isEmpty__Z(){
  return this.java_util_ArrayList_array.length == 0;
}
;
_.remove__ILjava_lang_Object_2 = function java_util_ArrayList_remove__ILjava_lang_Object_2(index_0){
  return java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this, index_0);
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_ArrayList_remove__Ljava_lang_Object_2Z(o){
  return java_util_ArrayList_$remove__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this, o);
}
;
_.set__ILjava_lang_Object_2Ljava_lang_Object_2 = function java_util_ArrayList_set__ILjava_lang_Object_2Ljava_lang_Object_2(index_0, o){
  return java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this, index_0, o);
}
;
_.size__I = function java_util_ArrayList_size__I(){
  return this.java_util_ArrayList_array.length;
}
;
_.toArray___3Ljava_lang_Object_2 = function java_util_ArrayList_toArray___3Ljava_lang_Object_2(){
  return java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2(this);
}
;
_.toArray___3Ljava_lang_Object_2_3Ljava_lang_Object_2 = function java_util_ArrayList_toArray___3Ljava_lang_Object_2_3Ljava_lang_Object_2(out){
  return java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this, out);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1ArrayList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'ArrayList', 4);
function java_util_Arrays_binarySearch___3Ljava_lang_Object_2Ljava_lang_Object_2Ljava_util_Comparator_2I(sortedArray, key, comparator){
  var compareResult, high, low, mid, midVal;
  !comparator && (comparator = (java_util_Comparators_$clinit__V() , java_util_Comparators_$clinit__V() , java_util_Comparators_NATURAL));
  low = 0;
  high = sortedArray.length - 1;
  while (low <= high) {
    mid = low + (high - low >> 1);
    midVal = sortedArray[mid];
    compareResult = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(midVal, key);
    if (compareResult < 0) {
      low = mid + 1;
    }
     else if (compareResult > 0) {
      high = mid - 1;
    }
     else {
      return mid;
    }
  }
  return -low - 1;
}

function java_util_Arrays_copyOf___3DI_3D(original, newLength){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkArraySize__IV(newLength);
  return java_util_Arrays_copyOfRange___3DII_3D(original, newLength);
}

function java_util_Arrays_copyOfRange___3DII_3D(original, to){
  var copy, newLength;
  newLength = java_util_Arrays_getLengthFromRange__III(0, to);
  copy = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, newLength, 7, 1);
  java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(original, 0, copy, 0, java_lang_Math_min__III(original.length, newLength));
  return copy;
}

function java_util_Arrays_fill___3IIV(a){
  java_util_Arrays_fill___3IIIIV(a, a.length, -1);
}

function java_util_Arrays_fill___3IIIIV(a, toIndex, val){
  var i;
  for (i = 0; i < toIndex; ++i) {
    a[i] = val;
  }
}

function java_util_Arrays_getLengthFromRange__III(from, to){
  var length_0;
  length_0 = to - from;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZLjava_lang_String_2_3Ljava_lang_Object_2V(length_0 >= 0, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, 1), $intern_14, 1, 3, [java_lang_Integer_valueOf__ILjava_lang_Integer_2(from), java_lang_Integer_valueOf__ILjava_lang_Integer_2(to)]));
  return length_0;
}

function java_util_Arrays_insertionSort___3Ljava_lang_Object_2IILjava_util_Comparator_2V(array, low, high, comp){
  var i, j, t;
  for (i = low + 1; i < high; ++i) {
    for (j = i; j > low && comp.compare__Ljava_lang_Object_2Ljava_lang_Object_2I(array[j - 1], array[j]) > 0; --j) {
      t = array[j];
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(array, j, array[j - 1]);
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(array, j - 1, t);
    }
  }
}

function java_util_Arrays_merge___3Ljava_lang_Object_2III_3Ljava_lang_Object_2IILjava_util_Comparator_2V(src_0, srcLow, srcMid, srcHigh, dest, destLow, destHigh, comp){
  var topIdx;
  topIdx = srcMid;
  while (destLow < destHigh) {
    topIdx >= srcHigh || srcLow < srcMid && comp.compare__Ljava_lang_Object_2Ljava_lang_Object_2I(src_0[srcLow], src_0[topIdx]) <= 0?com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(dest, destLow++, src_0[srcLow++]):com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(dest, destLow++, src_0[topIdx++]);
  }
}

function java_util_Arrays_mergeSort___3Ljava_lang_Object_2IILjava_util_Comparator_2V(x_0, fromIndex, toIndex, comp){
  var temp, java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_newLength_0, java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_copy_0;
  !comp && (comp = (java_util_Comparators_$clinit__V() , java_util_Comparators_$clinit__V() , java_util_Comparators_NATURAL));
  temp = (java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_newLength_0 = java_util_Arrays_getLengthFromRange__III(fromIndex, toIndex) , java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_copy_0 = com_google_gwt_lang_Array_createFrom___3Ljava_lang_Object_2I_3Ljava_lang_Object_2(x_0, java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_newLength_0) , java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(x_0, fromIndex, java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_copy_0, 0, java_lang_Math_min__III(x_0.length - fromIndex, java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_newLength_0)) , java_util_Arrays_copyOfRange___3Ljava_lang_Object_2II_3Ljava_lang_Object_2_copy_0);
  java_util_Arrays_mergeSort___3Ljava_lang_Object_2_3Ljava_lang_Object_2IIILjava_util_Comparator_2V(temp, x_0, fromIndex, toIndex, -fromIndex, comp);
}

function java_util_Arrays_mergeSort___3Ljava_lang_Object_2_3Ljava_lang_Object_2IIILjava_util_Comparator_2V(temp, array, low, high, ofs, comp){
  var length_0, tempHigh, tempLow, tempMid;
  length_0 = high - low;
  if (length_0 < 7) {
    java_util_Arrays_insertionSort___3Ljava_lang_Object_2IILjava_util_Comparator_2V(array, low, high, comp);
    return;
  }
  tempLow = low + ofs;
  tempHigh = high + ofs;
  tempMid = tempLow + (tempHigh - tempLow >> 1);
  java_util_Arrays_mergeSort___3Ljava_lang_Object_2_3Ljava_lang_Object_2IIILjava_util_Comparator_2V(array, temp, tempLow, tempMid, -ofs, comp);
  java_util_Arrays_mergeSort___3Ljava_lang_Object_2_3Ljava_lang_Object_2IIILjava_util_Comparator_2V(array, temp, tempMid, tempHigh, -ofs, comp);
  if (comp.compare__Ljava_lang_Object_2Ljava_lang_Object_2I(temp[tempMid - 1], temp[tempMid]) <= 0) {
    while (low < high) {
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(array, low++, temp[tempLow++]);
    }
    return;
  }
  java_util_Arrays_merge___3Ljava_lang_Object_2III_3Ljava_lang_Object_2IILjava_util_Comparator_2V(temp, tempLow, tempMid, tempHigh, array, low, high, comp);
}

function java_util_Arrays_nativeNumberSort__Ljava_lang_Object_2V(array){
  array.sort(function(a, b){
    return a - b;
  }
  );
}

function java_util_Arrays_sort___3Ljava_lang_Object_2V(array){
  java_util_Arrays_mergeSort___3Ljava_lang_Object_2IILjava_util_Comparator_2V(array, 0, array.length, (java_util_Comparators_$clinit__V() , java_util_Comparators_$clinit__V() , java_util_Comparators_NATURAL));
}

function java_util_Arrays_sort___3Ljava_lang_Object_2Ljava_util_Comparator_2V(x_0, c){
  java_util_Arrays_mergeSort___3Ljava_lang_Object_2IILjava_util_Comparator_2V(x_0, 0, x_0.length, c);
}

function java_util_Collections_hashCode__Ljava_lang_Iterable_2I(collection){
  var e, e$iterator, hashCode;
  hashCode = 0;
  for (e$iterator = collection.iterator__Ljava_util_Iterator_2(); e$iterator.hasNext__Z();) {
    e = e$iterator.next__Ljava_lang_Object_2();
    hashCode = hashCode + (e != null?java_lang_Object_hashCode_1_1I_1_1devirtual$__Ljava_lang_Object_2I(e):0);
    hashCode = ~~hashCode;
  }
  return hashCode;
}

function java_util_Collections_hashCode__Ljava_util_List_2I(list){
  var e, e$iterator, hashCode;
  hashCode = 1;
  for (e$iterator = list.iterator__Ljava_util_Iterator_2(); e$iterator.hasNext__Z();) {
    e = e$iterator.next__Ljava_lang_Object_2();
    hashCode = 31 * hashCode + (e != null?java_lang_Object_hashCode_1_1I_1_1devirtual$__Ljava_lang_Object_2I(e):0);
    hashCode = ~~hashCode;
  }
  return hashCode;
}

function java_util_Collections_replaceContents__Ljava_util_List_2_3Ljava_lang_Object_2V(target, x_0){
  var i, size_0;
  size_0 = target.size__I();
  for (i = 0; i < size_0; i++) {
    target.set__ILjava_lang_Object_2Ljava_lang_Object_2(i, x_0[i]);
  }
}

function java_util_Collections_reverse__Ljava_util_List_2V(l){
  var head, headElem, iBack, iFront, tail, tailElem;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(l, 274)) {
    for (iFront = 0 , iBack = l.size__I() - 1; iFront < iBack; ++iFront , --iBack) {
      java_util_Collections_swapImpl__Ljava_util_List_2IIV(l, iFront, iBack);
    }
  }
   else {
    head = l.listIterator__ILjava_util_ListIterator_2(0);
    tail = l.listIterator__ILjava_util_ListIterator_2(l.size__I());
    while (head.nextIndex__I() < tail.previousIndex__I()) {
      headElem = head.next__Ljava_lang_Object_2();
      tailElem = tail.previous__Ljava_lang_Object_2();
      head.set__Ljava_lang_Object_2V(tailElem);
      tail.set__Ljava_lang_Object_2V(headElem);
    }
  }
}

function java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(target, c){
  var x_0;
  x_0 = target.toArray___3Ljava_lang_Object_2();
  java_util_Arrays_mergeSort___3Ljava_lang_Object_2IILjava_util_Comparator_2V(x_0, 0, x_0.length, c);
  java_util_Collections_replaceContents__Ljava_util_List_2_3Ljava_lang_Object_2V(target, x_0);
}

function java_util_Collections_swapImpl__Ljava_util_List_2IIV(list, i, j){
  var t;
  t = list.get__ILjava_lang_Object_2(i);
  list.set__ILjava_lang_Object_2Ljava_lang_Object_2(i, list.get__ILjava_lang_Object_2(j));
  list.set__ILjava_lang_Object_2Ljava_lang_Object_2(j, t);
}

function java_util_Collections_unmodifiableList__Ljava_util_List_2Ljava_util_List_2(list){
  return list?new java_util_Collections$UnmodifiableRandomAccessList_Collections$UnmodifiableRandomAccessList__Ljava_util_List_2V(list):new java_util_Collections$UnmodifiableList_Collections$UnmodifiableList__Ljava_util_List_2V(null);
}

function java_util_Collections$SingletonList_Collections$SingletonList__Ljava_lang_Object_2V(element){
  this.java_util_Collections$SingletonList_element = element;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(196, 292, {5:1, 30:1, 69:1}, java_util_Collections$SingletonList_Collections$SingletonList__Ljava_lang_Object_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_Collections$SingletonList_contains__Ljava_lang_Object_2Z(item_0){
  return java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(this.java_util_Collections$SingletonList_element, item_0);
}
;
_.get__ILjava_lang_Object_2 = function java_util_Collections$SingletonList_get__ILjava_lang_Object_2(index_0){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, 1);
  return this.java_util_Collections$SingletonList_element;
}
;
_.size__I = function java_util_Collections$SingletonList_size__I(){
  return 1;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Collections$SingletonList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'Collections/SingletonList', 196);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(197, 1, $intern_21);
_.add__Ljava_lang_Object_2Z = function java_util_Collections$UnmodifiableCollection_add__Ljava_lang_Object_2Z(o){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__V;
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_Collections$UnmodifiableCollection_iterator__Ljava_util_Iterator_2(){
  return new java_util_Collections$UnmodifiableCollectionIterator_Collections$UnmodifiableCollectionIterator__Ljava_util_Iterator_2V(new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this.java_util_Collections$UnmodifiableCollection_coll));
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_Collections$UnmodifiableCollection_remove__Ljava_lang_Object_2Z(o){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__V;
}
;
_.size__I = function java_util_Collections$UnmodifiableCollection_size__I(){
  return this.java_util_Collections$UnmodifiableCollection_coll.java_util_ArrayList_array.length;
}
;
_.toArray___3Ljava_lang_Object_2 = function java_util_Collections$UnmodifiableCollection_toArray___3Ljava_lang_Object_2(){
  return java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2(this.java_util_Collections$UnmodifiableCollection_coll);
}
;
_.toString__Ljava_lang_String_2$ = function java_util_Collections$UnmodifiableCollection_toString__Ljava_lang_String_2(){
  return java_util_AbstractCollection_$toString__Ljava_util_AbstractCollection_2Ljava_lang_String_2(this.java_util_Collections$UnmodifiableCollection_coll);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Collections$UnmodifiableCollection_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'Collections/UnmodifiableCollection', 197);
function java_util_Collections$UnmodifiableCollectionIterator_Collections$UnmodifiableCollectionIterator__Ljava_util_Iterator_2V(it){
  this.java_util_Collections$UnmodifiableCollectionIterator_it = it;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(199, 1, {}, java_util_Collections$UnmodifiableCollectionIterator_Collections$UnmodifiableCollectionIterator__Ljava_util_Iterator_2V);
_.hasNext__Z = function java_util_Collections$UnmodifiableCollectionIterator_hasNext__Z(){
  return java_util_AbstractList$IteratorImpl_$hasNext__Ljava_util_AbstractList$IteratorImpl_2Z(this.java_util_Collections$UnmodifiableCollectionIterator_it);
}
;
_.next__Ljava_lang_Object_2 = function java_util_Collections$UnmodifiableCollectionIterator_next__Ljava_lang_Object_2(){
  return java_util_AbstractList$IteratorImpl_$next__Ljava_util_AbstractList$IteratorImpl_2Ljava_lang_Object_2(this.java_util_Collections$UnmodifiableCollectionIterator_it);
}
;
_.remove__V = function java_util_Collections$UnmodifiableCollectionIterator_remove__V(){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__V;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Collections$UnmodifiableCollectionIterator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'Collections/UnmodifiableCollectionIterator', 199);
function java_util_Collections$UnmodifiableList_Collections$UnmodifiableList__Ljava_util_List_2V(list){
  this.java_util_Collections$UnmodifiableCollection_coll = list;
  this.java_util_Collections$UnmodifiableList_list = list;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(169, 197, $intern_25, java_util_Collections$UnmodifiableList_Collections$UnmodifiableList__Ljava_util_List_2V);
_.equals__Ljava_lang_Object_2Z$ = function java_util_Collections$UnmodifiableList_equals__Ljava_lang_Object_2Z(o){
  return java_util_AbstractList_$equals__Ljava_util_AbstractList_2Ljava_lang_Object_2Z(this.java_util_Collections$UnmodifiableList_list, o);
}
;
_.hashCode__I$ = function java_util_Collections$UnmodifiableList_hashCode__I(){
  return java_util_Collections_hashCode__Ljava_util_List_2I(this.java_util_Collections$UnmodifiableList_list);
}
;
_.isEmpty__Z = function java_util_Collections$UnmodifiableList_isEmpty__Z(){
  return this.java_util_Collections$UnmodifiableList_list.java_util_ArrayList_array.length == 0;
}
;
_.set__ILjava_lang_Object_2Ljava_lang_Object_2 = function java_util_Collections$UnmodifiableList_set__ILjava_lang_Object_2Ljava_lang_Object_2(index_0, element){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__V;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Collections$UnmodifiableList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'Collections/UnmodifiableList', 169);
function java_util_Collections$UnmodifiableRandomAccessList_Collections$UnmodifiableRandomAccessList__Ljava_util_List_2V(list){
  java_util_Collections$UnmodifiableList_Collections$UnmodifiableList__Ljava_util_List_2V.call(this, list);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(198, 169, $intern_25, java_util_Collections$UnmodifiableRandomAccessList_Collections$UnmodifiableRandomAccessList__Ljava_util_List_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Collections$UnmodifiableRandomAccessList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'Collections/UnmodifiableRandomAccessList', 198);
function java_util_Comparators_$clinit__V(){
  java_util_Comparators_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  java_util_Comparators_NATURAL = new java_util_Comparators$1_Comparators$1__V;
}

var java_util_Comparators_NATURAL;
function java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(o1);
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(o2);
  return java_lang_String_compareTo_1Ljava_1lang_1Object_1_1I_1_1devirtual$__Ljava_lang_Comparable_2Ljava_lang_Object_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o1, 29), o2);
}

function java_util_Comparators$1_Comparators$1__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(258, 1, {}, java_util_Comparators$1_Comparators$1__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function java_util_Comparators$1_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2){
  return java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Comparators$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'Comparators/1', 258);
function java_util_ConcurrentModificationDetector_checkStructuralChange__Ljava_lang_Object_2Ljava_util_Iterator_2V(host, iterator){
  if (iterator._gwt_modCount != host._gwt_modCount) {
    throw new java_util_ConcurrentModificationException_ConcurrentModificationException__V;
  }
}

function java_util_ConcurrentModificationDetector_recordLastKnownStructure__Ljava_lang_Object_2Ljava_util_Iterator_2V(host, iterator){
  java_util_ConcurrentModificationDetector_setModCount__Ljava_lang_Object_2IV(iterator, host._gwt_modCount);
}

function java_util_ConcurrentModificationDetector_setModCount__Ljava_lang_Object_2IV(o, modCount){
  o._gwt_modCount = modCount;
}

function java_util_ConcurrentModificationDetector_structureChanged__Ljava_lang_Object_2V(map_0){
  var modCount;
  modCount = map_0._gwt_modCount | 0;
  java_util_ConcurrentModificationDetector_setModCount__Ljava_lang_Object_2IV(map_0, modCount + 1);
}

function java_util_ConcurrentModificationException_ConcurrentModificationException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(244, 40, $intern_4, java_util_ConcurrentModificationException_ConcurrentModificationException__V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1ConcurrentModificationException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'ConcurrentModificationException', 244);
function java_util_EnumMap_$get__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, k){
  return java_util_EnumSet$EnumSetImpl_$contains__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Object_2Z(this$static.java_util_EnumMap_keySet, k)?this$static.java_util_EnumMap_values[com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(k, 36).java_lang_Enum_ordinal]:null;
}

function java_util_EnumMap_$put__Ljava_util_EnumMap_2Ljava_lang_Enum_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key, value_0){
  java_util_EnumSet$EnumSetImpl_$add__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(this$static.java_util_EnumMap_keySet, key);
  return java_util_EnumMap_$set__Ljava_util_EnumMap_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static, key.java_lang_Enum_ordinal, value_0);
}

function java_util_EnumMap_$remove__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key){
  return java_util_EnumSet$EnumSetImpl_$remove__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Object_2Z(this$static.java_util_EnumMap_keySet, key)?java_util_EnumMap_$set__Ljava_util_EnumMap_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(key, 36).java_lang_Enum_ordinal, null):null;
}

function java_util_EnumMap_$set__Ljava_util_EnumMap_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static, ordinal, value_0){
  var was;
  was = this$static.java_util_EnumMap_values[ordinal];
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_EnumMap_values, ordinal, value_0);
  return was;
}

function java_util_EnumMap_EnumMap__Ljava_lang_Class_2V(type_0){
  var java_util_EnumSet_noneOf__Ljava_lang_Class_2Ljava_util_EnumSet_2_all_0;
  this.java_util_EnumMap_keySet = (java_util_EnumSet_noneOf__Ljava_lang_Class_2Ljava_util_EnumSet_2_all_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(type_0.java_lang_Class_enumConstantsFunc && type_0.java_lang_Class_enumConstantsFunc(), 47) , new java_util_EnumSet$EnumSetImpl_EnumSet$EnumSetImpl___3Ljava_lang_Enum_2_3Ljava_lang_Enum_2IV(java_util_EnumSet_noneOf__Ljava_lang_Class_2Ljava_util_EnumSet_2_all_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Array_createFrom___3Ljava_lang_Object_2I_3Ljava_lang_Object_2(java_util_EnumSet_noneOf__Ljava_lang_Class_2Ljava_util_EnumSet_2_all_0, java_util_EnumSet_noneOf__Ljava_lang_Class_2Ljava_util_EnumSet_2_all_0.length), 47)));
  this.java_util_EnumMap_values = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, this.java_util_EnumMap_keySet.java_util_EnumSet$EnumSetImpl_all.length, 3, 1);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(262, 289, $intern_23, java_util_EnumMap_EnumMap__Ljava_lang_Class_2V);
_.containsKey__Ljava_lang_Object_2Z = function java_util_EnumMap_containsKey__Ljava_lang_Object_2Z(key){
  return java_util_EnumSet$EnumSetImpl_$contains__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Object_2Z(this.java_util_EnumMap_keySet, key);
}
;
_.entrySet__Ljava_util_Set_2 = function java_util_EnumMap_entrySet__Ljava_util_Set_2(){
  return new java_util_EnumMap$EntrySet_EnumMap$EntrySet__Ljava_util_EnumMap_2V(this);
}
;
_.get__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_EnumMap_get__Ljava_lang_Object_2Ljava_lang_Object_2(k){
  return java_util_EnumMap_$get__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this, k);
}
;
_.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_EnumMap_put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(key, value_0){
  return java_util_EnumMap_$put__Ljava_util_EnumMap_2Ljava_lang_Enum_2Ljava_lang_Object_2Ljava_lang_Object_2(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(key, 36), value_0);
}
;
_.remove__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_EnumMap_remove__Ljava_lang_Object_2Ljava_lang_Object_2(key){
  return java_util_EnumMap_$remove__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this, key);
}
;
_.size__I = function java_util_EnumMap_size__I(){
  return this.java_util_EnumMap_keySet.java_util_EnumSet$EnumSetImpl_size;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1EnumMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'EnumMap', 262);
function java_util_EnumMap$EntrySet_$contains__Ljava_util_EnumMap$EntrySet_2Ljava_lang_Object_2Z(this$static, o){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 45)) {
    return java_util_AbstractMap_$containsEntry__Ljava_util_AbstractMap_2Ljava_util_Map$Entry_2Z(this$static.java_util_EnumMap$EntrySet_this$01, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 45));
  }
  return false;
}

function java_util_EnumMap$EntrySet_EnumMap$EntrySet__Ljava_util_EnumMap_2V(this$0){
  this.java_util_EnumMap$EntrySet_this$01 = this$0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(263, 291, $intern_24, java_util_EnumMap$EntrySet_EnumMap$EntrySet__Ljava_util_EnumMap_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_EnumMap$EntrySet_contains__Ljava_lang_Object_2Z(o){
  return java_util_EnumMap$EntrySet_$contains__Ljava_util_EnumMap$EntrySet_2Ljava_lang_Object_2Z(this, o);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_EnumMap$EntrySet_iterator__Ljava_util_Iterator_2(){
  return new java_util_EnumMap$EntrySetIterator_EnumMap$EntrySetIterator__Ljava_util_EnumMap_2V(this.java_util_EnumMap$EntrySet_this$01);
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_EnumMap$EntrySet_remove__Ljava_lang_Object_2Z(entry){
  var key;
  if (java_util_EnumMap$EntrySet_$contains__Ljava_util_EnumMap$EntrySet_2Ljava_lang_Object_2Z(this, entry)) {
    key = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(entry, 45).getKey__Ljava_lang_Object_2();
    java_util_EnumMap_$remove__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_EnumMap$EntrySet_this$01, key);
    return true;
  }
  return false;
}
;
_.size__I = function java_util_EnumMap$EntrySet_size__I(){
  return this.java_util_EnumMap$EntrySet_this$01.java_util_EnumMap_keySet.java_util_EnumSet$EnumSetImpl_size;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1EnumMap$EntrySet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'EnumMap/EntrySet', 263);
function java_util_EnumMap$EntrySetIterator_EnumMap$EntrySetIterator__Ljava_util_EnumMap_2V(this$0){
  this.java_util_EnumMap$EntrySetIterator_this$01 = this$0;
  this.java_util_EnumMap$EntrySetIterator_it = new java_util_EnumSet$EnumSetImpl$IteratorImpl_EnumSet$EnumSetImpl$IteratorImpl__Ljava_util_EnumSet$EnumSetImpl_2V(this.java_util_EnumMap$EntrySetIterator_this$01.java_util_EnumMap_keySet);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(264, 1, {}, java_util_EnumMap$EntrySetIterator_EnumMap$EntrySetIterator__Ljava_util_EnumMap_2V);
_.hasNext__Z = function java_util_EnumMap$EntrySetIterator_hasNext__Z(){
  return java_util_EnumSet$EnumSetImpl$IteratorImpl_$hasNext__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2Z(this.java_util_EnumMap$EntrySetIterator_it);
}
;
_.next__Ljava_lang_Object_2 = function java_util_EnumMap$EntrySetIterator_next__Ljava_lang_Object_2(){
  return this.java_util_EnumMap$EntrySetIterator_key = java_util_EnumSet$EnumSetImpl$IteratorImpl_$next__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2Ljava_lang_Object_2(this.java_util_EnumMap$EntrySetIterator_it) , new java_util_EnumMap$MapEntry_EnumMap$MapEntry__Ljava_util_EnumMap_2Ljava_lang_Enum_2V(this.java_util_EnumMap$EntrySetIterator_this$01, this.java_util_EnumMap$EntrySetIterator_key);
}
;
_.remove__V = function java_util_EnumMap$EntrySetIterator_remove__V(){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(!!this.java_util_EnumMap$EntrySetIterator_key);
  java_util_EnumMap_$remove__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_EnumMap$EntrySetIterator_this$01, this.java_util_EnumMap$EntrySetIterator_key);
  this.java_util_EnumMap$EntrySetIterator_key = null;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1EnumMap$EntrySetIterator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'EnumMap/EntrySetIterator', 264);
function java_util_EnumMap$MapEntry_EnumMap$MapEntry__Ljava_util_EnumMap_2Ljava_lang_Enum_2V(this$0, key){
  this.java_util_EnumMap$MapEntry_this$01 = this$0;
  this.java_util_EnumMap$MapEntry_key = key;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(265, 294, {45:1}, java_util_EnumMap$MapEntry_EnumMap$MapEntry__Ljava_util_EnumMap_2Ljava_lang_Enum_2V);
_.getKey__Ljava_lang_Object_2 = function java_util_EnumMap$MapEntry_getKey__Ljava_lang_Object_2(){
  return this.java_util_EnumMap$MapEntry_key;
}
;
_.getValue__Ljava_lang_Object_2 = function java_util_EnumMap$MapEntry_getValue__Ljava_lang_Object_2(){
  return this.java_util_EnumMap$MapEntry_this$01.java_util_EnumMap_values[this.java_util_EnumMap$MapEntry_key.java_lang_Enum_ordinal];
}
;
_.setValue__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_EnumMap$MapEntry_setValue__Ljava_lang_Object_2Ljava_lang_Object_2(value_0){
  return java_util_EnumMap_$set__Ljava_util_EnumMap_2ILjava_lang_Object_2Ljava_lang_Object_2(this.java_util_EnumMap$MapEntry_this$01, this.java_util_EnumMap$MapEntry_key.java_lang_Enum_ordinal, value_0);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1EnumMap$MapEntry_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'EnumMap/MapEntry', 265);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(303, 291, $intern_24);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1EnumSet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'EnumSet', 303);
function java_util_EnumSet$EnumSetImpl_$add__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(this$static, e){
  var ordinal;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkNotNull__Ljava_lang_Object_2Ljava_lang_Object_2(e);
  ordinal = e.java_lang_Enum_ordinal;
  if (!this$static.java_util_EnumSet$EnumSetImpl_set[ordinal]) {
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_EnumSet$EnumSetImpl_set, ordinal, e);
    ++this$static.java_util_EnumSet$EnumSetImpl_size;
    return true;
  }
  return false;
}

function java_util_EnumSet$EnumSetImpl_$contains__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Object_2Z(this$static, o){
  return com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 36) && java_util_EnumSet$EnumSetImpl_$containsEnum__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(this$static, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 36));
}

function java_util_EnumSet$EnumSetImpl_$containsEnum__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(this$static, e){
  return !!e && this$static.java_util_EnumSet$EnumSetImpl_set[e.java_lang_Enum_ordinal] == e;
}

function java_util_EnumSet$EnumSetImpl_$remove__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Object_2Z(this$static, o){
  return com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 36) && java_util_EnumSet$EnumSetImpl_$removeEnum__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(this$static, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 36));
}

function java_util_EnumSet$EnumSetImpl_$removeEnum__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(this$static, e){
  if (!!e && this$static.java_util_EnumSet$EnumSetImpl_set[e.java_lang_Enum_ordinal] == e) {
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_EnumSet$EnumSetImpl_set, e.java_lang_Enum_ordinal, null);
    --this$static.java_util_EnumSet$EnumSetImpl_size;
    return true;
  }
  return false;
}

function java_util_EnumSet$EnumSetImpl_EnumSet$EnumSetImpl___3Ljava_lang_Enum_2_3Ljava_lang_Enum_2IV(all, set_0){
  this.java_util_EnumSet$EnumSetImpl_all = all;
  this.java_util_EnumSet$EnumSetImpl_set = set_0;
  this.java_util_EnumSet$EnumSetImpl_size = 0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(266, 303, $intern_24, java_util_EnumSet$EnumSetImpl_EnumSet$EnumSetImpl___3Ljava_lang_Enum_2_3Ljava_lang_Enum_2IV);
_.add__Ljava_lang_Object_2Z = function java_util_EnumSet$EnumSetImpl_add__Ljava_lang_Object_2Z(e){
  return java_util_EnumSet$EnumSetImpl_$add__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(e, 36));
}
;
_.contains__Ljava_lang_Object_2Z = function java_util_EnumSet$EnumSetImpl_contains__Ljava_lang_Object_2Z(o){
  return java_util_EnumSet$EnumSetImpl_$contains__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Object_2Z(this, o);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_EnumSet$EnumSetImpl_iterator__Ljava_util_Iterator_2(){
  return new java_util_EnumSet$EnumSetImpl$IteratorImpl_EnumSet$EnumSetImpl$IteratorImpl__Ljava_util_EnumSet$EnumSetImpl_2V(this);
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_EnumSet$EnumSetImpl_remove__Ljava_lang_Object_2Z(o){
  return java_util_EnumSet$EnumSetImpl_$remove__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Object_2Z(this, o);
}
;
_.size__I = function java_util_EnumSet$EnumSetImpl_size__I(){
  return this.java_util_EnumSet$EnumSetImpl_size;
}
;
_.java_util_EnumSet$EnumSetImpl_size = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1EnumSet$EnumSetImpl_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'EnumSet/EnumSetImpl', 266);
function java_util_EnumSet$EnumSetImpl$IteratorImpl_$findNext__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2V(this$static){
  var c;
  ++this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_i;
  for (c = this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11.java_util_EnumSet$EnumSetImpl_all.length; this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_i < c; ++this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_i) {
    if (this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11.java_util_EnumSet$EnumSetImpl_set[this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_i]) {
      return;
    }
  }
}

function java_util_EnumSet$EnumSetImpl$IteratorImpl_$hasNext__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2Z(this$static){
  return this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_i < this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11.java_util_EnumSet$EnumSetImpl_all.length;
}

function java_util_EnumSet$EnumSetImpl$IteratorImpl_$next__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2Ljava_lang_Object_2(this$static){
  return com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_i < this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11.java_util_EnumSet$EnumSetImpl_all.length) , this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_last = this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_i , java_util_EnumSet$EnumSetImpl$IteratorImpl_$findNext__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2V(this$static) , this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11.java_util_EnumSet$EnumSetImpl_set[this$static.java_util_EnumSet$EnumSetImpl$IteratorImpl_last];
}

function java_util_EnumSet$EnumSetImpl$IteratorImpl_EnumSet$EnumSetImpl$IteratorImpl__Ljava_util_EnumSet$EnumSetImpl_2V(this$1){
  this.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11 = this$1;
  java_util_EnumSet$EnumSetImpl$IteratorImpl_$findNext__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2V(this);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(179, 1, {}, java_util_EnumSet$EnumSetImpl$IteratorImpl_EnumSet$EnumSetImpl$IteratorImpl__Ljava_util_EnumSet$EnumSetImpl_2V);
_.hasNext__Z = function java_util_EnumSet$EnumSetImpl$IteratorImpl_hasNext__Z(){
  return java_util_EnumSet$EnumSetImpl$IteratorImpl_$hasNext__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2Z(this);
}
;
_.next__Ljava_lang_Object_2 = function java_util_EnumSet$EnumSetImpl$IteratorImpl_next__Ljava_lang_Object_2(){
  return java_util_EnumSet$EnumSetImpl$IteratorImpl_$next__Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2Ljava_lang_Object_2(this);
}
;
_.remove__V = function java_util_EnumSet$EnumSetImpl$IteratorImpl_remove__V(){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(this.java_util_EnumSet$EnumSetImpl$IteratorImpl_last != -1);
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11.java_util_EnumSet$EnumSetImpl_set, this.java_util_EnumSet$EnumSetImpl$IteratorImpl_last, null);
  --this.java_util_EnumSet$EnumSetImpl$IteratorImpl_this$11.java_util_EnumSet$EnumSetImpl_size;
  this.java_util_EnumSet$EnumSetImpl$IteratorImpl_last = -1;
}
;
_.java_util_EnumSet$EnumSetImpl$IteratorImpl_i = -1;
_.java_util_EnumSet$EnumSetImpl$IteratorImpl_last = -1;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1EnumSet$EnumSetImpl$IteratorImpl_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'EnumSet/EnumSetImpl/IteratorImpl', 179);
function java_util_HashMap_HashMap__V(){
  java_util_AbstractHashMap_$reset__Ljava_util_AbstractHashMap_2V(this);
}

function java_util_HashMap_HashMap__IV(ignored){
  java_util_AbstractHashMap_AbstractHashMap__IFV.call(this, ignored, 0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(26, 134, {5:1, 6:1, 94:1}, java_util_HashMap_HashMap__V, java_util_HashMap_HashMap__IV);
_.package_private$java_util_AbstractHashMap$equals__Ljava_lang_Object_2Ljava_lang_Object_2Z = function java_util_HashMap_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(value1, value2){
  return com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(value1) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(value2) || value1 != null && java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(value1, value2);
}
;
_.package_private$java_util_AbstractHashMap$getHashCode__Ljava_lang_Object_2I = function java_util_HashMap_getHashCode__Ljava_lang_Object_2I(key){
  var hashCode;
  hashCode = java_lang_Object_hashCode_1_1I_1_1devirtual$__Ljava_lang_Object_2I(key);
  return ~~hashCode;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1HashMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'HashMap', 26);
function java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static, o){
  var old;
  old = this$static.java_util_HashSet_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(o, this$static);
  return old == null;
}

function java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static, o){
  return this$static.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(o);
}

function java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static, o){
  return this$static.java_util_HashSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(o) != null;
}

function java_util_HashSet_HashSet__V(){
  this.java_util_HashSet_map = new java_util_HashMap_HashMap__V;
}

function java_util_HashSet_HashSet__Ljava_util_Collection_2V(c){
  this.java_util_HashSet_map = new java_util_HashMap_HashMap__IV(c.size__I());
  java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this, c);
}

function java_util_HashSet_HashSet__Ljava_util_HashMap_2V(map_0){
  this.java_util_HashSet_map = map_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(46, 291, {5:1, 6:1, 30:1, 56:1}, java_util_HashSet_HashSet__V, java_util_HashSet_HashSet__Ljava_util_Collection_2V);
_.add__Ljava_lang_Object_2Z = function java_util_HashSet_add__Ljava_lang_Object_2Z(o){
  return java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this, o);
}
;
_.contains__Ljava_lang_Object_2Z = function java_util_HashSet_contains__Ljava_lang_Object_2Z(o){
  return java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this, o);
}
;
_.isEmpty__Z = function java_util_HashSet_isEmpty__Z(){
  return this.java_util_HashSet_map.size__I() == 0;
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_HashSet_iterator__Ljava_util_Iterator_2(){
  return java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this.java_util_HashSet_map));
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_HashSet_remove__Ljava_lang_Object_2Z(o){
  return java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this, o);
}
;
_.size__I = function java_util_HashSet_size__I(){
  return this.java_util_HashSet_map.size__I();
}
;
_.toString__Ljava_lang_String_2$ = function java_util_HashSet_toString__Ljava_lang_String_2(){
  return java_util_AbstractCollection_$toString__Ljava_util_AbstractCollection_2Ljava_lang_String_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this.java_util_HashSet_map));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1HashSet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'HashSet', 46);
function java_util_InternalJsHashCodeMap_$containsValue__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Z(this$static, value_0){
  var entry, entry$array, entry$index, entry$max, hashCode, hashCode$array, hashCode$index, hashCode$max;
  for (hashCode$array = java_util_InternalJsHashCodeMap_$keys__Ljava_util_InternalJsHashCodeMap_2_3Ljava_lang_String_2(this$static) , hashCode$index = 0 , hashCode$max = hashCode$array.length; hashCode$index < hashCode$max; ++hashCode$index) {
    hashCode = hashCode$array[hashCode$index];
    for (entry$array = this$static.java_util_InternalJsHashCodeMap_backingMap[hashCode] , entry$index = 0 , entry$max = entry$array.length; entry$index < entry$max; ++entry$index) {
      entry = entry$array[entry$index];
      if (this$static.java_util_InternalJsHashCodeMap_host.package_private$java_util_AbstractHashMap$equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(value_0, entry.getValue__Ljava_lang_Object_2())) {
        return true;
      }
    }
  }
  return false;
}

function java_util_InternalJsHashCodeMap_$ensureChain__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_String_2_3Ljava_util_Map$Entry_2(this$static, hashCode){
  var map_0 = this$static.java_util_InternalJsHashCodeMap_backingMap;
  return map_0[hashCode] || (map_0[hashCode] = []);
}

function java_util_InternalJsHashCodeMap_$getChain__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_String_2_3Ljava_util_Map$Entry_2(this$static, hashCode){
  return this$static.java_util_InternalJsHashCodeMap_backingMap[hashCode];
}

function java_util_InternalJsHashCodeMap_$getChainOrEmpty__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_String_2_3Ljava_util_Map$Entry_2(this$static, hashCode){
  return this$static.java_util_InternalJsHashCodeMap_backingMap[hashCode] || [];
}

function java_util_InternalJsHashCodeMap_$getEntry__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this$static, key){
  var entry, entry$array, entry$index, entry$max;
  for (entry$array = java_util_InternalJsHashCodeMap_$getChainOrEmpty__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_String_2_3Ljava_util_Map$Entry_2(this$static, key == null?'0':'' + this$static.java_util_InternalJsHashCodeMap_host.package_private$java_util_AbstractHashMap$getHashCode__Ljava_lang_Object_2I(key)) , entry$index = 0 , entry$max = entry$array.length; entry$index < entry$max; ++entry$index) {
    entry = entry$array[entry$index];
    if (this$static.java_util_InternalJsHashCodeMap_host.package_private$java_util_AbstractHashMap$equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(key, entry.getKey__Ljava_lang_Object_2())) {
      return entry;
    }
  }
  return null;
}

function java_util_InternalJsHashCodeMap_$keys__Ljava_util_InternalJsHashCodeMap_2_3Ljava_lang_String_2(this$static){
  return Object.getOwnPropertyNames(this$static.java_util_InternalJsHashCodeMap_backingMap);
}

function java_util_InternalJsHashCodeMap_$put__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key, value_0){
  var chain, entry, entry$index, entry$max;
  chain = java_util_InternalJsHashCodeMap_$ensureChain__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_String_2_3Ljava_util_Map$Entry_2(this$static, key == null?'0':'' + this$static.java_util_InternalJsHashCodeMap_host.package_private$java_util_AbstractHashMap$getHashCode__Ljava_lang_Object_2I(key));
  for (entry$index = 0 , entry$max = chain.length; entry$index < entry$max; ++entry$index) {
    entry = chain[entry$index];
    if (this$static.java_util_InternalJsHashCodeMap_host.package_private$java_util_AbstractHashMap$equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(key, entry.getKey__Ljava_lang_Object_2())) {
      return entry.setValue__Ljava_lang_Object_2Ljava_lang_Object_2(value_0);
    }
  }
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(chain, chain.length, new java_util_AbstractMap$SimpleEntry_AbstractMap$SimpleEntry__Ljava_lang_Object_2Ljava_lang_Object_2V(key, value_0));
  java_util_AbstractHashMap_$elementAdded__Ljava_util_AbstractHashMap_2V(this$static.java_util_InternalJsHashCodeMap_host);
  return null;
}

function java_util_InternalJsHashCodeMap_$remove__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key){
  var chain, entry, hashCode, i;
  hashCode = key == null?'0':'' + this$static.java_util_InternalJsHashCodeMap_host.package_private$java_util_AbstractHashMap$getHashCode__Ljava_lang_Object_2I(key);
  chain = java_util_InternalJsHashCodeMap_$getChainOrEmpty__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_String_2_3Ljava_util_Map$Entry_2(this$static, hashCode);
  for (i = 0; i < chain.length; i++) {
    entry = chain[i];
    if (this$static.java_util_InternalJsHashCodeMap_host.package_private$java_util_AbstractHashMap$equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(key, entry.getKey__Ljava_lang_Object_2())) {
      chain.length == 1?(delete this$static.java_util_InternalJsHashCodeMap_backingMap[hashCode] , undefined):(chain.splice(i, 1) , undefined);
      java_util_AbstractHashMap_$elementRemoved__Ljava_util_AbstractHashMap_2V(this$static.java_util_InternalJsHashCodeMap_host);
      return entry.getValue__Ljava_lang_Object_2();
    }
  }
  return null;
}

function java_util_InternalJsHashCodeMap_InternalJsHashCodeMap__V(){
  this.java_util_InternalJsHashCodeMap_backingMap = Object.create(null);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(205, 1, {}, java_util_InternalJsHashCodeMap_InternalJsHashCodeMap__V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1InternalJsHashCodeMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'InternalJsHashCodeMap', 205);
function java_util_InternalJsHashCodeMap$1_$hasNext__Ljava_util_InternalJsHashCodeMap$1_2Z(this$static){
  if (this$static.java_util_InternalJsHashCodeMap$1_itemIndex < this$static.java_util_InternalJsHashCodeMap$1_chain.length) {
    return true;
  }
  if (this$static.java_util_InternalJsHashCodeMap$1_chainIndex < this$static.java_util_InternalJsHashCodeMap$1_keys.length - 1) {
    this$static.java_util_InternalJsHashCodeMap$1_chain = java_util_InternalJsHashCodeMap_$getChain__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_String_2_3Ljava_util_Map$Entry_2(this$static.java_util_InternalJsHashCodeMap$1_this$01, this$static.java_util_InternalJsHashCodeMap$1_keys[++this$static.java_util_InternalJsHashCodeMap$1_chainIndex]);
    this$static.java_util_InternalJsHashCodeMap$1_itemIndex = 0;
    return true;
  }
  return false;
}

function java_util_InternalJsHashCodeMap$1_InternalJsHashCodeMap$1__Ljava_util_InternalJsHashCodeMap_2V(this$0){
  this.java_util_InternalJsHashCodeMap$1_this$01 = this$0;
  this.java_util_InternalJsHashCodeMap$1_keys = java_util_InternalJsHashCodeMap_$keys__Ljava_util_InternalJsHashCodeMap_2_3Ljava_lang_String_2(this.java_util_InternalJsHashCodeMap$1_this$01);
  this.java_util_InternalJsHashCodeMap$1_chain = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Map$Entry_12_1classLit, $intern_14, 45, 0, 0, 1);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(206, 1, {}, java_util_InternalJsHashCodeMap$1_InternalJsHashCodeMap$1__Ljava_util_InternalJsHashCodeMap_2V);
_.hasNext__Z = function java_util_InternalJsHashCodeMap$1_hasNext__Z(){
  return java_util_InternalJsHashCodeMap$1_$hasNext__Ljava_util_InternalJsHashCodeMap$1_2Z(this);
}
;
_.next__Ljava_lang_Object_2 = function java_util_InternalJsHashCodeMap$1_next__Ljava_lang_Object_2(){
  return com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(java_util_InternalJsHashCodeMap$1_$hasNext__Ljava_util_InternalJsHashCodeMap$1_2Z(this)) , this.java_util_InternalJsHashCodeMap$1_lastChain = this.java_util_InternalJsHashCodeMap$1_chain , this.java_util_InternalJsHashCodeMap$1_lastEntry = this.java_util_InternalJsHashCodeMap$1_chain[this.java_util_InternalJsHashCodeMap$1_itemIndex++] , this.java_util_InternalJsHashCodeMap$1_lastEntry;
}
;
_.remove__V = function java_util_InternalJsHashCodeMap$1_remove__V(){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(!!this.java_util_InternalJsHashCodeMap$1_lastEntry);
  java_util_InternalJsHashCodeMap_$remove__Ljava_util_InternalJsHashCodeMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_InternalJsHashCodeMap$1_this$01, this.java_util_InternalJsHashCodeMap$1_lastEntry.getKey__Ljava_lang_Object_2());
  com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_InternalJsHashCodeMap$1_chain) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_InternalJsHashCodeMap$1_lastChain) && this.java_util_InternalJsHashCodeMap$1_chain.length != 1 && --this.java_util_InternalJsHashCodeMap$1_itemIndex;
  this.java_util_InternalJsHashCodeMap$1_lastEntry = null;
}
;
_.java_util_InternalJsHashCodeMap$1_chainIndex = -1;
_.java_util_InternalJsHashCodeMap$1_itemIndex = 0;
_.java_util_InternalJsHashCodeMap$1_lastChain = null;
_.java_util_InternalJsHashCodeMap$1_lastEntry = null;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1InternalJsHashCodeMap$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'InternalJsHashCodeMap/1', 206);
function java_util_InternalJsStringMap_$at__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2(this$static, key){
  return this$static.java_util_InternalJsStringMap_backingMap[key];
}

function java_util_InternalJsStringMap_$containsValue__Ljava_util_InternalJsStringMap_2Ljava_lang_Object_2Z(this$static, value_0){
  var map_0 = this$static.java_util_InternalJsStringMap_backingMap;
  for (var key in map_0) {
    if (this$static.equalsBridge__Ljava_lang_Object_2Ljava_lang_Object_2Z(value_0, map_0[key])) {
      return true;
    }
  }
  return false;
}

function java_util_InternalJsStringMap_$entries__Ljava_util_InternalJsStringMap_2Ljava_util_Iterator_2(this$static){
  var keys_0;
  keys_0 = Object.getOwnPropertyNames(this$static.java_util_InternalJsStringMap_backingMap);
  return new java_util_InternalJsStringMap$1_InternalJsStringMap$1__Ljava_util_InternalJsStringMap_2V(this$static, keys_0);
}

function java_util_InternalJsStringMap_$put__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key, value_0){
  var oldValue;
  oldValue = this$static.java_util_InternalJsStringMap_backingMap[key];
  oldValue === undefined && java_util_AbstractHashMap_$elementAdded__Ljava_util_AbstractHashMap_2V(this$static.java_util_InternalJsStringMap_host);
  java_util_InternalJsStringMap_$set__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2V(this$static, key, value_0 === undefined?null:value_0);
  return oldValue;
}

function java_util_InternalJsStringMap_$remove__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2(this$static, key){
  var value_0;
  value_0 = this$static.java_util_InternalJsStringMap_backingMap[key];
  if (!(value_0 === undefined)) {
    delete this$static.java_util_InternalJsStringMap_backingMap[key];
    java_util_AbstractHashMap_$elementRemoved__Ljava_util_AbstractHashMap_2V(this$static.java_util_InternalJsStringMap_host);
  }
  return value_0;
}

function java_util_InternalJsStringMap_$set__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2V(this$static, key, value_0){
  this$static.java_util_InternalJsStringMap_backingMap[key] = value_0;
}

function java_util_InternalJsStringMap_InternalJsStringMap__V(){
  this.java_util_InternalJsStringMap_backingMap = Object.create(null);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(200, 1, {}, java_util_InternalJsStringMap_InternalJsStringMap__V);
_.equalsBridge__Ljava_lang_Object_2Ljava_lang_Object_2Z = function java_util_InternalJsStringMap_equalsBridge__Ljava_lang_Object_2Ljava_lang_Object_2Z(value1, value2){
  return this.java_util_InternalJsStringMap_host.package_private$java_util_AbstractHashMap$equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(value1, value2);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1InternalJsStringMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'InternalJsStringMap', 200);
function java_util_InternalJsStringMap$1_InternalJsStringMap$1__Ljava_util_InternalJsStringMap_2V(this$0, val$keys){
  this.java_util_InternalJsStringMap$1_this$01 = this$0;
  this.java_util_InternalJsStringMap$1_val$keys2 = val$keys;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(201, 1, {}, java_util_InternalJsStringMap$1_InternalJsStringMap$1__Ljava_util_InternalJsStringMap_2V);
_.hasNext__Z = function java_util_InternalJsStringMap$1_hasNext__Z(){
  return this.java_util_InternalJsStringMap$1_i < this.java_util_InternalJsStringMap$1_val$keys2.length;
}
;
_.next__Ljava_lang_Object_2 = function java_util_InternalJsStringMap$1_next__Ljava_lang_Object_2(){
  return com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this.java_util_InternalJsStringMap$1_i < this.java_util_InternalJsStringMap$1_val$keys2.length) , new java_util_InternalJsStringMap$2_InternalJsStringMap$2__Ljava_util_InternalJsStringMap_2V(this.java_util_InternalJsStringMap$1_this$01, this.java_util_InternalJsStringMap$1_val$keys2[this.java_util_InternalJsStringMap$1_last = this.java_util_InternalJsStringMap$1_i++]);
}
;
_.remove__V = function java_util_InternalJsStringMap$1_remove__V(){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(this.java_util_InternalJsStringMap$1_last != -1);
  java_util_InternalJsStringMap_$remove__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2(this.java_util_InternalJsStringMap$1_this$01, this.java_util_InternalJsStringMap$1_val$keys2[this.java_util_InternalJsStringMap$1_last]);
  this.java_util_InternalJsStringMap$1_last = -1;
}
;
_.java_util_InternalJsStringMap$1_i = 0;
_.java_util_InternalJsStringMap$1_last = -1;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1InternalJsStringMap$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'InternalJsStringMap/1', 201);
function java_util_InternalJsStringMap$2_InternalJsStringMap$2__Ljava_util_InternalJsStringMap_2V(this$0, val$key){
  this.java_util_InternalJsStringMap$2_this$01 = this$0;
  this.java_util_InternalJsStringMap$2_val$key2 = val$key;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(202, 294, {45:1}, java_util_InternalJsStringMap$2_InternalJsStringMap$2__Ljava_util_InternalJsStringMap_2V);
_.getKey__Ljava_lang_Object_2 = function java_util_InternalJsStringMap$2_getKey__Ljava_lang_Object_2(){
  return this.java_util_InternalJsStringMap$2_val$key2;
}
;
_.getValue__Ljava_lang_Object_2 = function java_util_InternalJsStringMap$2_getValue__Ljava_lang_Object_2(){
  return java_util_InternalJsStringMap_$at__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2(this.java_util_InternalJsStringMap$2_this$01, this.java_util_InternalJsStringMap$2_val$key2);
}
;
_.setValue__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_InternalJsStringMap$2_setValue__Ljava_lang_Object_2Ljava_lang_Object_2(object){
  return java_util_InternalJsStringMap_$put__Ljava_util_InternalJsStringMap_2Ljava_lang_String_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_InternalJsStringMap$2_this$01, this.java_util_InternalJsStringMap$2_val$key2, object);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1InternalJsStringMap$2_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'InternalJsStringMap/2', 202);
function java_util_LinkedHashMap_$$init__Ljava_util_LinkedHashMap_2V(this$static){
  this$static.java_util_LinkedHashMap_head = new java_util_LinkedHashMap$ChainEntry_LinkedHashMap$ChainEntry__Ljava_util_LinkedHashMap_2V(this$static);
  this$static.java_util_LinkedHashMap_map = new java_util_HashMap_HashMap__V;
}

function java_util_LinkedHashMap_$containsKey__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Z(this$static, key){
  return this$static.java_util_LinkedHashMap_map.containsKey__Ljava_lang_Object_2Z(key);
}

function java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key){
  var entry;
  entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_LinkedHashMap_map.get__Ljava_lang_Object_2Ljava_lang_Object_2(key), 103);
  if (entry) {
    java_util_LinkedHashMap_$recordAccess__Ljava_util_LinkedHashMap_2Ljava_util_LinkedHashMap$ChainEntry_2V(this$static, entry);
    return entry.java_util_AbstractMap$AbstractEntry_value;
  }
  return null;
}

function java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key, value_0){
  var newEntry, old, oldValue;
  old = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_LinkedHashMap_map.get__Ljava_lang_Object_2Ljava_lang_Object_2(key), 103);
  if (!old) {
    newEntry = new java_util_LinkedHashMap$ChainEntry_LinkedHashMap$ChainEntry__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2V(this$static, key, value_0);
    this$static.java_util_LinkedHashMap_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(key, newEntry);
    java_util_LinkedHashMap$ChainEntry_$addToEnd__Ljava_util_LinkedHashMap$ChainEntry_2V(newEntry);
    return null;
  }
   else {
    oldValue = java_util_AbstractMap$AbstractEntry_$setValue__Ljava_util_AbstractMap$AbstractEntry_2Ljava_lang_Object_2Ljava_lang_Object_2(old, value_0);
    java_util_LinkedHashMap_$recordAccess__Ljava_util_LinkedHashMap_2Ljava_util_LinkedHashMap$ChainEntry_2V(this$static, old);
    return oldValue;
  }
}

function java_util_LinkedHashMap_$recordAccess__Ljava_util_LinkedHashMap_2Ljava_util_LinkedHashMap$ChainEntry_2V(this$static, entry){
  if (this$static.java_util_LinkedHashMap_accessOrder) {
    java_util_LinkedHashMap$ChainEntry_$remove__Ljava_util_LinkedHashMap$ChainEntry_2V(entry);
    java_util_LinkedHashMap$ChainEntry_$addToEnd__Ljava_util_LinkedHashMap$ChainEntry_2V(entry);
  }
}

function java_util_LinkedHashMap_$remove__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key){
  var entry;
  entry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_LinkedHashMap_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(key), 103);
  if (entry) {
    java_util_LinkedHashMap$ChainEntry_$remove__Ljava_util_LinkedHashMap$ChainEntry_2V(entry);
    return entry.java_util_AbstractMap$AbstractEntry_value;
  }
  return null;
}

function java_util_LinkedHashMap_LinkedHashMap__V(){
  java_util_HashMap_HashMap__V.call(this);
  java_util_LinkedHashMap_$$init__Ljava_util_LinkedHashMap_2V(this);
  this.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_prev = this.java_util_LinkedHashMap_head;
  this.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_next = this.java_util_LinkedHashMap_head;
}

function java_util_LinkedHashMap_LinkedHashMap__IV(ignored){
  java_util_AbstractHashMap_AbstractHashMap__IFV.call(this, ignored, 0);
  java_util_LinkedHashMap_$$init__Ljava_util_LinkedHashMap_2V(this);
  this.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_prev = this.java_util_LinkedHashMap_head;
  this.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_next = this.java_util_LinkedHashMap_head;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(44, 26, {5:1, 6:1, 44:1, 94:1}, java_util_LinkedHashMap_LinkedHashMap__V, java_util_LinkedHashMap_LinkedHashMap__IV);
_.clear__V = function java_util_LinkedHashMap_clear__V(){
  this.java_util_LinkedHashMap_map.clear__V();
  this.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_prev = this.java_util_LinkedHashMap_head;
  this.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_next = this.java_util_LinkedHashMap_head;
}
;
_.containsKey__Ljava_lang_Object_2Z = function java_util_LinkedHashMap_containsKey__Ljava_lang_Object_2Z(key){
  return java_util_LinkedHashMap_$containsKey__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Z(this, key);
}
;
_.containsValue__Ljava_lang_Object_2Z = function java_util_LinkedHashMap_containsValue__Ljava_lang_Object_2Z(value_0){
  var node;
  node = this.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_next;
  while (node != this.java_util_LinkedHashMap_head) {
    if (java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(node.java_util_AbstractMap$AbstractEntry_value, value_0)) {
      return true;
    }
    node = node.java_util_LinkedHashMap$ChainEntry_next;
  }
  return false;
}
;
_.entrySet__Ljava_util_Set_2 = function java_util_LinkedHashMap_entrySet__Ljava_util_Set_2(){
  return new java_util_LinkedHashMap$EntrySet_LinkedHashMap$EntrySet__Ljava_util_LinkedHashMap_2V(this);
}
;
_.get__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_LinkedHashMap_get__Ljava_lang_Object_2Ljava_lang_Object_2(key){
  return java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this, key);
}
;
_.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_LinkedHashMap_put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(key, value_0){
  return java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this, key, value_0);
}
;
_.remove__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_LinkedHashMap_remove__Ljava_lang_Object_2Ljava_lang_Object_2(key){
  return java_util_LinkedHashMap_$remove__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this, key);
}
;
_.size__I = function java_util_LinkedHashMap_size__I(){
  return this.java_util_LinkedHashMap_map.size__I();
}
;
_.java_util_LinkedHashMap_accessOrder = false;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedHashMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedHashMap', 44);
function java_util_LinkedHashMap$ChainEntry_$addToEnd__Ljava_util_LinkedHashMap$ChainEntry_2V(this$static){
  var tail;
  tail = this$static.java_util_LinkedHashMap$ChainEntry_this$01.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_prev;
  this$static.java_util_LinkedHashMap$ChainEntry_prev = tail;
  this$static.java_util_LinkedHashMap$ChainEntry_next = this$static.java_util_LinkedHashMap$ChainEntry_this$01.java_util_LinkedHashMap_head;
  tail.java_util_LinkedHashMap$ChainEntry_next = this$static.java_util_LinkedHashMap$ChainEntry_this$01.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_prev = this$static;
}

function java_util_LinkedHashMap$ChainEntry_$remove__Ljava_util_LinkedHashMap$ChainEntry_2V(this$static){
  this$static.java_util_LinkedHashMap$ChainEntry_next.java_util_LinkedHashMap$ChainEntry_prev = this$static.java_util_LinkedHashMap$ChainEntry_prev;
  this$static.java_util_LinkedHashMap$ChainEntry_prev.java_util_LinkedHashMap$ChainEntry_next = this$static.java_util_LinkedHashMap$ChainEntry_next;
  this$static.java_util_LinkedHashMap$ChainEntry_next = this$static.java_util_LinkedHashMap$ChainEntry_prev = null;
}

function java_util_LinkedHashMap$ChainEntry_LinkedHashMap$ChainEntry__Ljava_util_LinkedHashMap_2V(this$0){
  java_util_LinkedHashMap$ChainEntry_LinkedHashMap$ChainEntry__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2V.call(this, this$0, null, null);
}

function java_util_LinkedHashMap$ChainEntry_LinkedHashMap$ChainEntry__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2V(this$0, key, value_0){
  this.java_util_LinkedHashMap$ChainEntry_this$01 = this$0;
  java_util_AbstractMap$SimpleEntry_AbstractMap$SimpleEntry__Ljava_lang_Object_2Ljava_lang_Object_2V.call(this, key, value_0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(103, 98, {118:1, 98:1, 103:1, 45:1}, java_util_LinkedHashMap$ChainEntry_LinkedHashMap$ChainEntry__Ljava_util_LinkedHashMap_2V, java_util_LinkedHashMap$ChainEntry_LinkedHashMap$ChainEntry__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedHashMap$ChainEntry_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedHashMap/ChainEntry', 103);
function java_util_LinkedHashMap$EntrySet_$contains__Ljava_util_LinkedHashMap$EntrySet_2Ljava_lang_Object_2Z(this$static, o){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 45)) {
    return java_util_AbstractMap_$containsEntry__Ljava_util_AbstractMap_2Ljava_util_Map$Entry_2Z(this$static.java_util_LinkedHashMap$EntrySet_this$01, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 45));
  }
  return false;
}

function java_util_LinkedHashMap$EntrySet_LinkedHashMap$EntrySet__Ljava_util_LinkedHashMap_2V(this$0){
  this.java_util_LinkedHashMap$EntrySet_this$01 = this$0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(241, 291, $intern_24, java_util_LinkedHashMap$EntrySet_LinkedHashMap$EntrySet__Ljava_util_LinkedHashMap_2V);
_.contains__Ljava_lang_Object_2Z = function java_util_LinkedHashMap$EntrySet_contains__Ljava_lang_Object_2Z(o){
  return java_util_LinkedHashMap$EntrySet_$contains__Ljava_util_LinkedHashMap$EntrySet_2Ljava_lang_Object_2Z(this, o);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_LinkedHashMap$EntrySet_iterator__Ljava_util_Iterator_2(){
  return new java_util_LinkedHashMap$EntrySet$EntryIterator_LinkedHashMap$EntrySet$EntryIterator__Ljava_util_LinkedHashMap$EntrySet_2V(this);
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_LinkedHashMap$EntrySet_remove__Ljava_lang_Object_2Z(entry){
  var key;
  if (java_util_LinkedHashMap$EntrySet_$contains__Ljava_util_LinkedHashMap$EntrySet_2Ljava_lang_Object_2Z(this, entry)) {
    key = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(entry, 45).getKey__Ljava_lang_Object_2();
    java_util_LinkedHashMap_$remove__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_LinkedHashMap$EntrySet_this$01, key);
    return true;
  }
  return false;
}
;
_.size__I = function java_util_LinkedHashMap$EntrySet_size__I(){
  return this.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_map.size__I();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedHashMap$EntrySet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedHashMap/EntrySet', 241);
function java_util_LinkedHashMap$EntrySet$EntryIterator_LinkedHashMap$EntrySet$EntryIterator__Ljava_util_LinkedHashMap$EntrySet_2V(this$1){
  this.java_util_LinkedHashMap$EntrySet$EntryIterator_this$11 = this$1;
  this.java_util_LinkedHashMap$EntrySet$EntryIterator_next = this$1.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_head.java_util_LinkedHashMap$ChainEntry_next;
  java_util_ConcurrentModificationDetector_recordLastKnownStructure__Ljava_lang_Object_2Ljava_util_Iterator_2V(this$1.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_map, this);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(242, 1, {}, java_util_LinkedHashMap$EntrySet$EntryIterator_LinkedHashMap$EntrySet$EntryIterator__Ljava_util_LinkedHashMap$EntrySet_2V);
_.hasNext__Z = function java_util_LinkedHashMap$EntrySet$EntryIterator_hasNext__Z(){
  return this.java_util_LinkedHashMap$EntrySet$EntryIterator_next != this.java_util_LinkedHashMap$EntrySet$EntryIterator_this$11.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_head;
}
;
_.next__Ljava_lang_Object_2 = function java_util_LinkedHashMap$EntrySet$EntryIterator_next__Ljava_lang_Object_2(){
  return java_util_ConcurrentModificationDetector_checkStructuralChange__Ljava_lang_Object_2Ljava_util_Iterator_2V(this.java_util_LinkedHashMap$EntrySet$EntryIterator_this$11.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_map, this) , com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this.java_util_LinkedHashMap$EntrySet$EntryIterator_next != this.java_util_LinkedHashMap$EntrySet$EntryIterator_this$11.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_head) , this.java_util_LinkedHashMap$EntrySet$EntryIterator_last = this.java_util_LinkedHashMap$EntrySet$EntryIterator_next , this.java_util_LinkedHashMap$EntrySet$EntryIterator_next = this.java_util_LinkedHashMap$EntrySet$EntryIterator_next.java_util_LinkedHashMap$ChainEntry_next , this.java_util_LinkedHashMap$EntrySet$EntryIterator_last;
}
;
_.remove__V = function java_util_LinkedHashMap$EntrySet$EntryIterator_remove__V(){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(!!this.java_util_LinkedHashMap$EntrySet$EntryIterator_last);
  java_util_ConcurrentModificationDetector_checkStructuralChange__Ljava_lang_Object_2Ljava_util_Iterator_2V(this.java_util_LinkedHashMap$EntrySet$EntryIterator_this$11.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_map, this);
  java_util_LinkedHashMap$ChainEntry_$remove__Ljava_util_LinkedHashMap$ChainEntry_2V(this.java_util_LinkedHashMap$EntrySet$EntryIterator_last);
  this.java_util_LinkedHashMap$EntrySet$EntryIterator_this$11.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_LinkedHashMap$EntrySet$EntryIterator_last.java_util_AbstractMap$AbstractEntry_key);
  java_util_ConcurrentModificationDetector_recordLastKnownStructure__Ljava_lang_Object_2Ljava_util_Iterator_2V(this.java_util_LinkedHashMap$EntrySet$EntryIterator_this$11.java_util_LinkedHashMap$EntrySet_this$01.java_util_LinkedHashMap_map, this);
  this.java_util_LinkedHashMap$EntrySet$EntryIterator_last = null;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedHashMap$EntrySet$EntryIterator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedHashMap/EntrySet/EntryIterator', 242);
function java_util_LinkedHashSet_LinkedHashSet__V(){
  java_util_HashSet_HashSet__Ljava_util_HashMap_2V.call(this, new java_util_LinkedHashMap_LinkedHashMap__V);
}

function java_util_LinkedHashSet_LinkedHashSet__IV(ignored){
  java_util_HashSet_HashSet__Ljava_util_HashMap_2V.call(this, new java_util_LinkedHashMap_LinkedHashMap__IV(ignored));
}

function java_util_LinkedHashSet_LinkedHashSet__Ljava_util_Collection_2V(c){
  java_util_HashSet_HashSet__Ljava_util_HashMap_2V.call(this, new java_util_LinkedHashMap_LinkedHashMap__V);
  java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this, c);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(32, 46, {5:1, 6:1, 30:1, 32:1, 56:1}, java_util_LinkedHashSet_LinkedHashSet__V, java_util_LinkedHashSet_LinkedHashSet__IV, java_util_LinkedHashSet_LinkedHashSet__Ljava_util_Collection_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedHashSet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedHashSet', 32);
function java_util_LinkedList_$$init__Ljava_util_LinkedList_2V(this$static){
  this$static.java_util_LinkedList_header = new java_util_LinkedList$Node_LinkedList$Node__V;
  this$static.java_util_LinkedList_tail = new java_util_LinkedList$Node_LinkedList$Node__V;
}

function java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static, o){
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(this$static, o, this$static.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, this$static.java_util_LinkedList_tail);
  return true;
}

function java_util_LinkedList_$addFirst__Ljava_util_LinkedList_2Ljava_lang_Object_2V(this$static, o){
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(this$static, o, this$static.java_util_LinkedList_header, this$static.java_util_LinkedList_header.java_util_LinkedList$Node_next);
}

function java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(this$static, o){
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(this$static, o, this$static.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, this$static.java_util_LinkedList_tail);
}

function java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(this$static, o, prev, next){
  var node;
  node = new java_util_LinkedList$Node_LinkedList$Node__V;
  node.java_util_LinkedList$Node_value = o;
  node.java_util_LinkedList$Node_prev = prev;
  node.java_util_LinkedList$Node_next = next;
  next.java_util_LinkedList$Node_prev = prev.java_util_LinkedList$Node_next = node;
  ++this$static.java_util_LinkedList_size;
}

function java_util_LinkedList_$getFirst__Ljava_util_LinkedList_2Ljava_lang_Object_2(this$static){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this$static.java_util_LinkedList_size != 0);
  return this$static.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value;
}

function java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static, index_0){
  var i, node;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkPositionIndex__IIV(index_0, this$static.java_util_LinkedList_size);
  if (index_0 >= this$static.java_util_LinkedList_size >> 1) {
    node = this$static.java_util_LinkedList_tail;
    for (i = this$static.java_util_LinkedList_size; i > index_0; --i) {
      node = node.java_util_LinkedList$Node_prev;
    }
  }
   else {
    node = this$static.java_util_LinkedList_header.java_util_LinkedList$Node_next;
    for (i = 0; i < index_0; ++i) {
      node = node.java_util_LinkedList$Node_next;
    }
  }
  return new java_util_LinkedList$ListIteratorImpl_LinkedList$ListIteratorImpl__Ljava_util_LinkedList_2ILjava_util_LinkedList$Node_2V(this$static, index_0, node);
}

function java_util_LinkedList_$poll__Ljava_util_LinkedList_2Ljava_lang_Object_2(this$static){
  return this$static.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this$static.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(this$static, this$static.java_util_LinkedList_header.java_util_LinkedList$Node_next));
}

function java_util_LinkedList_$push__Ljava_util_LinkedList_2Ljava_lang_Object_2V(this$static, e){
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(this$static, e, this$static.java_util_LinkedList_header, this$static.java_util_LinkedList_header.java_util_LinkedList$Node_next);
}

function java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(this$static, node){
  var oldValue;
  oldValue = node.java_util_LinkedList$Node_value;
  node.java_util_LinkedList$Node_next.java_util_LinkedList$Node_prev = node.java_util_LinkedList$Node_prev;
  node.java_util_LinkedList$Node_prev.java_util_LinkedList$Node_next = node.java_util_LinkedList$Node_next;
  node.java_util_LinkedList$Node_next = node.java_util_LinkedList$Node_prev = null;
  node.java_util_LinkedList$Node_value = null;
  --this$static.java_util_LinkedList_size;
  return oldValue;
}

function java_util_LinkedList_$reset__Ljava_util_LinkedList_2V(this$static){
  this$static.java_util_LinkedList_header.java_util_LinkedList$Node_next = this$static.java_util_LinkedList_tail;
  this$static.java_util_LinkedList_tail.java_util_LinkedList$Node_prev = this$static.java_util_LinkedList_header;
  this$static.java_util_LinkedList_header.java_util_LinkedList$Node_prev = this$static.java_util_LinkedList_tail.java_util_LinkedList$Node_next = null;
  this$static.java_util_LinkedList_size = 0;
}

function java_util_LinkedList_LinkedList__V(){
  java_util_LinkedList_$$init__Ljava_util_LinkedList_2V(this);
  java_util_LinkedList_$reset__Ljava_util_LinkedList_2V(this);
}

function java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(c){
  java_util_LinkedList_$$init__Ljava_util_LinkedList_2V(this);
  java_util_LinkedList_$reset__Ljava_util_LinkedList_2V(this);
  java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this, c);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(19, 300, {5:1, 6:1, 30:1, 19:1, 69:1}, java_util_LinkedList_LinkedList__V, java_util_LinkedList_LinkedList__Ljava_util_Collection_2V);
_.add__Ljava_lang_Object_2Z = function java_util_LinkedList_add__Ljava_lang_Object_2Z(o){
  return java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this, o);
}
;
_.listIterator__ILjava_util_ListIterator_2 = function java_util_LinkedList_listIterator__ILjava_util_ListIterator_2(index_0){
  return java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this, index_0);
}
;
_.size__I = function java_util_LinkedList_size__I(){
  return this.java_util_LinkedList_size;
}
;
_.java_util_LinkedList_size = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedList', 19);
function java_util_LinkedList$ListIteratorImpl_$add__Ljava_util_LinkedList$ListIteratorImpl_2Ljava_lang_Object_2V(this$static, o){
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(this$static.java_util_LinkedList$ListIteratorImpl_this$01, o, this$static.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev, this$static.java_util_LinkedList$ListIteratorImpl_currentNode);
  ++this$static.java_util_LinkedList$ListIteratorImpl_currentIndex;
  this$static.java_util_LinkedList$ListIteratorImpl_lastNode = null;
}

function java_util_LinkedList$ListIteratorImpl_$remove__Ljava_util_LinkedList$ListIteratorImpl_2V(this$static){
  var nextNode;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(!!this$static.java_util_LinkedList$ListIteratorImpl_lastNode);
  nextNode = this$static.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_next;
  java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(this$static.java_util_LinkedList$ListIteratorImpl_this$01, this$static.java_util_LinkedList$ListIteratorImpl_lastNode);
  this$static.java_util_LinkedList$ListIteratorImpl_currentNode == this$static.java_util_LinkedList$ListIteratorImpl_lastNode?(this$static.java_util_LinkedList$ListIteratorImpl_currentNode = nextNode):--this$static.java_util_LinkedList$ListIteratorImpl_currentIndex;
  this$static.java_util_LinkedList$ListIteratorImpl_lastNode = null;
}

function java_util_LinkedList$ListIteratorImpl_LinkedList$ListIteratorImpl__Ljava_util_LinkedList_2ILjava_util_LinkedList$Node_2V(this$0, index_0, startNode){
  this.java_util_LinkedList$ListIteratorImpl_this$01 = this$0;
  this.java_util_LinkedList$ListIteratorImpl_currentNode = startNode;
  this.java_util_LinkedList$ListIteratorImpl_currentIndex = index_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(232, 1, {}, java_util_LinkedList$ListIteratorImpl_LinkedList$ListIteratorImpl__Ljava_util_LinkedList_2ILjava_util_LinkedList$Node_2V);
_.hasNext__Z = function java_util_LinkedList$ListIteratorImpl_hasNext__Z(){
  return this.java_util_LinkedList$ListIteratorImpl_currentNode != this.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;
}
;
_.next__Ljava_lang_Object_2 = function java_util_LinkedList$ListIteratorImpl_next__Ljava_lang_Object_2(){
  return com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this.java_util_LinkedList$ListIteratorImpl_currentNode != this.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , this.java_util_LinkedList$ListIteratorImpl_lastNode = this.java_util_LinkedList$ListIteratorImpl_currentNode , this.java_util_LinkedList$ListIteratorImpl_currentNode = this.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++this.java_util_LinkedList$ListIteratorImpl_currentIndex , this.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value;
}
;
_.nextIndex__I = function java_util_LinkedList$ListIteratorImpl_nextIndex__I(){
  return this.java_util_LinkedList$ListIteratorImpl_currentIndex;
}
;
_.previous__Ljava_lang_Object_2 = function java_util_LinkedList$ListIteratorImpl_previous__Ljava_lang_Object_2(){
  return com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(this.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev != this.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_header) , this.java_util_LinkedList$ListIteratorImpl_lastNode = this.java_util_LinkedList$ListIteratorImpl_currentNode = this.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev , --this.java_util_LinkedList$ListIteratorImpl_currentIndex , this.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value;
}
;
_.previousIndex__I = function java_util_LinkedList$ListIteratorImpl_previousIndex__I(){
  return this.java_util_LinkedList$ListIteratorImpl_currentIndex - 1;
}
;
_.remove__V = function java_util_LinkedList$ListIteratorImpl_remove__V(){
  java_util_LinkedList$ListIteratorImpl_$remove__Ljava_util_LinkedList$ListIteratorImpl_2V(this);
}
;
_.set__Ljava_lang_Object_2V = function java_util_LinkedList$ListIteratorImpl_set__Ljava_lang_Object_2V(o){
  com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZV(!!this.java_util_LinkedList$ListIteratorImpl_lastNode);
  this.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value = o;
}
;
_.java_util_LinkedList$ListIteratorImpl_currentIndex = 0;
_.java_util_LinkedList$ListIteratorImpl_lastNode = null;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedList$ListIteratorImpl_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedList/ListIteratorImpl', 232);
function java_util_LinkedList$Node_LinkedList$Node__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(153, 1, {}, java_util_LinkedList$Node_LinkedList$Node__V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1LinkedList$Node_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'LinkedList/Node', 153);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Map$Entry_12_1classLit = java_lang_Class_createForInterface__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_Class_2($intern_22, 'Map/Entry');
function java_util_NoSuchElementException_NoSuchElementException__V(){
  java_lang_RuntimeException_RuntimeException__V.call(this);
}

function java_util_NoSuchElementException_NoSuchElementException__Ljava_lang_String_2V(){
  java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V.call(this, 'Queue is empty');
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(106, 40, {5:1, 25:1, 106:1}, java_util_NoSuchElementException_NoSuchElementException__V, java_util_NoSuchElementException_NoSuchElementException__Ljava_lang_String_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1NoSuchElementException_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'NoSuchElementException', 106);
function java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(a, b){
  return com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(a) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(b) || a != null && java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(a, b);
}

function java_util_Objects_hashCode__Ljava_lang_Object_2I(o){
  return o != null?java_lang_Object_hashCode_1_1I_1_1devirtual$__Ljava_lang_Object_2I(o):0;
}

function java_util_PriorityQueue_$makeHeap__Ljava_util_PriorityQueue_2IV(this$static, node){
  var rightChild;
  if (node * 2 + 1 >= this$static.java_util_PriorityQueue_heap.java_util_ArrayList_array.length) {
    return;
  }
  java_util_PriorityQueue_$makeHeap__Ljava_util_PriorityQueue_2IV(this$static, 2 * node + 1);
  rightChild = 2 * node + 2;
  rightChild < this$static.java_util_PriorityQueue_heap.java_util_ArrayList_array.length && java_util_PriorityQueue_$makeHeap__Ljava_util_PriorityQueue_2IV(this$static, rightChild);
  java_util_PriorityQueue_$mergeHeaps__Ljava_util_PriorityQueue_2IV(this$static, node);
}

function java_util_PriorityQueue_$mergeHeaps__Ljava_util_PriorityQueue_2IV(this$static, node){
  var heapSize, smallestChild, value_0, java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_leftChild_0, java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_rightChild_0, java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_smallestChild_0;
  heapSize = this$static.java_util_PriorityQueue_heap.java_util_ArrayList_array.length;
  value_0 = java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, node);
  while (node * 2 + 1 < heapSize) {
    smallestChild = (java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_leftChild_0 = 2 * node + 1 , java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_rightChild_0 = java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_leftChild_0 + 1 , java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_smallestChild_0 = java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_leftChild_0 , java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_rightChild_0 < heapSize && java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_rightChild_0), java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_leftChild_0)) < 0 && (java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_smallestChild_0 = java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_rightChild_0) , java_util_PriorityQueue_$getSmallestChild__Ljava_util_PriorityQueue_2III_smallestChild_0);
    if (java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(value_0, java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, smallestChild)) < 0) {
      break;
    }
    java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_PriorityQueue_heap, node, java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, smallestChild));
    node = smallestChild;
  }
  java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_PriorityQueue_heap, node, value_0);
}

function java_util_PriorityQueue_$offer__Ljava_util_PriorityQueue_2Ljava_lang_Object_2Z(this$static, e){
  var childNode, node;
  node = this$static.java_util_PriorityQueue_heap.java_util_ArrayList_array.length;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.java_util_PriorityQueue_heap, e);
  while (node > 0) {
    childNode = node;
    node = ~~((node - 1) / 2);
    if (java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, node), e) <= 0) {
      java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_PriorityQueue_heap, childNode, e);
      return true;
    }
    java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_PriorityQueue_heap, childNode, java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, node));
  }
  java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_PriorityQueue_heap, node, e);
  return true;
}

function java_util_PriorityQueue_$poll__Ljava_util_PriorityQueue_2Ljava_lang_Object_2(this$static){
  var value_0;
  if (this$static.java_util_PriorityQueue_heap.java_util_ArrayList_array.length == 0) {
    return null;
  }
  value_0 = java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, 0);
  java_util_PriorityQueue_$removeAtIndex__Ljava_util_PriorityQueue_2IV(this$static, 0);
  return value_0;
}

function java_util_PriorityQueue_$removeAtIndex__Ljava_util_PriorityQueue_2IV(this$static, index_0){
  var lastValue;
  lastValue = java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.java_util_PriorityQueue_heap, this$static.java_util_PriorityQueue_heap.java_util_ArrayList_array.length - 1);
  if (index_0 < this$static.java_util_PriorityQueue_heap.java_util_ArrayList_array.length) {
    java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_PriorityQueue_heap, index_0, lastValue);
    java_util_PriorityQueue_$mergeHeaps__Ljava_util_PriorityQueue_2IV(this$static, index_0);
  }
}

function java_util_PriorityQueue_PriorityQueue__V(){
  java_util_PriorityQueue_PriorityQueue__ILjava_util_Comparator_2V.call(this, null);
}

function java_util_PriorityQueue_PriorityQueue__ILjava_util_Comparator_2V(cmp){
  this.java_util_PriorityQueue_heap = new java_util_ArrayList_ArrayList__IV(11);
  !cmp && (cmp = (java_util_Comparators_$clinit__V() , java_util_Comparators_$clinit__V() , java_util_Comparators_NATURAL));
  this.java_util_PriorityQueue_cmp = cmp;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(162, 293, $intern_21, java_util_PriorityQueue_PriorityQueue__V);
_.addAll__Ljava_util_Collection_2Z = function java_util_PriorityQueue_addAll__Ljava_util_Collection_2Z(c){
  if (java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(this.java_util_PriorityQueue_heap, c)) {
    java_util_PriorityQueue_$makeHeap__Ljava_util_PriorityQueue_2IV(this, 0);
    return true;
  }
  return false;
}
;
_.contains__Ljava_lang_Object_2Z = function java_util_PriorityQueue_contains__Ljava_lang_Object_2Z(o){
  return java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(this.java_util_PriorityQueue_heap, o, 0) != -1;
}
;
_.containsAll__Ljava_util_Collection_2Z = function java_util_PriorityQueue_containsAll__Ljava_util_Collection_2Z(c){
  return java_util_AbstractCollection_$containsAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this.java_util_PriorityQueue_heap, c);
}
;
_.isEmpty__Z = function java_util_PriorityQueue_isEmpty__Z(){
  return this.java_util_PriorityQueue_heap.java_util_ArrayList_array.length == 0;
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_PriorityQueue_iterator__Ljava_util_Iterator_2(){
  return java_util_Collections_unmodifiableList__Ljava_util_List_2Ljava_util_List_2(this.java_util_PriorityQueue_heap).iterator__Ljava_util_Iterator_2();
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_PriorityQueue_remove__Ljava_lang_Object_2Z(o){
  var index_0;
  index_0 = java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(this.java_util_PriorityQueue_heap, o, 0);
  if (index_0 < 0) {
    return false;
  }
  java_util_PriorityQueue_$removeAtIndex__Ljava_util_PriorityQueue_2IV(this, index_0);
  return true;
}
;
_.size__I = function java_util_PriorityQueue_size__I(){
  return this.java_util_PriorityQueue_heap.java_util_ArrayList_array.length;
}
;
_.toArray___3Ljava_lang_Object_2 = function java_util_PriorityQueue_toArray___3Ljava_lang_Object_2(){
  return java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2(this.java_util_PriorityQueue_heap);
}
;
_.toArray___3Ljava_lang_Object_2_3Ljava_lang_Object_2 = function java_util_PriorityQueue_toArray___3Ljava_lang_Object_2_3Ljava_lang_Object_2(a){
  return java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.java_util_PriorityQueue_heap, a);
}
;
_.toString__Ljava_lang_String_2$ = function java_util_PriorityQueue_toString__Ljava_lang_String_2(){
  return java_util_AbstractCollection_$toString__Ljava_util_AbstractCollection_2Ljava_lang_String_2(this.java_util_PriorityQueue_heap);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1PriorityQueue_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, $intern_26, 162);
function java_util_Random_$clinit__V(){
  java_util_Random_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  var i, i0, twoToTheXMinus24Tmp, twoToTheXMinus48Tmp;
  java_util_Random_twoToTheXMinus24 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 25, 7, 1);
  java_util_Random_twoToTheXMinus48 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 33, 7, 1);
  twoToTheXMinus48Tmp = $intern_18;
  for (i0 = 32; i0 >= 0; i0--) {
    java_util_Random_twoToTheXMinus48[i0] = twoToTheXMinus48Tmp;
    twoToTheXMinus48Tmp *= 0.5;
  }
  twoToTheXMinus24Tmp = 1;
  for (i = 24; i >= 0; i--) {
    java_util_Random_twoToTheXMinus24[i] = twoToTheXMinus24Tmp;
    twoToTheXMinus24Tmp *= 0.5;
  }
}

function java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static){
  return java_util_Random_$nextInternal__Ljava_util_Random_2ID(this$static, 26) * 1.4901161193847656E-8 + java_util_Random_$nextInternal__Ljava_util_Random_2ID(this$static, 27) * 1.1102230246251565E-16;
}

function java_util_Random_$nextInt__Ljava_util_Random_2II(this$static, n){
  var bits, val;
  com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalArgument__ZV(n > 0);
  if ((n & -n) == n) {
    return com_google_gwt_lang_Cast_round_1int__DI(n * java_util_Random_$nextInternal__Ljava_util_Random_2ID(this$static, 31) * 4.6566128730773926E-10);
  }
  do {
    bits = java_util_Random_$nextInternal__Ljava_util_Random_2ID(this$static, 31);
    val = bits % n;
  }
   while (bits - val + (n - 1) < 0);
  return com_google_gwt_lang_Cast_round_1int__DI(val);
}

function java_util_Random_$nextInternal__Ljava_util_Random_2ID(this$static, bits){
  var carry, dval, h, hi, l, lo;
  hi = this$static.java_util_Random_seedhi * $intern_27 + this$static.java_util_Random_seedlo * 1502;
  lo = this$static.java_util_Random_seedlo * $intern_27 + 11;
  carry = Math.floor(lo * $intern_28);
  hi += carry;
  lo -= carry * $intern_29;
  hi %= $intern_29;
  this$static.java_util_Random_seedhi = hi;
  this$static.java_util_Random_seedlo = lo;
  if (bits <= 24) {
    return java_lang_Math_floor__DD(this$static.java_util_Random_seedhi * java_util_Random_twoToTheXMinus24[bits]);
  }
   else {
    h = this$static.java_util_Random_seedhi * (1 << bits - 24);
    l = java_lang_Math_floor__DD(this$static.java_util_Random_seedlo * java_util_Random_twoToTheXMinus48[bits]);
    dval = h + l;
    dval >= 2147483648 && (dval -= 4294967296);
    return dval;
  }
}

function java_util_Random_$setSeed__Ljava_util_Random_2IIV(this$static){
  this$static.java_util_Random_seedhi = 1502;
  this$static.java_util_Random_seedlo = 15545120;
}

function java_util_Random_Random__V(){
  java_util_Random_$clinit__V();
  var hi, lo, seed;
  seed = java_util_Random_uniqueSeed++ + com_google_gwt_core_client_JsDate_now__D();
  hi = com_google_gwt_lang_Cast_round_1int__DI(Math.floor(seed * $intern_28)) & 16777215;
  lo = com_google_gwt_lang_Cast_round_1int__DI(seed - hi * $intern_29);
  this.java_util_Random_seedhi = hi ^ 1502;
  this.java_util_Random_seedlo = lo ^ $intern_27;
}

function java_util_Random_Random__JV(){
  java_util_Random_$clinit__V();
  this.java_util_Random_seedhi = 1502;
  this.java_util_Random_seedlo = 15525484;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(141, 1, {}, java_util_Random_Random__V, java_util_Random_Random__JV);
_.java_util_Random_seedhi = 0;
_.java_util_Random_seedlo = 0;
var java_util_Random_twoToTheXMinus24, java_util_Random_twoToTheXMinus48, java_util_Random_uniqueSeed = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Random_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'Random', 141);
function java_util_TreeMap_$getEntry__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this$static, key){
  var c, childNum, tree;
  tree = this$static.java_util_TreeMap_root;
  while (tree) {
    c = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(key, tree.java_util_AbstractMap$AbstractEntry_key);
    if (c == 0) {
      return tree;
    }
    childNum = c < 0?0:1;
    tree = tree.java_util_TreeMap$Node_child[childNum];
  }
  return null;
}

function java_util_TreeMap_$getFirstEntry__Ljava_util_TreeMap_2Ljava_util_Map$Entry_2(this$static){
  var nextNode, node;
  if (!this$static.java_util_TreeMap_root) {
    return null;
  }
  node = this$static.java_util_TreeMap_root;
  while (nextNode = node.java_util_TreeMap$Node_child[0]) {
    node = nextNode;
  }
  return node;
}

function java_util_TreeMap_$getNodeAfter__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_TreeMap$Node_2(this$static, key, inclusive){
  var c, foundNode, node;
  foundNode = null;
  node = this$static.java_util_TreeMap_root;
  while (node) {
    c = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(key, node.java_util_AbstractMap$AbstractEntry_key);
    if (inclusive && c == 0) {
      return node;
    }
    if (c >= 0) {
      node = node.java_util_TreeMap$Node_child[1];
    }
     else {
      foundNode = node;
      node = node.java_util_TreeMap$Node_child[0];
    }
  }
  return foundNode;
}

function java_util_TreeMap_$getNodeBefore__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_TreeMap$Node_2(this$static, key){
  var c, foundNode, node;
  foundNode = null;
  node = this$static.java_util_TreeMap_root;
  while (node) {
    c = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(key, node.java_util_AbstractMap$AbstractEntry_key);
    if (c <= 0) {
      node = node.java_util_TreeMap$Node_child[0];
    }
     else {
      foundNode = node;
      node = node.java_util_TreeMap$Node_child[1];
    }
  }
  return foundNode;
}

function java_util_TreeMap_$inOrderAdd__Ljava_util_TreeMap_2Ljava_util_List_2Ljava_util_TreeMap$SubMapType_2Ljava_util_TreeMap$Node_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$static, list, type_0, current, fromKey, fromInclusive, toKey, toInclusive){
  var leftNode, rightNode;
  if (!current) {
    return;
  }
  leftNode = current.java_util_TreeMap$Node_child[0];
  !!leftNode && java_util_TreeMap_$inOrderAdd__Ljava_util_TreeMap_2Ljava_util_List_2Ljava_util_TreeMap$SubMapType_2Ljava_util_TreeMap$Node_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$static, list, type_0, leftNode, fromKey, fromInclusive, toKey, toInclusive);
  java_util_TreeMap_$inRange__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2Ljava_lang_Object_2ZLjava_lang_Object_2ZZ(this$static, type_0, current.java_util_AbstractMap$AbstractEntry_key, fromKey, fromInclusive, toKey, toInclusive) && list.add__Ljava_lang_Object_2Z(current);
  rightNode = current.java_util_TreeMap$Node_child[1];
  !!rightNode && java_util_TreeMap_$inOrderAdd__Ljava_util_TreeMap_2Ljava_util_List_2Ljava_util_TreeMap$SubMapType_2Ljava_util_TreeMap$Node_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$static, list, type_0, rightNode, fromKey, fromInclusive, toKey, toInclusive);
}

function java_util_TreeMap_$inRange__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2Ljava_lang_Object_2ZLjava_lang_Object_2ZZ(this$static, type_0, key, fromKey, fromInclusive, toKey, toInclusive){
  var java_util_TreeMap_$smaller__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0, java_util_TreeMap_$larger__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0;
  if (type_0.fromKeyValid__Z() && (java_util_TreeMap_$smaller__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0 = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(key, fromKey) , java_util_TreeMap_$smaller__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0 < 0 || !fromInclusive && java_util_TreeMap_$smaller__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0 == 0)) {
    return false;
  }
  if (type_0.toKeyValid__Z() && (java_util_TreeMap_$larger__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0 = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(key, toKey) , java_util_TreeMap_$larger__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0 > 0 || !toInclusive && java_util_TreeMap_$larger__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2ZZ_compare_0 == 0)) {
    return false;
  }
  return true;
}

function java_util_TreeMap_$insert__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$State_2Ljava_util_TreeMap$Node_2(this$static, tree, newNode, state){
  var c, childNum;
  if (!tree) {
    return newNode;
  }
   else {
    c = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(newNode.java_util_AbstractMap$AbstractEntry_key, tree.java_util_AbstractMap$AbstractEntry_key);
    if (c == 0) {
      state.java_util_TreeMap$State_value = java_util_AbstractMap$AbstractEntry_$setValue__Ljava_util_AbstractMap$AbstractEntry_2Ljava_lang_Object_2Ljava_lang_Object_2(tree, newNode.java_util_AbstractMap$AbstractEntry_value);
      state.java_util_TreeMap$State_found = true;
      return tree;
    }
    childNum = c < 0?0:1;
    tree.java_util_TreeMap$Node_child[childNum] = java_util_TreeMap_$insert__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$State_2Ljava_util_TreeMap$Node_2(this$static, tree.java_util_TreeMap$Node_child[childNum], newNode, state);
    if (java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(tree.java_util_TreeMap$Node_child[childNum])) {
      if (java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(tree.java_util_TreeMap$Node_child[1 - childNum])) {
        tree.java_util_TreeMap$Node_isRed = true;
        tree.java_util_TreeMap$Node_child[0].java_util_TreeMap$Node_isRed = false;
        tree.java_util_TreeMap$Node_child[1].java_util_TreeMap$Node_isRed = false;
      }
       else {
        java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(tree.java_util_TreeMap$Node_child[childNum].java_util_TreeMap$Node_child[childNum])?(tree = java_util_TreeMap_$rotateSingle__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(tree, 1 - childNum)):java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(tree.java_util_TreeMap$Node_child[childNum].java_util_TreeMap$Node_child[1 - childNum]) && (tree = java_util_TreeMap_$rotateDouble__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(tree, 1 - childNum));
      }
    }
  }
  return tree;
}

function java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(node){
  return !!node && node.java_util_TreeMap$Node_isRed;
}

function java_util_TreeMap_$put__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, key, value_0){
  var node, state;
  node = new java_util_TreeMap$Node_TreeMap$Node__Ljava_lang_Object_2Ljava_lang_Object_2V(key, value_0);
  state = new java_util_TreeMap$State_TreeMap$State__V;
  this$static.java_util_TreeMap_root = java_util_TreeMap_$insert__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$State_2Ljava_util_TreeMap$Node_2(this$static, this$static.java_util_TreeMap_root, node, state);
  state.java_util_TreeMap$State_found || ++this$static.java_util_TreeMap_size;
  this$static.java_util_TreeMap_root.java_util_TreeMap$Node_isRed = false;
  return state.java_util_TreeMap$State_value;
}

function java_util_TreeMap_$remove__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, k){
  var state;
  state = new java_util_TreeMap$State_TreeMap$State__V;
  java_util_TreeMap_$removeWithState__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_util_TreeMap$State_2Z(this$static, k, state);
  return state.java_util_TreeMap$State_value;
}

function java_util_TreeMap_$removeEntry__Ljava_util_TreeMap_2Ljava_util_Map$Entry_2Z(this$static, entry){
  var state;
  state = new java_util_TreeMap$State_TreeMap$State__V;
  state.java_util_TreeMap$State_matchValue = true;
  state.java_util_TreeMap$State_value = entry.getValue__Ljava_lang_Object_2();
  return java_util_TreeMap_$removeWithState__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_util_TreeMap$State_2Z(this$static, entry.getKey__Ljava_lang_Object_2(), state);
}

function java_util_TreeMap_$removeWithState__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_util_TreeMap$State_2Z(this$static, key, state){
  var c, dir_0, dir2, found, grandparent, head, last, newNode, node, parent_0, sibling;
  if (!this$static.java_util_TreeMap_root) {
    return false;
  }
  found = null;
  parent_0 = null;
  head = new java_util_TreeMap$Node_TreeMap$Node__Ljava_lang_Object_2Ljava_lang_Object_2V(null, null);
  dir_0 = 1;
  head.java_util_TreeMap$Node_child[1] = this$static.java_util_TreeMap_root;
  node = head;
  while (node.java_util_TreeMap$Node_child[dir_0]) {
    last = dir_0;
    grandparent = parent_0;
    parent_0 = node;
    node = node.java_util_TreeMap$Node_child[dir_0];
    c = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(key, node.java_util_AbstractMap$AbstractEntry_key);
    dir_0 = c < 0?0:1;
    c == 0 && (!state.java_util_TreeMap$State_matchValue || java_util_Objects_equals__Ljava_lang_Object_2Ljava_lang_Object_2Z(node.java_util_AbstractMap$AbstractEntry_value, state.java_util_TreeMap$State_value)) && (found = node);
    if (!(!!node && node.java_util_TreeMap$Node_isRed) && !java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(node.java_util_TreeMap$Node_child[dir_0])) {
      if (java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(node.java_util_TreeMap$Node_child[1 - dir_0])) {
        parent_0 = parent_0.java_util_TreeMap$Node_child[last] = java_util_TreeMap_$rotateSingle__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(node, dir_0);
      }
       else if (!java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(node.java_util_TreeMap$Node_child[1 - dir_0])) {
        sibling = parent_0.java_util_TreeMap$Node_child[1 - last];
        if (sibling) {
          if (!java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(sibling.java_util_TreeMap$Node_child[1 - last]) && !java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(sibling.java_util_TreeMap$Node_child[last])) {
            parent_0.java_util_TreeMap$Node_isRed = false;
            sibling.java_util_TreeMap$Node_isRed = true;
            node.java_util_TreeMap$Node_isRed = true;
          }
           else {
            dir2 = grandparent.java_util_TreeMap$Node_child[1] == parent_0?1:0;
            java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(sibling.java_util_TreeMap$Node_child[last])?(grandparent.java_util_TreeMap$Node_child[dir2] = java_util_TreeMap_$rotateDouble__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(parent_0, last)):java_util_TreeMap_$isRed__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Z(sibling.java_util_TreeMap$Node_child[1 - last]) && (grandparent.java_util_TreeMap$Node_child[dir2] = java_util_TreeMap_$rotateSingle__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(parent_0, last));
            node.java_util_TreeMap$Node_isRed = grandparent.java_util_TreeMap$Node_child[dir2].java_util_TreeMap$Node_isRed = true;
            grandparent.java_util_TreeMap$Node_child[dir2].java_util_TreeMap$Node_child[0].java_util_TreeMap$Node_isRed = false;
            grandparent.java_util_TreeMap$Node_child[dir2].java_util_TreeMap$Node_child[1].java_util_TreeMap$Node_isRed = false;
          }
        }
      }
    }
  }
  if (found) {
    state.java_util_TreeMap$State_found = true;
    state.java_util_TreeMap$State_value = found.java_util_AbstractMap$AbstractEntry_value;
    if (node != found) {
      newNode = new java_util_TreeMap$Node_TreeMap$Node__Ljava_lang_Object_2Ljava_lang_Object_2V(node.java_util_AbstractMap$AbstractEntry_key, node.java_util_AbstractMap$AbstractEntry_value);
      java_util_TreeMap_$replaceNode__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$Node_2V(this$static, head, found, newNode);
      parent_0 == found && (parent_0 = newNode);
    }
    parent_0.java_util_TreeMap$Node_child[parent_0.java_util_TreeMap$Node_child[1] == node?1:0] = node.java_util_TreeMap$Node_child[!node.java_util_TreeMap$Node_child[0]?1:0];
    --this$static.java_util_TreeMap_size;
  }
  this$static.java_util_TreeMap_root = head.java_util_TreeMap$Node_child[1];
  !!this$static.java_util_TreeMap_root && (this$static.java_util_TreeMap_root.java_util_TreeMap$Node_isRed = false);
  return state.java_util_TreeMap$State_found;
}

function java_util_TreeMap_$replaceNode__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$Node_2Ljava_util_TreeMap$Node_2V(this$static, head, node, newNode){
  var direction, parent_0;
  parent_0 = head;
  direction = parent_0.java_util_AbstractMap$AbstractEntry_key == null || java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(node.java_util_AbstractMap$AbstractEntry_key, parent_0.java_util_AbstractMap$AbstractEntry_key) > 0?1:0;
  while (parent_0.java_util_TreeMap$Node_child[direction] != node) {
    parent_0 = parent_0.java_util_TreeMap$Node_child[direction];
    direction = java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(node.java_util_AbstractMap$AbstractEntry_key, parent_0.java_util_AbstractMap$AbstractEntry_key) > 0?1:0;
  }
  parent_0.java_util_TreeMap$Node_child[direction] = newNode;
  newNode.java_util_TreeMap$Node_isRed = node.java_util_TreeMap$Node_isRed;
  newNode.java_util_TreeMap$Node_child[0] = node.java_util_TreeMap$Node_child[0];
  newNode.java_util_TreeMap$Node_child[1] = node.java_util_TreeMap$Node_child[1];
  node.java_util_TreeMap$Node_child[0] = null;
  node.java_util_TreeMap$Node_child[1] = null;
}

function java_util_TreeMap_$rotateDouble__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(tree, rotateDirection){
  var otherChildDir;
  otherChildDir = 1 - rotateDirection;
  tree.java_util_TreeMap$Node_child[otherChildDir] = java_util_TreeMap_$rotateSingle__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(tree.java_util_TreeMap$Node_child[otherChildDir], otherChildDir);
  return java_util_TreeMap_$rotateSingle__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(tree, rotateDirection);
}

function java_util_TreeMap_$rotateSingle__Ljava_util_TreeMap_2Ljava_util_TreeMap$Node_2ILjava_util_TreeMap$Node_2(tree, rotateDirection){
  var otherChildDir, save;
  otherChildDir = 1 - rotateDirection;
  save = tree.java_util_TreeMap$Node_child[otherChildDir];
  tree.java_util_TreeMap$Node_child[otherChildDir] = save.java_util_TreeMap$Node_child[rotateDirection];
  save.java_util_TreeMap$Node_child[rotateDirection] = tree;
  tree.java_util_TreeMap$Node_isRed = true;
  save.java_util_TreeMap$Node_isRed = false;
  return save;
}

function java_util_TreeMap_$subMap__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2(this$static, fromKey, fromInclusive, toKey, toInclusive){
  return new java_util_TreeMap$SubMap_TreeMap$SubMap__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$static, (java_util_TreeMap$SubMapType_$clinit__V() , java_util_TreeMap$SubMapType_Range), fromKey, fromInclusive, toKey, toInclusive);
}

function java_util_TreeMap_$tailMap__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_NavigableMap_2(this$static, fromKey, inclusive){
  return new java_util_TreeMap$SubMap_TreeMap$SubMap__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$static, (java_util_TreeMap$SubMapType_$clinit__V() , java_util_TreeMap$SubMapType_Tail), fromKey, inclusive, null, false);
}

function java_util_TreeMap_TreeMap__V(){
  java_util_TreeMap_TreeMap__Ljava_util_Comparator_2V.call(this, null);
}

function java_util_TreeMap_TreeMap__Ljava_util_Comparator_2V(c){
  this.java_util_TreeMap_root = null;
  !c && (c = (java_util_Comparators_$clinit__V() , java_util_Comparators_$clinit__V() , java_util_Comparators_NATURAL));
  this.java_util_TreeMap_cmp = c;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(176, 302, {5:1, 94:1}, java_util_TreeMap_TreeMap__V);
_.package_private$java_util_AbstractNavigableMap$entryIterator__Ljava_util_Iterator_2 = function java_util_TreeMap_entryIterator__Ljava_util_Iterator_2(){
  return new java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2V(this);
}
;
_.entrySet__Ljava_util_Set_2 = function java_util_TreeMap_entrySet__Ljava_util_Set_2(){
  return new java_util_TreeMap$EntrySet_TreeMap$EntrySet__Ljava_util_TreeMap_2V(this);
}
;
_.package_private$java_util_AbstractNavigableMap$getEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2 = function java_util_TreeMap_getEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(key){
  return java_util_TreeMap_$getEntry__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this, key);
}
;
_.package_private$java_util_AbstractNavigableMap$getFirstEntry__Ljava_util_Map$Entry_2 = function java_util_TreeMap_getFirstEntry__Ljava_util_Map$Entry_2(){
  return java_util_TreeMap_$getFirstEntry__Ljava_util_TreeMap_2Ljava_util_Map$Entry_2(this);
}
;
_.package_private$java_util_AbstractNavigableMap$getLowerEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2 = function java_util_TreeMap_getLowerEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(key){
  return java_util_TreeMap_$getNodeBefore__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_TreeMap$Node_2(this, key);
}
;
_.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_TreeMap_put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(key, value_0){
  return java_util_TreeMap_$put__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this, key, value_0);
}
;
_.remove__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_TreeMap_remove__Ljava_lang_Object_2Ljava_lang_Object_2(k){
  return java_util_TreeMap_$remove__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this, k);
}
;
_.package_private$java_util_AbstractNavigableMap$removeEntry__Ljava_util_Map$Entry_2Z = function java_util_TreeMap_removeEntry__Ljava_util_Map$Entry_2Z(entry){
  return java_util_TreeMap_$removeEntry__Ljava_util_TreeMap_2Ljava_util_Map$Entry_2Z(this, entry);
}
;
_.size__I = function java_util_TreeMap_size__I(){
  return this.java_util_TreeMap_size;
}
;
_.subMap__Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2 = function java_util_TreeMap_subMap__Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2(fromKey, fromInclusive, toKey, toInclusive){
  return java_util_TreeMap_$subMap__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2(this, fromKey, fromInclusive, toKey, toInclusive);
}
;
_.tailMap__Ljava_lang_Object_2ZLjava_util_NavigableMap_2 = function java_util_TreeMap_tailMap__Ljava_lang_Object_2ZLjava_util_NavigableMap_2(fromKey, inclusive){
  return java_util_TreeMap_$tailMap__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_NavigableMap_2(this, fromKey, inclusive);
}
;
_.java_util_TreeMap_size = 0;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeMap', 176);
function java_util_TreeMap$EntryIterator_$next__Ljava_util_TreeMap$EntryIterator_2Ljava_lang_Object_2(this$static){
  return this$static.java_util_TreeMap$EntryIterator_last = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_TreeMap$EntryIterator_iter.next__Ljava_lang_Object_2(), 45);
}

function java_util_TreeMap$EntryIterator_$remove__Ljava_util_TreeMap$EntryIterator_2V(this$static){
  this$static.java_util_TreeMap$EntryIterator_iter.remove__V();
  java_util_TreeMap_$removeEntry__Ljava_util_TreeMap_2Ljava_util_Map$Entry_2Z(this$static.java_util_TreeMap$EntryIterator_this$01, this$static.java_util_TreeMap$EntryIterator_last);
  this$static.java_util_TreeMap$EntryIterator_last = null;
}

function java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2V(this$0){
  java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV.call(this, this$0, (java_util_TreeMap$SubMapType_$clinit__V() , java_util_TreeMap$SubMapType_All), null, false, null, false);
}

function java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$0, type_0, fromKey, fromInclusive, toKey, toInclusive){
  var list;
  this.java_util_TreeMap$EntryIterator_this$01 = this$0;
  list = new java_util_ArrayList_ArrayList__V;
  java_util_TreeMap_$inOrderAdd__Ljava_util_TreeMap_2Ljava_util_List_2Ljava_util_TreeMap$SubMapType_2Ljava_util_TreeMap$Node_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$0, list, type_0, this$0.java_util_TreeMap_root, fromKey, fromInclusive, toKey, toInclusive);
  this.java_util_TreeMap$EntryIterator_iter = new java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(list, 0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(142, 1, {}, java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2V, java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV);
_.hasNext__Z = function java_util_TreeMap$EntryIterator_hasNext__Z(){
  return this.java_util_TreeMap$EntryIterator_iter.hasNext__Z();
}
;
_.next__Ljava_lang_Object_2 = function java_util_TreeMap$EntryIterator_next__Ljava_lang_Object_2(){
  return java_util_TreeMap$EntryIterator_$next__Ljava_util_TreeMap$EntryIterator_2Ljava_lang_Object_2(this);
}
;
_.remove__V = function java_util_TreeMap$EntryIterator_remove__V(){
  java_util_TreeMap$EntryIterator_$remove__Ljava_util_TreeMap$EntryIterator_2V(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$EntryIterator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeMap/EntryIterator', 142);
function java_util_TreeMap$EntrySet_TreeMap$EntrySet__Ljava_util_TreeMap_2V(this$0){
  java_util_AbstractNavigableMap$EntrySet_AbstractNavigableMap$EntrySet__Ljava_util_AbstractNavigableMap_2V.call(this, this$0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(250, 159, $intern_24, java_util_TreeMap$EntrySet_TreeMap$EntrySet__Ljava_util_TreeMap_2V);
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$EntrySet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeMap/EntrySet', 250);
function java_util_TreeMap$Node_TreeMap$Node__Ljava_lang_Object_2Ljava_lang_Object_2V(key, value_0){
  java_util_AbstractMap$SimpleEntry_AbstractMap$SimpleEntry__Ljava_lang_Object_2Ljava_lang_Object_2V.call(this, key, value_0);
  this.java_util_TreeMap$Node_child = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$Node_12_1classLit, $intern_14, 115, 2, 0, 1);
  this.java_util_TreeMap$Node_isRed = true;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(115, 98, {118:1, 98:1, 45:1, 115:1}, java_util_TreeMap$Node_TreeMap$Node__Ljava_lang_Object_2Ljava_lang_Object_2V);
_.java_util_TreeMap$Node_isRed = false;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$Node_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeMap/Node', 115);
function java_util_TreeMap$State_TreeMap$State__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(160, 1, {}, java_util_TreeMap$State_TreeMap$State__V);
_.toString__Ljava_lang_String_2$ = function java_util_TreeMap$State_toString__Ljava_lang_String_2(){
  return 'State: mv=' + this.java_util_TreeMap$State_matchValue + ' value=' + this.java_util_TreeMap$State_value + ' done=' + this.java_util_TreeMap$State_done + ' found=' + this.java_util_TreeMap$State_found;
}
;
_.java_util_TreeMap$State_done = false;
_.java_util_TreeMap$State_found = false;
_.java_util_TreeMap$State_matchValue = false;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$State_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeMap/State', 160);
function java_util_TreeMap$SubMap_$getFirstEntry__Ljava_util_TreeMap$SubMap_2Ljava_util_Map$Entry_2(this$static){
  var entry;
  this$static.java_util_TreeMap$SubMap_type.fromKeyValid__Z()?this$static.java_util_TreeMap$SubMap_fromInclusive?(entry = java_util_TreeMap_$getNodeAfter__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_TreeMap$Node_2(this$static.java_util_TreeMap$SubMap_this$01, this$static.java_util_TreeMap$SubMap_fromKey, true)):(entry = java_util_TreeMap_$getNodeAfter__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_TreeMap$Node_2(this$static.java_util_TreeMap$SubMap_this$01, this$static.java_util_TreeMap$SubMap_fromKey, false)):(entry = java_util_TreeMap_$getFirstEntry__Ljava_util_TreeMap_2Ljava_util_Map$Entry_2(this$static.java_util_TreeMap$SubMap_this$01));
  return !!entry && java_util_TreeMap$SubMap_$inRange__Ljava_util_TreeMap$SubMap_2Ljava_lang_Object_2Z(this$static, entry.java_util_AbstractMap$AbstractEntry_key)?entry:null;
}

function java_util_TreeMap$SubMap_$guardInRange__Ljava_util_TreeMap$SubMap_2Ljava_util_Map$Entry_2Ljava_util_Map$Entry_2(this$static, entry){
  return !!entry && java_util_TreeMap$SubMap_$inRange__Ljava_util_TreeMap$SubMap_2Ljava_lang_Object_2Z(this$static, entry.java_util_AbstractMap$AbstractEntry_key)?entry:null;
}

function java_util_TreeMap$SubMap_$inRange__Ljava_util_TreeMap$SubMap_2Ljava_lang_Object_2Z(this$static, key){
  return java_util_TreeMap_$inRange__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2Ljava_lang_Object_2ZLjava_lang_Object_2ZZ(this$static.java_util_TreeMap$SubMap_this$01, this$static.java_util_TreeMap$SubMap_type, key, this$static.java_util_TreeMap$SubMap_fromKey, this$static.java_util_TreeMap$SubMap_fromInclusive, this$static.java_util_TreeMap$SubMap_toKey, this$static.java_util_TreeMap$SubMap_toInclusive);
}

function java_util_TreeMap$SubMap_TreeMap$SubMap__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this$0, type_0, fromKey, fromInclusive, toKey, toInclusive){
  this.java_util_TreeMap$SubMap_this$01 = this$0;
  switch (type_0.java_lang_Enum_ordinal) {
    case 2:
      if (java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(toKey, fromKey) < 0) {
        throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_30 + toKey + $intern_31 + fromKey);
      }

      break;
    case 1:
      java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(toKey, toKey);
      break;
    case 3:
      java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(fromKey, fromKey);
  }
  this.java_util_TreeMap$SubMap_type = type_0;
  this.java_util_TreeMap$SubMap_fromKey = fromKey;
  this.java_util_TreeMap$SubMap_fromInclusive = fromInclusive;
  this.java_util_TreeMap$SubMap_toKey = toKey;
  this.java_util_TreeMap$SubMap_toInclusive = toInclusive;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(177, 302, $intern_23, java_util_TreeMap$SubMap_TreeMap$SubMap__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV);
_.package_private$java_util_AbstractNavigableMap$entryIterator__Ljava_util_Iterator_2 = function java_util_TreeMap$SubMap_entryIterator__Ljava_util_Iterator_2(){
  return new java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this.java_util_TreeMap$SubMap_this$01, this.java_util_TreeMap$SubMap_type, this.java_util_TreeMap$SubMap_fromKey, this.java_util_TreeMap$SubMap_fromInclusive, this.java_util_TreeMap$SubMap_toKey, this.java_util_TreeMap$SubMap_toInclusive);
}
;
_.entrySet__Ljava_util_Set_2 = function java_util_TreeMap$SubMap_entrySet__Ljava_util_Set_2(){
  return new java_util_TreeMap$SubMap$1_TreeMap$SubMap$1__Ljava_util_TreeMap$SubMap_2Ljava_util_AbstractNavigableMap_2V(this, this);
}
;
_.package_private$java_util_AbstractNavigableMap$getEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2 = function java_util_TreeMap$SubMap_getEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(key){
  return java_util_TreeMap$SubMap_$guardInRange__Ljava_util_TreeMap$SubMap_2Ljava_util_Map$Entry_2Ljava_util_Map$Entry_2(this, java_util_TreeMap_$getEntry__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_util_Map$Entry_2(this.java_util_TreeMap$SubMap_this$01, key));
}
;
_.package_private$java_util_AbstractNavigableMap$getFirstEntry__Ljava_util_Map$Entry_2 = function java_util_TreeMap$SubMap_getFirstEntry__Ljava_util_Map$Entry_2(){
  return java_util_TreeMap$SubMap_$getFirstEntry__Ljava_util_TreeMap$SubMap_2Ljava_util_Map$Entry_2(this);
}
;
_.package_private$java_util_AbstractNavigableMap$getLowerEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2 = function java_util_TreeMap$SubMap_getLowerEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(key){
  return java_util_TreeMap$SubMap_$guardInRange__Ljava_util_TreeMap$SubMap_2Ljava_util_Map$Entry_2Ljava_util_Map$Entry_2(this, java_util_TreeMap_$getNodeBefore__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_TreeMap$Node_2(this.java_util_TreeMap$SubMap_this$01, key));
}
;
_.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_TreeMap$SubMap_put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(key, value_0){
  if (!java_util_TreeMap_$inRange__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2Ljava_lang_Object_2ZLjava_lang_Object_2ZZ(this.java_util_TreeMap$SubMap_this$01, this.java_util_TreeMap$SubMap_type, key, this.java_util_TreeMap$SubMap_fromKey, this.java_util_TreeMap$SubMap_fromInclusive, this.java_util_TreeMap$SubMap_toKey, this.java_util_TreeMap$SubMap_toInclusive)) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V(key + ' outside the range ' + this.java_util_TreeMap$SubMap_fromKey + ' to ' + this.java_util_TreeMap$SubMap_toKey);
  }
  return java_util_TreeMap_$put__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_TreeMap$SubMap_this$01, key, value_0);
}
;
_.remove__Ljava_lang_Object_2Ljava_lang_Object_2 = function java_util_TreeMap$SubMap_remove__Ljava_lang_Object_2Ljava_lang_Object_2(k){
  if (!java_util_TreeMap_$inRange__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2Ljava_lang_Object_2ZLjava_lang_Object_2ZZ(this.java_util_TreeMap$SubMap_this$01, this.java_util_TreeMap$SubMap_type, k, this.java_util_TreeMap$SubMap_fromKey, this.java_util_TreeMap$SubMap_fromInclusive, this.java_util_TreeMap$SubMap_toKey, this.java_util_TreeMap$SubMap_toInclusive)) {
    return null;
  }
  return java_util_TreeMap_$remove__Ljava_util_TreeMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this.java_util_TreeMap$SubMap_this$01, k);
}
;
_.package_private$java_util_AbstractNavigableMap$removeEntry__Ljava_util_Map$Entry_2Z = function java_util_TreeMap$SubMap_removeEntry__Ljava_util_Map$Entry_2Z(entry){
  return java_util_TreeMap$SubMap_$inRange__Ljava_util_TreeMap$SubMap_2Ljava_lang_Object_2Z(this, entry.getKey__Ljava_lang_Object_2()) && java_util_TreeMap_$removeEntry__Ljava_util_TreeMap_2Ljava_util_Map$Entry_2Z(this.java_util_TreeMap$SubMap_this$01, entry);
}
;
_.size__I = function java_util_TreeMap$SubMap_size__I(){
  var count, it;
  count = 0;
  for (it = new java_util_TreeMap$EntryIterator_TreeMap$EntryIterator__Ljava_util_TreeMap_2Ljava_util_TreeMap$SubMapType_2Ljava_lang_Object_2ZLjava_lang_Object_2ZV(this.java_util_TreeMap$SubMap_this$01, this.java_util_TreeMap$SubMap_type, this.java_util_TreeMap$SubMap_fromKey, this.java_util_TreeMap$SubMap_fromInclusive, this.java_util_TreeMap$SubMap_toKey, this.java_util_TreeMap$SubMap_toInclusive); it.java_util_TreeMap$EntryIterator_iter.hasNext__Z(); it.java_util_TreeMap$EntryIterator_last = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_TreeMap$EntryIterator_iter.next__Ljava_lang_Object_2(), 45)) {
    ++count;
  }
  return count;
}
;
_.subMap__Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2 = function java_util_TreeMap$SubMap_subMap__Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2(newFromKey, newFromInclusive, newToKey, newToInclusive){
  if (this.java_util_TreeMap$SubMap_type.fromKeyValid__Z() && java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(newFromKey, this.java_util_TreeMap$SubMap_fromKey) < 0) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_30 + newFromKey + $intern_31 + this.java_util_TreeMap$SubMap_fromKey);
  }
  if (this.java_util_TreeMap$SubMap_type.toKeyValid__Z() && java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(newToKey, this.java_util_TreeMap$SubMap_toKey) > 0) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_30 + newToKey + ' greater than ' + this.java_util_TreeMap$SubMap_toKey);
  }
  return java_util_TreeMap_$subMap__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2(this.java_util_TreeMap$SubMap_this$01, newFromKey, newFromInclusive, newToKey, newToInclusive);
}
;
_.tailMap__Ljava_lang_Object_2ZLjava_util_NavigableMap_2 = function java_util_TreeMap$SubMap_tailMap__Ljava_lang_Object_2ZLjava_util_NavigableMap_2(fromKey, fromInclusive){
  if (this.java_util_TreeMap$SubMap_type.fromKeyValid__Z() && java_util_Comparators$1_$compare__Ljava_util_Comparators$1_2Ljava_lang_Object_2Ljava_lang_Object_2I(fromKey, this.java_util_TreeMap$SubMap_fromKey) < 0) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_30 + fromKey + $intern_31 + this.java_util_TreeMap$SubMap_fromKey);
  }
  return this.java_util_TreeMap$SubMap_type.toKeyValid__Z()?java_util_TreeMap_$subMap__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2(this.java_util_TreeMap$SubMap_this$01, fromKey, fromInclusive, this.java_util_TreeMap$SubMap_toKey, this.java_util_TreeMap$SubMap_toInclusive):java_util_TreeMap_$tailMap__Ljava_util_TreeMap_2Ljava_lang_Object_2ZLjava_util_NavigableMap_2(this.java_util_TreeMap$SubMap_this$01, fromKey, fromInclusive);
}
;
_.java_util_TreeMap$SubMap_fromInclusive = false;
_.java_util_TreeMap$SubMap_toInclusive = false;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$SubMap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeMap/SubMap', 177);
function java_util_TreeMap$SubMap$1_TreeMap$SubMap$1__Ljava_util_TreeMap$SubMap_2Ljava_util_AbstractNavigableMap_2V(this$1, this$0){
  this.java_util_TreeMap$SubMap$1_this$11 = this$1;
  java_util_AbstractNavigableMap$EntrySet_AbstractNavigableMap$EntrySet__Ljava_util_AbstractNavigableMap_2V.call(this, this$0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(251, 159, $intern_24, java_util_TreeMap$SubMap$1_TreeMap$SubMap$1__Ljava_util_TreeMap$SubMap_2Ljava_util_AbstractNavigableMap_2V);
_.isEmpty__Z = function java_util_TreeMap$SubMap$1_isEmpty__Z(){
  return !java_util_TreeMap$SubMap_$getFirstEntry__Ljava_util_TreeMap$SubMap_2Ljava_util_Map$Entry_2(this.java_util_TreeMap$SubMap$1_this$11);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$SubMap$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeMap/SubMap/1', 251);
function java_util_TreeMap$SubMapType_$clinit__V(){
  java_util_TreeMap$SubMapType_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  java_util_TreeMap$SubMapType_All = new java_util_TreeMap$SubMapType_TreeMap$SubMapType__Ljava_lang_String_2IV('All', 0);
  java_util_TreeMap$SubMapType_Head = new java_util_TreeMap$SubMapType$1_TreeMap$SubMapType$1__Ljava_lang_String_2IV;
  java_util_TreeMap$SubMapType_Range = new java_util_TreeMap$SubMapType$2_TreeMap$SubMapType$2__Ljava_lang_String_2IV;
  java_util_TreeMap$SubMapType_Tail = new java_util_TreeMap$SubMapType$3_TreeMap$SubMapType$3__Ljava_lang_String_2IV;
}

function java_util_TreeMap$SubMapType_TreeMap$SubMapType__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function java_util_TreeMap$SubMapType_values___3Ljava_util_TreeMap$SubMapType_2(){
  java_util_TreeMap$SubMapType_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$SubMapType_12_1classLit, 1), $intern_32, 82, 0, [java_util_TreeMap$SubMapType_All, java_util_TreeMap$SubMapType_Head, java_util_TreeMap$SubMapType_Range, java_util_TreeMap$SubMapType_Tail]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(82, 36, $intern_33, java_util_TreeMap$SubMapType_TreeMap$SubMapType__Ljava_lang_String_2IV);
_.fromKeyValid__Z = function java_util_TreeMap$SubMapType_fromKeyValid__Z(){
  return false;
}
;
_.toKeyValid__Z = function java_util_TreeMap$SubMapType_toKeyValid__Z(){
  return false;
}
;
var java_util_TreeMap$SubMapType_All, java_util_TreeMap$SubMapType_Head, java_util_TreeMap$SubMapType_Range, java_util_TreeMap$SubMapType_Tail;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$SubMapType_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_22, 'TreeMap/SubMapType', 82, java_util_TreeMap$SubMapType_values___3Ljava_util_TreeMap$SubMapType_2);
function java_util_TreeMap$SubMapType$1_TreeMap$SubMapType$1__Ljava_lang_String_2IV(){
  java_util_TreeMap$SubMapType_TreeMap$SubMapType__Ljava_lang_String_2IV.call(this, 'Head', 1);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(252, 82, $intern_33, java_util_TreeMap$SubMapType$1_TreeMap$SubMapType$1__Ljava_lang_String_2IV);
_.toKeyValid__Z = function java_util_TreeMap$SubMapType$1_toKeyValid__Z(){
  return true;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$SubMapType$1_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_22, 'TreeMap/SubMapType/1', 252, null);
function java_util_TreeMap$SubMapType$2_TreeMap$SubMapType$2__Ljava_lang_String_2IV(){
  java_util_TreeMap$SubMapType_TreeMap$SubMapType__Ljava_lang_String_2IV.call(this, 'Range', 2);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(253, 82, $intern_33, java_util_TreeMap$SubMapType$2_TreeMap$SubMapType$2__Ljava_lang_String_2IV);
_.fromKeyValid__Z = function java_util_TreeMap$SubMapType$2_fromKeyValid__Z(){
  return true;
}
;
_.toKeyValid__Z = function java_util_TreeMap$SubMapType$2_toKeyValid__Z(){
  return true;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$SubMapType$2_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_22, 'TreeMap/SubMapType/2', 253, null);
function java_util_TreeMap$SubMapType$3_TreeMap$SubMapType$3__Ljava_lang_String_2IV(){
  java_util_TreeMap$SubMapType_TreeMap$SubMapType__Ljava_lang_String_2IV.call(this, 'Tail', 3);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(254, 82, $intern_33, java_util_TreeMap$SubMapType$3_TreeMap$SubMapType$3__Ljava_lang_String_2IV);
_.fromKeyValid__Z = function java_util_TreeMap$SubMapType$3_fromKeyValid__Z(){
  return true;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeMap$SubMapType$3_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_22, 'TreeMap/SubMapType/3', 254, null);
function java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(this$static, o){
  return this$static.java_util_TreeSet_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(o, (java_lang_Boolean_$clinit__V() , java_lang_Boolean_FALSE)) == null;
}

function java_util_TreeSet_$lower__Ljava_util_TreeSet_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static, e){
  return java_util_AbstractMap_getEntryKeyOrNull__Ljava_util_Map$Entry_2Ljava_lang_Object_2(this$static.java_util_TreeSet_map.package_private$java_util_AbstractNavigableMap$getLowerEntry__Ljava_lang_Object_2Ljava_util_Map$Entry_2(e));
}

function java_util_TreeSet_$subSet__Ljava_util_TreeSet_2Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableSet_2(this$static, fromElement, fromInclusive, toElement){
  return new java_util_TreeSet_TreeSet__Ljava_util_NavigableMap_2V(this$static.java_util_TreeSet_map.subMap__Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableMap_2(fromElement, fromInclusive, toElement, true));
}

function java_util_TreeSet_$tailSet__Ljava_util_TreeSet_2Ljava_lang_Object_2ZLjava_util_NavigableSet_2(this$static, fromElement, inclusive){
  return new java_util_TreeSet_TreeSet__Ljava_util_NavigableMap_2V(this$static.java_util_TreeSet_map.tailMap__Ljava_lang_Object_2ZLjava_util_NavigableMap_2(fromElement, inclusive));
}

function java_util_TreeSet_TreeSet__V(){
  this.java_util_TreeSet_map = new java_util_TreeMap_TreeMap__V;
}

function java_util_TreeSet_TreeSet__Ljava_util_NavigableMap_2V(map_0){
  this.java_util_TreeSet_map = map_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(105, 291, {5:1, 30:1, 56:1}, java_util_TreeSet_TreeSet__V, java_util_TreeSet_TreeSet__Ljava_util_NavigableMap_2V);
_.add__Ljava_lang_Object_2Z = function java_util_TreeSet_add__Ljava_lang_Object_2Z(o){
  return java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(this, o);
}
;
_.contains__Ljava_lang_Object_2Z = function java_util_TreeSet_contains__Ljava_lang_Object_2Z(o){
  return java_util_AbstractNavigableMap_$containsKey__Ljava_util_AbstractNavigableMap_2Ljava_lang_Object_2Z(this.java_util_TreeSet_map, o);
}
;
_.iterator__Ljava_util_Iterator_2 = function java_util_TreeSet_iterator__Ljava_util_Iterator_2(){
  return java_util_AbstractNavigableMap$NavigableKeySet_$iterator__Ljava_util_AbstractNavigableMap$NavigableKeySet_2Ljava_util_Iterator_2(new java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V(this.java_util_TreeSet_map));
}
;
_.remove__Ljava_lang_Object_2Z = function java_util_TreeSet_remove__Ljava_lang_Object_2Z(o){
  return this.java_util_TreeSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(o) != null;
}
;
_.size__I = function java_util_TreeSet_size__I(){
  return this.java_util_TreeSet_map.size__I();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1TreeSet_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_22, 'TreeSet', 105);
function lv_lumii_diagramlayout_IMCSDiagramLayout_$addBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JDDDDZ(this$static, boxId, x_0, y_0, w, h){
  var jBox, t;
  if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
    t = x_0;
    x_0 = y_0;
    y_0 = t;
    t = w;
    w = h;
    h = t;
  }
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY && (y_0 = -y_0);
  if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(boxId)) != null)
    return false;
  if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
    lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = true;
  }
  jBox = lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addBox__Llv_lumii_layoutengine_Diagram_2DDDDLlv_lumii_layoutengine_Box_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram, x_0, y_0, w, h);
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(boxId), jBox);
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = false;
  return true;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$addLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JJJLjava_lang_String_2IILjava_util_ArrayList_2Z(this$static, lineId, srcId, tgtId, lineType, startSides, endSides, points){
  var i, jLine, jPoints, jSrc, jTgt, p, t;
  if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId)) != null)
    return false;
  jSrc = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(srcId)), 16);
  jTgt = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(tgtId)), 16);
  if (!!jSrc && !!jTgt) {
    if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
      lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = true;
    }
    lineType == null && (lineType = $intern_34);
    if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_fastAdd && !!points) {
      jPoints = new java_util_ArrayList_ArrayList__V;
      for (i = 0; i < points.java_util_ArrayList_array.length; i++) {
        p = new java_awt_geom_Point2D$Double_Point2D$Double__V;
        java_awt_geom_Point2D_$setLocation__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V(p, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 67)));
        if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
          t = p.java_awt_geom_Point2D$Double_x;
          p.java_awt_geom_Point2D$Double_x = p.java_awt_geom_Point2D$Double_y;
          p.java_awt_geom_Point2D$Double_y = t;
        }
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY?(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - p.java_awt_geom_Point2D$Double_y):(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY + p.java_awt_geom_Point2D$Double_y);
        p.java_awt_geom_Point2D$Double_x = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX + p.java_awt_geom_Point2D$Double_x;
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(jPoints.java_util_ArrayList_array, jPoints.java_util_ArrayList_array.length, p);
      }
      try {
        jLine = lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addLineWithPoints__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Ljava_lang_String_2Ljava_util_ArrayList_2Llv_lumii_layoutengine_Line_2(jSrc, jTgt, lineType, jPoints);
        points = null;
      }
       catch ($e0) {
        $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
        if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25)) {
          jLine = lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Ljava_lang_String_2Llv_lumii_layoutengine_Line_2(jSrc, jTgt, lineType);
          points = null;
        }
         else 
          throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
      }
    }
     else {
      jLine = lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Ljava_lang_String_2Llv_lumii_layoutengine_Line_2(jSrc, jTgt, lineType);
    }
    (startSides <= 0 || startSides > 15) && (startSides = 15);
    (endSides <= 0 || endSides > 15) && (endSides = 15);
    if (startSides != 15) {
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
        t = startSides & 1;
        (startSides & 8) != 0?(startSides = startSides | 1):(startSides = startSides & 14);
        t != 0?(startSides = startSides | 8):(startSides = startSides & 7);
        t = startSides & 2;
        (startSides & 4) != 0?(startSides = startSides | 2):(startSides = startSides & 13);
        t != 0?(startSides = startSides | 4):(startSides = startSides & 11);
      }
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY) {
        t = startSides & 1;
        (startSides & 4) != 0?(startSides = startSides | 1):(startSides = startSides & 14);
        t != 0?(startSides = startSides | 4):(startSides = startSides & 11);
      }
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_fastAdd)
        lv_lumii_layoutengine_Line_$setStartSides__Llv_lumii_layoutengine_Line_2IV(jLine, startSides);
      else {
        lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        lv_lumii_layoutengine_Line_$setStartSides__Llv_lumii_layoutengine_Line_2IV(jLine, startSides);
        lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      }
    }
    if (endSides != 15) {
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
        t = endSides & 1;
        (endSides & 8) != 0?(endSides = endSides | 1):(endSides = endSides & 14);
        t != 0?(endSides = endSides | 8):(endSides = endSides & 7);
        t = endSides & 2;
        (endSides & 4) != 0?(endSides = endSides | 2):(endSides = endSides & 13);
        t != 0?(endSides = endSides | 4):(endSides = endSides & 11);
      }
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY) {
        t = endSides & 1;
        (endSides & 4) != 0?(endSides = endSides | 1):(endSides = endSides & 14);
        t != 0?(endSides = endSides | 4):(endSides = endSides & 11);
      }
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_fastAdd)
        lv_lumii_layoutengine_Line_$setEndSides__Llv_lumii_layoutengine_Line_2IV(jLine, endSides);
      else {
        lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        lv_lumii_layoutengine_Line_$setEndSides__Llv_lumii_layoutengine_Line_2IV(jLine, endSides);
        lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      }
    }
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId), jLine);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesInvMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jLine, java_lang_Long_valueOf__JLjava_lang_Long_2(lineId));
    if (points) {
      jPoints = new java_util_ArrayList_ArrayList__V;
      for (i = 0; i < points.java_util_ArrayList_array.length; i++) {
        p = new java_awt_geom_Point2D$Double_Point2D$Double__V;
        java_awt_geom_Point2D_$setLocation__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V(p, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 67)));
        if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
          t = p.java_awt_geom_Point2D$Double_x;
          p.java_awt_geom_Point2D$Double_x = p.java_awt_geom_Point2D$Double_y;
          p.java_awt_geom_Point2D$Double_y = t;
        }
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY?(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - p.java_awt_geom_Point2D$Double_y):(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY + p.java_awt_geom_Point2D$Double_y);
        p.java_awt_geom_Point2D$Double_x = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX + p.java_awt_geom_Point2D$Double_x;
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(jPoints.java_util_ArrayList_array, jPoints.java_util_ArrayList_array.length, p);
      }
      lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(jLine.lv_lumii_layoutengine_Element_diagram, jLine.lv_lumii_layoutengine_Line_startElement, jLine.lv_lumii_layoutengine_Line_endElement, (lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V() , lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS));
      lv_lumii_layoutengine_Diagram_$layoutSetLinePoints__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(jLine.lv_lumii_layoutengine_Element_diagram, jLine, jLine.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2(), jPoints);
    }
    if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_fastAdd) {
      if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine)
        if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
          lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
          lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        }
    }
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = true;
    return true;
  }
   else 
    return false;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$addLineLabel__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JJDDLjava_lang_String_2Z(this$static, labelId, lineId, w, h, placement){
  var jLabel, jLine, t;
  if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(labelId)) != null)
    return false;
  if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
    t = w;
    w = h;
    h = t;
  }
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = false;
  jLine = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId)), 10);
  if (jLine) {
    if (!jLine.lv_lumii_layoutengine_Line_lineGeometry) {
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
        lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false;
      }
    }
    if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
      lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = true;
    }
    jLabel = lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addLineLabel__Llv_lumii_layoutengine_Line_2DDLjava_lang_String_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2(jLine, w, h, placement);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(labelId), jLabel);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jLabel, java_lang_Long_valueOf__JLjava_lang_Long_2(labelId));
    return true;
  }
   else 
    return false;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$getEndBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_layoutengine_Line_2J(this$static, o){
  var b, i, i$iterator;
  for (i$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap)); i$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator), 51);
    b = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 16);
    if (lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(o) == b)
      return i.java_lang_Long_value;
  }
  return {l:$intern_8, m:$intern_8, h:$intern_9};
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$getLayout__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2(this$static){
  var coos, i, i$iterator, i$iterator0, i$iterator1, i$iterator2, i$iterator3, i$iterator4, i$iterator5, j, j0, jLabel, jLabels, labelId, line, n, o, point, points, retVal, retraced, t, x_0, y_0;
  retraced = false;
  for (i$iterator0 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap)); i$iterator0.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator0), 51);
    o = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 10);
    points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(o);
    if (!points) {
      lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(o, o.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2());
      lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false;
      points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(o);
      lv_lumii_diagramlayout_IMCSDiagramLayout_$moveLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JJJLjava_util_ArrayList_2Z(this$static, i.java_lang_Long_value, lv_lumii_diagramlayout_IMCSDiagramLayout_$getStartBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_layoutengine_Line_2J(this$static, o), lv_lumii_diagramlayout_IMCSDiagramLayout_$getEndBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_layoutengine_Line_2J(this$static, o), points);
      retraced = true;
    }
    if (o.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      try {
        lv_lumii_diagramlayout_IMCSDiagramLayout_validateOrthogonalPoints__Ljava_util_ArrayList_2V(points);
      }
       catch ($e0) {
        $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
        if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25)) {
          lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
          lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(o, o.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2());
          lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
          this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false;
          lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(o);
          retraced = true;
        }
         else 
          throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
      }
    }
  }
  if (retraced) {
    lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false;
    for (i$iterator1 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap)); i$iterator1.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator1), 51);
      o = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 10);
      points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(o);
      o.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL) && lv_lumii_diagramlayout_IMCSDiagramLayout_validateOrthogonalPoints__Ljava_util_ArrayList_2V(points);
    }
  }
  retVal = new lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_IMCSDiagramLayout$LayoutInfo__V;
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX = $intern_35;
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY = $intern_35;
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX = $intern_36;
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY = $intern_36;
  for (i$iterator2 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap)); i$iterator2.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator2), 51);
    o = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 16);
    x_0 = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_left)));
    y_0 = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_top)));
    x_0 < this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX = x_0);
    y_0 < this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY = y_0);
    x_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_right - o.lv_lumii_layoutengine_AbstractContainer_left))) > this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX = x_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_right - o.lv_lumii_layoutengine_AbstractContainer_left))));
    y_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_bottom - o.lv_lumii_layoutengine_AbstractContainer_top))) > this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY = y_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_bottom - o.lv_lumii_layoutengine_AbstractContainer_top))));
    coos = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(x_0, y_0, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_right - o.lv_lumii_layoutengine_AbstractContainer_left))), com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(o.lv_lumii_layoutengine_AbstractContainer_bottom - o.lv_lumii_layoutengine_AbstractContainer_top))));
    retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(i, coos);
  }
  for (i$iterator3 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap)); i$iterator3.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator3), 51);
    o = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 10);
    points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(o);
    if (!points) {
      lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(o, o.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2());
      points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(o);
    }
    n = points.java_util_ArrayList_array.length;
    line = new java_util_ArrayList_ArrayList__V;
    for (j0 = 0; j0 < n; j0++) {
      point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j0], 3));
      x_0 = point.java_awt_geom_Point2D$Double_x;
      y_0 = point.java_awt_geom_Point2D$Double_y;
      x_0 < this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX = x_0);
      y_0 < this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY = y_0);
      x_0 > this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX = x_0);
      y_0 > this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY = y_0);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(line, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, y_0));
    }
    jLabels = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(o.lv_lumii_layoutengine_Line_labels);
    n = jLabels.java_util_ArrayList_array.length;
    for (j = 0; j < n; j++) {
      jLabel = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, jLabels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(jLabels.java_util_ArrayList_array[j], 28));
      labelId = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(jLabel), 51).java_lang_Long_value;
      x_0 = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_left)));
      y_0 = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_top)));
      x_0 < this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX = x_0);
      y_0 < this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY = y_0);
      x_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_right - jLabel.lv_lumii_layoutengine_AbstractContainer_left))) > this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX = x_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_right - jLabel.lv_lumii_layoutengine_AbstractContainer_left))));
      y_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_bottom - jLabel.lv_lumii_layoutengine_AbstractContainer_top))) > this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY = y_0 + com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_bottom - jLabel.lv_lumii_layoutengine_AbstractContainer_top))));
      retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(labelId), new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(x_0, y_0, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_right - jLabel.lv_lumii_layoutengine_AbstractContainer_left))), com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jLabel.lv_lumii_layoutengine_AbstractContainer_bottom - jLabel.lv_lumii_layoutengine_AbstractContainer_top)))));
    }
    retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_lines.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(i, line);
  }
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX > $intern_15 && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX = 0);
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY > $intern_15 && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY = 0);
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX < -1000000000 && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX = 0);
  this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY < -1000000000 && (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY = 0);
  for (i$iterator4 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes)); i$iterator4.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator4), 51);
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX)));
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY?(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_height)))):(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY))));
    if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
      t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y = t;
      t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_width;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_width = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_height;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_height = t;
    }
  }
  for (i$iterator5 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_lines)); i$iterator5.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator5), 51);
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_lines.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 4);
    for (j = 0; j < line.java_util_ArrayList_array.length; j++) {
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX)));
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY?((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y)))):((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY))));
      if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
        t = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x;
        (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y;
        (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, line.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y = t;
      }
    }
  }
  for (i$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels)); i$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator), 51);
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX)));
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY?(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_height)))):(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY))));
    if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
      t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_x = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_y = t;
      t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_width;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_width = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_height;
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(retVal.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 22).java_awt_geom_Rectangle2D$Double_height = t;
    }
  }
  return retVal;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$getStartBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_layoutengine_Line_2J(this$static, o){
  var b, i, i$iterator;
  for (i$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap)); i$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    i = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(i$iterator), 51);
    b = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(i), 16);
    if (lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(o) == b)
      return i.java_lang_Long_value;
  }
  return {l:$intern_8, m:$intern_8, h:$intern_9};
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$moveBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JDDZ(this$static, boxId, newX, newY){
  var dx, dy, h, jBox, jPointVector, oldX, oldY, owner, t, lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2V_newCenter_0;
  jBox = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(boxId)), 16);
  if (jBox) {
    if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
      lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false;
    }
    if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
      lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = true;
    }
    h = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_bottom - jBox.lv_lumii_layoutengine_AbstractContainer_top)));
    if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
      t = newX;
      newX = newY;
      newY = t;
      h = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_right - jBox.lv_lumii_layoutengine_AbstractContainer_left)));
    }
    oldX = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_left)));
    oldY = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_top)));
    oldX = oldX - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX;
    oldY = oldY - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY;
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY && (newY = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY - newY - h);
    dx = newX - oldX;
    dy = newY - oldY;
    jPointVector = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(dx, dy);
    owner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(jBox.lv_lumii_layoutengine_Element_owner, 13);
    lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2V_newCenter_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((jBox.lv_lumii_layoutengine_AbstractContainer_left + jBox.lv_lumii_layoutengine_AbstractContainer_right) / 2, (jBox.lv_lumii_layoutengine_AbstractContainer_top + jBox.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2V_newCenter_0.java_awt_geom_Point2D$Double_x += jPointVector.java_awt_geom_Point2D$Double_x;
    lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2V_newCenter_0.java_awt_geom_Point2D$Double_y += jPointVector.java_awt_geom_Point2D$Double_y;
    lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Point2D$Double_2V(jBox, lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2V_newCenter_0, owner, lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2V_newCenter_0);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = false;
    return true;
  }
   else 
    return false;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$moveLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JJJLjava_util_ArrayList_2Z(this$static, lineId, srcId, tgtId, points){
  var h, hasLabels, i, i0, jLabel, jLabels, jLine, jPoints, jPrevSrc, jPrevTgt, jSrc, jTgt, labelId, n, newLabel, newLine, o, p, t, w;
  jLine = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId)), 10);
  jSrc = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(srcId)), 16);
  jTgt = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(tgtId)), 16);
  if (!!jLine && !!jSrc && !!jTgt) {
    jPrevSrc = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(jLine);
    jPrevTgt = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(jLine);
    if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
      lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = true;
    }
    jLabels = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(jLine.lv_lumii_layoutengine_Line_labels);
    n = jLabels.java_util_ArrayList_array.length;
    hasLabels = n > 0;
    if (hasLabels) {
      if (points) {
        jPoints = new java_util_ArrayList_ArrayList__V;
        for (i0 = 0; i0 < points.java_util_ArrayList_array.length; i0++) {
          p = new java_awt_geom_Point2D$Double_Point2D$Double__V;
          java_awt_geom_Point2D_$setLocation__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V(p, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 67)));
          if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
            t = p.java_awt_geom_Point2D$Double_x;
            p.java_awt_geom_Point2D$Double_x = p.java_awt_geom_Point2D$Double_y;
            p.java_awt_geom_Point2D$Double_y = t;
          }
          this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY?(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - p.java_awt_geom_Point2D$Double_y):(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY + p.java_awt_geom_Point2D$Double_y);
          p.java_awt_geom_Point2D$Double_x = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX + p.java_awt_geom_Point2D$Double_x;
          com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(jPoints.java_util_ArrayList_array, jPoints.java_util_ArrayList_array.length, p);
        }
        newLine = lv_lumii_layoutengine_Box_$connectTo__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Line$LineType_2DLjava_util_ArrayList_2ZLlv_lumii_layoutengine_Line_2(jPrevSrc, jPrevTgt, jLine.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2(), points);
      }
       else 
        newLine = lv_lumii_layoutengine_Box_$connectTo__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Line$LineType_2DLlv_lumii_layoutengine_Line_2(jPrevSrc, jPrevTgt, jLine.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2());
      for (i = 0; i < n; i++) {
        jLabel = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, jLabels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(jLabels.java_util_ArrayList_array[i], 28));
        w = jLabel.lv_lumii_layoutengine_AbstractContainer_right - jLabel.lv_lumii_layoutengine_AbstractContainer_left;
        h = jLabel.lv_lumii_layoutengine_AbstractContainer_bottom - jLabel.lv_lumii_layoutengine_AbstractContainer_top;
        p = jLabel.lv_lumii_layoutengine_OutsideLabel_position;
        o = jLabel.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation;
        newLabel = lv_lumii_layoutengine_Line_$createLabel__Llv_lumii_layoutengine_Line_2DDDLlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLlv_lumii_layoutengine_OutsideLabel$LineLabel_2(newLine, w, h, p, o);
        labelId = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(jLabel), 51);
        if (labelId) {
          this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(labelId);
          this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(jLabel);
        }
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(labelId, newLabel);
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newLabel, labelId);
      }
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId));
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesInvMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(jLine);
      lv_lumii_layoutengine_Line_$remove__Llv_lumii_layoutengine_Line_2ZV(jLine);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId), newLine);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesInvMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newLine, java_lang_Long_valueOf__JLjava_lang_Long_2(lineId));
    }
     else if (points) {
      jPoints = new java_util_ArrayList_ArrayList__V;
      for (i = 0; i < points.java_util_ArrayList_array.length; i++) {
        p = new java_awt_geom_Point2D$Double_Point2D$Double__V;
        java_awt_geom_Point2D_$setLocation__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V(p, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 67)));
        if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
          t = p.java_awt_geom_Point2D$Double_x;
          p.java_awt_geom_Point2D$Double_x = p.java_awt_geom_Point2D$Double_y;
          p.java_awt_geom_Point2D$Double_y = t;
        }
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY?(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY - p.java_awt_geom_Point2D$Double_y):(p.java_awt_geom_Point2D$Double_y = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minY + p.java_awt_geom_Point2D$Double_y);
        p.java_awt_geom_Point2D$Double_x = this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_minX + p.java_awt_geom_Point2D$Double_x;
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(jPoints.java_util_ArrayList_array, jPoints.java_util_ArrayList_array.length, p);
      }
      jSrc == jPrevSrc && jTgt == jPrevTgt?(lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(jLine.lv_lumii_layoutengine_Element_diagram, jLine.lv_lumii_layoutengine_Line_startElement, jLine.lv_lumii_layoutengine_Line_endElement, (lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V() , lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS)) , lv_lumii_layoutengine_Diagram_$layoutSetLinePoints__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(jLine.lv_lumii_layoutengine_Element_diagram, jLine, jLine.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2(), jPoints)):lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2ZV(jLine, jPoints, jSrc, jTgt);
    }
     else 
      lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2V(jLine, jLine.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2(), jSrc, jTgt);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = true;
    return true;
  }
   else 
    return false;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$removeBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JLjava_util_ArrayList_2(this$static, boxId){
  var i, jBox, jLine, jLines, lineId, n, retVal;
  jBox = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(boxId)), 16);
  if (jBox) {
    retVal = new java_util_ArrayList_ArrayList__V;
    jLines = lv_lumii_layoutengine_Box_$getIncidentLines__Llv_lumii_layoutengine_Box_2Ljava_util_ArrayList_2(jBox);
    n = jLines.java_util_ArrayList_array.length;
    for (i = 0; i < n; i++) {
      jLine = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, jLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(jLines.java_util_ArrayList_array[i], 10));
      lineId = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesInvMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(jLine), 51);
      !!lineId && !!lv_lumii_diagramlayout_IMCSDiagramLayout_$removeLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JLjava_util_ArrayList_2(this$static, lineId.java_lang_Long_value) && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(retVal.java_util_ArrayList_array, retVal.java_util_ArrayList_array.length, lineId) , true);
    }
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(boxId));
    lv_lumii_layoutengine_Element_$remove__Llv_lumii_layoutengine_Element_2ZV(jBox);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = false;
    return retVal;
  }
   else 
    return null;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$removeLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JLjava_util_ArrayList_2(this$static, lineId){
  var i, jLabel, jLabels, jLine, labelId, n, retVal;
  jLine = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId)), 10);
  if (jLine) {
    retVal = new java_util_ArrayList_ArrayList__V;
    jLabels = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(jLine.lv_lumii_layoutengine_Line_labels);
    n = jLabels.java_util_ArrayList_array.length;
    for (i = 0; i < n; i++) {
      jLabel = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, jLabels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(jLabels.java_util_ArrayList_array[i], 28));
      labelId = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(jLabel), 51);
      if (labelId) {
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(labelId);
        this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(jLabel);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(retVal.java_util_ArrayList_array, retVal.java_util_ArrayList_array.length, labelId);
      }
    }
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(lineId));
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_linesInvMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(jLine);
    lv_lumii_layoutengine_Line_$remove__Llv_lumii_layoutengine_Line_2ZV(jLine);
    this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = true;
    return retVal;
  }
   else 
    return null;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_$resizeBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JDDZ(this$static, boxId, w, h){
  var hh, jBox, jRect, t, ww, x_0, y_0, lv_lumii_layoutengine_Box_$resize__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Rectangle2D$Double_2V_minLength_0;
  jBox = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_lang_Long_valueOf__JLjava_lang_Long_2(boxId)), 16);
  if (jBox) {
    hh = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_bottom - jBox.lv_lumii_layoutengine_AbstractContainer_top)));
    ww = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_right - jBox.lv_lumii_layoutengine_AbstractContainer_left)));
    if ((hh - h <= 0?0 - (hh - h):hh - h) < $intern_37 && (ww - w <= 0?0 - (ww - w):ww - w) < $intern_37)
      return true;
    if (!this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
      lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
      this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = true;
    }
    if (this$static.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY) {
      t = w;
      w = h;
      h = t;
    }
    x_0 = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_left)));
    y_0 = com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(jBox.lv_lumii_layoutengine_AbstractContainer_top)));
    jRect = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(x_0, y_0, w, h);
    lv_lumii_layoutengine_Box_$resize__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Rectangle2D$Double_2V_minLength_0 = 10 * jBox.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
    jRect.java_awt_geom_Rectangle2D$Double_width < lv_lumii_layoutengine_Box_$resize__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Rectangle2D$Double_2V_minLength_0 && (jRect.java_awt_geom_Rectangle2D$Double_width = lv_lumii_layoutengine_Box_$resize__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Rectangle2D$Double_2V_minLength_0);
    jRect.java_awt_geom_Rectangle2D$Double_height < lv_lumii_layoutengine_Box_$resize__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Rectangle2D$Double_2V_minLength_0 && (jRect.java_awt_geom_Rectangle2D$Double_height = lv_lumii_layoutengine_Box_$resize__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Rectangle2D$Double_2V_minLength_0);
    lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2V(jBox.lv_lumii_layoutengine_Element_diagram);
    jBox.lv_lumii_layoutengine_AbstractContainer_userMinHeight = jRect.java_awt_geom_Rectangle2D$Double_height;
    jBox.lv_lumii_layoutengine_AbstractContainer_userMinWidth = jRect.java_awt_geom_Rectangle2D$Double_width;
    lv_lumii_layoutengine_Diagram_$layoutResizeRectangle__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(jBox.lv_lumii_layoutengine_Element_diagram, jBox, jRect);
    return true;
  }
   else 
    return false;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_IMCSDiagramLayout__Ljava_lang_String_2V(arrangeStyle){
  this.lv_lumii_diagramlayout_IMCSDiagramLayout_boxesMap = new java_util_HashMap_HashMap__V;
  this.lv_lumii_diagramlayout_IMCSDiagramLayout_linesMap = new java_util_HashMap_HashMap__V;
  this.lv_lumii_diagramlayout_IMCSDiagramLayout_linesInvMap = new java_util_HashMap_HashMap__V;
  this.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsMap = new java_util_HashMap_HashMap__V;
  this.lv_lumii_diagramlayout_IMCSDiagramLayout_lineLabelsInvMap = new java_util_HashMap_HashMap__V;
  if (arrangeStyle != null && (arrangeStyle.charCodeAt(0) == 72 || arrangeStyle.charCodeAt(0) == 86 || arrangeStyle.charCodeAt(0) == 73)) {
    this.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram = new lv_lumii_layoutengine_Diagram_Diagram__Ljava_awt_geom_Rectangle2D$Double_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2V(new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__V, (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_FLOW));
    arrangeStyle.charCodeAt(0) == 72 && (this.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY = true);
    if (arrangeStyle.charCodeAt(0) == 73) {
      this.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY = true;
      arrangeStyle.charCodeAt(8) == 72 && (this.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY = true);
    }
  }
   else 
    arrangeStyle != null && arrangeStyle.charCodeAt(0) == 83?(this.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram = new lv_lumii_layoutengine_Diagram_Diagram__Ljava_awt_geom_Rectangle2D$Double_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2V(new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__V, (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_SPRING_1EMBEDDED))):(this.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram = new lv_lumii_layoutengine_Diagram_Diagram__Ljava_awt_geom_Rectangle2D$Double_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2V(new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__V, (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_UNIVERSAL)));
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_getLineTypeFromString__Ljava_lang_String_2Llv_lumii_layoutengine_Line$LineType_2(lineType){
  var t;
  t = (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL);
  java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z('POLYLINE', lineType)?(t = lv_lumii_layoutengine_Line$LineType_POLYLINE):java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z('STRAIGHT', lineType) && (t = lv_lumii_layoutengine_Line$LineType_STRAIGHT);
  return t;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addBox__Llv_lumii_layoutengine_Diagram_2DDDDLlv_lumii_layoutengine_Box_2(d, x_0, y_0, w, h){
  var b;
  b = lv_lumii_layoutengine_Container_$createBox__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLjava_lang_Integer_2Ljava_lang_Integer_2Llv_lumii_layoutengine_Box_2(d, new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(x_0, y_0, w, h), (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED));
  return b;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Ljava_lang_String_2Llv_lumii_layoutengine_Line_2(src_0, tgt, lineType){
  var l, t;
  t = lv_lumii_diagramlayout_IMCSDiagramLayout_getLineTypeFromString__Ljava_lang_String_2Llv_lumii_layoutengine_Line$LineType_2(lineType);
  l = lv_lumii_layoutengine_Box_$connectTo__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Line$LineType_2DLlv_lumii_layoutengine_Line_2(src_0, tgt, t);
  return l;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addLineLabel__Llv_lumii_layoutengine_Line_2DDLjava_lang_String_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2(l, w, h, placement){
  var o, p;
  o = (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_COUNTERCLOCKWISE);
  p = 0.5;
  if (java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('start-left', placement)) {
    p = 0;
    o = lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_COUNTERCLOCKWISE;
  }
   else if (java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('start-right', placement)) {
    p = 0;
    o = lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CLOCKWISE;
  }
   else if (java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('end-left', placement)) {
    p = 1;
    o = lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_COUNTERCLOCKWISE;
  }
   else if (java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('end-right', placement)) {
    p = 1;
    o = lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CLOCKWISE;
  }
   else 
    java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('middle-left', placement)?(o = lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_COUNTERCLOCKWISE):java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('middle-right', placement) && (o = lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CLOCKWISE);
  return lv_lumii_layoutengine_Line_$createLabel__Llv_lumii_layoutengine_Line_2DDDLlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLlv_lumii_layoutengine_OutsideLabel$LineLabel_2(l, w, h, p, o);
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_private_1addLineWithPoints__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Ljava_lang_String_2Ljava_util_ArrayList_2Llv_lumii_layoutengine_Line_2(src_0, tgt, lineType, points){
  var first, l, last, t;
  t = lv_lumii_diagramlayout_IMCSDiagramLayout_getLineTypeFromString__Ljava_lang_String_2Llv_lumii_layoutengine_Line$LineType_2(lineType);
  t == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL) && lv_lumii_diagramlayout_IMCSDiagramLayout_validateOrthogonalPoints__Ljava_util_ArrayList_2V(points);
  first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
  last = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3);
  if (first.java_awt_geom_Point2D$Double_x >= src_0.lv_lumii_layoutengine_AbstractContainer_left - $intern_37 && first.java_awt_geom_Point2D$Double_x <= src_0.lv_lumii_layoutengine_AbstractContainer_right + $intern_37 && first.java_awt_geom_Point2D$Double_y >= src_0.lv_lumii_layoutengine_AbstractContainer_top - $intern_37 && first.java_awt_geom_Point2D$Double_y <= src_0.lv_lumii_layoutengine_AbstractContainer_bottom + $intern_37)
  ;
  else 
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V('Wrong line connection point: first point=' + first + '; source box=' + src_0.lv_lumii_layoutengine_AbstractContainer_left + ' ' + src_0.lv_lumii_layoutengine_AbstractContainer_right + ' ' + src_0.lv_lumii_layoutengine_AbstractContainer_top + ' ' + src_0.lv_lumii_layoutengine_AbstractContainer_bottom);
  if (last.java_awt_geom_Point2D$Double_x >= tgt.lv_lumii_layoutengine_AbstractContainer_left - $intern_37 && last.java_awt_geom_Point2D$Double_x <= tgt.lv_lumii_layoutengine_AbstractContainer_right + $intern_37 && last.java_awt_geom_Point2D$Double_y >= tgt.lv_lumii_layoutengine_AbstractContainer_top - $intern_37 && last.java_awt_geom_Point2D$Double_y <= tgt.lv_lumii_layoutengine_AbstractContainer_bottom + $intern_37)
  ;
  else 
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V('Wrong line connection point: last point=' + last + '; target box=' + tgt.lv_lumii_layoutengine_AbstractContainer_left + ' ' + tgt.lv_lumii_layoutengine_AbstractContainer_right + ' ' + tgt.lv_lumii_layoutengine_AbstractContainer_top + ' ' + tgt.lv_lumii_layoutengine_AbstractContainer_bottom);
  l = lv_lumii_layoutengine_Box_$connectTo__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Line$LineType_2DLjava_util_ArrayList_2ZLlv_lumii_layoutengine_Line_2(src_0, tgt, t, points);
  return l;
}

function lv_lumii_diagramlayout_IMCSDiagramLayout_validateOrthogonalPoints__Ljava_util_ArrayList_2V(points){
  var curr, it, prev;
  prev = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
  for (it = new java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(points, 1); it.hasNext__Z();) {
    curr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    if (curr.java_awt_geom_Point2D$Double_x != prev.java_awt_geom_Point2D$Double_x && curr.java_awt_geom_Point2D$Double_y != prev.java_awt_geom_Point2D$Double_y)
      throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V('Non-orthogonal points for orthogonal line: ' + prev + ' -> ' + curr);
    prev = curr;
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(295, 1, {}, lv_lumii_diagramlayout_IMCSDiagramLayout_IMCSDiagramLayout__Ljava_lang_String_2V);
_.addBox__DDDDDZ = function lv_lumii_diagramlayout_IMCSDiagramLayout_addBox__DDDDDZ(boxId, x_0, y_0, w, h){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$addBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JDDDDZ(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(boxId), x_0, y_0, w, h);
}
;
_.addLine__DDDLjava_lang_String_2IILjava_util_ArrayList_2Z = function lv_lumii_diagramlayout_IMCSDiagramLayout_addLine__DDDLjava_lang_String_2IILjava_util_ArrayList_2Z(lineId, srcId, tgtId, lineType, startSides, endSides, points){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$addLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JJJLjava_lang_String_2IILjava_util_ArrayList_2Z(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(lineId), com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(srcId), com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(tgtId), lineType, startSides, endSides, points);
}
;
_.addLineLabel__DDDDLjava_lang_String_2Z = function lv_lumii_diagramlayout_IMCSDiagramLayout_addLineLabel__DDDDLjava_lang_String_2Z(labelId, lineId, w, h, placement){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$addLineLabel__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JJDDLjava_lang_String_2Z(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(labelId), com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(lineId), w, h, placement);
}
;
_.arrangeFromScratch__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2 = function lv_lumii_diagramlayout_IMCSDiagramLayout_arrangeFromScratch__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2(){
  this.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted && (this.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false);
  lv_lumii_layoutengine_Diagram_$arrange__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$getLayout__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2(this);
}
;
_.arrangeIncrementally__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2 = function lv_lumii_diagramlayout_IMCSDiagramLayout_arrangeIncrementally__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2(){
  if (this.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted) {
    lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_diagramlayout_IMCSDiagramLayout_jDiagram);
    this.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false;
  }
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$getLayout__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2(this);
}
;
_.getLayout__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2 = function lv_lumii_diagramlayout_IMCSDiagramLayout_getLayout__Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2(){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$getLayout__Llv_lumii_diagramlayout_IMCSDiagramLayout_2Llv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_2(this);
}
;
_.moveBox__DDDZ = function lv_lumii_diagramlayout_IMCSDiagramLayout_moveBox__DDDZ(boxId, newX, newY){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$moveBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JDDZ(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(boxId), newX, newY);
}
;
_.moveLine__DDDLjava_util_ArrayList_2Z = function lv_lumii_diagramlayout_IMCSDiagramLayout_moveLine__DDDLjava_util_ArrayList_2Z(lineId, srcId, tgtId, points){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$moveLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JJJLjava_util_ArrayList_2Z(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(lineId), com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(srcId), com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(tgtId), points);
}
;
_.removeBox__DLjava_util_ArrayList_2 = function lv_lumii_diagramlayout_IMCSDiagramLayout_removeBox__DLjava_util_ArrayList_2(boxId){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$removeBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JLjava_util_ArrayList_2(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(boxId));
}
;
_.removeLine__DLjava_util_ArrayList_2 = function lv_lumii_diagramlayout_IMCSDiagramLayout_removeLine__DLjava_util_ArrayList_2(lineId){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$removeLine__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JLjava_util_ArrayList_2(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(lineId));
}
;
_.resizeBox__DDDZ = function lv_lumii_diagramlayout_IMCSDiagramLayout_resizeBox__DDDZ(boxId, w, h){
  return lv_lumii_diagramlayout_IMCSDiagramLayout_$resizeBox__Llv_lumii_diagramlayout_IMCSDiagramLayout_2JDDZ(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(boxId), w, h);
}
;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_fastAdd = true;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_inverseY = false;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_lastLine = false;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_maxX = 0;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_maxY = 0;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_minX = 0;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_minY = 0;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_transactionStarted = false;
_.lv_lumii_diagramlayout_IMCSDiagramLayout_transposeXY = false;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1diagramlayout_1IMCSDiagramLayout_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_38, 'IMCSDiagramLayout', 295);
function lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_IMCSDiagramLayout$LayoutInfo__V(){
  this.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_boxes = new java_util_HashMap_HashMap__V;
  this.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_lines = new java_util_HashMap_HashMap__V;
  this.lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_labels = new java_util_HashMap_HashMap__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(203, 1, {}, lv_lumii_diagramlayout_IMCSDiagramLayout$LayoutInfo_IMCSDiagramLayout$LayoutInfo__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1diagramlayout_1IMCSDiagramLayout$LayoutInfo_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_38, 'IMCSDiagramLayout/LayoutInfo', 203);
function lv_lumii_dialoglayout_IMCSDialogLayout_$getBoundsAndLayoutComponents__Llv_lumii_dialoglayout_IMCSDialogLayout_2ZIIV(this$static, needsResize, prefFormWidth, prefFormHeight){
  var bounds, eqo, group$iterator, n, solution;
  if (lv_lumii_dialoglayout_IMCSDialogLayout_inJavaScript__Z()) {
    if (lv_lumii_dialoglayout_IMCSDialogLayout_$notAllLoadedAndLayoutScheduled__Llv_lumii_dialoglayout_IMCSDialogLayout_2ZIIZ(this$static, needsResize, prefFormWidth, prefFormHeight))
      return;
  }
  bounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root);
  !bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_preW && (bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_preW = java_lang_Integer_valueOf__ILjava_lang_Integer_2(prefFormWidth));
  !bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_preH && (bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_preH = java_lang_Integer_valueOf__ILjava_lang_Integer_2(prefFormHeight));
  n = lv_lumii_dialoglayout_components_utils_Layout_updateIndicesFor__ILlv_lumii_dialoglayout_components_Component_2I(0, this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root);
  eqo = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(n);
  this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo);
  if (needsResize)
    for (group$iterator = java_util_AbstractMap$2_$iterator__Ljava_util_AbstractMap$2_2Ljava_util_Iterator_2(new java_util_AbstractMap$2_AbstractMap$2__Ljava_util_AbstractMap_2V(this$static.lv_lumii_dialoglayout_IMCSDialogLayout_groups)); group$iterator.java_util_AbstractMap$2$1_val$outerIter2.hasNext__Z();) {
      com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(java_util_AbstractMap$2$1_$next__Ljava_util_AbstractMap$2$1_2Ljava_lang_Object_2(group$iterator));
      null.nullMethod();
    }
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, eqo.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, 0, 0);
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, eqo.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, 1, 0);
  solution = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(eqo);
  if (solution == null)
    return;
  lv_lumii_dialoglayout_components_Component_$resize__Llv_lumii_dialoglayout_components_Component_2_3DLlv_lumii_dialoglayout_components_Component_2V(this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root, solution, null);
}

function lv_lumii_dialoglayout_IMCSDialogLayout_$loadAndLayout__Llv_lumii_dialoglayout_IMCSDialogLayout_2JV(this$static, rForm){
  if (!this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root) {
    this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root = lv_lumii_dialoglayout_components_Component_createComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_Component_2(this$static.lv_lumii_dialoglayout_IMCSDialogLayout_callback, rForm, null);
    lv_lumii_dialoglayout_IMCSDialogLayout_$getBoundsAndLayoutComponents__Llv_lumii_dialoglayout_IMCSDialogLayout_2ZIIV(this$static, true, 0, 0);
  }
   else 
    lv_lumii_dialoglayout_IMCSDialogLayout_$refreshAndLayout__Llv_lumii_dialoglayout_IMCSDialogLayout_2JIIV(this$static, rForm, 0, 0);
}

function lv_lumii_dialoglayout_IMCSDialogLayout_$notAllLoadedAndLayoutScheduled__Llv_lumii_dialoglayout_IMCSDialogLayout_2ZIIZ(this$static, needsResize, prefFormWidth, prefFormHeight){
  if (this$static.lv_lumii_dialoglayout_IMCSDialogLayout_counter != 0) {
    setTimeout(function(myThis){
      myThis.getBoundsAndLayoutComponents__ZIIV(needsResize, prefFormWidth, prefFormHeight);
    }
    , 50, this$static);
    return true;
  }
  return false;
}

function lv_lumii_dialoglayout_IMCSDialogLayout_$refreshAndLayout__Llv_lumii_dialoglayout_IMCSDialogLayout_2JIIV(this$static, rComponent, formWidth, formHeight){
  var cmpnt;
  cmpnt = lv_lumii_dialoglayout_components_Component_$find__Llv_lumii_dialoglayout_components_Component_2JLlv_lumii_dialoglayout_components_Component_2(this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root, rComponent);
  lv_lumii_dialoglayout_components_Component_$destroyChildrenRecursively__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2V(cmpnt, this$static.lv_lumii_dialoglayout_IMCSDialogLayout_callback);
  lv_lumii_dialoglayout_components_Component_$clearBoundsRecursively__Llv_lumii_dialoglayout_components_Component_2V(this$static.lv_lumii_dialoglayout_IMCSDialogLayout_root);
  cmpnt.reinitialize__V();
  lv_lumii_dialoglayout_IMCSDialogLayout_$getBoundsAndLayoutComponents__Llv_lumii_dialoglayout_IMCSDialogLayout_2ZIIV(this$static, true, formWidth, formHeight);
}

function lv_lumii_dialoglayout_IMCSDialogLayout_IMCSDialogLayout__Ljava_lang_Object_2V(_callback){
  this.lv_lumii_dialoglayout_IMCSDialogLayout_groups = new java_util_HashMap_HashMap__V;
  lv_lumii_dialoglayout_IMCSDialogLayout_inJavaScript__Z()?(this.lv_lumii_dialoglayout_IMCSDialogLayout_callback = new lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_IMCSDialogLayout$JSCallbackWrapper__Llv_lumii_dialoglayout_IMCSDialogLayout_2Ljava_lang_Object_2V(_callback)):(this.lv_lumii_dialoglayout_IMCSDialogLayout_callback = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(_callback, 305));
}

function lv_lumii_dialoglayout_IMCSDialogLayout_inJavaScript__Z(){
  var retVal;
  retVal = false;
  try {
    retVal = true;
  }
   catch ($e0) {
    $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25))
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
  }
  return retVal;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(297, 1, {}, lv_lumii_dialoglayout_IMCSDialogLayout_IMCSDialogLayout__Ljava_lang_Object_2V);
_.getBoundsAndLayoutComponents__ZIIV = function lv_lumii_dialoglayout_IMCSDialogLayout_getBoundsAndLayoutComponents__ZIIV(needsResize, prefFormWidth, prefFormHeight){
  lv_lumii_dialoglayout_IMCSDialogLayout_$getBoundsAndLayoutComponents__Llv_lumii_dialoglayout_IMCSDialogLayout_2ZIIV(this, needsResize, prefFormWidth, prefFormHeight);
}
;
_.loadAndLayout__DV = function lv_lumii_dialoglayout_IMCSDialogLayout_loadAndLayout__DV(rForm){
  lv_lumii_dialoglayout_IMCSDialogLayout_$loadAndLayout__Llv_lumii_dialoglayout_IMCSDialogLayout_2JV(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(rForm));
}
;
_.loadFinished__DV = function lv_lumii_dialoglayout_IMCSDialogLayout_loadFinished__DV(rComponent){
  --this.lv_lumii_dialoglayout_IMCSDialogLayout_counter;
}
;
_.loadStarted__DV = function lv_lumii_dialoglayout_IMCSDialogLayout_loadStarted__DV(rComponent){
  ++this.lv_lumii_dialoglayout_IMCSDialogLayout_counter;
}
;
_.refreshAndLayout__DIIV = function lv_lumii_dialoglayout_IMCSDialogLayout_refreshAndLayout__DIIV(rRootComponent, formWidth, formHeight){
  lv_lumii_dialoglayout_IMCSDialogLayout_$refreshAndLayout__Llv_lumii_dialoglayout_IMCSDialogLayout_2JIIV(this, com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(rRootComponent), formWidth, formHeight);
}
;
_.lv_lumii_dialoglayout_IMCSDialogLayout_counter = 0;
_.lv_lumii_dialoglayout_IMCSDialogLayout_root = null;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1IMCSDialogLayout_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_39, 'IMCSDialogLayout', 297);
function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$_1destroy__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DV(this$static, rComponent){
  this$static.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback.destroy(rComponent);
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$_1getBounds__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLlv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static, rComponent){
  var js = this$static.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback.getBounds(rComponent);
  var j = new lv_lumii_dialoglayout_components_utils_ComponentBounds_ComponentBounds__V;
  js.minimumWidth && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_minW = new java_lang_Integer_Integer__IV(js.minimumWidth));
  js.maximumWidth && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxW = new java_lang_Integer_Integer__IV(js.maximumWidth));
  js.preferredWidth && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_preW = new java_lang_Integer_Integer__IV(js.preferredWidth));
  js.minimumHeight && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_minH = new java_lang_Integer_Integer__IV(js.minimumHeight));
  js.maximumHeight && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxH = new java_lang_Integer_Integer__IV(js.maximumHeight));
  j.preferredHeight && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_preH = new java_lang_Integer_Integer__IV(js.preferredHeight));
  js.leftMargin && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM = new java_lang_Integer_Integer__IV(js.leftMargin));
  js.rightMargin && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM = new java_lang_Integer_Integer__IV(js.rightMargin));
  js.topMargin && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM = new java_lang_Integer_Integer__IV(js.topMargin));
  js.bottomMargin && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM = new java_lang_Integer_Integer__IV(js.bottomMargin));
  js.leftPadding && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP = new java_lang_Integer_Integer__IV(js.leftPadding));
  js.rightPadding && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP = new java_lang_Integer_Integer__IV(js.rightPadding));
  js.topPadding && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP = new java_lang_Integer_Integer__IV(js.topPadding));
  js.bottomPadding && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP = new java_lang_Integer_Integer__IV(js.bottomPadding));
  js.horizontalSpacing && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_horSpace = new java_lang_Integer_Integer__IV(js.horizontalSpacing));
  js.verticalSpacing && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_verSpace = new java_lang_Integer_Integer__IV(js.verticalSpacing));
  (js.horizontalAlignment == $intern_40 || js.horizontalAlignment == $intern_41 || js.horizontalAlignment == $intern_42) && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign = js.horizontalAlignment);
  (js.verticalAlignment == $intern_43 || js.verticalAlignment == $intern_44 || js.verticalAlignment == $intern_42) && (j.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign = js.verticalAlignment);
  return j;
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$_1getLayoutName__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLjava_lang_String_2(this$static, rComponent){
  return this$static.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback.getLayoutName(rComponent);
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getAnchor__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLjava_lang_String_2(this$static, rComponent){
  var retVal = this$static.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback.getAnchor(rComponent);
  if (!retVal)
    return 'parent';
  return retVal;
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getBounds__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2JLlv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static, rComponent){
  var retVal;
  retVal = lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$_1getBounds__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLlv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(rComponent));
  return retVal;
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getChildren__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLjava_util_ArrayList_2(this$static, rComponent){
  var arr = this$static.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback.getChildren(rComponent);
  if (arr) {
    var retVal = new java_util_ArrayList_ArrayList__V;
    for (var i = 0; i < arr.length; i++) {
      var obj = new java_lang_Double_Double__DV(arr[i]);
      retVal.add__Ljava_lang_Object_2Z(obj);
    }
    return retVal;
  }
   else 
    return new java_util_ArrayList_ArrayList__V;
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getChildren__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2J_3J(this$static, rComponent){
  var i, retVal, tmp;
  tmp = lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getChildren__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLjava_util_ArrayList_2(this$static, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(rComponent));
  retVal = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_J_1classLit, $intern_45, 0, tmp.java_util_ArrayList_array.length, 6, 1);
  for (i = 0; i < tmp.java_util_ArrayList_array.length; i++)
    retVal[i] = com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, tmp.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tmp.java_util_ArrayList_array[i], 11)).java_lang_Double_value);
  return retVal;
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$layout__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DIIIIV(this$static, rComponent, x_0, y_0, w, h){
  this$static.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback.layout(rComponent, x_0, y_0, w, h);
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$layout__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2JIIIIV(this$static, rComponent, x_0, y_0, w, h){
  lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$layout__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DIIIIV(this$static, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(rComponent), x_0, y_0, w, h);
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$load__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DV(this$static, rComponent){
  this$static.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback.load(rComponent);
}

function lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_IMCSDialogLayout$JSCallbackWrapper__Llv_lumii_dialoglayout_IMCSDialogLayout_2Ljava_lang_Object_2V(_jscallback){
  this.lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_jscallback = _jscallback;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(204, 1, {305:1}, lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_IMCSDialogLayout$JSCallbackWrapper__Llv_lumii_dialoglayout_IMCSDialogLayout_2Ljava_lang_Object_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1IMCSDialogLayout$JSCallbackWrapper_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_39, 'IMCSDialogLayout/JSCallbackWrapper', 204);
function lv_lumii_dialoglayout_components_Component_$clearBoundsRecursively__Llv_lumii_dialoglayout_components_Component_2V(this$static){
  var child, child$iterator;
  this$static.lv_lumii_dialoglayout_components_Component_bounds = null;
  for (child$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_dialoglayout_components_Component_children); child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    child = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_last = child$iterator.java_util_AbstractList$IteratorImpl_i++), 35));
    lv_lumii_dialoglayout_components_Component_$clearBoundsRecursively__Llv_lumii_dialoglayout_components_Component_2V(child);
  }
}

function lv_lumii_dialoglayout_components_Component_$destroyChildrenRecursively__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2V(this$static, _callback){
  var child, child$iterator;
  for (child$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_dialoglayout_components_Component_children); child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    child = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_last = child$iterator.java_util_AbstractList$IteratorImpl_i++), 35));
    lv_lumii_dialoglayout_components_Component_$destroyChildrenRecursively__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2V(child, _callback);
    !!_callback && lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$_1destroy__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DV(_callback, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(child.lv_lumii_dialoglayout_components_Component_reference));
  }
  this$static.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
}

function lv_lumii_dialoglayout_components_Component_$find__Llv_lumii_dialoglayout_components_Component_2JLlv_lumii_dialoglayout_components_Component_2(this$static, reference){
  var c, c$iterator, found;
  if (com_google_gwt_lang_LongLib_eq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(reference, this$static.lv_lumii_dialoglayout_components_Component_reference))
    return this$static;
  else {
    for (c$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_dialoglayout_components_Component_children); c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_last = c$iterator.java_util_AbstractList$IteratorImpl_i++), 35));
      found = lv_lumii_dialoglayout_components_Component_$find__Llv_lumii_dialoglayout_components_Component_2JLlv_lumii_dialoglayout_components_Component_2(c, reference);
      if (found)
        return found;
    }
    return null;
  }
}

function lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static){
  var child, child$iterator;
  if (!this$static.lv_lumii_dialoglayout_components_Component_bounds) {
    for (child$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_dialoglayout_components_Component_children); child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      child = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_last = child$iterator.java_util_AbstractList$IteratorImpl_i++), 35));
      lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    }
    !!this$static.lv_lumii_dialoglayout_components_Component_callback && com_google_gwt_lang_LongLib_neq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(this$static.lv_lumii_dialoglayout_components_Component_reference, {l:0, m:0, h:0})?(this$static.lv_lumii_dialoglayout_components_Component_bounds = lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getBounds__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2JLlv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_callback, this$static.lv_lumii_dialoglayout_components_Component_reference)):(this$static.lv_lumii_dialoglayout_components_Component_bounds = new lv_lumii_dialoglayout_components_utils_ComponentBounds_ComponentBounds__V);
  }
  return this$static.lv_lumii_dialoglayout_components_Component_bounds;
}

function lv_lumii_dialoglayout_components_Component_$reinitialize__Llv_lumii_dialoglayout_components_Component_2V(this$static){
  var arr, child, i, rChild;
  !!this$static.lv_lumii_dialoglayout_components_Component_callback && com_google_gwt_lang_LongLib_neq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(this$static.lv_lumii_dialoglayout_components_Component_reference, {l:0, m:0, h:0}) && lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$load__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DV(this$static.lv_lumii_dialoglayout_components_Component_callback, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(this$static.lv_lumii_dialoglayout_components_Component_reference));
  arr = null;
  !!this$static.lv_lumii_dialoglayout_components_Component_callback && (arr = lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getChildren__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2J_3J(this$static.lv_lumii_dialoglayout_components_Component_callback, this$static.lv_lumii_dialoglayout_components_Component_reference));
  if (arr != null) {
    for (i = 0; i < arr.length; i++) {
      rChild = arr[i];
      child = lv_lumii_dialoglayout_components_Component_createComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_Component_2(this$static.lv_lumii_dialoglayout_components_Component_callback, rChild, this$static);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_dialoglayout_components_Component_children, child);
    }
  }
}

function lv_lumii_dialoglayout_components_Component_$resize__Llv_lumii_dialoglayout_components_Component_2_3DLlv_lumii_dialoglayout_components_Component_2V(this$static, vars, lastSibling){
  var anchor, bottom, child, child$array, child$index, child$max, left, right, sibling, top_0;
  left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
  top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
  right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr];
  bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb];
  anchor = null;
  !!this$static.lv_lumii_dialoglayout_components_Component_callback && (anchor = lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$getAnchor__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLjava_lang_String_2(this$static.lv_lumii_dialoglayout_components_Component_callback, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(this$static.lv_lumii_dialoglayout_components_Component_reference)));
  if (java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('zero', anchor))
  ;
  else if (java_lang_String_$equalsIgnoreCase__Ljava_lang_String_2Ljava_lang_String_2Z('sibling', anchor)) {
    if (lastSibling) {
      if (!!this$static.lv_lumii_dialoglayout_components_Component_parent && (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 124) || com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 114)) && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 114)) {
        top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb];
        bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb];
        left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
        right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
      }
       else if (!!this$static.lv_lumii_dialoglayout_components_Component_parent && (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 123) || com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 125)) && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 125)) {
        left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr];
        right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr];
        top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
        bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
      }
       else if (!!this$static.lv_lumii_dialoglayout_components_Component_parent && (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 114) || com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 124))) {
        left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr];
        right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr];
        top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
        bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
      }
       else if (!!this$static.lv_lumii_dialoglayout_components_Component_parent && (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 125) || com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_dialoglayout_components_Component_parent, 123))) {
        top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb];
        bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb];
        left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
        right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
      }
       else {
        left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr];
        top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb];
        right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr];
        bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastSibling).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb];
      }
    }
     else if (this$static.lv_lumii_dialoglayout_components_Component_parent) {
      left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
      top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
      right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
      bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
    }
  }
   else {
    if (this$static.lv_lumii_dialoglayout_components_Component_parent) {
      left = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
      top_0 = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
      right = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl];
      bottom = vars[this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb] - vars[lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this$static.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt];
    }
  }
  com_google_gwt_lang_LongLib_neq__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(this$static.lv_lumii_dialoglayout_components_Component_reference, {l:0, m:0, h:0}) && !!this$static.lv_lumii_dialoglayout_components_Component_callback && lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$layout__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2JIIIIV(this$static.lv_lumii_dialoglayout_components_Component_callback, this$static.lv_lumii_dialoglayout_components_Component_reference, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(left))), com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(top_0))), com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(Math.round(right - left))), com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(Math.round(bottom - top_0))));
  sibling = null;
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this$static.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    lv_lumii_dialoglayout_components_Component_$resize__Llv_lumii_dialoglayout_components_Component_2_3DLlv_lumii_dialoglayout_components_Component_2V(child, vars, sibling);
    sibling = child;
  }
}

function lv_lumii_dialoglayout_components_Component_Component__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent){
  this.lv_lumii_dialoglayout_components_Component_children = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_dialoglayout_components_Component_callback = _callback;
  this.lv_lumii_dialoglayout_components_Component_reference = _reference;
  this.lv_lumii_dialoglayout_components_Component_parent = _parent;
  this.reinitialize__V();
}

function lv_lumii_dialoglayout_components_Component_createComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_Component_2(_callback, _reference, _parent){
  var typeName;
  typeName = null;
  !!_callback && (typeName = lv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_$_1getLayoutName__Llv_lumii_dialoglayout_IMCSDialogLayout$JSCallbackWrapper_2DLjava_lang_String_2(_callback, com_google_gwt_lang_LongLib_toDouble__Lcom_google_gwt_lang_LongLibBase$LongEmul_2D(_reference)));
  if (typeName == null || !typeName.length)
    return new lv_lumii_dialoglayout_components_LeafComponent_LeafComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent);
  if (java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(typeName, $intern_47))
    return new lv_lumii_dialoglayout_components_VerticalBox_VerticalBox__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent);
  if (java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(typeName, $intern_48))
    return new lv_lumii_dialoglayout_components_HorizontalBox_HorizontalBox__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent);
  if (java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(typeName, 'Row'))
    return new lv_lumii_dialoglayout_components_Row_Row__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent);
  if (java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(typeName, 'Column'))
    return new lv_lumii_dialoglayout_components_Column_Column__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent);
  if (java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(typeName, 'Stack'))
    return new lv_lumii_dialoglayout_components_Stack_Stack__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent);
  return new lv_lumii_dialoglayout_components_VerticalBox_VerticalBox__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(35, 1, {35:1});
_.reinitialize__V = function lv_lumii_dialoglayout_components_Component_reinitialize__V(){
  lv_lumii_dialoglayout_components_Component_$reinitialize__Llv_lumii_dialoglayout_components_Component_2V(this);
}
;
_.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V = function lv_lumii_dialoglayout_components_Component_writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo){
  lv_lumii_dialoglayout_components_utils_ComponentBounds_$writeConstraints__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(this.lv_lumii_dialoglayout_components_Component_bounds, eqo);
}
;
_.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV = function lv_lumii_dialoglayout_components_Component_writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, coeff){
}
;
_.lv_lumii_dialoglayout_components_Component_bounds = null;
_.lv_lumii_dialoglayout_components_Component_lastColumn = null;
_.lv_lumii_dialoglayout_components_Component_lastRow = null;
_.lv_lumii_dialoglayout_components_Component_maxColumnChildren = 0;
_.lv_lumii_dialoglayout_components_Component_maxRowChildren = 0;
_.lv_lumii_dialoglayout_components_Component_reference = {l:0, m:0, h:0};
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_49, 'Component', 35);
function lv_lumii_dialoglayout_components_Column_$updateChildrenSize__Llv_lumii_dialoglayout_components_Column_2V(this$static){
  if (this$static.lv_lumii_dialoglayout_components_Component_parent)
    while (this$static.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length < this$static.lv_lumii_dialoglayout_components_Component_parent.lv_lumii_dialoglayout_components_Component_maxColumnChildren) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_dialoglayout_components_Component_children, new lv_lumii_dialoglayout_components_LeafComponent_LeafComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(null, {l:0, m:0, h:0}, this$static));
    }
  !!this$static.lv_lumii_dialoglayout_components_Column_prevColumn && lv_lumii_dialoglayout_components_Column_$updateChildrenSize__Llv_lumii_dialoglayout_components_Column_2V(this$static.lv_lumii_dialoglayout_components_Column_prevColumn);
}

function lv_lumii_dialoglayout_components_Column_Column__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent){
  lv_lumii_dialoglayout_components_Component_Component__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V.call(this, _callback, _reference, _parent);
  this.lv_lumii_dialoglayout_components_Column_prevColumn = null;
  if (_parent) {
    this.lv_lumii_dialoglayout_components_Column_prevColumn = _parent.lv_lumii_dialoglayout_components_Component_lastColumn;
    _parent.lv_lumii_dialoglayout_components_Component_lastColumn = this;
    this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length > _parent.lv_lumii_dialoglayout_components_Component_maxColumnChildren && (_parent.lv_lumii_dialoglayout_components_Component_maxColumnChildren = this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length);
    lv_lumii_dialoglayout_components_Column_$updateChildrenSize__Llv_lumii_dialoglayout_components_Column_2V(this);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(125, 35, {125:1, 35:1}, lv_lumii_dialoglayout_components_Column_Column__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V);
_.reinitialize__V = function lv_lumii_dialoglayout_components_Column_reinitialize__V(){
  lv_lumii_dialoglayout_components_Component_$reinitialize__Llv_lumii_dialoglayout_components_Component_2V(this);
  if (this.lv_lumii_dialoglayout_components_Component_parent) {
    this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length > this.lv_lumii_dialoglayout_components_Component_parent.lv_lumii_dialoglayout_components_Component_maxColumnChildren && (this.lv_lumii_dialoglayout_components_Component_parent.lv_lumii_dialoglayout_components_Component_maxColumnChildren = this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length);
    lv_lumii_dialoglayout_components_Column_$updateChildrenSize__Llv_lumii_dialoglayout_components_Column_2V(this);
  }
}
;
_.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V = function lv_lumii_dialoglayout_components_Column_writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo){
  var child, child$array, child$index, child$max, childBounds, firstChild, lastChild, pChild, pChildBounds, prevChild, prevColumnChildren, prevColumnI, verSpace;
  lv_lumii_dialoglayout_components_utils_ComponentBounds_$writeConstraints__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(this.lv_lumii_dialoglayout_components_Component_bounds, eqo);
  prevChild = null;
  firstChild = null;
  lastChild = null;
  prevColumnChildren = null;
  !!this.lv_lumii_dialoglayout_components_Column_prevColumn && (prevColumnChildren = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Column_prevColumn.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38));
  prevColumnChildren == null && (prevColumnChildren = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, []));
  prevColumnI = 0;
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    child.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo);
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    if (prevColumnI < prevColumnChildren.length) {
      pChild = prevColumnChildren[prevColumnI];
      pChildBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(pChild);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, 0);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, 0);
      ++prevColumnI;
    }
    if (prevChild) {
      verSpace = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value + this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verSpace.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value;
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, verSpace);
    }
     else 
      firstChild = child;
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_40)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_41)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, $intern_50);
    lastChild = prevChild = child;
  }
  if (firstChild) {
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_43)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_44)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, $intern_50);
  }
}
;
_.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV = function lv_lumii_dialoglayout_components_Column_writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, coeff){
  var child, child$array, child$index, child$max, childBounds, comp_count, first, last, newCoeff;
  comp_count = this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length;
  first = null;
  last = null;
  newCoeff = coeff / 2 / (comp_count + 1);
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, newCoeff);
    child.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, newCoeff);
    !first && (first = child);
    last = child;
  }
  !!first && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(first).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, 0);
  !!last && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(last).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, 0);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Column_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_49, 'Column', 125);
function lv_lumii_dialoglayout_components_HorizontalBox_HorizontalBox__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent){
  lv_lumii_dialoglayout_components_Component_Component__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V.call(this, _callback, _reference, _parent);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(124, 35, {35:1, 124:1}, lv_lumii_dialoglayout_components_HorizontalBox_HorizontalBox__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V);
_.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V = function lv_lumii_dialoglayout_components_HorizontalBox_writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo){
  var child, child$array, child$index, child$max, childBounds, firstChild, horSpace, lastChild, prevChild;
  lv_lumii_dialoglayout_components_utils_ComponentBounds_$writeConstraints__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(this.lv_lumii_dialoglayout_components_Component_bounds, eqo);
  prevChild = null;
  firstChild = null;
  lastChild = null;
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    child.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo);
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    if (prevChild) {
      horSpace = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value + this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horSpace.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value;
      if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(child, 114) && !com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(child, 124))
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, horSpace);
      else {
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this).lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value);
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this).lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value);
      }
    }
     else 
      firstChild = child;
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_43)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_44)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, $intern_50);
    lastChild = prevChild = child;
  }
  if (firstChild) {
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_40) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_41) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_42)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 100000000):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, $intern_50);
  }
}
;
_.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV = function lv_lumii_dialoglayout_components_HorizontalBox_writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, coeff){
  var child, child$array, child$index, child$max, childBounds, comp_count, first, last, newCoeff;
  comp_count = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38).length;
  first = null;
  last = null;
  newCoeff = coeff / 2 / (comp_count + 1);
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, newCoeff);
    child.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, newCoeff);
    !first && (first = child);
    last = child;
  }
  !!first && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(first).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, 0);
  !!last && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(last).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 0);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1HorizontalBox_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_49, $intern_48, 124);
function lv_lumii_dialoglayout_components_LeafComponent_LeafComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent){
  lv_lumii_dialoglayout_components_Component_Component__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V.call(this, _callback, _reference, _parent);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(152, 35, {35:1}, lv_lumii_dialoglayout_components_LeafComponent_LeafComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1LeafComponent_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_49, 'LeafComponent', 152);
function lv_lumii_dialoglayout_components_Row_$updateChildrenSize__Llv_lumii_dialoglayout_components_Row_2V(this$static){
  if (this$static.lv_lumii_dialoglayout_components_Component_parent)
    while (this$static.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length < this$static.lv_lumii_dialoglayout_components_Component_parent.lv_lumii_dialoglayout_components_Component_maxRowChildren) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_dialoglayout_components_Component_children, new lv_lumii_dialoglayout_components_LeafComponent_LeafComponent__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(null, {l:0, m:0, h:0}, this$static));
    }
  !!this$static.lv_lumii_dialoglayout_components_Row_prevRow && lv_lumii_dialoglayout_components_Row_$updateChildrenSize__Llv_lumii_dialoglayout_components_Row_2V(this$static.lv_lumii_dialoglayout_components_Row_prevRow);
}

function lv_lumii_dialoglayout_components_Row_Row__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent){
  lv_lumii_dialoglayout_components_Component_Component__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V.call(this, _callback, _reference, _parent);
  this.lv_lumii_dialoglayout_components_Row_prevRow = null;
  if (_parent) {
    this.lv_lumii_dialoglayout_components_Row_prevRow = _parent.lv_lumii_dialoglayout_components_Component_lastRow;
    _parent.lv_lumii_dialoglayout_components_Component_lastRow = this;
    this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length > _parent.lv_lumii_dialoglayout_components_Component_maxRowChildren && (_parent.lv_lumii_dialoglayout_components_Component_maxRowChildren = this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length);
    lv_lumii_dialoglayout_components_Row_$updateChildrenSize__Llv_lumii_dialoglayout_components_Row_2V(this);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(114, 35, {35:1, 114:1}, lv_lumii_dialoglayout_components_Row_Row__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V);
_.reinitialize__V = function lv_lumii_dialoglayout_components_Row_reinitialize__V(){
  lv_lumii_dialoglayout_components_Component_$reinitialize__Llv_lumii_dialoglayout_components_Component_2V(this);
  if (this.lv_lumii_dialoglayout_components_Component_parent) {
    this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length > this.lv_lumii_dialoglayout_components_Component_parent.lv_lumii_dialoglayout_components_Component_maxRowChildren && (this.lv_lumii_dialoglayout_components_Component_parent.lv_lumii_dialoglayout_components_Component_maxRowChildren = this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length);
    lv_lumii_dialoglayout_components_Row_$updateChildrenSize__Llv_lumii_dialoglayout_components_Row_2V(this);
  }
}
;
_.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V = function lv_lumii_dialoglayout_components_Row_writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo){
  var child, child$array, child$index, child$max, childBounds, firstChild, horSpace, lastChild, pChild, pChildBounds, prevChild, prevRowChildren, prevRowI;
  lv_lumii_dialoglayout_components_utils_ComponentBounds_$writeConstraints__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(this.lv_lumii_dialoglayout_components_Component_bounds, eqo);
  prevChild = null;
  firstChild = null;
  lastChild = null;
  prevRowChildren = null;
  !!this.lv_lumii_dialoglayout_components_Row_prevRow && (prevRowChildren = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Row_prevRow.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38));
  prevRowChildren == null && (prevRowChildren = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, []));
  prevRowI = 0;
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    child.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo);
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    if (prevRowI < prevRowChildren.length) {
      pChild = prevRowChildren[prevRowI];
      pChildBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(pChild);
      lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, 0, $intern_51);
      lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, 0, $intern_51);
      lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 0, $intern_51);
      lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 0, $intern_51);
      ++prevRowI;
    }
    if (prevChild) {
      horSpace = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value + this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horSpace.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value;
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, horSpace);
    }
     else 
      firstChild = child;
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_43)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_44)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, $intern_50);
    lastChild = prevChild = child;
  }
  if (firstChild) {
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_40)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_41)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_42)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, $intern_50):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, $intern_50);
  }
  !!this.lv_lumii_dialoglayout_components_Row_prevRow && (this.lv_lumii_dialoglayout_components_Component_parent?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this.lv_lumii_dialoglayout_components_Row_prevRow).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this.lv_lumii_dialoglayout_components_Component_parent).lv_lumii_dialoglayout_components_utils_ComponentBounds_verSpace.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this.lv_lumii_dialoglayout_components_Row_prevRow).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this).lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this.lv_lumii_dialoglayout_components_Row_prevRow).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(this).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, 0));
}
;
_.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV = function lv_lumii_dialoglayout_components_Row_writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, coeff){
  var child, child$array, child$index, child$max, childBounds, comp_count, first, last, newCoeff;
  comp_count = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38).length;
  first = null;
  last = null;
  newCoeff = coeff / 2 / (comp_count + 1);
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, newCoeff);
    child.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, newCoeff);
    !first && (first = child);
    last = child;
  }
  !!first && lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(first).lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, 0, -100000000);
  if (last) {
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(last).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 0);
    lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(last).lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 0, -100000000);
  }
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Row_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_49, 'Row', 114);
function lv_lumii_dialoglayout_components_Stack_Stack__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent){
  lv_lumii_dialoglayout_components_Component_Component__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V.call(this, _callback, _reference, _parent);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(230, 35, {35:1}, lv_lumii_dialoglayout_components_Stack_Stack__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V);
_.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V = function lv_lumii_dialoglayout_components_Stack_writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo){
  var child, child$array, child$array0, child$index, child$index0, child$max, child$max0, childBounds, pChildBounds, prevChild;
  lv_lumii_dialoglayout_components_utils_ComponentBounds_$writeConstraints__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(this.lv_lumii_dialoglayout_components_Component_bounds, eqo);
  for (child$array0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index0 = 0 , child$max0 = child$array0.length; child$index0 < child$max0; ++child$index0) {
    child = child$array0[child$index0];
    child.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo);
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_40)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_41)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, $intern_50);
  }
  prevChild = null;
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_43)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_44)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, $intern_50);
    if (prevChild) {
      childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
      pChildBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, 0);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 0);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, 0);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, pChildBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, 0);
    }
    prevChild = child;
  }
}
;
_.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV = function lv_lumii_dialoglayout_components_Stack_writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, coeff){
  var child, child$array, child$index, child$max, childBounds, comp_count, newCoeff;
  comp_count = this.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length;
  newCoeff = coeff / 2 / (comp_count + 1);
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, newCoeff);
    child.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, newCoeff);
  }
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Stack_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_49, 'Stack', 230);
function lv_lumii_dialoglayout_components_VerticalBox_$writeGravity__Llv_lumii_dialoglayout_components_VerticalBox_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(this$static, eqo, coeff){
  var child, child$array, child$index, child$max, childBounds, comp_count, first, last, newCoeff;
  comp_count = this$static.lv_lumii_dialoglayout_components_Component_children.java_util_ArrayList_array.length;
  first = null;
  last = null;
  newCoeff = coeff / 2 / (comp_count + 1);
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this$static.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, newCoeff);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, $intern_50);
    child.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, newCoeff);
    !first && (first = child);
    last = child;
  }
  !!first && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(first).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, coeff);
  !!last && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(last).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this$static.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, coeff);
}

function lv_lumii_dialoglayout_components_VerticalBox_VerticalBox__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V(_callback, _reference, _parent){
  lv_lumii_dialoglayout_components_Component_Component__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V.call(this, _callback, _reference, _parent);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(123, 35, {35:1, 123:1}, lv_lumii_dialoglayout_components_VerticalBox_VerticalBox__Llv_lumii_dialoglayout_IMCSDialogLayout$ComponentCallback_2JLlv_lumii_dialoglayout_components_Component_2V);
_.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V = function lv_lumii_dialoglayout_components_VerticalBox_writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo){
  var child, child$array, child$index, child$max, childBounds, firstChild, lastChild, prevChild, verSpace;
  lv_lumii_dialoglayout_components_utils_ComponentBounds_$writeConstraints__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(this.lv_lumii_dialoglayout_components_Component_bounds, eqo);
  if (!this.lv_lumii_dialoglayout_components_Component_parent) {
    lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addConstantInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl);
    lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addConstantInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt);
  }
  prevChild = null;
  firstChild = null;
  lastChild = null;
  for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(this.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
    child = child$array[child$index];
    child.writeConstraints__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(eqo);
    childBounds = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(child);
    if (prevChild) {
      verSpace = lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value + this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verSpace.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value;
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(prevChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, verSpace);
    }
     else 
      firstChild = child;
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_40)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_41)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP.java_lang_Integer_value + childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, childBounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, $intern_50);
    lastChild = prevChild = child;
  }
  if (firstChild) {
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_43)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_topM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_44)?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP.java_lang_Integer_value + lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM.java_lang_Integer_value);
    java_lang_String_$equals__Ljava_lang_String_2Ljava_lang_Object_2Z(this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign, $intern_42) && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(eqo, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this.lv_lumii_dialoglayout_components_Component_bounds.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(firstChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(lastChild).lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, $intern_50);
  }
  !this.lv_lumii_dialoglayout_components_Component_parent && lv_lumii_dialoglayout_components_VerticalBox_$writeGravity__Llv_lumii_dialoglayout_components_VerticalBox_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(this, eqo, 10000000000);
}
;
_.writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV = function lv_lumii_dialoglayout_components_VerticalBox_writeGravity__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(eqo, coeff){
  lv_lumii_dialoglayout_components_VerticalBox_$writeGravity__Llv_lumii_dialoglayout_components_VerticalBox_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2DV(this, eqo, coeff);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1VerticalBox_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_49, $intern_47, 123);
function lv_lumii_dialoglayout_components_utils_ComponentBounds_$updateIndicesFrom__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2II(this$static, i){
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl = i++;
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt = i++;
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr = i++;
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb = i++;
  return i;
}

function lv_lumii_dialoglayout_components_utils_ComponentBounds_$writeConstraints__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2V(this$static, eqo){
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_minW?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_minW.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, 0);
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxW?lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, -this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxW.java_lang_Integer_value, $intern_51):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, $intern_51);
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_minH?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_minH.java_lang_Integer_value):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, 0);
  this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxH?lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, -this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxH.java_lang_Integer_value, $intern_51):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, $intern_51);
  if (this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_preW) {
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, $intern_7);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr, -2 * this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_preW.java_lang_Integer_value * $intern_7);
  }
  if (this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_preH) {
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, $intern_7);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(eqo, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt, this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb, -2 * this$static.lv_lumii_dialoglayout_components_utils_ComponentBounds_preH.java_lang_Integer_value * $intern_7);
  }
}

function lv_lumii_dialoglayout_components_utils_ComponentBounds_ComponentBounds__V(){
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftM = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightM = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_topM = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomM = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_leftP = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_rightP = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_topP = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_bottomP = java_lang_Integer_valueOf__ILjava_lang_Integer_2(0);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_horSpace = java_lang_Integer_valueOf__ILjava_lang_Integer_2(10);
  this.lv_lumii_dialoglayout_components_utils_ComponentBounds_verSpace = java_lang_Integer_valueOf__ILjava_lang_Integer_2(10);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(231, 1, {}, lv_lumii_dialoglayout_components_utils_ComponentBounds_ComponentBounds__V);
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_horAlign = $intern_42;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxH = null;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_maxW = null;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_minH = null;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_minW = null;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_preH = null;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_preW = null;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_verAlign = $intern_42;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_xb = -1;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_xl = -1;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_xr = -1;
_.lv_lumii_dialoglayout_components_utils_ComponentBounds_xt = -1;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1utils_1ComponentBounds_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2('lv.lumii.dialoglayout.components.utils', 'ComponentBounds', 231);
function lv_lumii_dialoglayout_components_utils_Layout_updateIndicesFor__ILlv_lumii_dialoglayout_components_Component_2I(i, c){
  var child, child$array, child$index, child$max;
  i = lv_lumii_dialoglayout_components_utils_ComponentBounds_$updateIndicesFrom__Llv_lumii_dialoglayout_components_utils_ComponentBounds_2II(lv_lumii_dialoglayout_components_Component_$getComponentBounds__Llv_lumii_dialoglayout_components_Component_2Llv_lumii_dialoglayout_components_utils_ComponentBounds_2(c), i);
  if (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(c.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) != null)
    for (child$array = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(c.lv_lumii_dialoglayout_components_Component_children, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1dialoglayout_1components_1Component_12_1classLit, 1), $intern_46, 35, 0, [])), 38) , child$index = 0 , child$max = child$array.length; child$index < child$max; ++child$index) {
      child = child$array[child$index];
      i = lv_lumii_dialoglayout_components_utils_Layout_updateIndicesFor__ILlv_lumii_dialoglayout_components_Component_2I(i, child);
    }
  return i;
}

function lv_lumii_layoutengine_Element_$_1setSpacing__Llv_lumii_layoutengine_Element_2DV(this$static, spacing){
  this$static.lv_lumii_layoutengine_Element_spacing = spacing;
}

function lv_lumii_layoutengine_Element_$getDescendants__Llv_lumii_layoutengine_Element_2Ljava_util_ArrayList_2(this$static){
  var children, descendants, element, queue;
  descendants = new java_util_ArrayList_ArrayList__V;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, this$static, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
  while (queue.java_util_LinkedList_size != 0) {
    element = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 57));
    children = element.package_private$lv_lumii_layoutengine_Element$getChildren__Ljava_util_ArrayList_2();
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(descendants, children);
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, children);
  }
  return descendants;
}

function lv_lumii_layoutengine_Element_$isDescendantOf__Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2Z(this$static, element){
  var predecessor;
  predecessor = this$static.lv_lumii_layoutengine_Element_owner;
  while (predecessor) {
    if (predecessor == element) {
      return true;
    }
    predecessor = predecessor.lv_lumii_layoutengine_Element_owner;
  }
  return false;
}

function lv_lumii_layoutengine_Element_$remove__Llv_lumii_layoutengine_Element_2ZV(this$static){
  var descendant, descendant$iterator;
  for (descendant$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Element_$getDescendants__Llv_lumii_layoutengine_Element_2Ljava_util_ArrayList_2(this$static)); descendant$iterator.java_util_AbstractList$IteratorImpl_i < descendant$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    descendant = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(descendant$iterator.java_util_AbstractList$IteratorImpl_i < descendant$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(descendant$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(descendant$iterator.java_util_AbstractList$IteratorImpl_last = descendant$iterator.java_util_AbstractList$IteratorImpl_i++), 57));
    descendant.lv_lumii_layoutengine_Element_diagram = null;
  }
  this$static.lv_lumii_layoutengine_Element_owner.package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(this$static);
  this$static.lv_lumii_layoutengine_Element_diagram = null;
}

function lv_lumii_layoutengine_Element_$setOwner__Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2V(this$static, owner){
  this$static.lv_lumii_layoutengine_Element_owner = owner;
}

function lv_lumii_layoutengine_Element_Element__Llv_lumii_layoutengine_Element_2DV(owner, spacing){
  this.lv_lumii_layoutengine_Element_owner = owner;
  if (owner) {
    com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(owner, 66)?(this.lv_lumii_layoutengine_Element_diagram = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(owner, 66)):(this.lv_lumii_layoutengine_Element_diagram = owner.lv_lumii_layoutengine_Element_diagram);
  }
   else if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this, 66)) {
    this.lv_lumii_layoutengine_Element_diagram = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this, 66);
  }
   else {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Non-diagram elements must have an owner.');
  }
  this.lv_lumii_layoutengine_Element_spacing = spacing;
  lv_lumii_layoutengine_Diagram_$adjustEpsilon__Llv_lumii_layoutengine_Diagram_2DV(this.lv_lumii_layoutengine_Element_diagram, spacing);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(57, 1, {57:1});
_.getOwner__Llv_lumii_layoutengine_Element_2 = function lv_lumii_layoutengine_Element_getOwner__Llv_lumii_layoutengine_Element_2(){
  return this.lv_lumii_layoutengine_Element_owner;
}
;
_.lv_lumii_layoutengine_Element_spacing = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Element_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Element', 57);
function lv_lumii_layoutengine_AbstractContainer_$addInsideLabel__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_InsideLabel_2V(this$static, label_0){
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_AbstractContainer_insideLabels, label_0);
}

function lv_lumii_layoutengine_AbstractContainer_$collapse__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(this$static, newCenter){
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(newCenter.java_awt_geom_Point2D$Double_x, newCenter.java_awt_geom_Point2D$Double_y, 0, 0));
}

function lv_lumii_layoutengine_AbstractContainer_$contains__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2DZ(this$static, point){
  return this$static.lv_lumii_layoutengine_AbstractContainer_left <= point.java_awt_geom_Point2D$Double_x && point.java_awt_geom_Point2D$Double_x <= this$static.lv_lumii_layoutengine_AbstractContainer_right && this$static.lv_lumii_layoutengine_AbstractContainer_top <= point.java_awt_geom_Point2D$Double_y && point.java_awt_geom_Point2D$Double_y <= this$static.lv_lumii_layoutengine_AbstractContainer_bottom;
}

function lv_lumii_layoutengine_AbstractContainer_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(this$static){
  var colCount, constraints, d, rect, rect$iterator, rectangles, rowCount, tBottom, tLeft, tRight, tSpacing, tTop;
  rectangles = lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static, true);
  if (rectangles.java_util_ArrayList_array.length == 0) {
    return null;
  }
  tLeft = $intern_53;
  tTop = $intern_53;
  tRight = $intern_20;
  tBottom = $intern_20;
  for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    tSpacing = rect.lv_lumii_layoutengine_Element_spacing;
    tLeft = java_lang_Math_min__DDD(tLeft, rect.lv_lumii_layoutengine_AbstractContainer_left - tSpacing);
    tTop = java_lang_Math_min__DDD(tTop, rect.lv_lumii_layoutengine_AbstractContainer_top - tSpacing);
    tRight = java_lang_Math_max__DDD(tRight, rect.lv_lumii_layoutengine_AbstractContainer_right + tSpacing);
    tBottom = java_lang_Math_max__DDD(tBottom, rect.lv_lumii_layoutengine_AbstractContainer_bottom + tSpacing);
  }
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39)) {
    constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
    colCount = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length;
    if (colCount > 1) {
      tLeft = java_lang_Math_min__DDD(tLeft, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1) - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
      tRight = java_lang_Math_max__DDD(tRight, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, colCount) + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, colCount - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
    }
     else if (tLeft < tRight) {
      d = java_lang_Math_max__DDD(0, (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance - (tRight - tLeft)) / 2);
      tLeft -= d;
      tRight += d;
    }
     else {
      tLeft = 0;
      tRight = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance;
    }
    rowCount = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length;
    if (rowCount > 1) {
      tTop = java_lang_Math_min__DDD(tTop, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1) - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
      tBottom = java_lang_Math_max__DDD(tBottom, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, rowCount) + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, rowCount - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
    }
     else if (tTop < tBottom) {
      d = java_lang_Math_max__DDD(0, (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance - (tBottom - tTop)) / 2);
      tTop -= d;
      tBottom += d;
    }
     else {
      tTop = 0;
      tBottom = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance;
    }
  }
  return new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(tLeft, tTop, tRight - tLeft, tBottom - tTop);
}

function lv_lumii_layoutengine_AbstractContainer_$findGridEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(this$static){
  var c, c$iterator, colCount, constraints, container, d, empty, queue, rect, rect$iterator, rowCount, tBottom, tLeft, tRight, tSpacing, tTop;
  tLeft = $intern_53;
  tTop = $intern_53;
  tRight = $intern_20;
  tBottom = $intern_20;
  empty = true;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, this$static, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
  while (queue.java_util_LinkedList_size != 0) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 12));
    for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2()); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      empty = false;
      tSpacing = rect.lv_lumii_layoutengine_Element_spacing;
      tLeft = java_lang_Math_min__DDD(tLeft, rect.lv_lumii_layoutengine_AbstractContainer_left - tSpacing);
      tTop = java_lang_Math_min__DDD(tTop, rect.lv_lumii_layoutengine_AbstractContainer_top - tSpacing);
      tRight = java_lang_Math_max__DDD(tRight, rect.lv_lumii_layoutengine_AbstractContainer_right + tSpacing);
      tBottom = java_lang_Math_max__DDD(tBottom, rect.lv_lumii_layoutengine_AbstractContainer_bottom + tSpacing);
    }
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39)) {
      empty = false;
      constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
      colCount = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length;
      if (colCount > 1) {
        tLeft = java_lang_Math_min__DDD(tLeft, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1) - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
        tRight = java_lang_Math_max__DDD(tRight, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, colCount) + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, colCount - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
      }
       else if (tLeft < tRight) {
        d = java_lang_Math_max__DDD(0, (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance - (tRight - tLeft)) / 2);
        tLeft -= d;
        tRight += d;
      }
       else {
        tLeft = 0;
        tRight = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance;
      }
      rowCount = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length;
      if (rowCount > 1) {
        tTop = java_lang_Math_min__DDD(tTop, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1) - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
        tBottom = java_lang_Math_max__DDD(tBottom, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, rowCount) + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, rowCount - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
      }
       else if (tTop < tBottom) {
        d = java_lang_Math_max__DDD(0, (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance - (tBottom - tTop)) / 2);
        tTop -= d;
        tBottom += d;
      }
       else {
        tTop = 0;
        tBottom = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, 0), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance;
      }
    }
    for (c$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_last = c$iterator.java_util_AbstractList$IteratorImpl_i++), 13));
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, c, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
    }
  }
  empty && (tLeft = tRight = tTop = tBottom = 0);
  return new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(tLeft, tTop, tRight - tLeft, tBottom - tTop);
}

function lv_lumii_layoutengine_AbstractContainer_$findNextRectangleEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(this$static){
  var nextRectangles, rectangle, rectangle$iterator, tBottom, tLeft, tRight, tSpacing, tTop;
  nextRectangles = this$static.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2(false);
  if (nextRectangles.java_util_ArrayList_array.length == 0) {
    return null;
  }
  tLeft = $intern_53;
  tTop = $intern_53;
  tRight = $intern_20;
  tBottom = $intern_20;
  for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(nextRectangles); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    tSpacing = rectangle.lv_lumii_layoutengine_Element_spacing;
    tLeft = java_lang_Math_min__DDD(tLeft, rectangle.lv_lumii_layoutengine_AbstractContainer_left - tSpacing);
    tTop = java_lang_Math_min__DDD(tTop, rectangle.lv_lumii_layoutengine_AbstractContainer_top - tSpacing);
    tRight = java_lang_Math_max__DDD(tRight, rectangle.lv_lumii_layoutengine_AbstractContainer_right + tSpacing);
    tBottom = java_lang_Math_max__DDD(tBottom, rectangle.lv_lumii_layoutengine_AbstractContainer_bottom + tSpacing);
  }
  return new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(tLeft, tTop, tRight - tLeft, tBottom - tTop);
}

function lv_lumii_layoutengine_AbstractContainer_$getAbstractContainers__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_AbstractContainer_insideLabels);
}

function lv_lumii_layoutengine_AbstractContainer_$getCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2(this$static){
  return new java_awt_geom_Point2D$Double_Point2D$Double__DDV((this$static.lv_lumii_layoutengine_AbstractContainer_left + this$static.lv_lumii_layoutengine_AbstractContainer_right) / 2, (this$static.lv_lumii_layoutengine_AbstractContainer_top + this$static.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
}

function lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D(this$static){
  return (this$static.lv_lumii_layoutengine_AbstractContainer_left + this$static.lv_lumii_layoutengine_AbstractContainer_right) / 2;
}

function lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D(this$static){
  return (this$static.lv_lumii_layoutengine_AbstractContainer_top + this$static.lv_lumii_layoutengine_AbstractContainer_bottom) / 2;
}

function lv_lumii_layoutengine_AbstractContainer_$getDescendantAbstractContainers__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(this$static, includeOutsideLabels){
  var container, descendants, queue;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  descendants = new java_util_ArrayList_ArrayList__V;
  queue = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(this$static.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(includeOutsideLabels));
  while (queue.java_util_LinkedList_size != 0) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 12));
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(descendants.java_util_ArrayList_array, descendants.java_util_ArrayList_array.length, container);
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, container.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(includeOutsideLabels));
  }
  includeOutsideLabels && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 16) && !com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 66) && java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(descendants, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static, 16).lv_lumii_layoutengine_Box_outsideLabels));
  return descendants;
}

function lv_lumii_layoutengine_AbstractContainer_$getDescendantRectangles__Llv_lumii_layoutengine_AbstractContainer_2ZZLjava_util_ArrayList_2(this$static, inclusive, includeOutsideLabels){
  var container, descendants, queue;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  descendants = new java_util_ArrayList_ArrayList__V;
  queue = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(this$static.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(includeOutsideLabels));
  while (queue.java_util_LinkedList_size != 0) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 12));
    com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(container, 62) && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(descendants.java_util_ArrayList_array, descendants.java_util_ArrayList_array.length, container) , true);
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, container.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(includeOutsideLabels));
  }
  inclusive && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 62) && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(descendants.java_util_ArrayList_array, descendants.java_util_ArrayList_array.length, this$static) , true);
  includeOutsideLabels && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 16) && !com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 66) && java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(descendants, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static, 16).lv_lumii_layoutengine_Box_outsideLabels));
  return descendants;
}

function lv_lumii_layoutengine_AbstractContainer_$getInsideLabels__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_AbstractContainer_insideLabels);
}

function lv_lumii_layoutengine_AbstractContainer_$getLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_LayoutConstraints_2(this$static){
  return this$static.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(this$static):this$static.lv_lumii_layoutengine_AbstractContainer_layoutConstraints;
}

function lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(this$static, inclusive){
  var tOwner;
  if (inclusive && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 62)) {
    return this$static;
  }
  tOwner = this$static.getOwner__Llv_lumii_layoutengine_Element_2();
  while (!!tOwner && !com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(tOwner, 62)) {
    tOwner = tOwner.getOwner__Llv_lumii_layoutengine_Element_2();
  }
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tOwner, 12);
}

function lv_lumii_layoutengine_AbstractContainer_$getRectangles__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_AbstractContainer_insideLabels);
}

function lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, bounds){
  this$static.lv_lumii_layoutengine_AbstractContainer_left = bounds.java_awt_geom_Rectangle2D$Double_x;
  this$static.lv_lumii_layoutengine_AbstractContainer_right = bounds.java_awt_geom_Rectangle2D$Double_x + bounds.java_awt_geom_Rectangle2D$Double_width;
  this$static.lv_lumii_layoutengine_AbstractContainer_top = bounds.java_awt_geom_Rectangle2D$Double_y;
  this$static.lv_lumii_layoutengine_AbstractContainer_bottom = bounds.java_awt_geom_Rectangle2D$Double_y + bounds.java_awt_geom_Rectangle2D$Double_height;
}

function lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(this$static, newCenter){
  var oldCenter;
  oldCenter = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((this$static.lv_lumii_layoutengine_AbstractContainer_left + this$static.lv_lumii_layoutengine_AbstractContainer_right) / 2, (this$static.lv_lumii_layoutengine_AbstractContainer_top + this$static.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(this$static, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newCenter.java_awt_geom_Point2D$Double_x - oldCenter.java_awt_geom_Point2D$Double_x, newCenter.java_awt_geom_Point2D$Double_y - oldCenter.java_awt_geom_Point2D$Double_y));
}

function lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(this$static, width_0, height){
  this$static.lv_lumii_layoutengine_AbstractContainer_minWidth = java_lang_Math_max__DDD(width_0, this$static.lv_lumii_layoutengine_AbstractContainer_userMinWidth);
  this$static.lv_lumii_layoutengine_AbstractContainer_minHeight = java_lang_Math_max__DDD(height, this$static.lv_lumii_layoutengine_AbstractContainer_userMinHeight);
}

function lv_lumii_layoutengine_AbstractContainer_$setDesiredCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(this$static, desiredCenter){
  this$static.lv_lumii_layoutengine_AbstractContainer_desiredCenter = desiredCenter;
}

function lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(this$static, vector){
  this$static.lv_lumii_layoutengine_AbstractContainer_left += vector.java_awt_geom_Point2D$Double_x;
  this$static.lv_lumii_layoutengine_AbstractContainer_right += vector.java_awt_geom_Point2D$Double_x;
  this$static.lv_lumii_layoutengine_AbstractContainer_top += vector.java_awt_geom_Point2D$Double_y;
  this$static.lv_lumii_layoutengine_AbstractContainer_bottom += vector.java_awt_geom_Point2D$Double_y;
}

function lv_lumii_layoutengine_AbstractContainer_AbstractContainer__DDDDLlv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(left, right, top_0, bottom, owner, constraintType, spacing){
  var epsilon;
  lv_lumii_layoutengine_Element_Element__Llv_lumii_layoutengine_Element_2DV.call(this, owner, spacing);
  this.lv_lumii_layoutengine_AbstractContainer_hide = false;
  epsilon = this.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  right = right > left + 10 * epsilon?right:left + 10 * epsilon;
  bottom = bottom > top_0 + 10 * epsilon?bottom:top_0 + 10 * epsilon;
  this.lv_lumii_layoutengine_AbstractContainer_left = left;
  this.lv_lumii_layoutengine_AbstractContainer_right = right;
  this.lv_lumii_layoutengine_AbstractContainer_top = top_0;
  this.lv_lumii_layoutengine_AbstractContainer_bottom = bottom;
  this.lv_lumii_layoutengine_AbstractContainer_userMinWidth = right - left;
  this.lv_lumii_layoutengine_AbstractContainer_userMinHeight = bottom - top_0;
  this.lv_lumii_layoutengine_AbstractContainer_id = lv_lumii_layoutengine_AbstractContainer_nextId++;
  this.lv_lumii_layoutengine_AbstractContainer_desiredCenter = new java_awt_geom_Point2D$Double_Point2D$Double__V;
  this.lv_lumii_layoutengine_AbstractContainer_insideLabels = new java_util_LinkedHashSet_LinkedHashSet__V;
  lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(this, this.lv_lumii_layoutengine_AbstractContainer_userMinWidth, this.lv_lumii_layoutengine_AbstractContainer_userMinHeight);
  switch (constraintType) {
    case 0:
      this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints = new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(this);
      break;
    case 1:
      this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints = new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_LayoutConstraints$GridLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(this);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(12, 57, {12:1, 57:1});
_.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2 = function lv_lumii_layoutengine_AbstractContainer_getAbstractContainers__ZLjava_util_ArrayList_2(includeOutsideLabels){
  return lv_lumii_layoutengine_AbstractContainer_$getAbstractContainers__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(this);
}
;
_.getBounds__Ljava_awt_geom_Rectangle2D$Double_2 = function lv_lumii_layoutengine_AbstractContainer_getBounds__Ljava_awt_geom_Rectangle2D$Double_2(){
  return new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(this.lv_lumii_layoutengine_AbstractContainer_left, this.lv_lumii_layoutengine_AbstractContainer_top, this.lv_lumii_layoutengine_AbstractContainer_right - this.lv_lumii_layoutengine_AbstractContainer_left, this.lv_lumii_layoutengine_AbstractContainer_bottom - this.lv_lumii_layoutengine_AbstractContainer_top);
}
;
_.package_private$lv_lumii_layoutengine_Element$getChildren__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_AbstractContainer_getChildren__Ljava_util_ArrayList_2(){
  return this.lv_lumii_layoutengine_AbstractContainer_hide?new java_util_ArrayList_ArrayList__V:new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_AbstractContainer_insideLabels);
}
;
_.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2 = function lv_lumii_layoutengine_AbstractContainer_getNextRectangles__ZLjava_util_ArrayList_2(includeOutsideLabels){
  if (this.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_AbstractContainer_insideLabels);
}
;
_.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_AbstractContainer_getPureContainers__Ljava_util_ArrayList_2(){
  return new java_util_ArrayList_ArrayList__V;
}
;
_.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_AbstractContainer_getRectangles__Ljava_util_ArrayList_2(){
  return lv_lumii_layoutengine_AbstractContainer_$getRectangles__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2(this);
}
;
_.package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V = function lv_lumii_layoutengine_AbstractContainer_removeChild__Llv_lumii_layoutengine_Element_2V(element){
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39) && lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1remove__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39), element);
}
;
_.lv_lumii_layoutengine_AbstractContainer_bottom = 0;
_.lv_lumii_layoutengine_AbstractContainer_hide = false;
_.lv_lumii_layoutengine_AbstractContainer_id = 0;
_.lv_lumii_layoutengine_AbstractContainer_left = 0;
_.lv_lumii_layoutengine_AbstractContainer_minHeight = 0;
_.lv_lumii_layoutengine_AbstractContainer_minWidth = 0;
_.lv_lumii_layoutengine_AbstractContainer_right = 0;
_.lv_lumii_layoutengine_AbstractContainer_top = 0;
_.lv_lumii_layoutengine_AbstractContainer_userMinHeight = 0;
_.lv_lumii_layoutengine_AbstractContainer_userMinWidth = 0;
var lv_lumii_layoutengine_AbstractContainer_nextId = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1AbstractContainer_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'AbstractContainer', 12);
function lv_lumii_layoutengine_Adjuster_calculateIntersections__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2I(label_0, grid, startInOutTime, endInOutTime, first, second){
  var cell, chain, chain$iterator, column, column0, column1, column2, columnBounds, comparedChain, corner, cornerOnLine, countFirstIntersection, end, endColumn, endRow, epsilon, i, i0, inTime, intersectionMask, intersects, labelChain, labelLine, outTime, row, rowBounds, start_0, startColumn, startRow;
  labelChain = lv_lumii_layoutengine_GeometryHelper_getChainPoints__Llv_lumii_layoutengine_AbstractContainer_2_3Ljava_awt_geom_Point2D$Double_2(label_0);
  columnBounds = lv_lumii_layoutengine_Adjuster$Grid_$findColumnBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(grid, labelChain);
  rowBounds = lv_lumii_layoutengine_Adjuster$Grid_$findRowBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(grid, labelChain);
  startColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(columnBounds.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
  endColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(columnBounds.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value;
  startRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rowBounds.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
  endRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rowBounds.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value;
  intersectionMask = 0;
  comparedChain = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, grid.lv_lumii_layoutengine_Adjuster$Grid_nextId, 8, 1);
  epsilon = label_0.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  cornerOnLine = false;
  for (i0 = 0; i0 < 4; i0++) {
    corner = labelChain[i0];
    if (java_awt_geom_Line2D_ptSegDistSq__DDDDDDD(first.java_awt_geom_Point2D$Double_x, first.java_awt_geom_Point2D$Double_y, second.java_awt_geom_Point2D$Double_x, second.java_awt_geom_Point2D$Double_y, corner.java_awt_geom_Point2D$Double_x, corner.java_awt_geom_Point2D$Double_y) < epsilon) {
      cornerOnLine = true;
      break;
    }
  }
  cornerOnLine || (intersectionMask |= 128);
  labelLine = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10);
  start_0 = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(labelLine);
  end = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(labelLine);
  (lv_lumii_layoutengine_GeometryHelper$Chain_$intersects__Llv_lumii_layoutengine_GeometryHelper$Chain_2_3Ljava_awt_geom_Point2D$Double_2Z(new lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain__Llv_lumii_layoutengine_AbstractContainer_2IV(start_0, 0), labelChain) || lv_lumii_layoutengine_GeometryHelper$Chain_$intersects__Llv_lumii_layoutengine_GeometryHelper$Chain_2_3Ljava_awt_geom_Point2D$Double_2Z(new lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain__Llv_lumii_layoutengine_AbstractContainer_2IV(end, 0), labelChain)) && (intersectionMask |= 64);
  if (label_0.lv_lumii_layoutengine_OutsideLabel_position != 0 && label_0.lv_lumii_layoutengine_OutsideLabel_position != 1) {
    intersects = false;
    for (column0 = startColumn; column0 <= endColumn && !intersects; column0++) {
      for (row = startRow; row <= endRow && !intersects; row++) {
        cell = grid.lv_lumii_layoutengine_Adjuster$Grid_cells[column0][row];
        for (i = 0; i < cell.lv_lumii_layoutengine_Adjuster$Cell_boxChains.java_util_ArrayList_array.length; i++) {
          inTime = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(cell.lv_lumii_layoutengine_Adjuster$Cell_boxInTime, i), 9).java_lang_Integer_value;
          outTime = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(cell.lv_lumii_layoutengine_Adjuster$Cell_boxOutTime, i), 9).java_lang_Integer_value;
          if (java_lang_Math_min__III(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(startInOutTime.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value, outTime) < java_lang_Math_max__III(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(startInOutTime.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value, inTime) && java_lang_Math_min__III(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endInOutTime.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value, outTime) < java_lang_Math_max__III(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endInOutTime.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value, inTime)) {
            chain = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(cell.lv_lumii_layoutengine_Adjuster$Cell_boxChains, i), 71);
            if (!comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id]) {
              comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id] = true;
              if (lv_lumii_layoutengine_GeometryHelper$Chain_$intersects__Llv_lumii_layoutengine_GeometryHelper$Chain_2_3Ljava_awt_geom_Point2D$Double_2Z(chain, labelChain)) {
                intersects = true;
                break;
              }
            }
          }
        }
      }
    }
    for (column1 = startColumn; column1 <= endColumn && !intersects; column1++) {
      for (row = startRow; row <= endRow && !intersects; row++) {
        cell = grid.lv_lumii_layoutengine_Adjuster$Grid_cells[column1][row];
        for (chain$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(cell.lv_lumii_layoutengine_Adjuster$Cell_insideLabelChains); chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          chain = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_last = chain$iterator.java_util_AbstractList$IteratorImpl_i++), 71));
          if (!comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id]) {
            comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id] = true;
            if (lv_lumii_layoutengine_GeometryHelper$Chain_$intersects__Llv_lumii_layoutengine_GeometryHelper$Chain_2_3Ljava_awt_geom_Point2D$Double_2Z(chain, labelChain)) {
              intersects = true;
              break;
            }
          }
        }
      }
    }
    intersects && (intersectionMask |= 32);
    countFirstIntersection = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation != (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER);
    intersects = false;
    for (column2 = startColumn; column2 <= endColumn && !intersects; column2++) {
      for (row = startRow; row <= endRow && !intersects; row++) {
        cell = grid.lv_lumii_layoutengine_Adjuster$Grid_cells[column2][row];
        for (chain$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(cell.lv_lumii_layoutengine_Adjuster$Cell_lineChains); chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          chain = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_last = chain$iterator.java_util_AbstractList$IteratorImpl_i++), 71));
          if (!comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id]) {
            comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id] = true;
            if (lv_lumii_layoutengine_GeometryHelper$Chain_$intersects__Llv_lumii_layoutengine_GeometryHelper$Chain_2_3Ljava_awt_geom_Point2D$Double_2Z(chain, labelChain)) {
              if (countFirstIntersection) {
                intersects = true;
                break;
              }
               else {
                countFirstIntersection = true;
              }
            }
          }
        }
      }
    }
    intersects && (intersectionMask |= 16);
  }
  intersects = false;
  for (column = startColumn; column <= endColumn && !intersects; column++) {
    for (row = startRow; row <= endRow && !intersects; row++) {
      cell = grid.lv_lumii_layoutengine_Adjuster$Grid_cells[column][row];
      for (chain$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(cell.lv_lumii_layoutengine_Adjuster$Cell_outsideLabelChains); chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        chain = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_last = chain$iterator.java_util_AbstractList$IteratorImpl_i++), 71));
        if (!comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id]) {
          comparedChain[chain.lv_lumii_layoutengine_GeometryHelper$Chain_id] = true;
          if (lv_lumii_layoutengine_GeometryHelper$Chain_$intersects__Llv_lumii_layoutengine_GeometryHelper$Chain_2_3Ljava_awt_geom_Point2D$Double_2Z(chain, labelChain)) {
            intersects = true;
            break;
          }
        }
      }
    }
  }
  intersects && (intersectionMask |= 8);
  return intersectionMask;
}

function lv_lumii_layoutengine_Adjuster_calculateMaskOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2I(label_0, first, second, point, grid, startInOutTime, endInOutTime){
  var intersectionMask, otherSideIntersectionMask;
  lv_lumii_layoutengine_GeometryHelper_placeLabelOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(label_0, first, second, point);
  intersectionMask = lv_lumii_layoutengine_Adjuster_calculateIntersections__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2I(label_0, grid, startInOutTime, endInOutTime, first, second);
  if (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation == (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_BOTH) && intersectionMask != 0) {
    label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth = !label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth;
    lv_lumii_layoutengine_GeometryHelper_placeLabelOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(label_0, first, second, point);
    otherSideIntersectionMask = lv_lumii_layoutengine_Adjuster_calculateIntersections__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2I(label_0, grid, startInOutTime, endInOutTime, first, second);
    otherSideIntersectionMask < intersectionMask?(intersectionMask = otherSideIntersectionMask):(label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth = !label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth);
  }
  return intersectionMask;
}

function lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(diagram){
  var boxInOutTime, cellHeight, cellWidth, center, comparator, element, element$iterator, endInOutTime, epsilon, first, grid, gridHeight, gridWidth, height, i, insideLabel, insideLabel$iterator, interval, intervalRatio, label_0, label$iterator, label$iterator0, label$iterator1, labels, leftIndex, leftTop, len, line, line$iterator, line$iterator0, lineGeometry, lineLength, minSpacing, moveVector, newCenter, oldCenter, orientation, partLength, pinCount, pinLength, pinPosition, pinPositions, pinSegments, pins, points, polyline, pos, ratio, rightIndex, second, segmentHorizontal, segmentIndex, segmentLength, segmentPtr, startInOutTime, startX, startY, toChange, width_0, x_0, y_0;
  epsilon = diagram.lv_lumii_layoutengine_Diagram_epsilon;
  len = epsilon / $intern_55;
  for (label$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); label$iterator0.java_util_AbstractList$IteratorImpl_i < label$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator0.java_util_AbstractList$IteratorImpl_i < label$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator0.java_util_AbstractList$IteratorImpl_last = label$iterator0.java_util_AbstractList$IteratorImpl_i++), 78));
    label_0.lv_lumii_layoutengine_OutsideLabel_position == 0?(label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = 0):label_0.lv_lumii_layoutengine_OutsideLabel_position == 1 && (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2);
    if (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      segmentIndex = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
      points = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
      first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex], 3));
      second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex + 1], 3));
      segmentHorizontal = first.java_awt_geom_Point2D$Double_y == second.java_awt_geom_Point2D$Double_y;
      if (segmentHorizontal != label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal) {
        label_0.lv_lumii_layoutengine_OutsideLabel_autoFlip && (lv_lumii_layoutengine_OutsideLabel_$_1flip__Llv_lumii_layoutengine_OutsideLabel_2V(label_0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != lv_lumii_layoutengine_Line$LineType_ORTHOGONAL && lv_lumii_layoutengine_OutsideLabel$LineLabel_$resetBounds__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2V(label_0));
        label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal = segmentHorizontal;
      }
      pos = segmentHorizontal?(label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2:(label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2;
      label_0.lv_lumii_layoutengine_OutsideLabel_position == 0?(pos = segmentHorizontal?first.java_awt_geom_Point2D$Double_x:first.java_awt_geom_Point2D$Double_y):label_0.lv_lumii_layoutengine_OutsideLabel_position == 1 && (pos = segmentHorizontal?second.java_awt_geom_Point2D$Double_x:second.java_awt_geom_Point2D$Double_y);
      segmentHorizontal?(pos = java_lang_Math_min__DDD(java_lang_Math_max__DDD(first.java_awt_geom_Point2D$Double_x, second.java_awt_geom_Point2D$Double_x) - epsilon, java_lang_Math_max__DDD(java_lang_Math_min__DDD(first.java_awt_geom_Point2D$Double_x, second.java_awt_geom_Point2D$Double_x) + epsilon, pos))):(pos = java_lang_Math_min__DDD(java_lang_Math_max__DDD(first.java_awt_geom_Point2D$Double_y, second.java_awt_geom_Point2D$Double_y) - epsilon, java_lang_Math_max__DDD(java_lang_Math_min__DDD(first.java_awt_geom_Point2D$Double_y, second.java_awt_geom_Point2D$Double_y) + epsilon, pos)));
      leftTop = lv_lumii_layoutengine_OutsideLabel$LineLabel_$isLeftTop__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(label_0);
      orientation = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation;
      if (segmentHorizontal) {
        label_0.lv_lumii_layoutengine_AbstractContainer_left = label_0.lv_lumii_layoutengine_AbstractContainer_right = pos;
        if (orientation == (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)) {
          label_0.lv_lumii_layoutengine_AbstractContainer_top = first.java_awt_geom_Point2D$Double_y - len;
          label_0.lv_lumii_layoutengine_AbstractContainer_bottom = first.java_awt_geom_Point2D$Double_y + len;
        }
         else {
          if (leftTop) {
            label_0.lv_lumii_layoutengine_AbstractContainer_top = first.java_awt_geom_Point2D$Double_y - len;
            label_0.lv_lumii_layoutengine_AbstractContainer_bottom = first.java_awt_geom_Point2D$Double_y;
          }
           else {
            label_0.lv_lumii_layoutengine_AbstractContainer_top = first.java_awt_geom_Point2D$Double_y;
            label_0.lv_lumii_layoutengine_AbstractContainer_bottom = first.java_awt_geom_Point2D$Double_y + len;
          }
        }
      }
       else {
        label_0.lv_lumii_layoutengine_AbstractContainer_top = label_0.lv_lumii_layoutengine_AbstractContainer_bottom = pos;
        if (orientation == (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)) {
          label_0.lv_lumii_layoutengine_AbstractContainer_left = first.java_awt_geom_Point2D$Double_x - len;
          label_0.lv_lumii_layoutengine_AbstractContainer_right = first.java_awt_geom_Point2D$Double_x + len;
        }
         else {
          if (leftTop) {
            label_0.lv_lumii_layoutengine_AbstractContainer_left = first.java_awt_geom_Point2D$Double_x - len;
            label_0.lv_lumii_layoutengine_AbstractContainer_right = first.java_awt_geom_Point2D$Double_x;
          }
           else {
            label_0.lv_lumii_layoutengine_AbstractContainer_left = first.java_awt_geom_Point2D$Double_x;
            label_0.lv_lumii_layoutengine_AbstractContainer_right = first.java_awt_geom_Point2D$Double_x + len;
          }
        }
      }
      lv_lumii_layoutengine_AbstractContainer_$setDesiredCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
    }
     else {
      if (label_0.lv_lumii_layoutengine_OutsideLabel_position == 0 || label_0.lv_lumii_layoutengine_OutsideLabel_position == 1) {
        lineGeometry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry;
        points = lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
        toChange = true;
        if (lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == lv_lumii_layoutengine_Line$LineType_POLYLINE) {
          polyline = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineGeometry, 88);
          (label_0.lv_lumii_layoutengine_OutsideLabel_position == 0 && java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldStartPoint, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , points.java_util_ArrayList_array[0])) && java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldSecondPoint, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, points.java_util_ArrayList_array.length) , points.java_util_ArrayList_array[1])) || label_0.lv_lumii_layoutengine_OutsideLabel_position == 1 && java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldPenultimatePoint, java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 2)) && java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldEndPoint, java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1))) && (toChange = false);
        }
        toChange && lv_lumii_layoutengine_GeometryHelper_placeLabelOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(label_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3), label_0.lv_lumii_layoutengine_OutsideLabel_position == 0?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)):com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3));
        label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition = label_0.lv_lumii_layoutengine_OutsideLabel_position;
      }
    }
  }
  for (line$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_last = line$iterator0.java_util_AbstractList$IteratorImpl_i++), 10));
    if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_POLYLINE)) {
      polyline = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry, 88);
      points = polyline.lv_lumii_layoutengine_LineGeometry_points;
      polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldStartPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
      polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldSecondPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[1], 3));
      polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldPenultimatePoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 2), 3);
      polyline.lv_lumii_layoutengine_LineGeometry$Polyline_oldEndPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3);
    }
  }
  lv_lumii_layoutengine_Normalizer_adjustOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(diagram);
  for (label$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); label$iterator1.java_util_AbstractList$IteratorImpl_i < label$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator1.java_util_AbstractList$IteratorImpl_i < label$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator1.java_util_AbstractList$IteratorImpl_last = label$iterator1.java_util_AbstractList$IteratorImpl_i++), 78));
    newCenter = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    oldCenter = label_0.lv_lumii_layoutengine_OutsideLabel_oldCenter;
    if (!java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(newCenter, oldCenter)) {
      moveVector = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newCenter.java_awt_geom_Point2D$Double_x - oldCenter.java_awt_geom_Point2D$Double_x, newCenter.java_awt_geom_Point2D$Double_y - oldCenter.java_awt_geom_Point2D$Double_y);
      for (insideLabel$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_AbstractContainer_$getDescendantRectangles__Llv_lumii_layoutengine_AbstractContainer_2ZZLjava_util_ArrayList_2(label_0, false, false)); insideLabel$iterator.java_util_AbstractList$IteratorImpl_i < insideLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        insideLabel = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(insideLabel$iterator.java_util_AbstractList$IteratorImpl_i < insideLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(insideLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(insideLabel$iterator.java_util_AbstractList$IteratorImpl_last = insideLabel$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
        lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(insideLabel, moveVector);
      }
    }
    label_0.lv_lumii_layoutengine_OutsideLabel_oldCenter = newCenter;
  }
  startX = diagram.lv_lumii_layoutengine_AbstractContainer_left;
  startY = diagram.lv_lumii_layoutengine_AbstractContainer_top;
  width_0 = diagram.lv_lumii_layoutengine_AbstractContainer_right - diagram.lv_lumii_layoutengine_AbstractContainer_left;
  height = diagram.lv_lumii_layoutengine_AbstractContainer_bottom - diagram.lv_lumii_layoutengine_AbstractContainer_top;
  gridWidth = java_lang_Math_min__III(600, com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_sqrt__DD(width_0)));
  gridHeight = java_lang_Math_min__III(600, com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_sqrt__DD(height)));
  cellWidth = width_0 / gridWidth;
  cellHeight = height / gridHeight;
  grid = new lv_lumii_layoutengine_Adjuster$Grid_Adjuster$Grid__IIDDDDV(gridWidth, gridHeight, startX, startY, cellWidth, cellHeight);
  boxInOutTime = new java_util_HashMap_HashMap__V;
  lv_lumii_layoutengine_Adjuster_insertBoxesInGrid__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Adjuster$Grid_2Ljava_util_HashMap_2II(diagram, grid, boxInOutTime, 0);
  for (element$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Element_$getDescendants__Llv_lumii_layoutengine_Element_2Ljava_util_ArrayList_2(diagram)); element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    element = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_last = element$iterator.java_util_AbstractList$IteratorImpl_i++), 57));
    !com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 13) && !(com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 28) && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element.getOwner__Llv_lumii_layoutengine_Element_2(), 10).lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) && lv_lumii_layoutengine_Adjuster$Grid_$insert__Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_Element_2V(grid, element);
  }
  comparator = new lv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_Adjuster$LabelCurrentPositionComparator__V;
  minSpacing = diagram.lv_lumii_layoutengine_Diagram_epsilon / 1.8E-7;
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      labels = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels);
      startInOutTime = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxInOutTime.get__Ljava_lang_Object_2Ljava_lang_Object_2(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)), 18);
      endInOutTime = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxInOutTime.get__Ljava_lang_Object_2Ljava_lang_Object_2(lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)), 18);
      if (labels.java_util_ArrayList_array.length != 0) {
        for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(labels); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
          center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
          lv_lumii_layoutengine_GeometryHelper_movePointToLine__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2IV(center, line, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex);
          lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, center);
        }
        java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(labels, comparator);
        lineLength = lv_lumii_layoutengine_LineGeometry_$getLength__Llv_lumii_layoutengine_LineGeometry_2D(line.lv_lumii_layoutengine_Line_lineGeometry);
        pinCount = java_lang_Math_max__III(5, java_lang_Math_min__III(100, com_google_gwt_lang_Cast_round_1int__DI(lineLength / minSpacing)));
        points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(line);
        interval = lineLength / (pinCount + 1);
        partLength = 0;
        segmentLength = 0;
        pinLength = interval;
        pins = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Point2D$Double_12_1classLit, $intern_14, 3, pinCount, 0, 1);
        pinSegments = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, pinCount, 7, 1);
        pinPositions = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, pinCount, 7, 1);
        intervalRatio = 1 / (pinCount + 1);
        pinPosition = intervalRatio;
        segmentPtr = -1;
        first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
        second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
        for (i = 0; i < pinCount; ++i , pinLength += interval) {
          while (partLength + segmentLength < pinLength) {
            ++segmentPtr;
            first = second;
            second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentPtr + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentPtr + 1], 3));
            partLength += segmentLength;
            segmentLength = java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(first, second);
          }
          ratio = (pinLength - partLength) / segmentLength;
          x_0 = first.java_awt_geom_Point2D$Double_x + ratio * (second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x);
          y_0 = first.java_awt_geom_Point2D$Double_y + ratio * (second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y);
          pins[i] = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, y_0);
          pinPositions[i] = pinPosition;
          pinPosition += intervalRatio;
          pinSegments[i] = segmentPtr;
        }
        rightIndex = labels.java_util_ArrayList_array.length - 1;
        while (rightIndex >= 0 && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(rightIndex, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[rightIndex], 28)).lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition == 1) {
          lv_lumii_layoutengine_Adjuster_placeLabel__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2_3Ljava_awt_geom_Point2D$Double_2_3I_3DILlv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(rightIndex, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[rightIndex], 28)), pins, pinSegments, pinPositions, pinCount - 1, grid, startInOutTime, endInOutTime);
          --rightIndex;
        }
        for (leftIndex = 0; leftIndex <= rightIndex; leftIndex++) {
          label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(leftIndex, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[leftIndex], 28));
          lv_lumii_layoutengine_Adjuster_placeLabel__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2_3Ljava_awt_geom_Point2D$Double_2_3I_3DILlv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2V(label_0, pins, pinSegments, pinPositions, java_lang_Math_max__III(0, java_lang_Math_min__III(pinCount - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(lineLength * label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition / interval))) - 1)), grid, startInOutTime, endInOutTime);
        }
      }
    }
  }
  diagram.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(diagram);
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(diagram, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(diagram));
}

function lv_lumii_layoutengine_Adjuster_insertBoxesInGrid__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Adjuster$Grid_2Ljava_util_HashMap_2II(box, grid, boxInOutTime, timer){
  var inTime, nextBox, nextBox$iterator, outTime;
  inTime = timer;
  for (nextBox$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getNextBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(box)); nextBox$iterator.java_util_AbstractList$IteratorImpl_i < nextBox$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    nextBox = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(nextBox$iterator.java_util_AbstractList$IteratorImpl_i < nextBox$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nextBox$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(nextBox$iterator.java_util_AbstractList$IteratorImpl_last = nextBox$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
    timer = lv_lumii_layoutengine_Adjuster_insertBoxesInGrid__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Adjuster$Grid_2Ljava_util_HashMap_2II(nextBox, grid, boxInOutTime, timer);
  }
  outTime = timer++;
  boxInOutTime.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(box, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(inTime), java_lang_Integer_valueOf__ILjava_lang_Integer_2(outTime)));
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(box, 66) || lv_lumii_layoutengine_Adjuster$Grid_$insert__Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_Box_2IIV(grid, box, inTime, outTime);
  return timer;
}

function lv_lumii_layoutengine_Adjuster_placeLabel__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2_3Ljava_awt_geom_Point2D$Double_2_3I_3DILlv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2V(label_0, pins, pinSegments, pinPositions, closestPin, grid, startInOutTime, endInOutTime){
  var bestClockwise, bestIntersectionMask, bestPoint, bestPosition, bestSegmentIndex, i, intersectionMask, leftPin, pinSegment, points, rightLimit, rightPin;
  points = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  bestPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  bestIntersectionMask = lv_lumii_layoutengine_Adjuster_calculateMaskOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2I(label_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3), bestPoint, grid, startInOutTime, endInOutTime);
  bestClockwise = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth;
  bestSegmentIndex = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
  bestPosition = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition;
  if (bestIntersectionMask != 0) {
    leftPin = closestPin;
    rightPin = closestPin + 1;
    rightLimit = pins.length - 1;
    for (i = 0; i < pins.length; i++) {
      if (leftPin >= 0) {
        pinSegment = pinSegments[leftPin];
        label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = pinSegment;
        intersectionMask = lv_lumii_layoutengine_Adjuster_calculateMaskOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2I(label_0, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pinSegment, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pinSegment], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pinSegment + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pinSegment + 1], 3)), pins[leftPin], grid, startInOutTime, endInOutTime);
        if (intersectionMask < bestIntersectionMask) {
          bestIntersectionMask = intersectionMask;
          bestClockwise = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth;
          bestSegmentIndex = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
          bestPoint = pins[leftPin];
          bestPosition = pinPositions[leftPin];
          if (intersectionMask == 0) {
            break;
          }
        }
      }
      if (rightPin <= rightLimit) {
        pinSegment = pinSegments[rightPin];
        label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = pinSegment;
        intersectionMask = lv_lumii_layoutengine_Adjuster_calculateMaskOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2I(label_0, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pinSegment, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pinSegment], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pinSegment + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pinSegment + 1], 3)), pins[rightPin], grid, startInOutTime, endInOutTime);
        if (intersectionMask < bestIntersectionMask) {
          bestIntersectionMask = intersectionMask;
          bestClockwise = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth;
          bestSegmentIndex = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
          bestPoint = pins[rightPin];
          bestPosition = pinPositions[rightPin];
          if (intersectionMask == 0) {
            break;
          }
        }
      }
      --leftPin;
      ++rightPin;
    }
  }
  label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth = bestClockwise;
  label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = bestSegmentIndex;
  label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition = bestPosition;
  lv_lumii_layoutengine_GeometryHelper_placeLabelOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(label_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3), bestPoint);
  lv_lumii_layoutengine_Adjuster$Grid_$insert__Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_Element_2V(grid, label_0);
}

function lv_lumii_layoutengine_Adjuster_placeRectangles__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Llv_lumii_layoutengine_AbstractContainer_2V(rectangles, newCenters, growPoints, prevRect){
  var bounds, center, col, colIndices, constraints, descendantRect, descendantRect$iterator, diagram, enclosingRectangle, epsilon, growPoint, growPoint$iterator, i, i0, i1, i2, maxBottom, maxRight, minLeft, minTop, moveVector, newCenter, nextRects, oldCenter, oldCenters, owner, rect, rect$iterator, rect$iterator0, rectangle, rectangle$iterator, row, rowIndices, spacing, tNewCenters, tRectangles;
  diagram = prevRect.lv_lumii_layoutengine_Element_diagram;
  oldCenters = new java_util_ArrayList_ArrayList__V;
  for (i0 = 0; i0 < rectangles.java_util_ArrayList_array.length; i0++) {
    center = lv_lumii_layoutengine_AbstractContainer_$getCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i0], 12)));
    lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i0], 12)), new java_awt_geom_Point2D$Double_Point2D$Double__DDV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_x - center.java_awt_geom_Point2D$Double_x, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_y - center.java_awt_geom_Point2D$Double_y));
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(oldCenters.java_util_ArrayList_array, oldCenters.java_util_ArrayList_array.length, center);
  }
  if (prevRect != diagram) {
    enclosingRectangle = prevRect.getBounds__Ljava_awt_geom_Rectangle2D$Double_2();
    minLeft = prevRect.lv_lumii_layoutengine_AbstractContainer_left;
    maxRight = prevRect.lv_lumii_layoutengine_AbstractContainer_right;
    minTop = prevRect.lv_lumii_layoutengine_AbstractContainer_top;
    maxBottom = prevRect.lv_lumii_layoutengine_AbstractContainer_bottom;
    for (rect$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator0.java_util_AbstractList$IteratorImpl_i < rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator0.java_util_AbstractList$IteratorImpl_i < rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator0.java_util_AbstractList$IteratorImpl_last = rect$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
      bounds = rect.getBounds__Ljava_awt_geom_Rectangle2D$Double_2();
      spacing = rect.lv_lumii_layoutengine_Element_spacing;
      minLeft = java_lang_Math_min__DDD(minLeft, bounds.java_awt_geom_Rectangle2D$Double_x - spacing);
      maxRight = java_lang_Math_max__DDD(maxRight, bounds.java_awt_geom_Rectangle2D$Double_x + bounds.java_awt_geom_Rectangle2D$Double_width + spacing);
      minTop = java_lang_Math_min__DDD(minTop, bounds.java_awt_geom_Rectangle2D$Double_y - spacing);
      maxBottom = java_lang_Math_max__DDD(maxBottom, bounds.java_awt_geom_Rectangle2D$Double_y + bounds.java_awt_geom_Rectangle2D$Double_height + spacing);
    }
    java_awt_geom_Rectangle2D$Double_$setRect__Ljava_awt_geom_Rectangle2D$Double_2DDDDV(enclosingRectangle, minLeft, minTop, maxRight - minLeft, maxBottom - minTop);
    rowIndices = new java_util_ArrayList_ArrayList__V;
    colIndices = new java_util_ArrayList_ArrayList__V;
    for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      row = null;
      col = null;
      owner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle.getOwner__Llv_lumii_layoutengine_Element_2(), 12);
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(owner.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(owner):owner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39)) {
        constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(owner.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(owner):owner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
        row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, rectangle), 9);
        col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, rectangle), 9);
      }
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(rowIndices.java_util_ArrayList_array, rowIndices.java_util_ArrayList_array.length, row);
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(colIndices.java_util_ArrayList_array, colIndices.java_util_ArrayList_array.length, col);
      rectangle.getOwner__Llv_lumii_layoutengine_Element_2().package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(rectangle);
    }
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(prevRect, enclosingRectangle.java_awt_geom_Rectangle2D$Double_width, enclosingRectangle.java_awt_geom_Rectangle2D$Double_height);
    tRectangles = new java_util_ArrayList_ArrayList__V;
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(tRectangles.java_util_ArrayList_array, tRectangles.java_util_ArrayList_array.length, prevRect);
    tNewCenters = new java_util_ArrayList_ArrayList__V;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(tNewCenters, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(enclosingRectangle.java_awt_geom_Rectangle2D$Double_x + enclosingRectangle.java_awt_geom_Rectangle2D$Double_width / 2, enclosingRectangle.java_awt_geom_Rectangle2D$Double_y + enclosingRectangle.java_awt_geom_Rectangle2D$Double_height / 2));
    lv_lumii_layoutengine_Normalizer_adjustOldRectangles__Llv_lumii_layoutengine_Diagram_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, tRectangles, tNewCenters);
    for (i1 = 0; i1 < rectangles.java_util_ArrayList_array.length; i1++) {
      rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i1], 12));
      owner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle.getOwner__Llv_lumii_layoutengine_Element_2(), 12);
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(owner.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(owner):owner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39)) {
        constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(owner.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(owner):owner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
        row = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, rowIndices.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rowIndices.java_util_ArrayList_array[i1], 9));
        col = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, colIndices.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(colIndices.java_util_ArrayList_array[i1], 9));
        (!!row || !!col) && lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setCell__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2Ljava_lang_Integer_2V(constraints, rectangle, row, col);
      }
      com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rectangle, 16)?lv_lumii_layoutengine_Container_$addBox__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Box_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle.getOwner__Llv_lumii_layoutengine_Element_2(), 13), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle, 16)):com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rectangle, 13) && lv_lumii_layoutengine_Container_$addContainer__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle.getOwner__Llv_lumii_layoutengine_Element_2(), 13), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle, 13));
    }
  }
   else 
    prevRect == diagram && (diagram.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(diagram) , lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(diagram, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(diagram)));
  for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rect, rect.lv_lumii_layoutengine_AbstractContainer_right - rect.lv_lumii_layoutengine_AbstractContainer_left, rect.lv_lumii_layoutengine_AbstractContainer_bottom - rect.lv_lumii_layoutengine_AbstractContainer_top);
    rect.lv_lumii_layoutengine_AbstractContainer_hide = true;
  }
  epsilon = diagram.lv_lumii_layoutengine_Diagram_epsilon;
  nextRects = prevRect.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2(false);
  java_util_AbstractCollection_$removeAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(nextRects, rectangles);
  for (growPoint$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(growPoints); growPoint$iterator.java_util_AbstractList$IteratorImpl_i < growPoint$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    growPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(growPoint$iterator.java_util_AbstractList$IteratorImpl_i < growPoint$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(growPoint$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(growPoint$iterator.java_util_AbstractList$IteratorImpl_last = growPoint$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
    lv_lumii_layoutengine_GeometryHelper_movePointOutside__Ljava_awt_geom_Point2D$Double_2Ljava_util_ArrayList_2DV(growPoint, nextRects, 4 * epsilon);
    lv_lumii_layoutengine_GeometryHelper_movePointInside__Ljava_awt_geom_Point2D$Double_2DDDDDV(growPoint, prevRect.lv_lumii_layoutengine_AbstractContainer_left, prevRect.lv_lumii_layoutengine_AbstractContainer_top, prevRect.lv_lumii_layoutengine_AbstractContainer_right, prevRect.lv_lumii_layoutengine_AbstractContainer_bottom, 4 * epsilon);
  }
  newCenters = new java_util_ArrayList_ArrayList__V;
  for (i2 = 0; i2 < rectangles.java_util_ArrayList_array.length; i2++) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i2], 12));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newCenters, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((rect.lv_lumii_layoutengine_AbstractContainer_left + rect.lv_lumii_layoutengine_AbstractContainer_right) / 2, (rect.lv_lumii_layoutengine_AbstractContainer_top + rect.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
    lv_lumii_layoutengine_AbstractContainer_$setDesiredCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(rect, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((rect.lv_lumii_layoutengine_AbstractContainer_left + rect.lv_lumii_layoutengine_AbstractContainer_right) / 2, (rect.lv_lumii_layoutengine_AbstractContainer_top + rect.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
    lv_lumii_layoutengine_AbstractContainer_$collapse__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(rect, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, growPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(growPoints.java_util_ArrayList_array[i2], 3)));
  }
  lv_lumii_layoutengine_Normalizer_adjustRectangles__Llv_lumii_layoutengine_Diagram_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, rectangles, newCenters);
  for (i = 0; i < rectangles.java_util_ArrayList_array.length; i++) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i], 12));
    rect.lv_lumii_layoutengine_AbstractContainer_hide = false;
    newCenter = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((rect.lv_lumii_layoutengine_AbstractContainer_left + rect.lv_lumii_layoutengine_AbstractContainer_right) / 2, (rect.lv_lumii_layoutengine_AbstractContainer_top + rect.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    oldCenter = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldCenters.java_util_ArrayList_array[i], 3));
    moveVector = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newCenter.java_awt_geom_Point2D$Double_x - oldCenter.java_awt_geom_Point2D$Double_x, newCenter.java_awt_geom_Point2D$Double_y - oldCenter.java_awt_geom_Point2D$Double_y);
    (rect.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(rect):rect.lv_lumii_layoutengine_AbstractContainer_layoutConstraints).package_private$lv_lumii_layoutengine_LayoutConstraints$transpose__Ljava_awt_geom_Point2D$Double_2V(moveVector);
    for (descendantRect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_AbstractContainer_$getDescendantAbstractContainers__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(rect, true)); descendantRect$iterator.java_util_AbstractList$IteratorImpl_i < descendantRect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      descendantRect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(descendantRect$iterator.java_util_AbstractList$IteratorImpl_i < descendantRect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(descendantRect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(descendantRect$iterator.java_util_AbstractList$IteratorImpl_last = descendantRect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(descendantRect, moveVector);
      (descendantRect.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(descendantRect):descendantRect.lv_lumii_layoutengine_AbstractContainer_layoutConstraints).package_private$lv_lumii_layoutengine_LayoutConstraints$transpose__Ljava_awt_geom_Point2D$Double_2V(moveVector);
    }
  }
}

function lv_lumii_layoutengine_Adjuster_resizeRectangles__Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(rectangles, bounds){
  var i, newCenters, rectangle;
  if (rectangles.java_util_ArrayList_array.length == 0) {
    return;
  }
  newCenters = new java_util_ArrayList_ArrayList__V;
  for (i = 0; i < rectangles.java_util_ArrayList_array.length; i++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, bounds.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bounds.java_util_ArrayList_array[i], 22));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i], 12)), rectangle.java_awt_geom_Rectangle2D$Double_width, rectangle.java_awt_geom_Rectangle2D$Double_height);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newCenters, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(rectangle.java_awt_geom_Rectangle2D$Double_x + rectangle.java_awt_geom_Rectangle2D$Double_width / 2, rectangle.java_awt_geom_Rectangle2D$Double_y + rectangle.java_awt_geom_Rectangle2D$Double_height / 2));
  }
  lv_lumii_layoutengine_Normalizer_adjustOldRectangles__Llv_lumii_layoutengine_Diagram_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[0], 12)).lv_lumii_layoutengine_Element_diagram, rectangles, newCenters);
}

function lv_lumii_layoutengine_Adjuster_setLinePoints__Ljava_util_ArrayList_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2V(lines, lineType, points){
  var addedCount, box, endBox, endCount, epsilon, i, i0, j, lcaBox, line, line$iterator, lineGeometry, linePoints, oldPoints, point, point$iterator, startBox, startCount, tmpPoints, tracer, x_0, y_0;
  oldPoints = new java_util_ArrayList_ArrayList__V;
  for (i0 = 0; i0 < lines.java_util_ArrayList_array.length; i0++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i0], 10));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(oldPoints, !line.lv_lumii_layoutengine_Line_lineGeometry?null:line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points);
    if (!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) || !lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
      throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
    }
  }
  if (lineType == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
    startCount = new java_util_ArrayList_ArrayList__V;
    endCount = new java_util_ArrayList_ArrayList__V;
    for (i = 0; i < lines.java_util_ArrayList_array.length; i++) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10));
      line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 4)));
      linePoints = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
      box = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Element_owner, 13), true);
      epsilon = line.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
      if (box != box.lv_lumii_layoutengine_Element_diagram) {
        for (j = 0; j < linePoints.java_util_ArrayList_array.length; j++) {
          lv_lumii_layoutengine_GeometryHelper_movePointInside__Ljava_awt_geom_Point2D$Double_2DDDDDV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, linePoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(linePoints.java_util_ArrayList_array[j], 3)), box.lv_lumii_layoutengine_AbstractContainer_left, box.lv_lumii_layoutengine_AbstractContainer_top, box.lv_lumii_layoutengine_AbstractContainer_right, box.lv_lumii_layoutengine_AbstractContainer_bottom, epsilon);
        }
      }
      line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V();
      lv_lumii_layoutengine_LineOptimizer_cutLine__Llv_lumii_layoutengine_Line_2V(line);
      startBox = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
      endBox = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
      addedCount = lv_lumii_layoutengine_GeometryHelper_reconnectEndPoints__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_util_Pair_2(line, startBox, endBox);
      lcaBox = lv_lumii_layoutengine_Box_$findLCABox__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2(startBox, endBox);
      if (startBox != lcaBox && lv_lumii_layoutengine_GeometryHelper_boxIntersectsLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Line_2ZZ(startBox, line, false) || endBox != lcaBox && lv_lumii_layoutengine_GeometryHelper_boxIntersectsLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Line_2ZZ(endBox, line, false)) {
        tracer = new lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(startBox, endBox);
        line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points = lv_lumii_layoutengine_Tracer_$trace__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2IILjava_util_ArrayList_2(tracer, startBox, endBox, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line), lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
        lv_lumii_layoutengine_Line_$_1resetLabels__Llv_lumii_layoutengine_Line_2V(line);
        tmpPoints = new java_util_ArrayList_ArrayList__V;
        for (point$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(line)); point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_last = point$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(tmpPoints, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(point.java_awt_geom_Point2D$Double_x, point.java_awt_geom_Point2D$Double_y));
        }
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(oldPoints, i, tmpPoints);
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(startCount, java_lang_Integer_valueOf__ILjava_lang_Integer_2(0));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(endCount, java_lang_Integer_valueOf__ILjava_lang_Integer_2(0));
      }
       else {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(startCount, java_lang_Integer_valueOf__ILjava_lang_Integer_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(addedCount.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value - 1));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(endCount, java_lang_Integer_valueOf__ILjava_lang_Integer_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(addedCount.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value - 1));
      }
    }
    lv_lumii_layoutengine_LineOptimizer_cleanupLines__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(lines, startCount, endCount, false);
    lv_lumii_layoutengine_LineOptimizer_adjustLabelPlacement__Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(lines, oldPoints);
    lv_lumii_layoutengine_LineOptimizer_correctOrthogonalLines__Ljava_util_ArrayList_2V(lines);
    for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
      lineGeometry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry, 74);
      lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$findEndSides__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2V(lineGeometry, lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line));
    }
  }
   else if (lineType == lv_lumii_layoutengine_Line$LineType_STRAIGHT) {
    for (i = 0; i < lines.java_util_ArrayList_array.length; i++) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10));
      linePoints = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 4));
      if (linePoints.java_util_ArrayList_array.length > 2) {
        x_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, linePoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(linePoints.java_util_ArrayList_array[0], 3));
        y_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(linePoints, linePoints.java_util_ArrayList_array.length - 1), 3);
        linePoints = new java_util_ArrayList_ArrayList__V;
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(linePoints.java_util_ArrayList_array, linePoints.java_util_ArrayList_array.length, x_0);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(linePoints.java_util_ArrayList_array, linePoints.java_util_ArrayList_array.length, y_0);
      }
      line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), linePoints);
      if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
        lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(line);
      }
       else {
        throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
      }
    }
    lv_lumii_layoutengine_LineOptimizer_adjustLabelPlacement__Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(lines, oldPoints);
  }
   else if (lineType == lv_lumii_layoutengine_Line$LineType_POLYLINE) {
    for (i = 0; i < lines.java_util_ArrayList_array.length; i++) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10));
      linePoints = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 4));
      line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), linePoints);
      line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V();
      if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
        if (line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length <= 2) {
          lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) != lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)?lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(line):lv_lumii_layoutengine_Line_$trace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(line, line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2());
        }
         else {
          lv_lumii_layoutengine_LineOptimizer_reconnectPolyline__Llv_lumii_layoutengine_Line_2V(line);
          lv_lumii_layoutengine_LineOptimizer_cutLine__Llv_lumii_layoutengine_Line_2V(line);
        }
      }
       else {
        throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
      }
    }
    lv_lumii_layoutengine_LineOptimizer_adjustLabelPlacement__Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(lines, oldPoints);
  }
}

function lv_lumii_layoutengine_Adjuster_updateBoxCurrentMinSize__Llv_lumii_layoutengine_Diagram_2V(diagram){
  var box, box$iterator;
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(box, box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left, box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top);
  }
}

function lv_lumii_layoutengine_Adjuster$Cell_Adjuster$Cell__V(){
  this.lv_lumii_layoutengine_Adjuster$Cell_boxChains = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Adjuster$Cell_boxInTime = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Adjuster$Cell_boxOutTime = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Adjuster$Cell_insideLabelChains = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Adjuster$Cell_outsideLabelChains = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Adjuster$Cell_lineChains = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(151, 1, {151:1}, lv_lumii_layoutengine_Adjuster$Cell_Adjuster$Cell__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Adjuster$Cell_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Adjuster/Cell', 151);
function lv_lumii_layoutengine_Adjuster$Grid_$findColumnBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(this$static, chain){
  var endColumn, maxX, minX, point, point$index, point$max, startColumn;
  minX = $intern_53;
  maxX = $intern_20;
  for (point$index = 0 , point$max = chain.length; point$index < point$max; ++point$index) {
    point = chain[point$index];
    minX > point.java_awt_geom_Point2D$Double_x && (minX = point.java_awt_geom_Point2D$Double_x);
    maxX < point.java_awt_geom_Point2D$Double_x && (maxX = point.java_awt_geom_Point2D$Double_x);
  }
  startColumn = java_lang_Math_max__III(0, java_lang_Math_min__III(this$static.lv_lumii_layoutengine_Adjuster$Grid_width - 1, com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((minX - this$static.lv_lumii_layoutengine_Adjuster$Grid_startX) / this$static.lv_lumii_layoutengine_Adjuster$Grid_cellWidth))));
  endColumn = java_lang_Math_max__III(0, java_lang_Math_min__III(this$static.lv_lumii_layoutengine_Adjuster$Grid_width - 1, com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((maxX - this$static.lv_lumii_layoutengine_Adjuster$Grid_startX) / this$static.lv_lumii_layoutengine_Adjuster$Grid_cellWidth))));
  return new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(startColumn), java_lang_Integer_valueOf__ILjava_lang_Integer_2(endColumn));
}

function lv_lumii_layoutengine_Adjuster$Grid_$findRowBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(this$static, chain){
  var endRow, maxY, minY, point, point$index, point$max, startRow;
  minY = $intern_53;
  maxY = $intern_20;
  for (point$index = 0 , point$max = chain.length; point$index < point$max; ++point$index) {
    point = chain[point$index];
    minY > point.java_awt_geom_Point2D$Double_y && (minY = point.java_awt_geom_Point2D$Double_y);
    maxY < point.java_awt_geom_Point2D$Double_y && (maxY = point.java_awt_geom_Point2D$Double_y);
  }
  startRow = java_lang_Math_max__III(0, java_lang_Math_min__III(this$static.lv_lumii_layoutengine_Adjuster$Grid_height - 1, com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((minY - this$static.lv_lumii_layoutengine_Adjuster$Grid_startY) / this$static.lv_lumii_layoutengine_Adjuster$Grid_cellHeight))));
  endRow = java_lang_Math_max__III(0, java_lang_Math_min__III(this$static.lv_lumii_layoutengine_Adjuster$Grid_height - 1, com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((maxY - this$static.lv_lumii_layoutengine_Adjuster$Grid_startY) / this$static.lv_lumii_layoutengine_Adjuster$Grid_cellHeight))));
  return new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(startRow), java_lang_Integer_valueOf__ILjava_lang_Integer_2(endRow));
}

function lv_lumii_layoutengine_Adjuster$Grid_$insert__Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_Box_2IIV(this$static, box, inTime, outTime){
  var cell, chain, column, columnBounds, endColumn, endRow, row, rowBounds, startColumn, startRow;
  chain = new lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain__Llv_lumii_layoutengine_AbstractContainer_2IV(box, this$static.lv_lumii_layoutengine_Adjuster$Grid_nextId++);
  columnBounds = lv_lumii_layoutengine_Adjuster$Grid_$findColumnBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(this$static, chain.lv_lumii_layoutengine_GeometryHelper$Chain_points);
  rowBounds = lv_lumii_layoutengine_Adjuster$Grid_$findRowBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(this$static, chain.lv_lumii_layoutengine_GeometryHelper$Chain_points);
  startColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(columnBounds.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
  endColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(columnBounds.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value;
  startRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rowBounds.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
  endRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rowBounds.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value;
  for (column = startColumn; column <= endColumn; column++) {
    for (row = startRow; row <= endRow; row++) {
      cell = this$static.lv_lumii_layoutengine_Adjuster$Grid_cells[column][row];
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(cell.lv_lumii_layoutengine_Adjuster$Cell_boxChains, chain);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(cell.lv_lumii_layoutengine_Adjuster$Cell_boxInTime, java_lang_Integer_valueOf__ILjava_lang_Integer_2(inTime));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(cell.lv_lumii_layoutengine_Adjuster$Cell_boxOutTime, java_lang_Integer_valueOf__ILjava_lang_Integer_2(outTime));
    }
  }
}

function lv_lumii_layoutengine_Adjuster$Grid_$insert__Llv_lumii_layoutengine_Adjuster$Grid_2Llv_lumii_layoutengine_Element_2V(this$static, element){
  var cell, chain, chain$iterator, chains, column, columnBounds, endColumn, endRow, i, points, row, rowBounds, segment, startColumn, startRow;
  chains = new java_util_ArrayList_ArrayList__V;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 10)) {
    points = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 10).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
    for (i = 0; i + 1 < points.java_util_ArrayList_array.length; i++) {
      segment = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Point2D$Double_12_1classLit, $intern_14, 3, 2, 0, 1);
      segment[0] = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 3));
      segment[1] = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i + 1], 3));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(chains, new lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain___3Ljava_awt_geom_Point2D$Double_2IV(segment, this$static.lv_lumii_layoutengine_Adjuster$Grid_nextId++));
    }
  }
   else {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(chains, new lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain__Llv_lumii_layoutengine_AbstractContainer_2IV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 12), this$static.lv_lumii_layoutengine_Adjuster$Grid_nextId++));
  }
  for (chain$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(chains); chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    chain = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(chain$iterator.java_util_AbstractList$IteratorImpl_i < chain$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(chain$iterator.java_util_AbstractList$IteratorImpl_last = chain$iterator.java_util_AbstractList$IteratorImpl_i++), 71));
    columnBounds = lv_lumii_layoutengine_Adjuster$Grid_$findColumnBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(this$static, chain.lv_lumii_layoutengine_GeometryHelper$Chain_points);
    rowBounds = lv_lumii_layoutengine_Adjuster$Grid_$findRowBounds__Llv_lumii_layoutengine_Adjuster$Grid_2_3Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_util_Pair_2(this$static, chain.lv_lumii_layoutengine_GeometryHelper$Chain_points);
    startColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(columnBounds.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
    endColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(columnBounds.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value;
    startRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rowBounds.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
    endRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rowBounds.lv_lumii_layoutengine_util_Pair_second, 9).java_lang_Integer_value;
    for (column = startColumn; column <= endColumn; column++) {
      for (row = startRow; row <= endRow; row++) {
        cell = this$static.lv_lumii_layoutengine_Adjuster$Grid_cells[column][row];
        com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 78)?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(cell.lv_lumii_layoutengine_Adjuster$Cell_outsideLabelChains, chain):com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 10) && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(cell.lv_lumii_layoutengine_Adjuster$Cell_lineChains, chain);
      }
    }
  }
}

function lv_lumii_layoutengine_Adjuster$Grid_Adjuster$Grid__IIDDDDV(width_0, height, startX, startY, cellWidth, cellHeight){
  var i, j;
  this.lv_lumii_layoutengine_Adjuster$Grid_cells = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Adjuster$Cell_12_1classLit, [$intern_14, {5:1, 6:1, 8:1, 306:1}], [306, 151], 0, [width_0, height], 2);
  for (i = 0; i < width_0; i++) {
    for (j = 0; j < height; j++) {
      this.lv_lumii_layoutengine_Adjuster$Grid_cells[i][j] = new lv_lumii_layoutengine_Adjuster$Cell_Adjuster$Cell__V;
    }
  }
  this.lv_lumii_layoutengine_Adjuster$Grid_width = width_0;
  this.lv_lumii_layoutengine_Adjuster$Grid_height = height;
  this.lv_lumii_layoutengine_Adjuster$Grid_startX = startX;
  this.lv_lumii_layoutengine_Adjuster$Grid_startY = startY;
  this.lv_lumii_layoutengine_Adjuster$Grid_cellWidth = cellWidth;
  this.lv_lumii_layoutengine_Adjuster$Grid_cellHeight = cellHeight;
  this.lv_lumii_layoutengine_Adjuster$Grid_nextId = 0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(228, 1, {}, lv_lumii_layoutengine_Adjuster$Grid_Adjuster$Grid__IIDDDDV);
_.lv_lumii_layoutengine_Adjuster$Grid_cellHeight = 0;
_.lv_lumii_layoutengine_Adjuster$Grid_cellWidth = 0;
_.lv_lumii_layoutengine_Adjuster$Grid_height = 0;
_.lv_lumii_layoutengine_Adjuster$Grid_nextId = 0;
_.lv_lumii_layoutengine_Adjuster$Grid_startX = 0;
_.lv_lumii_layoutengine_Adjuster$Grid_startY = 0;
_.lv_lumii_layoutengine_Adjuster$Grid_width = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Adjuster$Grid_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Adjuster/Grid', 228);
function lv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_$compare__Llv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2I(label1, label2){
  return java_lang_Double_compare__DDI(label1.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition, label2.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition);
}

function lv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_Adjuster$LabelCurrentPositionComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(229, 1, {}, lv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_Adjuster$LabelCurrentPositionComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(label1, label2){
  return lv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_$compare__Llv_lumii_layoutengine_Adjuster$LabelCurrentPositionComparator_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label1, 28), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label2, 28));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Adjuster$LabelCurrentPositionComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Adjuster/LabelCurrentPositionComparator', 229);
function lv_lumii_layoutengine_Adjuster$ManualAdjuster_reconnectEndPoints__Llv_lumii_layoutengine_Line_2V(line){
  var label_0, label$iterator;
  switch (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2().java_lang_Enum_ordinal) {
    case 1:
      lv_lumii_layoutengine_GeometryHelper_reconnectEndPoints__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_util_Pair_2(line, lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line));
      break;
    case 0:
      lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(line);
      break;
    case 2:
      lv_lumii_layoutengine_LineOptimizer_reconnectPolyline__Llv_lumii_layoutengine_Line_2V(line);
  }
  lv_lumii_layoutengine_LineOptimizer_cutLine__Llv_lumii_layoutengine_Line_2V(line);
  for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels)); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
    lv_lumii_layoutengine_Diagram_$layoutAdjustOutsideLabel__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_OutsideLabel_2V(label_0);
  }
}

function lv_lumii_layoutengine_Adjuster$ManualAdjuster_setPoints__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2V(line, lineType, points){
  switch (lineType.java_lang_Enum_ordinal) {
    case 1:
      line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), points);
      break;
    case 0:
      line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), points);
      break;
    case 2:
      line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), points);
  }
  lv_lumii_layoutengine_Adjuster$ManualAdjuster_reconnectEndPoints__Llv_lumii_layoutengine_Line_2V(line);
}

function lv_lumii_layoutengine_Adjuster$ManualAdjuster_updateParentRectangles__Llv_lumii_layoutengine_AbstractContainer_2V(rectangle){
  var currRect, line, line$iterator, prevRect, spacing;
  currRect = rectangle;
  prevRect = lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(rectangle, false);
  while (prevRect != currRect.lv_lumii_layoutengine_Element_diagram) {
    spacing = currRect.lv_lumii_layoutengine_Element_spacing;
    prevRect.lv_lumii_layoutengine_AbstractContainer_left = java_lang_Math_min__DDD(prevRect.lv_lumii_layoutengine_AbstractContainer_left, currRect.lv_lumii_layoutengine_AbstractContainer_left - spacing);
    prevRect.lv_lumii_layoutengine_AbstractContainer_right = java_lang_Math_max__DDD(prevRect.lv_lumii_layoutengine_AbstractContainer_right, currRect.lv_lumii_layoutengine_AbstractContainer_right + spacing);
    prevRect.lv_lumii_layoutengine_AbstractContainer_top = java_lang_Math_min__DDD(prevRect.lv_lumii_layoutengine_AbstractContainer_top, currRect.lv_lumii_layoutengine_AbstractContainer_top - spacing);
    prevRect.lv_lumii_layoutengine_AbstractContainer_bottom = java_lang_Math_max__DDD(prevRect.lv_lumii_layoutengine_AbstractContainer_bottom, currRect.lv_lumii_layoutengine_AbstractContainer_bottom + spacing);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(prevRect, 16)) {
      for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevRect, 16).lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
        line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
        lv_lumii_layoutengine_Adjuster$ManualAdjuster_reconnectEndPoints__Llv_lumii_layoutengine_Line_2V(line);
      }
    }
    currRect = prevRect;
    prevRect = lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(prevRect, false);
  }
}

function lv_lumii_layoutengine_ArrangeData_ArrangeData__Llv_lumii_layoutengine_Container_2V(owner){
  this.lv_lumii_layoutengine_ArrangeData_owner = owner;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(120, 1, {});
_.getUsedData__Llv_lumii_layoutengine_ArrangeData_2 = function lv_lumii_layoutengine_ArrangeData_getUsedData__Llv_lumii_layoutengine_ArrangeData_2(){
  return this;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'ArrangeData', 120);
function lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V(){
  lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_ArrangeData$ArrangeStyle_NONE = new lv_lumii_layoutengine_ArrangeData$ArrangeStyle_ArrangeData$ArrangeStyle__Ljava_lang_String_2IV('NONE', 0);
  lv_lumii_layoutengine_ArrangeData$ArrangeStyle_FLOW = new lv_lumii_layoutengine_ArrangeData$ArrangeStyle_ArrangeData$ArrangeStyle__Ljava_lang_String_2IV('FLOW', 1);
  lv_lumii_layoutengine_ArrangeData$ArrangeStyle_UNIVERSAL = new lv_lumii_layoutengine_ArrangeData$ArrangeStyle_ArrangeData$ArrangeStyle__Ljava_lang_String_2IV('UNIVERSAL', 2);
  lv_lumii_layoutengine_ArrangeData$ArrangeStyle_SPRING_1EMBEDDED = new lv_lumii_layoutengine_ArrangeData$ArrangeStyle_ArrangeData$ArrangeStyle__Ljava_lang_String_2IV('SPRING_EMBEDDED', 3);
  lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED = new lv_lumii_layoutengine_ArrangeData$ArrangeStyle_ArrangeData$ArrangeStyle__Ljava_lang_String_2IV('INHERITED', 4);
}

function lv_lumii_layoutengine_ArrangeData$ArrangeStyle_ArrangeData$ArrangeStyle__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_ArrangeData$ArrangeStyle_values___3Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(){
  lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$ArrangeStyle_12_1classLit, 1), $intern_32, 100, 0, [lv_lumii_layoutengine_ArrangeData$ArrangeStyle_NONE, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_FLOW, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_UNIVERSAL, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_SPRING_1EMBEDDED, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(100, 36, {5:1, 29:1, 36:1, 100:1}, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_ArrangeData$ArrangeStyle__Ljava_lang_String_2IV);
var lv_lumii_layoutengine_ArrangeData$ArrangeStyle_FLOW, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_NONE, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_SPRING_1EMBEDDED, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_UNIVERSAL;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$ArrangeStyle_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'ArrangeData/ArrangeStyle', 100, lv_lumii_layoutengine_ArrangeData$ArrangeStyle_values___3Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2);
function lv_lumii_layoutengine_ArrangeData$FlowData_ArrangeData$FlowData__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$FlowData$Direction_2V(owner, flowDirection){
  lv_lumii_layoutengine_ArrangeData_ArrangeData__Llv_lumii_layoutengine_Container_2V.call(this, owner);
  this.lv_lumii_layoutengine_ArrangeData$FlowData_flowDirection = flowDirection;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(147, 120, {147:1}, lv_lumii_layoutengine_ArrangeData$FlowData_ArrangeData$FlowData__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$FlowData$Direction_2V);
_.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2 = function lv_lumii_layoutengine_ArrangeData$FlowData_getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(){
  return lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_FLOW;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$FlowData_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'ArrangeData/FlowData', 147);
function lv_lumii_layoutengine_ArrangeData$FlowData$Direction_$clinit__V(){
  lv_lumii_layoutengine_ArrangeData$FlowData$Direction_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_ArrangeData$FlowData$Direction_UP = new lv_lumii_layoutengine_ArrangeData$FlowData$Direction_ArrangeData$FlowData$Direction__Ljava_lang_String_2IV('UP', 0);
  lv_lumii_layoutengine_ArrangeData$FlowData$Direction_RIGHT = new lv_lumii_layoutengine_ArrangeData$FlowData$Direction_ArrangeData$FlowData$Direction__Ljava_lang_String_2IV($intern_41, 1);
  lv_lumii_layoutengine_ArrangeData$FlowData$Direction_DOWN = new lv_lumii_layoutengine_ArrangeData$FlowData$Direction_ArrangeData$FlowData$Direction__Ljava_lang_String_2IV('DOWN', 2);
  lv_lumii_layoutengine_ArrangeData$FlowData$Direction_LEFT = new lv_lumii_layoutengine_ArrangeData$FlowData$Direction_ArrangeData$FlowData$Direction__Ljava_lang_String_2IV($intern_40, 3);
}

function lv_lumii_layoutengine_ArrangeData$FlowData$Direction_ArrangeData$FlowData$Direction__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_ArrangeData$FlowData$Direction_values___3Llv_lumii_layoutengine_ArrangeData$FlowData$Direction_2(){
  lv_lumii_layoutengine_ArrangeData$FlowData$Direction_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$FlowData$Direction_12_1classLit, 1), $intern_32, 108, 0, [lv_lumii_layoutengine_ArrangeData$FlowData$Direction_UP, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_RIGHT, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_DOWN, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_LEFT]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(108, 36, {5:1, 29:1, 36:1, 108:1}, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_ArrangeData$FlowData$Direction__Ljava_lang_String_2IV);
var lv_lumii_layoutengine_ArrangeData$FlowData$Direction_DOWN, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_LEFT, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_RIGHT, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_UP;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$FlowData$Direction_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'ArrangeData/FlowData/Direction', 108, lv_lumii_layoutengine_ArrangeData$FlowData$Direction_values___3Llv_lumii_layoutengine_ArrangeData$FlowData$Direction_2);
function lv_lumii_layoutengine_ArrangeData$InheritedData_ArrangeData$InheritedData__Llv_lumii_layoutengine_Container_2V(owner){
  lv_lumii_layoutengine_ArrangeData_ArrangeData__Llv_lumii_layoutengine_Container_2V.call(this, owner);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(213, 120, {}, lv_lumii_layoutengine_ArrangeData$InheritedData_ArrangeData$InheritedData__Llv_lumii_layoutengine_Container_2V);
_.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2 = function lv_lumii_layoutengine_ArrangeData$InheritedData_getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(){
  return lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED;
}
;
_.getUsedData__Llv_lumii_layoutengine_ArrangeData_2 = function lv_lumii_layoutengine_ArrangeData$InheritedData_getUsedData__Llv_lumii_layoutengine_ArrangeData_2(){
  var current;
  current = this.lv_lumii_layoutengine_ArrangeData_owner;
  while (current.lv_lumii_layoutengine_Container_arrangeData.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2() == (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED)) {
    current = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(current.lv_lumii_layoutengine_Element_owner, 13);
  }
  return current.lv_lumii_layoutengine_Container_arrangeData;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$InheritedData_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'ArrangeData/InheritedData', 213);
function lv_lumii_layoutengine_ArrangeData$NoneData_ArrangeData$NoneData__Llv_lumii_layoutengine_Container_2V(owner){
  lv_lumii_layoutengine_ArrangeData_ArrangeData__Llv_lumii_layoutengine_Container_2V.call(this, owner);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(210, 120, {}, lv_lumii_layoutengine_ArrangeData$NoneData_ArrangeData$NoneData__Llv_lumii_layoutengine_Container_2V);
_.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2 = function lv_lumii_layoutengine_ArrangeData$NoneData_getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(){
  return lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_NONE;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$NoneData_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'ArrangeData/NoneData', 210);
function lv_lumii_layoutengine_ArrangeData$SpringEmbeddedData_ArrangeData$SpringEmbeddedData__Llv_lumii_layoutengine_Container_2V(owner){
  lv_lumii_layoutengine_ArrangeData_ArrangeData__Llv_lumii_layoutengine_Container_2V.call(this, owner);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(212, 120, {}, lv_lumii_layoutengine_ArrangeData$SpringEmbeddedData_ArrangeData$SpringEmbeddedData__Llv_lumii_layoutengine_Container_2V);
_.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2 = function lv_lumii_layoutengine_ArrangeData$SpringEmbeddedData_getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(){
  return lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_SPRING_1EMBEDDED;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$SpringEmbeddedData_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'ArrangeData/SpringEmbeddedData', 212);
function lv_lumii_layoutengine_ArrangeData$UniversalData_ArrangeData$UniversalData__Llv_lumii_layoutengine_Container_2V(owner){
  lv_lumii_layoutengine_ArrangeData_ArrangeData__Llv_lumii_layoutengine_Container_2V.call(this, owner);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(211, 120, {}, lv_lumii_layoutengine_ArrangeData$UniversalData_ArrangeData$UniversalData__Llv_lumii_layoutengine_Container_2V);
_.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2 = function lv_lumii_layoutengine_ArrangeData$UniversalData_getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(){
  return lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_UNIVERSAL;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ArrangeData$UniversalData_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'ArrangeData/UniversalData', 211);
function lv_lumii_layoutengine_Container_$addBox__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Box_2V(this$static, box){
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Container_boxes, box);
}

function lv_lumii_layoutengine_Container_$addContainer__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V(this$static, container){
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Container_containers, container);
}

function lv_lumii_layoutengine_Container_$addLine__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Line_2V(this$static, line){
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Container_lines, line);
}

function lv_lumii_layoutengine_Container_$createBox__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLjava_lang_Integer_2Ljava_lang_Integer_2Llv_lumii_layoutengine_Box_2(this$static, rectangle, arrangeStyle){
  var box, constraints;
  lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V(this$static.lv_lumii_layoutengine_Element_diagram, lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(this$static, true));
  rectangle.java_awt_geom_Rectangle2D$Double_width < 3.000001 && (rectangle = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(rectangle.java_awt_geom_Rectangle2D$Double_x, rectangle.java_awt_geom_Rectangle2D$Double_y, rectangle.java_awt_geom_Rectangle2D$Double_width + 3, rectangle.java_awt_geom_Rectangle2D$Double_height));
  rectangle.java_awt_geom_Rectangle2D$Double_height < 3.000001 && (rectangle = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(rectangle.java_awt_geom_Rectangle2D$Double_x, rectangle.java_awt_geom_Rectangle2D$Double_y, rectangle.java_awt_geom_Rectangle2D$Double_width, rectangle.java_awt_geom_Rectangle2D$Double_height + 3));
  box = new lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(rectangle.java_awt_geom_Rectangle2D$Double_x, rectangle.java_awt_geom_Rectangle2D$Double_x + rectangle.java_awt_geom_Rectangle2D$Double_width, rectangle.java_awt_geom_Rectangle2D$Double_y, rectangle.java_awt_geom_Rectangle2D$Double_y + rectangle.java_awt_geom_Rectangle2D$Double_height, this$static, arrangeStyle, 5);
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Container_boxes, box);
  if ((this$static.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(this$static):this$static.lv_lumii_layoutengine_AbstractContainer_layoutConstraints).getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1) {
    constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(this$static):this$static.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
    lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setCell__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2Ljava_lang_Integer_2V(constraints, box, null, null);
  }
  lv_lumii_layoutengine_Diagram_$layoutPlaceRectangle__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(this$static.lv_lumii_layoutengine_Element_diagram, box, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2, (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
  return box;
}

function lv_lumii_layoutengine_Container_$findChildContainerEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static){
  var rect, rect$iterator, rectangles, tBottom, tLeft, tRight, tSpacing, tTop;
  rectangles = lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static, false);
  if (rectangles.java_util_ArrayList_array.length == 0) {
    return null;
  }
  tLeft = $intern_53;
  tTop = $intern_53;
  tRight = $intern_20;
  tBottom = $intern_20;
  for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    tSpacing = rect.lv_lumii_layoutengine_Element_spacing;
    tLeft = java_lang_Math_min__DDD(tLeft, rect.lv_lumii_layoutengine_AbstractContainer_left - tSpacing);
    tTop = java_lang_Math_min__DDD(tTop, rect.lv_lumii_layoutengine_AbstractContainer_top - tSpacing);
    tRight = java_lang_Math_max__DDD(tRight, rect.lv_lumii_layoutengine_AbstractContainer_right + tSpacing);
    tBottom = java_lang_Math_max__DDD(tBottom, rect.lv_lumii_layoutengine_AbstractContainer_bottom + tSpacing);
  }
  return new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(tLeft, tTop, tRight - tLeft, tBottom - tTop);
}

function lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static){
  var bounds, line, line$iterator, point, point$iterator, tBottom, tLeft, tRight, tSpacing, tTop;
  bounds = lv_lumii_layoutengine_AbstractContainer_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(this$static);
  if (!bounds) {
    return null;
  }
  tLeft = bounds.java_awt_geom_Rectangle2D$Double_x;
  tTop = bounds.java_awt_geom_Rectangle2D$Double_y;
  tRight = bounds.java_awt_geom_Rectangle2D$Double_x + bounds.java_awt_geom_Rectangle2D$Double_width;
  tBottom = bounds.java_awt_geom_Rectangle2D$Double_y + bounds.java_awt_geom_Rectangle2D$Double_height;
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static)); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    tSpacing = line.lv_lumii_layoutengine_Element_spacing;
    if (!!line.lv_lumii_layoutengine_Line_lineGeometry && !!line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points) {
      for (point$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points); point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_last = point$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
        tLeft = java_lang_Math_min__DDD(tLeft, point.java_awt_geom_Point2D$Double_x - tSpacing);
        tTop = java_lang_Math_min__DDD(tTop, point.java_awt_geom_Point2D$Double_y - tSpacing);
        tRight = java_lang_Math_max__DDD(tRight, point.java_awt_geom_Point2D$Double_x + tSpacing);
        tBottom = java_lang_Math_max__DDD(tBottom, point.java_awt_geom_Point2D$Double_y + tSpacing);
      }
    }
  }
  return new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(tLeft, tTop, tRight - tLeft, tBottom - tTop);
}

function lv_lumii_layoutengine_Container_$findLCA__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2(this$static, c){
  var aStack, ancestor, bStack, predecessor, predecessor0;
  if (this$static.lv_lumii_layoutengine_Element_diagram != c.lv_lumii_layoutengine_Element_diagram) {
    return null;
  }
  aStack = new java_util_LinkedList_LinkedList__V;
  bStack = new java_util_LinkedList_LinkedList__V;
  for (predecessor0 = this$static; predecessor0; predecessor0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(predecessor0.lv_lumii_layoutengine_Element_owner, 13)) {
    java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(aStack, predecessor0, aStack.java_util_LinkedList_header, aStack.java_util_LinkedList_header.java_util_LinkedList$Node_next);
  }
  for (predecessor = c; predecessor; predecessor = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(predecessor.lv_lumii_layoutengine_Element_owner, 13)) {
    java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(bStack, predecessor, bStack.java_util_LinkedList_header, bStack.java_util_LinkedList_header.java_util_LinkedList$Node_next);
  }
  ancestor = null;
  while (aStack.java_util_LinkedList_size != 0 && bStack.java_util_LinkedList_size != 0 && com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(aStack.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(aStack.java_util_LinkedList_size != 0) , aStack.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value)) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(bStack.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(bStack.java_util_LinkedList_size != 0) , bStack.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value))) {
    ancestor = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(aStack.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(aStack, aStack.java_util_LinkedList_header.java_util_LinkedList$Node_next), 13));
    com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(bStack.java_util_LinkedList_size != 0);
    java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(bStack, bStack.java_util_LinkedList_header.java_util_LinkedList$Node_next);
  }
  return ancestor;
}

function lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static, includeOutsideLabels){
  var abstractContainers, box, box$iterator, line, line$iterator;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  abstractContainers = lv_lumii_layoutengine_AbstractContainer_$getAbstractContainers__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(this$static);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(abstractContainers, this$static.lv_lumii_layoutengine_Container_boxes);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(abstractContainers, this$static.lv_lumii_layoutengine_Container_containers);
  if (includeOutsideLabels) {
    for (box$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_layoutengine_Container_boxes.java_util_HashSet_map)); box$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(box$iterator), 16);
      java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(abstractContainers, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(box.lv_lumii_layoutengine_Box_outsideLabels));
    }
    for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_layoutengine_Container_lines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
      java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(abstractContainers, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels));
    }
  }
  return abstractContainers;
}

function lv_lumii_layoutengine_Container_$getBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_Container_boxes);
}

function lv_lumii_layoutengine_Container_$getChildren__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  var children;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  children = this$static.lv_lumii_layoutengine_AbstractContainer_hide?new java_util_ArrayList_ArrayList__V:new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_AbstractContainer_insideLabels);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(children, this$static.lv_lumii_layoutengine_Container_boxes);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(children, this$static.lv_lumii_layoutengine_Container_lines);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(children, this$static.lv_lumii_layoutengine_Container_containers);
  return children;
}

function lv_lumii_layoutengine_Container_$getContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  var allContainers;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  allContainers = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(allContainers, this$static.lv_lumii_layoutengine_Container_boxes);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(allContainers, this$static.lv_lumii_layoutengine_Container_containers);
  return allContainers;
}

function lv_lumii_layoutengine_Container_$getDescendantBoxOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  var box, box$iterator, descendants;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  descendants = new java_util_ArrayList_ArrayList__V;
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static)); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(descendants, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(box.lv_lumii_layoutengine_Box_outsideLabels));
  }
  return descendants;
}

function lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static);
}

function lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static){
  var container, descendants, queue;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  descendants = new java_util_ArrayList_ArrayList__V;
  queue = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(lv_lumii_layoutengine_Container_$getContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static));
  while (queue.java_util_LinkedList_size != 0) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 13));
    com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(container, 16) && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(descendants, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(container, 16));
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, lv_lumii_layoutengine_Container_$getContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container));
  }
  return descendants;
}

function lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  var container, descendants, queue;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  descendants = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_Container_lines);
  queue = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(lv_lumii_layoutengine_Container_$getContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static));
  while (queue.java_util_LinkedList_size != 0) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 13));
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(descendants, lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container));
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, lv_lumii_layoutengine_Container_$getContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container));
  }
  return descendants;
}

function lv_lumii_layoutengine_Container_$getDescendantOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  var box, box$iterator, descendants, line, line$iterator;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  descendants = new java_util_ArrayList_ArrayList__V;
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static)); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(descendants, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(box.lv_lumii_layoutengine_Box_outsideLabels));
  }
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static)); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(descendants, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels));
  }
  return descendants;
}

function lv_lumii_layoutengine_Container_$getEmptyClone__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Container_2(this$static, addLayoutConstraints){
  var cloneCont;
  cloneCont = new lv_lumii_layoutengine_Container_Container__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(this$static.lv_lumii_layoutengine_AbstractContainer_left, this$static.lv_lumii_layoutengine_AbstractContainer_right, this$static.lv_lumii_layoutengine_AbstractContainer_top, this$static.lv_lumii_layoutengine_AbstractContainer_bottom, this$static, this$static.lv_lumii_layoutengine_Container_arrangeData.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(), this$static.lv_lumii_layoutengine_AbstractContainer_layoutConstraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2(), this$static.lv_lumii_layoutengine_Element_spacing);
  cloneCont.lv_lumii_layoutengine_Container_arrangeData = this$static.lv_lumii_layoutengine_Container_arrangeData;
  addLayoutConstraints && (cloneCont.lv_lumii_layoutengine_AbstractContainer_layoutConstraints = this$static.lv_lumii_layoutengine_AbstractContainer_layoutConstraints);
  return cloneCont;
}

function lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_Container_lines);
}

function lv_lumii_layoutengine_Container_$getNextBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  var box, box$iterator, container, containerQueue, nextBoxes;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  nextBoxes = new java_util_ArrayList_ArrayList__V;
  containerQueue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(containerQueue, this$static, containerQueue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, containerQueue.java_util_LinkedList_tail);
  while (containerQueue.java_util_LinkedList_size != 0) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(containerQueue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(containerQueue, containerQueue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 13));
    for (box$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(container.lv_lumii_layoutengine_Container_boxes.java_util_HashSet_map)); box$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(box$iterator), 16);
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(nextBoxes.java_util_ArrayList_array, nextBoxes.java_util_ArrayList_array.length, box);
    }
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(containerQueue, lv_lumii_layoutengine_Container_$getPureContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container));
  }
  return nextBoxes;
}

function lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static, includeOutsideLabels){
  var box, box$iterator, box$iterator0, container, containerQueue, line, line$iterator, rectangles;
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  rectangles = new java_util_ArrayList_ArrayList__V;
  containerQueue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(containerQueue, this$static, containerQueue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, containerQueue.java_util_LinkedList_tail);
  while (containerQueue.java_util_LinkedList_size != 0) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(containerQueue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(containerQueue, containerQueue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 13));
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(rectangles, lv_lumii_layoutengine_AbstractContainer_$getInsideLabels__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2(container));
    for (box$iterator0 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(container.lv_lumii_layoutengine_Container_boxes.java_util_HashSet_map)); box$iterator0.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(box$iterator0), 16);
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array, rectangles.java_util_ArrayList_array.length, box);
    }
    if (includeOutsideLabels) {
      for (box$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(container.lv_lumii_layoutengine_Container_boxes.java_util_HashSet_map)); box$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
        box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(box$iterator), 16);
        java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(rectangles, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(box.lv_lumii_layoutengine_Box_outsideLabels));
      }
      for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container)); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
        java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(rectangles, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels));
      }
    }
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(containerQueue, lv_lumii_layoutengine_Container_$getPureContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container));
  }
  return rectangles;
}

function lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(this$static, inclusive){
  var tOwner;
  if (inclusive && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 16)) {
    return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static, 16);
  }
  tOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 13);
  while (!!tOwner && !com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(tOwner, 16)) {
    tOwner = tOwner.getOwner__Llv_lumii_layoutengine_Element_2();
  }
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tOwner, 16);
}

function lv_lumii_layoutengine_Container_$getPureContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_Container_containers);
}

function lv_lumii_layoutengine_Container_$getUsedArrangeStyle__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(this$static){
  var styleOwner;
  styleOwner = this$static;
  while (styleOwner.lv_lumii_layoutengine_Container_arrangeData.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2() == (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED)) {
    styleOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(styleOwner.lv_lumii_layoutengine_Element_owner, 13);
  }
  return styleOwner.lv_lumii_layoutengine_Container_arrangeData.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2();
}

function lv_lumii_layoutengine_Container_$setArrangeStyle__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2V(this$static, arrangeStyle){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static, 66) && arrangeStyle == (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED)) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_58);
  }
  switch (arrangeStyle.java_lang_Enum_ordinal) {
    case 0:
      this$static.lv_lumii_layoutengine_Container_arrangeData = new lv_lumii_layoutengine_ArrangeData$NoneData_ArrangeData$NoneData__Llv_lumii_layoutengine_Container_2V(this$static);
      break;
    case 1:
      this$static.lv_lumii_layoutengine_Container_arrangeData = new lv_lumii_layoutengine_ArrangeData$FlowData_ArrangeData$FlowData__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$FlowData$Direction_2V(this$static, (lv_lumii_layoutengine_ArrangeData$FlowData$Direction_$clinit__V() , lv_lumii_layoutengine_ArrangeData$FlowData$Direction_DOWN));
      break;
    case 3:
      this$static.lv_lumii_layoutengine_Container_arrangeData = new lv_lumii_layoutengine_ArrangeData$SpringEmbeddedData_ArrangeData$SpringEmbeddedData__Llv_lumii_layoutengine_Container_2V(this$static);
      break;
    case 2:
      this$static.lv_lumii_layoutengine_Container_arrangeData = new lv_lumii_layoutengine_ArrangeData$UniversalData_ArrangeData$UniversalData__Llv_lumii_layoutengine_Container_2V(this$static);
      break;
    case 4:
      this$static.lv_lumii_layoutengine_Container_arrangeData = new lv_lumii_layoutengine_ArrangeData$InheritedData_ArrangeData$InheritedData__Llv_lumii_layoutengine_Container_2V(this$static);
  }
}

function lv_lumii_layoutengine_Container_Container__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(left, right, top_0, bottom, owner, arrangeStyle, constraintType, spacing){
  lv_lumii_layoutengine_AbstractContainer_AbstractContainer__DDDDLlv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV.call(this, left, right, top_0, bottom, owner, constraintType, spacing);
  this.lv_lumii_layoutengine_Container_boxes = new java_util_LinkedHashSet_LinkedHashSet__V;
  this.lv_lumii_layoutengine_Container_containers = new java_util_LinkedHashSet_LinkedHashSet__V;
  this.lv_lumii_layoutengine_Container_lines = new java_util_LinkedHashSet_LinkedHashSet__V;
  lv_lumii_layoutengine_Container_$setArrangeStyle__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2V(this, arrangeStyle);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(13, 12, {12:1, 13:1, 57:1}, lv_lumii_layoutengine_Container_Container__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV);
_.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2 = function lv_lumii_layoutengine_Container_getAbstractContainers__ZLjava_util_ArrayList_2(includeOutsideLabels){
  return lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this, includeOutsideLabels);
}
;
_.getChildren__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_Container_getChildren__Ljava_util_ArrayList_2(){
  return lv_lumii_layoutengine_Container_$getChildren__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this);
}
;
_.package_private$lv_lumii_layoutengine_Element$getChildren__Ljava_util_ArrayList_2 = _.getChildren__Ljava_util_ArrayList_2;
_.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2 = function lv_lumii_layoutengine_Container_getNextRectangles__ZLjava_util_ArrayList_2(includeOutsideLabels){
  return lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this, includeOutsideLabels);
}
;
_.getOwner__Llv_lumii_layoutengine_Element_2 = function lv_lumii_layoutengine_Container_getOwner__Llv_lumii_layoutengine_Element_2(){
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_Element_owner, 13);
}
;
_.getPureContainers__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_Container_getPureContainers__Ljava_util_ArrayList_2(){
  return lv_lumii_layoutengine_Container_$getPureContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this);
}
;
_.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2 = _.getPureContainers__Ljava_util_ArrayList_2;
_.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_Container_getRectangles__Ljava_util_ArrayList_2(){
  var rectangles;
  if (this.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  rectangles = lv_lumii_layoutengine_AbstractContainer_$getRectangles__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2(this);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(rectangles, this.lv_lumii_layoutengine_Container_boxes);
  return rectangles;
}
;
_.package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V = function lv_lumii_layoutengine_Container_removeChild__Llv_lumii_layoutengine_Element_2V(element){
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 16)?java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Container_boxes, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 16)):com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 10)?java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Container_lines, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 10)):com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 13) && java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Container_containers, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 13));
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39) && lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1remove__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39), element);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Container_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Container', 13);
function lv_lumii_layoutengine_Box_$connectTo__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Line$LineType_2DLlv_lumii_layoutengine_Line_2(this$static, element, lineType){
  var line, lineOwner;
  if (element) {
    lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(this$static.lv_lumii_layoutengine_Element_diagram, this$static, element, (lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V() , lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_NEWLINE));
    lineOwner = lv_lumii_layoutengine_Line_findOwner__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2(this$static, element);
    line = new lv_lumii_layoutengine_Line_Line__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2DV(this$static, element, lineOwner);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lineOwner.lv_lumii_layoutengine_Container_lines, line);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Box_incidentLines, line);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(element.lv_lumii_layoutengine_Box_incidentLines, line);
    lv_lumii_layoutengine_Diagram_$layoutTraceLine__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(this$static.lv_lumii_layoutengine_Element_diagram, line, lineType);
    return line;
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_59);
  }
}

function lv_lumii_layoutengine_Box_$connectTo__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Line$LineType_2DLjava_util_ArrayList_2ZLlv_lumii_layoutengine_Line_2(this$static, element, lineType, points){
  var line, lineOwner, t;
  if (element) {
    lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(this$static.lv_lumii_layoutengine_Element_diagram, this$static, element, (lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V() , lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS));
    lineOwner = lv_lumii_layoutengine_Line_findOwner__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2(this$static, element);
    line = new lv_lumii_layoutengine_Line_Line__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2DV(this$static, element, lineOwner);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lineOwner.lv_lumii_layoutengine_Container_lines, line);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Box_incidentLines, line);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(element.lv_lumii_layoutengine_Box_incidentLines, line);
    try {
      lv_lumii_layoutengine_Diagram_$layoutSetLinePoints__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(this$static.lv_lumii_layoutengine_Element_diagram, line, lineType, points);
    }
     catch ($e0) {
      $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25)) {
        t = $e0;
        lineOwner.package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(line);
        java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Box_incidentLines, line);
        java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(element.lv_lumii_layoutengine_Box_incidentLines, line);
        throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2(t);
      }
       else 
        throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    }
    return line;
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_59);
  }
}

function lv_lumii_layoutengine_Box_$findLCABox__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2(this$static, box){
  var lcaContainer;
  lcaContainer = lv_lumii_layoutengine_Container_$findLCA__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2(this$static, box);
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(lcaContainer, 16) || (lcaContainer = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(lcaContainer, false));
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lcaContainer, 16);
}

function lv_lumii_layoutengine_Box_$getIncidentLines__Llv_lumii_layoutengine_Box_2Ljava_util_ArrayList_2(this$static){
  if (this$static.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_Box_incidentLines);
}

function lv_lumii_layoutengine_Box_$move__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Point2D$Double_2V(this$static, newCenter, newOwner, growPoint){
  var box, box$iterator, element, element$iterator, line, line$iterator, line$iterator0, lineOwner, linesToRetrace, newDiagram, oldDiagram;
  if (newOwner == this$static || lv_lumii_layoutengine_Element_$isDescendantOf__Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2Z(newOwner, this$static)) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('A box cannot be moved into itself.');
  }
  newDiagram = newOwner.lv_lumii_layoutengine_Element_diagram;
  oldDiagram = this$static.lv_lumii_layoutengine_Element_diagram;
  newDiagram != oldDiagram && lv_lumii_layoutengine_Transaction$Operation$AdjustOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2ZV(oldDiagram);
  lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V(newDiagram, lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(newOwner, true));
  linesToRetrace = new java_util_LinkedHashSet_LinkedHashSet__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_Box_incidentLines);
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this$static)); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(linesToRetrace, box.lv_lumii_layoutengine_Box_incidentLines);
  }
  if (newOwner != com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 13)) {
    for (line$iterator0 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(linesToRetrace.java_util_HashSet_map)); line$iterator0.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator0), 10);
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Element_owner, 13).package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(line);
    }
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newOwner.lv_lumii_layoutengine_Container_boxes, this$static);
    if (newOwner != com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 13)) {
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 13).package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(this$static);
      this$static.lv_lumii_layoutengine_Element_owner = newOwner;
      if (newDiagram != oldDiagram) {
        this$static.lv_lumii_layoutengine_Element_diagram = newDiagram;
        for (element$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Element_$getDescendants__Llv_lumii_layoutengine_Element_2Ljava_util_ArrayList_2(this$static)); element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          element = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_last = element$iterator.java_util_AbstractList$IteratorImpl_i++), 57));
          element.lv_lumii_layoutengine_Element_diagram = newDiagram;
        }
      }
    }
    for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(linesToRetrace.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
      lv_lumii_layoutengine_Element_$setOwner__Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2V(line, lv_lumii_layoutengine_Line_findOwner__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)));
      lineOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Element_owner, 13);
      if (lineOwner) {
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lineOwner.lv_lumii_layoutengine_Container_lines, line);
        if (newDiagram != oldDiagram) {
          line.lv_lumii_layoutengine_Element_diagram = newDiagram;
          for (element$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Element_$getDescendants__Llv_lumii_layoutengine_Element_2Ljava_util_ArrayList_2(line)); element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
            element = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_last = element$iterator.java_util_AbstractList$IteratorImpl_i++), 57));
            element.lv_lumii_layoutengine_Element_diagram = newDiagram;
          }
        }
      }
    }
  }
  lv_lumii_layoutengine_Diagram_$layoutMoveRectangle__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(newDiagram, this$static, newCenter, growPoint);
  newDiagram != oldDiagram && lv_lumii_layoutengine_Diagram_$layoutAdjust__Llv_lumii_layoutengine_Diagram_2V(oldDiagram);
}

function lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2DV(left, right, top_0, bottom, owner, spacing){
  lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV.call(this, left, right, top_0, bottom, owner, (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED), spacing);
}

function lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(left, right, top_0, bottom, owner, arrangeStyle, spacing){
  lv_lumii_layoutengine_Container_Container__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV.call(this, left, right, top_0, bottom, owner, arrangeStyle, 0, spacing);
  this.lv_lumii_layoutengine_Box_incidentLines = new java_util_LinkedHashSet_LinkedHashSet__V;
  this.lv_lumii_layoutengine_Box_outsideLabels = new java_util_LinkedHashSet_LinkedHashSet__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(16, 13, {12:1, 16:1, 183:1, 13:1, 57:1, 62:1}, lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2DV, lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV);
_.getChildren__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_Box_getChildren__Ljava_util_ArrayList_2(){
  var children;
  if (this.lv_lumii_layoutengine_AbstractContainer_hide) {
    return new java_util_ArrayList_ArrayList__V;
  }
   else {
    children = lv_lumii_layoutengine_Container_$getChildren__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this);
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(children, this.lv_lumii_layoutengine_Box_outsideLabels);
    return children;
  }
}
;
_.package_private$lv_lumii_layoutengine_Element$getChildren__Ljava_util_ArrayList_2 = _.getChildren__Ljava_util_ArrayList_2;
_.getIncidentLines__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_Box_getIncidentLines__Ljava_util_ArrayList_2(){
  return lv_lumii_layoutengine_Box_$getIncidentLines__Llv_lumii_layoutengine_Box_2Ljava_util_ArrayList_2(this);
}
;
_.package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V = function lv_lumii_layoutengine_Box_removeChild__Llv_lumii_layoutengine_Element_2V(element){
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 16)?java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Container_boxes, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 16)):com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 10)?java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Container_lines, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 10)):com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 13) && java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Container_containers, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 13));
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39) && lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1remove__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39), element);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Box', 16);
function lv_lumii_layoutengine_Box$BoxSide_$clinit__V(){
  lv_lumii_layoutengine_Box$BoxSide_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_Box$BoxSide_TOP = new lv_lumii_layoutengine_Box$BoxSide_Box$BoxSide__Ljava_lang_String_2IV($intern_43, 0);
  lv_lumii_layoutengine_Box$BoxSide_RIGHT = new lv_lumii_layoutengine_Box$BoxSide_Box$BoxSide__Ljava_lang_String_2IV($intern_41, 1);
  lv_lumii_layoutengine_Box$BoxSide_BOTTOM = new lv_lumii_layoutengine_Box$BoxSide_Box$BoxSide__Ljava_lang_String_2IV($intern_44, 2);
  lv_lumii_layoutengine_Box$BoxSide_LEFT = new lv_lumii_layoutengine_Box$BoxSide_Box$BoxSide__Ljava_lang_String_2IV($intern_40, 3);
}

function lv_lumii_layoutengine_Box$BoxSide_Box$BoxSide__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
  this.lv_lumii_layoutengine_Box$BoxSide_mask = 1 << this.java_lang_Enum_ordinal;
}

function lv_lumii_layoutengine_Box$BoxSide_findPointSide__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2(point, prevPoint, box){
  lv_lumii_layoutengine_Box$BoxSide_$clinit__V();
  var onBottom, onLeft, onRight, onTop;
  if (!(box.lv_lumii_layoutengine_AbstractContainer_left <= point.java_awt_geom_Point2D$Double_x && point.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_right && box.lv_lumii_layoutengine_AbstractContainer_top <= point.java_awt_geom_Point2D$Double_y && point.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_bottom && (point.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_top || point.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_bottom || point.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_left || point.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_right))) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Point must lie on the perimeter of the box ' + box.lv_lumii_layoutengine_AbstractContainer_left + ' ' + box.lv_lumii_layoutengine_AbstractContainer_right + ' ' + box.lv_lumii_layoutengine_AbstractContainer_top + ' ' + box.lv_lumii_layoutengine_AbstractContainer_bottom + ' pnt: ' + point.java_awt_geom_Point2D$Double_x + ' ' + point.java_awt_geom_Point2D$Double_y);
  }
  onLeft = point.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_left;
  onRight = point.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_right;
  onTop = point.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_top;
  onBottom = point.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_bottom;
  if (onLeft && !(onTop || onBottom)) {
    return lv_lumii_layoutengine_Box$BoxSide_LEFT;
  }
  if (onRight && !(onTop || onBottom)) {
    return lv_lumii_layoutengine_Box$BoxSide_RIGHT;
  }
  if (onTop && !(onLeft || onRight)) {
    return lv_lumii_layoutengine_Box$BoxSide_TOP;
  }
  if (onBottom && !(onLeft || onRight)) {
    return lv_lumii_layoutengine_Box$BoxSide_BOTTOM;
  }
  return point.java_awt_geom_Point2D$Double_x == prevPoint.java_awt_geom_Point2D$Double_x?onTop?lv_lumii_layoutengine_Box$BoxSide_TOP:lv_lumii_layoutengine_Box$BoxSide_BOTTOM:onLeft?lv_lumii_layoutengine_Box$BoxSide_LEFT:lv_lumii_layoutengine_Box$BoxSide_RIGHT;
}

function lv_lumii_layoutengine_Box$BoxSide_getCoordinate__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2D(box, side){
  lv_lumii_layoutengine_Box$BoxSide_$clinit__V();
  return side == lv_lumii_layoutengine_Box$BoxSide_LEFT?box.lv_lumii_layoutengine_AbstractContainer_left:side == lv_lumii_layoutengine_Box$BoxSide_RIGHT?box.lv_lumii_layoutengine_AbstractContainer_right:side == lv_lumii_layoutengine_Box$BoxSide_TOP?box.lv_lumii_layoutengine_AbstractContainer_top:box.lv_lumii_layoutengine_AbstractContainer_bottom;
}

function lv_lumii_layoutengine_Box$BoxSide_values___3Llv_lumii_layoutengine_Box$BoxSide_2(){
  lv_lumii_layoutengine_Box$BoxSide_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box$BoxSide_12_1classLit, 1), $intern_32, 73, 0, [lv_lumii_layoutengine_Box$BoxSide_TOP, lv_lumii_layoutengine_Box$BoxSide_RIGHT, lv_lumii_layoutengine_Box$BoxSide_BOTTOM, lv_lumii_layoutengine_Box$BoxSide_LEFT]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(73, 36, {5:1, 29:1, 36:1, 73:1}, lv_lumii_layoutengine_Box$BoxSide_Box$BoxSide__Ljava_lang_String_2IV);
_.lv_lumii_layoutengine_Box$BoxSide_mask = 0;
var lv_lumii_layoutengine_Box$BoxSide_BOTTOM, lv_lumii_layoutengine_Box$BoxSide_LEFT, lv_lumii_layoutengine_Box$BoxSide_RIGHT, lv_lumii_layoutengine_Box$BoxSide_TOP;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box$BoxSide_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'Box/BoxSide', 73, lv_lumii_layoutengine_Box$BoxSide_values___3Llv_lumii_layoutengine_Box$BoxSide_2);
function lv_lumii_layoutengine_ComponentLayout_$buildInnerLines__Llv_lumii_layoutengine_ComponentLayout_2Ljava_util_List_2(this$static){
  var boxSet, c, c$iterator, end, flatLine, incidentLine, incidentLine$iterator, lines, start_0;
  lines = new java_util_ArrayList_ArrayList__V;
  boxSet = new java_util_HashSet_HashSet__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_children);
  for (c$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_containers.java_util_HashSet_map)); c$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    c = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(c$iterator), 13);
    for (incidentLine$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(c)); incidentLine$iterator.java_util_AbstractList$IteratorImpl_i < incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      incidentLine = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(incidentLine$iterator.java_util_AbstractList$IteratorImpl_i < incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(incidentLine$iterator.java_util_AbstractList$IteratorImpl_last = incidentLine$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
      if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine)) {
        start_0 = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine);
        while (!!start_0 && !boxSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(start_0)) {
          start_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(start_0.lv_lumii_layoutengine_Element_owner, 13);
        }
        end = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine);
        while (!!end && !boxSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(end)) {
          end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(end.lv_lumii_layoutengine_Element_owner, 13);
        }
        if (!!start_0 && !!end) {
          flatLine = new lv_lumii_layoutengine_util_LayoutLine_LayoutLine__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V(incidentLine, start_0, end);
          com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(lines.java_util_ArrayList_array, lines.java_util_ArrayList_array.length, flatLine);
        }
         else {
          throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V($intern_60);
        }
      }
    }
  }
  return lines;
}

function lv_lumii_layoutengine_ComponentLayout_$getLaidOutPass__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_Container_2I(this$static, c){
  var pass;
  pass = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_ComponentLayout_baseLayouter.lv_lumii_layoutengine_LayoutAlgorithm_laidOutInPass.get__Ljava_lang_Object_2Ljava_lang_Object_2(c), 9);
  if (!pass) {
    return 0;
  }
  return pass.java_lang_Integer_value;
}

function lv_lumii_layoutengine_ComponentLayout_$getOuterNeighbors__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_Container_2Ljava_util_List_2(this$static, c){
  var adj, adj$iterator, adj$iterator0, box, neighbors, nestedPart, other;
  neighbors = new java_util_ArrayList_ArrayList__V;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(c, 183)) {
    box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c, 183);
    for (adj$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(box.getIncidentLines__Ljava_util_ArrayList_2()); adj$iterator0.java_util_AbstractList$IteratorImpl_i < adj$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      adj = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(adj$iterator0.java_util_AbstractList$IteratorImpl_i < adj$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(adj$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(adj$iterator0.java_util_AbstractList$IteratorImpl_last = adj$iterator0.java_util_AbstractList$IteratorImpl_i++), 10));
      if (java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_outerLines, adj)) {
        other = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(adj);
        other == c && (other = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(adj));
        !!other && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(neighbors.java_util_ArrayList_array, neighbors.java_util_ArrayList_array.length, other) , true);
      }
    }
    nestedPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_ComponentLayout_baseLayouter.lv_lumii_layoutengine_LayoutAlgorithm_componentPartMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(c), 58);
    if (nestedPart) {
      for (adj$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(nestedPart.lv_lumii_layoutengine_DiagramPart_outerLines.java_util_HashSet_map)); adj$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
        adj = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(adj$iterator), 10);
        if (java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_outerLines, adj)) {
          other = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(adj);
          while (other) {
            other = other.getOwner__Llv_lumii_layoutengine_Element_2();
            if (other == c) {
              break;
            }
          }
          other == c?(other = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(adj)):(other = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(adj));
          com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(other, 13) && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(neighbors, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(other, 13));
        }
      }
    }
  }
  return neighbors;
}

function lv_lumii_layoutengine_ComponentLayout_$moveAbstrContWithChildren__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_AbstractContainer_2DDV(aCont, newCenterX, newCenterY){
  var descendantACont, descendantACont$iterator, moveVector;
  moveVector = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newCenterX - (aCont.lv_lumii_layoutengine_AbstractContainer_left + aCont.lv_lumii_layoutengine_AbstractContainer_right) / 2, newCenterY - (aCont.lv_lumii_layoutengine_AbstractContainer_top + aCont.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(aCont, moveVector);
  for (descendantACont$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_AbstractContainer_$getDescendantAbstractContainers__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(aCont, false)); descendantACont$iterator.java_util_AbstractList$IteratorImpl_i < descendantACont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    descendantACont = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(descendantACont$iterator.java_util_AbstractList$IteratorImpl_i < descendantACont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(descendantACont$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(descendantACont$iterator.java_util_AbstractList$IteratorImpl_last = descendantACont$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(descendantACont, moveVector);
  }
}

function lv_lumii_layoutengine_ComponentLayout_ComponentLayout__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(part, baseLayouter){
  this.lv_lumii_layoutengine_ComponentLayout_part = part;
  this.lv_lumii_layoutengine_ComponentLayout_baseLayouter = baseLayouter;
}

function lv_lumii_layoutengine_ComponentLayout_createLayouter__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_ComponentLayout_2(part, baseLayouter){
  switch (part.lv_lumii_layoutengine_DiagramPart_style.java_lang_Enum_ordinal) {
    case 3:
      return new lv_lumii_layoutengine_SpringLayoutAlgorithm_SpringLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(part, baseLayouter);
    case 1:
      return new lv_lumii_layoutengine_FlowLayoutAlgorithm_FlowLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(part, baseLayouter);
    case 2:
      return new lv_lumii_layoutengine_UniversalLayoutAlgorithm_UniversalLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(part, baseLayouter);
    default:throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Unsupported layout style ' + java_lang_Enum_$toString__Ljava_lang_Enum_2Ljava_lang_String_2(part.lv_lumii_layoutengine_DiagramPart_style));
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(87, 1, $intern_61);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ComponentLayout_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'ComponentLayout', 87);
function lv_lumii_layoutengine_ConnectedComponentPacking_buildInnerLines__Llv_lumii_layoutengine_DiagramPart_2Ljava_util_List_2(part){
  var boxSet, c, c$iterator, end, flatLine, incidentLine, incidentLine$iterator, lines, start_0;
  lines = new java_util_ArrayList_ArrayList__V;
  boxSet = new java_util_HashSet_HashSet__Ljava_util_Collection_2V(part.lv_lumii_layoutengine_DiagramPart_children);
  for (c$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(part.lv_lumii_layoutengine_DiagramPart_containers.java_util_HashSet_map)); c$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    c = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(c$iterator), 13);
    for (incidentLine$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(c)); incidentLine$iterator.java_util_AbstractList$IteratorImpl_i < incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      incidentLine = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(incidentLine$iterator.java_util_AbstractList$IteratorImpl_i < incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(incidentLine$iterator.java_util_AbstractList$IteratorImpl_last = incidentLine$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
      if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine)) {
        start_0 = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine);
        while (!!start_0 && !boxSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(start_0)) {
          start_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(start_0.lv_lumii_layoutengine_Element_owner, 13);
        }
        end = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine);
        while (!!end && !boxSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(end)) {
          end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(end.lv_lumii_layoutengine_Element_owner, 13);
        }
        if (!!start_0 && !!end) {
          flatLine = new lv_lumii_layoutengine_util_LayoutLine_LayoutLine__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V(incidentLine, start_0, end);
          com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(lines.java_util_ArrayList_array, lines.java_util_ArrayList_array.length, flatLine);
        }
         else {
          throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V($intern_60);
        }
      }
    }
  }
  return lines;
}

function lv_lumii_layoutengine_ConnectedComponentPacking_fillPolyominos___3Llv_lumii_layoutengine_polyomino_Polyomino_2_3Llv_lumii_layoutengine_DiagramPart_2DDV(polyominos, conComponents, stepX, stepY){
  var aCont, aCont$iterator, conComp, curX, curY, deflVect, end, endX, endY, grid, h, i, jX, jXFrom, jXTo, jY, jY0, jYFrom, jYTo, l, line, line$iterator, lineVect, nextCol, nextCrWithHorLineX, nextCrWithHorLineXInt, polyomino, start_0, stepYGrid, tmp;
  for (i = 0; i < conComponents.length; i++) {
    polyomino = polyominos[i];
    conComp = conComponents[i];
    l = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_ceil__DD((polyomino.lv_lumii_layoutengine_polyomino_Polyomino_maxX - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minX + 0.1) / stepX));
    h = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_ceil__DD((polyomino.lv_lumii_layoutengine_polyomino_Polyomino_maxY - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minY + 0.1) / stepY));
    polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingX = (l * stepX - (polyomino.lv_lumii_layoutengine_polyomino_Polyomino_maxX - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minX)) / 2;
    polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingY = (h * stepY - (polyomino.lv_lumii_layoutengine_polyomino_Polyomino_maxY - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minY)) / 2;
    deflVect = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingX - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minX, polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingY - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minY);
    grid = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, [$intern_14, $intern_54], [95, 0], 8, [l, h], 2);
    for (aCont$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(conComp.lv_lumii_layoutengine_DiagramPart_enclosingContainer, false)); aCont$iterator.java_util_AbstractList$IteratorImpl_i < aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      aCont = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(aCont$iterator.java_util_AbstractList$IteratorImpl_i < aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(aCont$iterator.java_util_AbstractList$IteratorImpl_last = aCont$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      jXFrom = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((aCont.lv_lumii_layoutengine_AbstractContainer_left + deflVect.java_awt_geom_Point2D$Double_x) / stepX));
      jXTo = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((aCont.lv_lumii_layoutengine_AbstractContainer_right + deflVect.java_awt_geom_Point2D$Double_x) / stepX));
      jYFrom = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((aCont.lv_lumii_layoutengine_AbstractContainer_top + deflVect.java_awt_geom_Point2D$Double_y) / stepY));
      jYTo = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD((aCont.lv_lumii_layoutengine_AbstractContainer_bottom + deflVect.java_awt_geom_Point2D$Double_y) / stepY));
      for (jX = jXFrom; jX <= jXTo; jX++) {
        for (jY0 = jYFrom; jY0 <= jYTo; jY0++) {
          grid[jX][jY0] = true;
        }
      }
    }
    for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_ConnectedComponentPacking_buildInnerLines__Llv_lumii_layoutengine_DiagramPart_2Ljava_util_List_2(conComp)); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 72));
      start_0 = lv_lumii_layoutengine_AbstractContainer_$getCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_util_LayoutLine_startElement);
      start_0.java_awt_geom_Point2D$Double_x += deflVect.java_awt_geom_Point2D$Double_x;
      start_0.java_awt_geom_Point2D$Double_y += deflVect.java_awt_geom_Point2D$Double_y;
      end = lv_lumii_layoutengine_AbstractContainer_$getCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_util_LayoutLine_endElement);
      end.java_awt_geom_Point2D$Double_x += deflVect.java_awt_geom_Point2D$Double_x;
      end.java_awt_geom_Point2D$Double_y += deflVect.java_awt_geom_Point2D$Double_y;
      if (end.java_awt_geom_Point2D$Double_x < start_0.java_awt_geom_Point2D$Double_x) {
        tmp = end;
        end = start_0;
        start_0 = tmp;
      }
      lineVect = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(end.java_awt_geom_Point2D$Double_x - start_0.java_awt_geom_Point2D$Double_x, end.java_awt_geom_Point2D$Double_y - start_0.java_awt_geom_Point2D$Double_y);
      lineVect.java_awt_geom_Point2D$Double_x = lineVect.java_awt_geom_Point2D$Double_x * stepY / java_lang_Math_abs__DD(lineVect.java_awt_geom_Point2D$Double_y);
      if (lineVect.java_awt_geom_Point2D$Double_y >= 0) {
        lineVect.java_awt_geom_Point2D$Double_y = stepY;
        stepYGrid = 1;
      }
       else {
        lineVect.java_awt_geom_Point2D$Double_y = -stepY;
        stepYGrid = -1;
      }
      endX = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD(end.java_awt_geom_Point2D$Double_x / stepX));
      endY = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD(end.java_awt_geom_Point2D$Double_y / stepY));
      curX = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD(start_0.java_awt_geom_Point2D$Double_x / stepX));
      curY = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_floor__DD(start_0.java_awt_geom_Point2D$Double_y / stepY));
      stepYGrid == 1?(nextCrWithHorLineX = start_0.java_awt_geom_Point2D$Double_x + ((curY + 1) * stepY - start_0.java_awt_geom_Point2D$Double_y) * lineVect.java_awt_geom_Point2D$Double_x / lineVect.java_awt_geom_Point2D$Double_y):(nextCrWithHorLineX = start_0.java_awt_geom_Point2D$Double_x + (curY * stepY - start_0.java_awt_geom_Point2D$Double_y) * lineVect.java_awt_geom_Point2D$Double_x / lineVect.java_awt_geom_Point2D$Double_y);
      nextCrWithHorLineXInt = com_google_gwt_lang_Cast_round_1int__DI(Math.floor(nextCrWithHorLineX / stepX));
      for (; curY != endY; curY += stepYGrid) {
        nextCol = false;
        curX < nextCrWithHorLineXInt && (nextCol = true);
        for (; curX <= nextCrWithHorLineXInt && curX <= endX; curX++) {
          grid[curX][curY] = true;
        }
        nextCol || --curX;
        nextCrWithHorLineX += lineVect.java_awt_geom_Point2D$Double_x;
        nextCrWithHorLineXInt = com_google_gwt_lang_Cast_round_1int__DI(nextCrWithHorLineX / stepX);
      }
      for (; curX <= endX; curX++) {
        grid[curX][curY] = true;
      }
    }
    polyomino.lv_lumii_layoutengine_polyomino_Polyomino_coord = new java_util_ArrayList_ArrayList__V;
    for (jY = 0; jY < h; jY++) {
      for (jX = 0; jX < l; jX++) {
        grid[jX][jY] && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(polyomino.lv_lumii_layoutengine_polyomino_Polyomino_coord, new lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_Polyomino$IntegerPoint__IIV(jX, jY));
      }
    }
  }
}

function lv_lumii_layoutengine_ConnectedComponentPacking_pack___3Llv_lumii_layoutengine_DiagramPart_2DDDV(parts){
  var aCont, aCont$iterator, area, descendantACont, descendantACont$iterator, i, i0, i1, moveVector, packer, polyomino, polyomino$index, polyomino$max, polyominos, stepX, stepY;
  polyominos = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1polyomino_1Polyomino_12_1classLit, $intern_14, 110, parts.length, 0, 1);
  for (i0 = 0; i0 < polyominos.length; i0++) {
    polyominos[i0] = new lv_lumii_layoutengine_polyomino_Polyomino_Polyomino__V;
  }
  for (i1 = 0; i1 < parts.length; i1++) {
    for (aCont$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(parts[i1].lv_lumii_layoutengine_DiagramPart_enclosingContainer, false)); aCont$iterator.java_util_AbstractList$IteratorImpl_i < aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      aCont = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(aCont$iterator.java_util_AbstractList$IteratorImpl_i < aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(aCont$iterator.java_util_AbstractList$IteratorImpl_last = aCont$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      aCont.lv_lumii_layoutengine_AbstractContainer_left < polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_minX && (polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_minX = aCont.lv_lumii_layoutengine_AbstractContainer_left);
      aCont.lv_lumii_layoutengine_AbstractContainer_right > polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_maxX && (polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_maxX = aCont.lv_lumii_layoutengine_AbstractContainer_right);
      aCont.lv_lumii_layoutengine_AbstractContainer_top < polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_minY && (polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_minY = aCont.lv_lumii_layoutengine_AbstractContainer_top);
      aCont.lv_lumii_layoutengine_AbstractContainer_bottom > polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_maxY && (polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_maxY = aCont.lv_lumii_layoutengine_AbstractContainer_bottom);
    }
    polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_spacingX = 100 + (polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_maxX - polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_minX);
    polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_spacingY = 100 + (polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_maxY - polyominos[i1].lv_lumii_layoutengine_polyomino_Polyomino_minY);
  }
  area = 0;
  for (polyomino$index = 0 , polyomino$max = polyominos.length; polyomino$index < polyomino$max; ++polyomino$index) {
    polyomino = polyominos[polyomino$index];
    area += (polyomino.lv_lumii_layoutengine_polyomino_Polyomino_maxX - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minX + 2 * polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingX + 0.1) * (polyomino.lv_lumii_layoutengine_polyomino_Polyomino_maxY - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minY + 2 * polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingY + 0.1);
  }
  stepX = java_lang_Math_sqrt__DD(area / (polyominos.length * 16));
  stepY = stepX;
  stepX *= 1;
  lv_lumii_layoutengine_ConnectedComponentPacking_fillPolyominos___3Llv_lumii_layoutengine_polyomino_Polyomino_2_3Llv_lumii_layoutengine_DiagramPart_2DDV(polyominos, parts, stepX, stepY);
  packer = new lv_lumii_layoutengine_polyomino_PolyominoPacking_PolyominoPacking__V;
  lv_lumii_layoutengine_polyomino_PolyominoPacking_$pack__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2_3Llv_lumii_layoutengine_polyomino_Polyomino_2V(packer, polyominos);
  for (i = 0; i < polyominos.length; i++) {
    polyomino = polyominos[i];
    moveVector = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(polyomino.lv_lumii_layoutengine_polyomino_Polyomino_x * stepX - (polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minX - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingX), polyomino.lv_lumii_layoutengine_polyomino_Polyomino_y * stepY - (polyomino.lv_lumii_layoutengine_polyomino_Polyomino_minY - polyomino.lv_lumii_layoutengine_polyomino_Polyomino_spacingY));
    for (aCont$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(parts[i].lv_lumii_layoutengine_DiagramPart_enclosingContainer, false)); aCont$iterator.java_util_AbstractList$IteratorImpl_i < aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      aCont = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(aCont$iterator.java_util_AbstractList$IteratorImpl_i < aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aCont$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(aCont$iterator.java_util_AbstractList$IteratorImpl_last = aCont$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(aCont, moveVector);
      for (descendantACont$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_AbstractContainer_$getDescendantAbstractContainers__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(aCont, false)); descendantACont$iterator.java_util_AbstractList$IteratorImpl_i < descendantACont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        descendantACont = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(descendantACont$iterator.java_util_AbstractList$IteratorImpl_i < descendantACont$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(descendantACont$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(descendantACont$iterator.java_util_AbstractList$IteratorImpl_last = descendantACont$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
        lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(descendantACont, moveVector);
      }
    }
  }
}

function lv_lumii_layoutengine_Diagram_$adjust__Llv_lumii_layoutengine_Diagram_2V(this$static){
  this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL) && lv_lumii_layoutengine_Normalizer_adjust__Llv_lumii_layoutengine_Diagram_2V(this$static);
  this$static.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static);
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this$static));
}

function lv_lumii_layoutengine_Diagram_$adjustBounds__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2V(this$static, line){
  var point, point$iterator, tBottom, tLeft, tRight, tSpacing, tTop;
  tLeft = this$static.lv_lumii_layoutengine_Diagram_bounds.java_awt_geom_Rectangle2D$Double_x;
  tTop = this$static.lv_lumii_layoutengine_Diagram_bounds.java_awt_geom_Rectangle2D$Double_y;
  tRight = java_awt_geom_RectangularShape_$getMaxX__Ljava_awt_geom_RectangularShape_2D(this$static.lv_lumii_layoutengine_Diagram_bounds);
  tBottom = java_awt_geom_RectangularShape_$getMaxY__Ljava_awt_geom_RectangularShape_2D(this$static.lv_lumii_layoutengine_Diagram_bounds);
  tSpacing = line.lv_lumii_layoutengine_Element_spacing;
  if (line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points) {
    for (point$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points); point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_last = point$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
      tLeft = java_lang_Math_min__DDD(tLeft, point.java_awt_geom_Point2D$Double_x - tSpacing);
      tTop = java_lang_Math_min__DDD(tTop, point.java_awt_geom_Point2D$Double_y - tSpacing);
      tRight = java_lang_Math_max__DDD(tRight, point.java_awt_geom_Point2D$Double_x + tSpacing);
      tBottom = java_lang_Math_max__DDD(tBottom, point.java_awt_geom_Point2D$Double_y + tSpacing);
    }
  }
  this$static.lv_lumii_layoutengine_Diagram_bounds = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(tLeft, tTop, tRight - tLeft, tBottom - tTop);
}

function lv_lumii_layoutengine_Diagram_$adjustEpsilon__Llv_lumii_layoutengine_Diagram_2DV(this$static, spacing){
  this$static.lv_lumii_layoutengine_Diagram_epsilon = java_lang_Math_min__DDD(this$static.lv_lumii_layoutengine_Diagram_epsilon, spacing * 0.02 * $intern_55);
}

function lv_lumii_layoutengine_Diagram_$arrange__Llv_lumii_layoutengine_Diagram_2V(this$static){
  var arranger, oldState;
  this$static.lv_lumii_layoutengine_Diagram_state == (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_TRANSACTION) && lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
  oldState = this$static.lv_lumii_layoutengine_Diagram_state;
  this$static.lv_lumii_layoutengine_Diagram_state = lv_lumii_layoutengine_Diagram$State_DEFAULT;
  arranger = new lv_lumii_layoutengine_LayoutAlgorithm_LayoutAlgorithm__V;
  lv_lumii_layoutengine_LayoutAlgorithm_$layout__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Diagram_2V(arranger, this$static);
  this$static.lv_lumii_layoutengine_Diagram_state = oldState;
  this$static.lv_lumii_layoutengine_Diagram_state == lv_lumii_layoutengine_Diagram$State_TRANSACTION && this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_MANUAL && (this$static.lv_lumii_layoutengine_Diagram_state = lv_lumii_layoutengine_Diagram$State_TRANSACTION);
}

function lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static){
  if (this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    if (this$static.lv_lumii_layoutengine_Diagram_transaction) {
      this$static.lv_lumii_layoutengine_Diagram_transaction.package_private$lv_lumii_layoutengine_Transaction$perform__V();
      this$static.lv_lumii_layoutengine_Diagram_transaction = null;
    }
    this$static.lv_lumii_layoutengine_Diagram_state = lv_lumii_layoutengine_Diagram$State_DEFAULT;
  }
}

function lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this$static){
  var q;
  q = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__V;
  !this$static.lv_lumii_layoutengine_Diagram_bounds?java_awt_geom_Rectangle2D$Double_$setRect__Ljava_awt_geom_Rectangle2D$Double_2DDDDV(q, this$static.lv_lumii_layoutengine_Diagram_defaultBounds.java_awt_geom_Rectangle2D$Double_x, this$static.lv_lumii_layoutengine_Diagram_defaultBounds.java_awt_geom_Rectangle2D$Double_y, this$static.lv_lumii_layoutengine_Diagram_defaultBounds.java_awt_geom_Rectangle2D$Double_width, this$static.lv_lumii_layoutengine_Diagram_defaultBounds.java_awt_geom_Rectangle2D$Double_height):java_awt_geom_Rectangle2D$Double_$setRect__Ljava_awt_geom_Rectangle2D$Double_2DDDDV(q, this$static.lv_lumii_layoutengine_Diagram_bounds.java_awt_geom_Rectangle2D$Double_x, this$static.lv_lumii_layoutengine_Diagram_bounds.java_awt_geom_Rectangle2D$Double_y, this$static.lv_lumii_layoutengine_Diagram_bounds.java_awt_geom_Rectangle2D$Double_width, this$static.lv_lumii_layoutengine_Diagram_bounds.java_awt_geom_Rectangle2D$Double_height);
  return q;
}

function lv_lumii_layoutengine_Diagram_$layoutAdjust__Llv_lumii_layoutengine_Diagram_2V(this$static){
  if (this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    this$static.lv_lumii_layoutengine_Diagram_transaction.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(new lv_lumii_layoutengine_Transaction$Operation$AdjustOperation_Transaction$Operation$AdjustOperation__V);
    this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_TRANSACTION && lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
  }
}

function lv_lumii_layoutengine_Diagram_$layoutAdjustOutsideLabel__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_OutsideLabel_2V(label_0){
  var center, first, line, points, second, segmentHorizontal, segmentIndex;
  center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10);
  label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = lv_lumii_layoutengine_GeometryHelper_findNearestSegment__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2I(center, line);
  lv_lumii_layoutengine_GeometryHelper_movePointToLine__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2IV(center, line, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex);
  points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(line);
  segmentIndex = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
  first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex], 3));
  second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex + 1], 3));
  segmentHorizontal = first.java_awt_geom_Point2D$Double_y == second.java_awt_geom_Point2D$Double_y;
  if (segmentHorizontal != label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal) {
    label_0.lv_lumii_layoutengine_OutsideLabel_autoFlip && (lv_lumii_layoutengine_OutsideLabel_$_1flip__Llv_lumii_layoutengine_OutsideLabel_2V(label_0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL) && lv_lumii_layoutengine_OutsideLabel$LineLabel_$resetBounds__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2V(label_0));
    label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal = segmentHorizontal;
  }
  lv_lumii_layoutengine_GeometryHelper_placeLabelOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(label_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3), center);
}

function lv_lumii_layoutengine_Diagram_$layoutMoveRectangle__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(this$static, rectangle, newCenter, growPoint){
  var label_0, label$iterator, line, line$iterator, line$iterator0, line$iterator1, moveVector, point, point$iterator, rect, rect$iterator, rect$iterator0, rectangles;
  if (this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    this$static.lv_lumii_layoutengine_Diagram_transaction.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(new lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(rectangle, newCenter, growPoint));
    this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_TRANSACTION && lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
  }
   else {
    moveVector = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newCenter.java_awt_geom_Point2D$Double_x - (rectangle.lv_lumii_layoutengine_AbstractContainer_left + rectangle.lv_lumii_layoutengine_AbstractContainer_right) / 2, newCenter.java_awt_geom_Point2D$Double_y - (rectangle.lv_lumii_layoutengine_AbstractContainer_top + rectangle.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    rectangles = lv_lumii_layoutengine_AbstractContainer_$getDescendantRectangles__Llv_lumii_layoutengine_AbstractContainer_2ZZLjava_util_ArrayList_2(rectangle, true, true);
    for (rect$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator0.java_util_AbstractList$IteratorImpl_i < rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator0.java_util_AbstractList$IteratorImpl_i < rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator0.java_util_AbstractList$IteratorImpl_last = rect$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
      lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(rect, moveVector);
      (rect.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(rect):rect.lv_lumii_layoutengine_AbstractContainer_layoutConstraints).package_private$lv_lumii_layoutengine_LayoutConstraints$transpose__Ljava_awt_geom_Point2D$Double_2V(moveVector);
    }
    for (line$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(rectangle)); line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_last = line$iterator0.java_util_AbstractList$IteratorImpl_i++), 10));
      for (point$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points); point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_last = point$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
        point.java_awt_geom_Point2D$Double_x += moveVector.java_awt_geom_Point2D$Double_x;
        point.java_awt_geom_Point2D$Double_y += moveVector.java_awt_geom_Point2D$Double_y;
      }
    }
    for (line$iterator1 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(rectangle.lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator1.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator1), 10);
      if (lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) == lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
        for (point$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points); point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_last = point$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
          point.java_awt_geom_Point2D$Double_x += moveVector.java_awt_geom_Point2D$Double_x;
          point.java_awt_geom_Point2D$Double_y += moveVector.java_awt_geom_Point2D$Double_y;
        }
      }
    }
    for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rect, 16)) {
        for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect, 16).lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
          line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
          lv_lumii_layoutengine_Adjuster$ManualAdjuster_reconnectEndPoints__Llv_lumii_layoutengine_Line_2V(line);
          for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels)); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
            label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
            lv_lumii_layoutengine_Diagram_$layoutAdjustOutsideLabel__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_OutsideLabel_2V(label_0);
          }
        }
      }
    }
    lv_lumii_layoutengine_Adjuster$ManualAdjuster_updateParentRectangles__Llv_lumii_layoutengine_AbstractContainer_2V(rectangle);
    this$static.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static);
    lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this$static));
  }
}

function lv_lumii_layoutengine_Diagram_$layoutPlaceRectangle__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(this$static, rectangle, growPoint){
  if (this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    lv_lumii_layoutengine_Diagram_$adjustEpsilon__Llv_lumii_layoutengine_Diagram_2DV(this$static, rectangle.lv_lumii_layoutengine_Element_spacing);
    this$static.lv_lumii_layoutengine_Diagram_transaction.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(new lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(rectangle, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((rectangle.lv_lumii_layoutengine_AbstractContainer_left + rectangle.lv_lumii_layoutengine_AbstractContainer_right) / 2, (rectangle.lv_lumii_layoutengine_AbstractContainer_top + rectangle.lv_lumii_layoutengine_AbstractContainer_bottom) / 2), growPoint));
    this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_TRANSACTION && lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
  }
   else {
    lv_lumii_layoutengine_Adjuster$ManualAdjuster_updateParentRectangles__Llv_lumii_layoutengine_AbstractContainer_2V(rectangle);
  }
}

function lv_lumii_layoutengine_Diagram_$layoutResizeRectangle__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, rectangle, bounds){
  var border, border$iterator, border$iterator0, cer, constraints, label_0, label$iterator, line, line$iterator;
  if (this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    this$static.lv_lumii_layoutengine_Diagram_transaction.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(new lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_Transaction$Operation$RectangleResizeOperation__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(rectangle, bounds));
    this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_TRANSACTION && lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
  }
   else {
    cer = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(rectangle);
    if (!cer) {
      lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(rectangle, bounds);
    }
     else {
      rectangle.lv_lumii_layoutengine_AbstractContainer_left = java_lang_Math_min__DDD(cer.java_awt_geom_Rectangle2D$Double_x, bounds.java_awt_geom_Rectangle2D$Double_x);
      rectangle.lv_lumii_layoutengine_AbstractContainer_right = java_lang_Math_max__DDD(cer.java_awt_geom_Rectangle2D$Double_x + cer.java_awt_geom_Rectangle2D$Double_width, bounds.java_awt_geom_Rectangle2D$Double_x + bounds.java_awt_geom_Rectangle2D$Double_width);
      rectangle.lv_lumii_layoutengine_AbstractContainer_top = java_lang_Math_min__DDD(cer.java_awt_geom_Rectangle2D$Double_y, bounds.java_awt_geom_Rectangle2D$Double_y);
      rectangle.lv_lumii_layoutengine_AbstractContainer_bottom = java_lang_Math_max__DDD(cer.java_awt_geom_Rectangle2D$Double_y + cer.java_awt_geom_Rectangle2D$Double_height, bounds.java_awt_geom_Rectangle2D$Double_y + bounds.java_awt_geom_Rectangle2D$Double_height);
    }
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rectangle.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(rectangle):rectangle.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39)) {
      constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(rectangle):rectangle.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
      for (border$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints); border$iterator0.java_util_AbstractList$IteratorImpl_i < border$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        border = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(border$iterator0.java_util_AbstractList$IteratorImpl_i < border$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(border$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(border$iterator0.java_util_AbstractList$IteratorImpl_last = border$iterator0.java_util_AbstractList$IteratorImpl_i++), 27));
        border.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = java_lang_Math_min__DDD(java_lang_Math_max__DDD(border.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos, rectangle.lv_lumii_layoutengine_AbstractContainer_left), rectangle.lv_lumii_layoutengine_AbstractContainer_right);
      }
      for (border$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints); border$iterator.java_util_AbstractList$IteratorImpl_i < border$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        border = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(border$iterator.java_util_AbstractList$IteratorImpl_i < border$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(border$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(border$iterator.java_util_AbstractList$IteratorImpl_last = border$iterator.java_util_AbstractList$IteratorImpl_i++), 27));
        border.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = java_lang_Math_min__DDD(java_lang_Math_max__DDD(border.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos, rectangle.lv_lumii_layoutengine_AbstractContainer_top), rectangle.lv_lumii_layoutengine_AbstractContainer_bottom);
      }
    }
    lv_lumii_layoutengine_Adjuster$ManualAdjuster_updateParentRectangles__Llv_lumii_layoutengine_AbstractContainer_2V(rectangle);
    for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(rectangle.lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
      lv_lumii_layoutengine_Adjuster$ManualAdjuster_reconnectEndPoints__Llv_lumii_layoutengine_Line_2V(line);
    }
    for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(rectangle.lv_lumii_layoutengine_Box_outsideLabels)); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++)));
      lv_lumii_layoutengine_Diagram_$layoutAdjustOutsideLabel__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_OutsideLabel_2V(label_0);
    }
    this$static.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static);
    lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this$static));
  }
}

function lv_lumii_layoutengine_Diagram_$layoutSetLinePoints__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(this$static, line, lineType, points){
  if (this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    lv_lumii_layoutengine_Adjuster$ManualAdjuster_setPoints__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2V(line, lineType, points);
    this$static.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static);
    lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this$static));
    this$static.lv_lumii_layoutengine_Diagram_transaction.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(new lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_Transaction$Operation$LineOperation$SetPointsOperation__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(line, lineType, points));
    this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_TRANSACTION && lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
  }
   else {
    lv_lumii_layoutengine_Adjuster$ManualAdjuster_setPoints__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2V(line, lineType, points);
    this$static.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static);
    lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this$static));
  }
}

function lv_lumii_layoutengine_Diagram_$layoutTraceLine__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(this$static, line, lineType){
  if (this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    this$static.lv_lumii_layoutengine_Diagram_transaction.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(new lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_Transaction$Operation$LineOperation$NewLineOperation__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(line, lineType));
    if (this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_TRANSACTION) {
      lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
    }
     else {
      if (lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) == lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
        lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static);
        this$static.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_MANUAL && (this$static.lv_lumii_layoutengine_Diagram_state = lv_lumii_layoutengine_Diagram$State_TRANSACTION);
      }
    }
  }
   else {
    switch (lineType.java_lang_Enum_ordinal) {
      case 1:
        line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2DV(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), line.lv_lumii_layoutengine_Element_spacing);
        break;
      case 0:
        line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2V(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line));
        break;
      case 2:
        line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2IIDV(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), 15, 15, line.lv_lumii_layoutengine_Element_spacing);
    }
    lv_lumii_layoutengine_LineOptimizer_cutLine__Llv_lumii_layoutengine_Line_2V(line);
    lv_lumii_layoutengine_Diagram_$adjustBounds__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2V(this$static, line);
  }
}

function lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this$static){
  this$static.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL) && (this$static.lv_lumii_layoutengine_Diagram_state = lv_lumii_layoutengine_Diagram$State_TRANSACTION);
}

function lv_lumii_layoutengine_Diagram_$updateBounds__Llv_lumii_layoutengine_Diagram_2V(this$static){
  this$static.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(this$static);
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(this$static, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this$static));
}

function lv_lumii_layoutengine_Diagram_$updateEpsilon__Llv_lumii_layoutengine_Diagram_2V(this$static){
  var rect, rect$iterator;
  this$static.lv_lumii_layoutengine_Diagram_epsilon = $intern_62;
  for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_AbstractContainer_$getDescendantRectangles__Llv_lumii_layoutengine_AbstractContainer_2ZZLjava_util_ArrayList_2(this$static, false, true)); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    this$static.lv_lumii_layoutengine_Diagram_epsilon = java_lang_Math_min__DDD(this$static.lv_lumii_layoutengine_Diagram_epsilon, rect.lv_lumii_layoutengine_Element_spacing);
  }
  this$static.lv_lumii_layoutengine_Diagram_epsilon = this$static.lv_lumii_layoutengine_Diagram_epsilon * 0.02 * $intern_55;
}

function lv_lumii_layoutengine_Diagram_Diagram__Ljava_awt_geom_Rectangle2D$Double_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2V(rectangle, arrangeStyle){
  lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV.call(this, rectangle.java_awt_geom_Rectangle2D$Double_x, rectangle.java_awt_geom_Rectangle2D$Double_x + rectangle.java_awt_geom_Rectangle2D$Double_width, rectangle.java_awt_geom_Rectangle2D$Double_y, rectangle.java_awt_geom_Rectangle2D$Double_y + rectangle.java_awt_geom_Rectangle2D$Double_height, null, arrangeStyle, 10);
  this.lv_lumii_layoutengine_Diagram_epsilon = $intern_62;
  this.lv_lumii_layoutengine_Diagram_retraceDistance = 500;
  if (arrangeStyle == (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED)) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_58);
  }
  this.lv_lumii_layoutengine_Diagram_bounds = this.lv_lumii_layoutengine_Diagram_defaultBounds = rectangle;
  this.lv_lumii_layoutengine_Diagram_state = (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_DEFAULT);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(66, 16, {12:1, 16:1, 183:1, 13:1, 66:1, 57:1, 62:1}, lv_lumii_layoutengine_Diagram_Diagram__Ljava_awt_geom_Rectangle2D$Double_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2V);
_.getBounds__Ljava_awt_geom_Rectangle2D$Double_2 = function lv_lumii_layoutengine_Diagram_getBounds__Ljava_awt_geom_Rectangle2D$Double_2(){
  return lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(this);
}
;
_.lv_lumii_layoutengine_Diagram_epsilon = 0;
_.lv_lumii_layoutengine_Diagram_retraceDistance = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Diagram_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Diagram', 66);
function lv_lumii_layoutengine_Diagram$State_$clinit__V(){
  lv_lumii_layoutengine_Diagram$State_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_Diagram$State_DEFAULT = new lv_lumii_layoutengine_Diagram$State_Diagram$State__Ljava_lang_String_2IV('DEFAULT', 0);
  lv_lumii_layoutengine_Diagram$State_TRANSACTION = new lv_lumii_layoutengine_Diagram$State_Diagram$State__Ljava_lang_String_2IV('TRANSACTION', 1);
  lv_lumii_layoutengine_Diagram$State_MANUAL = new lv_lumii_layoutengine_Diagram$State_Diagram$State__Ljava_lang_String_2IV('MANUAL', 2);
  lv_lumii_layoutengine_Diagram$State_AUTOMATIC = new lv_lumii_layoutengine_Diagram$State_Diagram$State__Ljava_lang_String_2IV('AUTOMATIC', 3);
}

function lv_lumii_layoutengine_Diagram$State_Diagram$State__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_Diagram$State_values___3Llv_lumii_layoutengine_Diagram$State_2(){
  lv_lumii_layoutengine_Diagram$State_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Diagram$State_12_1classLit, 1), $intern_32, 107, 0, [lv_lumii_layoutengine_Diagram$State_DEFAULT, lv_lumii_layoutengine_Diagram$State_TRANSACTION, lv_lumii_layoutengine_Diagram$State_MANUAL, lv_lumii_layoutengine_Diagram$State_AUTOMATIC]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(107, 36, {5:1, 29:1, 36:1, 107:1}, lv_lumii_layoutengine_Diagram$State_Diagram$State__Ljava_lang_String_2IV);
var lv_lumii_layoutengine_Diagram$State_AUTOMATIC, lv_lumii_layoutengine_Diagram$State_DEFAULT, lv_lumii_layoutengine_Diagram$State_MANUAL, lv_lumii_layoutengine_Diagram$State_TRANSACTION;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Diagram$State_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'Diagram/State', 107, lv_lumii_layoutengine_Diagram$State_values___3Llv_lumii_layoutengine_Diagram$State_2);
function lv_lumii_layoutengine_DiagramPart_DiagramPart__Llv_lumii_layoutengine_Container_2V(container){
  this.lv_lumii_layoutengine_DiagramPart_containers = new java_util_LinkedHashSet_LinkedHashSet__V;
  this.lv_lumii_layoutengine_DiagramPart_children = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_DiagramPart_outerLines = new java_util_LinkedHashSet_LinkedHashSet__V;
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_DiagramPart_containers, container);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(this.lv_lumii_layoutengine_DiagramPart_children, lv_lumii_layoutengine_Container_$getContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container));
  this.lv_lumii_layoutengine_DiagramPart_style = lv_lumii_layoutengine_Container_$getUsedArrangeStyle__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2(container);
  this.lv_lumii_layoutengine_DiagramPart_enclosingContainer = container;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(58, 1, {58:1}, lv_lumii_layoutengine_DiagramPart_DiagramPart__Llv_lumii_layoutengine_Container_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1DiagramPart_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'DiagramPart', 58);
function lv_lumii_layoutengine_FlowLayoutAlgorithm_FlowLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(part, baseLayouter){
  lv_lumii_layoutengine_ComponentLayout_ComponentLayout__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V.call(this, part, baseLayouter);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(233, 87, $intern_61, lv_lumii_layoutengine_FlowLayoutAlgorithm_FlowLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V);
_.layoutPass__IV = function lv_lumii_layoutengine_FlowLayoutAlgorithm_layoutPass__IV(pass){
  var b, b$iterator, box, box$iterator, boxCount, boxes, centerX, centerY, col, constraints, curLine, curLine$iterator, eDirected, edgeSourceId, edgeTargetId, externalX, externalY, flowData, flowDirection, flowLayoutKernelAlgorithm, flowSpacing, h, hSum, i, laidOutNeigborCount, lineCount, lines, nodeCol, nodeExternalX, nodeExternalY, nodeH, nodeIdMap, nodeRow, nodeW, nodeX, nodeY, ob, ob$iterator, outerNeighbors, row, w, wSum;
  if (pass > 2) {
    return;
  }
  flowDirection = 1;
  flowData = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer.lv_lumii_layoutengine_Container_arrangeData.getUsedData__Llv_lumii_layoutengine_ArrangeData_2(), 147);
  switch (flowData.lv_lumii_layoutengine_ArrangeData$FlowData_flowDirection.java_lang_Enum_ordinal) {
    case 1:
      flowDirection = 2;
      break;
    case 3:
      flowDirection = -2;
      break;
    case 0:
      flowDirection = -1;
      break;
    case 2:
      flowDirection = 1;
  }
  boxes = lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, false);
  boxCount = boxes.java_util_ArrayList_array.length;
  constraints = null;
  lv_lumii_layoutengine_AbstractContainer_$getLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_LayoutConstraints_2(this.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer).getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1 && (constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lv_lumii_layoutengine_AbstractContainer_$getLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_LayoutConstraints_2(this.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer), 39));
  centerX = 0;
  centerY = 0;
  nodeX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeY = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeW = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeH = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeExternalX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeExternalY = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeRow = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, boxCount, 7, 1);
  nodeCol = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, boxCount, 7, 1);
  nodeIdMap = new java_util_HashMap_HashMap__V;
  wSum = 0;
  hSum = 0;
  i = 0;
  for (b$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxes); b$iterator.java_util_AbstractList$IteratorImpl_i < b$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    b = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(b$iterator.java_util_AbstractList$IteratorImpl_i < b$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(b$iterator.java_util_AbstractList$IteratorImpl_last = b$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    nodeX[i] = (b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2;
    nodeY[i] = (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2;
    w = b.lv_lumii_layoutengine_AbstractContainer_right - b.lv_lumii_layoutengine_AbstractContainer_left;
    h = b.lv_lumii_layoutengine_AbstractContainer_bottom - b.lv_lumii_layoutengine_AbstractContainer_top;
    nodeW[i] = w;
    nodeH[i] = h;
    wSum += w;
    hSum += h;
    nodeExternalX[i] = NaN;
    nodeExternalY[i] = NaN;
    if (pass == 2) {
      centerX = lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D(this.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer);
      centerY = lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D(this.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer);
      com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(b, 13)?(outerNeighbors = lv_lumii_layoutengine_ComponentLayout_$getOuterNeighbors__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_Container_2Ljava_util_List_2(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 13))):(outerNeighbors = new java_util_ArrayList_ArrayList__V);
      laidOutNeigborCount = 0;
      externalX = 0;
      externalY = 0;
      for (ob$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(outerNeighbors); ob$iterator.java_util_AbstractList$IteratorImpl_i < ob$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        ob = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(ob$iterator.java_util_AbstractList$IteratorImpl_i < ob$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(ob$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(ob$iterator.java_util_AbstractList$IteratorImpl_last = ob$iterator.java_util_AbstractList$IteratorImpl_i++), 13));
        if (lv_lumii_layoutengine_ComponentLayout_$getLaidOutPass__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_Container_2I(this, ob) == 2) {
          ++laidOutNeigborCount;
          externalX += (ob.lv_lumii_layoutengine_AbstractContainer_left + ob.lv_lumii_layoutengine_AbstractContainer_right) / 2;
          externalY += (ob.lv_lumii_layoutengine_AbstractContainer_top + ob.lv_lumii_layoutengine_AbstractContainer_bottom) / 2;
        }
      }
      if (laidOutNeigborCount > 0) {
        nodeExternalX[i] = externalX / laidOutNeigborCount;
        nodeExternalY[i] = externalY / laidOutNeigborCount;
      }
    }
    if (constraints) {
      nodeRow[i] = -1;
      nodeCol[i] = -1;
      row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, b), 9);
      col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, b), 9);
      !!row && (nodeRow[i] = row.java_lang_Integer_value - 1);
      !!col && (nodeCol[i] = col.java_lang_Integer_value - 1);
    }
    nodeIdMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(b, java_lang_Integer_valueOf__ILjava_lang_Integer_2(i));
    ++i;
  }
  lines = lv_lumii_layoutengine_ComponentLayout_$buildInnerLines__Llv_lumii_layoutengine_ComponentLayout_2Ljava_util_List_2(this);
  lineCount = lines.java_util_ArrayList_array.length;
  edgeSourceId = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, lineCount, 7, 1);
  edgeTargetId = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, lineCount, 7, 1);
  eDirected = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, lineCount, 8, 1);
  i = 0;
  for (curLine$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); curLine$iterator.java_util_AbstractList$IteratorImpl_i < curLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    curLine = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(curLine$iterator.java_util_AbstractList$IteratorImpl_i < curLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(curLine$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(curLine$iterator.java_util_AbstractList$IteratorImpl_last = curLine$iterator.java_util_AbstractList$IteratorImpl_i++), 72));
    edgeSourceId[i] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nodeIdMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(curLine.lv_lumii_layoutengine_util_LayoutLine_startElement), 9).java_lang_Integer_value;
    edgeTargetId[i] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nodeIdMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(curLine.lv_lumii_layoutengine_util_LayoutLine_endElement), 9).java_lang_Integer_value;
    eDirected[i] = true;
    if (eDirected[i]) {
      if (flowDirection == 1) {
        lv_lumii_layoutengine_Line_$setLayoutStartSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 4);
        lv_lumii_layoutengine_Line_$setLayoutEndSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 1);
      }
      if (flowDirection == -1) {
        lv_lumii_layoutengine_Line_$setLayoutStartSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 1);
        lv_lumii_layoutengine_Line_$setLayoutEndSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 4);
      }
      if (flowDirection == 2) {
        lv_lumii_layoutengine_Line_$setLayoutStartSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 2);
        lv_lumii_layoutengine_Line_$setLayoutEndSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 8);
      }
      if (flowDirection == -2) {
        lv_lumii_layoutengine_Line_$setLayoutStartSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 8);
        lv_lumii_layoutengine_Line_$setLayoutEndSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 2);
      }
    }
     else {
      lv_lumii_layoutengine_Line_$setLayoutStartSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 15);
      lv_lumii_layoutengine_Line_$setLayoutEndSides__Llv_lumii_layoutengine_Line_2IV(curLine.lv_lumii_layoutengine_util_LayoutLine_originalLine, 15);
    }
    ++i;
  }
  flowDirection == 1 || flowDirection == -1?(flowSpacing = hSum / boxCount):(flowSpacing = wSum / boxCount);
  flowLayoutKernelAlgorithm = new lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_FlowLayoutKernelAlgorithm__V;
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$performLayout__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2DD_3D_3D_3D_3D_3D_3DLlv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2_3I_3I_3I_3I_3ZDIZV(flowLayoutKernelAlgorithm, centerX, centerY, nodeX, nodeY, nodeW, nodeH, nodeExternalX, nodeExternalY, constraints, nodeRow, nodeCol, edgeSourceId, edgeTargetId, eDirected, flowSpacing, flowDirection);
  i = 0;
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxes); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    lv_lumii_layoutengine_ComponentLayout_$moveAbstrContWithChildren__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_AbstractContainer_2DDV(box, nodeX[i], nodeY[i]);
    ++i;
  }
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1FlowLayoutAlgorithm_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'FlowLayoutAlgorithm', 233);
function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutHorizontalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3I_3DV(this$static, g, eV1, eV2, nodeExternalX){
  var col, col0, v, v0;
  if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber > 1) {
    for (col0 = 0; col0 < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber; col0++) {
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col0), 4).java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
    }
    for (v0 = 0; v0 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v0++) {
      col = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[v0];
      col > -1 && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col), 4), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v0));
    }
  }
  for (v = 0; v < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v++) {
    g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v] = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_centerX;
  }
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutHorizontalInitialPQTreeOrderingCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(this$static, g);
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$normalizeFlowLayoutHorizontalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3IV(this$static, g, eV1, eV2);
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutHorizontalOrderingCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3D_3I_3IV(this$static, g, nodeExternalX, eV1, eV2);
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$normalizeFlowLayoutHorizontalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3IV(this$static, g, eV1, eV2);
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutHorizontalInitialPQTreeOrderingCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(this$static, g){
  var e, eN, edge, i, indV, k, l, l0, layeredGraph, layeredNodeArray, levelNode, levelNodes, levelNumber, orderingAlgorithm, orderingInput, v, v0, v1, v2, v3, vLev, vN, vPrev, xMax, xMin;
  vN = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n;
  eN = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m;
  indV = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Integer_12_1classLit, $intern_14, 9, vN, 0, 1);
  vLev = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, vN, 7, 1);
  for (v0 = 0; v0 < vN; v0++) {
    indV[v0] = java_lang_Integer_valueOf__ILjava_lang_Integer_2(v0);
  }
  java_util_Arrays_sort___3Ljava_lang_Object_2Ljava_util_Comparator_2V(indV, new lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_FlowLayoutKernelAlgorithm$2__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V(g));
  vLev[indV[0].java_lang_Integer_value] = 0;
  for (i = 1; i < vN; i++) {
    v1 = indV[i].java_lang_Integer_value;
    vPrev = indV[i - 1].java_lang_Integer_value;
    vLev[v1] = vLev[vPrev];
    java_lang_Math_abs__DD(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v1] - g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[vPrev]) > this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowSpacing && ++vLev[v1];
  }
  levelNumber = vLev[indV[vN - 1].java_lang_Integer_value] + 1;
  layeredGraph = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_LayeredGraph__IV(levelNumber);
  layeredNodeArray = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1LayeredNode_12_1classLit, $intern_14, 61, vN, 0, 1);
  for (v2 = 0; v2 < vN; v2++) {
    levelNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_LayeredNode__V;
    levelNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber = vLev[v2];
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_$setOriginalVertex__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_FlowLayoutVertex_2V(levelNode, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vertexList, v2), 164));
    levelNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_isDummy = false;
    layeredNodeArray[v2] = levelNode;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(layeredGraph.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_levelNodeListArray, vLev[v2]), 4), levelNode);
  }
  for (l0 = 0; l0 < layeredGraph.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_numberOfLevels; l0++) {
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(layeredGraph.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_levelNodeListArray, l0), 4);
  }
  for (e = 0; e < eN; e++) {
    edge = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, e), 76);
    java_lang_Math_abs__II(vLev[edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2] - vLev[edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1]) == 1 && (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eFlow[e]?lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$addEdge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2V(layeredGraph, layeredNodeArray[edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1], layeredNodeArray[edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2]):lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$addEdge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2V(layeredGraph, layeredNodeArray[edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2], layeredNodeArray[edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1]));
  }
  orderingInput = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingInput_OrderingInput__V;
  orderingAlgorithm = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_OrderingAlgorithm__V;
  orderingInput.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingInput_layeredGraph = layeredGraph;
  orderingAlgorithm.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_input = orderingInput;
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$run__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2V(orderingAlgorithm);
  for (l = 0; l < levelNumber; l++) {
    levelNodes = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(layeredGraph.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_levelNodeListArray, l), 4);
    for (k = 0; k < levelNodes.java_util_ArrayList_array.length; k++) {
      g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, levelNodes.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(levelNodes.java_util_ArrayList_array[k], 61)).lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_originalVertex.lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_index] = k;
    }
  }
  xMin = $intern_62;
  xMax = $intern_63;
  for (v3 = 0; v3 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v3++) {
    xMin = java_lang_Math_min__DDD(xMin, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v3]);
    xMax = java_lang_Math_max__DDD(xMax, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v3]);
  }
  for (v = 0; v < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v++) {
    g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v] += this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_centerX - (xMin + xMax) / 2;
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutHorizontalOrderingCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3D_3I_3IV(this$static, g, nodeExternalX, eV1, eV2){
  var i, ind, ind0, indV, iter, v, v0, vInd, vXnew, w, w$iterator, wSize, wk;
  vInd = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n, 7, 1);
  indV = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Integer_12_1classLit, $intern_14, 9, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n, 0, 1);
  for (v0 = 0; v0 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v0++) {
    indV[v0] = java_lang_Integer_valueOf__ILjava_lang_Integer_2(v0);
  }
  java_util_Arrays_sort___3Ljava_lang_Object_2Ljava_util_Comparator_2V(indV, new lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_FlowLayoutKernelAlgorithm$3__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V(g));
  for (i = 0; i < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; i++) {
    vInd[indV[i].java_lang_Integer_value] = i;
  }
  lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$buildAdjacencyStructure__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(g);
  vXnew = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n, 7, 1);
  for (iter = 0; iter < 20; iter++) {
    for (ind0 = 0; ind0 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; ind0++) {
      v = indV[ind0].java_lang_Integer_value;
      wk = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v), 4).java_util_ArrayList_array.length;
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[v] > -1 && (wk *= 10);
      vXnew[v] = wk * g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v];
      for (w$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v), 4)); w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        w = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_last = w$iterator.java_util_AbstractList$IteratorImpl_i++), 9)).java_lang_Integer_value;
        if (vInd[w] < ind0) {
          wSize = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, w), 4).java_util_ArrayList_array.length;
          vXnew[v] += wSize * g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[w];
          wk += wSize;
        }
      }
      if (java_lang_Double_isNaN__DZ(nodeExternalX[v])) {
        wk > 0?(vXnew[v] /= wk):(vXnew[v] = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v]);
      }
       else {
        vXnew[v] += 200 * nodeExternalX[v];
        vXnew[v] /= 200 + wk;
      }
    }
    java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(vXnew, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n);
    lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$separateComponents__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2_3DV(this$static, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX);
    lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$normalizeFlowLayoutHorizontalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3IV(this$static, g, eV1, eV2);
    for (ind = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n - 1; ind > -1; ind--) {
      v = indV[ind].java_lang_Integer_value;
      wk = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v), 4).java_util_ArrayList_array.length;
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[v] > -1 && (wk *= 10);
      vXnew[v] = wk * g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v];
      for (w$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v), 4)); w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        w = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_last = w$iterator.java_util_AbstractList$IteratorImpl_i++), 9)).java_lang_Integer_value;
        if (vInd[w] > ind) {
          wSize = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, w), 4).java_util_ArrayList_array.length;
          vXnew[v] += wSize * g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[w];
          wk += wSize;
        }
      }
      if (java_lang_Double_isNaN__DZ(nodeExternalX[v])) {
        wk > 0?(vXnew[v] /= wk):(vXnew[v] = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v]);
      }
       else {
        vXnew[v] += 200 * nodeExternalX[v];
        vXnew[v] /= 200 + wk;
      }
    }
    java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(vXnew, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n);
    lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$separateComponents__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2_3DV(this$static, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX);
    lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$normalizeFlowLayoutHorizontalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3IV(this$static, g, eV1, eV2);
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutVerticalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3I_3ZV(this$static, g, eV1, eV2, eFlow){
  var cg, e, e0, eN, edge, h1h2Max, k, optimizer, v, v0, v1, v10, v2, vN, y_0, yMin;
  vN = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n;
  eN = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m;
  if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowLevels) {
    if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber <= 1) {
      optimizer = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(vN);
      for (e = 0; e < eN; e++) {
        if (eV1[e] != eV2[e] && eFlow[e] && this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e]) {
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], 1);
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], 1);
        }
         else if (eV1[e] != eV2[e] && !eFlow[e] && this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e]) {
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV2[e], eV1[e], 1);
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV2[e], eV1[e], 1);
        }
        eV1[e] != eV2[e] && !this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e] && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], 1);
      }
      y_0 = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(optimizer);
      yMin = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 7, 1);
      for (k = 0; k < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN; k++) {
        yMin[k] = $intern_62;
      }
      for (v0 = 0; v0 < vN; v0++) {
        yMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v0]] = java_lang_Math_min__DDD(yMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v0]], y_0[v0]);
      }
      for (v2 = 0; v2 < vN; v2++) {
        y_0[v2] = java_lang_Math_floor__DD(y_0[v2] - yMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v2]]);
      }
    }
     else {
      cg = lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$buildRowConstraintGraph__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2II_3I_3I_3ZLlv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2(this$static, vN, eN, eV1, eV2, eFlow);
      optimizer = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(cg.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n);
      for (e0 = 0; e0 < cg.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e0++) {
        edge = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(cg.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, e0), 76);
        v10 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1;
        v2 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2;
        optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[v10] += -1;
        optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[v2] += 1;
        v10 < vN && vN <= v2?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(v10, v2, 0, 0)):vN <= v10 && v2 < vN?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(v10, v2, 1, 1)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(v10, v2, 1, 1));
      }
      for (e = 0; e < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e++) {
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e] || lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], 1);
      }
      y_0 = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(optimizer);
    }
    h1h2Max = 0;
    for (v1 = 0; v1 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v1++) {
      for (v2 = v1 + 1; v2 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v2++) {
        0.5 < java_lang_Math_abs__DD(y_0[v2] - y_0[v1]) && java_lang_Math_abs__DD(y_0[v2] - y_0[v1]) < 1.5 && (h1h2Max = java_lang_Math_max__DDD(h1h2Max, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v1] + g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v2]));
      }
    }
    for (v = 0; v < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v++) {
      g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v] = y_0[v] * (h1h2Max / 2 + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowSpacing);
    }
  }
   else {
    if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber <= 1) {
      optimizer = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(vN);
      for (e = 0; e < eN; e++) {
        eV1[e] != eV2[e] && eFlow[e] && this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e]?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[eV1[e]] / 2 + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[eV2[e]] / 2 + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowSpacing):eV1[e] != eV2[e] && !eFlow[e] && this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e] && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV2[e], eV1[e], this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[eV1[e]] / 2 + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[eV2[e]] / 2 + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowSpacing);
        eV1[e] != eV2[e] && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], 1);
      }
      y_0 = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(optimizer);
      yMin = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 7, 1);
      for (k = 0; k < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN; k++) {
        yMin[k] = $intern_62;
      }
      for (v0 = 0; v0 < vN; v0++) {
        yMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v0]] = java_lang_Math_min__DDD(yMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v0]], y_0[v0]);
      }
      for (v = 0; v < vN; v++) {
        y_0[v] -= yMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v]];
      }
    }
     else {
      cg = lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$buildRowConstraintGraph__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2II_3I_3I_3ZLlv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2(this$static, vN, eN, eV1, eV2, eFlow);
      optimizer = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(cg.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n);
      for (e0 = 0; e0 < cg.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e0++) {
        edge = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(cg.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, e0), 76);
        v1 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1;
        v2 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2;
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, v1, v2, 1);
        v1 < vN && vN <= v2?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, v1, v2, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v1] / 2):vN <= v1 && v2 < vN?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, v1, v2, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v2] / 2):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, v1, v2, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v1] / 2 + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v2] / 2 + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowSpacing);
      }
      for (e = 0; e < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e++) {
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e] || lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], 1);
      }
      y_0 = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(optimizer);
    }
    java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(y_0, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n);
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$buildGraph__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2I_3D_3D_3I_3IV(this$static, flowDirection, nW, nH, eV1, eV2){
  var e, v;
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N = nW.length;
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G = new lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_FlowLayoutGraph__IV(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N, 7, 1);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N, 7, 1);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vW = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N, 7, 1);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N, 7, 1);
  for (v = 0; v < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N; v++) {
    if (flowDirection == 1 || flowDirection == -1) {
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vW[v] = nW[v];
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v] = nH[v];
    }
     else {
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vW[v] = nH[v];
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v] = nW[v];
    }
  }
  for (e = 0; e < eV1.length; e++) {
    lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$insertNewEdge__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2IIV(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G, eV1[e], eV2[e]);
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$buildRowConstraintGraph__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2II_3I_3I_3ZLlv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2(this$static, vN, eN, eV1, eV2, eFlow){
  var cg, e, e0, v;
  cg = new lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_FlowLayoutGraph__IV(vN + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber - 1);
  for (v = 0; v < vN; v++) {
    -1 < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[v] && this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[v] < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber - 1 && lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$insertNewEdge__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2IIV(cg, v, vN + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[v]);
    this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[v] > 0 && lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$insertNewEdge__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2IIV(cg, vN + this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[v] - 1, v);
  }
  lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$buildDirectedAdjacencyStructure__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(cg);
  for (e0 = 0; e0 < eN; e0++) {
    eV1[e0] != eV2[e0] && eFlow[e0] && this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e0] && lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$insertNewAcyclicEdge__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2IIV(cg, eV1[e0], eV2[e0]);
  }
  for (e = 0; e < eN; e++) {
    eV1[e] != eV2[e] && !eFlow[e] && this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e] && lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$insertNewAcyclicEdge__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2IIV(cg, eV2[e], eV1[e]);
  }
  return cg;
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$flowLayout__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3DV(this$static, g, nodeExternalX){
  var cInd, compExternalX, compExternalXN, cycleRemoval, e, eDir, eDirIndex, eDirM, eFlowDir, eV1, eV1Dir, eV2, eV2Dir, edge, k, k0, v, v0, y_0;
  eV1 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m, 7, 1);
  eV2 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m, 7, 1);
  y_0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n, 7, 1);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eFlow = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m, 8, 1);
  eV1Dir = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m, 7, 1);
  eV2Dir = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m, 7, 1);
  eDirIndex = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m, 7, 1);
  eDirM = 0;
  for (e = 0; e < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e++) {
    edge = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, e), 76);
    eV1[e] = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1;
    eV2[e] = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2;
    if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected[e]) {
      eV1Dir[eDirM] = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1;
      eV2Dir[eDirM] = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2;
      eDirIndex[eDirM] = e;
      ++eDirM;
    }
  }
  eFlowDir = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, eDirM, 8, 1);
  for (v0 = 0; v0 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v0++) {
    y_0[v0] = 0;
  }
  cycleRemoval = new lv_lumii_layoutengine_flowLayout_CycleRemoval_CycleRemoval__II_3I_3I_3IV(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n, eDirM, eV1Dir, eV2Dir, y_0);
  lv_lumii_layoutengine_flowLayout_CycleRemoval_$RemoveDirectedCycles__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2_3ZV(cycleRemoval, eFlowDir);
  for (eDir = 0; eDir < eDirM; eDir++) {
    this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eFlow[eDirIndex[eDir]] = eFlowDir[eDir];
  }
  lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$buildAdjacencyStructure__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(g);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n, 7, 1);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN = lv_lumii_layoutengine_flowLayout_GraphProcessor_$calculateConnectedComponents__Llv_lumii_layoutengine_flowLayout_GraphProcessor_2Ljava_util_ArrayList_2_3II(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex);
  compExternalX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 7, 1);
  compExternalXN = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 7, 1);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Integer_12_1classLit, $intern_14, 9, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 0, 1);
  for (k0 = 0; k0 < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN; k0++) {
    compExternalX[k0] = NaN;
    this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp[k0] = java_lang_Integer_valueOf__ILjava_lang_Integer_2(k0);
  }
  for (v = 0; v < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v++) {
    if (!java_lang_Double_isNaN__DZ(nodeExternalX[v])) {
      cInd = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v];
      if (java_lang_Double_isNaN__DZ(compExternalX[cInd])) {
        compExternalX[cInd] = nodeExternalX[v];
        compExternalXN[cInd] = 1;
      }
       else {
        compExternalX[cInd] += nodeExternalX[v];
        ++compExternalXN[cInd];
      }
    }
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN; k++) {
    java_lang_Double_isNaN__DZ(compExternalX[k]) || (compExternalX[k] /= compExternalXN[k]);
  }
  java_util_Arrays_sort___3Ljava_lang_Object_2Ljava_util_Comparator_2V(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp, new lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_FlowLayoutKernelAlgorithm$1__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V(compExternalX));
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutVerticalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3I_3ZV(this$static, g, eV1, eV2, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eFlow);
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$assignFlowLayoutHorizontalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3I_3DV(this$static, g, eV1, eV2, nodeExternalX);
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$normalizeFlowLayoutHorizontalCoordinates__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3I_3IV(this$static, g, eV1, eV2){
  var col, col0, csN, e, k, k0, optimizer, s, segmentIndexMap, segmentPair, segmentPairList, segments, v, v0, v1, v2, v3, v4, x_0, xMax, xMin;
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber > 1 && lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$repairColumns__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(this$static, g);
  csN = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber == 0?0:this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber - 1;
  optimizer = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n + csN);
  for (e = 0; e < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e++) {
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, eV1[e], eV2[e], 1);
  }
  if (csN > 0) {
    for (col0 = 0; col0 < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber - 1; col0++) {
      for (k0 = 0; k0 < com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col0), 4).java_util_ArrayList_array.length; k0++) {
        v0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col0), 4), k0), 9).java_lang_Integer_value;
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, v0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n + col0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vW[v0] / 2);
      }
    }
    for (col = 1; col < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber; col++) {
      for (k0 = 0; k0 < com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col), 4).java_util_ArrayList_array.length; k0++) {
        v0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col), 4), k0), 9).java_lang_Integer_value;
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n + col - 1, v0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vW[v0] / 2);
      }
    }
  }
  segments = new java_util_ArrayList_ArrayList__V;
  segmentIndexMap = new java_util_HashMap_HashMap__V;
  for (v3 = 0; v3 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v3++) {
    s = new lv_lumii_layoutengine_obstacleGraph_Segment_Segment__DDDV(g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v3], g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v3] - g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v3] / 2, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v3] + g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vH[v3] / 2);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, s);
    segmentIndexMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(s, java_lang_Integer_valueOf__ILjava_lang_Integer_2(v3));
  }
  segmentPairList = lv_lumii_layoutengine_obstacleGraph_ObstacleGraph_findObstacleGraph__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(segments);
  for (k = 0; k < segmentPairList.java_util_ArrayList_array.length; k++) {
    segmentPair = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, segmentPairList.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentPairList.java_util_ArrayList_array[k], 18));
    v1 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentIndexMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(segmentPair.lv_lumii_layoutengine_util_Pair_first), 9).java_lang_Integer_value;
    v2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentIndexMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(segmentPair.lv_lumii_layoutengine_util_Pair_second), 9).java_lang_Integer_value;
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, v1, v2, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vW[v1] / 2 + g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vW[v2] / 2 + 10);
  }
  x_0 = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(optimizer);
  java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(x_0, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX, 0, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n);
  xMin = $intern_62;
  xMax = $intern_63;
  for (v4 = 0; v4 < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v4++) {
    xMin = java_lang_Math_min__DDD(xMin, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v4]);
    xMax = java_lang_Math_max__DDD(xMax, g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v4]);
  }
  for (v = 0; v < g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v++) {
    g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v] += this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_centerX - (xMin + xMax) / 2;
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$performLayout__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2DD_3D_3D_3D_3D_3D_3DLlv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2_3I_3I_3I_3I_3ZDIZV(this$static, centerX, centerY, nodeX, nodeY, nodeW, nodeH, nodeExternalX, nodeExternalY, constraints, nodeRow, nodeCol, edgeSourceId, edgeTargetId, eDirected, flowSpacing, flowDirection){
  var col, node, node0, node1, nodeN, row;
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_eDirected = eDirected;
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowSpacing = flowSpacing;
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowLevels = true;
  nodeN = nodeW.length;
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodeExternalX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, nodeN, 7, 1);
  for (node0 = 0; node0 < nodeN; node0++) {
    if (flowDirection == 1 || flowDirection == -1) {
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodeExternalX[node0] = nodeExternalX[node0];
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_centerX = centerX;
    }
     else {
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodeExternalX[node0] = nodeExternalY[node0];
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_centerX = centerY;
    }
  }
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, nodeN, 7, 1);
  this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, nodeN, 7, 1);
  for (node1 = 0; node1 < nodeN; node1++) {
    this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[node1] = -1;
    this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[node1] = -1;
  }
  if (constraints) {
    if (flowDirection == 1 || flowDirection == -1) {
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length;
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length;
    }
     else {
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length;
      this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber = constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length;
    }
    this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes = new java_util_ArrayList_ArrayList__V;
    this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNodes = new java_util_ArrayList_ArrayList__V;
    for (col = 0; col < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber; col++) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, new java_util_ArrayList_ArrayList__V);
    }
    for (row = 0; row < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber; row++) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNodes, new java_util_ArrayList_ArrayList__V);
    }
    for (node = 0; node < nodeN; node++) {
      if (flowDirection == 1) {
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[node] = nodeCol[node];
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[node] = nodeRow[node];
      }
      if (flowDirection == -1) {
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[node] = nodeCol[node];
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[node] = nodeRow[node] == -1?-1:constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length - 1 - nodeRow[node];
      }
      if (flowDirection == 2) {
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[node] = nodeRow[node];
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[node] = nodeCol[node];
      }
      if (flowDirection == -2) {
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedColumn[node] = nodeRow[node];
        this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodePredeterminedRow[node] = nodeCol[node] == -1?-1:constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length - 1 - nodeCol[node];
      }
    }
  }
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$buildGraph__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2I_3D_3D_3I_3IV(this$static, flowDirection, nodeW, nodeH, edgeSourceId, edgeTargetId);
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$flowLayout__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2_3DV(this$static, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_nodeExternalX);
  lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$returnflowDirectionGeometry__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2I_3D_3DV(this$static, flowDirection, nodeX, nodeY);
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$repairColumns__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(this$static, g){
  var col, col0, col1, colomnNodeXArray, colomnNodeXArrayIndex, columnNodeNumber, k, k0, k1;
  columnNodeNumber = 0;
  for (col0 = 0; col0 < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber; col0++) {
    columnNodeNumber += com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col0), 4).java_util_ArrayList_array.length;
  }
  colomnNodeXArray = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, columnNodeNumber, 7, 1);
  colomnNodeXArrayIndex = 0;
  for (col1 = 0; col1 < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber; col1++) {
    for (k0 = 0; k0 < com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col1), 4).java_util_ArrayList_array.length; k0++) {
      colomnNodeXArray[colomnNodeXArrayIndex++] = g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col1), 4), k0), 9).java_lang_Integer_value];
    }
  }
  java_util_Arrays_nativeNumberSort__Ljava_lang_Object_2V(colomnNodeXArray);
  for (k1 = 1; k1 < columnNodeNumber; k1++) {
    colomnNodeXArray[k1] = java_lang_Math_max__DDD(colomnNodeXArray[k1 - 1] + 1, colomnNodeXArray[k1]);
  }
  colomnNodeXArrayIndex = 0;
  for (col = 0; col < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber; col++) {
    for (k = 0; k < com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col), 4).java_util_ArrayList_array.length; k++) {
      g.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNodes, col), 4), k), 9).java_lang_Integer_value] = colomnNodeXArray[colomnNodeXArrayIndex++];
    }
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$returnflowDirectionGeometry__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2I_3D_3DV(this$static, flowDirection, nX, nY){
  var v;
  for (v = 0; v < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N; v++) {
    if (flowDirection == 1) {
      nX[v] = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v];
      nY[v] = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v];
    }
    if (flowDirection == -1) {
      nX[v] = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v];
      nY[v] = -this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v];
    }
    if (flowDirection == 2) {
      nX[v] = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v];
      nY[v] = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v];
    }
    if (flowDirection == -2) {
      nX[v] = -this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[v];
      nY[v] = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_G.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vX[v];
    }
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_$separateComponents__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2_3DV(this$static, x_0){
  var cInd, compX, k, k0, v, v0, v1, vN, xMax, xMin;
  vN = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex.length;
  xMin = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 7, 1);
  xMax = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 7, 1);
  compX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN, 7, 1);
  for (k0 = 0; k0 < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN; k0++) {
    xMin[k0] = $intern_62;
    xMax[k0] = $intern_63;
  }
  for (v0 = 0; v0 < vN; v0++) {
    cInd = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v0];
    xMin[cInd] = java_lang_Math_min__DDD(xMin[cInd], x_0[v0]);
    xMax[cInd] = java_lang_Math_max__DDD(xMax[cInd], x_0[v0]);
  }
  for (v1 = 0; v1 < vN; v1++) {
    x_0[v1] -= xMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v1]];
  }
  compX[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp[0].java_lang_Integer_value] = 0;
  for (k = 1; k < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN; k++) {
    compX[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp[k].java_lang_Integer_value] = compX[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp[k - 1].java_lang_Integer_value] + xMax[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp[k - 1].java_lang_Integer_value] - xMin[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_sortIndComp[k - 1].java_lang_Integer_value] + 1;
  }
  for (v = 0; v < vN; v++) {
    x_0[v] += compX[this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_vCompIndex[v]];
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_FlowLayoutKernelAlgorithm__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(246, 1, {}, lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_FlowLayoutKernelAlgorithm__V);
_.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_N = 0;
_.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_centerX = 0;
_.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_columnNumber = 0;
_.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_compN = 0;
_.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowLevels = false;
_.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_flowSpacing = 0;
_.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm_rowNumber = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1FlowLayoutKernelAlgorithm_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'FlowLayoutKernelAlgorithm', 246);
function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_$compare__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_2Ljava_lang_Integer_2Ljava_lang_Integer_2I(this$static, k1, k2){
  var x1, x2;
  x1 = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_val$compExternalX2[k1.java_lang_Integer_value];
  x2 = this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_val$compExternalX2[k2.java_lang_Integer_value];
  if (java_lang_Double_isNaN__DZ(x1) || java_lang_Double_isNaN__DZ(x2)) {
    return 0;
  }
   else {
    if (x1 < x2) {
      return -1;
    }
     else if (x1 > x2) {
      return 1;
    }
    return 0;
  }
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_FlowLayoutKernelAlgorithm$1__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V(val$compExternalX){
  this.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_val$compExternalX2 = val$compExternalX;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(247, 1, {}, lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_FlowLayoutKernelAlgorithm$1__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(k1, k2){
  return lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_$compare__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm$1_2Ljava_lang_Integer_2Ljava_lang_Integer_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(k1, 9), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(k2, 9));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1FlowLayoutKernelAlgorithm$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'FlowLayoutKernelAlgorithm/1', 247);
function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_$compare__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_2Ljava_lang_Integer_2Ljava_lang_Integer_2I(this$static, o1, o2){
  if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o1.java_lang_Integer_value] < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o2.java_lang_Integer_value]) {
    return -1;
  }
   else if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o1.java_lang_Integer_value] > this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o2.java_lang_Integer_value]) {
    return 1;
  }
  return 0;
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_FlowLayoutKernelAlgorithm$2__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V(val$g){
  this.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_val$g2 = val$g;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(248, 1, {}, lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_FlowLayoutKernelAlgorithm$2__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2){
  return lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_$compare__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm$2_2Ljava_lang_Integer_2Ljava_lang_Integer_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o1, 9), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o2, 9));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1FlowLayoutKernelAlgorithm$2_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'FlowLayoutKernelAlgorithm/2', 248);
function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_$compare__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_2Ljava_lang_Integer_2Ljava_lang_Integer_2I(this$static, o1, o2){
  if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o1.java_lang_Integer_value] < this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o2.java_lang_Integer_value]) {
    return -1;
  }
   else if (this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o1.java_lang_Integer_value] > this$static.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_val$g2.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vY[o2.java_lang_Integer_value]) {
    return 1;
  }
  return 0;
}

function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_FlowLayoutKernelAlgorithm$3__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V(val$g){
  this.lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_val$g2 = val$g;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(249, 1, {}, lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_FlowLayoutKernelAlgorithm$3__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2){
  return lv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_$compare__Llv_lumii_layoutengine_FlowLayoutKernelAlgorithm$3_2Ljava_lang_Integer_2Ljava_lang_Integer_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o1, 9), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o2, 9));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1FlowLayoutKernelAlgorithm$3_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'FlowLayoutKernelAlgorithm/3', 249);
function lv_lumii_layoutengine_GeometryHelper_boxIntersectsLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Line_2ZZ(box, line, onPerimeter){
  var first, i, points, second;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  for (i = 0; i + 1 < points.java_util_ArrayList_array.length; i++) {
    first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 3));
    second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i + 1], 3));
    if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      if (first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x && box.lv_lumii_layoutengine_AbstractContainer_left <= first.java_awt_geom_Point2D$Double_x && first.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_right && !(onPerimeter?first.java_awt_geom_Point2D$Double_y < box.lv_lumii_layoutengine_AbstractContainer_top && second.java_awt_geom_Point2D$Double_y < box.lv_lumii_layoutengine_AbstractContainer_top || first.java_awt_geom_Point2D$Double_y > box.lv_lumii_layoutengine_AbstractContainer_bottom && second.java_awt_geom_Point2D$Double_y > box.lv_lumii_layoutengine_AbstractContainer_bottom:first.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_top && second.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_top || first.java_awt_geom_Point2D$Double_y >= box.lv_lumii_layoutengine_AbstractContainer_bottom && second.java_awt_geom_Point2D$Double_y >= box.lv_lumii_layoutengine_AbstractContainer_bottom)) {
        return true;
      }
       else if (first.java_awt_geom_Point2D$Double_y == second.java_awt_geom_Point2D$Double_y && box.lv_lumii_layoutengine_AbstractContainer_top <= first.java_awt_geom_Point2D$Double_y && first.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_bottom && !(onPerimeter?first.java_awt_geom_Point2D$Double_x < box.lv_lumii_layoutengine_AbstractContainer_left && second.java_awt_geom_Point2D$Double_x < box.lv_lumii_layoutengine_AbstractContainer_left || first.java_awt_geom_Point2D$Double_x > box.lv_lumii_layoutengine_AbstractContainer_right && second.java_awt_geom_Point2D$Double_x > box.lv_lumii_layoutengine_AbstractContainer_right:first.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_left && second.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_left || first.java_awt_geom_Point2D$Double_x >= box.lv_lumii_layoutengine_AbstractContainer_right && second.java_awt_geom_Point2D$Double_x >= box.lv_lumii_layoutengine_AbstractContainer_right)) {
        return true;
      }
    }
     else if (lv_lumii_layoutengine_GeometryHelper_findIntersection__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2(box, first, second)) {
      return true;
    }
  }
  return false;
}

function lv_lumii_layoutengine_GeometryHelper_findClosestMidPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(box, point, sides){
  var currDistance, cx, cy, distance, i, j, midPoint, midPoint$iterator, midPoints, result;
  cx = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
  cy = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
  midPoints = new java_util_ArrayList_ArrayList__V;
  cx[0] = cx[3] = box.lv_lumii_layoutengine_AbstractContainer_left;
  cx[1] = cx[2] = box.lv_lumii_layoutengine_AbstractContainer_right;
  cy[0] = cy[1] = box.lv_lumii_layoutengine_AbstractContainer_top;
  cy[2] = cy[3] = box.lv_lumii_layoutengine_AbstractContainer_bottom;
  for (i = 0; i < 4; i++) {
    if ((sides & 1 << i) != 0) {
      j = (i + 1) % 4;
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(midPoints, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((cx[i] + cx[j]) / 2, (cy[i] + cy[j]) / 2));
    }
  }
  distance = $intern_53;
  result = null;
  for (midPoint$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(midPoints); midPoint$iterator.java_util_AbstractList$IteratorImpl_i < midPoint$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    midPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(midPoint$iterator.java_util_AbstractList$IteratorImpl_i < midPoint$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(midPoint$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(midPoint$iterator.java_util_AbstractList$IteratorImpl_last = midPoint$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
    currDistance = java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(midPoint, point);
    if (currDistance < distance) {
      result = midPoint;
      distance = currDistance;
    }
  }
  return result;
}

function lv_lumii_layoutengine_GeometryHelper_findDistance__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2D(p, q){
  return p.java_awt_geom_Point2D$Double_x == q.java_awt_geom_Point2D$Double_x?java_lang_Math_abs__DD(p.java_awt_geom_Point2D$Double_y - q.java_awt_geom_Point2D$Double_y):p.java_awt_geom_Point2D$Double_y == q.java_awt_geom_Point2D$Double_y?java_lang_Math_abs__DD(p.java_awt_geom_Point2D$Double_x - q.java_awt_geom_Point2D$Double_x):java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(p, q);
}

function lv_lumii_layoutengine_GeometryHelper_findIntersection__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2(box, firstPoint, secondPoint){
  var cx, cy, i, j, maxX, maxY, minX, minY, resT, resX, resY, t, x_0, y_0;
  if (firstPoint.java_awt_geom_Point2D$Double_x == secondPoint.java_awt_geom_Point2D$Double_x) {
    x_0 = firstPoint.java_awt_geom_Point2D$Double_x;
    if (box.lv_lumii_layoutengine_AbstractContainer_left <= x_0 && x_0 <= box.lv_lumii_layoutengine_AbstractContainer_right) {
      if (firstPoint.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_top && box.lv_lumii_layoutengine_AbstractContainer_top <= secondPoint.java_awt_geom_Point2D$Double_y) {
        return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, box.lv_lumii_layoutengine_AbstractContainer_top);
      }
       else if (firstPoint.java_awt_geom_Point2D$Double_y >= box.lv_lumii_layoutengine_AbstractContainer_bottom && box.lv_lumii_layoutengine_AbstractContainer_bottom >= secondPoint.java_awt_geom_Point2D$Double_y) {
        return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, box.lv_lumii_layoutengine_AbstractContainer_bottom);
      }
       else if (firstPoint.java_awt_geom_Point2D$Double_y >= box.lv_lumii_layoutengine_AbstractContainer_top && firstPoint.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_bottom) {
        if (secondPoint.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_top) {
          return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, box.lv_lumii_layoutengine_AbstractContainer_top);
        }
         else if (secondPoint.java_awt_geom_Point2D$Double_y >= box.lv_lumii_layoutengine_AbstractContainer_bottom) {
          return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, box.lv_lumii_layoutengine_AbstractContainer_bottom);
        }
      }
    }
    return null;
  }
   else if (firstPoint.java_awt_geom_Point2D$Double_y == secondPoint.java_awt_geom_Point2D$Double_y) {
    y_0 = firstPoint.java_awt_geom_Point2D$Double_y;
    if (box.lv_lumii_layoutengine_AbstractContainer_top <= y_0 && y_0 <= box.lv_lumii_layoutengine_AbstractContainer_bottom) {
      if (firstPoint.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_left && box.lv_lumii_layoutengine_AbstractContainer_left <= secondPoint.java_awt_geom_Point2D$Double_x) {
        return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(box.lv_lumii_layoutengine_AbstractContainer_left, y_0);
      }
       else if (firstPoint.java_awt_geom_Point2D$Double_x >= box.lv_lumii_layoutengine_AbstractContainer_right && box.lv_lumii_layoutengine_AbstractContainer_right >= secondPoint.java_awt_geom_Point2D$Double_x) {
        return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(box.lv_lumii_layoutengine_AbstractContainer_right, y_0);
      }
       else if (firstPoint.java_awt_geom_Point2D$Double_x >= box.lv_lumii_layoutengine_AbstractContainer_left && firstPoint.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_right) {
        if (secondPoint.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_left) {
          return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(box.lv_lumii_layoutengine_AbstractContainer_left, y_0);
        }
         else if (secondPoint.java_awt_geom_Point2D$Double_x >= box.lv_lumii_layoutengine_AbstractContainer_right) {
          return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(box.lv_lumii_layoutengine_AbstractContainer_right, y_0);
        }
      }
    }
    return null;
  }
  cx = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
  cy = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
  cx[0] = cx[3] = box.lv_lumii_layoutengine_AbstractContainer_left;
  cx[1] = cx[2] = box.lv_lumii_layoutengine_AbstractContainer_right;
  cy[0] = cy[1] = box.lv_lumii_layoutengine_AbstractContainer_top;
  cy[2] = cy[3] = box.lv_lumii_layoutengine_AbstractContainer_bottom;
  resX = 0;
  resY = 0;
  resT = $intern_62;
  minX = java_lang_Math_min__DDD(firstPoint.java_awt_geom_Point2D$Double_x, secondPoint.java_awt_geom_Point2D$Double_x);
  maxX = java_lang_Math_max__DDD(firstPoint.java_awt_geom_Point2D$Double_x, secondPoint.java_awt_geom_Point2D$Double_x);
  minY = java_lang_Math_min__DDD(firstPoint.java_awt_geom_Point2D$Double_y, secondPoint.java_awt_geom_Point2D$Double_y);
  maxY = java_lang_Math_max__DDD(firstPoint.java_awt_geom_Point2D$Double_y, secondPoint.java_awt_geom_Point2D$Double_y);
  for (i = 0; i < 4; i++) {
    j = (i + 1) % 4;
    if (cx[i] == cx[j]) {
      if (firstPoint.java_awt_geom_Point2D$Double_x != secondPoint.java_awt_geom_Point2D$Double_x) {
        x_0 = cx[i];
        if (minX <= x_0 && x_0 <= maxX) {
          t = (x_0 - firstPoint.java_awt_geom_Point2D$Double_x) / (secondPoint.java_awt_geom_Point2D$Double_x - firstPoint.java_awt_geom_Point2D$Double_x);
          y_0 = firstPoint.java_awt_geom_Point2D$Double_y + t * (secondPoint.java_awt_geom_Point2D$Double_y - firstPoint.java_awt_geom_Point2D$Double_y);
          t = t <= 0?0 - t:t;
          if (t < resT && java_lang_Math_min__DDD(cy[i], cy[j]) <= y_0 && y_0 <= java_lang_Math_max__DDD(cy[i], cy[j]) && minY <= y_0 && y_0 <= maxY) {
            resX = x_0;
            resY = y_0;
            resT = t;
          }
        }
      }
    }
     else {
      if (firstPoint.java_awt_geom_Point2D$Double_y != secondPoint.java_awt_geom_Point2D$Double_y) {
        y_0 = cy[i];
        if (minY <= y_0 && y_0 <= maxY) {
          t = (y_0 - firstPoint.java_awt_geom_Point2D$Double_y) / (secondPoint.java_awt_geom_Point2D$Double_y - firstPoint.java_awt_geom_Point2D$Double_y);
          x_0 = firstPoint.java_awt_geom_Point2D$Double_x + t * (secondPoint.java_awt_geom_Point2D$Double_x - firstPoint.java_awt_geom_Point2D$Double_x);
          t = t <= 0?0 - t:t;
          if (t < resT && java_lang_Math_min__DDD(cx[i], cx[j]) <= x_0 && x_0 <= java_lang_Math_max__DDD(cx[i], cx[j]) && minX <= x_0 && x_0 <= maxX) {
            resX = x_0;
            resY = y_0;
            resT = t;
          }
        }
      }
    }
  }
  return resT < $intern_62?new java_awt_geom_Point2D$Double_Point2D$Double__DDV(resX, resY):null;
}

function lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(x_0, y_0, box){
  var bottom, left, right, top_0;
  left = box.lv_lumii_layoutengine_AbstractContainer_left;
  right = box.lv_lumii_layoutengine_AbstractContainer_right;
  top_0 = box.lv_lumii_layoutengine_AbstractContainer_top;
  bottom = box.lv_lumii_layoutengine_AbstractContainer_bottom;
  if ((x_0 == left || x_0 == right) && (y_0 == top_0 || y_0 == bottom)) {
    return 4.9E-324;
  }
  return left <= x_0 && x_0 <= right && top_0 <= y_0 && y_0 <= bottom?(x_0 - left < right - x_0?x_0 - left:right - x_0) < (y_0 - top_0 < bottom - y_0?y_0 - top_0:bottom - y_0)?x_0 - left < right - x_0?x_0 - left:right - x_0:y_0 - top_0 < bottom - y_0?y_0 - top_0:bottom - y_0:(left <= x_0 && x_0 <= right?0:x_0 < left?left - x_0:x_0 - right) + (top_0 <= y_0 && y_0 <= bottom?0:y_0 < top_0?top_0 - y_0:y_0 - bottom);
}

function lv_lumii_layoutengine_GeometryHelper_findNearestSegment__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2I(point, line){
  var currDist, i, index_0, minDist, points, segment;
  minDist = $intern_53;
  index_0 = -1;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  for (i = 0; i + 1 < points.java_util_ArrayList_array.length; i++) {
    segment = new java_awt_geom_Line2D$Double_Line2D$Double__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 67)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i + 1], 67)));
    currDist = java_awt_geom_Line2D_ptSegDistSq__DDDDDDD(segment.java_awt_geom_Line2D$Double_x1, segment.java_awt_geom_Line2D$Double_y1, segment.java_awt_geom_Line2D$Double_x2, segment.java_awt_geom_Line2D$Double_y2, point.java_awt_geom_Point2D$Double_x, point.java_awt_geom_Point2D$Double_y);
    if (currDist < minDist) {
      minDist = currDist;
      index_0 = i;
    }
  }
  return index_0;
}

function lv_lumii_layoutengine_GeometryHelper_findNearestSegmentAndDistance__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_util_Pair_2(point, line){
  var currDist, i, index_0, minDist, points, segment;
  minDist = $intern_53;
  index_0 = -1;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  for (i = 0; i + 1 < points.java_util_ArrayList_array.length; i++) {
    segment = new java_awt_geom_Line2D$Double_Line2D$Double__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 67)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i + 1], 67)));
    currDist = java_awt_geom_Line2D_ptSegDistSq__DDDDDDD(segment.java_awt_geom_Line2D$Double_x1, segment.java_awt_geom_Line2D$Double_y1, segment.java_awt_geom_Line2D$Double_x2, segment.java_awt_geom_Line2D$Double_y2, point.java_awt_geom_Point2D$Double_x, point.java_awt_geom_Point2D$Double_y);
    if (currDist < minDist) {
      minDist = currDist;
      index_0 = i;
    }
  }
  return new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(index_0), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(minDist)));
}

function lv_lumii_layoutengine_GeometryHelper_findSegmentAndPoint__DLlv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_util_Pair_2(position, line){
  var first, index_0, orthogonal, partLength, points, posLength, ratio, second, segmentLength;
  posLength = lv_lumii_layoutengine_LineGeometry_$getLength__Llv_lumii_layoutengine_LineGeometry_2D(line.lv_lumii_layoutengine_Line_lineGeometry) * position;
  partLength = 0;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  orthogonal = line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL);
  segmentLength = 0;
  for (index_0 = 0; index_0 < points.java_util_ArrayList_array.length - 1; index_0++) {
    first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[index_0], 3));
    second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0 + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[index_0 + 1], 3));
    segmentLength = orthogonal?java_lang_Math_abs__DD(first.java_awt_geom_Point2D$Double_x - second.java_awt_geom_Point2D$Double_x) + java_lang_Math_abs__DD(first.java_awt_geom_Point2D$Double_y - second.java_awt_geom_Point2D$Double_y):java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(first, second);
    if (partLength + segmentLength > posLength) {
      break;
    }
    partLength += segmentLength;
  }
  if (index_0 == points.java_util_ArrayList_array.length - 1) {
    index_0 = points.java_util_ArrayList_array.length - 2;
    ratio = 1;
  }
   else {
    ratio = (posLength - partLength) / segmentLength;
  }
  return new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(index_0), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(ratio)));
}

function lv_lumii_layoutengine_GeometryHelper_findSideMidPoint__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2Ljava_awt_geom_Point2D$Double_2(box, side){
  switch (side.java_lang_Enum_ordinal) {
    case 3:
      return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(box.lv_lumii_layoutengine_AbstractContainer_left, (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    case 1:
      return new java_awt_geom_Point2D$Double_Point2D$Double__DDV(box.lv_lumii_layoutengine_AbstractContainer_right, (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    case 2:
      return new java_awt_geom_Point2D$Double_Point2D$Double__DDV((box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2, box.lv_lumii_layoutengine_AbstractContainer_bottom);
    case 0:
      return new java_awt_geom_Point2D$Double_Point2D$Double__DDV((box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2, box.lv_lumii_layoutengine_AbstractContainer_top);
    default:return null;
  }
}

function lv_lumii_layoutengine_GeometryHelper_getChainPoints__Llv_lumii_layoutengine_AbstractContainer_2_3Ljava_awt_geom_Point2D$Double_2(rectangle){
  var angle, bottom, center, i, label_0, left, points, right, spacing, top_0, lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_sin_0, lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_cos_0, lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_x_0, lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_y_0;
  points = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Point2D$Double_12_1classLit, $intern_14, 3, 5, 0, 1);
  spacing = com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rectangle, 28)?0:rectangle.lv_lumii_layoutengine_Element_spacing;
  left = rectangle.lv_lumii_layoutengine_AbstractContainer_left - spacing;
  top_0 = rectangle.lv_lumii_layoutengine_AbstractContainer_top - spacing;
  right = rectangle.lv_lumii_layoutengine_AbstractContainer_right + spacing;
  bottom = rectangle.lv_lumii_layoutengine_AbstractContainer_bottom + spacing;
  points[0] = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(left, top_0);
  points[1] = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(right, top_0);
  points[2] = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(right, bottom);
  points[3] = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(left, bottom);
  points[4] = points[0];
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rectangle, 28)) {
    label_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle, 28);
    if (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_rotated) {
      angle = lv_lumii_layoutengine_OutsideLabel$LineLabel_$getRotationAngle__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2D(label_0);
      center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
      for (i = 0; i < 4; i++) {
        lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_sin_0 = java_lang_Math_sin__DD(angle);
        lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_cos_0 = java_lang_Math_cos__DD(angle);
        lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_x_0 = points[i].java_awt_geom_Point2D$Double_x - center.java_awt_geom_Point2D$Double_x;
        lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_y_0 = points[i].java_awt_geom_Point2D$Double_y - center.java_awt_geom_Point2D$Double_y;
        points[i].java_awt_geom_Point2D$Double_x = lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_x_0 * lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_cos_0 - lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_y_0 * lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_sin_0 + center.java_awt_geom_Point2D$Double_x;
        points[i].java_awt_geom_Point2D$Double_y = lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_x_0 * lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_sin_0 + lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_y_0 * lv_lumii_layoutengine_GeometryHelper_rotate__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DV_cos_0 + center.java_awt_geom_Point2D$Double_y;
      }
    }
  }
  return points;
}

function lv_lumii_layoutengine_GeometryHelper_movePointInside__Ljava_awt_geom_Point2D$Double_2DDDDDV(point, left, top_0, right, bottom, epsilon){
  if (!(left - -epsilon <= point.java_awt_geom_Point2D$Double_x && point.java_awt_geom_Point2D$Double_x <= right + -epsilon && top_0 - -epsilon <= point.java_awt_geom_Point2D$Double_y && point.java_awt_geom_Point2D$Double_y <= bottom + -epsilon)) {
    point.java_awt_geom_Point2D$Double_x <= left?java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, left + epsilon, point.java_awt_geom_Point2D$Double_y):point.java_awt_geom_Point2D$Double_x >= right && java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, right - epsilon, point.java_awt_geom_Point2D$Double_y);
    point.java_awt_geom_Point2D$Double_y <= top_0?java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, point.java_awt_geom_Point2D$Double_x, top_0 + epsilon):point.java_awt_geom_Point2D$Double_y >= bottom && java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, point.java_awt_geom_Point2D$Double_x, bottom - epsilon);
  }
}

function lv_lumii_layoutengine_GeometryHelper_movePointOutside__Ljava_awt_geom_Point2D$Double_2Ljava_util_ArrayList_2DV(point, rectangles, epsilon){
  var minDist, rect, rect$iterator, toBottom, toLeft, toRight, toTop;
  for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    if (rect.lv_lumii_layoutengine_AbstractContainer_left - epsilon <= point.java_awt_geom_Point2D$Double_x && point.java_awt_geom_Point2D$Double_x <= rect.lv_lumii_layoutengine_AbstractContainer_right + epsilon && rect.lv_lumii_layoutengine_AbstractContainer_top - epsilon <= point.java_awt_geom_Point2D$Double_y && point.java_awt_geom_Point2D$Double_y <= rect.lv_lumii_layoutengine_AbstractContainer_bottom + epsilon) {
      toLeft = point.java_awt_geom_Point2D$Double_x - rect.lv_lumii_layoutengine_AbstractContainer_left;
      toRight = rect.lv_lumii_layoutengine_AbstractContainer_right - point.java_awt_geom_Point2D$Double_x;
      toTop = point.java_awt_geom_Point2D$Double_y - rect.lv_lumii_layoutengine_AbstractContainer_top;
      toBottom = rect.lv_lumii_layoutengine_AbstractContainer_bottom - point.java_awt_geom_Point2D$Double_y;
      minDist = (toLeft < toRight?toLeft:toRight) < (toTop < toBottom?toTop:toBottom)?toLeft < toRight?toLeft:toRight:toTop < toBottom?toTop:toBottom;
      minDist == toLeft?java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, rect.lv_lumii_layoutengine_AbstractContainer_left - epsilon, point.java_awt_geom_Point2D$Double_y):minDist == toRight?java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, rect.lv_lumii_layoutengine_AbstractContainer_right + epsilon, point.java_awt_geom_Point2D$Double_y):minDist == toTop?java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, point.java_awt_geom_Point2D$Double_x, rect.lv_lumii_layoutengine_AbstractContainer_top - epsilon):java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(point, point.java_awt_geom_Point2D$Double_x, rect.lv_lumii_layoutengine_AbstractContainer_bottom + epsilon);
      break;
    }
  }
}

function lv_lumii_layoutengine_GeometryHelper_movePointToLine__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2IV(point, line, segmentIndex){
  var dotProduct, first, lengthSq, points, ratio, second, x1, x2, y1, y2, java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_px_0, java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_py_0;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex], 3));
  second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex + 1], 3));
  if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
    if (first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x) {
      point.java_awt_geom_Point2D$Double_x = first.java_awt_geom_Point2D$Double_x;
      y1 = first.java_awt_geom_Point2D$Double_y;
      y2 = second.java_awt_geom_Point2D$Double_y;
      point.java_awt_geom_Point2D$Double_y = java_lang_Math_min__DDD(y1 > y2?y1:y2, java_lang_Math_max__DDD(y1 < y2?y1:y2, point.java_awt_geom_Point2D$Double_y));
    }
     else {
      point.java_awt_geom_Point2D$Double_y = first.java_awt_geom_Point2D$Double_y;
      x1 = first.java_awt_geom_Point2D$Double_x;
      x2 = second.java_awt_geom_Point2D$Double_x;
      point.java_awt_geom_Point2D$Double_x = java_lang_Math_min__DDD(x1 > x2?x1:x2, java_lang_Math_max__DDD(x1 < x2?x1:x2, point.java_awt_geom_Point2D$Double_x));
    }
  }
   else {
    dotProduct = (second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x) * (point.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x) + (second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y) * (point.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y);
    lengthSq = (java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_px_0 = second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x , java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_py_0 = second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y , java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_px_0 * java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_px_0 + java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_py_0 * java_awt_geom_Point2D_$distanceSq__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D_py_0);
    ratio = dotProduct / lengthSq;
    ratio = 0 > (1 < ratio?1:ratio)?0:1 < ratio?1:ratio;
    point.java_awt_geom_Point2D$Double_x = first.java_awt_geom_Point2D$Double_x + ratio * (second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x);
    point.java_awt_geom_Point2D$Double_y = first.java_awt_geom_Point2D$Double_y + ratio * (second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y);
  }
}

function lv_lumii_layoutengine_GeometryHelper_placeLabelOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(label_0, first, second, point){
  var center, clockwise, crossProduct, distance, dx, dy, epsilon, line, mult, nLength, nx, ny, ratio;
  lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, point);
  line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10);
  if (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation != (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)) {
    if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      nx = second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y;
      ny = first.java_awt_geom_Point2D$Double_x - second.java_awt_geom_Point2D$Double_x;
      nLength = Math.sqrt(nx * nx + ny * ny);
      if (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_rotated) {
        distance = (label_0.lv_lumii_layoutengine_AbstractContainer_bottom - label_0.lv_lumii_layoutengine_AbstractContainer_top) / 2;
      }
       else {
        (second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x) * (second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y) > 0?(dx = (label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2 - label_0.lv_lumii_layoutengine_AbstractContainer_left):(dx = (label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2 - label_0.lv_lumii_layoutengine_AbstractContainer_right);
        dy = (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - label_0.lv_lumii_layoutengine_AbstractContainer_bottom;
        crossProduct = nx * dx + ny * dy;
        distance = crossProduct / nLength <= 0?0 - crossProduct / nLength:crossProduct / nLength;
      }
      epsilon = label_0.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
      distance += 2 * epsilon;
      ratio = distance / nLength;
      nx *= ratio;
      ny *= ratio;
      clockwise = lv_lumii_layoutengine_OutsideLabel$LineLabel_$isClockwise__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(label_0);
      center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
      if (clockwise) {
        center.java_awt_geom_Point2D$Double_x -= nx;
        center.java_awt_geom_Point2D$Double_y -= ny;
      }
       else {
        center.java_awt_geom_Point2D$Double_x += nx;
        center.java_awt_geom_Point2D$Double_y += ny;
      }
      lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, center);
    }
     else {
      mult = lv_lumii_layoutengine_OutsideLabel$LineLabel_$isClockwise__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(label_0)?1:-1;
      first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x?first.java_awt_geom_Point2D$Double_y > second.java_awt_geom_Point2D$Double_y?(point.java_awt_geom_Point2D$Double_x += mult * (label_0.lv_lumii_layoutengine_AbstractContainer_right - label_0.lv_lumii_layoutengine_AbstractContainer_left) / 2):(point.java_awt_geom_Point2D$Double_x -= mult * (label_0.lv_lumii_layoutengine_AbstractContainer_right - label_0.lv_lumii_layoutengine_AbstractContainer_left) / 2):first.java_awt_geom_Point2D$Double_x > second.java_awt_geom_Point2D$Double_x?(point.java_awt_geom_Point2D$Double_y -= mult * (label_0.lv_lumii_layoutengine_AbstractContainer_bottom - label_0.lv_lumii_layoutengine_AbstractContainer_top) / 2):(point.java_awt_geom_Point2D$Double_y += mult * (label_0.lv_lumii_layoutengine_AbstractContainer_bottom - label_0.lv_lumii_layoutengine_AbstractContainer_top) / 2);
      lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, point);
    }
  }
}

function lv_lumii_layoutengine_GeometryHelper_reconnectEndPoint__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2ZI(line, box, isStartPoint){
  var count, currSide, endPoint, eps, first, i, i0, lineIsSegment, margin, pointBox, pointDir, points, pointsToAdd, prevPoint, second, sides, size_0, tracer, x_0, y_0;
  eps = box.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  endPoint = isStartPoint?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)):com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3);
  prevPoint = isStartPoint?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[1], 3)):com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 2), 3);
  if (box.lv_lumii_layoutengine_AbstractContainer_left <= endPoint.java_awt_geom_Point2D$Double_x && endPoint.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_right && box.lv_lumii_layoutengine_AbstractContainer_top <= endPoint.java_awt_geom_Point2D$Double_y && endPoint.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_bottom && (endPoint.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_top || endPoint.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_bottom || endPoint.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_left || endPoint.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_right)) {
    sides = isStartPoint?lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line):lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line);
    currSide = lv_lumii_layoutengine_Box$BoxSide_findPointSide__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2(endPoint, prevPoint, box);
    if ((1 << currSide.java_lang_Enum_ordinal & sides) != 0) {
      return 0;
    }
  }
  margin = box.lv_lumii_layoutengine_Element_spacing / 2;
  java_lang_Math_abs__DD(endPoint.java_awt_geom_Point2D$Double_y - box.lv_lumii_layoutengine_AbstractContainer_top) <= eps && (endPoint.java_awt_geom_Point2D$Double_y += prevPoint.java_awt_geom_Point2D$Double_y < box.lv_lumii_layoutengine_AbstractContainer_top?-margin:margin);
  java_lang_Math_abs__DD(endPoint.java_awt_geom_Point2D$Double_y - box.lv_lumii_layoutengine_AbstractContainer_bottom) <= eps && (endPoint.java_awt_geom_Point2D$Double_y += prevPoint.java_awt_geom_Point2D$Double_y > box.lv_lumii_layoutengine_AbstractContainer_bottom?margin:-margin);
  java_lang_Math_abs__DD(endPoint.java_awt_geom_Point2D$Double_x - box.lv_lumii_layoutengine_AbstractContainer_left) <= eps && (endPoint.java_awt_geom_Point2D$Double_x += prevPoint.java_awt_geom_Point2D$Double_x < box.lv_lumii_layoutengine_AbstractContainer_left?-margin:margin);
  java_lang_Math_abs__DD(endPoint.java_awt_geom_Point2D$Double_x - box.lv_lumii_layoutengine_AbstractContainer_right) <= eps && (endPoint.java_awt_geom_Point2D$Double_x += prevPoint.java_awt_geom_Point2D$Double_x > box.lv_lumii_layoutengine_AbstractContainer_right?margin:-margin);
  pointBox = new lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2DV(endPoint.java_awt_geom_Point2D$Double_x - eps, endPoint.java_awt_geom_Point2D$Double_x + eps, endPoint.java_awt_geom_Point2D$Double_y - eps, endPoint.java_awt_geom_Point2D$Double_y + eps, box.lv_lumii_layoutengine_Element_diagram, box.lv_lumii_layoutengine_Element_spacing);
  tracer = new lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(box, pointBox);
  lineIsSegment = points.java_util_ArrayList_array.length == 2;
  endPoint.java_awt_geom_Point2D$Double_x == prevPoint.java_awt_geom_Point2D$Double_x?(pointDir = lineIsSegment?endPoint.java_awt_geom_Point2D$Double_y < prevPoint.java_awt_geom_Point2D$Double_y?1:4:5):(pointDir = lineIsSegment?endPoint.java_awt_geom_Point2D$Double_x < prevPoint.java_awt_geom_Point2D$Double_x?8:2:10);
  pointsToAdd = lv_lumii_layoutengine_Tracer_$trace__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2IILjava_util_ArrayList_2(tracer, pointBox, box, pointDir, isStartPoint?lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line):lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
  first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[0], 3));
  second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[1], 3));
  size_0 = points.java_util_ArrayList_array.length;
  if (first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x) {
    x_0 = isStartPoint?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(size_0 - 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[size_0 - 1], 3)).java_awt_geom_Point2D$Double_x;
    for (i0 = isStartPoint?0:size_0 - 1; (isStartPoint?i0 < size_0:i0 >= 0) && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_x == x_0; i0 += isStartPoint?1:-1) {
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_x = first.java_awt_geom_Point2D$Double_x;
    }
  }
   else {
    y_0 = isStartPoint?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_y:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(size_0 - 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[size_0 - 1], 3)).java_awt_geom_Point2D$Double_y;
    for (i0 = isStartPoint?0:size_0 - 1; (isStartPoint?i0 < size_0:i0 >= 0) && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_y == y_0; i0 += isStartPoint?1:-1) {
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_y = first.java_awt_geom_Point2D$Double_y;
    }
  }
  if (isStartPoint) {
    java_util_Collections_reverse__Ljava_util_List_2V(pointsToAdd);
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2ILjava_util_Collection_2Z(points, pointsToAdd);
  }
   else {
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(points, pointsToAdd);
  }
  count = 1;
  for (i = 0; i + 2 < pointsToAdd.java_util_ArrayList_array.length; i++) {
    ((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_x == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i + 1], 3)).java_awt_geom_Point2D$Double_x && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i + 1], 3)).java_awt_geom_Point2D$Double_x != (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 2, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i + 2], 3)).java_awt_geom_Point2D$Double_x || (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_y == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i + 1], 3)).java_awt_geom_Point2D$Double_y && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i + 1], 3)).java_awt_geom_Point2D$Double_y != (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 2, pointsToAdd.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pointsToAdd.java_util_ArrayList_array[i + 2], 3)).java_awt_geom_Point2D$Double_y) && ++count;
  }
  return count;
}

function lv_lumii_layoutengine_GeometryHelper_reconnectEndPoints__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_util_Pair_2(line, startBox, endBox){
  var endCount, eps, n, point, points, shiftX, shiftY, spacing, startCount;
  startCount = lv_lumii_layoutengine_GeometryHelper_reconnectEndPoint__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2ZI(line, startBox, true);
  endCount = lv_lumii_layoutengine_GeometryHelper_reconnectEndPoint__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2ZI(line, endBox, false);
  line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V();
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  if (java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, points.java_util_ArrayList_array.length) , points.java_util_ArrayList_array[1]))) {
    java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, 1);
    point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
    spacing = startBox.lv_lumii_layoutengine_Element_spacing * $intern_19;
    eps = startBox.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
    if (point.java_awt_geom_Point2D$Double_x == startBox.lv_lumii_layoutengine_AbstractContainer_left || point.java_awt_geom_Point2D$Double_x == startBox.lv_lumii_layoutengine_AbstractContainer_right) {
      shiftX = point.java_awt_geom_Point2D$Double_x + (point.java_awt_geom_Point2D$Double_x == startBox.lv_lumii_layoutengine_AbstractContainer_left?-spacing:spacing);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(shiftX, point.java_awt_geom_Point2D$Double_y));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(shiftX, point.java_awt_geom_Point2D$Double_y + eps));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(point.java_awt_geom_Point2D$Double_x, point.java_awt_geom_Point2D$Double_y + eps));
    }
     else {
      shiftY = point.java_awt_geom_Point2D$Double_y + (point.java_awt_geom_Point2D$Double_y == startBox.lv_lumii_layoutengine_AbstractContainer_top?-spacing:spacing);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(point.java_awt_geom_Point2D$Double_x, shiftY));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(point.java_awt_geom_Point2D$Double_x + eps, shiftY));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(point.java_awt_geom_Point2D$Double_x + eps, point.java_awt_geom_Point2D$Double_y));
    }
    line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points = points;
    startCount = endCount = 0;
  }
   else if (java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3), lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry))) {
    point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
    n = points.java_util_ArrayList_array.length;
    eps = startBox.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
    if (point.java_awt_geom_Point2D$Double_x == startBox.lv_lumii_layoutengine_AbstractContainer_left || point.java_awt_geom_Point2D$Double_x == startBox.lv_lumii_layoutengine_AbstractContainer_right) {
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(n - 2, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[n - 2], 3)).java_awt_geom_Point2D$Double_y += eps;
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(n - 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[n - 1], 3)).java_awt_geom_Point2D$Double_y += eps;
    }
     else {
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(n - 2, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[n - 2], 3)).java_awt_geom_Point2D$Double_x += eps;
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(n - 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[n - 1], 3)).java_awt_geom_Point2D$Double_x += eps;
    }
    line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points = points;
  }
  return new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(startCount), java_lang_Integer_valueOf__ILjava_lang_Integer_2(endCount));
}

function lv_lumii_layoutengine_GeometryHelper$Chain_$intersects__Llv_lumii_layoutengine_GeometryHelper$Chain_2_3Ljava_awt_geom_Point2D$Double_2Z(this$static, labelPoints){
  var i, i0, i1, inside, j, point;
  for (i0 = 0; i0 + 1 < labelPoints.length; i0++) {
    for (j = 0; j + 1 < this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points.length; j++) {
      if (java_awt_geom_Line2D_linesIntersect__DDDDDDDDZ(labelPoints[i0].java_awt_geom_Point2D$Double_x, labelPoints[i0].java_awt_geom_Point2D$Double_y, labelPoints[i0 + 1].java_awt_geom_Point2D$Double_x, labelPoints[i0 + 1].java_awt_geom_Point2D$Double_y, this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[j].java_awt_geom_Point2D$Double_x, this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[j].java_awt_geom_Point2D$Double_y, this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[j + 1].java_awt_geom_Point2D$Double_x, this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[j + 1].java_awt_geom_Point2D$Double_y)) {
        return true;
      }
    }
  }
  if (labelPoints.length > 2 && this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points.length > 2) {
    point = labelPoints[0];
    inside = true;
    for (i1 = 0; i1 + 1 < this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points.length; i1++) {
      if (java_awt_geom_Line2D_relativeCCW__DDDDDDI(this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[i1].java_awt_geom_Point2D$Double_x, this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[i1].java_awt_geom_Point2D$Double_y, this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[i1 + 1].java_awt_geom_Point2D$Double_x, this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[i1 + 1].java_awt_geom_Point2D$Double_y, point.java_awt_geom_Point2D$Double_x, point.java_awt_geom_Point2D$Double_y) >= 0) {
        inside = false;
        break;
      }
    }
    if (inside) {
      return true;
    }
    point = this$static.lv_lumii_layoutengine_GeometryHelper$Chain_points[0];
    for (i = 0; i + 1 < labelPoints.length; i++) {
      if (java_awt_geom_Line2D_relativeCCW__DDDDDDI(labelPoints[i].java_awt_geom_Point2D$Double_x, labelPoints[i].java_awt_geom_Point2D$Double_y, labelPoints[i + 1].java_awt_geom_Point2D$Double_x, labelPoints[i + 1].java_awt_geom_Point2D$Double_y, point.java_awt_geom_Point2D$Double_x, point.java_awt_geom_Point2D$Double_y) >= 0) {
        return false;
      }
    }
    return true;
  }
  return false;
}

function lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain__Llv_lumii_layoutengine_AbstractContainer_2IV(rectangle, id_0){
  this.lv_lumii_layoutengine_GeometryHelper$Chain_points = lv_lumii_layoutengine_GeometryHelper_getChainPoints__Llv_lumii_layoutengine_AbstractContainer_2_3Ljava_awt_geom_Point2D$Double_2(rectangle);
  this.lv_lumii_layoutengine_GeometryHelper$Chain_id = id_0;
}

function lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain___3Ljava_awt_geom_Point2D$Double_2IV(points, id_0){
  this.lv_lumii_layoutengine_GeometryHelper$Chain_points = points;
  this.lv_lumii_layoutengine_GeometryHelper$Chain_id = id_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(71, 1, {71:1}, lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain__Llv_lumii_layoutengine_AbstractContainer_2IV, lv_lumii_layoutengine_GeometryHelper$Chain_GeometryHelper$Chain___3Ljava_awt_geom_Point2D$Double_2IV);
_.lv_lumii_layoutengine_GeometryHelper$Chain_id = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1GeometryHelper$Chain_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'GeometryHelper/Chain', 71);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(209, 12, {12:1, 57:1, 62:1});
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Label_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Label', 209);
function lv_lumii_layoutengine_LayoutAlgorithm_$adjustBounds__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Container_2V(enclosingContainer){
  var b, childBounds, h, w;
  childBounds = lv_lumii_layoutengine_Container_$findChildContainerEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(enclosingContainer);
  !childBounds && (childBounds = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(0, 0, 0, 0));
  w = childBounds.java_awt_geom_Rectangle2D$Double_width;
  h = childBounds.java_awt_geom_Rectangle2D$Double_height;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(enclosingContainer, 16)) {
    b = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(enclosingContainer, 16);
    w = java_lang_Math_max__DDD(w, b.lv_lumii_layoutengine_AbstractContainer_userMinWidth + 2 * b.lv_lumii_layoutengine_Element_spacing);
    h = java_lang_Math_max__DDD(h, b.lv_lumii_layoutengine_AbstractContainer_userMinHeight + 2 * b.lv_lumii_layoutengine_Element_spacing);
  }
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(enclosingContainer, new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(childBounds.java_awt_geom_Rectangle2D$Double_x + childBounds.java_awt_geom_Rectangle2D$Double_width / 2 - w / 2, childBounds.java_awt_geom_Rectangle2D$Double_y + childBounds.java_awt_geom_Rectangle2D$Double_height / 2 - h / 2, w, h));
}

function lv_lumii_layoutengine_LayoutAlgorithm_$adjustBoundsSize__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Container_2V(enclosingContainer){
  var b, center, childBounds, h, w;
  childBounds = lv_lumii_layoutengine_Container_$findChildContainerEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(enclosingContainer);
  !childBounds && (childBounds = new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(0, 0, 0, 0));
  w = childBounds.java_awt_geom_Rectangle2D$Double_width;
  h = childBounds.java_awt_geom_Rectangle2D$Double_height;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(enclosingContainer, 16)) {
    b = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(enclosingContainer, 16);
    w = java_lang_Math_max__DDD(w, b.lv_lumii_layoutengine_AbstractContainer_userMinWidth + 2 * b.lv_lumii_layoutengine_Element_spacing);
    h = java_lang_Math_max__DDD(h, b.lv_lumii_layoutengine_AbstractContainer_userMinHeight + 2 * b.lv_lumii_layoutengine_Element_spacing);
  }
  center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((enclosingContainer.lv_lumii_layoutengine_AbstractContainer_left + enclosingContainer.lv_lumii_layoutengine_AbstractContainer_right) / 2, (enclosingContainer.lv_lumii_layoutengine_AbstractContainer_top + enclosingContainer.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(enclosingContainer, new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(center.java_awt_geom_Point2D$Double_x - w / 2, center.java_awt_geom_Point2D$Double_y - h / 2, w, h));
}

function lv_lumii_layoutengine_LayoutAlgorithm_$assignLayoutNumbers__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2IV(this$static, part, passNo){
  var c, c$iterator;
  for (c$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(part.lv_lumii_layoutengine_DiagramPart_children); c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_last = c$iterator.java_util_AbstractList$IteratorImpl_i++), 13));
    this$static.lv_lumii_layoutengine_LayoutAlgorithm_laidOutInPass.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(c, java_lang_Integer_valueOf__ILjava_lang_Integer_2(passNo));
  }
}

function lv_lumii_layoutengine_LayoutAlgorithm_$buildInnerLines__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2Ljava_util_List_2(part){
  var boxSet, c, c$iterator, end, flatLine, incidentLine, incidentLine$iterator, lines, start_0;
  lines = new java_util_ArrayList_ArrayList__V;
  boxSet = new java_util_HashSet_HashSet__Ljava_util_Collection_2V(part.lv_lumii_layoutengine_DiagramPart_children);
  for (c$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(part.lv_lumii_layoutengine_DiagramPart_containers.java_util_HashSet_map)); c$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    c = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(c$iterator), 13);
    for (incidentLine$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(c)); incidentLine$iterator.java_util_AbstractList$IteratorImpl_i < incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      incidentLine = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(incidentLine$iterator.java_util_AbstractList$IteratorImpl_i < incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(incidentLine$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(incidentLine$iterator.java_util_AbstractList$IteratorImpl_last = incidentLine$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
      if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine)) {
        start_0 = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine);
        while (!!start_0 && !boxSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(start_0)) {
          start_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(start_0.lv_lumii_layoutengine_Element_owner, 13);
        }
        end = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(incidentLine);
        while (!!end && !boxSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(end)) {
          end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(end.lv_lumii_layoutengine_Element_owner, 13);
        }
        if (!!start_0 && !!end) {
          flatLine = new lv_lumii_layoutengine_util_LayoutLine_LayoutLine__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V(incidentLine, start_0, end);
          com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(lines.java_util_ArrayList_array, lines.java_util_ArrayList_array.length, flatLine);
        }
         else {
          throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V($intern_60);
        }
      }
    }
  }
  return lines;
}

function lv_lumii_layoutengine_LayoutAlgorithm_$buildOuterLines__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Diagram_2V(this$static, diagram){
  var a, a$iterator, commonOwner, end, part, start_0;
  for (a$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); a$iterator.java_util_AbstractList$IteratorImpl_i < a$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    a = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(a$iterator.java_util_AbstractList$IteratorImpl_i < a$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(a$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(a$iterator.java_util_AbstractList$IteratorImpl_last = a$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(a) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(a)) {
      start_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(a).lv_lumii_layoutengine_Element_owner, 13);
      end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(a).lv_lumii_layoutengine_Element_owner, 13);
      commonOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(a.lv_lumii_layoutengine_Element_owner, 13);
      while (start_0 != commonOwner) {
        part = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutAlgorithm_componentPartMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(start_0), 58);
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(part.lv_lumii_layoutengine_DiagramPart_outerLines, a);
        start_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(start_0.lv_lumii_layoutengine_Element_owner, 13);
      }
      while (end != commonOwner) {
        part = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutAlgorithm_componentPartMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(end), 58);
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(part.lv_lumii_layoutengine_DiagramPart_outerLines, a);
        end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(end.lv_lumii_layoutengine_Element_owner, 13);
      }
    }
  }
}

function lv_lumii_layoutengine_LayoutAlgorithm_$layout__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Diagram_2V(this$static, diagram){
  var aC, aC$iterator, b, conCompArr, conComponents, curLayout, h, i, i0, i1, i2, j, label$iterator, layouter, layouter$index, layouter$max, layouterArr, layouterArr$iterator, layouters2, line, line$iterator, line$iterator0, lines, part, part$iterator, part$iterator0, partArr, parts, parts2, spliter, w, lv_lumii_layoutengine_LayoutSplitter_$split__Llv_lumii_layoutengine_LayoutSplitter_2Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2_topPart_0;
  spliter = new lv_lumii_layoutengine_LayoutSplitter_LayoutSplitter__V;
  parts = (spliter.lv_lumii_layoutengine_LayoutSplitter_splitAll = true , spliter.lv_lumii_layoutengine_LayoutSplitter_parts = new java_util_ArrayList_ArrayList__V , lv_lumii_layoutengine_LayoutSplitter_$split__Llv_lumii_layoutengine_LayoutSplitter_2Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2_topPart_0 = lv_lumii_layoutengine_LayoutSplitter_$performSplit__Llv_lumii_layoutengine_LayoutSplitter_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_DiagramPart_2(spliter, diagram, diagram.lv_lumii_layoutengine_Container_arrangeData.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2()) , !!lv_lumii_layoutengine_LayoutSplitter_$split__Llv_lumii_layoutengine_LayoutSplitter_2Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2_topPart_0 && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(spliter.lv_lumii_layoutengine_LayoutSplitter_parts, lv_lumii_layoutengine_LayoutSplitter_$split__Llv_lumii_layoutengine_LayoutSplitter_2Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2_topPart_0) , spliter.lv_lumii_layoutengine_LayoutSplitter_parts);
  parts2 = new java_util_ArrayList_ArrayList__V;
  for (part$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(parts); part$iterator0.java_util_AbstractList$IteratorImpl_i < part$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    part = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(part$iterator0.java_util_AbstractList$IteratorImpl_i < part$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(part$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(part$iterator0.java_util_AbstractList$IteratorImpl_last = part$iterator0.java_util_AbstractList$IteratorImpl_i++), 58));
    conComponents = lv_lumii_layoutengine_LayoutAlgorithm_$splitToConComp__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2Ljava_util_ArrayList_2(part);
    conCompArr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(conComponents, com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1DiagramPart_12_1classLit, {5:1, 6:1, 8:1, 184:1}, 58, conComponents.java_util_ArrayList_array.length, 0, 1)), 184);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(parts2.java_util_ArrayList_array, parts2.java_util_ArrayList_array.length, conCompArr);
  }
  this$static.lv_lumii_layoutengine_LayoutAlgorithm_laidOutInPass = new java_util_HashMap_HashMap__V;
  this$static.lv_lumii_layoutengine_LayoutAlgorithm_componentPartMap = new java_util_HashMap_HashMap__V;
  for (part$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(parts); part$iterator.java_util_AbstractList$IteratorImpl_i < part$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    part = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(part$iterator.java_util_AbstractList$IteratorImpl_i < part$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(part$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(part$iterator.java_util_AbstractList$IteratorImpl_last = part$iterator.java_util_AbstractList$IteratorImpl_i++), 58));
    this$static.lv_lumii_layoutengine_LayoutAlgorithm_componentPartMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, part);
  }
  layouters2 = new java_util_ArrayList_ArrayList__V;
  for (i0 = 0; i0 < parts2.java_util_ArrayList_array.length; i0++) {
    partArr = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, parts2.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts2.java_util_ArrayList_array[i0], 184));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(layouters2, i0, com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1ComponentLayout_12_1classLit, {5:1, 6:1, 8:1, 185:1}, 87, partArr.length, 0, 1));
    layouterArr = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, layouters2.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(layouters2.java_util_ArrayList_array[i0], 185));
    for (j = 0; j < partArr.length; j++) {
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(layouterArr, j, lv_lumii_layoutengine_ComponentLayout_createLayouter__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_ComponentLayout_2(partArr[j], this$static));
    }
  }
  lv_lumii_layoutengine_LayoutAlgorithm_$buildOuterLines__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Diagram_2V(this$static, diagram);
  for (layouterArr$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(layouters2); layouterArr$iterator.java_util_AbstractList$IteratorImpl_i < layouterArr$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    layouterArr = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(layouterArr$iterator.java_util_AbstractList$IteratorImpl_i < layouterArr$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(layouterArr$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(layouterArr$iterator.java_util_AbstractList$IteratorImpl_last = layouterArr$iterator.java_util_AbstractList$IteratorImpl_i++), 185));
    for (layouter$index = 0 , layouter$max = layouterArr.length; layouter$index < layouter$max; ++layouter$index) {
      layouter = layouterArr[layouter$index];
      for (aC$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(layouter.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, false)); aC$iterator.java_util_AbstractList$IteratorImpl_i < aC$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        aC = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(aC$iterator.java_util_AbstractList$IteratorImpl_i < aC$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aC$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(aC$iterator.java_util_AbstractList$IteratorImpl_last = aC$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
        w = 0;
        h = 0;
        if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(aC, 16)) {
          b = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aC, 16);
          w = b.lv_lumii_layoutengine_AbstractContainer_userMinWidth + 2 * b.lv_lumii_layoutengine_Element_spacing;
          h = b.lv_lumii_layoutengine_AbstractContainer_userMinHeight + 2 * b.lv_lumii_layoutengine_Element_spacing;
          lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(b, b.lv_lumii_layoutengine_AbstractContainer_userMinWidth, b.lv_lumii_layoutengine_AbstractContainer_userMinHeight);
        }
        lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(aC, new java_awt_geom_Rectangle2D$Double_Rectangle2D$Double__DDDDV(0, 0, w, h));
      }
    }
  }
  for (i1 = 0; i1 < parts.java_util_ArrayList_array.length; i1++) {
    curLayout = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, layouters2.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(layouters2.java_util_ArrayList_array[i1], 185));
    for (j = 0; j < curLayout.length; j++) {
      curLayout[j].layoutPass__IV(1);
    }
    lv_lumii_layoutengine_ConnectedComponentPacking_pack___3Llv_lumii_layoutengine_DiagramPart_2DDDV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, parts2.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts2.java_util_ArrayList_array[i1], 184)));
    lv_lumii_layoutengine_LayoutAlgorithm_$adjustBounds__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Container_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, parts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts.java_util_ArrayList_array[i1], 58)).lv_lumii_layoutengine_DiagramPart_enclosingContainer);
    lv_lumii_layoutengine_LayoutAlgorithm_$assignLayoutNumbers__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2IV(this$static, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, parts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts.java_util_ArrayList_array[i1], 58)), 1);
  }
  for (i2 = parts.java_util_ArrayList_array.length - 1; i2 >= 0; i2--) {
    lv_lumii_layoutengine_LayoutAlgorithm_$adjustBoundsSize__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Container_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, parts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts.java_util_ArrayList_array[i2], 58)).lv_lumii_layoutengine_DiagramPart_enclosingContainer);
    lv_lumii_layoutengine_LayoutAlgorithm_$assignLayoutNumbers__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2IV(this$static, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, parts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts.java_util_ArrayList_array[i2], 58)), 2);
  }
  for (i = 0; i < parts.java_util_ArrayList_array.length; i++) {
    lv_lumii_layoutengine_LayoutAlgorithm_$adjustBoundsSize__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_Container_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, parts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts.java_util_ArrayList_array[i], 58)).lv_lumii_layoutengine_DiagramPart_enclosingContainer);
    lv_lumii_layoutengine_LayoutAlgorithm_$assignLayoutNumbers__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2IV(this$static, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, parts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(parts.java_util_ArrayList_array[i], 58)), 3);
  }
  lv_lumii_layoutengine_Normalizer_growDescendants__Ljava_util_LinkedHashSet_2Llv_lumii_layoutengine_AbstractContainer_2V(null, diagram);
  lv_lumii_layoutengine_Normalizer_correctPositions__Llv_lumii_layoutengine_AbstractContainer_2V(diagram);
  diagram.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_AbstractContainer_$findNextRectangleEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(diagram);
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(diagram, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(diagram));
  for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantBoxOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I());
    com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++));
    null.nullMethod();
    null.nullMethod()?null.nullMethod(new java_awt_geom_Point2D$Double_Point2D$Double__DDV(null.nullField + null.nullField * null.nullMethod(), 0)):null.nullMethod(new java_awt_geom_Point2D$Double_Point2D$Double__DDV(0, null.nullField + null.nullField * null.nullMethod()));
  }
  diagram.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL) && (diagram.lv_lumii_layoutengine_Diagram_state = lv_lumii_layoutengine_Diagram$State_TRANSACTION);
  lines = lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram);
  for (line$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_last = line$iterator0.java_util_AbstractList$IteratorImpl_i++), 10));
    lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(line, line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2());
  }
  lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram);
  lv_lumii_layoutengine_LineOptimizer_arrangeLineEnds__Llv_lumii_layoutengine_Diagram_2V(diagram);
  diagram.lv_lumii_layoutengine_Diagram_state != lv_lumii_layoutengine_Diagram$State_MANUAL && lv_lumii_layoutengine_Normalizer_adjust__Llv_lumii_layoutengine_Diagram_2V(diagram);
  diagram.lv_lumii_layoutengine_Diagram_bounds = lv_lumii_layoutengine_Container_$findDescendantEnclosingRectangle__Llv_lumii_layoutengine_Container_2Ljava_awt_geom_Rectangle2D$Double_2(diagram);
  lv_lumii_layoutengine_AbstractContainer_$setBounds__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(diagram, lv_lumii_layoutengine_Diagram_$getBounds__Llv_lumii_layoutengine_Diagram_2Ljava_awt_geom_Rectangle2D$Double_2(diagram));
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    line.lv_lumii_layoutengine_Line_layoutStartSides = 15;
    line.lv_lumii_layoutengine_Line_layoutEndSides = 15;
  }
  lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(diagram);
}

function lv_lumii_layoutengine_LayoutAlgorithm_$splitToConComp__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2Ljava_util_ArrayList_2(part){
  var aCont, aContainers, abstractConstr, classOfACont, compInGrid, conComp, conComponents, constr, contA, contB, contLines, contVisited, containerLines, enclosingContCopy, enclosingContCopyForGrid, i, i0, i1, i2, incList, indexA, indexB, j, j$iterator, line, line$iterator, lines, map_0, queue, t;
  constr = null;
  abstractConstr = lv_lumii_layoutengine_AbstractContainer_$getLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_LayoutConstraints_2(part.lv_lumii_layoutengine_DiagramPart_enclosingContainer);
  abstractConstr.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1 && (constr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(abstractConstr, 39));
  lines = lv_lumii_layoutengine_LayoutAlgorithm_$buildInnerLines__Llv_lumii_layoutengine_LayoutAlgorithm_2Llv_lumii_layoutengine_DiagramPart_2Ljava_util_List_2(part);
  conComponents = new java_util_ArrayList_ArrayList__V;
  aContainers = lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, false);
  map_0 = new java_util_HashMap_HashMap__V;
  for (i0 = 0; i0 < aContainers.java_util_ArrayList_array.length; i0++) {
    map_0.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, aContainers.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aContainers.java_util_ArrayList_array[i0], 12)), java_lang_Integer_valueOf__ILjava_lang_Integer_2(i0));
  }
  incList = new java_util_ArrayList_ArrayList__V;
  contLines = new java_util_ArrayList_ArrayList__V;
  for (i1 = 0; i1 < aContainers.java_util_ArrayList_array.length; i1++) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(incList, i1, new java_util_ArrayList_ArrayList__V);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(contLines, i1, new java_util_ArrayList_ArrayList__V);
  }
  for (i2 = 0; i2 < lines.java_util_ArrayList_array.length; i2++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i2], 72));
    contA = line.lv_lumii_layoutengine_util_LayoutLine_startElement;
    contB = line.lv_lumii_layoutengine_util_LayoutLine_endElement;
    indexA = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(map_0.get__Ljava_lang_Object_2Ljava_lang_Object_2(contA), 9);
    indexB = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(map_0.get__Ljava_lang_Object_2Ljava_lang_Object_2(contB), 9);
    java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(incList, indexA.java_lang_Integer_value), 4), indexB, 0) != -1 || java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(incList, indexA.java_lang_Integer_value), 4), indexB);
    java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(incList, indexB.java_lang_Integer_value), 4), indexA, 0) != -1 || java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(incList, indexB.java_lang_Integer_value), 4), indexA);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(contLines, indexA.java_lang_Integer_value), 4), line);
  }
  enclosingContCopyForGrid = lv_lumii_layoutengine_Container_$getEmptyClone__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Container_2(part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, true);
  contVisited = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, aContainers.java_util_ArrayList_array.length, 8, 1);
  for (i = 0; i < contVisited.length; i++) {
    if (!contVisited[i]) {
      compInGrid = false;
      enclosingContCopy = lv_lumii_layoutengine_Container_$getEmptyClone__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Container_2(part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, false);
      queue = new java_util_LinkedList_LinkedList__V;
      java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(queue, java_lang_Integer_valueOf__ILjava_lang_Integer_2(i));
      contVisited[i] = true;
      while (queue.java_util_LinkedList_size != 0) {
        t = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 9)).java_lang_Integer_value;
        aCont = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(t, aContainers.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aContainers.java_util_ArrayList_array[t], 12));
        !!constr && (!!com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, aCont), 9) || !!com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, aCont), 9)) && (compInGrid = true);
        classOfACont = aCont.java_lang_Object__1_1_1clazz$;
        classOfACont == com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Container_12_1classLit?lv_lumii_layoutengine_Container_$addContainer__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V(enclosingContCopy, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aCont, 13)):classOfACont == com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1InsideLabel_12_1classLit?lv_lumii_layoutengine_AbstractContainer_$addInsideLabel__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_InsideLabel_2V(enclosingContCopy, com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(aCont)):classOfACont == com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box_12_1classLit && lv_lumii_layoutengine_Container_$addBox__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Box_2V(enclosingContCopy, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(aCont, 16));
        containerLines = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(t, contLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(contLines.java_util_ArrayList_array[t], 4));
        if (containerLines) {
          for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(containerLines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
            line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 72));
            lv_lumii_layoutengine_Container_$addLine__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Line_2V(enclosingContCopy, line.lv_lumii_layoutengine_util_LayoutLine_originalLine);
          }
        }
        for (j$iterator = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(t, incList.java_util_ArrayList_array.length) , new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(incList.java_util_ArrayList_array[t], 4))); j$iterator.java_util_AbstractList$IteratorImpl_i < j$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          j = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(j$iterator.java_util_AbstractList$IteratorImpl_i < j$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(j$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(j$iterator.java_util_AbstractList$IteratorImpl_last = j$iterator.java_util_AbstractList$IteratorImpl_i++), 9)).java_lang_Integer_value;
          if (!contVisited[j]) {
            contVisited[j] = true;
            java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(queue, java_lang_Integer_valueOf__ILjava_lang_Integer_2(j));
          }
        }
      }
      if (compInGrid) {
        java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(enclosingContCopyForGrid.lv_lumii_layoutengine_Container_containers, lv_lumii_layoutengine_Container_$getPureContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(enclosingContCopy));
        java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(enclosingContCopyForGrid.lv_lumii_layoutengine_AbstractContainer_insideLabels, lv_lumii_layoutengine_AbstractContainer_$getInsideLabels__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2(enclosingContCopy));
        java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(enclosingContCopyForGrid.lv_lumii_layoutengine_Container_boxes, lv_lumii_layoutengine_Container_$getBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(enclosingContCopy));
        java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(enclosingContCopyForGrid.lv_lumii_layoutengine_Container_lines, lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(enclosingContCopy));
      }
       else {
        conComp = new lv_lumii_layoutengine_DiagramPart_DiagramPart__Llv_lumii_layoutengine_Container_2V(enclosingContCopy);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(conComponents.java_util_ArrayList_array, conComponents.java_util_ArrayList_array.length, conComp);
      }
    }
  }
  if (!!constr && (enclosingContCopyForGrid.lv_lumii_layoutengine_Container_containers.java_util_HashSet_map.size__I() != 0 || enclosingContCopyForGrid.lv_lumii_layoutengine_AbstractContainer_insideLabels.java_util_HashSet_map.size__I() != 0 || enclosingContCopyForGrid.lv_lumii_layoutengine_Container_boxes.java_util_HashSet_map.size__I() != 0)) {
    conComp = new lv_lumii_layoutengine_DiagramPart_DiagramPart__Llv_lumii_layoutengine_Container_2V(enclosingContCopyForGrid);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(conComponents.java_util_ArrayList_array, conComponents.java_util_ArrayList_array.length, conComp);
  }
  return conComponents;
}

function lv_lumii_layoutengine_LayoutAlgorithm_LayoutAlgorithm__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(221, 1, {}, lv_lumii_layoutengine_LayoutAlgorithm_LayoutAlgorithm__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LayoutAlgorithm_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LayoutAlgorithm', 221);
function lv_lumii_layoutengine_LayoutConstraints_LayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container){
  this.lv_lumii_layoutengine_LayoutConstraints_container = container;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(170, 1, {});
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LayoutConstraints_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LayoutConstraints', 170);
function lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_LayoutConstraints$ConstraintLine__DDDV(pos, distance, spacing){
  this.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = pos;
  this.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance = distance;
  this.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing = spacing;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(27, 1, {27:1}, lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_LayoutConstraints$ConstraintLine__DDDV);
_.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance = 0;
_.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = 0;
_.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LayoutConstraints$ConstraintLine_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LayoutConstraints/ConstraintLine', 27);
function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1remove__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2V(this$static, element){
  java_util_LinkedHashMap_$remove__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, element);
  java_util_LinkedHashMap_$remove__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, element);
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setCell__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2Ljava_lang_Integer_2V(this$static, elem, row, column){
  if (elem) {
    lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$addColumnsTo__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_lang_Integer_2V(this$static, column);
    lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$addRowsTo__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_lang_Integer_2V(this$static, row);
    row?java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, elem, row):java_util_LinkedHashMap_$remove__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, elem);
    column?java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, elem, column):java_util_LinkedHashMap_$remove__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, elem);
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Setting cells for elements other than Boxes and InsideLabels is not supported yet.');
  }
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(this$static, column, x_0){
  com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, column), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = x_0;
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(this$static, row, y_0){
  com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, row), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = y_0;
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$addColumnsTo__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_lang_Integer_2V(this$static, column){
  var i, prev, rect;
  if (column) {
    rect = lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(this$static.lv_lumii_layoutengine_LayoutConstraints_container, true);
    prev = rect.lv_lumii_layoutengine_AbstractContainer_right;
    for (i = this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length; i < column.java_lang_Integer_value; i++) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, new lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_LayoutConstraints$ConstraintLine__DDDV(prev, this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultColumnMinWidth, this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultColumnSpacing));
    }
  }
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$addRowsTo__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_lang_Integer_2V(this$static, row){
  var i, prev, rect;
  if (row) {
    rect = lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(this$static.lv_lumii_layoutengine_LayoutConstraints_container, true);
    prev = rect.lv_lumii_layoutengine_AbstractContainer_bottom;
    for (i = this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length; i < row.java_lang_Integer_value; i++) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, new lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_LayoutConstraints$ConstraintLine__DDDV(prev, this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultRowMinHeight, this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultRowSpacing));
    }
  }
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$arrangeGridBorders__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_util_ArrayList_2ZDDLjava_util_ArrayList_2(this$static, elements, arrangeColumns, startBound, endBound){
  var borderCount, borderPlace, borderPtr, borders, currBorder, dp, elemPtr, element, element$iterator, elementCount, i, i0, i1, i2, i3, i4, i5, id_0, index_0, k, lane, left, maxRight, mid, minLeft, parent_0, positions, result, right, start_0, value_0;
  borders = arrangeColumns?this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints:this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints;
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(elements, null);
  elementCount = elements.java_util_ArrayList_array.length;
  borderCount = borders.java_util_ArrayList_array.length;
  borderPlace = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, borderCount + 1, 7, 1);
  for (elemPtr = 0 , borderPtr = 1; borderPtr < borderCount; borderPtr++) {
    while (elemPtr < elementCount && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(borderPtr, borders.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(borders.java_util_ArrayList_array[borderPtr], 27)).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos > (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(elemPtr, elements.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(elements.java_util_ArrayList_array[elemPtr], 54)).lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_pos) {
      ++elemPtr;
    }
    borderPlace[borderPtr] = elemPtr;
  }
  borderPlace[borderCount] = elementCount;
  dp = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, elementCount + 1, 7, 1);
  index_0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, elementCount + 1, 7, 1);
  parent_0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, elementCount, 7, 1);
  java_util_Arrays_fill___3IIIIV(dp, dp.length, $intern_1);
  java_util_Arrays_fill___3IIIIV(parent_0, parent_0.length, -1);
  dp[0] = 0;
  index_0[0] = -1;
  start_0 = 1;
  for (i0 = 0; i0 < elementCount; i0++) {
    value_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, elements.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(elements.java_util_ArrayList_array[i0], 54)).lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_lane;
    left = start_0;
    right = i0 + 1;
    while (left < right) {
      mid = ~~((left + right) / 2);
      value_0 < dp[mid]?(right = mid):(left = mid + 1);
    }
    if (dp[left - 1] <= value_0 && value_0 < dp[left]) {
      dp[left] = value_0;
      index_0[left] = i0;
      parent_0[i0] = index_0[left - 1];
      (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, elements.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(elements.java_util_ArrayList_array[i0], 54)).lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_constant && (start_0 = left + 1);
    }
  }
  result = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, borderCount, 7, 1);
  currBorder = borderCount - 1;
  k = -1;
  for (i1 = elementCount; i1 >= 0; i1--) {
    if (dp[i1] < $intern_1) {
      k = index_0[i1];
      break;
    }
  }
  while (k >= 0) {
    value_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, elements.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(elements.java_util_ArrayList_array[k], 54)).lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_lane;
    while (value_0 <= currBorder) {
      result[currBorder--] = k + 1;
    }
    k = parent_0[k];
  }
  positions = new java_util_ArrayList_ArrayList__V;
  for (i2 = 0; i2 < borderCount; i2++) {
    id_0 = result[i2];
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(positions, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(id_0 == borderPlace[i2]?java_lang_Math_min__DDD(endBound, java_lang_Math_max__DDD((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, borders.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(borders.java_util_ArrayList_array[i2], 27)).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos, startBound)):id_0 == 0?startBound:id_0 == elementCount?endBound:((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(id_0 - 1, elements.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(elements.java_util_ArrayList_array[id_0 - 1], 54)).lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_pos + (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(id_0, elements.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(elements.java_util_ArrayList_array[id_0], 54)).lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_pos) / 2)));
  }
  minLeft = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, borderCount + 1, 7, 1);
  maxRight = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, borderCount + 1, 7, 1);
  for (i3 = 0; i3 < borderCount; i3++) {
    minLeft[i3] = $intern_20;
    maxRight[i3] = $intern_53;
  }
  for (element$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(elements); element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    element = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_last = element$iterator.java_util_AbstractList$IteratorImpl_i++), 54));
    if (element.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_constant) {
      lane = element.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_lane;
      minLeft[lane] = java_lang_Math_max__DDD(minLeft[lane], element.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_right);
      maxRight[lane - 1] = java_lang_Math_min__DDD(maxRight[lane - 1], element.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_left);
    }
  }
  for (i4 = 1; i4 < borderCount; i4++) {
    minLeft[i4] = java_lang_Math_max__DDD(minLeft[i4 - 1], minLeft[i4]);
  }
  for (i5 = borderCount - 2; i5 >= 0; i5--) {
    maxRight[i5] = java_lang_Math_min__DDD(maxRight[i5 + 1], maxRight[i5]);
  }
  for (i = 0; i < borderCount; i++) {
    (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, positions.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(positions.java_util_ArrayList_array[i], 11)).java_lang_Double_value < minLeft[i]?java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(positions, i, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(minLeft[i]))):maxRight[i] < (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, positions.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(positions.java_util_ArrayList_array[i], 11)).java_lang_Double_value && java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(positions, i, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(maxRight[i])));
  }
  return positions;
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumn__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2(this$static, elem){
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, elem), 9);
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnBorderSpacing__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static, column){
  if (column < 1 || this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length <= column) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('The index of the border should be between 1 and (column count)-1, inclusive.');
  }
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, column), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing;
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static, column){
  var constraints, currColumn, prevContainer, prevOwner;
  if (column == 1) {
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 62)) {
      return this$static.lv_lumii_layoutengine_LayoutConstraints_container.lv_lumii_layoutengine_AbstractContainer_left;
    }
     else {
      prevContainer = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 13);
      prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevContainer.lv_lumii_layoutengine_Element_owner, 13);
      while (true) {
        if (prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1) {
          constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
          currColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, prevContainer), 9);
          if (currColumn) {
            return lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, currColumn.java_lang_Integer_value);
          }
        }
        if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(prevOwner, 16)) {
          return prevOwner.lv_lumii_layoutengine_AbstractContainer_left;
        }
        prevContainer = prevOwner;
        prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_Element_owner, 13);
      }
    }
  }
   else {
    return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, column - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos;
  }
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static, column){
  var constraints, currColumn, prevContainer, prevOwner;
  if (column == this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length) {
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 62)) {
      return this$static.lv_lumii_layoutengine_LayoutConstraints_container.lv_lumii_layoutengine_AbstractContainer_right;
    }
     else {
      prevContainer = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 13);
      prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevContainer.lv_lumii_layoutengine_Element_owner, 13);
      while (true) {
        if (prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1) {
          constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
          currColumn = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, prevContainer), 9);
          if (currColumn) {
            return lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, currColumn.java_lang_Integer_value);
          }
        }
        if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(prevOwner, 16)) {
          return prevOwner.lv_lumii_layoutengine_AbstractContainer_right;
        }
        prevContainer = prevOwner;
        prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_Element_owner, 13);
      }
    }
  }
   else {
    return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, column), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos;
  }
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRow__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2(this$static, elem){
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, elem), 9);
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBorderSpacing__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static, row){
  if (row < 1 || this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length <= row) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('The index of the border should be between 1 and (row count)-1, inclusive.');
  }
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, row), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing;
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static, row){
  var constraints, currRow, prevContainer, prevOwner;
  if (row == this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length) {
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 62)) {
      return this$static.lv_lumii_layoutengine_LayoutConstraints_container.lv_lumii_layoutengine_AbstractContainer_bottom;
    }
     else {
      prevContainer = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 13);
      prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevContainer.lv_lumii_layoutengine_Element_owner, 13);
      while (true) {
        if (prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1) {
          constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
          currRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, prevContainer), 9);
          if (currRow) {
            return lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, currRow.java_lang_Integer_value);
          }
        }
        if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(prevOwner, 16)) {
          return prevOwner.lv_lumii_layoutengine_AbstractContainer_bottom;
        }
        prevContainer = prevOwner;
        prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_Element_owner, 13);
      }
    }
  }
   else {
    return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, row), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos;
  }
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static, row){
  var constraints, currRow, prevContainer, prevOwner;
  if (row == 1) {
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 62)) {
      return this$static.lv_lumii_layoutengine_LayoutConstraints_container.lv_lumii_layoutengine_AbstractContainer_top;
    }
     else {
      prevContainer = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints_container, 13);
      prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevContainer.lv_lumii_layoutengine_Element_owner, 13);
      while (true) {
        if (prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1) {
          constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
          currRow = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, prevContainer), 9);
          if (currRow) {
            return lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, currRow.java_lang_Integer_value);
          }
        }
        if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(prevOwner, 16)) {
          return prevOwner.lv_lumii_layoutengine_AbstractContainer_top;
        }
        prevContainer = prevOwner;
        prevOwner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevOwner.lv_lumii_layoutengine_Element_owner, 13);
      }
    }
  }
   else {
    return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, row - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos;
  }
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_LayoutConstraints$GridLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container){
  lv_lumii_layoutengine_LayoutConstraints_LayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V.call(this, container);
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, new lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_LayoutConstraints$ConstraintLine__DDDV(NaN, this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultRowMinHeight, NaN));
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, new lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_LayoutConstraints$ConstraintLine__DDDV(NaN, this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultColumnMinWidth, NaN));
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns = new java_util_LinkedHashMap_LinkedHashMap__V;
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows = new java_util_LinkedHashMap_LinkedHashMap__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(39, 170, {39:1}, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_LayoutConstraints$GridLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V);
_.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2 = function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2(){
  return 1;
}
;
_.package_private$lv_lumii_layoutengine_LayoutConstraints$transpose__Ljava_awt_geom_Point2D$Double_2V = function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_transpose__Ljava_awt_geom_Point2D$Double_2V(moveVector){
  var line, line$iterator, line$iterator0;
  for (line$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints); line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_last = line$iterator0.java_util_AbstractList$IteratorImpl_i++), 27));
    line.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos += moveVector.java_awt_geom_Point2D$Double_y;
  }
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 27));
    line.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos += moveVector.java_awt_geom_Point2D$Double_x;
  }
}
;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultColumnMinWidth = 10;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultColumnSpacing = 0;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultRowMinHeight = 10;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_defaultRowSpacing = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LayoutConstraints$GridLayoutConstraints_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LayoutConstraints/GridLayoutConstraints', 39);
function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_$compareTo__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_2Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_2I(this$static, x_0){
  var cmp;
  cmp = java_lang_Double_compare__DDI(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_pos, x_0.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_pos);
  return cmp == 0?java_lang_Integer_compare__III(this$static.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_lane, x_0.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_lane):cmp;
}

function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV(pos, lane, constant, left, right){
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_pos = pos;
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_lane = lane;
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_constant = constant;
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_left = left;
  this.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_right = right;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(54, 1, {29:1, 54:1}, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_compareTo__Ljava_lang_Object_2I(x_0){
  return lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_$compareTo__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_2Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(x_0, 54));
}
;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_constant = false;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_lane = 0;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_left = 0;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_pos = 0;
_.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_right = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LayoutConstraints$GridLayoutConstraints$LaneElement_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LayoutConstraints/GridLayoutConstraints/LaneElement', 54);
function lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container){
  lv_lumii_layoutengine_LayoutConstraints_LayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V.call(this, container);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(52, 170, {}, lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V);
_.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2 = function lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2(){
  return 0;
}
;
_.package_private$lv_lumii_layoutengine_LayoutConstraints$transpose__Ljava_awt_geom_Point2D$Double_2V = function lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_transpose__Ljava_awt_geom_Point2D$Double_2V(moveVector){
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LayoutConstraints$NoneLayoutConstraints_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LayoutConstraints/NoneLayoutConstraints', 52);
function lv_lumii_layoutengine_LayoutSplitter_$performSplit__Llv_lumii_layoutengine_LayoutSplitter_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_DiagramPart_2(this$static, container, parentStyle){
  var child, child$iterator, childPart, children, currentPart, style;
  children = lv_lumii_layoutengine_Container_$getContainers__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container);
  style = container.lv_lumii_layoutengine_Container_arrangeData.package_private$lv_lumii_layoutengine_ArrangeData$getStyle__Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2();
  style == (lv_lumii_layoutengine_ArrangeData$ArrangeStyle_$clinit__V() , lv_lumii_layoutengine_ArrangeData$ArrangeStyle_INHERITED) && (style = parentStyle);
  currentPart = new lv_lumii_layoutengine_DiagramPart_DiagramPart__Llv_lumii_layoutengine_Container_2V(container);
  for (child$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(children); child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    child = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(child$iterator.java_util_AbstractList$IteratorImpl_i < child$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(child$iterator.java_util_AbstractList$IteratorImpl_last = child$iterator.java_util_AbstractList$IteratorImpl_i++), 13));
    childPart = lv_lumii_layoutengine_LayoutSplitter_$performSplit__Llv_lumii_layoutengine_LayoutSplitter_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_ArrangeData$ArrangeStyle_2Llv_lumii_layoutengine_DiagramPart_2(this$static, child, style);
    !!childPart && (childPart.lv_lumii_layoutengine_DiagramPart_style != style || this$static.lv_lumii_layoutengine_LayoutSplitter_splitAll?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_LayoutSplitter_parts, childPart):(java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(currentPart.lv_lumii_layoutengine_DiagramPart_containers, childPart.lv_lumii_layoutengine_DiagramPart_containers) , java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(currentPart.lv_lumii_layoutengine_DiagramPart_children, childPart.lv_lumii_layoutengine_DiagramPart_children)));
  }
  currentPart.lv_lumii_layoutengine_DiagramPart_children.java_util_ArrayList_array.length == 0 && (currentPart = null);
  return currentPart;
}

function lv_lumii_layoutengine_LayoutSplitter_LayoutSplitter__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(222, 1, {}, lv_lumii_layoutengine_LayoutSplitter_LayoutSplitter__V);
_.lv_lumii_layoutengine_LayoutSplitter_splitAll = false;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LayoutSplitter_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LayoutSplitter', 222);
function lv_lumii_layoutengine_Line_$_1resetLabels__Llv_lumii_layoutengine_Line_2V(this$static){
  var first, label_0, label$iterator, labelList, lineLength, orthogonal, partLength, points, posLength, ratio, second, segmentIndex, segmentLength, x_0, y_0;
  points = this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  orthogonal = this$static.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL);
  labelList = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this$static.lv_lumii_layoutengine_Line_labels);
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(labelList, new lv_lumii_layoutengine_Line$LineLabelComparator_Line$LineLabelComparator__V);
  lineLength = lv_lumii_layoutengine_LineGeometry_$getLength__Llv_lumii_layoutengine_LineGeometry_2D(this$static.lv_lumii_layoutengine_Line_lineGeometry);
  partLength = 0;
  segmentIndex = -1;
  segmentLength = 0;
  first = null;
  second = null;
  for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(labelList); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
    posLength = lineLength * label_0.lv_lumii_layoutengine_OutsideLabel_position;
    while (segmentIndex < points.java_util_ArrayList_array.length - 2 && partLength + segmentLength <= posLength) {
      partLength += segmentLength;
      ++segmentIndex;
      first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex], 3));
      second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex + 1], 3));
      segmentLength = orthogonal?java_lang_Math_abs__DD(first.java_awt_geom_Point2D$Double_x - second.java_awt_geom_Point2D$Double_x) + java_lang_Math_abs__DD(first.java_awt_geom_Point2D$Double_y - second.java_awt_geom_Point2D$Double_y):java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(first, second);
    }
    label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = segmentIndex;
    ratio = (posLength - partLength) / segmentLength;
    x_0 = first.java_awt_geom_Point2D$Double_x + ratio * (second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x);
    y_0 = first.java_awt_geom_Point2D$Double_y + ratio * (second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y);
    lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, y_0));
  }
}

function lv_lumii_layoutengine_Line_$createLabel__Llv_lumii_layoutengine_Line_2DDDLlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLlv_lumii_layoutengine_OutsideLabel$LineLabel_2(this$static, width_0, height, position, orientation){
  var first, point, ratio, second, segmentIndex, segmentPoint, lv_lumii_layoutengine_Line_$createLabel__Llv_lumii_layoutengine_Line_2DDLjava_awt_geom_Point2D$Double_2DILlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLlv_lumii_layoutengine_OutsideLabel$LineLabel_2_label_0;
  if (position < 0 || position > 1) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Line label position should be between 0 and 1, inclusive.');
  }
  segmentPoint = lv_lumii_layoutengine_GeometryHelper_findSegmentAndPoint__DLlv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_util_Pair_2(position, this$static);
  segmentIndex = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentPoint.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
  ratio = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentPoint.lv_lumii_layoutengine_util_Pair_second, 11).java_lang_Double_value;
  first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, segmentIndex), 3);
  second = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, segmentIndex + 1), 3);
  point = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(first.java_awt_geom_Point2D$Double_x + ratio * (second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x), first.java_awt_geom_Point2D$Double_y + ratio * (second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y));
  return lv_lumii_layoutengine_Line_$createLabel__Llv_lumii_layoutengine_Line_2DDLjava_awt_geom_Point2D$Double_2DILlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLlv_lumii_layoutengine_OutsideLabel$LineLabel_2_label_0 = new lv_lumii_layoutengine_OutsideLabel$LineLabel_OutsideLabel$LineLabel__Ljava_awt_geom_Point2D$Double_2IDLlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2DDLlv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(point, segmentIndex, position, orientation, width_0, height, this$static) , java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Line_labels, lv_lumii_layoutengine_Line_$createLabel__Llv_lumii_layoutengine_Line_2DDLjava_awt_geom_Point2D$Double_2DILlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLlv_lumii_layoutengine_OutsideLabel$LineLabel_2_label_0) , lv_lumii_layoutengine_Line_$createLabel__Llv_lumii_layoutengine_Line_2DDLjava_awt_geom_Point2D$Double_2DILlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DLlv_lumii_layoutengine_OutsideLabel$LineLabel_2_label_0;
}

function lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(this$static){
  if (this$static.lv_lumii_layoutengine_Line_endElement) {
    return this$static.lv_lumii_layoutengine_Line_endElement;
  }
   else {
    throw new java_lang_ClassCastException_ClassCastException__Ljava_lang_String_2V('End element is not an Element.');
  }
}

function lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(this$static){
  var point, point$iterator, points, q;
  if (!this$static.lv_lumii_layoutengine_Line_lineGeometry) {
    return null;
  }
  points = new java_util_ArrayList_ArrayList__V;
  for (point$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points); point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_last = point$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
    q = new java_awt_geom_Point2D$Double_Point2D$Double__V;
    java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(q, point.java_awt_geom_Point2D$Double_x, point.java_awt_geom_Point2D$Double_y);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(points.java_util_ArrayList_array, points.java_util_ArrayList_array.length, q);
  }
  return points;
}

function lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(this$static){
  if (this$static.lv_lumii_layoutengine_Line_startElement) {
    return this$static.lv_lumii_layoutengine_Line_startElement;
  }
   else {
    throw new java_lang_ClassCastException_ClassCastException__Ljava_lang_String_2V('Start element is not an Element.');
  }
}

function lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(this$static){
  var sides;
  sides = this$static.lv_lumii_layoutengine_Line_layoutEndSides & this$static.lv_lumii_layoutengine_Line_userEndSides;
  sides == 0 && (sides = this$static.lv_lumii_layoutengine_Line_userEndSides);
  return sides;
}

function lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(this$static){
  var sides;
  sides = this$static.lv_lumii_layoutengine_Line_layoutStartSides & this$static.lv_lumii_layoutengine_Line_userStartSides;
  sides == 0 && (sides = this$static.lv_lumii_layoutengine_Line_userStartSides);
  return sides;
}

function lv_lumii_layoutengine_Line_$remove__Llv_lumii_layoutengine_Line_2ZV(this$static){
  var line, line$iterator;
  if (!this$static.lv_lumii_layoutengine_Element_diagram) {
    return;
  }
  java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Line_startElement.lv_lumii_layoutengine_Box_incidentLines, this$static);
  java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Line_endElement.lv_lumii_layoutengine_Box_incidentLines, this$static);
  for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_layoutengine_Line_incidentLines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
    lv_lumii_layoutengine_Line_$remove__Llv_lumii_layoutengine_Line_2ZV(line);
  }
  lv_lumii_layoutengine_Element_$remove__Llv_lumii_layoutengine_Element_2ZV(this$static);
}

function lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(this$static, type_0){
  if (!this$static.lv_lumii_layoutengine_Line_startElement || !this$static.lv_lumii_layoutengine_Line_endElement) {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
  }
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_LineGeometry_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(this$static.lv_lumii_layoutengine_Element_diagram, this$static.lv_lumii_layoutengine_Line_lineGeometry, this$static.lv_lumii_layoutengine_Line_startElement, this$static.lv_lumii_layoutengine_Line_endElement);
  lv_lumii_layoutengine_Diagram_$layoutTraceLine__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(this$static.lv_lumii_layoutengine_Element_diagram, this$static, type_0);
}

function lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2V(this$static, type_0, newStart, newEnd){
  if (!newStart || !newEnd) {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
  }
  if (newStart.lv_lumii_layoutengine_Element_diagram != newEnd.lv_lumii_layoutengine_Element_diagram) {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_64);
  }
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_LineGeometry_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(this$static.lv_lumii_layoutengine_Element_diagram, this$static.lv_lumii_layoutengine_Line_lineGeometry, newStart, newEnd);
  java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Line_startElement.lv_lumii_layoutengine_Box_incidentLines, this$static);
  java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Line_endElement.lv_lumii_layoutengine_Box_incidentLines, this$static);
  com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 13).package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(this$static);
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newStart.lv_lumii_layoutengine_Box_incidentLines, this$static);
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newEnd.lv_lumii_layoutengine_Box_incidentLines, this$static);
  lv_lumii_layoutengine_Element_$setOwner__Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2V(this$static, lv_lumii_layoutengine_Line_findOwner__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2(newStart, newEnd));
  this$static.lv_lumii_layoutengine_Line_startElement = newStart;
  this$static.lv_lumii_layoutengine_Line_endElement = newEnd;
  lv_lumii_layoutengine_Diagram_$layoutTraceLine__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(this$static.lv_lumii_layoutengine_Element_diagram, this$static, type_0);
}

function lv_lumii_layoutengine_Line_$setEndSides__Llv_lumii_layoutengine_Line_2IV(this$static, sides){
  if (sides == 0) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_65);
  }
  this$static.lv_lumii_layoutengine_Line_userEndSides = sides;
  try {
    (1 << lv_lumii_layoutengine_Box$BoxSide_findPointSide__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2(lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(this$static.lv_lumii_layoutengine_Line_lineGeometry), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2), 3), this$static.lv_lumii_layoutengine_Line_endElement).java_lang_Enum_ordinal & lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(this$static)) == 0 && lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2V(this$static, this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points);
  }
   catch ($e1) {
    $e1 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e1);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e1, 25)) {
      try {
        lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2V(this$static, this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points);
      }
       catch ($e0) {
        $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
        if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25))
          throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
      }
    }
     else 
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e1);
  }
}

function lv_lumii_layoutengine_Line_$setLayoutEndSides__Llv_lumii_layoutengine_Line_2IV(this$static, sides){
  this$static.lv_lumii_layoutengine_Line_layoutEndSides = sides;
}

function lv_lumii_layoutengine_Line_$setLayoutStartSides__Llv_lumii_layoutengine_Line_2IV(this$static, sides){
  this$static.lv_lumii_layoutengine_Line_layoutStartSides = sides;
}

function lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2V(this$static, points){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(this$static.lv_lumii_layoutengine_Element_diagram, this$static.lv_lumii_layoutengine_Line_startElement, this$static.lv_lumii_layoutengine_Line_endElement, (lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V() , lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS));
  lv_lumii_layoutengine_Diagram_$layoutSetLinePoints__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(this$static.lv_lumii_layoutengine_Element_diagram, this$static, this$static.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2(), points);
}

function lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2ZV(this$static, points, newStart, newEnd){
  if (!newStart || !newEnd) {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
  }
  if (newStart.lv_lumii_layoutengine_Element_diagram != newEnd.lv_lumii_layoutengine_Element_diagram) {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_64);
  }
  lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(this$static.lv_lumii_layoutengine_Element_diagram, newStart, newEnd, (lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V() , lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS));
  java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Line_startElement.lv_lumii_layoutengine_Box_incidentLines, this$static);
  java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Line_endElement.lv_lumii_layoutengine_Box_incidentLines, this$static);
  com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 13).package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(this$static);
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newStart.lv_lumii_layoutengine_Box_incidentLines, this$static);
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newEnd.lv_lumii_layoutengine_Box_incidentLines, this$static);
  lv_lumii_layoutengine_Element_$setOwner__Llv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_Element_2V(this$static, lv_lumii_layoutengine_Line_findOwner__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2(newStart, newEnd));
  this$static.lv_lumii_layoutengine_Line_startElement = newStart;
  this$static.lv_lumii_layoutengine_Line_endElement = newEnd;
  lv_lumii_layoutengine_Diagram_$layoutSetLinePoints__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(this$static.lv_lumii_layoutengine_Element_diagram, this$static, this$static.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2(), points);
}

function lv_lumii_layoutengine_Line_$setStartSides__Llv_lumii_layoutengine_Line_2IV(this$static, sides){
  if (sides == 0) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_65);
  }
  this$static.lv_lumii_layoutengine_Line_userStartSides = sides;
  try {
    (1 << lv_lumii_layoutengine_Box$BoxSide_findPointSide__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 1), 3), this$static.lv_lumii_layoutengine_Line_startElement).java_lang_Enum_ordinal & lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(this$static)) == 0 && lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2V(this$static, this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points);
  }
   catch ($e1) {
    $e1 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e1);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e1, 25)) {
      try {
        lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2V(this$static, this$static.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points);
      }
       catch ($e0) {
        $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
        if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25))
          throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
      }
    }
     else 
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e1);
  }
}

function lv_lumii_layoutengine_Line_$trace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(this$static, lineType){
  var a, b, tracer;
  if (!!this$static.lv_lumii_layoutengine_Line_startElement && !!this$static.lv_lumii_layoutengine_Line_endElement) {
    a = this$static.lv_lumii_layoutengine_Line_startElement;
    b = this$static.lv_lumii_layoutengine_Line_endElement;
    tracer = new lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(a, false), lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(b, false), lv_lumii_layoutengine_Box_$findLCABox__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2(a, b));
    lv_lumii_layoutengine_Line_$trace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Llv_lumii_layoutengine_Tracer_2V(this$static, lineType, tracer);
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_66);
  }
}

function lv_lumii_layoutengine_Line_$trace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Llv_lumii_layoutengine_Tracer_2V(this$static, lineType, tracer){
  switch (lineType.java_lang_Enum_ordinal) {
    case 0:
      this$static.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2V(this$static.lv_lumii_layoutengine_Line_startElement, this$static.lv_lumii_layoutengine_Line_endElement);
      lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(this$static);
      break;
    case 1:
      this$static.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Tracer_2IIV(this$static.lv_lumii_layoutengine_Line_startElement, this$static.lv_lumii_layoutengine_Line_endElement, tracer, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(this$static), lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(this$static));
      lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$findEndSides__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Line_lineGeometry, 74), this$static.lv_lumii_layoutengine_Line_startElement, this$static.lv_lumii_layoutengine_Line_endElement);
      break;
    case 2:
      this$static.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2IIDV(this$static.lv_lumii_layoutengine_Line_startElement, this$static.lv_lumii_layoutengine_Line_endElement, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(this$static), lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(this$static), this$static.lv_lumii_layoutengine_Element_spacing);
      this$static.lv_lumii_layoutengine_Line_startElement != this$static.lv_lumii_layoutengine_Line_endElement && lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(this$static);
  }
}

function lv_lumii_layoutengine_Line_Line__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2DV(startElement, endElement, owner){
  lv_lumii_layoutengine_Element_Element__Llv_lumii_layoutengine_Element_2DV.call(this, owner, 5);
  this.lv_lumii_layoutengine_Line_lineGeometry = null;
  this.lv_lumii_layoutengine_Line_startElement = startElement;
  this.lv_lumii_layoutengine_Line_endElement = endElement;
  this.lv_lumii_layoutengine_Line_userStartSides = this.lv_lumii_layoutengine_Line_userEndSides = 15;
  this.lv_lumii_layoutengine_Line_layoutStartSides = this.lv_lumii_layoutengine_Line_layoutEndSides = 15;
  this.lv_lumii_layoutengine_Line_incidentLines = new java_util_LinkedHashSet_LinkedHashSet__V;
  this.lv_lumii_layoutengine_Line_labels = new java_util_LinkedHashSet_LinkedHashSet__V;
}

function lv_lumii_layoutengine_Line_findOwner__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2(startElement, endElement){
  var owner;
  if (!!startElement && !!endElement) {
    owner = lv_lumii_layoutengine_Container_$findLCA__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2(startElement, endElement);
    owner == startElement?(owner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(startElement.lv_lumii_layoutengine_Element_owner, 13)):owner == endElement && (owner = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endElement.lv_lumii_layoutengine_Element_owner, 13));
    return owner;
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Lines not connected to boxes are not suported yet');
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(10, 57, {57:1, 10:1}, lv_lumii_layoutengine_Line_Line__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Container_2DV);
_.package_private$lv_lumii_layoutengine_Element$getChildren__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_Line_getChildren__Ljava_util_ArrayList_2(){
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_Line_labels);
}
;
_.getIncidentLines__Ljava_util_ArrayList_2 = function lv_lumii_layoutengine_Line_getIncidentLines__Ljava_util_ArrayList_2(){
  return new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_Line_incidentLines);
}
;
_.getOwner__Llv_lumii_layoutengine_Element_2 = function lv_lumii_layoutengine_Line_getOwner__Llv_lumii_layoutengine_Element_2(){
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_Element_owner, 13);
}
;
_.package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V = function lv_lumii_layoutengine_Line_removeChild__Llv_lumii_layoutengine_Element_2V(element){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 28)) {
    java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Line_labels, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element, 28));
  }
   else {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Line can only have children that are labels.');
  }
}
;
_.lv_lumii_layoutengine_Line_layoutEndSides = 0;
_.lv_lumii_layoutengine_Line_layoutStartSides = 0;
_.lv_lumii_layoutengine_Line_userEndSides = 0;
_.lv_lumii_layoutengine_Line_userStartSides = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Line_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Line', 10);
function lv_lumii_layoutengine_Line$LineLabelComparator_$compare__Llv_lumii_layoutengine_Line$LineLabelComparator_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2I(label1, label2){
  return java_lang_Double_compare__DDI(label1.lv_lumii_layoutengine_OutsideLabel_position, label2.lv_lumii_layoutengine_OutsideLabel_position);
}

function lv_lumii_layoutengine_Line$LineLabelComparator_Line$LineLabelComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(208, 1, {}, lv_lumii_layoutengine_Line$LineLabelComparator_Line$LineLabelComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_Line$LineLabelComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(label1, label2){
  return lv_lumii_layoutengine_Line$LineLabelComparator_$compare__Llv_lumii_layoutengine_Line$LineLabelComparator_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label1, 28), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label2, 28));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Line$LineLabelComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Line/LineLabelComparator', 208);
function lv_lumii_layoutengine_Line$LineType_$clinit__V(){
  lv_lumii_layoutengine_Line$LineType_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_Line$LineType_STRAIGHT = new lv_lumii_layoutengine_Line$LineType_Line$LineType__Ljava_lang_String_2IV('STRAIGHT', 0);
  lv_lumii_layoutengine_Line$LineType_ORTHOGONAL = new lv_lumii_layoutengine_Line$LineType_Line$LineType__Ljava_lang_String_2IV($intern_34, 1);
  lv_lumii_layoutengine_Line$LineType_POLYLINE = new lv_lumii_layoutengine_Line$LineType_Line$LineType__Ljava_lang_String_2IV('POLYLINE', 2);
  lv_lumii_layoutengine_Line$LineType_SPLINE = new lv_lumii_layoutengine_Line$LineType_Line$LineType__Ljava_lang_String_2IV('SPLINE', 3);
}

function lv_lumii_layoutengine_Line$LineType_Line$LineType__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_Line$LineType_values___3Llv_lumii_layoutengine_Line$LineType_2(){
  lv_lumii_layoutengine_Line$LineType_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Line$LineType_12_1classLit, 1), $intern_32, 77, 0, [lv_lumii_layoutengine_Line$LineType_STRAIGHT, lv_lumii_layoutengine_Line$LineType_ORTHOGONAL, lv_lumii_layoutengine_Line$LineType_POLYLINE, lv_lumii_layoutengine_Line$LineType_SPLINE]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(77, 36, {5:1, 29:1, 36:1, 77:1}, lv_lumii_layoutengine_Line$LineType_Line$LineType__Ljava_lang_String_2IV);
var lv_lumii_layoutengine_Line$LineType_ORTHOGONAL, lv_lumii_layoutengine_Line$LineType_POLYLINE, lv_lumii_layoutengine_Line$LineType_SPLINE, lv_lumii_layoutengine_Line$LineType_STRAIGHT;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Line$LineType_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'Line/LineType', 77, lv_lumii_layoutengine_Line$LineType_values___3Llv_lumii_layoutengine_Line$LineType_2);
function lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(this$static){
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 1), 3);
}

function lv_lumii_layoutengine_LineGeometry_$getLength__Llv_lumii_layoutengine_LineGeometry_2D(this$static){
  var i, length_0;
  length_0 = 0;
  for (i = 0; i + 1 < this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length; i++) {
    length_0 += lv_lumii_layoutengine_GeometryHelper_findDistance__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2D(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i + 1), 3));
  }
  return length_0;
}

function lv_lumii_layoutengine_LineGeometry_$isOrthogonal__Llv_lumii_layoutengine_LineGeometry_2Z(this$static){
  var i;
  for (i = 0; i + 1 < this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length; i++) {
    if (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i), 3).java_awt_geom_Point2D$Double_y != com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i + 1), 3).java_awt_geom_Point2D$Double_y && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i), 3).java_awt_geom_Point2D$Double_x != com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i + 1), 3).java_awt_geom_Point2D$Double_x) {
      if (java_lang_Math_abs__DD(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i), 3).java_awt_geom_Point2D$Double_y - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i + 1), 3).java_awt_geom_Point2D$Double_y) <= 5) {
        com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i + 1), 3).java_awt_geom_Point2D$Double_y = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i), 3).java_awt_geom_Point2D$Double_y;
      }
       else if (java_lang_Math_abs__DD(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i), 3).java_awt_geom_Point2D$Double_x - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i + 1), 3).java_awt_geom_Point2D$Double_x) <= 5) {
        com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i + 1), 3).java_awt_geom_Point2D$Double_x = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, i), 3).java_awt_geom_Point2D$Double_x;
      }
       else 
        return false;
    }
  }
  return true;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(299, 1, {});
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineGeometry_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineGeometry', 299);
function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$cullPoints__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2V(this$static){
  var it, left, mid, right;
  it = new java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(this$static.lv_lumii_layoutengine_LineGeometry_points, 0);
  while (it.java_util_AbstractList$IteratorImpl_i < this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2) {
    left = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    mid = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    right = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    if (left.java_awt_geom_Point2D$Double_x == mid.java_awt_geom_Point2D$Double_x && left.java_awt_geom_Point2D$Double_x == right.java_awt_geom_Point2D$Double_x || left.java_awt_geom_Point2D$Double_y == mid.java_awt_geom_Point2D$Double_y && left.java_awt_geom_Point2D$Double_y == right.java_awt_geom_Point2D$Double_y) {
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      it.remove__V();
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      it.java_util_AbstractList$IteratorImpl_i > 0 && (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0) , it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i));
    }
     else {
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
    }
  }
}

function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$findEndSides__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2V(this$static, startElement, endElement){
  this$static.lv_lumii_layoutengine_LineGeometry$OrthogonalLine_startSide = lv_lumii_layoutengine_Box$BoxSide_findPointSide__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, 0), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, 1), 3), startElement);
  this$static.lv_lumii_layoutengine_LineGeometry$OrthogonalLine_endSide = lv_lumii_layoutengine_Box$BoxSide_findPointSide__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 1), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2), 3), endElement);
}

function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$setPoints__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2Ljava_util_ArrayList_2V(this$static, points){
  if (points.java_util_ArrayList_array.length < 2) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_67);
  }
  this$static.lv_lumii_layoutengine_LineGeometry_points = points;
  if (!lv_lumii_layoutengine_LineGeometry_$isOrthogonal__Llv_lumii_layoutengine_LineGeometry_2Z(this$static)) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('The given line is not orthogonal.');
  }
}

function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2DV(startElement, endElement, spacing){
  var ai, ax, ay, b, bi, bx, by, dist, endIndex, endPoint, i, j, l, midPoint, newDist, r, startIndex, startPoint, t, x_0, xIndex, y_0, yIndex;
  if (!!startElement && !!endElement) {
    if (startElement == endElement) {
      this.lv_lumii_layoutengine_LineGeometry_points = lv_lumii_layoutengine_Tracer_connectOneBox__Llv_lumii_layoutengine_Box_2IIDLjava_util_ArrayList_2(startElement, 15, 15, spacing);
    }
     else {
      this.lv_lumii_layoutengine_LineGeometry_points = new java_util_ArrayList_ArrayList__V;
      l = java_lang_Math_max__DDD(startElement.lv_lumii_layoutengine_AbstractContainer_left, endElement.lv_lumii_layoutengine_AbstractContainer_left);
      r = java_lang_Math_min__DDD(startElement.lv_lumii_layoutengine_AbstractContainer_right, endElement.lv_lumii_layoutengine_AbstractContainer_right);
      t = java_lang_Math_max__DDD(startElement.lv_lumii_layoutengine_AbstractContainer_top, endElement.lv_lumii_layoutengine_AbstractContainer_top);
      b = java_lang_Math_min__DDD(startElement.lv_lumii_layoutengine_AbstractContainer_bottom, endElement.lv_lumii_layoutengine_AbstractContainer_bottom);
      if (l < r) {
        x_0 = (l + r) / 2;
        ay = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [startElement.lv_lumii_layoutengine_AbstractContainer_top, startElement.lv_lumii_layoutengine_AbstractContainer_bottom]);
        by = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [endElement.lv_lumii_layoutengine_AbstractContainer_top, endElement.lv_lumii_layoutengine_AbstractContainer_bottom]);
        ai = 0;
        bi = 0;
        dist = $intern_53;
        for (i = 0; i < 2; i++) {
          for (j = 0; j < 2; j++) {
            newDist = java_lang_Math_abs__DD(ay[i] - by[j]);
            if (newDist < dist) {
              dist = newDist;
              ai = i;
              bi = j;
            }
          }
        }
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, ay[ai]));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, by[bi]));
      }
       else if (t < b) {
        y_0 = (t + b) / 2;
        ax = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [startElement.lv_lumii_layoutengine_AbstractContainer_left, startElement.lv_lumii_layoutengine_AbstractContainer_right]);
        bx = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [endElement.lv_lumii_layoutengine_AbstractContainer_left, endElement.lv_lumii_layoutengine_AbstractContainer_right]);
        ai = 0;
        bi = 0;
        dist = $intern_53;
        for (i = 0; i < 2; i++) {
          for (j = 0; j < 2; j++) {
            newDist = java_lang_Math_abs__DD(ax[i] - bx[j]);
            if (newDist < dist) {
              dist = newDist;
              ai = i;
              bi = j;
            }
          }
        }
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(ax[ai], y_0));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(bx[bi], y_0));
      }
       else {
        xIndex = java_lang_Math_abs__DD(startElement.lv_lumii_layoutengine_AbstractContainer_left - endElement.lv_lumii_layoutengine_AbstractContainer_left) < java_lang_Math_abs__DD(startElement.lv_lumii_layoutengine_AbstractContainer_right - endElement.lv_lumii_layoutengine_AbstractContainer_left)?3:1;
        yIndex = java_lang_Math_abs__DD(startElement.lv_lumii_layoutengine_AbstractContainer_top - endElement.lv_lumii_layoutengine_AbstractContainer_top) < java_lang_Math_abs__DD(startElement.lv_lumii_layoutengine_AbstractContainer_bottom - endElement.lv_lumii_layoutengine_AbstractContainer_top)?0:2;
        startIndex = (xIndex + 1) % 4 == yIndex?xIndex:yIndex;
        endIndex = (startIndex + 3) % 4;
        startPoint = lv_lumii_layoutengine_GeometryHelper_findSideMidPoint__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2Ljava_awt_geom_Point2D$Double_2(startElement, (lv_lumii_layoutengine_Box$BoxSide_$clinit__V() , com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box$BoxSide_12_1classLit, 1), $intern_32, 73, 0, [lv_lumii_layoutengine_Box$BoxSide_TOP, lv_lumii_layoutengine_Box$BoxSide_RIGHT, lv_lumii_layoutengine_Box$BoxSide_BOTTOM, lv_lumii_layoutengine_Box$BoxSide_LEFT]))[startIndex]);
        endPoint = lv_lumii_layoutengine_GeometryHelper_findSideMidPoint__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2Ljava_awt_geom_Point2D$Double_2(endElement, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box$BoxSide_12_1classLit, 1), $intern_32, 73, 0, [lv_lumii_layoutengine_Box$BoxSide_TOP, lv_lumii_layoutengine_Box$BoxSide_RIGHT, lv_lumii_layoutengine_Box$BoxSide_BOTTOM, lv_lumii_layoutengine_Box$BoxSide_LEFT])[endIndex]);
        midPoint = startIndex % 2 == 0?new java_awt_geom_Point2D$Double_Point2D$Double__DDV(startPoint.java_awt_geom_Point2D$Double_x, endPoint.java_awt_geom_Point2D$Double_y):new java_awt_geom_Point2D$Double_Point2D$Double__DDV(endPoint.java_awt_geom_Point2D$Double_x, startPoint.java_awt_geom_Point2D$Double_y);
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, startPoint);
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, midPoint);
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, endPoint);
      }
    }
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_66);
  }
}

function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(startElement, endElement, points){
  if (!!startElement && !!endElement) {
    lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$setPoints__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2Ljava_util_ArrayList_2V(this, points);
    lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$cullPoints__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2V(this);
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_66);
  }
}

function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Tracer_2IIV(startElement, endElement, tracer, startSides, endSides){
  if (!!startElement && !!endElement) {
    this.lv_lumii_layoutengine_LineGeometry_points = lv_lumii_layoutengine_Tracer_$trace__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2IILjava_util_ArrayList_2(tracer, startElement, endElement, startSides, endSides);
    lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$cullPoints__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2V(this);
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_66);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(74, 299, {74:1}, lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2DV, lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V, lv_lumii_layoutengine_LineGeometry$OrthogonalLine_LineGeometry$OrthogonalLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Tracer_2IIV);
_.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V = function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_cullPoints__V(){
  lv_lumii_layoutengine_LineGeometry$OrthogonalLine_$cullPoints__Llv_lumii_layoutengine_LineGeometry$OrthogonalLine_2V(this);
}
;
_.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__Ljava_util_Collection_2V = function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_cullPoints__Ljava_util_Collection_2V(labels){
  var i, indexMap, it, j, label_0, label$iterator, left, mid, oldPoints, right;
  indexMap = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 1, 7, 1);
  oldPoints = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_LineGeometry_points);
  it = new java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(this.lv_lumii_layoutengine_LineGeometry_points, 0);
  while (it.java_util_AbstractList$IteratorImpl_i < this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2) {
    left = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    mid = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    right = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    if (left.java_awt_geom_Point2D$Double_x == mid.java_awt_geom_Point2D$Double_x && left.java_awt_geom_Point2D$Double_x == right.java_awt_geom_Point2D$Double_x || left.java_awt_geom_Point2D$Double_y == mid.java_awt_geom_Point2D$Double_y && left.java_awt_geom_Point2D$Double_y == right.java_awt_geom_Point2D$Double_y) {
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      it.remove__V();
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      it.java_util_AbstractList$IteratorImpl_i > 0 && (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0) , it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i));
    }
     else {
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
    }
  }
  i = 0;
  for (j = 0; j + 1 < this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length; j++) {
    do {
      indexMap[i++] = j;
    }
     while (!java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)), java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_LineGeometry_points, j + 1)));
  }
  while (i + 1 < oldPoints.java_util_ArrayList_array.length) {
    indexMap[i++] = this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2;
  }
  for (label$iterator = labels.iterator__Ljava_util_Iterator_2(); label$iterator.hasNext__Z();) {
    label_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.next__Ljava_lang_Object_2(), 28);
    label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = indexMap[label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex];
  }
}
;
_.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2 = function lv_lumii_layoutengine_LineGeometry$OrthogonalLine_getType__Llv_lumii_layoutengine_Line$LineType_2(){
  return lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineGeometry$OrthogonalLine_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineGeometry/OrthogonalLine', 74);
function lv_lumii_layoutengine_LineGeometry$Polyline_$cullPoints__Llv_lumii_layoutengine_LineGeometry$Polyline_2V(this$static){
  var crossProduct, firstLen, it, left, mid, right, secondLen, sin_0;
  it = new java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(this$static.lv_lumii_layoutengine_LineGeometry_points, 0);
  while (it.java_util_AbstractList$IteratorImpl_i < this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2) {
    left = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    mid = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    right = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
    firstLen = java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(left, mid);
    secondLen = java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(mid, right);
    crossProduct = (right.java_awt_geom_Point2D$Double_x - left.java_awt_geom_Point2D$Double_x) * (mid.java_awt_geom_Point2D$Double_y - left.java_awt_geom_Point2D$Double_y) - (right.java_awt_geom_Point2D$Double_y - left.java_awt_geom_Point2D$Double_y) * (mid.java_awt_geom_Point2D$Double_x - left.java_awt_geom_Point2D$Double_x);
    sin_0 = crossProduct / (firstLen * secondLen) <= 0?0 - crossProduct / (firstLen * secondLen):crossProduct / (firstLen * secondLen);
    if (sin_0 < 0.1) {
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      it.remove__V();
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      it.java_util_AbstractList$IteratorImpl_i > 0 && (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0) , it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i));
    }
     else {
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
      com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i > 0);
      it.java_util_AbstractList$ListIteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = --it.java_util_AbstractList$IteratorImpl_i);
    }
  }
}

function lv_lumii_layoutengine_LineGeometry$Polyline_$setPoints__Llv_lumii_layoutengine_LineGeometry$Polyline_2Ljava_util_ArrayList_2V(this$static, points){
  if (points.java_util_ArrayList_array.length < 2) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_67);
  }
  this$static.lv_lumii_layoutengine_LineGeometry_points = points;
}

function lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2IIDV(startElement, endElement, startSides, endSides, spacing){
  if (!!startElement && !!endElement) {
    if (startElement != endElement) {
      this.lv_lumii_layoutengine_LineGeometry_points = new java_util_ArrayList_ArrayList__V;
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((startElement.lv_lumii_layoutengine_AbstractContainer_left + startElement.lv_lumii_layoutengine_AbstractContainer_right) / 2, (startElement.lv_lumii_layoutengine_AbstractContainer_top + startElement.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((endElement.lv_lumii_layoutengine_AbstractContainer_left + endElement.lv_lumii_layoutengine_AbstractContainer_right) / 2, (endElement.lv_lumii_layoutengine_AbstractContainer_top + endElement.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
    }
     else {
      this.lv_lumii_layoutengine_LineGeometry_points = lv_lumii_layoutengine_Tracer_connectOneBox__Llv_lumii_layoutengine_Box_2IIDLjava_util_ArrayList_2(startElement, startSides, endSides, spacing);
    }
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldStartPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldSecondPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_LineGeometry_points, 1), 3);
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldPenultimatePoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_LineGeometry_points, this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2), 3);
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldEndPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_LineGeometry_points, this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 1), 3);
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_68);
  }
}

function lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(startElement, endElement, points){
  if (!!startElement && !!endElement) {
    lv_lumii_layoutengine_LineGeometry$Polyline_$setPoints__Llv_lumii_layoutengine_LineGeometry$Polyline_2Ljava_util_ArrayList_2V(this, points);
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldStartPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldSecondPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[1], 3));
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldPenultimatePoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 2), 3);
    this.lv_lumii_layoutengine_LineGeometry$Polyline_oldEndPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3);
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_68);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(88, 299, {88:1}, lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2IIDV, lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V);
_.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V = function lv_lumii_layoutengine_LineGeometry$Polyline_cullPoints__V(){
  lv_lumii_layoutengine_LineGeometry$Polyline_$cullPoints__Llv_lumii_layoutengine_LineGeometry$Polyline_2V(this);
}
;
_.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__Ljava_util_Collection_2V = function lv_lumii_layoutengine_LineGeometry$Polyline_cullPoints__Ljava_util_Collection_2V(labels){
  var i, indexMap, j, label_0, label$iterator, oldPoints;
  indexMap = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 1, 7, 1);
  oldPoints = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_LineGeometry_points);
  lv_lumii_layoutengine_LineGeometry$Polyline_$cullPoints__Llv_lumii_layoutengine_LineGeometry$Polyline_2V(this);
  i = 0;
  for (j = 0; j + 1 < this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length; j++) {
    do {
      indexMap[i++] = j;
    }
     while (!java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)), java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_LineGeometry_points, j + 1)));
  }
  while (i + 1 < oldPoints.java_util_ArrayList_array.length) {
    indexMap[i++] = this.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2;
  }
  for (label$iterator = labels.iterator__Ljava_util_Iterator_2(); label$iterator.hasNext__Z();) {
    label_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.next__Ljava_lang_Object_2(), 28);
    label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = indexMap[label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex];
  }
}
;
_.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2 = function lv_lumii_layoutengine_LineGeometry$Polyline_getType__Llv_lumii_layoutengine_Line$LineType_2(){
  return lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_POLYLINE;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineGeometry$Polyline_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineGeometry/Polyline', 88);
function lv_lumii_layoutengine_LineGeometry$StraightLine_$cullPoints__Llv_lumii_layoutengine_LineGeometry$StraightLine_2V(this$static){
  var newPoints;
  if (this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length > 2) {
    newPoints = new java_util_ArrayList_ArrayList__V;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newPoints, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, 0), 3));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newPoints, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_LineGeometry_points, this$static.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 1), 3));
    this$static.lv_lumii_layoutengine_LineGeometry_points = newPoints;
  }
}

function lv_lumii_layoutengine_LineGeometry$StraightLine_$setPoints__Llv_lumii_layoutengine_LineGeometry$StraightLine_2Ljava_util_ArrayList_2V(this$static, points){
  if (points.java_util_ArrayList_array.length < 2) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V($intern_67);
  }
  this$static.lv_lumii_layoutengine_LineGeometry_points = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_LineGeometry_points, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_LineGeometry_points, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3));
}

function lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2V(startElement, endElement){
  if (!!startElement && !!endElement) {
    this.lv_lumii_layoutengine_LineGeometry_points = new java_util_ArrayList_ArrayList__V;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((startElement.lv_lumii_layoutengine_AbstractContainer_left + startElement.lv_lumii_layoutengine_AbstractContainer_right) / 2, (startElement.lv_lumii_layoutengine_AbstractContainer_top + startElement.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_LineGeometry_points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((endElement.lv_lumii_layoutengine_AbstractContainer_left + endElement.lv_lumii_layoutengine_AbstractContainer_right) / 2, (endElement.lv_lumii_layoutengine_AbstractContainer_top + endElement.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_66);
  }
}

function lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V(startElement, endElement, points){
  if (!!startElement && !!endElement) {
    lv_lumii_layoutengine_LineGeometry$StraightLine_$setPoints__Llv_lumii_layoutengine_LineGeometry$StraightLine_2Ljava_util_ArrayList_2V(this, points);
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_66);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(140, 299, {}, lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2V, lv_lumii_layoutengine_LineGeometry$StraightLine_LineGeometry$StraightLine__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2Ljava_util_ArrayList_2V);
_.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V = function lv_lumii_layoutengine_LineGeometry$StraightLine_cullPoints__V(){
  lv_lumii_layoutengine_LineGeometry$StraightLine_$cullPoints__Llv_lumii_layoutengine_LineGeometry$StraightLine_2V(this);
}
;
_.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__Ljava_util_Collection_2V = function lv_lumii_layoutengine_LineGeometry$StraightLine_cullPoints__Ljava_util_Collection_2V(labels){
  var label_0, label$iterator;
  for (label$iterator = labels.iterator__Ljava_util_Iterator_2(); label$iterator.hasNext__Z();) {
    label_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.next__Ljava_lang_Object_2(), 28);
    label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = 0;
  }
  lv_lumii_layoutengine_LineGeometry$StraightLine_$cullPoints__Llv_lumii_layoutengine_LineGeometry$StraightLine_2V(this);
}
;
_.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2 = function lv_lumii_layoutengine_LineGeometry$StraightLine_getType__Llv_lumii_layoutengine_Line$LineType_2(){
  return lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_STRAIGHT;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineGeometry$StraightLine_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineGeometry/StraightLine', 140);
function lv_lumii_layoutengine_LineOptimizer_adjustLabelPlacement__Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(lines, oldPointsList){
  var best, center, curr, currPoint, epsilon, first, i, i0, i1, i2, i3, i4, i5, j, j0, j1, k, k0, label_0, label$iterator, label$iterator0, leftDif, line, match_0, newPoints, newString, next, oldPoints, oldString, p, parent_0, parentCol, partLen, prevPoint, ratio, rightDif, second, segmentLabels, segmentLenX, segmentLenY, segmentVertical, similarity, t, totalLen, value_0, xLen, yLen;
  for (t = 0; t < lines.java_util_ArrayList_array.length; t++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(t, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[t], 10));
    epsilon = line.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
    newPoints = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
    oldPoints = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(t, oldPointsList.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPointsList.java_util_ArrayList_array[t], 4));
    if (!oldPoints) {
      continue;
    }
    if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      oldString = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, oldPoints.java_util_ArrayList_array.length - 1, 7, 1);
      for (i0 = 0; i0 + 1 < oldPoints.java_util_ArrayList_array.length; i0++) {
        prevPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i0], 3));
        currPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0 + 1, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i0 + 1], 3));
        oldString[i0] = prevPoint.java_awt_geom_Point2D$Double_x < currPoint.java_awt_geom_Point2D$Double_x?1:prevPoint.java_awt_geom_Point2D$Double_x > currPoint.java_awt_geom_Point2D$Double_x?3:prevPoint.java_awt_geom_Point2D$Double_y < currPoint.java_awt_geom_Point2D$Double_y?2:0;
      }
      newString = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, newPoints.java_util_ArrayList_array.length - 1, 7, 1);
      for (i1 = 0; i1 + 1 < newPoints.java_util_ArrayList_array.length; i1++) {
        prevPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, newPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newPoints.java_util_ArrayList_array[i1], 3));
        currPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1 + 1, newPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newPoints.java_util_ArrayList_array[i1 + 1], 3));
        newString[i1] = prevPoint.java_awt_geom_Point2D$Double_x < currPoint.java_awt_geom_Point2D$Double_x?1:prevPoint.java_awt_geom_Point2D$Double_x > currPoint.java_awt_geom_Point2D$Double_x?3:prevPoint.java_awt_geom_Point2D$Double_y < currPoint.java_awt_geom_Point2D$Double_y?2:0;
      }
      similarity = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_J_1classLit, [$intern_14, $intern_45], [275, 0], 6, [oldString.length, newString.length], 2);
      for (i2 = 0; i2 < oldString.length; i2++) {
        for (j0 = 0; j0 < newString.length; j0++) {
          if (oldString[i2] % 2 == newString[j0] % 2) {
            leftDif = 10 < (i2 < j0?i2:j0)?10:i2 < j0?i2:j0;
            rightDif = java_lang_Math_min__III(10, java_lang_Math_min__III(oldString.length - i2 - 1, newString.length - j0 - 1));
            value_0 = {l:1, m:0, h:0};
            for (k = -leftDif; k <= rightDif; k++) {
              if (oldString[i2 + k] == newString[j0 + k]) {
                similarity[i2][j0] = com_google_gwt_lang_LongLib_add__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(similarity[i2][j0], value_0);
                value_0 = com_google_gwt_lang_LongLib_mul__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(value_0, {l:2, m:0, h:0});
              }
            }
          }
        }
      }
      parent_0 = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, [$intern_14, $intern_56], [14, 0], 7, [oldString.length, newString.length], 2);
      for (i3 = 1; i3 < oldString.length; i3++) {
        parentCol = 0;
        for (j0 = 0; j0 < newString.length; j0++) {
          com_google_gwt_lang_LongLib_gt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(similarity[i3 - 1][j0], similarity[i3 - 1][parentCol]) && (parentCol = j0);
          parent_0[i3][j0] = parentCol;
          similarity[i3][j0] = com_google_gwt_lang_LongLib_add__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(similarity[i3][j0], similarity[i3 - 1][parentCol]);
        }
      }
      match_0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, oldString.length, 7, 1);
      best = {l:0, m:0, h:0};
      for (j1 = 0; j1 < newString.length; j1++) {
        if (com_google_gwt_lang_LongLib_gt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Z(similarity[oldString.length - 1][j1], best)) {
          best = similarity[oldString.length - 1][j1];
          match_0[oldString.length - 1] = j1;
        }
      }
      for (i4 = oldString.length - 2; i4 >= 0; i4--) {
        match_0[i4] = parent_0[i4 + 1][match_0[i4 + 1]];
      }
      segmentLabels = new java_util_ArrayList_ArrayList__V;
      for (i5 = 0; i5 < oldString.length; i5++) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(segmentLabels, new java_util_ArrayList_ArrayList__V);
      }
      for (label$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels)); label$iterator0.java_util_AbstractList$IteratorImpl_i < label$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator0.java_util_AbstractList$IteratorImpl_i < label$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator0.java_util_AbstractList$IteratorImpl_last = label$iterator0.java_util_AbstractList$IteratorImpl_i++), 28));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(segmentLabels, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 4), label_0);
      }
      for (i = 0; i < oldString.length;) {
        j = i;
        p = match_0[i];
        while (j < oldString.length && p == match_0[j]) {
          for (label$iterator = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, segmentLabels.java_util_ArrayList_array.length) , new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentLabels.java_util_ArrayList_array[j], 4))); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
            label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
            label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = p;
          }
          ++j;
        }
        first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(p, newPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newPoints.java_util_ArrayList_array[p], 3));
        second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(p + 1, newPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newPoints.java_util_ArrayList_array[p + 1], 3));
        segmentVertical = first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x;
        segmentLenX = second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x;
        segmentLenY = second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y;
        if (i + 1 == j && !(segmentVertical == ((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_x == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i + 1], 3)).java_awt_geom_Point2D$Double_x) && java_lang_Math_abs__DD(segmentVertical?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y) < lv_lumii_layoutengine_LineOptimizer_SEGMENT_1MATCHING_1OFFSET * epsilon)) {
          xLen = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i + 1], 3)).java_awt_geom_Point2D$Double_x - (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_x;
          yLen = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i + 1], 3)).java_awt_geom_Point2D$Double_y - (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_y;
          for (label$iterator = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segmentLabels.java_util_ArrayList_array.length) , new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentLabels.java_util_ArrayList_array[i], 4))); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
            label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
            ratio = xLen == 0?((label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_y) / yLen:((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2 - (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[i], 3)).java_awt_geom_Point2D$Double_x) / xLen;
            lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(first.java_awt_geom_Point2D$Double_x + ratio * segmentLenX, first.java_awt_geom_Point2D$Double_y + ratio * segmentLenY));
          }
        }
         else {
          totalLen = 0;
          for (k0 = i; k0 < j; k0++) {
            totalLen += lv_lumii_layoutengine_GeometryHelper_findDistance__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2D((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[k0], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0 + 1, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[k0 + 1], 3)));
          }
          partLen = 0;
          for (k = i; k < j; k++) {
            for (label$iterator = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, segmentLabels.java_util_ArrayList_array.length) , new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentLabels.java_util_ArrayList_array[k], 4))); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
              label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
              center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
              if (segmentVertical && (center.java_awt_geom_Point2D$Double_y < java_lang_Math_min__DDD(first.java_awt_geom_Point2D$Double_y, second.java_awt_geom_Point2D$Double_y) || java_lang_Math_max__DDD(first.java_awt_geom_Point2D$Double_y, second.java_awt_geom_Point2D$Double_y) < center.java_awt_geom_Point2D$Double_y) || !segmentVertical && (center.java_awt_geom_Point2D$Double_x < java_lang_Math_min__DDD(first.java_awt_geom_Point2D$Double_x, second.java_awt_geom_Point2D$Double_x) || java_lang_Math_max__DDD(first.java_awt_geom_Point2D$Double_x, second.java_awt_geom_Point2D$Double_x) < center.java_awt_geom_Point2D$Double_x)) {
                curr = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[k], 3));
                next = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k + 1, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[k + 1], 3));
                ratio = (partLen + java_lang_Math_abs__DD(curr.java_awt_geom_Point2D$Double_x == next.java_awt_geom_Point2D$Double_x?center.java_awt_geom_Point2D$Double_y - curr.java_awt_geom_Point2D$Double_y:center.java_awt_geom_Point2D$Double_x - curr.java_awt_geom_Point2D$Double_x)) / totalLen;
                lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(first.java_awt_geom_Point2D$Double_x + ratio * segmentLenX, first.java_awt_geom_Point2D$Double_y + ratio * segmentLenY));
              }
            }
            partLen += lv_lumii_layoutengine_GeometryHelper_findDistance__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2D((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[k], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k + 1, oldPoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldPoints.java_util_ArrayList_array[k + 1], 3)));
          }
        }
        i = j;
      }
    }
     else {
      lv_lumii_layoutengine_LineOptimizer_adjustPolylineLabelPlacement__Llv_lumii_layoutengine_Line_2V(line);
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_adjustPolylineLabelPlacement__Llv_lumii_layoutengine_Line_2V(line){
  var center, corners, currDistance, currSegment, i, i0, label_0, label$iterator, lineLength, minDistance, next, partLengths, points, prev, segDist;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  partLengths = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, points.java_util_ArrayList_array.length, 7, 1);
  partLengths[0] = 0;
  prev = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3));
  for (i0 = 1; i0 < points.java_util_ArrayList_array.length; i0++) {
    next = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3));
    partLengths[i0] = java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(prev, next) + partLengths[i0 - 1];
    prev = next;
  }
  lineLength = partLengths[points.java_util_ArrayList_array.length - 1];
  for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels)); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
    center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    if (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_rotated) {
      label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = lv_lumii_layoutengine_GeometryHelper_findNearestSegment__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2I(center, line);
    }
     else {
      corners = lv_lumii_layoutengine_GeometryHelper_getChainPoints__Llv_lumii_layoutengine_AbstractContainer_2_3Ljava_awt_geom_Point2D$Double_2(label_0);
      minDistance = $intern_53;
      for (i = 0; i < 4; i++) {
        segDist = lv_lumii_layoutengine_GeometryHelper_findNearestSegmentAndDistance__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_util_Pair_2(corners[i], line);
        currSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segDist.lv_lumii_layoutengine_util_Pair_first, 9).java_lang_Integer_value;
        currDistance = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segDist.lv_lumii_layoutengine_util_Pair_second, 11).java_lang_Double_value;
        if (currDistance < minDistance) {
          minDistance = currDistance;
          label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = currSegment;
        }
      }
    }
    lv_lumii_layoutengine_GeometryHelper_movePointToLine__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Line_2IV(center, line, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex);
    label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition = (partLengths[label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex] + java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(center, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 67))) / lineLength;
    lv_lumii_layoutengine_GeometryHelper_placeLabelOnSegmentPoint__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(label_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3), center);
  }
}

function lv_lumii_layoutengine_LineOptimizer_arrangeLineEnds__Llv_lumii_layoutengine_Diagram_2V(diagram){
  var allSegments, boxSegments, endSegments, i, line, line$iterator, lineSegment, lineSegment$iterator, lineSegments, obstacleGraph, singleDimensionEndSegments, singleDimensionSegments, singleDimensionSegments$iterator, straightLines;
  lineSegments = lv_lumii_layoutengine_Normalizer_generateLineSegments__Llv_lumii_layoutengine_Diagram_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, null);
  boxSegments = lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(diagram, false);
  endSegments = new java_util_ArrayList_ArrayList__V;
  for (singleDimensionSegments$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineSegments); singleDimensionSegments$iterator.java_util_AbstractList$IteratorImpl_i < singleDimensionSegments$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    singleDimensionSegments = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(singleDimensionSegments$iterator.java_util_AbstractList$IteratorImpl_i < singleDimensionSegments$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(singleDimensionSegments$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(singleDimensionSegments$iterator.java_util_AbstractList$IteratorImpl_last = singleDimensionSegments$iterator.java_util_AbstractList$IteratorImpl_i++), 4));
    singleDimensionEndSegments = new java_util_ArrayList_ArrayList__V;
    for (lineSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(singleDimensionSegments); lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 20));
      (!lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev || !lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next) && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(singleDimensionEndSegments.java_util_ArrayList_array, singleDimensionEndSegments.java_util_ArrayList_array.length, lineSegment) , true);
    }
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(endSegments.java_util_ArrayList_array, endSegments.java_util_ArrayList_array.length, singleDimensionEndSegments);
  }
  for (i = 0; i < 2; i++) {
    allSegments = new java_util_ArrayList_ArrayList__V;
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(allSegments, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, boxSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxSegments.java_util_ArrayList_array[i], 30)));
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(allSegments, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, endSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endSegments.java_util_ArrayList_array[i], 30)));
    obstacleGraph = lv_lumii_layoutengine_obstacleGraph_ObstacleGraph_findObstacleGraph__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(allSegments);
    lv_lumii_layoutengine_LineOptimizer_arrangeOrthogonalLineEnds__Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, endSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endSegments.java_util_ArrayList_array[i], 4)), obstacleGraph);
    lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1 - i, endSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endSegments.java_util_ArrayList_array[1 - i], 4)));
  }
  straightLines = new java_util_ArrayList_ArrayList__V;
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length == 2 && (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_STRAIGHT) || line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == lv_lumii_layoutengine_Line$LineType_POLYLINE) && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(straightLines.java_util_ArrayList_array, straightLines.java_util_ArrayList_array.length, line) , true);
  }
  lv_lumii_layoutengine_LineOptimizer_arrangeStraightLineEnds__Ljava_util_ArrayList_2V(straightLines);
}

function lv_lumii_layoutengine_LineOptimizer_arrangeOrthogonalLineEnds__Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(lineSegments, obstacleGraph){
  var bundle, bundleCount, bundleGraph, bundleNumber, bundles, currSegment, epsilon, first, good, i, i0, j, len, lineSegment, lineSegment$iterator, lineSegment$iterator0, lineSegment$iterator1, lineSegment$iterator2, lineSegment$iterator3, lineSegment$iterator4, lineSegment$iterator5, lowerEnd, lowerLine, lowerSegment, lowerSegment$iterator, lowerSegments, lowerStart, maxMove, maxPos, minLen, moveDist, nextBundle, nextSegment, nextSegment$iterator, obstacle, obstacle$iterator, obstacle$iterator0, obstacle$iterator1, pos, queue, second, similar, spacing, upperEnd, upperLine, upperSegment, upperSegment$iterator, upperSegments, upperStart;
  upperSegments = new java_util_HashMap_HashMap__V;
  lowerSegments = new java_util_HashMap_HashMap__V;
  for (lineSegment$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineSegments); lineSegment$iterator0.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator0.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator0.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator0.java_util_AbstractList$IteratorImpl_i++), 20));
    upperSegments.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment, new java_util_ArrayList_ArrayList__V);
    lowerSegments.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment, new java_util_ArrayList_ArrayList__V);
  }
  for (obstacle$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(obstacleGraph); obstacle$iterator0.java_util_AbstractList$IteratorImpl_i < obstacle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    obstacle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(obstacle$iterator0.java_util_AbstractList$IteratorImpl_i < obstacle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(obstacle$iterator0.java_util_AbstractList$IteratorImpl_last = obstacle$iterator0.java_util_AbstractList$IteratorImpl_i++), 18));
    first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_first, 21);
    second = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_second, 21);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(first, 20)) {
      upperSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(first, 20);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lowerSegments.get__Ljava_lang_Object_2Ljava_lang_Object_2(upperSegment), 4), second);
    }
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(second, 20)) {
      lowerSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(second, 20);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(upperSegments.get__Ljava_lang_Object_2Ljava_lang_Object_2(lowerSegment), 4), first);
    }
  }
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(lineSegments, null);
  maxPos = new java_util_HashMap_HashMap__V;
  for (i0 = lineSegments.java_util_ArrayList_array.length - 1; i0 >= 0; i0--) {
    lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[i0], 20));
    pos = $intern_53;
    for (lowerSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lowerSegments.get__Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment), 4)); lowerSegment$iterator.java_util_AbstractList$IteratorImpl_i < lowerSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      lowerSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lowerSegment$iterator.java_util_AbstractList$IteratorImpl_i < lowerSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lowerSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lowerSegment$iterator.java_util_AbstractList$IteratorImpl_last = lowerSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 21));
      pos = java_lang_Math_min__DDD(pos, lowerSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos - lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2D(lineSegment, lowerSegment));
    }
    lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(lineSegment, pos);
    maxPos.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(pos)));
  }
  for (lineSegment$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineSegments); lineSegment$iterator1.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator1.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator1.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator1.java_util_AbstractList$IteratorImpl_i++), 20));
    pos = $intern_20;
    for (upperSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(upperSegments.get__Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment), 4)); upperSegment$iterator.java_util_AbstractList$IteratorImpl_i < upperSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      upperSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(upperSegment$iterator.java_util_AbstractList$IteratorImpl_i < upperSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(upperSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(upperSegment$iterator.java_util_AbstractList$IteratorImpl_last = upperSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 21));
      pos = java_lang_Math_max__DDD(pos, upperSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos + upperSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(lineSegment));
    }
    lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(lineSegment, pos);
  }
  similar = new java_util_ArrayList_ArrayList__V;
  for (obstacle$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(obstacleGraph); obstacle$iterator1.java_util_AbstractList$IteratorImpl_i < obstacle$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    obstacle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(obstacle$iterator1.java_util_AbstractList$IteratorImpl_i < obstacle$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(obstacle$iterator1.java_util_AbstractList$IteratorImpl_last = obstacle$iterator1.java_util_AbstractList$IteratorImpl_i++), 18));
    first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_first, 21);
    second = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_second, 21);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(first, 20) && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(second, 20)) {
      upperSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(first, 20);
      lowerSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(second, 20);
      upperLine = upperSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line;
      lowerLine = lowerSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line;
      if (upperLine.lv_lumii_layoutengine_Element_spacing == lowerLine.lv_lumii_layoutengine_Element_spacing) {
        upperStart = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(upperLine);
        upperEnd = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(upperLine);
        lowerStart = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(lowerLine);
        lowerEnd = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(lowerLine);
        good = false;
        upperSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint == com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(upperLine.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3) && (lowerStart == upperStart && lowerSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint == com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(lowerLine.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3)?(good = true):lowerEnd == upperStart && lowerSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint == lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(lowerLine.lv_lumii_layoutengine_Line_lineGeometry) && (good = true));
        upperSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint == lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(upperLine.lv_lumii_layoutengine_Line_lineGeometry) && (lowerStart == upperEnd && lowerSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint == com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(lowerLine.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3)?(good = true):lowerEnd == upperEnd && lowerSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint == lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(lowerLine.lv_lumii_layoutengine_Line_lineGeometry) && (good = true));
        good && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(similar, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(upperSegment, lowerSegment));
      }
    }
  }
  bundleGraph = new java_util_HashMap_HashMap__V;
  for (lineSegment$iterator2 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineSegments); lineSegment$iterator2.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator2.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator2.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator2.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator2.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator2.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator2.java_util_AbstractList$IteratorImpl_i++), 20));
    bundleGraph.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment, new java_util_ArrayList_ArrayList__V);
  }
  for (obstacle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(similar); obstacle$iterator.java_util_AbstractList$IteratorImpl_i < obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    obstacle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(obstacle$iterator.java_util_AbstractList$IteratorImpl_i < obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(obstacle$iterator.java_util_AbstractList$IteratorImpl_last = obstacle$iterator.java_util_AbstractList$IteratorImpl_i++), 18));
    first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_first, 20);
    second = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_second, 20);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundleGraph.get__Ljava_lang_Object_2Ljava_lang_Object_2(first), 4), second);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundleGraph.get__Ljava_lang_Object_2Ljava_lang_Object_2(second), 4), first);
  }
  bundleCount = 0;
  bundleNumber = new java_util_HashMap_HashMap__V;
  bundles = new java_util_ArrayList_ArrayList__V;
  maxMove = new java_util_ArrayList_ArrayList__V;
  for (lineSegment$iterator3 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineSegments); lineSegment$iterator3.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator3.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator3.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator3.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator3.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator3.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator3.java_util_AbstractList$IteratorImpl_i++), 20));
    if (!bundleNumber.containsKey__Ljava_lang_Object_2Z(lineSegment)) {
      queue = new java_util_LinkedList_LinkedList__V;
      spacing = lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_spacing;
      epsilon = lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, lineSegment, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
      bundleNumber.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment, java_lang_Integer_valueOf__ILjava_lang_Integer_2(bundleCount));
      moveDist = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(maxPos.get__Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment), 11).java_lang_Double_value - lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
      bundle = new java_util_ArrayList_ArrayList__V;
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(bundle.java_util_ArrayList_array, bundle.java_util_ArrayList_array.length, lineSegment);
      while (queue.java_util_LinkedList_size != 0) {
        currSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(queue.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next)), 20);
        for (nextSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundleGraph.get__Ljava_lang_Object_2Ljava_lang_Object_2(currSegment), 4)); nextSegment$iterator.java_util_AbstractList$IteratorImpl_i < nextSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          nextSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(nextSegment$iterator.java_util_AbstractList$IteratorImpl_i < nextSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nextSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(nextSegment$iterator.java_util_AbstractList$IteratorImpl_last = nextSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 20));
          if (!bundleNumber.containsKey__Ljava_lang_Object_2Z(nextSegment) && java_lang_Math_abs__DD(java_lang_Math_abs__DD(nextSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos - currSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) - 2 * spacing) < epsilon) {
            java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, nextSegment, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
            bundleNumber.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(nextSegment, java_lang_Integer_valueOf__ILjava_lang_Integer_2(bundleCount));
            moveDist = java_lang_Math_min__DDD(moveDist, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(maxPos.get__Ljava_lang_Object_2Ljava_lang_Object_2(nextSegment), 11).java_lang_Double_value - nextSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos);
            com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(bundle.java_util_ArrayList_array, bundle.java_util_ArrayList_array.length, nextSegment);
          }
        }
      }
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(maxMove, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(moveDist)));
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(bundles.java_util_ArrayList_array, bundles.java_util_ArrayList_array.length, bundle);
      ++bundleCount;
    }
  }
  for (i = 0; i < bundles.java_util_ArrayList_array.length; i++) {
    bundle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, bundles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundles.java_util_ArrayList_array[i], 4));
    nextBundle = -1;
    minLen = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, maxMove.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(maxMove.java_util_ArrayList_array[i], 11)).java_lang_Double_value;
    spacing = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, bundle.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundle.java_util_ArrayList_array[0], 20)).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_spacing;
    for (lineSegment$iterator4 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(bundle); lineSegment$iterator4.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator4.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator4.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator4.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator4.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator4.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator4.java_util_AbstractList$IteratorImpl_i++), 20));
      for (nextSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundleGraph.get__Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment), 4)); nextSegment$iterator.java_util_AbstractList$IteratorImpl_i < nextSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        nextSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(nextSegment$iterator.java_util_AbstractList$IteratorImpl_i < nextSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nextSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(nextSegment$iterator.java_util_AbstractList$IteratorImpl_last = nextSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 20));
        if (lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos < nextSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) {
          j = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundleNumber.get__Ljava_lang_Object_2Ljava_lang_Object_2(nextSegment), 9).java_lang_Integer_value;
          if (i != j) {
            len = nextSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos - lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos - 2 * spacing;
            if (len < minLen) {
              minLen = len;
              nextBundle = j;
            }
          }
        }
      }
    }
    if (nextBundle != -1) {
      for (lineSegment$iterator5 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(bundle); lineSegment$iterator5.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator5.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator5.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator5.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator5.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator5.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator5.java_util_AbstractList$IteratorImpl_i++), 20));
        lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(lineSegment, lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos + minLen);
      }
      if (nextBundle > i) {
        for (lineSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(bundle); lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 20));
          bundleNumber.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment, java_lang_Integer_valueOf__ILjava_lang_Integer_2(nextBundle));
        }
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(maxMove, nextBundle, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(java_lang_Math_min__DDD((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(nextBundle, maxMove.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(maxMove.java_util_ArrayList_array[nextBundle], 11)).java_lang_Double_value, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, maxMove.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(maxMove.java_util_ArrayList_array[i], 11)).java_lang_Double_value - minLen))));
        java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(nextBundle, bundles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundles.java_util_ArrayList_array[nextBundle], 4)), bundle);
      }
       else {
        for (lineSegment$iterator = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(nextBundle, bundles.java_util_ArrayList_array.length) , new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundles.java_util_ArrayList_array[nextBundle], 4))); lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 20));
          bundleNumber.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lineSegment, java_lang_Integer_valueOf__ILjava_lang_Integer_2(i));
        }
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(maxMove, i, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(java_lang_Math_min__DDD((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(nextBundle, maxMove.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(maxMove.java_util_ArrayList_array[nextBundle], 11)).java_lang_Double_value, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, maxMove.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(maxMove.java_util_ArrayList_array[i], 11)).java_lang_Double_value - minLen))));
        java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(bundle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(nextBundle, bundles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bundles.java_util_ArrayList_array[nextBundle], 30)));
        --i;
      }
    }
     else {
      for (lineSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(bundle); lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 20));
        lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(lineSegment, lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos + minLen / 2);
      }
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_arrangeStraightLineEnds__Ljava_util_ArrayList_2V(lines){
  var count, dist, end, endPoint, ex, ey, first, firstShift, firstSideEndPoints, firstStart, half, i, it, j, jt, k, k0, l, line, line$iterator, lowerDist, p, p0, pi, pj, ptmp, q, q0, q1, second, secondShift, secondSideEndPoints, secondStart, shift_0, slc, spacing, start_0, startPoint, sx, sy, tmp, upperDist;
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    lv_lumii_layoutengine_LineOptimizer_shiftCorner__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2IZV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3), lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line), true);
    lv_lumii_layoutengine_LineOptimizer_shiftCorner__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2IZV(lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line), false);
  }
  slc = new lv_lumii_layoutengine_LineOptimizer$StraightLineComparator_LineOptimizer$StraightLineComparator__V;
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(lines, slc);
  for (i = 0 , j = 0; i < lines.java_util_ArrayList_array.length; i = j) {
    while (j < lines.java_util_ArrayList_array.length && lv_lumii_layoutengine_LineOptimizer$StraightLineComparator_$compare__Llv_lumii_layoutengine_LineOptimizer$StraightLineComparator_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line_2I((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[j], 10))) == 0) {
      ++j;
    }
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10));
    start_0 = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
    end = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
    first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
    second = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry);
    sx = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [start_0.lv_lumii_layoutengine_AbstractContainer_left, start_0.lv_lumii_layoutengine_AbstractContainer_right, start_0.lv_lumii_layoutengine_AbstractContainer_right, start_0.lv_lumii_layoutengine_AbstractContainer_left]);
    sy = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [start_0.lv_lumii_layoutengine_AbstractContainer_top, start_0.lv_lumii_layoutengine_AbstractContainer_top, start_0.lv_lumii_layoutengine_AbstractContainer_bottom, start_0.lv_lumii_layoutengine_AbstractContainer_bottom]);
    it = 0;
    for (p0 = 0 , q0 = 1; p0 < 4; ++p0 , q0 = (q0 + 1) % 4) {
      (sx[p0] == sx[q0] && sx[q0] == first.java_awt_geom_Point2D$Double_x || sy[p0] == sy[q0] && sy[q0] == first.java_awt_geom_Point2D$Double_y) && (it = p0);
    }
    jt = (it + 1) % 4;
    firstSideEndPoints = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Point2D$Double_12_1classLit, 1), $intern_14, 3, 0, [new java_awt_geom_Point2D$Double_Point2D$Double__DDV(sx[it], sy[it]), new java_awt_geom_Point2D$Double_Point2D$Double__DDV(sx[jt], sy[jt])]);
    ex = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [end.lv_lumii_layoutengine_AbstractContainer_left, end.lv_lumii_layoutengine_AbstractContainer_right, end.lv_lumii_layoutengine_AbstractContainer_right, end.lv_lumii_layoutengine_AbstractContainer_left]);
    ey = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [end.lv_lumii_layoutengine_AbstractContainer_top, end.lv_lumii_layoutengine_AbstractContainer_top, end.lv_lumii_layoutengine_AbstractContainer_bottom, end.lv_lumii_layoutengine_AbstractContainer_bottom]);
    it = 0;
    for (p = 0 , q1 = 1; p < 4; ++p , q1 = (q1 + 1) % 4) {
      (ex[p] == ex[q1] && ex[q1] == second.java_awt_geom_Point2D$Double_x || ey[p] == ey[q1] && ey[q1] == second.java_awt_geom_Point2D$Double_y) && (it = p);
    }
    jt = (it + 1) % 4;
    secondSideEndPoints = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1awt_1geom_1Point2D$Double_12_1classLit, 1), $intern_14, 3, 0, [new java_awt_geom_Point2D$Double_Point2D$Double__DDV(ex[it], ey[it]), new java_awt_geom_Point2D$Double_Point2D$Double__DDV(ex[jt], ey[jt])]);
    if ((first.java_awt_geom_Point2D$Double_x < second.java_awt_geom_Point2D$Double_x?-1:first.java_awt_geom_Point2D$Double_x > second.java_awt_geom_Point2D$Double_x?1:first.java_awt_geom_Point2D$Double_y < second.java_awt_geom_Point2D$Double_y?-1:first.java_awt_geom_Point2D$Double_y > second.java_awt_geom_Point2D$Double_y?1:0) == 1) {
      tmp = first;
      first = second;
      second = tmp;
      ptmp = firstSideEndPoints;
      firstSideEndPoints = secondSideEndPoints;
      secondSideEndPoints = ptmp;
      start_0 = end;
    }
    l = new java_awt_geom_Line2D$Double_Line2D$Double__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2V(first, second);
    if (java_awt_geom_Line2D_$relativeCCW__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2I(l, firstSideEndPoints[0]) == -1) {
      tmp = firstSideEndPoints[0];
      firstSideEndPoints[0] = firstSideEndPoints[1];
      firstSideEndPoints[1] = tmp;
    }
    if (java_awt_geom_Line2D_$relativeCCW__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2I(l, secondSideEndPoints[0]) == -1) {
      tmp = secondSideEndPoints[0];
      secondSideEndPoints[0] = secondSideEndPoints[1];
      secondSideEndPoints[1] = tmp;
    }
    upperDist = java_lang_Math_min__DDD(java_awt_geom_Line2D_$ptLineDist__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2D(l, firstSideEndPoints[0]), java_awt_geom_Line2D_$ptLineDist__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2D(l, secondSideEndPoints[0]));
    lowerDist = java_lang_Math_min__DDD(java_awt_geom_Line2D_$ptLineDist__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2D(l, firstSideEndPoints[1]), java_awt_geom_Line2D_$ptLineDist__Ljava_awt_geom_Line2D_2Ljava_awt_geom_Point2D_2D(l, secondSideEndPoints[1]));
    spacing = 0;
    for (k0 = i; k0 < j; k0++) {
      spacing = java_lang_Math_max__DDD(spacing, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[k0], 10)).lv_lumii_layoutengine_Element_spacing);
    }
    count = j - i;
    dist = 2 * spacing < (upperDist + lowerDist) / (count + 1)?2 * spacing:(upperDist + lowerDist) / (count + 1);
    firstShift = lv_lumii_layoutengine_LineOptimizer_findShift__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DLjava_awt_geom_Point2D$Double_2(firstSideEndPoints[0], second, first, dist);
    secondShift = lv_lumii_layoutengine_LineOptimizer_findShift__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DLjava_awt_geom_Point2D$Double_2(secondSideEndPoints[0], first, second, dist);
    half = (count + 1) * dist / 2;
    shift_0 = -half;
    half > lowerDist?(shift_0 += half - lowerDist):half > upperDist && (shift_0 -= half - upperDist);
    q = shift_0 / dist;
    firstStart = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(first.java_awt_geom_Point2D$Double_x + q * firstShift.java_awt_geom_Point2D$Double_x, first.java_awt_geom_Point2D$Double_y + q * firstShift.java_awt_geom_Point2D$Double_y);
    secondStart = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(second.java_awt_geom_Point2D$Double_x + q * secondShift.java_awt_geom_Point2D$Double_x, second.java_awt_geom_Point2D$Double_y + q * secondShift.java_awt_geom_Point2D$Double_y);
    pi = i;
    pj = j - 1;
    while (pi < pj) {
      while (pi < j && java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pi, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[pi], 10)).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3), second)) {
        ++pi;
      }
      while (pj >= i && java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pj, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[pj], 10)).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3), first)) {
        --pj;
      }
      if (pi < pj) {
        tmp = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pi, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[pi], 10));
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(lines, pi, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pj, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[pj], 10)));
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(lines, pj, tmp);
        ++pi;
        --pj;
      }
    }
    for (k = i; k < j; k++) {
      firstStart.java_awt_geom_Point2D$Double_x += firstShift.java_awt_geom_Point2D$Double_x;
      firstStart.java_awt_geom_Point2D$Double_y += firstShift.java_awt_geom_Point2D$Double_y;
      secondStart.java_awt_geom_Point2D$Double_x += secondShift.java_awt_geom_Point2D$Double_x;
      secondStart.java_awt_geom_Point2D$Double_y += secondShift.java_awt_geom_Point2D$Double_y;
      startPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[k], 10)).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
      endPoint = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[k], 10)).lv_lumii_layoutengine_Line_lineGeometry);
      if (lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[k], 10))) == start_0) {
        java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(startPoint, firstStart.java_awt_geom_Point2D$Double_x, firstStart.java_awt_geom_Point2D$Double_y);
        java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(endPoint, secondStart.java_awt_geom_Point2D$Double_x, secondStart.java_awt_geom_Point2D$Double_y);
      }
       else {
        java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(startPoint, secondStart.java_awt_geom_Point2D$Double_x, secondStart.java_awt_geom_Point2D$Double_y);
        java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(endPoint, firstStart.java_awt_geom_Point2D$Double_x, firstStart.java_awt_geom_Point2D$Double_y);
      }
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_cleanupIntersections__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2V(lines, obstacleRectangles){
  var bottom, curr, first, firstBound, horizontalLineSegments, i, i0, j, line, next, points, pos, prev, secondBound, segment, top_0, vertical, verticalLineSegments;
  verticalLineSegments = new java_util_ArrayList_ArrayList__V;
  horizontalLineSegments = new java_util_ArrayList_ArrayList__V;
  first = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$LineSegment_12_1classLit, $intern_14, 55, lines.java_util_ArrayList_array.length, 0, 1);
  for (i0 = 0; i0 < lines.java_util_ArrayList_array.length; i0++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i0], 10));
    points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
    prev = null;
    for (j = 0; j + 1 < points.java_util_ArrayList_array.length; j++) {
      vertical = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)).java_awt_geom_Point2D$Double_x;
      if (vertical) {
        pos = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x;
        firstBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y;
        secondBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)).java_awt_geom_Point2D$Double_y;
      }
       else {
        pos = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y;
        firstBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x;
        secondBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)).java_awt_geom_Point2D$Double_x;
      }
      top_0 = firstBound < secondBound?firstBound:secondBound;
      bottom = firstBound > secondBound?firstBound:secondBound;
      segment = new lv_lumii_layoutengine_LineOptimizer$LineSegment_LineOptimizer$LineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(pos, top_0, bottom, line, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)));
      vertical?(com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(verticalLineSegments.java_util_ArrayList_array, verticalLineSegments.java_util_ArrayList_array.length, segment) , true):(com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(horizontalLineSegments.java_util_ArrayList_array, horizontalLineSegments.java_util_ArrayList_array.length, segment) , true);
      prev?(prev.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next = segment):(first[i0] = segment);
      prev = segment;
    }
  }
  lv_lumii_layoutengine_LineOptimizer_findInsideSegments__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2ZV(verticalLineSegments, obstacleRectangles, true);
  lv_lumii_layoutengine_LineOptimizer_findInsideSegments__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2ZV(horizontalLineSegments, obstacleRectangles, false);
  for (i = 0; i < lines.java_util_ArrayList_array.length; i++) {
    for (curr = first[i]; curr; curr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(curr.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next, 55)) {
      if (curr.lv_lumii_layoutengine_LineOptimizer$LineSegment_toFix) {
        next = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(curr.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next, 55);
        if (!!next && next.lv_lumii_layoutengine_LineOptimizer$LineSegment_toFix) {
          next.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x == next.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x?(next.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x = next.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x = curr.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x):(next.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y = next.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y = curr.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y);
          curr = next;
        }
      }
    }
    (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10)).lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__Ljava_util_Collection_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10)).lv_lumii_layoutengine_Line_labels);
  }
}

function lv_lumii_layoutengine_LineOptimizer_cleanupLines__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(lines, startCounts, endCounts, fixLabels){
  var i, obstacles;
  if (lines.java_util_ArrayList_array.length == 0) {
    return;
  }
  obstacles = lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Line_2ZLjava_util_LinkedHashSet_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[0], 10)), true);
  java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(obstacles, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[0], 10)).lv_lumii_layoutengine_Element_diagram);
  for (i = 0; i < 3; i++) {
    lv_lumii_layoutengine_LineOptimizer_joinSegments__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2ZV(lines, obstacles, true, startCounts, endCounts, fixLabels);
    lv_lumii_layoutengine_LineOptimizer_joinSegments__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2ZV(lines, obstacles, false, startCounts, endCounts, fixLabels);
  }
}

function lv_lumii_layoutengine_LineOptimizer_correctOrthogonalLines__Ljava_util_ArrayList_2V(lines){
  var bottom, center, epsilon, first, firstBound, firstPos, horizontalLineSegments, horizontalSegments, i, i0, j, label_0, label$iterator, label$iterator0, labelIndex, labelPos, labels, line, lineLabels, maxPos, minPos, newIndex, newPoints, oldIndex, pointIndex, points, pos, positiveDirection, prev, rectangles, secondBound, secondPos, segment, segment$iterator, segmentHorizontal, segmentLabels, top_0, vertical, verticalLineSegments, verticalSegments;
  if (lines.java_util_ArrayList_array.length == 0) {
    return;
  }
  rectangles = lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Line_2ZLjava_util_LinkedHashSet_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[0], 10)), false);
  lv_lumii_layoutengine_LineOptimizer_cleanupIntersections__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2V(lines, rectangles);
  verticalLineSegments = new java_util_ArrayList_ArrayList__V;
  horizontalLineSegments = new java_util_ArrayList_ArrayList__V;
  first = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$SplitSegment_12_1classLit, $intern_14, 101, lines.java_util_ArrayList_array.length, 0, 1);
  for (i0 = 0; i0 < lines.java_util_ArrayList_array.length; i0++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i0], 10));
    points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
    prev = null;
    for (j = 0; j + 1 < points.java_util_ArrayList_array.length; j++) {
      vertical = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)).java_awt_geom_Point2D$Double_x;
      if (vertical) {
        pos = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x;
        firstBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y;
        secondBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)).java_awt_geom_Point2D$Double_y;
      }
       else {
        pos = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_y;
        firstBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)).java_awt_geom_Point2D$Double_x;
        secondBound = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)).java_awt_geom_Point2D$Double_x;
      }
      top_0 = firstBound < secondBound?firstBound:secondBound;
      bottom = firstBound > secondBound?firstBound:secondBound;
      segment = new lv_lumii_layoutengine_LineOptimizer$SplitSegment_LineOptimizer$SplitSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(pos, top_0, bottom, line, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[j + 1], 3)));
      vertical?(com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(verticalLineSegments.java_util_ArrayList_array, verticalLineSegments.java_util_ArrayList_array.length, segment) , true):(com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(horizontalLineSegments.java_util_ArrayList_array, horizontalLineSegments.java_util_ArrayList_array.length, segment) , true);
      prev?(prev.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next = segment):(first[i0] = segment);
      prev = segment;
    }
  }
  epsilon = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[0], 10)).lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  verticalSegments = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(verticalSegments, verticalLineSegments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(verticalSegments, lv_lumii_layoutengine_LineOptimizer_findProlongedSegments__Ljava_util_LinkedHashSet_2ZDLjava_util_ArrayList_2(rectangles, true, epsilon));
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(verticalSegments, null);
  lv_lumii_layoutengine_LineOptimizer_splitSegments__Ljava_util_ArrayList_2ZZV(verticalSegments, true, true);
  lv_lumii_layoutengine_LineOptimizer_splitSegments__Ljava_util_ArrayList_2ZZV(verticalSegments, true, false);
  lv_lumii_layoutengine_LineOptimizer_mergeSegments__Ljava_util_ArrayList_2ZV(verticalLineSegments, false);
  for (segment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(horizontalLineSegments); segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_last = segment$iterator.java_util_AbstractList$IteratorImpl_i++), 101));
    lv_lumii_layoutengine_LineOptimizer$SplitSegment_$updateLength__Llv_lumii_layoutengine_LineOptimizer$SplitSegment_2V(segment);
  }
  horizontalSegments = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(horizontalSegments, horizontalLineSegments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(horizontalSegments, lv_lumii_layoutengine_LineOptimizer_findProlongedSegments__Ljava_util_LinkedHashSet_2ZDLjava_util_ArrayList_2(rectangles, false, epsilon));
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(horizontalSegments, null);
  lv_lumii_layoutengine_LineOptimizer_splitSegments__Ljava_util_ArrayList_2ZZV(horizontalSegments, false, true);
  lv_lumii_layoutengine_LineOptimizer_splitSegments__Ljava_util_ArrayList_2ZZV(horizontalSegments, false, false);
  lv_lumii_layoutengine_LineOptimizer_mergeSegments__Ljava_util_ArrayList_2ZV(horizontalLineSegments, true);
  for (i = 0; i < lines.java_util_ArrayList_array.length; i++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10));
    lineLabels = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels);
    segmentLabels = new java_util_ArrayList_ArrayList__V;
    for (j = 0; j + 1 < line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length; j++) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(segmentLabels, new java_util_ArrayList_ArrayList__V);
    }
    for (label$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineLabels); label$iterator0.java_util_AbstractList$IteratorImpl_i < label$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator0.java_util_AbstractList$IteratorImpl_i < label$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator0.java_util_AbstractList$IteratorImpl_last = label$iterator0.java_util_AbstractList$IteratorImpl_i++), 28));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(segmentLabels, label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 4), label_0);
    }
    newPoints = new java_util_ArrayList_ArrayList__V;
    oldIndex = 0;
    newIndex = 0;
    for (segment = first[i]; segment; segment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next, 101)) {
      points = segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_points;
      java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(newPoints, points);
      labels = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(oldIndex, segmentLabels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segmentLabels.java_util_ArrayList_array[oldIndex], 4));
      if (labels.java_util_ArrayList_array.length != 0) {
        segmentHorizontal = segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT;
        positiveDirection = segment.lv_lumii_layoutengine_obstacleGraph_Segment_start < segment.lv_lumii_layoutengine_obstacleGraph_Segment_end;
        java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(labels, new lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_LineOptimizer$LineLabelComparator__ZZV(segmentHorizontal, positiveDirection));
        minPos = positiveDirection?segment.lv_lumii_layoutengine_obstacleGraph_Segment_start:segment.lv_lumii_layoutengine_obstacleGraph_Segment_end;
        maxPos = positiveDirection?segment.lv_lumii_layoutengine_obstacleGraph_Segment_end:segment.lv_lumii_layoutengine_obstacleGraph_Segment_start;
        for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(labels); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 28));
          center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label_0.lv_lumii_layoutengine_AbstractContainer_left + label_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label_0.lv_lumii_layoutengine_AbstractContainer_top + label_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
          pos = segmentHorizontal?center.java_awt_geom_Point2D$Double_x:center.java_awt_geom_Point2D$Double_y;
          if (pos < minPos) {
            segmentHorizontal?(center.java_awt_geom_Point2D$Double_x = minPos):(center.java_awt_geom_Point2D$Double_y = minPos);
            lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, center);
          }
           else if (pos > maxPos) {
            segmentHorizontal?(center.java_awt_geom_Point2D$Double_x = maxPos):(center.java_awt_geom_Point2D$Double_y = maxPos);
            lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, center);
          }
        }
        labelIndex = 0;
        labelPos = segmentHorizontal?lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[0], 28))):lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[0], 28)));
        for (pointIndex = 0; pointIndex < points.java_util_ArrayList_array.length && labelIndex < labels.java_util_ArrayList_array.length; pointIndex += 2) {
          firstPos = segmentHorizontal?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pointIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pointIndex], 3)).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pointIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pointIndex], 3)).java_awt_geom_Point2D$Double_y;
          secondPos = segmentHorizontal?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pointIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pointIndex + 1], 3)).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(pointIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[pointIndex + 1], 3)).java_awt_geom_Point2D$Double_y;
          while (labelIndex < labels.java_util_ArrayList_array.length && (firstPos < secondPos?firstPos:secondPos) <= labelPos && labelPos <= (firstPos > secondPos?firstPos:secondPos)) {
            (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(labelIndex, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[labelIndex], 28)).lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = newIndex + pointIndex;
            ++labelIndex;
            labelIndex < labels.java_util_ArrayList_array.length && (labelPos = segmentHorizontal?lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(labelIndex, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[labelIndex], 28))):lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(labelIndex, labels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labels.java_util_ArrayList_array[labelIndex], 28))));
          }
        }
      }
      ++oldIndex;
      newIndex += segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_points.java_util_ArrayList_array.length;
    }
    line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points = newPoints;
    line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__Ljava_util_Collection_2V(lineLabels);
  }
}

function lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(line){
  var A, A$iterator, B, B$iterator, a, b, currDistance, cx, cy, distance, end, endPoint, endPoints, i, j, newPoints, start_0, startPoint, startPoints;
  a = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
  b = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
  newPoints = new java_util_ArrayList_ArrayList__V;
  if (a == b) {
    line.lv_lumii_layoutengine_Line_lineGeometry = new lv_lumii_layoutengine_LineGeometry$Polyline_LineGeometry$Polyline__Llv_lumii_layoutengine_Connectible_2Llv_lumii_layoutengine_Connectible_2IIDV(a, b, 15, 15, line.lv_lumii_layoutengine_Element_spacing);
    return;
  }
  start_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
  end = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry);
  if (java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(start_0, end)) {
    start_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((a.lv_lumii_layoutengine_AbstractContainer_left + a.lv_lumii_layoutengine_AbstractContainer_right) / 2, (a.lv_lumii_layoutengine_AbstractContainer_top + a.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    end = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2, (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  }
  startPoint = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(a, end, start_0, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line));
  endPoint = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(b, start_0, end, lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
  if (!startPoint || !endPoint) {
    startPoint = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(a, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2, (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2), new java_awt_geom_Point2D$Double_Point2D$Double__DDV((a.lv_lumii_layoutengine_AbstractContainer_left + a.lv_lumii_layoutengine_AbstractContainer_right) / 2, (a.lv_lumii_layoutengine_AbstractContainer_top + a.lv_lumii_layoutengine_AbstractContainer_bottom) / 2), lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line));
    endPoint = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(b, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((a.lv_lumii_layoutengine_AbstractContainer_left + a.lv_lumii_layoutengine_AbstractContainer_right) / 2, (a.lv_lumii_layoutengine_AbstractContainer_top + a.lv_lumii_layoutengine_AbstractContainer_bottom) / 2), new java_awt_geom_Point2D$Double_Point2D$Double__DDV((b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2, (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2), lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
  }
  if (!!startPoint && !!endPoint) {
    startPoint = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(a, endPoint, startPoint, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line));
    endPoint = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(b, startPoint, endPoint, lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
  }
   else {
    cx = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
    cy = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
    startPoints = new java_util_ArrayList_ArrayList__V;
    if (!startPoint) {
      cx[0] = cx[3] = a.lv_lumii_layoutengine_AbstractContainer_left;
      cx[1] = cx[2] = a.lv_lumii_layoutengine_AbstractContainer_right;
      cy[0] = cy[1] = a.lv_lumii_layoutengine_AbstractContainer_top;
      cy[2] = cy[3] = a.lv_lumii_layoutengine_AbstractContainer_bottom;
      for (i = 0; i < 4; i++) {
        if ((lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line) & 1 << i) != 0) {
          j = (i + 1) % 4;
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(startPoints, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((cx[i] + cx[j]) / 2, (cy[i] + cy[j]) / 2));
        }
      }
    }
     else {
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(startPoints.java_util_ArrayList_array, startPoints.java_util_ArrayList_array.length, startPoint);
    }
    endPoints = new java_util_ArrayList_ArrayList__V;
    if (!endPoint) {
      cx[0] = cx[3] = b.lv_lumii_layoutengine_AbstractContainer_left;
      cx[1] = cx[2] = b.lv_lumii_layoutengine_AbstractContainer_right;
      cy[0] = cy[1] = b.lv_lumii_layoutengine_AbstractContainer_top;
      cy[2] = cy[3] = b.lv_lumii_layoutengine_AbstractContainer_bottom;
      for (i = 0; i < 4; i++) {
        if ((lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line) & 1 << i) != 0) {
          j = (i + 1) % 4;
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(endPoints, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((cx[i] + cx[j]) / 2, (cy[i] + cy[j]) / 2));
        }
      }
    }
     else {
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(endPoints.java_util_ArrayList_array, endPoints.java_util_ArrayList_array.length, endPoint);
    }
    distance = $intern_53;
    for (A$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(startPoints); A$iterator.java_util_AbstractList$IteratorImpl_i < A$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      A = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(A$iterator.java_util_AbstractList$IteratorImpl_i < A$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(A$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(A$iterator.java_util_AbstractList$IteratorImpl_last = A$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
      for (B$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(endPoints); B$iterator.java_util_AbstractList$IteratorImpl_i < B$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        B = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(B$iterator.java_util_AbstractList$IteratorImpl_i < B$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(B$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(B$iterator.java_util_AbstractList$IteratorImpl_last = B$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
        currDistance = java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(A, B);
        if (currDistance < distance) {
          startPoint = A;
          endPoint = B;
          distance = currDistance;
        }
      }
    }
  }
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(newPoints.java_util_ArrayList_array, newPoints.java_util_ArrayList_array.length, startPoint);
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(newPoints.java_util_ArrayList_array, newPoints.java_util_ArrayList_array.length, endPoint);
  line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points = newPoints;
}

function lv_lumii_layoutengine_LineOptimizer_cutLine__Llv_lumii_layoutengine_Line_2V(line){
  var box, endBox, first, firstPoint, i, j, k, lca, linePoints, newPoint, secondPoint, startBox;
  startBox = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
  endBox = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
  if (startBox == endBox) {
    lv_lumii_layoutengine_LineOptimizer_cutOneBoxLine__Llv_lumii_layoutengine_Line_2V(line);
    return;
  }
  lca = lv_lumii_layoutengine_Box_$findLCABox__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2(startBox, endBox);
  for (k = 0; k < 2; k++) {
    first = k == 0;
    box = first?endBox:startBox;
    if (box == lca) {
      continue;
    }
    linePoints = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
    first || java_util_Collections_reverse__Ljava_util_List_2V(linePoints);
    for (i = 0 , j = 1; j < linePoints.java_util_ArrayList_array.length; ++i , j++) {
      firstPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, linePoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(linePoints.java_util_ArrayList_array[i], 3));
      secondPoint = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, linePoints.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(linePoints.java_util_ArrayList_array[j], 3));
      newPoint = lv_lumii_layoutengine_GeometryHelper_findIntersection__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2(box, firstPoint, secondPoint);
      if (newPoint) {
        linePoints = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(new java_util_AbstractList$SubList_AbstractList$SubList__Ljava_util_List_2IIV(linePoints, 0, j));
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(linePoints.java_util_ArrayList_array, linePoints.java_util_ArrayList_array.length, newPoint);
        break;
      }
    }
    first || java_util_Collections_reverse__Ljava_util_List_2V(linePoints);
    line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points = linePoints;
    line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V();
  }
}

function lv_lumii_layoutengine_LineOptimizer_cutOneBoxLine__Llv_lumii_layoutengine_Line_2V(line){
  var box, firstPoint, i, lastPoint, newPoints, points, tracer;
  box = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
  firstPoint = -1;
  lastPoint = -1;
  points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  for (i = 0; i < points.java_util_ArrayList_array.length; i++) {
    if (!lv_lumii_layoutengine_AbstractContainer_$contains__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2DZ(box, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 3)))) {
      firstPoint = i;
      while (i + 1 < points.java_util_ArrayList_array.length && !lv_lumii_layoutengine_GeometryHelper_findIntersection__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2(box, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i + 1], 3)))) {
        ++i;
      }
      lastPoint = i;
      break;
    }
  }
  newPoints = new java_util_ArrayList_ArrayList__V;
  if (firstPoint != -1) {
    firstPoint > 0 && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newPoints, lv_lumii_layoutengine_GeometryHelper_findIntersection__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2(box, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(firstPoint, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[firstPoint], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(firstPoint - 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[firstPoint - 1], 3))));
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(newPoints, new java_util_AbstractList$SubList_AbstractList$SubList__Ljava_util_List_2IIV(points, firstPoint, lastPoint + 1));
    lastPoint + 1 < points.java_util_ArrayList_array.length && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newPoints, lv_lumii_layoutengine_GeometryHelper_findIntersection__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2(box, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(lastPoint, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[lastPoint], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(lastPoint + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[lastPoint + 1], 3))));
  }
   else {
    tracer = new lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(box, box);
    newPoints = lv_lumii_layoutengine_Tracer_$trace__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2IILjava_util_ArrayList_2(tracer, box, box, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line), lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
  }
  line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points = newPoints;
}

function lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(box, start_0, end, sides){
  var cx, cy, i, j, resT, resX, resY, t, x_0, y_0;
  cx = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
  cy = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, 4, 7, 1);
  cx[0] = cx[3] = box.lv_lumii_layoutengine_AbstractContainer_left;
  cx[1] = cx[2] = box.lv_lumii_layoutengine_AbstractContainer_right;
  cy[0] = cy[1] = box.lv_lumii_layoutengine_AbstractContainer_top;
  cy[2] = cy[3] = box.lv_lumii_layoutengine_AbstractContainer_bottom;
  resX = 0;
  resY = 0;
  resT = $intern_62;
  for (i = 0; i < 4; i++) {
    if ((1 << i & sides) == 0) {
      continue;
    }
    j = (i + 1) % 4;
    if (cx[i] == cx[j]) {
      if (start_0.java_awt_geom_Point2D$Double_x != end.java_awt_geom_Point2D$Double_x) {
        x_0 = cx[i];
        t = (x_0 - start_0.java_awt_geom_Point2D$Double_x) / (end.java_awt_geom_Point2D$Double_x - start_0.java_awt_geom_Point2D$Double_x);
        y_0 = start_0.java_awt_geom_Point2D$Double_y + t * (end.java_awt_geom_Point2D$Double_y - start_0.java_awt_geom_Point2D$Double_y);
        t = t <= 0?0 - t:t;
        if (t < resT && java_lang_Math_min__DDD(cy[i], cy[j]) <= y_0 && y_0 <= java_lang_Math_max__DDD(cy[i], cy[j])) {
          resX = x_0;
          resY = y_0;
          resT = t;
        }
      }
    }
     else {
      if (start_0.java_awt_geom_Point2D$Double_y != end.java_awt_geom_Point2D$Double_y) {
        y_0 = cy[i];
        t = (y_0 - start_0.java_awt_geom_Point2D$Double_y) / (end.java_awt_geom_Point2D$Double_y - start_0.java_awt_geom_Point2D$Double_y);
        x_0 = start_0.java_awt_geom_Point2D$Double_x + t * (end.java_awt_geom_Point2D$Double_x - start_0.java_awt_geom_Point2D$Double_x);
        t = t <= 0?0 - t:t;
        if (t < resT && java_lang_Math_min__DDD(cx[i], cx[j]) <= x_0 && x_0 <= java_lang_Math_max__DDD(cx[i], cx[j])) {
          resX = x_0;
          resY = y_0;
          resT = t;
        }
      }
    }
  }
  return resT < $intern_62?new java_awt_geom_Point2D$Double_Point2D$Double__DDV(resX, resY):null;
}

function lv_lumii_layoutengine_LineOptimizer_findInsideSegments__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2ZV(lineSegments, obstacles, segmentsVertical){
  var i, openRectangles, openType, part, segment, segments;
  segments = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, lineSegments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, lv_lumii_layoutengine_LineOptimizer_findProlongedSegments__Ljava_util_LinkedHashSet_2ZDLjava_util_ArrayList_2(obstacles, segmentsVertical, 0));
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(segments, null);
  openRectangles = new java_util_TreeSet_TreeSet__V;
  openType = segmentsVertical?(lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT):(lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP);
  for (i = 0; i < segments.java_util_ArrayList_array.length; i++) {
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , segments.java_util_ArrayList_array[i]), 24)) {
      segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 24));
      part = new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__Llv_lumii_layoutengine_OrthogonalSegment_2V(segment);
      segment.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == openType?openRectangles.java_util_TreeSet_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(part, (java_lang_Boolean_$clinit__V() , java_lang_Boolean_FALSE)) == null:openRectangles.java_util_TreeSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(part) != null;
    }
     else {
      segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 55));
      part = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_TreeSet_$lower__Ljava_util_TreeSet_2Ljava_lang_Object_2Ljava_lang_Object_2(openRectangles, new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV(0, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, $intern_53)), 63);
      !!part && part.lv_lumii_layoutengine_LineOptimizer$Part_bottom >= segment.lv_lumii_layoutengine_obstacleGraph_Segment_end && (segment.lv_lumii_layoutengine_LineOptimizer$LineSegment_toFix = true);
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_findLineBounds__Ljava_util_ArrayList_2ZDV(segments, right, epsilon){
  var i, lineSegment, max_0, n, segment, sweep;
  sweep = new lv_lumii_layoutengine_LineOptimizer$SweepTreap_LineOptimizer$SweepTreap__V;
  n = segments.java_util_ArrayList_array.length;
  for (i = right?0:n - 1; right?i < n:i >= 0; i += right?1:-1) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 21));
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(segment, 55)) {
      lineSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 55);
      if (lineSegment.lv_lumii_layoutengine_LineOptimizer$LineSegment_toFix) {
        max_0 = lv_lumii_layoutengine_LineOptimizer$SweepTreap_$max__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2DDD(sweep, lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_start, lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_end);
        right?(lineSegment.lv_lumii_layoutengine_LineOptimizer$LineSegment_leftBound = max_0 + epsilon):(lineSegment.lv_lumii_layoutengine_LineOptimizer$LineSegment_rightBound = -max_0 - epsilon);
      }
       else {
        lineSegment.lv_lumii_layoutengine_LineOptimizer$LineSegment_leftBound = lineSegment.lv_lumii_layoutengine_LineOptimizer$LineSegment_rightBound = lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
      }
    }
     else {
      lv_lumii_layoutengine_LineOptimizer$SweepTreap_$add__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2Llv_lumii_layoutengine_LineOptimizer$Part_2V(sweep, new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV((right?1:-1) * segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end));
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_findProlongedSegments__Ljava_util_LinkedHashSet_2ZDLjava_util_ArrayList_2(rectangles, horizontal, value_0){
  var firstBound, firstSegmentType, leftSegment, rect, rect$iterator, rightSegment, secondBound, secondSegmentType, segments;
  if (horizontal) {
    firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT);
    secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT;
  }
   else {
    firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP);
    secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM;
  }
  segments = new java_util_ArrayList_ArrayList__IV(rectangles.java_util_HashSet_map.size__I() * 2);
  for (rect$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(rectangles.java_util_HashSet_map)); rect$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    rect = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(rect$iterator), 12);
    firstBound = (horizontal?rect.lv_lumii_layoutengine_AbstractContainer_top:rect.lv_lumii_layoutengine_AbstractContainer_left) - value_0;
    secondBound = (horizontal?rect.lv_lumii_layoutengine_AbstractContainer_bottom:rect.lv_lumii_layoutengine_AbstractContainer_right) + value_0;
    leftSegment = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_createRectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2(horizontal?rect.lv_lumii_layoutengine_AbstractContainer_left:rect.lv_lumii_layoutengine_AbstractContainer_top, firstBound, secondBound, firstSegmentType, rect);
    rightSegment = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_createRectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2(horizontal?rect.lv_lumii_layoutengine_AbstractContainer_right:rect.lv_lumii_layoutengine_AbstractContainer_bottom, firstBound, secondBound, secondSegmentType, rect);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, leftSegment);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, rightSegment);
  }
  return segments;
}

function lv_lumii_layoutengine_LineOptimizer_findShift__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2DLjava_awt_geom_Point2D$Double_2(a, b, c, dist){
  var alpha_0, dp, len, q;
  dp = (a.java_awt_geom_Point2D$Double_x - c.java_awt_geom_Point2D$Double_x) * (b.java_awt_geom_Point2D$Double_x - c.java_awt_geom_Point2D$Double_x) + (a.java_awt_geom_Point2D$Double_y - c.java_awt_geom_Point2D$Double_y) * (b.java_awt_geom_Point2D$Double_y - c.java_awt_geom_Point2D$Double_y);
  alpha_0 = java_lang_Math_acos__DD(dp / (java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(a, c) * java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(b, c)));
  q = dist / java_lang_Math_sin__DD(alpha_0);
  len = java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(a, c);
  return new java_awt_geom_Point2D$Double_Point2D$Double__DDV((a.java_awt_geom_Point2D$Double_x - c.java_awt_geom_Point2D$Double_x) / len * q, (a.java_awt_geom_Point2D$Double_y - c.java_awt_geom_Point2D$Double_y) / len * q);
}

function lv_lumii_layoutengine_LineOptimizer_findSpacedSegments__Ljava_util_Collection_2ZDLjava_util_ArrayList_2(rectangles, horizontal, spacingRatio){
  var firstBound, firstSegmentType, leftSegment, rect, rect$iterator, rightSegment, secondBound, secondSegmentType, segments, spacing;
  if (horizontal) {
    firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT);
    secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT;
  }
   else {
    firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP);
    secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM;
  }
  segments = new java_util_ArrayList_ArrayList__IV(rectangles.size__I() * 2);
  for (rect$iterator = rectangles.iterator__Ljava_util_Iterator_2(); rect$iterator.hasNext__Z();) {
    rect = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.next__Ljava_lang_Object_2(), 12);
    spacing = rect.lv_lumii_layoutengine_Element_spacing;
    firstBound = (horizontal?rect.lv_lumii_layoutengine_AbstractContainer_top:rect.lv_lumii_layoutengine_AbstractContainer_left) - spacing * spacingRatio;
    secondBound = (horizontal?rect.lv_lumii_layoutengine_AbstractContainer_bottom:rect.lv_lumii_layoutengine_AbstractContainer_right) + spacing * spacingRatio;
    leftSegment = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_createRectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2(horizontal?rect.lv_lumii_layoutengine_AbstractContainer_left:rect.lv_lumii_layoutengine_AbstractContainer_top, firstBound, secondBound, firstSegmentType, rect);
    rightSegment = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_createRectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2(horizontal?rect.lv_lumii_layoutengine_AbstractContainer_right:rect.lv_lumii_layoutengine_AbstractContainer_bottom, firstBound, secondBound, secondSegmentType, rect);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, leftSegment);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, rightSegment);
  }
  return segments;
}

function lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2ZLjava_util_LinkedHashSet_2(firstParent, secondParent, lca, includeLCA){
  var lcaParent, obstacles, parent_0;
  obstacles = new java_util_LinkedHashSet_LinkedHashSet__V;
  lcaParent = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(lca, false);
  if (lcaParent != firstParent) {
    for (parent_0 = firstParent; parent_0 != lca; parent_0 = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(parent_0, false)) {
      java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(obstacles, lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(parent_0, false));
    }
  }
  if (lcaParent != secondParent) {
    for (parent_0 = secondParent; parent_0 != lca; parent_0 = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(parent_0, false)) {
      java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(obstacles, lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(parent_0, false));
    }
  }
  java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(obstacles, lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(lca, false));
  if (lcaParent != firstParent) {
    for (parent_0 = firstParent; parent_0 != lca; parent_0 = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(parent_0, false)) {
      obstacles.java_util_HashSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(parent_0) != null;
    }
  }
  if (lcaParent != secondParent) {
    for (parent_0 = secondParent; parent_0 != lca; parent_0 = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(parent_0, false)) {
      obstacles.java_util_HashSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(parent_0) != null;
    }
  }
  includeLCA && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(obstacles, lca);
  return obstacles;
}

function lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2ZLjava_util_LinkedHashSet_2(a, b, includeLCA){
  var lca;
  a == b?(lca = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(a, false)):(lca = lv_lumii_layoutengine_Box_$findLCABox__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2(a, b));
  return lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2ZLjava_util_LinkedHashSet_2(lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(a, false), lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(b, false), lca, includeLCA);
}

function lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Line_2ZLjava_util_LinkedHashSet_2(line, includeLCA){
  return lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2ZLjava_util_LinkedHashSet_2(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), includeLCA);
}

function lv_lumii_layoutengine_LineOptimizer_joinSegments__Ljava_util_ArrayList_2Ljava_util_LinkedHashSet_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2ZV(lines, obstacles, horizontal, startCounts, endCounts, fixLabels){
  var bottom, curr, d, endCount, epsilon, first, firstBound, i, i0, i1, l, leftBound, len, line, lineSegments, loop, points, pos, queue, rightBound, secondBound, segment, segment$iterator, segment$iterator0, segments, startCount, top_0;
  if (lines.java_util_ArrayList_array.length == 0) {
    return;
  }
  epsilon = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[0], 10)).lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  segments = new java_util_ArrayList_ArrayList__V;
  first = new java_util_ArrayList_ArrayList__V;
  for (l = 0; l < lines.java_util_ArrayList_array.length; l++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(l, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[l], 10));
    startCount = !startCounts?line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(l, startCounts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(startCounts.java_util_ArrayList_array[l], 9)).java_lang_Integer_value;
    endCount = !endCounts?line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(l, endCounts.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endCounts.java_util_ArrayList_array[l], 9)).java_lang_Integer_value;
    points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
    lineSegments = new java_util_ArrayList_ArrayList__V;
    for (i0 = 0; i0 + 1 < points.java_util_ArrayList_array.length; i0++) {
      if (horizontal?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_x == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0 + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0 + 1], 3)).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_y == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0 + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0 + 1], 3)).java_awt_geom_Point2D$Double_y) {
        pos = horizontal?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_y;
        firstBound = horizontal?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_y:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)).java_awt_geom_Point2D$Double_x;
        secondBound = horizontal?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0 + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0 + 1], 3)).java_awt_geom_Point2D$Double_y:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0 + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0 + 1], 3)).java_awt_geom_Point2D$Double_x;
        top_0 = firstBound < secondBound?firstBound:secondBound;
        bottom = firstBound > secondBound?firstBound:secondBound;
        segment = new lv_lumii_layoutengine_LineOptimizer$LineSegment_LineOptimizer$LineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(pos, top_0, bottom, line, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0], 3)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0 + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[i0 + 1], 3)));
        (i0 < startCount || points.java_util_ArrayList_array.length - i0 - 1 <= endCount) && (segment.lv_lumii_layoutengine_LineOptimizer$LineSegment_toFix = true);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array, lineSegments.java_util_ArrayList_array.length, segment);
      }
    }
    if (lineSegments.java_util_ArrayList_array.length == 0) {
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(first.java_util_ArrayList_array, first.java_util_ArrayList_array.length, null);
    }
     else {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(first, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[0], 55)));
      for (i1 = 0; i1 + 1 < lineSegments.java_util_ArrayList_array.length; i1++) {
        (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[i1], 55)).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1 + 1, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[i1 + 1], 20));
      }
      java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, lineSegments);
    }
  }
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, lv_lumii_layoutengine_LineOptimizer_findSpacedSegments__Ljava_util_Collection_2ZDLjava_util_ArrayList_2(obstacles, horizontal, 0.125));
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(segments, null);
  lv_lumii_layoutengine_LineOptimizer_findLineBounds__Ljava_util_ArrayList_2ZDV(segments, true, epsilon);
  lv_lumii_layoutengine_LineOptimizer_findLineBounds__Ljava_util_ArrayList_2ZDV(segments, false, epsilon);
  for (i = 0; i < lines.java_util_ArrayList_array.length; i++) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, lines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lines.java_util_ArrayList_array[i], 10));
    curr = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, first.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(first.java_util_ArrayList_array[i], 55));
    loop = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) == lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
    leftBound = $intern_20;
    rightBound = $intern_53;
    queue = new java_util_LinkedList_LinkedList__V;
    while (true) {
      if (queue.java_util_LinkedList_size != 0 && (!curr || curr.lv_lumii_layoutengine_LineOptimizer$LineSegment_leftBound > rightBound || curr.lv_lumii_layoutengine_LineOptimizer$LineSegment_rightBound < leftBound || loop && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(queue.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , queue.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value), 55).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint == com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3) && curr.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint == lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry))) {
        pos = 0;
        len = 0;
        for (segment$iterator0 = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(queue, 0); segment$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode != segment$iterator0.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(segment$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode != segment$iterator0.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , segment$iterator0.java_util_LinkedList$ListIteratorImpl_lastNode = segment$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode , segment$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode = segment$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++segment$iterator0.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment$iterator0.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 55));
          d = segment.lv_lumii_layoutengine_obstacleGraph_Segment_end - segment.lv_lumii_layoutengine_obstacleGraph_Segment_start;
          pos += segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos * d;
          len += d;
        }
        pos /= len;
        pos < leftBound && (pos = leftBound);
        pos > rightBound && (pos = rightBound);
        for (segment$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(queue, 0); segment$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != segment$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(segment$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != segment$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , segment$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = segment$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , segment$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = segment$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++segment$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 55));
          if (java_lang_Math_abs__DD(segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos - pos) < epsilon) {
            pos = segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
            break;
          }
        }
        while (queue.java_util_LinkedList_size != 0) {
          lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(queue.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next)), 55), pos);
        }
        if (!curr) {
          break;
        }
        leftBound = $intern_20;
        rightBound = $intern_53;
      }
      if (!curr) {
        break;
      }
      curr.lv_lumii_layoutengine_LineOptimizer$LineSegment_leftBound > leftBound && (leftBound = curr.lv_lumii_layoutengine_LineOptimizer$LineSegment_leftBound);
      curr.lv_lumii_layoutengine_LineOptimizer$LineSegment_rightBound < rightBound && (rightBound = curr.lv_lumii_layoutengine_LineOptimizer$LineSegment_rightBound);
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, curr, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
      curr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(curr.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next, 55);
    }
    fixLabels?line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__Ljava_util_Collection_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(line.lv_lumii_layoutengine_Line_labels)):line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V();
  }
}

function lv_lumii_layoutengine_LineOptimizer_mergeSegments__Ljava_util_ArrayList_2ZV(segments, segmentsHorizontal){
  var currPos, endPos, goLeftPath, leftNextPos, leftNextVal, leftPos, leftPtr, leftVal, points, pos, right, rightNextPos, rightNextVal, rightPos, rightPtr, rightVal, segVal, segment, segment$iterator, val;
  for (segment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(segments); segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_last = segment$iterator.java_util_AbstractList$IteratorImpl_i++), 101));
    leftPos = segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_leftPos;
    leftVal = segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_leftVal;
    rightPos = segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_rightPos;
    rightVal = segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_rightVal;
    points = segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_points;
    if (segmentsHorizontal) {
      currPos = segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x;
      endPos = segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x;
    }
     else {
      currPos = segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y;
      endPos = segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y;
    }
    right = currPos < endPos;
    leftPtr = 0;
    rightPtr = 0;
    segVal = segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
    while (currPos != endPos) {
      while (right?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(leftPtr, leftPos.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftPos.java_util_ArrayList_array[leftPtr], 11)).java_lang_Double_value <= currPos:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(leftPtr, leftPos.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftPos.java_util_ArrayList_array[leftPtr], 11)).java_lang_Double_value >= currPos) {
        ++leftPtr;
      }
      while (right?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(rightPtr, rightPos.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightPos.java_util_ArrayList_array[rightPtr], 11)).java_lang_Double_value <= currPos:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(rightPtr, rightPos.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightPos.java_util_ArrayList_array[rightPtr], 11)).java_lang_Double_value >= currPos) {
        ++rightPtr;
      }
      leftNextPos = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(leftPtr, leftPos.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftPos.java_util_ArrayList_array[leftPtr], 11)).java_lang_Double_value;
      rightNextPos = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(rightPtr, rightPos.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightPos.java_util_ArrayList_array[rightPtr], 11)).java_lang_Double_value;
      leftNextVal = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(leftPtr, leftVal.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftVal.java_util_ArrayList_array[leftPtr], 11)).java_lang_Double_value;
      rightNextVal = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(rightPtr, rightVal.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightVal.java_util_ArrayList_array[rightPtr], 11)).java_lang_Double_value;
      right?leftNextPos > rightNextPos?(goLeftPath = true):leftNextPos < rightNextPos?(goLeftPath = false):(goLeftPath = (segVal - leftNextVal <= 0?0 - (segVal - leftNextVal):segVal - leftNextVal) < (segVal - rightNextVal <= 0?0 - (segVal - rightNextVal):segVal - rightNextVal)):leftNextPos < rightNextPos?(goLeftPath = true):leftNextPos > rightNextPos?(goLeftPath = false):(goLeftPath = (segVal - leftNextVal <= 0?0 - (segVal - leftNextVal):segVal - leftNextVal) < (segVal - rightNextVal <= 0?0 - (segVal - rightNextVal):segVal - rightNextVal));
      if (goLeftPath) {
        pos = leftNextPos;
        val = leftNextVal;
      }
       else {
        pos = rightNextPos;
        val = rightNextVal;
      }
      if (segmentsHorizontal) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(currPos, val));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(pos, val));
      }
       else {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(val, currPos));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(points, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(val, pos));
      }
      currPos = pos;
    }
    if (points.java_util_ArrayList_array.length != 0) {
      if (segmentsHorizontal) {
        segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_y;
        segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3).java_awt_geom_Point2D$Double_y;
      }
       else {
        segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_x;
        segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, points.java_util_ArrayList_array.length - 1), 3).java_awt_geom_Point2D$Double_x;
      }
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_reconnectPolyline__Llv_lumii_layoutengine_Line_2V(line){
  var endBox, endPoint, newEnd, newStart, prevPoint, startBox, startPoint;
  if (line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length == 2) {
    lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(line);
  }
   else {
    startPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
    prevPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 1), 3);
    startBox = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
    newStart = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(startBox, prevPoint, startPoint, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line));
    if (!newStart) {
      startPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((startBox.lv_lumii_layoutengine_AbstractContainer_left + startBox.lv_lumii_layoutengine_AbstractContainer_right) / 2, (startBox.lv_lumii_layoutengine_AbstractContainer_top + startBox.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
      newStart = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(startBox, prevPoint, startPoint, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line));
    }
    !newStart && (newStart = lv_lumii_layoutengine_GeometryHelper_findClosestMidPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(startBox, prevPoint, lv_lumii_layoutengine_Line_$getUsedStartSides__Llv_lumii_layoutengine_Line_2I(line)));
    java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0, newStart);
    endPoint = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry);
    prevPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2), 3);
    endBox = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
    newEnd = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(endBox, prevPoint, endPoint, lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
    if (!newEnd) {
      endPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((endBox.lv_lumii_layoutengine_AbstractContainer_left + endBox.lv_lumii_layoutengine_AbstractContainer_right) / 2, (endBox.lv_lumii_layoutengine_AbstractContainer_top + endBox.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
      newEnd = lv_lumii_layoutengine_LineOptimizer_findBestPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(endBox, prevPoint, endPoint, lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line));
    }
    !newEnd && (newEnd = lv_lumii_layoutengine_GeometryHelper_findClosestMidPoint__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2ILjava_awt_geom_Point2D$Double_2(endBox, prevPoint, lv_lumii_layoutengine_Line_$getUsedEndSides__Llv_lumii_layoutengine_Line_2I(line)));
    java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 1, newEnd);
    line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V();
  }
}

function lv_lumii_layoutengine_LineOptimizer_shiftCorner__Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2IZV(point, box, allowedSides, start_0){
  var ccw, cw, cx, cy, dx, dy, epsilon, i, j, k, moveCw;
  cx = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [box.lv_lumii_layoutengine_AbstractContainer_left, box.lv_lumii_layoutengine_AbstractContainer_right, box.lv_lumii_layoutengine_AbstractContainer_right, box.lv_lumii_layoutengine_AbstractContainer_left]);
  cy = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [box.lv_lumii_layoutengine_AbstractContainer_top, box.lv_lumii_layoutengine_AbstractContainer_top, box.lv_lumii_layoutengine_AbstractContainer_bottom, box.lv_lumii_layoutengine_AbstractContainer_bottom]);
  epsilon = box.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  for (i = 0; i < 4; i++) {
    if (java_lang_Math_abs__DD(point.java_awt_geom_Point2D$Double_x - cx[i]) < epsilon && java_lang_Math_abs__DD(point.java_awt_geom_Point2D$Double_y - cy[i]) < epsilon) {
      j = (i + 3) % 4;
      cw = (allowedSides & 1 << i) > 0;
      ccw = (allowedSides & 1 << j) > 0;
      moveCw = true;
      start_0 && ccw && (moveCw = false);
      !start_0 && !cw && (moveCw = false);
      if (moveCw) {
        k = (i + 1) % 4;
        dx = java_lang_Math_signum__DD(cx[k] - cx[i]) * epsilon;
        dy = java_lang_Math_signum__DD(cy[k] - cy[i]) * epsilon;
      }
       else {
        dx = java_lang_Math_signum__DD(cx[j] - cx[i]) * epsilon;
        dy = java_lang_Math_signum__DD(cy[j] - cy[i]) * epsilon;
      }
      point.java_awt_geom_Point2D$Double_x = cx[i] + dx;
      point.java_awt_geom_Point2D$Double_y = cy[i] + dy;
      break;
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_snapNewLines__Ljava_util_ArrayList_2V(newLines){
  var boxSegments, diagram, line, line$iterator, line$iterator0, lineSegments, newLineSet;
  diagram = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, newLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newLines.java_util_ArrayList_array[0], 10)).lv_lumii_layoutengine_Element_diagram;
  lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram);
  lineSegments = lv_lumii_layoutengine_Normalizer_generateLineSegments__Llv_lumii_layoutengine_Diagram_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, null);
  boxSegments = lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(diagram, false);
  newLineSet = new java_util_HashSet_HashSet__V;
  for (line$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(newLines); line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_last = line$iterator0.java_util_AbstractList$IteratorImpl_i++), 10));
    line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL) && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newLineSet, line);
  }
  lv_lumii_layoutengine_LineOptimizer_snapNewLines__Ljava_util_HashSet_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(newLineSet, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[0], 4)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, boxSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxSegments.java_util_ArrayList_array[0], 4)), true);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[1], 4)));
  lv_lumii_layoutengine_LineOptimizer_snapNewLines__Ljava_util_HashSet_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(newLineSet, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[1], 4)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, boxSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxSegments.java_util_ArrayList_array[1], 4)), false);
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(newLines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL) && line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$cullPoints__V();
  }
}

function lv_lumii_layoutengine_LineOptimizer_snapNewLines__Ljava_util_HashSet_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(newLines, lineSegments, boxSegments, segmentsVertical){
  var closestPos, lineSegment, lineSegment$iterator, lineSegment$iterator0, pos, segments;
  segments = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, lineSegments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, boxSegments);
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(segments, null);
  closestPos = new java_util_LinkedHashMap_LinkedHashMap__V;
  lv_lumii_layoutengine_LineOptimizer_snapSweep__Ljava_util_ArrayList_2Ljava_util_HashSet_2Ljava_util_LinkedHashMap_2ZV(segments, newLines, closestPos, true);
  for (lineSegment$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineSegments); lineSegment$iterator0.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator0.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator0.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator0.java_util_AbstractList$IteratorImpl_i++), 20));
    java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newLines, lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line) && (lineSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos = segmentsVertical?lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x:lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y);
  }
  lv_lumii_layoutengine_LineOptimizer_snapSweep__Ljava_util_ArrayList_2Ljava_util_HashSet_2Ljava_util_LinkedHashMap_2ZV(segments, newLines, closestPos, false);
  for (lineSegment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lineSegments); lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    lineSegment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(lineSegment$iterator.java_util_AbstractList$IteratorImpl_i < lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(lineSegment$iterator.java_util_AbstractList$IteratorImpl_last = lineSegment$iterator.java_util_AbstractList$IteratorImpl_i++), 20));
    if (java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newLines, lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line)) {
      pos = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(closestPos, lineSegment), 11);
      !!pos && lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(lineSegment, pos.java_lang_Double_value);
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_snapSweep__Ljava_util_ArrayList_2Ljava_util_HashSet_2Ljava_util_LinkedHashMap_2ZV(segments, newLines, closestPos, fromStart){
  var bestPosDif, bestSegment, currClosestPos, i, isNewLineSegment, it, lower, mid, newPosDif, originalSegment, parts, segment, segmentPart, startPart, sweepline, upper;
  sweepline = new java_util_TreeSet_TreeSet__V;
  java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V($intern_20, $intern_20, null));
  java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V($intern_53, $intern_53, null));
  for (i = fromStart?0:segments.java_util_ArrayList_array.length - 1; i != (fromStart?segments.java_util_ArrayList_array.length:-1); i += fromStart?1:-1) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 21));
    startPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_TreeSet_$lower__Ljava_util_TreeSet_2Ljava_lang_Object_2Ljava_lang_Object_2(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, segment)), 41);
    parts = java_util_TreeSet_$tailSet__Ljava_util_TreeSet_2Ljava_lang_Object_2ZLjava_util_NavigableSet_2(sweepline, startPart, java_lang_Math_max__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end));
    startPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap_getKeyOrNSE__Ljava_util_Map$Entry_2Ljava_lang_Object_2(parts.java_util_TreeSet_map.package_private$java_util_AbstractNavigableMap$getFirstEntry__Ljava_util_Map$Entry_2()), 41);
    it = java_util_AbstractNavigableMap$NavigableKeySet_$iterator__Ljava_util_AbstractNavigableMap$NavigableKeySet_2Ljava_util_Iterator_2(new java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V(parts.java_util_TreeSet_map));
    upper = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap_getKeyOrNSE__Ljava_util_Map$Entry_2Ljava_lang_Object_2(sweepline.java_util_TreeSet_map.package_private$java_util_AbstractNavigableMap$getFirstEntry__Ljava_util_Map$Entry_2()), 41);
    mid = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(it), 41);
    isNewLineSegment = com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(segment, 20) && java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(newLines, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 20).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line);
    bestPosDif = $intern_53;
    bestSegment = null;
    while (java_lang_Math_max__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end)) {
      java_util_TreeMap$EntryIterator_$remove__Ljava_util_TreeMap$EntryIterator_2V(it.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2);
      lower = it.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2.java_util_TreeMap$EntryIterator_iter.hasNext__Z()?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(it), 41):null;
      if (isNewLineSegment) {
        originalSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21);
        if (!(java_lang_Math_max__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && (fromStart?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21).lv_lumii_layoutengine_obstacleGraph_Segment_pos > originalSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21).lv_lumii_layoutengine_obstacleGraph_Segment_pos < originalSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) && upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21).lv_lumii_layoutengine_obstacleGraph_Segment_start)) {
          if (!(java_lang_Math_max__DDD(lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && (fromStart?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21).lv_lumii_layoutengine_obstacleGraph_Segment_pos > originalSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21).lv_lumii_layoutengine_obstacleGraph_Segment_pos < originalSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21).lv_lumii_layoutengine_obstacleGraph_Segment_end > lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top)) {
            newPosDif = java_lang_Math_abs__DD(segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos - originalSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos);
            if (newPosDif < bestPosDif) {
              bestPosDif = newPosDif;
              bestSegment = originalSegment;
            }
          }
        }
      }
      upper = mid;
      mid = lower;
    }
    if (isNewLineSegment && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(bestSegment, 20) && bestSegment.getAfterSpacing__D() + segment.getBeforeSpacing__D() + 10 > bestPosDif && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 20).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line != com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bestSegment, 20).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line) {
      currClosestPos = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(closestPos, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 20)), 11);
      (!currClosestPos || bestPosDif < java_lang_Math_abs__DD(segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos - currClosestPos.java_lang_Double_value)) && java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(closestPos, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 20), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(bestSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos)));
      lv_lumii_layoutengine_obstacleGraph_Segment_$setPos__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(segment, bestSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos);
    }
    segmentPart = new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__Llv_lumii_layoutengine_obstacleGraph_Segment_2V(segment);
    sweepline.java_util_TreeSet_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentPart, (java_lang_Boolean_$clinit__V() , java_lang_Boolean_FALSE)) == null;
    java_lang_Math_max__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top < segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top && startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top && java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21)));
    java_lang_Math_max__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom && upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top < segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom && java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 21)));
  }
}

function lv_lumii_layoutengine_LineOptimizer_splitSegments__Ljava_util_ArrayList_2ZZV(segments, verticalSegments, right){
  var bottom, box, down, endPos, epsilon, firstPart, i, j, last, leftBound, leftSide, leftVal, line, lval, n, openRectangles, openType, part, part$iterator, portion, pos, prevPos, rightBound, rightSide, rightVal, rval, segment, sweep, top_0, tpos, val, val0, val1, x_0;
  openRectangles = new java_util_TreeSet_TreeSet__V;
  sweep = new lv_lumii_layoutengine_LineOptimizer$SweepTreap_LineOptimizer$SweepTreap__V;
  openType = verticalSegments?right?(lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT):(lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT):right?(lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP):(lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM);
  n = segments.java_util_ArrayList_array.length;
  for (i = right?0:n - 1; right?i < n:i >= 0; i += right?1:-1) {
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , segments.java_util_ArrayList_array[i]), 24)) {
      segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 24));
      part = new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__Llv_lumii_layoutengine_OrthogonalSegment_2V(segment);
      if (segment.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == openType) {
        openRectangles.java_util_TreeSet_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(part, (java_lang_Boolean_$clinit__V() , java_lang_Boolean_FALSE)) == null;
      }
       else {
        openRectangles.java_util_TreeSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(part) != null;
        lv_lumii_layoutengine_LineOptimizer$SweepTreap_$add__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2Llv_lumii_layoutengine_LineOptimizer$Part_2V(sweep, new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV(right?part.lv_lumii_layoutengine_LineOptimizer$Part_x:-part.lv_lumii_layoutengine_LineOptimizer$Part_x, part.lv_lumii_layoutengine_LineOptimizer$Part_top, part.lv_lumii_layoutengine_LineOptimizer$Part_bottom));
      }
    }
     else {
      segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 101));
      line = segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line;
      epsilon = line.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon * 2;
      tpos = new java_util_ArrayList_ArrayList__V;
      lval = new java_util_ArrayList_ArrayList__V;
      rval = new java_util_ArrayList_ArrayList__V;
      x_0 = segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
      top_0 = segment.lv_lumii_layoutengine_obstacleGraph_Segment_start;
      bottom = segment.lv_lumii_layoutengine_obstacleGraph_Segment_end;
      firstPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_TreeSet_$lower__Ljava_util_TreeSet_2Ljava_lang_Object_2Ljava_lang_Object_2(openRectangles, new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV(0, top_0, $intern_53)), 63);
      !firstPart && (firstPart = new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV(0, top_0, $intern_53));
      portion = java_util_TreeSet_$subSet__Ljava_util_TreeSet_2Ljava_lang_Object_2ZLjava_lang_Object_2ZLjava_util_NavigableSet_2(openRectangles, firstPart, top_0 <= firstPart.lv_lumii_layoutengine_LineOptimizer$Part_bottom, new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV(0, bottom, $intern_53));
      down = verticalSegments?segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y < segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y:segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x < segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x;
      prevPos = top_0;
      for (part$iterator = java_util_AbstractNavigableMap$NavigableKeySet_$iterator__Ljava_util_AbstractNavigableMap$NavigableKeySet_2Ljava_util_Iterator_2(new java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V(portion.java_util_TreeSet_map)); part$iterator.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2.java_util_TreeMap$EntryIterator_iter.hasNext__Z();) {
        part = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(part$iterator), 63);
        if (prevPos < part.lv_lumii_layoutengine_LineOptimizer$Part_top) {
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(tpos, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(down?part.lv_lumii_layoutengine_LineOptimizer$Part_top:prevPos)));
          val0 = lv_lumii_layoutengine_LineOptimizer$SweepTreap_$max__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2DDD(sweep, prevPos, part.lv_lumii_layoutengine_LineOptimizer$Part_top) + epsilon;
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(lval, new java_lang_Double_Double__DV(right?val0:x_0));
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(rval, new java_lang_Double_Double__DV(right?x_0:-val0));
          prevPos = part.lv_lumii_layoutengine_LineOptimizer$Part_top;
        }
        endPos = java_lang_Math_min__DDD(part.lv_lumii_layoutengine_LineOptimizer$Part_bottom, bottom);
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(tpos, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(down?endPos:prevPos)));
        val1 = lv_lumii_layoutengine_LineOptimizer$SweepTreap_$max__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2DDD(sweep, prevPos, endPos);
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(lval, new java_lang_Double_Double__DV((right?val1:part.lv_lumii_layoutengine_LineOptimizer$Part_x) + epsilon));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(rval, new java_lang_Double_Double__DV((right?part.lv_lumii_layoutengine_LineOptimizer$Part_x:-val1) - epsilon));
        prevPos = endPos;
      }
      if (prevPos < bottom) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(tpos, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(down?bottom:prevPos)));
        val0 = lv_lumii_layoutengine_LineOptimizer$SweepTreap_$max__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2DDD(sweep, prevPos, bottom) + epsilon;
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(lval, new java_lang_Double_Double__DV(right?val0:x_0));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(rval, new java_lang_Double_Double__DV(right?x_0:-val0));
      }
      if (!down) {
        java_util_Collections_reverse__Ljava_util_List_2V(tpos);
        java_util_Collections_reverse__Ljava_util_List_2V(lval);
        java_util_Collections_reverse__Ljava_util_List_2V(rval);
      }
      if (segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint == com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3)) {
        box = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
        leftSide = verticalSegments?box.lv_lumii_layoutengine_AbstractContainer_left:box.lv_lumii_layoutengine_AbstractContainer_top;
        rightSide = verticalSegments?box.lv_lumii_layoutengine_AbstractContainer_right:box.lv_lumii_layoutengine_AbstractContainer_bottom;
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(lval, 0, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(right?leftSide + epsilon:x_0)));
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(rval, 0, new java_lang_Double_Double__DV(right?x_0:rightSide - epsilon));
      }
      if (segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint == lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry)) {
        box = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
        leftSide = verticalSegments?box.lv_lumii_layoutengine_AbstractContainer_left:box.lv_lumii_layoutengine_AbstractContainer_top;
        rightSide = verticalSegments?box.lv_lumii_layoutengine_AbstractContainer_right:box.lv_lumii_layoutengine_AbstractContainer_bottom;
        last = lval.java_util_ArrayList_array.length - 1;
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(lval, last, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(right?leftSide + epsilon:x_0)));
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(rval, last, new java_lang_Double_Double__DV(right?x_0:rightSide - epsilon));
      }
      val = new java_util_ArrayList_ArrayList__V;
      pos = new java_util_ArrayList_ArrayList__V;
      leftBound = $intern_20;
      rightBound = $intern_53;
      for (j = 0; j < tpos.java_util_ArrayList_array.length; j++) {
        leftVal = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, lval.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lval.java_util_ArrayList_array[j], 11)).java_lang_Double_value;
        rightVal = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, rval.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rval.java_util_ArrayList_array[j], 11)).java_lang_Double_value;
        if (rightBound < leftVal || rightVal < leftBound) {
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(val, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(x_0 < leftBound?leftBound:x_0 > rightBound?rightBound:x_0)));
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(pos, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j - 1, tpos.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tpos.java_util_ArrayList_array[j - 1], 11)));
          leftBound = $intern_20;
          rightBound = $intern_53;
        }
        leftBound < leftVal && (leftBound = leftVal);
        rightVal < rightBound && (rightBound = rightVal);
      }
      if (tpos.java_util_ArrayList_array.length != 0) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(val, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(x_0 < leftBound?leftBound:x_0 > rightBound?rightBound:x_0)));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(pos, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(tpos, tpos.java_util_ArrayList_array.length - 1), 11));
      }
      if (right) {
        segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_leftPos = pos;
        segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_leftVal = val;
      }
       else {
        segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_rightPos = pos;
        segment.lv_lumii_layoutengine_LineOptimizer$SplitSegment_rightVal = val;
      }
    }
  }
}

function lv_lumii_layoutengine_LineOptimizer_traceAroundBox__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box$BoxSide_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box$BoxSide_2DLjava_util_ArrayList_2(box, start_0, startSide, end, endSide, spacing){
  var bottom, lastPoint, left, newX, newY, result, right, top_0;
  result = new java_util_ArrayList_ArrayList__V;
  if (!(box.lv_lumii_layoutengine_AbstractContainer_left <= end.java_awt_geom_Point2D$Double_x && end.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_right && box.lv_lumii_layoutengine_AbstractContainer_top <= end.java_awt_geom_Point2D$Double_y && end.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_bottom && (end.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_top || end.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_bottom || end.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_left || end.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_right)) || !(box.lv_lumii_layoutengine_AbstractContainer_left <= start_0.java_awt_geom_Point2D$Double_x && start_0.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_right && box.lv_lumii_layoutengine_AbstractContainer_top <= start_0.java_awt_geom_Point2D$Double_y && start_0.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_bottom && (start_0.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_top || start_0.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_bottom || start_0.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_left || start_0.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_right))) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('To trace around a box the passed points must lie on the perimeter of the box.');
  }
  if (java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(start_0, end)) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('To trace around a box the passed points must be different.');
  }
  left = box.lv_lumii_layoutengine_AbstractContainer_left;
  right = box.lv_lumii_layoutengine_AbstractContainer_right;
  top_0 = box.lv_lumii_layoutengine_AbstractContainer_top;
  bottom = box.lv_lumii_layoutengine_AbstractContainer_bottom;
  switch (startSide.java_lang_Enum_ordinal) {
    case 0:
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(start_0.java_awt_geom_Point2D$Double_x, start_0.java_awt_geom_Point2D$Double_y - spacing));
      break;
    case 1:
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(start_0.java_awt_geom_Point2D$Double_x + spacing, start_0.java_awt_geom_Point2D$Double_y));
      break;
    case 2:
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(start_0.java_awt_geom_Point2D$Double_x, start_0.java_awt_geom_Point2D$Double_y + spacing));
      break;
    case 3:
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(start_0.java_awt_geom_Point2D$Double_x - spacing, start_0.java_awt_geom_Point2D$Double_y));
  }
  lastPoint = null;
  switch (endSide.java_lang_Enum_ordinal) {
    case 0:
      lastPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(end.java_awt_geom_Point2D$Double_x, end.java_awt_geom_Point2D$Double_y - spacing);
      break;
    case 1:
      lastPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(end.java_awt_geom_Point2D$Double_x + spacing, end.java_awt_geom_Point2D$Double_y);
      break;
    case 2:
      lastPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(end.java_awt_geom_Point2D$Double_x, end.java_awt_geom_Point2D$Double_y + spacing);
      break;
    case 3:
      lastPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(end.java_awt_geom_Point2D$Double_x - spacing, end.java_awt_geom_Point2D$Double_y);
  }
  if ((startSide.java_lang_Enum_ordinal - endSide.java_lang_Enum_ordinal) % 2 == 0) {
    if (startSide != endSide) {
      if (startSide.java_lang_Enum_ordinal % 2 == 0) {
        newX = start_0.java_awt_geom_Point2D$Double_x + end.java_awt_geom_Point2D$Double_x - 2 * left < 2 * right - start_0.java_awt_geom_Point2D$Double_x - end.java_awt_geom_Point2D$Double_x?left - spacing:right + spacing;
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newX, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, result.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(result.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_y));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newX, lastPoint.java_awt_geom_Point2D$Double_y));
      }
       else {
        newY = start_0.java_awt_geom_Point2D$Double_y + end.java_awt_geom_Point2D$Double_y - 2 * top_0 < 2 * bottom - start_0.java_awt_geom_Point2D$Double_y - end.java_awt_geom_Point2D$Double_y?top_0 - spacing:bottom + spacing;
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, result.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(result.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_x, newY));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(lastPoint.java_awt_geom_Point2D$Double_x, newY));
      }
    }
  }
   else {
    if (startSide.java_lang_Enum_ordinal % 2 == 0) {
      newX = lastPoint.java_awt_geom_Point2D$Double_x;
      newY = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, result.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(result.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_y;
    }
     else {
      newX = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, result.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(result.java_util_ArrayList_array[0], 3)).java_awt_geom_Point2D$Double_x;
      newY = lastPoint.java_awt_geom_Point2D$Double_y;
    }
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(result, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newX, newY));
  }
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(result.java_util_ArrayList_array, result.java_util_ArrayList_array.length, lastPoint);
  return result;
}

var lv_lumii_layoutengine_LineOptimizer_SEGMENT_1MATCHING_1OFFSET = 10;
function lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_$compare__Llv_lumii_layoutengine_LineOptimizer$LineLabelComparator_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2I(this$static, label1, label2){
  var center1, center2, res;
  center1 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label1.lv_lumii_layoutengine_AbstractContainer_left + label1.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label1.lv_lumii_layoutengine_AbstractContainer_top + label1.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  center2 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((label2.lv_lumii_layoutengine_AbstractContainer_left + label2.lv_lumii_layoutengine_AbstractContainer_right) / 2, (label2.lv_lumii_layoutengine_AbstractContainer_top + label2.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  res = this$static.lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_compareHorizontal?java_lang_Double_compare__DDI(center1.java_awt_geom_Point2D$Double_x, center2.java_awt_geom_Point2D$Double_x):java_lang_Double_compare__DDI(center1.java_awt_geom_Point2D$Double_y, center2.java_awt_geom_Point2D$Double_y);
  return this$static.lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_positiveDirection?res:-res;
}

function lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_LineOptimizer$LineLabelComparator__ZZV(compareHorizontal, positiveDirection){
  this.lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_compareHorizontal = compareHorizontal;
  this.lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_positiveDirection = positiveDirection;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(225, 1, {}, lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_LineOptimizer$LineLabelComparator__ZZV);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(label1, label2){
  return lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_$compare__Llv_lumii_layoutengine_LineOptimizer$LineLabelComparator_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Llv_lumii_layoutengine_OutsideLabel$LineLabel_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label1, 28), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label2, 28));
}
;
_.lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_compareHorizontal = false;
_.lv_lumii_layoutengine_LineOptimizer$LineLabelComparator_positiveDirection = false;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$LineLabelComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineOptimizer/LineLabelComparator', 225);
function lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, end){
  this$static.lv_lumii_layoutengine_obstacleGraph_Segment_end = end;
}

function lv_lumii_layoutengine_obstacleGraph_Segment_$setPos__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, pos){
  this$static.lv_lumii_layoutengine_obstacleGraph_Segment_pos = pos;
}

function lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, start_0){
  this$static.lv_lumii_layoutengine_obstacleGraph_Segment_start = start_0;
}

function lv_lumii_layoutengine_obstacleGraph_Segment_Segment__DDDV(pos, start_0, end){
  this.lv_lumii_layoutengine_obstacleGraph_Segment_pos = pos;
  this.lv_lumii_layoutengine_obstacleGraph_Segment_start = start_0;
  this.lv_lumii_layoutengine_obstacleGraph_Segment_end = end;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(59, 1, {29:1, 59:1}, lv_lumii_layoutengine_obstacleGraph_Segment_Segment__DDDV);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_obstacleGraph_Segment_compareTo__Ljava_lang_Object_2I(s){
  return this.compareTo__Llv_lumii_layoutengine_obstacleGraph_Segment_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s, 59));
}
;
_.compareTo__Llv_lumii_layoutengine_obstacleGraph_Segment_2I = function lv_lumii_layoutengine_obstacleGraph_Segment_compareTo__Llv_lumii_layoutengine_obstacleGraph_Segment_2I(s){
  return java_lang_Double_compare__DDI(this.lv_lumii_layoutengine_obstacleGraph_Segment_pos, s.lv_lumii_layoutengine_obstacleGraph_Segment_pos);
}
;
_.lv_lumii_layoutengine_obstacleGraph_Segment_end = 0;
_.lv_lumii_layoutengine_obstacleGraph_Segment_pos = 0;
_.lv_lumii_layoutengine_obstacleGraph_Segment_start = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1obstacleGraph_1Segment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_69, 'Segment', 59);
function lv_lumii_layoutengine_OrthogonalSegment_OrthogonalSegment__DDDV(pos, start_0, end){
  lv_lumii_layoutengine_obstacleGraph_Segment_Segment__DDDV.call(this, pos, start_0, end);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(21, 59, {29:1, 21:1, 59:1});
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I = function lv_lumii_layoutengine_OrthogonalSegment_compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I(s){
  return java_lang_Integer_compare__III(this.getSortPriority__I(), s.getSortPriority__I());
}
;
_.compareTo__Llv_lumii_layoutengine_obstacleGraph_Segment_2I = function lv_lumii_layoutengine_OrthogonalSegment_compareTo__Llv_lumii_layoutengine_obstacleGraph_Segment_2I(o){
  var s;
  if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 21)) {
    return java_lang_Double_compare__DDI(this.lv_lumii_layoutengine_obstacleGraph_Segment_pos, o.lv_lumii_layoutengine_obstacleGraph_Segment_pos);
  }
  s = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 21);
  return this.lv_lumii_layoutengine_obstacleGraph_Segment_pos < s.lv_lumii_layoutengine_obstacleGraph_Segment_pos?-1:this.lv_lumii_layoutengine_obstacleGraph_Segment_pos > s.lv_lumii_layoutengine_obstacleGraph_Segment_pos?1:this.package_private$lv_lumii_layoutengine_OrthogonalSegment$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I(s);
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D = function lv_lumii_layoutengine_OrthogonalSegment_findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(segment){
  return this.getAfterSpacing__D() + segment.getBeforeSpacing__D();
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment', 21);
function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2D(this$static, segment){
  var lineLabel;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(segment, 79) && com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 79).lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_lineSegment == this$static) {
    lineLabel = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 79).lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label;
    return lineLabel.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation == (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)?this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT?lineLabel.lv_lumii_layoutengine_AbstractContainer_minHeight / 2:lineLabel.lv_lumii_layoutengine_AbstractContainer_minWidth / 2:0;
  }
   else {
    return this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_spacing + segment.getBeforeSpacing__D();
  }
}

function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$isHorizontal__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Z(this$static){
  return this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT;
}

function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(this$static, position){
  this$static.lv_lumii_layoutengine_obstacleGraph_Segment_pos = position;
  if (this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT) {
    java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x, position);
    java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x, position);
  }
   else {
    java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint, position, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y);
    java_awt_geom_Point2D$Double_$setLocation__Ljava_awt_geom_Point2D$Double_2DDV(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint, position, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y);
  }
}

function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$setPriority__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2IV(this$static, priority){
  this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority = priority;
}

function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_OrthogonalSegment$OrthogonalLineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(pos, start_0, end, line, startPoint, endPoint){
  lv_lumii_layoutengine_OrthogonalSegment_OrthogonalSegment__DDDV.call(this, pos, start_0, end);
  if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
    this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line = line;
  }
   else {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Line type must be orthogonal for OrthogonalLineSegment creation.');
  }
  if (java_awt_geom_Point2D_$equals__Ljava_awt_geom_Point2D_2Ljava_lang_Object_2Z(startPoint, endPoint)) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Start point and end point cannot be equal.');
  }
   else if (startPoint.java_awt_geom_Point2D$Double_x != endPoint.java_awt_geom_Point2D$Double_x && startPoint.java_awt_geom_Point2D$Double_y != endPoint.java_awt_geom_Point2D$Double_y) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Points must lie on either horizontal or vertical line: startPoint=' + startPoint + ', endPoint=' + endPoint);
  }
   else {
    startPoint.java_awt_geom_Point2D$Double_y == endPoint.java_awt_geom_Point2D$Double_y?(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction = startPoint.java_awt_geom_Point2D$Double_x < endPoint.java_awt_geom_Point2D$Double_x?(lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT):(lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT)):(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction = startPoint.java_awt_geom_Point2D$Double_y < endPoint.java_awt_geom_Point2D$Double_y?(lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN):(lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_UP));
  }
  this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint = startPoint;
  this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint = endPoint;
  this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority = 0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(20, 21, {29:1, 21:1, 20:1, 59:1}, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_OrthogonalSegment$OrthogonalLineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V);
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I = function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I(s){
  var boxSegment;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(s, 112)) {
    boxSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s, 112);
    return boxSegment.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT) || boxSegment.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP?1:-1;
  }
  return java_lang_Integer_compare__III(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority, s.getSortPriority__I());
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D = function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(segment){
  return lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2D(this, segment);
}
;
_.getAfterSpacing__D = function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_getAfterSpacing__D(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_spacing;
}
;
_.getBeforeSpacing__D = function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_getBeforeSpacing__D(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_spacing;
}
;
_.getSortPriority__I = function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_getSortPriority__I(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority;
}
;
_.move__DV = function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_move__DV(position){
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$move__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2DV(this, position);
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$updateLength__V = function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_updateLength__V(){
  var box, endBonus, epsilon, lowerPoint, spacing, startBonus, upperPoint;
  upperPoint = this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT?this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x < this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x?this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint:this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint:this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y < this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y?this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint:this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint;
  lowerPoint = upperPoint == this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint?this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint:this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint;
  epsilon = this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  spacing = this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Element_spacing;
  startBonus = spacing;
  if (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3) == upperPoint || lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Line_lineGeometry) == upperPoint) {
    box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3) == upperPoint?lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line):lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line);
    (this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT || this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT?box.lv_lumii_layoutengine_AbstractContainer_left == upperPoint.java_awt_geom_Point2D$Double_x:box.lv_lumii_layoutengine_AbstractContainer_top == upperPoint.java_awt_geom_Point2D$Double_y)?(startBonus = 4 * epsilon):(startBonus = 0);
  }
  endBonus = spacing;
  if (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3) == lowerPoint || lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Line_lineGeometry) == lowerPoint) {
    box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3) == lowerPoint?lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line):lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_line);
    (this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT || this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT?box.lv_lumii_layoutengine_AbstractContainer_right == lowerPoint.java_awt_geom_Point2D$Double_x:box.lv_lumii_layoutengine_AbstractContainer_bottom == lowerPoint.java_awt_geom_Point2D$Double_y)?(endBonus = 4 * epsilon):(endBonus = 0);
  }
  lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, (this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT || this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT?upperPoint.java_awt_geom_Point2D$Double_x:upperPoint.java_awt_geom_Point2D$Double_y) - startBonus + epsilon);
  lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, (this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT || this.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT?lowerPoint.java_awt_geom_Point2D$Double_x:lowerPoint.java_awt_geom_Point2D$Double_y) + endBonus - epsilon);
}
;
_.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$OrthogonalLineSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/OrthogonalLineSegment', 20);
function lv_lumii_layoutengine_LineOptimizer$LineSegment_LineOptimizer$LineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(x_0, top_0, bottom, line, startPoint, endPoint){
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_OrthogonalSegment$OrthogonalLineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V.call(this, x_0, top_0, bottom, line, startPoint, endPoint);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(55, 20, {29:1, 55:1, 21:1, 20:1, 59:1}, lv_lumii_layoutengine_LineOptimizer$LineSegment_LineOptimizer$LineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V);
_.lv_lumii_layoutengine_LineOptimizer$LineSegment_leftBound = 0;
_.lv_lumii_layoutengine_LineOptimizer$LineSegment_rightBound = 0;
_.lv_lumii_layoutengine_LineOptimizer$LineSegment_toFix = false;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$LineSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineOptimizer/LineSegment', 55);
function lv_lumii_layoutengine_LineOptimizer$Node_$compareTo__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2I(this$static, t){
  return lv_lumii_layoutengine_LineOptimizer$Part_$compareTo__Llv_lumii_layoutengine_LineOptimizer$Part_2Llv_lumii_layoutengine_LineOptimizer$Part_2I(this$static.lv_lumii_layoutengine_LineOptimizer$Node_key, t.lv_lumii_layoutengine_LineOptimizer$Node_key);
}

function lv_lumii_layoutengine_LineOptimizer$Node_$erase__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(this$static, node){
  if (this$static == node) {
    return lv_lumii_layoutengine_LineOptimizer$Node_merge__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(node.lv_lumii_layoutengine_LineOptimizer$Node_left, node.lv_lumii_layoutengine_LineOptimizer$Node_right);
  }
   else {
    lv_lumii_layoutengine_LineOptimizer$Part_$compareTo__Llv_lumii_layoutengine_LineOptimizer$Part_2Llv_lumii_layoutengine_LineOptimizer$Part_2I(node.lv_lumii_layoutengine_LineOptimizer$Node_key, this$static.lv_lumii_layoutengine_LineOptimizer$Node_key) < 0?(this$static.lv_lumii_layoutengine_LineOptimizer$Node_left = lv_lumii_layoutengine_LineOptimizer$Node_$erase__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$Node_left, node)):(this$static.lv_lumii_layoutengine_LineOptimizer$Node_right = lv_lumii_layoutengine_LineOptimizer$Node_$erase__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$Node_right, node));
    lv_lumii_layoutengine_LineOptimizer$Node_$update__Llv_lumii_layoutengine_LineOptimizer$Node_2V(this$static);
    return this$static;
  }
}

function lv_lumii_layoutengine_LineOptimizer$Node_$find__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_LineOptimizer$Node_2(this$static, x_0){
  var y_0;
  if (this$static.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top <= x_0) {
    if (!this$static.lv_lumii_layoutengine_LineOptimizer$Node_right) {
      return this$static;
    }
    y_0 = lv_lumii_layoutengine_LineOptimizer$Node_$find__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$Node_right, x_0);
    return !y_0?this$static:y_0;
  }
  return !this$static.lv_lumii_layoutengine_LineOptimizer$Node_left?null:lv_lumii_layoutengine_LineOptimizer$Node_$find__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$Node_left, x_0);
}

function lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(this$static, x_0){
  var res, subSplit;
  if (x_0 <= this$static.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top) {
    subSplit = this$static.lv_lumii_layoutengine_LineOptimizer$Node_left?lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(this$static.lv_lumii_layoutengine_LineOptimizer$Node_left, x_0):new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(null, null);
    this$static.lv_lumii_layoutengine_LineOptimizer$Node_left = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(subSplit.lv_lumii_layoutengine_util_Pair_second, 49);
    res = new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(subSplit.lv_lumii_layoutengine_util_Pair_first, 49), this$static);
  }
   else {
    subSplit = this$static.lv_lumii_layoutengine_LineOptimizer$Node_right?lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(this$static.lv_lumii_layoutengine_LineOptimizer$Node_right, x_0):new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(null, null);
    this$static.lv_lumii_layoutengine_LineOptimizer$Node_right = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(subSplit.lv_lumii_layoutengine_util_Pair_first, 49);
    res = new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(this$static, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(subSplit.lv_lumii_layoutengine_util_Pair_second, 49));
  }
  res.lv_lumii_layoutengine_util_Pair_first != null && lv_lumii_layoutengine_LineOptimizer$Node_$update__Llv_lumii_layoutengine_LineOptimizer$Node_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(res.lv_lumii_layoutengine_util_Pair_first, 49));
  res.lv_lumii_layoutengine_util_Pair_second != null && lv_lumii_layoutengine_LineOptimizer$Node_$update__Llv_lumii_layoutengine_LineOptimizer$Node_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(res.lv_lumii_layoutengine_util_Pair_second, 49));
  return res;
}

function lv_lumii_layoutengine_LineOptimizer$Node_$update__Llv_lumii_layoutengine_LineOptimizer$Node_2V(this$static){
  this$static.lv_lumii_layoutengine_LineOptimizer$Node_max = this$static.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_x;
  !!this$static.lv_lumii_layoutengine_LineOptimizer$Node_left && (this$static.lv_lumii_layoutengine_LineOptimizer$Node_max = java_lang_Math_max__DDD(this$static.lv_lumii_layoutengine_LineOptimizer$Node_max, this$static.lv_lumii_layoutengine_LineOptimizer$Node_left.lv_lumii_layoutengine_LineOptimizer$Node_max));
  !!this$static.lv_lumii_layoutengine_LineOptimizer$Node_right && (this$static.lv_lumii_layoutengine_LineOptimizer$Node_max = java_lang_Math_max__DDD(this$static.lv_lumii_layoutengine_LineOptimizer$Node_max, this$static.lv_lumii_layoutengine_LineOptimizer$Node_right.lv_lumii_layoutengine_LineOptimizer$Node_max));
}

function lv_lumii_layoutengine_LineOptimizer$Node_LineOptimizer$Node__Llv_lumii_layoutengine_LineOptimizer$Part_2V(key){
  var rand;
  this.lv_lumii_layoutengine_LineOptimizer$Node_key = key;
  rand = new java_util_Random_Random__V;
  this.lv_lumii_layoutengine_LineOptimizer$Node_priority = com_google_gwt_lang_Cast_round_1int__DI(java_util_Random_$nextInternal__Ljava_util_Random_2ID(rand, 32));
}

function lv_lumii_layoutengine_LineOptimizer$Node_insert__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(treap, node){
  var res, subSplit;
  if (!treap) {
    res = node;
  }
   else if (node.lv_lumii_layoutengine_LineOptimizer$Node_priority > treap.lv_lumii_layoutengine_LineOptimizer$Node_priority) {
    subSplit = lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(treap, node.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top);
    node.lv_lumii_layoutengine_LineOptimizer$Node_left = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(subSplit.lv_lumii_layoutengine_util_Pair_first, 49);
    node.lv_lumii_layoutengine_LineOptimizer$Node_right = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(subSplit.lv_lumii_layoutengine_util_Pair_second, 49);
    res = node;
  }
   else {
    lv_lumii_layoutengine_LineOptimizer$Part_$compareTo__Llv_lumii_layoutengine_LineOptimizer$Part_2Llv_lumii_layoutengine_LineOptimizer$Part_2I(node.lv_lumii_layoutengine_LineOptimizer$Node_key, treap.lv_lumii_layoutengine_LineOptimizer$Node_key) < 0?(treap.lv_lumii_layoutengine_LineOptimizer$Node_left = lv_lumii_layoutengine_LineOptimizer$Node_insert__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(treap.lv_lumii_layoutengine_LineOptimizer$Node_left, node)):(treap.lv_lumii_layoutengine_LineOptimizer$Node_right = lv_lumii_layoutengine_LineOptimizer$Node_insert__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(treap.lv_lumii_layoutengine_LineOptimizer$Node_right, node));
    res = treap;
  }
  lv_lumii_layoutengine_LineOptimizer$Node_$update__Llv_lumii_layoutengine_LineOptimizer$Node_2V(res);
  return res;
}

function lv_lumii_layoutengine_LineOptimizer$Node_merge__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(left, right){
  var res;
  if (!left) {
    res = right;
  }
   else if (!right) {
    res = left;
  }
   else if (left.lv_lumii_layoutengine_LineOptimizer$Node_priority > right.lv_lumii_layoutengine_LineOptimizer$Node_priority) {
    left.lv_lumii_layoutengine_LineOptimizer$Node_right = lv_lumii_layoutengine_LineOptimizer$Node_merge__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(left.lv_lumii_layoutengine_LineOptimizer$Node_right, right);
    res = left;
  }
   else {
    right.lv_lumii_layoutengine_LineOptimizer$Node_left = lv_lumii_layoutengine_LineOptimizer$Node_merge__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(left, right.lv_lumii_layoutengine_LineOptimizer$Node_left);
    res = right;
  }
  !!res && lv_lumii_layoutengine_LineOptimizer$Node_$update__Llv_lumii_layoutengine_LineOptimizer$Node_2V(res);
  return res;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(49, 1, {29:1, 49:1}, lv_lumii_layoutengine_LineOptimizer$Node_LineOptimizer$Node__Llv_lumii_layoutengine_LineOptimizer$Part_2V);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_LineOptimizer$Node_compareTo__Ljava_lang_Object_2I(t){
  return lv_lumii_layoutengine_LineOptimizer$Node_$compareTo__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t, 49));
}
;
_.lv_lumii_layoutengine_LineOptimizer$Node_max = 0;
_.lv_lumii_layoutengine_LineOptimizer$Node_priority = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$Node_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineOptimizer/Node', 49);
function lv_lumii_layoutengine_LineOptimizer$Part_$compareTo__Llv_lumii_layoutengine_LineOptimizer$Part_2Llv_lumii_layoutengine_LineOptimizer$Part_2I(this$static, p){
  var cmp;
  cmp = java_lang_Double_compare__DDI(this$static.lv_lumii_layoutengine_LineOptimizer$Part_top, p.lv_lumii_layoutengine_LineOptimizer$Part_top);
  if (cmp != 0) {
    return cmp;
  }
  return java_lang_Double_compare__DDI(this$static.lv_lumii_layoutengine_LineOptimizer$Part_bottom, p.lv_lumii_layoutengine_LineOptimizer$Part_bottom);
}

function lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV(x_0, top_0, bottom){
  this.lv_lumii_layoutengine_LineOptimizer$Part_x = x_0;
  this.lv_lumii_layoutengine_LineOptimizer$Part_top = top_0;
  this.lv_lumii_layoutengine_LineOptimizer$Part_bottom = bottom;
}

function lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__Llv_lumii_layoutengine_OrthogonalSegment_2V(segment){
  this.lv_lumii_layoutengine_LineOptimizer$Part_x = segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
  this.lv_lumii_layoutengine_LineOptimizer$Part_top = segment.lv_lumii_layoutengine_obstacleGraph_Segment_start;
  this.lv_lumii_layoutengine_LineOptimizer$Part_bottom = segment.lv_lumii_layoutengine_obstacleGraph_Segment_end;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(63, 1, {29:1, 63:1}, lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV, lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__Llv_lumii_layoutengine_OrthogonalSegment_2V);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_LineOptimizer$Part_compareTo__Ljava_lang_Object_2I(p){
  return lv_lumii_layoutengine_LineOptimizer$Part_$compareTo__Llv_lumii_layoutengine_LineOptimizer$Part_2Llv_lumii_layoutengine_LineOptimizer$Part_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(p, 63));
}
;
_.lv_lumii_layoutengine_LineOptimizer$Part_bottom = 0;
_.lv_lumii_layoutengine_LineOptimizer$Part_top = 0;
_.lv_lumii_layoutengine_LineOptimizer$Part_x = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$Part_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineOptimizer/Part', 63);
function lv_lumii_layoutengine_LineOptimizer$SplitSegment_$updateLength__Llv_lumii_layoutengine_LineOptimizer$SplitSegment_2V(this$static){
  if (this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT) {
    lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, java_lang_Math_min__DDD(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x));
    lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, java_lang_Math_max__DDD(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_x, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_x));
  }
   else {
    lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, java_lang_Math_min__DDD(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y));
    lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, java_lang_Math_max__DDD(this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_startPoint.java_awt_geom_Point2D$Double_y, this$static.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_endPoint.java_awt_geom_Point2D$Double_y));
  }
}

function lv_lumii_layoutengine_LineOptimizer$SplitSegment_LineOptimizer$SplitSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(x_0, top_0, bottom, line, startPoint, endPoint){
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_OrthogonalSegment$OrthogonalLineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V.call(this, x_0, top_0, bottom, line, startPoint, endPoint);
  this.lv_lumii_layoutengine_LineOptimizer$SplitSegment_leftVal = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_LineOptimizer$SplitSegment_leftPos = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_LineOptimizer$SplitSegment_rightVal = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_LineOptimizer$SplitSegment_rightPos = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_LineOptimizer$SplitSegment_points = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(101, 20, {29:1, 101:1, 21:1, 20:1, 59:1}, lv_lumii_layoutengine_LineOptimizer$SplitSegment_LineOptimizer$SplitSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V);
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$updateLength__V = function lv_lumii_layoutengine_LineOptimizer$SplitSegment_updateLength__V(){
  lv_lumii_layoutengine_LineOptimizer$SplitSegment_$updateLength__Llv_lumii_layoutengine_LineOptimizer$SplitSegment_2V(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$SplitSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineOptimizer/SplitSegment', 101);
function lv_lumii_layoutengine_LineOptimizer$StraightLineComparator_$compare__Llv_lumii_layoutengine_LineOptimizer$StraightLineComparator_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line_2I(l1, l2){
  var l1End, l1Start, l2End, l2Start, res, tmp;
  l1Start = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(l1.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
  l1End = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(l1.lv_lumii_layoutengine_Line_lineGeometry);
  l2Start = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(l2.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
  l2End = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(l2.lv_lumii_layoutengine_Line_lineGeometry);
  if ((l1Start.java_awt_geom_Point2D$Double_x < l1End.java_awt_geom_Point2D$Double_x?-1:l1Start.java_awt_geom_Point2D$Double_x > l1End.java_awt_geom_Point2D$Double_x?1:l1Start.java_awt_geom_Point2D$Double_y < l1End.java_awt_geom_Point2D$Double_y?-1:l1Start.java_awt_geom_Point2D$Double_y > l1End.java_awt_geom_Point2D$Double_y?1:0) == 1) {
    tmp = l1Start;
    l1Start = l1End;
    l1End = tmp;
  }
  if ((l2Start.java_awt_geom_Point2D$Double_x < l2End.java_awt_geom_Point2D$Double_x?-1:l2Start.java_awt_geom_Point2D$Double_x > l2End.java_awt_geom_Point2D$Double_x?1:l2Start.java_awt_geom_Point2D$Double_y < l2End.java_awt_geom_Point2D$Double_y?-1:l2Start.java_awt_geom_Point2D$Double_y > l2End.java_awt_geom_Point2D$Double_y?1:0) == 1) {
    tmp = l2Start;
    l2Start = l2End;
    l2End = tmp;
  }
  res = l1Start.java_awt_geom_Point2D$Double_x < l2Start.java_awt_geom_Point2D$Double_x?-1:l1Start.java_awt_geom_Point2D$Double_x > l2Start.java_awt_geom_Point2D$Double_x?1:l1Start.java_awt_geom_Point2D$Double_y < l2Start.java_awt_geom_Point2D$Double_y?-1:l1Start.java_awt_geom_Point2D$Double_y > l2Start.java_awt_geom_Point2D$Double_y?1:0;
  return res == 0?l1End.java_awt_geom_Point2D$Double_x < l2End.java_awt_geom_Point2D$Double_x?-1:l1End.java_awt_geom_Point2D$Double_x > l2End.java_awt_geom_Point2D$Double_x?1:l1End.java_awt_geom_Point2D$Double_y < l2End.java_awt_geom_Point2D$Double_y?-1:l1End.java_awt_geom_Point2D$Double_y > l2End.java_awt_geom_Point2D$Double_y?1:0:res;
}

function lv_lumii_layoutengine_LineOptimizer$StraightLineComparator_LineOptimizer$StraightLineComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(226, 1, {}, lv_lumii_layoutengine_LineOptimizer$StraightLineComparator_LineOptimizer$StraightLineComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_LineOptimizer$StraightLineComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(l1, l2){
  return lv_lumii_layoutengine_LineOptimizer$StraightLineComparator_$compare__Llv_lumii_layoutengine_LineOptimizer$StraightLineComparator_2Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(l1, 10), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(l2, 10));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$StraightLineComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineOptimizer/StraightLineComparator', 226);
function lv_lumii_layoutengine_LineOptimizer$SweepTreap_$add__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2Llv_lumii_layoutengine_LineOptimizer$Part_2V(this$static, part){
  var first, left, leftSplit, right, rightSplit, second;
  first = lv_lumii_layoutengine_LineOptimizer$Node_$find__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, part.lv_lumii_layoutengine_LineOptimizer$Part_top);
  second = lv_lumii_layoutengine_LineOptimizer$Node_$find__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, part.lv_lumii_layoutengine_LineOptimizer$Part_bottom);
  if (first != second) {
    leftSplit = lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom);
    rightSplit = lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftSplit.lv_lumii_layoutengine_util_Pair_second, 49), second.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top);
    left = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftSplit.lv_lumii_layoutengine_util_Pair_first, 49);
    right = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightSplit.lv_lumii_layoutengine_util_Pair_second, 49);
    first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom = part.lv_lumii_layoutengine_LineOptimizer$Part_top;
    second.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top = part.lv_lumii_layoutengine_LineOptimizer$Part_bottom;
    first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom == first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top && (left = lv_lumii_layoutengine_LineOptimizer$Node_$erase__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(left, first));
    second.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom == second.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top && (right = lv_lumii_layoutengine_LineOptimizer$Node_$erase__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(right, second));
    this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root = lv_lumii_layoutengine_LineOptimizer$Node_merge__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(left, right);
  }
   else {
    second = new lv_lumii_layoutengine_LineOptimizer$Node_LineOptimizer$Node__Llv_lumii_layoutengine_LineOptimizer$Part_2V(new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV(first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_x, part.lv_lumii_layoutengine_LineOptimizer$Part_bottom, first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom));
    first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom = part.lv_lumii_layoutengine_LineOptimizer$Part_top;
    first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom == first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top && (this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root = lv_lumii_layoutengine_LineOptimizer$Node_$erase__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, first));
    second.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_bottom != second.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top && (this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root = lv_lumii_layoutengine_LineOptimizer$Node_insert__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, second));
  }
  this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root = lv_lumii_layoutengine_LineOptimizer$Node_insert__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, new lv_lumii_layoutengine_LineOptimizer$Node_LineOptimizer$Node__Llv_lumii_layoutengine_LineOptimizer$Part_2V(part));
}

function lv_lumii_layoutengine_LineOptimizer$SweepTreap_$max__Llv_lumii_layoutengine_LineOptimizer$SweepTreap_2DDD(this$static, l, r){
  var first, leftSplit, res, rightSplit;
  first = lv_lumii_layoutengine_LineOptimizer$Node_$find__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_LineOptimizer$Node_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, l);
  leftSplit = lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, first.lv_lumii_layoutengine_LineOptimizer$Node_key.lv_lumii_layoutengine_LineOptimizer$Part_top);
  rightSplit = lv_lumii_layoutengine_LineOptimizer$Node_$split__Llv_lumii_layoutengine_LineOptimizer$Node_2DLlv_lumii_layoutengine_util_Pair_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftSplit.lv_lumii_layoutengine_util_Pair_second, 49), r);
  res = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightSplit.lv_lumii_layoutengine_util_Pair_first, 49).lv_lumii_layoutengine_LineOptimizer$Node_max;
  this$static.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root = lv_lumii_layoutengine_LineOptimizer$Node_merge__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(leftSplit.lv_lumii_layoutengine_util_Pair_first, 49), lv_lumii_layoutengine_LineOptimizer$Node_merge__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightSplit.lv_lumii_layoutengine_util_Pair_first, 49), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rightSplit.lv_lumii_layoutengine_util_Pair_second, 49)));
  return res;
}

function lv_lumii_layoutengine_LineOptimizer$SweepTreap_LineOptimizer$SweepTreap__V(){
  this.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root = lv_lumii_layoutengine_LineOptimizer$Node_insert__Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2Llv_lumii_layoutengine_LineOptimizer$Node_2(this.lv_lumii_layoutengine_LineOptimizer$SweepTreap_root, new lv_lumii_layoutengine_LineOptimizer$Node_LineOptimizer$Node__Llv_lumii_layoutengine_LineOptimizer$Part_2V(new lv_lumii_layoutengine_LineOptimizer$Part_LineOptimizer$Part__DDDV($intern_20, $intern_20, $intern_53)));
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(172, 1, {}, lv_lumii_layoutengine_LineOptimizer$SweepTreap_LineOptimizer$SweepTreap__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1LineOptimizer$SweepTreap_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'LineOptimizer/SweepTreap', 172);
function lv_lumii_layoutengine_Normalizer_addConstraints__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2ZZZIV(container, segments, obstacleGraph, rectangleSides, firstBound, secondBound, segmentsVertical, recursive, includeOutsideLabels, timer){
  var boxLabel, boxLabel$iterator, c, c$iterator, c$iterator0, constraintLines, constraintSegments, constraints, i, i0, lane, newFirstBound, newSecondBound, newSegment, prev, rectangle, rectangle$iterator, rectangle$iterator0, sides, sides0;
  if ((container.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container):container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints).getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1) {
    constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(container.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container):container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
    constraintLines = segmentsVertical?constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints:constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints;
    if (constraintLines.java_util_ArrayList_array.length > 1) {
      constraintSegments = new java_util_ArrayList_ArrayList__V;
      prev = new lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_OrthogonalSegment$ConstraintSegment__Llv_lumii_layoutengine_LayoutConstraints$ConstraintLine_2IV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, constraintLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(constraintLines.java_util_ArrayList_array[0], 27)), timer);
      for (i0 = 1; i0 < constraintLines.java_util_ArrayList_array.length; i0++) {
        newSegment = new lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_OrthogonalSegment$ConstraintSegment__Llv_lumii_layoutengine_LayoutConstraints$ConstraintLine_2IV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, constraintLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(constraintLines.java_util_ArrayList_array[i0], 27)), timer);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(constraintSegments.java_util_ArrayList_array, constraintSegments.java_util_ArrayList_array.length, newSegment);
        newSegment.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_prev = prev;
        prev = newSegment;
      }
      !!firstBound && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(obstacleGraph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(firstBound, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, constraintSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(constraintSegments.java_util_ArrayList_array[0], 21))));
      !!secondBound && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(obstacleGraph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraintSegments, constraintSegments.java_util_ArrayList_array.length - 1), 21), secondBound));
      for (i = 0; i + 1 < constraintSegments.java_util_ArrayList_array.length; i++) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(obstacleGraph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, constraintSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(constraintSegments.java_util_ArrayList_array[i], 21)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, constraintSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(constraintSegments.java_util_ArrayList_array[i + 1], 21))));
      }
      for (rectangle$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2()); rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_last = rectangle$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
        lane = segmentsVertical?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, rectangle), 9):com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, rectangle), 9);
        if (lane) {
          lv_lumii_layoutengine_Normalizer_setRectangleLane__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_lang_Integer_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2V(obstacleGraph, constraintSegments, lane, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18), firstBound, secondBound);
          if (includeOutsideLabels && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rectangle, 16)) {
            for (boxLabel$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle, 16).lv_lumii_layoutengine_Box_outsideLabels)); boxLabel$iterator.java_util_AbstractList$IteratorImpl_i < boxLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
              boxLabel = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(boxLabel$iterator.java_util_AbstractList$IteratorImpl_i < boxLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(boxLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(boxLabel$iterator.java_util_AbstractList$IteratorImpl_last = boxLabel$iterator.java_util_AbstractList$IteratorImpl_i++)));
              sides0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, boxLabel), 18);
              !!sides0 && lv_lumii_layoutengine_Normalizer_setRectangleLane__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_lang_Integer_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2V(obstacleGraph, constraintSegments, lane, sides0, firstBound, secondBound);
            }
          }
        }
        sides = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18);
        newFirstBound = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_first, 21);
        newSecondBound = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_second, 21);
        recursive && lv_lumii_layoutengine_Normalizer_addConstraints__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2ZZZIV(rectangle, segments, obstacleGraph, rectangleSides, newFirstBound, newSecondBound, segmentsVertical, true, includeOutsideLabels, ++timer);
      }
      for (c$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); c$iterator0.java_util_AbstractList$IteratorImpl_i < c$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator0.java_util_AbstractList$IteratorImpl_i < c$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator0.java_util_AbstractList$IteratorImpl_last = c$iterator0.java_util_AbstractList$IteratorImpl_i++), 13));
        lane = segmentsVertical?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, c), 9):com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, c), 9);
        newFirstBound = firstBound;
        newSecondBound = secondBound;
        if (lane) {
          for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(c, false)); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
            rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
            lv_lumii_layoutengine_Normalizer_setRectangleLane__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_lang_Integer_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2V(obstacleGraph, constraintSegments, lane, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18), firstBound, secondBound);
            if (includeOutsideLabels && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rectangle, 16)) {
              for (boxLabel$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle, 16).lv_lumii_layoutengine_Box_outsideLabels)); boxLabel$iterator.java_util_AbstractList$IteratorImpl_i < boxLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
                boxLabel = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(boxLabel$iterator.java_util_AbstractList$IteratorImpl_i < boxLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(boxLabel$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(boxLabel$iterator.java_util_AbstractList$IteratorImpl_last = boxLabel$iterator.java_util_AbstractList$IteratorImpl_i++)));
                sides = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, boxLabel), 18);
                !!sides && lv_lumii_layoutengine_Normalizer_setRectangleLane__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_lang_Integer_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2V(obstacleGraph, constraintSegments, lane, sides, firstBound, secondBound);
              }
            }
          }
          lane.java_lang_Integer_value > 1 && (newFirstBound = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraintSegments, lane.java_lang_Integer_value - 2), 21));
          lane.java_lang_Integer_value <= constraintSegments.java_util_ArrayList_array.length && (newSecondBound = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraintSegments, lane.java_lang_Integer_value - 1), 21));
        }
        lv_lumii_layoutengine_Normalizer_addConstraints__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2ZZZIV(c, segments, obstacleGraph, rectangleSides, newFirstBound, newSecondBound, segmentsVertical, recursive, includeOutsideLabels, ++timer);
      }
      java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, constraintSegments);
      return;
    }
  }
  for (c$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(false)); c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_last = c$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    if (recursive || !com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(c, 62)) {
      newFirstBound = firstBound;
      newSecondBound = secondBound;
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(c, 62)) {
        sides = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, c), 18);
        newFirstBound = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_first, 21);
        newSecondBound = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_second, 21);
      }
      lv_lumii_layoutengine_Normalizer_addConstraints__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2ZZZIV(c, segments, obstacleGraph, rectangleSides, newFirstBound, newSecondBound, segmentsVertical, recursive, includeOutsideLabels, ++timer);
    }
  }
}

function lv_lumii_layoutengine_Normalizer_adjust__Llv_lumii_layoutengine_Diagram_2V(diagram){
  var lineSegments, rectangleSegments, rectangleSides;
  lineSegments = lv_lumii_layoutengine_Normalizer_generateLineSegments__Llv_lumii_layoutengine_Diagram_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, null);
  rectangleSegments = lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(diagram, false);
  rectangleSides = lv_lumii_layoutengine_Normalizer_generateRectangleSides__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(rectangleSegments);
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, true, lineSegments, rectangleSegments, rectangleSides, false, new java_util_ArrayList_ArrayList__V, new java_util_ArrayList_ArrayList__V);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)));
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, false, lineSegments, rectangleSegments, rectangleSides, false, new java_util_ArrayList_ArrayList__V, new java_util_ArrayList_ArrayList__V);
}

function lv_lumii_layoutengine_Normalizer_adjustOldRectangles__Llv_lumii_layoutengine_Diagram_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, rectangles, newCenters){
  var lineSegments, rectangleSegments, rectangleSides;
  lineSegments = lv_lumii_layoutengine_Normalizer_generateLineSegments__Llv_lumii_layoutengine_Diagram_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, null);
  rectangleSegments = lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(diagram, false);
  rectangleSides = lv_lumii_layoutengine_Normalizer_generateRectangleSides__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(rectangleSegments);
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, true, lineSegments, rectangleSegments, rectangleSides, false, rectangles, newCenters);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)));
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, false, lineSegments, rectangleSegments, rectangleSides, false, rectangles, newCenters);
}

function lv_lumii_layoutengine_Normalizer_adjustOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(diagram){
  var first, label_0, label$iterator, leftTop, lineSegmentMap, lineSegments, points, rectangleSegments, rectangleSides, second, segmentIndex;
  lineSegmentMap = new java_util_HashMap_HashMap__V;
  lineSegments = lv_lumii_layoutengine_Normalizer_generateLineSegments__Llv_lumii_layoutengine_Diagram_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, lineSegmentMap);
  rectangleSegments = lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(diagram, false);
  rectangleSides = lv_lumii_layoutengine_Normalizer_generateRectangleSides__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(rectangleSegments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[0], 4)), lv_lumii_layoutengine_Normalizer_generateOutsideLabelSegments__Llv_lumii_layoutengine_Container_2ZZLjava_util_LinkedHashMap_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, true, false, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[0], 44)), lineSegmentMap));
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, true, lineSegments, rectangleSegments, rectangleSides, true, new java_util_ArrayList_ArrayList__V, new java_util_ArrayList_ArrayList__V);
  for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 78));
    if (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10));
      leftTop = lv_lumii_layoutengine_OutsideLabel$LineLabel_$isLeftTop__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(label_0);
      segmentIndex = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
      first = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex], 3));
      second = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex + 1], 3));
      if (first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x) {
        if (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation == (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)) {
          label_0.lv_lumii_layoutengine_AbstractContainer_left = first.java_awt_geom_Point2D$Double_x - (label_0.lv_lumii_layoutengine_AbstractContainer_right - label_0.lv_lumii_layoutengine_AbstractContainer_left);
          label_0.lv_lumii_layoutengine_AbstractContainer_right = 2 * first.java_awt_geom_Point2D$Double_x - label_0.lv_lumii_layoutengine_AbstractContainer_left;
        }
         else if (leftTop) {
          label_0.lv_lumii_layoutengine_AbstractContainer_left = first.java_awt_geom_Point2D$Double_x - (label_0.lv_lumii_layoutengine_AbstractContainer_right - label_0.lv_lumii_layoutengine_AbstractContainer_left);
          label_0.lv_lumii_layoutengine_AbstractContainer_right = first.java_awt_geom_Point2D$Double_x;
        }
         else {
          label_0.lv_lumii_layoutengine_AbstractContainer_right = first.java_awt_geom_Point2D$Double_x + (label_0.lv_lumii_layoutengine_AbstractContainer_right - label_0.lv_lumii_layoutengine_AbstractContainer_left);
          label_0.lv_lumii_layoutengine_AbstractContainer_left = first.java_awt_geom_Point2D$Double_x;
        }
      }
    }
  }
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)));
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)), lv_lumii_layoutengine_Normalizer_generateOutsideLabelSegments__Llv_lumii_layoutengine_Container_2ZZLjava_util_LinkedHashMap_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, false, false, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[1], 44)), lineSegmentMap));
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)), lv_lumii_layoutengine_Normalizer_generateOutsideLabelSegments__Llv_lumii_layoutengine_Container_2ZZLjava_util_LinkedHashMap_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, false, true, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[1], 44)), lineSegmentMap));
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, false, lineSegments, rectangleSegments, rectangleSides, true, new java_util_ArrayList_ArrayList__V, new java_util_ArrayList_ArrayList__V);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[0], 4)));
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[0], 4)), lv_lumii_layoutengine_Normalizer_generateOutsideLabelSegments__Llv_lumii_layoutengine_Container_2ZZLjava_util_LinkedHashMap_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, true, true, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[0], 44)), lineSegmentMap));
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, true, lineSegments, rectangleSegments, rectangleSides, true, new java_util_ArrayList_ArrayList__V, new java_util_ArrayList_ArrayList__V);
}

function lv_lumii_layoutengine_Normalizer_adjustRectangles__Llv_lumii_layoutengine_Diagram_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, rectangles, newCenters){
  var i, i0, i1, i2, lineSegments, minHeights, minWidths, qqq, rectangle, rectangle$iterator, rectangleSegments, rectangleSides;
  lineSegments = lv_lumii_layoutengine_Normalizer_generateLineSegments__Llv_lumii_layoutengine_Diagram_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, null);
  rectangleSegments = lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(diagram, false);
  rectangleSides = lv_lumii_layoutengine_Normalizer_generateRectangleSides__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(rectangleSegments);
  minWidths = new java_util_ArrayList_ArrayList__V;
  minHeights = new java_util_ArrayList_ArrayList__V;
  for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(minWidths, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(rectangle.lv_lumii_layoutengine_AbstractContainer_minWidth)));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(minHeights, new java_lang_Double_Double__DV(rectangle.lv_lumii_layoutengine_AbstractContainer_minHeight));
  }
  for (i0 = 0; i0 < rectangles.java_util_ArrayList_array.length; i0++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i0], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i0], 11)).java_lang_Double_value * 0.5, 0);
    qqq = rectangle.lv_lumii_layoutengine_Element_spacing * 0.5;
    qqq < 3 && (qqq = 3);
    rectangle.lv_lumii_layoutengine_Element_spacing = qqq;
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[0], 44)), rectangle), 18), 0.04);
  }
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, true, lineSegments, rectangleSegments, rectangleSides, false, rectangles, newCenters);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)));
  for (i1 = 0; i1 < rectangles.java_util_ArrayList_array.length; i1++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i1], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i1], 11)).java_lang_Double_value * 0.5, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, minHeights.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minHeights.java_util_ArrayList_array[i1], 11)).java_lang_Double_value * 0.5);
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[1], 44)), rectangle), 18), 1);
  }
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, false, lineSegments, rectangleSegments, rectangleSides, false, rectangles, newCenters);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[0], 4)));
  for (i2 = 0; i2 < rectangles.java_util_ArrayList_array.length; i2++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i2], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i2], 11)).java_lang_Double_value, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, minHeights.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minHeights.java_util_ArrayList_array[i2], 11)).java_lang_Double_value * 0.5);
    lv_lumii_layoutengine_Element_$_1setSpacing__Llv_lumii_layoutengine_Element_2DV(rectangle, rectangle.lv_lumii_layoutengine_Element_spacing * 2);
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[0], 44)), rectangle), 18), 0.5);
  }
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, true, lineSegments, rectangleSegments, rectangleSides, false, rectangles, newCenters);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)));
  for (i = 0; i < rectangles.java_util_ArrayList_array.length; i++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i], 11)).java_lang_Double_value, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, minHeights.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minHeights.java_util_ArrayList_array[i], 11)).java_lang_Double_value);
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[1], 44)), rectangle), 18), 1);
  }
  lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, false, lineSegments, rectangleSegments, rectangleSides, false, rectangles, newCenters);
}

function lv_lumii_layoutengine_Normalizer_adjustStep__Llv_lumii_layoutengine_Diagram_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(diagram, horizontalNormalize, lineSegments, rectangleSegments, rectangleSides, normalizeOutsideLabels, changedRectangles, newCenters){
  var constraintObstacles, constraintSegments, obstacleGraph, segments;
  segments = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(horizontalNormalize?0:1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[horizontalNormalize?0:1], 30)));
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(horizontalNormalize?0:1, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[horizontalNormalize?0:1], 4)));
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(horizontalNormalize?0:1, lineSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegments.java_util_ArrayList_array[horizontalNormalize?0:1], 30)));
  constraintSegments = new java_util_ArrayList_ArrayList__V;
  constraintObstacles = new java_util_ArrayList_ArrayList__V;
  lv_lumii_layoutengine_Normalizer_addConstraints__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2ZZZIV(diagram, constraintSegments, constraintObstacles, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(horizontalNormalize?0:1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[horizontalNormalize?0:1], 44)), null, null, horizontalNormalize, true, normalizeOutsideLabels, 0);
  obstacleGraph = lv_lumii_layoutengine_obstacleGraph_ObstacleGraph_findObstacleGraph__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(segments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, constraintSegments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(obstacleGraph, constraintObstacles);
  lv_lumii_layoutengine_Normalizer_normalizeDiagram__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_Diagram_2ZZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(segments, obstacleGraph, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(horizontalNormalize?0:1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[horizontalNormalize?0:1], 44)), diagram, horizontalNormalize, normalizeOutsideLabels, changedRectangles, newCenters);
  lv_lumii_layoutengine_Normalizer_reconnectEndPoints__Llv_lumii_layoutengine_Diagram_2ZV(diagram, horizontalNormalize);
}

function lv_lumii_layoutengine_Normalizer_arrangeStep__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(rectangle, horizontalNormalize, rectangleSegments, rectangleSides){
  var constraintObstacles, constraintSegments, currentDirection, obstacleGraph, segments;
  segments = new java_util_ArrayList_ArrayList__V;
  currentDirection = horizontalNormalize?0:1;
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(currentDirection, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[currentDirection], 30)));
  constraintSegments = new java_util_ArrayList_ArrayList__V;
  constraintObstacles = new java_util_ArrayList_ArrayList__V;
  lv_lumii_layoutengine_Normalizer_addConstraints__Llv_lumii_layoutengine_AbstractContainer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2ZZZIV(rectangle, constraintSegments, constraintObstacles, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(currentDirection, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[currentDirection], 44)), null, null, horizontalNormalize, false, false, 0);
  obstacleGraph = lv_lumii_layoutengine_obstacleGraph_ObstacleGraph_findObstacleGraph__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(segments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(segments, constraintSegments);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(obstacleGraph, constraintObstacles);
  lv_lumii_layoutengine_Normalizer_normalizeRectangle__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_AbstractContainer_2ZV(segments, obstacleGraph, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(currentDirection, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[currentDirection], 44)), rectangle, horizontalNormalize);
}

function lv_lumii_layoutengine_Normalizer_correctPositions__Llv_lumii_layoutengine_AbstractContainer_2V(container){
  var bounds, c, c$iterator, containers, ger, moveVector, newCorner;
  containers = container.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(true);
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(container, true), 66)) {
    for (c$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(containers); c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_last = c$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      lv_lumii_layoutengine_Normalizer_correctPositions__Llv_lumii_layoutengine_AbstractContainer_2V(c);
    }
  }
   else {
    bounds = lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(container, true).getBounds__Ljava_awt_geom_Rectangle2D$Double_2();
    ger = lv_lumii_layoutengine_AbstractContainer_$findGridEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(container);
    newCorner = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(java_lang_Math_min__DDD(java_lang_Math_max__DDD(bounds.java_awt_geom_Rectangle2D$Double_x, ger.java_awt_geom_Rectangle2D$Double_x), bounds.java_awt_geom_Rectangle2D$Double_width > ger.java_awt_geom_Rectangle2D$Double_width?bounds.java_awt_geom_Rectangle2D$Double_x + bounds.java_awt_geom_Rectangle2D$Double_width - ger.java_awt_geom_Rectangle2D$Double_width:bounds.java_awt_geom_Rectangle2D$Double_x + bounds.java_awt_geom_Rectangle2D$Double_width / 2 - ger.java_awt_geom_Rectangle2D$Double_width / 2), java_lang_Math_min__DDD(java_lang_Math_max__DDD(bounds.java_awt_geom_Rectangle2D$Double_y, ger.java_awt_geom_Rectangle2D$Double_y), bounds.java_awt_geom_Rectangle2D$Double_height > ger.java_awt_geom_Rectangle2D$Double_height?bounds.java_awt_geom_Rectangle2D$Double_y + bounds.java_awt_geom_Rectangle2D$Double_height - ger.java_awt_geom_Rectangle2D$Double_height:bounds.java_awt_geom_Rectangle2D$Double_y + bounds.java_awt_geom_Rectangle2D$Double_height / 2 - ger.java_awt_geom_Rectangle2D$Double_height / 2));
    moveVector = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(newCorner.java_awt_geom_Point2D$Double_x - ger.java_awt_geom_Rectangle2D$Double_x, newCorner.java_awt_geom_Point2D$Double_y - ger.java_awt_geom_Rectangle2D$Double_y);
    (container.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container):container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints).package_private$lv_lumii_layoutengine_LayoutConstraints$transpose__Ljava_awt_geom_Point2D$Double_2V(moveVector);
    for (c$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(containers); c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_last = c$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(c, moveVector);
      lv_lumii_layoutengine_Normalizer_correctPositions__Llv_lumii_layoutengine_AbstractContainer_2V(c);
    }
  }
}

function lv_lumii_layoutengine_Normalizer_fixGrid__Llv_lumii_layoutengine_AbstractContainer_2V(container){
  var b, c, c$iterator, c$iterator0, c$iterator1, center, cer, childContainer, childContainer$iterator, col, constraints, endBound, i, i0, l, laneElements, positions, r, rectangle, rectangle$iterator, rectangle$iterator0, rectangle$iterator1, rectangle$iterator2, row, startBound, t;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(container.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container):container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39)) {
    constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(container.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container):container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
    startBound = $intern_62;
    endBound = $intern_63;
    laneElements = new java_util_ArrayList_ArrayList__V;
    for (rectangle$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2()); rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_last = rectangle$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
      col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, rectangle), 9);
      if (col) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV((rectangle.lv_lumii_layoutengine_AbstractContainer_left + rectangle.lv_lumii_layoutengine_AbstractContainer_right) / 2, col.java_lang_Integer_value, false, 0, 0));
        startBound = java_lang_Math_min__DDD(startBound, rectangle.lv_lumii_layoutengine_AbstractContainer_left);
        endBound = java_lang_Math_max__DDD(endBound, rectangle.lv_lumii_layoutengine_AbstractContainer_right);
      }
    }
    for (c$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); c$iterator0.java_util_AbstractList$IteratorImpl_i < c$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator0.java_util_AbstractList$IteratorImpl_i < c$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator0.java_util_AbstractList$IteratorImpl_last = c$iterator0.java_util_AbstractList$IteratorImpl_i++), 13));
      col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, c), 9);
      if (col) {
        for (rectangle$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(c, false)); rectangle$iterator1.java_util_AbstractList$IteratorImpl_i < rectangle$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator1.java_util_AbstractList$IteratorImpl_i < rectangle$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator1.java_util_AbstractList$IteratorImpl_last = rectangle$iterator1.java_util_AbstractList$IteratorImpl_i++), 12));
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV((rectangle.lv_lumii_layoutengine_AbstractContainer_left + rectangle.lv_lumii_layoutengine_AbstractContainer_right) / 2, col.java_lang_Integer_value, false, 0, 0));
          startBound = java_lang_Math_min__DDD(startBound, rectangle.lv_lumii_layoutengine_AbstractContainer_left);
          endBound = java_lang_Math_max__DDD(endBound, rectangle.lv_lumii_layoutengine_AbstractContainer_right);
        }
      }
    }
    if (startBound > endBound) {
      cer = lv_lumii_layoutengine_AbstractContainer_$findNextRectangleEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(container);
      cer?(startBound = endBound = cer.java_awt_geom_Rectangle2D$Double_x + cer.java_awt_geom_Rectangle2D$Double_width / 2):(startBound = endBound = 0);
    }
    positions = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$arrangeGridBorders__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_util_ArrayList_2ZDDLjava_util_ArrayList_2(constraints, laneElements, true, startBound, endBound);
    for (i0 = 1; i0 < positions.java_util_ArrayList_array.length; i0++) {
      lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(constraints, i0, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, positions.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(positions.java_util_ArrayList_array[i0], 11)).java_lang_Double_value);
    }
    startBound = $intern_62;
    endBound = $intern_63;
    laneElements = new java_util_ArrayList_ArrayList__V;
    for (rectangle$iterator2 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2()); rectangle$iterator2.java_util_AbstractList$IteratorImpl_i < rectangle$iterator2.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator2.java_util_AbstractList$IteratorImpl_i < rectangle$iterator2.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator2.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator2.java_util_AbstractList$IteratorImpl_last = rectangle$iterator2.java_util_AbstractList$IteratorImpl_i++), 12));
      row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, rectangle), 9);
      if (row) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV((rectangle.lv_lumii_layoutengine_AbstractContainer_top + rectangle.lv_lumii_layoutengine_AbstractContainer_bottom) / 2, row.java_lang_Integer_value, false, 0, 0));
        startBound = java_lang_Math_min__DDD(startBound, rectangle.lv_lumii_layoutengine_AbstractContainer_top);
        endBound = java_lang_Math_max__DDD(endBound, rectangle.lv_lumii_layoutengine_AbstractContainer_bottom);
      }
    }
    for (c$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); c$iterator1.java_util_AbstractList$IteratorImpl_i < c$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator1.java_util_AbstractList$IteratorImpl_i < c$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator1.java_util_AbstractList$IteratorImpl_last = c$iterator1.java_util_AbstractList$IteratorImpl_i++), 13));
      row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, c), 9);
      if (row) {
        for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(c, false)); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV((rectangle.lv_lumii_layoutengine_AbstractContainer_top + rectangle.lv_lumii_layoutengine_AbstractContainer_bottom) / 2, row.java_lang_Integer_value, false, 0, 0));
          startBound = java_lang_Math_min__DDD(startBound, rectangle.lv_lumii_layoutengine_AbstractContainer_top);
          endBound = java_lang_Math_max__DDD(endBound, rectangle.lv_lumii_layoutengine_AbstractContainer_bottom);
        }
      }
    }
    if (startBound > endBound) {
      cer = lv_lumii_layoutengine_AbstractContainer_$findNextRectangleEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(container);
      cer?(startBound = endBound = cer.java_awt_geom_Rectangle2D$Double_y + cer.java_awt_geom_Rectangle2D$Double_height / 2):(startBound = endBound = 0);
    }
    positions = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$arrangeGridBorders__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_util_ArrayList_2ZDDLjava_util_ArrayList_2(constraints, laneElements, false, startBound, endBound);
    for (i = 1; i < positions.java_util_ArrayList_array.length; i++) {
      lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(constraints, i, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, positions.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(positions.java_util_ArrayList_array[i], 11)).java_lang_Double_value);
    }
    for (c$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(false)); c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      c = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(c$iterator.java_util_AbstractList$IteratorImpl_i < c$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(c$iterator.java_util_AbstractList$IteratorImpl_last = c$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, c), 9);
      col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, c), 9);
      if (col) {
        l = col.java_lang_Integer_value == 1?$intern_20:lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, col.java_lang_Integer_value);
        r = col.java_lang_Integer_value == constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length?$intern_53:lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, col.java_lang_Integer_value);
      }
       else {
        l = $intern_20;
        r = $intern_53;
      }
      if (row) {
        t = row.java_lang_Integer_value == 1?$intern_20:lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, row.java_lang_Integer_value);
        b = row.java_lang_Integer_value == constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length?$intern_53:lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, row.java_lang_Integer_value);
      }
       else {
        t = $intern_20;
        b = $intern_53;
      }
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(c, 62)) {
        center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((c.lv_lumii_layoutengine_AbstractContainer_left + c.lv_lumii_layoutengine_AbstractContainer_right) / 2, (c.lv_lumii_layoutengine_AbstractContainer_top + c.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
        if (!(l <= center.java_awt_geom_Point2D$Double_x && center.java_awt_geom_Point2D$Double_x <= r && t <= center.java_awt_geom_Point2D$Double_y && center.java_awt_geom_Point2D$Double_y <= b)) {
          lv_lumii_layoutengine_GeometryHelper_movePointInside__Ljava_awt_geom_Point2D$Double_2DDDDDV(center, l, t, r, b, 0);
          lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(c, center);
        }
      }
       else if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(c, 13)) {
        for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(c.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2(false)); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
          center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((rectangle.lv_lumii_layoutengine_AbstractContainer_left + rectangle.lv_lumii_layoutengine_AbstractContainer_right) / 2, (rectangle.lv_lumii_layoutengine_AbstractContainer_top + rectangle.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
          if (!(l <= center.java_awt_geom_Point2D$Double_x && center.java_awt_geom_Point2D$Double_x <= r && t <= center.java_awt_geom_Point2D$Double_y && center.java_awt_geom_Point2D$Double_y <= b)) {
            lv_lumii_layoutengine_GeometryHelper_movePointInside__Ljava_awt_geom_Point2D$Double_2DDDDDV(center, l, t, r, b, 0);
            lv_lumii_layoutengine_AbstractContainer_$setCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(rectangle, center);
          }
        }
      }
    }
  }
  for (childContainer$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); childContainer$iterator.java_util_AbstractList$IteratorImpl_i < childContainer$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    childContainer = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(childContainer$iterator.java_util_AbstractList$IteratorImpl_i < childContainer$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(childContainer$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(childContainer$iterator.java_util_AbstractList$IteratorImpl_last = childContainer$iterator.java_util_AbstractList$IteratorImpl_i++), 13));
    lv_lumii_layoutengine_Normalizer_fixGrid__Llv_lumii_layoutengine_AbstractContainer_2V(childContainer);
  }
}

function lv_lumii_layoutengine_Normalizer_generateLineSegments__Llv_lumii_layoutengine_Diagram_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(diagram, lineSegmentMap){
  var curr, currSegment, it, line, line$iterator, lines, prev, prevSegment, segmentVertical, segments, singleLineSegments;
  segments = new java_util_ArrayList_ArrayList__V;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(segments, new java_util_ArrayList_ArrayList__V);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(segments, new java_util_ArrayList_ArrayList__V);
  lines = lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram);
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    if (!!line.lv_lumii_layoutengine_Line_lineGeometry && line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      singleLineSegments = null;
      if (lineSegmentMap) {
        singleLineSegments = new java_util_ArrayList_ArrayList__V;
        lineSegmentMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(line, singleLineSegments);
      }
      prev = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
      prevSegment = null;
      for (it = new java_util_AbstractList$ListIteratorImpl_AbstractList$ListIteratorImpl__Ljava_util_AbstractList_2IV(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 1); it.hasNext__Z();) {
        curr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.next__Ljava_lang_Object_2(), 3);
        segmentVertical = curr.java_awt_geom_Point2D$Double_x == prev.java_awt_geom_Point2D$Double_x;
        currSegment = new lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_OrthogonalSegment$OrthogonalLineSegment__DDDLlv_lumii_layoutengine_Line_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(segmentVertical?curr.java_awt_geom_Point2D$Double_x:curr.java_awt_geom_Point2D$Double_y, 0, 0, line, prev, curr);
        currSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$updateLength__V();
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentVertical?0:1, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[segmentVertical?0:1], 4)), currSegment);
        currSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev = prevSegment;
        !!prevSegment && (prevSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next = currSegment);
        prevSegment = currSegment;
        !!singleLineSegments && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(singleLineSegments.java_util_ArrayList_array, singleLineSegments.java_util_ArrayList_array.length, currSegment) , true);
        prev = curr;
      }
    }
  }
  lv_lumii_layoutengine_Normalizer_orderSegments__Ljava_util_ArrayList_2V(segments);
  return segments;
}

function lv_lumii_layoutengine_Normalizer_generateOutsideLabelSegments__Llv_lumii_layoutengine_Container_2ZZLjava_util_LinkedHashMap_2Ljava_util_HashMap_2Ljava_util_ArrayList_2(container, segmentsVertical, sidesVertical, rectangleSides, lineSegmentMap){
  var epsilon, firstBound, firstSegmentType, label_0, label$iterator, labels, leftSegment, leftTop, line, points, rightSegment, secondBound, secondSegmentType, segmentIndex, segments, sideHorizontal, spacing;
  segments = new java_util_ArrayList_ArrayList__V;
  if (segmentsVertical) {
    firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT);
    secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT;
  }
   else {
    firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP);
    secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM;
  }
  epsilon = container.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  labels = lv_lumii_layoutengine_Container_$getDescendantOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(container);
  for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(labels); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 78));
    spacing = label_0.lv_lumii_layoutengine_Element_spacing;
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10);
    if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      continue;
    }
    points = line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
    segmentIndex = label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
    sideHorizontal = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex], 3)).java_awt_geom_Point2D$Double_y == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex + 1], 3)).java_awt_geom_Point2D$Double_y;
    leftTop = lv_lumii_layoutengine_OutsideLabel$LineLabel_$isLeftTop__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(label_0);
    if (sidesVertical ^ sideHorizontal) {
      firstBound = segmentsVertical?label_0.lv_lumii_layoutengine_AbstractContainer_top:label_0.lv_lumii_layoutengine_AbstractContainer_left;
      secondBound = segmentsVertical?label_0.lv_lumii_layoutengine_AbstractContainer_bottom:label_0.lv_lumii_layoutengine_AbstractContainer_right;
      if (sidesVertical ^ segmentsVertical) {
        label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation != (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER) && (leftTop?(secondBound -= epsilon):(firstBound += epsilon));
      }
       else {
        firstBound += epsilon - spacing;
        secondBound += spacing - epsilon;
      }
      leftSegment = new lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_OrthogonalSegment$LabelSegment$LineLabelSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Label_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2V(segmentsVertical?label_0.lv_lumii_layoutengine_AbstractContainer_left:label_0.lv_lumii_layoutengine_AbstractContainer_top, firstBound, secondBound, firstSegmentType, label_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegmentMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(line), 4), segmentIndex), 20));
      rightSegment = new lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_OrthogonalSegment$LabelSegment$LineLabelSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Label_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2V(segmentsVertical?label_0.lv_lumii_layoutengine_AbstractContainer_right:label_0.lv_lumii_layoutengine_AbstractContainer_bottom, firstBound, secondBound, secondSegmentType, label_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineSegmentMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(line), 4), segmentIndex), 20));
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, leftSegment);
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, rightSegment);
      java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, label_0, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(leftSegment, rightSegment));
    }
  }
  return segments;
}

function lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(container, singleLevel){
  var epsilon, firstBound, firstSegmentType, i, leftSegment, rectangle, rectangle$iterator, rectangles, rightSegment, secondBound, secondSegmentType, segments, segmentsVertical, spacing;
  rectangles = singleLevel?container.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2(false):lv_lumii_layoutengine_AbstractContainer_$getDescendantRectangles__Llv_lumii_layoutengine_AbstractContainer_2ZZLjava_util_ArrayList_2(container, false, false);
  segments = new java_util_ArrayList_ArrayList__V;
  for (i = 0; i < 2; i++) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(segments, new java_util_ArrayList_ArrayList__V);
    segmentsVertical = i == 0;
    if (segmentsVertical) {
      firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT);
      secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT;
    }
     else {
      firstSegmentType = (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP);
      secondSegmentType = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM;
    }
    epsilon = container.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
    for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      firstBound = segmentsVertical?rectangle.lv_lumii_layoutengine_AbstractContainer_top:rectangle.lv_lumii_layoutengine_AbstractContainer_left;
      secondBound = segmentsVertical?rectangle.lv_lumii_layoutengine_AbstractContainer_bottom:rectangle.lv_lumii_layoutengine_AbstractContainer_right;
      spacing = rectangle.lv_lumii_layoutengine_Element_spacing;
      leftSegment = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_createRectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2(segmentsVertical?rectangle.lv_lumii_layoutengine_AbstractContainer_left:rectangle.lv_lumii_layoutengine_AbstractContainer_top, firstBound - spacing + epsilon, secondBound + spacing - epsilon, firstSegmentType, rectangle);
      rightSegment = lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_createRectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2(segmentsVertical?rectangle.lv_lumii_layoutengine_AbstractContainer_right:rectangle.lv_lumii_layoutengine_AbstractContainer_bottom, firstBound - spacing + epsilon, secondBound + spacing - epsilon, secondSegmentType, rectangle);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 4)), leftSegment);
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 4)), rightSegment);
    }
  }
  return segments;
}

function lv_lumii_layoutengine_Normalizer_generateRectangleSides__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(segments){
  var i, j, rectangleSides, s, sides;
  rectangleSides = new java_util_ArrayList_ArrayList__V;
  for (i = 0; i < 2; i++) {
    s = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 4));
    sides = new java_util_LinkedHashMap_LinkedHashMap__V;
    for (j = 0; j < s.java_util_ArrayList_array.length; j += 2) {
      java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(sides, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, s.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s.java_util_ArrayList_array[j], 24)).package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2(), new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, s.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s.java_util_ArrayList_array[j], 24)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, s.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s.java_util_ArrayList_array[j + 1], 24))));
    }
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array, rectangleSides.java_util_ArrayList_array.length, sides);
  }
  return rectangleSides;
}

function lv_lumii_layoutengine_Normalizer_getLinePriorityClass__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2I(leftNext, segment, rightNext){
  var leftDir, rightDir;
  leftDir = !leftNext?1:(leftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || leftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN) ^ leftNext == segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next?0:2;
  rightDir = !rightNext?1:(rightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || rightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN) ^ rightNext == segment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next?0:2;
  return 3 * leftDir + (rightDir == 0?~~(leftDir / 2):rightDir == 1?2 - leftDir:~~((leftDir + 3) / 2));
}

function lv_lumii_layoutengine_Normalizer_growDescendants__Ljava_util_LinkedHashSet_2Llv_lumii_layoutengine_AbstractContainer_2V(part, currentContainer){
  var container, container$iterator, ger, i, i0, i1, i2, minHeights, minWidths, rectangle, rectangle$iterator, rectangle$iterator0, rectangleSegments, rectangleSides, rectangles;
  if (!!part && !part.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(currentContainer)) {
    return;
  }
  for (container$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(currentContainer.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(false)); container$iterator.java_util_AbstractList$IteratorImpl_i < container$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    container = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(container$iterator.java_util_AbstractList$IteratorImpl_i < container$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(container$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(container$iterator.java_util_AbstractList$IteratorImpl_last = container$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    lv_lumii_layoutengine_Normalizer_growDescendants__Ljava_util_LinkedHashSet_2Llv_lumii_layoutengine_AbstractContainer_2V(part, container);
  }
  if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(currentContainer, 62)) {
    return;
  }
  lv_lumii_layoutengine_Normalizer_fixGrid__Llv_lumii_layoutengine_AbstractContainer_2V(currentContainer);
  rectangles = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(currentContainer.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2(false));
  for (rectangle$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_last = rectangle$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
    lv_lumii_layoutengine_AbstractContainer_$collapse__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(rectangle, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((rectangle.lv_lumii_layoutengine_AbstractContainer_left + rectangle.lv_lumii_layoutengine_AbstractContainer_right) / 2, (rectangle.lv_lumii_layoutengine_AbstractContainer_top + rectangle.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
  }
  rectangleSegments = lv_lumii_layoutengine_Normalizer_generateRectangleSegments__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2(currentContainer, true);
  rectangleSides = lv_lumii_layoutengine_Normalizer_generateRectangleSides__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(rectangleSegments);
  minWidths = new java_util_ArrayList_ArrayList__V;
  minHeights = new java_util_ArrayList_ArrayList__V;
  for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(minWidths, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(rectangle.lv_lumii_layoutengine_AbstractContainer_minWidth)));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(minHeights, new java_lang_Double_Double__DV(rectangle.lv_lumii_layoutengine_AbstractContainer_minHeight));
  }
  for (i0 = 0; i0 < rectangles.java_util_ArrayList_array.length; i0++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i0], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i0], 11)).java_lang_Double_value * 0.5, 0);
    lv_lumii_layoutengine_Element_$_1setSpacing__Llv_lumii_layoutengine_Element_2DV(rectangle, rectangle.lv_lumii_layoutengine_Element_spacing * 0.5);
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[0], 44)), rectangle), 18), 0.04);
  }
  lv_lumii_layoutengine_Normalizer_arrangeStep__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(currentContainer, true, rectangleSegments, rectangleSides);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)));
  for (i1 = 0; i1 < rectangles.java_util_ArrayList_array.length; i1++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i1], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i1], 11)).java_lang_Double_value * 0.5, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, minHeights.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minHeights.java_util_ArrayList_array[i1], 11)).java_lang_Double_value * 0.5);
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[1], 44)), rectangle), 18), 1);
  }
  lv_lumii_layoutengine_Normalizer_arrangeStep__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(currentContainer, false, rectangleSegments, rectangleSides);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[0], 4)));
  for (i2 = 0; i2 < rectangles.java_util_ArrayList_array.length; i2++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i2], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i2], 11)).java_lang_Double_value, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, minHeights.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minHeights.java_util_ArrayList_array[i2], 11)).java_lang_Double_value * 0.5);
    lv_lumii_layoutengine_Element_$_1setSpacing__Llv_lumii_layoutengine_Element_2DV(rectangle, rectangle.lv_lumii_layoutengine_Element_spacing * 2);
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[0], 44)), rectangle), 18), 0.5);
  }
  lv_lumii_layoutengine_Normalizer_arrangeStep__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(currentContainer, true, rectangleSegments, rectangleSides);
  lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSegments.java_util_ArrayList_array[1], 4)));
  for (i = 0; i < rectangles.java_util_ArrayList_array.length; i++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, rectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangles.java_util_ArrayList_array[i], 12));
    lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(rectangle, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, minWidths.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minWidths.java_util_ArrayList_array[i], 11)).java_lang_Double_value, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, minHeights.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(minHeights.java_util_ArrayList_array[i], 11)).java_lang_Double_value);
    lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, rectangleSides.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.java_util_ArrayList_array[1], 44)), rectangle), 18), 1);
  }
  lv_lumii_layoutengine_Normalizer_arrangeStep__Llv_lumii_layoutengine_AbstractContainer_2ZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(currentContainer, false, rectangleSegments, rectangleSides);
  ger = lv_lumii_layoutengine_AbstractContainer_$findGridEnclosingRectangle__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2(currentContainer);
  lv_lumii_layoutengine_AbstractContainer_$setCurrentMinSize__Llv_lumii_layoutengine_AbstractContainer_2DDV(currentContainer, java_lang_Math_max__DDD(currentContainer.lv_lumii_layoutengine_AbstractContainer_minWidth, ger.java_awt_geom_Rectangle2D$Double_width), java_lang_Math_max__DDD(currentContainer.lv_lumii_layoutengine_AbstractContainer_minHeight, ger.java_awt_geom_Rectangle2D$Double_height));
}

function lv_lumii_layoutengine_Normalizer_normalizeDiagram__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_Diagram_2ZZLjava_util_ArrayList_2Ljava_util_ArrayList_2V(segments, obstacleGraph, rectangleSides, diagram, horizontalNormalize, normalizeOutsideLabels, changedRectangles, newCenters){
  var box, box$iterator, box$iterator0, boxSegment, boxSides, boxesWithOutsideLabels, boxesWithStraightLines, changedRectIndices, changedRectSet, changedRectangleMoveDistances, descendantBoxes, endPoint, epsilon, i, i0, i1, i2, i3, i4, index_0, label_0, label$iterator, labelSegment, labelSides, leftSegment, line, line$iterator, lineSegment, magicEpsilon, moveX, moveY, newCenter, newPositions, obstacle, obstacle$iterator, oldCenter, oldCenters1, oldCenters2, optimalDistance, optimizer, parentLeftSegment, parentRightSegment, prevRect, rectChanged, rectList, rectangle, rectangle$iterator, rectangle$iterator0, rectangle$iterator1, rightSegment, segment, segmentIndices, side, sides, sides$iterator;
  segmentIndices = new java_util_LinkedHashMap_LinkedHashMap__V;
  changedRectSet = new java_util_HashSet_HashSet__Ljava_util_Collection_2V(changedRectangles);
  optimizer = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(segments.java_util_ArrayList_array.length);
  magicEpsilon = diagram.lv_lumii_layoutengine_Diagram_epsilon / $intern_55 * 0.005;
  optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon = magicEpsilon;
  for (i0 = 0; i0 < segments.java_util_ArrayList_array.length; i0++) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i0], 21));
    java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, segment, java_lang_Integer_valueOf__ILjava_lang_Integer_2(i0));
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, i0, segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos);
    (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(segment, 79) || horizontalNormalize == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$isHorizontal__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 79).lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_lineSegment)) && lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addQuadraticConstantDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IDDV(optimizer, i0, segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos, (normalizeOutsideLabels && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(segment, 20)?1000:1) * 0.001);
  }
  for (obstacle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(obstacleGraph); obstacle$iterator.java_util_AbstractList$IteratorImpl_i < obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    obstacle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(obstacle$iterator.java_util_AbstractList$IteratorImpl_i < obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(obstacle$iterator.java_util_AbstractList$IteratorImpl_last = obstacle$iterator.java_util_AbstractList$IteratorImpl_i++), 18));
    leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_first, 21);
    rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_second, 21);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(rightSegment));
  }
  for (sides$iterator = java_util_AbstractMap$2_$iterator__Ljava_util_AbstractMap$2_2Ljava_util_Iterator_2(new java_util_AbstractMap$2_AbstractMap$2__Ljava_util_AbstractMap_2V(rectangleSides)); sides$iterator.java_util_AbstractMap$2$1_val$outerIter2.hasNext__Z();) {
    sides = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$2$1_$next__Ljava_util_AbstractMap$2$1_2Ljava_lang_Object_2(sides$iterator), 18);
    leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_first, 24);
    rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_second, 24);
    rectangle = leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2();
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, horizontalNormalize?rectangle.lv_lumii_layoutengine_AbstractContainer_minWidth:rectangle.lv_lumii_layoutengine_AbstractContainer_minHeight);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, 10);
  }
  rectList = new java_util_ArrayList_ArrayList__V;
  for (i1 = 0; i1 < changedRectangles.java_util_ArrayList_array.length; i1++) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, changedRectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(changedRectangles.java_util_ArrayList_array[i1], 12));
    if (lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(rectangle, false) == diagram) {
      leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_first, 24);
      rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_second, 24);
      lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addMeanDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, horizontalNormalize?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[i1], 3)).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i1, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[i1], 3)).java_awt_geom_Point2D$Double_y, 10);
      java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(rectList, lv_lumii_layoutengine_AbstractContainer_$getDescendantRectangles__Llv_lumii_layoutengine_AbstractContainer_2ZZLjava_util_ArrayList_2(rectangle, false, false));
    }
  }
  for (rectangle$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(diagram, false)); rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator0.java_util_AbstractList$IteratorImpl_i < rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator0.java_util_AbstractList$IteratorImpl_last = rectangle$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
    if (!changedRectSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(rectangle)) {
      leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_first, 24);
      rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_second, 24);
      lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addMeanDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, (rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos + leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) / 2, 1);
      java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(rectList, lv_lumii_layoutengine_AbstractContainer_$getDescendantRectangles__Llv_lumii_layoutengine_AbstractContainer_2ZZLjava_util_ArrayList_2(rectangle, false, false));
    }
  }
  index_0 = 0;
  changedRectIndices = new java_util_HashMap_HashMap__V;
  for (rectangle$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(changedRectangles); rectangle$iterator1.java_util_AbstractList$IteratorImpl_i < rectangle$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator1.java_util_AbstractList$IteratorImpl_i < rectangle$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator1.java_util_AbstractList$IteratorImpl_last = rectangle$iterator1.java_util_AbstractList$IteratorImpl_i++), 12));
    changedRectIndices.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangle, java_lang_Integer_valueOf__ILjava_lang_Integer_2(index_0++));
  }
  changedRectangleMoveDistances = new java_util_ArrayList_ArrayList__V;
  for (i2 = 0; i2 < changedRectangles.java_util_ArrayList_array.length; i2++) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(changedRectangleMoveDistances, (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(horizontalNormalize?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[i2], 3)).java_awt_geom_Point2D$Double_x - lv_lumii_layoutengine_AbstractContainer_$getCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, changedRectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(changedRectangles.java_util_ArrayList_array[i2], 12))).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[i2], 3)).java_awt_geom_Point2D$Double_y - lv_lumii_layoutengine_AbstractContainer_$getCenter__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, changedRectangles.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(changedRectangles.java_util_ArrayList_array[i2], 12))).java_awt_geom_Point2D$Double_y)));
  }
  for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectList); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    if (rectangleSides.java_util_LinkedHashMap_map.containsKey__Ljava_lang_Object_2Z(rectangle)) {
      prevRect = lv_lumii_layoutengine_AbstractContainer_$getPrevRect__Llv_lumii_layoutengine_AbstractContainer_2ZLlv_lumii_layoutengine_AbstractContainer_2(rectangle, false);
      leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_first, 24);
      rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_second, 24);
      parentLeftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, prevRect), 18).lv_lumii_layoutengine_util_Pair_first, 24);
      parentRightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, prevRect), 18).lv_lumii_layoutengine_util_Pair_second, 24);
      rectChanged = changedRectSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(rectangle);
      if (rectChanged) {
        index_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(changedRectIndices.get__Ljava_lang_Object_2Ljava_lang_Object_2(rectangle), 9).java_lang_Integer_value;
        optimalDistance = horizontalNormalize?(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[index_0], 3)).java_awt_geom_Point2D$Double_x:(com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, newCenters.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newCenters.java_util_ArrayList_array[index_0], 3)).java_awt_geom_Point2D$Double_y;
      }
       else {
        optimalDistance = (leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos + rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) / 2;
      }
      optimalDistance -= (parentLeftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos + parentRightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) / 2;
      if (changedRectSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(prevRect)) {
        index_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(changedRectIndices.get__Ljava_lang_Object_2Ljava_lang_Object_2(prevRect), 9).java_lang_Integer_value;
        optimalDistance -= (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(index_0, changedRectangleMoveDistances.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(changedRectangleMoveDistances.java_util_ArrayList_array[index_0], 11)).java_lang_Double_value;
      }
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanConstantDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, parentLeftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, parentRightSegment), 9).java_lang_Integer_value, optimalDistance, rectChanged?10:1);
    }
  }
  if (normalizeOutsideLabels) {
    for (label$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantOutsideLabels__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram)); label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      label_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(label$iterator.java_util_AbstractList$IteratorImpl_i < label$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(label$iterator.java_util_AbstractList$IteratorImpl_last = label$iterator.java_util_AbstractList$IteratorImpl_i++), 78));
      labelSides = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, label_0), 18);
      if (labelSides) {
        lineSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labelSides.lv_lumii_layoutengine_util_Pair_first, 79).lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_lineSegment;
        if ((lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || lineSegment.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT) ^ horizontalNormalize) {
          if (label_0.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation != (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)) {
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, labelSides.lv_lumii_layoutengine_util_Pair_first), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, lineSegment), 9).java_lang_Integer_value, $intern_7);
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, labelSides.lv_lumii_layoutengine_util_Pair_second), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, lineSegment), 9).java_lang_Integer_value, $intern_7);
          }
        }
         else if (label_0.lv_lumii_layoutengine_OutsideLabel_position == 0 || label_0.lv_lumii_layoutengine_OutsideLabel_position == 1) {
          line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(label_0.lv_lumii_layoutengine_Element_owner, 10);
          if (label_0.lv_lumii_layoutengine_OutsideLabel_position == 0) {
            box = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
            side = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry, 74).lv_lumii_layoutengine_LineGeometry$OrthogonalLine_startSide;
          }
           else {
            box = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
            side = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry, 74).lv_lumii_layoutengine_LineGeometry$OrthogonalLine_endSide;
          }
          boxSides = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, box), 18);
          if (side == (lv_lumii_layoutengine_Box$BoxSide_$clinit__V() , lv_lumii_layoutengine_Box$BoxSide_LEFT) || side == lv_lumii_layoutengine_Box$BoxSide_TOP) {
            labelSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labelSides.lv_lumii_layoutengine_util_Pair_second, 24);
            boxSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxSides.lv_lumii_layoutengine_util_Pair_first, 24);
          }
           else {
            labelSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labelSides.lv_lumii_layoutengine_util_Pair_first, 24);
            boxSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(labelSides.lv_lumii_layoutengine_util_Pair_second, 24);
          }
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, labelSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, boxSegment), 9).java_lang_Integer_value, $intern_7);
        }
      }
    }
  }
  descendantBoxes = lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram);
  boxesWithOutsideLabels = new java_util_ArrayList_ArrayList__V;
  oldCenters1 = new java_util_ArrayList_ArrayList__V;
  if (!normalizeOutsideLabels) {
    for (box$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(descendantBoxes); box$iterator0.java_util_AbstractList$IteratorImpl_i < box$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator0.java_util_AbstractList$IteratorImpl_i < box$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator0.java_util_AbstractList$IteratorImpl_last = box$iterator0.java_util_AbstractList$IteratorImpl_i++), 16));
      if (box.lv_lumii_layoutengine_Box_outsideLabels.java_util_HashSet_map.size__I() != 0 && java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(changedRectangles, box, 0) == -1) {
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(boxesWithOutsideLabels.java_util_ArrayList_array, boxesWithOutsideLabels.java_util_ArrayList_array.length, box);
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(oldCenters1, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2, (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
      }
    }
  }
  boxesWithStraightLines = new java_util_ArrayList_ArrayList__V;
  oldCenters2 = new java_util_ArrayList_ArrayList__V;
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(descendantBoxes); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
    if (java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(changedRectangles, box, 0) == -1) {
      for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(box.lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
        line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
        if (!!line.lv_lumii_layoutengine_Line_lineGeometry && line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
          com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(boxesWithStraightLines.java_util_ArrayList_array, boxesWithStraightLines.java_util_ArrayList_array.length, box);
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(oldCenters2, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2, (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
          break;
        }
      }
    }
  }
  newPositions = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(optimizer);
  epsilon = diagram.lv_lumii_layoutengine_Diagram_epsilon;
  for (i3 = 0; i3 < segments.java_util_ArrayList_array.length; i3++) {
    java_lang_Math_abs__DD(newPositions[i3] - (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i3], 21)).lv_lumii_layoutengine_obstacleGraph_Segment_pos) > epsilon && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i3], 21)).move__DV(newPositions[i3]);
  }
  for (i4 = 0; i4 < boxesWithOutsideLabels.java_util_ArrayList_array.length; i4++) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i4, boxesWithOutsideLabels.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxesWithOutsideLabels.java_util_ArrayList_array[i4], 16));
    oldCenter = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i4, oldCenters1.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldCenters1.java_util_ArrayList_array[i4], 3));
    newCenter = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2, (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    moveX = newCenter.java_awt_geom_Point2D$Double_x - oldCenter.java_awt_geom_Point2D$Double_x;
    moveY = newCenter.java_awt_geom_Point2D$Double_y - oldCenter.java_awt_geom_Point2D$Double_y;
    if ((moveX <= 0?0 - moveX:moveX) > epsilon || (moveY <= 0?0 - moveY:moveY) > epsilon) {
      new java_awt_geom_Point2D$Double_Point2D$Double__DDV(moveX, moveY);
      for (label$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(box.lv_lumii_layoutengine_Box_outsideLabels.java_util_HashSet_map)); label$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
        com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(label$iterator));
        null.nullMethod();
      }
    }
  }
  for (i = 0; i < boxesWithStraightLines.java_util_ArrayList_array.length; i++) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, boxesWithStraightLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxesWithStraightLines.java_util_ArrayList_array[i], 16));
    oldCenter = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, oldCenters2.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(oldCenters2.java_util_ArrayList_array[i], 3));
    newCenter = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2, (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
    moveX = newCenter.java_awt_geom_Point2D$Double_x - oldCenter.java_awt_geom_Point2D$Double_x;
    moveY = newCenter.java_awt_geom_Point2D$Double_y - oldCenter.java_awt_geom_Point2D$Double_y;
    if ((moveX <= 0?0 - moveX:moveX) > epsilon || (moveY <= 0?0 - moveY:moveY) > epsilon) {
      for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(box.lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
        line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
        if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
          box == lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)?(endPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3)):(endPoint = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry));
          endPoint.java_awt_geom_Point2D$Double_x += moveX;
          endPoint.java_awt_geom_Point2D$Double_y += moveY;
        }
      }
    }
  }
}

function lv_lumii_layoutengine_Normalizer_normalizeRectangle__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_LinkedHashMap_2Llv_lumii_layoutengine_AbstractContainer_2ZV(segments, obstacleGraph, rectangleSides, currentRect, horizontalNormalize){
  var epsilon, i, i0, leftSegment, newPositions, obstacle, obstacle$iterator, optimizer, rectangle, rectangle$iterator, rightSegment, segment, segmentIndices, sides, sides$iterator;
  segmentIndices = new java_util_LinkedHashMap_LinkedHashMap__V;
  optimizer = new lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(segments.java_util_ArrayList_array.length);
  for (i0 = 0; i0 < segments.java_util_ArrayList_array.length; i0++) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i0], 21));
    java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, segment, java_lang_Integer_valueOf__ILjava_lang_Integer_2(i0));
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, i0, segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos);
    lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addQuadraticConstantDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IDDV(optimizer, i0, segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos, 0.001);
  }
  for (obstacle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(obstacleGraph); obstacle$iterator.java_util_AbstractList$IteratorImpl_i < obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    obstacle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(obstacle$iterator.java_util_AbstractList$IteratorImpl_i < obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(obstacle$iterator.java_util_AbstractList$IteratorImpl_last = obstacle$iterator.java_util_AbstractList$IteratorImpl_i++), 18));
    leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_first, 21);
    rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obstacle.lv_lumii_layoutengine_util_Pair_second, 21);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(rightSegment));
  }
  for (sides$iterator = java_util_AbstractMap$2_$iterator__Ljava_util_AbstractMap$2_2Ljava_util_Iterator_2(new java_util_AbstractMap$2_AbstractMap$2__Ljava_util_AbstractMap_2V(rectangleSides)); sides$iterator.java_util_AbstractMap$2$1_val$outerIter2.hasNext__Z();) {
    sides = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$2$1_$next__Ljava_util_AbstractMap$2$1_2Ljava_lang_Object_2(sides$iterator), 18);
    leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_first, 24);
    rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sides.lv_lumii_layoutengine_util_Pair_second, 24);
    rectangle = leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2();
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, horizontalNormalize?rectangle.lv_lumii_layoutengine_AbstractContainer_minWidth:rectangle.lv_lumii_layoutengine_AbstractContainer_minHeight);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, 10);
  }
  for (rectangle$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(currentRect.package_private$lv_lumii_layoutengine_AbstractContainer$getNextRectangles__ZLjava_util_ArrayList_2(false)); rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rectangle = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rectangle$iterator.java_util_AbstractList$IteratorImpl_i < rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rectangle$iterator.java_util_AbstractList$IteratorImpl_last = rectangle$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    leftSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_first, 24);
    rightSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(rectangleSides, rectangle), 18).lv_lumii_layoutengine_util_Pair_second, 24);
    lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addMeanDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(optimizer, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, rightSegment), 9).java_lang_Integer_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentIndices, leftSegment), 9).java_lang_Integer_value, (rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos + leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) / 2, 1);
  }
  newPositions = lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(optimizer);
  epsilon = currentRect.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  for (i = 0; i < segments.java_util_ArrayList_array.length; i++) {
    java_lang_Math_abs__DD(newPositions[i] - (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 21)).lv_lumii_layoutengine_obstacleGraph_Segment_pos) > epsilon && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i], 21)).move__DV(newPositions[i]);
  }
}

function lv_lumii_layoutengine_Normalizer_orderSegments__Ljava_util_ArrayList_2V(segments){
  var bucket, bucket$iterator, buckets, coord, currPriority, current, hasChanged, i, i0, isOrdered, it, j, lineComparator, prevPriorityInc, priorityInc, separatedPriority, tSegments;
  buckets = new java_util_LinkedList_LinkedList__V;
  for (i0 = 0; i0 < 2; i0++) {
    java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i0], 69)), null);
    tSegments = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, segments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.java_util_ArrayList_array[i0], 4));
    for (j = 0; j < tSegments.java_util_ArrayList_array.length;) {
      coord = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, tSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tSegments.java_util_ArrayList_array[j], 20)).lv_lumii_layoutengine_obstacleGraph_Segment_pos;
      bucket = new java_util_ArrayList_ArrayList__V;
      for (; j < tSegments.java_util_ArrayList_array.length && (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, tSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tSegments.java_util_ArrayList_array[j], 20)).lv_lumii_layoutengine_obstacleGraph_Segment_pos == coord; j++) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(bucket, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, tSegments.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tSegments.java_util_ArrayList_array[j], 20)));
      }
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(buckets, bucket, buckets.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, buckets.java_util_LinkedList_tail);
    }
  }
  for (bucket$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(buckets, 0); bucket$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != bucket$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
    bucket = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(bucket$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != bucket$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , bucket$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = bucket$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , bucket$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = bucket$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++bucket$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bucket$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 4));
    java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(bucket, new lv_lumii_layoutengine_Normalizer$1_Normalizer$1__V);
  }
  lineComparator = new lv_lumii_layoutengine_Normalizer$LineComparator_Normalizer$LineComparator__V;
  while (buckets.java_util_LinkedList_size != 0) {
    it = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(buckets, 0);
    hasChanged = false;
    while (it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) {
      bucket = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , it.java_util_LinkedList$ListIteratorImpl_lastNode = it.java_util_LinkedList$ListIteratorImpl_currentNode , it.java_util_LinkedList$ListIteratorImpl_currentNode = it.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++it.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 4));
      isOrdered = true;
      java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(bucket, lineComparator);
      priorityInc = 0;
      for (i = 0; i < bucket.java_util_ArrayList_array.length - 1; i++) {
        prevPriorityInc = priorityInc;
        current = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, bucket.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bucket.java_util_ArrayList_array[i], 20));
        lv_lumii_layoutengine_Normalizer$LineComparator_$compare__Llv_lumii_layoutengine_Normalizer$LineComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(current, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i + 1, bucket.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bucket.java_util_ArrayList_array[i + 1], 20))) < 0?++priorityInc:(isOrdered = false);
        current.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority != prevPriorityInc && (hasChanged = true);
        current.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority = prevPriorityInc;
      }
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(bucket, bucket.java_util_ArrayList_array.length - 1), 20).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority != priorityInc && (hasChanged = true);
      lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_$setPriority__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2IV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(bucket, bucket.java_util_ArrayList_array.length - 1), 20), priorityInc);
      if (isOrdered) {
        hasChanged = true;
        java_util_LinkedList$ListIteratorImpl_$remove__Ljava_util_LinkedList$ListIteratorImpl_2V(it);
      }
    }
    if (!hasChanged) {
      bucket = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(buckets.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(buckets.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value, 4));
      for (i = 1; i < bucket.java_util_ArrayList_array.length; i++) {
        if ((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i - 1, bucket.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bucket.java_util_ArrayList_array[i - 1], 20)).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, bucket.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bucket.java_util_ArrayList_array[i], 20)).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority) {
          separatedPriority = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, bucket.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bucket.java_util_ArrayList_array[i], 20)).lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority;
          priorityInc = 0;
          for (; i < bucket.java_util_ArrayList_array.length; i++) {
            current = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, bucket.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(bucket.java_util_ArrayList_array[i], 20));
            currPriority = current.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority;
            currPriority == separatedPriority && ++priorityInc;
            current.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority = currPriority + priorityInc;
          }
        }
      }
    }
  }
}

function lv_lumii_layoutengine_Normalizer_reconnectEndPoint__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2ZZV(line, box, segmentsHorizontal, start_0){
  var endPoint, lineGeometry, prevPoint;
  endPoint = start_0?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3):lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry);
  prevPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, start_0?1:line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length - 2), 3);
  lineGeometry = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry, 74);
  segmentsHorizontal && prevPoint.java_awt_geom_Point2D$Double_y == endPoint.java_awt_geom_Point2D$Double_y?(endPoint.java_awt_geom_Point2D$Double_x = lv_lumii_layoutengine_Box$BoxSide_getCoordinate__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2D(box, start_0?lineGeometry.lv_lumii_layoutengine_LineGeometry$OrthogonalLine_startSide:lineGeometry.lv_lumii_layoutengine_LineGeometry$OrthogonalLine_endSide)):!segmentsHorizontal && prevPoint.java_awt_geom_Point2D$Double_x == endPoint.java_awt_geom_Point2D$Double_x && (endPoint.java_awt_geom_Point2D$Double_y = lv_lumii_layoutengine_Box$BoxSide_getCoordinate__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2D(box, start_0?lineGeometry.lv_lumii_layoutengine_LineGeometry$OrthogonalLine_startSide:lineGeometry.lv_lumii_layoutengine_LineGeometry$OrthogonalLine_endSide));
}

function lv_lumii_layoutengine_Normalizer_reconnectEndPoints__Llv_lumii_layoutengine_Diagram_2ZV(diagram, segmentsHorizontal){
  var line, line$iterator, lines;
  lines = lv_lumii_layoutengine_Container_$getDescendantLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(diagram);
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
      if (lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
        lv_lumii_layoutengine_Normalizer_reconnectEndPoint__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2ZZV(line, lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), segmentsHorizontal, true);
      }
       else {
        throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
      }
      if (lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
        lv_lumii_layoutengine_Normalizer_reconnectEndPoint__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Box_2ZZV(line, lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line), segmentsHorizontal, false);
      }
       else {
        throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
      }
    }
     else if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == lv_lumii_layoutengine_Line$LineType_STRAIGHT) {
      lv_lumii_layoutengine_LineOptimizer_correctStraightLine__Llv_lumii_layoutengine_Line_2V(line);
    }
     else if (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == lv_lumii_layoutengine_Line$LineType_POLYLINE) {
      lv_lumii_layoutengine_LineOptimizer_reconnectPolyline__Llv_lumii_layoutengine_Line_2V(line);
    }
     else {
      throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('The ' + line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() + ' line type is not supported yet.');
    }
  }
}

function lv_lumii_layoutengine_Normalizer_setRectangleLane__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_lang_Integer_2Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_OrthogonalSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2V(obstacleGraph, constraintSegments, lane, rectangleSides, firstBound, secondBound){
  com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.lv_lumii_layoutengine_util_Pair_first, 24).lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane = lane.java_lang_Integer_value;
  com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.lv_lumii_layoutengine_util_Pair_second, 24).lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane = lane.java_lang_Integer_value;
  lane.java_lang_Integer_value > 1?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(obstacleGraph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraintSegments, lane.java_lang_Integer_value - 2), 21), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.lv_lumii_layoutengine_util_Pair_first, 21))):!!firstBound && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(obstacleGraph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(firstBound, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.lv_lumii_layoutengine_util_Pair_first, 21)));
  lane.java_lang_Integer_value <= constraintSegments.java_util_ArrayList_array.length?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(obstacleGraph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.lv_lumii_layoutengine_util_Pair_second, 21), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constraintSegments, lane.java_lang_Integer_value - 1), 21))):!!secondBound && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(obstacleGraph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rectangleSides.lv_lumii_layoutengine_util_Pair_second, 21), secondBound));
}

function lv_lumii_layoutengine_Normalizer_updateSegments__Ljava_util_ArrayList_2V(segments){
  var segment, segment$iterator;
  for (segment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(segments); segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_last = segment$iterator.java_util_AbstractList$IteratorImpl_i++), 21));
    segment.package_private$lv_lumii_layoutengine_OrthogonalSegment$updateLength__V();
  }
}

function lv_lumii_layoutengine_Normalizer_updateSingleRectangle__Llv_lumii_layoutengine_util_Pair_2DV(segments, spacingRatio){
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$updateLength__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.lv_lumii_layoutengine_util_Pair_first, 24), spacingRatio);
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$updateLength__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segments.lv_lumii_layoutengine_util_Pair_second, 24), spacingRatio);
}

function lv_lumii_layoutengine_Normalizer$1_$compare__Llv_lumii_layoutengine_Normalizer$1_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2I(a, b){
  if (a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction != b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction) {
    return a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT) || a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_UP?-1:1;
  }
  return 0;
}

function lv_lumii_layoutengine_Normalizer$1_Normalizer$1__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(224, 1, {}, lv_lumii_layoutengine_Normalizer$1_Normalizer$1__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_Normalizer$1_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(a, b){
  return lv_lumii_layoutengine_Normalizer$1_$compare__Llv_lumii_layoutengine_Normalizer$1_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(a, 20), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 20));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Normalizer$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Normalizer/1', 224);
function lv_lumii_layoutengine_Normalizer$LineComparator_$compare__Llv_lumii_layoutengine_Normalizer$LineComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(a, b){
  return lv_lumii_layoutengine_Normalizer$LineComparator_$compare__Llv_lumii_layoutengine_Normalizer$LineComparator_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(a, 20), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 20));
}

function lv_lumii_layoutengine_Normalizer$LineComparator_$compare__Llv_lumii_layoutengine_Normalizer$LineComparator_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2I(a, b){
  var aLeftDir, aLeftNext, aPriority, aRightDir, aRightNext, bLeftNext, bPriority, bRightNext, dir_0;
  if (a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority != b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority) {
    return a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority < b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority?-1:1;
  }
  aLeftNext = a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == (lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT) || a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN?a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev:a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next;
  aRightNext = aLeftNext == a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev?a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next:a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev;
  bLeftNext = b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT || b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN?b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev:b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next;
  bRightNext = bLeftNext == b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev?b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next:b.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_prev;
  aPriority = lv_lumii_layoutengine_Normalizer_getLinePriorityClass__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2I(aLeftNext, a, aRightNext);
  bPriority = lv_lumii_layoutengine_Normalizer_getLinePriorityClass__Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2I(bLeftNext, b, bRightNext);
  dir_0 = a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT || a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT?1:-1;
  if (aPriority != bPriority) {
    return aPriority < bPriority?-dir_0:dir_0;
  }
  aLeftDir = !aLeftNext?1:(aLeftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT || aLeftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN) ^ aLeftNext == a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next?0:2;
  aRightDir = !aRightNext?1:(aRightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT || aRightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_direction == lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN) ^ aRightNext == a.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_next?0:2;
  if (a.lv_lumii_layoutengine_obstacleGraph_Segment_start != b.lv_lumii_layoutengine_obstacleGraph_Segment_start && aLeftDir != 1) {
    return aLeftDir == 0?a.lv_lumii_layoutengine_obstacleGraph_Segment_start < b.lv_lumii_layoutengine_obstacleGraph_Segment_start?dir_0:-dir_0:a.lv_lumii_layoutengine_obstacleGraph_Segment_start < b.lv_lumii_layoutengine_obstacleGraph_Segment_start?-dir_0:dir_0;
  }
  if (a.lv_lumii_layoutengine_obstacleGraph_Segment_end != b.lv_lumii_layoutengine_obstacleGraph_Segment_end && aRightDir != 1) {
    return aRightDir == 0?a.lv_lumii_layoutengine_obstacleGraph_Segment_end < b.lv_lumii_layoutengine_obstacleGraph_Segment_end?-dir_0:dir_0:a.lv_lumii_layoutengine_obstacleGraph_Segment_end < b.lv_lumii_layoutengine_obstacleGraph_Segment_end?dir_0:-dir_0;
  }
  if (!!aLeftNext && aLeftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority != bLeftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority) {
    return (aLeftDir == 0?-dir_0:dir_0) * java_lang_Double_compare__DDI(aLeftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority, bLeftNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority);
  }
  if (!!aRightNext && aRightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority != bRightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority) {
    return (aRightDir == 0?dir_0:-dir_0) * java_lang_Double_compare__DDI(aRightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority, bRightNext.lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_priority);
  }
  return 0;
}

function lv_lumii_layoutengine_Normalizer$LineComparator_Normalizer$LineComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(223, 1, {}, lv_lumii_layoutengine_Normalizer$LineComparator_Normalizer$LineComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_Normalizer$LineComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(a, b){
  return lv_lumii_layoutengine_Normalizer$LineComparator_$compare__Llv_lumii_layoutengine_Normalizer$LineComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(a, b);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Normalizer$LineComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Normalizer/LineComparator', 223);
function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2I(this$static, s){
  var b, first, firstCenter, firstPos, horizontalSegments, second, secondCenter, secondPos;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(s, 24)) {
    b = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s, 24);
    first = this$static.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2();
    second = b.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2();
    if (first == second) {
      return this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT) || this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP?-1:1;
    }
     else {
      if (this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane != 0 && b.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane != 0 && this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane != b.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane) {
        return java_lang_Integer_compare__III(this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane, b.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane);
      }
       else {
        firstCenter = first.lv_lumii_layoutengine_AbstractContainer_desiredCenter;
        secondCenter = second.lv_lumii_layoutengine_AbstractContainer_desiredCenter;
        horizontalSegments = this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP) || this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM;
        firstPos = horizontalSegments?firstCenter.java_awt_geom_Point2D$Double_y:firstCenter.java_awt_geom_Point2D$Double_x;
        secondPos = horizontalSegments?secondCenter.java_awt_geom_Point2D$Double_y:secondCenter.java_awt_geom_Point2D$Double_x;
        return firstPos < secondPos || firstPos == secondPos && first.lv_lumii_layoutengine_AbstractContainer_id < second.lv_lumii_layoutengine_AbstractContainer_id?-1:1;
      }
    }
  }
  return java_lang_Integer_compare__III(this$static.getSortPriority__I(), s.getSortPriority__I());
}

function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2D(this$static, segment){
  var cSegment;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(segment, 102) && (this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT) || this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP)) {
    cSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 102);
    return cSegment.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing + cSegment.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_prev.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance;
  }
   else {
    return lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$getAfterSpacing__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2D(this$static) + segment.getBeforeSpacing__D();
  }
}

function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$getAfterSpacing__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2D(this$static){
  switch (this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType.java_lang_Enum_ordinal) {
    case 0:
    case 2:
      return 0;
    default:return this$static.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2().lv_lumii_layoutengine_Element_spacing;
  }
}

function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$updateLength__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(this$static, ratio){
  var container, epsilon, spacing;
  container = this$static.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2();
  epsilon = container.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  spacing = container.lv_lumii_layoutengine_Element_spacing * ratio;
  if (this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP) || this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM) {
    lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, container.lv_lumii_layoutengine_AbstractContainer_left - spacing + epsilon);
    lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, container.lv_lumii_layoutengine_AbstractContainer_right + spacing - epsilon);
  }
   else {
    lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, container.lv_lumii_layoutengine_AbstractContainer_top - spacing + epsilon);
    lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this$static, container.lv_lumii_layoutengine_AbstractContainer_bottom + spacing - epsilon);
  }
}

function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_OrthogonalSegment$RectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2V(pos, start_0, end, segmentType){
  lv_lumii_layoutengine_OrthogonalSegment_OrthogonalSegment__DDDV.call(this, pos, start_0, end);
  this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType = segmentType;
}

function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_createRectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2(pos, start_0, end, segmentType, container){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(container, 16)) {
    return new lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_OrthogonalSegment$BoxSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Box_2V(pos, start_0, end, segmentType, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(container, 16));
  }
   else {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Container should be Box or InsideLabel.');
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(24, 21, $intern_70);
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I = function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I(s){
  return lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2I(this, s);
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D = function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(segment){
  return lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2D(this, segment);
}
;
_.getAfterSpacing__D = function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_getAfterSpacing__D(){
  return lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$getAfterSpacing__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2D(this);
}
;
_.getBeforeSpacing__D = function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_getBeforeSpacing__D(){
  switch (this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType.java_lang_Enum_ordinal) {
    case 0:
    case 2:
      return this.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2().lv_lumii_layoutengine_Element_spacing;
    default:return 0;
  }
}
;
_.move__DV = function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_move__DV(position){
  var container;
  this.lv_lumii_layoutengine_obstacleGraph_Segment_pos = position;
  container = this.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2();
  switch (this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType.java_lang_Enum_ordinal) {
    case 0:
      container.lv_lumii_layoutengine_AbstractContainer_left = position;
      break;
    case 2:
      container.lv_lumii_layoutengine_AbstractContainer_top = position;
      break;
    case 1:
      container.lv_lumii_layoutengine_AbstractContainer_right = position;
      break;
    case 3:
      container.lv_lumii_layoutengine_AbstractContainer_bottom = position;
  }
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$updateLength__V = function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_updateLength__V(){
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$updateLength__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(this, 1);
}
;
_.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_lane = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$RectangleSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/RectangleSegment', 24);
function lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_$getSortPriority__Llv_lumii_layoutengine_OrthogonalSegment$BoxSegment_2I(this$static){
  switch (this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType.java_lang_Enum_ordinal) {
    case 0:
    case 2:
      return 2147483646;
    default:return -2147483647;
  }
}

function lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_OrthogonalSegment$BoxSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Box_2V(pos, start_0, end, segmentType, box){
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_OrthogonalSegment$RectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2V.call(this, pos, start_0, end, segmentType);
  this.lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_box = box;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(112, 24, {29:1, 21:1, 112:1, 24:1, 59:1}, lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_OrthogonalSegment$BoxSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Box_2V);
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I = function lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment_2I(s){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(s, 20)) {
    return this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT) || this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP?-1:1;
  }
  return lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$compareCollinear__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2I(this, s);
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D = function lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(segment){
  return lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2D(this, segment);
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2 = function lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_getContainer__Llv_lumii_layoutengine_AbstractContainer_2(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_box;
}
;
_.getSortPriority__I = function lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_getSortPriority__I(){
  return lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_$getSortPriority__Llv_lumii_layoutengine_OrthogonalSegment$BoxSegment_2I(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$BoxSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/BoxSegment', 112);
function lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_OrthogonalSegment$ConstraintSegment__Llv_lumii_layoutengine_LayoutConstraints$ConstraintLine_2IV(constraint, inTime){
  lv_lumii_layoutengine_OrthogonalSegment_OrthogonalSegment__DDDV.call(this, constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos, $intern_20, $intern_53);
  this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint = constraint;
  this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_inTime = inTime;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(102, 21, {29:1, 21:1, 102:1, 59:1}, lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_OrthogonalSegment$ConstraintSegment__Llv_lumii_layoutengine_LayoutConstraints$ConstraintLine_2IV);
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D = function lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(segment){
  var rSegment, secondSegment;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(segment, 102)) {
    secondSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 102);
    return this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_inTime >= secondSegment.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_inTime?this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing + this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance + secondSegment.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing:secondSegment.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing + secondSegment.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_prev.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance + this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing;
  }
   else {
    rSegment = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment, 24);
    return rSegment.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT) || rSegment.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM?this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance + this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing:this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing + segment.getBeforeSpacing__D();
  }
}
;
_.getAfterSpacing__D = function lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_getAfterSpacing__D(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing;
}
;
_.getBeforeSpacing__D = function lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_getBeforeSpacing__D(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_spacing;
}
;
_.getSortPriority__I = function lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_getSortPriority__I(){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V('Constraint segments should never be sorted by priority.');
}
;
_.move__DV = function lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_move__DV(position){
  this.lv_lumii_layoutengine_obstacleGraph_Segment_pos = position;
  this.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_constraint.lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = position;
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$updateLength__V = function lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_updateLength__V(){
  throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V("Constraint segments don't have a length.");
}
;
_.lv_lumii_layoutengine_OrthogonalSegment$ConstraintSegment_inTime = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$ConstraintSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/ConstraintSegment', 102);
function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_$getSortPriority__Llv_lumii_layoutengine_OrthogonalSegment$LabelSegment_2I(this$static){
  switch (this$static.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType.java_lang_Enum_ordinal) {
    case 0:
    case 2:
      return $intern_1;
    default:return $intern_71;
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(227, 24, $intern_70);
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2 = function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_getContainer__Llv_lumii_layoutengine_AbstractContainer_2(){
  return this.package_private$lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$getContainer__Llv_lumii_layoutengine_Label_2();
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$getContainer__Llv_lumii_layoutengine_Label_2 = function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_getContainer__Llv_lumii_layoutengine_Label_2(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label;
}
;
_.getSortPriority__I = function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_getSortPriority__I(){
  return lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_$getSortPriority__Llv_lumii_layoutengine_OrthogonalSegment$LabelSegment_2I(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$LabelSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/LabelSegment', 227);
function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_OrthogonalSegment$LabelSegment$LineLabelSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Label_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2V(pos, start_0, end, segmentType, label_0, lineSegment){
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_OrthogonalSegment$RectangleSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2V.call(this, pos, start_0, end, segmentType);
  this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label = label_0;
  this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_lineSegment = lineSegment;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(79, 227, {29:1, 21:1, 79:1, 24:1, 59:1}, lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_OrthogonalSegment$LabelSegment$LineLabelSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Label_2Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment_2V);
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D = function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment_2D(segment){
  var lineLabel;
  if (segment == this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_lineSegment) {
    lineLabel = this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label;
    return this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation == (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)?this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP) || this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM?lineLabel.lv_lumii_layoutengine_AbstractContainer_minHeight / 2:lineLabel.lv_lumii_layoutengine_AbstractContainer_minWidth / 2:0;
  }
   else {
    return lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_$findMinimumDistance__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment_2D(this, segment);
  }
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$getContainer__Llv_lumii_layoutengine_Label_2 = function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_getContainer__Llv_lumii_layoutengine_Label_2(){
  return this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label;
}
;
_.package_private$lv_lumii_layoutengine_OrthogonalSegment$updateLength__V = function lv_lumii_layoutengine_OrthogonalSegment$LabelSegment$LineLabelSegment_updateLength__V(){
  var epsilon, lineLabel, points, segmentIndex, spacing;
  spacing = this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label.lv_lumii_layoutengine_Element_spacing;
  epsilon = this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  lineLabel = this.lv_lumii_layoutengine_OrthogonalSegment$LabelSegment_label;
  if (this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == (lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V() , lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP) || this.lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_segmentType == lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM) {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_72);
  }
  points = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lineLabel.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  segmentIndex = lineLabel.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex;
  if ((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex], 3)).java_awt_geom_Point2D$Double_y == (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(segmentIndex + 1, points.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(points.java_util_ArrayList_array[segmentIndex + 1], 3)).java_awt_geom_Point2D$Double_y) {
    if (lineLabel.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation != (lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V() , lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER)) {
      if (lv_lumii_layoutengine_OutsideLabel$LineLabel_$isLeftTop__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(lineLabel)) {
        lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, lineLabel.lv_lumii_layoutengine_AbstractContainer_top - spacing + epsilon);
        lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, lineLabel.lv_lumii_layoutengine_AbstractContainer_bottom - epsilon);
      }
       else {
        lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, lineLabel.lv_lumii_layoutengine_AbstractContainer_top + epsilon);
        lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, lineLabel.lv_lumii_layoutengine_AbstractContainer_bottom + spacing - epsilon);
      }
    }
     else {
      lv_lumii_layoutengine_obstacleGraph_Segment_$setStart__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, lineLabel.lv_lumii_layoutengine_AbstractContainer_top - spacing + epsilon);
      lv_lumii_layoutengine_obstacleGraph_Segment_$setEnd__Llv_lumii_layoutengine_obstacleGraph_Segment_2DV(this, lineLabel.lv_lumii_layoutengine_AbstractContainer_bottom + spacing - epsilon);
    }
  }
   else {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_72);
  }
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$LabelSegment$LineLabelSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/LabelSegment/LineLabelSegment', 79);
function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V(){
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT = new lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection__Ljava_lang_String_2IV($intern_40, 0);
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT = new lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection__Ljava_lang_String_2IV($intern_41, 1);
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_UP = new lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection__Ljava_lang_String_2IV('UP', 2);
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN = new lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection__Ljava_lang_String_2IV('DOWN', 3);
}

function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_values___3Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_2(){
  lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_12_1classLit, 1), $intern_32, 113, 0, [lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_UP, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(113, 36, {5:1, 29:1, 36:1, 113:1}, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection__Ljava_lang_String_2IV);
var lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_DOWN, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_LEFT, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_RIGHT, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_UP;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/OrthogonalLineSegment/SegmentDirection', 113, lv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_values___3Llv_lumii_layoutengine_OrthogonalSegment$OrthogonalLineSegment$SegmentDirection_2);
function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V(){
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT = new lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_OrthogonalSegment$RectangleSegment$SegmentType__Ljava_lang_String_2IV($intern_40, 0);
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT = new lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_OrthogonalSegment$RectangleSegment$SegmentType__Ljava_lang_String_2IV($intern_41, 1);
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP = new lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_OrthogonalSegment$RectangleSegment$SegmentType__Ljava_lang_String_2IV($intern_43, 2);
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM = new lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_OrthogonalSegment$RectangleSegment$SegmentType__Ljava_lang_String_2IV($intern_44, 3);
}

function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_OrthogonalSegment$RectangleSegment$SegmentType__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_values___3Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2(){
  lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$RectangleSegment$SegmentType_12_1classLit, 1), $intern_32, 111, 0, [lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(111, 36, {5:1, 29:1, 36:1, 111:1}, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_OrthogonalSegment$RectangleSegment$SegmentType__Ljava_lang_String_2IV);
var lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_BOTTOM, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_LEFT, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_RIGHT, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_TOP;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OrthogonalSegment$RectangleSegment$SegmentType_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'OrthogonalSegment/RectangleSegment/SegmentType', 111, lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_values___3Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2);
function lv_lumii_layoutengine_OutsideLabel_$_1flip__Llv_lumii_layoutengine_OutsideLabel_2V(this$static){
  var center, height, tmp, width_0;
  this$static.lv_lumii_layoutengine_OutsideLabel_flipped = !this$static.lv_lumii_layoutengine_OutsideLabel_flipped;
  tmp = this$static.lv_lumii_layoutengine_AbstractContainer_userMinHeight;
  this$static.lv_lumii_layoutengine_AbstractContainer_userMinHeight = this$static.lv_lumii_layoutengine_AbstractContainer_userMinWidth;
  this$static.lv_lumii_layoutengine_AbstractContainer_userMinWidth = tmp;
  tmp = this$static.lv_lumii_layoutengine_AbstractContainer_minHeight;
  this$static.lv_lumii_layoutengine_AbstractContainer_minHeight = this$static.lv_lumii_layoutengine_AbstractContainer_minWidth;
  this$static.lv_lumii_layoutengine_AbstractContainer_minWidth = tmp;
  width_0 = this$static.lv_lumii_layoutengine_AbstractContainer_right - this$static.lv_lumii_layoutengine_AbstractContainer_left;
  height = this$static.lv_lumii_layoutengine_AbstractContainer_bottom - this$static.lv_lumii_layoutengine_AbstractContainer_top;
  center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((this$static.lv_lumii_layoutengine_AbstractContainer_left + this$static.lv_lumii_layoutengine_AbstractContainer_right) / 2, (this$static.lv_lumii_layoutengine_AbstractContainer_top + this$static.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  this$static.lv_lumii_layoutengine_AbstractContainer_left = center.java_awt_geom_Point2D$Double_x - height / 2;
  this$static.lv_lumii_layoutengine_AbstractContainer_right = this$static.lv_lumii_layoutengine_AbstractContainer_left + height;
  this$static.lv_lumii_layoutengine_AbstractContainer_top = center.java_awt_geom_Point2D$Double_y - width_0 / 2;
  this$static.lv_lumii_layoutengine_AbstractContainer_bottom = this$static.lv_lumii_layoutengine_AbstractContainer_top + width_0;
}

function lv_lumii_layoutengine_OutsideLabel_OutsideLabel__DDDDDLlv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(left, right, top_0, bottom, position, owner){
  lv_lumii_layoutengine_AbstractContainer_AbstractContainer__DDDDLlv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV.call(this, left, right, top_0, bottom, owner, 0, 2);
  this.lv_lumii_layoutengine_OutsideLabel_oldCenter = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((this.lv_lumii_layoutengine_AbstractContainer_left + this.lv_lumii_layoutengine_AbstractContainer_right) / 2, (this.lv_lumii_layoutengine_AbstractContainer_top + this.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  this.lv_lumii_layoutengine_OutsideLabel_position = position;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(78, 209, {12:1, 57:1, 78:1, 62:1});
_.lv_lumii_layoutengine_OutsideLabel_autoFlip = false;
_.lv_lumii_layoutengine_OutsideLabel_flipped = false;
_.lv_lumii_layoutengine_OutsideLabel_position = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OutsideLabel_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OutsideLabel', 78);
function lv_lumii_layoutengine_OutsideLabel$LineLabel_$getRotationAngle__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2D(this$static){
  var first, line, points, second;
  line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 10);
  if (!this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_rotated || line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
    return 0;
  }
   else {
    points = lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(line);
    first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3);
    second = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3);
    return java_lang_Math_atan__DD((second.java_awt_geom_Point2D$Double_y - first.java_awt_geom_Point2D$Double_y) / (second.java_awt_geom_Point2D$Double_x - first.java_awt_geom_Point2D$Double_x));
  }
}

function lv_lumii_layoutengine_OutsideLabel$LineLabel_$isClockwise__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(this$static){
  var first, points, second;
  points = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3);
  second = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3);
  switch (this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation.java_lang_Enum_ordinal) {
    case 0:
      return true;
    case 1:
      return false;
    case 2:
      return first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x?first.java_awt_geom_Point2D$Double_y < second.java_awt_geom_Point2D$Double_y:first.java_awt_geom_Point2D$Double_x > second.java_awt_geom_Point2D$Double_x;
    case 3:
      return first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x?first.java_awt_geom_Point2D$Double_y > second.java_awt_geom_Point2D$Double_y:first.java_awt_geom_Point2D$Double_x < second.java_awt_geom_Point2D$Double_x;
    default:return this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth;
  }
}

function lv_lumii_layoutengine_OutsideLabel$LineLabel_$isLeftTop__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2Z(this$static){
  var first, leftTop, points, second;
  points = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points;
  first = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex), 3);
  second = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(points, this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex + 1), 3);
  leftTop = false;
  if (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Element_owner, 10).lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
    switch (this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation.java_lang_Enum_ordinal) {
      case 2:
        leftTop = true;
        break;
      case 0:
        this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal?(leftTop = first.java_awt_geom_Point2D$Double_x > second.java_awt_geom_Point2D$Double_x):(leftTop = first.java_awt_geom_Point2D$Double_y < second.java_awt_geom_Point2D$Double_y);
        break;
      case 1:
        this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal?(leftTop = first.java_awt_geom_Point2D$Double_x < second.java_awt_geom_Point2D$Double_x):(leftTop = first.java_awt_geom_Point2D$Double_y > second.java_awt_geom_Point2D$Double_y);
        break;
      case 5:
        this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal?(leftTop = this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth == first.java_awt_geom_Point2D$Double_x > second.java_awt_geom_Point2D$Double_x):(leftTop = this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth == first.java_awt_geom_Point2D$Double_y < second.java_awt_geom_Point2D$Double_y);
    }
  }
   else {
    switch (this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation.java_lang_Enum_ordinal) {
      case 2:
        leftTop = true;
        break;
      case 0:
        first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x?(leftTop = first.java_awt_geom_Point2D$Double_y < second.java_awt_geom_Point2D$Double_y):(leftTop = second.java_awt_geom_Point2D$Double_x < first.java_awt_geom_Point2D$Double_x);
        break;
      case 1:
        first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x?(leftTop = first.java_awt_geom_Point2D$Double_y > second.java_awt_geom_Point2D$Double_y):(leftTop = second.java_awt_geom_Point2D$Double_x > first.java_awt_geom_Point2D$Double_x);
        break;
      case 5:
        first.java_awt_geom_Point2D$Double_x == second.java_awt_geom_Point2D$Double_x?(leftTop = this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth == first.java_awt_geom_Point2D$Double_y < second.java_awt_geom_Point2D$Double_y):(leftTop = this$static.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth == second.java_awt_geom_Point2D$Double_x < first.java_awt_geom_Point2D$Double_x);
    }
  }
  return leftTop;
}

function lv_lumii_layoutengine_OutsideLabel$LineLabel_$resetBounds__Llv_lumii_layoutengine_OutsideLabel$LineLabel_2V(this$static){
  var center;
  center = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((this$static.lv_lumii_layoutengine_AbstractContainer_left + this$static.lv_lumii_layoutengine_AbstractContainer_right) / 2, (this$static.lv_lumii_layoutengine_AbstractContainer_top + this$static.lv_lumii_layoutengine_AbstractContainer_bottom) / 2);
  this$static.lv_lumii_layoutengine_AbstractContainer_left = center.java_awt_geom_Point2D$Double_x - this$static.lv_lumii_layoutengine_AbstractContainer_minWidth / 2;
  this$static.lv_lumii_layoutengine_AbstractContainer_right = this$static.lv_lumii_layoutengine_AbstractContainer_left + this$static.lv_lumii_layoutengine_AbstractContainer_minWidth;
  this$static.lv_lumii_layoutengine_AbstractContainer_top = center.java_awt_geom_Point2D$Double_y - this$static.lv_lumii_layoutengine_AbstractContainer_minHeight / 2;
  this$static.lv_lumii_layoutengine_AbstractContainer_bottom = this$static.lv_lumii_layoutengine_AbstractContainer_top + this$static.lv_lumii_layoutengine_AbstractContainer_minHeight;
}

function lv_lumii_layoutengine_OutsideLabel$LineLabel_OutsideLabel$LineLabel__Ljava_awt_geom_Point2D$Double_2IDLlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2DDLlv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV(point, segmentIndex, position, orientation, width_0, height, owner){
  lv_lumii_layoutengine_OutsideLabel_OutsideLabel__DDDDDLlv_lumii_layoutengine_Element_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV.call(this, point.java_awt_geom_Point2D$Double_x - width_0 / 2, point.java_awt_geom_Point2D$Double_x + width_0 / 2, point.java_awt_geom_Point2D$Double_y - height / 2, point.java_awt_geom_Point2D$Double_y + height / 2, position, owner);
  this.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = segmentIndex;
  this.lv_lumii_layoutengine_OutsideLabel$LineLabel_orientation = orientation;
  this.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition = position;
  owner.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL) && (this.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(owner), segmentIndex), 3).java_awt_geom_Point2D$Double_y == com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(owner), segmentIndex + 1), 3).java_awt_geom_Point2D$Double_y);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(28, 78, {12:1, 57:1, 78:1, 28:1, 62:1}, lv_lumii_layoutengine_OutsideLabel$LineLabel_OutsideLabel$LineLabel__Ljava_awt_geom_Point2D$Double_2IDLlv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2DDLlv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2DV);
_.getOwner__Llv_lumii_layoutengine_Element_2 = function lv_lumii_layoutengine_OutsideLabel$LineLabel_getOwner__Llv_lumii_layoutengine_Element_2(){
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_Element_owner, 10);
}
;
_.lv_lumii_layoutengine_OutsideLabel$LineLabel_clockwiseWithBoth = false;
_.lv_lumii_layoutengine_OutsideLabel$LineLabel_currentPosition = 0;
_.lv_lumii_layoutengine_OutsideLabel$LineLabel_rotated = false;
_.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentHorizontal = false;
_.lv_lumii_layoutengine_OutsideLabel$LineLabel_segmentIndex = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OutsideLabel$LineLabel_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'OutsideLabel/LineLabel', 28);
function lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V(){
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CLOCKWISE = new lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV('CLOCKWISE', 0);
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_COUNTERCLOCKWISE = new lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV('COUNTERCLOCKWISE', 1);
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_LEFT_1TOP = new lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV('LEFT_TOP', 2);
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_RIGHT_1BOTTOM = new lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV('RIGHT_BOTTOM', 3);
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER = new lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV($intern_42, 4);
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_BOTH = new lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV('BOTH', 5);
}

function lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_values___3Llv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2(){
  lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OutsideLabel$LineLabel$Orientation_12_1classLit, 1), $intern_32, 84, 0, [lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CLOCKWISE, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_COUNTERCLOCKWISE, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_LEFT_1TOP, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_RIGHT_1BOTTOM, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_BOTH]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(84, 36, {5:1, 29:1, 36:1, 84:1}, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_OutsideLabel$LineLabel$Orientation__Ljava_lang_String_2IV);
var lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_BOTH, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CENTER, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_CLOCKWISE, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_COUNTERCLOCKWISE, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_LEFT_1TOP, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_RIGHT_1BOTTOM;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1OutsideLabel$LineLabel$Orientation_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'OutsideLabel/LineLabel/Orientation', 84, lv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_values___3Llv_lumii_layoutengine_OutsideLabel$LineLabel$Orientation_2);
function lv_lumii_layoutengine_SpringLayoutAlgorithm_$layoutPass__Llv_lumii_layoutengine_SpringLayoutAlgorithm_2IV(this$static, pass){
  var b, b$iterator, box, box$iterator, boxCount, boxes, curLine, curLine$iterator, edgeSourceId, edgeStrength, edgeTargetId, h, i, layouter, lineCount, lines, nodeIdMap, nodeRadius, nodeX, nodeY, w;
  if (pass != 1) {
    return;
  }
  boxes = lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, false);
  boxCount = boxes.java_util_ArrayList_array.length;
  nodeX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeY = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeRadius = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxCount, 7, 1);
  nodeIdMap = new java_util_HashMap_HashMap__V;
  i = 0;
  for (b$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxes); b$iterator.java_util_AbstractList$IteratorImpl_i < b$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    b = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(b$iterator.java_util_AbstractList$IteratorImpl_i < b$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(b$iterator.java_util_AbstractList$IteratorImpl_last = b$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    nodeX[i] = (b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2;
    nodeY[i] = (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2;
    w = b.lv_lumii_layoutengine_AbstractContainer_right - b.lv_lumii_layoutengine_AbstractContainer_left;
    h = b.lv_lumii_layoutengine_AbstractContainer_bottom - b.lv_lumii_layoutengine_AbstractContainer_top;
    nodeRadius[i] = Math.sqrt(w * w + h * h) / 2;
    nodeIdMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(b, java_lang_Integer_valueOf__ILjava_lang_Integer_2(i));
    ++i;
  }
  lines = lv_lumii_layoutengine_ComponentLayout_$buildInnerLines__Llv_lumii_layoutengine_ComponentLayout_2Ljava_util_List_2(this$static);
  lineCount = lines.java_util_ArrayList_array.length;
  edgeSourceId = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, lineCount, 7, 1);
  edgeTargetId = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, lineCount, 7, 1);
  edgeStrength = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, lineCount, 7, 1);
  i = 0;
  for (curLine$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lines); curLine$iterator.java_util_AbstractList$IteratorImpl_i < curLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    curLine = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(curLine$iterator.java_util_AbstractList$IteratorImpl_i < curLine$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(curLine$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(curLine$iterator.java_util_AbstractList$IteratorImpl_last = curLine$iterator.java_util_AbstractList$IteratorImpl_i++), 72));
    edgeSourceId[i] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nodeIdMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(curLine.lv_lumii_layoutengine_util_LayoutLine_startElement), 9).java_lang_Integer_value;
    edgeTargetId[i] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nodeIdMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(curLine.lv_lumii_layoutengine_util_LayoutLine_endElement), 9).java_lang_Integer_value;
    edgeStrength[i] = 1;
    ++i;
  }
  layouter = new lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_TimedSpringEmbedder__IIIV(boxCount, lineCount);
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$layout__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2D_3D_3D_3D_3I_3IZ_3ZD_3DILjava_util_List_2Llv_lumii_layoutengine_LayoutConstraints_2Ljava_util_List_2V(layouter, nodeX, nodeY, nodeRadius, edgeSourceId, edgeTargetId, edgeStrength, boxes.java_util_ArrayList_array.length, boxes, lv_lumii_layoutengine_AbstractContainer_$getLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_LayoutConstraints_2(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer), lines);
  i = 0;
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxes); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    lv_lumii_layoutengine_ComponentLayout_$moveAbstrContWithChildren__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_AbstractContainer_2DDV(box, nodeX[i], nodeY[i]);
    ++i;
  }
}

function lv_lumii_layoutengine_SpringLayoutAlgorithm_SpringLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(part, baseLayouter){
  lv_lumii_layoutengine_ComponentLayout_ComponentLayout__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V.call(this, part, baseLayouter);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(173, 87, $intern_61, lv_lumii_layoutengine_SpringLayoutAlgorithm_SpringLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V);
_.layoutPass__IV = function lv_lumii_layoutengine_SpringLayoutAlgorithm_layoutPass__IV(pass){
  lv_lumii_layoutengine_SpringLayoutAlgorithm_$layoutPass__Llv_lumii_layoutengine_SpringLayoutAlgorithm_2IV(this, pass);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1SpringLayoutAlgorithm_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'SpringLayoutAlgorithm', 173);
function lv_lumii_layoutengine_Tracer_$$init__Llv_lumii_layoutengine_Tracer_2V(this$static){
}

function lv_lumii_layoutengine_Tracer_$findAdjacentPointNodes__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2Ljava_util_ArrayList_2(this$static, pointNode){
  var horizontalLine, horizontalLineIndex, i, left, newNode, pointNodes, up, verticalLine, verticalLineIndex;
  if (this$static.lv_lumii_layoutengine_Tracer_memPointNodes.containsKey__Ljava_lang_Object_2Z(pointNode)) {
    return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Tracer_memPointNodes.get__Ljava_lang_Object_2Ljava_lang_Object_2(pointNode), 4);
  }
  pointNodes = new java_util_ArrayList_ArrayList__V;
  horizontalLine = pointNode.lv_lumii_layoutengine_Tracer$PointNode_horizontalLine;
  verticalLine = pointNode.lv_lumii_layoutengine_Tracer$PointNode_verticalLine;
  if (!!horizontalLine && !!verticalLine) {
    horizontalLineIndex = horizontalLine.lv_lumii_layoutengine_Tracer$Traceline_index;
    verticalLineIndex = verticalLine.lv_lumii_layoutengine_Tracer$Traceline_index;
    newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, horizontalLineIndex - 1, true, false, this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines, verticalLine);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
    newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, horizontalLineIndex + 1, false, false, this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines, verticalLine);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
    newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, verticalLineIndex - 1, true, true, this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines, horizontalLine);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
    newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, verticalLineIndex + 1, false, true, this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines, horizontalLine);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
  }
   else {
    if (!horizontalLine) {
      i = -(1 + java_util_Arrays_binarySearch___3Ljava_lang_Object_2Ljava_lang_Object_2Ljava_util_Comparator_2I(this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines, new lv_lumii_layoutengine_Tracer$Traceline_Tracer$Traceline__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(new lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_OrthogonalSegment$BoxSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Box_2V($intern_53, 0, 0, null, null), null, pointNode.lv_lumii_layoutengine_Tracer$PointNode_y), (java_util_Comparators_$clinit__V() , java_util_Comparators_$clinit__V() , java_util_Comparators_NATURAL)));
      up = verticalLine.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos == pointNode.lv_lumii_layoutengine_Tracer$PointNode_y;
      if (up) {
        newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, i - 1, true, false, this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines, verticalLine);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
      }
       else {
        newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, i, false, false, this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines, verticalLine);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
      }
    }
     else {
      i = -(1 + java_util_Arrays_binarySearch___3Ljava_lang_Object_2Ljava_lang_Object_2Ljava_util_Comparator_2I(this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines, new lv_lumii_layoutengine_Tracer$Traceline_Tracer$Traceline__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(new lv_lumii_layoutengine_OrthogonalSegment$BoxSegment_OrthogonalSegment$BoxSegment__DDDLlv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$SegmentType_2Llv_lumii_layoutengine_Box_2V($intern_53, 0, 0, null, null), null, pointNode.lv_lumii_layoutengine_Tracer$PointNode_x), (java_util_Comparators_$clinit__V() , java_util_Comparators_$clinit__V() , java_util_Comparators_NATURAL)));
      left = horizontalLine.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos == pointNode.lv_lumii_layoutengine_Tracer$PointNode_x;
      if (left) {
        newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, i - 1, true, true, this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines, horizontalLine);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
      }
       else {
        newNode = lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, i, false, true, this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines, horizontalLine);
        com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(pointNodes.java_util_ArrayList_array, pointNodes.java_util_ArrayList_array.length, newNode);
      }
    }
  }
  this$static.lv_lumii_layoutengine_Tracer_memPointNodes.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(pointNode, pointNodes);
  return pointNodes;
}

function lv_lumii_layoutengine_Tracer_$findNextPointNode__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2IZZ_3Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$PointNode_2(pointNode, startIndex, left, isHorizontal, tracelines, pathLine){
  var x_0, x0, y_0, y0;
  while ((left?startIndex >= 0:startIndex < tracelines.length) && (left?tracelines[startIndex].lv_lumii_layoutengine_Tracer$Traceline_y > pathLine.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:tracelines[startIndex].lv_lumii_layoutengine_Tracer$Traceline_y < pathLine.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos)) {
    if (tracelines[startIndex].lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos < (isHorizontal?pointNode.lv_lumii_layoutengine_Tracer$PointNode_y:pointNode.lv_lumii_layoutengine_Tracer$PointNode_x) && (isHorizontal?pointNode.lv_lumii_layoutengine_Tracer$PointNode_y:pointNode.lv_lumii_layoutengine_Tracer$PointNode_x) < tracelines[startIndex].lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos) {
      x0 = isHorizontal?tracelines[startIndex].lv_lumii_layoutengine_Tracer$Traceline_y:pointNode.lv_lumii_layoutengine_Tracer$PointNode_x;
      y0 = isHorizontal?pointNode.lv_lumii_layoutengine_Tracer$PointNode_y:tracelines[startIndex].lv_lumii_layoutengine_Tracer$Traceline_y;
      return new lv_lumii_layoutengine_Tracer$PointNode_Tracer$PointNode__DDZLlv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2V(x0, y0, isHorizontal, isHorizontal?pathLine:tracelines[startIndex], isHorizontal?tracelines[startIndex]:pathLine);
    }
    startIndex += left?-1:1;
  }
  x_0 = isHorizontal?left?pathLine.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:pathLine.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:pointNode.lv_lumii_layoutengine_Tracer$PointNode_x;
  y_0 = isHorizontal?pointNode.lv_lumii_layoutengine_Tracer$PointNode_y:left?pathLine.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:pathLine.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
  return new lv_lumii_layoutengine_Tracer$PointNode_Tracer$PointNode__DDZLlv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2V(x_0, y_0, isHorizontal, isHorizontal?pathLine:null, isHorizontal?null:pathLine);
}

function lv_lumii_layoutengine_Tracer_$findTraceLines__Llv_lumii_layoutengine_Tracer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2(this$static, segments){
  var endPart, graph, it, mid, parts, segment, segment$iterator, segmentPart, startPart, sweepline;
  graph = new java_util_ArrayList_ArrayList__V;
  if (segments.java_util_ArrayList_array.length == 0) {
    return graph;
  }
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(segments, null);
  sweepline = new java_util_TreeSet_TreeSet__V;
  java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V($intern_20, $intern_20, null));
  java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V($intern_53, $intern_53, null));
  for (segment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(segments); segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_last = segment$iterator.java_util_AbstractList$IteratorImpl_i++), 24));
    startPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_TreeSet_$lower__Ljava_util_TreeSet_2Ljava_lang_Object_2Ljava_lang_Object_2(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, segment)), 41);
    parts = java_util_TreeSet_$tailSet__Ljava_util_TreeSet_2Ljava_lang_Object_2ZLjava_util_NavigableSet_2(sweepline, startPart, java_lang_Math_max__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end));
    startPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap_getKeyOrNSE__Ljava_util_Map$Entry_2Ljava_lang_Object_2(parts.java_util_TreeSet_map.package_private$java_util_AbstractNavigableMap$getFirstEntry__Ljava_util_Map$Entry_2()), 41);
    endPart = startPart;
    it = java_util_AbstractNavigableMap$NavigableKeySet_$iterator__Ljava_util_AbstractNavigableMap$NavigableKeySet_2Ljava_util_Iterator_2(new java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V(parts.java_util_TreeSet_map));
    mid = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(it), 41);
    while (java_lang_Math_max__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end)) {
      java_util_TreeMap$EntryIterator_$remove__Ljava_util_TreeMap$EntryIterator_2V(it.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2);
      endPart = mid;
      (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 24).package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() != segment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() || mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom - mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top != segment.lv_lumii_layoutengine_obstacleGraph_Segment_end - segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) && java_lang_Math_min__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) - java_lang_Math_max__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) > this$static.lv_lumii_layoutengine_Tracer_epsilon && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(graph, new lv_lumii_layoutengine_Tracer$Traceline_Tracer$Traceline__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 24), segment, (java_lang_Math_max__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) + java_lang_Math_min__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end)) / 2));
      if (it.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2.java_util_TreeMap$EntryIterator_iter.hasNext__Z()) {
        mid = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(it), 41);
      }
       else {
        break;
      }
    }
    segmentPart = new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__Llv_lumii_layoutengine_obstacleGraph_Segment_2V(segment);
    sweepline.java_util_TreeSet_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentPart, (java_lang_Boolean_$clinit__V() , java_lang_Boolean_FALSE)) == null;
    if (java_lang_Math_max__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end)) {
      startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top < segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top && java_lang_Math_abs__DD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top - segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top) > this$static.lv_lumii_layoutengine_Tracer_epsilon && java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 24)));
      endPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom && java_lang_Math_abs__DD(segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom - endPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom) > this$static.lv_lumii_layoutengine_Tracer_epsilon && java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, endPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment, 24)));
    }
  }
  return graph;
}

function lv_lumii_layoutengine_Tracer_$generateGraph__Llv_lumii_layoutengine_Tracer_2V(this$static){
  var i, i0, traceLines;
  traceLines = lv_lumii_layoutengine_Tracer_$findTraceLines__Llv_lumii_layoutengine_Tracer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2(this$static, this$static.lv_lumii_layoutengine_Tracer_horizontalSegments);
  this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(traceLines, com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Tracer$Traceline_12_1classLit, $intern_73, 81, traceLines.java_util_ArrayList_array.length, 0, 1)), 187);
  java_util_Arrays_sort___3Ljava_lang_Object_2V(this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines);
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines.length; i0++) {
    this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines[i0].lv_lumii_layoutengine_Tracer$Traceline_index = i0;
  }
  traceLines = lv_lumii_layoutengine_Tracer_$findTraceLines__Llv_lumii_layoutengine_Tracer_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2(this$static, this$static.lv_lumii_layoutengine_Tracer_verticalSegments);
  this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(traceLines, com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Tracer$Traceline_12_1classLit, $intern_73, 81, traceLines.java_util_ArrayList_array.length, 0, 1)), 187);
  java_util_Arrays_sort___3Ljava_lang_Object_2V(this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines);
  for (i = 0; i < this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines.length; i++) {
    this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines[i].lv_lumii_layoutengine_Tracer$Traceline_index = i;
  }
  this$static.lv_lumii_layoutengine_Tracer_memPointNodes = new java_util_HashMap_HashMap__V;
}

function lv_lumii_layoutengine_Tracer_$trace__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2IILjava_util_ArrayList_2(this$static, a, b, startSides, endSides){
  var boxDistance, current, distance, left, newCornerCount, newDistance, newHeuristic, newPathNode, newPointNode, newPointNode$iterator, points, queue, relaxationMultiplier, side, size_0, swap, t, tmp, top_0, trace, traceline, traceline$array, traceline$array0, traceline$index, traceline$index0, traceline$max, traceline$max0, visited, x_0, y_0;
  if (a == b) {
    return lv_lumii_layoutengine_Tracer_connectOneBox__Llv_lumii_layoutengine_Box_2IIDLjava_util_ArrayList_2(a, startSides, endSides, a.lv_lumii_layoutengine_Element_spacing / 4);
  }
  distance = java_lang_Math_min__DDD(java_lang_Math_min__DDD(java_lang_Math_min__DDD(lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(a.lv_lumii_layoutengine_AbstractContainer_left, a.lv_lumii_layoutengine_AbstractContainer_top, b), lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(a.lv_lumii_layoutengine_AbstractContainer_left, a.lv_lumii_layoutengine_AbstractContainer_bottom, b)), java_lang_Math_min__DDD(lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(a.lv_lumii_layoutengine_AbstractContainer_right, a.lv_lumii_layoutengine_AbstractContainer_top, b), lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(a.lv_lumii_layoutengine_AbstractContainer_right, a.lv_lumii_layoutengine_AbstractContainer_bottom, b))), java_lang_Math_min__DDD(java_lang_Math_min__DDD(lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(b.lv_lumii_layoutengine_AbstractContainer_left, b.lv_lumii_layoutengine_AbstractContainer_top, a), lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(b.lv_lumii_layoutengine_AbstractContainer_left, b.lv_lumii_layoutengine_AbstractContainer_bottom, a)), java_lang_Math_min__DDD(lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(b.lv_lumii_layoutengine_AbstractContainer_right, b.lv_lumii_layoutengine_AbstractContainer_top, a), lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(b.lv_lumii_layoutengine_AbstractContainer_right, b.lv_lumii_layoutengine_AbstractContainer_bottom, a))));
  size_0 = java_lang_Math_max__DDD(java_lang_Math_max__DDD(a.lv_lumii_layoutengine_AbstractContainer_right - a.lv_lumii_layoutengine_AbstractContainer_left, b.lv_lumii_layoutengine_AbstractContainer_bottom - b.lv_lumii_layoutengine_AbstractContainer_top), java_lang_Math_max__DDD(b.lv_lumii_layoutengine_AbstractContainer_right - b.lv_lumii_layoutengine_AbstractContainer_left, b.lv_lumii_layoutengine_AbstractContainer_bottom - b.lv_lumii_layoutengine_AbstractContainer_top));
  relaxationMultiplier = distance < size_0?1:this$static.lv_lumii_layoutengine_Tracer_RELAXATION_1MULTIPLIER;
  swap = false;
  if ((new java_awt_geom_Point2D$Double_Point2D$Double__DDV((a.lv_lumii_layoutengine_AbstractContainer_left + a.lv_lumii_layoutengine_AbstractContainer_right) / 2, (a.lv_lumii_layoutengine_AbstractContainer_top + a.lv_lumii_layoutengine_AbstractContainer_bottom) / 2)).java_awt_geom_Point2D$Double_x > (new java_awt_geom_Point2D$Double_Point2D$Double__DDV((b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2, (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2)).java_awt_geom_Point2D$Double_x || (new java_awt_geom_Point2D$Double_Point2D$Double__DDV((a.lv_lumii_layoutengine_AbstractContainer_left + a.lv_lumii_layoutengine_AbstractContainer_right) / 2, (a.lv_lumii_layoutengine_AbstractContainer_top + a.lv_lumii_layoutengine_AbstractContainer_bottom) / 2)).java_awt_geom_Point2D$Double_x == (new java_awt_geom_Point2D$Double_Point2D$Double__DDV((b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2, (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2)).java_awt_geom_Point2D$Double_x && (new java_awt_geom_Point2D$Double_Point2D$Double__DDV((a.lv_lumii_layoutengine_AbstractContainer_left + a.lv_lumii_layoutengine_AbstractContainer_right) / 2, (a.lv_lumii_layoutengine_AbstractContainer_top + a.lv_lumii_layoutengine_AbstractContainer_bottom) / 2)).java_awt_geom_Point2D$Double_y > (new java_awt_geom_Point2D$Double_Point2D$Double__DDV((b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2, (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2)).java_awt_geom_Point2D$Double_y) {
    t = a;
    a = b;
    b = t;
    swap = true;
    tmp = startSides;
    startSides = endSides;
    endSides = tmp;
  }
  boxDistance = this$static.lv_lumii_layoutengine_Tracer_CORNER_1WEIGHT * (java_lang_Math_abs__DD((a.lv_lumii_layoutengine_AbstractContainer_left + a.lv_lumii_layoutengine_AbstractContainer_right) / 2 - (b.lv_lumii_layoutengine_AbstractContainer_left + b.lv_lumii_layoutengine_AbstractContainer_right) / 2) + java_lang_Math_abs__DD((a.lv_lumii_layoutengine_AbstractContainer_top + a.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - (b.lv_lumii_layoutengine_AbstractContainer_top + b.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
  queue = new java_util_PriorityQueue_PriorityQueue__V;
  for (traceline$array0 = this$static.lv_lumii_layoutengine_Tracer_horizontalTraceLines , traceline$index0 = 0 , traceline$max0 = traceline$array0.length; traceline$index0 < traceline$max0; ++traceline$index0) {
    traceline = traceline$array0[traceline$index0];
    if (traceline.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() == a || traceline.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() == a) {
      left = traceline.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() == a;
      if (left) {
        if ((startSides & 2) == 0) {
          continue;
        }
      }
       else {
        if ((startSides & 8) == 0) {
          continue;
        }
      }
      x_0 = left?traceline.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:traceline.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
      y_0 = traceline.lv_lumii_layoutengine_Tracer$Traceline_y;
      lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(x_0, y_0, a) == 0 && (com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZLjava_lang_Object_2V(java_util_PriorityQueue_$offer__Ljava_util_PriorityQueue_2Ljava_lang_Object_2Z(queue, new lv_lumii_layoutengine_Tracer$PathNode_Tracer$PathNode__Llv_lumii_layoutengine_Tracer$PointNode_2DLlv_lumii_layoutengine_Tracer$PathNode_2IDDV(new lv_lumii_layoutengine_Tracer$PointNode_Tracer$PointNode__DDZLlv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2V(x_0, y_0, true, traceline, null), 0, null, 0, boxDistance, lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(x_0, y_0, b) * relaxationMultiplier))) , true);
    }
  }
  for (traceline$array = this$static.lv_lumii_layoutengine_Tracer_verticalTraceLines , traceline$index = 0 , traceline$max = traceline$array.length; traceline$index < traceline$max; ++traceline$index) {
    traceline = traceline$array[traceline$index];
    if (traceline.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() == a || traceline.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() == a) {
      top_0 = traceline.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.package_private$lv_lumii_layoutengine_OrthogonalSegment$RectangleSegment$getContainer__Llv_lumii_layoutengine_AbstractContainer_2() == a;
      if (top_0) {
        if ((startSides & 4) == 0) {
          continue;
        }
      }
       else {
        if ((startSides & 1) == 0) {
          continue;
        }
      }
      x_0 = traceline.lv_lumii_layoutengine_Tracer$Traceline_y;
      y_0 = top_0?traceline.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos:traceline.lv_lumii_layoutengine_Tracer$Traceline_rightSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos;
      lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(x_0, y_0, a) == 0 && (com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZLjava_lang_Object_2V(java_util_PriorityQueue_$offer__Ljava_util_PriorityQueue_2Ljava_lang_Object_2Z(queue, new lv_lumii_layoutengine_Tracer$PathNode_Tracer$PathNode__Llv_lumii_layoutengine_Tracer$PointNode_2DLlv_lumii_layoutengine_Tracer$PathNode_2IDDV(new lv_lumii_layoutengine_Tracer$PointNode_Tracer$PointNode__DDZLlv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2V(x_0, y_0, false, null, traceline), 0, null, 0, boxDistance, lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(x_0, y_0, b) * relaxationMultiplier))) , true);
    }
  }
  visited = new java_util_HashMap_HashMap__V;
  current = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractQueue_$remove__Ljava_util_AbstractQueue_2Ljava_lang_Object_2(queue), 75);
  while (current.lv_lumii_layoutengine_Tracer$PathNode_h > 0) {
    if (!visited.containsKey__Ljava_lang_Object_2Z(current.lv_lumii_layoutengine_Tracer$PathNode_pointNode) || lv_lumii_layoutengine_Tracer$PathNode_$compareTo__Llv_lumii_layoutengine_Tracer$PathNode_2Llv_lumii_layoutengine_Tracer$PathNode_2I(current, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(visited.get__Ljava_lang_Object_2Ljava_lang_Object_2(current.lv_lumii_layoutengine_Tracer$PathNode_pointNode), 75)) < 0) {
      visited.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(current.lv_lumii_layoutengine_Tracer$PathNode_pointNode, current);
      for (newPointNode$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Tracer_$findAdjacentPointNodes__Llv_lumii_layoutengine_Tracer_2Llv_lumii_layoutengine_Tracer$PointNode_2Ljava_util_ArrayList_2(this$static, current.lv_lumii_layoutengine_Tracer$PathNode_pointNode)); newPointNode$iterator.java_util_AbstractList$IteratorImpl_i < newPointNode$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        newPointNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(newPointNode$iterator.java_util_AbstractList$IteratorImpl_i < newPointNode$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newPointNode$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(newPointNode$iterator.java_util_AbstractList$IteratorImpl_last = newPointNode$iterator.java_util_AbstractList$IteratorImpl_i++), 91));
        newDistance = java_lang_Math_abs__DD(newPointNode.lv_lumii_layoutengine_Tracer$PointNode_x - current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_x) + java_lang_Math_abs__DD(newPointNode.lv_lumii_layoutengine_Tracer$PointNode_y - current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_y) + current.lv_lumii_layoutengine_Tracer$PathNode_distance;
        newCornerCount = current.lv_lumii_layoutengine_Tracer$PathNode_cornerCount + (!!current.lv_lumii_layoutengine_Tracer$PathNode_prev && newPointNode.lv_lumii_layoutengine_Tracer$PointNode_x != current.lv_lumii_layoutengine_Tracer$PathNode_prev.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_x && newPointNode.lv_lumii_layoutengine_Tracer$PointNode_y != current.lv_lumii_layoutengine_Tracer$PathNode_prev.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_y?1:0);
        newHeuristic = lv_lumii_layoutengine_GeometryHelper_findManhattanDistance__DDLlv_lumii_layoutengine_Box_2D(newPointNode.lv_lumii_layoutengine_Tracer$PointNode_x, newPointNode.lv_lumii_layoutengine_Tracer$PointNode_y, b);
        newPathNode = new lv_lumii_layoutengine_Tracer$PathNode_Tracer$PathNode__Llv_lumii_layoutengine_Tracer$PointNode_2DLlv_lumii_layoutengine_Tracer$PathNode_2IDDV(newPointNode, newDistance, current, newCornerCount, boxDistance, newHeuristic * relaxationMultiplier);
        (!visited.containsKey__Ljava_lang_Object_2Z(newPointNode) || lv_lumii_layoutengine_Tracer$PathNode_$compareTo__Llv_lumii_layoutengine_Tracer$PathNode_2Llv_lumii_layoutengine_Tracer$PathNode_2I(newPathNode, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(visited.get__Ljava_lang_Object_2Ljava_lang_Object_2(newPointNode), 75)) < 0) && (com_google_gwt_core_shared_impl_InternalPreconditions_checkState__ZLjava_lang_Object_2V(java_util_PriorityQueue_$offer__Ljava_util_PriorityQueue_2Ljava_lang_Object_2Z(queue, newPathNode)) , true);
      }
    }
    current = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractQueue_$remove__Ljava_util_AbstractQueue_2Ljava_lang_Object_2(queue), 75);
    while (current.lv_lumii_layoutengine_Tracer$PathNode_h == 0) {
      side = lv_lumii_layoutengine_Box$BoxSide_findPointSide__Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box$BoxSide_2(new java_awt_geom_Point2D$Double_Point2D$Double__DDV(current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_x, current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_y), new java_awt_geom_Point2D$Double_Point2D$Double__DDV(current.lv_lumii_layoutengine_Tracer$PathNode_prev.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_x, current.lv_lumii_layoutengine_Tracer$PathNode_prev.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_y), b);
      if ((side.lv_lumii_layoutengine_Box$BoxSide_mask & endSides) == 0) {
        current = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractQueue_$remove__Ljava_util_AbstractQueue_2Ljava_lang_Object_2(queue), 75);
      }
       else {
        break;
      }
    }
  }
  trace = new java_util_LinkedList_LinkedList__V;
  if (swap) {
    while (current) {
      java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(trace, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_x, current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_y));
      current = current.lv_lumii_layoutengine_Tracer$PathNode_prev;
    }
  }
   else {
    while (current) {
      java_util_LinkedList_$addFirst__Ljava_util_LinkedList_2Ljava_lang_Object_2V(trace, new java_awt_geom_Point2D$Double_Point2D$Double__DDV(current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_x, current.lv_lumii_layoutengine_Tracer$PathNode_pointNode.lv_lumii_layoutengine_Tracer$PointNode_y));
      current = current.lv_lumii_layoutengine_Tracer$PathNode_prev;
    }
  }
  points = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(trace);
  return points;
}

function lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(start_0, end){
  var boundingBox, boxes, spacing;
  lv_lumii_layoutengine_Tracer_$$init__Llv_lumii_layoutengine_Tracer_2V(this);
  this.lv_lumii_layoutengine_Tracer_RELAXATION_1MULTIPLIER = 1;
  this.lv_lumii_layoutengine_Tracer_CORNER_1WEIGHT = 10;
  this.lv_lumii_layoutengine_Tracer_epsilon = start_0.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  spacing = java_lang_Math_max__DDD(start_0.lv_lumii_layoutengine_Element_spacing, end.lv_lumii_layoutengine_Element_spacing);
  boundingBox = new lv_lumii_layoutengine_Box_Box__DDDDLlv_lumii_layoutengine_Container_2DV(java_lang_Math_min__DDD(start_0.lv_lumii_layoutengine_AbstractContainer_left, end.lv_lumii_layoutengine_AbstractContainer_left) - spacing, java_lang_Math_max__DDD(start_0.lv_lumii_layoutengine_AbstractContainer_right, end.lv_lumii_layoutengine_AbstractContainer_right) + spacing, java_lang_Math_min__DDD(start_0.lv_lumii_layoutengine_AbstractContainer_top, end.lv_lumii_layoutengine_AbstractContainer_top) - spacing, java_lang_Math_max__DDD(start_0.lv_lumii_layoutengine_AbstractContainer_bottom, end.lv_lumii_layoutengine_AbstractContainer_bottom) + spacing, start_0.lv_lumii_layoutengine_Element_diagram, spacing);
  boxes = new java_util_ArrayList_ArrayList__V;
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(boxes.java_util_ArrayList_array, boxes.java_util_ArrayList_array.length, start_0);
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(boxes.java_util_ArrayList_array, boxes.java_util_ArrayList_array.length, end);
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(boxes.java_util_ArrayList_array, boxes.java_util_ArrayList_array.length, boundingBox);
  this.lv_lumii_layoutengine_Tracer_horizontalSegments = lv_lumii_layoutengine_LineOptimizer_findSpacedSegments__Ljava_util_Collection_2ZDLjava_util_ArrayList_2(boxes, true, 1.0E-9);
  this.lv_lumii_layoutengine_Tracer_verticalSegments = lv_lumii_layoutengine_LineOptimizer_findSpacedSegments__Ljava_util_Collection_2ZDLjava_util_ArrayList_2(boxes, false, 1.0E-9);
  lv_lumii_layoutengine_Tracer_$generateGraph__Llv_lumii_layoutengine_Tracer_2V(this);
}

function lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(firstParent, secondParent, lca){
  var obstacles;
  lv_lumii_layoutengine_Tracer_$$init__Llv_lumii_layoutengine_Tracer_2V(this);
  this.lv_lumii_layoutengine_Tracer_epsilon = lca.lv_lumii_layoutengine_Element_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  obstacles = lv_lumii_layoutengine_LineOptimizer_getObstacleRectangles__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2ZLjava_util_LinkedHashSet_2(firstParent, secondParent, lca, true);
  this.lv_lumii_layoutengine_Tracer_horizontalSegments = lv_lumii_layoutengine_LineOptimizer_findSpacedSegments__Ljava_util_Collection_2ZDLjava_util_ArrayList_2(obstacles, true, $intern_19);
  this.lv_lumii_layoutengine_Tracer_verticalSegments = lv_lumii_layoutengine_LineOptimizer_findSpacedSegments__Ljava_util_Collection_2ZDLjava_util_ArrayList_2(obstacles, false, $intern_19);
  lv_lumii_layoutengine_Tracer_$generateGraph__Llv_lumii_layoutengine_Tracer_2V(this);
}

function lv_lumii_layoutengine_Tracer_connectOneBox__Llv_lumii_layoutengine_Box_2IIDLjava_util_ArrayList_2(box, startSides, endSides, spacing){
  var bottom, connectedLines, cw, dir_0, end, endPoint, epsilon, firstDir, firstSide, i, i0, i1, i2, i3, iDir, iLen, iSize, j, jDir, jLen, jSize, left, line, line$iterator, line$iterator0, points, right, secondDir, secondSide, sideHorizontal, sidePairs, start_0, top_0, w, wi, wj, x_0, y_0;
  connectedLines = new java_util_ArrayList_ArrayList__V;
  for (i0 = 0; i0 < 4; i0++) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(connectedLines, new java_util_ArrayList_ArrayList__V);
  }
  left = box.lv_lumii_layoutengine_AbstractContainer_left;
  right = box.lv_lumii_layoutengine_AbstractContainer_right;
  top_0 = box.lv_lumii_layoutengine_AbstractContainer_top;
  bottom = box.lv_lumii_layoutengine_AbstractContainer_bottom;
  for (line$iterator0 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(box.lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator0.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator0), 10);
    if (lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) != lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
      for (i1 = 0; i1 < 2; i1++) {
        if (i1 == 0 && lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) == box) {
          endPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
        }
         else if (i1 == 1 && lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) == box) {
          endPoint = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry);
        }
         else {
          continue;
        }
        box.lv_lumii_layoutengine_AbstractContainer_left <= endPoint.java_awt_geom_Point2D$Double_x && endPoint.java_awt_geom_Point2D$Double_x <= box.lv_lumii_layoutengine_AbstractContainer_right && box.lv_lumii_layoutengine_AbstractContainer_top <= endPoint.java_awt_geom_Point2D$Double_y && endPoint.java_awt_geom_Point2D$Double_y <= box.lv_lumii_layoutengine_AbstractContainer_bottom && (endPoint.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_top || endPoint.java_awt_geom_Point2D$Double_y == box.lv_lumii_layoutengine_AbstractContainer_bottom || endPoint.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_left || endPoint.java_awt_geom_Point2D$Double_x == box.lv_lumii_layoutengine_AbstractContainer_right) && (endPoint.java_awt_geom_Point2D$Double_y == top_0?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[0], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_x))):endPoint.java_awt_geom_Point2D$Double_x == right?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[1], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_y))):endPoint.java_awt_geom_Point2D$Double_y == bottom?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[2], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_x))):endPoint.java_awt_geom_Point2D$Double_x == left && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[3], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_y))));
      }
    }
  }
  for (i2 = 0; i2 < 4; i2++) {
    if (i2 % 2 == 0) {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i2], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(left)));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i2], 4)), new java_lang_Double_Double__DV(right));
    }
     else {
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i2], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(top_0)));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i2], 4)), new java_lang_Double_Double__DV(bottom));
    }
    java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i2], 69)), null);
  }
  sidePairs = new java_util_ArrayList_ArrayList__V;
  for (i3 = 0; i3 < 4; i3++) {
    if ((startSides & 1 << i3) != 0) {
      for (j = 0; j < 4; j++) {
        if ((endSides & 1 << j) != 0) {
          if (i3 == j) {
            w = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i3], 4)).java_util_ArrayList_array.length - 2;
            java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(sidePairs, new lv_lumii_layoutengine_Tracer$SidePair_Tracer$SidePair__Llv_lumii_layoutengine_util_Pair_2IIV(new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(w == 0?1:3), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV($intern_62))), i3, i3));
          }
           else if ((i3 + j) % 2 == 1) {
            wi = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i3], 4)).java_util_ArrayList_array.length - 2;
            wj = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[j], 4)).java_util_ArrayList_array.length - 2;
            cw = (i3 + 1) % 4 == j;
            iDir = i3 < 2 ^ !cw;
            jDir = j < 2 ^ cw;
            iSize = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i3], 4)).java_util_ArrayList_array.length;
            jSize = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[j], 4)).java_util_ArrayList_array.length;
            iLen = iDir?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i3], 4)), iSize - 1), 11).java_lang_Double_value - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i3], 4)), iSize - 2), 11).java_lang_Double_value:com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i3], 4)), 1), 11).java_lang_Double_value - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[i3], 4)), 0), 11).java_lang_Double_value;
            jLen = jDir?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[j], 4)), jSize - 1), 11).java_lang_Double_value - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[j], 4)), jSize - 2), 11).java_lang_Double_value:com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[j], 4)), 1), 11).java_lang_Double_value - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[j], 4)), 0), 11).java_lang_Double_value;
            java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(sidePairs, new lv_lumii_layoutengine_Tracer$SidePair_Tracer$SidePair__Llv_lumii_layoutengine_util_Pair_2IIV(new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(wi + wj == 0?cw?0:1:cw?2:3), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(iLen < jLen?iLen:jLen))), i3, j));
          }
           else {
            java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(sidePairs, new lv_lumii_layoutengine_Tracer$SidePair_Tracer$SidePair__Llv_lumii_layoutengine_util_Pair_2IIV(new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(java_lang_Integer_valueOf__ILjava_lang_Integer_2(4), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(0))), i3, j));
          }
        }
      }
    }
  }
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(sidePairs, null);
  firstSide = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, sidePairs.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sidePairs.java_util_ArrayList_array[0], 104)).lv_lumii_layoutengine_Tracer$SidePair_firstSide;
  secondSide = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, sidePairs.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sidePairs.java_util_ArrayList_array[0], 104)).lv_lumii_layoutengine_Tracer$SidePair_secondSide;
  epsilon = java_lang_Math_min__DDD(spacing / 2, java_lang_Math_min__DDD(box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left, box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top) / 3);
  sideHorizontal = firstSide % 2 == 0;
  if (firstSide == secondSide) {
    dir_0 = firstSide < 2?1:-1;
    if (sideHorizontal) {
      y_0 = firstSide == 0?top_0:bottom;
      x_0 = (box.lv_lumii_layoutengine_AbstractContainer_left + box.lv_lumii_layoutengine_AbstractContainer_right) / 2;
      start_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0 - epsilon * dir_0, y_0);
      end = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0 + epsilon * dir_0, y_0);
    }
     else {
      x_0 = firstSide == 3?left:right;
      y_0 = (box.lv_lumii_layoutengine_AbstractContainer_top + box.lv_lumii_layoutengine_AbstractContainer_bottom) / 2;
      start_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, y_0 - epsilon * dir_0);
      end = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, y_0 + epsilon * dir_0);
    }
  }
   else if ((firstSide + secondSide) % 2 == 1) {
    cw = (firstSide + 1) % 4 == secondSide;
    firstDir = firstSide < 2 ^ !cw;
    secondDir = secondSide < 2 ^ cw;
    if (sideHorizontal) {
      start_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(firstDir?right - epsilon:left + epsilon, firstSide == 0?top_0:bottom);
      end = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(secondSide == 1?right:left, secondDir?bottom - epsilon:top_0 + epsilon);
    }
     else {
      start_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(firstSide == 1?right:left, firstDir?bottom - epsilon:top_0 + epsilon);
      end = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(secondDir?right - epsilon:left + epsilon, secondSide == 0?top_0:bottom);
    }
  }
   else {
    for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(box.lv_lumii_layoutengine_Box_incidentLines.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
      if (!!line.lv_lumii_layoutengine_Line_lineGeometry && lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) == lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
        for (i = 0; i < 2; i++) {
          endPoint = i == 0?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3):lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry);
          endPoint.java_awt_geom_Point2D$Double_y == top_0?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[0], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_x))):endPoint.java_awt_geom_Point2D$Double_x == right?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[1], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_y))):endPoint.java_awt_geom_Point2D$Double_y == bottom?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[2], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_x))):endPoint.java_awt_geom_Point2D$Double_x == left && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[3], 4)), (java_lang_Double_$clinit__V() , new java_lang_Double_Double__DV(endPoint.java_awt_geom_Point2D$Double_y)));
        }
      }
    }
    if (sideHorizontal) {
      x_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[1], 4)).java_util_ArrayList_array.length < (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(3, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[3], 4)).java_util_ArrayList_array.length?right - 2 * epsilon:left + 2 * epsilon;
      start_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, firstSide == 0?top_0:bottom);
      end = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(x_0, secondSide == 0?top_0:bottom);
    }
     else {
      y_0 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[0], 4)).java_util_ArrayList_array.length < (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(2, connectedLines.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(connectedLines.java_util_ArrayList_array[2], 4)).java_util_ArrayList_array.length?top_0 + 2 * epsilon:bottom - 2 * epsilon;
      start_0 = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(firstSide == 1?right:left, y_0);
      end = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(secondSide == 1?right:left, y_0);
    }
  }
  points = new java_util_ArrayList_ArrayList__V;
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(points.java_util_ArrayList_array, points.java_util_ArrayList_array.length, start_0);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(points, lv_lumii_layoutengine_LineOptimizer_traceAroundBox__Llv_lumii_layoutengine_Box_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box$BoxSide_2Ljava_awt_geom_Point2D$Double_2Llv_lumii_layoutengine_Box$BoxSide_2DLjava_util_ArrayList_2(box, start_0, (lv_lumii_layoutengine_Box$BoxSide_$clinit__V() , com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box$BoxSide_12_1classLit, 1), $intern_32, 73, 0, [lv_lumii_layoutengine_Box$BoxSide_TOP, lv_lumii_layoutengine_Box$BoxSide_RIGHT, lv_lumii_layoutengine_Box$BoxSide_BOTTOM, lv_lumii_layoutengine_Box$BoxSide_LEFT]))[firstSide], end, com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Box$BoxSide_12_1classLit, 1), $intern_32, 73, 0, [lv_lumii_layoutengine_Box$BoxSide_TOP, lv_lumii_layoutengine_Box$BoxSide_RIGHT, lv_lumii_layoutengine_Box$BoxSide_BOTTOM, lv_lumii_layoutengine_Box$BoxSide_LEFT])[secondSide], spacing / 2 + box.lv_lumii_layoutengine_Element_spacing));
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(points.java_util_ArrayList_array, points.java_util_ArrayList_array.length, end);
  return points;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(128, 1, {}, lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V, lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V);
_.lv_lumii_layoutengine_Tracer_CORNER_1WEIGHT = 0.621;
_.lv_lumii_layoutengine_Tracer_RELAXATION_1MULTIPLIER = 2.3;
_.lv_lumii_layoutengine_Tracer_epsilon = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Tracer_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Tracer', 128);
function lv_lumii_layoutengine_Tracer$PathNode_$compareTo__Llv_lumii_layoutengine_Tracer$PathNode_2Llv_lumii_layoutengine_Tracer$PathNode_2I(this$static, p){
  return java_lang_Double_compare__DDI(this$static.lv_lumii_layoutengine_Tracer$PathNode_distance + this$static.lv_lumii_layoutengine_Tracer$PathNode_boxDistance * this$static.lv_lumii_layoutengine_Tracer$PathNode_cornerCount + this$static.lv_lumii_layoutengine_Tracer$PathNode_h, p.lv_lumii_layoutengine_Tracer$PathNode_distance + p.lv_lumii_layoutengine_Tracer$PathNode_boxDistance * p.lv_lumii_layoutengine_Tracer$PathNode_cornerCount + p.lv_lumii_layoutengine_Tracer$PathNode_h);
}

function lv_lumii_layoutengine_Tracer$PathNode_Tracer$PathNode__Llv_lumii_layoutengine_Tracer$PointNode_2DLlv_lumii_layoutengine_Tracer$PathNode_2IDDV(pointNode, distance, prev, cornerCount, boxDistance, heuristic){
  this.lv_lumii_layoutengine_Tracer$PathNode_pointNode = pointNode;
  this.lv_lumii_layoutengine_Tracer$PathNode_distance = distance;
  this.lv_lumii_layoutengine_Tracer$PathNode_prev = prev;
  this.lv_lumii_layoutengine_Tracer$PathNode_cornerCount = cornerCount;
  this.lv_lumii_layoutengine_Tracer$PathNode_boxDistance = boxDistance;
  this.lv_lumii_layoutengine_Tracer$PathNode_h = heuristic;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(75, 1, {29:1, 75:1}, lv_lumii_layoutengine_Tracer$PathNode_Tracer$PathNode__Llv_lumii_layoutengine_Tracer$PointNode_2DLlv_lumii_layoutengine_Tracer$PathNode_2IDDV);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_Tracer$PathNode_compareTo__Ljava_lang_Object_2I(p){
  return lv_lumii_layoutengine_Tracer$PathNode_$compareTo__Llv_lumii_layoutengine_Tracer$PathNode_2Llv_lumii_layoutengine_Tracer$PathNode_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(p, 75));
}
;
_.lv_lumii_layoutengine_Tracer$PathNode_boxDistance = 0;
_.lv_lumii_layoutengine_Tracer$PathNode_cornerCount = 0;
_.lv_lumii_layoutengine_Tracer$PathNode_distance = 0;
_.lv_lumii_layoutengine_Tracer$PathNode_h = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Tracer$PathNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Tracer/PathNode', 75);
function lv_lumii_layoutengine_Tracer$PointNode_Tracer$PointNode__DDZLlv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2V(x_0, y_0, horizontalDirection, horizontalLine, verticalLine){
  this.lv_lumii_layoutengine_Tracer$PointNode_x = x_0;
  this.lv_lumii_layoutengine_Tracer$PointNode_y = y_0;
  this.lv_lumii_layoutengine_Tracer$PointNode_horizontalDirection = horizontalDirection;
  this.lv_lumii_layoutengine_Tracer$PointNode_horizontalLine = horizontalLine;
  this.lv_lumii_layoutengine_Tracer$PointNode_verticalLine = verticalLine;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(91, 1, {91:1}, lv_lumii_layoutengine_Tracer$PointNode_Tracer$PointNode__DDZLlv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2V);
_.equals__Ljava_lang_Object_2Z$ = function lv_lumii_layoutengine_Tracer$PointNode_equals__Ljava_lang_Object_2Z(o){
  var p;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 91)) {
    p = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 91);
    return this.lv_lumii_layoutengine_Tracer$PointNode_x == p.lv_lumii_layoutengine_Tracer$PointNode_x && this.lv_lumii_layoutengine_Tracer$PointNode_y == p.lv_lumii_layoutengine_Tracer$PointNode_y && this.lv_lumii_layoutengine_Tracer$PointNode_horizontalDirection == p.lv_lumii_layoutengine_Tracer$PointNode_horizontalDirection;
  }
   else {
    return false;
  }
}
;
_.hashCode__I$ = function lv_lumii_layoutengine_Tracer$PointNode_hashCode__I(){
  var hash;
  hash = 413 + com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_xor__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.lv_lumii_layoutengine_Tracer$PointNode_x), com_google_gwt_lang_LongLib_shru__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.lv_lumii_layoutengine_Tracer$PointNode_x), 32)));
  hash = 59 * hash + com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_xor__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.lv_lumii_layoutengine_Tracer$PointNode_y), com_google_gwt_lang_LongLib_shru__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.lv_lumii_layoutengine_Tracer$PointNode_y), 32)));
  hash = 59 * hash + (this.lv_lumii_layoutengine_Tracer$PointNode_horizontalDirection?1:0);
  return hash;
}
;
_.toString__Ljava_lang_String_2$ = function lv_lumii_layoutengine_Tracer$PointNode_toString__Ljava_lang_String_2(){
  return '(' + this.lv_lumii_layoutengine_Tracer$PointNode_x + ',' + this.lv_lumii_layoutengine_Tracer$PointNode_y + ')';
}
;
_.lv_lumii_layoutengine_Tracer$PointNode_horizontalDirection = false;
_.lv_lumii_layoutengine_Tracer$PointNode_x = 0;
_.lv_lumii_layoutengine_Tracer$PointNode_y = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Tracer$PointNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Tracer/PointNode', 91);
function lv_lumii_layoutengine_Tracer$SidePair_$compareTo__Llv_lumii_layoutengine_Tracer$SidePair_2Llv_lumii_layoutengine_Tracer$SidePair_2I(this$static, o){
  return lv_lumii_layoutengine_util_Pair_$compareTo__Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2I(this$static.lv_lumii_layoutengine_Tracer$SidePair_cost, o.lv_lumii_layoutengine_Tracer$SidePair_cost);
}

function lv_lumii_layoutengine_Tracer$SidePair_Tracer$SidePair__Llv_lumii_layoutengine_util_Pair_2IIV(cost, firstSide, secondSide){
  this.lv_lumii_layoutengine_Tracer$SidePair_cost = cost;
  this.lv_lumii_layoutengine_Tracer$SidePair_firstSide = firstSide;
  this.lv_lumii_layoutengine_Tracer$SidePair_secondSide = secondSide;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(104, 1, {29:1, 104:1}, lv_lumii_layoutengine_Tracer$SidePair_Tracer$SidePair__Llv_lumii_layoutengine_util_Pair_2IIV);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_Tracer$SidePair_compareTo__Ljava_lang_Object_2I(o){
  return lv_lumii_layoutengine_Tracer$SidePair_$compareTo__Llv_lumii_layoutengine_Tracer$SidePair_2Llv_lumii_layoutengine_Tracer$SidePair_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 104));
}
;
_.lv_lumii_layoutengine_Tracer$SidePair_firstSide = 0;
_.lv_lumii_layoutengine_Tracer$SidePair_secondSide = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Tracer$SidePair_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Tracer/SidePair', 104);
function lv_lumii_layoutengine_Tracer$Traceline_$compareTo__Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2I(this$static, t){
  return this$static.lv_lumii_layoutengine_Tracer$Traceline_y == t.lv_lumii_layoutengine_Tracer$Traceline_y?java_lang_Double_compare__DDI(this$static.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos, t.lv_lumii_layoutengine_Tracer$Traceline_leftSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos):java_lang_Double_compare__DDI(this$static.lv_lumii_layoutengine_Tracer$Traceline_y, t.lv_lumii_layoutengine_Tracer$Traceline_y);
}

function lv_lumii_layoutengine_Tracer$Traceline_Tracer$Traceline__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV(left, right, y_0){
  this.lv_lumii_layoutengine_Tracer$Traceline_leftSegment = left;
  this.lv_lumii_layoutengine_Tracer$Traceline_rightSegment = right;
  this.lv_lumii_layoutengine_Tracer$Traceline_y = y_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(81, 1, {29:1, 81:1}, lv_lumii_layoutengine_Tracer$Traceline_Tracer$Traceline__Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2Llv_lumii_layoutengine_OrthogonalSegment$RectangleSegment_2DV);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_Tracer$Traceline_compareTo__Ljava_lang_Object_2I(t){
  return lv_lumii_layoutengine_Tracer$Traceline_$compareTo__Llv_lumii_layoutengine_Tracer$Traceline_2Llv_lumii_layoutengine_Tracer$Traceline_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t, 81));
}
;
_.equals__Ljava_lang_Object_2Z$ = function lv_lumii_layoutengine_Tracer$Traceline_equals__Ljava_lang_Object_2Z(o){
  var t;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(o, 81)) {
    t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 81);
    return this.lv_lumii_layoutengine_Tracer$Traceline_y == t.lv_lumii_layoutengine_Tracer$Traceline_y && this.lv_lumii_layoutengine_Tracer$Traceline_leftSegment == t.lv_lumii_layoutengine_Tracer$Traceline_leftSegment && this.lv_lumii_layoutengine_Tracer$Traceline_rightSegment == t.lv_lumii_layoutengine_Tracer$Traceline_rightSegment;
  }
   else {
    return false;
  }
}
;
_.hashCode__I$ = function lv_lumii_layoutengine_Tracer$Traceline_hashCode__I(){
  var hash;
  hash = 329 + java_util_Objects_hashCode__Ljava_lang_Object_2I(this.lv_lumii_layoutengine_Tracer$Traceline_leftSegment);
  hash = 47 * hash + java_util_Objects_hashCode__Ljava_lang_Object_2I(this.lv_lumii_layoutengine_Tracer$Traceline_rightSegment);
  hash = 47 * hash + com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_xor__Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2Lcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.lv_lumii_layoutengine_Tracer$Traceline_y), com_google_gwt_lang_LongLib_shru__Lcom_google_gwt_lang_LongLibBase$LongEmul_2ILcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Double_doubleToLongBits__DJ(this.lv_lumii_layoutengine_Tracer$Traceline_y), 32)));
  return hash;
}
;
_.lv_lumii_layoutengine_Tracer$Traceline_index = 0;
_.lv_lumii_layoutengine_Tracer$Traceline_y = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Tracer$Traceline_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Tracer/Traceline', 81);
function lv_lumii_layoutengine_Transaction_Transaction__Llv_lumii_layoutengine_Diagram_2V(diagram){
  this.lv_lumii_layoutengine_Transaction_diagram = diagram;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(137, 1, {});
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction', 137);
function lv_lumii_layoutengine_Transaction$AdjustTransaction_Transaction$AdjustTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram){
  lv_lumii_layoutengine_Transaction_Transaction__Llv_lumii_layoutengine_Diagram_2V.call(this, diagram);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(122, 137, {122:1}, lv_lumii_layoutengine_Transaction$AdjustTransaction_Transaction$AdjustTransaction__Llv_lumii_layoutengine_Diagram_2V);
_.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V = function lv_lumii_layoutengine_Transaction$AdjustTransaction_addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(operation){
}
;
_.package_private$lv_lumii_layoutengine_Transaction$perform__V = function lv_lumii_layoutengine_Transaction$AdjustTransaction_perform__V(){
  var box, box$iterator, line, line$iterator;
  if (this.lv_lumii_layoutengine_Transaction$AdjustTransaction_removeNullLines) {
    for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this.lv_lumii_layoutengine_Transaction_diagram)); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
      for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Box_$getIncidentLines__Llv_lumii_layoutengine_Box_2Ljava_util_ArrayList_2(box)); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
        if (!line.lv_lumii_layoutengine_Element_owner) {
          java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line).lv_lumii_layoutengine_Box_incidentLines, line);
          java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line).lv_lumii_layoutengine_Box_incidentLines, line);
        }
      }
    }
  }
  lv_lumii_layoutengine_Diagram_$updateEpsilon__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  lv_lumii_layoutengine_Diagram_$adjust__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  lv_lumii_layoutengine_Adjuster_updateBoxCurrentMinSize__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
}
;
_.lv_lumii_layoutengine_Transaction$AdjustTransaction_removeNullLines = false;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$AdjustTransaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/AdjustTransaction', 122);
function lv_lumii_layoutengine_Transaction$LineTransaction_Transaction$LineTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, firstParent, secondParent, lca){
  lv_lumii_layoutengine_Transaction_Transaction__Llv_lumii_layoutengine_Diagram_2V.call(this, diagram);
  this.lv_lumii_layoutengine_Transaction$LineTransaction_firstParent = firstParent;
  this.lv_lumii_layoutengine_Transaction$LineTransaction_secondParent = secondParent;
  this.lv_lumii_layoutengine_Transaction$LineTransaction_lca = lca;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(70, 137, $intern_74);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$LineTransaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/LineTransaction', 70);
function lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_Transaction$LineTransaction$CleanupTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, firstParent, secondParent, lca){
  lv_lumii_layoutengine_Transaction$LineTransaction_Transaction$LineTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V.call(this, diagram, firstParent, secondParent, lca);
  this.lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_lines = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(217, 70, $intern_74, lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_Transaction$LineTransaction$CleanupTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V);
_.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V = function lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(operation){
  com_google_gwt_lang_Cast_throwClassCastExceptionUnlessNull__Ljava_lang_Object_2Ljava_lang_Object_2(operation);
  null.nullMethod() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL) && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_lines, null.nullField);
}
;
_.package_private$lv_lumii_layoutengine_Transaction$perform__V = function lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_perform__V(){
  lv_lumii_layoutengine_LineOptimizer_cleanupLines__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(this.lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_lines, null, null, true);
  lv_lumii_layoutengine_Diagram_$adjust__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  lv_lumii_layoutengine_Adjuster_updateBoxCurrentMinSize__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
}
;
_.package_private$lv_lumii_layoutengine_Transaction$LineTransaction$performWithoutAdjust__V = function lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_performWithoutAdjust__V(){
  lv_lumii_layoutengine_LineOptimizer_cleanupLines__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(this.lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_lines, null, null, true);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$LineTransaction$CleanupTransaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/LineTransaction/CleanupTransaction', 217);
function lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_$performWithoutAdjust__Llv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_2V(this$static){
  var i, line, line$iterator, tracer;
  tracer = new lv_lumii_layoutengine_Tracer_Tracer__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(this$static.lv_lumii_layoutengine_Transaction$LineTransaction_firstParent, this$static.lv_lumii_layoutengine_Transaction$LineTransaction_secondParent, this$static.lv_lumii_layoutengine_Transaction$LineTransaction_lca);
  for (i = 0; i < this$static.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lines.java_util_ArrayList_array.length; i++) {
    lv_lumii_layoutengine_Line_$trace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Llv_lumii_layoutengine_Tracer_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lines, i), 10), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lineTypes, i), 77), tracer);
  }
  try {
    lv_lumii_layoutengine_LineOptimizer_snapNewLines__Ljava_util_ArrayList_2V(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lines);
  }
   catch ($e0) {
    $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25))
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
  }
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 10));
    lv_lumii_layoutengine_Line_$_1resetLabels__Llv_lumii_layoutengine_Line_2V(line);
  }
}

function lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_Transaction$LineTransaction$NewLineTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, firstParent, secondParent, lca){
  lv_lumii_layoutengine_Transaction$LineTransaction_Transaction$LineTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V.call(this, diagram, firstParent, secondParent, lca);
  this.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lines = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lineTypes = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(215, 70, $intern_74, lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_Transaction$LineTransaction$NewLineTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V);
_.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V = function lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(operation){
  var tOperation;
  tOperation = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(operation, 149);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lines, tOperation.lv_lumii_layoutengine_Transaction$Operation$LineOperation_line);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_lineTypes, tOperation.lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_lineType);
}
;
_.package_private$lv_lumii_layoutengine_Transaction$perform__V = function lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_perform__V(){
  try {
    lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_$performWithoutAdjust__Llv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_2V(this);
    lv_lumii_layoutengine_Diagram_$adjust__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
    lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
    lv_lumii_layoutengine_Adjuster_updateBoxCurrentMinSize__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  }
   catch ($e0) {
    $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25))
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
  }
}
;
_.package_private$lv_lumii_layoutengine_Transaction$LineTransaction$performWithoutAdjust__V = function lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_performWithoutAdjust__V(){
  lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_$performWithoutAdjust__Llv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_2V(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$LineTransaction$NewLineTransaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/LineTransaction/NewLineTransaction', 215);
function lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_$performWithoutAdjust__Llv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_2V(this$static){
  var i, i$iterator, i$iterator0, i0, ids, lineIds, lineType, lineType$array, lineType$array0, lineType$index, lineType$index0, lineType$max, lineType$max0, linesToCleanup, linesToSet, pointsToSet;
  lineIds = new java_util_EnumMap_EnumMap__Ljava_lang_Class_2V(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Line$LineType_12_1classLit);
  for (lineType$array0 = (lv_lumii_layoutengine_Line$LineType_$clinit__V() , com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Line$LineType_12_1classLit, 1), $intern_32, 77, 0, [lv_lumii_layoutengine_Line$LineType_STRAIGHT, lv_lumii_layoutengine_Line$LineType_ORTHOGONAL, lv_lumii_layoutengine_Line$LineType_POLYLINE, lv_lumii_layoutengine_Line$LineType_SPLINE])) , lineType$index0 = 0 , lineType$max0 = lineType$array0.length; lineType$index0 < lineType$max0; ++lineType$index0) {
    lineType = lineType$array0[lineType$index0];
    java_util_EnumMap_$put__Ljava_util_EnumMap_2Ljava_lang_Enum_2Ljava_lang_Object_2Ljava_lang_Object_2(lineIds, lineType, new java_util_ArrayList_ArrayList__V);
  }
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lineTypes.java_util_ArrayList_array.length; i0++) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_EnumMap_$get__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(lineIds, java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lineTypes, i0)), 4), java_lang_Integer_valueOf__ILjava_lang_Integer_2(i0));
  }
  for (lineType$array = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Line$LineType_12_1classLit, 1), $intern_32, 77, 0, [lv_lumii_layoutengine_Line$LineType_STRAIGHT, lv_lumii_layoutengine_Line$LineType_ORTHOGONAL, lv_lumii_layoutengine_Line$LineType_POLYLINE, lv_lumii_layoutengine_Line$LineType_SPLINE]) , lineType$index = 0 , lineType$max = lineType$array.length; lineType$index < lineType$max; ++lineType$index) {
    lineType = lineType$array[lineType$index];
    ids = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_EnumSet$EnumSetImpl_$containsEnum__Ljava_util_EnumSet$EnumSetImpl_2Ljava_lang_Enum_2Z(lineIds.java_util_EnumMap_keySet, lineType)?lineIds.java_util_EnumMap_values[lineType.java_lang_Enum_ordinal]:null, 4);
    linesToSet = new java_util_ArrayList_ArrayList__V;
    pointsToSet = new java_util_ArrayList_ArrayList__V;
    for (i$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(ids); i$iterator0.java_util_AbstractList$IteratorImpl_i < i$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      i = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(i$iterator0.java_util_AbstractList$IteratorImpl_i < i$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(i$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(i$iterator0.java_util_AbstractList$IteratorImpl_last = i$iterator0.java_util_AbstractList$IteratorImpl_i++), 9)).java_lang_Integer_value;
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(linesToSet, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lines, i), 10));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(pointsToSet, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_pointLists, i), 4));
    }
    if (linesToSet.java_util_ArrayList_array.length != 0) {
      try {
        lv_lumii_layoutengine_Adjuster_setLinePoints__Ljava_util_ArrayList_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2V(linesToSet, lineType, pointsToSet);
      }
       catch ($e0) {
        $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
        if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25))
          throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
      }
    }
  }
  linesToCleanup = new java_util_ArrayList_ArrayList__V;
  for (i$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_EnumMap_$get__Ljava_util_EnumMap_2Ljava_lang_Object_2Ljava_lang_Object_2(lineIds, lv_lumii_layoutengine_Line$LineType_ORTHOGONAL), 4)); i$iterator.java_util_AbstractList$IteratorImpl_i < i$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    i = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(i$iterator.java_util_AbstractList$IteratorImpl_i < i$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(i$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(i$iterator.java_util_AbstractList$IteratorImpl_last = i$iterator.java_util_AbstractList$IteratorImpl_i++), 9)).java_lang_Integer_value;
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_cleanupFlags, i), 96).java_lang_Boolean_value && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(linesToCleanup, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lines, i), 10));
  }
  lv_lumii_layoutengine_LineOptimizer_cleanupLines__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2ZV(linesToCleanup, null, null, true);
}

function lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_Transaction$LineTransaction$SetPointsTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, firstParent, secondParent, lca){
  lv_lumii_layoutengine_Transaction$LineTransaction_Transaction$LineTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V.call(this, diagram, firstParent, secondParent, lca);
  this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lines = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lineTypes = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_pointLists = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_cleanupFlags = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(216, 70, $intern_74, lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_Transaction$LineTransaction$SetPointsTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V);
_.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V = function lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(operation){
  var tOperation;
  tOperation = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(operation, 150);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lines, tOperation.lv_lumii_layoutengine_Transaction$Operation$LineOperation_line);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_lineTypes, tOperation.lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_lineType);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_pointLists, tOperation.lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_points);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_cleanupFlags, (java_lang_Boolean_$clinit__V() , tOperation.lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_cleanup?java_lang_Boolean_TRUE:java_lang_Boolean_FALSE));
}
;
_.package_private$lv_lumii_layoutengine_Transaction$perform__V = function lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_perform__V(){
  try {
    lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_$performWithoutAdjust__Llv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_2V(this);
    lv_lumii_layoutengine_Diagram_$adjust__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
    lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
    lv_lumii_layoutengine_Adjuster_updateBoxCurrentMinSize__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  }
   catch ($e0) {
    $e0 = com_google_gwt_lang_Exceptions_wrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
    if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z($e0, 25))
      throw com_google_gwt_lang_Exceptions_unwrap__Ljava_lang_Object_2Ljava_lang_Object_2($e0);
  }
}
;
_.package_private$lv_lumii_layoutengine_Transaction$LineTransaction$performWithoutAdjust__V = function lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_performWithoutAdjust__V(){
  lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_$performWithoutAdjust__Llv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_2V(this);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$LineTransaction$SetPointsTransaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/LineTransaction/SetPointsTransaction', 216);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(298, 1, {});
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation', 298);
function lv_lumii_layoutengine_Transaction$Operation$AdjustOperation_Transaction$Operation$AdjustOperation__V(){
}

function lv_lumii_layoutengine_Transaction$Operation$AdjustOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2ZV(diagram){
  var transaction;
  if (diagram.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    transaction = diagram.lv_lumii_layoutengine_Diagram_transaction;
    if (!transaction) {
      diagram.lv_lumii_layoutengine_Diagram_transaction = new lv_lumii_layoutengine_Transaction$AdjustTransaction_Transaction$AdjustTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram);
    }
     else if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(transaction, 122)) {
      transaction.package_private$lv_lumii_layoutengine_Transaction$perform__V();
      diagram.lv_lumii_layoutengine_Diagram_transaction = new lv_lumii_layoutengine_Transaction$AdjustTransaction_Transaction$AdjustTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram);
    }
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(diagram.lv_lumii_layoutengine_Diagram_transaction, 122).lv_lumii_layoutengine_Transaction$AdjustTransaction_removeNullLines = true;
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(214, 298, {}, lv_lumii_layoutengine_Transaction$Operation$AdjustOperation_Transaction$Operation$AdjustOperation__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$AdjustOperation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/AdjustOperation', 214);
function lv_lumii_layoutengine_Transaction$Operation$LineOperation_Transaction$Operation$LineOperation__Llv_lumii_layoutengine_Line_2V(line){
  this.lv_lumii_layoutengine_Transaction$Operation$LineOperation_line = line;
  if (!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) || !lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
    throw new java_lang_UnsupportedOperationException_UnsupportedOperationException__Ljava_lang_String_2V($intern_57);
  }
}

function lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(diagram, a, b, type_0){
  var aParent, bParent, currentClass, lca, newClass, t, transaction;
  if (diagram.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    transaction = diagram.lv_lumii_layoutengine_Diagram_transaction;
    currentClass = null;
    !!transaction && (currentClass = transaction.java_lang_Object__1_1_1clazz$);
    newClass = type_0.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$getTransactionClass__Ljava_lang_Class_2();
    aParent = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(a, false);
    bParent = lv_lumii_layoutengine_Container_$getPrevBox__Llv_lumii_layoutengine_Container_2ZLlv_lumii_layoutengine_Box_2(b, false);
    a == b?(lca = aParent):(lca = lv_lumii_layoutengine_Box_$findLCABox__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2(a, b));
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(transaction, 70)) {
      t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(transaction, 70);
      if (currentClass == newClass) {
        if (!((aParent == t.lv_lumii_layoutengine_Transaction$LineTransaction_firstParent && bParent == t.lv_lumii_layoutengine_Transaction$LineTransaction_secondParent || aParent == t.lv_lumii_layoutengine_Transaction$LineTransaction_secondParent && bParent == t.lv_lumii_layoutengine_Transaction$LineTransaction_firstParent) && lca == t.lv_lumii_layoutengine_Transaction$LineTransaction_lca)) {
          t.package_private$lv_lumii_layoutengine_Transaction$LineTransaction$performWithoutAdjust__V();
          diagram.lv_lumii_layoutengine_Diagram_transaction = type_0.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2(diagram, aParent, bParent, lca);
        }
      }
       else {
        t.package_private$lv_lumii_layoutengine_Transaction$LineTransaction$performWithoutAdjust__V();
        diagram.lv_lumii_layoutengine_Diagram_transaction = type_0.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2(diagram, aParent, bParent, lca);
      }
    }
     else {
      !!transaction && transaction.package_private$lv_lumii_layoutengine_Transaction$perform__V();
      diagram.lv_lumii_layoutengine_Diagram_transaction = type_0.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2(diagram, aParent, bParent, lca);
    }
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(171, 298, {});
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/LineOperation', 171);
function lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_Transaction$Operation$LineOperation$NewLineOperation__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(line, lineType){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation_Transaction$Operation$LineOperation__Llv_lumii_layoutengine_Line_2V.call(this, line);
  this.lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_lineType = lineType;
}

function lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_LineGeometry_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, lineGeometry, a, b){
  var transaction;
  if (diagram.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    transaction = diagram.lv_lumii_layoutengine_Diagram_transaction;
    if (!!transaction && !lineGeometry) {
      com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(transaction, 70)?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(transaction, 70).package_private$lv_lumii_layoutengine_Transaction$LineTransaction$performWithoutAdjust__V():transaction.package_private$lv_lumii_layoutengine_Transaction$perform__V();
      diagram.lv_lumii_layoutengine_Diagram_transaction = null;
    }
    lv_lumii_layoutengine_Transaction$Operation$LineOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2V(diagram, a, b, (lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V() , lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_NEWLINE));
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(149, 171, {149:1}, lv_lumii_layoutengine_Transaction$Operation$LineOperation$NewLineOperation_Transaction$Operation$LineOperation$NewLineOperation__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation$NewLineOperation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/LineOperation/NewLineOperation', 149);
function lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_Transaction$Operation$LineOperation$SetPointsOperation__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV(line, lineType, points){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation_Transaction$Operation$LineOperation__Llv_lumii_layoutengine_Line_2V.call(this, line);
  this.lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_lineType = lineType;
  this.lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_points = points;
  this.lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_cleanup = false;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(150, 171, {150:1}, lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_Transaction$Operation$LineOperation$SetPointsOperation__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2Ljava_util_ArrayList_2ZV);
_.lv_lumii_layoutengine_Transaction$Operation$LineOperation$SetPointsOperation_cleanup = false;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation$SetPointsOperation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/LineOperation/SetPointsOperation', 150);
function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V(){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V = com_google_gwt_lang_JavaClassHierarchySetupUtil_emptyMethod__V;
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_NEWLINE = new lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$1_Transaction$Operation$LineOperation$Type$1__Ljava_lang_String_2IV;
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS = new lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$2_Transaction$Operation$LineOperation$Type$2__Ljava_lang_String_2IV;
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_CLEANUP = new lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$3_Transaction$Operation$LineOperation$Type$3__Ljava_lang_String_2IV;
}

function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_Transaction$Operation$LineOperation$Type__Ljava_lang_String_2IV(enum$name, enum$ordinal){
  java_lang_Enum_Enum__Ljava_lang_String_2IV.call(this, enum$name, enum$ordinal);
}

function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_values___3Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2(){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_$clinit__V();
  return com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation$Type_12_1classLit, 1), $intern_32, 86, 0, [lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_NEWLINE, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_CLEANUP]);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(86, 36, $intern_75);
var lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_CLEANUP, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_NEWLINE, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_SETPOINTS;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation$Type_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/LineOperation/Type', 86, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_values___3Llv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_2);
function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$1_Transaction$Operation$LineOperation$Type$1__Ljava_lang_String_2IV(){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_Transaction$Operation$LineOperation$Type__Ljava_lang_String_2IV.call(this, 'NEWLINE', 0);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(218, 86, $intern_75, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$1_Transaction$Operation$LineOperation$Type$1__Ljava_lang_String_2IV);
_.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$getTransactionClass__Ljava_lang_Class_2 = function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$1_getTransactionClass__Ljava_lang_Class_2(){
  return com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$LineTransaction$NewLineTransaction_12_1classLit;
}
;
_.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2 = function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$1_newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2(diagram, aParent, bParent, lca){
  return new lv_lumii_layoutengine_Transaction$LineTransaction$NewLineTransaction_Transaction$LineTransaction$NewLineTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, aParent, bParent, lca);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation$Type$1_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/LineOperation/Type/1', 218, null);
function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$2_Transaction$Operation$LineOperation$Type$2__Ljava_lang_String_2IV(){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_Transaction$Operation$LineOperation$Type__Ljava_lang_String_2IV.call(this, 'SETPOINTS', 1);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(219, 86, $intern_75, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$2_Transaction$Operation$LineOperation$Type$2__Ljava_lang_String_2IV);
_.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$getTransactionClass__Ljava_lang_Class_2 = function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$2_getTransactionClass__Ljava_lang_Class_2(){
  return com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$LineTransaction$SetPointsTransaction_12_1classLit;
}
;
_.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2 = function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$2_newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2(diagram, aParent, bParent, lca){
  return new lv_lumii_layoutengine_Transaction$LineTransaction$SetPointsTransaction_Transaction$LineTransaction$SetPointsTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, aParent, bParent, lca);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation$Type$2_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/LineOperation/Type/2', 219, null);
function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$3_Transaction$Operation$LineOperation$Type$3__Ljava_lang_String_2IV(){
  lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type_Transaction$Operation$LineOperation$Type__Ljava_lang_String_2IV.call(this, 'CLEANUP', 2);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(220, 86, $intern_75, lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$3_Transaction$Operation$LineOperation$Type$3__Ljava_lang_String_2IV);
_.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$getTransactionClass__Ljava_lang_Class_2 = function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$3_getTransactionClass__Ljava_lang_Class_2(){
  return com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$LineTransaction$CleanupTransaction_12_1classLit;
}
;
_.package_private$lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2 = function lv_lumii_layoutengine_Transaction$Operation$LineOperation$Type$3_newTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Transaction_2(diagram, aParent, bParent, lca){
  return new lv_lumii_layoutengine_Transaction$LineTransaction$CleanupTransaction_Transaction$LineTransaction$CleanupTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Box_2V(diagram, aParent, bParent, lca);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$LineOperation$Type$3_12_1classLit = java_lang_Class_createForEnum__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/LineOperation/Type/3', 220, null);
function lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V(diagram, prevRect){
  var setCellTransaction, transaction;
  if (diagram.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    transaction = diagram.lv_lumii_layoutengine_Diagram_transaction;
    if (!transaction) {
      diagram.lv_lumii_layoutengine_Diagram_transaction = new lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_Transaction$PlaceRectangleTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V(diagram, prevRect);
    }
     else if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(transaction, 109)) {
      setCellTransaction = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(transaction, 109);
      if (setCellTransaction.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_prevRect != prevRect) {
        transaction.package_private$lv_lumii_layoutengine_Transaction$perform__V();
        diagram.lv_lumii_layoutengine_Diagram_transaction = new lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_Transaction$PlaceRectangleTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V(diagram, prevRect);
      }
    }
     else {
      transaction.package_private$lv_lumii_layoutengine_Transaction$perform__V();
      diagram.lv_lumii_layoutengine_Diagram_transaction = new lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_Transaction$PlaceRectangleTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V(diagram, prevRect);
    }
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(138, 298, {138:1});
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$PlaceRectangleOperation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/PlaceRectangleOperation', 138);
function lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V(rectangle, newCenter, growPoint){
  this.lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation_rectangle = rectangle;
  this.lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_newCenter = newCenter;
  this.lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_growPoint = growPoint;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(121, 138, {138:1, 121:1}, lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2Ljava_awt_geom_Point2D$Double_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/PlaceRectangleOperation/RectangleMoveOperation', 121);
function lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_Transaction$Operation$RectangleResizeOperation__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V(rectangle, bounds){
  this.lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_rectangle = rectangle;
  this.lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_bounds = bounds;
}

function lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_prepareTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram){
  var transaction;
  if (diagram.lv_lumii_layoutengine_Diagram_state != (lv_lumii_layoutengine_Diagram$State_$clinit__V() , lv_lumii_layoutengine_Diagram$State_MANUAL)) {
    transaction = diagram.lv_lumii_layoutengine_Diagram_transaction;
    if (!transaction) {
      diagram.lv_lumii_layoutengine_Diagram_transaction = new lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_Transaction$RectangleResizeTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram);
    }
     else if (!com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(transaction, 139)) {
      transaction.package_private$lv_lumii_layoutengine_Transaction$perform__V();
      diagram.lv_lumii_layoutengine_Diagram_transaction = new lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_Transaction$RectangleResizeTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram);
    }
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(148, 298, {148:1}, lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_Transaction$Operation$RectangleResizeOperation__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Rectangle2D$Double_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$Operation$RectangleResizeOperation_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/Operation/RectangleResizeOperation', 148);
function lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_$arrangeNestedGrid__Llv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_2Llv_lumii_layoutengine_AbstractContainer_2V(this$static, container){
  var bottom, childContainer, childContainer$iterator, childContainer$iterator0, childContainer$iterator1, col, constant, constraints, currToMove, element, element$iterator, i, i0, laneElements, left, positions, rect, rect$iterator, rect$iterator0, rect$iterator1, rect$iterator2, right, row, toMove, top_0;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(container.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container):container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39)) {
    toMove = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_descendantsToMove.get__Ljava_lang_Object_2Ljava_lang_Object_2(container), 32);
    !toMove && (toMove = new java_util_LinkedHashSet_LinkedHashSet__V);
    constraints = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(container.lv_lumii_layoutengine_AbstractContainer_hide?new lv_lumii_layoutengine_LayoutConstraints$NoneLayoutConstraints_LayoutConstraints$NoneLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2V(container):container.lv_lumii_layoutengine_AbstractContainer_layoutConstraints, 39);
    laneElements = new java_util_ArrayList_ArrayList__V;
    for (rect$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2()); rect$iterator0.java_util_AbstractList$IteratorImpl_i < rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator0.java_util_AbstractList$IteratorImpl_i < rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator0.java_util_AbstractList$IteratorImpl_last = rect$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
      col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, rect), 9);
      !!col && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV(java_util_LinkedHashMap_$containsKey__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters, rect)?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters, rect), 3).java_awt_geom_Point2D$Double_x:(rect.lv_lumii_layoutengine_AbstractContainer_left + rect.lv_lumii_layoutengine_AbstractContainer_right) / 2, col.java_lang_Integer_value, !toMove.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(rect), rect.lv_lumii_layoutengine_AbstractContainer_left, rect.lv_lumii_layoutengine_AbstractContainer_right));
    }
    for (childContainer$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); childContainer$iterator0.java_util_AbstractList$IteratorImpl_i < childContainer$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      childContainer = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(childContainer$iterator0.java_util_AbstractList$IteratorImpl_i < childContainer$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(childContainer$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(childContainer$iterator0.java_util_AbstractList$IteratorImpl_last = childContainer$iterator0.java_util_AbstractList$IteratorImpl_i++), 13));
      col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, childContainer), 9);
      constant = !toMove.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(childContainer);
      if (col) {
        for (rect$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(childContainer, false)); rect$iterator1.java_util_AbstractList$IteratorImpl_i < rect$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator1.java_util_AbstractList$IteratorImpl_i < rect$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator1.java_util_AbstractList$IteratorImpl_last = rect$iterator1.java_util_AbstractList$IteratorImpl_i++), 12));
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV((rect.lv_lumii_layoutengine_AbstractContainer_left + rect.lv_lumii_layoutengine_AbstractContainer_right) / 2, col.java_lang_Integer_value, constant, rect.lv_lumii_layoutengine_AbstractContainer_left, rect.lv_lumii_layoutengine_AbstractContainer_right));
        }
      }
    }
    positions = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$arrangeGridBorders__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_util_ArrayList_2ZDDLjava_util_ArrayList_2(constraints, laneElements, true, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1), lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length));
    for (i0 = 1; i0 < positions.java_util_ArrayList_array.length; i0++) {
      lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(constraints, i0, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i0, positions.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(positions.java_util_ArrayList_array[i0], 11)).java_lang_Double_value);
    }
    laneElements = new java_util_ArrayList_ArrayList__V;
    for (rect$iterator2 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getRectangles__Ljava_util_ArrayList_2()); rect$iterator2.java_util_AbstractList$IteratorImpl_i < rect$iterator2.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator2.java_util_AbstractList$IteratorImpl_i < rect$iterator2.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator2.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator2.java_util_AbstractList$IteratorImpl_last = rect$iterator2.java_util_AbstractList$IteratorImpl_i++), 12));
      row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, rect), 9);
      !!row && java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV(java_util_LinkedHashMap_$containsKey__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters, rect)?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters, rect), 3).java_awt_geom_Point2D$Double_y:(rect.lv_lumii_layoutengine_AbstractContainer_top + rect.lv_lumii_layoutengine_AbstractContainer_bottom) / 2, row.java_lang_Integer_value, !toMove.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(rect), rect.lv_lumii_layoutengine_AbstractContainer_top, rect.lv_lumii_layoutengine_AbstractContainer_bottom));
    }
    for (childContainer$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); childContainer$iterator1.java_util_AbstractList$IteratorImpl_i < childContainer$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      childContainer = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(childContainer$iterator1.java_util_AbstractList$IteratorImpl_i < childContainer$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(childContainer$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(childContainer$iterator1.java_util_AbstractList$IteratorImpl_last = childContainer$iterator1.java_util_AbstractList$IteratorImpl_i++), 13));
      row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, childContainer), 9);
      constant = !toMove.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(childContainer);
      if (row) {
        for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getNextRectangles__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(childContainer, false)); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
          java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(laneElements, new lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints$LaneElement_LayoutConstraints$GridLayoutConstraints$LaneElement__DIZDDV((rect.lv_lumii_layoutengine_AbstractContainer_top + rect.lv_lumii_layoutengine_AbstractContainer_bottom) / 2, row.java_lang_Integer_value, constant, rect.lv_lumii_layoutengine_AbstractContainer_top, rect.lv_lumii_layoutengine_AbstractContainer_bottom));
        }
      }
    }
    positions = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$arrangeGridBorders__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Ljava_util_ArrayList_2ZDDLjava_util_ArrayList_2(constraints, laneElements, false, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1), lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length));
    for (i = 1; i < positions.java_util_ArrayList_array.length; i++) {
      lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(constraints, i, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, positions.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(positions.java_util_ArrayList_array[i], 11)).java_lang_Double_value);
    }
    for (element$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getAbstractContainers__ZLjava_util_ArrayList_2(true)); element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      element = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(element$iterator.java_util_AbstractList$IteratorImpl_i < element$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(element$iterator.java_util_AbstractList$IteratorImpl_last = element$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
      row = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementRows, element), 9);
      col = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_elementColumns, element), 9);
      if (col) {
        left = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, col.java_lang_Integer_value);
        right = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, col.java_lang_Integer_value);
      }
       else {
        left = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1);
        right = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length);
      }
      if (row) {
        top_0 = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, row.java_lang_Integer_value);
        bottom = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, row.java_lang_Integer_value);
      }
       else {
        top_0 = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowTop__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, 1);
        bottom = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constraints, constraints.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length);
      }
      if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 62)) {
        toMove.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(element) && lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_$moveRectangleIntoBounds__Llv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_2Llv_lumii_layoutengine_AbstractContainer_2DDDDV(this$static, element, left, right, top_0, bottom);
      }
       else if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(element, 13)) {
        currToMove = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_descendantsToMove.get__Ljava_lang_Object_2Ljava_lang_Object_2(element), 32);
        if (currToMove) {
          for (rect$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_descendantsToMove.get__Ljava_lang_Object_2Ljava_lang_Object_2(element), 32).java_util_HashSet_map)); rect$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
            rect = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(rect$iterator), 12);
            lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_$moveRectangleIntoBounds__Llv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_2Llv_lumii_layoutengine_AbstractContainer_2DDDDV(this$static, rect, left, right, top_0, bottom);
          }
        }
      }
    }
  }
  for (childContainer$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(container.package_private$lv_lumii_layoutengine_AbstractContainer$getPureContainers__Ljava_util_ArrayList_2()); childContainer$iterator.java_util_AbstractList$IteratorImpl_i < childContainer$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    childContainer = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(childContainer$iterator.java_util_AbstractList$IteratorImpl_i < childContainer$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(childContainer$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(childContainer$iterator.java_util_AbstractList$IteratorImpl_last = childContainer$iterator.java_util_AbstractList$IteratorImpl_i++), 13));
    lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_$arrangeNestedGrid__Llv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_2Llv_lumii_layoutengine_AbstractContainer_2V(this$static, childContainer);
  }
}

function lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_$moveRectangleIntoBounds__Llv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_2Llv_lumii_layoutengine_AbstractContainer_2DDDDV(this$static, rect, left, right, top_0, bottom){
  var growPoint, moveRect;
  growPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_growPoints, rect), 3);
  moveRect = !!growPoint;
  moveRect || (growPoint = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((rect.lv_lumii_layoutengine_AbstractContainer_left + rect.lv_lumii_layoutengine_AbstractContainer_right) / 2, (rect.lv_lumii_layoutengine_AbstractContainer_top + rect.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
  left <= growPoint.java_awt_geom_Point2D$Double_x && growPoint.java_awt_geom_Point2D$Double_x <= right && top_0 <= growPoint.java_awt_geom_Point2D$Double_y && growPoint.java_awt_geom_Point2D$Double_y <= bottom || lv_lumii_layoutengine_GeometryHelper_movePointInside__Ljava_awt_geom_Point2D$Double_2DDDDDV(growPoint, left, top_0, right, bottom, 0);
  if (!moveRect) {
    java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_growPoints, rect, growPoint);
    java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters, rect, growPoint);
  }
}

function lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_Transaction$PlaceRectangleTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V(diagram, prevRect){
  lv_lumii_layoutengine_Transaction_Transaction__Llv_lumii_layoutengine_Diagram_2V.call(this, diagram);
  this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_prevRect = prevRect;
  this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters = new java_util_LinkedHashMap_LinkedHashMap__V;
  this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_growPoints = new java_util_LinkedHashMap_LinkedHashMap__V;
  this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_elements = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_descendantsToMove = new java_util_HashMap_HashMap__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(109, 137, {109:1}, lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_Transaction$PlaceRectangleTransaction__Llv_lumii_layoutengine_Diagram_2Llv_lumii_layoutengine_AbstractContainer_2V);
_.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V = function lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(operation){
  var rectangle, tOperation;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(operation, 121)) {
    tOperation = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(operation, 121);
    rectangle = tOperation.lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation_rectangle;
    java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters, rectangle, tOperation.lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_newCenter);
    java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_growPoints, rectangle, tOperation.lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation$RectangleMoveOperation_growPoint);
  }
   else {
    tOperation = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(operation, 138);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_elements, tOperation.lv_lumii_layoutengine_Transaction$Operation$PlaceRectangleOperation_rectangle);
  }
}
;
_.package_private$lv_lumii_layoutengine_Transaction$perform__V = function lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_perform__V(){
  var O, box, currToMove, descendantBox, descendantBox$iterator, element, element$iterator, end, endMove, endPoint, epsilon, label_0, label$iterator, line, line$iterator, line$iterator0, line$iterator1, line$iterator2, line$iterator3, line$iterator4, line$iterator5, linesToRetrace, oldCenters, oldState, point, point$iterator, predecessor, rect, rect$iterator, rectangles, start_0, startMove, startPoint, straightLines, toMove, type_0;
  com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_prevRect, 66) && lv_lumii_layoutengine_Diagram_$updateBounds__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  toMove = new java_util_LinkedHashSet_LinkedHashSet__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_elements);
  java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(toMove, new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters));
  this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_descendantsToMove.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_prevRect, toMove);
  for (element$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(toMove.java_util_HashSet_map)); element$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    element = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(element$iterator), 12);
    predecessor = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(element.getOwner__Llv_lumii_layoutengine_Element_2(), 12);
    while (predecessor != this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_prevRect) {
      currToMove = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_descendantsToMove.get__Ljava_lang_Object_2Ljava_lang_Object_2(predecessor), 32);
      if (!currToMove) {
        currToMove = new java_util_LinkedHashSet_LinkedHashSet__V;
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(currToMove, element);
        this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_descendantsToMove.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(predecessor, currToMove);
      }
       else {
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(currToMove, element);
      }
      predecessor = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(predecessor.getOwner__Llv_lumii_layoutengine_Element_2(), 12);
    }
  }
  lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_$arrangeNestedGrid__Llv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_2Llv_lumii_layoutengine_AbstractContainer_2V(this, this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_prevRect);
  rectangles = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters));
  linesToRetrace = new java_util_LinkedHashSet_LinkedHashSet__V;
  for (rect$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(rectangles); rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    rect = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(rect$iterator.java_util_AbstractList$IteratorImpl_i < rect$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(rect$iterator.java_util_AbstractList$IteratorImpl_last = rect$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(rect, 16)) {
      box = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rect, 16);
      for (line$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Box_$getIncidentLines__Llv_lumii_layoutengine_Box_2Ljava_util_ArrayList_2(box)); line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator0.java_util_AbstractList$IteratorImpl_i < line$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator0.java_util_AbstractList$IteratorImpl_last = line$iterator0.java_util_AbstractList$IteratorImpl_i++), 10));
        if (!line.lv_lumii_layoutengine_Element_owner) {
          java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line).lv_lumii_layoutengine_Box_incidentLines, line);
          java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line).lv_lumii_layoutengine_Box_incidentLines, line);
        }
      }
      java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(linesToRetrace, box.lv_lumii_layoutengine_Box_incidentLines);
      for (descendantBox$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getDescendantBoxes__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(box)); descendantBox$iterator.java_util_AbstractList$IteratorImpl_i < descendantBox$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        descendantBox = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(descendantBox$iterator.java_util_AbstractList$IteratorImpl_i < descendantBox$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(descendantBox$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(descendantBox$iterator.java_util_AbstractList$IteratorImpl_last = descendantBox$iterator.java_util_AbstractList$IteratorImpl_i++), 16));
        for (line$iterator1 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Box_$getIncidentLines__Llv_lumii_layoutengine_Box_2Ljava_util_ArrayList_2(descendantBox)); line$iterator1.java_util_AbstractList$IteratorImpl_i < line$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator1.java_util_AbstractList$IteratorImpl_i < line$iterator1.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator1.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator1.java_util_AbstractList$IteratorImpl_last = line$iterator1.java_util_AbstractList$IteratorImpl_i++), 10));
          if (!line.lv_lumii_layoutengine_Element_owner) {
            java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line).lv_lumii_layoutengine_Box_incidentLines, line);
            java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line).lv_lumii_layoutengine_Box_incidentLines, line);
          }
        }
        java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(linesToRetrace, descendantBox.lv_lumii_layoutengine_Box_incidentLines);
      }
    }
  }
  oldCenters = new java_util_LinkedHashMap_LinkedHashMap__V;
  for (line$iterator2 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(linesToRetrace.java_util_HashSet_map)); line$iterator2.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator2), 10);
    if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
      start_0 = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
      end = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
      java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(oldCenters, start_0, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((start_0.lv_lumii_layoutengine_AbstractContainer_left + start_0.lv_lumii_layoutengine_AbstractContainer_right) / 2, (start_0.lv_lumii_layoutengine_AbstractContainer_top + start_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
      java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(oldCenters, end, new java_awt_geom_Point2D$Double_Point2D$Double__DDV((end.lv_lumii_layoutengine_AbstractContainer_left + end.lv_lumii_layoutengine_AbstractContainer_right) / 2, (end.lv_lumii_layoutengine_AbstractContainer_top + end.lv_lumii_layoutengine_AbstractContainer_bottom) / 2));
    }
  }
  for (line$iterator3 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(linesToRetrace.java_util_HashSet_map)); line$iterator3.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator3), 10);
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Element_owner, 13).package_private$lv_lumii_layoutengine_Element$removeChild__Llv_lumii_layoutengine_Element_2V(line);
  }
  for (line$iterator4 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_Container_$getLines__Llv_lumii_layoutengine_Container_2Ljava_util_ArrayList_2(this.lv_lumii_layoutengine_Transaction_diagram)); line$iterator4.java_util_AbstractList$IteratorImpl_i < line$iterator4.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator4.java_util_AbstractList$IteratorImpl_i < line$iterator4.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator4.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator4.java_util_AbstractList$IteratorImpl_last = line$iterator4.java_util_AbstractList$IteratorImpl_i++), 10));
    if (!line.lv_lumii_layoutengine_Line_lineGeometry)
      throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V('geom ' + line);
  }
  lv_lumii_layoutengine_Adjuster_placeRectangles__Ljava_util_ArrayList_2Ljava_util_ArrayList_2Ljava_util_ArrayList_2Llv_lumii_layoutengine_AbstractContainer_2V(rectangles, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(new java_util_AbstractMap$2_AbstractMap$2__Ljava_util_AbstractMap_2V(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_newCenters)), new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(new java_util_AbstractMap$2_AbstractMap$2__Ljava_util_AbstractMap_2V(this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_growPoints)), this.lv_lumii_layoutengine_Transaction$PlaceRectangleTransaction_prevRect);
  lv_lumii_layoutengine_Diagram_$updateBounds__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  this.lv_lumii_layoutengine_Transaction_diagram.lv_lumii_layoutengine_Diagram_transaction = null;
  oldState = this.lv_lumii_layoutengine_Transaction_diagram.lv_lumii_layoutengine_Diagram_state;
  lv_lumii_layoutengine_Diagram_$startTransaction__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  epsilon = this.lv_lumii_layoutengine_Transaction_diagram.lv_lumii_layoutengine_Diagram_epsilon;
  O = new java_awt_geom_Point2D$Double_Point2D$Double__DDV(0, 0);
  for (line$iterator5 = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(linesToRetrace.java_util_HashSet_map)); line$iterator5.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator5), 10);
    lv_lumii_layoutengine_Container_$addLine__Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Line_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line.lv_lumii_layoutengine_Element_owner, 13), line);
    if (!!lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line) && !!lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line)) {
      start_0 = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
      end = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line);
      startMove = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((start_0.lv_lumii_layoutengine_AbstractContainer_left + start_0.lv_lumii_layoutengine_AbstractContainer_right) / 2 - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(oldCenters, start_0), 3).java_awt_geom_Point2D$Double_x, (start_0.lv_lumii_layoutengine_AbstractContainer_top + start_0.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(oldCenters, start_0), 3).java_awt_geom_Point2D$Double_y);
      endMove = new java_awt_geom_Point2D$Double_Point2D$Double__DDV((end.lv_lumii_layoutengine_AbstractContainer_left + end.lv_lumii_layoutengine_AbstractContainer_right) / 2 - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(oldCenters, end), 3).java_awt_geom_Point2D$Double_x, (end.lv_lumii_layoutengine_AbstractContainer_top + end.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(oldCenters, end), 3).java_awt_geom_Point2D$Double_y);
      type_0 = line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2();
      if (java_lang_Math_abs__DD(startMove.java_awt_geom_Point2D$Double_x - endMove.java_awt_geom_Point2D$Double_x) < epsilon && java_lang_Math_abs__DD(startMove.java_awt_geom_Point2D$Double_y - endMove.java_awt_geom_Point2D$Double_y) < epsilon) {
        for (point$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points); point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          point = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(point$iterator.java_util_AbstractList$IteratorImpl_i < point$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(point$iterator.java_util_AbstractList$IteratorImpl_last = point$iterator.java_util_AbstractList$IteratorImpl_i++), 3));
          point.java_awt_geom_Point2D$Double_x += startMove.java_awt_geom_Point2D$Double_x;
          point.java_awt_geom_Point2D$Double_y += startMove.java_awt_geom_Point2D$Double_y;
        }
        if (type_0 != (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
          for (label$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(line.lv_lumii_layoutengine_Line_labels.java_util_HashSet_map)); label$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
            label_0 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(label$iterator), 28);
            lv_lumii_layoutengine_AbstractContainer_$transpose__Llv_lumii_layoutengine_AbstractContainer_2Ljava_awt_geom_Point2D$Double_2V(label_0, startMove);
          }
        }
        lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2V(line, lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(line));
      }
       else {
        if (java_lang_Math_max__DDD(java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(startMove, O), java_awt_geom_Point2D_$distance__Ljava_awt_geom_Point2D_2Ljava_awt_geom_Point2D_2D(endMove, O)) > this.lv_lumii_layoutengine_Transaction_diagram.lv_lumii_layoutengine_Diagram_retraceDistance && (!lv_lumii_layoutengine_GeometryHelper_boxIntersectsLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Line_2ZZ(start_0, line, true) || !lv_lumii_layoutengine_GeometryHelper_boxIntersectsLine__Llv_lumii_layoutengine_Box_2Llv_lumii_layoutengine_Line_2ZZ(end, line, true))) {
          lv_lumii_layoutengine_Line_$retrace__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Line$LineType_2V(line, line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2());
        }
         else if (type_0 == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_ORTHOGONAL)) {
          lv_lumii_layoutengine_Line_$setPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2V(line, lv_lumii_layoutengine_Line_$getPoints__Llv_lumii_layoutengine_Line_2Ljava_util_ArrayList_2(line));
        }
         else {
          startPoint = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points, 0), 3);
          endPoint = lv_lumii_layoutengine_LineGeometry_$getEndPoint__Llv_lumii_layoutengine_LineGeometry_2Ljava_awt_geom_Point2D$Double_2(line.lv_lumii_layoutengine_Line_lineGeometry);
          startPoint.java_awt_geom_Point2D$Double_x += startMove.java_awt_geom_Point2D$Double_x;
          startPoint.java_awt_geom_Point2D$Double_y += startMove.java_awt_geom_Point2D$Double_y;
          endPoint.java_awt_geom_Point2D$Double_x += endMove.java_awt_geom_Point2D$Double_x;
          endPoint.java_awt_geom_Point2D$Double_y += endMove.java_awt_geom_Point2D$Double_y;
          lv_lumii_layoutengine_LineOptimizer_cutLine__Llv_lumii_layoutengine_Line_2V(line);
          lv_lumii_layoutengine_LineOptimizer_adjustPolylineLabelPlacement__Llv_lumii_layoutengine_Line_2V(line);
        }
      }
    }
  }
  lv_lumii_layoutengine_Diagram_$endTransaction__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  straightLines = new java_util_ArrayList_ArrayList__V;
  for (line$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(linesToRetrace.java_util_HashSet_map)); line$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    line = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(line$iterator), 10);
    (line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == (lv_lumii_layoutengine_Line$LineType_$clinit__V() , lv_lumii_layoutengine_Line$LineType_STRAIGHT) || line.lv_lumii_layoutengine_Line_lineGeometry.package_private$lv_lumii_layoutengine_LineGeometry$getType__Llv_lumii_layoutengine_Line$LineType_2() == lv_lumii_layoutengine_Line$LineType_POLYLINE) && line.lv_lumii_layoutengine_Line_lineGeometry.lv_lumii_layoutengine_LineGeometry_points.java_util_ArrayList_array.length == 2 && (com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(straightLines.java_util_ArrayList_array, straightLines.java_util_ArrayList_array.length, line) , true);
  }
  lv_lumii_layoutengine_LineOptimizer_arrangeStraightLineEnds__Ljava_util_ArrayList_2V(straightLines);
  this.lv_lumii_layoutengine_Transaction_diagram.lv_lumii_layoutengine_Diagram_state = oldState;
  lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  lv_lumii_layoutengine_Adjuster_updateBoxCurrentMinSize__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$PlaceRectangleTransaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/PlaceRectangleTransaction', 109);
function lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_Transaction$RectangleResizeTransaction__Llv_lumii_layoutengine_Diagram_2V(diagram){
  lv_lumii_layoutengine_Transaction_Transaction__Llv_lumii_layoutengine_Diagram_2V.call(this, diagram);
  this.lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_rectangles = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_bounds = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(139, 137, {139:1}, lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_Transaction$RectangleResizeTransaction__Llv_lumii_layoutengine_Diagram_2V);
_.package_private$lv_lumii_layoutengine_Transaction$addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V = function lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_addOperation__Llv_lumii_layoutengine_Transaction$Operation_2V(operation){
  var tOperation;
  tOperation = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(operation, 148);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_rectangles, tOperation.lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_rectangle);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_bounds, tOperation.lv_lumii_layoutengine_Transaction$Operation$RectangleResizeOperation_bounds);
}
;
_.package_private$lv_lumii_layoutengine_Transaction$perform__V = function lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_perform__V(){
  lv_lumii_layoutengine_Adjuster_resizeRectangles__Ljava_util_ArrayList_2Ljava_util_ArrayList_2V(this.lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_rectangles, this.lv_lumii_layoutengine_Transaction$RectangleResizeTransaction_bounds);
  lv_lumii_layoutengine_Adjuster_growOutsideLabels__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
  lv_lumii_layoutengine_Adjuster_updateBoxCurrentMinSize__Llv_lumii_layoutengine_Diagram_2V(this.lv_lumii_layoutengine_Transaction_diagram);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1Transaction$RectangleResizeTransaction_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'Transaction/RectangleResizeTransaction', 139);
function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$addLinesToBoxesInGrid__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(this$static){
  var AIsOriginal, BIsOriginal, allLines, boxA, boxB, boxIGA, boxIGB, endBox, line, line$iterator, lineForA, lineForB, startBox;
  allLines = lv_lumii_layoutengine_ComponentLayout_$buildInnerLines__Llv_lumii_layoutengine_ComponentLayout_2Ljava_util_List_2(this$static);
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(allLines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 72));
    boxA = line.lv_lumii_layoutengine_util_LayoutLine_startElement;
    boxB = line.lv_lumii_layoutengine_util_LayoutLine_endElement;
    boxIGA = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_map, boxA), 80);
    boxIGB = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedHashMap_$get__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_map, boxB), 80);
    startBox = lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line.lv_lumii_layoutengine_util_LayoutLine_originalLine);
    endBox = lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(line.lv_lumii_layoutengine_util_LayoutLine_originalLine);
    AIsOriginal = startBox == boxA;
    BIsOriginal = endBox == boxB;
    lineForA = new lv_lumii_layoutengine_universalLayout_Line_Line__Llv_lumii_layoutengine_universalLayout_BoxInGrid_2ZZV(boxIGB, AIsOriginal, BIsOriginal);
    lineForB = new lv_lumii_layoutengine_universalLayout_Line_Line__Llv_lumii_layoutengine_universalLayout_BoxInGrid_2ZZV(boxIGA, BIsOriginal, AIsOriginal);
    if (!AIsOriginal) {
      lv_lumii_layoutengine_universalLayout_Line_$setRealStartPoint__Llv_lumii_layoutengine_universalLayout_Line_2DDV(lineForA, (startBox.lv_lumii_layoutengine_AbstractContainer_left + startBox.lv_lumii_layoutengine_AbstractContainer_right) / 2 - boxA.lv_lumii_layoutengine_AbstractContainer_left, (startBox.lv_lumii_layoutengine_AbstractContainer_top + startBox.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - boxA.lv_lumii_layoutengine_AbstractContainer_top);
      lv_lumii_layoutengine_universalLayout_Line_$setRealEndPoint__Llv_lumii_layoutengine_universalLayout_Line_2DDV(lineForB, (startBox.lv_lumii_layoutengine_AbstractContainer_left + startBox.lv_lumii_layoutengine_AbstractContainer_right) / 2 - boxA.lv_lumii_layoutengine_AbstractContainer_left, (startBox.lv_lumii_layoutengine_AbstractContainer_top + startBox.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - boxA.lv_lumii_layoutengine_AbstractContainer_top);
    }
    if (!BIsOriginal) {
      lv_lumii_layoutengine_universalLayout_Line_$setRealStartPoint__Llv_lumii_layoutengine_universalLayout_Line_2DDV(lineForB, (endBox.lv_lumii_layoutengine_AbstractContainer_left + endBox.lv_lumii_layoutengine_AbstractContainer_right) / 2 - boxB.lv_lumii_layoutengine_AbstractContainer_left, (endBox.lv_lumii_layoutengine_AbstractContainer_top + endBox.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - boxB.lv_lumii_layoutengine_AbstractContainer_top);
      lv_lumii_layoutengine_universalLayout_Line_$setRealEndPoint__Llv_lumii_layoutengine_universalLayout_Line_2DDV(lineForA, (endBox.lv_lumii_layoutengine_AbstractContainer_left + endBox.lv_lumii_layoutengine_AbstractContainer_right) / 2 - boxB.lv_lumii_layoutengine_AbstractContainer_left, (endBox.lv_lumii_layoutengine_AbstractContainer_top + endBox.lv_lumii_layoutengine_AbstractContainer_bottom) / 2 - boxB.lv_lumii_layoutengine_AbstractContainer_top);
    }
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(boxIGA.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, lineForA);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(boxIGB.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, lineForB);
  }
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$calculateTakenCellCount__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIII(this$static, boxIG, x_0, y_0, movingDir){
  var i, iFrom, iTo, j, jFrom, jTo;
  iFrom = java_lang_Math_max__III(x_0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder);
  iTo = java_lang_Math_min__III(x_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder);
  jFrom = java_lang_Math_max__III(y_0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder);
  jTo = java_lang_Math_min__III(y_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder);
  if (movingDir == 0) {
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount = 0;
    for (i = iFrom; i <= iTo; i++) {
      for (j = jFrom; j <= jTo; j++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j] && ++this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
  }
   else if (movingDir == 1) {
    if (y_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder && y_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder) {
      for (i = iFrom; i <= iTo; i++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][y_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV] && --this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
    if (y_0 >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder && y_0 <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder) {
      for (i = iFrom; i <= iTo; i++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][y_0] && ++this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
  }
   else if (movingDir == 3) {
    if (y_0 - 1 >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder && y_0 - 1 <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder) {
      for (i = iFrom; i <= iTo; i++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][y_0 - 1] && --this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
    if (y_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1 <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder && y_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1 >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder) {
      for (i = iFrom; i <= iTo; i++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][y_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1] && ++this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
  }
   else if (movingDir == 4) {
    if (x_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder && x_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder) {
      for (j = jFrom; j <= jTo; j++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[x_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH][j] && --this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
    if (x_0 >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder && x_0 <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder) {
      for (j = jFrom; j <= jTo; j++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[x_0][j] && ++this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
  }
   else if (movingDir == 2) {
    if (x_0 - 1 >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder && x_0 - 1 <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder) {
      for (j = jFrom; j <= jTo; j++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[x_0 - 1][j] && --this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
    if (x_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1 <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder && x_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1 >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder) {
      for (j = jFrom; j <= jTo; j++) {
        !!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[x_0 + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1][j] && ++this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
      }
    }
  }
  return this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$connectedLineLength__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG){
  var boxIGc, horDist, length_0, line, line$iterator, vertDist;
  length_0 = 0;
  for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 50));
    boxIGc = line.lv_lumii_layoutengine_universalLayout_Line_boxIG;
    if (boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_inGrid) {
      if (line.lv_lumii_layoutengine_universalLayout_Line_endIsOriginal) {
        if (line.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal) {
          vertDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1);
          horDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1);
        }
         else {
          vertDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_startY, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_startY, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1);
          horDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_startX, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_startX, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1);
        }
      }
       else {
        if (line.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal) {
          vertDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_endY, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_endY);
          horDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_endX, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_endX);
        }
         else {
          vertDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_startY, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_startY, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_endY, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_endY);
          horDist = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_startX, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_startX, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_endX, boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_endX);
        }
      }
      length_0 += Math.sqrt(horDist * horDist + vertDist * vertDist) + java_lang_Math_min__DDD(java_lang_Math_abs__DD(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - (boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2)) / (boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2), java_lang_Math_abs__DD(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - (boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2)) / (boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2)) / 20;
    }
  }
  return length_0;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$firstNormalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZV(this$static, horizontally){
  var boxIG, boxIG$array, boxIG$array0, boxIG$index, boxIG$index0, boxIG$max, boxIG$max0, boxIG1, boxIG1$array, boxIG1$index, boxIG1$max, col, colCount, conPairs, i, i0, k, line, line$iterator, newValues, optimizer, pair, pair$iterator, row, rowCount, s1, s2;
  conPairs = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getObstacleGraph__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZLjava_util_ArrayList_2(this$static, horizontally);
  colCount = java_lang_Integer_valueOf__ILjava_lang_Integer_2(1);
  rowCount = java_lang_Integer_valueOf__ILjava_lang_Integer_2(1);
  if (horizontally) {
    if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist) {
      colCount = java_lang_Integer_valueOf__ILjava_lang_Integer_2(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length);
      !colCount && (colCount = java_lang_Integer_valueOf__ILjava_lang_Integer_2(1));
    }
    optimizer = new lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + colCount.java_lang_Integer_value + 1);
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, colCount.java_lang_Integer_value + 1, 7, 1);
  }
   else {
    if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist) {
      rowCount = java_lang_Integer_valueOf__ILjava_lang_Integer_2(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length);
      !rowCount && (rowCount = java_lang_Integer_valueOf__ILjava_lang_Integer_2(1));
    }
    optimizer = new lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + rowCount.java_lang_Integer_value + 1);
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, rowCount.java_lang_Integer_value + 1, 7, 1);
  }
  k = 0;
  if (horizontally) {
    for (boxIG$array0 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index0 = 0 , boxIG$max0 = boxIG$array0.length; boxIG$index0 < boxIG$max0; ++boxIG$index0) {
      boxIG = boxIG$array0[boxIG$index0];
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd);
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt = k;
      optimizer.addQuadraticConstantDifference__IDDV(k, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd, $intern_76);
      ++k;
    }
  }
   else {
    for (boxIG$array0 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index0 = 0 , boxIG$max0 = boxIG$array0.length; boxIG$index0 < boxIG$max0; ++boxIG$index0) {
      boxIG = boxIG$array0[boxIG$index0];
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd);
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt = k;
      optimizer.addQuadraticConstantDifference__IDDV(k, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd, $intern_76);
      ++k;
    }
  }
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist) {
    if (horizontally) {
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, 1));
      optimizer.addQuadraticConstantDifference__IDDV(k, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnLeft__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, 1), $intern_76);
      for (i0 = k + 1; i0 < k + 1 + colCount.java_lang_Integer_value; i0++) {
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, i0, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, i0 - k));
        optimizer.addQuadraticConstantDifference__IDDV(i0, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, i0 - k), $intern_76);
      }
      for (i = k; i < k + colCount.java_lang_Integer_value; i++) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(i, i + 1, $intern_76, $intern_76));
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, i, i + 1, 1);
      }
    }
     else {
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, 1));
      optimizer.addQuadraticConstantDifference__IDDV(k, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, 1), $intern_76);
      for (i0 = k + 1; i0 < k + 1 + rowCount.java_lang_Integer_value; i0++) {
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, i0, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, i0 - k));
        optimizer.addQuadraticConstantDifference__IDDV(i0, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, i0 - k), $intern_76);
      }
      for (i = k; i < k + rowCount.java_lang_Integer_value; i++) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(i, i + 1, $intern_76, $intern_76));
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, i, i + 1, 1);
      }
    }
  }
  for (pair$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(conPairs); pair$iterator.java_util_AbstractList$IteratorImpl_i < pair$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    pair = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(pair$iterator.java_util_AbstractList$IteratorImpl_i < pair$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pair$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(pair$iterator.java_util_AbstractList$IteratorImpl_last = pair$iterator.java_util_AbstractList$IteratorImpl_i++), 18));
    s1 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pair.lv_lumii_layoutengine_util_Pair_first, 131);
    s2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pair.lv_lumii_layoutengine_util_Pair_second, 131);
    horizontally?lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, s1.lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, s2.lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + 5 * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize):lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, s1.lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, s2.lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + 3 * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize);
  }
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist) {
    for (boxIG$array0 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index0 = 0 , boxIG$max0 = boxIG$array0.length; boxIG$index0 < boxIG$max0; ++boxIG$index0) {
      boxIG = boxIG$array0[boxIG$index0];
      if (horizontally) {
        col = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumn__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_box);
        if (col) {
          boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol = col.java_lang_Integer_value - 1;
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize);
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol + 1, $intern_76 + 2 * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize);
        }
      }
       else {
        row = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRow__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_box);
        if (row) {
          boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow = row.java_lang_Integer_value - 1;
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize);
          lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow + 1, $intern_76 + 2 * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize);
        }
      }
    }
  }
  for (boxIG1$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG1$index = 0 , boxIG1$max = boxIG1$array.length; boxIG1$index < boxIG1$max; ++boxIG1$index) {
    boxIG1 = boxIG1$array[boxIG1$index];
    for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 50));
      boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt < line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, 1);
    }
  }
  newValues = optimizer.performOptimization___3D();
  for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
    boxIG = boxIG$array[boxIG$index];
    horizontally?(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd = newValues[boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt]):(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd = newValues[boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt]);
  }
  if (horizontally) {
    for (i = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length; i < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + colCount.java_lang_Integer_value + 1; i++) {
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd[i - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length] = newValues[i];
    }
  }
   else {
    for (i = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length; i < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + rowCount.java_lang_Integer_value + 1; i++) {
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd[i - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length] = newValues[i];
    }
  }
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getGraphEnclosingRect__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2_3D(this$static){
  var box, boxIG, boxIG$array, boxIG$index, boxIG$max, maxX, maxY, minX, minY, rect;
  minX = $intern_53;
  minY = $intern_53;
  maxX = $intern_20;
  maxY = $intern_20;
  for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
    boxIG = boxIG$array[boxIG$index];
    box = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_box;
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd - (box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left) / 2 < minX && (minX = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd - (box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left) / 2);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd + (box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left) / 2 > maxX && (maxX = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd + (box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left) / 2);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd - (box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top) / 2 < minY && (minY = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd - (box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top) / 2);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd + (box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top) / 2 > maxY && (maxY = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd + (box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top) / 2);
  }
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd != null) {
    if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd.length > 0) {
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd[0] < minX && (minX = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd[0]);
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd.length - 1] > maxX && (maxX = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd.length - 1]);
    }
  }
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd != null) {
    if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd.length > 0) {
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd[0] < minY && (minY = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd[0]);
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd.length - 1] > maxY && (maxY = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd.length - 1]);
    }
  }
  rect = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, 1), $intern_17, 0, 7, [minX, minY, maxX, maxY]);
  return rect;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getMedianXOfConnectedBoxes__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG){
  var boxIGc, i, med, xValues;
  xValues = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines.java_util_ArrayList_array.length, 7, 1);
  for (i = 0; i < xValues.length; i++) {
    boxIGc = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, i), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG;
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, i), 50).lv_lumii_layoutengine_universalLayout_Line_endIsOriginal?(xValues[i] = boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5):(xValues[i] = boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, i), 50).lv_lumii_layoutengine_universalLayout_Line_endX);
  }
  med = (java_util_Arrays_nativeNumberSort__Ljava_lang_Object_2V(xValues) , xValues.length == 0?NaN:xValues.length % 2 == 1?xValues[~~(xValues.length / 2)]:(xValues[~~((xValues.length - 1) / 2)] + xValues[~~(xValues.length / 2)]) / 2);
  return java_lang_Double_isNaN__DZ(med)?boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5:med;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getMedianYOfConnectedBoxes__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG){
  var boxIGc, i, med, yValues;
  yValues = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines.java_util_ArrayList_array.length, 7, 1);
  for (i = 0; i < yValues.length; i++) {
    boxIGc = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, i), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG;
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, i), 50).lv_lumii_layoutengine_universalLayout_Line_endIsOriginal?(yValues[i] = boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5):(yValues[i] = boxIGc.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, i), 50).lv_lumii_layoutengine_universalLayout_Line_endY);
  }
  med = (java_util_Arrays_nativeNumberSort__Ljava_lang_Object_2V(yValues) , yValues.length == 0?NaN:yValues.length % 2 == 1?yValues[~~(yValues.length / 2)]:(yValues[~~((yValues.length - 1) / 2)] + yValues[~~(yValues.length / 2)]) / 2);
  return java_lang_Double_isNaN__DZ(med)?boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5:med;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getNHor__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_AbstractContainer_2I(this$static, box){
  var NHor;
  NHor = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_ceil__DD((box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize));
  return NHor;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getNVert__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_AbstractContainer_2I(this$static, box){
  var NVert;
  NVert = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_ceil__DD((box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize));
  return NVert;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getObstacleGraph__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZLjava_util_ArrayList_2(this$static, horizontal){
  var boxIG, boxIG$array, boxIG$index, boxIG$max, segment, segments;
  segments = new java_util_ArrayList_ArrayList__V;
  if (horizontal) {
    for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
      boxIG = boxIG$array[boxIG$index];
      segment = new lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_SimpleOrthogonalSegment__DDDV(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd - ~~(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize / 2), boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd + ~~(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize / 2));
      segment.lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_boxIG = boxIG;
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, segment);
    }
  }
   else {
    for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
      boxIG = boxIG$array[boxIG$index];
      segment = new lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_SimpleOrthogonalSegment__DDDV(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd - ~~(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize / 2), boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd + ~~(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize / 2));
      segment.lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_boxIG = boxIG;
      com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(segments.java_util_ArrayList_array, segments.java_util_ArrayList_array.length, segment);
    }
  }
  return lv_lumii_layoutengine_obstacleGraph_ObstacleGraph_findObstacleGraph__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(segments);
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$improveBoxPlaces__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(this$static){
  var bestBoxToSwap, bestLineDif, bestXForBox1, bestXForBox2, bestYForBox1, bestYForBox2, boxIG1, boxIG2, cellCountBox1, cellCountBox2, coord, defLineLength1, defLineLength2, defaultX, defaultY, dist, extend, hor, i, i0, i1, iterations, j, j0, k, line$iterator, medianX, medianY, newLineLength, oldX1, oldX2, oldY1, oldY2, rand, swap, x1, x2, xForBox1, xForBox2, y1, y2, yForBox1, yForBox2;
  iterations = 0;
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef = 3;
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef < 0.4 && (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef = 0.4);
  k = java_lang_Math_pow__DDD(0.2 / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef, $intern_37);
  do {
    ++iterations;
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef *= k;
    for (i1 = 0; i1 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length; i1++) {
      boxIG1 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes[i1];
      if (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol != -1) {
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol];
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol + 1] - 1;
      }
       else {
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder = 0;
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize - 1;
      }
      if (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow != -1) {
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow];
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow + 1] - 1;
      }
       else {
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder = 0;
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize - 1;
      }
      medianX = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getMedianXOfConnectedBoxes__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG1);
      medianY = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getMedianYOfConnectedBoxes__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG1);
      medianX += (java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random) - 0.5) * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef * boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH;
      medianY += (java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random) - 0.5) * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef * boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV;
      x1 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(medianX - boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 + 0.5)));
      y1 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(medianY - boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 + 0.5)));
      x1 = java_lang_Math_min__III(java_lang_Math_max__III(x1, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder), this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder);
      y1 = java_lang_Math_min__III(java_lang_Math_max__III(y1, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder), this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder);
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestPlaceCost = $intern_53;
      lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
      dist = 0;
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestX = -1;
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestY = -1;
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_placeFound = false;
      defaultX = boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x;
      defaultY = boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y;
      if (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines.java_util_ArrayList_array.length > 1 || boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines.java_util_ArrayList_array.length == 0) {
        x2 = x1;
        y2 = y1;
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, x1, y1, 0);
      }
       else {
        x1 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, 0), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x - (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1);
        y1 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, 0), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y - (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1);
        x2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, 0), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, 0), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1;
        y2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, 0), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines, 0), 50).lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1;
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, x1, y1, 0);
      }
      for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I());
        com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 50);
      }
      while (!this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_placeFound || dist == 0) {
        ++dist;
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, x1 - dist + 1, y1 - dist, 1);
        for (i0 = x1 - dist + 2; i0 <= x2 + dist; i0++) {
          lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, i0, y1 - dist, 2);
        }
        for (j0 = y1 - dist + 1; j0 <= y2 + dist; j0++) {
          lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, x2 + dist, j0, 3);
        }
        for (i = x2 + dist - 1; i >= x1 - dist; i--) {
          lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, i, y2 + dist, 4);
        }
        for (j = y2 + dist - 1; j >= y1 - dist; j--) {
          lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, x1 - dist, j, 1);
        }
      }
      boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = defaultX;
      boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = defaultY;
      lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
      swap = false;
      bestXForBox1 = 0;
      bestYForBox1 = 0;
      bestXForBox2 = 0;
      bestYForBox2 = 0;
      bestBoxToSwap = boxIG1;
      if (defaultX == this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestX && defaultY == this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestY) {
        bestLineDif = 0;
        rand = java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random) * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef / 100;
        defLineLength1 = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$connectedLineLength__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG1) + rand;
        coord = com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, 2), $intern_14, 14, 0, [com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, 1), $intern_56, 0, 7, [boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x - 1, boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + ~~(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2)]), com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, 1), $intern_56, 0, 7, [boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + ~~(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2), boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y - 1]), com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, 1), $intern_56, 0, 7, [boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH, boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + ~~(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2)]), com_google_gwt_lang_Array_initValues__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2ILjava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Array_getClassLiteralForArray__Ljava_lang_Class_2ILjava_lang_Class_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, 1), $intern_56, 0, 7, [boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + ~~(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2), boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV])]);
        for (i = 0; i < 4; i++) {
          if (coord[i][0] >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder && coord[i][0] <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder && coord[i][1] >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder && coord[i][1] <= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder) {
            if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[coord[i][0]][coord[i][1]]) {
              boxIG2 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[coord[i][0]][coord[i][1]];
              lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
              lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG2);
              if (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH % 2 == boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH % 2) {
                xForBox1 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5 - boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 + 0.5)));
                xForBox2 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5 - boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 + 0.5)));
              }
               else {
                xForBox1 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5 - boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2)));
                xForBox2 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5 - boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2)));
              }
              if (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV % 2 == boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV % 2) {
                yForBox1 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5 - boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 + 0.5)));
                yForBox2 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5 - boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 + 0.5)));
              }
               else {
                yForBox1 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5 - boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2)));
                yForBox2 = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5 - boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2)));
              }
              cellCountBox1 = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$calculateTakenCellCount__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIII(this$static, boxIG1, xForBox1, yForBox1, 0);
              cellCountBox2 = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$calculateTakenCellCount__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIII(this$static, boxIG2, xForBox2, yForBox2, 0);
              oldX1 = boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x;
              oldY1 = boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y;
              oldX2 = boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_x;
              oldY2 = boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_y;
              if (cellCountBox1 == 0 && cellCountBox2 == 0 && !(xForBox1 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder || xForBox1 + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1 > this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder || yForBox1 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder || yForBox1 + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1 > this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder) && !(xForBox2 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder || xForBox2 + boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1 > this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder || yForBox2 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder || yForBox2 + boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1 > this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder)) {
                rand = java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random) * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef / 100;
                defLineLength2 = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$connectedLineLength__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG2) + rand;
                boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = xForBox1;
                boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = yForBox1;
                boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = xForBox2;
                boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = yForBox2;
                lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
                lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG2);
                rand = java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random) * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef / 100;
                newLineLength = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$connectedLineLength__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG1) + lv_lumii_layoutengine_UniversalLayoutAlgorithm_$connectedLineLength__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG2) + 2 * rand;
                if (defLineLength1 + defLineLength2 - newLineLength > bestLineDif) {
                  bestLineDif = defLineLength1 + defLineLength2 - newLineLength;
                  swap = true;
                  bestXForBox1 = xForBox1;
                  bestYForBox1 = yForBox1;
                  bestXForBox2 = xForBox2;
                  bestYForBox2 = yForBox2;
                  bestBoxToSwap = boxIG2;
                }
                lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
                lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG2);
              }
              boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = oldX1;
              boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = oldY1;
              boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = oldX2;
              boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = oldY2;
              lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
              lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG2);
            }
          }
        }
      }
      if (swap) {
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, bestBoxToSwap);
        boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = bestXForBox1;
        boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = bestYForBox1;
        bestBoxToSwap.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = bestXForBox2;
        bestBoxToSwap.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = bestYForBox2;
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, bestBoxToSwap);
      }
       else {
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
        boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestX;
        boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestY;
        lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG1);
      }
    }
    100 - iterations - 9 < 0 && (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef = 0);
    extend = false;
    iterations == 50 && (extend = true);
    if (extend) {
      lv_lumii_layoutengine_UniversalLayoutAlgorithm_$normalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZZDV(this$static, true, true, 3);
      lv_lumii_layoutengine_UniversalLayoutAlgorithm_$normalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZZDV(this$static, false, true, 3);
    }
     else if (iterations % 3 == 0) {
      iterations % 2 == 0?(hor = true):(hor = false);
      iterations <= 50?lv_lumii_layoutengine_UniversalLayoutAlgorithm_$normalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZZDV(this$static, hor, false, 3):lv_lumii_layoutengine_UniversalLayoutAlgorithm_$normalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZZDV(this$static, hor, false, java_lang_Math_max__DDD(1, 1 + (100 - iterations - 9) / 50));
    }
  }
   while (iterations <= 100);
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$moveAndCheckPlace__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIIV(this$static, boxIG1, x_0, y_0, movingDir){
  var rand;
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$calculateTakenCellCount__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2IIII(this$static, boxIG1, x_0, y_0, movingDir);
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount == 0 && !(x_0 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder || x_0 + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1 > this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder || y_0 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder || y_0 + boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1 > this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder)) {
    rand = java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random) * this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef;
    boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = x_0;
    boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = y_0;
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_curPlaceCost = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$connectedLineLength__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2D(boxIG1) + rand;
    if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_curPlaceCost < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestPlaceCost) {
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestPlaceCost = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_curPlaceCost;
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestX = boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x;
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestY = boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y;
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_placeFound = true;
    }
  }
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$normalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZZDV(this$static, horizontally, extendBoxSize, extraSpaceCoef){
  var boxIG, boxIG$array, boxIG$array0, boxIG$array1, boxIG$index, boxIG$index0, boxIG$index1, boxIG$max, boxIG$max0, boxIG$max1, boxIG1, boxIG1$array, boxIG1$index, boxIG1$max, extraVarCount, firstElement, firstGridIndex, i, i0, j, k, k0, lastBox, line, line$iterator, newValues, optimizer, secondElement, tmpNH, tmpNV;
  extraVarCount = 0;
  for (boxIG$array0 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index0 = 0 , boxIG$max0 = boxIG$array0.length; boxIG$index0 < boxIG$max0; ++boxIG$index0) {
    boxIG = boxIG$array0[boxIG$index0];
    for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 50));
      line.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal || ++extraVarCount;
    }
  }
  firstGridIndex = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + extraVarCount;
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist) {
    if (horizontally) {
      optimizer = new lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns.length);
      for (i0 = firstGridIndex; i0 < firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns.length; i0++) {
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, i0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[i0 - firstGridIndex]);
      }
      for (i = firstGridIndex; i < firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns.length - 1; i++) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(i, i + 1, $intern_76, $intern_76));
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, i, i + 1, 1);
      }
    }
     else {
      optimizer = new lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows.length);
      for (i0 = firstGridIndex; i0 < firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows.length; i0++) {
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, i0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[i0 - firstGridIndex]);
      }
      for (i = firstGridIndex; i < firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows.length - 1; i++) {
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(optimizer.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(i, i + 1, $intern_76, $intern_76));
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, i, i + 1, 1);
      }
    }
  }
   else {
    optimizer = new lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length + extraVarCount);
  }
  if (horizontally) {
    k0 = 0;
    for (j = 0; j < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize; j++) {
      lastBox = null;
      for (i = 0; i < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize; i++) {
        if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j]) {
          if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_x == i && this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_y == j) {
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_x + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5);
            this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt = k0;
            optimizer.addQuadraticConstantDifference__IDDV(k0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_x + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5, $intern_76);
            extendBoxSize && (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nH = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getNHor__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_AbstractContainer_2I(this$static, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_box));
            if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol != -1) {
              lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + extraSpaceCoef * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5));
              lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol + 1, $intern_76 + extraSpaceCoef * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 + 0.5));
            }
            ++k0;
          }
          !!lastBox && lastBox != this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j] && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, lastBox.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + extraSpaceCoef * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 + lastBox.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2));
          lastBox = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j];
        }
      }
    }
  }
   else {
    k0 = 0;
    for (i = 0; i < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize; i++) {
      lastBox = null;
      for (j = 0; j < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize; j++) {
        if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j]) {
          if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_x == i && this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_y == j) {
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_y + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5);
            this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt = k0;
            optimizer.addQuadraticConstantDifference__IDDV(k0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_y + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5, $intern_76);
            extendBoxSize && (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nV = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getNVert__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_AbstractContainer_2I(this$static, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_box));
            if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow != -1) {
              lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + extraSpaceCoef * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5));
              lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow + 1, $intern_76 + extraSpaceCoef * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 + 0.5));
            }
            ++k0;
          }
          !!lastBox && lastBox != this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j] && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, lastBox.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, $intern_76 + extraSpaceCoef * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j].lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 + lastBox.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2));
          lastBox = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j];
        }
      }
    }
  }
  k = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length;
  for (boxIG1$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG1$index = 0 , boxIG1$max = boxIG1$array.length; boxIG1$index < boxIG1$max; ++boxIG1$index) {
    boxIG1 = boxIG1$array[boxIG1$index];
    for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 50));
      if (extendBoxSize) {
        line.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal || (horizontally?(line.lv_lumii_layoutengine_universalLayout_Line_startX = java_lang_Math_max__III(0, java_lang_Math_min__III(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realStartX / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))))):(line.lv_lumii_layoutengine_universalLayout_Line_startY = java_lang_Math_max__III(0, java_lang_Math_min__III(boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realStartY / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))))));
        line.lv_lumii_layoutengine_universalLayout_Line_endIsOriginal || (horizontally?(line.lv_lumii_layoutengine_universalLayout_Line_endX = java_lang_Math_max__III(0, java_lang_Math_min__III(line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realEndX / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))))):(line.lv_lumii_layoutengine_universalLayout_Line_endY = java_lang_Math_max__III(0, java_lang_Math_min__III(line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realEndY / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))))));
      }
      if (boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt < line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt) {
        if (line.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal) {
          firstElement = boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt;
        }
         else {
          if (horizontally) {
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_startX);
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, k, line.lv_lumii_layoutengine_universalLayout_Line_startX);
          }
           else {
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_startY);
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, k, line.lv_lumii_layoutengine_universalLayout_Line_startY);
          }
          firstElement = k;
          ++k;
        }
        if (line.lv_lumii_layoutengine_universalLayout_Line_endIsOriginal) {
          secondElement = line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt;
        }
         else {
          if (horizontally) {
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + line.lv_lumii_layoutengine_universalLayout_Line_endX);
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, k, line.lv_lumii_layoutengine_universalLayout_Line_endX);
          }
           else {
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(optimizer, k, line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + line.lv_lumii_layoutengine_universalLayout_Line_endY);
            lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt, k, line.lv_lumii_layoutengine_universalLayout_Line_endY);
          }
          secondElement = k;
          ++k;
        }
        lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(optimizer, firstElement, secondElement, 1);
      }
    }
  }
  newValues = optimizer.performOptimization___3D();
  if (extendBoxSize) {
    for (boxIG$array1 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index1 = 0 , boxIG$max1 = boxIG$array1.length; boxIG$index1 < boxIG$max1; ++boxIG$index1) {
      boxIG = boxIG$array1[boxIG$index1];
      tmpNH = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH;
      tmpNV = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV;
      horizontally?(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH = 1):(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV = 1);
      lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG);
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH = tmpNH;
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV = tmpNV;
    }
  }
   else {
    for (boxIG$array1 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index1 = 0 , boxIG$max1 = boxIG$array1.length; boxIG$index1 < boxIG$max1; ++boxIG$index1) {
      boxIG = boxIG$array1[boxIG$index1];
      lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG);
    }
  }
  for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
    boxIG = boxIG$array[boxIG$index];
    horizontally?(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(newValues[boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt] - boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 + 0.5)))):(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(newValues[boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt] - boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 + 0.5))));
  }
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist) {
    if (horizontally) {
      for (i = firstGridIndex; i < firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns.length; i++) {
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[i - firstGridIndex] = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(Math.round(newValues[i])));
      }
    }
     else {
      for (i = firstGridIndex; i < firstGridIndex + this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows.length; i++) {
        this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[i - firstGridIndex] = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(Math.round(newValues[i])));
      }
    }
  }
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putAllBoxesToGrid__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(this$static);
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putAllBoxesToGrid__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(this$static){
  var boxIG, boxIG$array, boxIG$array0, boxIG$index, boxIG$index0, boxIG$max, boxIG$max0, diffH, diffV, i, i0, maxX, maxY, minX, minY, moveHor, moveVert;
  if (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist) {
    minX = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[0];
    maxX = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns.length - 1] - 1;
    minY = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[0];
    maxY = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows.length - 1] - 1;
  }
   else {
    minX = $intern_1;
    minY = $intern_1;
    maxX = $intern_71;
    maxY = $intern_71;
  }
  for (boxIG$array0 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index0 = 0 , boxIG$max0 = boxIG$array0.length; boxIG$index0 < boxIG$max0; ++boxIG$index0) {
    boxIG = boxIG$array0[boxIG$index0];
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x < minX && (minX = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1 > maxX && (maxX = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y < minY && (minY = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1 > maxY && (maxY = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1);
  }
  diffH = 0;
  diffV = 0;
  if (maxX - minX >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize) {
    diffH = maxX - minX - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize + 1;
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize += ~~(diffH * 10 / 7) + 4;
  }
  if (maxY - minY >= this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize) {
    diffV = maxY - minY - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize + 1;
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize += ~~(diffV * 10 / 7) + 4;
  }
  (diffH > 0 || diffV > 0) && (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1universalLayout_1BoxInGrid_12_1classLit, [$intern_14, $intern_77], [166, 80], 0, [this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize], 2));
  moveHor = ~~((this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize - (maxX - minX)) / 2) - minX;
  moveVert = ~~((this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize - (maxY - minY)) / 2) - minY;
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[0] = 0;
  for (i0 = 1; i0 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows.length - 1; i0++) {
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[i0] += moveVert;
  }
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows.length - 1] = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize;
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[0] = 0;
  for (i = 1; i < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns.length - 1; i++) {
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[i] += moveHor;
  }
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns.length - 1] = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize;
  for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
    boxIG = boxIG$array[boxIG$index];
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + moveHor;
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + moveVert;
    lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG);
  }
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG){
  var i, j;
  for (i = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x; i <= boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1; i++) {
    for (j = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y; j <= boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1; j++) {
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j] = boxIG;
    }
  }
  boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_inGrid = true;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$removeBox__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2V(this$static, boxIG){
  var i, j;
  for (i = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x; i <= boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1; i++) {
    for (j = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y; j <= boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1; j++) {
      this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid[i][j] = null;
    }
  }
  boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_inGrid = false;
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$runUniversalLayout__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_Container_2V(this$static){
  var abstractConstr, box, box$iterator, box$iterator0, boxIG, boxIG$array, boxIG$array0, boxIG$index, boxIG$index0, boxIG$max, boxIG$max0, containers, count, hSum, i, i0, ii, sp, vSum;
  containers = lv_lumii_layoutengine_Container_$getAbstractContainers__Llv_lumii_layoutengine_Container_2ZLjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer, false);
  hSum = 0;
  vSum = 0;
  count = 0;
  for (box$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(containers); box$iterator0.java_util_AbstractList$IteratorImpl_i < box$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator0.java_util_AbstractList$IteratorImpl_i < box$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator0.java_util_AbstractList$IteratorImpl_last = box$iterator0.java_util_AbstractList$IteratorImpl_i++), 12));
    hSum += box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left;
    vSum += box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top;
    ++count;
  }
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1universalLayout_1BoxInGrid_12_1classLit, $intern_77, 80, containers.java_util_ArrayList_array.length, 0, 1);
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_map = new java_util_LinkedHashMap_LinkedHashMap__V;
  ii = 0;
  for (box$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(containers); box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    box = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(box$iterator.java_util_AbstractList$IteratorImpl_i < box$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(box$iterator.java_util_AbstractList$IteratorImpl_last = box$iterator.java_util_AbstractList$IteratorImpl_i++), 12));
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes[ii] = new lv_lumii_layoutengine_universalLayout_BoxInGrid_BoxInGrid__Llv_lumii_layoutengine_AbstractContainer_2V(box);
    java_util_LinkedHashMap_$put__Ljava_util_LinkedHashMap_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_map, box, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes[ii]);
    ++ii;
  }
  sp = new lv_lumii_layoutengine_SpringLayoutAlgorithm_SpringLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(this$static.lv_lumii_layoutengine_ComponentLayout_part, this$static.lv_lumii_layoutengine_ComponentLayout_baseLayouter);
  for (i0 = 1; i0 <= 3; i0++) {
    lv_lumii_layoutengine_SpringLayoutAlgorithm_$layoutPass__Llv_lumii_layoutengine_SpringLayoutAlgorithm_2IV(sp, i0);
  }
  for (boxIG$array0 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index0 = 0 , boxIG$max0 = boxIG$array0.length; boxIG$index0 < boxIG$max0; ++boxIG$index0) {
    boxIG = boxIG$array0[boxIG$index0];
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd = lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_box);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd = lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_box);
  }
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$addLinesToBoxesInGrid__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(this$static);
  abstractConstr = lv_lumii_layoutengine_AbstractContainer_$getLayoutConstraints__Llv_lumii_layoutengine_AbstractContainer_2Llv_lumii_layoutengine_LayoutConstraints_2(this$static.lv_lumii_layoutengine_ComponentLayout_part.lv_lumii_layoutengine_DiagramPart_enclosingContainer);
  if (abstractConstr.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 1) {
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_constr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(abstractConstr, 39);
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist = true;
  }
   else {
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist = false;
  }
  java_util_Arrays_sort___3Ljava_lang_Object_2Ljava_util_Comparator_2V(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes, new lv_lumii_layoutengine_UniversalLayoutAlgorithm$1_UniversalLayoutAlgorithm$1__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V);
  for (i = 0; i < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes.length; i++)
  ;
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$setBoxesToGrid__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZV(this$static);
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$improveBoxPlaces__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(this$static);
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$setBoxCoordinates__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIV(this$static);
  for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
    boxIG = boxIG$array[boxIG$index];
    lv_lumii_layoutengine_ComponentLayout_$moveAbstrContWithChildren__Llv_lumii_layoutengine_ComponentLayout_2Llv_lumii_layoutengine_AbstractContainer_2DDV(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_box, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd, boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd);
  }
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$segmentDistance__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIIII(min1, max1, min2, max2){
  var a, i, j, min_0, minIndex, order;
  a = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, 4, 7, 1);
  a[0] = min1;
  a[1] = max1;
  a[2] = min2;
  a[3] = max2;
  order = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, 4, 7, 1);
  min_0 = $intern_1;
  minIndex = 0;
  for (i = 1; i <= 4; i++) {
    for (j = 0; j < 4; j++) {
      if (order[j] == 0 && a[j] < min_0) {
        min_0 = a[j];
        minIndex = j;
      }
    }
    order[minIndex] = i;
    min_0 = $intern_1;
  }
  return (order[0] == 1 || order[0] == 2) && (order[1] == 3 || order[1] == 4) || (order[0] == 3 || order[0] == 4) && (order[1] == 1 || order[1] == 2)?0:a[order[2] - 1] - a[order[1] - 1];
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$setBoxCoordinates__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2IIV(this$static){
  var boxIG, boxIG$array, boxIG$index, boxIG$max;
  for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
    boxIG = boxIG$array[boxIG$index];
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd = (boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2 - 0.5) * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize + 15);
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd = (boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y + boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2 - 0.5) * (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize + 15);
  }
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_$setBoxesToGrid__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZV(this$static){
  var box, boxIG, boxIG$array, boxIG$array0, boxIG$index, boxIG$index0, boxIG$max, boxIG$max0, i, i0, line, line$iterator, maxSize, maxX, maxY, minSize, minX, minY, rect;
  maxSize = 0;
  minSize = $intern_53;
  rect = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getGraphEnclosingRect__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2_3D(this$static);
  minX = rect[0];
  minY = rect[1];
  maxX = rect[2];
  maxY = rect[3];
  for (boxIG$array0 = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index0 = 0 , boxIG$max0 = boxIG$array0.length; boxIG$index0 < boxIG$max0; ++boxIG$index0) {
    boxIG = boxIG$array0[boxIG$index0];
    box = boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_box;
    box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top > maxSize && (maxSize = box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top);
    box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left > maxSize && (maxSize = box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left);
    box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top < minSize && (minSize = box.lv_lumii_layoutengine_AbstractContainer_bottom - box.lv_lumii_layoutengine_AbstractContainer_top);
    box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left < minSize && (minSize = box.lv_lumii_layoutengine_AbstractContainer_right - box.lv_lumii_layoutengine_AbstractContainer_left);
  }
  maxSize <= minSize * 4?(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize = ~~Math.max(Math.min(maxSize + 2 > ((maxX - minX) / 500 > (maxY - minY) / 500?(maxX - minX) / 500:(maxY - minY) / 500)?maxSize + 2:(maxX - minX) / 500 > (maxY - minY) / 500?(maxX - minX) / 500:(maxY - minY) / 500, $intern_1), -2147483648)):(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize = ~~Math.max(Math.min(3 * minSize / 2 > ((maxX - minX) / 500 > (maxY - minY) / 500?(maxX - minX) / 500:(maxY - minY) / 500)?3 * minSize / 2:(maxX - minX) / 500 > (maxY - minY) / 500?(maxX - minX) / 500:(maxY - minY) / 500, $intern_1), -2147483648));
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize <= 0 && (this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize = 30);
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$firstNormalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZV(this$static, true);
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$firstNormalize__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2ZV(this$static, false);
  rect = lv_lumii_layoutengine_UniversalLayoutAlgorithm_$getGraphEnclosingRect__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2_3D(this$static);
  minX = rect[0];
  minY = rect[1];
  maxX = rect[2];
  maxY = rect[3];
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_ceil__DD(((maxX - minX) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize + 4) * 1.2));
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize = com_google_gwt_lang_Cast_round_1int__DI(java_lang_Math_ceil__DD(((maxY - minY) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize + 4) * 1.2));
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_grid = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1universalLayout_1BoxInGrid_12_1classLit, [$intern_14, $intern_77], [166, 80], 0, [this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize], 2);
  for (boxIG$array = this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_boxes , boxIG$index = 0 , boxIG$max = boxIG$array.length; boxIG$index < boxIG$max; ++boxIG$index) {
    boxIG = boxIG$array[boxIG$index];
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH = 1;
    boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV = 1;
    if (boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH % 2 == 0) {
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD((boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize * ~~(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2) + ~~(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize / 2)) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)));
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD((boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize * ~~(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2) + ~~(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize / 2)) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)));
    }
     else {
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD((boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize * ~~(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH / 2)) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)));
      boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD((boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd - this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize * ~~(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV / 2)) / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)));
    }
    for (line$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines); line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      line = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(line$iterator.java_util_AbstractList$IteratorImpl_i < line$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(line$iterator.java_util_AbstractList$IteratorImpl_last = line$iterator.java_util_AbstractList$IteratorImpl_i++), 50));
      if (!line.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal) {
        line.lv_lumii_layoutengine_universalLayout_Line_startX = java_lang_Math_max__III(0, java_lang_Math_min__III(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realStartX / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))));
        line.lv_lumii_layoutengine_universalLayout_Line_startY = java_lang_Math_max__III(0, java_lang_Math_min__III(boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realStartY / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))));
      }
      if (!line.lv_lumii_layoutengine_universalLayout_Line_endIsOriginal) {
        line.lv_lumii_layoutengine_universalLayout_Line_endX = java_lang_Math_max__III(0, java_lang_Math_min__III(line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realEndX / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))));
        line.lv_lumii_layoutengine_universalLayout_Line_endY = java_lang_Math_max__III(0, java_lang_Math_min__III(line.lv_lumii_layoutengine_universalLayout_Line_boxIG.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV - 1, com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(line.lv_lumii_layoutengine_universalLayout_Line_realEndY / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)))));
      }
    }
  }
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd.length, 7, 1);
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd.length; i0++) {
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rows[i0] = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rowsd[i0] / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)));
  }
  this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd.length, 7, 1);
  for (i = 0; i < this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd.length; i++) {
    this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columns[i] = com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_columnsd[i] / this$static.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize)));
  }
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$putAllBoxesToGrid__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(this$static);
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm_UniversalLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V(part, baseLayouter){
  lv_lumii_layoutengine_ComponentLayout_ComponentLayout__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V.call(this, part, baseLayouter);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(234, 87, $intern_61, lv_lumii_layoutengine_UniversalLayoutAlgorithm_UniversalLayoutAlgorithm__Llv_lumii_layoutengine_DiagramPart_2Llv_lumii_layoutengine_LayoutAlgorithm_2V);
_.layoutPass__IV = function lv_lumii_layoutengine_UniversalLayoutAlgorithm_layoutPass__IV(pass){
  if (pass != 1) {
    return;
  }
  this.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random = new java_util_Random_Random__V;
  java_util_Random_$setSeed__Ljava_util_Random_2IIV(this.lv_lumii_layoutengine_UniversalLayoutAlgorithm_random);
  lv_lumii_layoutengine_UniversalLayoutAlgorithm_$runUniversalLayout__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2Llv_lumii_layoutengine_Container_2V(this);
}
;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestPlaceCost = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestX = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bestY = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_bottomBorder = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_cellCount = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_curPlaceCost = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridExist = false;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_gridSize = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_horSize = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_leftBorder = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_placeFound = false;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_randomCoef = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_rightBorder = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_topBorder = 0;
_.lv_lumii_layoutengine_UniversalLayoutAlgorithm_vertSize = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1UniversalLayoutAlgorithm_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'UniversalLayoutAlgorithm', 234);
function lv_lumii_layoutengine_UniversalLayoutAlgorithm$1_$compare__Llv_lumii_layoutengine_UniversalLayoutAlgorithm$1_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2I(boxIG1, boxIG2){
  return com_google_gwt_lang_LongLib_toInt__Lcom_google_gwt_lang_LongLibBase$LongEmul_2I(com_google_gwt_lang_LongLib_fromDouble__DLcom_google_gwt_lang_LongLibBase$LongEmul_2(java_lang_Math_round0__DD(boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_hor * boxIG2.lv_lumii_layoutengine_universalLayout_BoxInGrid_vert - boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_hor * boxIG1.lv_lumii_layoutengine_universalLayout_BoxInGrid_vert)));
}

function lv_lumii_layoutengine_UniversalLayoutAlgorithm$1_UniversalLayoutAlgorithm$1__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(235, 1, {}, lv_lumii_layoutengine_UniversalLayoutAlgorithm$1_UniversalLayoutAlgorithm$1__Llv_lumii_layoutengine_UniversalLayoutAlgorithm_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_UniversalLayoutAlgorithm$1_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(boxIG1, boxIG2){
  return lv_lumii_layoutengine_UniversalLayoutAlgorithm$1_$compare__Llv_lumii_layoutengine_UniversalLayoutAlgorithm$1_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2Llv_lumii_layoutengine_universalLayout_BoxInGrid_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxIG1, 80), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(boxIG2, 80));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1UniversalLayoutAlgorithm$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'UniversalLayoutAlgorithm/1', 235);
function lv_lumii_layoutengine_flowLayout_CycleRemoval_$RemoveDirectedCycles__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2_3ZV(this$static, eFlag){
  var d, k, kk, v, vn, vp, vv;
  if (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN == 0) {
    return;
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN; k++) {
    eFlag[k] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k] != this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k];
  }
  lv_lumii_layoutengine_flowLayout_CycleRemoval_$makeOutAdjStruct__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static);
  lv_lumii_layoutengine_flowLayout_CycleRemoval_$makeInAdjStruct__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[k] = k;
  }
  for (kk = 0; kk < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN - 1; kk++) {
    for (k = kk + 1; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
      if (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_Y[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[kk]] > this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_Y[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[k]]) {
        v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[kk];
        this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[kk] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[k];
        this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[k] = v;
      }
    }
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[k]] = k;
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN - 1; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[k] = k + 1;
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN - 1] = -1;
  for (k = 1; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[k] = k - 1;
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[0] = -1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT = 0;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inDeg = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outDeg = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inDeg[k] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[k + 1] - this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[k];
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outDeg[k] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[k + 1] - this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[k];
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_S = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_lT = -1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_rB = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_s = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT = -1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_in = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN, 7, 1);
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_in[k] = 0;
  }
  while (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT > -1) {
    v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT;
    while (v > -1) {
      lv_lumii_layoutengine_flowLayout_CycleRemoval_$isSink__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IZ(this$static, v) && lv_lumii_layoutengine_flowLayout_CycleRemoval_$insert__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IV(this$static, v);
      v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[v];
    }
    while (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT > -1) {
      lv_lumii_layoutengine_flowLayout_CycleRemoval_$shiftSink__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static);
    }
    v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT;
    while (v > -1) {
      lv_lumii_layoutengine_flowLayout_CycleRemoval_$isSource__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IZ(this$static, v) && lv_lumii_layoutengine_flowLayout_CycleRemoval_$insert__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IV(this$static, v);
      v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[v];
    }
    while (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT > -1) {
      lv_lumii_layoutengine_flowLayout_CycleRemoval_$shiftSource__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static);
    }
    if (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT == -1) {
      break;
    }
    vv = 0;
    d = -2147483647;
    v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT;
    while (v > -1) {
      if (d < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outDeg[v] - this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inDeg[v]) {
        d = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outDeg[v] - this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inDeg[v];
        vv = v;
      }
      v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[v];
    }
    vn = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[vv];
    vp = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[vv];
    vn > -1 && (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[vn] = vp);
    vp > -1?(this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[vp] = vn):(this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT = vn);
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[vv]] = -1;
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[vv] = -1;
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_S[++this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_lT] = vv;
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_S[k]] = k;
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k]] > this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k]] && (eFlag[k] = false);
  }
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_$insert__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IV(this$static, v){
  if (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_in[v]++ > 0) {
    return;
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_in[v] = 1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_s[v] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT = v;
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_$isSink__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IZ(this$static, v){
  var l;
  for (l = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[v]; l < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[v + 1]; l++) {
    if (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdj[l]] > -1) {
      return false;
    }
  }
  return true;
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_$isSource__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IZ(this$static, v){
  var l, l0;
  for (l0 = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[v]; l0 < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[v + 1]; l0++) {
    if (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdj[l0]] > -1) {
      return false;
    }
  }
  for (l = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[v]; l < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[v + 1]; l++) {
    if (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdj[l]] > -1) {
      return true;
    }
  }
  return false;
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_$makeInAdjStruct__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static){
  var k;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN + 1, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdj = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN, 7, 1);
  for (k = 1; k <= this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[k] = 0;
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k] != this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k] && ++this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k] + 1];
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[0] = 0;
  for (k = 1; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[k] += this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[k - 1];
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k] != this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k] && (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdj[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k]]++] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k]);
  }
  for (k = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k > 0; k--) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[k] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[k - 1];
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[0] = 0;
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_$makeOutAdjStruct__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static){
  var k;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN + 1, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdj = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN, 7, 1);
  for (k = 1; k <= this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[k] = 0;
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k] != this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k] && ++this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k] + 1];
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[0] = 0;
  for (k = 1; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[k] += this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[k - 1];
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN; k++) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k] != this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k] && (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdj[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1[k]]++] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2[k]);
  }
  for (k = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN; k > 0; k--) {
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[k] = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[k - 1];
  }
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[0] = 0;
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_$shiftSink__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static){
  var l, v, vn, vp, w;
  v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT;
  if (--this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_in[v] > 0) {
    return;
  }
  vn = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[v];
  vp = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[v];
  vn > -1 && (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[vn] = vp);
  vp > -1?(this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[vp] = vn):(this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT = vn);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[v]] = -1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[v] = -1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_S[--this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_rB] = v;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_s[v];
  for (l = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[v]; l < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdjT[v + 1]; l++) {
    w = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inAdj[l];
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[w] > -1 && lv_lumii_layoutengine_flowLayout_CycleRemoval_$isSink__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IZ(this$static, w) && lv_lumii_layoutengine_flowLayout_CycleRemoval_$insert__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IV(this$static, w);
    --this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outDeg[w];
  }
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_$shiftSource__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2V(this$static){
  var l, v, vn, vp, w;
  v = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT;
  if (--this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_in[v] > 0) {
    return;
  }
  vn = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[v];
  vp = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[v];
  vn > -1 && (this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vPrev[vn] = vp);
  vp > -1?(this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vNext[vp] = vn):(this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT = vn);
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_V[this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[v]] = -1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[v] = -1;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_S[++this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_lT] = v;
  this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_s[v];
  for (l = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[v]; l < this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdjT[v + 1]; l++) {
    w = this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_outAdj[l];
    this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_I[w] > -1 && lv_lumii_layoutengine_flowLayout_CycleRemoval_$isSource__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IZ(this$static, w) && lv_lumii_layoutengine_flowLayout_CycleRemoval_$insert__Llv_lumii_layoutengine_flowLayout_CycleRemoval_2IV(this$static, w);
    --this$static.lv_lumii_layoutengine_flowLayout_CycleRemoval_inDeg[w];
  }
}

function lv_lumii_layoutengine_flowLayout_CycleRemoval_CycleRemoval__II_3I_3I_3IV(vN0, eN0, eV10, eV20, Y0){
  this.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN = vN0;
  this.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN = eN0;
  this.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV1 = eV10;
  this.lv_lumii_layoutengine_flowLayout_CycleRemoval_eV2 = eV20;
  this.lv_lumii_layoutengine_flowLayout_CycleRemoval_Y = Y0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(261, 1, {}, lv_lumii_layoutengine_flowLayout_CycleRemoval_CycleRemoval__II_3I_3I_3IV);
_.lv_lumii_layoutengine_flowLayout_CycleRemoval_eN = 0;
_.lv_lumii_layoutengine_flowLayout_CycleRemoval_lT = 0;
_.lv_lumii_layoutengine_flowLayout_CycleRemoval_rB = 0;
_.lv_lumii_layoutengine_flowLayout_CycleRemoval_sT = 0;
_.lv_lumii_layoutengine_flowLayout_CycleRemoval_vN = 0;
_.lv_lumii_layoutengine_flowLayout_CycleRemoval_vT = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1CycleRemoval_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_78, 'CycleRemoval', 261);
function lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_FlowLayoutEdge__IIV(v1, v2){
  this.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1 = v1;
  this.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2 = v2;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(76, 1, {76:1}, lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_FlowLayoutEdge__IIV);
_.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1 = 0;
_.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2 = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1FlowLayoutEdge_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_78, 'FlowLayoutEdge', 76);
function lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$buildAdjacencyStructure__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(this$static){
  var e, edge, v, v1, v2;
  this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct = new java_util_ArrayList_ArrayList__V;
  for (v = 0; v < this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v++)
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, new java_util_ArrayList_ArrayList__V);
  for (e = 0; e < this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e++) {
    edge = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, e), 76);
    v1 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1;
    v2 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v1), 4), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v2));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v2), 4), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v1));
  }
}

function lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$buildDirectedAdjacencyStructure__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2V(this$static){
  var e, edge, v, v1, v2;
  this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct = new java_util_ArrayList_ArrayList__V;
  for (v = 0; v < this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; v++)
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, new java_util_ArrayList_ArrayList__V);
  for (e = 0; e < this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m; e++) {
    edge = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, e), 76);
    v1 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v1;
    v2 = edge.lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_v2;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v1), 4), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v2));
  }
}

function lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$insertNewAcyclicEdge__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2IIV(this$static, v1, v2){
  var dist, k, path, v, vertexQueue, w, w$iterator;
  path = false;
  dist = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n, 7, 1);
  vertexQueue = new java_util_LinkedList_LinkedList__V;
  for (k = 0; k < this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n; k++)
    dist[k] = -1;
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(vertexQueue, java_lang_Integer_valueOf__ILjava_lang_Integer_2(v2));
  dist[v2] = 0;
  while (vertexQueue.java_util_LinkedList_size != 0 && !path) {
    v = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(vertexQueue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(vertexQueue, vertexQueue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 9)).java_lang_Integer_value;
    for (w$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v), 4)); w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      w = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_last = w$iterator.java_util_AbstractList$IteratorImpl_i++), 9)).java_lang_Integer_value;
      if (w == v1) {
        path = true;
        break;
      }
      if (dist[w] < 0) {
        java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(vertexQueue, java_lang_Integer_valueOf__ILjava_lang_Integer_2(w));
        dist[w] = dist[v] + 1;
      }
    }
  }
  if (path) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, new lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_FlowLayoutEdge__IIV(v2, v1));
    ++this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v2), 4), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v1));
  }
   else {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, new lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_FlowLayoutEdge__IIV(v1, v2));
    ++this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_adjStruct, v1), 4), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v2));
  }
}

function lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_$insertNewEdge__Llv_lumii_layoutengine_flowLayout_FlowLayoutGraph_2IIV(this$static, v1, v2){
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList, new lv_lumii_layoutengine_flowLayout_FlowLayoutEdge_FlowLayoutEdge__IIV(v1, v2));
  ++this$static.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m;
}

function lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_FlowLayoutGraph__IV(n){
  var v, vertex;
  this.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n = n;
  this.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m = 0;
  this.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vertexList = new java_util_ArrayList_ArrayList__IV(n);
  this.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_edgeList = new java_util_ArrayList_ArrayList__V;
  for (v = 0; v < n; v++) {
    vertex = new lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_FlowLayoutVertex__V;
    vertex.lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_index = v;
    vertex.lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_tag = '' + v;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_vertexList, vertex);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(178, 1, {}, lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_FlowLayoutGraph__IV);
_.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_m = 0;
_.lv_lumii_layoutengine_flowLayout_FlowLayoutGraph_n = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1FlowLayoutGraph_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_78, 'FlowLayoutGraph', 178);
function lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_FlowLayoutVertex__V(){
  new java_util_ArrayList_ArrayList__V;
  new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(164, 1, {164:1}, lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_FlowLayoutVertex__V);
_.lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_index = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1FlowLayoutVertex_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_78, 'FlowLayoutVertex', 164);
function lv_lumii_layoutengine_flowLayout_GraphProcessor_$calculateConnectedComponents__Llv_lumii_layoutengine_flowLayout_GraphProcessor_2Ljava_util_ArrayList_2_3II(adjStructure, compVector){
  var compNumber, n, v, v0, v1, vertexQueue, w, w$iterator;
  n = adjStructure.java_util_ArrayList_array.length;
  vertexQueue = new java_util_LinkedList_LinkedList__V;
  for (v1 = 0; v1 < n; v1++) {
    compVector[v1] = -1;
  }
  compNumber = -1;
  for (v0 = 0; v0 < n; v0++) {
    if (compVector[v0] == -1) {
      ++compNumber;
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(vertexQueue, java_lang_Integer_valueOf__ILjava_lang_Integer_2(v0));
      compVector[v0] = compNumber;
      while (vertexQueue.java_util_LinkedList_size != 0) {
        v = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(vertexQueue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(vertexQueue, vertexQueue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 9)).java_lang_Integer_value;
        for (w$iterator = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(v, adjStructure.java_util_ArrayList_array.length) , new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(adjStructure.java_util_ArrayList_array[v], 4))); w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          w = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(w$iterator.java_util_AbstractList$IteratorImpl_i < w$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(w$iterator.java_util_AbstractList$IteratorImpl_last = w$iterator.java_util_AbstractList$IteratorImpl_i++), 9)).java_lang_Integer_value;
          if (compVector[w] == -1) {
            java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(vertexQueue, java_lang_Integer_valueOf__ILjava_lang_Integer_2(w));
            compVector[w] = compNumber;
          }
        }
      }
    }
  }
  return compNumber + 1;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_$getOtherNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2(this$static, node){
  var otherNode;
  otherNode = this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_targetNode;
  node == this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_targetNode && (otherNode = this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_sourceNode);
  return otherNode;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_LayeredEdge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2V(sourceNode, targetNode){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_sourceNode = sourceNode;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_targetNode = targetNode;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(68, 1, {68:1}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_LayeredEdge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1LayeredEdge_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_79, 'LayeredEdge', 68);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$addEdge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2V(this$static, sourceNode, targetNode){
  var edge;
  edge = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_LayeredEdge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2V(sourceNode, targetNode);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_edgeList, edge);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(sourceNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList, edge);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(targetNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList, edge);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(targetNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_inEdgeList, edge);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static, level){
  return com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_levelNodeListArray, level), 4);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_LayeredGraph__IV(numberOfLevels){
  var i;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_numberOfLevels = numberOfLevels;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_levelNodeListArray = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_edgeList = new java_util_ArrayList_ArrayList__V;
  for (i = 0; i < numberOfLevels; i++) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_levelNodeListArray, new java_util_ArrayList_ArrayList__V);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(267, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_LayeredGraph__IV);
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_numberOfLevels = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1LayeredGraph_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_79, 'LayeredGraph', 267);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_$setOriginalVertex__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_FlowLayoutVertex_2V(this$static, vertex){
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_originalVertex = vertex;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_LayeredNode__V(){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_inEdgeList = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(61, 1, {61:1}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_LayeredNode__V);
_.toString__Ljava_lang_String_2$ = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_toString__Ljava_lang_String_2(){
  return 'LN: ' + this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_originalVertex.lv_lumii_layoutengine_flowLayout_FlowLayoutVertex_tag;
}
;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_isDummy = false;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1LayeredNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_79, 'LayeredNode', 61);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2I(n1, n2){
  var rc;
  rc = 0;
  n1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber > n2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber?(rc = -1):n1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber < n2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber && (rc = 1);
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_LayeredNodeLevelComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(273, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_LayeredNodeLevelComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(n1, n2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n1, 61), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n2, 61));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1LayeredNodeLevelComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_79, 'LayeredNodeLevelComparator', 273);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(check){
  if (!check) {
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V($intern_80);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$run__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2V(this$static){
  var edge, i, i2, invisibleNodeSet, isInvisibleNode, it, iter, j, k, lNode, lNodeToIntMap, lastLevelNodeList, levelNodes, neiIt, neiNode, neigSet, nextLevelNodeList, nextLevelNodes, numberOfLevels, olNode, otherNode, pqOrderList, pqTreeArray, prevLevelNodes, q, replaceList, rules_0, rulesList, singleReplace, thisLevelAList, thisLevelLList, tree;
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph = this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_input.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingInput_layeredGraph;
  numberOfLevels = this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_numberOfLevels;
  pqTreeArray = new java_util_ArrayList_ArrayList__V;
  for (i = 0; i < numberOfLevels; i++) {
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(pqTreeArray, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_PQTreeList__V);
    levelNodes = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, i);
    if (i == 0) {
      tree = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_PQTree__Ljava_util_Collection_2V(levelNodes);
      tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue = 0;
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$addTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[0], 34)), tree);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[0], 34))));
    }
    if (i > 0) {
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$copy__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i - 1, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i - 1], 34)));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
      for (singleReplace = 1; singleReplace < 3; singleReplace++) {
        for (j = 0; j < levelNodes.java_util_ArrayList_array.length; j++) {
          lNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, levelNodes.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(levelNodes.java_util_ArrayList_array[j], 61));
          replaceList = new java_util_LinkedList_LinkedList__V;
          for (it = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList); it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
            edge = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = it.java_util_AbstractList$IteratorImpl_i++), 68));
            otherNode = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_$getOtherNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2(edge, lNode);
            otherNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber == i - 1 && (java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(replaceList, otherNode, replaceList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, replaceList.java_util_LinkedList_tail) , true);
          }
          if (singleReplace == 0) {
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$merge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), replaceList);
          }
           else if (singleReplace == 1 && replaceList.java_util_LinkedList_size == 1) {
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$replace__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_lang_Object_2Ljava_lang_Object_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(replaceList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(replaceList.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value, 61)), lNode);
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
          }
           else if (singleReplace == 2 && replaceList.java_util_LinkedList_size > 1) {
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$replaceList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2Ljava_lang_Object_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), replaceList, lNode);
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
          }
           else if (replaceList.java_util_LinkedList_size == 0 && singleReplace == 2) {
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$addTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_lang_Object_2IV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), lNode, i);
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
          }
        }
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeUnnecessary__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)));
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
      }
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeNodes__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Collection_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, i - 1));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeEmptyTrees__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
    }
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
    if (i + 1 < numberOfLevels) {
      nextLevelNodes = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, i + 1);
      for (j = 0; j < nextLevelNodes.java_util_ArrayList_array.length; j++) {
        lNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, nextLevelNodes.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nextLevelNodes.java_util_ArrayList_array[j], 61));
        replaceList = new java_util_LinkedList_LinkedList__V;
        for (it = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList); it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          edge = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = it.java_util_AbstractList$IteratorImpl_i++), 68));
          otherNode = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_$getOtherNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2(edge, lNode);
          otherNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber == i && (java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(replaceList, otherNode, replaceList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, replaceList.java_util_LinkedList_tail) , true);
        }
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$merge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), replaceList);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeUnnecessary__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)));
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
      }
    }
    if (i + 1 < numberOfLevels) {
      lNodeToIntMap = new java_util_HashMap_HashMap__V;
      nextLevelNodes = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, i + 1);
      rules_0 = new java_util_ArrayList_ArrayList__V;
      for (j = 0; j < nextLevelNodes.java_util_ArrayList_array.length; j++) {
        lNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, nextLevelNodes.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(nextLevelNodes.java_util_ArrayList_array[j], 61));
        lNodeToIntMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lNode, new java_lang_Integer_Integer__IV(j));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(rules_0, new java_util_LinkedHashSet_LinkedHashSet__V);
      }
      invisibleNodeSet = new java_util_HashSet_HashSet__V;
      for (k = 0; k < levelNodes.java_util_ArrayList_array.length; k++) {
        lNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, levelNodes.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(levelNodes.java_util_ArrayList_array[k], 61));
        isInvisibleNode = true;
        for (iter = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList); iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          edge = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(iter.java_util_AbstractList$IteratorImpl_last = iter.java_util_AbstractList$IteratorImpl_i++), 68));
          neiNode = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_$getOtherNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2(edge, lNode);
          if (neiNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber == i + 1) {
            isInvisibleNode = false;
            java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(rules_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lNodeToIntMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(neiNode), 9).java_lang_Integer_value), 32), lNode);
          }
        }
        isInvisibleNode && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(invisibleNodeSet, lNode);
      }
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$setInvisibleNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), invisibleNodeSet);
      for (q = 0; q < nextLevelNodes.java_util_ArrayList_array.length; q++) {
        if ((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(q, rules_0.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rules_0.java_util_ArrayList_array[q], 32)).java_util_HashSet_map.size__I() > 1) {
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$addRule__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Collection_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(q, rules_0.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rules_0.java_util_ArrayList_array[q], 30)));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
        }
      }
    }
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
    if (i > 0) {
      lNodeToIntMap = new java_util_HashMap_HashMap__V;
      prevLevelNodes = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, i - 1);
      rules_0 = new java_util_ArrayList_ArrayList__V;
      for (j = 0; j < prevLevelNodes.java_util_ArrayList_array.length; j++) {
        lNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, prevLevelNodes.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(prevLevelNodes.java_util_ArrayList_array[j], 61));
        lNodeToIntMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(lNode, new java_lang_Integer_Integer__IV(j));
        java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(rules_0, new java_util_LinkedHashSet_LinkedHashSet__V);
      }
      invisibleNodeSet = new java_util_HashSet_HashSet__V;
      for (k = 0; k < levelNodes.java_util_ArrayList_array.length; k++) {
        lNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, levelNodes.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(levelNodes.java_util_ArrayList_array[k], 61));
        isInvisibleNode = true;
        for (iter = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList); iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
          edge = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(iter.java_util_AbstractList$IteratorImpl_last = iter.java_util_AbstractList$IteratorImpl_i++), 68));
          neiNode = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_$getOtherNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2(edge, lNode);
          if (neiNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber == i - 1) {
            isInvisibleNode = false;
            java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(rules_0, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lNodeToIntMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(neiNode), 9).java_lang_Integer_value), 32), lNode);
          }
        }
        isInvisibleNode && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(invisibleNodeSet, lNode);
      }
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$setInvisibleNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), invisibleNodeSet);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$setHangingNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), invisibleNodeSet);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
      for (q = 0; q < prevLevelNodes.java_util_ArrayList_array.length; q++) {
        if ((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(q, rules_0.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rules_0.java_util_ArrayList_array[q], 32)).java_util_HashSet_map.size__I() > 1) {
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$addRule__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Collection_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34)), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(q, rules_0.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(rules_0.java_util_ArrayList_array[q], 30)));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
        }
      }
    }
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_2ZV(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i], 34))));
  }
  lastLevelNodeList = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, numberOfLevels - 1);
  pqOrderList = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$getList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2Ljava_util_LinkedList_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(numberOfLevels - 1, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[numberOfLevels - 1], 34)), null);
  lastLevelNodeList.java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
  java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(lastLevelNodeList, pqOrderList);
  for (i2 = numberOfLevels - 2; i2 >= 0; i2--) {
    nextLevelNodeList = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, i2 + 1);
    new java_util_HashSet_HashSet__V;
    thisLevelAList = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_$getLevelNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredGraph_2ILjava_util_ArrayList_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_layeredGraph, i2);
    thisLevelAList.java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
    rulesList = new java_util_LinkedList_LinkedList__V;
    for (it = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(nextLevelNodeList); it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
      lNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = it.java_util_AbstractList$IteratorImpl_i++), 61));
      neigSet = new java_util_HashSet_HashSet__V;
      for (neiIt = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList); neiIt.java_util_AbstractList$IteratorImpl_i < neiIt.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        edge = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(neiIt.java_util_AbstractList$IteratorImpl_i < neiIt.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(neiIt.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(neiIt.java_util_AbstractList$IteratorImpl_last = neiIt.java_util_AbstractList$IteratorImpl_i++), 68));
        olNode = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_$getOtherNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2(edge, lNode);
        olNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber == i2 && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(neigSet, olNode);
      }
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(rulesList, neigSet, rulesList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, rulesList.java_util_LinkedList_tail);
    }
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeUnnecessary__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i2], 34)));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$updateLevelInfo__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i2], 34)));
    thisLevelLList = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$getList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2Ljava_util_LinkedList_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(i2, pqTreeArray.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(pqTreeArray.java_util_ArrayList_array[i2], 34)), rulesList);
    java_util_ArrayList_$addAll__Ljava_util_ArrayList_2Ljava_util_Collection_2Z(thisLevelAList, thisLevelLList);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_OrderingAlgorithm__V(){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_input = null;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(269, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingAlgorithm_OrderingAlgorithm__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1OrderingAlgorithm_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_79, 'OrderingAlgorithm', 269);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingInput_OrderingInput__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(268, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_OrderingInput_OrderingInput__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1OrderingInput_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_79, 'OrderingInput', 268);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$getPertQChildrenCount__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(this$static){
  var node, node$iterator, rc;
  rc = 0;
  for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
    com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(node, 48) && node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent && ++rc;
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$removeChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this$static, child){
  java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, child, false) && java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, child, true);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setMaxSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(this$static, newValue){
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq = newValue;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(this$static, newValue){
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq = newValue;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(this$static, newParent, index_0){
  if (this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent) {
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$removeChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, this$static);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent = null;
  }
  if (newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size >= index_0) {
    index_0 != newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size?java_util_AbstractSequentialList_$add__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2V(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, index_0, this$static):java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, this$static);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent = newParent;
  }
   else {
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(this$static, newParent, true);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this$static, newParent, substitute){
  var index_0;
  if (this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent) {
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$removeChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, this$static);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent = null;
  }
  if (java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, substitute, false)) {
    index_0 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, substitute);
    java_util_AbstractSequentialList_$remove__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, index_0);
    java_util_AbstractSequentialList_$add__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2V(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, index_0, this$static);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent = newParent;
  }
   else {
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(this$static, newParent, true);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(this$static, newParent, front){
  !!this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$removeChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, this$static);
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent = newParent;
  !!newParent && (front?java_util_LinkedList_$addFirst__Ljava_util_LinkedList_2Ljava_lang_Object_2V(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, this$static):java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(newParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, this$static));
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$toString__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_String_2(this$static){
  var rc;
  rc = '';
  rc += com_google_gwt_lang_Cast_charToString__CLjava_lang_String_2(this$static.getTypeChar__C());
  rc += ' ';
  rc += this$static.getTestValue__Ljava_lang_String_2();
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$update__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this$static){
  var b1, b2, node, node$iterator;
  b1 = true;
  b2 = false;
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited = true;
  for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
    b1 = b1 & (node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full || lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$isInvisibleNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree, node));
    b2 = b2 | (node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full || node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited = this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited & node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited;
  }
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full = this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent = false;
  b1?(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full = true):b2 && (this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent = true);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_PQTreeNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(parent_0, tree){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent = parent_0;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList = new java_util_LinkedList_LinkedList__V;
  !!parent_0 && parent_0.addChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this);
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited = false;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree = tree;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq = $intern_15;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq = -1;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(17, 1, {17:1});
_.addChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_addChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(child){
  java_util_LinkedList_$addFirst__Ljava_util_LinkedList_2Ljava_lang_Object_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, child);
}
;
_.getTestValue__Ljava_lang_String_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_getTestValue__Ljava_lang_String_2(){
  return '';
}
;
_.setEmpty__V = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_setEmpty__V(){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full = false;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent = false;
}
;
_.toString__Ljava_lang_String_2$ = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_toString__Ljava_lang_String_2(){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$toString__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_String_2(this);
}
;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full = false;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level = 0;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq = 0;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq = 0;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent = false;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited = false;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTreeNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTreeNode', 17);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(parent_0, o, tree){
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_PQTreeNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V.call(this, parent_0, tree);
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value = o;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(43, 17, {43:1, 17:1}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V);
_.getMaxMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_getMaxMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2(){
  return this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
}
;
_.getTestValue__Ljava_lang_String_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_getTestValue__Ljava_lang_String_2(){
  return java_lang_Object_toString_1_1Ljava_1lang_1String_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_String_2(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value);
}
;
_.getType__I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_getType__I(){
  return 3;
}
;
_.getTypeChar__C = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_getTypeChar__C(){
  return 67;
}
;
_.process__ZLlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_process__ZLlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2(isRoot){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full = true;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited = true;
  return this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
}
;
_.setEmpty__V = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_setEmpty__V(){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full = false;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent = false;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1CNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'CNode', 43);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(this$static, o1, o2){
  var max_0, min_0, rc;
  rc = 0;
  min_0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, 2, 7, 1);
  max_0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, 2, 7, 1);
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_minMap.containsKey__Ljava_lang_Object_2Z(o1)?(min_0[0] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_minMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o1), 9).java_lang_Integer_value):(min_0[0] = -1);
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_minMap.containsKey__Ljava_lang_Object_2Z(o2)?(min_0[1] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_minMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o2), 9).java_lang_Integer_value):(min_0[1] = -1);
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_maxMap.containsKey__Ljava_lang_Object_2Z(o1)?(max_0[0] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_maxMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o1), 9).java_lang_Integer_value):(max_0[0] = -1);
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_maxMap.containsKey__Ljava_lang_Object_2Z(o2)?(max_0[1] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_maxMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o2), 9).java_lang_Integer_value):(max_0[1] = -1);
  min_0[0] < min_0[1]?(rc = -1):min_0[0] > min_0[1]?(rc = 1):min_0[0] == min_0[1] && (max_0[0] < max_0[1]?(rc = -1):max_0[0] > max_0[1] && (rc = 1));
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_ObjectSeqComparator__Ljava_util_List_2V(sequenceRulesList){
  var cList, i1, index_0, o, o$iterator;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_minMap = new java_util_HashMap_HashMap__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_maxMap = new java_util_HashMap_HashMap__V;
  index_0 = 0;
  for (i1 = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(sequenceRulesList, 0); i1.java_util_LinkedList$ListIteratorImpl_currentNode != i1.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail; index_0++) {
    cList = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(i1.java_util_LinkedList$ListIteratorImpl_currentNode != i1.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , i1.java_util_LinkedList$ListIteratorImpl_lastNode = i1.java_util_LinkedList$ListIteratorImpl_currentNode , i1.java_util_LinkedList$ListIteratorImpl_currentNode = i1.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++i1.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(i1.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 30));
    for (o$iterator = cList.iterator__Ljava_util_Iterator_2(); o$iterator.hasNext__Z();) {
      o = o$iterator.next__Ljava_lang_Object_2();
      this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_minMap.containsKey__Ljava_lang_Object_2Z(o) || this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_minMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(o, new java_lang_Integer_Integer__IV(index_0));
      this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_maxMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(o, new java_lang_Integer_Integer__IV(index_0));
    }
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(271, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_ObjectSeqComparator__Ljava_util_List_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(this, o1, o2);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1ObjectSeqComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'ObjectSeqComparator', 271);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_$setMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_2IV(this$static, MLValue){
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_mlValue = MLValue;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(parent_0, tree){
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_PQTreeNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V.call(this, parent_0, tree);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(64, 17, {64:1, 17:1}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V);
_.addChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_addChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(child){
  java_util_LinkedList_$addFirst__Ljava_util_LinkedList_2Ljava_lang_Object_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, child);
}
;
_.getMaxMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_getMaxMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2(){
  var it, max_0, min_0, n;
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_PQTreeSeqComparator__V);
  it = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0);
  min_0 = $intern_15;
  max_0 = -1;
  while (it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) {
    n = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , it.java_util_LinkedList$ListIteratorImpl_lastNode = it.java_util_LinkedList$ListIteratorImpl_currentNode , it.java_util_LinkedList$ListIteratorImpl_currentNode = it.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++it.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
    min_0 > n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq && (min_0 = n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq);
    max_0 < n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq && (max_0 = n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq);
  }
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq = min_0;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq = max_0;
  return this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
}
;
_.getType__I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_getType__I(){
  return 1;
}
;
_.getTypeChar__C = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_getTypeChar__C(){
  return 80;
}
;
_.process__ZLlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_process__ZLlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2(isRoot){
  var arr, child, childList, empChildList, empPNode, emptyPNode, end, fullChildList, fullPNode, iter, node, node$iterator, node$iterator0, otherChildList, otherEnd, pNode, pertQChildrenCount, qNode, returnNode;
  returnNode = null;
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$update__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this);
  isRoot = isRoot & !this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
  if (this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full) {
    returnNode = this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
  }
   else if (this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent) {
    pertQChildrenCount = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$getPertQChildrenCount__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(this);
    if (pertQChildrenCount == 0) {
      if (isRoot) {
        fullChildList = new java_util_LinkedList_LinkedList__V;
        for (iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0); iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          child = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          child.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full && (java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(fullChildList, child, fullChildList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, fullChildList.java_util_LinkedList_tail) , true);
        }
        if (fullChildList.java_util_LinkedList_size > 1) {
          pNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
          for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(fullChildList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
            node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, pNode, true);
          }
        }
        returnNode = null;
      }
       else {
        childList = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
        java_util_LinkedList_$reset__Ljava_util_LinkedList_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
        qNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(qNode, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, this);
        fullPNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(qNode, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
        fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full = true;
        emptyPNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(qNode, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
        for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(childList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, fullPNode, true):lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, emptyPNode, true);
        }
        fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 1?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17), qNode, fullPNode):fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 0 && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$removeChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, fullPNode);
        emptyPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 1?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(emptyPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17), qNode, emptyPNode):emptyPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 0 && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$removeChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(emptyPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, emptyPNode);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$update__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(qNode);
        returnNode = this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
      }
    }
     else if (pertQChildrenCount == 1) {
      if (isRoot) {
        qNode = null;
        childList = new java_util_LinkedList_LinkedList__V;
        for (iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0); iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          node.getType__I() == 2 && node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent?(qNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node, 48)):node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full && (java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(childList, node, childList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, childList.java_util_LinkedList_tail) , true);
        }
        end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(qNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
        if (childList.java_util_LinkedList_size > 1) {
          pNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(pNode, qNode, end);
        }
         else {
          pNode = qNode;
        }
        for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(childList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, pNode, end);
        }
        returnNode = null;
      }
       else {
        qNode = null;
        fullChildList = new java_util_LinkedList_LinkedList__V;
        empChildList = new java_util_LinkedList_LinkedList__V;
        for (iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0); iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(node, 48) && node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent?(qNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node, 48)):node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full?(java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(fullChildList, node, fullChildList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, fullChildList.java_util_LinkedList_tail) , true):(java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(empChildList, node, empChildList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, empChildList.java_util_LinkedList_tail) , true);
        }
        end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(qNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
        empPNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
        fullPNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(empPNode, qNode, !end);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(fullPNode, qNode, end);
        for (node$iterator0 = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(fullChildList, 0); node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator0.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator0.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator0.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator0.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator0.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, fullPNode, true);
        }
        for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(empChildList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, empPNode, true);
        }
        empPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 1?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(empPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17), empPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, empPNode):empPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 0 && java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(qNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, empPNode, false) && java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(qNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, empPNode, true);
        fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 1?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17), fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, fullPNode):fullPNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 0 && java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(qNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, fullPNode, false) && java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(qNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, fullPNode, true);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(qNode, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, this);
        returnNode = this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
      }
    }
     else if (pertQChildrenCount == 2) {
      arr = new java_util_ArrayList_ArrayList__V;
      fullChildList = new java_util_LinkedList_LinkedList__V;
      for (iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0); iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
        node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
        com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(node, 48) && node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(arr, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node, 48)):node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full && (java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(fullChildList, node, fullChildList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, fullChildList.java_util_LinkedList_tail) , true);
      }
      end = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, arr.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(arr.java_util_ArrayList_array[0], 48)).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
      pNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(pNode, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, arr.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(arr.java_util_ArrayList_array[0], 17)), end);
      for (node$iterator0 = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(fullChildList, 0); node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator0.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
        node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator0.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator0.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator0.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator0.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator0.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, pNode, true);
      }
      pNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 1?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(pNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17), pNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, pNode):pNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 0 && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$removeChild__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(pNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, pNode);
      otherChildList = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, arr.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(arr.java_util_ArrayList_array[1], 48)).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
      otherEnd = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(otherChildList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(otherChildList.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value, 17)).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
      if (otherEnd) {
        for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(otherChildList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, arr.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(arr.java_util_ArrayList_array[0], 17)), end);
        }
      }
       else {
        java_util_Collections_reverse__Ljava_util_List_2V(otherChildList);
        for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(otherChildList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
          node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(node, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, arr.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(arr.java_util_ArrayList_array[0], 17)), end);
        }
      }
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(1, arr.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(arr.java_util_ArrayList_array[1], 48)), null, true);
      isRoot?(returnNode = null):(returnNode = this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent);
    }
  }
  return returnNode;
}
;
_.toString__Ljava_lang_String_2$ = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_toString__Ljava_lang_String_2(){
  var s;
  s = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$toString__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_String_2(this);
  return s + ' ML: ' + this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_mlValue;
}
;
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_mlValue = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PNode', 64);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$aMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2Z(this$static, n, nChild, t1LLValue, t1, allObjects){
  var childObjectSet, mergableSet, p, pNew, rc;
  rc = false;
  if (n.getType__I() == 1) {
    p = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n, 64);
    if (p.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_mlValue < t1LLValue) {
      childObjectSet = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getChildObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_util_Set_2(n);
      mergableSet = new java_util_HashSet_HashSet__Ljava_util_Collection_2V(allObjects);
      if (mergableSet.containsAll__Ljava_util_Collection_2Z(childObjectSet) || allObjects.size__I() == 1) {
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, n, true);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
      }
       else {
        pNew = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(n, n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(nChild, pNew, true);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, pNew, true);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
      }
      rc = true;
    }
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$addRule__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2Z(this$static, ruleObjectSet){
  var iter, n, node, priorityQSize, priorityQueue, processedNodes, rc, ret;
  rc = true;
  processedNodes = new java_util_HashSet_HashSet__V;
  priorityQueue = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_PriorityQueue__ILjava_util_Comparator_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList.java_util_LinkedList_size, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_PQTreeNodeLevelComparator__V);
  if ((new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap)).containsAll__Ljava_util_Collection_2Z(ruleObjectSet)) {
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$updateLevelInfo__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static);
    priorityQSize = 0;
    for (iter = ruleObjectSet.iterator__Ljava_util_Iterator_2(); iter.hasNext__Z();) {
      node = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(iter.next__Ljava_lang_Object_2()), 17);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$add__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2V(priorityQueue, node);
      ++priorityQSize;
    }
    while (priorityQueue.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length != 0) {
      n = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$removeMin__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2(priorityQueue), 17);
      --priorityQSize;
      ret = n.process__ZLlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2(priorityQSize == 0);
      if (!!ret && !processedNodes.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(ret)) {
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$add__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2V(priorityQueue, ret);
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(processedNodes, ret);
        ++priorityQSize;
      }
    }
  }
   else {
    rc = false;
  }
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$cleanUp__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static);
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$addToCNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(this$static, c){
  var cNode, cNode$iterator;
  for (cNode$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(c, 0); cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != cNode$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
    cNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != cNode$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , cNode$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(cNode$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 43));
    java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, cNode);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value, cNode);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$bMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, nChild, t1LLValue, t1){
  var index_0, l, newQ, oldMLValue, q, q1, rc;
  rc = false;
  if (n.getType__I() == 2) {
    q = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n, 48);
    l = q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList;
    index_0 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(l, nChild);
    if (index_0 == 0 && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, 0) < t1LLValue) {
      oldMLValue = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, 0);
      newQ = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this$static);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(newQ, n, nChild);
      newQ.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > 0?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(newQ.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, 0, new java_lang_Integer_Integer__IV(oldMLValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newQ.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(oldMLValue));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(nChild, newQ, true);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, newQ, true);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
      rc = true;
    }
     else if (index_0 == l.java_util_LinkedList_size - 1 && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0 - 1) < t1LLValue) {
      oldMLValue = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0 - 1);
      q1 = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this$static);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(q1, n, nChild);
      q1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > 0?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(q1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, 0, new java_lang_Integer_Integer__IV(oldMLValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(q1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(oldMLValue));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(nChild, q1, true);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, q1, true);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
      rc = true;
    }
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$cMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, nChild, t1LLValue, t1){
  var index_0, l, mlfirstValue, mlsecondValue, newQ, q, rc;
  rc = false;
  if (n.getType__I() == 2) {
    q = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n, 48);
    l = q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList;
    index_0 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(l, nChild);
    if (index_0 != 0 && index_0 != l.java_util_LinkedList_size && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0 - 1) < t1LLValue && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0) < t1LLValue) {
      newQ = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this$static);
      mlfirstValue = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0 - 1);
      mlsecondValue = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(newQ, n, nChild);
      newQ.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > 0?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(newQ.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, 0, new java_lang_Integer_Integer__IV(mlfirstValue > mlsecondValue?mlfirstValue:mlsecondValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(newQ.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(mlfirstValue > mlsecondValue?mlfirstValue:mlsecondValue));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(nChild, newQ, true);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, newQ, true);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
      rc = true;
    }
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$cleanUp__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static){
  var node, queue;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root);
  while (queue.java_util_LinkedList_size != 0) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    node.setEmpty__V();
    node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_visited = false;
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$copy__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static, sourceObject){
  var copyMap, newNode, node, o, o$iterator, queue, toRoot;
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root = null;
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList = new java_util_LinkedList_LinkedList__V;
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.clear__V();
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet.java_util_HashSet_map.clear__V();
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue = sourceObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, sourceObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root);
  toRoot = true;
  copyMap = new java_util_HashMap_HashMap__V;
  while (queue.java_util_LinkedList_size != 0) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    newNode = null;
    if (node.getType__I() == 2) {
      newNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(copyMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent), 17), this$static);
    }
     else if (node.getType__I() == 1) {
      newNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(copyMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent), 17), this$static);
    }
     else if (node.getType__I() == 3) {
      newNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(copyMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent), 17), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node, 43).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value, this$static);
      this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node, 43).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newNode, 43));
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(newNode, 43));
    }
    copyMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(node, newNode);
    toRoot && (this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root = newNode);
    toRoot = false;
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
  }
  for (o$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(sourceObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet.java_util_HashSet_map)); o$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
    o = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(o$iterator), 17);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(copyMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 17));
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$dMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, nChild, t1LLValue, t1){
  var index_0, l, mlfirstValue, mlsecondValue, q, rc;
  rc = false;
  if (n.getType__I() == 2) {
    q = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n, 48);
    l = q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList;
    index_0 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(l, nChild);
    if (index_0 != 0 && index_0 != l.java_util_LinkedList_size && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0 - 1) < t1LLValue && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0) <= t1LLValue) {
      mlfirstValue = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0 - 1);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, n, index_0);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
      q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0, new java_lang_Integer_Integer__IV(mlfirstValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(mlfirstValue));
      q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0 + 1?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0 + 1, new java_lang_Integer_Integer__IV(mlfirstValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(mlfirstValue));
      q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0 + 1 + 1 && java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0 + 1 + 1);
      rc = true;
    }
     else if (index_0 != 0 && index_0 != l.java_util_LinkedList_size && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0 - 1) <= t1LLValue && lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0) < t1LLValue) {
      mlsecondValue = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(q, index_0);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, n, index_0 + 1);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
      q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0, new java_lang_Integer_Integer__IV(mlsecondValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(mlsecondValue));
      q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0 + 1?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0 + 1, new java_lang_Integer_Integer__IV(mlsecondValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(mlsecondValue));
      q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0 + 1 + 1 && java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0 + 1 + 1);
      rc = true;
    }
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$eMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, t1){
  var q, rc;
  rc = false;
  if (!n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent) {
    q = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this$static);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(n, q, true);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root = q;
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, q, true);
    q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > 0?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, 0, new java_lang_Integer_Integer__IV(0)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(0));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1, this$static);
    rc = true;
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getChildObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_util_Set_2(node){
  var n, queue, returnSet;
  returnSet = new java_util_HashSet_HashSet__V;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, node, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
  while (queue.java_util_LinkedList_size != 0) {
    n = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    n.getType__I() == 3 && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(returnSet, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n, 43).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value);
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
  }
  return returnSet;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2Ljava_util_LinkedList_2(this$static, sequenceRulesList){
  var cNode, cNode$iterator, child, child$iterator, childList, cnt, copiedList, i, iter, node, orderQueue, resultList, ret, returnList, s, s$iterator, stack_0, visitedNodeSet;
  if (!!sequenceRulesList && !sequenceRulesList.isEmpty__Z()) {
    orderQueue = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_PriorityQueue__ILjava_util_Comparator_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList.java_util_LinkedList_size, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_PQTreeNodeLevelComparator__V);
    for (cNode$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, 0); cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != cNode$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
      cNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != cNode$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , cNode$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++cNode$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(cNode$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 43));
      cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq = $intern_15;
      cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq = -1;
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$add__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2V(orderQueue, cNode);
    }
    cnt = 0;
    for (s$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(sequenceRulesList, 0); s$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != s$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
      s = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(s$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != s$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , s$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = s$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , s$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = s$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++s$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 56));
      for (iter = s.iterator__Ljava_util_Iterator_2(); iter.hasNext__Z();) {
        cNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(iter.next__Ljava_lang_Object_2()), 43);
        if (cNode) {
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(cNode, java_lang_Math_min__III(cnt, cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq));
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setMaxSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(cNode, java_lang_Math_max__III(cnt, cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq));
        }
      }
      ++cnt;
    }
    visitedNodeSet = new java_util_HashSet_HashSet__V;
    while (orderQueue.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length != 0) {
      node = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$removeMin__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2(orderQueue), 17);
      ret = node.getMaxMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2();
      if (!!ret && !visitedNodeSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(ret)) {
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$add__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2V(orderQueue, ret);
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(visitedNodeSet, ret);
      }
    }
  }
  resultList = new java_util_LinkedList_LinkedList__V;
  stack_0 = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(stack_0, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root);
  while (stack_0.java_util_LinkedList_size != 0) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(stack_0.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(stack_0, stack_0.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    if (node.getType__I() == 3) {
      java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(resultList, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node, 43));
    }
     else {
      childList = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
      java_util_Collections_reverse__Ljava_util_List_2V(childList);
      for (child$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(childList, 0); child$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != child$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
        child = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(child$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != child$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , child$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = child$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , child$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = child$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++child$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(child$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
        java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(stack_0, child, stack_0.java_util_LinkedList_header, stack_0.java_util_LinkedList_header.java_util_LinkedList$Node_next);
      }
    }
  }
  copiedList = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(resultList);
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_Sort_$sort__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_Sort_2Ljava_util_List_2Ljava_util_Comparator_2V(resultList, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_PQTreeNodeStableComparator__Ljava_util_Set_2Ljava_util_List_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet, copiedList));
  returnList = new java_util_LinkedList_LinkedList__V;
  for (i = 0; i < resultList.java_util_LinkedList_size; i++) {
    node = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(resultList, i), 43);
    java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(returnList, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value);
  }
  return returnList;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2(this$static){
  var node, node$iterator, retList;
  retList = new java_util_ArrayList_ArrayList__IV(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList.java_util_LinkedList_size);
  for (node$iterator = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, 0); node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode != node$iterator.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode , node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode = node$iterator.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++node$iterator.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node$iterator.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 43));
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(retList, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value);
  }
  return retList;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$insert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_lang_Object_2Ljava_util_List_2V(this$static, t1, o, allObjects){
  var merged, n, nChild, t1LLValue;
  n = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 17);
  if (!n) {
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V('Can not merge trees');
  }
  t1LLValue = t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue;
  do {
    nChild = n;
    n = n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
    merged = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$aMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2Z(this$static, n, nChild, t1LLValue, t1, allObjects) || lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$bMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, nChild, t1LLValue, t1) || lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$cMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, nChild, t1LLValue, t1) || lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$dMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ILlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, nChild, t1LLValue, t1) || lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$eMergeCondition__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Z(this$static, n, t1);
  }
   while (!merged);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$isInvisibleNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Z(this$static, node){
  return node.getType__I() == 3 && java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_invisibleNodeSet, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node, 43));
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$remove__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(this$static, U){
  var cNode, curNode, ob, ob$iterator, parent_0;
  for (ob$iterator = U.iterator__Ljava_util_Iterator_2(); ob$iterator.hasNext__Z();) {
    ob = ob$iterator.next__Ljava_lang_Object_2();
    cNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(ob), 43);
    if (!!cNode && com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(ob)) {
      curNode = cNode;
      this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList.remove__Ljava_lang_Object_2Z(cNode);
      do {
        parent_0 = curNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(curNode, null, true);
        curNode = parent_0;
      }
       while (!!parent_0 && parent_0.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 0);
    }
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$removeUnnecessary__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static){
  var child, node, parent_0, queue;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root);
  while (queue.java_util_LinkedList_size != 0) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    if (!!node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent && node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == 1) {
      parent_0 = node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
      child = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, 0), 17);
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(queue, child, queue.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, queue.java_util_LinkedList_tail);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(child, parent_0, node);
      node = child;
    }
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replace__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_lang_Object_2Ljava_lang_Object_2V(this$static, existingObject, newObject){
  var cNode, continueHang, newCNode, newParent, parent_0;
  cNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(existingObject), 43);
  continueHang = java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet, cNode);
  if (!!cNode && com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(existingObject)) {
    newParent = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this$static);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(newParent, cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, cNode);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(cNode, newParent, true);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, cNode);
    cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value = newObject;
  }
   else if (!!cNode && com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value) !== com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(existingObject)) {
    parent_0 = cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
    if (parent_0.getType__I() == 1) {
      newCNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(parent_0, newObject, this$static);
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, newCNode);
      this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, newCNode);
      cNode = newCNode;
    }
     else if (parent_0.getType__I() == 2) {
      newParent = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this$static);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(newParent, parent_0, cNode);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(cNode, newParent, true);
      newCNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(newParent, newObject, this$static);
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, newCNode);
      this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, newCNode);
      cNode = newCNode;
    }
  }
  continueHang && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet, cNode);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_LinkedList_2Ljava_lang_Object_2V(this$static, replaceNodeList, newObject){
  var another, bestLevel, bestNode, bestO, cNode, cNode1, cNode1Parent, cNode2, cNode2Parent, cNodeTmp, chList, cnt, fParent, i, ind1, ind2, it, newCNode, origObject, place1, place2, sParent, stright;
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$removeUnnecessary__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static);
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$updateLevelInfo__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static);
  if (replaceNodeList.java_util_LinkedList_size > 2) {
    cnt = 0;
    bestLevel = 100000000;
    bestO = 0;
    another = 1;
    stright = false;
    for (it = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(replaceNodeList, 0); it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail; cnt++) {
      origObject = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , it.java_util_LinkedList$ListIteratorImpl_lastNode = it.java_util_LinkedList$ListIteratorImpl_currentNode , it.java_util_LinkedList$ListIteratorImpl_currentNode = it.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++it.java_util_LinkedList$ListIteratorImpl_currentIndex , it.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value);
      cNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(origObject), 43);
      if (bestLevel > cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level || bestLevel == cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level && !stright) {
        bestO = cnt;
        bestLevel = java_lang_Math_min__III(bestLevel, cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level);
        stright = com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value) === com_google_gwt_lang_Cast_maskUndefined__Ljava_lang_Object_2Ljava_lang_Object_2(origObject);
      }
    }
    if (stright) {
      cNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(replaceNodeList, bestO)), 43);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replace__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_lang_Object_2Ljava_lang_Object_2V(this$static, cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value, newObject);
    }
     else {
      bestO == 1 && (another = 0);
      new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, newObject, this$static);
      fParent = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(replaceNodeList, another)), 17);
      sParent = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(replaceNodeList, bestO)), 17);
      bestNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(sParent, 43);
      while (fParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level != sParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level) {
        fParent = fParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
      }
      while (fParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent != sParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent) {
        fParent = fParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
        sParent = sParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
      }
      ind1 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(fParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, fParent);
      ind2 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(fParent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, sParent);
      i = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(bestNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, bestNode);
      newCNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, newObject, this$static);
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, newCNode);
      this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, newCNode);
      ind1 < ind2?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(newCNode, bestNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, i):bestNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size == i + 1?lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2ZV(newCNode, bestNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, true):lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(newCNode, bestNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, i + 1);
    }
  }
   else {
    cNode1 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(replaceNodeList.java_util_LinkedList_size != 0) , replaceNodeList.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value)), 43);
    cNode2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(replaceNodeList.java_util_LinkedList_size != 0) , replaceNodeList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev.java_util_LinkedList$Node_value)), 43);
    if (cNode1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent == cNode2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent) {
      chList = cNode1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList;
      place1 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(chList, cNode1);
      place2 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(chList, cNode2);
      newCNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, newObject, this$static);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(newCNode, cNode1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, ~~((place1 + place2 + 1) / 2));
      this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, newCNode);
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, newCNode);
    }
     else {
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$updateLevelInfo__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static);
      if (cNode1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level < cNode2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level) {
        cNodeTmp = cNode1;
        cNode1 = cNode2;
        cNode2 = cNodeTmp;
      }
      cNode1Parent = cNode1;
      while (cNode1Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level != cNode2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level) {
        cNode1Parent = cNode1Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
      }
      cNode2Parent = cNode2;
      while (cNode2Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent != cNode1Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent) {
        cNode1Parent = cNode1Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
        cNode2Parent = cNode2Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
      }
      if (cNode2Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.getType__I() != 2) {
        newCNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(cNode2Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, newObject, this$static);
        java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, newCNode);
        this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, newCNode);
      }
       else {
        place1 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(cNode1Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, cNode1Parent);
        place2 = java_util_AbstractList_$indexOf__Ljava_util_AbstractList_2Ljava_lang_Object_2I(cNode2Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, cNode2Parent);
        newCNode = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, newObject, this$static);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(newCNode, cNode1Parent.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent, ~~((place1 + place2 + 1) / 2));
        this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, newCNode);
        java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, newCNode);
      }
    }
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static, tree){
  var node, queue;
  queue = new java_util_LinkedList_LinkedList__V;
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$addToCNodeList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(tree, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList);
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root);
  while (queue.java_util_LinkedList_size != 0) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_tree = tree;
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setHangingNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Set_2V(this$static, hangingNodeSet){
  var cNode, o, o$iterator;
  for (o$iterator = hangingNodeSet.iterator__Ljava_util_Iterator_2(); o$iterator.hasNext__Z();) {
    o = o$iterator.next__Ljava_lang_Object_2();
    cNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 43);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet, cNode);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setInvisibleNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Set_2V(this$static, s){
  var cNode, iter, o;
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_invisibleNodeSet.java_util_HashSet_map.clear__V();
  if (this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList.java_util_LinkedList_size < s.size__I()) {
    iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, 0);
    for (; iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail;) {
      cNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 43));
      s.contains__Ljava_lang_Object_2Z(cNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_value) && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_invisibleNodeSet, cNode);
    }
  }
   else {
    iter = s.iterator__Ljava_util_Iterator_2();
    for (; iter.hasNext__Z();) {
      o = iter.next__Ljava_lang_Object_2();
      if (this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.containsKey__Ljava_lang_Object_2Z(o)) {
        cNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 43);
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_invisibleNodeSet, cNode);
      }
    }
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setUserObject__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(this$static, userObject){
  if (this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject) {
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V('User object allready in use.');
  }
   else {
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = userObject;
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$updateLevelInfo__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static){
  var levelCapacity, levelIndex, node, queue;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root);
  levelIndex = 0;
  levelCapacity = 1;
  while (queue.java_util_LinkedList_size != 0) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level = levelIndex;
    --levelCapacity;
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
    if (levelCapacity == 0) {
      ++levelIndex;
      levelCapacity = queue.java_util_LinkedList_size;
    }
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_PQTree__V(){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList = new java_util_LinkedList_LinkedList__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_invisibleNodeSet = new java_util_HashSet_HashSet__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet = new java_util_HashSet_HashSet__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap = new java_util_HashMap_HashMap__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue = -1;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = null;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_PQTree__Ljava_util_Collection_2V(U){
  var c, i, iter, p;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList = new java_util_LinkedList_LinkedList__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_invisibleNodeSet = new java_util_HashSet_HashSet__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_hangingNodeSet = new java_util_HashSet_HashSet__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap = new java_util_HashMap_HashMap__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue = -1;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = null;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(null, this);
  p = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_PNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root, this);
  iter = U.iterator__Ljava_util_Iterator_2();
  while (iter.hasNext__Z()) {
    i = iter.next__Ljava_lang_Object_2();
    c = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_CNode_CNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_lang_Object_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(p, i, this);
    java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList, c);
    this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_ObjectToCNodeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(i, c);
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(33, 1, {33:1}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_PQTree__V, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_PQTree__Ljava_util_Collection_2V);
_.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTree_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTree', 33);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2I(t1, t2){
  var rc;
  rc = 0;
  t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue < t2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue?(rc = -1):t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue > t2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue && (rc = 1);
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_PQTreeLLComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(180, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_PQTreeLLComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(t1, t2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t1, 33), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t2, 33));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTreeLLComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTreeLLComparator', 180);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$addRule__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Collection_2V(this$static, ruleObjectSet){
  var it, o, tree;
  it = ruleObjectSet.iterator__Ljava_util_Iterator_2();
  if (it.hasNext__Z()) {
    o = it.next__Ljava_lang_Object_2();
    tree = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 33);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$addRule__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2Z(tree, ruleObjectSet);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$addTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_lang_Object_2IV(this$static, o, LLValue){
  var tree;
  tree = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_PQTree__Ljava_util_Collection_2V(new java_util_Collections$SingletonList_Collections$SingletonList__Ljava_lang_Object_2V(o));
  tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_llValue = LLValue;
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(o, tree);
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array, this$static.java_util_ArrayList_array.length, tree);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$addTree__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static, tree){
  com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array, this$static.java_util_ArrayList_array.length, tree);
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$putTreeObjectsInMap__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static, tree);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$calculateMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2I(s){
  var edge, it, minLevel, n, node, o, queue, rc, visiteNodeSet;
  queue = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_PriorityQueue__ILjava_util_Comparator_2V(s.java_util_HashSet_map.size__I(), new lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNodeLevelComparator_LayeredNodeLevelComparator__V);
  o = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(s.toArray___3Ljava_lang_Object_2()[0], 61);
  rc = o.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber;
  visiteNodeSet = new java_util_HashSet_HashSet__V;
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(visiteNodeSet, o);
  minLevel = rc;
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$add__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2V(queue, o);
  s.java_util_HashSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(o) != null;
  while (s.java_util_HashSet_map.size__I() != 0 && queue.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length != 0) {
    node = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$removeMin__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2(queue), 61);
    rc = java_lang_Math_min__III(rc, node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber);
    s.java_util_HashSet_map.remove__Ljava_lang_Object_2Ljava_lang_Object_2(node) != null;
    it = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_incEdgeList);
    while (it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I()) {
      edge = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = it.java_util_AbstractList$IteratorImpl_i++), 68));
      n = lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_$getOtherNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredEdge_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_2(edge, node);
      if (n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_levelNumber <= minLevel && !visiteNodeSet.java_util_HashSet_map.containsKey__Ljava_lang_Object_2Z(n)) {
        java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(visiteNodeSet, n);
        lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$add__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2V(queue, n);
      }
    }
  }
  s.java_util_HashSet_map.size__I() == 0 || (rc = 0);
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$calculateMLValues__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(tree){
  var c, chList, curSet, it, n, p, prevSet, q, queue, s;
  queue = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root);
  while (queue.java_util_LinkedList_size != 0) {
    n = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 17));
    if (n.getType__I() == 1) {
      p = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n, 64);
      s = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getChildObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_util_Set_2(p);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_$setMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PNode_2IV(p, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$calculateMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2I(s));
    }
     else if (n.getType__I() == 2) {
      q = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n, 48);
      q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
      chList = q.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList;
      curSet = null;
      it = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(chList, 0);
      c = 0;
      while (it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) {
        prevSet = curSet;
        curSet = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getChildObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Ljava_util_Set_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , it.java_util_LinkedList$ListIteratorImpl_lastNode = it.java_util_LinkedList$ListIteratorImpl_currentNode , it.java_util_LinkedList$ListIteratorImpl_currentNode = it.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++it.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17)));
        if (prevSet) {
          s = new java_util_HashSet_HashSet__Ljava_util_Collection_2V(curSet);
          s.addAll__Ljava_util_Collection_2Z(prevSet);
          lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$setMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2IIZV(q, c, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$calculateMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2I(s), true);
        }
        ++c;
      }
    }
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(queue, n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$checkValidity__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Z(this$static){
  var k, objList, rc, tree;
  rc = true;
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    objList = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2(tree);
    rc = rc & (new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap)).containsAll__Ljava_util_Collection_2Z(objList);
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$clearUserObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V(this$static){
  var k, tree;
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = null;
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$copy__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V(this$static, originallist){
  var newTree, tree, treeIter;
  treeIter = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(originallist);
  while (treeIter.java_util_AbstractList$IteratorImpl_i < treeIter.java_util_AbstractList$IteratorImpl_this$01.size__I()) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(treeIter.java_util_AbstractList$IteratorImpl_i < treeIter.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(treeIter.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(treeIter.java_util_AbstractList$IteratorImpl_last = treeIter.java_util_AbstractList$IteratorImpl_i++), 33));
    newTree = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_PQTree__V;
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$copy__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(newTree, tree);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$putTreeObjectsInMap__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static, newTree);
    com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array, this$static.java_util_ArrayList_array.length, newTree);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$getList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2Ljava_util_LinkedList_2(this$static, sequenceRulesList){
  var index1, it, k, k0, k1, lists, placeComparator, placeFound, returnList, tree;
  returnList = new java_util_LinkedList_LinkedList__V;
  if (!sequenceRulesList) {
    for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
      tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
      java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(returnList, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2Ljava_util_LinkedList_2(tree, null));
    }
  }
   else {
    lists = new java_util_ArrayList_ArrayList__V;
    for (k0 = 0; k0 < this$static.java_util_ArrayList_array.length; k0++) {
      tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k0], 33));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2Ljava_util_LinkedList_2(tree, sequenceRulesList);
    }
    java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(this$static, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_PQTreeList$1__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V);
    for (k1 = 0; k1 < this$static.java_util_ArrayList_array.length; k1++) {
      tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k1, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k1], 33));
      java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(lists, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2Ljava_util_LinkedList_2(tree, null));
    }
    java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(returnList, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(0, lists.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lists.java_util_ArrayList_array[0], 30)));
    placeComparator = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_ObjectSeqComparator__Ljava_util_List_2V(sequenceRulesList);
    for (k = 1; k < this$static.java_util_ArrayList_array.length; k++) {
      it = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(returnList, 0);
      placeFound = false;
      index1 = -1;
      while (it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail && !placeFound) {
        placeFound = 1 == lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_ObjectSeqComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(placeComparator, (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , it.java_util_LinkedList$ListIteratorImpl_lastNode = it.java_util_LinkedList$ListIteratorImpl_currentNode , it.java_util_LinkedList$ListIteratorImpl_currentNode = it.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++it.java_util_LinkedList$ListIteratorImpl_currentIndex , it.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value), java_util_LinkedList_$getFirst__Ljava_util_LinkedList_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, lists.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lists.java_util_ArrayList_array[k], 19))));
        ++index1;
      }
      placeFound?java_util_AbstractSequentialList_$addAll__Ljava_util_AbstractSequentialList_2ILjava_util_Collection_2Z(returnList, index1, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, lists.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lists.java_util_ArrayList_array[k], 30))):java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(returnList, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, lists.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(lists.java_util_ArrayList_array[k], 30)));
    }
  }
  return returnList;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$merge__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2V(this$static, list){
  var involvedTreeList, it, iter, k, o, obj, t1, t2, t2ObjList, tree, treeSet;
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setUserObject__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(tree, new java_util_LinkedList_LinkedList__V);
  }
  iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(list, 0);
  treeSet = new java_util_LinkedHashSet_LinkedHashSet__V;
  while (iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) {
    obj = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value);
    tree = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(obj), 33);
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject.add__Ljava_lang_Object_2Z(obj);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(treeSet, tree);
  }
  involvedTreeList = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(treeSet);
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(involvedTreeList, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_PQTreeLLComparator__V);
  if (involvedTreeList.java_util_LinkedList_size > 1) {
    t1 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(involvedTreeList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(involvedTreeList, involvedTreeList.java_util_LinkedList_header.java_util_LinkedList$Node_next), 33));
    o = java_util_AbstractSequentialList_$get__Ljava_util_AbstractSequentialList_2ILjava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject, 19), 0);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$addRule__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2Z(t1, t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$calculateMLValues__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t1);
    while (involvedTreeList.java_util_LinkedList_size != 0) {
      t2 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(involvedTreeList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(involvedTreeList, involvedTreeList.java_util_LinkedList_header.java_util_LinkedList$Node_next), 33));
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$addRule__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2Z(t2, t2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject);
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$calculateMLValues__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(t2);
      t2ObjList = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2(t2);
      for (it = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(t2ObjList); it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_AbstractList$IteratorImpl_i < it.java_util_AbstractList$IteratorImpl_this$01.size__I()) , it.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(it.java_util_AbstractList$IteratorImpl_last = it.java_util_AbstractList$IteratorImpl_i++)), t1);
      }
      lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$insert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_lang_Object_2Ljava_util_List_2V(t1, t2, o, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject, 69));
      java_util_ArrayList_$remove__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static, t2);
    }
  }
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$clearUserObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V(this$static);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2ZV(check){
  if (!check) {
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V($intern_80);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$putTreeObjectsInMap__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(this$static, tree){
  var objectsIter;
  objectsIter = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$getObjects__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_List_2(tree));
  while (objectsIter.java_util_AbstractList$IteratorImpl_i < objectsIter.java_util_AbstractList$IteratorImpl_this$01.size__I()) {
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(objectsIter.java_util_AbstractList$IteratorImpl_i < objectsIter.java_util_AbstractList$IteratorImpl_this$01.size__I()) , objectsIter.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(objectsIter.java_util_AbstractList$IteratorImpl_last = objectsIter.java_util_AbstractList$IteratorImpl_i++)), tree);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeEmptyTrees__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V(this$static){
  var k, removableTreeSet;
  removableTreeSet = new java_util_HashSet_HashSet__V;
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33)).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList.isEmpty__Z() && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(removableTreeSet, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33)));
  }
  java_util_AbstractCollection_$removeAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this$static, removableTreeSet);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeNodes__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Collection_2V(this$static, c){
  var iter, k, k0, o, t, tree;
  for (k0 = 0; k0 < this$static.java_util_ArrayList_array.length; k0++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k0], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setUserObject__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(tree, new java_util_LinkedList_LinkedList__V);
  }
  iter = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(c);
  while (iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I()) {
    o = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_AbstractList$IteratorImpl_i < iter.java_util_AbstractList$IteratorImpl_this$01.size__I()) , iter.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(iter.java_util_AbstractList$IteratorImpl_last = iter.java_util_AbstractList$IteratorImpl_i++));
    t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 33);
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.remove__Ljava_lang_Object_2Ljava_lang_Object_2(o);
    t.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject.add__Ljava_lang_Object_2Z(o);
  }
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$remove__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(tree, tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject);
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = null;
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$removeUnnecessary__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V(this$static){
  var k;
  for (k = this$static.java_util_ArrayList_array.length - 1; k >= 0; k--) {
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$removeUnnecessary__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V((com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33)));
    (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33)).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_CNodeList.isEmpty__Z() && java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static, k);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$replace__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_lang_Object_2Ljava_lang_Object_2V(this$static, existingObject, newObject){
  var tree;
  existingObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_isDummy && '[' + (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(existingObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_inEdgeList, 0), 68) , null).nullMethod().nullMethod() + ', ' + (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(existingObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_inEdgeList, 0), 68) , null).nullMethod().nullMethod() + ']';
  newObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_isDummy && '[' + (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(newObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_inEdgeList, 0), 68) , null).nullMethod().nullMethod() + ', ' + (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(newObject.lv_lumii_layoutengine_flowLayout_horizontalOrdering_LayeredNode_inEdgeList, 0), 68) , null).nullMethod().nullMethod() + ']';
  tree = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(existingObject), 33);
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(newObject, tree);
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replace__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_lang_Object_2Ljava_lang_Object_2V(tree, existingObject, newObject);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$replaceList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_List_2Ljava_lang_Object_2V(this$static, list, o){
  var involvedTreeList, iter, k, k0, obj, t1, tree, treeSet;
  for (k0 = 0; k0 < this$static.java_util_ArrayList_array.length; k0++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k0], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setUserObject__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(tree, new java_util_LinkedList_LinkedList__V);
  }
  iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(list, 0);
  treeSet = new java_util_HashSet_HashSet__V;
  while (iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) {
    obj = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value);
    tree = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(obj), 33);
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject.add__Ljava_lang_Object_2Z(obj);
    java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(treeSet, tree);
  }
  involvedTreeList = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(treeSet);
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(involvedTreeList, new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeLLComparator_PQTreeLLComparator__V);
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2ZV(involvedTreeList.java_util_LinkedList_size == 1);
  if (involvedTreeList.java_util_LinkedList_size > 0) {
    t1 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(involvedTreeList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(involvedTreeList, involvedTreeList.java_util_LinkedList_header.java_util_LinkedList$Node_next), 33));
    this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(o, t1);
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$replaceList__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_LinkedList_2Ljava_lang_Object_2V(t1, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject, 19), o);
  }
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = null;
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$setHangingNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2V(this$static, s){
  var iter, k, k0, o, tree;
  for (k0 = 0; k0 < this$static.java_util_ArrayList_array.length; k0++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k0], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setUserObject__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(tree, new java_util_HashSet_HashSet__V);
  }
  iter = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(s.java_util_HashSet_map));
  while (iter.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z()) {
    o = java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(iter);
    tree = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 33);
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject.add__Ljava_lang_Object_2Z(o);
  }
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setHangingNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Set_2V(tree, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject, 56));
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = null;
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$setInvisibleNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2Ljava_util_Set_2V(this$static, s){
  var iter, k, k0, o, tree;
  for (k0 = 0; k0 < this$static.java_util_ArrayList_array.length; k0++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k0, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k0], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setUserObject__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Collection_2V(tree, new java_util_HashSet_HashSet__V);
  }
  iter = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(s.java_util_HashSet_map));
  while (iter.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z()) {
    o = java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(iter);
    tree = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap.get__Ljava_lang_Object_2Ljava_lang_Object_2(o), 33);
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject.add__Ljava_lang_Object_2Z(o);
  }
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$setInvisibleNodeSet__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Ljava_util_Set_2V(tree, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject, 56));
    tree.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_userObject = null;
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_$updateLevelInfo__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V(this$static){
  var k, tree;
  for (k = 0; k < this$static.java_util_ArrayList_array.length; k++) {
    tree = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(k, this$static.java_util_ArrayList_array.length) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.java_util_ArrayList_array[k], 33));
    lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_$updateLevelInfo__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(tree);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_PQTreeList__V(){
  java_util_ArrayList_ArrayList__V.call(this);
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_object2TreeMap = new java_util_HashMap_HashMap__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(34, 4, {5:1, 6:1, 4:1, 30:1, 69:1, 274:1, 34:1}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_PQTreeList__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTreeList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTreeList', 34);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2I(tree1, tree2){
  var rc;
  rc = 0;
  tree1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq < tree2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq?(rc = -1):tree1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq > tree2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq?(rc = 1):tree1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq == tree2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq && (tree1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq < tree2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq?(rc = -1):tree1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq > tree2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_root.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq && (rc = 1));
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_PQTreeList$1__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(270, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_PQTreeList$1__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(tree1, tree2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeList$1_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tree1, 33), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(tree2, 33));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTreeList$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTreeList/1', 270);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(n1, n2){
  var rc;
  rc = 0;
  n1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level < n2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level?(rc = 1):n1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level > n2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_level && (rc = -1);
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_PQTreeNodeLevelComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(181, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_PQTreeNodeLevelComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(n1, n2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeLevelComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n1, 17), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(n2, 17));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTreeNodeLevelComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTreeNodeLevelComparator', 181);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(this$static, o1, o2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(this$static, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o1, 17), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o2, 17));
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(this$static, o1, o2){
  var ind1, ind2, rc;
  if (java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_newNodeSet, o1) || java_util_HashSet_$contains__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_newNodeSet, o2)) {
    rc = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2);
  }
   else {
    ind1 = java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_oldOrder, o1, 0);
    ind2 = java_util_ArrayList_$indexOf__Ljava_util_ArrayList_2Ljava_lang_Object_2II(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_oldOrder, o2, 0);
    rc = ind1 < ind2?-1:ind1 > ind2?1:0;
  }
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_PQTreeNodeStableComparator__Ljava_util_Set_2Ljava_util_List_2V(newNodeSet, oldOrder){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_internalComp = new lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_PQTreeSeqComparator__V;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_newNodeSet = newNodeSet;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_oldOrder = oldOrder;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(272, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_PQTreeNodeStableComparator__Ljava_util_Set_2Ljava_util_List_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(this, o1, o2);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTreeNodeStableComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTreeNodeStableComparator', 272);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(node1, node2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node1, 17), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(node2, 17));
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(node1, node2){
  var rc;
  rc = 0;
  node1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq < node2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq?(rc = -1):node1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq > node2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq?(rc = 1):node1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq == node2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq && node1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq < node2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq?(rc = -1):node1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq == node2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq && node1.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq > node2.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq && (rc = 1);
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_PQTreeSeqComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(182, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_PQTreeSeqComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(node1, node2){
  return lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(node1, node2);
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1PQTreeSeqComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'PQTreeSeqComparator', 182);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$getMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2II(this$static, index_0){
  var rc;
  rc = 0;
  index_0 < this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length && (rc = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0), 9).java_lang_Integer_value);
  return rc;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2ZV(check){
  if (!check) {
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V($intern_80);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$setMLValue__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2IIZV(this$static, index_0, MLValue, insert){
  this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0?java_util_ArrayList_$add__Ljava_util_ArrayList_2ILjava_lang_Object_2V(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0, new java_lang_Integer_Integer__IV(MLValue)):java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, new java_lang_Integer_Integer__IV(MLValue));
  !insert && this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues.java_util_ArrayList_array.length > index_0 + 1 && java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues, index_0 + 1);
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V(parent_0, tree){
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_PQTreeNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V.call(this, parent_0, tree);
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_mlValues = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(48, 17, {17:1, 48:1}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_QNode__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTree_2V);
_.getMaxMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_getMaxMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2(){
  var childList, endIter, firstNode, frontIter, lastNode;
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_$myAssert__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_2ZV(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList.java_util_LinkedList_size > 0);
  childList = this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList;
  endIter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(childList, childList.java_util_LinkedList_size);
  frontIter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(childList, 0);
  firstNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(frontIter.java_util_LinkedList$ListIteratorImpl_currentNode != frontIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , frontIter.java_util_LinkedList$ListIteratorImpl_lastNode = frontIter.java_util_LinkedList$ListIteratorImpl_currentNode , frontIter.java_util_LinkedList$ListIteratorImpl_currentNode = frontIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++frontIter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(frontIter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
  lastNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(endIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev != endIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_header) , endIter.java_util_LinkedList$ListIteratorImpl_lastNode = endIter.java_util_LinkedList$ListIteratorImpl_currentNode = endIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev , --endIter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endIter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
  while ((firstNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq == -1 || lastNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq == -1) && frontIter.java_util_LinkedList$ListIteratorImpl_currentNode != frontIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail && endIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev != endIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_header) {
    firstNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq == -1?(firstNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(frontIter.java_util_LinkedList$ListIteratorImpl_currentNode != frontIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , frontIter.java_util_LinkedList$ListIteratorImpl_lastNode = frontIter.java_util_LinkedList$ListIteratorImpl_currentNode , frontIter.java_util_LinkedList$ListIteratorImpl_currentNode = frontIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++frontIter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(frontIter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17))):(lastNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(endIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev != endIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_header) , endIter.java_util_LinkedList$ListIteratorImpl_lastNode = endIter.java_util_LinkedList$ListIteratorImpl_currentNode = endIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev , --endIter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(endIter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17)));
  }
  if (frontIter.java_util_LinkedList$ListIteratorImpl_currentNode == frontIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail || endIter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_prev == endIter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_header) {
    firstNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(childList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(childList.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value, 17));
    lastNode = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(childList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(childList.java_util_LinkedList_tail.java_util_LinkedList$Node_prev.java_util_LinkedList$Node_value, 17));
  }
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeSeqComparator_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(firstNode, lastNode) > 0 && java_util_Collections_reverse__Ljava_util_List_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setMinSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(this, java_lang_Math_min__III(firstNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq, lastNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_minSeq));
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setMaxSeq__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(this, java_lang_Math_max__III(firstNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq, lastNode.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_maxSeq));
  return this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
}
;
_.getType__I = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_getType__I(){
  return 2;
}
;
_.getTypeChar__C = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_getTypeChar__C(){
  return 81;
}
;
_.process__ZLlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2 = function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_QNode_process__ZLlv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2(isRoot){
  var cList, childList, full, it, iter, n, node, numberOfPertQChilds, place, returnNode;
  returnNode = null;
  lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$update__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2V(this);
  isRoot = isRoot & !this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
  if (this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full) {
    returnNode = this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent;
  }
   else {
    numberOfPertQChilds = lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$getPertQChildrenCount__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2I(this);
    if (numberOfPertQChilds < 3) {
      full = false;
      place = 0;
      cList = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
      for (iter = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(cList, 0); iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail; place++) {
        node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(iter.java_util_LinkedList$ListIteratorImpl_currentNode != iter.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , iter.java_util_LinkedList$ListIteratorImpl_lastNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode , iter.java_util_LinkedList$ListIteratorImpl_currentNode = iter.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++iter.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(iter.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
        full = full | node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
        if (node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_pertinent && com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(node, 48)) {
          java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, node, false) && java_util_AbstractCollection_$advanceToFind__Ljava_util_AbstractCollection_2Ljava_lang_Object_2ZZ(this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList, node, true);
          childList = new java_util_LinkedList_LinkedList__Ljava_util_Collection_2V(node.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_childList);
          (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(childList.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(childList.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value, 17)).lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full != full && java_util_Collections_reverse__Ljava_util_List_2V(childList);
          for (it = java_util_LinkedList_$listIterator__Ljava_util_LinkedList_2ILjava_util_ListIterator_2(childList, 0); it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail; place++) {
            n = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(it.java_util_LinkedList$ListIteratorImpl_currentNode != it.java_util_LinkedList$ListIteratorImpl_this$01.java_util_LinkedList_tail) , it.java_util_LinkedList$ListIteratorImpl_lastNode = it.java_util_LinkedList$ListIteratorImpl_currentNode , it.java_util_LinkedList$ListIteratorImpl_currentNode = it.java_util_LinkedList$ListIteratorImpl_currentNode.java_util_LinkedList$Node_next , ++it.java_util_LinkedList$ListIteratorImpl_currentIndex , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(it.java_util_LinkedList$ListIteratorImpl_lastNode.java_util_LinkedList$Node_value, 17));
            full = full | n.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_full;
            lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_$setParent__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_2IV(n, this, place);
          }
          --place;
        }
      }
      isRoot?(returnNode = null):(returnNode = this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNode_parent);
    }
  }
  return returnNode;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1pqtree_1QNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_81, 'QNode', 48);
function lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_Sort_$sort__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_Sort_2Ljava_util_List_2Ljava_util_Comparator_2V(list, c){
  var arr, arr1, arr1$iterator, i, j, o;
  arr = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(list);
  for (i = 1; i < list.java_util_LinkedList_size; i++) {
    for (j = 0; j < i; j++) {
      if (lv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_$compare__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_pqtree_PQTreeNodeStableComparator_2Ljava_lang_Object_2Ljava_lang_Object_2I(c, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, arr.java_util_ArrayList_array.length) , arr.java_util_ArrayList_array[j]), (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, arr.java_util_ArrayList_array.length) , arr.java_util_ArrayList_array[j + 1])) > 0) {
        o = (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j, arr.java_util_ArrayList_array.length) , arr.java_util_ArrayList_array[j]);
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(arr, j, (com_google_gwt_core_shared_impl_InternalPreconditions_checkElementIndex__IIV(j + 1, arr.java_util_ArrayList_array.length) , arr.java_util_ArrayList_array[j + 1]));
        java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(arr, j + 1, o);
      }
    }
  }
  java_util_LinkedList_$reset__Ljava_util_LinkedList_2V(list);
  for (arr1$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(arr); arr1$iterator.java_util_AbstractList$IteratorImpl_i < arr1$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    arr1 = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(arr1$iterator.java_util_AbstractList$IteratorImpl_i < arr1$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , arr1$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(arr1$iterator.java_util_AbstractList$IteratorImpl_last = arr1$iterator.java_util_AbstractList$IteratorImpl_i++));
    java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(list, arr1, list.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, list.java_util_LinkedList_tail);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$add__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2V(this$static, o){
  var index_0;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, o);
  index_0 = this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length - 1;
  while (index_0 > 0 && this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_comparator.compare__Ljava_lang_Object_2Ljava_lang_Object_2I(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, ~~((index_0 - 1) / 2)), o) > 0) {
    java_util_Collections_swapImpl__Ljava_util_List_2IIV(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0, ~~((index_0 - 1) / 2));
    index_0 = ~~((index_0 - 1) / 2);
  }
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_$removeMin__Llv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_2Ljava_lang_Object_2(this$static){
  var index_0, ret;
  ret = java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, 0);
  java_util_Collections_swapImpl__Ljava_util_List_2IIV(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, 0, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length - 1);
  java_util_ArrayList_$remove__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length - 1);
  index_0 = 0;
  while (index_0 * 2 + 1 < this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length && this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_comparator.compare__Ljava_lang_Object_2Ljava_lang_Object_2I(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0), java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0 * 2 + 1)) > 0 || index_0 * 2 + 2 < this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length && this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_comparator.compare__Ljava_lang_Object_2Ljava_lang_Object_2I(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0), java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0 * 2 + 2)) > 0) {
    if (index_0 * 2 + 2 < this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap.java_util_ArrayList_array.length && this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_comparator.compare__Ljava_lang_Object_2Ljava_lang_Object_2I(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0 * 2 + 1), java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0 * 2 + 2)) > 0) {
      java_util_Collections_swapImpl__Ljava_util_List_2IIV(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0, index_0 * 2 + 2);
      index_0 = index_0 * 2 + 2;
    }
     else {
      java_util_Collections_swapImpl__Ljava_util_List_2IIV(this$static.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap, index_0, index_0 * 2 + 1);
      index_0 = index_0 * 2 + 1;
    }
  }
  return ret;
}

function lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_PriorityQueue__ILjava_util_Comparator_2V(initialCapacity, comparator){
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_comparator = comparator;
  this.lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_heap = new java_util_ArrayList_ArrayList__IV(initialCapacity);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(165, 1, {}, lv_lumii_layoutengine_flowLayout_horizontalOrdering_priorityqueue_PriorityQueue_PriorityQueue__ILjava_util_Comparator_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1flowLayout_1horizontalOrdering_1priorityqueue_1PriorityQueue_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2('lv.lumii.layoutengine.flowLayout.horizontalOrdering.priorityqueue', $intern_26, 165);
function lv_lumii_layoutengine_funcmin_CycleReducer_$addConstraint__Llv_lumii_layoutengine_funcmin_CycleReducer_2IIDDV(this$static, i, j, minValue, desiredValue){
  var it;
  (minValue <= 0?0 - minValue:minValue) < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON && (minValue = 0);
  (desiredValue <= 0?0 - desiredValue:desiredValue) < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON && (desiredValue = 0);
  desiredValue < minValue && (desiredValue = minValue);
  it = lv_lumii_layoutengine_funcmin_OneWayLinkedList_$push_1back__Llv_lumii_layoutengine_funcmin_OneWayLinkedList_2Llv_lumii_layoutengine_funcmin_CycleReducer$Adj_2Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[i], new lv_lumii_layoutengine_funcmin_CycleReducer$Adj_CycleReducer$Adj__IDDV(j, -minValue, -desiredValue));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges, j), 4), new lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_CycleReducer$InAdj__ILlv_lumii_layoutengine_funcmin_CycleReducer$Adj_2V(i, it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data));
  this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x != null && this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[i] + desiredValue < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[j] && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices, java_lang_Integer_valueOf__ILjava_lang_Integer_2(i));
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$bellmanFordTarjan__Llv_lumii_layoutengine_funcmin_CycleReducer_2_3Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Z(this$static, adjacent_end){
  var it, u, v;
  while (this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices.java_util_HashSet_map.size__I() != 0) {
    u = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices.java_util_HashSet_map))), 9).java_lang_Integer_value;
    java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices, java_lang_Integer_valueOf__ILjava_lang_Integer_2(u));
    for (it = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[u].lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr); !lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$equals__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Ljava_lang_Object_2Z(it, adjacent_end[u]); it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next) {
      v = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_to;
      if (this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[u] + it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w <= this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v] - this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON) {
        if (lv_lumii_layoutengine_funcmin_CycleReducer_$formingCycle__Llv_lumii_layoutengine_funcmin_CycleReducer_2IIZ(this$static, u, v)) {
          if (!lv_lumii_layoutengine_funcmin_CycleReducer_$eliminateNegativeCycle__Llv_lumii_layoutengine_funcmin_CycleReducer_2IILlv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Z(this$static, u, v, it)) {
            return false;
          }
        }
         else {
          lv_lumii_layoutengine_funcmin_CycleReducer_$subtreeDisassembly__Llv_lumii_layoutengine_funcmin_CycleReducer_2IV(this$static, v);
          java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices, java_lang_Integer_valueOf__ILjava_lang_Integer_2(v));
          lv_lumii_layoutengine_funcmin_CycleReducer_$relax__Llv_lumii_layoutengine_funcmin_CycleReducer_2ILlv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static, u, it);
        }
      }
       else {
        it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v] - this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[u];
        it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w < it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_desiredWeight && (it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_desiredWeight);
      }
    }
  }
  return true;
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$clearSolution__Llv_lumii_layoutengine_funcmin_CycleReducer_2V(this$static){
  if (this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x != null) {
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x = null;
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 7, 1);
    java_util_Arrays_fill___3IIV(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent);
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$Adj_12_1classLit, $intern_14, 126, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 0, 1);
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 7, 1);
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices.java_util_HashSet_map.clear__V();
  }
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$collectRollbackInfo__Llv_lumii_layoutengine_funcmin_CycleReducer_2V(this$static){
  var i;
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n; i++) {
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1adjacent_1end[i] = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[i].lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr);
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1in_1edges_1size[i] = java_lang_Integer_valueOf__ILjava_lang_Integer_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges, i), 4).java_util_ArrayList_array.length);
  }
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$eliminateNegativeCycle__Llv_lumii_layoutengine_funcmin_CycleReducer_2IILlv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Z(this$static, u, v, it){
  var a, aIndex, cycleLength, cycleWeight, i, i0, i1, inc, incIndex, increment, k, w;
  cycleLength = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[u] - this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[v] + 1;
  a = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$CycleEdge_12_1classLit, $intern_14, 127, cycleLength + 1, 0, 1);
  for (i0 = 0; i0 < a.length; i0++) {
    a[i0] = new lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_CycleReducer$CycleEdge__V;
  }
  aIndex = 0;
  w = u;
  while (w != v) {
    a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge[w];
    a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge[w].lv_lumii_layoutengine_funcmin_CycleReducer$Adj_maxWeight - this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge[w].lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w;
    java_lang_Math_abs__DD(a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw) < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON && (a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw = 0);
    ++aIndex;
    w = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[w];
  }
  a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data;
  a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_maxWeight - it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w;
  java_lang_Math_abs__DD(a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw) < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON && (a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw = 0);
  ++aIndex;
  cycleWeight = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[u] + it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w - this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v];
  a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr = null;
  a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw = 0;
  java_util_Arrays_sort___3Ljava_lang_Object_2Ljava_util_Comparator_2V(a, new lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_CycleReducer$CycleEdgeComparator__V);
  inc = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$EdgeIncrement_12_1classLit, $intern_14, 155, cycleLength, 0, 1);
  for (i1 = 0; i1 < inc.length; i1++) {
    inc[i1] = new lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_CycleReducer$EdgeIncrement__V;
  }
  incIndex = 0;
  aIndex = 0;
  while (cycleWeight < 0 && a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw > 0) {
    k = 1;
    while (java_lang_Math_abs__DD(a[aIndex + k].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw - a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw) < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON) {
      ++k;
    }
    increment = a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw - a[aIndex + k].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw;
    aIndex += k;
    increment *= aIndex;
    if (cycleWeight + increment > -this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON) {
      increment = -cycleWeight;
      cycleWeight = 0;
    }
     else {
      cycleWeight += increment;
    }
    increment /= aIndex;
    inc[incIndex].lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_count = k;
    inc[incIndex].lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_increment = increment;
    ++incIndex;
  }
  if (cycleWeight < 0) {
    return false;
  }
  for (i = incIndex - 2; i >= 0; i--) {
    inc[i].lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_increment += inc[i + 1].lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_increment;
  }
  aIndex = 0;
  for (i = 0; i < incIndex; i++) {
    while (inc[i].lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_count > 0) {
      a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w += inc[i].lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_increment;
      java_lang_Math_abs__DD(a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_maxWeight - a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w) < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON && (a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w = a[aIndex].lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_adjPtr.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_maxWeight);
      ++aIndex;
      --inc[i].lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_count;
    }
  }
  lv_lumii_layoutengine_funcmin_CycleReducer_$reviseSubtree__Llv_lumii_layoutengine_funcmin_CycleReducer_2IV(this$static, v);
  return true;
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$formingCycle__Llv_lumii_layoutengine_funcmin_CycleReducer_2IIZ(this$static, u, v){
  while (u != -1 && this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[u] > this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[v]) {
    u = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[u];
  }
  return u == v;
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$getSolution__Llv_lumii_layoutengine_funcmin_CycleReducer_2_3D(this$static){
  var adjacent_end, adjacent_scc_end, i, i0, i1, i2, i3, i4, i5, it, saved_depth, saved_parent, saved_parentEdge, saved_x, scc, t, u;
  if (this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x == null) {
    scc = new java_util_LinkedList_LinkedList__V;
    adjacent_scc_end = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1OneWayLinkedList$TemporaryIterator_12_1classLit, $intern_14, 60, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 0, 1);
    lv_lumii_layoutengine_funcmin_CycleReducer_$stronglyConnectedComponents__Llv_lumii_layoutengine_funcmin_CycleReducer_2Ljava_util_LinkedList_2_3Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static, scc, adjacent_scc_end);
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 7, 1);
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices.java_util_HashSet_map.clear__V();
    while (scc.java_util_LinkedList_size != 0) {
      java_util_AbstractCollection_$addAll__Ljava_util_AbstractCollection_2Ljava_util_Collection_2Z(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(scc.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(scc.java_util_LinkedList_size != 0) , scc.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value), 30));
      if (!lv_lumii_layoutengine_funcmin_CycleReducer_$bellmanFordTarjan__Llv_lumii_layoutengine_funcmin_CycleReducer_2_3Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Z(this$static, adjacent_scc_end)) {
        lv_lumii_layoutengine_funcmin_CycleReducer_$clearSolution__Llv_lumii_layoutengine_funcmin_CycleReducer_2V(this$static);
        return null;
      }
      while (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(scc.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(scc.java_util_LinkedList_size != 0) , scc.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value), 19).java_util_LinkedList_size != 0) {
        u = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$poll__Ljava_util_LinkedList_2Ljava_lang_Object_2(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(scc.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(scc.java_util_LinkedList_size != 0) , scc.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value), 19)), 9).java_lang_Integer_value;
        for (it = adjacent_scc_end[u]; !lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$equals__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Ljava_lang_Object_2Z(it, new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[u].lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr)); it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next) {
          lv_lumii_layoutengine_funcmin_CycleReducer_$relax__Llv_lumii_layoutengine_funcmin_CycleReducer_2ILlv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static, u, it);
        }
      }
      scc.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(scc.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(scc, scc.java_util_LinkedList_header.java_util_LinkedList$Node_next));
    }
    lv_lumii_layoutengine_funcmin_CycleReducer_$collectRollbackInfo__Llv_lumii_layoutengine_funcmin_CycleReducer_2V(this$static);
    return this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x;
  }
   else {
    saved_x = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x;
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x = java_util_Arrays_copyOf___3DI_3D(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n);
    saved_parent = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent.length, 7, 1);
    for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent.length; i0++)
      saved_parent[i0] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[i0];
    saved_parentEdge = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$Adj_12_1classLit, $intern_14, 126, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge.length, 0, 1);
    for (i1 = 0; i1 < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge.length; i1++)
      saved_parentEdge[i1] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge[i1];
    saved_depth = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth.length, 7, 1);
    for (i2 = 0; i2 < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth.length; i2++)
      saved_depth[i2] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[i2];
    adjacent_end = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1OneWayLinkedList$TemporaryIterator_12_1classLit, $intern_14, 60, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 0, 1);
    for (i3 = 0; i3 < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n; i3++) {
      adjacent_end[i3] = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[i3].lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr);
    }
    if (lv_lumii_layoutengine_funcmin_CycleReducer_$bellmanFordTarjan__Llv_lumii_layoutengine_funcmin_CycleReducer_2_3Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Z(this$static, adjacent_end)) {
      lv_lumii_layoutengine_funcmin_CycleReducer_$collectRollbackInfo__Llv_lumii_layoutengine_funcmin_CycleReducer_2V(this$static);
      return this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x;
    }
     else {
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x = saved_x;
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent = saved_parent;
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge = saved_parentEdge;
      for (i4 = 0; i4 < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n; i4++) {
        com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, i4), 32).java_util_HashSet_map.clear__V();
      }
      for (i5 = 0; i5 < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n; i5++) {
        this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[i5] != -1 && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[i5]), 32), java_lang_Integer_valueOf__ILjava_lang_Integer_2(i5));
      }
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth = saved_depth;
      for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n; i++) {
        lv_lumii_layoutengine_funcmin_OneWayLinkedList_$truncate__Llv_lumii_layoutengine_funcmin_OneWayLinkedList_2Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[i], this$static.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1adjacent_1end[i]);
        t = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges, i), 4);
        if (this$static.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges.java_util_ArrayList_array.length > this$static.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1in_1edges_1size[i].java_lang_Integer_value) {
          java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges, i, new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(new java_util_AbstractList$SubList_AbstractList$SubList__Ljava_util_List_2IIV(t, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1in_1edges_1size[i].java_lang_Integer_value)));
        }
         else {
          while (com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges, i), 4).java_util_ArrayList_array.length < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1in_1edges_1size[i].java_lang_Integer_value) {
            com_google_gwt_lang_Array_setCheck__Ljava_lang_Object_2ILjava_lang_Object_2Ljava_lang_Object_2(t.java_util_ArrayList_array, t.java_util_ArrayList_array.length, null);
          }
        }
      }
      return null;
    }
  }
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$makeChild__Llv_lumii_layoutengine_funcmin_CycleReducer_2IILlv_lumii_layoutengine_funcmin_CycleReducer$Adj_2V(this$static, u, v, parentAdjPtr){
  this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[v] != -1 && java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[v]), 32), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v));
  java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, u), 32), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v));
  this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[v] = u;
  this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge[v] = parentAdjPtr;
  this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[v] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[u] + 1;
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$relax__Llv_lumii_layoutengine_funcmin_CycleReducer_2ILlv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static, u, it){
  var v;
  v = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_to;
  if (this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v] > this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[u] + it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w) {
    this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[u] + it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w;
    lv_lumii_layoutengine_funcmin_CycleReducer_$makeChild__Llv_lumii_layoutengine_funcmin_CycleReducer_2IILlv_lumii_layoutengine_funcmin_CycleReducer$Adj_2V(this$static, u, v, it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data);
  }
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$reviseSubtree__Llv_lumii_layoutengine_funcmin_CycleReducer_2IV(this$static, root){
  var min_w, q, t, t_it, t_it$iterator, u, v, v$iterator;
  q = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(q, java_lang_Integer_valueOf__ILjava_lang_Integer_2(root));
  while (q.java_util_LinkedList_size != 0) {
    u = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(q.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(q.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(q, q.java_util_LinkedList_header.java_util_LinkedList$Node_next)), 9).java_lang_Integer_value;
    for (v$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, u), 32).java_util_HashSet_map)); v$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      v = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(v$iterator), 9);
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v.java_lang_Integer_value] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[u] + this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge[v.java_lang_Integer_value].lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w;
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(q, v, q.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, q.java_util_LinkedList_tail);
    }
  }
  java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(q, java_lang_Integer_valueOf__ILjava_lang_Integer_2(root));
  while (q.java_util_LinkedList_size != 0) {
    u = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(q.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(q.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(q, q.java_util_LinkedList_header.java_util_LinkedList$Node_next)), 9).java_lang_Integer_value;
    for (v$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, u), 32).java_util_HashSet_map)); v$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      v = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(v$iterator), 9);
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[v.java_lang_Integer_value] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_depth[u] + 1;
      t = u;
      min_w = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v.java_lang_Integer_value];
      for (t_it$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges, v.java_lang_Integer_value), 4)); t_it$iterator.java_util_AbstractList$IteratorImpl_i < t_it$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
        t_it = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(t_it$iterator.java_util_AbstractList$IteratorImpl_i < t_it$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(t_it$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(t_it$iterator.java_util_AbstractList$IteratorImpl_last = t_it$iterator.java_util_AbstractList$IteratorImpl_i++), 156));
        if (this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[t_it.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_from] + t_it.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_adjPtr.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w < min_w) {
          min_w = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[t_it.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_from] + t_it.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_adjPtr.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w;
          t = t_it.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_from;
        }
      }
      min_w < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v.java_lang_Integer_value] && java_util_HashSet_$add__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices, java_lang_Integer_valueOf__ILjava_lang_Integer_2(t));
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(q, v, q.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, q.java_util_LinkedList_tail);
    }
  }
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$stronglyConnectedComponents__Llv_lumii_layoutengine_funcmin_CycleReducer_2Ljava_util_LinkedList_2_3Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static, list, adjacent_scc_end){
  var it, low, parent_0, scc_st, st, startTime, time, u, v;
  parent_0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 7, 1);
  low = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 7, 1);
  scc_st = new java_util_LinkedList_LinkedList__V;
  startTime = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n, 7, 1);
  java_util_Arrays_fill___3IIIIV(startTime, startTime.length, -1);
  time = 0;
  for (u = 0; u < this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n; u++) {
    if (startTime[u] == -1) {
      st = new java_util_LinkedList_LinkedList__V;
      it = null;
      for (;;) {
        if (startTime[u] == -1) {
          low[u] = startTime[u] = time;
          ++time;
          java_util_LinkedList_$push__Ljava_util_LinkedList_2Ljava_lang_Object_2V(scc_st, java_lang_Integer_valueOf__ILjava_lang_Integer_2(u));
          adjacent_scc_end[u] = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[u].lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr);
          it = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[u].lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr);
        }
        if (lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$equals__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Ljava_lang_Object_2Z(it, new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[u].lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr))) {
          if (low[u] == startTime[u]) {
            java_util_LinkedList_$push__Ljava_util_LinkedList_2Ljava_lang_Object_2V(list, new java_util_LinkedList_LinkedList__V);
            do {
              v = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(scc_st.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(scc_st.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(scc_st, scc_st.java_util_LinkedList_header.java_util_LinkedList$Node_next)), 9).java_lang_Integer_value;
              low[v] = this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n;
              java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(list.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(list.java_util_LinkedList_size != 0) , list.java_util_LinkedList_header.java_util_LinkedList$Node_next.java_util_LinkedList$Node_value), 19), java_lang_Integer_valueOf__ILjava_lang_Integer_2(v));
            }
             while (v != u);
          }
          if (st.java_util_LinkedList_size == 0) {
            break;
          }
          it = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(st.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(st.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(st, st.java_util_LinkedList_header.java_util_LinkedList$Node_next)), 60);
          v = u;
          u = parent_0[u];
        }
         else {
          v = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_to;
          if (startTime[v] == -1) {
            parent_0[v] = u;
            java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(st, it, st.java_util_LinkedList_header, st.java_util_LinkedList_header.java_util_LinkedList$Node_next);
            u = v;
          }
        }
        if (startTime[v] != -1) {
          low[v] < low[u] && (low[u] = low[v]);
          if (low[v] != this$static.lv_lumii_layoutengine_funcmin_CycleReducer_n) {
            if (lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$equals__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Ljava_lang_Object_2Z(it, adjacent_scc_end[u])) {
              lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$inc__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(adjacent_scc_end[u]);
              it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next;
            }
             else {
              lv_lumii_layoutengine_funcmin_OneWayLinkedList_$move_1to_1front__Llv_lumii_layoutengine_funcmin_OneWayLinkedList_2Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[u], it);
              lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$equals__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Ljava_lang_Object_2Z(adjacent_scc_end[u], new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[u].lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr)) && lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$inc__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(adjacent_scc_end[u]);
            }
          }
           else {
            it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next;
          }
        }
      }
    }
  }
}

function lv_lumii_layoutengine_funcmin_CycleReducer_$subtreeDisassembly__Llv_lumii_layoutengine_funcmin_CycleReducer_2IV(this$static, v){
  var q, u, v2, v2$iterator;
  q = new java_util_LinkedList_LinkedList__V;
  java_util_LinkedList_$addLast__Ljava_util_LinkedList_2Ljava_lang_Object_2V(q, java_lang_Integer_valueOf__ILjava_lang_Integer_2(v));
  while (q.java_util_LinkedList_size != 0) {
    u = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(q.java_util_LinkedList_size == 0?null:(com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(q.java_util_LinkedList_size != 0) , java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(q, q.java_util_LinkedList_header.java_util_LinkedList$Node_next)), 9).java_lang_Integer_value;
    for (v2$iterator = java_util_AbstractMap$1_$iterator__Ljava_util_AbstractMap$1_2Ljava_util_Iterator_2(new java_util_AbstractMap$1_AbstractMap$1__Ljava_util_AbstractMap_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, u), 32).java_util_HashSet_map)); v2$iterator.java_util_AbstractMap$1$1_val$outerIter2.hasNext__Z();) {
      v2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractMap$1$1_$next__Ljava_util_AbstractMap$1$1_2Ljava_lang_Object_2(v2$iterator), 9);
      java_util_HashSet_$remove__Ljava_util_HashSet_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices, v2);
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_parent[v2.java_lang_Integer_value] = -1;
      this$static.lv_lumii_layoutengine_funcmin_CycleReducer_x[v2.java_lang_Integer_value] = 0;
      java_util_LinkedList_$addNode__Ljava_util_LinkedList_2Ljava_lang_Object_2Ljava_util_LinkedList$Node_2Ljava_util_LinkedList$Node_2V(q, v2, q.java_util_LinkedList_tail.java_util_LinkedList$Node_prev, q.java_util_LinkedList_tail);
    }
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_CycleReducer_children, u), 32).java_util_HashSet_map.clear__V();
  }
}

function lv_lumii_layoutengine_funcmin_CycleReducer_CycleReducer__IDV(n, epsilon){
  var i;
  this.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON = epsilon;
  this.lv_lumii_layoutengine_funcmin_CycleReducer_n = n;
  this.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1OneWayLinkedList_12_1classLit, $intern_14, 154, n, 0, 1);
  this.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges = new java_util_ArrayList_ArrayList__IV(n);
  this.lv_lumii_layoutengine_funcmin_CycleReducer_activeVertices = new java_util_LinkedHashSet_LinkedHashSet__IV(n);
  this.lv_lumii_layoutengine_funcmin_CycleReducer_children = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_funcmin_CycleReducer_parent = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, n, 7, 1);
  java_util_Arrays_fill___3IIV(this.lv_lumii_layoutengine_funcmin_CycleReducer_parent);
  this.lv_lumii_layoutengine_funcmin_CycleReducer_parentEdge = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$Adj_12_1classLit, $intern_14, 126, n, 0, 1);
  for (i = 0; i < n; i++) {
    this.lv_lumii_layoutengine_funcmin_CycleReducer_adjacent[i] = new lv_lumii_layoutengine_funcmin_OneWayLinkedList_OneWayLinkedList__V;
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_funcmin_CycleReducer_in_1edges, new java_util_ArrayList_ArrayList__V);
    java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_funcmin_CycleReducer_children, new java_util_LinkedHashSet_LinkedHashSet__V);
  }
  this.lv_lumii_layoutengine_funcmin_CycleReducer_x = null;
  this.lv_lumii_layoutengine_funcmin_CycleReducer_depth = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, n, 7, 1);
  this.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1adjacent_1end = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1OneWayLinkedList$TemporaryIterator_12_1classLit, $intern_14, 60, n, 0, 1);
  this.lv_lumii_layoutengine_funcmin_CycleReducer_rollback_1in_1edges_1size = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Integer_12_1classLit, $intern_14, 9, n, 0, 1);
  lv_lumii_layoutengine_funcmin_CycleReducer_$collectRollbackInfo__Llv_lumii_layoutengine_funcmin_CycleReducer_2V(this);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(239, 1, {}, lv_lumii_layoutengine_funcmin_CycleReducer_CycleReducer__IDV);
_.lv_lumii_layoutengine_funcmin_CycleReducer_EPSILON = 0;
_.lv_lumii_layoutengine_funcmin_CycleReducer_n = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'CycleReducer', 239);
function lv_lumii_layoutengine_funcmin_CycleReducer$Adj_CycleReducer$Adj__IDDV(to, maxWeight, desiredWeight){
  this.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_to = to;
  this.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_maxWeight = maxWeight;
  this.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_desiredWeight = desiredWeight;
  this.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w = desiredWeight;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(126, 1, {126:1}, lv_lumii_layoutengine_funcmin_CycleReducer$Adj_CycleReducer$Adj__IDDV);
_.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_desiredWeight = 0;
_.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_maxWeight = 0;
_.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_to = 0;
_.lv_lumii_layoutengine_funcmin_CycleReducer$Adj_w = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$Adj_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'CycleReducer/Adj', 126);
function lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_CycleReducer$CycleEdge__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(127, 1, {127:1}, lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_CycleReducer$CycleEdge__V);
_.lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$CycleEdge_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'CycleReducer/CycleEdge', 127);
function lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_$compare__Llv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_2Llv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_2Llv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_2I(a, b){
  return java_lang_Double_compare__DDI(b.lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw, a.lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_dw);
}

function lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_CycleReducer$CycleEdgeComparator__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(240, 1, {}, lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_CycleReducer$CycleEdgeComparator__V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(a, b){
  return lv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_$compare__Llv_lumii_layoutengine_funcmin_CycleReducer$CycleEdgeComparator_2Llv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_2Llv_lumii_layoutengine_funcmin_CycleReducer$CycleEdge_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(a, 127), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 127));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$CycleEdgeComparator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'CycleReducer/CycleEdgeComparator', 240);
function lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_CycleReducer$EdgeIncrement__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(155, 1, {155:1}, lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_CycleReducer$EdgeIncrement__V);
_.lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_count = 0;
_.lv_lumii_layoutengine_funcmin_CycleReducer$EdgeIncrement_increment = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$EdgeIncrement_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'CycleReducer/EdgeIncrement', 155);
function lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_CycleReducer$InAdj__ILlv_lumii_layoutengine_funcmin_CycleReducer$Adj_2V(from, adjPtr){
  this.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_from = from;
  this.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_adjPtr = adjPtr;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(156, 1, {156:1}, lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_CycleReducer$InAdj__ILlv_lumii_layoutengine_funcmin_CycleReducer$Adj_2V);
_.lv_lumii_layoutengine_funcmin_CycleReducer$InAdj_from = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1CycleReducer$InAdj_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'CycleReducer/InAdj', 156);
function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addCombinedTerm__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, i, j, coefficient){
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i, j, coefficient));
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanConstantDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDDV(this$static, i1, j1, i2, j2, value_0, weight){
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[i1] -= weight * value_0;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[j1] -= weight * value_0;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[i2] += weight * value_0;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[j2] += weight * value_0;
  weight *= $intern_19;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i1] += weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[j1] += weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i2] += weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[j2] += weight;
  weight *= 2;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i1, j1, weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i2, j2, weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i1, i2, -weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i1, j2, -weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(j1, i2, -weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(j1, j2, -weight));
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addDoubleMeanDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIIIDV(this$static, i1, j1, i2, j2, weight){
  weight *= $intern_19;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i1] += weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[j1] += weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i2] += weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[j2] += weight;
  weight *= 2;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i1, j1, weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i2, j2, weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i1, i2, -weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i1, j2, -weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(j1, i2, -weight));
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(j1, j2, -weight));
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addEquality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, i, j, distance){
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i, j, distance));
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, i, j, distance){
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(i, j, distance, distance));
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, i, j, weight){
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[i] += -weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[j] += weight;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearTerm__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(this$static, i, coefficient){
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[i] += coefficient;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, i, j, weight){
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i] += weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[j] += weight;
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i, j, -2 * weight));
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticTerm__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(this$static, i, coefficient){
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i] += coefficient;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$createEqualityTree__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2Ljava_util_ArrayList_2V(this$static, equalities){
  var d1, d2, i, r1, r2, term, term$iterator;
  java_util_Arrays_fill___3IIV(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree);
  for (term$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(equalities); term$iterator.java_util_AbstractList$IteratorImpl_i < term$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    term = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(term$iterator.java_util_AbstractList$IteratorImpl_i < term$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(term$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(term$iterator.java_util_AbstractList$IteratorImpl_last = term$iterator.java_util_AbstractList$IteratorImpl_i++), 37));
    d2 = lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$getRootD__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2ID(this$static, term.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject);
    r2 = lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$getRoot__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2II(this$static, term.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject);
    r1 = lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$getRoot__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2II(this$static, term.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject);
    if (r1 == r2) {
      d1 = lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$getRootD__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2ID(this$static, term.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject);
      if (java_lang_Math_abs__DD(term.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight + d1 - d2) > this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon) {
        throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Funcmin: equalities cannot be satisfied');
      }
    }
     else {
      this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[r2] = term.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject;
      this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[r2] = term.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight - d2;
    }
  }
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount; i++) {
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$getRootD__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2ID(this$static, i);
  }
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$getRoot__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2II(this$static, i){
  while (this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[i] >= 0) {
    i = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[i];
  }
  return i;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$getRootD__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2ID(this$static, i){
  var d, root;
  d = 0;
  root = i;
  while (this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[root] >= 0) {
    d += this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[root];
    root = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[root];
  }
  if (i != root) {
    this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[i] = root;
    this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[i] = d;
  }
  return d;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2_3D(this$static){
  var combinedTermCoefficients, combinedTermIs, combinedTermJs, constraintIs, constraintJs, constraintMinimums, d1, d2, eN, i, i0, k, k1, kernel, resultVariables, v, v1, v2, y1, y2;
  resultVariables = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount, 7, 1);
  java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variables, 0, resultVariables, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount);
  combinedTermIs = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms.java_util_ArrayList_array.length, 7, 1);
  combinedTermJs = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms.java_util_ArrayList_array.length, 7, 1);
  combinedTermCoefficients = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms.java_util_ArrayList_array.length, 7, 1);
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms.java_util_ArrayList_array.length; i0++) {
    combinedTermIs[i0] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, i0), 37).lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject;
    combinedTermJs[i0] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, i0), 37).lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject;
    combinedTermCoefficients[i0] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, i0), 37).lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight;
  }
  constraintIs = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities.java_util_ArrayList_array.length, 7, 1);
  constraintJs = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities.java_util_ArrayList_array.length, 7, 1);
  constraintMinimums = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities.java_util_ArrayList_array.length, 7, 1);
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities.java_util_ArrayList_array.length; i++) {
    constraintIs[i] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, i), 37).lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject;
    constraintJs[i] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, i), 37).lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject;
    constraintMinimums[i] = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, i), 37).lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight;
  }
  eN = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalities.java_util_ArrayList_array.length;
  if (eN > 0) {
    this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount, 7, 1);
    this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount, 7, 1);
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$createEqualityTree__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2Ljava_util_ArrayList_2V(this$static, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalities);
    for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount; k++) {
      if ((v = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[k]) >= 0) {
        this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[v] += this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[k];
        this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[v] += this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[k] + 2 * this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[k] * this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[k];
        this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[k] = 0;
        this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[k] = 0;
      }
    }
    for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms.java_util_ArrayList_array.length; k++) {
      y1 = combinedTermIs[k];
      y2 = combinedTermJs[k];
      d1 = 0;
      d2 = 0;
      if (this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[y1] >= 0) {
        d1 = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[y1];
        y1 = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[y1];
      }
      if (this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[y2] >= 0) {
        d2 = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[y2];
        y2 = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[y2];
      }
      combinedTermIs[k] = y1;
      combinedTermJs[k] = y2;
      this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[y1] += combinedTermCoefficients[k] * d2;
      this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[y2] += combinedTermCoefficients[k] * d1;
    }
    k1 = 0;
    for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities.java_util_ArrayList_array.length; k++) {
      v1 = (v = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[constraintIs[k]]) >= 0?v:constraintIs[k];
      v2 = (v = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[constraintJs[k]]) >= 0?v:constraintJs[k];
      if (v1 != v2) {
        constraintMinimums[k1] = constraintMinimums[k] + this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[constraintIs[k]] - this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[constraintJs[k]];
        constraintIs[k1] = v1;
        constraintJs[k1] = v2;
        ++k1;
      }
    }
    this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities = new java_util_ArrayList_ArrayList__Ljava_util_Collection_2V(new java_util_AbstractList$SubList_AbstractList$SubList__Ljava_util_List_2IIV(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, 0, k1));
  }
  kernel = new lv_lumii_layoutengine_funcmin_Funcmin_Funcmin__IIIV(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities.java_util_ArrayList_array.length, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms.java_util_ArrayList_array.length);
  lv_lumii_layoutengine_funcmin_Funcmin_$Minimize__Llv_lumii_layoutengine_funcmin_Funcmin_2I_3I_3DI_3I_3I_3D_3D_3DI_3I_3I_3DDDZ_3D(kernel, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount, resultVariables, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms.java_util_ArrayList_array.length, combinedTermIs, combinedTermJs, combinedTermCoefficients, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities.java_util_ArrayList_array.length, constraintIs, constraintJs, constraintMinimums, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon, !this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_isInputCorrect);
  if (eN > 0) {
    for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount; k++) {
      v = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityTree[k];
      v >= 0 && (resultVariables[k] = resultVariables[v] + this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalityDistance[k]);
    }
  }
  return resultVariables;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setEpsilon__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2DV(this$static, epsilon){
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon = epsilon;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(this$static, i, value_0){
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variables[i] = value_0;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(variableCount){
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount = variableCount;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, variableCount, 7, 1);
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, variableCount, 7, 1);
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variables = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, variableCount, 7, 1);
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalities = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon = lv_lumii_layoutengine_funcmin_QuadraticOptimizer_DEFAULT_1EPSILON;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_isInputCorrect = false;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(89, 1, {}, lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV);
_.addQuadraticConstantDifference__IDDV = function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_addQuadraticConstantDifference__IDDV(i, value_0, weight){
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i] += weight;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[i] += -2 * weight * value_0;
}
;
_.performOptimization___3D = function lv_lumii_layoutengine_funcmin_QuadraticOptimizer_performOptimization___3D(){
  return lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2_3D(this);
}
;
_.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon = 0;
_.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_isInputCorrect = false;
_.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount = 0;
var lv_lumii_layoutengine_funcmin_QuadraticOptimizer_DEFAULT_1EPSILON = 0.001;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1QuadraticOptimizer_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'QuadraticOptimizer', 89);
function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addConstantInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IDV(this$static, i){
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, this$static.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, i, 0);
}

function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addMeanDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(this$static, i, j, value_0, weight){
  var d;
  d = weight * value_0;
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearTerm__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(this$static, this$static.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, 2 * d);
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[i] += -d;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_linearCoefficients[j] += -d;
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticTerm__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(this$static, this$static.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, weight);
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[i] += $intern_19 * weight;
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_quadraticCoefficients[j] += $intern_19 * weight;
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addCombinedTerm__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, this$static.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, i, -weight);
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addCombinedTerm__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, this$static.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, j, -weight);
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_combinedTerms, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(i, j, 0.5 * weight));
}

function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addQuadraticConstantDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IDDV(this$static, i, value_0, weight){
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addQuadraticDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, this$static.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, i, weight);
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addLinearDifference__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(this$static, i, this$static.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId, 2 * weight * value_0);
}

function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addReducibleInequality__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IIDDV(this$static, i, j, distance, minDistance){
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities, new lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(i, j, distance, minDistance));
}

function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(this$static){
  var equality, equality$iterator, i, inequality, inequality$iterator, inequality$iterator0, len, result, solver, zeroX;
  solver = new lv_lumii_layoutengine_funcmin_CycleReducer_CycleReducer__IDV(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_epsilon);
  for (inequality$iterator0 = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities); inequality$iterator0.java_util_AbstractList$IteratorImpl_i < inequality$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    inequality = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(inequality$iterator0.java_util_AbstractList$IteratorImpl_i < inequality$iterator0.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(inequality$iterator0.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(inequality$iterator0.java_util_AbstractList$IteratorImpl_last = inequality$iterator0.java_util_AbstractList$IteratorImpl_i++), 37));
    lv_lumii_layoutengine_funcmin_CycleReducer_$addConstraint__Llv_lumii_layoutengine_funcmin_CycleReducer_2IIDDV(solver, inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject, inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject, inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_minWeight, inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight);
  }
  for (equality$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_equalities); equality$iterator.java_util_AbstractList$IteratorImpl_i < equality$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    equality = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(equality$iterator.java_util_AbstractList$IteratorImpl_i < equality$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(equality$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(equality$iterator.java_util_AbstractList$IteratorImpl_last = equality$iterator.java_util_AbstractList$IteratorImpl_i++), 37));
    lv_lumii_layoutengine_funcmin_CycleReducer_$addConstraint__Llv_lumii_layoutengine_funcmin_CycleReducer_2IIDDV(solver, equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject, equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject, equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight, equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight);
    lv_lumii_layoutengine_funcmin_CycleReducer_$addConstraint__Llv_lumii_layoutengine_funcmin_CycleReducer_2IIDDV(solver, equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject, equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject, -equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight, -equality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight);
  }
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variables = lv_lumii_layoutengine_funcmin_CycleReducer_$getSolution__Llv_lumii_layoutengine_funcmin_CycleReducer_2_3D(solver);
  if (this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variables == null) {
    throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Cycle Reducer found no solution.');
  }
  for (inequality$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_inequalities); inequality$iterator.java_util_AbstractList$IteratorImpl_i < inequality$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    inequality = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(inequality$iterator.java_util_AbstractList$IteratorImpl_i < inequality$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(inequality$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(inequality$iterator.java_util_AbstractList$IteratorImpl_last = inequality$iterator.java_util_AbstractList$IteratorImpl_i++), 37));
    len = this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variables[inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject] - this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variables[inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject];
    len > inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight && (len = inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight);
    inequality.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight = len;
  }
  this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_isInputCorrect = true;
  result = lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2_3D(this$static);
  zeroX = result[this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount - 1];
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount; i++) {
    result[i] -= zeroX;
  }
  return java_util_Arrays_copyOf___3DI_3D(result, this$static.lv_lumii_layoutengine_funcmin_QuadraticOptimizer_variableCount - 1);
}

function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV(variableCount){
  lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV.call(this, variableCount + 1);
  this.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId = variableCount;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(90, 89, {}, lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_ExtendedQuadraticOptimizer__IV);
_.addQuadraticConstantDifference__IDDV = function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_addQuadraticConstantDifference__IDDV(i, value_0, weight){
  lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$addQuadraticConstantDifference__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2IDDV(this, i, value_0, weight);
}
;
_.performOptimization___3D = function lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_performOptimization___3D(){
  return lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_$performOptimization__Llv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_2_3D(this);
}
;
_.lv_lumii_layoutengine_funcmin_ExtendedQuadraticOptimizer_zeroId = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1ExtendedQuadraticOptimizer_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'ExtendedQuadraticOptimizer', 90);
function lv_lumii_layoutengine_funcmin_Funcmin_$AddFuncEdge__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, n){
  var f, i, iStart, j, jStart;
  iStart = this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaFI[n];
  jStart = this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaFJ[n];
  i = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[iStart];
  j = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[jStart];
  f = this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaF[n];
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[i] += f * this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[jStart];
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[j] += f * this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[iStart];
  if (i == j) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[i] += f;
    return;
  }
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF[this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edgecnt >> 1] = f;
  lv_lumii_layoutengine_funcmin_TGraph_$AddUndirectEdge__Llv_lumii_layoutengine_funcmin_TGraph_2IIV(this$static.lv_lumii_layoutengine_funcmin_Funcmin_func, i, j);
}

function lv_lumii_layoutengine_funcmin_Funcmin_$AddRelEdge__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, k){
  var f, i, iStart, j, jStart;
  iStart = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cI[k];
  jStart = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cJ[k];
  i = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[iStart];
  j = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[jStart];
  if (i == j) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edgecnt += 2;
    return;
  }
  f = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cL[k] + this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[iStart] - this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[jStart];
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_wcL[this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edgecnt >> 1] = f;
  lv_lumii_layoutengine_funcmin_TGraph_$AddUndirectEdge__Llv_lumii_layoutengine_funcmin_TGraph_2IIV(this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr, i, j);
}

function lv_lumii_layoutengine_funcmin_Funcmin_$CalcI0__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static){
  var i;
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; i++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[this$static.lv_lumii_layoutengine_funcmin_Funcmin_cJ[i]] - this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[this$static.lv_lumii_layoutengine_funcmin_Funcmin_cI[i]] <= this$static.lv_lumii_layoutengine_funcmin_Funcmin_cL[i] + this$static.lv_lumii_layoutengine_funcmin_Funcmin_cEps?(this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[i] = 1):(this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[i] = 0);
  }
}

function lv_lumii_layoutengine_funcmin_Funcmin_$CompDFS__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, v){
  var e, k, k1, s;
  k1 = 1;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[0] = v;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[v] = this$static.lv_lumii_layoutengine_funcmin_Funcmin_compN;
  while (k1 != 0) {
    k = this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[--k1];
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[k];
    while (e >= 0) {
      s = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
      if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[e >> 1] != 0) {
        if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[s] < 0) {
          this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[s] = this$static.lv_lumii_layoutengine_funcmin_Funcmin_compN;
          this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k1++] = s;
        }
         else {
          this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[e >> 1] = (this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[e >> 1] & 1 << (e & 1)) << 24 >> 24;
        }
      }
      e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    }
  }
}

function lv_lumii_layoutengine_funcmin_Funcmin_$Cut__Llv_lumii_layoutengine_funcmin_Funcmin_2Z(this$static){
  var endf, i, i0, i1, j, k, k0, r;
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; i0++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_vD[i0] = -2 * this$static.lv_lumii_layoutengine_funcmin_Funcmin_aF[i0] * this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[i0] - this$static.lv_lumii_layoutengine_funcmin_Funcmin_bF[i0];
  }
  for (k0 = 0; k0 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_fN; k0++) {
    i1 = this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaFI[k0];
    j = this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaFJ[k0];
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_vD[i1] -= this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaF[k0] * this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[j];
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_vD[j] -= this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaF[k0] * this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[i1];
  }
  r = new lv_lumii_layoutengine_funcmin_Rackok_Rackok__IIV(this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN);
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; i++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[i] != 0 && lv_lumii_layoutengine_funcmin_Rackok_$addArc__Llv_lumii_layoutengine_funcmin_Rackok_2IIV(r, this$static.lv_lumii_layoutengine_funcmin_Funcmin_cI[i], this$static.lv_lumii_layoutengine_funcmin_Funcmin_cJ[i]);
  }
  lv_lumii_layoutengine_funcmin_Rackok_$setWeight__Llv_lumii_layoutengine_funcmin_Rackok_2_3DV(r, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vD);
  lv_lumii_layoutengine_funcmin_Rackok_$getCut__Llv_lumii_layoutengine_funcmin_Rackok_2_3BV(r, this$static.lv_lumii_layoutengine_funcmin_Funcmin_racOut);
  endf = false;
  for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; k++) {
    if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[k] != 0) {
      if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_racOut[this$static.lv_lumii_layoutengine_funcmin_Funcmin_cI[k]] != this$static.lv_lumii_layoutengine_funcmin_Funcmin_racOut[this$static.lv_lumii_layoutengine_funcmin_Funcmin_cJ[k]]) {
        this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[k] = 0;
        endf = true;
      }
    }
  }
  return endf;
}

function lv_lumii_layoutengine_funcmin_Funcmin_$FindComp__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static){
  var i, i0, v;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_compN = 0;
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; i0++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[i0] = (this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[i0] != 0?3:0) << 24 >> 24;
  }
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; i++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[i] = -1;
  }
  for (v = 0; v < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; v++) {
    if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[v] < 0) {
      lv_lumii_layoutengine_funcmin_Funcmin_$CompDFS__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, v);
      ++this$static.lv_lumii_layoutengine_funcmin_Funcmin_compN;
    }
  }
}

function lv_lumii_layoutengine_funcmin_Funcmin_$Minimize__Llv_lumii_layoutengine_funcmin_Funcmin_2I_3I_3DI_3I_3I_3D_3D_3DI_3I_3I_3DDDZ_3D(this$static, variableCount, startValues, combinedTermCount, combinedTermIs, combinedTermJs, combinedTermCoefficients, quadraticTermCoefficients, linearTermCoefficients, constraintCount, constraintIs, constraintJs, constraintMinimums, constraintEpsilon, minimumEpsilon, performStartingValueCorrection){
  var i, i0, iter;
  if (variableCount == 0) {
    return startValues;
  }
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_Eps = minimumEpsilon;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_cEps = constraintEpsilon;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_dEps = minimumEpsilon;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN = constraintCount;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN = variableCount;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_fN = combinedTermCount;
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; i0++) {
    lv_lumii_layoutengine_funcmin_TGraph_$AddUndirectEdge__Llv_lumii_layoutengine_funcmin_TGraph_2IIV(this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr, constraintIs[i0], constraintJs[i0]);
  }
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_fN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_wcL = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_inQueue = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 8, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0 = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_B_1classLit, $intern_83, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_vD = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_racOut = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_B_1classLit, $intern_83, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_opt = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN + 1, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_comptree = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; i++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_comptree[i] = -1;
  }
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_compX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_cI = constraintIs;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_cJ = constraintJs;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_cL = constraintMinimums;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, $intern_17, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(startValues, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaFI = combinedTermIs;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaFJ = combinedTermJs;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_aaF = combinedTermCoefficients;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_aF = quadraticTermCoefficients;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_bF = linearTermCoefficients;
  performStartingValueCorrection && lv_lumii_layoutengine_funcmin_Funcmin_$ReviseVarValues__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static);
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  lv_lumii_layoutengine_funcmin_Funcmin_$CalcI0__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static);
  iter = 0;
  do {
    lv_lumii_layoutengine_funcmin_Funcmin_$ShiftAll__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static);
    ++iter;
    if (iter > this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN) {
      break;
    }
  }
   while (lv_lumii_layoutengine_funcmin_Funcmin_$Cut__Llv_lumii_layoutengine_funcmin_Funcmin_2Z(this$static));
  performStartingValueCorrection && lv_lumii_layoutengine_funcmin_Funcmin_$ReviseVarValues__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static);
  java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX, 0, startValues, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN);
  return startValues;
}

function lv_lumii_layoutengine_funcmin_Funcmin_$OptimizeFunc__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, i){
  var e, oe, prev, v;
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i];
  while (e >= 0) {
    v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_opt[v] += this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF[e >> 1];
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
  }
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i];
  prev = -1;
  while (e >= 0) {
    v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
    oe = e;
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    if (java_lang_Math_abs__DD(this$static.lv_lumii_layoutengine_funcmin_Funcmin_opt[v]) >= this$static.lv_lumii_layoutengine_funcmin_Funcmin_dEps) {
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF[oe >> 1] = this$static.lv_lumii_layoutengine_funcmin_Funcmin_opt[v];
      prev = oe;
    }
     else {
      prev >= 0?(this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[prev].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next = e):(this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i] = e);
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF[oe >> 1] = 0;
    }
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_opt[v] = 0;
  }
}

function lv_lumii_layoutengine_funcmin_Funcmin_$ReviseVarValues__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static){
  var c, e, i, i0, k, k1, k2, sk, v;
  sk = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN, 7, 1);
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; i0++) {
    sk[i0] = 0;
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; k++) {
    ++sk[this$static.lv_lumii_layoutengine_funcmin_Funcmin_cI[k]];
  }
  k1 = 0;
  k2 = 0;
  for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; k++) {
    sk[k] == 0 && (this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k2++] = k);
  }
  while (k1 < k2) {
    k = this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k1++];
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[k];
    while (e >= 0) {
      if ((e & 1) == 1) {
        v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
        --sk[v] == 0 && (this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k2++] = v);
        c = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cL[e >> 1] / 2;
        this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[v] > this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[k] - c && (this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[v] = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[k] - c);
      }
      e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    }
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; k++) {
    if (sk[k] != 0) {
      throw new java_lang_IllegalArgumentException_IllegalArgumentException__Ljava_lang_String_2V('Funcmin: graph not acyclic');
    }
  }
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; i++) {
    sk[i] = 0;
  }
  for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; k++) {
    ++sk[this$static.lv_lumii_layoutengine_funcmin_Funcmin_cJ[k]];
  }
  k1 = k2 = 0;
  for (k = 0; k < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; k++) {
    sk[k] == 0 && (this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k2++] = k);
  }
  while (k1 < k2) {
    k = this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k1++];
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[k];
    while (e >= 0) {
      if ((e & 1) == 0) {
        v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
        --sk[v] == 0 && (this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k2++] = v);
        c = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cL[e >> 1];
        this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[v] < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[k] + c && (this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[v] = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[k] + c);
      }
      e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_constr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    }
  }
}

function lv_lumii_layoutengine_funcmin_Funcmin_$Shift__Llv_lumii_layoutengine_funcmin_Funcmin_2II(this$static, i){
  var L, X, d, e, e1, j, ox, s, v;
  s = 0;
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i];
  while (e >= 0) {
    s += this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF[e >> 1] * this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode];
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
  }
  if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[i] < this$static.lv_lumii_layoutengine_funcmin_Funcmin_dEps) {
    d = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[i] + s;
    if ((d <= 0?0 - d:d) < this$static.lv_lumii_layoutengine_funcmin_Funcmin_dEps) {
      return -1;
    }
    d < 0?(X = 1.0E20):(X = -1.0E20);
  }
   else {
    X = -(this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[i] + s) / (this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[i] * 2);
  }
  ox = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[i];
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i];
  j = -1;
  e1 = 0;
  while (e >= 0) {
    v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
    L = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wcL[e >> 1];
    if ((e & 1) == 1) {
      if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[v] > X - L + this$static.lv_lumii_layoutengine_funcmin_Funcmin_cEps) {
        X = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[v] + L;
        j = v;
        e1 = e;
      }
    }
     else if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[v] < X + L - this$static.lv_lumii_layoutengine_funcmin_Funcmin_cEps) {
      X = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[v] - L;
      j = v;
      e1 = e;
    }
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
  }
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[i] = X;
  if (j >= 0) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_i0[e1 >> 1] = 1;
    lv_lumii_layoutengine_funcmin_Funcmin_$Stick__Llv_lumii_layoutengine_funcmin_Funcmin_2IIV(this$static, i, j);
    return j;
  }
  if (this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i] < 0) {
    return -1;
  }
  if ((ox - X <= 0?0 - (ox - X):ox - X) <= this$static.lv_lumii_layoutengine_funcmin_Funcmin_Eps) {
    return -1;
  }
  return i;
}

function lv_lumii_layoutengine_funcmin_Funcmin_$ShiftAll__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static){
  var c, d, e, i, i0, i1, i2, i3, i4, i5, k, k1, k2, qsize, v;
  lv_lumii_layoutengine_funcmin_Funcmin_$FindComp__Llv_lumii_layoutengine_funcmin_Funcmin_2V(this$static);
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_compN; i0++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[i0] = 0;
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[i0] = 0;
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[i0] = 0;
  }
  for (i1 = 0; i1 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; i1++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[i1]] += this$static.lv_lumii_layoutengine_funcmin_Funcmin_aF[i1];
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[i1]] += this$static.lv_lumii_layoutengine_funcmin_Funcmin_bF[i1] + 2 * this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[i1] * this$static.lv_lumii_layoutengine_funcmin_Funcmin_aF[i1];
  }
  lv_lumii_layoutengine_funcmin_TGraph_$FreeAll__Llv_lumii_layoutengine_funcmin_TGraph_2V(this$static.lv_lumii_layoutengine_funcmin_Funcmin_func);
  for (i2 = 0; i2 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_fN; i2++) {
    lv_lumii_layoutengine_funcmin_Funcmin_$AddFuncEdge__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, i2);
  }
  for (i3 = 0; i3 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_compN; i3++) {
    lv_lumii_layoutengine_funcmin_Funcmin_$OptimizeFunc__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, i3);
  }
  lv_lumii_layoutengine_funcmin_TGraph_$FreeAll__Llv_lumii_layoutengine_funcmin_TGraph_2V(this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr);
  for (i4 = 0; i4 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_cN; i4++) {
    lv_lumii_layoutengine_funcmin_Funcmin_$AddRelEdge__Llv_lumii_layoutengine_funcmin_Funcmin_2IV(this$static, i4);
  }
  qsize = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN + 1;
  k1 = 0;
  k2 = 0;
  for (i5 = 0; i5 < this$static.lv_lumii_layoutengine_funcmin_Funcmin_compN; i5++) {
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k1++] = i5;
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_inQueue[i5] = true;
  }
  while (k1 != k2) {
    k = this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k2++];
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_inQueue[k] = false;
    k2 >= qsize && (k2 = 0);
    k = lv_lumii_layoutengine_funcmin_Funcmin_$Shift__Llv_lumii_layoutengine_funcmin_Funcmin_2II(this$static, k);
    if (k >= 0) {
      if (!this$static.lv_lumii_layoutengine_funcmin_Funcmin_inQueue[k]) {
        this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k1++] = k;
        k1 >= qsize && (k1 = 0);
        this$static.lv_lumii_layoutengine_funcmin_Funcmin_inQueue[k] = true;
      }
      e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[k];
      while (e >= 0) {
        v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
        if (!this$static.lv_lumii_layoutengine_funcmin_Funcmin_inQueue[v]) {
          this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k1++] = v;
          k1 >= qsize && (k1 = 0);
          this$static.lv_lumii_layoutengine_funcmin_Funcmin_inQueue[v] = true;
        }
        e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
      }
    }
  }
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Funcmin_vN; i++) {
    c = this$static.lv_lumii_layoutengine_funcmin_Funcmin_vComp[i];
    k1 = 0;
    while (this$static.lv_lumii_layoutengine_funcmin_Funcmin_comptree[c] >= 0) {
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[k1++] = c;
      c = this$static.lv_lumii_layoutengine_funcmin_Funcmin_comptree[c];
    }
    d = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[c];
    while (k1 != 0) {
      k = this$static.lv_lumii_layoutengine_funcmin_Funcmin_queue[--k1];
      d += this$static.lv_lumii_layoutengine_funcmin_Funcmin_compX[k];
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[k] = d;
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_comptree[k] = -1;
    }
    this$static.lv_lumii_layoutengine_funcmin_Funcmin_vX[i] += d;
  }
}

function lv_lumii_layoutengine_funcmin_Funcmin_$Stick__Llv_lumii_layoutengine_funcmin_Funcmin_2IIV(this$static, i, j){
  var c1, d, e, e1, oe, prev, v;
  d = this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[i] - this$static.lv_lumii_layoutengine_funcmin_Funcmin_cX[j];
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_compX[i] = d;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_comptree[i] = j;
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[j] += this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[i];
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[j] += this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[i] + 2 * d * this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[i];
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j];
  prev = -1;
  while (e >= 0) {
    v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
    oe = e;
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    if (v == i) {
      c1 = this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF[oe >> 1];
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_waF[j] += c1;
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[j] += c1 * d;
      prev >= 0?(this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[prev].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next = e):(this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j] = e);
    }
     else {
      prev = oe;
    }
  }
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i];
  while (e >= 0) {
    v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
    e1 = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    if (v != j) {
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next = this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j];
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j] = e;
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_edges[e ^ 1].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode = j;
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_wbF[v] += this$static.lv_lumii_layoutengine_funcmin_Funcmin_waaF[e >> 1] * d;
    }
    e = e1;
  }
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_func.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i] = -1;
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j];
  prev = -1;
  while (e >= 0) {
    v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
    oe = e;
    e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    v == i?prev >= 0?(this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[prev].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next = e):(this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j] = e):(prev = oe);
  }
  e = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i];
  while (e >= 0) {
    v = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode;
    e1 = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next;
    if (v != j) {
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next = this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j];
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[j] = e;
      this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_edges[e ^ 1].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode = j;
      (e & 1) == 1?(this$static.lv_lumii_layoutengine_funcmin_Funcmin_wcL[e >> 1] -= d):(this$static.lv_lumii_layoutengine_funcmin_Funcmin_wcL[e >> 1] += d);
    }
    e = e1;
  }
  this$static.lv_lumii_layoutengine_funcmin_Funcmin_wconstr.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i] = -1;
}

function lv_lumii_layoutengine_funcmin_Funcmin_Funcmin__IIIV(vN, cN, fN){
  this.lv_lumii_layoutengine_funcmin_Funcmin_func = new lv_lumii_layoutengine_funcmin_TGraph_TGraph__IIV(vN, fN * 2);
  this.lv_lumii_layoutengine_funcmin_Funcmin_constr = new lv_lumii_layoutengine_funcmin_TGraph_TGraph__IIV(vN, cN * 2);
  this.lv_lumii_layoutengine_funcmin_Funcmin_wconstr = new lv_lumii_layoutengine_funcmin_TGraph_TGraph__IIV(vN, cN * 2);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(243, 1, {}, lv_lumii_layoutengine_funcmin_Funcmin_Funcmin__IIIV);
_.lv_lumii_layoutengine_funcmin_Funcmin_Eps = 0;
_.lv_lumii_layoutengine_funcmin_Funcmin_cEps = 0;
_.lv_lumii_layoutengine_funcmin_Funcmin_cN = 0;
_.lv_lumii_layoutengine_funcmin_Funcmin_compN = 0;
_.lv_lumii_layoutengine_funcmin_Funcmin_dEps = 0;
_.lv_lumii_layoutengine_funcmin_Funcmin_fN = 0;
_.lv_lumii_layoutengine_funcmin_Funcmin_vN = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1Funcmin_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'Funcmin', 243);
function lv_lumii_layoutengine_funcmin_OneWayLinkedList_$move_1to_1front__Llv_lumii_layoutengine_funcmin_OneWayLinkedList_2Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static, it){
  var p;
  p = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next;
  if (p == this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next) {
    it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr = p;
    return;
  }
  it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next = p.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next;
  p.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next = this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next;
  this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next = p;
  p == this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr && !!p.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next && (this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr);
}

function lv_lumii_layoutengine_funcmin_OneWayLinkedList_$push_1back__Llv_lumii_layoutengine_funcmin_OneWayLinkedList_2Llv_lumii_layoutengine_funcmin_CycleReducer$Adj_2Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2(this$static, data_0){
  var old_back_ptr, p, t;
  p = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_OneWayLinkedList$Element__V;
  p.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_data = data_0;
  p.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next = null;
  old_back_ptr = this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr;
  this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next = p;
  this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr = p;
  t = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(old_back_ptr);
  return t;
}

function lv_lumii_layoutengine_funcmin_OneWayLinkedList_$truncate__Llv_lumii_layoutengine_funcmin_OneWayLinkedList_2Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static, it){
  this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr = it.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr;
  this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next = null;
}

function lv_lumii_layoutengine_funcmin_OneWayLinkedList_OneWayLinkedList__V(){
  this.lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr = new lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_OneWayLinkedList$Element__V;
  this.lv_lumii_layoutengine_funcmin_OneWayLinkedList_back_1ptr = this.lv_lumii_layoutengine_funcmin_OneWayLinkedList_front_1ptr;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(154, 1, {154:1}, lv_lumii_layoutengine_funcmin_OneWayLinkedList_OneWayLinkedList__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1OneWayLinkedList_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'OneWayLinkedList', 154);
function lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_OneWayLinkedList$Element__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(175, 1, {}, lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_OneWayLinkedList$Element__V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1OneWayLinkedList$Element_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'OneWayLinkedList/Element', 175);
function lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$equals__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Ljava_lang_Object_2Z(this$static, b){
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(b, 60)) {
    return this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr == com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(b, 60).lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr;
  }
  return false;
}

function lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$inc__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2V(this$static){
  this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr = this$static.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr.lv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_next;
}

function lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V(p){
  this.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr = p;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(60, 1, {60:1}, lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_OneWayLinkedList$TemporaryIterator__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$Element_2V);
_.equals__Ljava_lang_Object_2Z$ = function lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_equals__Ljava_lang_Object_2Z(b){
  return lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_$equals__Llv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_2Ljava_lang_Object_2Z(this, b);
}
;
_.hashCode__I$ = function lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_hashCode__I(){
  var hash;
  hash = 371 + java_util_Objects_hashCode__Ljava_lang_Object_2I(this.lv_lumii_layoutengine_funcmin_OneWayLinkedList$TemporaryIterator_prev_1ptr);
  return hash;
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1OneWayLinkedList$TemporaryIterator_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'OneWayLinkedList/TemporaryIterator', 60);
function lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV(firstObject, secondObject, weight){
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject = firstObject;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject = secondObject;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight = weight;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_minWeight = lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_COMBINED_1TERM_1UNDEFINED;
}

function lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV(firstObject, secondObject, weight, minWeight){
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject = firstObject;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject = secondObject;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight = weight;
  this.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_minWeight = minWeight;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(37, 1, {37:1}, lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDV, lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_QuadraticOptimizer$CombinedTerm__IIDDV);
_.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_firstObject = 0;
_.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_minWeight = 0;
_.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_secondObject = 0;
_.lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_weight = 0;
var lv_lumii_layoutengine_funcmin_QuadraticOptimizer$CombinedTerm_COMBINED_1TERM_1UNDEFINED = $intern_20;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1QuadraticOptimizer$CombinedTerm_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'QuadraticOptimizer/CombinedTerm', 37);
function lv_lumii_layoutengine_funcmin_Rackok_$addArc__Llv_lumii_layoutengine_funcmin_Rackok_2IIV(this$static, n1, n2){
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc].lv_lumii_layoutengine_funcmin_Rackok$arc_r_1cap = 1;
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc + 1].lv_lumii_layoutengine_funcmin_Rackok$arc_r_1cap = 0;
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc].lv_lumii_layoutengine_funcmin_Rackok$arc_head = this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[n2];
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc + 1].lv_lumii_layoutengine_funcmin_Rackok$arc_head = this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[n1];
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc].lv_lumii_layoutengine_funcmin_Rackok$arc_sister = this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc + 1];
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc + 1].lv_lumii_layoutengine_funcmin_Rackok$arc_sister = this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc];
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc].lv_lumii_layoutengine_funcmin_Rackok$arc_next = this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[n1].lv_lumii_layoutengine_funcmin_Rackok$node_first;
  this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[n1].lv_lumii_layoutengine_funcmin_Rackok$node_first = this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc];
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc + 1].lv_lumii_layoutengine_funcmin_Rackok$arc_next = this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[n2].lv_lumii_layoutengine_funcmin_Rackok$node_first;
  this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[n2].lv_lumii_layoutengine_funcmin_Rackok$node_first = this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc + 1];
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc].lv_lumii_layoutengine_funcmin_Rackok$arc_deleted = 0;
  this$static.lv_lumii_layoutengine_funcmin_Rackok_parcs[this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc + 1].lv_lumii_layoutengine_funcmin_Rackok$arc_deleted = 0;
  this$static.lv_lumii_layoutengine_funcmin_Rackok_curarc += 2;
}

function lv_lumii_layoutengine_funcmin_Rackok_$flow__Llv_lumii_layoutengine_funcmin_Rackok_2V(this$static){
  var deg, e, fl, i, n, n2, stp;
  stp = 0;
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Rackok_maxnum; i++) {
    n = this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[i];
    deg = 0;
    for (e = n.lv_lumii_layoutengine_funcmin_Rackok$node_first; e; e = e.lv_lumii_layoutengine_funcmin_Rackok$arc_next) {
      ++deg;
    }
    n.lv_lumii_layoutengine_funcmin_Rackok$node_rank = deg;
    deg == 1 && (this$static.lv_lumii_layoutengine_funcmin_Rackok_queue[stp++] = n);
  }
  while (stp != 0) {
    n = this$static.lv_lumii_layoutengine_funcmin_Rackok_queue[--stp];
    for (e = n.lv_lumii_layoutengine_funcmin_Rackok$node_first; e; e = e.lv_lumii_layoutengine_funcmin_Rackok$arc_next) {
      if (e.lv_lumii_layoutengine_funcmin_Rackok$arc_deleted == 0) {
        break;
      }
    }
    if (!e) {
      continue;
    }
    n2 = e.lv_lumii_layoutengine_funcmin_Rackok$arc_head;
    fl = n.lv_lumii_layoutengine_funcmin_Rackok$node_excess;
    if (fl > 0 == (e.lv_lumii_layoutengine_funcmin_Rackok$arc_r_1cap == 1)) {
      e.lv_lumii_layoutengine_funcmin_Rackok$arc_sister.lv_lumii_layoutengine_funcmin_Rackok$arc_r_1cap = com_google_gwt_lang_Cast_narrow_1byte__DB(e.lv_lumii_layoutengine_funcmin_Rackok$arc_sister.lv_lumii_layoutengine_funcmin_Rackok$arc_r_1cap | 1);
      n.lv_lumii_layoutengine_funcmin_Rackok$node_excess = 0;
      n2.lv_lumii_layoutengine_funcmin_Rackok$node_excess += fl;
    }
    e.lv_lumii_layoutengine_funcmin_Rackok$arc_sister.lv_lumii_layoutengine_funcmin_Rackok$arc_deleted = 1;
    --n2.lv_lumii_layoutengine_funcmin_Rackok$node_rank;
    n2.lv_lumii_layoutengine_funcmin_Rackok$node_rank == 1 && (this$static.lv_lumii_layoutengine_funcmin_Rackok_queue[stp++] = n2);
  }
}

function lv_lumii_layoutengine_funcmin_Rackok_$getCut__Llv_lumii_layoutengine_funcmin_Rackok_2_3BV(this$static, out){
  var i;
  lv_lumii_layoutengine_funcmin_Rackok_$flow__Llv_lumii_layoutengine_funcmin_Rackok_2V(this$static);
  lv_lumii_layoutengine_funcmin_Rackok_$sourceReachable__Llv_lumii_layoutengine_funcmin_Rackok_2V(this$static);
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Rackok_maxnum; i++) {
    out[i] = com_google_gwt_lang_Cast_narrow_1byte__DB(this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[i].lv_lumii_layoutengine_funcmin_Rackok$node_rank);
  }
}

function lv_lumii_layoutengine_funcmin_Rackok_$setWeight__Llv_lumii_layoutengine_funcmin_Rackok_2_3DV(this$static, weight){
  var i;
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Rackok_maxnum; i++) {
    this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[i].lv_lumii_layoutengine_funcmin_Rackok$node_excess = weight[i];
  }
}

function lv_lumii_layoutengine_funcmin_Rackok_$sourceReachable__Llv_lumii_layoutengine_funcmin_Rackok_2V(this$static){
  var e, i, n, n2, qin;
  qin = 0;
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_Rackok_maxnum; i++) {
    n = this$static.lv_lumii_layoutengine_funcmin_Rackok_pnodes[i];
    if (n.lv_lumii_layoutengine_funcmin_Rackok$node_excess > 0) {
      this$static.lv_lumii_layoutengine_funcmin_Rackok_queue[qin++] = n;
      n.lv_lumii_layoutengine_funcmin_Rackok$node_rank = 0;
    }
     else {
      n.lv_lumii_layoutengine_funcmin_Rackok$node_rank = 1;
    }
  }
  while (qin != 0) {
    n = this$static.lv_lumii_layoutengine_funcmin_Rackok_queue[--qin];
    for (e = n.lv_lumii_layoutengine_funcmin_Rackok$node_first; e; e = e.lv_lumii_layoutengine_funcmin_Rackok$arc_next) {
      if (e.lv_lumii_layoutengine_funcmin_Rackok$arc_r_1cap != 0) {
        n2 = e.lv_lumii_layoutengine_funcmin_Rackok$arc_head;
        if (n2.lv_lumii_layoutengine_funcmin_Rackok$node_rank != 0) {
          n2.lv_lumii_layoutengine_funcmin_Rackok$node_rank = 0;
          this$static.lv_lumii_layoutengine_funcmin_Rackok_queue[qin++] = n2;
        }
      }
    }
  }
}

function lv_lumii_layoutengine_funcmin_Rackok_Rackok__IIV(ncount, acount){
  var i, i0, i1;
  this.lv_lumii_layoutengine_funcmin_Rackok_curarc = 0;
  this.lv_lumii_layoutengine_funcmin_Rackok_arccount = acount;
  this.lv_lumii_layoutengine_funcmin_Rackok_maxnum = ncount;
  this.lv_lumii_layoutengine_funcmin_Rackok_pnodes = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1Rackok$node_12_1classLit, $intern_14, 130, this.lv_lumii_layoutengine_funcmin_Rackok_maxnum, 0, 1);
  for (i0 = 0; i0 < this.lv_lumii_layoutengine_funcmin_Rackok_maxnum; i0++) {
    this.lv_lumii_layoutengine_funcmin_Rackok_pnodes[i0] = new lv_lumii_layoutengine_funcmin_Rackok$node_Rackok$node__V;
  }
  this.lv_lumii_layoutengine_funcmin_Rackok_parcs = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1Rackok$arc_12_1classLit, $intern_14, 163, this.lv_lumii_layoutengine_funcmin_Rackok_arccount * 2, 0, 1);
  for (i1 = 0; i1 < this.lv_lumii_layoutengine_funcmin_Rackok_arccount * 2; i1++) {
    this.lv_lumii_layoutengine_funcmin_Rackok_parcs[i1] = new lv_lumii_layoutengine_funcmin_Rackok$arc_Rackok$arc__V;
  }
  this.lv_lumii_layoutengine_funcmin_Rackok_queue = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1Rackok$node_12_1classLit, $intern_14, 130, this.lv_lumii_layoutengine_funcmin_Rackok_maxnum, 0, 1);
  for (i = 0; i < this.lv_lumii_layoutengine_funcmin_Rackok_maxnum; i++) {
    this.lv_lumii_layoutengine_funcmin_Rackok_queue[i] = new lv_lumii_layoutengine_funcmin_Rackok$node_Rackok$node__V;
  }
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(259, 1, {}, lv_lumii_layoutengine_funcmin_Rackok_Rackok__IIV);
_.lv_lumii_layoutengine_funcmin_Rackok_arccount = 0;
_.lv_lumii_layoutengine_funcmin_Rackok_curarc = 0;
_.lv_lumii_layoutengine_funcmin_Rackok_maxnum = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1Rackok_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'Rackok', 259);
function lv_lumii_layoutengine_funcmin_Rackok$arc_Rackok$arc__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(163, 1, {163:1}, lv_lumii_layoutengine_funcmin_Rackok$arc_Rackok$arc__V);
_.lv_lumii_layoutengine_funcmin_Rackok$arc_deleted = 0;
_.lv_lumii_layoutengine_funcmin_Rackok$arc_r_1cap = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1Rackok$arc_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'Rackok/arc', 163);
function lv_lumii_layoutengine_funcmin_Rackok$node_Rackok$node__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(130, 1, {130:1}, lv_lumii_layoutengine_funcmin_Rackok$node_Rackok$node__V);
_.lv_lumii_layoutengine_funcmin_Rackok$node_excess = 0;
_.lv_lumii_layoutengine_funcmin_Rackok$node_rank = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1Rackok$node_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'Rackok/node', 130);
function lv_lumii_layoutengine_funcmin_TGraph_$AddEdge__Llv_lumii_layoutengine_funcmin_TGraph_2IIV(this$static, snode, enode){
  var tmp;
  if (this$static.lv_lumii_layoutengine_funcmin_TGraph_edgecnt >= this$static.lv_lumii_layoutengine_funcmin_TGraph_maxedges) {
    tmp = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1TGraph$edgeelem_12_1classLit, $intern_14, 143, this$static.lv_lumii_layoutengine_funcmin_TGraph_maxedges + this$static.lv_lumii_layoutengine_funcmin_TGraph_increment, 0, 1);
    java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(this$static.lv_lumii_layoutengine_funcmin_TGraph_edges, 0, tmp, 0, this$static.lv_lumii_layoutengine_funcmin_TGraph_edgecnt);
    this$static.lv_lumii_layoutengine_funcmin_TGraph_edges = tmp;
    this$static.lv_lumii_layoutengine_funcmin_TGraph_maxedges += this$static.lv_lumii_layoutengine_funcmin_TGraph_increment;
    this$static.lv_lumii_layoutengine_funcmin_TGraph_increment *= 2;
  }
  this$static.lv_lumii_layoutengine_funcmin_TGraph_edges[this$static.lv_lumii_layoutengine_funcmin_TGraph_edgecnt].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode = enode;
  this$static.lv_lumii_layoutengine_funcmin_TGraph_edges[this$static.lv_lumii_layoutengine_funcmin_TGraph_edgecnt].lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next = this$static.lv_lumii_layoutengine_funcmin_TGraph_nodestart[snode];
  this$static.lv_lumii_layoutengine_funcmin_TGraph_nodestart[snode] = this$static.lv_lumii_layoutengine_funcmin_TGraph_edgecnt++;
}

function lv_lumii_layoutengine_funcmin_TGraph_$AddUndirectEdge__Llv_lumii_layoutengine_funcmin_TGraph_2IIV(this$static, snode, enode){
  lv_lumii_layoutengine_funcmin_TGraph_$AddEdge__Llv_lumii_layoutengine_funcmin_TGraph_2IIV(this$static, snode, enode);
  lv_lumii_layoutengine_funcmin_TGraph_$AddEdge__Llv_lumii_layoutengine_funcmin_TGraph_2IIV(this$static, enode, snode);
}

function lv_lumii_layoutengine_funcmin_TGraph_$FreeAll__Llv_lumii_layoutengine_funcmin_TGraph_2V(this$static){
  var i;
  this$static.lv_lumii_layoutengine_funcmin_TGraph_edgecnt = 0;
  for (i = 0; i < this$static.lv_lumii_layoutengine_funcmin_TGraph_nodecnt; i++) {
    this$static.lv_lumii_layoutengine_funcmin_TGraph_nodestart[i] = -1;
  }
}

function lv_lumii_layoutengine_funcmin_TGraph_TGraph__IIV(nodes, startedgescnt){
  var i;
  this.lv_lumii_layoutengine_funcmin_TGraph_nodecnt = nodes;
  this.lv_lumii_layoutengine_funcmin_TGraph_maxedges = startedgescnt;
  this.lv_lumii_layoutengine_funcmin_TGraph_increment = startedgescnt;
  this.lv_lumii_layoutengine_funcmin_TGraph_nodestart = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, nodes, 7, 1);
  this.lv_lumii_layoutengine_funcmin_TGraph_edges = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1TGraph$edgeelem_12_1classLit, $intern_14, 143, this.lv_lumii_layoutengine_funcmin_TGraph_maxedges, 0, 1);
  for (i = 0; i < this.lv_lumii_layoutengine_funcmin_TGraph_maxedges; i++) {
    this.lv_lumii_layoutengine_funcmin_TGraph_edges[i] = new lv_lumii_layoutengine_funcmin_TGraph$edgeelem_TGraph$edgeelem__V;
  }
  lv_lumii_layoutengine_funcmin_TGraph_$FreeAll__Llv_lumii_layoutengine_funcmin_TGraph_2V(this);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(161, 1, {}, lv_lumii_layoutengine_funcmin_TGraph_TGraph__IIV);
_.lv_lumii_layoutengine_funcmin_TGraph_edgecnt = 0;
_.lv_lumii_layoutengine_funcmin_TGraph_increment = 0;
_.lv_lumii_layoutengine_funcmin_TGraph_maxedges = 0;
_.lv_lumii_layoutengine_funcmin_TGraph_nodecnt = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1TGraph_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'TGraph', 161);
function lv_lumii_layoutengine_funcmin_TGraph$edgeelem_TGraph$edgeelem__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(143, 1, {143:1}, lv_lumii_layoutengine_funcmin_TGraph$edgeelem_TGraph$edgeelem__V);
_.lv_lumii_layoutengine_funcmin_TGraph$edgeelem_enode = 0;
_.lv_lumii_layoutengine_funcmin_TGraph$edgeelem_next = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1funcmin_1TGraph$edgeelem_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_82, 'TGraph/edgeelem', 143);
function lv_lumii_layoutengine_obstacleGraph_ObstacleGraph_findObstacleGraph__Ljava_util_ArrayList_2Ljava_util_ArrayList_2(segments){
  var graph, it, lower, mid, originalSegment, parts, segment, segment$iterator, segmentPart, startPart, sweepline, upper;
  graph = new java_util_ArrayList_ArrayList__V;
  java_util_Collections_sort__Ljava_util_List_2Ljava_util_Comparator_2V(segments, null);
  sweepline = new java_util_TreeSet_TreeSet__V;
  java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V($intern_20, $intern_20, null));
  java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V($intern_53, $intern_53, null));
  for (segment$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(segments); segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    segment = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(segment$iterator.java_util_AbstractList$IteratorImpl_i < segment$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(segment$iterator.java_util_AbstractList$IteratorImpl_last = segment$iterator.java_util_AbstractList$IteratorImpl_i++), 59));
    startPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_TreeSet_$lower__Ljava_util_TreeSet_2Ljava_lang_Object_2Ljava_lang_Object_2(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start, segment)), 41);
    parts = java_util_TreeSet_$tailSet__Ljava_util_TreeSet_2Ljava_lang_Object_2ZLjava_util_NavigableSet_2(sweepline, startPart, java_lang_Math_max__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end));
    startPart = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap_getKeyOrNSE__Ljava_util_Map$Entry_2Ljava_lang_Object_2(parts.java_util_TreeSet_map.package_private$java_util_AbstractNavigableMap$getFirstEntry__Ljava_util_Map$Entry_2()), 41);
    it = java_util_AbstractNavigableMap$NavigableKeySet_$iterator__Ljava_util_AbstractNavigableMap$NavigableKeySet_2Ljava_util_Iterator_2(new java_util_AbstractNavigableMap$NavigableKeySet_AbstractNavigableMap$NavigableKeySet__Ljava_util_NavigableMap_2V(parts.java_util_TreeSet_map));
    upper = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap_getKeyOrNSE__Ljava_util_Map$Entry_2Ljava_lang_Object_2(sweepline.java_util_TreeSet_map.package_private$java_util_AbstractNavigableMap$getFirstEntry__Ljava_util_Map$Entry_2()), 41);
    mid = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(it), 41);
    while (java_lang_Math_max__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end)) {
      java_util_TreeMap$EntryIterator_$remove__Ljava_util_TreeMap$EntryIterator_2V(it.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2);
      lower = it.java_util_AbstractNavigableMap$NavigableKeySet$1_val$entryIterator2.java_util_TreeMap$EntryIterator_iter.hasNext__Z()?com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_AbstractNavigableMap$NavigableKeySet$1_$next__Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2Ljava_lang_Object_2(it), 41):null;
      originalSegment = mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment;
      java_lang_Math_max__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos > originalSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos && upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment.lv_lumii_layoutengine_obstacleGraph_Segment_start || java_lang_Math_max__DDD(lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment.lv_lumii_layoutengine_obstacleGraph_Segment_pos > originalSegment.lv_lumii_layoutengine_obstacleGraph_Segment_pos && mid.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment.lv_lumii_layoutengine_obstacleGraph_Segment_end > lower.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top || java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(graph, new lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(originalSegment, segment));
      upper = mid;
      mid = lower;
    }
    segmentPart = new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__Llv_lumii_layoutengine_obstacleGraph_Segment_2V(segment);
    sweepline.java_util_TreeSet_map.put__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(segmentPart, (java_lang_Boolean_$clinit__V() , java_lang_Boolean_FALSE)) == null;
    java_lang_Math_max__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top < segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top && startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top && java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, startPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment));
    java_lang_Math_max__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top, segment.lv_lumii_layoutengine_obstacleGraph_Segment_start) < java_lang_Math_min__DDD(upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, segment.lv_lumii_layoutengine_obstacleGraph_Segment_end) && upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom && upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top < segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom && java_util_TreeSet_$add__Ljava_util_TreeSet_2Ljava_lang_Object_2Z(sweepline, new lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(segmentPart.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom, upper.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment));
  }
  return graph;
}

function lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V(top_0, bottom, segment){
  this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top = top_0;
  this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom = bottom;
  this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment = segment;
}

function lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__Llv_lumii_layoutengine_obstacleGraph_Segment_2V(segment){
  this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top = segment.lv_lumii_layoutengine_obstacleGraph_Segment_start;
  this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom = segment.lv_lumii_layoutengine_obstacleGraph_Segment_end;
  this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_segment = segment;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(41, 1, {29:1, 41:1}, lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__DDLlv_lumii_layoutengine_obstacleGraph_Segment_2V, lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_Segment$VerticalPart__Llv_lumii_layoutengine_obstacleGraph_Segment_2V);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_compareTo__Ljava_lang_Object_2I(op){
  var cmp, p;
  p = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(op, 41);
  cmp = this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top < p.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top?-1:this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top > p.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top?1:0;
  return cmp == 0?this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom < p.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom?-1:this.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom > p.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom?1:0:cmp;
}
;
_.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_bottom = 0;
_.lv_lumii_layoutengine_obstacleGraph_Segment$VerticalPart_top = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1obstacleGraph_1Segment$VerticalPart_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_69, 'Segment/VerticalPart', 41);
function lv_lumii_layoutengine_polyomino_Polyomino_Polyomino__V(){
  this.lv_lumii_layoutengine_polyomino_Polyomino_bounds = new lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_Polyomino$IntegerRectangle__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(110, 1, {110:1}, lv_lumii_layoutengine_polyomino_Polyomino_Polyomino__V);
_.lv_lumii_layoutengine_polyomino_Polyomino_maxX = $intern_20;
_.lv_lumii_layoutengine_polyomino_Polyomino_maxY = $intern_20;
_.lv_lumii_layoutengine_polyomino_Polyomino_minX = $intern_53;
_.lv_lumii_layoutengine_polyomino_Polyomino_minY = $intern_53;
_.lv_lumii_layoutengine_polyomino_Polyomino_spacingX = 0;
_.lv_lumii_layoutengine_polyomino_Polyomino_spacingY = 0;
_.lv_lumii_layoutengine_polyomino_Polyomino_x = 0;
_.lv_lumii_layoutengine_polyomino_Polyomino_y = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1polyomino_1Polyomino_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_84, 'Polyomino', 110);
function lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_Polyomino$IntegerPoint__IIV(x_0, y_0){
  this.lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x = x_0;
  this.lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y = y_0;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(53, 1, {53:1}, lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_Polyomino$IntegerPoint__IIV);
_.lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x = 0;
_.lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1polyomino_1Polyomino$IntegerPoint_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_84, 'Polyomino/IntegerPoint', 53);
function lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_Polyomino$IntegerRectangle__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(236, 1, {}, lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_Polyomino$IntegerRectangle__V);
_.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x1 = 0;
_.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x2 = 0;
_.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y1 = 0;
_.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y2 = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1polyomino_1Polyomino$IntegerRectangle_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_84, 'Polyomino/IntegerRectangle', 236);
function lv_lumii_layoutengine_polyomino_PolyominoPacking_$isFreePlace__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IILlv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, x_0, y_0, p){
  var k, xx, yy;
  for (k = 0; k < p.lv_lumii_layoutengine_polyomino_Polyomino_coord.java_util_ArrayList_array.length; k++) {
    xx = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, k), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x + x_0;
    yy = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, k), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y + y_0;
    if (xx < 0 || yy < 0 || xx >= this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeX || yy >= this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeY) {
      return false;
    }
    if (this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_grid[yy][xx] != 0) {
      return false;
    }
  }
  p.lv_lumii_layoutengine_polyomino_Polyomino_x = x_0;
  p.lv_lumii_layoutengine_polyomino_Polyomino_y = y_0;
  return true;
}

function lv_lumii_layoutengine_polyomino_PolyominoPacking_$makeGrid__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IIIV(this$static, dimx, dimy, mN){
  var dx, dy, i, k, p, xx, yy;
  this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_grid = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_B_1classLit, $intern_14, 186, dimy, 0, 2);
  for (i = 0; i < dimy; i++) {
    this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_grid[i] = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_B_1classLit, $intern_83, 0, dimx, 7, 1);
  }
  dx = ~~(dimx / 2) - this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcx;
  dy = ~~(dimy / 2) - this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcy;
  this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcx = ~~(dimx / 2);
  this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcy = ~~(dimy / 2);
  this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeX = dimx;
  this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeY = dimy;
  for (i = 0; i < mN; i++) {
    p = this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_pmSorted[i];
    p.lv_lumii_layoutengine_polyomino_Polyomino_x += dx;
    p.lv_lumii_layoutengine_polyomino_Polyomino_y += dy;
    for (k = 0; k < p.lv_lumii_layoutengine_polyomino_Polyomino_coord.java_util_ArrayList_array.length; k++) {
      xx = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, k), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x + p.lv_lumii_layoutengine_polyomino_Polyomino_x;
      yy = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, k), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y + p.lv_lumii_layoutengine_polyomino_Polyomino_y;
      this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_grid[yy][xx] = 1;
    }
  }
}

function lv_lumii_layoutengine_polyomino_PolyominoPacking_$pack__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2_3Llv_lumii_layoutengine_polyomino_Polyomino_2V(this$static, pm){
  var i, k, k0;
  this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_pmSorted = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1polyomino_1Polyomino_12_1classLit, $intern_14, 110, pm.length, 0, 1);
  for (i = 0; i < pm.length; i++)
    this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_pmSorted[i] = pm[i];
  lv_lumii_layoutengine_polyomino_PolyominoPacking_$makeGrid__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IIIV(this$static, 100, 100, 0);
  this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_random = new java_util_Random_Random__JV;
  for (k0 = 0; k0 < pm.length; k0++) {
    lv_lumii_layoutengine_polyomino_PolyominoPacking_$randomizeMino__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2Llv_lumii_layoutengine_polyomino_Polyomino_2V(this$static, pm[k0]);
  }
  java_util_Arrays_sort___3Ljava_lang_Object_2Ljava_util_Comparator_2V(this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_pmSorted, new lv_lumii_layoutengine_polyomino_PolyominoPacking$1_PolyominoPacking$1__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2V);
  for (this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_curmino = 0; this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_curmino < pm.length; this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_curmino++) {
    lv_lumii_layoutengine_polyomino_PolyominoPacking_$putMino__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2Llv_lumii_layoutengine_polyomino_Polyomino_2V(this$static, this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_pmSorted[this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_curmino]);
  }
  for (k = 0; k < pm.length; k++) {
    pm[k].lv_lumii_layoutengine_polyomino_Polyomino_x -= this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcx;
    pm[k].lv_lumii_layoutengine_polyomino_Polyomino_y -= this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcy;
  }
}

function lv_lumii_layoutengine_polyomino_PolyominoPacking_$putMino__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2Llv_lumii_layoutengine_polyomino_Polyomino_2V(this$static, p){
  var k, xx, yy;
  while (!lv_lumii_layoutengine_polyomino_PolyominoPacking_$tryPlacing__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2Llv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, p)) {
    this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeX += 20;
    this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeY += 20;
    lv_lumii_layoutengine_polyomino_PolyominoPacking_$makeGrid__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IIIV(this$static, this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeX, this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeY, this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_curmino);
  }
  for (k = 0; k < p.lv_lumii_layoutengine_polyomino_Polyomino_coord.java_util_ArrayList_array.length; k++) {
    xx = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, k), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x + p.lv_lumii_layoutengine_polyomino_Polyomino_x;
    yy = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, k), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y + p.lv_lumii_layoutengine_polyomino_Polyomino_y;
    this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_grid[yy][xx] = 1;
  }
}

function lv_lumii_layoutengine_polyomino_PolyominoPacking_$randomizeMino__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2Llv_lumii_layoutengine_polyomino_Polyomino_2V(this$static, p){
  var i, i1, rect, tmp;
  for (i = 0; i < p.lv_lumii_layoutengine_polyomino_Polyomino_coord.java_util_ArrayList_array.length; i++) {
    i1 = java_util_Random_$nextInt__Ljava_util_Random_2II(this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_random, p.lv_lumii_layoutengine_polyomino_Polyomino_coord.java_util_ArrayList_array.length - i) + i;
    tmp = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53);
    java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i1), 53));
    java_util_ArrayList_$set__Ljava_util_ArrayList_2ILjava_lang_Object_2Ljava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i1, tmp);
  }
  rect = p.lv_lumii_layoutengine_polyomino_Polyomino_bounds;
  rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x1 = $intern_1;
  rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y1 = $intern_1;
  rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x2 = 0;
  rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y2 = 0;
  p.lv_lumii_layoutengine_polyomino_Polyomino_x = 0;
  p.lv_lumii_layoutengine_polyomino_Polyomino_y = 0;
  for (i = 0; i < p.lv_lumii_layoutengine_polyomino_Polyomino_coord.java_util_ArrayList_array.length; i++) {
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x < rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x1 && (rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x1 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x);
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y < rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y1 && (rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y1 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y);
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x > rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x2 && (rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_x);
    com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y > rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y2 && (rect.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y2 = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(p.lv_lumii_layoutengine_polyomino_Polyomino_coord, i), 53).lv_lumii_layoutengine_polyomino_Polyomino$IntegerPoint_y);
  }
}

function lv_lumii_layoutengine_polyomino_PolyominoPacking_$tryPlacing__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2Llv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, p){
  var cx, cy, d, i, i1;
  cx = this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcx - ~~((p.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x2 + p.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x1) / 2);
  cy = this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcy - ~~((p.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y2 + p.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y1) / 2);
  if (lv_lumii_layoutengine_polyomino_PolyominoPacking_$isFreePlace__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IILlv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, cx, cy, p)) {
    return true;
  }
  for (d = 1; d < ~~(this$static.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeX / 2); d++) {
    for (i = -d; i < d; i++) {
      i1 = ~~((i + d + 1) / 2);
      (i & 1) != 1 && (i1 = -i1);
      if (lv_lumii_layoutengine_polyomino_PolyominoPacking_$isFreePlace__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IILlv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, -d + cx, -i1 + cy, p)) {
        return true;
      }
      if (lv_lumii_layoutengine_polyomino_PolyominoPacking_$isFreePlace__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IILlv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, d + cx, i1 + cy, p)) {
        return true;
      }
      if (lv_lumii_layoutengine_polyomino_PolyominoPacking_$isFreePlace__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IILlv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, cx - i1, d + cy, p)) {
        return true;
      }
      if (lv_lumii_layoutengine_polyomino_PolyominoPacking_$isFreePlace__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2IILlv_lumii_layoutengine_polyomino_Polyomino_2Z(this$static, i1 + cx, -d + cy, p)) {
        return true;
      }
    }
  }
  return false;
}

function lv_lumii_layoutengine_polyomino_PolyominoPacking_PolyominoPacking__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(237, 1, {}, lv_lumii_layoutengine_polyomino_PolyominoPacking_PolyominoPacking__V);
_.lv_lumii_layoutengine_polyomino_PolyominoPacking_curmino = 0;
_.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcx = 0;
_.lv_lumii_layoutengine_polyomino_PolyominoPacking_gcy = 0;
_.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeX = 0;
_.lv_lumii_layoutengine_polyomino_PolyominoPacking_sizeY = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1polyomino_1PolyominoPacking_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_84, 'PolyominoPacking', 237);
function lv_lumii_layoutengine_polyomino_PolyominoPacking$1_$compare__Llv_lumii_layoutengine_polyomino_PolyominoPacking$1_2Llv_lumii_layoutengine_polyomino_Polyomino_2Llv_lumii_layoutengine_polyomino_Polyomino_2I(o1, o2){
  return java_lang_Integer_compare__III(o2.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x2 - o2.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x1 + o2.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y2 - o2.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y1, o1.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x2 - o1.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_x1 + o1.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y2 - o1.lv_lumii_layoutengine_polyomino_Polyomino_bounds.lv_lumii_layoutengine_polyomino_Polyomino$IntegerRectangle_y1);
}

function lv_lumii_layoutengine_polyomino_PolyominoPacking$1_PolyominoPacking$1__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(238, 1, {}, lv_lumii_layoutengine_polyomino_PolyominoPacking$1_PolyominoPacking$1__Llv_lumii_layoutengine_polyomino_PolyominoPacking_2V);
_.compare__Ljava_lang_Object_2Ljava_lang_Object_2I = function lv_lumii_layoutengine_polyomino_PolyominoPacking$1_compare__Ljava_lang_Object_2Ljava_lang_Object_2I(o1, o2){
  return lv_lumii_layoutengine_polyomino_PolyominoPacking$1_$compare__Llv_lumii_layoutengine_polyomino_PolyominoPacking$1_2Llv_lumii_layoutengine_polyomino_Polyomino_2Llv_lumii_layoutengine_polyomino_Polyomino_2I(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o1, 110), com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o2, 110));
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1polyomino_1PolyominoPacking$1_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_84, 'PolyominoPacking/1', 238);
com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(129, 1, {129:1});
_.lv_lumii_layoutengine_springembedder_BaseSpringNode_r = 0;
_.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX = 0;
_.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY = 0;
_.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceZ = 0;
_.lv_lumii_layoutengine_springembedder_BaseSpringNode_x = 0;
_.lv_lumii_layoutengine_springembedder_BaseSpringNode_y = 0;
_.lv_lumii_layoutengine_springembedder_BaseSpringNode_z = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1BaseSpringNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_85, 'BaseSpringNode', 129);
function lv_lumii_layoutengine_springembedder_GraphAdjacency_$addEdge__Llv_lumii_layoutengine_springembedder_GraphAdjacency_2IIV(this$static, snode, enode){
  var tmpEnodes, tmpNext;
  if (this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_edgecnt >= this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges) {
    tmpNext = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges + this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_increment, 7, 1);
    tmpEnodes = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges + this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_increment, 7, 1);
    java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_next, 0, tmpNext, 0, this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges);
    java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_enodes, 0, tmpEnodes, 0, this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges);
    this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_next = tmpNext;
    this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_enodes = tmpEnodes;
    this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges += this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_increment;
    this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_increment *= 2;
  }
  this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_enodes[this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_edgecnt] = enode;
  this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_next[this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_edgecnt] = this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodestart[snode];
  this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodestart[snode] = this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_edgecnt++;
}

function lv_lumii_layoutengine_springembedder_GraphAdjacency_$addUndirectEdge__Llv_lumii_layoutengine_springembedder_GraphAdjacency_2IIV(this$static, snode, enode){
  lv_lumii_layoutengine_springembedder_GraphAdjacency_$addEdge__Llv_lumii_layoutengine_springembedder_GraphAdjacency_2IIV(this$static, snode, enode);
  lv_lumii_layoutengine_springembedder_GraphAdjacency_$addEdge__Llv_lumii_layoutengine_springembedder_GraphAdjacency_2IIV(this$static, enode, snode);
}

function lv_lumii_layoutengine_springembedder_GraphAdjacency_$freeAll__Llv_lumii_layoutengine_springembedder_GraphAdjacency_2V(this$static){
  var i;
  this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_edgecnt = 0;
  for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodecnt; i++)
    this$static.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodestart[i] = -1;
}

function lv_lumii_layoutengine_springembedder_GraphAdjacency_GraphAdjacency__IIV(nodes, edges){
  this.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodecnt = nodes;
  this.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges = edges;
  this.lv_lumii_layoutengine_springembedder_GraphAdjacency_increment = edges + 1;
  this.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodestart = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, nodes, 7, 1);
  this.lv_lumii_layoutengine_springembedder_GraphAdjacency_enodes = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, edges, 7, 1);
  this.lv_lumii_layoutengine_springembedder_GraphAdjacency_next = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, edges, 7, 1);
  lv_lumii_layoutengine_springembedder_GraphAdjacency_$freeAll__Llv_lumii_layoutengine_springembedder_GraphAdjacency_2V(this);
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(257, 1, {}, lv_lumii_layoutengine_springembedder_GraphAdjacency_GraphAdjacency__IIV);
_.lv_lumii_layoutengine_springembedder_GraphAdjacency_edgecnt = 0;
_.lv_lumii_layoutengine_springembedder_GraphAdjacency_increment = 0;
_.lv_lumii_layoutengine_springembedder_GraphAdjacency_maxedges = 0;
_.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodecnt = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1GraphAdjacency_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_85, 'GraphAdjacency', 257);
function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$addForceLink__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_BaseSpringNode_2V(source, target){
  java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(source.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList, target);
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$buildTree__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_SpringNode_2IV(this$static, nodeArray, count){
  var i;
  !!this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$freeNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root);
  this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root = lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$newNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2(this$static);
  count > 0 && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$buildTreeRecursive__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_SpringNode_2IILlv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, nodeArray, 0, count, this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root);
  for (i = 0; i < count; i++) {
    nodeArray[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX = 0;
    nodeArray[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY = 0;
    nodeArray[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceZ = 0;
  }
  lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$calculateForces__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2V(this$static);
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$buildTreeRecursive__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_SpringNode_2IILlv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, nodeArray, start_0, end, subtree){
  var child, count, i, i0, invcnt, invcnt0, median, node, p, r, x_0, x1, x2, y_0, y1, y2, z_0;
  x1 = nodeArray[start_0].lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
  x2 = x1;
  y1 = nodeArray[start_0].lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
  y2 = y1;
  for (i0 = start_0 + 1; i0 < end; i0++) {
    p = nodeArray[i0];
    x_0 = p.lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
    y_0 = p.lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
    x_0 < x1 && (x1 = x_0);
    x_0 > x2 && (x2 = x_0);
    y_0 < y1 && (y1 = y_0);
    y_0 > y2 && (y2 = y_0);
  }
  subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate = x2 - x1 > y2 - y1?x2 - x1:y2 - y1;
  subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate = subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate * subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate + 0.1;
  subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate *= 2;
  count = end - start_0;
  if (count <= 5) {
    subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leafCount = count;
    x_0 = 0;
    y_0 = 0;
    z_0 = 0;
    r = 0;
    for (i = 0; i < count; i++) {
      node = nodeArray[i + start_0];
      x_0 += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
      y_0 += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
      z_0 += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_z;
      r += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_r;
      subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leaves[i] = node;
    }
    invcnt0 = 1 / count;
    subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_r = r;
    subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_x = x_0 * invcnt0;
    subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_y = y_0 * invcnt0;
    subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_z = z_0 * invcnt0;
    return;
  }
  x2 - x1 > y2 - y1?(median = lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$getMedianX__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2III(nodeArray, start_0, end)):(median = lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$getMedianY__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2III(nodeArray, start_0, end));
  ++median;
  child = lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$newNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2(this$static);
  subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left = child;
  lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$buildTreeRecursive__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_SpringNode_2IILlv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, nodeArray, start_0, median, child);
  child = lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$newNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2(this$static);
  subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right = child;
  lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$buildTreeRecursive__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_SpringNode_2IILlv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, nodeArray, median, end, child);
  invcnt = 1 / count;
  subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_r = subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right.lv_lumii_layoutengine_springembedder_BaseSpringNode_r + subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left.lv_lumii_layoutengine_springembedder_BaseSpringNode_r;
  subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_x = (subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left.lv_lumii_layoutengine_springembedder_BaseSpringNode_x * (median - start_0) + subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right.lv_lumii_layoutengine_springembedder_BaseSpringNode_x * (end - median)) * invcnt;
  subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_y = (subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left.lv_lumii_layoutengine_springembedder_BaseSpringNode_y * (median - start_0) + subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right.lv_lumii_layoutengine_springembedder_BaseSpringNode_y * (end - median)) * invcnt;
  subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_z = (subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left.lv_lumii_layoutengine_springembedder_BaseSpringNode_z * (median - start_0) + subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right.lv_lumii_layoutengine_springembedder_BaseSpringNode_z * (end - median)) * invcnt;
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$calculateForces__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2V(this$static){
  var factor, forceX, forceY, i, invr, k, node, node1, node2, queue;
  queue = new java_util_LinkedList_LinkedList__V;
  if (this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left) {
    java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left);
    java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right);
    lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$addForceLink__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_BaseSpringNode_2V(this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left, this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right);
  }
   else {
    java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_root);
  }
  while (queue.java_util_LinkedList_size != 0) {
    node = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(queue.java_util_LinkedList_size != 0) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_LinkedList_$removeNode__Ljava_util_LinkedList_2Ljava_util_LinkedList$Node_2Ljava_lang_Object_2(queue, queue.java_util_LinkedList_header.java_util_LinkedList$Node_next), 93));
    invr = 1 / node.lv_lumii_layoutengine_springembedder_BaseSpringNode_r;
    if (node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left) {
      lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$processTreeNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(node, node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left);
      lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$processTreeNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(node, node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right);
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left);
      java_util_LinkedList_$add__Ljava_util_LinkedList_2Ljava_lang_Object_2Z(queue, node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right);
      factor = node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left.lv_lumii_layoutengine_springembedder_BaseSpringNode_r * invr;
      forceX = node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX * factor;
      forceY = node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY * factor;
      node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX += forceX;
      node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY += forceY;
      node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX - forceX;
      node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY - forceY;
      lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$addForceLink__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_BaseSpringNode_2V(node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left, node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right);
    }
     else {
      for (i = 0; i < node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leafCount; i++) {
        node1 = node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leaves[i];
        lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$processLeafNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_SpringNode_2V(this$static, node, node1);
        factor = node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_r * invr;
        node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX * factor;
        node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY += node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY * factor;
        for (k = i + 1; k < node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leafCount; k++) {
          node2 = node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leaves[k];
          lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$forceBetweenParticles__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_SpringNode_2Llv_lumii_layoutengine_springembedder_SpringNode_2V(this$static, node1, node2);
        }
      }
    }
    node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList.java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
  }
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$forceBetweenParticles__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_SpringNode_2Llv_lumii_layoutengine_springembedder_SpringNode_2V(this$static, node1, node2){
  var len1, r, vx1, vy1, vz1, w;
  vx1 = node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_x - node2.lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
  vy1 = node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_y - node2.lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
  vz1 = node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z - node2.lv_lumii_layoutengine_springembedder_BaseSpringNode_z;
  len1 = vx1 * vx1 + vy1 * vy1 + vz1 * vz1;
  r = node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_r + node2.lv_lumii_layoutengine_springembedder_BaseSpringNode_r;
  len1 * this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_temperature < r?(w = $intern_19 * this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_temperature * java_lang_Math_sqrt__DD(this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_temperature * r)):(w = $intern_19 * r * r / (len1 * java_lang_Math_sqrt__DD(len1)));
  node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX += vx1 * w;
  node2.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX -= vx1 * w;
  node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY += vy1 * w;
  node2.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY -= vy1 * w;
  node1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceZ += vz1 * w;
  node2.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceZ -= vz1 * w;
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$freeNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, node){
  !!node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$freeNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left);
  !!node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$freeNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(this$static, node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right);
  node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left = this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_freeNodeRoot;
  this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_freeNodeRoot = node;
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$getMedianX__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2III(arr, low, high){
  var hh, ll, median, middle, tmp;
  --high;
  median = ~~((low + high) / 2);
  for (;;) {
    if (high <= low) {
      return median;
    }
    if (high == low + 1) {
      arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_x > arr[high].lv_lumii_layoutengine_springembedder_BaseSpringNode_x && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, low, high);
      return median;
    }
    middle = ~~((low + high) / 2);
    arr[middle].lv_lumii_layoutengine_springembedder_BaseSpringNode_x > arr[high].lv_lumii_layoutengine_springembedder_BaseSpringNode_x && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, middle, high);
    arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_x > arr[high].lv_lumii_layoutengine_springembedder_BaseSpringNode_x && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, low, high);
    arr[middle].lv_lumii_layoutengine_springembedder_BaseSpringNode_x > arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_x && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, middle, low);
    lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, middle, low + 1);
    ll = low + 1;
    hh = high;
    for (;;) {
      do {
        ++ll;
      }
       while (arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_x > arr[ll].lv_lumii_layoutengine_springembedder_BaseSpringNode_x);
      do {
        --hh;
      }
       while (arr[hh].lv_lumii_layoutengine_springembedder_BaseSpringNode_x > arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_x);
      if (hh < ll) {
        break;
      }
      tmp = arr[ll];
      arr[ll] = arr[hh];
      arr[hh] = tmp;
    }
    lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, low, hh);
    hh <= median && (low = ll);
    hh >= median && (high = hh - 1);
  }
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$getMedianY__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2III(arr, low, high){
  var hh, ll, median, middle, tmp;
  --high;
  median = ~~((low + high) / 2);
  for (;;) {
    if (high <= low) {
      return median;
    }
    if (high == low + 1) {
      arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_y > arr[high].lv_lumii_layoutengine_springembedder_BaseSpringNode_y && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, low, high);
      return median;
    }
    middle = ~~((low + high) / 2);
    arr[middle].lv_lumii_layoutengine_springembedder_BaseSpringNode_y > arr[high].lv_lumii_layoutengine_springembedder_BaseSpringNode_y && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, middle, high);
    arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_y > arr[high].lv_lumii_layoutengine_springembedder_BaseSpringNode_y && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, low, high);
    arr[middle].lv_lumii_layoutengine_springembedder_BaseSpringNode_y > arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_y && lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, middle, low);
    lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, middle, low + 1);
    ll = low + 1;
    hh = high;
    for (;;) {
      do {
        ++ll;
      }
       while (arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_y > arr[ll].lv_lumii_layoutengine_springembedder_BaseSpringNode_y);
      do {
        --hh;
      }
       while (arr[hh].lv_lumii_layoutengine_springembedder_BaseSpringNode_y > arr[low].lv_lumii_layoutengine_springembedder_BaseSpringNode_y);
      if (hh < ll) {
        break;
      }
      tmp = arr[ll];
      arr[ll] = arr[hh];
      arr[hh] = tmp;
    }
    lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, low, hh);
    hh <= median && (low = ll);
    hh >= median && (high = hh - 1);
  }
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$newNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2(this$static){
  var node;
  if (this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_freeNodeRoot) {
    node = this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_freeNodeRoot;
    this$static.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_freeNodeRoot = node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left;
    node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_left = null;
    node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_right = null;
    node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leafCount = 0;
    node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate = 0;
  }
   else {
    node = new lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_RepulsiveTreeNode__V;
    node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leaves = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1SpringNode_12_1classLit, $intern_14, 92, 5, 0, 1);
  }
  node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX = 0;
  node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY = 0;
  node.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceZ = 0;
  node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList.java_util_ArrayList_array = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Ljava_1lang_1Object_12_1classLit, $intern_14, 1, 0, 3, 1);
  return node;
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$processLeafNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_SpringNode_2V(this$static, node, subtree){
  var fx, fy, i, len, length_0, otherNode, threshold, vx, vy, w;
  length_0 = node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList.java_util_ArrayList_array.length;
  for (i = 0; i < length_0; i++) {
    otherNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList, i), 129);
    if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(otherNode, 92)) {
      lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$forceBetweenParticles__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_SpringNode_2Llv_lumii_layoutengine_springembedder_SpringNode_2V(this$static, subtree, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(otherNode, 92));
    }
     else {
      vx = subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_x - otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
      vy = subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_y - otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
      len = vx * vx + vy * vy;
      threshold = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(otherNode, 93).lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate;
      if (threshold < len) {
        w = subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_r * otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_r / (len * java_lang_Math_sqrt__DD(len));
        fx = vx * w;
        subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX += fx;
        otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX -= fx;
        fy = vy * w;
        subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY += fy;
        otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY -= fy;
      }
       else {
        lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$addForceLink__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_BaseSpringNode_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(otherNode, 93), subtree);
      }
    }
  }
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$processTreeNode__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2V(node, subtree){
  var fx, fy, i, len, length_0, otherNode, threshold, vx, vy, w;
  length_0 = node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList.java_util_ArrayList_array.length;
  for (i = 0; i < length_0; i++) {
    otherNode = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(node.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList, i), 129);
    vx = subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_x - otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
    vy = subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_y - otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
    len = vx * vx + vy * vy;
    threshold = subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate;
    com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(otherNode, 93) && (threshold += com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(otherNode, 93).lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate);
    if (threshold < len) {
      w = subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_r * otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_r / (len * java_lang_Math_sqrt__DD(len));
      fx = vx * w;
      subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX += fx;
      otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX -= fx;
      fy = vy * w;
      subtree.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY += fy;
      otherNode.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY -= fy;
    }
     else {
      com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(otherNode, 92)?java_util_ArrayList_$add__Ljava_util_ArrayList_2Ljava_lang_Object_2Z(subtree.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList, otherNode):lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$addForceLink__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2Llv_lumii_layoutengine_springembedder_RepulsiveTreeNode_2Llv_lumii_layoutengine_springembedder_BaseSpringNode_2V(com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(otherNode, 93), subtree);
    }
  }
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_RepulsiveKFTree__V(){
}

function lv_lumii_layoutengine_springembedder_RepulsiveKFTree_swap___3Llv_lumii_layoutengine_springembedder_BaseSpringNode_2IIV(arr, a, b){
  var p;
  p = arr[a];
  arr[a] = arr[b];
  arr[b] = p;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(260, 1, {}, lv_lumii_layoutengine_springembedder_RepulsiveKFTree_RepulsiveKFTree__V);
_.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_temperature = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1RepulsiveKFTree_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_85, 'RepulsiveKFTree', 260);
function lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_RepulsiveTreeNode__V(){
  this.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_forceLinkList = new java_util_ArrayList_ArrayList__V;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(93, 129, {129:1, 93:1}, lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_RepulsiveTreeNode__V);
_.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_leafCount = 0;
_.lv_lumii_layoutengine_springembedder_RepulsiveTreeNode_sizeEstimate = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1RepulsiveTreeNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_85, 'RepulsiveTreeNode', 93);
function lv_lumii_layoutengine_springembedder_SpringEdge_SpringEdge__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(158, 1, {158:1}, lv_lumii_layoutengine_springembedder_SpringEdge_SpringEdge__V);
_.lv_lumii_layoutengine_springembedder_SpringEdge_K = 0;
_.lv_lumii_layoutengine_springembedder_SpringEdge_dx = 0;
_.lv_lumii_layoutengine_springembedder_SpringEdge_dy = 0;
_.lv_lumii_layoutengine_springembedder_SpringEdge_from = 0;
_.lv_lumii_layoutengine_springembedder_SpringEdge_len = 0;
_.lv_lumii_layoutengine_springembedder_SpringEdge_strength = 0;
_.lv_lumii_layoutengine_springembedder_SpringEdge_to = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1SpringEdge_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_85, 'SpringEdge', 158);
function lv_lumii_layoutengine_springembedder_SpringNode_SpringNode__V(){
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(92, 129, {129:1, 92:1}, lv_lumii_layoutengine_springembedder_SpringNode_SpringNode__V);
_.lv_lumii_layoutengine_springembedder_SpringNode_dx = 0;
_.lv_lumii_layoutengine_springembedder_SpringNode_dy = 0;
_.lv_lumii_layoutengine_springembedder_SpringNode_dz = 0;
_.lv_lumii_layoutengine_springembedder_SpringNode_fsum = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1SpringNode_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_85, 'SpringNode', 92);
function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$adjustNodeRadius__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2D(this$static){
  var R, deg, e, enode, i, i0, i1, strength, sum, w;
  deg = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, 7, 1);
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edgeCount; i0++) {
    ++deg[this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i0].lv_lumii_layoutengine_springembedder_SpringEdge_from];
    ++deg[this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i0].lv_lumii_layoutengine_springembedder_SpringEdge_to];
  }
  for (i1 = 0; i1 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount; i1++) {
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1].lv_lumii_layoutengine_springembedder_SpringNode_fsum = 0;
    sum = 0;
    e = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodestart[i1];
    while (e >= 0) {
      enode = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_enodes[e];
      sum += deg[enode];
      e = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_next[e];
    }
    w = java_lang_Math_sqrt__DD(sum);
    w > 4 && (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1].lv_lumii_layoutengine_springembedder_BaseSpringNode_r += (w - 4) * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1].lv_lumii_layoutengine_springembedder_BaseSpringNode_r / 4 * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeDegreeModifier);
  }
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature = 0;
  for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edgeCount; i++) {
    e = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i];
    e.lv_lumii_layoutengine_springembedder_SpringEdge_from < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount && e.lv_lumii_layoutengine_springembedder_SpringEdge_to < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount?(e.lv_lumii_layoutengine_springembedder_SpringEdge_len = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[e.lv_lumii_layoutengine_springembedder_SpringEdge_from].lv_lumii_layoutengine_springembedder_BaseSpringNode_r + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[e.lv_lumii_layoutengine_springembedder_SpringEdge_to].lv_lumii_layoutengine_springembedder_BaseSpringNode_r):(e.lv_lumii_layoutengine_springembedder_SpringEdge_len = 10);
    strength = java_lang_Math_min__DDD(20, e.lv_lumii_layoutengine_springembedder_SpringEdge_strength);
    e.lv_lumii_layoutengine_springembedder_SpringEdge_K = strength * 30 / e.lv_lumii_layoutengine_springembedder_SpringEdge_len;
    e.lv_lumii_layoutengine_springembedder_SpringEdge_from == e.lv_lumii_layoutengine_springembedder_SpringEdge_to && (e.lv_lumii_layoutengine_springembedder_SpringEdge_K = 0);
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[e.lv_lumii_layoutengine_springembedder_SpringEdge_from].lv_lumii_layoutengine_springembedder_SpringNode_fsum += e.lv_lumii_layoutengine_springembedder_SpringEdge_K;
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[e.lv_lumii_layoutengine_springembedder_SpringEdge_to].lv_lumii_layoutengine_springembedder_SpringNode_fsum += e.lv_lumii_layoutengine_springembedder_SpringEdge_K;
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature += e.lv_lumii_layoutengine_springembedder_SpringEdge_len;
  }
  if (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edgeCount > 0) {
    R = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature / 5;
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature /= this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edgeCount * 30;
  }
   else {
    R = 20;
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature = 1;
  }
  return R;
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$calculateForce__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2IV(this$static, nnum){
  var dx, dy, dz, e, edge, f, fsum, kz, len, n1, n2, sign, vx, vy, vz;
  n1 = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[nnum];
  dx = 0;
  dy = 0;
  dz = 0;
  e = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodestart[nnum];
  while (e >= 0) {
    n2 = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_enodes[e]];
    edge = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[e >> 1];
    sign = ((e & 1) << 1) - 1;
    vx = n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_x - n2.lv_lumii_layoutengine_springembedder_BaseSpringNode_x + edge.lv_lumii_layoutengine_springembedder_SpringEdge_dx * sign;
    vy = n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_y - n2.lv_lumii_layoutengine_springembedder_BaseSpringNode_y + edge.lv_lumii_layoutengine_springembedder_SpringEdge_dy * sign;
    vz = n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z - n2.lv_lumii_layoutengine_springembedder_BaseSpringNode_z;
    len = Math.sqrt(vx * vx + vy * vy + vz * vz);
    len < $intern_37 && (len = $intern_37);
    f = (edge.lv_lumii_layoutengine_springembedder_SpringEdge_len - len) * edge.lv_lumii_layoutengine_springembedder_SpringEdge_K / len;
    dx += f * vx;
    dy += f * vy;
    dz += f * vz;
    e = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_next[e];
  }
  dx += n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX * 15;
  dy += n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY * 15;
  dz += n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceZ * 15;
  kz = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 / 7;
  dz -= n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z * kz;
  fsum = 1 / (n1.lv_lumii_layoutengine_springembedder_SpringNode_fsum + kz);
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[nnum][0] = dx;
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[nnum][1] = dy;
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[nnum][2] = dz;
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[nnum][3] = fsum;
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$ensureConstraints__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static){
  var constr;
  if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints || this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 0)
    return;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints, 39)) {
    constr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints, 39);
    lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$ensureConstraintsY__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2V(this$static, constr);
    lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$ensureConstraintsX__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2V(this$static, constr);
  }
   else {
    throw new java_lang_RuntimeException_RuntimeException__Ljava_lang_String_2V('not implemented constraint type');
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$ensureConstraintsX__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2V(this$static, constr){
  var column, columnCount, dx, funcmin, i, i0, i1, i2, i3, i4, n, x_0;
  columnCount = constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length;
  if (columnCount > 1) {
    funcmin = new lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount + columnCount - 1);
    for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i0++) {
      funcmin.addQuadraticConstantDifference__IDDV(i0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0].lv_lumii_layoutengine_springembedder_BaseSpringNode_x, 1);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(funcmin, i0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0].lv_lumii_layoutengine_springembedder_BaseSpringNode_x);
    }
    for (i1 = 0; i1 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount; i1++) {
      column = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumn__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2(constr, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_boxes[i1]);
      if (column) {
        column.java_lang_Integer_value > 1 && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(funcmin, column.java_lang_Integer_value - 2 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, i1, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1].lv_lumii_layoutengine_springembedder_BaseSpringNode_r + lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnBorderSpacing__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constr, column.java_lang_Integer_value - 1));
        column.java_lang_Integer_value < columnCount && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(funcmin, i1, column.java_lang_Integer_value - 1 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1].lv_lumii_layoutengine_springembedder_BaseSpringNode_r + lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnBorderSpacing__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constr, column.java_lang_Integer_value));
      }
    }
    for (i2 = 0; i2 < columnCount - 1; i2++) {
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(funcmin, i2 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constr, i2 + 1));
    }
    for (i3 = 0; i3 < columnCount - 2; i3++) {
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(funcmin, i3 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, i3 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount + 1, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, i3 + 2 - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
    }
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setEpsilon__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2DV(funcmin, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_epsilon);
    x_0 = funcmin.performOptimization___3D();
    for (i4 = 0; i4 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i4++) {
      n = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i4];
      dx = x_0[i4] - n.lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
      (dx <= 0?0 - dx:dx) > n.lv_lumii_layoutengine_springembedder_BaseSpringNode_r?(n.lv_lumii_layoutengine_springembedder_SpringNode_dx = 0):(n.lv_lumii_layoutengine_springembedder_SpringNode_dx += dx / 2);
      n.lv_lumii_layoutengine_springembedder_BaseSpringNode_x = x_0[i4];
    }
    for (i = 0; i < columnCount - 1; i++) {
      lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setColumnRight__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(constr, i + 1, x_0[i + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount]);
    }
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$ensureConstraintsY__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2V(this$static, constr){
  var dy, funcmin, i, i0, i1, i2, i3, i4, n, row, rowCount, y_0;
  rowCount = constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length;
  if (rowCount > 1) {
    funcmin = new lv_lumii_layoutengine_funcmin_QuadraticOptimizer_QuadraticOptimizer__IV(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount + rowCount - 1);
    for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i0++) {
      funcmin.addQuadraticConstantDifference__IDDV(i0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0].lv_lumii_layoutengine_springembedder_BaseSpringNode_y, 1);
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(funcmin, i0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0].lv_lumii_layoutengine_springembedder_BaseSpringNode_y);
    }
    for (i1 = 0; i1 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount; i1++) {
      row = lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRow__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2Llv_lumii_layoutengine_Element_2Ljava_lang_Integer_2(constr, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_boxes[i1]);
      if (row) {
        row.java_lang_Integer_value > 1 && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(funcmin, row.java_lang_Integer_value - 2 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, i1, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1].lv_lumii_layoutengine_springembedder_BaseSpringNode_r + lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBorderSpacing__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constr, row.java_lang_Integer_value - 1));
        row.java_lang_Integer_value < rowCount && lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(funcmin, i1, row.java_lang_Integer_value - 1 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1].lv_lumii_layoutengine_springembedder_BaseSpringNode_r + lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBorderSpacing__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constr, row.java_lang_Integer_value));
      }
    }
    for (i2 = 0; i2 < rowCount - 1; i2++) {
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setVariable__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IDV(funcmin, i2 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$getRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2ID(constr, i2 + 1));
    }
    for (i3 = 0; i3 < rowCount - 2; i3++) {
      lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$addInequality__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2IIDV(funcmin, i3 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, i3 + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount + 1, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, i3 + 2 - 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_distance);
    }
    lv_lumii_layoutengine_funcmin_QuadraticOptimizer_$setEpsilon__Llv_lumii_layoutengine_funcmin_QuadraticOptimizer_2DV(funcmin, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_epsilon);
    y_0 = funcmin.performOptimization___3D();
    for (i4 = 0; i4 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i4++) {
      n = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i4];
      dy = y_0[i4] - n.lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
      (dy <= 0?0 - dy:dy) > n.lv_lumii_layoutengine_springembedder_BaseSpringNode_r?(n.lv_lumii_layoutengine_springembedder_SpringNode_dy = 0):(n.lv_lumii_layoutengine_springembedder_SpringNode_dy += dy / 2);
      n.lv_lumii_layoutengine_springembedder_BaseSpringNode_y = y_0[i4];
    }
    for (i = 0; i < rowCount - 1; i++) {
      lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_$_1setRowBottom__Llv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_2IDV(constr, i + 1, y_0[i + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount]);
    }
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$initLayout__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2D_3D_3D_3D_3I_3IZ_3ZD_3DV(this$static, nodeX, nodeY, nodeRadius, edgeSourceId, edgeTargetId, edgeStrength){
  var i, i0;
  if (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount <= 0) {
    return;
  }
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked = null;
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeDegreeModifier = 1;
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked == null && (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, 8, 1));
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i0++) {
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0].lv_lumii_layoutengine_springembedder_BaseSpringNode_r = nodeRadius[i0];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0].lv_lumii_layoutengine_springembedder_BaseSpringNode_r < 1 && (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0].lv_lumii_layoutengine_springembedder_BaseSpringNode_r = 1);
  }
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$transferEdges__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2_3I_3I_3DV(this$static, edgeSourceId, edgeTargetId, edgeStrength);
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_incremental = false;
  for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i++) {
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_x = nodeX[i];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_y = nodeY[i];
  }
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutationN = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1SpringNode_12_1classLit, $intern_14, 92, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount, 0, 1);
  java_lang_System_arraycopy__Ljava_lang_Object_2ILjava_lang_Object_2IIV(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes, 0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutationN, 0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount);
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$prepareGraph__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static);
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$iterations__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static){
  var finalTemperature, i1, iter, step;
  step = com_google_gwt_lang_Cast_round_1int__DI(2 * java_lang_Math_sqrt__DD(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount) + 10);
  iter = step * 2;
  if (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_incremental) {
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature = 10 * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature;
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 = 0.7;
  }
   else {
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature = (java_lang_Math_sqrt__DD(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount) * 2 + 20) * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature;
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 = 0.1;
  }
  finalTemperature = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature;
  if (!!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints && this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() != 0) {
    step = com_google_gwt_lang_Cast_round_1int__DI(step * 1.5);
    finalTemperature *= 0.5;
  }
  i1 = 3;
  while (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature > finalTemperature) {
    if (iter-- <= 0) {
      iter = ~~(step * 3 / i1++);
      this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature / 1.5 - 0.5;
      this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature < 20 * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature && (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 * 1.5 + 0.1);
    }
    lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$relax__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static);
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$layout__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2D_3D_3D_3D_3I_3IZ_3ZD_3DILjava_util_List_2Llv_lumii_layoutengine_LayoutConstraints_2Ljava_util_List_2V(this$static, nodeX, nodeY, nodeRadius, edgeSourceId, edgeTargetId, edgeStrength, realNodeCount, boxes, constr, layoutLines){
  var i;
  if (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount <= 0) {
    return;
  }
  if (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount == 1) {
    nodeX[0] = nodeY[0] = 0;
    return;
  }
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_layoutLines = layoutLines;
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_boxes = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$toArray__Ljava_util_ArrayList_2_3Ljava_lang_Object_2_3Ljava_lang_Object_2(boxes, com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1AbstractContainer_12_1classLit, {5:1, 6:1, 8:1, 307:1}, 12, 0, 0, 1)), 307);
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints = constr;
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount = realNodeCount;
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$initLayout__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2D_3D_3D_3D_3I_3IZ_3ZD_3DV(this$static, nodeX, nodeY, nodeRadius, edgeSourceId, edgeTargetId, edgeStrength);
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$resetGrid__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static);
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$iterations__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static);
  for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i++) {
    if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked[i]) {
      nodeX[i] = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_x;
      nodeY[i] = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_y;
    }
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$moveNode__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2IV(this$static, nnum){
  var dx, dy, dz, e, edge, f, fsum, kz, len, n1, n2, sign, vx, vy, vz;
  n1 = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[nnum];
  dx = n1.lv_lumii_layoutengine_springembedder_SpringNode_dx * 0.5;
  dy = n1.lv_lumii_layoutengine_springembedder_SpringNode_dy * 0.5;
  dz = n1.lv_lumii_layoutengine_springembedder_SpringNode_dz * 0.5;
  e = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_nodestart[nnum];
  while (e >= 0) {
    n2 = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_enodes[e]];
    edge = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[e >> 1];
    sign = ((e & 1) << 1) - 1;
    vx = n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_x - n2.lv_lumii_layoutengine_springembedder_BaseSpringNode_x + edge.lv_lumii_layoutengine_springembedder_SpringEdge_dx * sign;
    vy = n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_y - n2.lv_lumii_layoutengine_springembedder_BaseSpringNode_y + edge.lv_lumii_layoutengine_springembedder_SpringEdge_dy * sign;
    vz = n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z - n2.lv_lumii_layoutengine_springembedder_BaseSpringNode_z;
    Math.sqrt(vx * vx + vy * vy + vz * vz);
    f = -0.1 * edge.lv_lumii_layoutengine_springembedder_SpringEdge_K;
    dx += f * vx;
    dy += f * vy;
    dz += f * vz;
    e = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g.lv_lumii_layoutengine_springembedder_GraphAdjacency_next[e];
  }
  dx += n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceX * 15;
  dy += n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceY * 15;
  dz += n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_repulsiveForceZ * 15;
  dx -= n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_x * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_graphSizeWeight;
  dy -= n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_y * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_graphSizeWeight;
  kz = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 / 7;
  dz -= n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z * kz;
  n1.lv_lumii_layoutengine_springembedder_SpringNode_dx = dx;
  n1.lv_lumii_layoutengine_springembedder_SpringNode_dy = dy;
  n1.lv_lumii_layoutengine_springembedder_SpringNode_dz = dz;
  fsum = 1 / (n1.lv_lumii_layoutengine_springembedder_SpringNode_fsum + kz);
  dx *= fsum;
  dy *= fsum;
  dz *= fsum;
  if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_incremental) {
    len = dx * dx + dy * dy + dz * dz;
    if (len < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature && len > 0.001) {
      len = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature / java_lang_Math_sqrt__DD(len);
      dx *= len;
      dy *= len;
      dz *= len;
    }
  }
  if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_incremental) {
    n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_x += (java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_randomGenerator) - 0.5) * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature * 0.5;
    n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_y += (java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_randomGenerator) - 0.5) * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature * 0.5;
    n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z += (java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_randomGenerator) - 0.5) * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature * 0.5;
  }
  n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_x += dx * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor;
  n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_y += dy * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor;
  n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z += dz * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor;
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$moveNodes__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static){
  var curLen, dx, dy, dz, freezedNodes, fsum, i, i0, i1, len, n1, scal;
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i0++) {
    lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$calculateForce__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2IV(this$static, i0);
  }
  scal = 0;
  len = 0;
  freezedNodes = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Z_1classLit, $intern_54, 0, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount, 8, 1);
  for (i1 = 0; i1 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i1++) {
    if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked[i1]) {
      n1 = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i1];
      dx = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][0];
      dy = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][1];
      dz = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][2];
      fsum = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][3];
      n1.lv_lumii_layoutengine_springembedder_SpringNode_dx = dx;
      n1.lv_lumii_layoutengine_springembedder_SpringNode_dy = dy;
      n1.lv_lumii_layoutengine_springembedder_SpringNode_dz = dz;
      curLen = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][0] * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][0] + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][1] * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][1] + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][2] * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][2];
      if (curLen * fsum * fsum > this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature * 0.05 * 0.05) {
        len += curLen;
        scal += this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_oldForce[i1][0] * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][0] + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_oldForce[i1][1] * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][1] + this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_oldForce[i1][2] * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i1][2];
      }
       else {
        freezedNodes[i1] = true;
      }
    }
  }
  scal > 1.0E-7?(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor *= 1.2472135954617454):scal < -1.0E-7 && (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor /= 1.4);
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor = java_lang_Math_min__DDD(1, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor);
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor = java_lang_Math_max__DDD($intern_76, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor);
  for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i++) {
    n1 = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i];
    fsum = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i][3];
    if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked[i] && !freezedNodes[i]) {
      n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_x += n1.lv_lumii_layoutengine_springembedder_SpringNode_dx * fsum * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor;
      n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_y += n1.lv_lumii_layoutengine_springembedder_SpringNode_dy * fsum * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor;
      n1.lv_lumii_layoutengine_springembedder_BaseSpringNode_z += n1.lv_lumii_layoutengine_springembedder_SpringNode_dz * fsum * this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor;
    }
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_oldForce[i][0] = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i][0];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_oldForce[i][1] = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i][1];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_oldForce[i][2] = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force[i][2];
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$prepareGraph__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static){
  var R, i, i0, sumR;
  for (i0 = 0; i0 < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edgeCount; i0++) {
    lv_lumii_layoutengine_springembedder_GraphAdjacency_$addUndirectEdge__Llv_lumii_layoutengine_springembedder_GraphAdjacency_2IIV(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i0].lv_lumii_layoutengine_springembedder_SpringEdge_from, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i0].lv_lumii_layoutengine_springembedder_SpringEdge_to);
  }
  R = lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$adjustNodeRadius__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2D(this$static);
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$randPerm__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2IV(this$static, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount);
  sumR = 0;
  for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i++) {
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_z = 0;
    sumR += this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_r;
    if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked[i] && !this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_incremental) {
      this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_x = R * java_lang_Math_cos__DD(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation[i] * 2 * $intern_86 / this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount);
      this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_y = R * java_lang_Math_sin__DD(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation[i] * 2 * $intern_86 / this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount);
      this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_BaseSpringNode_z = java_util_Random_$nextDouble__Ljava_util_Random_2D(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_randomGenerator) - 0.5;
    }
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_SpringNode_dx = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_SpringNode_dy = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i].lv_lumii_layoutengine_springembedder_SpringNode_dz = 0;
  }
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_graphSizeWeight = 0.02 / Math.sqrt(R + 100);
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_epsilon = java_lang_Math_max__DDD(1.0E-6, sumR / this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount * 0.001);
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$randPerm__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2IV(this$static, n){
  var i, i0, i1, tmp;
  for (i0 = 0; i0 < n; i0++) {
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation[i0] = i0;
  }
  for (i = 0; i < n; i++) {
    i1 = java_util_Random_$nextInt__Ljava_util_Random_2II(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_randomGenerator, n - i) + i;
    tmp = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation[i];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation[i] = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation[i1];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation[i1] = tmp;
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$randomNodePermutation__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static){
  var i, i1, tmp;
  for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount; i++) {
    i1 = java_util_Random_$nextInt__Ljava_util_Random_2II(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_randomGenerator, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount - i) + i;
    tmp = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutationN[i];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutationN[i] = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutationN[i1];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutationN[i1] = tmp;
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$relax__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static){
  var i;
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$randomNodePermutation__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static);
  this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_repulsiveForceTree.lv_lumii_layoutengine_springembedder_RepulsiveKFTree_temperature = this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 / 4;
  lv_lumii_layoutengine_springembedder_RepulsiveKFTree_$buildTree__Llv_lumii_layoutengine_springembedder_RepulsiveKFTree_2_3Llv_lumii_layoutengine_springembedder_SpringNode_2IV(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_repulsiveForceTree, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutationN, this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount);
  if (this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_incremental) {
    lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$moveNodes__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static);
  }
   else {
    for (i = 0; i < this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount; i++) {
      this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_isNodeLocked[i] || lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$moveNode__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2IV(this$static, i);
    }
  }
  lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$ensureConstraints__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static);
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$resetGrid__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2V(this$static){
  var constr, i, i0;
  if (!this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints || this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints.getType__Llv_lumii_layoutengine_LayoutConstraints$ConstraintType_2() == 0)
    return;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints, 39)) {
    constr = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_constraints, 39);
    for (i0 = 0; i0 < constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints.java_util_ArrayList_array.length - 1; i0++) {
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_verticalConstraints, i0 + 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = 0;
    }
    for (i = 0; i < constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints.java_util_ArrayList_array.length - 1; i++) {
      com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(java_util_ArrayList_$get__Ljava_util_ArrayList_2ILjava_lang_Object_2(constr.lv_lumii_layoutengine_LayoutConstraints$GridLayoutConstraints_horizontalConstraints, i + 1), 27).lv_lumii_layoutengine_LayoutConstraints$ConstraintLine_pos = 0;
    }
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_$transferEdges__Llv_lumii_layoutengine_springembedder_TimedSpringEmbedder_2_3I_3I_3DV(this$static, cB1, cB2, edgeStrength){
  var e, e$iterator, i, sx, sy, tx, ty;
  i = 0;
  for (e$iterator = new java_util_AbstractList$IteratorImpl_AbstractList$IteratorImpl__Ljava_util_AbstractList_2V(this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_layoutLines); e$iterator.java_util_AbstractList$IteratorImpl_i < e$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I();) {
    e = (com_google_gwt_core_shared_impl_InternalPreconditions_checkCriticalElement__ZV(e$iterator.java_util_AbstractList$IteratorImpl_i < e$iterator.java_util_AbstractList$IteratorImpl_this$01.size__I()) , com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(e$iterator.java_util_AbstractList$IteratorImpl_this$01.get__ILjava_lang_Object_2(e$iterator.java_util_AbstractList$IteratorImpl_last = e$iterator.java_util_AbstractList$IteratorImpl_i++), 72));
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i].lv_lumii_layoutengine_springembedder_SpringEdge_strength = edgeStrength[i];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i].lv_lumii_layoutengine_springembedder_SpringEdge_from = cB1[i];
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i].lv_lumii_layoutengine_springembedder_SpringEdge_to = cB2[i];
    sx = lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D(e.lv_lumii_layoutengine_util_LayoutLine_endElement) - lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D(lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(e.lv_lumii_layoutengine_util_LayoutLine_originalLine));
    sy = lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D(e.lv_lumii_layoutengine_util_LayoutLine_endElement) - lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D(lv_lumii_layoutengine_Line_$getEnd__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(e.lv_lumii_layoutengine_util_LayoutLine_originalLine));
    tx = lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D(e.lv_lumii_layoutengine_util_LayoutLine_startElement) - lv_lumii_layoutengine_AbstractContainer_$getCenterX__Llv_lumii_layoutengine_AbstractContainer_2D(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(e.lv_lumii_layoutengine_util_LayoutLine_originalLine));
    ty = lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D(e.lv_lumii_layoutengine_util_LayoutLine_startElement) - lv_lumii_layoutengine_AbstractContainer_$getCenterY__Llv_lumii_layoutengine_AbstractContainer_2D(lv_lumii_layoutengine_Line_$getStart__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Element_2(e.lv_lumii_layoutengine_util_LayoutLine_originalLine));
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i].lv_lumii_layoutengine_springembedder_SpringEdge_dx = tx - sx;
    this$static.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i].lv_lumii_layoutengine_springembedder_SpringEdge_dy = ty - sy;
    ++i;
  }
}

function lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_TimedSpringEmbedder__IIIV(nodes, edges){
  var i, i0;
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_repulsiveForceTree = new lv_lumii_layoutengine_springembedder_RepulsiveKFTree_RepulsiveKFTree__V;
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount = nodes;
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edgeCount = edges;
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_force = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, [$intern_14, $intern_17], [15, 0], 7, [nodes, 4], 2);
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_oldForce = com_google_gwt_lang_Array_initDims__Ljava_lang_Class_2_3Lcom_google_gwt_core_client_JavaScriptObject_2_3Lcom_google_gwt_core_client_JavaScriptObject_2I_3IILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_D_1classLit, [$intern_14, $intern_17], [15, 0], 7, [nodes, 3], 2);
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1SpringNode_12_1classLit, $intern_14, 92, nodes, 0, 1);
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1SpringEdge_12_1classLit, $intern_14, 158, edges, 0, 1);
  for (i0 = 0; i0 < nodes; i0++) {
    this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodes[i0] = new lv_lumii_layoutengine_springembedder_SpringNode_SpringNode__V;
  }
  for (i = 0; i < edges; i++) {
    this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edges[i] = new lv_lumii_layoutengine_springembedder_SpringEdge_SpringEdge__V;
  }
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodePermutation = com_google_gwt_lang_Array_initDim__Ljava_lang_Class_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2IIILjava_lang_Object_2(com_google_gwt_lang_ClassLiteralHolder_I_1classLit, $intern_56, 0, nodes, 7, 1);
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_g = new lv_lumii_layoutengine_springembedder_GraphAdjacency_GraphAdjacency__IIV(nodes, edges * 2);
  this.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_randomGenerator = new java_util_Random_Random__JV;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(245, 1, {}, lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_TimedSpringEmbedder__IIIV);
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_edgeCount = 0;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_epsilon = $intern_37;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_forceReductionFactor = 1;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_graphSizeWeight = 0;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_incremental = false;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeCount = 0;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_nodeDegreeModifier = 1;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_realNodesCount = 0;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature = 0;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_temperature1 = 0;
_.lv_lumii_layoutengine_springembedder_TimedSpringEmbedder_unitTemperature = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1springembedder_1TimedSpringEmbedder_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_85, 'TimedSpringEmbedder', 245);
function lv_lumii_layoutengine_universalLayout_BoxInGrid_BoxInGrid__Llv_lumii_layoutengine_AbstractContainer_2V(box1){
  var bounds;
  this.lv_lumii_layoutengine_universalLayout_BoxInGrid_box = box1;
  this.lv_lumii_layoutengine_universalLayout_BoxInGrid_lines = new java_util_ArrayList_ArrayList__V;
  this.lv_lumii_layoutengine_universalLayout_BoxInGrid_inGrid = false;
  bounds = this.lv_lumii_layoutengine_universalLayout_BoxInGrid_box.getBounds__Ljava_awt_geom_Rectangle2D$Double_2();
  this.lv_lumii_layoutengine_universalLayout_BoxInGrid_hor = bounds.java_awt_geom_Rectangle2D$Double_width;
  this.lv_lumii_layoutengine_universalLayout_BoxInGrid_vert = bounds.java_awt_geom_Rectangle2D$Double_height;
  this.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow = -1;
  this.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol = -1;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(80, 1, {80:1}, lv_lumii_layoutengine_universalLayout_BoxInGrid_BoxInGrid__Llv_lumii_layoutengine_AbstractContainer_2V);
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridCol = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_gridRow = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_hor = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_inGrid = false;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_nH = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_nV = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_posInOpt = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_vert = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_x = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_xd = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_y = 0;
_.lv_lumii_layoutengine_universalLayout_BoxInGrid_yd = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1universalLayout_1BoxInGrid_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_87, 'BoxInGrid', 80);
function lv_lumii_layoutengine_universalLayout_Line_$setRealEndPoint__Llv_lumii_layoutengine_universalLayout_Line_2DDV(this$static, realX, realY){
  if (this$static.lv_lumii_layoutengine_universalLayout_Line_endIsOriginal)
  ;
  else {
    this$static.lv_lumii_layoutengine_universalLayout_Line_realEndX = realX;
    this$static.lv_lumii_layoutengine_universalLayout_Line_realEndY = realY;
  }
}

function lv_lumii_layoutengine_universalLayout_Line_$setRealStartPoint__Llv_lumii_layoutengine_universalLayout_Line_2DDV(this$static, realX, realY){
  if (this$static.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal)
  ;
  else {
    this$static.lv_lumii_layoutengine_universalLayout_Line_realStartX = realX;
    this$static.lv_lumii_layoutengine_universalLayout_Line_realStartY = realY;
  }
}

function lv_lumii_layoutengine_universalLayout_Line_Line__Llv_lumii_layoutengine_universalLayout_BoxInGrid_2ZZV(connectedBoxIG, startIsOriginal, endIsOriginal){
  this.lv_lumii_layoutengine_universalLayout_Line_boxIG = connectedBoxIG;
  this.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal = startIsOriginal;
  this.lv_lumii_layoutengine_universalLayout_Line_endIsOriginal = endIsOriginal;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(50, 1, {50:1}, lv_lumii_layoutengine_universalLayout_Line_Line__Llv_lumii_layoutengine_universalLayout_BoxInGrid_2ZZV);
_.lv_lumii_layoutengine_universalLayout_Line_endIsOriginal = false;
_.lv_lumii_layoutengine_universalLayout_Line_endX = 0;
_.lv_lumii_layoutengine_universalLayout_Line_endY = 0;
_.lv_lumii_layoutengine_universalLayout_Line_realEndX = 0;
_.lv_lumii_layoutengine_universalLayout_Line_realEndY = 0;
_.lv_lumii_layoutengine_universalLayout_Line_realStartX = 0;
_.lv_lumii_layoutengine_universalLayout_Line_realStartY = 0;
_.lv_lumii_layoutengine_universalLayout_Line_startIsOriginal = false;
_.lv_lumii_layoutengine_universalLayout_Line_startX = 0;
_.lv_lumii_layoutengine_universalLayout_Line_startY = 0;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1universalLayout_1Line_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_87, 'Line', 50);
function lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_SimpleOrthogonalSegment__DDDV(pos, start_0, end){
  lv_lumii_layoutengine_obstacleGraph_Segment_Segment__DDDV.call(this, pos, start_0, end);
  this.lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_boxIG = null;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(131, 59, {29:1, 59:1, 131:1}, lv_lumii_layoutengine_universalLayout_SimpleOrthogonalSegment_SimpleOrthogonalSegment__DDDV);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1universalLayout_1SimpleOrthogonalSegment_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_87, 'SimpleOrthogonalSegment', 131);
function lv_lumii_layoutengine_util_LayoutLine_LayoutLine__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V(originalLine, startElement, endElement){
  this.lv_lumii_layoutengine_util_LayoutLine_originalLine = originalLine;
  this.lv_lumii_layoutengine_util_LayoutLine_startElement = startElement;
  this.lv_lumii_layoutengine_util_LayoutLine_endElement = endElement;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(72, 1, {72:1}, lv_lumii_layoutengine_util_LayoutLine_LayoutLine__Llv_lumii_layoutengine_Line_2Llv_lumii_layoutengine_Container_2Llv_lumii_layoutengine_Container_2V);
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1util_1LayoutLine_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_88, 'LayoutLine', 72);
function lv_lumii_layoutengine_util_Pair_$compareTo__Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2I(this$static, o){
  var cmp;
  cmp = java_lang_String_compareTo_1Ljava_1lang_1Object_1_1I_1_1devirtual$__Ljava_lang_Comparable_2Ljava_lang_Object_2I(this$static.lv_lumii_layoutengine_util_Pair_first, o.lv_lumii_layoutengine_util_Pair_first);
  return cmp == 0?java_lang_String_compareTo_1Ljava_1lang_1Object_1_1I_1_1devirtual$__Ljava_lang_Comparable_2Ljava_lang_Object_2I(this$static.lv_lumii_layoutengine_util_Pair_second, o.lv_lumii_layoutengine_util_Pair_second):cmp;
}

function lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V(first, second){
  this.lv_lumii_layoutengine_util_Pair_first = first;
  this.lv_lumii_layoutengine_util_Pair_second = second;
}

com_google_gwt_lang_JavaClassHierarchySetupUtil_defineClass__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(18, 1, {29:1, 18:1}, lv_lumii_layoutengine_util_Pair_Pair__Ljava_lang_Comparable_2Ljava_lang_Comparable_2V);
_.compareTo__Ljava_lang_Object_2I = function lv_lumii_layoutengine_util_Pair_compareTo__Ljava_lang_Object_2I(o){
  return lv_lumii_layoutengine_util_Pair_$compareTo__Llv_lumii_layoutengine_util_Pair_2Llv_lumii_layoutengine_util_Pair_2I(this, com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(o, 18));
}
;
_.equals__Ljava_lang_Object_2Z$ = function lv_lumii_layoutengine_util_Pair_equals__Ljava_lang_Object_2Z(obj){
  var pair;
  if (com_google_gwt_lang_Cast_instanceOf__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(obj, 18)) {
    pair = com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Object_2(obj, 18);
    if (java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(pair.lv_lumii_layoutengine_util_Pair_first) == java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(this.lv_lumii_layoutengine_util_Pair_first) && java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(pair.lv_lumii_layoutengine_util_Pair_second) == java_lang_Object_getClass_1_1Ljava_1lang_1Class_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Class_2(this.lv_lumii_layoutengine_util_Pair_second)) {
      return java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_util_Pair_first, pair.lv_lumii_layoutengine_util_Pair_first) && java_lang_Object_equals_1Ljava_1lang_1Object_1_1Z_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_Object_2Z(this.lv_lumii_layoutengine_util_Pair_second, pair.lv_lumii_layoutengine_util_Pair_second);
    }
  }
  return false;
}
;
_.hashCode__I$ = function lv_lumii_layoutengine_util_Pair_hashCode__I(){
  var hash;
  hash = 267 + java_util_Objects_hashCode__Ljava_lang_Object_2I(this.lv_lumii_layoutengine_util_Pair_first);
  hash = 89 * hash + java_util_Objects_hashCode__Ljava_lang_Object_2I(this.lv_lumii_layoutengine_util_Pair_second);
  return hash;
}
;
_.toString__Ljava_lang_String_2$ = function lv_lumii_layoutengine_util_Pair_toString__Ljava_lang_String_2(){
  return '(' + java_lang_Object_toString_1_1Ljava_1lang_1String_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_String_2(this.lv_lumii_layoutengine_util_Pair_first) + ', ' + java_lang_Object_toString_1_1Ljava_1lang_1String_1_1_1devirtual$__Ljava_lang_Object_2Ljava_lang_String_2(this.lv_lumii_layoutengine_util_Pair_second) + ')';
}
;
var com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1util_1Pair_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_88, 'Pair', 18);
var com_google_gwt_lang_ClassLiteralHolder_I_1classLit = java_lang_Class_createForPrimitive__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2('int', 'I'), com_google_gwt_lang_ClassLiteralHolder_Z_1classLit = java_lang_Class_createForPrimitive__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2('boolean', 'Z'), com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1lang_1CollapsedPropertyHolder_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_89, 'CollapsedPropertyHolder', 278), com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1lang_1JavaClassHierarchySetupUtil_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_89, 'JavaClassHierarchySetupUtil', 280), com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1lang_1LongLibBase$LongEmul_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_89, 'LongLibBase/LongEmul', null), com_google_gwt_lang_ClassLiteralHolder_Lcom_1google_1gwt_1lang_1ModuleUtils_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_89, 'ModuleUtils', 283), com_google_gwt_lang_ClassLiteralHolder_B_1classLit = java_lang_Class_createForPrimitive__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2('byte', 'B'), com_google_gwt_lang_ClassLiteralHolder_D_1classLit = java_lang_Class_createForPrimitive__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2('double', 'D'), com_google_gwt_lang_ClassLiteralHolder_J_1classLit = java_lang_Class_createForPrimitive__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2('long', 'J'), com_google_gwt_lang_ClassLiteralHolder_Ljava_1util_1Map$Entry_12_1classLit = java_lang_Class_createForInterface__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_Class_2($intern_22, 'Map/Entry'), com_google_gwt_lang_ClassLiteralHolder_Llv_1lumii_1layoutengine_1InsideLabel_12_1classLit = java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2Ljava_lang_Class_2Ljava_lang_Class_2($intern_52, 'InsideLabel', null);
var $entry = com_google_gwt_lang_ModuleUtils_registerEntry__Lcom_google_gwt_core_client_JavaScriptObject_2();
var gwtOnLoad = gwtOnLoad = com_google_gwt_lang_ModuleUtils_gwtOnLoad__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2V;
com_google_gwt_lang_ModuleUtils_addInitFunctions__V(com_google_gwt_lang_imcs_1_1layoutengine_1_1EntryMethodHolder_init__V);
com_google_gwt_lang_ModuleUtils_setGwtProperty__Ljava_lang_String_2Lcom_google_gwt_core_client_JavaScriptObject_2V('permProps', [[]]);
if (imcs_layoutengine) imcs_layoutengine.onScriptLoad(gwtOnLoad);})();