diff --git a/data/js/controls.js b/data/js/controls.js index 19f0a19..12b2703 100644 --- a/data/js/controls.js +++ b/data/js/controls.js @@ -252,6 +252,13 @@ function start() { }; handleEvent(fauxEvent); }); + + //If there are more elements in the complete UI, then request them + //Note: we subtract 1 from data.controls.length because the controls always + //includes the title element + if(data.totalcontrols > (data.controls.length - 1)) { + websock.send("uiok:" + (data.controls.length - 1)); + } break; case UI_EXTEND_GUI: @@ -261,6 +268,11 @@ function start() { }; handleEvent(fauxEvent); }); + + //Do we need to keep requesting more UI elements? + if(data.totalcontrols > data.startindex + (data.controls.length - 1)) { + websock.send("uiok:" + (data.startindex + (data.controls.length - 1))); + } break; case UI_RELOAD: diff --git a/data/js/controls.min.js b/data/js/controls.min.js index 08cd597..c8fb6d9 100644 --- a/data/js/controls.min.js +++ b/data/js/controls.min.js @@ -8,7 +8,9 @@ function conStatusError(){websockConnected=false;$("#conStatus").removeClass("co function handleVisibilityChange(){if(!websockConnected&&!document.hidden){restart();}} function start(){document.addEventListener("visibilitychange",handleVisibilityChange,false);if(window.location.port!=""||window.location.port!=80||window.location.port!=443){websock=new WebSocket("ws://"+window.location.hostname+":"+window.location.port+"/ws");}else{websock=new WebSocket("ws://"+window.location.hostname+"/ws");} websock.onopen=function(evt){console.log("websock open");$("#conStatus").addClass("color-green");$("#conStatus").text("Connected");websockConnected=true;};websock.onclose=function(evt){console.log("websock close");conStatusError();};websock.onerror=function(evt){console.log(evt);conStatusError();};var handleEvent=function(evt){console.log(evt);var data=JSON.parse(evt.data);var e=document.body;var center="";switch(data.type){case UI_INITIAL_GUI:$("#row").html("");$("#tabsnav").html("");$("#tabscontent").html("");if(data.sliderContinuous){sliderContinuous=data.sliderContinuous;} -data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} +data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>(data.controls.length-1)){websock.send("uiok:"+(data.controls.length-1));} +break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>data.startindex+(data.controls.length-1)){websock.send("uiok:"+(data.startindex+(data.controls.length-1)));} +break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} break;case UI_SWITCHER:if(data.visible){addToHTML(data);switcher(data.id,data.value);} break;case UI_CPAD:case UI_PAD:if(data.visible){addToHTML(data);$("#pf"+data.id).on({touchstart:function(e){e.preventDefault();padclick(UP,data.id,true);},touchend:function(e){e.preventDefault();padclick(UP,data.id,false);},});$("#pl"+data.id).on({touchstart:function(e){e.preventDefault();padclick(LEFT,data.id,true);},touchend:function(e){e.preventDefault();padclick(LEFT,data.id,false);},});$("#pr"+data.id).on({touchstart:function(e){e.preventDefault();padclick(RIGHT,data.id,true);},touchend:function(e){e.preventDefault();padclick(RIGHT,data.id,false);},});$("#pb"+data.id).on({touchstart:function(e){e.preventDefault();padclick(DOWN,data.id,true);},touchend:function(e){e.preventDefault();padclick(DOWN,data.id,false);},});$("#pc"+data.id).on({touchstart:function(e){e.preventDefault();padclick(CENTER,data.id,true);},touchend:function(e){e.preventDefault();padclick(CENTER,data.id,false);},});} break;case UI_SLIDER:if(data.visible){addToHTML(data);rangeSlider(!sliderContinuous);} diff --git a/src/ESPUI.cpp b/src/ESPUI.cpp index 7d25bc6..58e5081 100644 --- a/src/ESPUI.cpp +++ b/src/ESPUI.cpp @@ -422,7 +422,7 @@ void onWsEvent( } #endif - ESPUI.jsonDom(client); + ESPUI.jsonDom(0, client); #if defined(DEBUG_ESPUI) if (ESPUI.verbosity) @@ -442,142 +442,149 @@ void onWsEvent( msg += (char)data[i]; } - uint16_t id = msg.substring(msg.lastIndexOf(':') + 1).toInt(); - -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity >= Verbosity::VerboseJSON) + if (msg.startsWith(F("uiok:"))) { - Serial.print(F("WS rec: ")); - Serial.println(msg); - Serial.print(F("WS recognised ID: ")); - Serial.println(id); - } -#endif - - Control* c = ESPUI.getControl(id); - - if (c == nullptr) + int idx = msg.substring(msg.indexOf(':') + 1).toInt(); + ESPUI.jsonDom(idx); + } else { -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity) + uint16_t id = msg.substring(msg.lastIndexOf(':') + 1).toInt(); + + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity >= Verbosity::VerboseJSON) { - Serial.print(F("No control found for ID ")); + Serial.print(F("WS rec: ")); + Serial.println(msg); + Serial.print(F("WS recognised ID: ")); Serial.println(id); } -#endif + #endif - return; - } + Control* c = ESPUI.getControl(id); - if (c->callback == nullptr) - { -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity) + if (c == nullptr) { - Serial.print(F("No callback found for ID ")); - Serial.println(id); + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity) + { + Serial.print(F("No control found for ID ")); + Serial.println(id); + } + #endif + + return; } -#endif - return; - } - - if (msg.startsWith(F("bdown:"))) - { - c->callback(c, B_DOWN); - } - else if (msg.startsWith(F("bup:"))) - { - c->callback(c, B_UP); - } - else if (msg.startsWith(F("pfdown:"))) - { - c->callback(c, P_FOR_DOWN); - } - else if (msg.startsWith(F("pfup:"))) - { - c->callback(c, P_FOR_UP); - } - else if (msg.startsWith(F("pldown:"))) - { - c->callback(c, P_LEFT_DOWN); - } - else if (msg.startsWith(F("plup:"))) - { - c->callback(c, P_LEFT_UP); - } - else if (msg.startsWith(F("prdown:"))) - { - c->callback(c, P_RIGHT_DOWN); - } - else if (msg.startsWith(F("prup:"))) - { - c->callback(c, P_RIGHT_UP); - } - else if (msg.startsWith(F("pbdown:"))) - { - c->callback(c, P_BACK_DOWN); - } - else if (msg.startsWith(F("pbup:"))) - { - c->callback(c, P_BACK_UP); - } - else if (msg.startsWith(F("pcdown:"))) - { - c->callback(c, P_CENTER_DOWN); - } - else if (msg.startsWith(F("pcup:"))) - { - c->callback(c, P_CENTER_UP); - } - else if (msg.startsWith(F("sactive:"))) - { - c->value = "1"; - ESPUI.updateControl(c, client->id()); - c->callback(c, S_ACTIVE); - } - else if (msg.startsWith(F("sinactive:"))) - { - c->value = "0"; - ESPUI.updateControl(c, client->id()); - c->callback(c, S_INACTIVE); - } - else if (msg.startsWith(F("slvalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, SL_VALUE); - } - else if (msg.startsWith(F("nvalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, N_VALUE); - } - else if (msg.startsWith(F("tvalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, T_VALUE); - } - else if (msg.startsWith("tabvalue:")) - { - c->callback(c, client->id()); - } - else if (msg.startsWith(F("svalue:"))) - { - c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); - ESPUI.updateControl(c, client->id()); - c->callback(c, S_VALUE); - } - else - { -#if defined(DEBUG_ESPUI) - if (ESPUI.verbosity) + if (c->callback == nullptr) { - Serial.println(F("Malformated message from the websocket")); + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity) + { + Serial.print(F("No callback found for ID ")); + Serial.println(id); + } + #endif + + return; + } + + if (msg.startsWith(F("bdown:"))) + { + c->callback(c, B_DOWN); + } + else if (msg.startsWith(F("bup:"))) + { + c->callback(c, B_UP); + } + else if (msg.startsWith(F("pfdown:"))) + { + c->callback(c, P_FOR_DOWN); + } + else if (msg.startsWith(F("pfup:"))) + { + c->callback(c, P_FOR_UP); + } + else if (msg.startsWith(F("pldown:"))) + { + c->callback(c, P_LEFT_DOWN); + } + else if (msg.startsWith(F("plup:"))) + { + c->callback(c, P_LEFT_UP); + } + else if (msg.startsWith(F("prdown:"))) + { + c->callback(c, P_RIGHT_DOWN); + } + else if (msg.startsWith(F("prup:"))) + { + c->callback(c, P_RIGHT_UP); + } + else if (msg.startsWith(F("pbdown:"))) + { + c->callback(c, P_BACK_DOWN); + } + else if (msg.startsWith(F("pbup:"))) + { + c->callback(c, P_BACK_UP); + } + else if (msg.startsWith(F("pcdown:"))) + { + c->callback(c, P_CENTER_DOWN); + } + else if (msg.startsWith(F("pcup:"))) + { + c->callback(c, P_CENTER_UP); + } + else if (msg.startsWith(F("sactive:"))) + { + c->value = "1"; + ESPUI.updateControl(c, client->id()); + c->callback(c, S_ACTIVE); + } + else if (msg.startsWith(F("sinactive:"))) + { + c->value = "0"; + ESPUI.updateControl(c, client->id()); + c->callback(c, S_INACTIVE); + } + else if (msg.startsWith(F("slvalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, SL_VALUE); + } + else if (msg.startsWith(F("nvalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, N_VALUE); + } + else if (msg.startsWith(F("tvalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, T_VALUE); + } + else if (msg.startsWith("tabvalue:")) + { + c->callback(c, client->id()); + } + else if (msg.startsWith(F("svalue:"))) + { + c->value = msg.substring(msg.indexOf(':') + 1, msg.lastIndexOf(':')); + ESPUI.updateControl(c, client->id()); + c->callback(c, S_VALUE); + } + else + { + #if defined(DEBUG_ESPUI) + if (ESPUI.verbosity) + { + Serial.println(F("Malformated message from the websocket")); + } + #endif } -#endif } } break; @@ -608,6 +615,8 @@ uint16_t ESPUIClass::addControl(ControlType type, const char* label, const Strin iterator->next = control; } + this->controlCount++; + return control->id; } @@ -622,13 +631,14 @@ bool ESPUIClass::removeControl(uint16_t id, bool force_reload_ui) { this->controls = it->next; delete it; + this->controlCount--; if (force_reload_ui) { jsonReload(); } else { - jsonDom(); + jsonDom(0); } return true; } @@ -644,13 +654,14 @@ bool ESPUIClass::removeControl(uint16_t id, bool force_reload_ui) { it->next = it_next->next; delete it_next; + this->controlCount--; if (force_reload_ui) { jsonReload(); } else { - jsonDom(); // resends to all + jsonDom(0); // resends to all } return true; } @@ -977,61 +988,79 @@ void ESPUIClass::addGraphPoint(uint16_t id, int nValue, int clientId) tryId++; } } + /* -Convert & Transfer Arduino elements to JSON elements -Initially this function used to send the control element data individually. -Due to a change in the ESPAsyncWebserver library this had top be changed to be -sent as one blob at the beginning. Therefore a new type is used as well +Convert & Transfer Arduino elements to JSON elements. This function sends a chunk of +JSON describing the controls of the UI, starting from the control at index startidx. +If startidx is 0 then a UI_INITIAL_GUI message will be sent, else a UI_EXTEND_GUI. +Both message types contain a list of serialised UI elements. Only a portion of the UI +will be sent in order to avoid websocket buffer overflows. The client will acknowledge +receipt of a partial message by requesting the next chunk of UI. + +The protocol is: +SERVER: jsonDom(0): + "UI_INITIAL_GUI: n serialised UI elements" +CLIENT: controls.js:handleEvent() + "uiok:n" +SERVER: jsonDom(n): + "UI_EXTEND_GUI: n serialised UI elements" +CLIENT: controls.js:handleEvent() + "uiok:2*n" +etc. */ -void ESPUIClass::jsonDom(AsyncWebSocketClient* client) +void ESPUIClass::jsonDom(uint16_t startidx, AsyncWebSocketClient* client) { + if(startidx >= this->controlCount) + { + return; + } DynamicJsonDocument document(jsonInitialDocumentSize); - document["type"] = (int)UI_INITIAL_GUI; + document["type"] = startidx ? (int)UI_EXTEND_GUI : (int)UI_INITIAL_GUI; document["sliderContinuous"] = sliderContinuous; + document["startindex"] = startidx; + document["totalcontrols"] = this->controlCount; JsonArray items = document.createNestedArray("controls"); - - Control* control = this->controls; - JsonObject titleItem = items.createNestedObject(); titleItem["type"] = (int)UI_TITLE; titleItem["label"] = ui_title; - while (1) - { - control = prepareJSONChunk(client, control, &items); + prepareJSONChunk(client, startidx, &items); - String json; - serializeJson(document, json); + String json; + serializeJson(document, json); #if defined(DEBUG_ESPUI) - if (this->verbosity >= Verbosity::VerboseJSON) - { - Serial.println("Sending elements --------->"); - Serial.println(json); - } -#endif - if (client != nullptr) - client->text(json); - else - this->ws->textAll(json); - - if (control == nullptr) - break; - - document.clear(); - items.clear(); - document["type"] = (int)UI_EXTEND_GUI; - items = document.createNestedArray("controls"); + if (this->verbosity >= Verbosity::VerboseJSON) + { + Serial.println("Sending elements --------->"); + Serial.println(json); } +#endif + if (client != nullptr) + client->text(json); + else + this->ws->textAll(json); } /* Prepare a chunk of elements as a single JSON string. If the allowed number of elements is greater than the total -number this will represent the entire UI and this function will return null. If a control pointer is returned then the -limit was reached, the currently serialised must be sent, and then processing resumed to send the next chunk. */ -Control* ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, Control* control, JsonArray* items) +number this will represent the entire UI. More likely, it will represent a small section of the UI to be sent. The client +will acknoledge receipt by requesting the next chunk. */ +void ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, uint16_t startindex, JsonArray* items) { - int elementcount = 0; + //First check that there will be sufficient nodes in the list + if(startindex >= this->controlCount) + { + return; + } + //Follow the list until control points to the startindex'th node + Control* control = this->controls; + for(auto i = 0; i < startindex; i++) { + control = control->next; + } + + //To prevent overflow, keep track of the number of elements we have serialised into this message + int elementcount = 0; while (control != nullptr && elementcount < 10) { JsonObject item = items->createNestedObject(); @@ -1071,7 +1100,7 @@ Control* ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, Control* con control = control->next; elementcount++; } - return control; + return; } void ESPUIClass::jsonReload() diff --git a/src/ESPUI.h b/src/ESPUI.h index e3a53db..86634d3 100644 --- a/src/ESPUI.h +++ b/src/ESPUI.h @@ -298,7 +298,7 @@ public: const char* ui_title = "ESPUI"; // Store UI Title and Header Name Control* controls = nullptr; void jsonReload(); - void jsonDom(AsyncWebSocketClient* client = nullptr); + void jsonDom(uint16_t startidx, AsyncWebSocketClient* client = nullptr); Verbosity verbosity; @@ -310,7 +310,9 @@ private: const char* basicAuthPassword = nullptr; bool basicAuth = true; - Control* prepareJSONChunk(AsyncWebSocketClient* client, Control* control, JsonArray* items); + uint16_t controlCount = 0; + + void prepareJSONChunk(AsyncWebSocketClient* client, uint16_t startindex, JsonArray* items); }; extern ESPUIClass ESPUI; diff --git a/src/dataControlsJS.h b/src/dataControlsJS.h index bbaebe4..483e8f3 100644 --- a/src/dataControlsJS.h +++ b/src/dataControlsJS.h @@ -9,7 +9,9 @@ function conStatusError(){websockConnected=false;$("#conStatus").removeClass("co function handleVisibilityChange(){if(!websockConnected&&!document.hidden){restart();}} function start(){document.addEventListener("visibilitychange",handleVisibilityChange,false);if(window.location.port!=""||window.location.port!=80||window.location.port!=443){websock=new WebSocket("ws://"+window.location.hostname+":"+window.location.port+"/ws");}else{websock=new WebSocket("ws://"+window.location.hostname+"/ws");} websock.onopen=function(evt){console.log("websock open");$("#conStatus").addClass("color-green");$("#conStatus").text("Connected");websockConnected=true;};websock.onclose=function(evt){console.log("websock close");conStatusError();};websock.onerror=function(evt){console.log(evt);conStatusError();};var handleEvent=function(evt){console.log(evt);var data=JSON.parse(evt.data);var e=document.body;var center="";switch(data.type){case UI_INITIAL_GUI:$("#row").html("");$("#tabsnav").html("");$("#tabscontent").html("");if(data.sliderContinuous){sliderContinuous=data.sliderContinuous;} -data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} +data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>(data.controls.length-1)){websock.send("uiok:"+(data.controls.length-1));} +break;case UI_EXTEND_GUI:data.controls.forEach(element=>{var fauxEvent={data:JSON.stringify(element),};handleEvent(fauxEvent);});if(data.totalcontrols>data.startindex+(data.controls.length-1)){websock.send("uiok:"+(data.startindex+(data.controls.length-1)));} +break;case UI_RELOAD:window.location.reload();break;case UI_TITEL:document.title=data.label;$("#mainHeader").html(data.label);break;case UI_LABEL:case UI_NUMBER:case UI_TEXT_INPUT:case UI_SELECT:case UI_GAUGE:case UI_SEPARATOR:if(data.visible)addToHTML(data);break;case UI_BUTTON:if(data.visible){addToHTML(data);$("#btn"+data.id).on({touchstart:function(e){e.preventDefault();buttonclick(data.id,true);},touchend:function(e){e.preventDefault();buttonclick(data.id,false);},});} break;case UI_SWITCHER:if(data.visible){addToHTML(data);switcher(data.id,data.value);} break;case UI_CPAD:case UI_PAD:if(data.visible){addToHTML(data);$("#pf"+data.id).on({touchstart:function(e){e.preventDefault();padclick(UP,data.id,true);},touchend:function(e){e.preventDefault();padclick(UP,data.id,false);},});$("#pl"+data.id).on({touchstart:function(e){e.preventDefault();padclick(LEFT,data.id,true);},touchend:function(e){e.preventDefault();padclick(LEFT,data.id,false);},});$("#pr"+data.id).on({touchstart:function(e){e.preventDefault();padclick(RIGHT,data.id,true);},touchend:function(e){e.preventDefault();padclick(RIGHT,data.id,false);},});$("#pb"+data.id).on({touchstart:function(e){e.preventDefault();padclick(DOWN,data.id,true);},touchend:function(e){e.preventDefault();padclick(DOWN,data.id,false);},});$("#pc"+data.id).on({touchstart:function(e){e.preventDefault();padclick(CENTER,data.id,true);},touchend:function(e){e.preventDefault();padclick(CENTER,data.id,false);},});} break;case UI_SLIDER:if(data.visible){addToHTML(data);rangeSlider(!sliderContinuous);} @@ -86,4 +88,4 @@ value+"";case UI_NUMBER:return"
";default:return"";}}
 )=====";
 
