package reparto_mazapa.keymon.lat;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class c_clientes_subs_0 {


public static RemoteObject  _activity_keypress(RemoteObject __ref,RemoteObject _key) throws Exception{
try {
		Debug.PushSubsStack("Activity_KeyPress (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,219);
if (RapidSub.canDelegate("activity_keypress")) { return __ref.runUserSub(false, "c_clientes","activity_keypress", __ref, _key);}
Debug.locals.put("key", _key);
 BA.debugLineNum = 219;BA.debugLine="Sub Activity_KeyPress (key As Int) As Boolean 'ign";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 221;BA.debugLine="If key=KeyCodes.KEYCODE_BACK Then";
Debug.ShouldStop(268435456);
if (RemoteObject.solveBoolean("=",_key,BA.numberCast(double.class, c_clientes.__c.getField(false,"KeyCodes").getField(true,"KEYCODE_BACK")))) { 
 BA.debugLineNum = 222;BA.debugLine="If entro = 3 And Not(conMapa) Then";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_entro" /*RemoteObject*/ ),BA.NumberToString(3)) && RemoteObject.solveBoolean(".",c_clientes.__c.runMethod(true,"Not",(Object)(__ref.getField(true,"_conmapa" /*RemoteObject*/ ))))) { 
 BA.debugLineNum = 223;BA.debugLine="b_GetDirs.Visible = False";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_b_getdirs" /*RemoteObject*/ ).runMethod(true,"setVisible",c_clientes.__c.getField(true,"False"));
 BA.debugLineNum = 225;BA.debugLine="B4XPage_Created(Root)";
Debug.ShouldStop(1);
__ref.runClassMethod (reparto_mazapa.keymon.lat.c_clientes.class, "_b4xpage_created" /*RemoteObject*/ ,(Object)(__ref.getField(false,"_root" /*RemoteObject*/ )));
 BA.debugLineNum = 226;BA.debugLine="Return True";
Debug.ShouldStop(2);
if (true) return c_clientes.__c.getField(true,"True");
 };
 BA.debugLineNum = 228;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(8);
c_clientes._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Principal")));
 BA.debugLineNum = 229;BA.debugLine="Return False";
Debug.ShouldStop(16);
if (true) return c_clientes.__c.getField(true,"False");
 };
 BA.debugLineNum = 233;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _b_getdirs_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_GetDirs_Click (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,466);
if (RapidSub.canDelegate("b_getdirs_click")) { __ref.runUserSub(false, "c_clientes","b_getdirs_click", __ref); return;}
ResumableSub_b_GetDirs_Click rsub = new ResumableSub_b_GetDirs_Click(null,__ref);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_b_GetDirs_Click extends BA.ResumableSub {
public ResumableSub_b_GetDirs_Click(reparto_mazapa.keymon.lat.c_clientes parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_clientes parent;
RemoteObject _m2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _f = RemoteObject.createImmutable(0);
RemoteObject _k = RemoteObject.declareNull("Object");
RemoteObject _distancia2 = RemoteObject.createImmutable("");
RemoteObject _thisloc1 = RemoteObject.createImmutable("");
RemoteObject _locactual = RemoteObject.createImmutable("");
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _tid = RemoteObject.createImmutable(0);
RemoteObject _tmap = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _tempndd = RemoteObject.createImmutable("");
RemoteObject _indexd = RemoteObject.createImmutable(0);
RemoteObject _estecliente = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _m3 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject group4;
int index4;
int groupLen4;
RemoteObject group38;
int index38;
int groupLen38;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("b_GetDirs_Click (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,466);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 467;BA.debugLine="ProgressDialogShow(\"Calculando distancias y tiemp";
Debug.ShouldStop(262144);
parent.__c.runVoidMethod ("ProgressDialogShow",__ref.getField(false, "ba"),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("Calculando distancias y tiempos ..."))));
 BA.debugLineNum = 468;BA.debugLine="Private m2 As Map";
Debug.ShouldStop(524288);
_m2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m2", _m2);
 BA.debugLineNum = 469;BA.debugLine="Private f As Int = 0";
Debug.ShouldStop(1048576);
_f = BA.numberCast(int.class, 0);Debug.locals.put("f", _f);Debug.locals.put("f", _f);
 BA.debugLineNum = 470;BA.debugLine="For Each k As Object In distOrderedMap.Keys 'Trae";
Debug.ShouldStop(2097152);
if (true) break;

case 1:
//for
this.state = 30;
group4 = __ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ );
index4 = 0;
groupLen4 = group4.runMethod(true,"getSize").<Integer>get();
Debug.locals.put("k", _k);
this.state = 31;
if (true) break;

case 31:
//C
this.state = 30;
if (index4 < groupLen4) {
this.state = 3;
_k = group4.runMethod(false,"Get",index4);Debug.locals.put("k", _k);}
if (true) break;

case 32:
//C
this.state = 31;
index4++;
Debug.locals.put("k", _k);
if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 471;BA.debugLine="m2 = distOrderedMap.Get(k)";
Debug.ShouldStop(4194304);
_m2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_get" /*RemoteObject*/ ,(Object)(_k)));Debug.locals.put("m2", _m2);
 BA.debugLineNum = 472;BA.debugLine="Private distancia2 As String = m2.Get(\"distancia";
Debug.ShouldStop(8388608);
_distancia2 = BA.ObjectToString(_m2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("distancia")))));Debug.locals.put("distancia2", _distancia2);Debug.locals.put("distancia2", _distancia2);
 BA.debugLineNum = 473;BA.debugLine="Private thisLoc1 As String = m2.Get(\"ubicacion\")";
Debug.ShouldStop(16777216);
_thisloc1 = BA.ObjectToString(_m2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("ubicacion")))));Debug.locals.put("thisLoc1", _thisloc1);Debug.locals.put("thisLoc1", _thisloc1);
 BA.debugLineNum = 474;BA.debugLine="Private locActual As String = Tracker.UUGCoords.";
Debug.ShouldStop(33554432);
_locactual = RemoteObject.concat(parent._tracker._uugcoords /*RemoteObject*/ .runMethod(true,"getLongitude"),RemoteObject.createImmutable(","),parent._tracker._uugcoords /*RemoteObject*/ .runMethod(true,"getLatitude"));Debug.locals.put("locActual", _locactual);Debug.locals.put("locActual", _locactual);
 BA.debugLineNum = 475;BA.debugLine="If locActual = \"0,0\" Then 'Si no tenemos ubicaci";
Debug.ShouldStop(67108864);
if (true) break;

case 4:
//if
this.state = 11;
if (RemoteObject.solveBoolean("=",_locactual,BA.ObjectToString("0,0"))) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
 BA.debugLineNum = 476;BA.debugLine="c = Starter.skmt.ExecQuery(\"select * from hist_";
Debug.ShouldStop(134217728);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select * from hist_gps"))));
 BA.debugLineNum = 477;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(268435456);
if (true) break;

case 7:
//if
this.state = 10;
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 9;
}if (true) break;

case 9:
//C
this.state = 10;
 BA.debugLineNum = 478;BA.debugLine="c.Position = 0";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 479;BA.debugLine="locActual = c.GetString(\"hglon\") & \",\" & c.Get";
Debug.ShouldStop(1073741824);
_locactual = RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("hglon"))),RemoteObject.createImmutable(","),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("hglat"))));Debug.locals.put("locActual", _locactual);
 if (true) break;

case 10:
//C
this.state = 11;
;
 BA.debugLineNum = 481;BA.debugLine="c.Close";
Debug.ShouldStop(1);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 if (true) break;

case 11:
//C
this.state = 12;
;
 BA.debugLineNum = 483;BA.debugLine="f = f+1";
Debug.ShouldStop(4);
_f = RemoteObject.solve(new RemoteObject[] {_f,RemoteObject.createImmutable(1)}, "+",1, 1);Debug.locals.put("f", _f);
 BA.debugLineNum = 484;BA.debugLine="If f < 8 Then";
Debug.ShouldStop(8);
if (true) break;

case 12:
//if
this.state = 29;
if (RemoteObject.solveBoolean("<",_f,BA.numberCast(double.class, 8))) { 
this.state = 14;
}if (true) break;

case 14:
//C
this.state = 15;
 BA.debugLineNum = 485;BA.debugLine="If locActual = \"0,0\" Then 'Si todavia no tenemo";
Debug.ShouldStop(16);
if (true) break;

case 15:
//if
this.state = 18;
if (RemoteObject.solveBoolean("=",_locactual,BA.ObjectToString("0,0"))) { 
this.state = 17;
}if (true) break;

case 17:
//C
this.state = 18;
 BA.debugLineNum = 486;BA.debugLine="ToastMessageShow(\"No se pudo obtener la ubicac";
Debug.ShouldStop(32);
parent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("No se pudo obtener la ubicacion actual!!")),(Object)(parent.__c.getField(true,"True")));
 BA.debugLineNum = 487;BA.debugLine="f = 8";
Debug.ShouldStop(64);
_f = BA.numberCast(int.class, 8);Debug.locals.put("f", _f);
 if (true) break;

case 18:
//C
this.state = 19;
;
 BA.debugLineNum = 489;BA.debugLine="Log($\"locActual: ${locActual}, thisLoc1: ${this";
Debug.ShouldStop(256);
parent.__c.runVoidMethod ("LogImpl","35832727",(RemoteObject.concat(RemoteObject.createImmutable("locActual: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_locactual))),RemoteObject.createImmutable(", thisLoc1: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_thisloc1))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 490;BA.debugLine="Wait For(distanciaEntreCoords(distancia2, locAc";
Debug.ShouldStop(512);
parent.__c.runVoidMethod ("WaitFor","complete", __ref.getField(false, "ba"), anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "b_getdirs_click"), __ref.runClassMethod (reparto_mazapa.keymon.lat.c_clientes.class, "_distanciaentrecoords" /*RemoteObject*/ ,(Object)(_distancia2),(Object)(_locactual),(Object)(_thisloc1)));
this.state = 33;
return;
case 33:
//C
this.state = 19;
_r = (RemoteObject) result.getArrayElement(false,RemoteObject.createImmutable(1));Debug.locals.put("r", _r);
;
 BA.debugLineNum = 491;BA.debugLine="LogColor($\"R: ${r.Get(0)} - ${r.Get(1)} - ${r.G";
Debug.ShouldStop(1024);
parent.__c.runVoidMethod ("LogImpl","35832729",(RemoteObject.concat(RemoteObject.createImmutable("R: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_r.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))))),RemoteObject.createImmutable(" - "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_r.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 1))))),RemoteObject.createImmutable(" - "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_r.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2))))),RemoteObject.createImmutable(""))),parent.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 492;BA.debugLine="Private tId As Int = r.Get(0)";
Debug.ShouldStop(2048);
_tid = BA.numberCast(int.class, _r.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))));Debug.locals.put("tId", _tid);Debug.locals.put("tId", _tid);
 BA.debugLineNum = 493;BA.debugLine="Private tMap As Map = distOrderedMap.Get(tId)";
Debug.ShouldStop(4096);
_tmap = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_tmap = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_get" /*RemoteObject*/ ,(Object)((_tid))));Debug.locals.put("tMap", _tmap);Debug.locals.put("tMap", _tmap);
 BA.debugLineNum = 494;BA.debugLine="LogColor(\"|\" & tId & \"| - \" &distOrderedMap.Get";
Debug.ShouldStop(8192);
parent.__c.runVoidMethod ("LogImpl","35832732",RemoteObject.concat(RemoteObject.createImmutable("|"),_tid,RemoteObject.createImmutable("| - "),__ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_get" /*RemoteObject*/ ,(Object)((_tid)))),parent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 495;BA.debugLine="Private tempNDD As String = tMap.Get(\"nomDirDis";
Debug.ShouldStop(16384);
_tempndd = BA.ObjectToString(_tmap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("nomDirDist")))));Debug.locals.put("tempNDD", _tempndd);Debug.locals.put("tempNDD", _tempndd);
 BA.debugLineNum = 496;BA.debugLine="Private indexD As Int = tempNDD.IndexOf(\"Distan";
Debug.ShouldStop(32768);
_indexd = _tempndd.runMethod(true,"indexOf",(Object)(RemoteObject.createImmutable("Distancia:")));Debug.locals.put("indexD", _indexd);Debug.locals.put("indexD", _indexd);
 BA.debugLineNum = 497;BA.debugLine="If indexD > -1 Then tempNDD = tempNDD.SubString";
Debug.ShouldStop(65536);
if (true) break;

case 19:
//if
this.state = 24;
if (RemoteObject.solveBoolean(">",_indexd,BA.numberCast(double.class, -(double) (0 + 1)))) { 
this.state = 21;
;}if (true) break;

case 21:
//C
this.state = 24;
_tempndd = _tempndd.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 0)),(Object)(_indexd));Debug.locals.put("tempNDD", _tempndd);
if (true) break;

case 24:
//C
this.state = 25;
;
 BA.debugLineNum = 498;BA.debugLine="Log(tempNDD)";
Debug.ShouldStop(131072);
parent.__c.runVoidMethod ("LogImpl","35832736",_tempndd,0);
 BA.debugLineNum = 499;BA.debugLine="tempNDD = tempNDD & $\"Dist: $1.1{(r.Get(1)/1000";
Debug.ShouldStop(262144);
_tempndd = RemoteObject.concat(_tempndd,(RemoteObject.concat(RemoteObject.createImmutable("Dist: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)(((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _r.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 1)))),RemoteObject.createImmutable(1000)}, "/",0, 0))))),RemoteObject.createImmutable(" kms, Tiempo aprox: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.0")),(Object)(((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _r.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2)))),RemoteObject.createImmutable(2)}, "*",0, 0)),RemoteObject.createImmutable(60)}, "/",0, 0))))),RemoteObject.createImmutable(" min."))));Debug.locals.put("tempNDD", _tempndd);
 BA.debugLineNum = 500;BA.debugLine="Private esteCliente As Map = CreateMap(\"distanc";
Debug.ShouldStop(524288);
_estecliente = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_estecliente = parent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("distancia")),(_distancia2),RemoteObject.createImmutable(("ubicacion")),_tmap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("ubicacion")))),RemoteObject.createImmutable(("codigo")),_tmap.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("codigo")))),RemoteObject.createImmutable(("nomDirDist")),(_tempndd)}));Debug.locals.put("esteCliente", _estecliente);Debug.locals.put("esteCliente", _estecliente);
 BA.debugLineNum = 501;BA.debugLine="distOrderedMap.Put(tId, esteCliente)";
Debug.ShouldStop(1048576);
__ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_put" /*RemoteObject*/ ,(Object)((_tid)),(Object)((_estecliente.getObject())));
 BA.debugLineNum = 502;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(2097152);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 503;BA.debugLine="Private m3 As Map";
Debug.ShouldStop(4194304);
_m3 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m3", _m3);
 BA.debugLineNum = 504;BA.debugLine="For Each k As Object In distOrderedMap.Keys  'G";
Debug.ShouldStop(8388608);
if (true) break;

case 25:
//for
this.state = 28;
group38 = __ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ );
index38 = 0;
groupLen38 = group38.runMethod(true,"getSize").<Integer>get();
Debug.locals.put("k", _k);
this.state = 34;
if (true) break;

case 34:
//C
this.state = 28;
if (index38 < groupLen38) {
this.state = 27;
_k = group38.runMethod(false,"Get",index38);Debug.locals.put("k", _k);}
if (true) break;

case 35:
//C
this.state = 34;
index38++;
Debug.locals.put("k", _k);
if (true) break;

case 27:
//C
this.state = 35;
 BA.debugLineNum = 505;BA.debugLine="m3 = distOrderedMap.Get(k)";
Debug.ShouldStop(16777216);
_m3 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_get" /*RemoteObject*/ ,(Object)(_k)));Debug.locals.put("m3", _m3);
 BA.debugLineNum = 506;BA.debugLine="m3.Get(\"codigo\")";
Debug.ShouldStop(33554432);
_m3.runVoidMethod ("Get",(Object)((RemoteObject.createImmutable("codigo"))));
 BA.debugLineNum = 507;BA.debugLine="ListView1.AddTwoLines(m3.Get(\"codigo\"), m3.Get";
Debug.ShouldStop(67108864);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(_m3.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("codigo")))))),(Object)(BA.ObjectToCharSequence(_m3.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("nomDirDist")))))));
 if (true) break;
if (true) break;

case 28:
//C
this.state = 29;
Debug.locals.put("k", _k);
;
 if (true) break;

case 29:
//C
this.state = 32;
;
 if (true) break;
if (true) break;

case 30:
//C
this.state = -1;
Debug.locals.put("k", _k);
;
 BA.debugLineNum = 511;BA.debugLine="ProgressDialogHide";
Debug.ShouldStop(1073741824);
parent.__c.runVoidMethod ("ProgressDialogHide");
 BA.debugLineNum = 512;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static void  _complete(RemoteObject __ref,RemoteObject _r) throws Exception{
}
public static RemoteObject  _b_getrutainfo_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_getRutaInfo_Click (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,570);
if (RapidSub.canDelegate("b_getrutainfo_click")) { return __ref.runUserSub(false, "c_clientes","b_getrutainfo_click", __ref);}
 BA.debugLineNum = 570;BA.debugLine="Private Sub b_getRutaInfo_Click";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 572;BA.debugLine="caculaRutaGPS(todosAVisitar)";
