Arduino IDE -> PlatformIO

This commit is contained in:
2019-05-27 21:17:05 +02:00
parent 1426307a13
commit ce0c834326
22 changed files with 203 additions and 18 deletions

2
src/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
config.h
tools/*.gif

521
src/SimpleList.h Normal file
View File

@ -0,0 +1,521 @@
#ifndef SimpleList_h
#define SimpleList_h
/*
===========================================
Copyright (c) 2018 Stefan Kremser
github.com/spacehuhn
===========================================
*/
#include <type_traits>
#include <cstddef>
#include <functional>
template<class T>
struct SimpleListNode {
T data;
SimpleListNode<T>* next = NULL;
};
template<typename T>
class SimpleList {
public:
SimpleList();
SimpleList(int(*compare)(T & a, T & b));
virtual ~SimpleList();
virtual void setCompare(int (* compare)(T& a, T& b));
virtual int size();
virtual bool isSorted();
virtual bool isEmpty();
virtual void add(int index, T obj);
virtual void add(T obj);
virtual void insert(T obj);
virtual void replace(int index, T obj);
virtual void swap(int x, int y);
virtual void remove(int index);
virtual void removeFirst();
virtual void removeLast();
virtual bool has(T obj);
virtual int count(T obj);
virtual T shift();
virtual T pop();
virtual T get(int index);
virtual T getFirst();
virtual T getLast();
virtual void moveToEnd();
virtual int search(T obj);
virtual int searchNext(T obj);
virtual int binSearch(T obj);
virtual void sort();
virtual void clear();
protected:
int (* compare)(T& a, T& b) = NULL;
int listSize = 0;
SimpleListNode<T>* listBegin = NULL;
SimpleListNode<T>* listEnd = NULL;
// Helps get() method by saving last position
SimpleListNode<T>* lastNodeGot = NULL;
int lastIndexGot = -1;
bool isCached = false;
bool sorted = true;
virtual SimpleListNode<T>* getNode(int index);
virtual int binSearch(T obj, int lowerEnd, int upperEnd);
};
template<typename T>
SimpleList<T>::SimpleList() {}
template<typename T>
SimpleList<T>::SimpleList(int(*compare)(T & a, T & b)) {
setCompare(compare);
}
// Clear Nodes and free Memory
template<typename T>
SimpleList<T>::~SimpleList() {
clear();
}
template<typename T>
void SimpleList<T>::setCompare(int (* compare)(T& a, T& b)) {
this->compare = compare;
sort();
}
template<typename T>
SimpleListNode<T>* SimpleList<T>::getNode(int index) {
if ((index < 0) || (index >= listSize)) return NULL;
SimpleListNode<T>* hNode = listBegin;
int c = 0;
if (isCached && (index >= lastIndexGot)) {
c = lastIndexGot;
hNode = lastNodeGot;
}
while (hNode && c < index) {
hNode = hNode->next;
c++;
}
if (hNode) {
isCached = true;
lastIndexGot = c;
lastNodeGot = hNode;
}
return hNode;
}
template<typename T>
int SimpleList<T>::size() {
return listSize;
}
template<typename T>
bool SimpleList<T>::isSorted() {
return sorted;
}
template<typename T>
bool SimpleList<T>::isEmpty() {
return listSize == 0;
}
template<typename T>
void SimpleList<T>::add(T obj) {
// create new node
SimpleListNode<T>* newNode = new SimpleListNode<T>();
newNode->data = obj;
if (!listBegin) listBegin = newNode;
if (listEnd) {
listEnd->next = newNode;
listEnd = newNode;
} else {
listEnd = newNode;
}
listSize++;
sorted = false;
}
template<typename T>
void SimpleList<T>::add(int index, T obj) {
if ((index < 0) || (index >= listSize)) {
return;
}
SimpleListNode<T>* newNode = new SimpleListNode<T>();
newNode->data = obj;
if (index == 0) {
listBegin = newNode;
} else {
SimpleListNode<T>* nodePrev = getNode(index - 1);
newNode->next = nodePrev->next;
nodePrev->next = newNode;
}
listSize++;
sorted = false;
}
template<typename T>
void SimpleList<T>::insert(T obj) {
if (!compare) {
add(obj);
return;
}
if (!sorted) sort();
// create new node
SimpleListNode<T>* newNode = new SimpleListNode<T>();
newNode->data = obj;
if (listSize == 0) {
// add at start (first node)
listBegin = newNode;
listEnd = newNode;
} else {
if (compare(obj, listEnd->data) >= 0) {
// add at end
listEnd->next = newNode;
listEnd = newNode;
} else if (compare(obj, listBegin->data) < 0) {
// add at start
newNode->next = listBegin;
listBegin = newNode;
} else {
// insertion sort
SimpleListNode<T>* h = listBegin;
SimpleListNode<T>* p = NULL;
bool found = false;
// here a sequential search, because otherwise the previous node couldn't be accessed
while (h && !found) {
if (compare(obj, h->data) < 0) {
found = true;
} else {
p = h;
h = h->next;
}
}
newNode->next = h;
if (p) p->next = newNode;
}
}
listSize++;
}
template<typename T>
void SimpleList<T>::replace(int index, T obj) {
if ((index >= 0) && (index < listSize)) {
getNode(index)->data = obj;
}
}
template<typename T>
void SimpleList<T>::swap(int x, int y) {
// only continue when the index numbers are unequal and at least 0
if ((x != y) && (x >= 0) && (y >= 0)) {
if (x > y) { // the first index should be smaller than the second. If not, swap them!
int h = x;
x = y;
y = h;
}
// When data is small, copy it
if (sizeof(T) < 24) {
SimpleListNode<T>* nodeA = getNode(x);
SimpleListNode<T>* nodeB = getNode(y);
T h = nodeA->data;
nodeA->data = nodeB->data;
nodeB->data = h;
}
// otherwise change the pointers
else {
// Example: a -> b -> c -> ... -> g -> h -> i
// we want to swap b with h
SimpleListNode<T>* nodeA = getNode(x - 1); // x.prev
SimpleListNode<T>* nodeB = getNode(x); // x
SimpleListNode<T>* nodeC = getNode(x + 1); // x.next
SimpleListNode<T>* nodeG = y - 1 == x ? nodeB : getNode(y - 1); // y.prev
SimpleListNode<T>* nodeH = getNode(y); // y
SimpleListNode<T>* nodeI = getNode(y + 1); // y.next
// a -> h -> i b -> c -> ... -> g -> h -> i
if (nodeA) nodeA->next = nodeH;
else listBegin = nodeH;
// a -> h -> c -> ... -> g -> h -> i b -> i
if (nodeH != nodeC) // when nodes between b and h exist
nodeH->next = nodeC;
else nodeH->next = nodeB;
// a -> h -> i b -> i
nodeB->next = nodeI;
if (!nodeI) listEnd = nodeB;
// a -> h -> c -> ... -> g -> b -> i
if (nodeG != nodeB) // when more than 1 nodes between b and h exist
nodeG->next = nodeB;
}
}
}
template<typename T>
void SimpleList<T>::remove(int index) {
if ((index < 0) || (index >= listSize)) return;
SimpleListNode<T>* nodePrev = getNode(index - 1);
SimpleListNode<T>* nodeToDelete = getNode(index);
if (index == 0) {
listBegin = nodeToDelete->next;
} else {
nodePrev->next = nodeToDelete->next;
if (!nodePrev->next) listEnd = nodePrev;
}
delete nodeToDelete;
isCached = false;
listSize--;
}
template<typename T>
void SimpleList<T>::removeFirst() {
remove(0);
}
template<typename T>
void SimpleList<T>::removeLast() {
remove(listSize - 1);
}
template<typename T>
bool SimpleList<T>::has(T obj) {
return binSearch(obj) >= 0;
}
template<typename T>
int SimpleList<T>::count(T obj) {
if (compare == NULL) return -1;
int c = 0;
for (int i = 0; i < listSize; i++) {
if (compare(obj, getNode(i)->data) == 0) c++;
}
return c;
}
template<typename T>
T SimpleList<T>::get(int index) {
SimpleListNode<T>* h = getNode(index);
if (h) return h->data;
return T();
}
template<typename T>
T SimpleList<T>::getFirst() {
return get(0);
}
template<typename T>
T SimpleList<T>::getLast() {
return get(listSize - 1);
}
template<typename T>
void SimpleList<T>::moveToEnd() {
SimpleListNode<T>* h = listBegin;
if (!h) return;
listBegin = listBegin->next;
listEnd->next = h;
h->next = NULL;
listEnd = h;
lastNodeGot = NULL;
lastIndexGot = -1;
isCached = false;
sorted = false;
}
template<typename T>
int SimpleList<T>::search(T obj) {
if (compare == NULL) return -1;
int i = 0;
SimpleListNode<T>* hNode = getNode(i);
bool found = compare(obj, hNode->data) == 0;
while (!found && i < listSize) {
i++;
hNode = getNode(i);
found = compare(obj, hNode->data) == 0;
}
return found ? i : -1;
}
template<typename T>
int SimpleList<T>::searchNext(T obj) {
if (compare == NULL) return -1;
int i = lastIndexGot;
SimpleListNode<T>* hNode = lastNodeGot;
bool found = compare(obj, hNode->data) == 0;
while (!found && i < listSize) {
i++;
hNode = getNode(i);
found = compare(obj, hNode->data) == 0;
}
return found ? i : -1;
}
template<typename T>
int SimpleList<T>::binSearch(T obj, int lowerEnd, int upperEnd) {
if (!compare || !sorted) return search(obj);
if (!listBegin) return -1;
int res;
int mid = (lowerEnd + upperEnd) / 2;
SimpleListNode<T>* hNode = getNode(0);
int hIndex = 0;
while (lowerEnd <= upperEnd) {
hNode = lastNodeGot;
hIndex = lastIndexGot;
res = compare(obj, getNode(mid)->data);
if (res == 0) {
return mid;
} else if (res < 0) {
// when going left, set cached node back to previous cached node
lastNodeGot = hNode;
lastIndexGot = hIndex;
isCached = true;
upperEnd = mid - 1;
mid = (lowerEnd + upperEnd) / 2;
} else if (res > 0) {
lowerEnd = mid + 1;
mid = (lowerEnd + upperEnd) / 2;
}
}
return -1;
}
template<typename T>
int SimpleList<T>::binSearch(T obj) {
return binSearch(obj, 0, listSize - 1);
}
template<typename T>
T SimpleList<T>::pop() {
T data = getLast();
removeLast();
return data;
}
template<typename T>
T SimpleList<T>::shift() {
T data = getFirst();
removeFirst();
return data;
}
template<typename T>
void SimpleList<T>::clear() {
while (listSize > 0) removeFirst();
listSize = 0;
listBegin = NULL;
listEnd = NULL;
lastNodeGot = NULL;
lastIndexGot = -1;
isCached = false;
sorted = true;
}
template<typename T>
void SimpleList<T>::sort() {
if (compare == NULL) return;
// selection sort (less swaps than insertion sort)
int indexH; // index of node i
int indexMin; // index of next minimum node
SimpleListNode<T>* nodeMin; // next minimum node
SimpleListNode<T>* nodeH; // helper node at index j
for (int i = 0; i < listSize - 1; i++) {
nodeMin = getNode(i);
indexH = i;
indexMin = i;
for (int j = i + 1; j < listSize; j++) {
nodeH = getNode(j);
if (compare(nodeMin->data, nodeH->data) > 0) {
nodeMin = nodeH;
indexMin = j;
}
}
swap(indexH, indexMin);
}
this->sorted = true;
}
#endif // ifndef SimpleList_h

161
src/animations.h Normal file
View File