-const uint8_t JS_CONTROLS_GZIP[3761] PROGMEM = { 31,139,8,0,198,0,218,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,172,9,151,220,38,1,203,57,4,147,132,29,98,188,54,158,204,217,76,214,71,136,198,232,88,72,26,73,24,123,28,254,251,86,87,95,212,45,4,102,112,118,246,37,134,234,234,234,175,171,170,187,235,66,220,48,72,82,227,162,119,217,59,233,13,123,237,254,229,199,139,158,253,188,94,111,185,98,224,172,219,31,180,143,129,214,16,180,211,227,246,176,123,57,248,240,225,188,59,180,27,42,111,247,183,97,247,228,152,201,104,40,244,97,111,216,237,219,10,225,20,36,230,228,33,41,91,164,119,217,161,148,231,58,83,135,113,61,207,184,222,95,12,135,131,19,251,133,206,199,169,141,250,139,140,179,223,126,15,32,94,234,140,140,216,168,191,204,248,206,191,244,134,157,79,221,51,251,149,206,42,233,141,250,43,133,187,223,59,6,218,235,28,47,163,54,234,175,51,206,147,139,207,239,129,246,179,206,201,169,141,250,207,138,186,64,143,96,144,211,139,161,253,70,231,86,70,26,245,55,217,140,143,103,237,211,79,246,91,78,104,31,31,51,202,229,233,160,119,66,89,249,64,167,223,109,159,113,230,70,253,173,178,98,251,189,221,200,25,132,209,20,131,156,119,251,221,14,72,203,217,68,144,27,138,85,6,167,195,30,213,127,206,44,130,220,80,204,242,185,7,132,156,85,144,214,80,108,242,185,253,155,221,200,217,3,105,13,213,20,195,238,169,221,200,91,2,137,13,197,14,31,219,23,31,187,118,35,103,7,78,109,40,102,104,119,58,212,55,114,38,224,212,198,27,85,49,167,237,179,246,112,0,102,124,155,215,141,28,81,134,228,73,56,30,124,57,145,231,160,223,253,48,148,254,126,214,251,248,105,40,189,186,211,61,25,130,147,8,133,116,46,135,23,103,255,186,24,244,206,187,82,84,231,178,251,185,123,214,238,103,231,170,115,121,218,133,89,103,189,95,97,234,115,73,252,210,29,182,207,79,63,181,251,138,248,203,243,139,147,15,253,193,23,109,141,78,251,236,108,48,148,167,160,115,217,238,247,254,221,62,3,211,188,150,164,227,246,217,47,210,163,59,151,39,131,147,174,253,252,213,171,214,141,19,27,87,177,19,77,143,157,212,177,3,178,48,218,113,236,220,89,101,28,153,58,73,219,117,137,111,79,28,63,33,72,74,124,111,76,226,78,24,164,94,48,15,231,9,31,154,204,3,55,245,194,192,112,67,63,140,59,190,147,36,22,126,236,141,203,247,252,131,125,50,159,141,72,44,233,173,100,225,165,238,84,225,115,18,162,234,172,25,147,116,30,7,38,252,243,199,60,244,18,98,182,56,11,87,161,96,32,51,18,59,254,88,14,103,250,20,28,17,73,73,28,123,55,36,150,76,153,126,5,211,130,164,78,18,77,29,63,149,76,82,223,130,39,153,7,19,63,92,40,114,152,250,197,184,235,196,113,152,205,23,166,16,195,142,239,253,233,196,94,32,25,168,37,196,224,216,137,175,205,214,152,76,156,185,159,10,162,217,90,46,247,168,230,23,100,148,132,238,117,75,249,12,102,8,136,155,146,113,222,10,49,249,99,78,146,116,16,123,36,72,29,74,58,37,241,204,75,18,248,100,149,239,151,123,146,51,113,110,200,71,225,0,48,228,135,174,227,159,167,97,236,92,145,106,66,210,94,74,102,150,73,146,104,238,161,159,36,102,229,159,231,131,147,106,146,194,46,174,188,201,157,37,221,167,92,110,41,130,99,88,63,140,21,217,30,88,24,61,8,86,28,163,187,105,107,93,21,174,149,9,111,121,19,75,78,221,183,131,185,239,151,239,51,89,8,42,114,226,132,100,92,229,22,211,97,182,228,87,111,252,13,64,50,242,215,111,121,188,78,156,130,10,126,178,198,161,59,159,129,230,202,85,103,60,182,204,127,152,229,106,56,153,192,161,248,201,50,159,196,225,2,190,79,211,153,111,153,102,185,197,77,81,117,253,16,214,6,167,102,82,84,209,112,234,206,193,10,243,164,11,190,17,195,10,107,204,71,165,75,94,88,35,38,179,240,134,176,195,100,226,41,121,118,21,19,18,152,229,21,86,192,169,241,197,100,92,192,197,64,35,10,163,102,156,132,6,71,64,65,62,125,242,230,245,139,87,173,130,89,217,214,53,106,96,221,187,190,231,94,55,185,230,42,75,109,211,83,39,24,251,228,87,47,241,70,158,239,165,119,29,32,92,129,130,238,193,142,251,121,5,60,125,186,47,116,94,157,122,227,49,9,202,247,210,32,244,0,100,254,202,141,36,217,97,231,221,27,248,208,247,146,148,4,112,189,152,55,114,77,23,215,52,43,197,88,42,168,117,116,172,133,23,140,195,69,149,58,36,93,165,26,133,113,186,111,155,230,247,239,197,35,111,234,235,70,94,190,124,33,237,139,247,233,23,50,58,135,207,36,181,204,69,210,172,213,204,131,252,196,105,152,164,129,51,35,7,102,115,117,144,74,61,48,107,11,80,121,107,73,0,239,206,194,185,140,61,225,176,97,16,70,36,176,133,102,45,114,147,210,171,58,72,66,159,192,252,43,16,201,56,13,202,183,133,207,173,243,205,148,220,2,62,105,235,236,204,100,254,159,198,115,210,90,182,50,104,120,154,182,193,134,140,32,50,127,198,52,105,132,210,54,72,163,132,34,9,236,13,164,190,131,46,246,144,4,202,62,206,93,70,48,80,29,227,93,68,71,137,45,253,118,20,142,239,144,230,194,55,18,131,179,137,247,144,178,87,211,187,136,240,23,81,15,250,155,5,119,16,37,165,206,40,9,156,155,34,50,0,133,163,145,170,67,224,243,184,76,254,57,135,43,53,255,192,23,242,129,31,33,157,138,142,67,63,169,78,194,184,235,0,120,226,19,186,61,251,8,239,122,120,201,110,153,234,238,41,123,51,247,116,112,230,114,101,217,82,212,108,201,89,96,131,114,107,20,19,231,186,37,52,145,101,46,205,255,15,0,150,102,53,243,231,44,38,126,232,140,173,60,55,38,84,77,105,244,212,75,125,194,52,234,59,35,226,163,137,102,142,23,124,34,14,232,87,88,40,99,200,203,195,52,168,41,190,177,156,68,126,205,146,14,73,98,49,191,252,138,193,179,50,200,131,222,166,112,7,188,58,125,82,134,163,61,12,63,13,63,247,45,230,187,58,8,150,180,173,76,186,207,207,162,155,27,165,129,121,128,108,240,254,227,163,145,134,115,119,138,215,120,51,59,79,229,123,82,141,98,66,117,126,204,226,31,170,202,121,154,210,171,0,30,25,139,139,168,208,155,2,172,82,65,41,36,24,239,34,131,223,251,75,246,98,233,123,19,201,227,195,187,99,167,21,30,28,33,150,177,59,62,2,204,137,165,249,176,212,59,253,188,149,242,162,201,206,186,139,156,49,219,244,197,105,101,87,221,21,201,80,117,135,16,253,199,67,164,9,213,227,65,106,82,86,96,198,143,135,137,169,222,227,113,234,98,86,128,142,30,15,148,102,171,143,199,169,73,89,129,233,62,30,38,75,150,31,15,52,39,103,227,233,198,114,207,195,135,47,166,241,225,57,190,121,214,254,202,27,185,34,118,216,126,191,42,83,127,148,157,8,130,40,200,37,14,125,239,232,208,49,194,96,6,146,200,60,178,75,192,195,246,33,53,122,96,150,75,198,52,38,19,187,68,37,40,244,210,17,255,130,215,204,129,121,88,115,142,14,107,32,178,240,181,151,107,142,189,27,195,27,227,82,154,176,195,26,140,208,185,116,158,13,2,170,186,0,248,54,34,227,14,251,110,65,110,24,70,77,106,166,101,25,99,26,203,116,34,143,173,236,0,247,196,243,33,144,177,164,217,104,8,143,233,215,79,86,58,245,18,192,147,166,16,158,211,141,153,101,219,182,33,74,164,251,126,150,134,207,216,93,10,169,46,58,147,137,116,179,162,58,0,125,204,1,142,29,197,225,44,130,112,114,232,140,140,52,52,216,68,250,201,10,176,186,96,64,106,3,62,249,142,197,56,251,116,63,85,198,4,51,44,248,90,6,107,251,36,166,34,166,78,74,101,26,227,144,36,70,16,166,6,185,133,36,194,104,254,254,59,6,202,5,62,87,224,82,172,84,38,205,15,81,31,204,232,176,168,132,193,102,36,170,222,39,9,4,28,110,202,109,160,179,182,216,215,204,104,97,132,9,15,181,27,251,104,30,236,9,219,237,153,37,3,93,192,46,9,42,243,8,58,32,40,108,49,66,185,143,4,13,131,10,32,28,214,152,204,35,115,117,71,159,123,219,110,199,27,23,109,229,192,52,188,32,154,167,204,4,124,91,137,247,39,36,127,229,123,177,75,116,133,153,23,152,250,179,185,130,165,253,219,223,133,197,185,125,0,11,173,80,254,77,96,32,149,141,30,64,131,197,225,135,111,50,89,64,249,202,125,231,155,189,82,153,17,23,121,11,16,192,77,135,3,231,55,87,214,234,220,138,137,180,236,238,215,157,39,87,207,110,226,161,77,236,207,78,58,173,198,225,28,220,154,38,173,32,17,118,76,11,62,67,111,6,159,106,141,122,189,94,132,180,26,205,147,169,117,127,219,76,147,202,93,51,211,6,156,194,92,217,106,23,228,10,110,165,220,222,44,80,216,215,111,63,120,61,81,179,166,230,19,53,214,50,27,151,37,87,76,137,31,126,168,54,22,250,114,71,91,233,164,96,22,169,134,110,89,222,193,29,78,44,13,128,6,139,224,52,14,35,184,52,239,172,18,79,153,206,211,59,159,148,202,236,153,83,5,9,7,134,97,238,193,234,140,98,72,50,232,222,16,83,195,123,81,55,223,213,155,141,191,6,45,121,52,54,22,50,176,32,224,146,22,228,44,237,132,131,92,5,101,197,4,103,54,149,202,210,223,7,148,39,131,84,22,60,133,138,48,0,182,179,101,117,73,187,192,82,146,82,140,80,200,109,250,131,176,229,68,237,100,92,150,30,175,60,205,143,133,182,34,108,23,112,60,205,86,73,89,22,153,181,89,155,171,51,89,154,79,129,92,57,243,43,242,131,54,149,151,181,203,158,216,181,199,232,162,209,33,234,104,88,165,179,204,139,224,58,8,23,129,65,43,96,52,154,195,16,204,20,247,231,114,79,64,166,227,71,182,214,228,126,250,84,142,28,234,85,51,246,66,139,218,80,254,0,175,85,67,228,4,196,215,148,160,78,43,208,64,54,161,156,131,106,219,218,133,2,41,13,3,163,87,249,217,53,243,76,118,188,120,191,237,25,239,112,137,175,89,59,75,80,178,222,149,160,200,78,149,32,176,214,148,248,38,59,81,229,150,64,146,21,116,57,143,121,160,180,243,120,185,13,190,151,69,41,186,112,11,25,118,1,90,65,171,194,148,248,56,176,77,136,214,226,88,238,209,180,5,243,181,103,252,142,190,196,111,144,144,16,90,15,84,210,17,158,135,124,173,127,227,79,138,158,152,32,13,211,25,70,13,104,221,154,191,140,133,156,44,31,80,234,204,51,146,36,206,21,177,149,90,162,218,18,97,248,88,83,130,167,43,204,47,65,158,45,222,0,78,199,147,154,117,151,18,204,9,18,31,87,110,154,7,240,23,219,5,156,91,93,133,145,54,172,130,119,250,166,101,130,45,86,161,151,239,134,53,216,221,188,105,145,116,155,69,68,106,92,184,4,77,102,55,174,224,140,182,88,131,93,213,155,140,194,239,242,141,134,217,98,33,181,18,201,134,43,94,50,134,155,14,91,98,252,163,46,118,68,105,138,52,122,232,140,28,203,60,42,94,78,150,71,232,229,83,201,45,200,59,13,74,147,129,21,81,154,235,144,68,238,195,80,34,87,195,162,93,254,235,5,79,182,16,60,89,39,152,214,168,214,139,222,66,125,209,104,157,104,90,78,92,47,218,223,66,180,191,78,52,86,0,215,203,142,183,144,29,23,200,214,218,164,34,144,230,134,79,32,57,32,232,104,248,201,230,253,115,248,142,46,158,121,183,7,55,120,19,102,186,215,180,83,39,91,153,194,207,29,16,127,67,148,165,243,215,150,210,20,20,66,244,190,165,144,228,5,15,202,210,251,223,153,56,148,103,100,123,105,100,17,244,38,24,121,158,8,158,249,108,92,212,31,115,178,235,171,178,215,192,122,64,188,40,75,178,31,115,40,5,198,172,171,232,37,199,94,226,198,36,229,245,46,100,178,215,190,111,202,239,113,220,145,173,188,115,218,59,163,191,92,16,190,208,13,68,190,227,18,171,246,159,223,143,15,106,87,21,19,159,50,86,244,196,98,46,86,41,154,171,47,167,246,36,82,10,15,35,151,75,94,50,93,247,228,174,155,216,66,7,84,1,186,142,239,143,28,247,250,156,64,204,183,111,155,212,42,38,251,209,128,170,30,49,41,67,43,20,177,20,254,166,178,48,93,104,60,123,235,215,173,240,85,91,203,165,232,2,203,188,59,211,51,38,224,247,89,192,103,63,24,65,190,51,13,140,21,105,209,46,23,45,30,208,186,93,211,52,91,106,8,109,111,17,154,175,200,84,135,165,84,92,104,1,155,47,22,73,71,168,40,250,23,249,169,186,215,108,71,169,103,149,202,223,191,203,151,184,160,42,86,245,73,112,149,78,143,234,90,125,108,27,185,239,54,137,205,58,224,172,65,15,62,181,185,123,174,55,77,181,180,74,105,248,173,109,213,229,154,7,187,55,95,177,190,84,220,138,101,121,17,219,138,44,215,43,185,6,90,242,64,245,23,195,165,23,144,93,74,23,33,253,209,221,124,22,36,130,131,154,145,50,56,241,216,72,217,207,11,104,81,184,56,134,198,62,192,244,149,104,44,176,2,177,121,88,3,210,225,52,174,209,202,49,119,41,89,118,66,245,86,86,75,52,21,45,255,195,42,51,246,23,114,165,175,172,237,188,203,126,19,246,123,37,20,41,54,78,219,34,176,218,134,93,232,72,150,123,122,177,157,226,16,215,198,86,149,220,124,181,126,55,13,201,215,64,153,158,221,47,40,2,102,23,76,44,136,223,164,155,243,159,13,30,38,160,60,212,42,60,73,66,159,218,221,176,39,85,138,218,50,240,223,103,139,216,137,168,58,101,131,137,202,57,50,243,189,127,177,10,11,106,113,29,236,244,175,91,137,247,187,104,100,3,156,74,36,204,166,84,12,124,125,105,51,195,84,123,99,69,156,236,33,69,147,75,144,140,79,129,41,79,181,0,202,246,72,113,38,15,43,132,119,149,204,3,75,148,30,27,230,59,249,148,195,5,89,102,173,184,61,230,187,124,150,23,112,26,62,72,88,191,176,75,56,105,20,222,150,216,218,98,233,48,232,208,77,137,165,232,207,214,216,246,48,46,195,30,206,134,181,133,63,31,214,112,91,202,190,87,46,47,177,255,192,145,56,249,79,102,224,216,207,125,6,88,235,73,50,27,169,189,127,67,55,18,5,103,42,70,42,100,229,86,194,93,211,159,49,176,134,227,211,39,111,95,191,170,183,178,182,229,67,171,179,102,249,182,0,114,220,26,134,120,103,12,248,195,130,109,33,232,204,26,2,127,103,4,216,138,223,22,129,206,172,33,24,109,68,80,99,238,96,241,106,21,115,166,119,38,160,202,28,103,226,197,179,210,26,148,188,15,191,37,76,206,93,12,212,21,64,7,191,80,140,204,237,41,68,112,99,245,148,179,23,89,248,184,114,22,213,128,89,59,149,250,13,192,206,40,50,151,140,153,7,187,169,195,95,231,214,46,53,234,117,165,197,202,47,26,220,141,30,96,21,45,200,35,116,56,96,120,9,23,114,160,68,253,18,195,155,86,60,84,185,40,67,108,145,109,130,71,124,248,128,55,71,16,203,95,183,86,110,51,19,183,138,181,30,222,48,102,155,101,233,73,209,222,224,162,197,48,89,240,240,4,130,233,10,44,83,83,96,41,209,206,174,208,88,137,40,223,204,46,64,163,148,154,10,177,240,48,75,62,124,88,175,249,11,64,68,129,135,67,201,22,214,74,67,133,75,179,144,78,172,60,241,174,230,49,65,153,188,249,199,127,102,1,3,174,195,251,237,7,50,54,81,168,248,5,230,170,162,49,62,228,162,191,244,250,125,227,125,215,104,27,72,54,54,41,27,151,103,165,250,255,129,225,89,160,202,97,225,23,163,70,127,74,14,39,107,22,49,221,146,177,49,129,87,236,110,95,61,144,14,109,106,146,56,156,209,90,48,3,137,36,9,242,72,229,30,65,54,38,181,199,158,186,8,52,91,36,43,156,167,180,165,46,153,35,212,98,193,127,162,248,47,48,50,219,133,66,55,0,0 };
+const uint8_t JS_CONTROLS_GZIP[3810] PROGMEM = { 31,139,8,0,242,53,223,97,2,255,197,91,91,119,218,72,18,126,247,175,144,149,57,65,44,152,75,110,147,1,203,57,4,147,132,29,98,123,109,60,153,179,153,172,143,16,141,209,177,144,52,146,48,246,56,252,247,173,174,190,168,91,8,204,224,217,217,151,24,149,170,171,191,174,170,238,174,139,226,134,65,146,26,151,253,171,254,73,127,216,239,12,174,62,94,246,237,23,141,70,219,21,47,206,123,131,211,206,49,208,154,130,118,118,220,25,246,174,78,63,124,184,232,13,237,166,202,219,251,117,216,59,57,102,50,154,10,125,216,31,246,6,182,66,56,3,137,57,121,72,202,38,233,95,117,41,229,133,206,212,101,92,47,50,174,247,151,195,225,233,137,253,82,231,227,212,102,227,101,198,57,232,188,7,16,175,116,70,70,108,54,94,101,124,23,95,250,195,238,167,222,185,253,90,103,149,244,102,227,181,194,61,232,31,3,237,77,142,151,81,155,141,55,25,231,201,229,231,247,64,251,81,231,228,212,102,227,71,69,93,160,71,48,200,217,229,208,126,171,115,43,111,154,141,183,217,136,143,231,157,179,79,246,79,156,208,57,62,102,148,171,179,211,254,9,101,229,47,186,131,94,231,156,51,55,27,63,41,51,118,222,219,205,156,65,24,77,49,200,69,111,208,235,130,180,156,77,4,185,169,88,229,244,108,216,167,250,207,153,69,144,155,138,89,62,247,129,144,179,10,210,154,138,77,62,119,126,181,155,57,123,32,173,169,154,98,216,59,179,155,121,75,32,177,169,216,225,99,231,242,99,207,110,230,236,192,169,77,197,12,157,110,151,250,70,206,4,156,218,124,171,42,230,172,115,222,25,158,130,25,127,202,235,70,190,81,94,201,157,112,124,250,229,68,238,131,65,239,195,80,250,251,121,255,227,167,161,244,234,110,239,100,8,78,34,20,210,189,26,94,158,255,235,242,180,127,209,147,162,186,87,189,207,189,243,206,32,219,87,221,171,179,30,140,58,239,255,2,67,95,72,226,151,222,176,115,113,246,169,51,80,196,95,93,92,158,124,24,156,126,209,230,232,118,206,207,79,135,114,23,116,175,58,131,254,191,59,231,96,154,55,146,116,220,57,255,89,122,116,247,234,228,244,164,103,191,120,253,186,125,235,196,198,117,236,68,211,99,39,117,236,128,44,140,78,28,59,247,86,25,223,76,157,164,227,186,196,183,39,142,159,16,36,37,190,55,38,113,55,12,82,47,152,135,243,132,191,154,204,3,55,245,194,192,112,67,63,140,187,190,147,36,22,254,236,143,203,15,252,135,125,50,159,141,72,44,233,237,100,225,165,238,84,225,115,18,162,234,172,21,147,116,30,7,38,252,243,251,60,244,18,98,182,57,11,87,161,96,32,51,18,59,254,88,190,206,244,41,56,34,146,146,56,246,110,73,44,153,50,253,10,166,5,73,157,36,154,58,126,42,153,164,190,5,79,50,15,38,126,184,80,228,48,245,139,247,174,19,199,97,54,94,152,66,188,118,124,239,15,39,246,2,201,64,45,33,94,142,157,248,198,108,143,201,196,153,251,169,32,154,237,229,114,143,106,126,65,70,73,232,222,180,149,223,96,134,128,184,41,25,231,173,16,147,223,231,36,73,79,99,143,4,169,67,73,103,36,158,121,73,2,191,172,242,195,114,79,114,38,206,45,249,40,28,0,94,249,161,235,248,23,105,24,59,215,164,150,144,180,159,146,153,101,146,36,154,123,232,39,137,89,253,231,197,233,73,45,73,97,21,215,222,228,222,146,238,83,46,183,21,193,49,204,31,198,138,108,15,44,140,30,4,51,142,209,221,180,185,174,11,231,202,132,183,189,137,37,135,238,219,193,220,247,203,15,153,44,4,21,57,113,66,50,174,114,155,233,48,155,242,171,55,254,6,32,25,249,235,183,60,94,39,78,65,5,63,88,227,208,157,207,64,115,229,154,51,30,91,230,63,204,114,45,156,76,96,83,252,96,153,207,226,112,1,207,211,116,230,91,166,89,110,115,83,212,92,63,132,185,193,169,153,20,85,52,236,186,11,176,194,60,233,129,111,196,48,195,26,243,81,233,146,23,230,136,201,44,188,37,108,51,153,184,75,14,174,99,66,2,179,188,194,10,56,53,190,152,140,11,184,24,104,68,97,212,141,147,208,224,8,40,200,231,207,222,190,121,249,186,93,48,42,91,186,70,13,172,7,215,247,220,155,22,215,92,117,169,45,122,234,4,99,159,252,226,37,222,200,243,189,244,190,11,132,107,80,208,3,216,113,63,175,128,231,207,247,133,206,107,83,111,60,38,65,249,65,26,132,110,128,204,95,185,145,36,59,172,188,119,11,63,6,94,146,146,0,142,23,243,86,206,233,226,156,102,181,24,75,21,181,142,142,181,240,130,113,184,168,81,135,164,179,212,162,48,78,247,109,211,252,254,189,248,205,219,198,186,55,175,94,189,148,246,197,243,244,11,25,93,192,111,146,90,230,34,105,213,235,102,37,63,112,26,38,105,224,204,72,197,108,173,190,164,82,43,102,125,1,42,111,47,9,224,221,89,56,151,177,39,28,54,12,194,136,4,182,208,172,69,110,83,122,84,7,73,232,19,24,127,13,34,25,167,65,249,182,240,185,117,190,153,146,59,192,39,109,157,237,153,204,255,211,120,78,218,203,118,6,13,119,211,54,216,144,17,68,230,247,152,38,141,80,218,6,105,148,80,36,129,221,129,212,119,208,197,30,147,64,217,199,185,195,8,94,212,198,120,22,209,183,196,150,126,59,10,199,247,72,115,225,137,196,224,108,226,62,164,236,181,244,62,34,252,70,212,131,254,86,193,25,68,73,169,51,74,2,231,182,136,12,64,97,107,164,234,43,240,121,156,38,127,157,195,145,154,191,224,11,249,192,143,144,78,69,199,161,159,212,38,97,220,115,0,60,241,9,93,158,125,132,103,61,220,100,119,76,117,15,148,189,149,187,58,56,115,185,186,108,43,106,182,228,40,176,65,6,53,13,83,199,23,243,29,89,250,244,62,9,174,211,233,65,179,44,55,31,92,94,1,156,221,115,47,188,129,109,181,150,29,22,50,138,137,115,211,22,170,206,82,163,214,255,119,133,76,239,244,184,131,45,77,238,42,59,173,120,155,241,171,58,96,169,100,43,127,150,196,196,15,157,49,236,12,157,27,147,198,150,116,236,212,75,125,194,188,198,119,70,196,71,55,156,57,94,240,137,56,224,67,194,11,51,134,188,60,76,245,90,226,137,229,93,242,49,75,172,36,137,229,53,242,17,19,4,229,37,15,236,91,66,203,120,61,248,164,12,199,215,48,252,52,252,60,176,216,254,212,65,176,196,116,101,208,67,126,20,93,220,40,13,204,10,178,65,140,131,23,99,26,206,221,41,234,190,149,157,25,229,7,82,139,98,66,205,126,204,98,60,170,202,121,154,210,227,14,46,82,139,139,168,210,211,16,140,82,69,41,96,211,93,100,240,187,109,201,110,101,125,109,34,65,126,124,117,236,68,130,75,85,136,101,236,142,143,0,115,98,105,206,47,245,78,127,111,165,188,104,178,179,238,34,103,204,22,125,121,86,221,85,119,69,50,84,221,33,68,255,233,16,105,210,248,116,144,154,148,21,152,241,211,97,98,58,251,116,156,186,152,21,160,163,167,3,165,25,249,211,113,106,82,86,96,186,79,135,201,10,2,79,7,154,147,179,113,119,99,73,235,241,205,23,211,24,248,2,239,117,107,127,37,14,88,17,59,236,188,95,149,169,7,30,78,20,225,13,116,232,123,71,135,142,17,6,51,144,68,230,145,93,2,30,182,14,169,209,138,89,46,25,211,152,76,236,18,149,160,208,75,71,252,1,143,153,138,121,88,119,142,14,235,32,178,48,162,145,115,142,189,91,195,27,227,84,154,176,195,58,188,161,99,233,56,27,4,212,116,1,240,52,34,227,46,123,182,32,255,13,163,22,53,211,178,140,113,155,101,58,145,199,102,118,128,123,226,249,16,172,89,210,108,52,77,193,20,243,7,43,157,122,9,224,73,83,72,65,232,194,204,178,109,219,16,9,211,117,31,164,225,1,59,75,33,157,71,103,50,145,110,86,85,7,160,241,4,192,177,163,56,156,69,16,50,15,157,145,145,134,6,27,72,127,89,1,86,80,12,72,223,192,39,223,177,56,110,159,174,167,198,152,96,132,5,143,16,19,56,62,137,169,136,169,147,82,153,198,56,36,137,17,132,169,65,238,32,81,50,90,191,253,134,201,64,129,207,21,184,20,43,7,74,243,67,100,11,35,186,44,146,96,176,25,137,170,247,89,2,49,143,155,114,27,232,172,109,246,152,25,45,140,48,169,163,118,99,63,205,202,158,176,221,158,89,50,208,5,236,146,160,50,143,160,47,4,133,77,70,40,247,145,160,97,80,1,132,195,58,147,121,100,174,174,232,115,127,219,229,120,227,162,165,84,76,195,11,162,121,202,76,192,151,149,120,127,64,130,91,126,16,171,68,87,152,121,129,169,95,155,43,88,58,191,254,93,88,156,187,71,176,208,42,236,223,4,6,210,245,232,17,52,88,0,127,252,36,147,69,162,175,220,119,190,217,43,213,39,113,144,183,1,1,156,116,248,226,226,246,218,90,29,91,53,145,150,157,253,186,243,228,106,246,45,220,180,137,253,217,73,167,181,56,156,131,91,211,196,28,36,194,138,105,81,107,232,205,224,87,189,217,104,52,138,144,214,162,121,50,181,30,238,90,105,82,189,111,101,218,128,93,152,43,205,237,130,92,193,173,180,20,90,5,10,251,250,237,47,158,79,212,229,169,249,68,29,185,204,222,203,178,50,166,253,143,95,84,27,139,153,185,173,173,116,139,48,83,86,67,183,44,239,224,14,39,166,6,64,167,139,224,44,14,35,56,52,239,173,18,207,218,46,210,123,159,148,202,236,154,83,5,9,7,134,215,220,131,213,17,197,144,100,208,189,33,166,134,251,162,97,190,107,180,154,127,14,90,242,100,108,44,100,96,65,192,21,45,58,90,218,14,7,185,10,202,170,9,206,108,42,213,179,191,15,40,79,6,169,44,184,10,21,97,0,108,103,203,234,146,118,129,165,36,165,24,161,144,187,244,47,194,150,19,181,147,113,89,122,188,114,53,63,21,218,138,176,93,192,241,52,91,37,101,89,100,214,74,110,173,142,100,105,62,5,114,237,204,175,201,95,180,168,188,172,93,214,196,142,61,70,23,205,28,81,43,196,74,164,101,94,6,55,65,184,8,12,90,229,163,209,28,134,96,166,56,63,151,123,178,34,4,239,143,108,173,145,255,252,185,124,115,168,87,6,217,13,45,202,83,249,13,188,86,13,145,19,16,95,83,130,58,172,64,3,217,128,114,14,170,109,107,7,10,164,52,12,140,222,201,96,199,204,129,236,234,241,158,226,1,239,226,137,199,172,101,39,40,89,127,78,80,100,55,78,16,88,251,77,60,201,110,91,185,45,144,100,69,107,206,99,86,148,150,37,47,145,193,115,89,148,219,11,151,144,97,23,160,21,180,42,76,137,143,3,219,132,104,45,142,229,30,77,91,48,95,59,224,103,244,21,62,65,66,66,104,73,82,73,71,120,30,242,181,241,141,95,41,122,98,130,52,76,103,24,53,160,181,121,126,51,22,114,178,124,64,169,165,207,72,146,56,215,196,86,202,153,106,219,135,225,99,141,23,158,174,48,191,4,121,182,184,3,56,29,119,106,214,65,99,229,203,196,199,153,91,102,5,254,98,75,132,115,171,179,48,210,134,89,240,76,223,52,77,176,197,44,244,240,221,48,7,59,155,55,77,146,110,51,137,72,141,11,167,160,201,236,198,25,156,209,22,115,176,163,122,147,81,248,89,190,209,48,91,76,164,86,34,217,235,170,151,140,225,164,195,182,31,255,169,139,29,81,154,34,141,110,58,35,199,50,143,138,167,147,229,17,122,248,84,115,19,242,110,138,210,72,97,69,148,214,58,36,145,251,56,148,200,213,176,104,135,255,122,193,147,45,4,79,214,9,166,53,170,245,162,183,80,95,52,90,39,154,150,19,215,139,246,183,16,237,175,19,141,21,192,245,178,227,45,100,199,5,178,181,86,176,8,164,185,225,19,72,14,8,58,26,254,178,249,55,2,240,140,46,158,121,183,7,39,120,11,70,186,55,180,27,153,239,159,36,14,136,191,37,202,212,249,99,75,105,124,10,33,122,111,86,72,242,130,71,101,233,61,254,76,28,202,51,178,181,52,179,8,122,19,140,60,79,4,215,124,246,94,212,31,115,178,27,171,178,215,192,122,68,188,40,75,178,15,86,148,2,99,214,57,245,146,99,47,113,99,146,242,122,23,50,217,107,239,55,229,155,35,119,100,43,247,156,118,207,232,55,23,132,47,116,1,145,239,184,196,170,255,231,183,227,74,253,186,106,226,85,198,138,158,88,204,197,42,69,107,245,230,212,174,68,74,225,97,228,114,201,75,166,235,174,220,117,3,219,232,128,42,64,215,241,253,145,227,222,92,16,136,249,246,109,147,90,197,100,31,70,168,234,17,131,50,180,66,17,75,225,111,42,11,211,133,198,179,183,126,222,42,159,181,189,92,138,78,183,204,187,51,61,99,2,254,144,5,124,246,163,17,228,59,211,192,88,145,22,237,114,209,98,133,214,237,90,166,217,86,67,104,123,139,208,124,69,166,250,90,74,197,137,22,176,248,98,145,244,13,21,69,255,34,63,85,247,154,229,40,245,172,82,249,251,119,121,19,23,84,197,120,31,245,168,161,213,199,182,145,251,110,147,216,172,203,207,62,66,0,159,218,252,133,128,222,52,213,210,42,165,225,183,182,85,151,107,30,236,222,124,197,250,82,113,43,150,229,69,108,41,178,92,175,228,26,104,201,138,234,47,134,75,15,32,187,148,46,66,250,97,225,124,22,36,130,131,154,145,50,56,241,216,72,217,39,20,180,40,92,28,67,99,31,96,250,90,52,22,88,129,216,60,172,3,233,112,26,215,105,229,152,187,148,44,59,161,122,171,171,37,154,170,150,255,97,149,25,251,11,185,210,87,214,118,222,101,189,9,251,38,11,69,138,133,211,182,8,204,182,97,21,58,146,229,158,94,108,167,56,196,177,177,85,37,55,95,173,223,77,67,242,54,80,134,103,231,11,138,128,209,5,3,11,226,55,233,230,252,211,200,195,4,148,135,90,133,43,73,232,83,59,27,246,164,74,81,91,6,254,123,176,136,157,136,170,83,54,152,168,156,35,51,223,251,23,179,176,160,22,231,193,78,255,186,153,120,191,139,70,54,192,169,68,194,108,72,213,192,219,151,54,51,76,181,55,86,196,201,46,82,52,185,4,201,248,20,152,114,87,11,160,108,141,20,103,242,184,66,120,87,201,172,88,162,244,216,52,223,201,171,28,14,200,50,107,197,237,49,223,229,163,188,128,211,240,66,194,250,133,93,194,65,163,240,174,196,230,22,83,135,65,151,46,74,76,69,63,205,99,203,195,184,12,123,56,27,230,22,254,124,88,199,101,41,235,94,57,188,196,250,3,71,226,228,159,185,192,182,159,251,12,176,214,147,100,54,82,123,255,134,110,36,10,206,84,140,84,200,202,173,132,171,166,159,49,176,134,227,243,103,63,189,121,221,104,103,109,203,199,102,103,205,242,109,1,228,184,53,12,241,206,24,240,195,130,109,33,232,204,26,2,127,103,4,216,138,223,22,129,206,172,33,24,109,68,80,103,238,96,241,106,21,115,166,119,38,160,202,28,103,226,197,179,210,26,148,188,15,191,37,76,206,93,12,212,21,64,79,127,166,24,153,219,83,136,224,198,234,46,103,55,178,240,113,101,47,170,1,179,182,43,245,19,128,237,81,100,46,25,51,15,86,211,128,191,206,157,93,106,54,26,74,139,149,31,52,184,26,61,192,42,154,144,71,232,176,193,240,16,46,228,64,137,250,33,134,39,173,184,168,114,81,134,88,34,91,4,143,248,240,2,111,141,32,150,191,105,175,156,102,38,46,21,107,61,188,97,204,22,203,210,147,162,181,193,65,139,97,178,224,225,9,4,211,21,88,166,174,192,82,162,157,93,161,177,18,81,190,153,93,128,70,41,53,21,98,225,97,150,188,248,176,94,243,39,128,136,2,15,135,146,77,172,149,134,10,167,102,33,157,152,121,226,93,207,99,130,50,121,243,143,127,102,1,47,92,135,247,219,43,50,54,81,168,248,0,99,85,209,24,31,114,209,95,250,131,129,241,190,103,116,12,36,27,155,148,141,211,179,82,253,255,192,240,44,80,229,176,240,193,168,211,207,229,97,103,205,34,166,91,50,54,38,112,139,221,239,171,27,210,161,77,77,18,135,51,90,11,102,32,145,36,65,30,169,220,35,200,198,164,246,216,85,23,129,102,139,100,133,243,148,182,212,37,115,132,90,44,248,143,34,255,5,35,73,65,184,38,56,0,0 };