Debug.ShouldStop(134217728);
__ref.runClassMethod (reparto_mazapa.keymon.lat.c_clientes.class, "_cacularutagps" /*void*/ ,(Object)(__ref.runClassMethod (reparto_mazapa.keymon.lat.c_clientes.class, "_todosavisitar" /*RemoteObject*/ )));
 BA.debugLineNum = 573;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_getrutainfo_longclick(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_getRutaInfo_LongClick (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,576);
if (RapidSub.canDelegate("b_getrutainfo_longclick")) { return __ref.runUserSub(false, "c_clientes","b_getrutainfo_longclick", __ref);}
 BA.debugLineNum = 576;BA.debugLine="Private Sub b_getRutaInfo_LongClick";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 577;BA.debugLine="If b_limpiarRuta.Visible Then";
Debug.ShouldStop(1);
if (__ref.getField(false,"_b_limpiarruta" /*RemoteObject*/ ).runMethod(true,"getVisible").<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 578;BA.debugLine="b_limpiarRuta.Visible = False";
Debug.ShouldStop(2);
__ref.getField(false,"_b_limpiarruta" /*RemoteObject*/ ).runMethod(true,"setVisible",c_clientes.__c.getField(true,"False"));
 }else {
 BA.debugLineNum = 580;BA.debugLine="b_limpiarRuta.Visible = True";
Debug.ShouldStop(8);
__ref.getField(false,"_b_limpiarruta" /*RemoteObject*/ ).runMethod(true,"setVisible",c_clientes.__c.getField(true,"True"));
 };
 BA.debugLineNum = 582;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_limpiarruta_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_limpiarRuta_Click (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,585);
if (RapidSub.canDelegate("b_limpiarruta_click")) { return __ref.runUserSub(false, "c_clientes","b_limpiarruta_click", __ref);}
 BA.debugLineNum = 585;BA.debugLine="Private Sub b_limpiarRuta_Click";
Debug.ShouldStop(256);
 BA.debugLineNum = 586;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from waypoints\"";
Debug.ShouldStop(512);
c_clientes._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from waypoints")));
 BA.debugLineNum = 587;BA.debugLine="b_limpiarRuta.Visible = False";
Debug.ShouldStop(1024);
__ref.getField(false,"_b_limpiarruta" /*RemoteObject*/ ).runMethod(true,"setVisible",c_clientes.__c.getField(true,"False"));
 BA.debugLineNum = 588;BA.debugLine="B4XPage_Appear";
Debug.ShouldStop(2048);
__ref.runClassMethod (reparto_mazapa.keymon.lat.c_clientes.class, "_b4xpage_appear" /*RemoteObject*/ );
 BA.debugLineNum = 589;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_appear(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,49);
if (RapidSub.canDelegate("b4xpage_appear")) { return __ref.runUserSub(false, "c_clientes","b4xpage_appear", __ref);}
RemoteObject _cs = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
RemoteObject _cs2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
int _i = 0;
RemoteObject _x = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.CursorWrapper");
RemoteObject _y = null;
 BA.debugLineNum = 49;BA.debugLine="Sub B4XPage_Appear";
Debug.ShouldStop(65536);
 BA.debugLineNum = 50;BA.debugLine="busca.Text = \"\"";
Debug.ShouldStop(131072);
__ref.getField(false,"_busca" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 51;BA.debugLine="b_GetDirs.Visible = False";
Debug.ShouldStop(262144);
__ref.getField(false,"_b_getdirs" /*RemoteObject*/ ).runMethod(true,"setVisible",c_clientes.__c.getField(true,"False"));
 BA.debugLineNum = 53;BA.debugLine="entro =\"2\"";
Debug.ShouldStop(1048576);
__ref.setField ("_entro" /*RemoteObject*/ ,BA.ObjectToString("2"));
 BA.debugLineNum = 57;BA.debugLine="p_colonia.Width = Root.Width";
Debug.ShouldStop(16777216);
__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"setWidth",__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth"));
 BA.debugLineNum = 58;BA.debugLine="p_colonia.Height = Root.Height";
Debug.ShouldStop(33554432);
__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"setHeight",__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getHeight"));
 BA.debugLineNum = 59;BA.debugLine="p_colonia.Top = 0";
Debug.ShouldStop(67108864);
__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"setTop",BA.numberCast(int.class, 0));
 BA.debugLineNum = 60;BA.debugLine="p_colonia.Left = 0";
Debug.ShouldStop(134217728);
__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"setLeft",BA.numberCast(int.class, 0));
 BA.debugLineNum = 61;BA.debugLine="Subs.centraListView(ListView1, p_colonia.Width)";
Debug.ShouldStop(268435456);
c_clientes._subs.runVoidMethod ("_centralistview" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 62;BA.debugLine="ListView1.Height = p_colonia.Height * 0.75";
Debug.ShouldStop(536870912);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setHeight",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"getHeight"),RemoteObject.createImmutable(0.75)}, "*",0, 0)));
 BA.debugLineNum = 63;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
Debug.ShouldStop(1073741824);
c_clientes._subs.runVoidMethod ("_setdivider" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(c_clientes.__c.getField(false,"Colors").getField(true,"LightGray")),(Object)(BA.numberCast(int.class, 2)));
 BA.debugLineNum = 64;BA.debugLine="If Not(l_rutaInfo.Visible) Then";
Debug.ShouldStop(-2147483648);
if (c_clientes.__c.runMethod(true,"Not",(Object)(__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"getVisible"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 65;BA.debugLine="ListView1.Top = lv1Top";
Debug.ShouldStop(1);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setTop",BA.numberCast(int.class, __ref.getField(true,"_lv1top" /*RemoteObject*/ )));
 }else {
 BA.debugLineNum = 67;BA.debugLine="ListView1.Top = lv1Top + 100";
Debug.ShouldStop(4);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setTop",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_lv1top" /*RemoteObject*/ )),RemoteObject.createImmutable(100)}, "+",1, 0)));
 };
 BA.debugLineNum = 69;BA.debugLine="c=Starter.skmt.ExecQuery(\"select codigo, indice,";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_clientes._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 AND CAT_CL_RUTA <> 1000 order by indice"))));
 BA.debugLineNum = 70;BA.debugLine="If c.RowCount > 0 Then 'Ya hay waypoints en la ba";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 71;BA.debugLine="c.Position = 0";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 73;BA.debugLine="conMapa = True";
Debug.ShouldStop(256);
__ref.setField ("_conmapa" /*RemoteObject*/ ,c_clientes.__c.getField(true,"True"));
 BA.debugLineNum = 75;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(1024);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 76;BA.debugLine="Dim cs, cs2 As CSBuilder";
Debug.ShouldStop(2048);
_cs = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs", _cs);
_cs2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs2", _cs2);
 BA.debugLineNum = 77;BA.debugLine="entro = 3";
Debug.ShouldStop(4096);
__ref.setField ("_entro" /*RemoteObject*/ ,BA.NumberToString(3));
 BA.debugLineNum = 79;BA.debugLine="For i=0 To c.RowCount -1 'Generamos el listView";
Debug.ShouldStop(16384);
{
final int step23 = 1;
final int limit23 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step23 > 0 && _i <= limit23) || (step23 < 0 && _i >= limit23) ;_i = ((int)(0 + _i + step23))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 80;BA.debugLine="c.Position=i";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 81;BA.debugLine="cs.Initialize";
Debug.ShouldStop(65536);
_cs.runVoidMethod ("Initialize");
 BA.debugLineNum = 82;BA.debugLine="cs2.Initialize";
Debug.ShouldStop(131072);
_cs2.runVoidMethod ("Initialize");
 BA.debugLineNum = 86;BA.debugLine="ListView1.AddTwoLines(cs.Color(Colors.RGB(100,1";
Debug.ShouldStop(2097152);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(_cs.runMethod(false,"Color",(Object)(c_clientes.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 100)),(Object)(BA.numberCast(int.class, 149)),(Object)(BA.numberCast(int.class, 237))))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("codigo")))))).runMethod(false,"PopAll").getObject())),(Object)(BA.ObjectToCharSequence(_cs2.runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE")))))).runMethod(false,"Color",(Object)(c_clientes.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 100)),(Object)(BA.numberCast(int.class, 149)),(Object)(BA.numberCast(int.class, 237))))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(" Calle: ")))).runMethod(false,"Pop").runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CALLE"))).runMethod(true,"trim"),RemoteObject.createImmutable(" "),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOEXT"))))))).runMethod(false,"PopAll").getObject())));
 }
}Debug.locals.put("i", _i);
;
 }else {
 BA.debugLineNum = 89;BA.debugLine="generaListViewRutas";
Debug.ShouldStop(16777216);
__ref.runClassMethod (reparto_mazapa.keymon.lat.c_clientes.class, "_generalistviewrutas" /*void*/ );
 };
 BA.debugLineNum = 91;BA.debugLine="c.Close";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 92;BA.debugLine="p_colonia.Width = Root.Width";
Debug.ShouldStop(134217728);
__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"setWidth",__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth"));
 BA.debugLineNum = 93;BA.debugLine="p_colonia.Height = Root.Height";
Debug.ShouldStop(268435456);
__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"setHeight",__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getHeight"));
 BA.debugLineNum = 94;BA.debugLine="Subs.centraEtiqueta(l_rutaInfo, Root.Width)";
Debug.ShouldStop(536870912);
c_clientes._subs.runVoidMethod ("_centraetiqueta" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 95;BA.debugLine="Subs.centraListView(ListView1, p_colonia.Width)";
Debug.ShouldStop(1073741824);
c_clientes._subs.runVoidMethod ("_centralistview" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 96;BA.debugLine="ListView1.Height = p_colonia.Height * 0.70";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setHeight",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_p_colonia" /*RemoteObject*/ ).runMethod(true,"getHeight"),RemoteObject.createImmutable(0.70)}, "*",0, 0)));
 BA.debugLineNum = 97;BA.debugLine="Subs.centraEtiqueta(lfila, Root.Width)";
Debug.ShouldStop(1);
c_clientes._subs.runVoidMethod ("_centraetiqueta" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_lfila" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 98;BA.debugLine="b_getRutaInfo.Visible = True";
Debug.ShouldStop(2);
__ref.getField(false,"_b_getrutainfo" /*RemoteObject*/ ).runMethod(true,"setVisible",c_clientes.__c.getField(true,"True"));
 BA.debugLineNum = 99;BA.debugLine="b_getRutaInfo.BringToFront";
Debug.ShouldStop(4);
__ref.getField(false,"_b_getrutainfo" /*RemoteObject*/ ).runVoidMethod ("BringToFront");
 BA.debugLineNum = 100;BA.debugLine="If Starter.cedisLocation.Latitude = \"0\" Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",c_clientes._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLatitude"),BA.numberCast(double.class, "0"))) { 
 BA.debugLineNum = 101;BA.debugLine="Private x As Cursor = Starter.skmt.ExecQuery(\"se";
Debug.ShouldStop(16);
_x = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
_x = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), c_clientes._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select * from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'COORDS_ALMACEN'"))));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
 BA.debugLineNum = 102;BA.debugLine="If x.RowCount > 0 Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean(">",_x.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 103;BA.debugLine="x.Position = 0";
Debug.ShouldStop(64);
_x.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 104;BA.debugLine="Private y() As String";
Debug.ShouldStop(128);
_y = RemoteObject.createNewArray ("String", new int[] {0}, new Object[]{});Debug.locals.put("y", _y);
 BA.debugLineNum = 105;BA.debugLine="Starter.cedisLocation.Latitude = Regex.Split(\",";
Debug.ShouldStop(256);
c_clientes._starter._cedislocation /*RemoteObject*/ .runMethod(true,"setLatitude",BA.numberCast(double.class, c_clientes.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString(",")),(Object)(_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR"))))).getArrayElement(true,BA.numberCast(int.class, 1))));
 BA.debugLineNum = 106;BA.debugLine="Starter.cedisLocation.Longitude = Regex.Split(\"";
Debug.ShouldStop(512);
c_clientes._starter._cedislocation /*RemoteObject*/ .runMethod(true,"setLongitude",BA.numberCast(double.class, c_clientes.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString(",")),(Object)(_x.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR"))))).getArrayElement(true,BA.numberCast(int.class, 0))));
 };
 };
 BA.debugLineNum = 109;BA.debugLine="Log(Starter.cedisLocation)";
Debug.ShouldStop(4096);
c_clientes.__c.runVoidMethod ("LogImpl","35308476",BA.ObjectToString(c_clientes._starter._cedislocation /*RemoteObject*/ ),0);
 BA.debugLineNum = 110;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b4xpage_closerequest(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,113);
if (RapidSub.canDelegate("b4xpage_closerequest")) { return __ref.runUserSub(false, "c_clientes","b4xpage_closerequest", __ref);}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(null,__ref);
rsub.remoteResumableSub = anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSubForFilter();
rsub.resume(null, null);
return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.keywords.Common.ResumableSubWrapper"), rsub.remoteResumableSub);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(reparto_mazapa.keymon.lat.c_clientes parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_clientes parent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,113);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,RemoteObject.createImmutable(null));return;}
case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 116;BA.debugLine="Log(entro)";
Debug.ShouldStop(524288);
parent.__c.runVoidMethod ("LogImpl","35373955",__ref.getField(true,"_entro" /*RemoteObject*/ ),0);
 BA.debugLineNum = 117;BA.debugLine="If rutaGenerada Or entro = 3 Then ' Si ya generam";
Debug.ShouldStop(1048576);
if (true) break;

case 1:
//if
this.state = 6;
if (RemoteObject.solveBoolean(".",__ref.getField(true,"_rutagenerada" /*RemoteObject*/ )) || RemoteObject.solveBoolean("=",__ref.getField(true,"_entro" /*RemoteObject*/ ),BA.NumberToString(3))) { 
this.state = 3;
}else 
{ BA.debugLineNum = 121;BA.debugLine="else if entro = 2 Then ' Si estamos mostrando las";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_entro" /*RemoteObject*/ ),BA.NumberToString(2))) { 
this.state = 5;
}}
if (true) break;

case 3:
//C
this.state = 6;
 BA.debugLineNum = 118;BA.debugLine="b_limpiarRuta_Click";
Debug.ShouldStop(2097152);
__ref.runClassMethod (reparto_mazapa.keymon.lat.c_clientes.class, "_b_limpiarruta_click" /*RemoteObject*/ );
 BA.debugLineNum = 119;BA.debugLine="l_rutaInfo.Text = \"\"";
Debug.ShouldStop(4194304);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(""));
 BA.debugLineNum = 120;BA.debugLine="rutaGenerada = False";
Debug.ShouldStop(8388608);
__ref.setField ("_rutagenerada" /*RemoteObject*/ ,parent.__c.getField(true,"False"));
 if (true) break;

case 5:
//C
this.state = 6;
 BA.debugLineNum = 122;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(33554432);
parent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Principal")));
 if (true) break;

case 6:
//C
this.state = -1;
;
 BA.debugLineNum = 124;BA.debugLine="Return False";
Debug.ShouldStop(134217728);
if (true) {
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.__c.getField(true,"False")));return;};
 BA.debugLineNum = 125;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _b4xpage_created(RemoteObject __ref,RemoteObject _root1) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Created (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,36);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_clientes","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 36;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(8);
 BA.debugLineNum = 37;BA.debugLine="Root = Root1";
Debug.ShouldStop(16);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 39;BA.debugLine="Root.LoadLayout(\"clientes\")";
Debug.ShouldStop(64);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("clientes")),__ref.getField(false, "ba"));
 BA.debugLineNum = 40;BA.debugLine="entro =\"2\"";
Debug.ShouldStop(128);
__ref.setField ("_entro" /*RemoteObject*/ ,BA.ObjectToString("2"));
 BA.debugLineNum = 41;BA.debugLine="lv1Top = ListView1.Top";
Debug.ShouldStop(256);
__ref.setField ("_lv1top" /*RemoteObject*/ ,BA.NumberToString(__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"getTop")));
 BA.debugLineNum = 42;BA.debugLine="clientesMapaO.Initialize";
Debug.ShouldStop(512);
__ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 43;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from waypoints\"";
Debug.ShouldStop(1024);
c_clientes._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from waypoints")));
 BA.debugLineNum = 44;BA.debugLine="Log(\"Coordenadas del almacen: \" & Starter.cedisLo";
Debug.ShouldStop(2048);
c_clientes.__c.runVoidMethod ("LogImpl","35242888",RemoteObject.concat(RemoteObject.createImmutable("Coordenadas del almacen: "),c_clientes._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLongitude"),RemoteObject.createImmutable(","),c_clientes._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLatitude")),0);
 BA.debugLineNum = 45;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _busca_textchanged(RemoteObject __ref,RemoteObject _old,RemoteObject _new) throws Exception{
try {
		Debug.PushSubsStack("BUSCA_TextChanged (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,235);
if (RapidSub.canDelegate("busca_textchanged")) { return __ref.runUserSub(false, "c_clientes","busca_textchanged", __ref, _old, _new);}
int _i = 0;
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
Debug.locals.put("Old", _old);
Debug.locals.put("New", _new);
 BA.debugLineNum = 235;BA.debugLine="Sub BUSCA_TextChanged (Old As String, New As Strin";
Debug.ShouldStop(1024);
 BA.debugLineNum = 236;BA.debugLine="q_buscar = \"%\" & busca.Text & \"%\"";
Debug.ShouldStop(2048);
__ref.setField ("_q_buscar" /*RemoteObject*/ ,RemoteObject.concat(RemoteObject.createImmutable("%"),__ref.getField(false,"_busca" /*RemoteObject*/ ).runMethod(true,"getText"),RemoteObject.createImmutable("%")));
 BA.debugLineNum = 237;BA.debugLine="c2=Starter.skmt.ExecQuery2(\"select  CAT_CL_NOMBRE";
Debug.ShouldStop(4096);
__ref.getField(false,"_c2" /*RemoteObject*/ ).setObject (c_clientes._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select  CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where CAT_CL_NOMBRE like ? and gestion = 0 AND CAT_CL_RUTA <> 1000 order by CAT_CL_CODIGO ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(true,"_q_buscar" /*RemoteObject*/ )}))));
 BA.debugLineNum = 238;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(8192);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 239;BA.debugLine="lfila.text = \"Nombre y Calle\"";
Debug.ShouldStop(16384);
__ref.getField(false,"_lfila" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("Nombre y Calle"));
 BA.debugLineNum = 240;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
Debug.ShouldStop(32768);
c_clientes._subs.runVoidMethod ("_setdivider" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(c_clientes.__c.getField(false,"Colors").getField(true,"LightGray")),(Object)(BA.numberCast(int.class, 2)));
 BA.debugLineNum = 241;BA.debugLine="If c2.RowCount>0 Then";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 242;BA.debugLine="For i=0 To c2.RowCount -1";
