From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: Question about scrolling behavior (succesfully continuous scroll in doc-view) Date: Fri, 29 Apr 2022 16:46:21 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000c5e3ce05ddcc1b9a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37108"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 29 16:52:39 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nkRz3-0009Us-RU for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 16:52:38 +0200 Original-Received: from localhost ([::1]:45420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkRz2-0001Lo-PH for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Apr 2022 10:52:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkRtH-0008Na-Fd for emacs-devel@gnu.org; Fri, 29 Apr 2022 10:46:42 -0400 Original-Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]:39340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkRtC-0000bp-NZ for emacs-devel@gnu.org; Fri, 29 Apr 2022 10:46:37 -0400 Original-Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-2f83983782fso87648697b3.6 for ; Fri, 29 Apr 2022 07:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=pm4PLbNdr80TrueH/9PTy5fZpKrAjLgtWctzkYSbOs0=; b=QOxr/PMv0mjWvxaKb4aXlERBcB3VXZzYpT4PCerr6khPUbGpFLm0NKr2ocmAriHrt/ dYdFUsn3W8NpTw2NIffO6Z2uRhT3w+2V4iCnL8e7EnIGVtWsWBFs/iGIX13Eno6lwyiv t7gJQvrOCtkqtmSYkkmvH626pXzz6yeTp9SOH0WvlG/luDvBOjjVqEcQAVAdnP9aeErN VtS29MekpwStbmwaSvgudf/xdEGGC639qlQ/HGhZV6qO6RyA5g5AtVyUbC4AMlQQULau FSC8AE/m9eS+JyjqRnE2Lh3sfJSqSTyf9FSCciipeIidK1jr/LMHpVzk8D+au+8EkHWN 5jCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=pm4PLbNdr80TrueH/9PTy5fZpKrAjLgtWctzkYSbOs0=; b=1IQ7Nl7ySTvh071SN/XynpS0WSXcdBjlUvptnXhi04dx8hzJ+LqN6VEFFPhwXOiYrY 7SU6PrygKx/OBJO/QmB4hFx7aL+lVFXLI4PrqUDiZsCVHcgBul3ehFlhtxmpaN7YyDOL tUXj8vspEFYU6d701Psn8sv+SbgIsZxblZPmgIKzX/n8GrAee1ZWffa13GK+M8HNIjkC iCWLTRNk37kvvLPK5A1sFZSOUd62JfN8kIDlESe0hUIRkkupVbcZ5/Ye3WHBVonL0pK1 EeEvQhHIEL8Xqu8Yb+Tt2RDeMboFdM+/J5QqAkLZlK82mc/v74GOXKrdHtZGa02SmFyz 69YA== X-Gm-Message-State: AOAM5322nrtuYWbpXEciUxvYYHEfqWka+59tDeQrZ28DMWZhinuSLHlA 3VdvqdZTDpbqAuW0HAPcvbI9Pp0hai9qV/UYqxxql+kbXjM= X-Google-Smtp-Source: ABdhPJz5k0wSvi9ojrn4CP+HEa8a7c6chjqR6i4UjtvXbruZ5pzYxdNj0uwEtrks50QOsn0h+IcemWFsiV+cPJkaZ70= X-Received: by 2002:a81:6d0c:0:b0:2f8:1ba3:64f8 with SMTP id i12-20020a816d0c000000b002f81ba364f8mr21794687ywc.228.1651243592549; Fri, 29 Apr 2022 07:46:32 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1135; envelope-from=dalanicolai@gmail.com; helo=mail-yw1-x1135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288996 Archived-At: --000000000000c5e3ce05ddcc1b9a Content-Type: multipart/alternative; boundary="000000000000c5e3cc05ddcc1b98" --000000000000c5e3cc05ddcc1b98 Content-Type: text/plain; charset="UTF-8" Never mind about the first issue, it was due to a little mistake. I'll attach the corrected version here. For some reason the 'corrected' version refuses to scroll initially (when using emacs -Q, it scrolls correctly immediately on Spacemacs), but after a jump to some page, the scrolling can be tested. I find now that there is a small bug when scrolling forward (when using emacs -Q, the bug does not 'show' on Spacemacs). The second issue mentioned above stays relevant. Anyway, I think it looks quite nice. On Fri, 29 Apr 2022 at 12:47, dalanicolai wrote: > As I realized that implementing continuous scrolling in doc-view, with the > condition that it is only > available after all pages have been converted, would not be much work, I > have implemented it in > doc-view now. > > However, I have two questions: > > 1. The scrolling works perfectly fine on Spacemacs, but when using `emacs > -Q`, > then scrolling forward does not go smoothly, but it makes 'larger' jumps > instead. > Scrolling up works perfectly fine though. > > So as it works alright on Spacemacs, I am quite sure this is due to some > simple scrolling configuration setting. I am hoping that you might have an > idea what configuration variable is > responsible. On Spacemacs scrolling forward looks as smooth as scrolling > backward. > > 2. The second question I have asked already yesterday. It can be found > here > . > > You can simply test the continuous scrolling by first loading > `image-roll.el` and then load `doc-view.el` (both attached here). Then open > some document (pdf or djvu; epub works fine also, but > for some reason it does not scroll smoothly and makes jumps instead). > Now wait until ALL pages have been converted (you can see the counter in > the mode line), and > when done, then activate `doc-view-continuous-scroll-minor-mode`. > > Use the arrows to scroll down (not smooth) and up (smooth). My question is > if you know why > starting form emacs -Q, scroling down does not go smoothly (while it does > on Spacemacs). > > I have not yet implemented the required logic for 'deactivation' of the > minor mode. > Also, I have not yet taken care of the edge cases (scrolling to first and > last page). > --000000000000c5e3cc05ddcc1b98 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Never mind about the first issue, it was due to a lit= tle mistake. I'll attach the corrected version here.
For some= reason the 'corrected' version refuses to scroll initially (when u= sing emacs -Q, it scrolls
correctly immediately on Spacemacs)= , but after a jump to some page, the scrolling
can be tested. I f= ind now that there is a small bug when scrolling forward (when using emacs = -Q,
the bug does not 'show' on Spacemacs).
=
The second issue mentioned above stays relevant.
<= br>
Anyway, I think it looks quite nice.