@ -0,0 +1,161 @@
/**
Animations are structured in AnimationData as follows:
.colors contains .color_count*3 uint8_t values for R, G and B.
.offsets contains the frame start offsets within .data + the length of the data. (So
you can always do something like `for (int i=anim.offsets[i]; i<anim.offsets[i+1]; i++)`.
Accordingly it has a length of .frame_count+1.
.data contains all frames data with a run-length compression with escape char 255.
This data references the index of one or multiple pixels in .colors. It starts at the
top left pixel and walks each row to the right before starting the next row.
To decode it: Start at a frame (indicated by .offsets). Get one byte as x.
If x is <255: This is a single pixel of color x.
if x is 255: Run-length-encoding. The next byte indicates of often the byte after that
will be repeated. So, {255, 4, 10} is equal to {10, 10, 10, 10}.
A special case that may happen in larger GIFs is that there are more than 255 repetitions
of a color. Those will be split, so 355*color #10 will be: {255, 255, 10, 255, 100, 10},
e.g. 255*10 + 100*10. Usually this shouldn't need special handling within a decoder.
Regarding colors in .data:
Color 0 means "keep the color from the previous frame". This color should never appear on frame #0.
Color 1 means "show the background color".
All other color values point to a color in .colors - with an offset of 2.
So if in .data there's a color 3, paint this pixel in .colors[1].
.individual_delays contains either 1 or .frame_count delays. They are given in ms and
indicate how long the matching frame should be displayed. If all times are equal, then
it contains only one entry and .individual_delays will be false.
.w and .h contain the dimensions of the image.
**/
typedef struct {
uint8_t *colors;
uint8_t *data;
uint16_t *offsets;
uint16_t *delays;
boolean individual_delays;
int color_count;
int frame_count;
int w;
int h;
} AnimationData;
uint8_t animation_koopa_colors[] PROGMEM = {182, 154, 17, 0, 0, 0, 48, 48, 48, 142, 4, 6, 254, 252, 255, 3, 1, 138, 17, 239, 18};
uint8_t animation_koopa_data[] PROGMEM = {
255, 4, 1, 6, 255, 14, 1, 6, 6, 6, 255, 12, 1, 2, 6, 6, 6, 255, 11, 1, 2, 2, 3, 6, 6, 2, 255, 10, 1, 2, 2, 3, 6, 6, 2, 1, 1, 8, 8, 8, 6, 1, 1, 1, 2, 3, 2, 6, 6, 2, 2, 1, 8, 3, 8, 8, 3, 6, 1, 1, 255, 7, 2, 1, 8, 8, 3, 3, 8, 8, 6, 1, 2, 2, 2, 4, 2, 2, 4, 8, 8, 3, 8, 8, 3, 8, 6, 1, 2, 2, 4, 2, 2, 2, 7, 8, 3, 255, 4, 8, 3, 8, 1, 1, 1, 255, 4, 2, 7, 3, 8, 3, 8, 8, 3, 8, 3, 2, 1, 1, 1, 2, 2, 2, 7, 8, 8, 8, 3, 3, 8, 8, 8, 255, 5, 1, 2, 2, 7, 7, 8, 3, 8, 8, 3, 8, 7, 7, 1, 1, 1, 255, 4, 5, 7, 7, 255, 4, 8, 7, 7, 1, 1, 1, 5, 5, 5, 4, 2, 2, 255, 6, 7, 2, 255, 6, 1, 255, 4, 2, 1, 5, 5, 5, 2, 2, 255, 6, 1, 2, 2, 2, 255, 4, 1, 2, 2, 2, 1,
255, 4, 0, 1, 255, 14, 0, 1, 0, 1, 255, 12, 0, 1, 255, 14, 0, 1, 0, 6, 0, 0, 1, 255, 18, 0, 255, 4, 1, 0, 0, 0, 1, 2, 0, 3, 0, 6, 0, 0, 1, 8, 0, 0, 6, 1, 0, 0, 0, 3, 0, 6, 6, 255, 4, 0, 3, 8, 8, 3, 6, 1, 255, 4, 0, 2, 0, 0, 2, 1, 0, 8, 3, 3, 8, 255, 5, 0, 2, 4, 0, 0, 4, 0, 8, 3, 0, 0, 3, 8, 6, 0, 2, 2, 4, 255, 4, 0, 8, 3, 8, 0, 0, 8, 3, 8, 1, 0, 0, 2, 255, 4, 0, 3, 0, 3, 8, 8, 3, 0, 3, 2, 0, 0, 0, 2, 0, 0, 0, 8, 0, 8, 3, 3, 8, 0, 8, 1, 0, 0, 0, 1, 2, 2, 7, 0, 8, 3, 0, 0, 3, 8, 0, 7, 0, 0, 255, 4, 1, 5, 7, 0, 255, 4, 8, 0, 7, 255, 6, 0, 5, 0, 0, 255, 6, 7, 255, 6, 0, 5, 5, 0, 0, 2, 2, 0, 5, 5, 0, 0, 2,
255, 4, 0, 6, 255, 14, 0, 6, 0, 6, 255, 12, 0, 2, 255, 14, 0, 2, 0, 3, 0, 0, 2, 255, 25, 0, 2, 3, 0, 6, 0, 2, 255, 11, 0, 2, 0, 2, 2, 255, 17, 0, 1, 255, 11, 0, 1, 1, 0, 0, 1, 255, 9, 0, 255, 4, 1, 255, 14, 0, 1, 1, 255, 14, 0, 2, 255, 35, 0, 2, 255, 14, 0, 2, 255, 14, 0, 2, 2, 0, 0, 1, 1, 0, 1, 1, 255, 3, 0,
255, 73, 0, 8, 8, 8, 6, 255, 11, 0, 8, 3, 0, 0, 3, 6, 255, 11, 0, 8, 3, 3, 8, 8, 6, 255, 4, 0, 4, 0, 0, 4, 8, 0, 3, 8, 8, 3, 255, 5, 0, 4, 2, 0, 0, 7, 0, 3, 8, 0, 0, 8, 3, 8, 0, 0, 0, 2, 2, 0, 0, 0, 3, 8, 3, 0, 0, 3, 8, 3, 2, 0, 0, 0, 2, 0, 0, 0, 8, 0, 8, 3, 3, 8, 0, 8, 1, 0, 0, 1, 1, 0, 0, 0, 7, 0, 3, 8, 8, 3, 0, 7, 7, 255, 4, 0, 1, 1, 2, 0, 7, 8, 0, 0, 8, 7, 0, 1, 255, 4, 0, 2, 2, 0, 2, 0, 255, 4, 7, 0, 2, 255, 4, 0, 2, 2, 0, 0, 5, 5, 1, 1, 2, 2, 2, 5, 5, 255, 4, 0, 1, 1, 5, 5, 5, 255, 4, 0, 255, 3, 5,
255, 4, 0, 1, 255, 14, 0, 1, 0, 1, 255, 12, 0, 1, 255, 14, 0, 1, 0, 6, 0, 0, 1, 255, 18, 0, 255, 4, 1, 0, 0, 0, 1, 2, 0, 3, 0, 6, 0, 0, 1, 8, 0, 0, 6, 1, 0, 0, 0, 3, 0, 6, 6, 255, 4, 0, 3, 8, 8, 3, 6, 1, 255, 4, 0, 2, 0, 0, 2, 1, 0, 8, 3, 3, 8, 255, 5, 0, 2, 4, 0, 0, 4, 0, 8, 3, 0, 0, 3, 8, 6, 0, 2, 2, 4, 255, 4, 0, 8, 3, 8, 0, 0, 8, 3, 8, 1, 0, 0, 2, 255, 4, 0, 3, 0, 3, 8, 8, 3, 0, 3, 2, 0, 0, 0, 2, 0, 0, 0, 8, 0, 8, 3, 3, 8, 0, 8, 8, 255, 4, 0, 2, 2, 7, 0, 8, 3, 0, 0, 3, 8, 0, 7, 255, 4, 0, 1, 1, 0, 7, 0, 255, 4, 8, 0, 7, 255, 4, 0, 1, 0, 0, 0, 2, 255, 6, 7, 2, 255, 4, 0, 255, 4, 2, 255, 4, 0, 2, 2, 2, 0, 0,
255, 4, 0, 6, 255, 14, 0, 6, 0, 6, 255, 12, 0, 2, 255, 14, 0, 2, 0, 3, 0, 0, 2, 255, 25, 0, 2, 3, 0, 6, 0, 2, 255, 11, 0, 2, 0, 2, 2, 255, 17, 0, 1, 255, 11, 0, 1, 1, 0, 0, 1, 255, 9, 0, 255, 4, 1, 255, 14, 0, 1, 1, 255, 14, 0, 2, 255, 12, 0, 1, 255, 36, 0, 1, 255, 10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 2, 2
};
uint16_t animation_koopa_delays[] = {100, 100, 100, 100, 100, 100};
uint16_t animation_koopa_offsets[] = {0, 199, 390, 479, 640, 832, 926};
AnimationData animation_koopa = {&animation_koopa_colors[0], &animation_koopa_data[0], &animation_koopa_offsets[0], &animation_koopa_delays[0], false, 7, 6, 16, 16};
uint8_t animation_couple_rain_colors[] PROGMEM = {0, 0, 0, 2, 139, 218, 181, 171, 255, 255, 255, 255, 255, 76, 11, 220, 206, 180, 49, 49, 49, 21, 1, 175, 100, 27, 0, 81, 66, 37, 51, 25, 253, 46, 12, 0, 218, 2, 86, 37, 175, 253, 128, 104, 60};
uint8_t animation_couple_rain_data[] PROGMEM = {
255, 6, 2, 3, 255, 7, 2, 3, 255, 14, 2, 3, 255, 8, 2, 3, 255, 7, 2, 3, 255, 14, 2, 3, 255, 25, 2, 3, 255, 5, 2, 3, 255, 12, 2, 3, 255, 12, 2, 3, 255, 18, 2, 3, 255, 12, 2, 3, 255, 18, 2, 3, 255, 12, 2, 3, 255, 18, 2, 3, 255, 12, 2, 3, 255, 10, 2, 3, 255, 7, 2, 3, 255, 23, 2, 3, 255, 11, 2, 3, 255, 19, 2, 3, 255, 11, 2, 3, 255, 15, 2, 3, 2, 2, 2, 3, 255, 11, 2, 3, 255, 5, 2, 15, 255, 9, 2, 3, 2, 2, 2, 3, 255, 11, 2, 3, 2, 2, 2, 3, 255, 11, 2, 3, 255, 15, 2, 3, 5, 2, 15, 3, 255, 7, 2, 3, 2, 2, 2, 3, 255, 8, 2, 3, 255, 4, 2, 255, 7, 5, 255, 7, 2, 3, 2, 2, 2, 3, 255, 8, 2, 3, 2, 2, 2, 5, 5, 12, 12, 5, 12, 12, 5, 5, 255, 6, 2, 3, 255, 12, 2, 3, 2, 2, 5, 5, 12, 12, 5, 5, 5, 12, 12, 5, 5, 255, 5, 2, 3, 255, 12, 2, 3, 2, 4, 4, 9, 9, 12, 5, 5, 5, 12, 9, 9, 4, 4, 255, 4, 2, 3, 255, 8, 2, 3, 2, 2, 2, 3, 2, 4, 4, 9, 9, 9, 4, 4, 4, 9, 9, 9, 4, 4, 255, 13, 2, 3, 255, 11, 2, 9, 255, 6, 2, 3, 255, 12, 2, 3, 255, 7, 2, 6, 6, 6, 2, 9, 255, 6, 2, 3, 255, 12, 2, 3, 255, 7, 2, 6, 6, 6, 2, 9, 2, 10, 10, 10, 2, 2, 3, 255, 12, 2, 3, 255, 7, 2, 10, 10, 10, 2, 9, 255, 5, 10, 2, 3, 255, 19, 2, 255, 5, 6, 12, 10, 7, 7, 7, 10, 2, 3, 255, 6, 2, 3, 255, 13, 2, 11, 7, 11, 2, 12, 10, 11, 7, 11, 10, 255, 8, 2, 3, 255, 13, 2, 7, 7, 7, 2, 7, 10, 7, 7, 7, 10, 255, 8, 2, 3, 255, 6, 2, 3, 255, 6, 2, 255, 5, 6, 13, 13, 16, 13, 13, 255, 8, 2, 3, 255, 6, 2, 3, 255, 5, 2, 255, 4, 6, 2, 2, 2, 14, 14, 14, 255, 9, 2, 3, 255, 6, 2, 3, 255, 5, 2, 7, 10, 10, 10, 2, 2, 7, 14, 14, 14, 7, 255, 15, 2, 3, 255, 6, 2, 6, 6, 6, 2, 2, 255, 5, 14, 2, 2, 2, 15, 255, 11, 2, 3, 255, 6, 2, 6, 2, 6, 2, 2, 2, 7, 2, 7, 255, 6, 2, 15, 255, 15, 2, 8, 8, 2, 8, 8, 2, 2, 8, 2, 8, 255, 6, 2, 3, 255, 37, 2,
255, 19, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 21, 0, 2, 15, 255, 8, 0, 2, 255, 14, 0, 15, 0, 0, 0, 15, 2, 255, 15, 0, 3, 255, 14, 0, 2, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 50, 0, 15, 255, 5, 0, 3, 255, 5, 0, 15, 255, 20, 0, 2, 0, 15, 0, 0, 3, 255, 7, 0, 15, 255, 20, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 37, 0,
255, 6, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 15, 0, 2, 15, 0, 15, 0, 0, 0, 2, 0, 3, 255, 18, 0, 3, 0, 0, 2, 2, 0, 0, 2, 255, 4, 0, 15, 255, 7, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 11, 0, 15, 0, 2, 255, 18, 0, 2, 0, 0, 15, 255, 8, 0, 2, 2, 0, 15, 255, 19, 0, 2, 255, 10, 0, 2, 255, 23, 0, 3, 255, 31, 0, 3, 255, 34, 0,
0, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 255, 18, 0, 15, 255, 26, 0, 15, 2, 0, 0, 2, 0, 2, 255, 16, 0, 2, 255, 19, 0, 2, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 255, 19, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 23, 0, 15, 0, 2, 0, 0, 0, 15, 2, 3, 255, 18, 0, 3, 0, 0, 0, 2, 0, 0, 2, 255, 8, 0, 2, 15, 255, 14, 0, 3, 255, 5, 0, 15, 255, 7, 0, 2, 255, 25, 0, 15, 255, 5, 0, 2, 255, 59, 0,
255, 10, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 2, 15, 255, 5, 0, 2, 255, 5, 0, 3, 255, 12, 0, 15, 2, 255, 17, 0, 3, 255, 45, 0, 15, 255, 22, 0, 2, 255, 6, 0, 15, 255, 13, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 255, 12, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 36, 0, 2, 255, 5, 0, 2, 255, 26, 0, 15, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 2, 2, 15, 255, 4, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 2, 255, 23, 0, 3, 255, 41, 0,
0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 29, 0, 2, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 15, 255, 4, 0, 2, 255, 14, 0, 3, 0, 0, 15, 2, 0, 15, 0, 3, 255, 8, 0, 2, 255, 5, 0, 3, 255, 12, 0, 15, 2, 255, 17, 0, 3, 255, 10, 0, 15, 2, 255, 56, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 36, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 15, 255, 11, 0, 3, 255, 14, 0, 2, 255, 5, 0, 2, 0, 0, 15, 255, 4, 0, 15, 255, 25, 0, 2, 0, 0, 0, 15, 255, 20, 0, 15, 255, 11, 0, 3, 255, 25, 0, 2, 255, 34, 0,
255, 6, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 14, 0, 2, 255, 31, 0, 2, 255, 20, 0, 2, 3, 255, 21, 0, 2, 15, 0, 2, 15, 255, 5, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 0, 2, 0, 2, 255, 12, 0, 2, 255, 5, 0, 3, 255, 9, 0, 15, 0, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 12, 0, 2, 255, 22, 0, 3, 255, 31, 0, 3, 255, 28, 0, 2, 255, 7, 0, 2, 15, 255, 21, 0, 3, 255, 4, 0, 2, 0, 15, 0, 2, 2, 0, 0, 3, 255, 14, 0, 2, 0, 15, 0, 3, 255, 7, 0, 2, 255, 4, 0, 3, 255, 14, 0, 15, 2, 255, 72, 0,
255, 23, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 0, 0, 0, 15, 0, 15, 0, 2, 15, 255, 13, 0, 2, 255, 12, 0, 2, 0, 0, 2, 255, 15, 0, 2, 255, 21, 0, 3, 255, 31, 0, 3, 255, 18, 0, 3, 2, 255, 15, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 255, 23, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 10, 0, 15, 0, 2, 255, 22, 0, 3, 255, 5, 0, 2, 255, 20, 0, 15, 255, 4, 0, 3, 0, 15, 2, 255, 4, 0, 15, 255, 15, 0, 15, 0, 2, 255, 10, 0, 2, 255, 4, 0, 15, 255, 13, 0, 2, 0, 0, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 37, 0,
255, 16, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 7, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 2, 255, 7, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 7, 0, 2, 255, 12, 0, 3, 255, 10, 0, 2, 255, 7, 0, 2, 255, 5, 0, 15, 255, 8, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 35, 0, 3, 0, 0, 2, 255, 20, 0, 2, 255, 7, 0, 3, 0, 0, 15, 0, 2, 255, 14, 0, 15, 0, 0, 2, 2, 255, 5, 0, 2, 255, 5, 0, 2, 15, 255, 14, 0, 2, 255, 7, 0, 3, 255, 9, 0, 2, 255, 16, 0, 15, 255, 4, 0, 3, 255, 65, 0,
0, 0, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 7, 0, 15, 2, 0, 15, 255, 12, 0, 3, 255, 16, 0, 2, 2, 255, 6, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 38, 0, 2, 255, 31, 0, 2, 255, 5, 0, 15, 2, 0, 15, 255, 14, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 255, 16, 0, 15, 0, 2, 0, 0, 15, 255, 4, 0, 3, 255, 4, 0, 2, 255, 17, 0, 2, 2, 15, 0, 0, 0, 15, 255, 7, 0, 2, 255, 22, 0, 3, 255, 33, 0,
255, 11, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 10, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 14, 0, 15, 255, 5, 0, 3, 0, 0, 0, 2, 255, 22, 0, 2, 0, 0, 2, 15, 3, 255, 18, 0, 3, 255, 31, 0, 3, 255, 8, 0, 2, 255, 14, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 4, 0, 15, 255, 15, 0, 3, 255, 12, 0, 2, 0, 0, 2, 255, 21, 0, 15, 2, 255, 4, 0, 15, 255, 19, 0, 15, 2, 0, 0, 0, 15, 2, 2, 15, 0, 15, 255, 25, 0, 2, 0, 0, 0, 2, 0, 0, 3, 255, 23, 0, 2, 255, 37, 0,
255, 17, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 2, 255, 5, 0, 15, 2, 255, 12, 0, 3, 0, 0, 0, 2, 255, 13, 0, 3, 255, 5, 0, 2, 255, 4, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 8, 0, 15, 255, 11, 0, 3, 0, 0, 0, 2, 255, 13, 0, 15, 255, 13, 0, 3, 255, 18, 0, 3, 255, 55, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 41, 0, 2, 255, 20, 0, 15, 255, 5, 0, 2, 15, 255, 19, 0, 3, 255, 5, 0, 2, 0, 0, 0, 15, 2, 2, 255, 19, 0, 3, 255, 4, 0, 2, 15, 0, 2, 0, 2, 255, 28, 0, 2, 255, 31, 0, 2, 255, 33, 0,
0, 0, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 17, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 24, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 0, 0, 0, 2, 0, 15, 255, 4, 0, 15, 255, 20, 0, 3, 0, 15, 0, 2, 2, 255, 4, 0, 3, 255, 13, 0, 3, 0, 0, 0, 2, 255, 6, 0, 2, 255, 17, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 72, 0, 3, 255, 16, 0, 2, 255, 14, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 6, 0, 15, 255, 22, 0, 15, 2, 3, 0, 0, 15, 0, 0, 2, 255, 29, 0, 2, 255, 27, 0, 2, 255, 4, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 20, 0, 3, 255, 40, 0,
0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 15, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 9, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 16, 0, 15, 2, 0, 15, 0, 0, 3, 255, 8, 0, 2, 255, 13, 0, 2, 15, 0, 0, 0, 2, 255, 5, 0, 2, 255, 15, 0, 15, 2, 255, 14, 0, 2, 255, 14, 0, 3, 0, 0, 0, 15, 255, 27, 0, 3, 0, 0, 0, 2, 255, 19, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 70, 0, 2, 15, 3, 255, 16, 0, 2, 0, 0, 0, 2, 255, 4, 0, 2, 255, 5, 0, 3, 255, 16, 0, 2, 15, 255, 4, 0, 3, 255, 31, 0, 3, 255, 24, 0, 15, 255, 73, 0,
255, 14, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 15, 255, 12, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 8, 0, 2, 0, 0, 2, 15, 255, 7, 0, 3, 255, 10, 0, 2, 255, 6, 0, 2, 0, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 8, 0, 2, 0, 0, 15, 255, 5, 0, 2, 255, 4, 0, 3, 255, 8, 0, 2, 255, 11, 0, 2, 255, 12, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 7, 0, 2, 255, 19, 0, 15, 255, 30, 0, 2, 255, 13, 0, 3, 255, 15, 0, 15, 2, 255, 14, 0, 3, 255, 15, 0, 2, 2, 255, 5, 0, 3, 255, 31, 0, 3, 255, 34, 0,
255, 7, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 23, 0, 15, 2, 255, 6, 0, 2, 255, 21, 0, 3, 255, 7, 0, 2, 255, 15, 0, 3, 255, 7, 0, 3, 255, 8, 0, 15, 255, 6, 0, 3, 255, 7, 0, 3, 0, 0, 2, 0, 0, 0, 2, 255, 16, 0, 3, 255, 10, 0, 2, 255, 14, 0, 3, 255, 8, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 18, 0, 2, 15, 0, 0, 2, 255, 24, 0, 15, 255, 6, 0, 2, 255, 24, 0, 2, 255, 16, 0, 15, 255, 20, 0, 15, 255, 9, 0, 3, 255, 16, 0, 2, 255, 40, 0,
0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 255, 30, 0, 2, 2, 255, 21, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 255, 8, 0, 15, 255, 6, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 14, 0, 3, 255, 8, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 74, 0, 3, 255, 23, 0, 2, 3, 255, 6, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 4, 0, 3, 255, 9, 0, 15, 2, 15, 255, 19, 0, 15, 0, 2, 255, 9, 0, 2, 255, 20, 0, 2, 15, 255, 66, 0,
255, 10, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 15, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 13, 0, 3, 255, 9, 0, 2, 255, 21, 0, 3, 0, 0, 15, 2, 255, 30, 0, 2, 2, 15, 255, 44, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 27, 0, 3, 255, 44, 0, 15, 0, 0, 15, 255, 26, 0, 3, 0, 0, 2, 0, 2, 255, 18, 0, 15, 3, 0, 15, 255, 4, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 2, 255, 8, 0, 2, 255, 22, 0, 2, 255, 34, 0,
255, 4, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 15, 0, 2, 0, 0, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 0, 0, 0, 2, 255, 6, 0, 15, 0, 15, 255, 9, 0, 3, 255, 4, 0, 2, 255, 7, 0, 2, 255, 8, 0, 2, 0, 0, 15, 0, 0, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 18, 0, 2, 255, 4, 0, 2, 255, 25, 0, 2, 255, 31, 0, 2, 255, 45, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 255, 23, 0, 3, 0, 0, 0, 2, 255, 24, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 5, 0, 15, 255, 14, 0, 3, 0, 0, 0, 2, 255, 7, 0, 15, 2, 0, 0, 2, 255, 15, 0, 3, 255, 5, 0, 15, 255, 27, 0, 15, 2, 0, 0, 2, 255, 5, 0, 15, 255, 24, 0, 15, 255, 5, 0, 3, 255, 24, 0, 3, 255, 36, 0,
255, 29, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 2, 15, 0, 0, 3, 255, 11, 0, 3, 255, 14, 0, 15, 2, 2, 0, 2, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 15, 255, 14, 0, 3, 0, 0, 0, 2, 255, 18, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 14, 0, 3, 255, 31, 0, 3, 0, 2, 255, 21, 0, 3, 0, 0, 0, 2, 2, 255, 23, 0, 2, 0, 2, 3, 0, 0, 0, 15, 15, 255, 19, 0, 3, 0, 2, 0, 15, 0, 15, 255, 5, 0, 2, 255, 19, 0, 3, 255, 4, 0, 2, 255, 67, 0,
255, 4, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 11, 0, 15, 255, 6, 0, 3, 255, 12, 0, 2, 255, 8, 0, 15, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 15, 0, 3, 0, 2, 255, 13, 0, 2, 255, 15, 0, 3, 0, 0, 2, 0, 0, 0, 3, 0, 0, 2, 255, 8, 0, 3, 255, 19, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 255, 31, 0, 2, 255, 24, 0, 2, 255, 31, 0, 2, 255, 10, 0, 15, 0, 15, 0, 3, 255, 20, 0, 15, 255, 6, 0, 2, 2, 0, 0, 3, 255, 17, 0, 15, 0, 0, 2, 0, 2, 3, 0, 0, 0, 2, 255, 19, 0, 15, 255, 4, 0, 2, 0, 0, 3, 0, 0, 0, 2, 255, 20, 0, 3, 0, 0, 0, 2, 255, 36, 0,
255, 17, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 15, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 15, 0, 0, 0, 2, 0, 2, 255, 11, 0, 2, 255, 14, 0, 2, 255, 4, 0, 2, 255, 11, 0, 2, 255, 5, 0, 2, 255, 5, 0, 15, 255, 12, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 22, 0, 3, 255, 11, 0, 3, 255, 19, 0, 3, 255, 11, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 23, 0, 2, 0, 0, 0, 15, 255, 23, 0, 15, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 15, 255, 17, 0, 2, 15, 0, 0, 2, 255, 26, 0, 15, 2, 2, 255, 13, 0, 3, 255, 15, 0, 2, 255, 6, 0, 15, 255, 8, 0, 3, 255, 23, 0, 3, 255, 33, 0,
0, 0, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 18, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 0, 0, 0, 15, 2, 255, 10, 0, 2, 255, 15, 0, 3, 0, 15, 0, 2, 255, 30, 0, 2, 15, 255, 6, 0, 2, 255, 11, 0, 2, 255, 19, 0, 15, 255, 11, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 103, 0, 3, 255, 23, 0, 3, 255, 6, 0, 2, 3, 0, 0, 2, 255, 18, 0, 15, 2, 3, 255, 9, 0, 2, 2, 255, 15, 0, 15, 0, 2, 255, 5, 0, 15, 255, 23, 0, 2, 255, 5, 0, 15, 0, 2, 255, 8, 0, 15, 255, 15, 0, 2, 255, 5, 0, 2, 255, 25, 0, 2, 255, 40, 0,
255, 67, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 18, 0, 3, 255, 31, 0, 3, 255, 16, 0, 2, 0, 0, 3, 255, 18, 0, 3, 255, 6, 0, 15, 2, 0, 0, 15, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 0, 0, 0, 2, 255, 6, 0, 15, 255, 4, 0, 2, 255, 15, 0, 3, 0, 0, 0, 2, 255, 6, 0, 2, 255, 31, 0, 2, 255, 11, 0, 2, 255, 19, 0, 2, 15, 255, 10, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 93, 0, 2, 15, 0, 0, 0, 15, 255, 4, 0, 3, 255, 18, 0, 2, 255, 4, 0, 3, 0, 0, 2, 255, 4, 0, 3, 0, 0, 2, 15, 255, 19, 0, 3, 2, 255, 9, 0, 15, 2, 255, 22, 0, 2, 255, 31, 0, 2, 255, 33, 0,
0, 0, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 12, 0, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 31, 0, 2, 255, 5, 0, 15, 255, 12, 0, 3, 255, 13, 0, 2, 0, 0, 0, 2, 255, 5, 0, 15, 255, 7, 0, 3, 255, 12, 0, 15, 255, 6, 0, 3, 0, 0, 0, 2, 255, 14, 0, 3, 255, 12, 0, 3, 255, 8, 0, 2, 255, 9, 0, 3, 255, 5, 0, 3, 255, 12, 0, 15, 0, 0, 2, 255, 15, 0, 3, 255, 11, 0, 2, 255, 30, 0, 2, 255, 11, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 255, 30, 0, 2, 0, 0, 0, 2, 255, 9, 0, 15, 255, 29, 0, 15, 2, 255, 27, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 7, 0, 3, 0, 0, 2, 255, 20, 0, 3, 255, 36, 0,
255, 18, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 19, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 11, 0, 2, 2, 255, 18, 0, 2, 255, 5, 0, 2, 255, 10, 0, 2, 255, 26, 0, 15, 255, 12, 0, 3, 255, 31, 0, 3, 255, 11, 0, 15, 255, 13, 0, 2, 15, 255, 11, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 255, 5, 0, 3, 255, 31, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 0, 15, 255, 21, 0, 2, 0, 0, 3, 255, 4, 0, 15, 255, 4, 0, 2, 255, 17, 0, 15, 2, 255, 10, 0, 2, 255, 29, 0, 15, 255, 23, 0, 15, 255, 67, 0,
255, 7, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 8, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 8, 0, 3, 255, 9, 0, 3, 255, 6, 0, 2, 255, 12, 0, 15, 255, 4, 0, 15, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 5, 0, 2, 255, 5, 0, 2, 15, 255, 18, 0, 2, 0, 0, 0, 15, 0, 2, 15, 255, 29, 0, 2, 2, 255, 13, 0, 2, 255, 4, 0, 3, 255, 27, 0, 15, 0, 0, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 31, 0, 2, 255, 34, 0, 3, 255, 31, 0, 3, 0, 15, 0, 2, 0, 3, 255, 17, 0, 15, 255, 9, 0, 2, 0, 0, 0, 3, 255, 18, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 0, 15, 255, 21, 0, 2, 15, 0, 3, 255, 4, 0, 2, 2, 255, 22, 0, 2, 2, 255, 67, 0,
0, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 51, 0, 15, 255, 24, 0, 3, 255, 6, 0, 2, 0, 3, 0, 15, 2, 0, 0, 15, 255, 10, 0, 2, 255, 5, 0, 3, 255, 8, 0, 15, 255, 4, 0, 2, 255, 4, 0, 3, 255, 6, 0, 2, 255, 9, 0, 15, 2, 0, 0, 2, 255, 5, 0, 2, 255, 4, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 14, 0, 2, 255, 35, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 4, 0, 15, 255, 26, 0, 2, 255, 4, 0, 2, 255, 20, 0, 15, 2, 255, 7, 0, 3, 255, 26, 0, 15, 255, 4, 0, 3, 0, 0, 0, 2, 15, 3, 255, 20, 0, 2, 255, 10, 0, 3, 255, 22, 0, 3, 255, 4, 0, 2, 255, 23, 0, 2, 0, 0, 3, 255, 33, 0,
255, 30, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 0, 0, 2, 255, 11, 0, 2, 255, 23, 0, 2, 0, 0, 0, 2, 15, 255, 23, 0, 15, 3, 15, 255, 21, 0, 3, 0, 0, 15, 2, 255, 4, 0, 3, 255, 16, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 31, 0, 2, 0, 2, 0, 0, 0, 2, 255, 18, 0, 3, 255, 12, 0, 2, 255, 16, 0, 2, 0, 3, 0, 0, 15, 2, 255, 29, 0, 2, 0, 2, 255, 7, 0, 2, 0, 15, 255, 24, 0, 3, 255, 4, 0, 15, 255, 24, 0, 15, 0, 3, 255, 5, 0, 3, 255, 56, 0,
0, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 31, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 31, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 255, 5, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 0, 0, 15, 0, 15, 255, 6, 0, 2, 0, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 0, 0, 0, 2, 0, 2, 255, 8, 0, 2, 255, 15, 0, 2, 255, 60, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 70, 0, 2, 255, 27, 0, 2, 0, 0, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 255, 10, 0, 15, 0, 15, 2, 255, 17, 0, 3, 0, 0, 0, 2, 15, 255, 6, 0, 2, 255, 23, 0, 15, 2, 255, 64, 0,
255, 34, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 31, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 15, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 6, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 255, 6, 0, 3, 255, 15, 0, 3, 255, 13, 0, 15, 255, 17, 0, 3, 255, 10, 0, 15, 2, 0, 2, 255, 5, 0, 3, 255, 16, 0, 2, 255, 8, 0, 2, 15, 255, 4, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 9, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 21, 0, 2, 255, 44, 0, 15, 255, 25, 0, 2, 0, 0, 15, 2, 0, 2, 255, 21, 0, 15, 0, 2, 0, 2, 255, 5, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 8, 0, 2, 255, 18, 0, 3, 0, 0, 0, 2, 255, 33, 0,
255, 10, 0, 2, 255, 18, 0, 3, 255, 68, 0, 2, 255, 20, 0, 3, 255, 10, 0, 2, 255, 7, 0, 3, 0, 0, 0, 2, 255, 8, 0, 3, 255, 18, 0, 3, 0, 0, 0, 2, 255, 15, 0, 2, 255, 31, 0, 2, 255, 19, 0, 2, 255, 15, 0, 3, 255, 8, 0, 15, 255, 6, 0, 2, 255, 7, 0, 2, 255, 7, 0, 3, 255, 4, 0, 2, 255, 4, 0, 2, 0, 3, 255, 11, 0, 2, 255, 12, 0, 2, 0, 2, 255, 4, 0, 15, 255, 15, 0, 3, 255, 14, 0, 2, 255, 5, 0, 15, 255, 10, 0, 3, 255, 19, 0, 3, 255, 16, 0, 2, 255, 22, 0, 3, 255, 8, 0, 2, 0, 0, 0, 3, 255, 14, 0, 2, 0, 0, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 76, 0, 3, 255, 25, 0, 2, 255, 5, 0, 3, 255, 18, 0, 3, 255, 6, 0, 2, 255, 24, 0, 3, 255, 13, 0, 2, 255, 31, 0, 2, 255, 56, 0, 3, 255, 31, 0, 3, 255, 38, 0, 3, 0, 0, 15, 255, 18, 0, 2, 255, 9, 0, 3, 0, 0, 2, 255, 18, 0, 2, 255, 9, 0, 2, 255, 23, 0, 15, 2, 255, 5, 0, 15, 255, 21, 0, 15, 255, 7, 0, 2, 255, 62, 0
};
uint16_t animation_couple_rain_delays[] = {60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60};
uint16_t animation_couple_rain_offsets[] = {0, 475, 718, 961, 1222, 1476, 1734, 2002, 2276, 2528, 2787, 3050, 3304, 3567, 3824, 4106, 4382, 4650, 4916, 5208, 5459, 5731, 5988, 6243, 6497, 6769, 7004, 7263, 7543, 7790, 8035, 8288, 8522};
AnimationData animation_couple_rain = {&animation_couple_rain_colors[0], &animation_couple_rain_data[0], &animation_couple_rain_offsets[0], &animation_couple_rain_delays[0], false, 15, 32, 32, 32};
uint8_t animation_couple_snow_colors[] PROGMEM = {0, 0, 0, 255, 255, 255, 255, 60, 0, 248, 230, 196, 67, 47, 9, 34, 178, 10, 0, 142, 246, 246, 0, 73, 92, 0, 0, 27, 0, 255};
uint8_t animation_couple_snow_data[] PROGMEM = {
2, 3, 255, 39, 2, 3, 255, 14, 2, 3, 255, 11, 2, 3, 255, 10, 2, 3, 255, 45, 2, 3, 255, 24, 2, 3, 255, 47, 2, 3, 255, 6, 2, 3, 255, 36, 2, 3, 255, 10, 2, 3, 255, 4, 2, 3, 255, 21, 2, 3, 255, 16, 2, 3, 255, 84, 2, 3, 255, 20, 2, 3, 255, 18, 2, 3, 255, 7, 2, 3, 255, 40, 2, 3, 255, 42, 2, 3, 255, 25, 2, 3, 255, 12, 2, 3, 255, 9, 2, 3, 255, 27, 2, 3, 255, 8, 2, 3, 255, 6, 2, 3, 2, 2, 2, 3, 255, 9, 2, 5, 2, 2, 2, 5, 255, 25, 2, 4, 4, 4, 2, 2, 2, 9, 9, 9, 255, 22, 2, 255, 5, 4, 2, 255, 5, 9, 255, 4, 2, 3, 255, 16, 2, 255, 5, 4, 2, 9, 10, 10, 5, 9, 255, 16, 2, 3, 255, 4, 2, 4, 6, 5, 6, 4, 2, 9, 6, 5, 6, 9, 255, 12, 2, 3, 255, 9, 2, 5, 5, 5, 2, 2, 10, 5, 5, 5, 10, 255, 7, 2, 3, 255, 14, 2, 7, 7, 7, 2, 2, 2, 11, 11, 11, 255, 22, 2, 4, 4, 7, 4, 4, 2, 9, 9, 11, 9, 255, 4, 2, 3, 255, 17, 2, 4, 4, 7, 4, 4, 9, 9, 9, 11, 9, 9, 255, 8, 2, 3, 2, 2, 2, 3, 255, 8, 2, 5, 8, 8, 8, 2, 5, 2, 9, 9, 9, 5, 255, 18, 2, 3, 2, 2, 2, 8, 2, 8, 2, 2, 2, 8, 2, 8, 255, 22, 2, 6, 6, 2, 6, 6, 2, 2, 6, 2, 6, 255, 12, 2, 255, 32, 3,
0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 56, 0,
255, 15, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 56, 0,
255, 7, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 255, 34, 0,
0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 255, 34, 0,
0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 39, 0,
255, 12, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 35, 0,
255, 24, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 35, 0,
0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 58, 0,
0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 31, 0, 3, 255, 38, 0,
255, 5, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 53, 0, 2, 255, 38, 0,
255, 11, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 60, 0,
255, 11, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 20, 0, 3, 255, 6, 0, 3, 255, 32, 0,
0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 12, 0, 3, 255, 14, 0, 2, 255, 6, 0, 2, 255, 32, 0,
0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 5, 255, 24, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 18, 0, 3, 255, 35, 0,
255, 9, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 35, 0,
0, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 31, 0, 3, 255, 40, 0,
0, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 31, 0, 3, 255, 16, 0, 2, 255, 40, 0,
255, 23, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 7, 0, 2, 255, 57, 0,
255, 6, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 31, 0, 3, 255, 33, 0,
255, 6, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 33, 0,
255, 19, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 13, 0, 3, 255, 10, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 54, 0,
255, 30, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 26, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 39, 0,
255, 9, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 12, 0, 2, 255, 37, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 4, 0, 2, 255, 21, 0, 2, 255, 4, 0, 3, 255, 34, 0,
0, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 10, 0, 3, 255, 16, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 31, 0, 3, 255, 22, 0, 2, 255, 34, 0,
0, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 19, 0, 2, 255, 11, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 57, 0,
255, 6, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 41, 0,
255, 6, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 5, 0, 5, 255, 8, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 34, 0,
255, 22, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 13, 0, 3, 255, 8, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 11, 0, 3, 255, 24, 0, 2, 255, 34, 0,
255, 22, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 13, 0, 2, 255, 13, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 11, 0, 2, 255, 4, 0, 3, 255, 14, 0, 3, 255, 39, 0,
255, 4, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 17, 0, 3, 0, 0, 3, 255, 10, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 7, 0, 2, 255, 14, 0, 2, 255, 39, 0,
255, 4, 0, 2, 255, 4, 0, 3, 255, 5, 0, 2, 255, 8, 0, 3, 255, 11, 0, 3, 255, 10, 0, 3, 255, 13, 0, 2, 255, 24, 0, 2, 255, 6, 0, 3, 255, 24, 0, 3, 255, 15, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 6, 0, 3, 255, 4, 0, 2, 255, 10, 0, 2, 255, 4, 0, 2, 255, 15, 0, 3, 255, 5, 0, 2, 255, 4, 0, 3, 255, 4, 0, 3, 255, 6, 0, 2, 255, 14, 0, 3, 255, 16, 0, 3, 255, 52, 0, 2, 255, 20, 0, 2, 255, 10, 0, 3, 255, 7, 0, 2, 255, 7, 0, 2, 255, 4, 0, 3, 255, 18, 0, 3, 255, 7, 0, 3, 255, 8, 0, 2, 255, 31, 0, 3, 255, 10, 0, 2, 255, 25, 0, 2, 255, 5, 0, 3, 255, 6, 0, 2, 255, 9, 0, 2, 255, 8, 0, 3, 255, 12, 0, 3, 255, 5, 0, 2, 0, 0, 0, 3, 255, 4, 0, 2, 255, 6, 0, 2, 0, 0, 0, 2, 255, 11, 0, 3, 255, 8, 0, 3, 255, 6, 0, 3, 0, 0, 0, 3, 255, 39, 0, 2, 0, 0, 2, 255, 10, 0, 2, 255, 31, 0, 3, 255, 11, 0, 2, 255, 27, 0, 2, 0, 0, 0, 3, 255, 22, 0, 2, 255, 4, 0, 3, 255, 26, 0, 3, 255, 27, 0, 2, 255, 31, 0, 3, 255, 4, 0, 2, 0, 0, 0, 2, 255, 27, 0, 3, 0, 0, 0, 3, 255, 5, 0, 2, 255, 31, 0, 3, 255, 50, 0, 2, 255, 6, 0, 2, 255, 24, 0, 3, 255, 37, 0
};
uint16_t animation_couple_snow_delays[] = {110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110};
uint16_t animation_couple_snow_offsets[] = {0, 291, 580, 875, 1162, 1443, 1728, 2023, 2310, 2583, 2864, 3151, 3445, 3746, 4035, 4320, 4609, 4905, 5205, 5502, 5803, 6108, 6417, 6722, 7011, 7295, 7583, 7884, 8189, 8486, 8779, 9068, 9354};
AnimationData animation_couple_snow = {&animation_couple_snow_colors[0], &animation_couple_snow_data[0], &animation_couple_snow_offsets[0], &animation_couple_snow_delays[0], false, 10, 32, 32, 32};
uint8_t animation_heart_colors[] PROGMEM = {0, 0, 0, 171, 33, 33, 255, 30, 0, 255, 106, 7};
uint8_t animation_heart_data[] PROGMEM = {
255, 167, 2, 3, 255, 5, 4, 3, 255, 4, 2, 3, 255, 5, 4, 3, 255, 13, 2, 255, 9, 4, 2, 2, 255, 9, 4, 255, 11, 2, 4, 4, 4, 5, 5, 255, 17, 4, 255, 9, 2, 3, 4, 4, 255, 4, 5, 255, 16, 4, 3, 255, 8, 2, 4, 4, 4, 255, 4, 5, 255, 17, 4, 255, 7, 2, 3, 4, 4, 4, 255, 4, 5, 255, 17, 4, 3, 255, 6, 2, 3, 255, 4, 4, 5, 5, 255, 18, 4, 3, 255, 6, 2, 3, 255, 24, 4, 3, 255, 6, 2, 3, 255, 24, 4, 3, 255, 7, 2, 255, 24, 4, 255, 8, 2, 3, 255, 22, 4, 3, 255, 9, 2, 3, 255, 20, 4, 3, 255, 11, 2, 255, 20, 4, 255, 13, 2, 255, 18, 4, 255, 15, 2, 255, 16, 4, 255, 17, 2, 255, 14, 4, 255, 19, 2, 255, 12, 4, 255, 21, 2, 255, 10, 4, 255, 23, 2, 255, 8, 4, 255, 25, 2, 255, 6, 4, 255, 27, 2, 255, 4, 4, 255, 29, 2, 4, 4, 255, 175, 2,
255, 136, 0, 255, 5, 3, 255, 6, 0, 255, 5, 3, 255, 15, 0, 4, 255, 5, 0, 4, 255, 4, 0, 4, 255, 5, 0, 4, 255, 75, 0, 4, 255, 22, 0, 4, 255, 39, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 62, 0, 4, 255, 30, 0, 4, 255, 10, 0, 3, 255, 32, 0, 3, 255, 18, 0, 3, 255, 13, 0, 3, 255, 16, 0, 3, 255, 15, 0, 3, 255, 14, 0, 3, 255, 17, 0, 3, 255, 12, 0, 3, 255, 19, 0, 3, 255, 10, 0, 3, 255, 21, 0, 3, 255, 8, 0, 3, 255, 23, 0, 3, 255, 6, 0, 3, 255, 25, 0, 3, 255, 4, 0, 3, 255, 27, 0, 3, 0, 0, 3, 255, 174, 0,
255, 103, 0, 255, 6, 3, 255, 6, 0, 255, 6, 3, 255, 13, 0, 255, 7, 4, 3, 255, 4, 0, 3, 255, 6, 4, 3, 255, 11, 0, 4, 4, 255, 7, 0, 3, 0, 0, 3, 255, 7, 0, 4, 3, 255, 9, 0, 4, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 3, 255, 8, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 9, 0, 5, 0, 0, 0, 4, 255, 28, 0, 5, 0, 4, 255, 89, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 23, 0, 3, 255, 7, 0, 4, 4, 255, 21, 0, 4, 255, 9, 0, 4, 255, 20, 0, 4, 255, 10, 0, 4, 4, 255, 18, 0, 4, 4, 255, 11, 0, 4, 4, 255, 16, 0, 4, 4, 255, 12, 0, 4, 4, 4, 255, 14, 0, 4, 4, 4, 255, 13, 0, 4, 4, 4, 255, 12, 0, 4, 4, 4, 255, 15, 0, 4, 4, 4, 255, 10, 0, 4, 4, 4, 255, 17, 0, 4, 4, 4, 255, 8, 0, 4, 4, 4, 255, 19, 0, 4, 4, 4, 255, 6, 0, 4, 4, 4, 255, 21, 0, 4, 4, 4, 255, 4, 0, 4, 4, 4, 255, 23, 0, 4, 4, 4, 0, 0, 4, 4, 4, 255, 25, 0, 3, 255, 4, 4, 3, 255, 141, 0,
255, 103, 0, 255, 6, 2, 255, 6, 0, 255, 6, 2, 255, 13, 0, 2, 2, 255, 5, 3, 2, 255, 4, 0, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 2, 255, 7, 0, 2, 0, 0, 2, 255, 7, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 8, 0, 2, 0, 0, 4, 0, 5, 255, 17, 0, 2, 255, 7, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 6, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 9, 0, 4, 0, 0, 0, 5, 255, 28, 0, 4, 0, 5, 255, 89, 0, 2, 255, 24, 0, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 7, 0, 2, 3, 255, 20, 0, 3, 2, 255, 9, 0, 3, 255, 20, 0, 3, 255, 10, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 25, 0, 255, 6, 2, 255, 141, 0,
255, 136, 0, 255, 5, 2, 255, 6, 0, 255, 5, 2, 255, 15, 0, 3, 255, 5, 0, 3, 255, 4, 0, 3, 255, 5, 0, 3, 255, 75, 0, 3, 255, 22, 0, 3, 255, 39, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 104, 0, 2, 255, 20, 0, 2, 255, 11, 0, 2, 255, 18, 0, 2, 255, 13, 0, 2, 255, 16, 0, 2, 255, 15, 0, 2, 255, 14, 0, 2, 255, 17, 0, 2, 255, 12, 0, 2, 255, 19, 0, 2, 255, 10, 0, 2, 255, 21, 0, 2, 255, 8, 0, 2, 255, 23, 0, 2, 255, 6, 0, 2, 255, 25, 0, 2, 255, 4, 0, 2, 255, 27, 0, 2, 0, 0, 2, 255, 174, 0,
255, 135, 0, 3, 255, 5, 4, 3, 255, 4, 0, 3, 255, 5, 4, 3, 255, 13, 0, 3, 4, 255, 5, 0, 4, 3, 0, 0, 3, 4, 255, 5, 0, 4, 3, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 4, 0, 5, 0, 0, 0, 4, 255, 16, 0, 4, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 0, 5, 0, 4, 255, 18, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 3, 4, 255, 20, 0, 4, 3, 255, 9, 0, 4, 255, 20, 0, 4, 255, 11, 0, 4, 255, 18, 0, 4, 255, 12, 0, 3, 4, 255, 16, 0, 4, 3, 255, 13, 0, 3, 4, 255, 14, 0, 4, 3, 255, 15, 0, 3, 4, 255, 12, 0, 4, 3, 255, 17, 0, 3, 4, 255, 10, 0, 4, 3, 255, 19, 0, 3, 4, 255, 8, 0, 4, 3, 255, 21, 0, 3, 4, 255, 6, 0, 4, 3, 255, 23, 0, 3, 4, 255, 4, 0, 4, 3, 255, 26, 0, 4, 0, 0, 4, 255, 29, 0, 3, 3, 255, 143, 0,
255, 135, 0, 255, 7, 2, 255, 4, 0, 255, 7, 2, 255, 13, 0, 2, 2, 255, 6, 3, 2, 0, 0, 2, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 3, 255, 7, 0, 3, 2, 2, 3, 255, 7, 0, 2, 2, 255, 9, 0, 2, 3, 0, 4, 0, 5, 255, 5, 0, 3, 3, 255, 9, 0, 2, 2, 255, 7, 0, 2, 2, 0, 4, 0, 0, 0, 5, 255, 16, 0, 2, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 0, 4, 0, 5, 255, 17, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 7, 0, 2, 2, 255, 20, 0, 2, 2, 255, 9, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 26, 0, 2, 3, 3, 2, 255, 29, 0, 2, 2, 255, 143, 0,
255, 167, 0, 3, 255, 5, 4, 255, 5, 0, 3, 255, 5, 4, 3, 255, 13, 0, 4, 255, 7, 0, 4, 0, 0, 4, 255, 7, 0, 4, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 3, 255, 22, 0, 3, 255, 8, 0, 4, 255, 22, 0, 4, 255, 7, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 4, 255, 22, 0, 4, 255, 8, 0, 3, 255, 22, 0, 3, 255, 9, 0, 3, 255, 20, 0, 3, 255, 11, 0, 4, 255, 18, 0, 4, 255, 13, 0, 4, 255, 16, 0, 4, 255, 15, 0, 4, 255, 14, 0, 4, 255, 17, 0, 4, 255, 12, 0, 4, 255, 19, 0, 4, 255, 10, 0, 4, 255, 21, 0, 4, 255, 8, 0, 4, 255, 23, 0, 4, 255, 6, 0, 4, 255, 25, 0, 4, 255, 4, 0, 4, 255, 27, 0, 4, 0, 0, 4, 255, 29, 0, 4, 4, 255, 175, 0,
255, 136, 0, 255, 5, 3, 255, 6, 0, 255, 5, 3, 255, 15, 0, 4, 255, 5, 0, 4, 255, 4, 0, 4, 255, 5, 0, 4, 255, 75, 0, 4, 255, 22, 0, 4, 255, 39, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 62, 0, 4, 255, 30, 0, 4, 255, 10, 0, 3, 255, 32, 0, 3, 255, 18, 0, 3, 255, 13, 0, 3, 255, 16, 0, 3, 255, 15, 0, 3, 255, 14, 0, 3, 255, 17, 0, 3, 255, 12, 0, 3, 255, 19, 0, 3, 255, 10, 0, 3, 255, 21, 0, 3, 255, 8, 0, 3, 255, 23, 0, 3, 255, 6, 0, 3, 255, 25, 0, 3, 255, 4, 0, 3, 255, 27, 0, 3, 0, 0, 3, 255, 174, 0,
255, 103, 0, 255, 6, 3, 255, 6, 0, 255, 6, 3, 255, 13, 0, 255, 7, 4, 3, 255, 4, 0, 3, 255, 6, 4, 3, 255, 11, 0, 4, 4, 255, 7, 0, 3, 0, 0, 3, 255, 7, 0, 4, 3, 255, 9, 0, 4, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 3, 255, 8, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 9, 0, 5, 0, 0, 0, 4, 255, 28, 0, 5, 0, 4, 255, 89, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 23, 0, 3, 255, 7, 0, 4, 4, 255, 21, 0, 4, 255, 9, 0, 4, 255, 20, 0, 4, 255, 10, 0, 4, 4, 255, 18, 0, 4, 4, 255, 11, 0, 4, 4, 255, 16, 0, 4, 4, 255, 12, 0, 4, 4, 4, 255, 14, 0, 4, 4, 4, 255, 13, 0, 4, 4, 4, 255, 12, 0, 4, 4, 4, 255, 15, 0, 4, 4, 4, 255, 10, 0, 4, 4, 4, 255, 17, 0, 4, 4, 4, 255, 8, 0, 4, 4, 4, 255, 19, 0, 4, 4, 4, 255, 6, 0, 4, 4, 4, 255, 21, 0, 4, 4, 4, 255, 4, 0, 4, 4, 4, 255, 23, 0, 4, 4, 4, 0, 0, 4, 4, 4, 255, 25, 0, 3, 255, 4, 4, 3, 255, 141, 0,
255, 103, 0, 255, 6, 2, 255, 6, 0, 255, 6, 2, 255, 13, 0, 2, 2, 255, 5, 3, 2, 255, 4, 0, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 2, 255, 7, 0, 2, 0, 0, 2, 255, 7, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 9, 0, 2, 2, 255, 8, 0, 2, 0, 0, 4, 0, 5, 255, 17, 0, 2, 255, 7, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 6, 0, 2, 0, 0, 4, 0, 0, 0, 5, 255, 17, 0, 2, 255, 9, 0, 4, 0, 0, 0, 5, 255, 28, 0, 4, 0, 5, 255, 89, 0, 2, 255, 24, 0, 2, 255, 6, 0, 2, 3, 255, 23, 0, 2, 255, 7, 0, 2, 3, 255, 21, 0, 2, 255, 9, 0, 3, 255, 20, 0, 2, 255, 10, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 25, 0, 255, 6, 2, 255, 141, 0,
255, 136, 0, 255, 5, 2, 255, 6, 0, 255, 5, 2, 255, 15, 0, 3, 255, 5, 0, 3, 255, 4, 0, 3, 255, 5, 0, 3, 255, 75, 0, 3, 255, 22, 0, 3, 255, 39, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 6, 0, 3, 255, 24, 0, 3, 255, 62, 0, 3, 255, 30, 0, 3, 255, 10, 0, 2, 255, 32, 0, 2, 255, 18, 0, 2, 255, 13, 0, 2, 255, 16, 0, 2, 255, 15, 0, 2, 255, 14, 0, 2, 255, 17, 0, 2, 255, 12, 0, 2, 255, 19, 0, 2, 255, 10, 0, 2, 255, 21, 0, 2, 255, 8, 0, 2, 255, 23, 0, 2, 255, 6, 0, 2, 255, 25, 0, 2, 255, 4, 0, 2, 255, 27, 0, 2, 0, 0, 2, 255, 174, 0,
255, 135, 0, 3, 255, 5, 4, 3, 255, 4, 0, 3, 255, 5, 4, 3, 255, 13, 0, 3, 4, 255, 5, 0, 4, 3, 0, 0, 3, 4, 255, 5, 0, 4, 3, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 4, 0, 0, 5, 0, 4, 255, 17, 0, 4, 255, 7, 0, 3, 4, 0, 5, 0, 0, 0, 4, 255, 16, 0, 4, 3, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 5, 0, 0, 0, 4, 255, 17, 0, 4, 255, 6, 0, 4, 0, 0, 0, 5, 0, 4, 255, 18, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 4, 255, 24, 0, 4, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 3, 4, 255, 20, 0, 4, 3, 255, 9, 0, 4, 255, 20, 0, 4, 255, 11, 0, 4, 255, 18, 0, 4, 255, 12, 0, 3, 4, 255, 16, 0, 4, 3, 255, 13, 0, 3, 4, 255, 14, 0, 4, 3, 255, 15, 0, 3, 4, 255, 12, 0, 4, 3, 255, 17, 0, 3, 4, 255, 10, 0, 4, 3, 255, 19, 0, 3, 4, 255, 8, 0, 4, 3, 255, 21, 0, 3, 4, 255, 6, 0, 4, 3, 255, 23, 0, 3, 4, 255, 4, 0, 4, 3, 255, 26, 0, 4, 0, 0, 4, 255, 29, 0, 3, 3, 255, 143, 0,
255, 135, 0, 255, 7, 2, 255, 4, 0, 255, 7, 2, 255, 13, 0, 2, 2, 255, 6, 3, 2, 0, 0, 2, 2, 255, 5, 3, 2, 2, 255, 11, 0, 2, 3, 255, 7, 0, 3, 2, 2, 3, 255, 7, 0, 2, 2, 255, 9, 0, 2, 3, 0, 4, 0, 5, 255, 5, 0, 3, 3, 255, 9, 0, 2, 2, 255, 7, 0, 2, 2, 0, 4, 0, 0, 0, 5, 255, 16, 0, 2, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 4, 0, 0, 0, 5, 255, 16, 0, 3, 2, 255, 6, 0, 2, 3, 0, 0, 4, 0, 5, 255, 17, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 3, 255, 22, 0, 3, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 6, 0, 2, 2, 255, 22, 0, 2, 2, 255, 7, 0, 2, 2, 255, 20, 0, 2, 2, 255, 9, 0, 2, 3, 255, 18, 0, 3, 2, 255, 11, 0, 2, 3, 255, 16, 0, 3, 2, 255, 12, 0, 2, 2, 3, 255, 14, 0, 3, 2, 2, 255, 13, 0, 2, 2, 3, 255, 12, 0, 3, 2, 2, 255, 15, 0, 2, 2, 3, 255, 10, 0, 3, 2, 2, 255, 17, 0, 2, 2, 3, 255, 8, 0, 3, 2, 2, 255, 19, 0, 2, 2, 3, 255, 6, 0, 3, 2, 2, 255, 21, 0, 2, 2, 3, 255, 4, 0, 3, 2, 2, 255, 23, 0, 2, 2, 3, 0, 0, 3, 2, 2, 255, 26, 0, 2, 3, 3, 2, 255, 29, 0, 2, 2, 255, 143, 0,
255, 167, 0, 3, 255, 5, 4, 255, 5, 0, 3, 255, 5, 4, 3, 255, 13, 0, 4, 255, 7, 0, 4, 0, 0, 4, 255, 7, 0, 4, 255, 11, 0, 4, 255, 9, 0, 4, 4, 255, 9, 0, 4, 255, 9, 0, 3, 255, 22, 0, 3, 255, 8, 0, 4, 255, 22, 0, 4, 255, 7, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 6, 0, 3, 4, 255, 22, 0, 4, 3, 255, 7, 0, 4, 255, 22, 0, 4, 255, 8, 0, 3, 255, 22, 0, 3, 255, 9, 0, 3, 255, 20, 0, 3, 255, 11, 0, 4, 255, 18, 0, 4, 255, 13, 0, 4, 255, 16, 0, 4, 255, 15, 0, 4, 255, 14, 0, 4, 255, 17, 0, 4, 255, 12, 0, 4, 255, 19, 0, 4, 255, 10, 0, 4, 255, 21, 0, 4, 255, 8, 0, 4, 255, 23, 0, 4, 255, 6, 0, 4, 255, 25, 0, 4, 255, 4, 0, 4, 255, 27, 0, 4, 0, 0, 4, 255, 29, 0, 4, 4, 255, 175, 0
};
uint16_t animation_heart_delays[] = {100, 100, 100, 100, 100, 100, 100, 400, 100, 100, 100, 100, 100, 100, 200};
uint16_t animation_heart_offsets[] = {0, 190, 344, 608, 875, 1025, 1291, 1588, 1790, 1944, 2208, 2473, 2627, 2893, 3190, 3392};
AnimationData animation_heart = {&animation_heart_colors[0], &animation_heart_data[0], &animation_heart_offsets[0], &animation_heart_delays[0], false, 4, 15, 32, 32};