Debug.ShouldStop(131072);
{
final int step7 = 1;
final int limit7 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step7 > 0 && _i <= limit7) || (step7 < 0 && _i >= limit7) ;_i = ((int)(0 + _i + step7))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 243;BA.debugLine="c2.Position=i";
Debug.ShouldStop(262144);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 244;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(524288);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 245;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(1048576);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 246;BA.debugLine="label1.TextSize = 15";
Debug.ShouldStop(2097152);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 247;BA.debugLine="label1.TextColor = Colors.Black";
Debug.ShouldStop(4194304);
_label1.runMethod(true,"setTextColor",c_clientes.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 248;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(8388608);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 249;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(16777216);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 250;BA.debugLine="label2.TextSize = 15";
Debug.ShouldStop(33554432);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 251;BA.debugLine="label2.TextColor = Colors.Black";
Debug.ShouldStop(67108864);
_label2.runMethod(true,"setTextColor",c_clientes.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 252;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_CODI";
Debug.ShouldStop(134217728);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CODIGO"))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE"))),RemoteObject.createImmutable(" CALLE:  "),__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CALLE")))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 255;BA.debugLine="entro = \"3\"";
Debug.ShouldStop(1073741824);
__ref.setField ("_entro" /*RemoteObject*/ ,BA.ObjectToString("3"));
 BA.debugLineNum = 256;BA.debugLine="c2.Close";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 257;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _cacularutagps(RemoteObject __ref,RemoteObject _coords) throws Exception{
try {
		Debug.PushSubsStack("caculaRutaGPS (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,591);
if (RapidSub.canDelegate("cacularutagps")) { __ref.runUserSub(false, "c_clientes","cacularutagps", __ref, _coords); return;}
ResumableSub_caculaRutaGPS rsub = new ResumableSub_caculaRutaGPS(null,__ref,_coords);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_caculaRutaGPS extends BA.ResumableSub {
public ResumableSub_caculaRutaGPS(reparto_mazapa.keymon.lat.c_clientes parent,RemoteObject __ref,RemoteObject _coords) {
this.parent = parent;
this.__ref = __ref;
this._coords = _coords;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_clientes parent;
RemoteObject _coords;
RemoteObject _tmplist = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _cs = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
RemoteObject _cs2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
RemoteObject _coordsstr = RemoteObject.createImmutable("");
RemoteObject _tienda = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _j = RemoteObject.declareNull("reparto_mazapa.keymon.lat.httpjob");
RemoteObject _jp = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.JSONParser");
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _puntos = RemoteObject.createImmutable(0);
RemoteObject _duration = RemoteObject.createImmutable("");
RemoteObject _distance = RemoteObject.createImmutable("");
RemoteObject _mensaje = RemoteObject.createImmutable("");
int _i = 0;
RemoteObject _ti = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject group8;
int index8;
int groupLen8;
int step37;
int limit37;
int step49;
int limit49;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("caculaRutaGPS (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,591);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
Debug.locals.put("coords", _coords);
 BA.debugLineNum = 592;BA.debugLine="Private tmpList As List";
Debug.ShouldStop(32768);
_tmplist = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("tmpList", _tmplist);
 BA.debugLineNum = 593;BA.debugLine="Dim cs, cs2 As CSBuilder";
Debug.ShouldStop(65536);
_cs = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs", _cs);
_cs2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs2", _cs2);
 BA.debugLineNum = 594;BA.debugLine="tmpList.Initialize";
Debug.ShouldStop(131072);
_tmplist.runVoidMethod ("Initialize");
 BA.debugLineNum = 595;BA.debugLine="tmpList.AddAll(Array As String(\"ACTUAL\", Tracker.";
Debug.ShouldStop(262144);
_tmplist.runVoidMethod ("AddAll",(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {3},new Object[] {BA.ObjectToString("ACTUAL"),BA.NumberToString(parent._tracker._uugcoords /*RemoteObject*/ .runMethod(true,"getLongitude")),BA.NumberToString(parent._tracker._uugcoords /*RemoteObject*/ .runMethod(true,"getLatitude"))})))));
 BA.debugLineNum = 596;BA.debugLine="coords.InsertAt(0,tmpList)";
Debug.ShouldStop(524288);
_coords.runVoidMethod ("InsertAt",(Object)(BA.numberCast(int.class, 0)),(Object)((_tmplist.getObject())));
 BA.debugLineNum = 597;BA.debugLine="Log(\"=================================\")";
Debug.ShouldStop(1048576);
parent.__c.runVoidMethod ("LogImpl","36160390",RemoteObject.createImmutable("================================="),0);
 BA.debugLineNum = 599;BA.debugLine="Private coordsStr As String = \"\"";
Debug.ShouldStop(4194304);
_coordsstr = BA.ObjectToString("");Debug.locals.put("coordsStr", _coordsstr);Debug.locals.put("coordsStr", _coordsstr);
 BA.debugLineNum = 600;BA.debugLine="For Each tienda As List In coords";
Debug.ShouldStop(8388608);
if (true) break;

case 1:
//for
this.state = 10;
_tienda = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
group8 = _coords;
index8 = 0;
groupLen8 = group8.runMethod(true,"getSize").<Integer>get();
Debug.locals.put("tienda", _tienda);
this.state = 33;
if (true) break;

case 33:
//C
this.state = 10;
if (index8 < groupLen8) {
this.state = 3;
_tienda = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), group8.runMethod(false,"Get",index8));Debug.locals.put("tienda", _tienda);}
if (true) break;

case 34:
//C
this.state = 33;
index8++;
Debug.locals.put("tienda", _tienda);
if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 602;BA.debugLine="If coordsStr = \"\" Then";
Debug.ShouldStop(33554432);
if (true) break;

case 4:
//if
this.state = 9;
if (RemoteObject.solveBoolean("=",_coordsstr,BA.ObjectToString(""))) { 
this.state = 6;
}else {
this.state = 8;
}if (true) break;

case 6:
//C
this.state = 9;
 BA.debugLineNum = 603;BA.debugLine="coordsStr = $\"${tienda.get(0)},${tienda.get(1)}";
Debug.ShouldStop(67108864);
_coordsstr = (RemoteObject.concat(RemoteObject.createImmutable(""),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_tienda.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_tienda.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 1))))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_tienda.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2))))),RemoteObject.createImmutable("")));Debug.locals.put("coordsStr", _coordsstr);
 if (true) break;

case 8:
//C
this.state = 9;
 BA.debugLineNum = 605;BA.debugLine="coordsStr = $\"${coordsStr};${tienda.get(0)},${t";
Debug.ShouldStop(268435456);
_coordsstr = (RemoteObject.concat(RemoteObject.createImmutable(""),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_coordsstr))),RemoteObject.createImmutable(";"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_tienda.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_tienda.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 1))))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_tienda.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 2))))),RemoteObject.createImmutable("")));Debug.locals.put("coordsStr", _coordsstr);
 if (true) break;

case 9:
//C
this.state = 34;
;
 if (true) break;
if (true) break;

case 10:
//C
this.state = 11;
Debug.locals.put("tienda", _tienda);
;
 BA.debugLineNum = 608;BA.debugLine="Log(coordsStr)";
Debug.ShouldStop(-2147483648);
parent.__c.runVoidMethod ("LogImpl","36160401",_coordsstr,0);
 BA.debugLineNum = 609;BA.debugLine="ProgressDialogShow2(\"Calculando distancia y tiemp";
Debug.ShouldStop(1);
parent.__c.runVoidMethod ("ProgressDialogShow2",__ref.getField(false, "ba"),(Object)(BA.ObjectToCharSequence("Calculando distancia y tiempo, un momento por favor.")),(Object)(parent.__c.getField(true,"False")));
 BA.debugLineNum = 610;BA.debugLine="Dim j As HttpJob";
Debug.ShouldStop(2);
_j = RemoteObject.createNew ("reparto_mazapa.keymon.lat.httpjob");Debug.locals.put("j", _j);
 BA.debugLineNum = 611;BA.debugLine="j.Initialize(\"trip\", Me) 'Calculamos el resto de";
Debug.ShouldStop(4);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("trip")),(Object)(__ref));
 BA.debugLineNum = 612;BA.debugLine="j.Download($\"http://keymon.lat:9002/ruteador?m=OS";
Debug.ShouldStop(8);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_download" /*RemoteObject*/ ,(Object)((RemoteObject.concat(RemoteObject.createImmutable("http://keymon.lat:9002/ruteador?m=OSRM&r="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._subs.runMethod(true,"_traerutareparto" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),RemoteObject.createImmutable("&a="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),RemoteObject.createImmutable("&f=CEDIS,"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLongitude")))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLatitude")))),RemoteObject.createImmutable("&c="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_coordsstr))),RemoteObject.createImmutable("")))));
 BA.debugLineNum = 613;BA.debugLine="Log($\"http://keymon.lat:9002/ruteador?m=OSRM&r=${";
Debug.ShouldStop(16);
parent.__c.runVoidMethod ("LogImpl","36160406",(RemoteObject.concat(RemoteObject.createImmutable("http://keymon.lat:9002/ruteador?m=OSRM&r="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._subs.runMethod(true,"_traerutareparto" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),RemoteObject.createImmutable("&a="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._subs.runMethod(true,"_traealmacen" /*RemoteObject*/ ,__ref.getField(false, "ba"))))),RemoteObject.createImmutable("&f=CEDIS,"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLongitude")))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLatitude")))),RemoteObject.createImmutable("&c="),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_coordsstr))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 614;BA.debugLine="Wait For (j) JobDone(j As HttpJob)";
Debug.ShouldStop(32);
parent.__c.runVoidMethod ("WaitFor","jobdone", __ref.getField(false, "ba"), anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "cacularutagps"), (_j));
this.state = 35;
return;
case 35:
//C
this.state = 11;
_j = (RemoteObject) result.getArrayElement(false,RemoteObject.createImmutable(1));Debug.locals.put("j", _j);
;
 BA.debugLineNum = 615;BA.debugLine="If j.Success Then";
Debug.ShouldStop(64);
if (true) break;

case 11:
//if
this.state = 32;
if (_j.getField(true,"_success" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
this.state = 13;
}else {
this.state = 31;
}if (true) break;

case 13:
//C
this.state = 14;
 BA.debugLineNum = 616;BA.debugLine="Dim jp As JSONParser";
Debug.ShouldStop(128);
_jp = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser");Debug.locals.put("jp", _jp);
 BA.debugLineNum = 617;BA.debugLine="jp.Initialize(j.GetString)";
Debug.ShouldStop(256);
_jp.runVoidMethod ("Initialize",(Object)(_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_getstring" /*RemoteObject*/ )));
 BA.debugLineNum = 618;BA.debugLine="Dim m As Map = jp.NextObject";
Debug.ShouldStop(512);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_m = _jp.runMethod(false,"NextObject");Debug.locals.put("m", _m);Debug.locals.put("m", _m);
 BA.debugLineNum = 619;BA.debugLine="Log(m)";
Debug.ShouldStop(1024);
parent.__c.runVoidMethod ("LogImpl","36160412",BA.ObjectToString(_m),0);
 BA.debugLineNum = 620;BA.debugLine="If m.Get(\"code\") = \"OK\" Then";
Debug.ShouldStop(2048);
if (true) break;

case 14:
//if
this.state = 29;
if (RemoteObject.solveBoolean("=",_m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("code")))),RemoteObject.createImmutable(("OK")))) { 
this.state = 16;
}if (true) break;

case 16:
//C
this.state = 17;
 BA.debugLineNum = 621;BA.debugLine="Log(\"=====   OK\")";
Debug.ShouldStop(4096);
parent.__c.runVoidMethod ("LogImpl","36160414",RemoteObject.createImmutable("=====   OK"),0);
 BA.debugLineNum = 622;BA.debugLine="rutaGenerada = True";
Debug.ShouldStop(8192);
__ref.setField ("_rutagenerada" /*RemoteObject*/ ,parent.__c.getField(true,"True"));
 BA.debugLineNum = 623;BA.debugLine="Dim puntos As Int = m.Get(\"puntos\")";
Debug.ShouldStop(16384);
_puntos = BA.numberCast(int.class, _m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("puntos")))));Debug.locals.put("puntos", _puntos);Debug.locals.put("puntos", _puntos);
 BA.debugLineNum = 624;BA.debugLine="Private coords As List = m.Get(\"coords\")";
Debug.ShouldStop(32768);
_coords = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_coords = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("coords")))));Debug.locals.put("coords", _coords);Debug.locals.put("coords", _coords);
 BA.debugLineNum = 625;BA.debugLine="Private duration As String = m.Get(\"duration\")";
Debug.ShouldStop(65536);
_duration = BA.ObjectToString(_m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("duration")))));Debug.locals.put("duration", _duration);Debug.locals.put("duration", _duration);
 BA.debugLineNum = 626;BA.debugLine="Private distance As String = m.Get(\"distance\")";
Debug.ShouldStop(131072);
_distance = BA.ObjectToString(_m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("distance")))));Debug.locals.put("distance", _distance);Debug.locals.put("distance", _distance);
 BA.debugLineNum = 627;BA.debugLine="Private mensaje As String = m.Get(\"mensaje\")";
Debug.ShouldStop(262144);
_mensaje = BA.ObjectToString(_m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("mensaje")))));Debug.locals.put("mensaje", _mensaje);Debug.locals.put("mensaje", _mensaje);
 BA.debugLineNum = 628;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from waypoint";
Debug.ShouldStop(524288);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from waypoints")));
 BA.debugLineNum = 629;BA.debugLine="Starter.skmt.ExecNonQuery(\"update kmt_info set";
Debug.ShouldStop(1048576);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("update kmt_info set SECUENCIA = 0")));
 BA.debugLineNum = 630;BA.debugLine="For i = 0 To coords.Size - 1";
Debug.ShouldStop(2097152);
if (true) break;

case 17:
//for
this.state = 20;
step37 = 1;
limit37 = RemoteObject.solve(new RemoteObject[] {_coords.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
Debug.locals.put("i", _i);
this.state = 36;
if (true) break;

case 36:
//C
this.state = 20;
if ((step37 > 0 && _i <= limit37) || (step37 < 0 && _i >= limit37)) this.state = 19;
if (true) break;

case 37:
//C
this.state = 36;
_i = ((int)(0 + _i + step37)) ;
Debug.locals.put("i", _i);
if (true) break;

case 19:
//C
this.state = 37;
 BA.debugLineNum = 631;BA.debugLine="Private ti As Map = coords.Get(i)";
Debug.ShouldStop(4194304);
_ti = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_ti = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _coords.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))));Debug.locals.put("ti", _ti);Debug.locals.put("ti", _ti);
 BA.debugLineNum = 632;BA.debugLine="Starter.skmt.ExecNonQuery($\"update kmt_info se";
Debug.ShouldStop(8388608);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update kmt_info set SECUENCIA = "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_ti.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("pos")))))),RemoteObject.createImmutable(" where CAT_CL_CODIGO = '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((BA.ObjectToString(_ti.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("id")))))).runMethod(true,"substring",(Object)(BA.numberCast(int.class, 1)))))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 633;BA.debugLine="Starter.skmt.ExecNonQuery($\"insert into waypoi";
Debug.ShouldStop(16777216);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("insert into waypoints (codigo, indice) values ('"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(((BA.ObjectToString(_ti.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("id")))))).runMethod(true,"substring",(Object)(BA.numberCast(int.class, 1)))))),RemoteObject.createImmutable("', '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_ti.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("pos")))))),RemoteObject.createImmutable("')")))));
 if (true) break;
if (true) break;

case 20:
//C
this.state = 21;
Debug.locals.put("i", _i);
;
 BA.debugLineNum = 635;BA.debugLine="c = Starter.skmt.ExecQuery(\"select codigo, indi";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 AND CAT_CL_RUTA <> 1000 order by indice"))));
 BA.debugLineNum = 636;BA.debugLine="If c.RowCount > 0 Then 'Ya hay waypoints en la";
Debug.ShouldStop(134217728);
if (true) break;

case 21:
//if
this.state = 28;
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 23;
}if (true) break;

case 23:
//C
this.state = 24;
 BA.debugLineNum = 637;BA.debugLine="c.Position = 0";
Debug.ShouldStop(268435456);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 638;BA.debugLine="conMapa = True";
Debug.ShouldStop(536870912);
__ref.setField ("_conmapa" /*RemoteObject*/ ,parent.__c.getField(true,"True"));
 BA.debugLineNum = 639;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 640;BA.debugLine="Dim cs, cs2 As CSBuilder";
Debug.ShouldStop(-2147483648);
_cs = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs", _cs);
_cs2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs2", _cs2);
 BA.debugLineNum = 641;BA.debugLine="entro = 3";
Debug.ShouldStop(1);
__ref.setField ("_entro" /*RemoteObject*/ ,BA.NumberToString(3));
 BA.debugLineNum = 642;BA.debugLine="For i=0 To c.RowCount -1 'Generamos el listVie";
Debug.ShouldStop(2);
if (true) break;

case 24:
//for
this.state = 27;
step49 = 1;
limit49 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
Debug.locals.put("i", _i);
this.state = 38;
if (true) break;

case 38:
//C
this.state = 27;
if ((step49 > 0 && _i <= limit49) || (step49 < 0 && _i >= limit49)) this.state = 26;
if (true) break;

case 39:
//C
this.state = 38;
_i = ((int)(0 + _i + step49)) ;
Debug.locals.put("i", _i);
if (true) break;

case 26:
//C
this.state = 39;
 BA.debugLineNum = 643;BA.debugLine="c.Position = i";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 644;BA.debugLine="cs.Initialize";
Debug.ShouldStop(8);
_cs.runVoidMethod ("Initialize");
 BA.debugLineNum = 645;BA.debugLine="cs2.Initialize";
Debug.ShouldStop(16);
_cs2.runVoidMethod ("Initialize");
 BA.debugLineNum = 646;BA.debugLine="ListView1.AddTwoLines(cs.Color(Colors.RGB(100";
Debug.ShouldStop(32);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(_cs.runMethod(false,"Color",(Object)(parent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 100)),(Object)(BA.numberCast(int.class, 149)),(Object)(BA.numberCast(int.class, 237))))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("codigo")))))).runMethod(false,"PopAll").getObject())),(Object)(BA.ObjectToCharSequence(_cs2.runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE")))))).runMethod(false,"Color",(Object)(parent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 100)),(Object)(BA.numberCast(int.class, 149)),(Object)(BA.numberCast(int.class, 237))))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(" Calle: ")))).runMethod(false,"Pop").runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CALLE"))).runMethod(true,"trim"),RemoteObject.createImmutable(" "),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOEXT"))))))).runMethod(false,"PopAll").getObject())));
 if (true) break;
if (true) break;

case 27:
//C
this.state = 28;
Debug.locals.put("i", _i);
;
 if (true) break;

case 28:
//C
this.state = 29;
;
 BA.debugLineNum = 649;BA.debugLine="c.Close";