On Fri, 29 Apr = 2022 at 12:47, dalanicolai <dal= anicolai@gmail.com> wrote:
As I realized that implementing con= tinuous scrolling in doc-view, with the condition that it is only
available after all pages have been converted, would not be much work, I h= ave implemented it in
doc-view now.

Howe= ver, I have two questions:

1. The scrolling works = perfectly fine on Spacemacs, but when using `emacs -Q`,
then scro= lling forward does not go smoothly, but it makes 'larger' jumps ins= tead.
Scrolling up works perfectly fine though.

So as it works alright on Spacemacs, I am quite sure this is due to= some simple scrolling configuration setting. I am hoping that you might ha= ve an idea what configuration variable is
responsible. On Spacema= cs scrolling forward looks as smooth as scrolling backward.

<= /div>
2. The second question I have asked already yesterday. It can be = found here.

You can si= mply test the continuous scrolling by first loading `image-roll.el` and the= n load `doc-view.el` (both attached here). Then open some document (pdf or = djvu; epub works fine also, but
for some reason it does not scrol= l smoothly and makes jumps instead).
Now wait until ALL pages hav= e been converted (you can see the counter in the mode line), and
= when done, then activate `doc-view-continuous-scroll-minor-mode`.

Use the arrows to scroll down (not smooth) and up (smooth).= My question is if you know why
starting form emacs -Q, scroling = down does not go smoothly (while it does on Spacemacs).