44
src/config.sample.h Normal file
View File

@ -0,0 +1,44 @@
//#define DEBUG
#define WIFI_SSID "....."
#define WIFI_PASS "....."
#define LED_WIDTH 16
#define LED_HEIGHT 16
#define LED_COUNT 256
#define LED_TYPE WS2812B
#define DATA_PIN 14
#define COLOR_ORDER GRB
uint8_t config_brightness = 20; // Can be overwritten via MQTT_TOPIC_BRIGHTNESS
#define NTP_SERVER "pool.ntp.org"
#define NTP_INTERVAL 300000
#define NTP_OFFSET 7200
#define MQTT_ENABLE
#define MQTT_SERVER "....."
#define MQTT_PORT 1883
#define MQTT_USER "pitrix"
#define MQTT_PASS "....."
#define MQTT_TOPIC "pitrix/" // MQTT-Topic to listen to. Must not start with a slash, but must end with one."
#define HOSTNAME "pitrix-%08X"
#define OTA_STARTUP_DELAY 5 // How many seconds to wait at startup. Set to 0 to disable.
#define FPS 50
#define SHOW_TEXT_DELAY 100
#define MONITOR_LOOP_TIMES false
#define MONITOR_LOOP_TIME_THRESHOLD 500
#define MONITOR_LOOP_TIME_COUNT_MAX 10
// Effect config
uint16_t config_effect_cycle_time = 300; // Time in seconds between cycling effects.
uint16_t config_effect_matrix_length_min = 4;
uint16_t config_effect_matrix_length_max = 20;
uint16_t config_effect_matrix_speed_min = 50;
uint16_t config_effect_matrix_speed_max = 135;
uint16_t config_effect_single_dynamic_loop_time = 200;
uint16_t config_effect_multi_dynamic_loop_time = 1400;