Debug.ShouldStop(256);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 650;BA.debugLine="Log($\"Distancia total: $1.1{distance/1000} kms,";
Debug.ShouldStop(512);
parent.__c.runVoidMethod ("LogImpl","36160443",(RemoteObject.concat(RemoteObject.createImmutable("Distancia total: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _distance),RemoteObject.createImmutable(1000)}, "/",0, 0)))),RemoteObject.createImmutable(" kms, tiempo aprox: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _duration),RemoteObject.createImmutable(60)}, "/",0, 0)))),RemoteObject.createImmutable(" mins. ("),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _duration),RemoteObject.createImmutable(60),RemoteObject.createImmutable(60)}, "//",0, 0)))),RemoteObject.createImmutable(" hrs)"))),0);
 BA.debugLineNum = 651;BA.debugLine="l_rutaInfo.Text = $\"Distancia: $1.1{distance/10";
Debug.ShouldStop(1024);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence((RemoteObject.concat(RemoteObject.createImmutable("Distancia: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _distance),RemoteObject.createImmutable(1000)}, "/",0, 0)))),RemoteObject.createImmutable(" kms, tiempo aprox: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, _duration),RemoteObject.createImmutable(60),RemoteObject.createImmutable(60)}, "//",0, 0)))),RemoteObject.createImmutable(" hrs"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent.__c.getField(true,"CRLF")))),RemoteObject.createImmutable("Visitas restantes: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.solve(new RemoteObject[] {_puntos,RemoteObject.createImmutable(1)}, "-",1, 1)))),RemoteObject.createImmutable("")))));
 BA.debugLineNum = 652;BA.debugLine="l_rutaInfo.Width = Root.Width * 0.9";
Debug.ShouldStop(2048);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setWidth",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth"),RemoteObject.createImmutable(0.9)}, "*",0, 0)));
 BA.debugLineNum = 653;BA.debugLine="Subs.centraEtiqueta(l_rutaInfo, Root.Width)";
Debug.ShouldStop(4096);
parent._subs.runVoidMethod ("_centraetiqueta" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 654;BA.debugLine="l_rutaInfo.Visible = True";
Debug.ShouldStop(8192);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setVisible",parent.__c.getField(true,"True"));
 BA.debugLineNum = 655;BA.debugLine="l_rutaInfo.BringToFront";
Debug.ShouldStop(16384);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runVoidMethod ("BringToFront");
 BA.debugLineNum = 656;BA.debugLine="ListView1.Top = lv1Top + 100";
Debug.ShouldStop(32768);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setTop",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_lv1top" /*RemoteObject*/ )),RemoteObject.createImmutable(100)}, "+",1, 0)));
 if (true) break;

case 29:
//C
this.state = 32;
;
 if (true) break;

case 31:
//C
this.state = 32;
 BA.debugLineNum = 659;BA.debugLine="LogColor(\"****************  Error!  ************";
Debug.ShouldStop(262144);
parent.__c.runVoidMethod ("LogImpl","36160452",BA.ObjectToString("****************  Error!  ******************"),parent.__c.getField(false,"Colors").getField(true,"Red"));
 if (true) break;

case 32:
//C
this.state = -1;
;
 BA.debugLineNum = 661;BA.debugLine="j.Release";
Debug.ShouldStop(1048576);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_release" /*RemoteObject*/ );
 BA.debugLineNum = 662;BA.debugLine="ProgressDialogHide";
Debug.ShouldStop(2097152);
parent.__c.runVoidMethod ("ProgressDialogHide");
 BA.debugLineNum = 663;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static void  _jobdone(RemoteObject __ref,RemoteObject _j) throws Exception{
}
public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
c_clientes._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",c_clientes._root);
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
c_clientes._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",c_clientes._xui);
 //BA.debugLineNum = 4;BA.debugLine="Dim q_buscar As String";
c_clientes._q_buscar = RemoteObject.createImmutable("");__ref.setField("_q_buscar",c_clientes._q_buscar);
 //BA.debugLineNum = 6;BA.debugLine="Dim entro As String";
c_clientes._entro = RemoteObject.createImmutable("");__ref.setField("_entro",c_clientes._entro);
 //BA.debugLineNum = 7;BA.debugLine="Dim c As Cursor";
c_clientes._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",c_clientes._c);
 //BA.debugLineNum = 8;BA.debugLine="Dim c2 As Cursor";
c_clientes._c2 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c2",c_clientes._c2);
 //BA.debugLineNum = 9;BA.debugLine="Dim ListView1 As ListView";
c_clientes._listview1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_listview1",c_clientes._listview1);
 //BA.debugLineNum = 11;BA.debugLine="Dim lfila As Label";
c_clientes._lfila = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_lfila",c_clientes._lfila);
 //BA.debugLineNum = 12;BA.debugLine="Dim busca As EditText";
c_clientes._busca = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_busca",c_clientes._busca);
 //BA.debugLineNum = 13;BA.debugLine="Private p_colonia As Panel";
c_clientes._p_colonia = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_colonia",c_clientes._p_colonia);
 //BA.debugLineNum = 16;BA.debugLine="Dim laRuta As String";
c_clientes._laruta = RemoteObject.createImmutable("");__ref.setField("_laruta",c_clientes._laruta);
 //BA.debugLineNum = 17;BA.debugLine="Private b_GetDirs As Button";
c_clientes._b_getdirs = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_getdirs",c_clientes._b_getdirs);
 //BA.debugLineNum = 18;BA.debugLine="Private distOrderedMap, clientesMapaO As B4XOrder";
c_clientes._distorderedmap = RemoteObject.createNew ("reparto_mazapa.keymon.lat.b4xorderedmap");__ref.setField("_distorderedmap",c_clientes._distorderedmap);
c_clientes._clientesmapao = RemoteObject.createNew ("reparto_mazapa.keymon.lat.b4xorderedmap");__ref.setField("_clientesmapao",c_clientes._clientesmapao);
 //BA.debugLineNum = 19;BA.debugLine="Private img_getDirs As ImageView";
c_clientes._img_getdirs = RemoteObject.createNew ("anywheresoftware.b4a.objects.ImageViewWrapper");__ref.setField("_img_getdirs",c_clientes._img_getdirs);
 //BA.debugLineNum = 20;BA.debugLine="Private l_rutaInfo As Label";
c_clientes._l_rutainfo = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_rutainfo",c_clientes._l_rutainfo);
 //BA.debugLineNum = 21;BA.debugLine="Private b_getRutaInfo As Button";
c_clientes._b_getrutainfo = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_getrutainfo",c_clientes._b_getrutainfo);
 //BA.debugLineNum = 22;BA.debugLine="Private conMapa As Boolean = False";
c_clientes._conmapa = c_clientes.__c.getField(true,"False");__ref.setField("_conmapa",c_clientes._conmapa);
 //BA.debugLineNum = 23;BA.debugLine="Dim listaWayPoints As List";
c_clientes._listawaypoints = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");__ref.setField("_listawaypoints",c_clientes._listawaypoints);
 //BA.debugLineNum = 24;BA.debugLine="Dim lv1Top As String";
c_clientes._lv1top = RemoteObject.createImmutable("");__ref.setField("_lv1top",c_clientes._lv1top);
 //BA.debugLineNum = 25;BA.debugLine="Private b_limpiarRuta As Button";
c_clientes._b_limpiarruta = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_limpiarruta",c_clientes._b_limpiarruta);
 //BA.debugLineNum = 26;BA.debugLine="Dim rutaGenerada As Boolean = False";
c_clientes._rutagenerada = c_clientes.__c.getField(true,"False");__ref.setField("_rutagenerada",c_clientes._rutagenerada);
 //BA.debugLineNum = 27;BA.debugLine="Dim rutaacambiar As String";
c_clientes._rutaacambiar = RemoteObject.createImmutable("");__ref.setField("_rutaacambiar",c_clientes._rutaacambiar);
 //BA.debugLineNum = 28;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _distanciaentrecoords(RemoteObject __ref,RemoteObject _id,RemoteObject _coords1,RemoteObject _coords2) throws Exception{
try {
		Debug.PushSubsStack("distanciaEntreCoords (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,262);
if (RapidSub.canDelegate("distanciaentrecoords")) { return __ref.runUserSub(false, "c_clientes","distanciaentrecoords", __ref, _id, _coords1, _coords2);}
ResumableSub_distanciaEntreCoords rsub = new ResumableSub_distanciaEntreCoords(null,__ref,_id,_coords1,_coords2);
rsub.remoteResumableSub = anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSubForFilter();
rsub.resume(null, null);
return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.keywords.Common.ResumableSubWrapper"), rsub.remoteResumableSub);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_distanciaEntreCoords extends BA.ResumableSub {
public ResumableSub_distanciaEntreCoords(reparto_mazapa.keymon.lat.c_clientes parent,RemoteObject __ref,RemoteObject _id,RemoteObject _coords1,RemoteObject _coords2) {
this.parent = parent;
this.__ref = __ref;
this._id = _id;
this._coords1 = _coords1;
this._coords2 = _coords2;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_clientes parent;
RemoteObject _id;
RemoteObject _coords1;
RemoteObject _coords2;
RemoteObject _distanciatotal = RemoteObject.createImmutable("");
RemoteObject _tiempo = RemoteObject.createImmutable("");
RemoteObject _j = RemoteObject.declareNull("reparto_mazapa.keymon.lat.httpjob");
RemoteObject _jp = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.JSONParser");
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _rutas = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _rutas2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("distanciaEntreCoords (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,262);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,RemoteObject.createImmutable(null));return;}
case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
Debug.locals.put("id", _id);
Debug.locals.put("coords1", _coords1);
Debug.locals.put("coords2", _coords2);
 BA.debugLineNum = 263;BA.debugLine="Sleep(1050)";
Debug.ShouldStop(64);
parent.__c.runVoidMethod ("Sleep",__ref.getField(false, "ba"),anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "distanciaentrecoords"),BA.numberCast(int.class, 1050));
this.state = 11;
return;
case 11:
//C
this.state = 1;
;
 BA.debugLineNum = 264;BA.debugLine="Private distanciaTotal As String = \"0\"";
Debug.ShouldStop(128);
_distanciatotal = BA.ObjectToString("0");Debug.locals.put("distanciaTotal", _distanciatotal);Debug.locals.put("distanciaTotal", _distanciatotal);
 BA.debugLineNum = 265;BA.debugLine="Private tiempo As String = \"0\"";
Debug.ShouldStop(256);
_tiempo = BA.ObjectToString("0");Debug.locals.put("tiempo", _tiempo);Debug.locals.put("tiempo", _tiempo);
 BA.debugLineNum = 266;BA.debugLine="Dim j As HttpJob";
Debug.ShouldStop(512);
_j = RemoteObject.createNew ("reparto_mazapa.keymon.lat.httpjob");Debug.locals.put("j", _j);
 BA.debugLineNum = 267;BA.debugLine="j.Initialize(\"\", Me)";
Debug.ShouldStop(1024);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("")),(Object)(__ref));
 BA.debugLineNum = 268;BA.debugLine="j.Download(\"https://router.project-osrm.org/route";
Debug.ShouldStop(2048);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_download" /*RemoteObject*/ ,(Object)(RemoteObject.concat(RemoteObject.createImmutable("https://router.project-osrm.org/route/v1/driving/"),_coords1,RemoteObject.createImmutable(";"),_coords2,RemoteObject.createImmutable("?overview=false"))));
 BA.debugLineNum = 269;BA.debugLine="Wait For (j) JobDone(j As HttpJob)";
Debug.ShouldStop(4096);
parent.__c.runVoidMethod ("WaitFor","jobdone", __ref.getField(false, "ba"), anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "distanciaentrecoords"), (_j));
this.state = 12;
return;
case 12:
//C
this.state = 1;
_j = (RemoteObject) result.getArrayElement(false,RemoteObject.createImmutable(1));Debug.locals.put("j", _j);
;
 BA.debugLineNum = 270;BA.debugLine="If j.Success Then";
Debug.ShouldStop(8192);
if (true) break;

case 1:
//if
this.state = 10;
if (_j.getField(true,"_success" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
this.state = 3;
}else {
this.state = 9;
}if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 271;BA.debugLine="Dim jp As JSONParser";
Debug.ShouldStop(16384);
_jp = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser");Debug.locals.put("jp", _jp);
 BA.debugLineNum = 272;BA.debugLine="jp.Initialize(j.GetString)";
Debug.ShouldStop(32768);
_jp.runVoidMethod ("Initialize",(Object)(_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_getstring" /*RemoteObject*/ )));
 BA.debugLineNum = 273;BA.debugLine="Dim m As Map = jp.NextObject";
Debug.ShouldStop(65536);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_m = _jp.runMethod(false,"NextObject");Debug.locals.put("m", _m);Debug.locals.put("m", _m);
 BA.debugLineNum = 274;BA.debugLine="Log($\"Respuesta: ${m.Get(\"code\")}\"$)";
Debug.ShouldStop(131072);
parent.__c.runVoidMethod ("LogImpl","35701644",(RemoteObject.concat(RemoteObject.createImmutable("Respuesta: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("code")))))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 275;BA.debugLine="If m.Get(\"code\") = \"Ok\" Then";
Debug.ShouldStop(262144);
if (true) break;

case 4:
//if
this.state = 7;
if (RemoteObject.solveBoolean("=",_m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("code")))),RemoteObject.createImmutable(("Ok")))) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
 BA.debugLineNum = 277;BA.debugLine="Dim rutas As List = m.Get(\"routes\")";
Debug.ShouldStop(1048576);
_rutas = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_rutas = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("routes")))));Debug.locals.put("rutas", _rutas);Debug.locals.put("rutas", _rutas);
 BA.debugLineNum = 278;BA.debugLine="Dim rutas2 As Map = rutas.Get(0)";
Debug.ShouldStop(2097152);
_rutas2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_rutas2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _rutas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))));Debug.locals.put("rutas2", _rutas2);Debug.locals.put("rutas2", _rutas2);
 BA.debugLineNum = 282;BA.debugLine="distanciaTotal = rutas2.Get(\"distance\")";
Debug.ShouldStop(33554432);
_distanciatotal = BA.ObjectToString(_rutas2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("distance")))));Debug.locals.put("distanciaTotal", _distanciatotal);
 BA.debugLineNum = 283;BA.debugLine="tiempo = rutas2.Get(\"duration\")";
Debug.ShouldStop(67108864);
_tiempo = BA.ObjectToString(_rutas2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("duration")))));Debug.locals.put("tiempo", _tiempo);
 BA.debugLineNum = 284;BA.debugLine="Log($\"Distancia total: ${distanciaTotal}, Tiemp";
Debug.ShouldStop(134217728);
parent.__c.runVoidMethod ("LogImpl","35701654",(RemoteObject.concat(RemoteObject.createImmutable("Distancia total: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_distanciatotal))),RemoteObject.createImmutable(", Tiempo: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_tiempo))),RemoteObject.createImmutable(""))),0);
 if (true) break;

case 7:
//C
this.state = 10;
;
 if (true) break;

case 9:
//C
this.state = 10;
 BA.debugLineNum = 287;BA.debugLine="Log(\"Error!\")";
Debug.ShouldStop(1073741824);
parent.__c.runVoidMethod ("LogImpl","35701657",RemoteObject.createImmutable("Error!"),0);
 if (true) break;

case 10:
//C
this.state = -1;
;
 BA.debugLineNum = 289;BA.debugLine="j.Release";
Debug.ShouldStop(1);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_release" /*RemoteObject*/ );
 BA.debugLineNum = 290;BA.debugLine="Private r As List";
Debug.ShouldStop(2);
_r = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("r", _r);
 BA.debugLineNum = 291;BA.debugLine="r.Initialize";
Debug.ShouldStop(4);
_r.runVoidMethod ("Initialize");
 BA.debugLineNum = 292;BA.debugLine="r.Add(id)";
Debug.ShouldStop(8);
_r.runVoidMethod ("Add",(Object)((_id)));
 BA.debugLineNum = 293;BA.debugLine="r.Add(distanciaTotal)";
Debug.ShouldStop(16);
_r.runVoidMethod ("Add",(Object)((_distanciatotal)));
 BA.debugLineNum = 294;BA.debugLine="r.Add(tiempo)";
Debug.ShouldStop(32);
_r.runVoidMethod ("Add",(Object)((_tiempo)));
 BA.debugLineNum = 295;BA.debugLine="Return r";
Debug.ShouldStop(64);
if (true) {
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(_r));return;};
 BA.debugLineNum = 296;BA.debugLine="End Sub";
Debug.ShouldStop(128);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static void  _generalistviewrutas(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("generaListViewRutas (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,195);
if (RapidSub.canDelegate("generalistviewrutas")) { __ref.runUserSub(false, "c_clientes","generalistviewrutas", __ref); return;}
ResumableSub_generaListViewRutas rsub = new ResumableSub_generaListViewRutas(null,__ref);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_generaListViewRutas extends BA.ResumableSub {
public ResumableSub_generaListViewRutas(reparto_mazapa.keymon.lat.c_clientes parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_clientes parent;
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
int _i = 0;
int step16;
int limit16;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("generaListViewRutas (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,195);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 196;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(8);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 197;BA.debugLine="Sleep(110)";
Debug.ShouldStop(16);
parent.__c.runVoidMethod ("Sleep",__ref.getField(false, "ba"),anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "generalistviewrutas"),BA.numberCast(int.class, 110));
this.state = 9;
return;
case 9:
//C
this.state = 1;
;
 BA.debugLineNum = 198;BA.debugLine="lfila.Text = \"RUTA PREVENTA\"";
Debug.ShouldStop(32);
__ref.getField(false,"_lfila" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("RUTA PREVENTA"));
 BA.debugLineNum = 199;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(64);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 200;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(128);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 201;BA.debugLine="label1.TextSize = 15";
Debug.ShouldStop(256);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 202;BA.debugLine="label1.TextColor = Colors.Black";
Debug.ShouldStop(512);
_label1.runMethod(true,"setTextColor",parent.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 203;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(1024);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 204;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(2048);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 205;BA.debugLine="label2.TextSize = 15";
Debug.ShouldStop(4096);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 206;BA.debugLine="label2.TextColor = Colors.Black";
Debug.ShouldStop(8192);
_label2.runMethod(true,"setTextColor",parent.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 207;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 60dip";
Debug.ShouldStop(16384);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").runMethod(true,"setItemHeight",parent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60))));
 BA.debugLineNum = 208;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_RUTA, cou";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA, count(*) as cuantos from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 1000 group by CAT_CL_RUTA order by CAT_CL_RUTA asc"))));
 BA.debugLineNum = 209;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(65536);
if (true) break;

case 1:
//if
this.state = 8;
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 210;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(131072);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 211;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(262144);
if (true) break;

case 4:
//for
this.state = 7;
step16 = 1;
limit16 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
Debug.locals.put("i", _i);
this.state = 10;
if (true) break;

case 10:
//C
this.state = 7;
if ((step16 > 0 && _i <= limit16) || (step16 < 0 && _i >= limit16)) this.state = 6;
if (true) break;

case 11:
//C
this.state = 10;
_i = ((int)(0 + _i + step16)) ;
Debug.locals.put("i", _i);
if (true) break;

case 6:
//C
this.state = 11;
 BA.debugLineNum = 212;BA.debugLine="c.Position=i";
Debug.ShouldStop(524288);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 213;BA.debugLine="ListView1.AddTwoLines(\"Ruta: \" & c.GetString(\"C";
Debug.ShouldStop(1048576);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Ruta: "),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Por visitar:  "),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("cuantos")))))));
 if (true) break;