I have not yet implemented the required logic for 'deactivation&#= 39; of the minor mode.
Also, I have not yet taken care of the edg= e cases (scrolling to first and last page).
--000000000000c5e3cc05ddcc1b98-- --000000000000c5e3ce05ddcc1b9a Content-Type: text/x-emacs-lisp; charset="US-ASCII"; name="image-roll.el" Content-Disposition: attachment; filename="image-roll.el" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l2kjsbtb0 OzsgLSotIGxleGljYWwtYmluZGluZzogdDsgLSotCgoocmVxdWlyZSAnaW1hZ2UtbW9kZSkKKHJl cXVpcmUgJ3N2ZykKCihkZWZncm91cCBpbWFnZS1yb2xsIG5pbAogICJJbWFnZSByb2xsIGNvbmZp Z3VyYXRpb25zLiIpCgooZGVmY3VzdG9tIGltYWdlLXJvbGwtdmVydGljYWwtbWFyZ2luIDIKICAi UGFnZSBnYXAgaGVpZ2h0LiIKICA6dHlwZSAnaW50ZWdlcikKCihkZWZjdXN0b20gaW1hZ2Utcm9s bC1zdGVwLXNpemUKICA1MAogIDs7IChsYW1iZGEgKCkKICA7OyAgIChsZXQqICgobyAoaW1hZ2Ut cm9sbC1wYWdlLW92ZXJsYXkpKQogIDs7ICAgICA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dlcy1mdW5jdGlvbikKICAgICAgICAgICAgICAgICAgICAgaW1hZ2Utcm9sbC1kZW1v LW51bWJlci1vZi1wYWdlcykpCiAgICAgICAgICAgICh3aW4gKGNhciB3aW5wcm9wcykpCiAgICAg ICAgICAgIChpbmhpYml0LXJlYWQtb25seSB0KSkKCiAgICAgICAgKGVyYXNlLWJ1ZmZlcikKCiAg ICAgICAgOzsgaGVyZSB3ZSBvbmx5IGFkZCB0aGUgJ3BhZ2UnIGFuZCAnd2luZG93JyBvdmVybGF5 LXByb3BlcnRpZXMsIHdlIGFkZAogICAgICAgIDs7IG1vcmUgcHJvcGVydGllcy9pbmZvcm1hdGlv biBhcyBzb29uIGFzIGl0IGJlY29tZXMgYXZhaWxhYmxlIGluIHRoZQogICAgICAgIDs7ICdpbWFn ZS1yb2xsLWRpc3BsYXknIGZ1bmN0aW9uCiAgICAgICAgKGRvdGltZXMgKGkgcGFnZXMpCiAgICAg ICAgICAobGV0ICgoaSAoMSsgaSkpKQogICAgICAgICAgICAoaW5zZXJ0ICIgIikKICAgICAgICAg ICAgKGxldCAoKHBvIChtYWtlLW92ZXJsYXkgKDEtIChwb2ludCkpIChwb2ludCkpKSkKICAgICAg ICAgICAgICAob3ZlcmxheS1wdXQgcG8gJ3BhZ2UgIGkpCiAgICAgICAgICAgICAgKG92ZXJsYXkt cHV0IHBvICd3aW5kb3cgd2luKQogICAgICAgICAgICAgIChwdXNoIHBvIG92ZXJsYXlzKSkKICAg ICAgICAgICAgKGluc2VydCAiXG4iKSkpCiAgICAgICAgKGRlbGV0ZS1jaGFyIC0xKQogICAgICAg IChpbWFnZS1tb2RlLXdpbmRvdy1wdXQgJ292ZXJsYXlzIChucmV2ZXJzZSBvdmVybGF5cykpCiAg ICAgICAgKHNldC1idWZmZXItbW9kaWZpZWQtcCBuaWwpCgogICAgICAgIDs7IHdlIG11c3QgcHV0 IHRoZSBjdXJzb3IgYXQgdGhlIGBwb2ludC1taW4nIGZvciB0aGUgdnNjcm9sbAog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QpCgogIDs7IEJld2FyZTogdGhpcyBjYWxsIHRv IGltYWdlLW1vZGUtd2lucHJvcHMgY2FuJ3QgYmUgb3B0aW1pemVkIGF3YXksIGJlY2F1c2UKICA7 OyBpdCBub3Qgb25seSBnZXRzIHRoZSB3aW5wcm9wcyBkYXRhIGJ1dCBzZXRzIGl0IHVwIGlmIG5l ZWRlZCAoZS5nLiBpdCdzIHVzZWQKICA7OyBieSBkb2MtdmlldyB0byBkaXNwbGF5IHRoZSBpbWFn ZSBpbiBhIG5ldyB3aW5kb3cpLgogIChpbWFnZS1tb2RlLXdpbnByb3BzIG5pbCB0KQoKICA7OyAo bGV0KiAoKHBhZ2VzIGltYWdlLXJvbGwtZGVtby1udW1iZXItb2YtcGFnZXMpCiAgOzsgKGxldCog KChwYWdlcyAocGRmLWNhY2hlLW51bWJlci1vZi1wYWdlcykpCiAgKGxldCogKChwYWdlcyAoaWYg aW1hZ2Utcm9sbC1udW1iZXItb2YtcGFnZXMtZnVuY3Rpb24KICAgICAgICAgICAgICAgICAgICAo ZnVuY2FsbCBpbWFnZS1yb2xsLW51bWJlci1vZi1wYWdlcy1mdW5jdGlvbikKICAgICAgICAgICAg ICAgICAgaW1hZ2Utcm9sbC1kZW1vLW51bWJlci1vZi1wYWdlcykpCgogICAgICAgICA7OyAocGFn ZS1zaXplcyAobWFrZS1saXN0IHBhZ2VzIChjb25zICgtICh3aW5kb3ctdGV4dC13aWR0aCBuaWwg dCkgMjAwKQogICAgICAgICA7OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgq IDEuNCAod2luZG93LXRleHQtd2lkdGggbmlsIHQpKSkpKQogICAgICAgICAocGFnZS1zaXplcyAo aWYgaW1hZ2Utcm9sbC1wYWdlLXNpemVzLWZ1bmN0aW9uCiAgICAgICAgICAgICAgICAgICAgICAg ICAoZnVuY2FsbCBpbWFnZS1yb2xsLXBhZ2Utc2l6ZXMtZnVuY3Rpb24pCiAgICAgICAgICAgICAg ICAgICAgICAgKG1ha2UtbGlzdCBwYWdlcyAoaWYgKGZ1bmN0aW9ucCBpbWFnZS1yb2xsLWRlbW8t cGFnZS1zaXplKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChm dW5jYWxsIGltYWdlLXJvbGwtZGVtby1wYWdlLXNpemUpCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGltYWdlLXJvbGwtZGVtby1wYWdlLXNpemUpKSkpCiAgICAgICAg IDs7IChsZXQgKCh3ICh3aW5kb3ctcGl4ZWwtd2lkdGgpKSkKICAgICAgICAgOzsgICAobWFrZS1s aXN0IHBhZ2VzIChjb25zIHcgKCogMS40IHcpKSkpKSkKCiAgICAgICAgIChuIDApKQogICAgICAg ICA7OyAodnBvcyAwKSkKCiAgICAoZG9saXN0IChwYWdlLXNpemUgcGFnZS1zaXplcykKICAgICAg KGxldCogKChwYWdlLXdpZHRoIChjYXIgcGFnZS1zaXplKSkKICAgICAgICAgICAgIChvdmVybGV5 LWhlaWd0aCAoKyAoY2RyIHBhZ2Utc2l6ZSkgKCogMiBpbWFnZS1yb2xsLXZlcnRpY2FsLW1hcmdp bikpKQogICAgICAgICAgICAgKG8gKG50aCBuIChpbWFnZS1yb2xsLW92ZXJsYXlzKSkpKQogICAg ICAgICh3aGVuIGltYWdlLXJvbGwtY2VudGVyCiAgICAgICAgICAob3ZlcmxheS1wdXQgbyAnYmVm b3JlLXN0cmluZwogICAgICAgICAgICAgICAgICAgICAgICh3aGVuICg+ICh3aW5kb3ctcGl4ZWwt d2lkdGgpIHBhZ2Utd2lkdGgpCiAgICAgICAgICAgICAgICAgICAgICAgICAocHJvcGVydGl6ZSAi ICIgJ2Rpc3BsYXkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAoc3BhY2Ug OmFsaWduLXRvCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgs KGZsb29yICgvICgtICh3aW5kb3ctcG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F2YWlsYWJsZS1oZWlnaHQgKHdpbmRv dy12c2Nyb2xsIG5pbCB0KSkKICAgICAgICAgICAod2hpbGUgKD4gYXZhaWxhYmxlLWhlaWdodCAw KQogICAgICAgICAgICAgKHNldHEgcmVtYWluaW5nLWhlaWdodCBhdmFpbGFibGUtaGVpZ2h0KQog ICAgICAgICAgICAgKHNldHEgbiAoMSsgbikpCiAgICAgICAgICAgICAoY2wtZGVjZiBhdmFpbGFi bGUtaGVpZ2h0IChpbWFnZS1yb2xsLW92ZXJsYXktaGVpZ2h0ICgtIGN1cnJlbnQtcGFnZSBuKSkp KQogICAgICAgICAgIChzZXRxIG4gKC0gbikpKQogICAgICAgICAgKHQKICAgICAgICAgICA7OyAo Y2wtZGVjZiBhdmFpbGFibGUtaGVpZ2h0ICgtIChpbWFnZS1yb2xsLW92ZXJsYXktaGVpZ2h0IGN1 cnJlbnQtcGFnZSkKICAgICAgICAgICA7OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh3 aW5kb3ctdnNjcm9sbCBuaWwgdCkpKQogICAgICAgICAgIChjbC1kZWNmIGF2YWlsYWJsZS1oZWln aHQgKC0gKGltYWdlLXJvbGwtb3ZlcmxheS1oZWlnaHQgY3VycmVudC1wYWdlKQogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAod2luZG93LXZz Y3JvbGwgbmlsIHQpKSkKICAgICAgICAgICAod2hpbGUgKD4gYXZhaWxhYmxlLWhlaWdodCAwKQog ICAgICAgICAgICAgKHNldHEgcmVtYWluaW5nLWhlaWdodCBhdmFpbGFibGUtaGVpZ2h0KQogICAg ICAgICAgICAgKHNldHEgbiAoMSsgbikpCiAgICAgICAgICAgICAoY2wtZGVjZiBhdmFpbGFibGUt aGVpZ2h0IChpbWFnZS1yb2xsLW92ZXJsYXktaGVpZ2h0ICgrIGN1cnJlbnQtcGFnZSBuKSkpKSkp CgogICAgKHdoZW4gYmFja3dhcmQKICAgICAgKHNldHEgc3RlcC1zaXplICgtIHN0ZXAtc2l6ZSkp KQoKICAgIChpZiAoPSBuIDApCiAgICAgICAgKHNldHEgbmV3LXZzY3JvbGwgKCsgKHdpbmRvdy12 c2Nyb2xsIG5pbCB0KSBzdGVwLXNpemUpKQogICAgICAoc2V0cSBuZXctdnNjcm9sbCAoKyAod2lu ZG93LXZzY3JvbGwgbmlsIHQpIHJlbWFpbmluZy1oZWlnaHQpKSkKCgogICAgKGlmIChjb25kICgo PCBuIDApCiAgICAgICAgICAgICAgIChmb3J3YXJkLWxpbmUgbikKICAgICAgICAgICAgICAgKGNs LWRlY2YgKGltYWdlLXJvbGwtY3VycmVudC1wYWdlKSkKICAgICAgICAgICAgICAgKGltYWdlLXNl dC13aW5kb3ctdnNjcm9sbAogICAgICAgICAgICAgICAgKC0gKGltYWdlLXJvbGwtb3ZlcmxheS1o ZWlnaHQgKGltYWdlLXJvbGwtY3VycmVudC1wYWdlKSkKICAgICAgICAgICAgICAgICAgIHJlbWFp bmluZy1oZWlnaHQpKSkKICAgICAgICAgICAgICAoKD4gbiAwKQogICAgICAgICAgICAgICAoZm9y d2FyZC1saW5lIG4pCiAgICAgICAgICAgICAgIChjbC1pbmNmIChpbWFnZS1yb2xsLWN1cnJlbnQt cGFnZSkgbikKICAgICAgICAgICAgICAgKGltYWdlLXNldC13aW5kb3ctdnNjcm9sbAogICAgICAg ICAgICAgICAgcmVtYWluaW5nLWhlaWdodCkpCiAgICAgICAgICAgICAgKCg+IG5ldy12c2Nyb2xs CiAgICAgICAgICAgICAgICAgIHZpc2libGUtcGFnZXMtdnNjcm9sbC1saW1pdCkKICAgICAgICAg ICAgICAgKGltYWdlLXNldC13aW5kb3ctdnNjcm9sbCBuZXctdnNjcm9sbCkpKQogICAgICAgIChp bWFnZS1yb2xsLXVwZGF0ZS1kaXNwbGF5ZWQtcGFnZXMpCiAgICAgIChpbWFnZS1zZXQtd2luZG93 LXZzY3JvbGwgbmV3LXZzY3JvbGwpKSkpCgooZGV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AgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKGxldCAoKHcgKHdpbmRvdy1waXhlbC13aWR0aCkpKQogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb25zIHcgKCogMS40IHcp KSkpKSkKICAgIChzZXRxLWxvY2FsIGltYWdlLXJvbGwtZGVtby1udW1iZXItb2YtcGFnZXMgKG9y IHBhZ2VzIDEwMDApKQogICAgKHNldHEgaW1hZ2Utcm9sbC1jZW50ZXIgdCkKICAgIChzd2l0Y2gt dG8tYnVmZmVyIChjdXJyZW50LWJ1ZmZlcikpKSkK --000000000000c5e3ce05ddcc1b9a--