432
src/effects.h Normal file
View File

@ -0,0 +1,432 @@
struct EffectEntry {
char* name;
Effect* effect;
};
class Bell : public Effect {
private:
CRGB color_on = CRGB(0xFFFF00);
CRGB color_off = CRGB(0x000000);
boolean invert = false;
public:
void loop() {
Serial.println("This is Bell.loop()");
for (int y = 0; y < 16; y++) {
for (int x = 0; x < 2; x++) {
for (int z = 0; z < 8; z++) {
leds[XYsafe(x * 8 + z, y)] = sprite_bell[y * 2 + x] >> (7 - z) & 1 ^ invert ? color_on : color_off;
}
}
}
EVERY_N_MILLISECONDS(300) {
invert = !invert;
}
}
};
class BigClock : public Effect {
private:
CRGB color_h = CRGB(0xFF0000);
CRGB color_m = CRGB(0x00FF00);
CRGB color_colon = CRGB(0xFFFF00);
void drawNumber(uint8_t number, int x, int y, CRGB color) {
char buffer[7];
sprintf(buffer, "%02d", number);
drawText(buffer, x, y, color);
}
void drawText(char *text, int x, int y, CRGB color) {
for (int i = 0; i < strlen(text); i++) {
drawSprite(font_char(numbers4x7, text[i]), x + i * 4, y, color);
}
}
unsigned char* font_char(unsigned char* font, char c) {
return &font[(c - 48) * 4];
}
void drawSprite(unsigned char* sprite, int xOffset, int yOffset, CRGB color) {
for ( byte y = 0; y < 7; y++) {
for ( byte x = 0; x < 4; x++) {
bool on = (sprite[x] >> y & 1) * 255;
if (on) {
leds[ XYsafe(x + xOffset, y + yOffset) ] = color;
}
}
}
}
public:
BigClock() {}
void loop() {
clear();
drawNumber(ntpClient.getHours(), 0, 0, color_h);
drawNumber(ntpClient.getMinutes(), 8, 0, color_m);
/*if (ntpClient.getSeconds() & 1) {
leds[XYsafe(13, 2)] = color_colon;
leds[XYsafe(13, 5)] = color_colon;
}*/
drawNumber(ntpClient.getSeconds(), 8, 8, color_colon);
}
};
class Clock : public Effect {
private:
Window window = {0, LED_HEIGHT - 6, LED_WIDTH, 6};
public:
Clock() {}
void loop() { loop(false, CRGB(0xFFFFFF), CRGB(0x000000)); }
void loop(boolean invert, CRGB fg_color, CRGB bg_color) {
if (!invert) {
clear(window, bg_color);
} else {
// Manually clear the needed parts
for(int i=0; i<window.w; i++) setPixel(window, i, 0, bg_color);
for(int y=0; y<6; y++) {
setPixel(window, 3, y, bg_color);
if (y!=2 && y!=4) {
setPixel(window, 7, y, bg_color);
}
setPixel(window, 8, y, bg_color);
setPixel(window, 12, y, bg_color);
}
fg_color = bg_color;
}
int h = ntpClient.getHours();
drawDigit(window, numbers3x5, 3, 5, 0, 1, h / 10, fg_color, invert);
drawDigit(window, numbers3x5, 3, 5, 4, 1, h % 10, fg_color, invert);
int m = ntpClient.getMinutes();
drawDigit(window, numbers3x5, 3, 5, 9, 1, m / 10, fg_color, invert);
drawDigit(window, numbers3x5, 3, 5, 13, 1, m % 10, fg_color, invert);
if (ntpClient.getSeconds() & 1) {
setPixel(window, 7, 2, fg_color);
setPixel(window, 7, 4, fg_color);
}
}
};
class Sinematrix3 : public Effect {
private:
double pangle = 0;
double angle = 0;
double sx = 0;
double sy = 0;
double tx = 0;
double ty = 0;
double cx = 0;
double cy = 0;
double rcx = 0;
double rcy = 0;
double angle2 = 0;
double sx2 = 0;
double sy2 = 0;
double tx2 = 0;
double ty2 = 0;
double basecol = 0;
double fx = 1.0 / (LED_WIDTH / PI);
double fy = 1.0 / (LED_HEIGHT / PI);
Matrix rotate;
public:
boolean supports_window = true;
boolean can_be_shown_with_clock() { return true; };
boolean clock_as_mask() { return true; };
Sinematrix3() {}
void loop() {
pangle = addmodpi( pangle, 0.0133 + (angle / 256) );
angle = cos(pangle) * PI;
sx = addmodpi( sx, 0.00673 );
sy = addmodpi( sy, 0.00437 );
tx = addmodpi( tx, 0.00239 );
ty = addmodpi( ty, 0.00293 );
cx = addmodpi( cx, 0.00197 );
cy = addmodpi( cy, 0.00227 );
rcx = (LED_WIDTH / 2) + (sin(cx) * LED_WIDTH);
rcy = (LED_HEIGHT / 2) + (sin(cy) * LED_HEIGHT);
angle2 = addmodpi( angle2, 0.0029 );
sx2 = addmodpi( sx2, 0.0041);
sy2 = addmodpi( sy2, 0.0031);
tx2 = addmodpi( tx2, 0.0011 );
ty2 = addmodpi( ty2, 0.0023 );
basecol = addmod( basecol, 1.0, 0.007 );
rotate = {
.a11 = cos(angle),
.a12 = -sin(angle),
.a21 = sin(angle),
.a22 = cos(angle)
};
Matrix zoom = {
.a11 = sin(sx) / 4.0 + 0.15,
.a12 = 0, //atan(cos(sx2)),
.a21 = 0, //atan(cos(sy2)),
.a22 = cos(sy) / 4.0 + 0.15
};
Vector translate = {
.x1 = sin(tx) * LED_WIDTH,
.x2 = sin(ty) * LED_HEIGHT
};
for ( int x = 0; x < LED_WIDTH; x++ ) {
for ( int y = 0; y < LED_HEIGHT; y++ ) {
Vector c = add(multiply( multiply(rotate, zoom), { .x1 = x - rcx, .x2 = y - rcy } ), translate);
int sat = (basecol + basefield(c.x1, c.x2)) * 255;
setPixel(window, x, y, CHSV(sat, 120, 255));
}
}
}
};
class Static : public Effect {
private:
CRGB color;
public:
Static(CRGB col) {
color = col;
}
boolean supports_window = true;
void loop() {
EVERY_N_SECONDS(1) {
clear(window, color);
}
}
};
class Animation : public Effect {
private:
AnimationData *animation;
int frame = 0;
CRGB background_color;
int xOffset, yOffset;
long frameSince = 0;
public:
Animation(AnimationData *anim) {
Animation(anim, CRGB(0), 0, 0);
}
Animation(AnimationData *anim, CRGB background_color) {
Animation(anim, background_color, 0, 0);
}
Animation(AnimationData *anim, CRGB bg_color, int x, int y) {
animation = anim;
background_color = bg_color;
xOffset = x;
yOffset = y;
}
void loop() {
Serial.printf("Animation.loop. Animation is %p.", (void *)animation);
CRGB colors[animation->color_count];
int led_index = 0;
uint8_t *color_data = new uint8_t[animation->color_count * 3];
memcpy_P(color_data, animation->colors, animation->color_count * 3);
for (int i = 0; i < animation->color_count; i++) colors[i] = CRGB(color_data[i * 3], color_data[i * 3 + 1], color_data[i * 3 + 2]);
free(color_data);
// Data is stored in progmem, so get it from there.
int length = animation->offsets[frame + 1] - animation->offsets[frame];
uint8_t *data = new uint8_t[length];
memcpy_P(data, animation->data + animation->offsets[frame], length);
for (int i = 0; i < length; i++) {
uint8_t color_index;
uint8_t count;
if (data[i] == 255) { // Run-length encoded data
color_index = data[i + 2];
count = data[i + 1];
i += 2;
} else {
color_index = data[i];
count = 1;
}
if (color_index == 0) { // color #0 = skip this pixels
led_index += count;
} else {
CRGB* color;
if (color_index == 1) {
color = &background_color;
} else if (color_index >= 2) {
color = &colors[color_index - 2];
}
for (int j = 0; j < count; j++) set(led_index++, color);
}
}
free(data);
if (frameSince == 0 || frameSince + frameDelay(animation, frame) < millis() || frameSince > millis()) {
frame = (frame + 1) % animation->frame_count;
frameSince = millis();
}
}
void set(int i, CRGB* color) {
setPixel(xOffset + (i % animation->w), yOffset + (i / animation->h), *color);
}
uint16_t frameDelay(AnimationData* animation, int frame) {
if (animation->individual_delays) return animation->delays[frame];
return animation->delays[0];
}
};
class SingleDynamic : public Effect {
protected:
static const int factor = 2;
static const int tile_count = LED_WIDTH/factor * LED_HEIGHT/factor;
virtual int getLoopTime() { return config_effect_single_dynamic_loop_time; }
CRGB tiles[tile_count];
CRGB old_tiles[tile_count];
uint8_t blend = 0;
public:
SingleDynamic() {
for (int i=0; i<tile_count; i++) tiles[i] = CHSV(random8(), 180, 255);
}
virtual void update() {
tiles[random8(tile_count)] = CHSV(random8(), 180, 255);
}
boolean can_be_shown_with_clock() { return true; }
virtual void loop() {
EVERY_N_MILLISECONDS(getLoopTime()) {
memcpy(old_tiles, tiles, tile_count*sizeof(CRGB));
blend = 0;
update();
}
for (int x=0; x<window.w; x++) for (int y=0; y<window.h; y++) {
int index = y/2 * window.w/2 + x/2;
setPixel(window, x, y, nblend(old_tiles[index], tiles[index], blend));
}
if (blend < 255) blend+=20;
}
};
class MultiDynamic : public SingleDynamic {
protected:
int getLoopTime() { return config_effect_multi_dynamic_loop_time; }
public:
void update() {
for (int i=0; i<tile_count; i++) tiles[i] = CHSV(random8(), 180, 255);
}
};
class MatrixColumn {
private:
int x, y;
int length;
Window* window;
int speed;
boolean running;
long last_move = 0;
public:
MatrixColumn() {}
MatrixColumn(Window* win, int xPos) {
window = win;
x = xPos;
start();
y = random8(0, win->h);
}
void start() {
y=-1;
length = random8(config_effect_matrix_length_min, config_effect_matrix_length_max);
running = true;
speed = random8(config_effect_matrix_speed_min, config_effect_matrix_speed_max);
}
void advance() {
y++;
if (y-length > window->h) running = false;
}
void draw() {
for(int i=0; i<length; i++) {
CRGB color;
if (i==0) color=CHSV(85, 0, 192);
else color=CHSV(85, 255, 255/(length-1)*(length-i));
setPixel(*window, x, y-i, color);
}
}
void loop() {
if (!running) {
if (random8() < 20) {
// Start the column again.
start();
}
} else {
if (millis() - last_move > speed) {
advance();
last_move = millis();
}
draw();
}
}
};
class MatrixEffect : public Effect {
private:
MatrixColumn columns[LED_WIDTH];
public:
boolean can_be_shown_with_clock() { return true; };
MatrixEffect() {
for (int i=0; i<LED_WIDTH; i++) columns[i]=MatrixColumn(&window, i);
}
void loop() {
clear(window);
for (int i=0; i<LED_WIDTH; i++) columns[i].loop();
}
};
class CycleEffect : public Effect {
private:
Effect* effect;
long effectSince = 0;
public:
void changeEffect() {
Effect* new_effect;
do {
int new_id = random8(cycle_effects->size());
new_effect = cycle_effects->get(new_id);
} while (&new_effect == &effect);
effect = new_effect;
effectSince = millis();
}
boolean can_be_shown_with_clock() {
return effect->can_be_shown_with_clock();
};
boolean clock_as_mask() {
return effect->clock_as_mask();
};
CycleEffect() {};
void loop() {
if (!effect) changeEffect(); // If this is the first run, we have to select an effect first!
effect->loop();
// Don't use EVERY_N_SECONDS(config_effect_cycle_time) here because that function isn't relly made
// to be used with changing values.
EVERY_N_SECONDS(1) {
if (effectSince + config_effect_cycle_time*1000 < millis()) {
changeEffect();
}
}
}
};
class TwirlEffect : public Effect {
private:
uint8_t angleOffset = 0;
double center_x = 8;
double center_y = 8;
public:
void loop() {
for (int x=0; x<window.w; x++) for (int y=0; y<window.h; y++) {
uint8_t angle = (x==center_x && y==center_y) ? 0 : atan2(y - center_y, x - center_x) / M_PI * 128 + 128 + angleOffset;
uint8_t brightness = sqrt16((center_x - x) * (center_x - x) + (center_y - y) * (center_y - y)) & 0xFF;
setPixel(window, x, y, CHSV(angle, (brightness<<5) & 0xFF, 255));
}
angleOffset += 1;
}
};