if (true) break;

case 7:
//C
this.state = 8;
Debug.locals.put("i", _i);
;
 if (true) break;

case 8:
//C
this.state = -1;
;
 BA.debugLineNum = 216;BA.debugLine="c.Close";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 217;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _initialize(RemoteObject __ref,RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("Initialize (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,31);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_clientes","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 31;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 32;BA.debugLine="Return Me";
Debug.ShouldStop(-2147483648);
if (true) return __ref;
 BA.debugLineNum = 33;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _listview1_itemclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("ListView1_ItemClick (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,127);
if (RapidSub.canDelegate("listview1_itemclick")) { __ref.runUserSub(false, "c_clientes","listview1_itemclick", __ref, _position, _value); return;}
ResumableSub_ListView1_ItemClick rsub = new ResumableSub_ListView1_ItemClick(null,__ref,_position,_value);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_ListView1_ItemClick extends BA.ResumableSub {
public ResumableSub_ListView1_ItemClick(reparto_mazapa.keymon.lat.c_clientes parent,RemoteObject __ref,RemoteObject _position,RemoteObject _value) {
this.parent = parent;
this.__ref = __ref;
this._position = _position;
this._value = _value;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_clientes parent;
RemoteObject _position;
RemoteObject _value;
RemoteObject _lrt = RemoteObject.createImmutable("");
RemoteObject _thisloc = RemoteObject.declareNull("anywheresoftware.b4a.gps.LocationWrapper");
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
int _i = 0;
RemoteObject _distancia = RemoteObject.createImmutable(0);
RemoteObject _estecliente = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _m1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _k = RemoteObject.declareNull("Object");
int step34;
int limit34;
RemoteObject group45;
int index45;
int groupLen45;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("ListView1_ItemClick (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,127);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 129;BA.debugLine="Log(Value)";
Debug.ShouldStop(1);
parent.__c.runVoidMethod ("LogImpl","35439490",BA.ObjectToString(_value),0);
 BA.debugLineNum = 130;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(2);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 131;BA.debugLine="Sleep(50)";
Debug.ShouldStop(4);
parent.__c.runVoidMethod ("Sleep",__ref.getField(false, "ba"),anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "listview1_itemclick"),BA.numberCast(int.class, 50));
this.state = 31;
return;
case 31:
//C
this.state = 1;
;
 BA.debugLineNum = 132;BA.debugLine="Subs.SetDivider(ListView1, Colors.LightGray, 2)";
Debug.ShouldStop(8);
parent._subs.runVoidMethod ("_setdivider" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(parent.__c.getField(false,"Colors").getField(true,"LightGray")),(Object)(BA.numberCast(int.class, 2)));
 BA.debugLineNum = 133;BA.debugLine="If Not(l_rutaInfo.Visible) Then";
Debug.ShouldStop(16);
if (true) break;

case 1:
//if
this.state = 6;
if (parent.__c.runMethod(true,"Not",(Object)(__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"getVisible"))).<Boolean>get().booleanValue()) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 6;
 BA.debugLineNum = 134;BA.debugLine="ListView1.Top = lv1Top";
Debug.ShouldStop(32);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setTop",BA.numberCast(int.class, __ref.getField(true,"_lv1top" /*RemoteObject*/ )));
 if (true) break;

case 5:
//C
this.state = 6;
 BA.debugLineNum = 136;BA.debugLine="ListView1.Top = lv1Top + 100";
Debug.ShouldStop(128);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setTop",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_lv1top" /*RemoteObject*/ )),RemoteObject.createImmutable(100)}, "+",1, 0)));
 if (true) break;

case 6:
//C
this.state = 7;
;
 BA.debugLineNum = 138;BA.debugLine="l_rutaInfo.Visible = False";
Debug.ShouldStop(512);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setVisible",parent.__c.getField(true,"False"));
 BA.debugLineNum = 139;BA.debugLine="b_GetDirs.Visible = False";
Debug.ShouldStop(1024);
__ref.getField(false,"_b_getdirs" /*RemoteObject*/ ).runMethod(true,"setVisible",parent.__c.getField(true,"False"));
 BA.debugLineNum = 140;BA.debugLine="If entro = \"2\" Then";
Debug.ShouldStop(2048);
if (true) break;

case 7:
//if
this.state = 30;
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_entro" /*RemoteObject*/ ),BA.ObjectToString("2"))) { 
this.state = 9;
}else 
{ BA.debugLineNum = 186;BA.debugLine="Else If entro = \"3\" Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_entro" /*RemoteObject*/ ),BA.ObjectToString("3"))) { 
this.state = 29;
}}
if (true) break;

case 9:
//C
this.state = 10;
 BA.debugLineNum = 144;BA.debugLine="Private lrt As String";
Debug.ShouldStop(32768);
_lrt = RemoteObject.createImmutable("");Debug.locals.put("lrt", _lrt);
 BA.debugLineNum = 145;BA.debugLine="lrt = Value";
Debug.ShouldStop(65536);
_lrt = BA.ObjectToString(_value);Debug.locals.put("lrt", _lrt);
 BA.debugLineNum = 146;BA.debugLine="laRuta = lrt.SubString(6) 'Quitamos el texto \"Ru";
Debug.ShouldStop(131072);
__ref.setField ("_laruta" /*RemoteObject*/ ,_lrt.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 6))));
 BA.debugLineNum = 147;BA.debugLine="Log($\"Original: ${Value} - Mod: |${lrt.SubString";
Debug.ShouldStop(262144);
parent.__c.runVoidMethod ("LogImpl","35439508",(RemoteObject.concat(RemoteObject.createImmutable("Original: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_value)),RemoteObject.createImmutable(" - Mod: |"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_lrt.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 6)))))),RemoteObject.createImmutable("| - laRuta: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(true,"_laruta" /*RemoteObject*/ )))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 148;BA.debugLine="rutaacambiar = laRuta";
Debug.ShouldStop(524288);
__ref.setField ("_rutaacambiar" /*RemoteObject*/ ,__ref.getField(true,"_laruta" /*RemoteObject*/ ));
 BA.debugLineNum = 149;BA.debugLine="c2 = Starter.skmt.ExecQuery2(\"select CAT_CL_NOMB";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c2" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where CAT_CL_RUTA = ? and gestion = 0 AND CAT_CL_RUTA <> 1000 order by CAT_CL_NOMBRE ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(true,"_laruta" /*RemoteObject*/ )}))));
 BA.debugLineNum = 150;BA.debugLine="Private thisLoc As Location";
Debug.ShouldStop(2097152);
_thisloc = RemoteObject.createNew ("anywheresoftware.b4a.gps.LocationWrapper");Debug.locals.put("thisLoc", _thisloc);
 BA.debugLineNum = 151;BA.debugLine="Private label1 As Label";
Debug.ShouldStop(4194304);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 152;BA.debugLine="Private label2 As Label";
Debug.ShouldStop(8388608);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 153;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(16777216);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 154;BA.debugLine="label1.TextSize = 15";
Debug.ShouldStop(33554432);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 155;BA.debugLine="label1.TextColor = Colors.black";
Debug.ShouldStop(67108864);
_label1.runMethod(true,"setTextColor",parent.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 156;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(134217728);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 157;BA.debugLine="label2.TextSize = 15";
Debug.ShouldStop(268435456);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 158;BA.debugLine="label2.TextColor = Colors.black";
Debug.ShouldStop(536870912);
_label2.runMethod(true,"setTextColor",parent.__c.getField(false,"Colors").getField(true,"Black"));
 BA.debugLineNum = 159;BA.debugLine="label2.Height = 57dip";
Debug.ShouldStop(1073741824);
_label2.runMethod(true,"setHeight",parent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 57))));
 BA.debugLineNum = 160;BA.debugLine="thisLoc.Initialize";
Debug.ShouldStop(-2147483648);
_thisloc.runVoidMethod ("Initialize");
 BA.debugLineNum = 161;BA.debugLine="If entro = 2 Then ListView1.TwoLinesLayout.ItemH";
Debug.ShouldStop(1);
if (true) break;

case 10:
//if
this.state = 15;
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_entro" /*RemoteObject*/ ),BA.NumberToString(2))) { 
this.state = 12;
;}if (true) break;

case 12:
//C
this.state = 15;
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").runMethod(true,"setItemHeight",parent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 90))));
if (true) break;

case 15:
//C
this.state = 16;
;
 BA.debugLineNum = 162;BA.debugLine="lfila.text = \"Nombre y Calle\"";
Debug.ShouldStop(2);
__ref.getField(false,"_lfila" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("Nombre y Calle"));
 BA.debugLineNum = 163;BA.debugLine="distOrderedMap.Initialize";
Debug.ShouldStop(4);
__ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 164;BA.debugLine="If c2.RowCount > 0 Then";
Debug.ShouldStop(8);
if (true) break;

case 16:
//if
this.state = 27;
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 18;
}if (true) break;

case 18:
//C
this.state = 19;
 BA.debugLineNum = 165;BA.debugLine="For i = 0 To c2.RowCount -1 'Generamos mapa de";
Debug.ShouldStop(16);
if (true) break;

case 19:
//for
this.state = 22;
step34 = 1;
limit34 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
Debug.locals.put("i", _i);
this.state = 32;
if (true) break;

case 32:
//C
this.state = 22;
if ((step34 > 0 && _i <= limit34) || (step34 < 0 && _i >= limit34)) this.state = 21;
if (true) break;

case 33:
//C
this.state = 32;
_i = ((int)(0 + _i + step34)) ;
Debug.locals.put("i", _i);
if (true) break;

case 21:
//C
this.state = 33;
 BA.debugLineNum = 166;BA.debugLine="c2.Position = i";
Debug.ShouldStop(32);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 167;BA.debugLine="thisLoc.Latitude = c2.GetString(\"CAT_CL_LAT\")";
Debug.ShouldStop(64);
_thisloc.runMethod(true,"setLatitude",BA.numberCast(double.class, __ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LAT")))));
 BA.debugLineNum = 168;BA.debugLine="thisLoc.Longitude = c2.GetString(\"CAT_CL_LONG\"";
Debug.ShouldStop(128);
_thisloc.runMethod(true,"setLongitude",BA.numberCast(double.class, __ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LONG")))));
 BA.debugLineNum = 170;BA.debugLine="Private distancia As Int = Tracker.UUGCoords.D";
Debug.ShouldStop(512);
_distancia = BA.numberCast(int.class, parent._tracker._uugcoords /*RemoteObject*/ .runMethod(true,"DistanceTo",(Object)((_thisloc.getObject()))));Debug.locals.put("distancia", _distancia);Debug.locals.put("distancia", _distancia);
 BA.debugLineNum = 171;BA.debugLine="Private esteCliente As Map = CreateMap(\"distan";
Debug.ShouldStop(1024);
_estecliente = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_estecliente = parent.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("distancia")),(_distancia),RemoteObject.createImmutable(("ubicacion")),(RemoteObject.concat(_thisloc.runMethod(true,"getLongitude"),RemoteObject.createImmutable(","),_thisloc.runMethod(true,"getLatitude"))),RemoteObject.createImmutable(("codigo")),(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CODIGO")))),RemoteObject.createImmutable(("nomDirDist")),((RemoteObject.concat(RemoteObject.createImmutable(""),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE")))))),RemoteObject.createImmutable(" CALLE: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CALLE")))))),RemoteObject.createImmutable(" "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent.__c.getField(true,"CRLF")))),RemoteObject.createImmutable("Distancia: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)(((RemoteObject.solve(new RemoteObject[] {_distancia,RemoteObject.createImmutable(1000)}, "/",0, 0))))),RemoteObject.createImmutable(" kms"))))}));Debug.locals.put("esteCliente", _estecliente);Debug.locals.put("esteCliente", _estecliente);
 BA.debugLineNum = 172;BA.debugLine="distOrderedMap.Put(distancia, esteCliente)";
Debug.ShouldStop(2048);
__ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_put" /*RemoteObject*/ ,(Object)((_distancia)),(Object)((_estecliente.getObject())));
 if (true) break;
if (true) break;

case 22:
//C
this.state = 23;
Debug.locals.put("i", _i);
;
 BA.debugLineNum = 174;BA.debugLine="distOrderedMap.Keys.Sort(True) 'Ordenamos la ma";
Debug.ShouldStop(8192);
__ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ ).runVoidMethod ("Sort",(Object)(parent.__c.getField(true,"True")));
 BA.debugLineNum = 175;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(16384);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 176;BA.debugLine="Private m1 As Map";
Debug.ShouldStop(32768);
_m1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m1", _m1);
 BA.debugLineNum = 177;BA.debugLine="For Each k As Object In distOrderedMap.Keys  'G";
Debug.ShouldStop(65536);
if (true) break;

case 23:
//for
this.state = 26;
group45 = __ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ );
index45 = 0;
groupLen45 = group45.runMethod(true,"getSize").<Integer>get();
Debug.locals.put("k", _k);
this.state = 34;
if (true) break;

case 34:
//C
this.state = 26;
if (index45 < groupLen45) {
this.state = 25;
_k = group45.runMethod(false,"Get",index45);Debug.locals.put("k", _k);}
if (true) break;

case 35:
//C
this.state = 34;
index45++;
Debug.locals.put("k", _k);
if (true) break;

case 25:
//C
this.state = 35;
 BA.debugLineNum = 178;BA.debugLine="m1 = distOrderedMap.Get(k)";
Debug.ShouldStop(131072);
_m1 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_distorderedmap" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_get" /*RemoteObject*/ ,(Object)(_k)));Debug.locals.put("m1", _m1);
 BA.debugLineNum = 179;BA.debugLine="m1.Get(\"codigo\")";
Debug.ShouldStop(262144);
_m1.runVoidMethod ("Get",(Object)((RemoteObject.createImmutable("codigo"))));
 BA.debugLineNum = 181;BA.debugLine="ListView1.AddTwoLines(m1.Get(\"codigo\"), m1.Get";
Debug.ShouldStop(1048576);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(_m1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("codigo")))))),(Object)(BA.ObjectToCharSequence(_m1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("nomDirDist")))))));
 if (true) break;
if (true) break;

case 26:
//C
this.state = 27;
Debug.locals.put("k", _k);
;
 if (true) break;

case 27:
//C
this.state = 30;
;
 BA.debugLineNum = 184;BA.debugLine="c2.Close";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 185;BA.debugLine="entro = \"3\"";
Debug.ShouldStop(16777216);
__ref.setField ("_entro" /*RemoteObject*/ ,BA.ObjectToString("3"));
 if (true) break;

case 29:
//C
this.state = 30;
 BA.debugLineNum = 188;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
Debug.ShouldStop(134217728);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from CUENTAA")));
 BA.debugLineNum = 189;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CUENTAA";
Debug.ShouldStop(268435456);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CUENTAA VALUES (?)")),(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {_value})))));
 BA.debugLineNum = 190;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
Debug.ShouldStop(536870912);
parent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Cliente")));
 if (true) break;

case 30:
//C
this.state = -1;
;
 BA.debugLineNum = 192;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _todosavisitar(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("todosAVisitar (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,666);
if (RapidSub.canDelegate("todosavisitar")) { return __ref.runUserSub(false, "c_clientes","todosavisitar", __ref);}
RemoteObject _sqlderuta = RemoteObject.createImmutable("");
RemoteObject _avisitar = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _tmplist = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _coords = RemoteObject.declareNull("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
 BA.debugLineNum = 666;BA.debugLine="Sub todosAVisitar As List";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 667;BA.debugLine="Log(laRuta)";
Debug.ShouldStop(67108864);
c_clientes.__c.runVoidMethod ("LogImpl","36225921",__ref.getField(true,"_laruta" /*RemoteObject*/ ),0);
 BA.debugLineNum = 668;BA.debugLine="Log(entro)";
Debug.ShouldStop(134217728);
c_clientes.__c.runVoidMethod ("LogImpl","36225922",__ref.getField(true,"_entro" /*RemoteObject*/ ),0);
 BA.debugLineNum = 669;BA.debugLine="Private sqlDeRuta As String = \"\"";
Debug.ShouldStop(268435456);
_sqlderuta = BA.ObjectToString("");Debug.locals.put("sqlDeRuta", _sqlderuta);Debug.locals.put("sqlDeRuta", _sqlderuta);
 BA.debugLineNum = 670;BA.debugLine="If entro = 3 Then sqlDeRuta = $\"and CAT_CL_RUTA =";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_entro" /*RemoteObject*/ ),BA.NumberToString(3))) { 
_sqlderuta = (RemoteObject.concat(RemoteObject.createImmutable("and CAT_CL_RUTA = '"),c_clientes.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(true,"_laruta" /*RemoteObject*/ )))),RemoteObject.createImmutable("'")));Debug.locals.put("sqlDeRuta", _sqlderuta);};
 BA.debugLineNum = 671;BA.debugLine="Private aVisitar, tmpList As List";
Debug.ShouldStop(1073741824);
_avisitar = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("aVisitar", _avisitar);
_tmplist = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("tmpList", _tmplist);
 BA.debugLineNum = 672;BA.debugLine="aVisitar.Initialize";
Debug.ShouldStop(-2147483648);
_avisitar.runVoidMethod ("Initialize");
 BA.debugLineNum = 673;BA.debugLine="Private coords As ResultSet = Starter.skmt.ExecQu";
Debug.ShouldStop(1);
_coords = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.ResultSetWrapper");
_coords = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.ResultSetWrapper"), c_clientes._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("select CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where gestion = 0 AND CAT_CL_RUTA <> 500 "),c_clientes.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_sqlderuta))),RemoteObject.createImmutable(""))))));Debug.locals.put("coords", _coords);Debug.locals.put("coords", _coords);
 BA.debugLineNum = 674;BA.debugLine="Do While coords.NextRow";
