3a04383f14516252068a229a8ee2728d3198e071
[quassel.git] / src / qtui / chatwidget.cpp
1 /***************************************************************************
2  *   Copyright (C) 2005-08 by the Quassel Project                          *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) version 3.                                           *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #include "util.h"
22 #include "chatwidget.h"
23 #include "chatline-old.h"
24 #include "qtui.h"
25 #include "uisettings.h"
26
27 ChatWidget::ChatWidget(QWidget *parent) : QAbstractScrollArea(parent) {
28   //setAutoFillBackground(false);
29   //QPalette palette;
30   //palette.setColor(backgroundRole(), QColor(0, 0, 0, 50));
31   //setPalette(palette);
32   scrollTimer = new QTimer(this);
33   scrollTimer->setSingleShot(false);
34   scrollTimer->setInterval(100);
35   // setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
36   setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
37   setMinimumSize(QSize(20,20));
38   setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
39   setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
40   bottomLine = -1;
41   height = 0;
42   ycoords.append(0);
43   pointerPosition = QPoint(0,0);
44   connect(verticalScrollBar(), SIGNAL(actionTriggered(int)), this, SLOT(scrollBarAction(int)));
45   connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrollBarValChanged(int)));
46 }
47
48 void ChatWidget::init(BufferId id) {
49   bufferId = id;
50   setBackgroundRole(QPalette::Base);
51   setFont(QFont("Fixed"));
52   UiSettings s;
53   QVariant tsDef = s.value("DefaultTimestampColumnWidth", 90);
54   QVariant senderDef = s.value("DefaultSenderColumnWidth", 100);
55   tsWidth = s.value(QString("%1/TimestampColumnWidth").arg(bufferId.toInt()), tsDef).toInt();
56   senderWidth = s.value(QString("%1/SenderColumnWidth").arg(bufferId.toInt()), senderDef).toInt();
57   computePositions();
58   adjustScrollBar();
59   verticalScrollBar()->setValue(verticalScrollBar()->maximum());
60   //verticalScrollBar()->setPageStep(viewport()->height());
61   //verticalScrollBar()->setSingleStep(20);
62   //verticalScrollBar()->setMinimum(0);
63   //verticalScrollBar()->setMaximum((int)height - verticalScrollBar()->pageStep());
64
65   // setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
66   setMouseTracking(true);
67   mouseMode = Normal;
68   selectionMode = NoSelection;
69   connect(scrollTimer, SIGNAL(timeout()), this, SLOT(handleScrollTimer()));
70 }
71
72 ChatWidget::~ChatWidget() {
73   //qDebug() << "destroying chatwidget" << bufferName;
74   //foreach(ChatLine *l, lines) {
75   //  delete l;
76   //}
77   UiSettings s;
78   s.setValue("DefaultTimestampColumnWidth", tsWidth);  // FIXME stupid dirty quicky
79   s.setValue("DefaultSenderColumnWidth", senderWidth);
80   s.setValue(QString("%1/TimestampColumnWidth").arg(bufferId.toInt()), tsWidth);
81   s.setValue(QString("%1/SenderColumnWidth").arg(bufferId.toInt()), senderWidth);
82 }
83
84 QSize ChatWidget::minimumSizeHint() const {
85   return QSize(20, 20);
86 }
87
88 QSize ChatWidget::sizeHint() const {
89   return QSize(400, 100);
90 }
91
92 // QSize ChatWidget::sizeHint() const {
93 //   //qDebug() << size();
94 //   return size();
95 // }
96
97 void ChatWidget::adjustScrollBar() {
98   verticalScrollBar()->setPageStep(viewport()->height());
99   verticalScrollBar()->setSingleStep(20);
100   verticalScrollBar()->setMinimum(0);
101   verticalScrollBar()->setMaximum((int)height - verticalScrollBar()->pageStep());
102   //qDebug() << height << viewport()->height() << verticalScrollBar()->pageStep();
103   //if(bottomLine < 0) {
104   //  verticalScrollBar()->setValue(verticalScrollBar()->maximum());
105   //} else {
106     //int bot = verticalScrollBar()->value() + viewport()->height(); //qDebug() << bottomLine;
107     //verticalScrollBar()->setValue(qMax(0, (int)ycoords[bottomLine+1] - viewport()->height()));
108   //}
109 }
110
111 void ChatWidget::scrollBarValChanged(int /*val*/) {
112   /*
113   if(val >= verticalScrollBar()->maximum()) bottomLine = -1;
114   else {
115     int bot = val + viewport()->height();
116     int line = yToLineIdx(bot);
117     //bottomLine = line;
118   }
119   */
120 }
121
122 void ChatWidget::scrollBarAction(int action) {
123   switch(action) {
124     case QScrollBar::SliderSingleStepAdd:
125       // More elaborate. But what with loooong lines?
126       // verticalScrollBar()->setValue((int)ycoords[yToLineIdx(verticalScrollBar()->value() + viewport()->height()) + 1] - viewport()->height());
127       break;
128     case QScrollBar::SliderSingleStepSub:
129       //verticalScrollBar()->setValue((int)ycoords[yToLineIdx(verticalScrollBar()->value())]);
130       break;
131
132   }
133
134 }
135
136 void ChatWidget::handleScrollTimer() {
137   if(mouseMode == MarkText || mouseMode == MarkLines) {
138     if(pointerPosition.y() > viewport()->height()) {
139       verticalScrollBar()->setValue(verticalScrollBar()->value() + pointerPosition.y() - viewport()->height());
140       handleMouseMoveEvent(QPoint(pointerPosition.x(), viewport()->height()));
141     } else if(pointerPosition.y() < 0) {
142       verticalScrollBar()->setValue(verticalScrollBar()->value() + pointerPosition.y());
143       handleMouseMoveEvent(QPoint(pointerPosition.x(), 0));
144     }
145   }
146 }
147
148 void ChatWidget::ensureVisible(int line) {
149   int top = verticalScrollBar()->value();
150   int bot = top + viewport()->height();
151   if(ycoords[line+1] > bot) {
152     verticalScrollBar()->setValue(qMax(0, (int)ycoords[line+1] - viewport()->height()));
153   } else if(ycoords[line] < top) {
154     verticalScrollBar()->setValue((int)ycoords[line]);
155   }
156
157 }
158
159 void ChatWidget::clear() {
160   //contents->clear();
161 }
162
163 void ChatWidget::prependMsg(AbstractUiMsg *msg) {
164   ChatLine *line = dynamic_cast<ChatLine*>(msg);
165   Q_ASSERT(line);
166   prependChatLine(line);
167 }
168
169 void ChatWidget::prependChatLine(ChatLine *line) {
170   qreal h = line->layout(tsWidth, senderWidth, textWidth);
171   for(int i = 1; i < ycoords.count(); i++) ycoords[i] += h;
172   ycoords.insert(1, h);
173   lines.prepend(line);
174   height += h;
175   // Fix all variables containing line numbers
176   dragStartLine ++;
177   curLine ++;
178   selectionStart ++; selectionEnd ++;
179   adjustScrollBar();
180   verticalScrollBar()->setValue(verticalScrollBar()->value() + (int)h);
181   viewport()->update();
182 }
183
184 void ChatWidget::prependChatLines(QList<ChatLine *> clist) {
185   QList<qreal> tmpy; tmpy.append(0);
186   qreal h = 0;
187   foreach(ChatLine *l, clist) {
188     h += l->layout(tsWidth, senderWidth, textWidth);
189     tmpy.append(h);
190   }
191   ycoords.removeFirst();
192   for(int i = 0; i < ycoords.count(); i++) ycoords[i] += h;
193   ycoords = tmpy + ycoords;
194   lines = clist + lines;
195   height += h;
196   // Fix all variables containing line numbers
197   int i = clist.count();
198   dragStartLine += i;
199   curLine += i;
200   selectionStart += i; selectionEnd += i; //? selectionEnd += i;
201   //if(bottomLine >= 0) bottomLine += i;
202   adjustScrollBar();
203   //verticalScrollBar()->setPageStep(viewport()->height());
204   //verticalScrollBar()->setSingleStep(20);
205   //verticalScrollBar()->setMaximum((int)height - verticalScrollBar()->pageStep());
206   verticalScrollBar()->setValue(verticalScrollBar()->value() + (int)h);
207   viewport()->update();
208 }
209
210 void ChatWidget::appendMsg(AbstractUiMsg *msg) {
211   ChatLine *line = dynamic_cast<ChatLine*>(msg);
212   Q_ASSERT(line);
213   appendChatLine(line);
214 }
215
216 void ChatWidget::appendChatLine(ChatLine *line) {
217   qreal h = line->layout(tsWidth, senderWidth, textWidth);
218   ycoords.append(h + ycoords[ycoords.count() - 1]);
219   height += h;
220   bool flg = (verticalScrollBar()->value() == verticalScrollBar()->maximum());
221   adjustScrollBar();
222   if(flg) verticalScrollBar()->setValue(verticalScrollBar()->maximum());
223   lines.append(line);
224   viewport()->update();
225 }
226
227
228 void ChatWidget::appendChatLines(QList<ChatLine *> list) {
229   foreach(ChatLine *line, list) {
230     qreal h = line->layout(tsWidth, senderWidth, textWidth);
231     ycoords.append(h + ycoords[ycoords.count() - 1]);
232     height += h;
233     lines.append(line);
234   }
235   bool flg = (verticalScrollBar()->value() == verticalScrollBar()->maximum());
236   adjustScrollBar();
237   if(flg) verticalScrollBar()->setValue(verticalScrollBar()->maximum());
238   viewport()->update();
239 }
240
241 void ChatWidget::setContents(QList<ChatLine *> list) {
242   ycoords.clear();
243   ycoords.append(0);
244   height = 0;
245   lines.clear();
246   appendChatLines(list);
247 }
248
249 //!\brief Computes the different x position vars for given tsWidth and senderWidth.
250 void ChatWidget::computePositions() {
251   senderX = tsWidth + QtUi::style()->sepTsSender();
252   textX = senderX + senderWidth + QtUi::style()->sepSenderText();
253   tsGrabPos = tsWidth + (int)QtUi::style()->sepTsSender()/2;
254   senderGrabPos = senderX + senderWidth + (int)QtUi::style()->sepSenderText()/2;
255   textWidth = viewport()->size().width() - textX;
256 }
257
258 void ChatWidget::resizeEvent(QResizeEvent *event) {
259   //qDebug() << bufferName << isVisible() << event->size() << event->oldSize();
260   /*if(event->oldSize().isValid())*/
261   //contents->setWidth(event->size().width());
262   //setAlignment(Qt::AlignBottom);
263   if(event->size() != event->oldSize()) {
264     computePositions();
265     layout();
266   }
267   //adjustScrollBar();
268   //qDebug() << viewport()->size() << viewport()->height();
269   //QAbstractScrollArea::resizeEvent(event);
270   //qDebug() << viewport()->size() << viewport()->geometry();
271 }
272
273 void ChatWidget::paintEvent(QPaintEvent *event) {
274   QPainter painter(viewport());
275
276   //qDebug() <<  verticalScrollBar()->value();
277   painter.translate(0, -verticalScrollBar()->value());
278   int top = event->rect().top() + verticalScrollBar()->value();
279   int bot = top + event->rect().height();
280   int idx = yToLineIdx(top);
281   if(idx < 0) return;
282   for(int i = idx; i < lines.count() ; i++) {
283     lines[i]->draw(&painter, QPointF(0, ycoords[i]));
284     if(ycoords[i+1] > bot) return;
285   }
286 }
287
288 //!\brief Layout the widget.
289 void ChatWidget::layout() {
290   // TODO fix scrollbars
291   //int botLine = yToLineIdx(verticalScrollBar()->value() + 
292   for(int i = 0; i < lines.count(); i++) {
293     qreal h = lines[i]->layout(tsWidth, senderWidth, textWidth);
294     ycoords[i+1] = h + ycoords[i];
295   }
296   height = ycoords[ycoords.count()-1];
297   adjustScrollBar();
298   verticalScrollBar()->setValue(verticalScrollBar()->maximum());
299   viewport()->update();
300 }
301
302 int ChatWidget::yToLineIdx(qreal y) {
303   if(y >= ycoords[ycoords.count()-1]) return ycoords.count()-2;
304   if(ycoords.count() <= 1) return 0;
305   int uidx = 0;
306   int oidx = ycoords.count() - 1;
307   int idx;
308   while(1) {
309     if(uidx == oidx - 1) return uidx;
310     idx = (uidx + oidx) / 2;
311     if(ycoords[idx] > y) oidx = idx;
312     else uidx = idx;
313   }
314 }
315
316 void ChatWidget::mousePressEvent(QMouseEvent *event) {
317   if(lines.isEmpty()) return;
318   QPoint pos = event->pos() + QPoint(0, verticalScrollBar()->value());
319   if(event->button() == Qt::LeftButton) {
320     dragStartPos = pos;
321     dragStartMode = Normal;
322     switch(mouseMode) {
323       case Normal:
324         if(mousePos == OverTsSep) {
325           dragStartMode = DragTsSep;
326           setCursor(Qt::ClosedHandCursor);
327         } else if(mousePos == OverTextSep) {
328           dragStartMode = DragTextSep;
329           setCursor(Qt::ClosedHandCursor);
330         } else {
331           dragStartLine = yToLineIdx(pos.y());
332           dragStartCursor = lines[dragStartLine]->posToCursor(QPointF(pos.x(), pos.y()-ycoords[dragStartLine]));
333         }
334         mouseMode = Pressed;
335         break;
336       default:
337         break;
338     }
339   }
340 }
341
342 void ChatWidget::mouseDoubleClickEvent(QMouseEvent *event) {
343   // dirty and fast hack to make http:// urls klickable
344   if(lines.isEmpty())
345     return;
346
347   QPoint pos = event->pos() + QPoint(0, verticalScrollBar()->value());
348   int x = pos.x();
349   int y = pos.y();
350   int l = yToLineIdx(y);
351   if(lines.count() <= l)
352     return;
353
354   ChatLine *line = lines[l];
355   QString text = line->text();
356   int cursorAt = qMax(0, line->posToCursor(QPointF(x, y - ycoords[l])) - 1);
357
358   int start = 0;
359   if(cursorAt > 0) {
360     for(int i = cursorAt; i > 0; i--) {
361       if(text[i] == ' ') {
362         start = i + 1;
363         break;
364       }
365     }
366   }
367
368   int end = text.indexOf(" ", start);
369   int len = -1;
370   if(end != -1) {
371     len = end - start;
372   }
373   QString word = text.mid(start, len);
374   if(word.startsWith("http://")) {
375     QDesktopServices::openUrl(QUrl(word));
376   }
377   
378 }
379
380 void ChatWidget::mouseReleaseEvent(QMouseEvent *event) {
381   //QPoint pos = event->pos() + QPoint(0, verticalScrollBar()->value());
382
383   if(event->button() == Qt::LeftButton) {
384     dragStartPos = QPoint();
385     if(mousePos == OverTsSep || mousePos == OverTextSep) setCursor(Qt::OpenHandCursor);
386     else setCursor(Qt::ArrowCursor);
387
388     switch(mouseMode) {
389       case Pressed:
390         mouseMode = Normal;
391         clearSelection();
392         break;
393       case MarkText:
394         mouseMode = Normal;
395         selectionMode = TextSelected;
396         selectionLine = dragStartLine;
397         selectionStart = qMin(dragStartCursor, curCursor);
398         selectionEnd = qMax(dragStartCursor, curCursor);
399         // TODO Make X11SelectionMode configurable!
400         QApplication::clipboard()->setText(selectionToString());
401         break;
402       case MarkLines:
403         mouseMode = Normal;
404         selectionMode = LinesSelected;
405         selectionStart = qMin(dragStartLine, curLine);
406         selectionEnd = qMax(dragStartLine, curLine);
407         // TODO Make X11SelectionMode configurable!
408         QApplication::clipboard()->setText(selectionToString());
409         break;
410       default:
411         mouseMode = Normal;
412     }
413   }
414 }
415
416 //!\brief React to mouse movements over the ChatWidget.
417 /** This is called by Qt whenever the mouse moves. Here we have to do most of the mouse handling,
418  * such as changing column widths, marking text or initiating drag & drop.
419  */
420 void ChatWidget::mouseMoveEvent(QMouseEvent *event) {
421   QPoint pos = event->pos(); pointerPosition = pos;
422   // Scroll if mouse pointer leaves widget while dragging
423   if((mouseMode == MarkText || mouseMode == MarkLines) && (pos.y() > viewport()->height() || pos.y() < 0)) {
424     if(!scrollTimer->isActive()) {
425       scrollTimer->start();
426     }
427   } else {
428     if(scrollTimer->isActive()) {
429       scrollTimer->stop();
430     }
431   }
432   handleMouseMoveEvent(pos);
433 }
434
435 void ChatWidget::handleMouseMoveEvent(const QPoint &_pos) {
436   // FIXME
437   if(lines.count() <= 0) return;
438   // Set some basic properties of the current position
439   QPoint pos = _pos + QPoint(0, verticalScrollBar()->value());
440   int x = pos.x();
441   int y = pos.y();
442   //MousePos oldpos = mousePos;
443   if(x >= tsGrabPos - 3 && x <= tsGrabPos + 3) mousePos = OverTsSep;
444   else if(x >= senderGrabPos - 3 && x <= senderGrabPos + 3) mousePos = OverTextSep;
445   else mousePos = None;
446
447   // Pass 1: Do whatever we can before switching mouse mode (if at all).
448   switch(mouseMode) {
449     // No special mode. Set mouse cursor if appropriate.
450     case Normal:
451     {
452       //if(oldpos != mousePos) {
453       if(mousePos == OverTsSep || mousePos == OverTextSep) setCursor(Qt::OpenHandCursor);
454       else {
455         int l = yToLineIdx(y);
456         int c = lines[l]->posToCursor(QPointF(x, y - ycoords[l]));
457         if(c >= 0 && lines[l]->isUrl(c)) {
458           setCursor(Qt::PointingHandCursor);
459         } else {
460           setCursor(Qt::ArrowCursor);
461         }
462       }
463     }
464       break;
465     // Left button pressed. Might initiate marking or drag & drop if we moved past the drag distance.
466     case Pressed:
467       if(!dragStartPos.isNull() && (dragStartPos - pos).manhattanLength() >= QApplication::startDragDistance()) {
468         // Moving a column separator?
469         if(dragStartMode == DragTsSep) mouseMode = DragTsSep;
470         else if(dragStartMode == DragTextSep) mouseMode = DragTextSep;
471         // Nope. Check if we are over a selection to start drag & drop.
472         else if(dragStartMode == Normal) {
473           bool dragdrop = false;
474           if(selectionMode == TextSelected) {
475             int l = yToLineIdx(y);
476             if(selectionLine == l) {
477               int p = lines[l]->posToCursor(QPointF(x, y - ycoords[l]));
478               if(p >= selectionStart && p <= selectionEnd) dragdrop = true;
479             }
480           } else if(selectionMode == LinesSelected) {
481             int l = yToLineIdx(y);
482             if(l >= selectionStart && l <= selectionEnd) dragdrop = true;
483           }
484           // Ok, so just start drag & drop if appropriate.
485           if(dragdrop) {
486             QDrag *drag = new QDrag(this);
487             QMimeData *mimeData = new QMimeData;
488             mimeData->setText(selectionToString());
489             drag->setMimeData(mimeData);
490             drag->start();
491             mouseMode = Normal;
492           // Otherwise, clear the selection and start text marking!
493           } else {
494             setCursor(Qt::ArrowCursor);
495             clearSelection();
496             if(dragStartCursor < 0) { mouseMode = MarkLines; curLine = -1; }
497             else mouseMode = MarkText;
498           }
499         }
500       }
501       break;
502     case DragTsSep:
503       break;
504     case DragTextSep:
505       break;
506     default:
507       break;
508   }
509   // Pass 2: Some mouse modes need work after being set...
510   if(mouseMode == DragTsSep && x < size().width() - QtUi::style()->sepSenderText() - senderWidth - 10) {
511     // Drag first column separator
512     int foo = QtUi::style()->sepTsSender()/2;
513     tsWidth = qMax(x, foo) - foo;
514     computePositions();
515     layout();
516   } else if(mouseMode == DragTextSep && x < size().width() - 10) {
517     // Drag second column separator
518     int foo = tsWidth + QtUi::style()->sepTsSender() + QtUi::style()->sepSenderText()/2;
519     senderWidth = qMax(x, foo) - foo;
520     computePositions();
521     layout();
522   } else if(mouseMode == MarkText) {
523     // Change currently marked text
524     curLine = yToLineIdx(y);
525     int c = lines[curLine]->posToCursor(QPointF(x, y - ycoords[curLine]));
526     if(curLine == dragStartLine && c >= 0) {
527       if(c != curCursor) {
528         curCursor = c;
529         lines[curLine]->setSelection(ChatLine::Partial, dragStartCursor, c);
530         viewport()->update();
531       }
532     } else {
533       mouseMode = MarkLines;
534       selectionStart = qMin(curLine, dragStartLine); selectionEnd = qMax(curLine, dragStartLine);
535       for(int i = selectionStart; i <= selectionEnd; i++) lines[i]->setSelection(ChatLine::Full);
536       viewport()->update();
537     }
538   } else if(mouseMode == MarkLines) {
539     // Line marking
540     int l = yToLineIdx(y);
541     if(l != curLine) {
542       selectionStart = qMin(l, dragStartLine); selectionEnd = qMax(l, dragStartLine);
543       if(curLine < 0) {
544         Q_ASSERT(selectionStart == selectionEnd);
545         lines[l]->setSelection(ChatLine::Full);
546       } else {
547         if(curLine < selectionStart) {
548           for(int i = curLine; i < selectionStart; i++) lines[i]->setSelection(ChatLine::None);
549         } else if(curLine > selectionEnd) {
550           for(int i = selectionEnd+1; i <= curLine; i++) lines[i]->setSelection(ChatLine::None);
551         } else if(selectionStart < curLine && l < curLine) {
552           for(int i = selectionStart; i < curLine; i++) lines[i]->setSelection(ChatLine::Full);
553         } else if(curLine < selectionEnd && l > curLine) {
554           for(int i = curLine+1; i <= selectionEnd; i++) lines[i]->setSelection(ChatLine::Full);
555         }
556       }
557       curLine = l;
558       //ensureVisible(l);
559       viewport()->update();
560     }
561   }
562 }
563
564 //!\brief Clear current text selection.
565 void ChatWidget::clearSelection() {
566   if(selectionMode == TextSelected) {
567     lines[selectionLine]->setSelection(ChatLine::None);
568   } else if(selectionMode == LinesSelected) {
569     for(int i = selectionStart; i <= selectionEnd; i++) {
570       lines[i]->setSelection(ChatLine::None);
571     }
572   }
573   selectionMode = NoSelection;
574   viewport()->update();
575 }
576
577 //!\brief Convert current selection to human-readable string.
578 QString ChatWidget::selectionToString() {
579   //TODO Make selection format configurable!
580   if(selectionMode == NoSelection) return "";
581   if(selectionMode == LinesSelected) {
582     QString result;
583     for(int l = selectionStart; l <= selectionEnd; l++) {
584       result += QString("[%1] %2 %3\n").arg(lines[l]->timestamp().toLocalTime().toString("hh:mm:ss"))
585   .        arg(lines[l]->sender()).arg(lines[l]->text());
586     }
587     return result;
588   }
589   // selectionMode == TextSelected
590   return lines[selectionLine]->text().mid(selectionStart, selectionEnd - selectionStart);
591 }
592