4
src/fastled.ino Normal file
View File

@ -0,0 +1,4 @@
void fastled_setup() {
FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, LED_COUNT).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(config_brightness);
}

82
src/functions.h Normal file
View File

@ -0,0 +1,82 @@
int XYsafe(int x, int y) {
if ( x >= LED_WIDTH) return 0;
if ( y >= LED_HEIGHT) return 0;
if ( x < 0) return 0;
if ( y < 0) return 0;
// Invert y
y = LED_HEIGHT - 1 - y;
if (y & 1) x = LED_WIDTH - 1 - x;
// Invert x
//x = LED_WIDTH - 1 - x;
return y*LED_WIDTH+x;
}
void setPixel(int x, int y, CRGB color) {
if ( x >= LED_WIDTH) return;
if ( y >= LED_HEIGHT) return;
if ( x < 0) return;
if ( y < 0) return;
// Invert y
y = LED_HEIGHT - 1 - y;
if (y & 1) x = LED_WIDTH - 1 - x;
// Invert x
//x = LED_WIDTH - 1 - x;
leds[y*LED_WIDTH+x] = color;
}
void setPixel(int i, CRGB color) {
int x = i % LED_WIDTH;
int y = i / LED_WIDTH;
setPixel(x, y, color);
}
void setPixel(Window win, int x, int y, CRGB color) {
if (x >= win.w || y >= win.h || x < 0 || y < 0) return;
setPixel(win.x + x, win.y + y, color);
}
void clear(Window window, CRGB color) {
for ( byte y = 0; y < window.h; y++) {
for ( byte x = 0; x < window.w; x++) {
setPixel(window, x, y, color);
}
}
}
void clear(Window window) {
clear(window, CRGB(0));
}
void clear() {
Window w = {0, 0, LED_WIDTH, LED_HEIGHT};
clear(w);
}
inline double sines(double x, double y) {
return ((cos(x) * sin(y)) * 0.5) + 0.5;
}
inline double basefield(double x, double y) {
return (cos(x) * sin(y) * cos(sqrt((x*x) + (y*y))));
}
inline double addmod(double x, double mod, double delta) {
x = x + delta;
while( x >= mod ) x -= mod;
while( x < 0.0 ) x += mod;
return x;
}
inline double addmodpi(double x, double delta) {
return addmod(x, 2*PI, delta);
}