Debug.ShouldStop(2);
while (_coords.runMethod(true,"NextRow").<Boolean>get().booleanValue()) {
 BA.debugLineNum = 675;BA.debugLine="tmpList.Initialize";
Debug.ShouldStop(4);
_tmplist.runVoidMethod ("Initialize");
 BA.debugLineNum = 676;BA.debugLine="tmpList.AddAll(Array As String(coords.GetString(";
Debug.ShouldStop(8);
_tmplist.runVoidMethod ("AddAll",(Object)(c_clientes.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {3},new Object[] {_coords.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CODIGO"))),_coords.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LONG"))),_coords.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LAT")))})))));
 BA.debugLineNum = 677;BA.debugLine="aVisitar.Add(tmpList)";
Debug.ShouldStop(16);
_avisitar.runVoidMethod ("Add",(Object)((_tmplist.getObject())));
 }
;
 BA.debugLineNum = 679;BA.debugLine="Log(aVisitar)";
Debug.ShouldStop(64);
c_clientes.__c.runVoidMethod ("LogImpl","36225933",BA.ObjectToString(_avisitar),0);
 BA.debugLineNum = 680;BA.debugLine="Return aVisitar";
Debug.ShouldStop(128);
if (true) return _avisitar;
 BA.debugLineNum = 681;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _traerutadia(RemoteObject __ref,RemoteObject _avisitar) throws Exception{
try {
		Debug.PushSubsStack("traeRutaDia (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,300);
if (RapidSub.canDelegate("traerutadia")) { __ref.runUserSub(false, "c_clientes","traerutadia", __ref, _avisitar); return;}
ResumableSub_traeRutaDia rsub = new ResumableSub_traeRutaDia(null,__ref,_avisitar);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_traeRutaDia extends BA.ResumableSub {
public ResumableSub_traeRutaDia(reparto_mazapa.keymon.lat.c_clientes parent,RemoteObject __ref,RemoteObject _avisitar) {
this.parent = parent;
this.__ref = __ref;
this._avisitar = _avisitar;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
reparto_mazapa.keymon.lat.c_clientes parent;
RemoteObject _avisitar;
RemoteObject _coordsinicio = RemoteObject.createImmutable("");
RemoteObject _rutacompleta = RemoteObject.createImmutable("");
RemoteObject _preruta = RemoteObject.createImmutable("");
RemoteObject _distanciatotal = RemoteObject.createImmutable(0);
RemoteObject _distanciatotal0 = RemoteObject.createImmutable(0);
RemoteObject _tiempo0 = RemoteObject.createImmutable(0);
RemoteObject _tiempo = RemoteObject.createImmutable(0);
RemoteObject _masde100 = RemoteObject.createImmutable(false);
RemoteObject _m4 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _visitaactual = RemoteObject.createImmutable(0);
RemoteObject _cuantosantes = RemoteObject.createImmutable(0);
RemoteObject _k = RemoteObject.declareNull("Object");
RemoteObject _tiempovisitas = RemoteObject.createImmutable(0);
RemoteObject _j0 = RemoteObject.declareNull("reparto_mazapa.keymon.lat.httpjob");
RemoteObject _jp0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.JSONParser");
RemoteObject _m0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _puntos0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _estewaypoint0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
int _p = 0;
RemoteObject _rutas0 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _rutas20 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _j = RemoteObject.declareNull("reparto_mazapa.keymon.lat.httpjob");
RemoteObject _jp = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.JSONParser");
RemoteObject _m = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _puntos = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _estewaypoint = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _twpi = RemoteObject.createImmutable(0);
RemoteObject _rutas = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _rutas2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _r = RemoteObject.createImmutable(0);
RemoteObject _r1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _wps = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _cs = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
RemoteObject _cs2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.CSBuilder");
int _i = 0;
RemoteObject group18;
int index18;
int groupLen18;
int step47;
int limit47;
int step78;
int limit78;
RemoteObject group112;
int index112;
int groupLen112;
int step135;
int limit135;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("traeRutaDia (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,300);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
Debug.locals.put("aVisitar", _avisitar);
 BA.debugLineNum = 301;BA.debugLine="Private coordsInicio As String = $\"${Starter.cedi";
Debug.ShouldStop(4096);
_coordsinicio = (RemoteObject.concat(RemoteObject.createImmutable(""),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLongitude")))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLatitude")))),RemoteObject.createImmutable("")));Debug.locals.put("coordsInicio", _coordsinicio);Debug.locals.put("coordsInicio", _coordsinicio);
 BA.debugLineNum = 302;BA.debugLine="Log($\"Coordenadas de inicio: ${Starter.cedisLocat";
Debug.ShouldStop(8192);
parent.__c.runVoidMethod ("LogImpl","35767170",(RemoteObject.concat(RemoteObject.createImmutable("Coordenadas de inicio: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLongitude")))),RemoteObject.createImmutable(","),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent._starter._cedislocation /*RemoteObject*/ .runMethod(true,"getLatitude")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 303;BA.debugLine="Private rutaCompleta As String = coordsInicio";
Debug.ShouldStop(16384);
_rutacompleta = _coordsinicio;Debug.locals.put("rutaCompleta", _rutacompleta);Debug.locals.put("rutaCompleta", _rutacompleta);
 BA.debugLineNum = 304;BA.debugLine="Private preRuta As String = coordsInicio";
Debug.ShouldStop(32768);
_preruta = _coordsinicio;Debug.locals.put("preRuta", _preruta);Debug.locals.put("preRuta", _preruta);
 BA.debugLineNum = 305;BA.debugLine="Private distanciaTotal, distanciaTotal0, tiempo0,";
Debug.ShouldStop(65536);
_distanciatotal = RemoteObject.createImmutable(0);Debug.locals.put("distanciaTotal", _distanciatotal);
_distanciatotal0 = RemoteObject.createImmutable(0);Debug.locals.put("distanciaTotal0", _distanciatotal0);
_tiempo0 = RemoteObject.createImmutable(0);Debug.locals.put("tiempo0", _tiempo0);
_tiempo = RemoteObject.createImmutable(0);Debug.locals.put("tiempo", _tiempo);
 BA.debugLineNum = 306;BA.debugLine="Private masDe100 As Boolean";
Debug.ShouldStop(131072);
_masde100 = RemoteObject.createImmutable(false);Debug.locals.put("masDe100", _masde100);
 BA.debugLineNum = 307;BA.debugLine="Private m4 As Map";
Debug.ShouldStop(262144);
_m4 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("m4", _m4);
 BA.debugLineNum = 308;BA.debugLine="Private visitaActual As Int = 0";
Debug.ShouldStop(524288);
_visitaactual = BA.numberCast(int.class, 0);Debug.locals.put("visitaActual", _visitaactual);Debug.locals.put("visitaActual", _visitaactual);
 BA.debugLineNum = 309;BA.debugLine="Private cuantosAntes As Int = 0";
Debug.ShouldStop(1048576);
_cuantosantes = BA.numberCast(int.class, 0);Debug.locals.put("cuantosAntes", _cuantosantes);Debug.locals.put("cuantosAntes", _cuantosantes);
 BA.debugLineNum = 310;BA.debugLine="listaWayPoints.Initialize";
Debug.ShouldStop(2097152);
__ref.getField(false,"_listawaypoints" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 311;BA.debugLine="If aVisitar.Keys.Size > 98 Then 'Si los clientes";
Debug.ShouldStop(4194304);
if (true) break;

case 1:
//if
this.state = 4;
if (RemoteObject.solveBoolean(">",_avisitar.runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ ).runMethod(true,"getSize"),BA.numberCast(double.class, 98))) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 312;BA.debugLine="cuantosAntes = aVisitar.Keys.Size - 98 'Definimo";
Debug.ShouldStop(8388608);
_cuantosantes = RemoteObject.solve(new RemoteObject[] {_avisitar.runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ ).runMethod(true,"getSize"),RemoteObject.createImmutable(98)}, "-",1, 1);Debug.locals.put("cuantosAntes", _cuantosantes);
 BA.debugLineNum = 313;BA.debugLine="preRuta = coordsInicio 'Ponemos las coordenadas";
Debug.ShouldStop(16777216);
_preruta = _coordsinicio;Debug.locals.put("preRuta", _preruta);
 BA.debugLineNum = 314;BA.debugLine="rutaCompleta = \"\"";
Debug.ShouldStop(33554432);
_rutacompleta = BA.ObjectToString("");Debug.locals.put("rutaCompleta", _rutacompleta);
 BA.debugLineNum = 315;BA.debugLine="masDe100 = True";
Debug.ShouldStop(67108864);
_masde100 = parent.__c.getField(true,"True");Debug.locals.put("masDe100", _masde100);
 if (true) break;

case 4:
//C
this.state = 5;
;
 BA.debugLineNum = 317;BA.debugLine="Log($\"a visitar: ${aVisitar.Keys.Size}\"$)";
Debug.ShouldStop(268435456);
parent.__c.runVoidMethod ("LogImpl","35767185",(RemoteObject.concat(RemoteObject.createImmutable("a visitar: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_avisitar.runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ ).runMethod(true,"getSize")))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 318;BA.debugLine="For Each k As Object In aVisitar.Keys";
Debug.ShouldStop(536870912);
if (true) break;

case 5:
//for
this.state = 15;
group18 = _avisitar.runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ );
index18 = 0;
groupLen18 = group18.runMethod(true,"getSize").<Integer>get();
Debug.locals.put("k", _k);
this.state = 70;
if (true) break;

case 70:
//C
this.state = 15;
if (index18 < groupLen18) {
this.state = 7;
_k = group18.runMethod(false,"Get",index18);Debug.locals.put("k", _k);}
if (true) break;

case 71:
//C
this.state = 70;
index18++;
Debug.locals.put("k", _k);
if (true) break;

case 7:
//C
this.state = 8;
 BA.debugLineNum = 319;BA.debugLine="visitaActual = visitaActual + 1";
Debug.ShouldStop(1073741824);
_visitaactual = RemoteObject.solve(new RemoteObject[] {_visitaactual,RemoteObject.createImmutable(1)}, "+",1, 1);Debug.locals.put("visitaActual", _visitaactual);
 BA.debugLineNum = 320;BA.debugLine="m4 = aVisitar.Get(k)";
Debug.ShouldStop(-2147483648);
_m4 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _avisitar.runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_get" /*RemoteObject*/ ,(Object)(_k)));Debug.locals.put("m4", _m4);
 BA.debugLineNum = 322;BA.debugLine="If visitaActual < cuantosAntes + 2 Then 'Si esta";
Debug.ShouldStop(2);
if (true) break;

case 8:
//if
this.state = 11;
if (RemoteObject.solveBoolean("<",_visitaactual,BA.numberCast(double.class, RemoteObject.solve(new RemoteObject[] {_cuantosantes,RemoteObject.createImmutable(2)}, "+",1, 1)))) { 
this.state = 10;
}if (true) break;

case 10:
//C
this.state = 11;
 BA.debugLineNum = 323;BA.debugLine="preRuta = preRuta & \";\" & m4.Get(\"coords\")";
Debug.ShouldStop(4);
_preruta = RemoteObject.concat(_preruta,RemoteObject.createImmutable(";"),_m4.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("coords")))));Debug.locals.put("preRuta", _preruta);
 if (true) break;
;
 BA.debugLineNum = 326;BA.debugLine="If visitaActual >= cuantosAntes + 2 Then 'Si est";
Debug.ShouldStop(32);

case 11:
//if
this.state = 14;
if (RemoteObject.solveBoolean("g",_visitaactual,BA.numberCast(double.class, RemoteObject.solve(new RemoteObject[] {_cuantosantes,RemoteObject.createImmutable(2)}, "+",1, 1)))) { 
this.state = 13;
}if (true) break;

case 13:
//C
this.state = 14;
 BA.debugLineNum = 327;BA.debugLine="rutaCompleta = rutaCompleta & \";\" & m4.Get(\"coo";
Debug.ShouldStop(64);
_rutacompleta = RemoteObject.concat(_rutacompleta,RemoteObject.createImmutable(";"),_m4.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("coords")))));Debug.locals.put("rutaCompleta", _rutacompleta);
 if (true) break;

case 14:
//C
this.state = 71;
;
 if (true) break;
if (true) break;

case 15:
//C
this.state = 16;
Debug.locals.put("k", _k);
;
 BA.debugLineNum = 331;BA.debugLine="rutaCompleta = rutaCompleta & \";\" & coordsInicio";
Debug.ShouldStop(1024);
_rutacompleta = RemoteObject.concat(_rutacompleta,RemoteObject.createImmutable(";"),_coordsinicio);Debug.locals.put("rutaCompleta", _rutacompleta);
 BA.debugLineNum = 333;BA.debugLine="If rutaCompleta.StartsWith(\";\") Then rutaCompleta";
Debug.ShouldStop(4096);
if (true) break;

case 16:
//if
this.state = 21;
if (_rutacompleta.runMethod(true,"startsWith",(Object)(RemoteObject.createImmutable(";"))).<Boolean>get().booleanValue()) { 
this.state = 18;
;}if (true) break;

case 18:
//C
this.state = 21;
_rutacompleta = _rutacompleta.runMethod(true,"substring",(Object)(BA.numberCast(int.class, 1)));Debug.locals.put("rutaCompleta", _rutacompleta);
if (true) break;

case 21:
//C
this.state = 22;
;
 BA.debugLineNum = 336;BA.debugLine="ProgressDialogShow2(\"Calculando distancia y tiemp";
Debug.ShouldStop(32768);
parent.__c.runVoidMethod ("ProgressDialogShow2",__ref.getField(false, "ba"),(Object)(BA.ObjectToCharSequence("Calculando distancia y tiempo, un momento por favor.")),(Object)(parent.__c.getField(true,"False")));
 BA.debugLineNum = 337;BA.debugLine="Private tiempoVisitas As Double 'TIMEPO DE 4 MINU";
Debug.ShouldStop(65536);
_tiempovisitas = RemoteObject.createImmutable(0);Debug.locals.put("tiempoVisitas", _tiempovisitas);
 BA.debugLineNum = 338;BA.debugLine="tiempoVisitas = aVisitar.Keys.Size * 4 * 60 'Aqui";
Debug.ShouldStop(131072);
_tiempovisitas = BA.numberCast(double.class, RemoteObject.solve(new RemoteObject[] {_avisitar.runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ ).runMethod(true,"getSize"),RemoteObject.createImmutable(4),RemoteObject.createImmutable(60)}, "**",0, 1));Debug.locals.put("tiempoVisitas", _tiempovisitas);
 BA.debugLineNum = 339;BA.debugLine="tiempo0 = 0";
Debug.ShouldStop(262144);
_tiempo0 = BA.numberCast(double.class, 0);Debug.locals.put("tiempo0", _tiempo0);
 BA.debugLineNum = 340;BA.debugLine="distanciaTotal0 = 0";
Debug.ShouldStop(524288);
_distanciatotal0 = BA.numberCast(double.class, 0);Debug.locals.put("distanciaTotal0", _distanciatotal0);
 BA.debugLineNum = 341;BA.debugLine="If masDe100 Then 'Si son mas de 100, entonces pri";
Debug.ShouldStop(1048576);
if (true) break;

case 22:
//if
this.state = 39;
if (_masde100.<Boolean>get().booleanValue()) { 
this.state = 24;
}if (true) break;

case 24:
//C
this.state = 25;
 BA.debugLineNum = 342;BA.debugLine="Dim j0 As HttpJob";
Debug.ShouldStop(2097152);
_j0 = RemoteObject.createNew ("reparto_mazapa.keymon.lat.httpjob");Debug.locals.put("j0", _j0);
 BA.debugLineNum = 343;BA.debugLine="j0.Initialize(\"trip0\", Me)";
Debug.ShouldStop(4194304);
_j0.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("trip0")),(Object)(__ref));
 BA.debugLineNum = 344;BA.debugLine="j0.Download(\"https://router.project-osrm.org/tri";
Debug.ShouldStop(8388608);
_j0.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_download" /*RemoteObject*/ ,(Object)(RemoteObject.concat(RemoteObject.createImmutable("https://router.project-osrm.org/trip/v1/driving/"),_preruta,RemoteObject.createImmutable("?source=first&destination=last&roundtrip=false&geometries=geojson"))));
 BA.debugLineNum = 346;BA.debugLine="Wait For (j0) JobDone(j0 As HttpJob)";
Debug.ShouldStop(33554432);
parent.__c.runVoidMethod ("WaitFor","jobdone", __ref.getField(false, "ba"), anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "traerutadia"), (_j0));
this.state = 72;
return;
case 72:
//C
this.state = 25;
_j0 = (RemoteObject) result.getArrayElement(false,RemoteObject.createImmutable(1));Debug.locals.put("j0", _j0);
;
 BA.debugLineNum = 347;BA.debugLine="If j0.Success Then";
Debug.ShouldStop(67108864);
if (true) break;

case 25:
//if
this.state = 38;
if (_j0.getField(true,"_success" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
this.state = 27;
}else {
this.state = 37;
}if (true) break;

case 27:
//C
this.state = 28;
 BA.debugLineNum = 348;BA.debugLine="Dim jp0 As JSONParser";
Debug.ShouldStop(134217728);
_jp0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser");Debug.locals.put("jp0", _jp0);
 BA.debugLineNum = 349;BA.debugLine="jp0.Initialize(j0.GetString)";
Debug.ShouldStop(268435456);
_jp0.runVoidMethod ("Initialize",(Object)(_j0.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_getstring" /*RemoteObject*/ )));
 BA.debugLineNum = 350;BA.debugLine="Dim m0 As Map = jp0.NextObject";
Debug.ShouldStop(536870912);
_m0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_m0 = _jp0.runMethod(false,"NextObject");Debug.locals.put("m0", _m0);Debug.locals.put("m0", _m0);
 BA.debugLineNum = 351;BA.debugLine="If m0.Get(\"code\") = \"Ok\" Then";
Debug.ShouldStop(1073741824);
if (true) break;

case 28:
//if
this.state = 35;
if (RemoteObject.solveBoolean("=",_m0.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("code")))),RemoteObject.createImmutable(("Ok")))) { 
this.state = 30;
}if (true) break;

case 30:
//C
this.state = 31;
 BA.debugLineNum = 352;BA.debugLine="Dim puntos0 As List = m0.Get(\"waypoints\")";
Debug.ShouldStop(-2147483648);
_puntos0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_puntos0 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _m0.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("waypoints")))));Debug.locals.put("puntos0", _puntos0);Debug.locals.put("puntos0", _puntos0);
 BA.debugLineNum = 353;BA.debugLine="Private esteWayPoint0 As Map";