66
src/mqtt.h Normal file
View File

@ -0,0 +1,66 @@
#ifdef MQTT_ENABLE
PubSubClient mqtt_client(wifi);
long mqtt_last_reconnect_attempt = 0;
void mqtt_callback(char* complete_topic, byte* pl, unsigned int length) {
pl[length] = '\0';
char* payload = (char*)pl;
char* topic = complete_topic + strlen(MQTT_TOPIC); // Strip MQTT_TOPIC from the beginning
// Here, payload is a char* (but has to be casted).
if(strcmp(topic, "mode")==0) {
for (int i=0; i<NUM_EFFECTS; i++) {
EffectEntry* e = &effects[i];
if (strcmp(e->name, payload)==0) {
//Serial.printf("Effect found in mqtt_callback: %p\n", (void *)&e->effect);
current_effect = e->effect;
clear();
return;
}
}
} else if (strcmp(topic, "reboot")==0) {
ESP.restart();
}
long value = atol(payload);
if (strcmp(topic, "brightness")==0 && value > 0 && value <= 255) {
config_brightness = value;
FastLED.setBrightness(config_brightness);
} else if (strcmp(topic, "cycle_time")==0 && value > 0) {
config_effect_cycle_time = value;
}
}
boolean mqtt_connect() {
char client_id[30];
snprintf(client_id, 30, HOSTNAME, ESP.getChipId());
LOG("MQTT * Connecting to MQTT server with client id "); LOGln(client_id);
if (mqtt_client.connect(client_id, MQTT_USER, MQTT_PASS)) {
LOGln("MQTT * Connected.");
mqtt_client.publish(MQTT_TOPIC "status", "ONLINE");
mqtt_client.subscribe(MQTT_TOPIC "+");
}
return mqtt_client.connected();
}
void mqtt_setup() {
mqtt_client.setServer(MQTT_SERVER, MQTT_PORT);
mqtt_client.setCallback(mqtt_callback);
mqtt_last_reconnect_attempt = 0;
}
void mqtt_loop() {
if (!mqtt_client.connected()) {
long now = millis();
if (now - mqtt_last_reconnect_attempt > 5000) {
mqtt_last_reconnect_attempt = now;
if (mqtt_connect()) {
mqtt_last_reconnect_attempt = 0;
}
}
} else {
mqtt_client.loop();
}
}
#endif // MQTT_ENABLE