Debug.ShouldStop(1);
_estewaypoint0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("esteWayPoint0", _estewaypoint0);
 BA.debugLineNum = 354;BA.debugLine="For p = 0 To puntos0.Size -1";
Debug.ShouldStop(2);
if (true) break;

case 31:
//for
this.state = 34;
step47 = 1;
limit47 = RemoteObject.solve(new RemoteObject[] {_puntos0.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
Debug.locals.put("p", _p);
this.state = 73;
if (true) break;

case 73:
//C
this.state = 34;
if ((step47 > 0 && _p <= limit47) || (step47 < 0 && _p >= limit47)) this.state = 33;
if (true) break;

case 74:
//C
this.state = 73;
_p = ((int)(0 + _p + step47)) ;
Debug.locals.put("p", _p);
if (true) break;

case 33:
//C
this.state = 74;
 BA.debugLineNum = 355;BA.debugLine="esteWayPoint0 = puntos0.Get(p)";
Debug.ShouldStop(4);
_estewaypoint0 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _puntos0.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))));Debug.locals.put("esteWayPoint0", _estewaypoint0);
 BA.debugLineNum = 358;BA.debugLine="esteWayPoint0.Remove(\"hint\")";
Debug.ShouldStop(32);
_estewaypoint0.runVoidMethod ("Remove",(Object)((RemoteObject.createImmutable("hint"))));
 BA.debugLineNum = 359;BA.debugLine="esteWayPoint0.Remove(\"distance\")";
Debug.ShouldStop(64);
_estewaypoint0.runVoidMethod ("Remove",(Object)((RemoteObject.createImmutable("distance"))));
 BA.debugLineNum = 360;BA.debugLine="esteWayPoint0.Remove(\"trips_index\")";
Debug.ShouldStop(128);
_estewaypoint0.runVoidMethod ("Remove",(Object)((RemoteObject.createImmutable("trips_index"))));
 BA.debugLineNum = 361;BA.debugLine="listaWayPoints.Add(esteWayPoint0)";
Debug.ShouldStop(256);
__ref.getField(false,"_listawaypoints" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_estewaypoint0.getObject())));
 if (true) break;
if (true) break;

case 34:
//C
this.state = 35;
Debug.locals.put("p", _p);
;
 BA.debugLineNum = 364;BA.debugLine="Dim rutas0 As List = m0.Get(\"trips\")";
Debug.ShouldStop(2048);
_rutas0 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_rutas0 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _m0.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("trips")))));Debug.locals.put("rutas0", _rutas0);Debug.locals.put("rutas0", _rutas0);
 BA.debugLineNum = 365;BA.debugLine="Dim rutas20 As Map = rutas0.Get(0)";
Debug.ShouldStop(4096);
_rutas20 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_rutas20 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _rutas0.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))));Debug.locals.put("rutas20", _rutas20);Debug.locals.put("rutas20", _rutas20);
 BA.debugLineNum = 368;BA.debugLine="distanciaTotal0 = rutas20.Get(\"distance\")";
Debug.ShouldStop(32768);
_distanciatotal0 = BA.numberCast(double.class, _rutas20.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("distance")))));Debug.locals.put("distanciaTotal0", _distanciatotal0);
 BA.debugLineNum = 369;BA.debugLine="tiempo0 = rutas20.Get(\"duration\")";
Debug.ShouldStop(65536);
_tiempo0 = BA.numberCast(double.class, _rutas20.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("duration")))));Debug.locals.put("tiempo0", _tiempo0);
 BA.debugLineNum = 370;BA.debugLine="tiempo0 = ((tiempo0 * 2) ) 'Tiempo X 2 (es muy";
Debug.ShouldStop(131072);
_tiempo0 = ((RemoteObject.solve(new RemoteObject[] {_tiempo0,RemoteObject.createImmutable(2)}, "*",0, 0)));Debug.locals.put("tiempo0", _tiempo0);
 BA.debugLineNum = 371;BA.debugLine="Log($\"Distancia total ruta inicial: $1.1{dista";
Debug.ShouldStop(262144);
parent.__c.runVoidMethod ("LogImpl","35767239",(RemoteObject.concat(RemoteObject.createImmutable("Distancia total ruta inicial: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_distanciatotal0,RemoteObject.createImmutable(1000)}, "/",0, 0)))),RemoteObject.createImmutable(" kms, tiempo aprox: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_tiempo0,RemoteObject.createImmutable(60)}, "/",0, 0)))),RemoteObject.createImmutable(" mins. ("),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_tiempo0,RemoteObject.createImmutable(60),RemoteObject.createImmutable(60)}, "//",0, 0)))),RemoteObject.createImmutable(" hrs)"))),0);
 if (true) break;

case 35:
//C
this.state = 38;
;
 if (true) break;

case 37:
//C
this.state = 38;
 BA.debugLineNum = 375;BA.debugLine="Log(\"Error!\")";
Debug.ShouldStop(4194304);
parent.__c.runVoidMethod ("LogImpl","35767243",RemoteObject.createImmutable("Error!"),0);
 if (true) break;

case 38:
//C
this.state = 39;
;
 BA.debugLineNum = 377;BA.debugLine="j0.Release";
Debug.ShouldStop(16777216);
_j0.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_release" /*RemoteObject*/ );
 if (true) break;

case 39:
//C
this.state = 40;
;
 BA.debugLineNum = 380;BA.debugLine="Dim j As HttpJob";
Debug.ShouldStop(134217728);
_j = RemoteObject.createNew ("reparto_mazapa.keymon.lat.httpjob");Debug.locals.put("j", _j);
 BA.debugLineNum = 381;BA.debugLine="j.Initialize(\"trip\", Me) 'Calculamos el resto de";
Debug.ShouldStop(268435456);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("trip")),(Object)(__ref));
 BA.debugLineNum = 382;BA.debugLine="j.Download(\"https://router.project-osrm.org/trip/";
Debug.ShouldStop(536870912);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_download" /*RemoteObject*/ ,(Object)(RemoteObject.concat(RemoteObject.createImmutable("https://router.project-osrm.org/trip/v1/driving/"),_rutacompleta,RemoteObject.createImmutable("?source=first&destination=last&roundtrip=false&geometries=geojson"))));
 BA.debugLineNum = 384;BA.debugLine="Wait For (j) JobDone(j As HttpJob)";
Debug.ShouldStop(-2147483648);
parent.__c.runVoidMethod ("WaitFor","jobdone", __ref.getField(false, "ba"), anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "traerutadia"), (_j));
this.state = 75;
return;
case 75:
//C
this.state = 40;
_j = (RemoteObject) result.getArrayElement(false,RemoteObject.createImmutable(1));Debug.locals.put("j", _j);
;
 BA.debugLineNum = 385;BA.debugLine="If j.Success Then";
Debug.ShouldStop(1);
if (true) break;

case 40:
//if
this.state = 53;
if (_j.getField(true,"_success" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
this.state = 42;
}else {
this.state = 52;
}if (true) break;

case 42:
//C
this.state = 43;
 BA.debugLineNum = 386;BA.debugLine="Dim jp As JSONParser";
Debug.ShouldStop(2);
_jp = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.JSONParser");Debug.locals.put("jp", _jp);
 BA.debugLineNum = 387;BA.debugLine="jp.Initialize(j.GetString)";
Debug.ShouldStop(4);
_jp.runVoidMethod ("Initialize",(Object)(_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_getstring" /*RemoteObject*/ )));
 BA.debugLineNum = 388;BA.debugLine="Dim m As Map = jp.NextObject";
Debug.ShouldStop(8);
_m = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_m = _jp.runMethod(false,"NextObject");Debug.locals.put("m", _m);Debug.locals.put("m", _m);
 BA.debugLineNum = 389;BA.debugLine="If m.Get(\"code\") = \"Ok\" Then";
Debug.ShouldStop(16);
if (true) break;

case 43:
//if
this.state = 50;
if (RemoteObject.solveBoolean("=",_m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("code")))),RemoteObject.createImmutable(("Ok")))) { 
this.state = 45;
}if (true) break;

case 45:
//C
this.state = 46;
 BA.debugLineNum = 390;BA.debugLine="Dim puntos As List = m.Get(\"waypoints\")";
Debug.ShouldStop(32);
_puntos = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_puntos = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("waypoints")))));Debug.locals.put("puntos", _puntos);Debug.locals.put("puntos", _puntos);
 BA.debugLineNum = 391;BA.debugLine="Private esteWayPoint As Map";
Debug.ShouldStop(64);
_estewaypoint = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("esteWayPoint", _estewaypoint);
 BA.debugLineNum = 392;BA.debugLine="Dim twpi As Int";
Debug.ShouldStop(128);
_twpi = RemoteObject.createImmutable(0);Debug.locals.put("twpi", _twpi);
 BA.debugLineNum = 393;BA.debugLine="For p = 0 To puntos.Size -1";
Debug.ShouldStop(256);
if (true) break;

case 46:
//for
this.state = 49;
step78 = 1;
limit78 = RemoteObject.solve(new RemoteObject[] {_puntos.runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_p = 0 ;
Debug.locals.put("p", _p);
this.state = 76;
if (true) break;

case 76:
//C
this.state = 49;
if ((step78 > 0 && _p <= limit78) || (step78 < 0 && _p >= limit78)) this.state = 48;
if (true) break;

case 77:
//C
this.state = 76;
_p = ((int)(0 + _p + step78)) ;
Debug.locals.put("p", _p);
if (true) break;

case 48:
//C
this.state = 77;
 BA.debugLineNum = 394;BA.debugLine="esteWayPoint = puntos.Get(p)";
Debug.ShouldStop(512);
_estewaypoint = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _puntos.runMethod(false,"Get",(Object)(BA.numberCast(int.class, _p))));Debug.locals.put("esteWayPoint", _estewaypoint);
 BA.debugLineNum = 397;BA.debugLine="esteWayPoint.Remove(\"hint\")";
Debug.ShouldStop(4096);
_estewaypoint.runVoidMethod ("Remove",(Object)((RemoteObject.createImmutable("hint"))));
 BA.debugLineNum = 398;BA.debugLine="esteWayPoint.Remove(\"distance\")";
Debug.ShouldStop(8192);
_estewaypoint.runVoidMethod ("Remove",(Object)((RemoteObject.createImmutable("distance"))));
 BA.debugLineNum = 399;BA.debugLine="esteWayPoint.Remove(\"trips_index\")";
Debug.ShouldStop(16384);
_estewaypoint.runVoidMethod ("Remove",(Object)((RemoteObject.createImmutable("trips_index"))));
 BA.debugLineNum = 400;BA.debugLine="twpi = esteWayPoint.Get(\"waypoint_index\")";
Debug.ShouldStop(32768);
_twpi = BA.numberCast(int.class, _estewaypoint.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("waypoint_index")))));Debug.locals.put("twpi", _twpi);
 BA.debugLineNum = 401;BA.debugLine="esteWayPoint.Remove(\"waypoint_index\")";
Debug.ShouldStop(65536);
_estewaypoint.runVoidMethod ("Remove",(Object)((RemoteObject.createImmutable("waypoint_index"))));
 BA.debugLineNum = 402;BA.debugLine="esteWayPoint.Put(\"waypoint_index\", (twpi + cua";
Debug.ShouldStop(131072);
_estewaypoint.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("waypoint_index"))),(Object)(((RemoteObject.solve(new RemoteObject[] {_twpi,_cuantosantes,RemoteObject.createImmutable(2)}, "++",2, 1)))));
 BA.debugLineNum = 403;BA.debugLine="listaWayPoints.Add(esteWayPoint)";
Debug.ShouldStop(262144);
__ref.getField(false,"_listawaypoints" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_estewaypoint.getObject())));
 if (true) break;
if (true) break;

case 49:
//C
this.state = 50;
Debug.locals.put("p", _p);
;
 BA.debugLineNum = 406;BA.debugLine="Dim rutas As List = m.Get(\"trips\")";
Debug.ShouldStop(2097152);
_rutas = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_rutas = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.List"), _m.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("trips")))));Debug.locals.put("rutas", _rutas);Debug.locals.put("rutas", _rutas);
 BA.debugLineNum = 407;BA.debugLine="Dim rutas2 As Map = rutas.Get(0)";
Debug.ShouldStop(4194304);
_rutas2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_rutas2 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), _rutas.runMethod(false,"Get",(Object)(BA.numberCast(int.class, 0))));Debug.locals.put("rutas2", _rutas2);Debug.locals.put("rutas2", _rutas2);
 BA.debugLineNum = 408;BA.debugLine="distanciaTotal = rutas2.Get(\"distance\")";
Debug.ShouldStop(8388608);
_distanciatotal = BA.numberCast(double.class, _rutas2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("distance")))));Debug.locals.put("distanciaTotal", _distanciatotal);
 BA.debugLineNum = 409;BA.debugLine="Log(\"distancia ruta 2:\" & (distanciaTotal) & \"|";
Debug.ShouldStop(16777216);
parent.__c.runVoidMethod ("LogImpl","35767277",RemoteObject.concat(RemoteObject.createImmutable("distancia ruta 2:"),(_distanciatotal),RemoteObject.createImmutable("|"),_rutas2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("distance"))))),0);
 BA.debugLineNum = 410;BA.debugLine="distanciaTotal = distanciaTotal + distanciaTota";
Debug.ShouldStop(33554432);
_distanciatotal = RemoteObject.solve(new RemoteObject[] {_distanciatotal,_distanciatotal0}, "+",1, 0);Debug.locals.put("distanciaTotal", _distanciatotal);
 BA.debugLineNum = 411;BA.debugLine="tiempo = rutas2.Get(\"duration\")";
Debug.ShouldStop(67108864);
_tiempo = BA.numberCast(double.class, _rutas2.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("duration")))));Debug.locals.put("tiempo", _tiempo);
 BA.debugLineNum = 412;BA.debugLine="tiempo = (((tiempo + tiempo0) * 2) + tiempoVisi";
Debug.ShouldStop(134217728);
_tiempo = (RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_tiempo,_tiempo0}, "+",1, 0)),RemoteObject.createImmutable(2)}, "*",0, 0)),_tiempovisitas}, "+",1, 0));Debug.locals.put("tiempo", _tiempo);
 BA.debugLineNum = 413;BA.debugLine="Log($\"Distancia total: $1.1{distanciaTotal/1000";
Debug.ShouldStop(268435456);
parent.__c.runVoidMethod ("LogImpl","35767281",(RemoteObject.concat(RemoteObject.createImmutable("Distancia total: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_distanciatotal,RemoteObject.createImmutable(1000)}, "/",0, 0)))),RemoteObject.createImmutable(" kms, tiempo aprox: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_tiempo,RemoteObject.createImmutable(60)}, "/",0, 0)))),RemoteObject.createImmutable(" mins. ("),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_tiempo,RemoteObject.createImmutable(60),RemoteObject.createImmutable(60)}, "//",0, 0)))),RemoteObject.createImmutable(" hrs)"))),0);
 BA.debugLineNum = 414;BA.debugLine="l_rutaInfo.Text = $\"Distancia: $1.1{distanciaTo";
Debug.ShouldStop(536870912);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence((RemoteObject.concat(RemoteObject.createImmutable("Distancia: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_distanciatotal,RemoteObject.createImmutable(1000)}, "/",0, 0)))),RemoteObject.createImmutable(" kms, tiempo aprox: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("1.1")),(Object)((RemoteObject.solve(new RemoteObject[] {_tiempo,RemoteObject.createImmutable(60),RemoteObject.createImmutable(60)}, "//",0, 0)))),RemoteObject.createImmutable(" hrs"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((parent.__c.getField(true,"CRLF")))),RemoteObject.createImmutable("Visitas restantes: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_avisitar.runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ ).runMethod(true,"getSize")))),RemoteObject.createImmutable("")))));
 BA.debugLineNum = 415;BA.debugLine="l_rutaInfo.Width = Root.Width * 0.9";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setWidth",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth"),RemoteObject.createImmutable(0.9)}, "*",0, 0)));
 BA.debugLineNum = 416;BA.debugLine="Subs.centraEtiqueta(l_rutaInfo, Root.Width)";
Debug.ShouldStop(-2147483648);
parent._subs.runVoidMethod ("_centraetiqueta" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ )),(Object)(__ref.getField(false,"_root" /*RemoteObject*/ ).runMethod(true,"getWidth")));
 BA.debugLineNum = 417;BA.debugLine="l_rutaInfo.Visible = True";
Debug.ShouldStop(1);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runMethod(true,"setVisible",parent.__c.getField(true,"True"));
 BA.debugLineNum = 418;BA.debugLine="l_rutaInfo.BringToFront";
Debug.ShouldStop(2);
__ref.getField(false,"_l_rutainfo" /*RemoteObject*/ ).runVoidMethod ("BringToFront");
 BA.debugLineNum = 419;BA.debugLine="ListView1.Top = lv1Top + 100";
Debug.ShouldStop(4);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(true,"setTop",BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {BA.numberCast(double.class, __ref.getField(true,"_lv1top" /*RemoteObject*/ )),RemoteObject.createImmutable(100)}, "+",1, 0)));
 if (true) break;

case 50:
//C
this.state = 53;
;
 if (true) break;

case 52:
//C
this.state = 53;
 BA.debugLineNum = 422;BA.debugLine="LogColor(\"****************  Error!  ************";
Debug.ShouldStop(32);
parent.__c.runVoidMethod ("LogImpl","35767290",BA.ObjectToString("****************  Error!  ******************"),parent.__c.getField(false,"Colors").getField(true,"Red"));
 if (true) break;

case 53:
//C
this.state = 54;
;
 BA.debugLineNum = 424;BA.debugLine="j.Release";
Debug.ShouldStop(128);
_j.runClassMethod (reparto_mazapa.keymon.lat.httpjob.class, "_release" /*RemoteObject*/ );
 BA.debugLineNum = 425;BA.debugLine="ProgressDialogHide";
Debug.ShouldStop(256);
parent.__c.runVoidMethod ("ProgressDialogHide");
 BA.debugLineNum = 427;BA.debugLine="Private r As Int = 1";
Debug.ShouldStop(1024);
_r = BA.numberCast(int.class, 1);Debug.locals.put("r", _r);Debug.locals.put("r", _r);
 BA.debugLineNum = 428;BA.debugLine="Private r1, wps As Map";
Debug.ShouldStop(2048);
_r1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("r1", _r1);
_wps = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("wps", _wps);
 BA.debugLineNum = 429;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from waypoints\"";