277
src/ntp.h Normal file
View File

@ -0,0 +1,277 @@
#pragma once
#include "Arduino.h"
#include <Udp.h>
#define SEVENZYYEARS 2208988800UL
#define NTP_PACKET_SIZE 48
#define NTP_DEFAULT_LOCAL_PORT 1337
class NTPClient {
private:
UDP* _udp;
bool _udpSetup = false;
const char* _poolServerName = "pool.ntp.org"; // Default time server
int _port = NTP_DEFAULT_LOCAL_PORT;
long _timeOffset = 0;
unsigned long _updateInterval = 60000; // In ms
unsigned long _currentEpoc = 0; // In s
unsigned long _lastUpdate = 0; // In ms
byte _packetBuffer[NTP_PACKET_SIZE];
void sendNTPPacket();
public:
NTPClient(UDP& udp);
NTPClient(UDP& udp, long timeOffset);
NTPClient(UDP& udp, const char* poolServerName);
NTPClient(UDP& udp, const char* poolServerName, long timeOffset);
NTPClient(UDP& udp, const char* poolServerName, long timeOffset, unsigned long updateInterval);
/**
* Set time server name
*
* @param poolServerName
*/
void setPoolServerName(const char* poolServerName);
/**
* Starts the underlying UDP client with the default local port
*/
void begin();
/**
* Starts the underlying UDP client with the specified local port
*/
void begin(int port);
/**
* This should be called in the main loop of your application. By default an update from the NTP Server is only
* made every 60 seconds. This can be configured in the NTPClient constructor.
*
* @return true on success, false on failure
*/
bool update();
/**
* This will force the update from the NTP Server.
*
* @return true on success, false on failure
*/
bool forceUpdate();
int getDay() const;
int getHours() const;
int getMinutes() const;
int getSeconds() const;
/**
* Changes the time offset. Useful for changing timezones dynamically
*/
void setTimeOffset(int timeOffset);
/**
* Set the update interval to another frequency. E.g. useful when the
* timeOffset should not be set in the constructor
*/
void setUpdateInterval(unsigned long updateInterval);
/**
* @return time formatted like `hh:mm:ss`
*/
String getFormattedTime() const;
/**
* @return time in seconds since Jan. 1, 1970
*/
unsigned long getEpochTime() const;
/**
* Stops the underlying UDP client
*/
void end();
};
/**
* The MIT License (MIT)
* Copyright (c) 2015 by Fabrice Weinberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
NTPClient::NTPClient(UDP& udp) {
this->_udp = &udp;
}
NTPClient::NTPClient(UDP& udp, long timeOffset) {
this->_udp = &udp;
this->_timeOffset = timeOffset;
}
NTPClient::NTPClient(UDP& udp, const char* poolServerName) {
this->_udp = &udp;
this->_poolServerName = poolServerName;
}
NTPClient::NTPClient(UDP& udp, const char* poolServerName, long timeOffset) {
this->_udp = &udp;
this->_timeOffset = timeOffset;
this->_poolServerName = poolServerName;
}
NTPClient::NTPClient(UDP& udp, const char* poolServerName, long timeOffset, unsigned long updateInterval) {
this->_udp = &udp;
this->_timeOffset = timeOffset;
this->_poolServerName = poolServerName;
this->_updateInterval = updateInterval;
}
void NTPClient::begin() {
this->begin(NTP_DEFAULT_LOCAL_PORT);
}
void NTPClient::begin(int port) {
this->_port = port;
this->_udp->begin(this->_port);
this->_udpSetup = true;
}
bool NTPClient::forceUpdate() {
#ifdef DEBUG_NTPClient
Serial.println("Update from NTP Server");
#endif
while(this->_udp->parsePacket() != 0) this->_udp->flush();
this->sendNTPPacket();
// Wait till data is there or timeout...
byte timeout = 0;
int cb = 0;
do {
delay ( 10 );
cb = this->_udp->parsePacket();
if (timeout > 100) return false; // timeout after 1000 ms
timeout++;
} while (cb == 0);
this->_lastUpdate = millis() - (10 * (timeout + 1)); // Account for delay in reading the time
this->_udp->read(this->_packetBuffer, NTP_PACKET_SIZE);
unsigned long highWord = word(this->_packetBuffer[40], this->_packetBuffer[41]);
unsigned long lowWord = word(this->_packetBuffer[42], this->_packetBuffer[43]);
// combine the four bytes (two words) into a long integer
// this is NTP time (seconds since Jan 1 1900):
unsigned long secsSince1900 = highWord << 16 | lowWord;
random16_add_entropy(this->_packetBuffer[44]<<8 | this->_packetBuffer[45]);
random16_add_entropy(this->_packetBuffer[46]<<8 | this->_packetBuffer[47]);
this->_currentEpoc = secsSince1900 - SEVENZYYEARS;
return true;
}
bool NTPClient::update() {
if ((millis() - this->_lastUpdate >= this->_updateInterval) // Update after _updateInterval
|| this->_lastUpdate == 0) { // Update if there was no update yet.
if (!this->_udpSetup) this->begin(); // setup the UDP client if needed
return this->forceUpdate();
}
return true;
}
unsigned long NTPClient::getEpochTime() const {
return this->_timeOffset + // User offset
this->_currentEpoc + // Epoc returned by the NTP server
((millis() - this->_lastUpdate) / 1000); // Time since last update
}
int NTPClient::getDay() const {
return (((this->getEpochTime() / 86400L) + 4 ) % 7); //0 is Sunday
}
int NTPClient::getHours() const {
return ((this->getEpochTime() % 86400L) / 3600);
}
int NTPClient::getMinutes() const {
return ((this->getEpochTime() % 3600) / 60);
}
int NTPClient::getSeconds() const {
return (this->getEpochTime() % 60);
}
String NTPClient::getFormattedTime() const {
unsigned long rawTime = this->getEpochTime();
unsigned long hours = (rawTime % 86400L) / 3600;
String hoursStr = hours < 10 ? "0" + String(hours) : String(hours);
unsigned long minutes = (rawTime % 3600) / 60;
String minuteStr = minutes < 10 ? "0" + String(minutes) : String(minutes);
unsigned long seconds = rawTime % 60;
String secondStr = seconds < 10 ? "0" + String(seconds) : String(seconds);
return hoursStr + ":" + minuteStr + ":" + secondStr;
}
void NTPClient::end() {
this->_udp->stop();
this->_udpSetup = false;
}
void NTPClient::setTimeOffset(int timeOffset) {
this->_timeOffset = timeOffset;
}
void NTPClient::setUpdateInterval(unsigned long updateInterval) {
this->_updateInterval = updateInterval;
}
void NTPClient::setPoolServerName(const char* poolServerName) {
this->_poolServerName = poolServerName;
}
void NTPClient::sendNTPPacket() {
// set all bytes in the buffer to 0
memset(this->_packetBuffer, 0, NTP_PACKET_SIZE);
// Initialize values needed to form NTP request
// (see URL above for details on the packets)
this->_packetBuffer[0] = 0b11100011; // LI, Version, Mode
this->_packetBuffer[1] = 0; // Stratum, or type of clock
this->_packetBuffer[2] = 6; // Polling Interval
this->_packetBuffer[3] = 0xEC; // Peer Clock Precision
// 8 bytes of zero for Root Delay & Root Dispersion
this->_packetBuffer[12] = 49;
this->_packetBuffer[13] = 0x4E;
this->_packetBuffer[14] = 49;
this->_packetBuffer[15] = 52;
// all NTP fields have been given values, now
// you can send a packet requesting a timestamp:
this->_udp->beginPacket(this->_poolServerName, 123); //NTP requests are to port 123
this->_udp->write(this->_packetBuffer, NTP_PACKET_SIZE);
this->_udp->endPacket();
}

35
src/ota.ino Normal file
View File

@ -0,0 +1,35 @@
void ota_setup() {
ArduinoOTA.onStart([]() {
String type;
if (ArduinoOTA.getCommand() == U_FLASH)
type = "sketch";
else // U_SPIFFS
type = "filesystem";
// NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
Serial.println("OTA * Start updating " + type);
});
ArduinoOTA.onEnd([]() {
Serial.println("\nOTA * End");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("OTA * Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("OTA * Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
char client_id[30];
snprintf(client_id, 30, HOSTNAME, ESP.getChipId());
LOG("OTA * Starting OTA with client_id "); LOGln(client_id);
ArduinoOTA.setHostname(client_id);
ArduinoOTA.begin();
}
void ota_loop() {
ArduinoOTA.handle();
}

165
src/pitrix.ino Normal file
View File

@ -0,0 +1,165 @@
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#define FASTLED_INTERNAL
#include "FastLED.h"
#include "SimpleList.h"
#include "ntp.h"
#include "config.h"
CRGB leds[LED_COUNT];
WiFiClient wifi;
WiFiUDP ntpUDP;
NTPClient ntpClient(ntpUDP, NTP_SERVER, NTP_OFFSET, NTP_INTERVAL);
#ifdef DEBUG
#define LOG(x) Serial.print(x);
#define LOGln(x) Serial.println(x);
#else
#define LOG(x) ""
#define LOGln(x) ""
#endif
typedef struct {
uint8_t x;
uint8_t y;
uint8_t w;
uint8_t h;
} Window;
class Effect {
protected:
Window window = {0, 0, LED_WIDTH, LED_HEIGHT}; // Use a full screen window per default.
public:
virtual void loop() = 0;
boolean supports_window = false;
virtual boolean can_be_shown_with_clock() { return false; };
virtual boolean clock_as_mask() { return false; };
void setWindow(Window win) {
window = win;
};
};
#include "functions.h"
#include "text.h"
#include "sprites.h"
#include "animations.h"
#include "tools.h"
SimpleList<Effect*>* cycle_effects;
#include "effects.h"
#define NUM_EFFECTS 12
//EffectEntry effects[NUM_EFFECTS];
Sinematrix3 sinematrix3;
BigClock big_clock;
Clock effect_clock;
Bell bell;
Static off(CRGB(0x000000));
Animation anim_koopa(&animation_koopa, CRGB(0x000000), 0, 0);
Animation anim_couple_rain(&animation_couple_rain, CRGB(0x000000), -8, -16);
SingleDynamic single_dynamic;
MultiDynamic multi_dynamic;
MatrixEffect matrix;
CycleEffect effect_cycle;
TwirlEffect effect_twirl;
EffectEntry effects[NUM_EFFECTS] = {
{"sinematrix3", (Effect *)&sinematrix3},
{"big_clock", (Effect *)&big_clock},
{"clock", (Effect *)&effect_clock},
{"bell", (Effect *)&bell},
{"off", (Effect *)&off},
{"koopa", (Effect *)&anim_koopa},
{"couple_rain", (Effect *)&anim_couple_rain},
{"single_dynamic", (Effect *)&single_dynamic},
{"multi_dynamic", (Effect *)&multi_dynamic},
{"matrix", (Effect *)&matrix},
{"cycle", (Effect *)&effect_cycle},
{"twirl", (Effect *)&effect_twirl},
};
Effect* current_effect = &effect_clock;
#ifdef MQTT_ENABLE
#include <PubSubClient.h>
#include "mqtt.h"
#endif
void setup_cycle_effects() {
LOGln("Core * Setting up cycle_effects");
cycle_effects = new SimpleList<Effect*>();
cycle_effects->add(&sinematrix3);
cycle_effects->add(&single_dynamic);
cycle_effects->add(&multi_dynamic);
cycle_effects->add(&matrix);
}
void setup() {
Serial.begin(74880);
Serial.println("Core * Starting");
setup_cycle_effects();
wifi_setup();
ota_setup();
fastled_setup();
ntpClient.begin();
#ifdef MQTT_ENABLE
mqtt_setup();
#endif
Serial.println("Core * Setup complete");
}
uint8_t starting_up = OTA_STARTUP_DELAY;
int loop_timeouts = 0;
long loop_started_at = 0;
void loop() {
loop_started_at = millis();
ota_loop();
if (starting_up > 0) {
EVERY_N_SECONDS(1) {
Serial.print("Core * Waiting for OTA... "); Serial.println(starting_up);
starting_up--;
clear();
for (int i=0; i<starting_up; i++) {
leds[XYsafe(i, 0)] = CRGB(0xff0000);
}
FastLED.show();
}
return;
}
ntpClient.update();
#ifdef MQTT_ENABLE
mqtt_loop();
#endif
EVERY_N_MILLISECONDS(1000 / FPS) {
Serial.println("Core * loop running");
current_effect->loop();
if (current_effect->can_be_shown_with_clock()) {
effect_clock.loop(current_effect->clock_as_mask(), CRGB(0xFFFFFF), CRGB(0x000000));
}
FastLED.show();
}
if (MONITOR_LOOP_TIMES && millis()-loop_started_at>=MONITOR_LOOP_TIME_THRESHOLD) {
LOG("Core * Loop took "); LOG(millis()-loop_started_at); LOGln("ms.");
loop_timeouts++;
LOG("Core * Timeout counter is now "); LOGln(loop_timeouts);
if (loop_timeouts >= MONITOR_LOOP_TIME_COUNT_MAX) {
ESP.restart();
}
} else if (loop_timeouts > 0) {
loop_timeouts--;
}
}

18
src/sprites.h Normal file
View File

@ -0,0 +1,18 @@
static unsigned char sprite_bell[] = {
0b00000001, 0b10000000,
0b00000010, 0b01000000,
0b00001111, 0b11110000,
0b00010000, 0b00001000,
0b00100000, 0b00100100,
0b00100000, 0b00110100,
0b00100000, 0b00110100,
0b00100000, 0b00110100,
0b00100000, 0b00110100,
0b00100000, 0b00110100,
0b00100000, 0b00000100,
0b01000000, 0b11111010,
0b01000000, 0b00000010,
0b00111111, 0b11111100,
0b00000100, 0b00100000,
0b00000011, 0b11000000
};

148
src/text.h Normal file
View File

@ -0,0 +1,148 @@
static unsigned char font5x7[] = {
0x00, 0x00, 0x00, 0x00, 0x00,// (space)
0x00, 0x00, 0x5F, 0x00, 0x00,// !
0x00, 0x07, 0x00, 0x07, 0x00,// "
0x14, 0x7F, 0x14, 0x7F, 0x14,// #
0x24, 0x2A, 0x7F, 0x2A, 0x12,// $
0x23, 0x13, 0x08, 0x64, 0x62,// %
0x36, 0x49, 0x55, 0x22, 0x50,// &
0x00, 0x05, 0x03, 0x00, 0x00,// '
0x00, 0x1C, 0x22, 0x41, 0x00,// (
0x00, 0x41, 0x22, 0x1C, 0x00,// )
0x08, 0x2A, 0x1C, 0x2A, 0x08,// *
0x08, 0x08, 0x3E, 0x08, 0x08,// +
0x00, 0x50, 0x30, 0x00, 0x00,// ,
0x08, 0x08, 0x08, 0x08, 0x08,// -
0x00, 0x60, 0x60, 0x00, 0x00,// .
0x20, 0x10, 0x08, 0x04, 0x02,// /
0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
0x00, 0x42, 0x7F, 0x40, 0x00,// 1
0x42, 0x61, 0x51, 0x49, 0x46,// 2
0x21, 0x41, 0x45, 0x4B, 0x31,// 3
0x18, 0x14, 0x12, 0x7F, 0x10,// 4
0x27, 0x45, 0x45, 0x45, 0x39,// 5
0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
0x01, 0x71, 0x09, 0x05, 0x03,// 7
0x36, 0x49, 0x49, 0x49, 0x36,// 8
0x06, 0x49, 0x49, 0x29, 0x1E,// 9
0x00, 0x36, 0x36, 0x00, 0x00,// :
0x00, 0x56, 0x36, 0x00, 0x00,// ;
0x00, 0x08, 0x14, 0x22, 0x41,// <
0x14, 0x14, 0x14, 0x14, 0x14,// =
0x41, 0x22, 0x14, 0x08, 0x00,// >
0x02, 0x01, 0x51, 0x09, 0x06,// ?
0x32, 0x49, 0x79, 0x41, 0x3E,// @
0x7E, 0x11, 0x11, 0x11, 0x7E,// A
0x7F, 0x49, 0x49, 0x49, 0x36,// B
0x3E, 0x41, 0x41, 0x41, 0x22,// C
0x7F, 0x41, 0x41, 0x22, 0x1C,// D
0x7F, 0x49, 0x49, 0x49, 0x41,// E
0x7F, 0x09, 0x09, 0x01, 0x01,// F
0x3E, 0x41, 0x41, 0x51, 0x32,// G
0x7F, 0x08, 0x08, 0x08, 0x7F,// H
0x00, 0x41, 0x7F, 0x41, 0x00,// I
0x20, 0x40, 0x41, 0x3F, 0x01,// J
0x7F, 0x08, 0x14, 0x22, 0x41,// K
0x7F, 0x40, 0x40, 0x40, 0x40,// L
0x7F, 0x02, 0x04, 0x02, 0x7F,// M
0x7F, 0x04, 0x08, 0x10, 0x7F,// N
0x3E, 0x41, 0x41, 0x41, 0x3E,// O
0x7F, 0x09, 0x09, 0x09, 0x06,// P
0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
0x7F, 0x09, 0x19, 0x29, 0x46,// R
0x46, 0x49, 0x49, 0x49, 0x31,// S
0x01, 0x01, 0x7F, 0x01, 0x01,// T
0x3F, 0x40, 0x40, 0x40, 0x3F,// U
0x1F, 0x20, 0x40, 0x20, 0x1F,// V
0x7F, 0x20, 0x18, 0x20, 0x7F,// W
0x63, 0x14, 0x08, 0x14, 0x63,// X
0x03, 0x04, 0x78, 0x04, 0x03,// Y
0x61, 0x51, 0x49, 0x45, 0x43,// Z
0x00, 0x00, 0x7F, 0x41, 0x41,// [
0x02, 0x04, 0x08, 0x10, 0x20,// "\"
0x41, 0x41, 0x7F, 0x00, 0x00,// ]
0x04, 0x02, 0x01, 0x02, 0x04,// ^
0x40, 0x40, 0x40, 0x40, 0x40,// _
0x00, 0x01, 0x02, 0x04, 0x00,// `
0x20, 0x54, 0x54, 0x54, 0x78,// a
0x7F, 0x48, 0x44, 0x44, 0x38,// b
0x38, 0x44, 0x44, 0x44, 0x20,// c
0x38, 0x44, 0x44, 0x48, 0x7F,// d
0x38, 0x54, 0x54, 0x54, 0x18,// e
0x08, 0x7E, 0x09, 0x01, 0x02,// f
0x08, 0x14, 0x54, 0x54, 0x3C,// g
0x7F, 0x08, 0x04, 0x04, 0x78,// h
0x00, 0x44, 0x7D, 0x40, 0x00,// i
0x20, 0x40, 0x44, 0x3D, 0x00,// j
0x00, 0x7F, 0x10, 0x28, 0x44,// k
0x00, 0x41, 0x7F, 0x40, 0x00,// l
0x7C, 0x04, 0x18, 0x04, 0x78,// m
0x7C, 0x08, 0x04, 0x04, 0x78,// n
0x38, 0x44, 0x44, 0x44, 0x38,// o
0x7C, 0x14, 0x14, 0x14, 0x08,// p
0x08, 0x14, 0x14, 0x18, 0x7C,// q
0x7C, 0x08, 0x04, 0x04, 0x08,// r
0x48, 0x54, 0x54, 0x54, 0x20,// s
0x04, 0x3F, 0x44, 0x40, 0x20,// t
0x3C, 0x40, 0x40, 0x20, 0x7C,// u
0x1C, 0x20, 0x40, 0x20, 0x1C,// v
0x3C, 0x40, 0x30, 0x40, 0x3C,// w
0x44, 0x28, 0x10, 0x28, 0x44,// x
0x0C, 0x50, 0x50, 0x50, 0x3C,// y
0x44, 0x64, 0x54, 0x4C, 0x44,// z
0x00, 0x08, 0x36, 0x41, 0x00,// {
0x00, 0x00, 0x7F, 0x00, 0x00,// |
0x00, 0x41, 0x36, 0x08, 0x00,// }
0x08, 0x08, 0x2A, 0x1C, 0x08,// ->
0x08, 0x1C, 0x2A, 0x08, 0x08 // <-
};
static unsigned char numbers4x7[] = {
0x3E, 0x51, 0x45, 0x3E,// 0
0x00, 0x42, 0x7F, 0x40,// 1
0x42, 0x61, 0x49, 0x46,// 2
0x21, 0x45, 0x4B, 0x31,// 3
0x18, 0x14, 0x7F, 0x10,// 4
0x27, 0x45, 0x45, 0x39,// 5
0x3C, 0x4A, 0x49, 0x30,// 6
0x01, 0x71, 0x09, 0x05,// 7
0x36, 0x49, 0x49, 0x36,// 8
0x06, 0x49, 0x29, 0x1E // 9
};
static unsigned char numbers3x5[] = {
B01110, B10001, B01110, // 0
B01000, B11111, B00000, // 1
B01001, B10011, B01101, // 2
B10001, B10101, B01010, // 3
B11100, B00100, B11111, // 4
B11101, B10101, B10111, // 5
B01110, B10101, B10110, // 6
B10000, B10011, B11100, // 7
B11111, B10101, B11111, // 8
B11101, B10101, B11111, // 9
};
void drawTextSprite(Window window, unsigned char* sprite, int w, int h, int xPos, int yPos, CRGB color, boolean invert) {
for (byte y=0; y<h; y++) for (byte x=0; x<w; x++) {
bool on = (sprite[x]>>(h-1-y)&1)*255;
if (invert) on = !on;
if (on) setPixel(window, x+xPos, y+yPos, color);
}
}
void drawChar(Window window, unsigned char* font, int w, int h, int x, int y, char c, CRGB color) {
unsigned char* sprite = &font[(c-32)*w];
drawTextSprite(window, sprite, w, h, x, y, color, false);
}
void drawDigit(Window window, unsigned char* font, int w, int h, int x, int y, int digit, CRGB color, boolean invert) {
unsigned char* sprite = &font[digit*w];
drawTextSprite(window, sprite, w, h, x, y, color, invert);
}
void drawText(Window window, char *font, int w, int h, char *text, int x, int y, CRGB color) {
for (int i = 0; i < strlen(text); i++) {
drawChar(window, font5x7, 5, 7, x+i*(w+1), y, text[i], color);
}
}

37
src/tools.h Normal file
View File

@ -0,0 +1,37 @@
typedef struct Vector {
double x1;
double x2;
} Vector;
typedef struct Matrix {
double a11;
double a12;
double a21;
double a22;
} Matrix;
struct Matrix multiply(struct Matrix m1, struct Matrix m2) {
Matrix r = {
.a11 = m1.a11*m2.a11 + m1.a12*m2.a21,
.a12 = m1.a11*m2.a12 + m1.a12*m2.a22,
.a21 = m1.a21*m2.a11 + m1.a22*m2.a21,
.a22 = m1.a21*m2.a12 + m1.a22*m2.a22
};
return r;
};
struct Vector multiply(struct Matrix m, struct Vector v) {
Vector r = {
.x1 = (m.a11*v.x1) + (m.a12*v.x2),
.x2 = (m.a21*v.x1) + (m.a22*v.x2)
};
return r;
}
struct Vector add(struct Vector v1, struct Vector v2) {
Vector r = {
.x1 = v1.x1 + v2.x2,
.x2 = v1.x2 + v2.x2
};
return r;
}

161
src/tools/gif2c.rb Executable file
View File

@ -0,0 +1,161 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'rmagick'
require 'pp'
###
# Converts a gif file to c code to enable displaying animations.
#
# The data format is described in animations.h
###
def compress(data, use_cutoff=true)
cutoff = 3
escape = 255
last = data[0]
result = []
count = 0
data.each do |x|
if x == last
count += 1
end
if x!=last || count==255
if use_cutoff
if count <= cutoff
count.times { result << last }
else
result << escape << count << last
end
else
result << count << last
end
count = 1
last = x
end
end
if use_cutoff
if count < cutoff
count.times { result << last }
else
result << escape << count << last
end
else
result << count << last
end
return result
end
unless ARGV[0] && ARGV[1]
puts "Usage:"
puts "#{$0} <gif_file> <variable_name>"
puts "e.g. '#{$0} mario.gif mario'"
puts
puts "Resulting data format is described in animations.h"
exit 1
end
image_file=ARGV[0]
name=ARGV[1]
frames = Magick::ImageList.new(image_file)
STDERR.puts "Found #{frames.count} frames."
STDERR.puts "Getting delays..."
ticks_per_second = frames.ticks_per_second
times = [] ; frames.each{|f| times << (1000.0 / ticks_per_second * f.delay).round}
individual_frame_times = true
if times.uniq.count==1
individual_frame_times = false
times = times[0, 1]
end
STDERR.print "Getting colors..."
colors = []
frames.each do |frame|
frame.columns.times do |x|
frame.rows.times do |y|
color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)
colors << color
end
end
end
colors = colors.uniq
STDERR.puts " Found #{colors.count} colors."
transparent = colors.select{|c| c.end_with? "00"}
STDERR.puts "#{transparent.count} color(s) being transparent."
# color[0] is "keep the color from the previous frame"
# color[1] is "background color"
colors = (["#00000012", "#00000013"] + (colors - transparent)).uniq
STDERR.puts "Using #{colors.count} colors."
raise "Number of colors has to be 255 or less!" if colors.count>255
STDERR.puts
puts
puts "uint32_t #{name}_colors[] = {#{colors.map{|c| "0x" + c[1, 6]}.join(", ")}};"
p_frame = nil
frames_data = []
times = []
frames.each_with_index do |frame, index|
data = []
if index==0 # first frame
frame.rows.times do |y|
frame.columns.times do |x|
color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)
if transparent.include? color
data << 1
else
data << colors.index(color)
end
end
end
else
frame.rows.times do |y|
frame.columns.times do |x|
color = frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)
p_color = p_frame.pixel_color(x, y).to_color(Magick::AllCompliance, true, 8, true)
if color==p_color
data << 0
elsif transparent.include? color
data << 1
else
data << colors.index(color)
end
end
end
end
time = (1000.0 / ticks_per_second * frame.delay).round
if frame==0 || data.uniq!=[0]
times << time
frames_data << data
else
old_time = times.pop
times << old_time + time
end
p_frame = frame
end
data = frames_data.map{|d| compress(d, true)}
puts "uint8_t #{name}_data[] PROGMEM = {\n #{data.map{|d| d.join(",")}.join(",\n ")}\n};"
puts "uint16_t #{name}_delays[] = {#{times.join(",")}};"
s=0
puts "uint16_t #{name}_offsets[] = {#{(data.map{|d| t=s; s+=d.count; t} + [s]).join(",")}};"
puts "AnimationData #{name} = {&#{name}_colors[0], &#{name}_data[0], &#{name}_offsets[0], &#{name}_delays[0], #{individual_frame_times}, #{colors.count}, #{frames_data.count}, #{frames.first.columns}, #{frames.first.rows}};"
puts
STDERR.puts
STDERR.puts "Space usage:"
STDERR.puts " Colors: %6d bytes." % [s1=colors.count * 4] # colors are 3-bytes, but we have to use uint32_t, which takes up 4 bytes.
STDERR.puts " Data: %6d bytes." % [s2=data.flatten.count]
STDERR.puts " Delays: %6d bytes." % [s5=times.count * 3 + 1]
STDERR.puts " Offsets: %6d bytes." % [s3=data.count * 2]
STDERR.puts " TOTAL: %6d bytes." % [s1+s2+s3+s5]
STDERR.puts "Original size: %6d bytes." % [s4=File.new(image_file).size]
STDERR.puts "Difference: %6d bytes." % [s1+s2+s3+s5 - s4]

13
src/wifi.ino Normal file
View File

@ -0,0 +1,13 @@
void wifi_setup() {
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.println("WiFi * Connection Failed! Rebooting...");
delay(5000);
ESP.restart();
}
Serial.println("WiFi * Ready");
Serial.print("WiFi * IP address: ");
Serial.println(WiFi.localIP());
}