Debug.ShouldStop(4096);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from waypoints")));
 BA.debugLineNum = 430;BA.debugLine="Log(\"BORRAMOS WAYPOINTS\")";
Debug.ShouldStop(8192);
parent.__c.runVoidMethod ("LogImpl","35767298",RemoteObject.createImmutable("BORRAMOS WAYPOINTS"),0);
 BA.debugLineNum = 431;BA.debugLine="For Each k As Object In clientesMapaO.Keys 'Guard";
Debug.ShouldStop(16384);
if (true) break;

case 54:
//for
this.state = 61;
group112 = __ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ );
index112 = 0;
groupLen112 = group112.runMethod(true,"getSize").<Integer>get();
Debug.locals.put("k", _k);
this.state = 78;
if (true) break;

case 78:
//C
this.state = 61;
if (index112 < groupLen112) {
this.state = 56;
_k = group112.runMethod(false,"Get",index112);Debug.locals.put("k", _k);}
if (true) break;

case 79:
//C
this.state = 78;
index112++;
Debug.locals.put("k", _k);
if (true) break;

case 56:
//C
this.state = 57;
 BA.debugLineNum = 432;BA.debugLine="If listaWayPoints.Size > 0 Then";
Debug.ShouldStop(32768);
if (true) break;

case 57:
//if
this.state = 60;
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_listawaypoints" /*RemoteObject*/ ).runMethod(true,"getSize"),BA.numberCast(double.class, 0))) { 
this.state = 59;
}if (true) break;

case 59:
//C
this.state = 60;
 BA.debugLineNum = 433;BA.debugLine="r1 = clientesMapaO.Get(k)";
Debug.ShouldStop(65536);
_r1 = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_get" /*RemoteObject*/ ,(Object)(_k)));Debug.locals.put("r1", _r1);
 BA.debugLineNum = 434;BA.debugLine="r1.Get(\"codigo\")";
Debug.ShouldStop(131072);
_r1.runVoidMethod ("Get",(Object)((RemoteObject.createImmutable("codigo"))));
 BA.debugLineNum = 435;BA.debugLine="Log(listaWayPoints.Get(r) & \"|\" & r1.Get(\"coord";
Debug.ShouldStop(262144);
parent.__c.runVoidMethod ("LogImpl","35767303",RemoteObject.concat(__ref.getField(false,"_listawaypoints" /*RemoteObject*/ ).runMethod(false,"Get",(Object)(_r)),RemoteObject.createImmutable("|"),_r1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("coords")))),RemoteObject.createImmutable("|"),_r1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("calle"))))),0);
 BA.debugLineNum = 436;BA.debugLine="wps = listaWayPoints.Get(r)";
Debug.ShouldStop(524288);
_wps = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), __ref.getField(false,"_listawaypoints" /*RemoteObject*/ ).runMethod(false,"Get",(Object)(_r)));Debug.locals.put("wps", _wps);
 BA.debugLineNum = 437;BA.debugLine="Starter.skmt.ExecNonQuery($\"update kmt_info set";
Debug.ShouldStop(1048576);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("update kmt_info set SECUENCIA = "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_wps.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("waypoint_index")))))),RemoteObject.createImmutable(" where CAT_CL_CODIGO = '"),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)(_r1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("codigo")))))),RemoteObject.createImmutable("'")))));
 BA.debugLineNum = 438;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into waypoin";
Debug.ShouldStop(2097152);
parent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into waypoints values (?,?)")),(Object)(parent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {_r1.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("codigo")))),_wps.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("waypoint_index"))))})))));
 BA.debugLineNum = 439;BA.debugLine="r = r + 1";
Debug.ShouldStop(4194304);
_r = RemoteObject.solve(new RemoteObject[] {_r,RemoteObject.createImmutable(1)}, "+",1, 1);Debug.locals.put("r", _r);
 if (true) break;

case 60:
//C
this.state = 79;
;
 if (true) break;
if (true) break;

case 61:
//C
this.state = 62;
Debug.locals.put("k", _k);
;
 BA.debugLineNum = 442;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(33554432);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 443;BA.debugLine="Sleep(100)";
Debug.ShouldStop(67108864);
parent.__c.runVoidMethod ("Sleep",__ref.getField(false, "ba"),anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "c_clientes", "traerutadia"),BA.numberCast(int.class, 100));
this.state = 80;
return;
case 80:
//C
this.state = 62;
;
 BA.debugLineNum = 444;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(134217728);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 445;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(268435456);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 446;BA.debugLine="label2.TextSize = 15";
Debug.ShouldStop(536870912);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 15));
 BA.debugLineNum = 447;BA.debugLine="label2.Height = 100dip";
Debug.ShouldStop(1073741824);
_label2.runMethod(true,"setHeight",parent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 100))));
 BA.debugLineNum = 448;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 70dip";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").runMethod(true,"setItemHeight",parent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 70))));
 BA.debugLineNum = 449;BA.debugLine="Dim cs, cs2 As CSBuilder";
Debug.ShouldStop(1);
_cs = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs", _cs);
_cs2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");Debug.locals.put("cs2", _cs2);
 BA.debugLineNum = 450;BA.debugLine="entro = 3";
Debug.ShouldStop(2);
__ref.setField ("_entro" /*RemoteObject*/ ,BA.NumberToString(3));
 BA.debugLineNum = 451;BA.debugLine="Log(\"Generamos ListView1 en traeRutaDia\")";
Debug.ShouldStop(4);
parent.__c.runVoidMethod ("LogImpl","35767319",RemoteObject.createImmutable("Generamos ListView1 en traeRutaDia"),0);
 BA.debugLineNum = 453;BA.debugLine="c=Starter.skmt.ExecQuery(\"select codigo, indice,";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (parent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select codigo, indice, CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_NOEXT from  waypoints inner join kmt_info on waypoints.codigo = kmt_info.CAT_CL_CODIGO where gestion = 0 AND CAT_CL_RUTA <> 1000 order by indice"))));
 BA.debugLineNum = 454;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(32);
if (true) break;

case 62:
//if
this.state = 69;
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
this.state = 64;
}if (true) break;

case 64:
//C
this.state = 65;
 BA.debugLineNum = 455;BA.debugLine="For i=0 To c.RowCount -1 'Generamos el listView";
Debug.ShouldStop(64);
if (true) break;

case 65:
//for
this.state = 68;
step135 = 1;
limit135 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
Debug.locals.put("i", _i);
this.state = 81;
if (true) break;

case 81:
//C
this.state = 68;
if ((step135 > 0 && _i <= limit135) || (step135 < 0 && _i >= limit135)) this.state = 67;
if (true) break;

case 82:
//C
this.state = 81;
_i = ((int)(0 + _i + step135)) ;
Debug.locals.put("i", _i);
if (true) break;

case 67:
//C
this.state = 82;
 BA.debugLineNum = 456;BA.debugLine="c.Position=i";
Debug.ShouldStop(128);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 457;BA.debugLine="cs.Initialize";
Debug.ShouldStop(256);
_cs.runVoidMethod ("Initialize");
 BA.debugLineNum = 458;BA.debugLine="cs2.Initialize";
Debug.ShouldStop(512);
_cs2.runVoidMethod ("Initialize");
 BA.debugLineNum = 459;BA.debugLine="ListView1.AddTwoLines(cs.Color(Colors.RGB(100,1";
Debug.ShouldStop(1024);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(_cs.runMethod(false,"Color",(Object)(parent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 100)),(Object)(BA.numberCast(int.class, 149)),(Object)(BA.numberCast(int.class, 237))))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("codigo")))))).runMethod(false,"PopAll").getObject())),(Object)(BA.ObjectToCharSequence(_cs2.runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE")))))).runMethod(false,"Color",(Object)(parent.__c.getField(false,"Colors").runMethod(true,"RGB",(Object)(BA.numberCast(int.class, 100)),(Object)(BA.numberCast(int.class, 149)),(Object)(BA.numberCast(int.class, 237))))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(" Calle: ")))).runMethod(false,"Pop").runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CALLE"))).runMethod(true,"trim"),RemoteObject.createImmutable(" "),__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOEXT"))))))).runMethod(false,"PopAll").getObject())));
 if (true) break;
if (true) break;

case 68:
//C
this.state = 69;
Debug.locals.put("i", _i);
;
 if (true) break;

case 69:
//C
this.state = -1;
;
 BA.debugLineNum = 462;BA.debugLine="c.Close";
Debug.ShouldStop(8192);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 463;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _traetodosavisitar(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("traeTodosAVisitar (c_clientes) ","c_clientes",4,__ref.getField(false, "ba"),__ref,515);
if (RapidSub.canDelegate("traetodosavisitar")) { return __ref.runUserSub(false, "c_clientes","traetodosavisitar", __ref);}
RemoteObject _thisloc = RemoteObject.declareNull("anywheresoftware.b4a.gps.LocationWrapper");
RemoteObject _ubicacioninicial = RemoteObject.declareNull("anywheresoftware.b4a.gps.LocationWrapper");
int _i = 0;
int _j = 0;
RemoteObject _distancia = RemoteObject.createImmutable(0);
RemoteObject _estecliente = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
 BA.debugLineNum = 515;BA.debugLine="Sub traeTodosAVisitar As B4XOrderedMap 'ignore";
Debug.ShouldStop(4);
 BA.debugLineNum = 516;BA.debugLine="Log(\"Iniciamos traeTodosAVisitar\")";
Debug.ShouldStop(8);
c_clientes.__c.runVoidMethod ("LogImpl","35898241",RemoteObject.createImmutable("Iniciamos traeTodosAVisitar"),0);
 BA.debugLineNum = 519;BA.debugLine="Private thisLoc, ubicacionInicial As Location";
Debug.ShouldStop(64);
_thisloc = RemoteObject.createNew ("anywheresoftware.b4a.gps.LocationWrapper");Debug.locals.put("thisLoc", _thisloc);
_ubicacioninicial = RemoteObject.createNew ("anywheresoftware.b4a.gps.LocationWrapper");Debug.locals.put("ubicacionInicial", _ubicacioninicial);
 BA.debugLineNum = 520;BA.debugLine="ubicacionInicial = Starter.cedisLocation";
Debug.ShouldStop(128);
_ubicacioninicial = c_clientes._starter._cedislocation /*RemoteObject*/ ;Debug.locals.put("ubicacionInicial", _ubicacioninicial);
 BA.debugLineNum = 521;BA.debugLine="LogColor(ubicacionInicial, Colors.Gray)";
Debug.ShouldStop(256);
c_clientes.__c.runVoidMethod ("LogImpl","35898246",BA.ObjectToString(_ubicacioninicial),c_clientes.__c.getField(false,"Colors").getField(true,"Gray"));
 BA.debugLineNum = 522;BA.debugLine="c=Starter.skmt.ExecQuery(\"select sum(gestion) as";
Debug.ShouldStop(512);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_clientes._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select sum(gestion) as hayVisitados from kmt_info"))));
 BA.debugLineNum = 523;BA.debugLine="If c.RowCount > 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 524;BA.debugLine="c.Position = 0";
Debug.ShouldStop(2048);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 526;BA.debugLine="If c.GetString(\"hayVisitados\") > 0 Then ubicacio";
Debug.ShouldStop(8192);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("hayVisitados")))),BA.numberCast(double.class, 0))) { 
_ubicacioninicial = c_clientes._tracker._uugcoords /*RemoteObject*/ ;Debug.locals.put("ubicacionInicial", _ubicacioninicial);};
 };
 BA.debugLineNum = 528;BA.debugLine="c.Close";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 529;BA.debugLine="LogColor(ubicacionInicial, Colors.Red)";
Debug.ShouldStop(65536);
c_clientes.__c.runVoidMethod ("LogImpl","35898254",BA.ObjectToString(_ubicacioninicial),c_clientes.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 530;BA.debugLine="thisLoc.Initialize";
Debug.ShouldStop(131072);
_thisloc.runVoidMethod ("Initialize");
 BA.debugLineNum = 531;BA.debugLine="clientesMapaO.Clear";
Debug.ShouldStop(262144);
__ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_clear" /*RemoteObject*/ );
 BA.debugLineNum = 533;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CAT_CL_RUTA, cou";
Debug.ShouldStop(1048576);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (c_clientes._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CAT_CL_RUTA, count(*) as cuantos from kmt_info where gestion = 0  AND CAT_CL_RUTA <> 1000 group by CAT_CL_RUTA order by CAT_CL_RUTA asc"))));
 BA.debugLineNum = 534;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 536;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(8388608);
{
final int step16 = 1;
final int limit16 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step16 > 0 && _i <= limit16) || (step16 < 0 && _i >= limit16) ;_i = ((int)(0 + _i + step16))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 537;BA.debugLine="c.Position=i";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 539;BA.debugLine="c2=Starter.skmt.ExecQuery2(\"select  CAT_CL_NOMB";
Debug.ShouldStop(67108864);
__ref.getField(false,"_c2" /*RemoteObject*/ ).setObject (c_clientes._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select  CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_LAT, CAT_CL_LONG from kmt_info where CAT_CL_RUTA = ? and gestion = 0 AND CAT_CL_RUTA <> 1000 order by CAT_CL_NOMBRE ")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_RUTA")))}))));
 BA.debugLineNum = 540;BA.debugLine="If c2.RowCount>0 Then";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 541;BA.debugLine="For j=0 To c2.RowCount -1 'Generamos lista de";
Debug.ShouldStop(268435456);
{
final int step20 = 1;
final int limit20 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_j = 0 ;
for (;(step20 > 0 && _j <= limit20) || (step20 < 0 && _j >= limit20) ;_j = ((int)(0 + _j + step20))  ) {
Debug.locals.put("j", _j);
 BA.debugLineNum = 542;BA.debugLine="c2.Position=j";
Debug.ShouldStop(536870912);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _j));
 BA.debugLineNum = 544;BA.debugLine="thisLoc.Latitude = c2.GetString(\"CAT_CL_LAT\")";
Debug.ShouldStop(-2147483648);
_thisloc.runMethod(true,"setLatitude",BA.numberCast(double.class, __ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LAT")))));
 BA.debugLineNum = 545;BA.debugLine="thisLoc.Longitude = c2.GetString(\"CAT_CL_LONG";
Debug.ShouldStop(1);
_thisloc.runMethod(true,"setLongitude",BA.numberCast(double.class, __ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LONG")))));
 BA.debugLineNum = 546;BA.debugLine="If Not(thisLoc.Latitude = 0.0) And Not(thisLo";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean(".",c_clientes.__c.runMethod(true,"Not",(Object)(BA.ObjectToBoolean(RemoteObject.solveBoolean("=",_thisloc.runMethod(true,"getLatitude"),BA.numberCast(double.class, 0.0)))))) && RemoteObject.solveBoolean(".",c_clientes.__c.runMethod(true,"Not",(Object)(BA.ObjectToBoolean(RemoteObject.solveBoolean("=",_thisloc.runMethod(true,"getLatitude"),BA.numberCast(double.class, 0))))))) { 
 BA.debugLineNum = 547;BA.debugLine="Private distancia As Int = ubicacionInicial.";
Debug.ShouldStop(4);
_distancia = BA.numberCast(int.class, _ubicacioninicial.runMethod(true,"DistanceTo",(Object)((_thisloc.getObject()))));Debug.locals.put("distancia", _distancia);Debug.locals.put("distancia", _distancia);
 BA.debugLineNum = 548;BA.debugLine="If clientesMapaO.ContainsKey(distancia) Then";
Debug.ShouldStop(8);
if (__ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_containskey" /*RemoteObject*/ ,(Object)((_distancia))).<Boolean>get().booleanValue()) { 
_distancia = RemoteObject.solve(new RemoteObject[] {_distancia,RemoteObject.createImmutable(1)}, "+",1, 1);Debug.locals.put("distancia", _distancia);};
 BA.debugLineNum = 549;BA.debugLine="Private esteCliente As Map = CreateMap(\"dist";
Debug.ShouldStop(16);
_estecliente = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
_estecliente = c_clientes.__c.runMethod(false, "createMap", (Object)(new RemoteObject[] {RemoteObject.createImmutable(("distancia")),(_distancia),RemoteObject.createImmutable(("ordenDist")),RemoteObject.createImmutable((_j)),RemoteObject.createImmutable(("coords")),(RemoteObject.concat(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LONG"))),RemoteObject.createImmutable(","),__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_LAT"))))),RemoteObject.createImmutable(("codigo")),(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CODIGO")))),RemoteObject.createImmutable(("nombre")),(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE")))),RemoteObject.createImmutable(("calle")),(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CALLE"))))}));Debug.locals.put("esteCliente", _estecliente);Debug.locals.put("esteCliente", _estecliente);
 BA.debugLineNum = 550;BA.debugLine="clientesMapaO.Put(distancia, esteCliente)";
Debug.ShouldStop(32);
__ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_put" /*RemoteObject*/ ,(Object)((_distancia)),(Object)((_estecliente.getObject())));
 }else {
 BA.debugLineNum = 552;BA.debugLine="ToastMessageShow(\"Hay tiendas SIN coordenada";
Debug.ShouldStop(128);
c_clientes.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Hay tiendas SIN coordenadas, fueron excluidas!!")),(Object)(c_clientes.__c.getField(true,"False")));
 };
 }
}Debug.locals.put("j", _j);
;
 };
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 560;BA.debugLine="clientesMapaO.Keys.Sort(True) 'Ordenamos la lista";
Debug.ShouldStop(32768);
__ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getkeys" /*RemoteObject*/ ).runVoidMethod ("Sort",(Object)(c_clientes.__c.getField(true,"True")));
 BA.debugLineNum = 561;BA.debugLine="c.Close";
Debug.ShouldStop(65536);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 562;BA.debugLine="c2.Close";
Debug.ShouldStop(131072);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 563;BA.debugLine="Log(c.RowCount & \" rutas, \" & clientesMapaO.Size";
Debug.ShouldStop(262144);
c_clientes.__c.runVoidMethod ("LogImpl","35898288",RemoteObject.concat(__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(" rutas, "),__ref.getField(false,"_clientesmapao" /*RemoteObject*/ ).runClassMethod (reparto_mazapa.keymon.lat.b4xorderedmap.class, "_getsize" /*RemoteObject*/ ),RemoteObject.createImmutable(" clientes")),0);
 BA.debugLineNum = 566;BA.debugLine="Return clientesMapaO";
Debug.ShouldStop(2097152);
if (true) return __ref.getField(false,"_clientesmapao" /*RemoteObject*/ );
 BA.debugLineNum = 567;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}