-
Notifications
You must be signed in to change notification settings - Fork 0
/
line_2.html
24 lines (23 loc) · 614 KB
/
line_2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="data:application/x-javascript;base64,KGZ1bmN0aW9uKCkgewogIC8vIElmIHdpbmRvdy5IVE1MV2lkZ2V0cyBpcyBhbHJlYWR5IGRlZmluZWQsIHRoZW4gdXNlIGl0OyBvdGhlcndpc2UgY3JlYXRlIGEKICAvLyBuZXcgb2JqZWN0LiBUaGlzIGFsbG93cyBwcmVjZWRpbmcgY29kZSB0byBzZXQgb3B0aW9ucyB0aGF0IGFmZmVjdCB0aGUKICAvLyBpbml0aWFsaXphdGlvbiBwcm9jZXNzICh0aG91Z2ggbm9uZSBjdXJyZW50bHkgZXhpc3QpLgogIHdpbmRvdy5IVE1MV2lkZ2V0cyA9IHdpbmRvdy5IVE1MV2lkZ2V0cyB8fCB7fTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gYSB2aWV3ZXIgcGFuZS4gSWYgbm90LCB3ZSdyZSBpbiBhIHdlYiBicm93c2VyLgogIHZhciB2aWV3ZXJNb2RlID0gd2luZG93LkhUTUxXaWRnZXRzLnZpZXdlck1vZGUgPQogICAgICAvXGJ2aWV3ZXJfcGFuZT0xXGIvLnRlc3Qod2luZG93LmxvY2F0aW9uKTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gU2hpbnkgbW9kZS4gSWYgbm90LCBpdCdzIGEgc3RhdGljIGRvY3VtZW50LgogIC8vIE5vdGUgdGhhdCBzdGF0aWMgd2lkZ2V0cyBjYW4gYXBwZWFyIGluIGJvdGggU2hpbnkgYW5kIHN0YXRpYyBtb2RlcywgYnV0CiAgLy8gb2J2aW91c2x5LCBTaGlueSB3aWRnZXRzIGNhbiBvbmx5IGFwcGVhciBpbiBTaGlueSBhcHBzL2RvY3VtZ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TsKICAgICAgICBpZiAodHlwZW9mKHRhc2tGdW5jKSAhPT0gImZ1bmN0aW9uIikgewogICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJUYXNrIG11c3QgYmUgYSBmdW5jdGlvbiEgU291cmNlOlxuIiArIHRhc2spOwogICAgICAgIH0KICAgICAgICB0YXNrRnVuYy5hcHBseSh0YXJnZXQsIHRoZXNlQXJncyk7CiAgICAgIH0pOwogICAgfQogIH0KCiAgZnVuY3Rpb24gaW5pdFNpemluZyhlbCkgewogICAgdmFyIHNpemluZyA9IHNpemluZ1BvbGljeShlbCk7CiAgICBpZiAoIXNpemluZykKICAgICAgcmV0dXJuOwoKICAgIHZhciBjZWwgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiaHRtbHdpZGdldF9jb250YWluZXIiKTsKICAgIGlmICghY2VsKQogICAgICByZXR1cm47CgogICAgaWYgKHR5cGVvZihzaXppbmcucGFkZGluZykgIT09ICJ1bmRlZmluZWQiKSB7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUubWFyZ2luID0gIjAiOwogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLnBhZGRpbmcgPSBwYWRkaW5nVG9Dc3ModW5wYWNrUGFkZGluZyhzaXppbmcucGFkZGluZykpOwogICAgfQoKICAgIGlmIChzaXppbmcuZmlsbCkgewogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLm92ZXJmbG93ID0gImhpZGRlbiI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUud2lkdGggPSAiMTAwJSI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUuaGVpZ2h0ID0gIjEwMCUiOwogICAgICBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuc3R5bGUud2lkdGggPSAiMTAwJSI7CiAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5zdHlsZS5oZWlnaHQgPSAiMTAwJSI7CiAgICAgIGlmIChjZWwpIHsKICAgICAgICBjZWwuc3R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ZHRoIGluc3RlYWQKICAgICAgICAgICAgLmNzcygibWF4V2lkdGgiLCBlbC5vZmZzZXRXaWR0aCkKICAgICAgICAgICAgLmNzcygiaGVpZ2h0IiwgZWwub2Zmc2V0SGVpZ2h0KTsKICAgICAgICAgIGVycm9yRGl2LnRleHQoZXJyLm1lc3NhZ2UpOwogICAgICAgICAgJGVsLmFmdGVyKGVycm9yRGl2KTsKCiAgICAgICAgICAvLyBSZWFsbHkgZHVtYiB3YXkgdG8ga2VlcCB0aGUgc2l6ZS9wb3NpdGlvbiBvZiB0aGUgZXJyb3IgaW4gc3luYyB3aXRoCiAgICAgICAgICAvLyB0aGUgcGFyZW50IGVsZW1lbnQgYXMgdGhlIHdpbmRvdyBpcyByZXNpemVkIG9yIHdoYXRldmVyLgogICAgICAgICAgdmFyIGludElkID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmICghZXJyb3JEaXZbMF0ucGFyZW50RWxlbWVudCkgewogICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW50SWQpOwogICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvckRpdgogICAgICAgICAgICAgIC5jc3MoInRvcCIsIGVsLm9mZnNldFRvcCkKICAgICAgICAgICAgICAuY3NzKCJsZWZ0IiwgZWwub2Zmc2V0TGVmdCkKICAgICAgICAgICAgICAuY3NzKCJtYXhXaWR0aCIsIGVsLm9mZnNldFdpZHRoKQogICAgICAgICAgICAgIC5jc3MoImhlaWdodCIsIGVsLm9mZnNldEhlaWdodCk7CiAgICAgICAgICB9LCA1MDApOwogICAgICAgIH0KICAgICAgfQogICAgfSwKICAgIGNsZWFyRXJyb3I6IGZ1bmN0aW9uKGVsKSB7CiAgICAgIHZhciAkZWwgPSAkKGVsKTsKICAgICAgdmFyIGRpc3BsYXkgPSAkZWwuZGF0YSgicmVzdG9yZS1kaXNwbGF5LW1vZGUiKTsKICAgICAgJGVsLmRhdGE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0YS5ldmFscy5sZW5ndGg7IGkrKykgewogICAgICAgICAgd2luZG93LkhUTUxXaWRnZXRzLmV2YWx1YXRlU3RyaW5nTWVtYmVyKGRhdGEueCwgZGF0YS5ldmFsc1tpXSk7CiAgICAgICAgfQogICAgICAgIGlmICghYmluZGluZ0RlZi5yZW5kZXJPbk51bGxWYWx1ZSkgewogICAgICAgICAgaWYgKGRhdGEueCA9PT0gbnVsbCkgewogICAgICAgICAgICBlbC5zdHlsZS52aXNpYmlsaXR5ID0gImhpZGRlbiI7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGVsLnN0eWxlLnZpc2liaWxpdHkgPSAiaW5oZXJpdCI7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmICghZWxlbWVudERhdGEoZWwsICJpbml0aWFsaXplZCIpKSB7CiAgICAgICAgICBpbml0U2l6aW5nKGVsKTsKCiAgICAgICAgICBlbGVtZW50RGF0YShlbCwgImluaXRpYWxpemVkIiwgdHJ1ZSk7CiAgICAgICAgICBpZiAoYmluZGluZ0RlZi5pbml0aWFsaXplKSB7CiAgICAgICAgICAgIHZhciByZXN1bHQgPSBiaW5kaW5nRGVmLmluaXRpYWxpemUoZWwsIGVsLm9mZnNldFdpZHRoLAogICAgICAgICAgICAgIGVsLm9mZnNldEhlaWdodCk7CiAgICAgICAgICAgIGVsZW1lbnREYXRhKGVsLCAiaW5pdF9yZXN1bHQiLCByZXN1bHQpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBTaGlueS5yZW5kZXJEZXBlbmRlbmNpZXMoZGF0YS5kZXBzKTsKICAgICAgICBiaW5kaW5nRGVmLnJlbmRlclZhbHVlKGVsLCBkYXRhLngsIGVsZW1lbnREYXRhKGVsLCAiaW5pdF9yZXN1bHQiKSk7CiAgICAgICAgZXZhbEFuZFJ1bihkYXRhLmpzSG9va3MucmVuZGVyLCBlbGVtZW50RGF0YShlbCwgImluaXRfcmVzdWx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sICJpbml0X3Jlc3VsdCIsIGluaXRSZXN1bHQpOwogICAgICAgIH0KCiAgICAgICAgaWYgKGJpbmRpbmcucmVzaXplKSB7CiAgICAgICAgICB2YXIgbGFzdFNpemUgPSB7fTsKICAgICAgICAgIHZhciByZXNpemVIYW5kbGVyID0gZnVuY3Rpb24oZSkgewogICAgICAgICAgICB2YXIgc2l6ZSA9IHsKICAgICAgICAgICAgICB3OiBzaXplT2JqID8gc2l6ZU9iai5nZXRXaWR0aCgpIDogZWwub2Zmc2V0V2lkdGgsCiAgICAgICAgICAgICAgaDogc2l6ZU9iaiA/IHNpemVPYmouZ2V0SGVpZ2h0KCkgOiBlbC5vZmZzZXRIZWlnaHQKICAgICAgICAgICAgfTsKICAgICAgICAgICAgaWYgKHNpemUudyA9PT0gMCAmJiBzaXplLmggPT09IDApCiAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICBpZiAoc2l6ZS53ID09PSBsYXN0U2l6ZS53ICYmIHNpemUuaCA9PT0gbGFzdFNpemUuaCkKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGxhc3RTaXplID0gc2l6ZTsKICAgICAgICAgICAgYmluZGluZy5yZXNpemUoZWwsIHNpemUudywgc2l6ZS5oLCBpbml0UmVzdWx0KTsKICAgICAgICAgIH07CgogICAgICAgICAgb24od2luZG93LCAicmVzaXplIiwgcmVzaXplSGFuZGxlcik7CgogICAgICAgICAgLy8gVGhpcyBpcyBuZWVkZWQgZm9yIGNhc2VzIHdoZXJlIHdlJ3JlIHJ1bm5pbmcgaW4gYSBTaGlueQogICAgICAgICAgLy8gYXBwLCBidXQgdGhlIHdpZGdldCBpdHNlbGYgaXMgbm90IGEgU2hpbnkgb3V0cHV0LCBidXQKICAgICAgICAgIC8vIHJhdGhlciBhIHNpbXBsZSBzdGF0aWMgd2lkZ2V0LiBPbmUgZXhhbXBsZSBvZiB0aGlzIGlzCiAgICAgICAgICAvLyBhbiBybWFya2Rvd24gZG9jdW1lbnQgdG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ByZXR1cm4gZGVmbi5mYWN0b3J5KGVsLCB3aWR0aCwgaGVpZ2h0KTsKICAgICAgfSwKICAgICAgcmVuZGVyVmFsdWU6IGZ1bmN0aW9uKGVsLCB4LCBpbnN0YW5jZSkgewogICAgICAgIHJldHVybiBpbnN0YW5jZS5yZW5kZXJWYWx1ZSh4KTsKICAgICAgfSwKICAgICAgcmVzaXplOiBmdW5jdGlvbihlbCwgd2lkdGgsIGhlaWdodCwgaW5zdGFuY2UpIHsKICAgICAgICByZXR1cm4gaW5zdGFuY2UucmVzaXplKHdpZHRoLCBoZWlnaHQpOwogICAgICB9CiAgICB9OwoKICAgIGlmIChkZWZuLmZpbmQpCiAgICAgIHJlc3VsdC5maW5kID0gZGVmbi5maW5kOwogICAgaWYgKGRlZm4ucmVuZGVyRXJyb3IpCiAgICAgIHJlc3VsdC5yZW5kZXJFcnJvciA9IGRlZm4ucmVuZGVyRXJyb3I7CiAgICBpZiAoZGVmbi5jbGVhckVycm9yKQogICAgICByZXN1bHQuY2xlYXJFcnJvciA9IGRlZm4uY2xlYXJFcnJvcjsKCiAgICByZXR1cm4gcmVzdWx0OwogIH0KfSkoKTsKCg=="></script>
<script src="data:application/x-javascript;base64,LyohIGpRdWVyeSB2MS4xMi40IHwgKGMpIGpRdWVyeSBGb3VuZGF0aW9uIHwganF1ZXJ5Lm9yZy9saWNlbnNlICovCiFmdW5jdGlvbihhLGIpeyJvYmplY3QiPT10eXBlb2YgbW9kdWxlJiYib2JqZWN0Ij09dHlwZW9mIG1vZHVsZS5leHBvcnRzP21vZHVsZS5leHBvcnRzPWEuZG9jdW1lbnQ/YihhLCEwKTpmdW5jdGlvbihhKXtpZighYS5kb2N1bWVudCl0aHJvdyBuZXcgRXJyb3IoImpRdWVyeSByZXF1aXJlcyBhIHdpbmRvdyB3aXRoIGEgZG9jdW1lbnQiKTtyZXR1cm4gYihhKX06YihhKX0oInVuZGVmaW5lZCIhPXR5cGVvZiB3aW5kb3c/d2luZG93OnRoaXMsZn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LGJ8fChhLmpRdWVyeT1hLiQ9biksbn0pOwo="></script>
<link href="data:text/css;charset=utf-8,%0A%2Eleaflet%2Dmap%2Dpane%2C%0A%2Eleaflet%2Dtile%2C%0A%2Eleaflet%2Dmarker%2Dicon%2C%0A%2Eleaflet%2Dmarker%2Dshadow%2C%0A%2Eleaflet%2Dtile%2Dpane%2C%0A%2Eleaflet%2Dtile%2Dcontainer%2C%0A%2Eleaflet%2Doverlay%2Dpane%2C%0A%2Eleaflet%2Dshadow%2Dpane%2C%0A%2Eleaflet%2Dmarker%2Dpane%2C%0A%2Eleaflet%2Dpopup%2Dpane%2C%0A%2Eleaflet%2Doverlay%2Dpane%20svg%2C%0A%2Eleaflet%2Dzoom%2Dbox%2C%0A%2Eleaflet%2Dimage%2Dlayer%2C%0A%2Eleaflet%2Dlayer%20%7B%0Aposition%3A%20absolute%3B%0Aleft%3A%200%3B%0Atop%3A%200%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20%7B%0Aoverflow%3A%20hidden%3B%0A%2Dms%2Dtouch%2Daction%3A%20none%3B%0Atouch%2Daction%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dtile%2C%0A%2Eleaflet%2Dmarker%2Dicon%2C%0A%2Eleaflet%2Dmarker%2Dshadow%20%7B%0A%2Dwebkit%2Duser%2Dselect%3A%20none%3B%0A%2Dmoz%2Duser%2Dselect%3A%20none%3B%0Auser%2Dselect%3A%20none%3B%0A%2Dwebkit%2Duser%2Ddrag%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dmarker%2Dicon%2C%0A%2Eleaflet%2Dmarker%2Dshadow%20%7B%0Adisplay%3A%20block%3B%0A%7D%0A%0A%2Eleaflet%2Dcontainer%20img%20%7B%0Amax%2Dwidth%3A%20none%20%21important%3B%0A%7D%0A%0A%2Eleaflet%2Dcontainer%20img%2Eleaflet%2Dimage%2Dlayer%20%7B%0Amax%2Dwidth%3A%2015000px%20%21important%3B%0A%7D%0A%2Eleaflet%2Dtile%20%7B%0Afilter%3A%20inherit%3B%0Avisibility%3A%20hidden%3B%0A%7D%0A%2Eleaflet%2Dtile%2Dloaded%20%7B%0Avisibility%3A%20inherit%3B%0A%7D%0A%2Eleaflet%2Dzoom%2Dbox%20%7B%0Awidth%3A%200%3B%0Aheight%3A%200%3B%0A%7D%0A%0A%2Eleaflet%2Doverlay%2Dpane%20svg%20%7B%0A%2Dmoz%2Duser%2Dselect%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dtile%2Dpane%20%7B%20z%2Dindex%3A%202%3B%20%7D%0A%2Eleaflet%2Dobjects%2Dpane%20%7B%20z%2Dindex%3A%203%3B%20%7D%0A%2Eleaflet%2Doverlay%2Dpane%20%7B%20z%2Dindex%3A%204%3B%20%7D%0A%2Eleaflet%2Dshadow%2Dpane%20%7B%20z%2Dindex%3A%205%3B%20%7D%0A%2Eleaflet%2Dmarker%2Dpane%20%7B%20z%2Dindex%3A%206%3B%20%7D%0A%2Eleaflet%2Dpopup%2Dpane%20%7B%20z%2Dindex%3A%207%3B%20%7D%0A%2Eleaflet%2Dvml%2Dshape%20%7B%0Awidth%3A%201px%3B%0Aheight%3A%201px%3B%0A%7D%0A%2Elvml%20%7B%0Abehavior%3A%20url%28%23default%23VML%29%3B%0Adisplay%3A%20inline%2Dblock%3B%0Aposition%3A%20absolute%3B%0A%7D%0A%0A%2Eleaflet%2Dcontrol%20%7B%0Aposition%3A%20relative%3B%0Az%2Dindex%3A%207%3B%0Apointer%2Devents%3A%20auto%3B%0A%7D%0A%2Eleaflet%2Dtop%2C%0A%2Eleaflet%2Dbottom%20%7B%0Aposition%3A%20absolute%3B%0Az%2Dindex%3A%201000%3B%0Apointer%2Devents%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dtop%20%7B%0Atop%3A%200%3B%0A%7D%0A%2Eleaflet%2Dright%20%7B%0Aright%3A%200%3B%0A%7D%0A%2Eleaflet%2Dbottom%20%7B%0Abottom%3A%200%3B%0A%7D%0A%2Eleaflet%2Dleft%20%7B%0Aleft%3A%200%3B%0A%7D%0A%2Eleaflet%2Dcontrol%20%7B%0Afloat%3A%20left%3B%0Aclear%3A%20both%3B%0A%7D%0A%2Eleaflet%2Dright%20%2Eleaflet%2Dcontrol%20%7B%0Afloat%3A%20right%3B%0A%7D%0A%2Eleaflet%2Dtop%20%2Eleaflet%2Dcontrol%20%7B%0Amargin%2Dtop%3A%2010px%3B%0A%7D%0A%2Eleaflet%2Dbottom%20%2Eleaflet%2Dcontrol%20%7B%0Amargin%2Dbottom%3A%2010px%3B%0A%7D%0A%2Eleaflet%2Dleft%20%2Eleaflet%2Dcontrol%20%7B%0Amargin%2Dleft%3A%2010px%3B%0A%7D%0A%2Eleaflet%2Dright%20%2Eleaflet%2Dcontrol%20%7B%0Amargin%2Dright%3A%2010px%3B%0A%7D%0A%0A%2Eleaflet%2Dfade%2Danim%20%2Eleaflet%2Dtile%2C%0A%2Eleaflet%2Dfade%2Danim%20%2Eleaflet%2Dpopup%20%7B%0Aopacity%3A%200%3B%0A%2Dwebkit%2Dtransition%3A%20opacity%200%2E2s%20linear%3B%0A%2Dmoz%2Dtransition%3A%20opacity%200%2E2s%20linear%3B%0A%2Do%2Dtransition%3A%20opacity%200%2E2s%20linear%3B%0Atransition%3A%20opacity%200%2E2s%20linear%3B%0A%7D%0A%2Eleaflet%2Dfade%2Danim%20%2Eleaflet%2Dtile%2Dloaded%2C%0A%2Eleaflet%2Dfade%2Danim%20%2Eleaflet%2Dmap%2Dpane%20%2Eleaflet%2Dpopup%20%7B%0Aopacity%3A%201%3B%0A%7D%0A%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dzoom%2Danimated%20%7B%0A%2Dwebkit%2Dtransition%3A%20%2Dwebkit%2Dtransform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3B%0A%2Dmoz%2Dtransition%3A%20%2Dmoz%2Dtransform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3B%0A%2Do%2Dtransition%3A%20%2Do%2Dtransform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3B%0Atransition%3A%20transform%200%2E25s%20cubic%2Dbezier%280%2C0%2C0%2E25%2C1%29%3B%0A%7D%0A%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dtile%2C%0A%2Eleaflet%2Dpan%2Danim%20%2Eleaflet%2Dtile%2C%0A%2Eleaflet%2Dtouching%20%2Eleaflet%2Dzoom%2Danimated%20%7B%0A%2Dwebkit%2Dtransition%3A%20none%3B%0A%2Dmoz%2Dtransition%3A%20none%3B%0A%2Do%2Dtransition%3A%20none%3B%0Atransition%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dzoom%2Dhide%20%7B%0Avisibility%3A%20hidden%3B%0A%7D%0A%0A%2Eleaflet%2Dclickable%20%7B%0Acursor%3A%20pointer%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20%7B%0Acursor%3A%20%2Dwebkit%2Dgrab%3B%0Acursor%3A%20%2Dmoz%2Dgrab%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dpane%2C%0A%2Eleaflet%2Dcontrol%20%7B%0Acursor%3A%20auto%3B%0A%7D%0A%2Eleaflet%2Ddragging%20%2Eleaflet%2Dcontainer%2C%0A%2Eleaflet%2Ddragging%20%2Eleaflet%2Dclickable%20%7B%0Acursor%3A%20move%3B%0Acursor%3A%20%2Dwebkit%2Dgrabbing%3B%0Acursor%3A%20%2Dmoz%2Dgrabbing%3B%0A%7D%0A%0A%2Eleaflet%2Dcontainer%20%7B%0Abackground%3A%20%23ddd%3B%0Aoutline%3A%200%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20a%20%7B%0Acolor%3A%20%230078A8%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20a%2Eleaflet%2Dactive%20%7B%0Aoutline%3A%202px%20solid%20orange%3B%0A%7D%0A%2Eleaflet%2Dzoom%2Dbox%20%7B%0Aborder%3A%202px%20dotted%20%2338f%3B%0Abackground%3A%20rgba%28255%2C255%2C255%2C0%2E5%29%3B%0A%7D%0A%0A%2Eleaflet%2Dcontainer%20%7B%0Afont%3A%2012px%2F1%2E5%20%22Helvetica%20Neue%22%2C%20Arial%2C%20Helvetica%2C%20sans%2Dserif%3B%0A%7D%0A%0A%2Eleaflet%2Dbar%20%7B%0Abox%2Dshadow%3A%200%201px%205px%20rgba%280%2C0%2C0%2C0%2E65%29%3B%0Aborder%2Dradius%3A%204px%3B%0A%7D%0A%2Eleaflet%2Dbar%20a%2C%0A%2Eleaflet%2Dbar%20a%3Ahover%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Awidth%3A%2026px%3B%0Aheight%3A%2026px%3B%0Aline%2Dheight%3A%2026px%3B%0Adisplay%3A%20block%3B%0Atext%2Dalign%3A%20center%3B%0Atext%2Ddecoration%3A%20none%3B%0Acolor%3A%20black%3B%0A%7D%0A%2Eleaflet%2Dbar%20a%2C%0A%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7B%0Abackground%2Dposition%3A%2050%25%2050%25%3B%0Abackground%2Drepeat%3A%20no%2Drepeat%3B%0Adisplay%3A%20block%3B%0A%7D%0A%2Eleaflet%2Dbar%20a%3Ahover%20%7B%0Abackground%2Dcolor%3A%20%23f4f4f4%3B%0A%7D%0A%2Eleaflet%2Dbar%20a%3Afirst%2Dchild%20%7B%0Aborder%2Dtop%2Dleft%2Dradius%3A%204px%3B%0Aborder%2Dtop%2Dright%2Dradius%3A%204px%3B%0A%7D%0A%2Eleaflet%2Dbar%20a%3Alast%2Dchild%20%7B%0Aborder%2Dbottom%2Dleft%2Dradius%3A%204px%3B%0Aborder%2Dbottom%2Dright%2Dradius%3A%204px%3B%0Aborder%2Dbottom%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dbar%20a%2Eleaflet%2Ddisabled%20%7B%0Acursor%3A%20default%3B%0Abackground%2Dcolor%3A%20%23f4f4f4%3B%0Acolor%3A%20%23bbb%3B%0A%7D%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20a%20%7B%0Awidth%3A%2030px%3B%0Aheight%3A%2030px%3B%0Aline%2Dheight%3A%2030px%3B%0A%7D%0A%0A%2Eleaflet%2Dcontrol%2Dzoom%2Din%2C%0A%2Eleaflet%2Dcontrol%2Dzoom%2Dout%20%7B%0Afont%3A%20bold%2018px%20%27Lucida%20Console%27%2C%20Monaco%2C%20monospace%3B%0Atext%2Dindent%3A%201px%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dzoom%2Dout%20%7B%0Afont%2Dsize%3A%2020px%3B%0A%7D%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dzoom%2Din%20%7B%0Afont%2Dsize%3A%2022px%3B%0A%7D%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dzoom%2Dout%20%7B%0Afont%2Dsize%3A%2024px%3B%0A%7D%0A%0A%2Eleaflet%2Dcontrol%2Dlayers%20%7B%0Abox%2Dshadow%3A%200%201px%205px%20rgba%280%2C0%2C0%2C0%2E4%29%3B%0Abackground%3A%20%23fff%3B%0Aborder%2Dradius%3A%205px%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7B%0Abackground%2Dimage%3A%20url%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAVbSURBVEiJrZZfSFt3FMe%2Fv3tvbmLUZleNKSHE%2FLGRiNbGRovTtrA9lcFkpcOnMvawwhhjrb3soQ8djGFhXMQNRqEvY3R9kJVuPpRRWQebcdKYxkaHqcHchKJ2rVo1WhNz%2F%2Fz2UOLUadVuv9fvOedzfuec3x9CKcV%2B1qVLlwgA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dIIRArVZDo9Gk5ZDb7b4yNTW1xiEAb1mt1ns5ZLFYqnBntA5SFDVlNBqDu3btak7VoOXlZXg8HoTDYeTn56OlpUUwXEOhEPr6%2BrC0tASFQgG9Xo%2B8vLyUMeFweNDhcEg5jqsC8CWAl61Wa3IOrTP2HIDfA9iZk5PT29TUVJ6Tk7MrXeNGRkYghF0bMCWlkUQiMWe324cWFhZaAcwA%2BLnVav37%2FeU2PAq2WCyFALoAHAMQLSsrsxkMhpSPQ%2BnYJYApSeX3%2By%2BPjY3VANgG4AyATqvVOp%2BsbNrbB4vF0nw3SQPDMKP19fUxhUJhShWTjF0AMmEKAGBxcdFns9mWEolEHYABAMesVmt%2FqhhB1ykWi4UBcBzAbwHICwoKLjc2NtaKxeINX18JIZicnMTY2Bh4%2Fs6xGk3T0Gq1KC8vT7l5cBwXuX79et%2Fs7OzjAKIAfg3gtNVqTXvBltGFl8ViKQXwBwA%2FBPCdVqsd1mg0Sd90V7XKLgAZMwXAPwH8zGq1Cj7Iz%2BqO1WKxZMyudErGFKvV2p1pnqwvjbNhVzKlYko27Xroa%2F1s2LWqdEzJRpv2JUkm7BLKlGy0qZ%2FGCGFXJkzJRlvyNVYydkkkktxMmZKNtuzzsvvZBYADEEEGTMlGW%2F4B4Dp2ARkyJRv9F9vsxWD%2F43R9AAAAAElFTkSuQmCC%29%3B%0Abackground%2Dsize%3A%2026px%2026px%3B%0A%7D%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7B%0Awidth%3A%2044px%3B%0Aheight%3A%2044px%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dlayers%20%2Eleaflet%2Dcontrol%2Dlayers%2Dlist%2C%0A%2Eleaflet%2Dcontrol%2Dlayers%2Dexpanded%20%2Eleaflet%2Dcontrol%2Dlayers%2Dtoggle%20%7B%0Adisplay%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dlayers%2Dexpanded%20%2Eleaflet%2Dcontrol%2Dlayers%2Dlist%20%7B%0Adisplay%3A%20block%3B%0Aposition%3A%20relative%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dlayers%2Dexpanded%20%7B%0Apadding%3A%206px%2010px%206px%206px%3B%0Acolor%3A%20%23333%3B%0Abackground%3A%20%23fff%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dlayers%2Dselector%20%7B%0Amargin%2Dtop%3A%202px%3B%0Aposition%3A%20relative%3B%0Atop%3A%201px%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dlayers%20label%20%7B%0Adisplay%3A%20block%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dlayers%2Dseparator%20%7B%0Aheight%3A%200%3B%0Aborder%2Dtop%3A%201px%20solid%20%23ddd%3B%0Amargin%3A%205px%20%2D10px%205px%20%2D6px%3B%0A%7D%0A%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dcontrol%2Dattribution%20%7B%0Abackground%3A%20%23fff%3B%0Abackground%3A%20rgba%28255%2C%20255%2C%20255%2C%200%2E7%29%3B%0Amargin%3A%200%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dattribution%2C%0A%2Eleaflet%2Dcontrol%2Dscale%2Dline%20%7B%0Apadding%3A%200%205px%3B%0Acolor%3A%20%23333%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dattribution%20a%20%7B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dattribution%20a%3Ahover%20%7B%0Atext%2Ddecoration%3A%20underline%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dcontrol%2Dattribution%2C%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dcontrol%2Dscale%20%7B%0Afont%2Dsize%3A%2011px%3B%0A%7D%0A%2Eleaflet%2Dleft%20%2Eleaflet%2Dcontrol%2Dscale%20%7B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%2Eleaflet%2Dbottom%20%2Eleaflet%2Dcontrol%2Dscale%20%7B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dscale%2Dline%20%7B%0Aborder%3A%202px%20solid%20%23777%3B%0Aborder%2Dtop%3A%20none%3B%0Aline%2Dheight%3A%201%2E1%3B%0Apadding%3A%202px%205px%201px%3B%0Afont%2Dsize%3A%2011px%3B%0Awhite%2Dspace%3A%20nowrap%3B%0Aoverflow%3A%20hidden%3B%0A%2Dmoz%2Dbox%2Dsizing%3A%20content%2Dbox%3B%0Abox%2Dsizing%3A%20content%2Dbox%3B%0Abackground%3A%20%23fff%3B%0Abackground%3A%20rgba%28255%2C%20255%2C%20255%2C%200%2E5%29%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dscale%2Dline%3Anot%28%3Afirst%2Dchild%29%20%7B%0Aborder%2Dtop%3A%202px%20solid%20%23777%3B%0Aborder%2Dbottom%3A%20none%3B%0Amargin%2Dtop%3A%20%2D2px%3B%0A%7D%0A%2Eleaflet%2Dcontrol%2Dscale%2Dline%3Anot%28%3Afirst%2Dchild%29%3Anot%28%3Alast%2Dchild%29%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23777%3B%0A%7D%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dattribution%2C%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dlayers%2C%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20%7B%0Abox%2Dshadow%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dlayers%2C%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20%7B%0Aborder%3A%202px%20solid%20rgba%280%2C0%2C0%2C0%2E2%29%3B%0Abackground%2Dclip%3A%20padding%2Dbox%3B%0A%7D%0A%0A%2Eleaflet%2Dpopup%20%7B%0Aposition%3A%20absolute%3B%0Atext%2Dalign%3A%20center%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%20%7B%0Apadding%3A%201px%3B%0Atext%2Dalign%3A%20left%3B%0Aborder%2Dradius%3A%2012px%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dcontent%20%7B%0Amargin%3A%2013px%2019px%3B%0Aline%2Dheight%3A%201%2E4%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dcontent%20p%20%7B%0Amargin%3A%2018px%200%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dtip%2Dcontainer%20%7B%0Amargin%3A%200%20auto%3B%0Awidth%3A%2040px%3B%0Aheight%3A%2020px%3B%0Aposition%3A%20relative%3B%0Aoverflow%3A%20hidden%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dtip%20%7B%0Awidth%3A%2017px%3B%0Aheight%3A%2017px%3B%0Apadding%3A%201px%3B%0Amargin%3A%20%2D10px%20auto%200%3B%0A%2Dwebkit%2Dtransform%3A%20rotate%2845deg%29%3B%0A%2Dmoz%2Dtransform%3A%20rotate%2845deg%29%3B%0A%2Dms%2Dtransform%3A%20rotate%2845deg%29%3B%0A%2Do%2Dtransform%3A%20rotate%2845deg%29%3B%0Atransform%3A%20rotate%2845deg%29%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%2C%0A%2Eleaflet%2Dpopup%2Dtip%20%7B%0Abackground%3A%20white%3B%0Abox%2Dshadow%3A%200%203px%2014px%20rgba%280%2C0%2C0%2C0%2E4%29%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20a%2Eleaflet%2Dpopup%2Dclose%2Dbutton%20%7B%0Aposition%3A%20absolute%3B%0Atop%3A%200%3B%0Aright%3A%200%3B%0Apadding%3A%204px%204px%200%200%3B%0Atext%2Dalign%3A%20center%3B%0Awidth%3A%2018px%3B%0Aheight%3A%2014px%3B%0Afont%3A%2016px%2F14px%20Tahoma%2C%20Verdana%2C%20sans%2Dserif%3B%0Acolor%3A%20%23c3c3c3%3B%0Atext%2Ddecoration%3A%20none%3B%0Afont%2Dweight%3A%20bold%3B%0Abackground%3A%20transparent%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20a%2Eleaflet%2Dpopup%2Dclose%2Dbutton%3Ahover%20%7B%0Acolor%3A%20%23999%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dscrolled%20%7B%0Aoverflow%3A%20auto%3B%0Aborder%2Dbottom%3A%201px%20solid%20%23ddd%3B%0Aborder%2Dtop%3A%201px%20solid%20%23ddd%3B%0A%7D%0A%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%20%7B%0Azoom%3A%201%3B%0A%7D%0A%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dtip%20%7B%0Awidth%3A%2024px%3B%0Amargin%3A%200%20auto%3B%0A%2Dms%2Dfilter%3A%20%22progid%3ADXImageTransform%2EMicrosoft%2EMatrix%28M11%3D0%2E70710678%2C%20M12%3D0%2E70710678%2C%20M21%3D%2D0%2E70710678%2C%20M22%3D0%2E70710678%29%22%3B%0Afilter%3A%20progid%3ADXImageTransform%2EMicrosoft%2EMatrix%28M11%3D0%2E70710678%2C%20M12%3D0%2E70710678%2C%20M21%3D%2D0%2E70710678%2C%20M22%3D0%2E70710678%29%3B%0A%7D%0A%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dtip%2Dcontainer%20%7B%0Amargin%2Dtop%3A%20%2D1px%3B%0A%7D%0A%2Eleaflet%2Doldie%20%2Eleaflet%2Dcontrol%2Dzoom%2C%0A%2Eleaflet%2Doldie%20%2Eleaflet%2Dcontrol%2Dlayers%2C%0A%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dcontent%2Dwrapper%2C%0A%2Eleaflet%2Doldie%20%2Eleaflet%2Dpopup%2Dtip%20%7B%0Aborder%3A%201px%20solid%20%23999%3B%0A%7D%0A%0A%2Eleaflet%2Ddiv%2Dicon%20%7B%0Abackground%3A%20%23fff%3B%0Aborder%3A%201px%20solid%20%23666%3B%0A%7D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3A%200%3B%0Aborder%2Dradius%3A%200%3B%0Aborder%3A%20none%3B%0A%7D%0A%2Einfo%20%7B%0Apadding%3A%206px%208px%3B%0Afont%3A%2014px%2F16px%20Arial%2C%20Helvetica%2C%20sans%2Dserif%3B%0Abackground%3A%20white%3B%0Abackground%3A%20rgba%28255%2C255%2C255%2C0%2E8%29%3B%0Abox%2Dshadow%3A%200%200%2015px%20rgba%280%2C0%2C0%2C0%2E2%29%3B%0Aborder%2Dradius%3A%205px%3B%0A%7D%0A%2Elegend%20%7B%0Aline%2Dheight%3A%2018px%3B%0Acolor%3A%20%23555%3B%0A%7D%0A%2Elegend%20svg%20text%20%7B%0Afill%3A%20%23555%3B%0A%7D%0A%2Elegend%20svg%20line%20%7B%0Astroke%3A%20%23555%3B%0A%7D%0A%2Elegend%20i%20%7B%0Awidth%3A%2018px%3B%0Aheight%3A%2018px%3B%0Afloat%3A%20left%3B%0Amargin%2Dright%3A%208px%3B%0Aopacity%3A%200%2E7%3B%0A%7D%0A" rel="stylesheet" /> <link href="data:text/css;charset=utf-8,%2Eleaflet%2Dlabel%20%7B%0Abackground%3A%20rgb%28235%2C%20235%2C%20235%29%3B%0Abackground%3A%20rgba%28235%2C%20235%2C%20235%2C%200%2E81%29%3B%0Abackground%2Dclip%3A%20padding%2Dbox%3B%0Aborder%2Dcolor%3A%20%23777%3B%0Aborder%2Dcolor%3A%20rgba%280%2C0%2C0%2C0%2E45%29%3B%0Aborder%2Dradius%3A%204px%3B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%2Dwidth%3A%204px%3B%0Acolor%3A%20%23111%3B%0Adisplay%3A%20block%3B%0Afont%3A%2012px%2F20px%20%22Helvetica%20Neue%22%2C%20Arial%2C%20Helvetica%2C%20sans%2Dserif%3B%0Afont%2Dweight%3A%20bold%3B%0Apadding%3A%201px%206px%3B%0Aposition%3A%20absolute%3B%0A%2Dwebkit%2Duser%2Dselect%3A%20none%3B%0A%2Dmoz%2Duser%2Dselect%3A%20none%3B%0A%2Dms%2Duser%2Dselect%3A%20none%3B%0Auser%2Dselect%3A%20none%3B%0Apointer%2Devents%3A%20none%3B%0Awhite%2Dspace%3A%20nowrap%3B%0Az%2Dindex%3A%20500%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Eleaflet%2Dclickable%20%7B%0Acursor%3A%20pointer%3B%0Apointer%2Devents%3A%20auto%3B%0A%7D%0A%2Eleaflet%2Dlabel%3Abefore%2C%0A%2Eleaflet%2Dlabel%3Aafter%20%7B%0Aborder%2Dtop%3A%206px%20solid%20transparent%3B%0Aborder%2Dbottom%3A%206px%20solid%20transparent%3B%0Aborder%2Dright%3A%206px%20solid%20transparent%3B%0Acontent%3A%20none%3B%0Aposition%3A%20absolute%3B%0Atop%3A%205px%3B%0A%7D%0A%2Eleaflet%2Dlabel%3Abefore%20%7B%0Aborder%2Dright%3A%206px%20solid%20black%3B%0Aborder%2Dright%2Dcolor%3A%20inherit%3B%0Aleft%3A%20%2D10px%3B%0A%7D%0A%2Eleaflet%2Dlabel%3Aafter%20%7B%0Aborder%2Dleft%3A%206px%20solid%20black%3B%0Aborder%2Dleft%2Dcolor%3A%20inherit%3B%0Aright%3A%20%2D16px%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Dtop%3Aafter%2C%0A%2Eleaflet%2Dlabel%2Dtop%3Abefore%20%7B%0Aleft%3A%20%2D50%25%3B%0Aborder%2Dtop%2Dcolor%3A%20black%3B%0Aborder%2Dtop%2Dcolor%3A%20rgba%280%2C0%2C0%2C0%2E45%29%3B%0Aposition%3A%20relative%3B%0Atop%3A%2029px%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Dtop%3Abefore%20%7B%0Adisplay%3A%20none%3B%0Aborder%2Dright%2Dcolor%3A%20transparent%3B%0Aborder%2Dbottom%2Dcolor%3A%20transparent%3B%0Aborder%2Dleft%2Dcolor%3A%20transparent%3B%0Aborder%2Dtop%2Dcolor%3A%20transparent%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Dtop%3Aafter%20%7B%0Acontent%3A%20%27%20%27%3B%0Aborder%2Dright%2Dcolor%3A%20transparent%3B%0Aborder%2Dbottom%2Dcolor%3A%20transparent%3B%0Aborder%2Dleft%2Dcolor%3A%20transparent%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Dbottom%3Abefore%20%7B%0Adisplay%3A%20none%3B%0Aborder%2Dright%2Dcolor%3A%20transparent%3B%0Aborder%2Dbottom%2Dcolor%3A%20transparent%3B%0Aborder%2Dleft%2Dcolor%3A%20transparent%3B%0Aborder%2Dtop%2Dcolor%3A%20transparent%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Dbottom%3Aafter%2C%0A%2Eleaflet%2Dlabel%2Dbottom%3Abefore%20%7B%0Aleft%3A%20%2D50%25%3B%0Aborder%2Dbottom%2Dcolor%3A%20black%3B%0Aborder%2Dbottom%2Dcolor%3A%20rgba%280%2C0%2C0%2C0%2E45%29%3B%0Aposition%3A%20relative%3B%0Atop%3A%20%2D28px%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Dbottom%3Aafter%20%7B%0Aborder%2Dright%2Dcolor%3A%20transparent%3B%0Aborder%2Dtop%2Dcolor%3A%20transparent%3B%0Aborder%2Dleft%2Dcolor%3A%20transparent%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Dbottom%3Aafter%2C%0A%2Eleaflet%2Dlabel%2Dtop%3Aafter%2C%0A%2Eleaflet%2Dlabel%2Dright%3Abefore%2C%0A%2Eleaflet%2Dlabel%2Dleft%3Aafter%20%7B%0Acontent%3A%20%22%22%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Eleaflet%2Dlabel%2Dtext%2Donly%2C%0A%2Eleaflet%2Dlabel%2Eleaflet%2Dlabel%2Dtext%2Donly%3Abefore%2C%0A%2Eleaflet%2Dlabel%2Eleaflet%2Dlabel%2Dtext%2Donly%3Aafter%20%7B%0Abackground%3A%20none%3B%0Aborder%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Eleaflet%2Dlabel%2Dtext%2Donly%2Eleaflet%2Dlabel%2Dleft%20%7B%0Amargin%2Dright%3A%20%2D10px%3B%0A%7D%0A%2Eleaflet%2Dlabel%2Eleaflet%2Dlabel%2Dtext%2Donly%2Eleaflet%2Dlabel%2Dright%20%7B%0Amargin%2Dleft%3A%20%2D10px%3B%0A%7D%0A" rel="stylesheet" />
<script src="data:application/x-javascript;base64,LyoKCUxlYWZsZXQubGFiZWwsIGEgcGx1Z2luIHRoYXQgYWRkcyBsYWJlbHMgdG8gbWFya2VycyBhbmQgdmVjdG9ycyBmb3IgTGVhZmxldCBwb3dlcmVkIG1hcHMuCgkoYykgMjAxMi0yMDEzLCBKYWNvYiBUb3llLCBTbWFydHJhawoKCWh0dHBzOi8vZ2l0aHViLmNvbS9MZWFmbGV0L0xlYWZsZXQubGFiZWwKCWh0dHA6Ly9sZWFmbGV0anMuY29tCglodHRwczovL2dpdGh1Yi5jb20vamFjb2J0b3llCiovCiFmdW5jdGlvbih0LGUpeyJmdW5jdGlvbiI9PXR5cGVvZiBkZWZpbmUmJmRlZmluZS5hbWQ/ZGVmaW5lKFsibGVhZmxldCJdLHQpOiJvYmplY3QiPT10eXBlb2YgZXhwb3J0cyYmKG1vZHVsZS5leHBvcnRzPXQocmVxdWlyZSgibGVhZmxldCIpKSksInVuZGVmaW5lZCIhPXR5cGVvZiBlJiZlLkwmJihlLkxlYWZsZXRMYWJlbD10KEwpKX0oZnVuY3Rpb24odCl7dC5sYWJlbFZlcnNpb249IjAuMi40Ijt2YXIgZT10LkNsYXNzLmV4dGVuZCh7aW5jbHVkZXM6dC5NaXhpbi5FdmVudHMsX2RpcmVjdGlvbnM6WyJ0b3AiLCJyaWdodCIsImJvdHRvbSIsImxlZnQiXSxvcHRpb25zOntjbGFzc05hbWU6IiIsY2xpY2thYmxlOiExLGRpcmVjdGlvbjoicmlnaHQiLG5vSGlkZTohMSxvZmZzZXQ6WzEyLC0xNV0sb3BhY2l0eToxLHRleHRzaXplOiIxMHB4Iix0Z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A9IFtdOwogICAgdGhpcy5fY29udHJvbHNCeUlkID0ge307CiAgICB0aGlzLl9tYXAgPSBtYXA7CiAgfQoKICBfY3JlYXRlQ2xhc3MoQ29udHJvbFN0b3JlLCBbewogICAga2V5OiAiYWRkIiwKICAgIHZhbHVlOiBmdW5jdGlvbiBhZGQoY29udHJvbCwgaWQsIGh0bWwpIHsKICAgICAgaWYgKHR5cGVvZiBpZCAhPT0gInVuZGVmaW5lZCIgJiYgaWQgIT09IG51bGwpIHsKICAgICAgICBpZiAodGhpcy5fY29udHJvbHNCeUlkW2lkXSkgewogICAgICAgICAgdGhpcy5fbWFwLnJlbW92ZUNvbnRyb2wodGhpcy5fY29udHJvbHNCeUlkW2lkXSk7CiAgICAgICAgfQogICAgICAgIHRoaXMuX2NvbnRyb2xzQnlJZFtpZF0gPSBjb250cm9sOwogICAgICB9IGVsc2UgewogICAgICAgIHRoaXMuX2NvbnRyb2xzTm9JZC5wdXNoKGNvbnRyb2wpOwogICAgICB9CiAgICAgIHRoaXMuX21hcC5hZGRDb250cm9sKGNvbnRyb2wpOwogICAgfQogIH0sIHsKICAgIGtleTogInJlbW92ZSIsCiAgICB2YWx1ZTogZnVuY3Rpb24gcmVtb3ZlKGlkKSB7CiAgICAgIGlmICh0aGlzLl9jb250cm9sc0J5SWRbaWRdKSB7CiAgICAgICAgdmFyIGNvbnRyb2wgPSB0aGlzLl9jb250cm9sc0J5SWRbaWRdOwogICAgICAgIHRoaXMuX21hcC5yZW1vdmVDb250cm9sKGNvbnRyb2wpOwogICAgICAgIGRlbGV0ZSB0aGlzLl9jb250cm9sc0J5SWRbaWRdOwogICAgICB9CiAgICB9CiAgfSwgewogICAga2V5OiAiY2xlYXIiLAogICAgdmFsdWU6IGZ1bmN0aW9uIGNsZWFyKCkgewogICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX2NvbnRyb2xzTm9JZC5sZW5ndGg7IGkrKykgewogICAgICAgIHZhciBjb250cm9sID0gdGhpcy5fY29ud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AgICAgbG5nOiBlLmxhdGxuZy5sbmcsCiAgICAgICAgICAgICAgICAiLm5vbmNlIjogTWF0aC5yYW5kb20oKSAvLyBGb3JjZSByZWFjdGl2aXR5IGlmIGxhdC9sbmcgaGFzbid0IGNoYW5nZWQKICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICB2YXIgZ3JvdXBUaW1lcklkID0gbnVsbDsKCiAgICAgICAgICAgIG1hcC5vbigibW92ZWVuZCIsIGZ1bmN0aW9uIChlKSB7CiAgICAgICAgICAgICAgdXBkYXRlQm91bmRzKGUudGFyZ2V0KTsKICAgICAgICAgICAgfSkub24oImxheWVyYWRkIGxheWVycmVtb3ZlIiwgZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgICAvLyBJZiB0aGUgbGF5ZXIgdGhhdCdzIGNvbWluZyBvciBnb2luZyBpcyBhIGdyb3VwIHdlIGNyZWF0ZWQsIHRlbGwKICAgICAgICAgICAgICAvLyB0aGUgc2VydmVyLgogICAgICAgICAgICAgIGlmIChtYXAubGF5ZXJNYW5hZ2VyLmdldEdyb3VwTmFtZUZyb21MYXllckdyb3VwKGUubGF5ZXIpKSB7CiAgICAgICAgICAgICAgICAvLyBCdXQgdG8gYXZvaWQgY2hhdHRpbmVzcywgY29hbGVzY2UgZXZlbnRzCiAgICAgICAgICAgICAgICBpZiAoZ3JvdXBUaW1lcklkKSB7CiAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChncm91cFRpbWVySWQpOwogICAgICAgICAgICAgICAgICBncm91cFRpbWVySWQgPSBudWxsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZ3JvdXBUaW1lcklkID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgIGdyb3VwVGltZXJJZCA9IG51bGw7CiAgICAgICAgICAgICAgICAgIF9zaGlueTIuZGVmYXVsdC5vbklucHV0Q2hhbmdlKG1hcC5pZCArICJfZ3JvdXBz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zFdID0gZGF0YS5saW1pdHMubGF0WzFdICsgcGFkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkYXRhLmxpbWl0cy5sbmdbMF0gPT09IGRhdGEubGltaXRzLmxuZ1sxXSkgewogICAgICAgICAgICAgIGRhdGEubGltaXRzLmxuZ1swXSA9IGRhdGEubGltaXRzLmxuZ1swXSAtIHBhZDsKICAgICAgICAgICAgICBkYXRhLmxpbWl0cy5sbmdbMV0gPSBkYXRhLmxpbWl0cy5sbmdbMV0gKyBwYWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbWFwLmZpdEJvdW5kcyhbW2RhdGEubGltaXRzLmxhdFswXSwgZGF0YS5saW1pdHMubG5nWzBdXSwgW2RhdGEubGltaXRzLmxhdFsxXSwgZGF0YS5saW1pdHMubG5nWzFdXV0pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbWFwLmZpdFdvcmxkKCk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBmb3IgKHZhciBpID0gMDsgZGF0YS5jYWxscyAmJiBpIDwgZGF0YS5jYWxscy5sZW5ndGg7IGkrKykgewogICAgICAgICAgdmFyIGNhbGwgPSBkYXRhLmNhbGxzW2ldOwogICAgICAgICAgaWYgKG1ldGhvZHNbY2FsbC5tZXRob2RdKSBtZXRob2RzW2NhbGwubWV0aG9kXS5hcHBseShtYXAsIGNhbGwuYXJncyk7ZWxzZSAoMCwgX3V0aWwubG9nKSgiVW5rbm93biBtZXRob2QgIiArIGNhbGwubWV0aG9kKTsKICAgICAgICB9CgogICAgICAgIG1hcC5sZWFmbGV0ci5oYXNSZW5kZXJlZCA9IHRydWU7CgogICAgICAgIGlmIChfaHRtbHdpZGdldHMyLmRlZmF1bHQuc2hpbnlNb2RlKSB7CiAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgdXBkYXRlQm91bmRzKG1hcCk7CiAgICAgICAgICB9LCAxKTsKICAgICAg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ExheWVyTWFuYWdlcihtYXApIHsKICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBMYXllck1hbmFnZXIpOwoKICAgIHRoaXMuX21hcCA9IG1hcDsKCiAgICAvLyBCRUdJTiBsYXllciBpbmRpY2VzCgogICAgLy8gezxncm91cG5hbWU+OiB7PHN0YW1wPjogbGF5ZXJ9fQogICAgdGhpcy5fYnlHcm91cCA9IHt9OwogICAgLy8gezxjYXRlZ29yeU5hbWU+OiB7PHN0YW1wPjogbGF5ZXJ9fQogICAgdGhpcy5fYnlDYXRlZ29yeSA9IHt9OwogICAgLy8gezxjYXRlZ29yeU5hbWVfbGF5ZXJJZD46IGxheWVyfQogICAgdGhpcy5fYnlMYXllcklkID0ge307CiAgICAvLyB7PHN0YW1wPjogewogICAgLy8gICAgICAgICAgICAgImdyb3VwIjogPGdyb3VwbmFtZT4sCiAgICAvLyAgICAgICAgICAgICAibGF5ZXJJZCI6IDxsYXllcklkPiwKICAgIC8vICAgICAgICAgICAgICJjYXRlZ29yeSI6IDxjYXRlZ29yeT4sCiAgICAvLyAgICAgICAgICAgICAiY29udGFpbmVyIjogPGNvbnRhaW5lcj4KICAgIC8vICAgICAgICAgICB9CiAgICAvLyB9CiAgICB0aGlzLl9ieVN0YW1wID0ge307CiAgICAvLyB7PGNyb3NzdGFsa0dyb3VwTmFtZT46IHs8a2V5PjogWzxzdGFtcD4sIDxzdGFtcD4sIC4uLl0sIC4uLn19CiAgICB0aGlzLl9ieUNyb3NzdGFsa0dyb3VwID0ge307CgogICAgLy8gRU5EIGxheWVyIGluZGljZXMKCiAgICAvLyB7PGNhdGVnb3J5TmFtZT46IEwubGF5ZXJHcm91cH0KICAgIHRoaXMuX2NhdGVnb3J5Q29udGFpbmVycyA9IHt9OwogICAgLy8gezxncm91cE5hbWU+OiBMLmxheWVyR3JvdXB9CiAgICB0aGlzLl9ncm91cENvbnRhaW5lcnMgPSB7fTsKICB9CgogIF9jcmVhdGVDbGFzcyhMYXllck1hbmFnZX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GcgPSBfdGhpcy5fYnlDcm9zc3RhbGtHcm91cFtjdEdyb3VwXTsKICAgICAgICAgIGlmICghY3RnKSB7CiAgICAgICAgICAgIChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgY3RnID0gX3RoaXMuX2J5Q3Jvc3N0YWxrR3JvdXBbY3RHcm91cF0gPSB7fTsKICAgICAgICAgICAgICB2YXIgY3Jvc3N0YWxrID0gZ2xvYmFsLmNyb3NzdGFsazsKCiAgICAgICAgICAgICAgdmFyIGhhbmRsZUZpbHRlciA9IGZ1bmN0aW9uIGhhbmRsZUZpbHRlcihlKSB7CiAgICAgICAgICAgICAgICBpZiAoIWUudmFsdWUpIHsKICAgICAgICAgICAgICAgICAgdmFyIGdyb3VwS2V5cyA9IE9iamVjdC5rZXlzKGN0Zyk7CiAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZ3JvdXBLZXlzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGtleSA9IGdyb3VwS2V5c1tpXTsKICAgICAgICAgICAgICAgICAgICB2YXIgX2xheWVySW5mbyA9IF90aGlzLl9ieVN0YW1wW2N0Z1trZXldXTsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fc2V0VmlzaWJpbGl0eShfbGF5ZXJJbmZvLCB0cnVlKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgdmFyIHNlbGVjdGVkS2V5cyA9IHt9OwogICAgICAgICAgICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgZS52YWx1ZS5sZW5ndGg7IF9pKyspIHsKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEtleXNbZS52YWx1ZVtfaV1dID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICB2YXIgX2dyb3VwS2V5cyA9IE9iamVjdC5rZXlzKGN0Zyk7CiAgICAgICAgICAgICAgICAgIGZvciAodmFyIF9pMiA9IDA7IF9pMiA8IF9ncm91cEtleXMubGVuZ3RoOyBfaTIrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBfa2V5ID0gX2dyb3VwS2V5c1tfaTJdOwogICAgICAgICAgICAgICAgICAgIHZhciBfbGF5ZXJJbmZvMiA9IF90aGlzLl9ieVN0YW1wW2N0Z1tfa2V5XV07CiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3NldFZpc2liaWxpdHkoX2xheWVySW5mbzIsIHNlbGVjdGVkS2V5c1tfZ3JvdXBLZXlzW19pMl1dKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgdmFyIGZpbHRlckhhbmRsZSA9IG5ldyBjcm9zc3RhbGsuRmlsdGVySGFuZGxlKGN0R3JvdXApOwogICAgICAgICAgICAgIGZpbHRlckhhbmRsZS5vbigiY2hhbmdlIiwgaGFuZGxlRmlsdGVyKTsKCiAgICAgICAgICAgICAgdmFyIGhhbmRsZVNlbGVjdGlvbiA9IGZ1bmN0aW9uIGhhbmRsZVNlbGVjdGlvbihlKSB7CiAgICAgICAgICAgICAgICBpZiAoIWUudmFsdWUgfHwgIWUudmFsdWUubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgIHZhciBncm91cEtleXMgPSBPYmplY3Qua2V5cyhjdGcpOwogICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGdyb3VwS2V5cy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBrZXkgPSBncm91cEtleXNbaV07CiAgICAgICAgICAgICAgICAgICAgdmFyIF9sYXllckluZm8zID0gX3RoaXMuX2J5U3RhbXBbY3RnW2tleV1dOwogICAgICAgICAgICAgICAgICAgIF90aGlzLl9zZXRPcGFjaXR5KF9sYXllckluZm8zLCAxLjApOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICB2YXIgc2VsZWN0ZWRLZXlzID0ge307CiAgICAgICAgICAgICAgICAgIGZvciAodmFyIF9pMyA9IDA7IF9pMyA8IGUudmFsdWUubGVuZ3RoOyBfaTMrKykgewogICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkS2V5c1tlLnZhbHVlW19pM11dID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICB2YXIgX2dyb3VwS2V5czIgPSBPYmplY3Qua2V5cyhjdGcpOwogICAgICAgICAgICAgICAgICBmb3IgKHZhciBfaTQgPSAwOyBfaTQgPCBfZ3JvdXBLZXlzMi5sZW5ndGg7IF9pNCsrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIF9rZXkyID0gX2dyb3VwS2V5czJbX2k0XTsKICAgICAgICAgICAgICAgICAgICB2YXIgX2xheWVySW5mbzQgPSBfdGhpcy5fYnlTdGFtcFtjdGdbX2tleTJdXTsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fc2V0T3BhY2l0eShfbGF5ZXJJbmZvNCwgc2VsZWN0ZWRLZXlzW19ncm91cEtleXMyW19pNF1dID8gMS4wIDogMC4yKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgdmFyIHNlbEhhbmRsZSA9IG5ldyBjcm9zc3RhbGsuU2VsZWN0aW9uSGFuZGxlKGN0R3JvdXApOwogICAgICAgICAgICAgIHNlbEhhbmRsZS5vbigiY2hhbmdlIiwgaGFuZGxlU2VsZWN0aW9uKTsKCiAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICBoYW5kbGVGaWx0ZXIoeyB2YWx1ZTogZmlsdGVySGFuZGxlLmZpbHRlcmVkS2V5cyB9KTsKICAgICAgICAgICAgICAgIGhhbmRsZVNlbGVjdGlvbih7IHZhbHVlOiBzZWxIYW5kbG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3Rpb24gKHN0YW1wKSB7CiAgICAgICAgICAgIHZhciBsYXllckluZm8gPSBfdGhpczIuX2J5U3RhbXBbc3RhbXBdOwogICAgICAgICAgICAvLyAuLi5pZiBpdCdzIHNvbWV0aGluZyB3aXRoIGEgcG9pbnQuLi4KICAgICAgICAgICAgaWYgKGxheWVySW5mby5sYXllci5nZXRMYXRMbmcpIHsKICAgICAgICAgICAgICAvLyAuLi4gYW5kIGl0J3MgaW5zaWRlIHRoZSBzZWxlY3Rpb24gYm91bmRzLi4uCiAgICAgICAgICAgICAgLy8gVE9ETzogVXNlIHBpeGVsIGNvbnRhaW5tZW50LCBub3QgbGF0L2xuZyBjb250YWlubWVudAogICAgICAgICAgICAgIGlmIChib3VuZHMuY29udGFpbnMobGF5ZXJJbmZvLmxheWVyLmdldExhdExuZygpKSkgewogICAgICAgICAgICAgICAgLy8gLi4uYWRkIHRoZSBrZXkgdG8gdGhlIHNlbGVjdGlvbi4KICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5wdXNoKGN0S2V5KTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0pOwogICAgICAgIH0pOwogICAgICAgIG5ldyBnbG9iYWwuY3Jvc3N0YWxrLlNlbGVjdGlvbkhhbmRsZShjdEdyb3VwTmFtZSkuc2V0KHNlbGVjdGlvbiwgZXh0cmFJbmZvKTsKICAgICAgfSk7CiAgICB9CiAgfSwgewogICAga2V5OiAidW5icnVzaCIsCiAgICB2YWx1ZTogZnVuY3Rpb24gdW5icnVzaChleHRyYUluZm8pIHsKICAgICAgT2JqZWN0LmtleXModGhpcy5fYnlDcm9zc3RhbGtHcm91cCkuZm9yRWFjaChmdW5jdGlvbiAoY3RHcm91cE5hbWUpIHsKICAgICAgICBuZXcgZ2xvYmFsLmNyb3NzdGFsay5TZWxlY3Rpb25IYW5kbGUoY3RHcm91cE5hbWUpLmNsZWFyKGV4dHJhSW5mbyk7CiAgICAgIH0pOwogICAgfQogIH0sIHsKICA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VyID0gbWFya2VyRnVuYyhkZiwgaSk7CiAgICAgICAgICB2YXIgdGhpc0lkID0gZGYuZ2V0KGksICJsYXllcklkIik7CiAgICAgICAgICB2YXIgdGhpc0dyb3VwID0gY2x1c3RlciA/IG51bGwgOiBkZi5nZXQoaSwgImdyb3VwIik7CiAgICAgICAgICBpZiAoY2x1c3RlcikgewogICAgICAgICAgICBjbHVzdGVyR3JvdXAuY2x1c3RlckxheWVyU3RvcmUuYWRkKG1hcmtlciwgdGhpc0lkKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHRoaXMubGF5ZXJNYW5hZ2VyLmFkZExheWVyKG1hcmtlciwgIm1hcmtlciIsIHRoaXNJZCwgdGhpc0dyb3VwLCBkZi5nZXQoaSwgImN0R3JvdXAiLCB0cnVlKSwgZGYuZ2V0KGksICJjdEtleSIsIHRydWUpKTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBwb3B1cCA9IGRmLmdldChpLCAicG9wdXAiKTsKICAgICAgICAgIHZhciBwb3B1cE9wdGlvbnMgPSBkZi5nZXQoaSwgInBvcHVwT3B0aW9ucyIpOwogICAgICAgICAgaWYgKHBvcHVwICE9PSBudWxsKSB7CiAgICAgICAgICAgIGlmIChwb3B1cE9wdGlvbnMgIT09IG51bGwpIHsKICAgICAgICAgICAgICBtYXJrZXIuYmluZFBvcHVwKHBvcHVwLCBwb3B1cE9wdGlvbnMpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIG1hcmtlci5iaW5kUG9wdXAocG9wdXApOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICB2YXIgbGFiZWwgPSBkZi5nZXQoaSwgImxhYmVsIik7CiAgICAgICAgICB2YXIgbGFiZWxPcHRpb25zID0gZGYuZ2V0KGksICJsYWJlbE9wdGlvbnMiKTsKICAgICAgICAgIGlmIChsYWJlbCAhPT0gbnVsbCkgewogICAgICAgICAgICBpZiAobGFiZWxPcHRpb25zICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgaWYgKGxhYmVsT3B0aW9ucy5ub0hpZGUpIHsKICAgICAgICAgICAgICAgIG1hcmtlci5iaW5kTGFiZWwobGFiZWwsIGxhYmVsT3B0aW9ucykuc2hvd0xhYmVsKCk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIG1hcmtlci5iaW5kTGFiZWwobGFiZWwsIGxhYmVsT3B0aW9ucyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIG1hcmtlci5iaW5kTGFiZWwobGFiZWwpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBtYXJrZXIub24oImNsaWNrIiwgbW91c2VIYW5kbGVyKHRoaXMuaWQsIHRoaXNJZCwgdGhpc0dyb3VwLCAibWFya2VyX2NsaWNrIiwgZXh0cmFJbmZvKSwgdGhpcyk7CiAgICAgICAgICBtYXJrZXIub24oIm1vdXNlb3ZlciIsIG1vdXNlSGFuZGxlcih0aGlzLmlkLCB0aGlzSWQsIHRoaXNHcm91cCwgIm1hcmtlcl9tb3VzZW92ZXIiLCBleHRyYUluZm8pLCB0aGlzKTsKICAgICAgICAgIG1hcmtlci5vbigibW91c2VvdXQiLCBtb3VzZUhhbmRsZXIodGhpcy5pZCwgdGhpc0lkLCB0aGlzR3JvdXAsICJtYXJrZXJfbW91c2VvdXQiLCBleHRyYUluZm8pLCB0aGlzKTsKICAgICAgICB9KS5jYWxsKF90aGlzMyk7CiAgICAgIH0KICAgIH07CgogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBkZi5ucm93KCk7IGkrKykgewogICAgICBfbG9vcDIoaSk7CiAgICB9CgogICAgaWYgKGNsdXN0ZXIpIHsKICAgICAgdGhpcy5sYXllck1hbmFnZXIuYWRkTGF5ZXIoY2x1c3Rlckdyb3VwLCAiY2x1c3RlciIsIGNsdXN0ZXJJZCwgZ3JvdXApOwogICAgfQogIH0pLmNhbGwobWFwKTsKf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AgICAgICAgcmV0dXJuIG5ldyBfbGVhZmxldDIuZGVmYXVsdC5JY29uLkRlZmF1bHQoKTsKICAgICAgfQoKICAgICAgLy8gQ29tcG9zaXRlIG9wdGlvbnMgKGxpa2UgcG9pbnRzIG9yIHNpemVzKSBhcmUgcGFzc2VkIGZyb20gUiB3aXRoIGVhY2gKICAgICAgLy8gaW5kaXZpZHVhbCBjb21wb25lbnQgYXMgaXRzIG93biBvcHRpb24uIFdlIG5lZWQgdG8gY29tYmluZSB0aGVtIG5vdwogICAgICAvLyBpbnRvIHRoZWlyIGNvbXBvc2l0ZSBmb3JtLgogICAgICBpZiAob3B0cy5pY29uV2lkdGgpIHsKICAgICAgICBvcHRzLmljb25TaXplID0gW29wdHMuaWNvbldpZHRoLCBvcHRzLmljb25IZWlnaHRdOwogICAgICB9CiAgICAgIGlmIChvcHRzLnNoYWRvd1dpZHRoKSB7CiAgICAgICAgb3B0cy5zaGFkb3dTaXplID0gW29wdHMuc2hhZG93V2lkdGgsIG9wdHMuc2hhZG93SGVpZ2h0XTsKICAgICAgfQogICAgICBpZiAob3B0cy5pY29uQW5jaG9yWCkgewogICAgICAgIG9wdHMuaWNvbkFuY2hvciA9IFtvcHRzLmljb25BbmNob3JYLCBvcHRzLmljb25BbmNob3JZXTsKICAgICAgfQogICAgICBpZiAob3B0cy5zaGFkb3dBbmNob3JYKSB7CiAgICAgICAgb3B0cy5zaGFkb3dBbmNob3IgPSBbb3B0cy5zaGFkb3dBbmNob3JYLCBvcHRzLnNoYWRvd0FuY2hvclldOwogICAgICB9CiAgICAgIGlmIChvcHRzLnBvcHVwQW5jaG9yWCkgewogICAgICAgIG9wdHMucG9wdXBBbmNob3IgPSBbb3B0cy5wb3B1cEFuY2hvclgsIG9wdHMucG9wdXBBbmNob3JZXTsKICAgICAgfQoKICAgICAgcmV0dXJuIG5ldyBfbGVhZmxldDIuZGVmYXVsdC5JY29uKG9wdHMpOwogICAgfTsKICB9CgogIGlmICghKF9qcXVlcnkyLmR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gICAgIChmdW5jdGlvbiAoKSB7CiAgICAgICAgICB2YXIgdGhpc0lkID0gZGYuZ2V0KGksICJsYXllcklkIik7CiAgICAgICAgICB2YXIgdGhpc0dyb3VwID0gZGYuZ2V0KGksICJncm91cCIpOwogICAgICAgICAgX3RoaXM0LmxheWVyTWFuYWdlci5hZGRMYXllcihsYXllciwgY2F0ZWdvcnksIHRoaXNJZCwgdGhpc0dyb3VwLCBkZi5nZXQoaSwgImN0R3JvdXAiLCB0cnVlKSwgZGYuZ2V0KGksICJjdEtleSIsIHRydWUpKTsKICAgICAgICAgIGlmIChsYXllci5iaW5kUG9wdXApIHsKICAgICAgICAgICAgdmFyIHBvcHVwID0gZGYuZ2V0KGksICJwb3B1cCIpOwogICAgICAgICAgICB2YXIgcG9wdXBPcHRpb25zID0gZGYuZ2V0KGksICJwb3B1cE9wdGlvbnMiKTsKICAgICAgICAgICAgaWYgKHBvcHVwICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgaWYgKHBvcHVwT3B0aW9ucyAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgbGF5ZXIuYmluZFBvcHVwKHBvcHVwLCBwb3B1cE9wdGlvbnMpOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBsYXllci5iaW5kUG9wdXAocG9wdXApOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgaWYgKGxheWVyLmJpbmRMYWJlbCkgewogICAgICAgICAgICB2YXIgbGFiZWwgPSBkZi5nZXQoaSwgImxhYmVsIik7CiAgICAgICAgICAgIHZhciBsYWJlbE9wdGlvbnMgPSBkZi5nZXQoaSwgImxhYmVsT3B0aW9ucyIpOwogICAgICAgICAgICBpZiAobGFiZWwgIT09IG51bGwpIHsKICAgICAgICAgICAgICBpZiAobGFiZWxPcHRpb25zICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBsYXllci5iaW5kTGFiZWwobGFiZWwsIGxhYmVsT3B0aW9ucyk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGxheWVyLmJpbmRMYWJlbChsYWJlbCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBsYXllci5vbigiY2xpY2siLCBtb3VzZUhhbmRsZXIoX3RoaXM0LmlkLCB0aGlzSWQsIHRoaXNHcm91cCwgY2F0ZWdvcnkgKyAiX2NsaWNrIiksIF90aGlzNCk7CiAgICAgICAgICBsYXllci5vbigibW91c2VvdmVyIiwgbW91c2VIYW5kbGVyKF90aGlzNC5pZCwgdGhpc0lkLCB0aGlzR3JvdXAsIGNhdGVnb3J5ICsgIl9tb3VzZW92ZXIiKSwgX3RoaXM0KTsKICAgICAgICAgIGxheWVyLm9uKCJtb3VzZW91dCIsIG1vdXNlSGFuZGxlcihfdGhpczQuaWQsIHRoaXNJZCwgdGhpc0dyb3VwLCBjYXRlZ29yeSArICJfbW91c2VvdXQiKSwgX3RoaXM0KTsKICAgICAgICAgIHZhciBoaWdobGlnaHRTdHlsZSA9IGRmLmdldChpLCAiaGlnaGxpZ2h0T3B0aW9ucyIpOwoKICAgICAgICAgIGlmICghX2pxdWVyeTIuZGVmYXVsdC5pc0VtcHR5T2JqZWN0KGhpZ2hsaWdodFN0eWxlKSkgewogICAgICAgICAgICAoZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgICB2YXIgZGVmYXVsdFN0eWxlID0ge307CiAgICAgICAgICAgICAgX2pxdWVyeTIuZGVmYXVsdC5lYWNoKGhpZ2hsaWdodFN0eWxlLCBmdW5jdGlvbiAoaywgdikgewogICAgICAgICAgICAgICAgaWYgKGsgIT0gImJyaW5nVG9Gcm9udCIgJiYgayAhPSAic2VuZFRvQmFjayIpIHsKICAgICAgICAgICAgICAgICAgaWYgKGRmLmdldChpLCBrKSkgewogICAgICAgICAgICAgICAgICAgIGRlZmF1bHRTdHlsZVtrXSA9IGRmLmdldChpLCBrKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICBsYXllci5vbigibW91c2VvdmVyIiwgZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuc2V0U3R5bGUoaGlnaGxpZ2h0U3R5bGUpOwogICAgICAgICAgICAgICAgaWYgKGhpZ2hsaWdodFN0eWxlLmJyaW5nVG9Gcm9udCkgewogICAgICAgICAgICAgICAgICB0aGlzLmJyaW5nVG9Gcm9udCgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgIGxheWVyLm9uKCJtb3VzZW91dCIsIGZ1bmN0aW9uIChlKSB7CiAgICAgICAgICAgICAgICB0aGlzLnNldFN0eWxlKGRlZmF1bHRTdHlsZSk7CiAgICAgICAgICAgICAgICBpZiAoaGlnaGxpZ2h0U3R5bGUuc2VuZFRvQmFjaykgewogICAgICAgICAgICAgICAgICB0aGlzLmJyaW5nVG9CYWNrKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pKCk7CiAgICAgICAgICB9CiAgICAgICAgfSkoKTsKICAgICAgfQogICAgfSkuY2FsbChtYXApOwogIH07CgogIGZvciAodmFyIGkgPSAwOyBpIDwgZGYubnJvdygpOyBpKyspIHsKICAgIF9sb29wMyhpKTsKICB9Cn0KCm1ldGhvZHMuYWRkR2VuZXJpY0xheWVycyA9IGFkZExheWVyczsKCm1ldGhvZHMuYWRkQ2lyY2xlcyA9IGZ1bmN0aW9uIChsYXQsIGxuZywgcmFkaXVzLCBsYXllcklkLCBncm91cCwgb3B0aW9ucywgcG9wdXAsIHBvcHVwT3B0aW9ucywgbGFiZWwsIGxhYmVsT3B0aW9ucywgaGlnaGxpZ2h0T3B0aW9ucywgY3Jvc3N0YWxrT3B0aW9ucykgewogIGlmICghKF9qcXVlcnkyLmRlZmF1bHQuaXNFbXB0eU9iamVjdChsYXQp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NlaWwoKHRpbGVQb2ludC55ICsgMSAtIHRvcExlZnQueSkgKiBpbWdSZXMueSkpCiAgICAgICAgICAgIH07CgogICAgICAgICAgICAvLyBUaGUgc2l6ZSwgaW4gZGVzdCBwaXhlbHMsIHRoYXQgZWFjaCBzb3VyY2UgcGl4ZWwgc2hvdWxkIG9jY3VweS4KICAgICAgICAgICAgLy8gVGhpcyBtaWdodCBiZSBncmVhdGVyIG9yIGxlc3MgdGhhbiAxIChlLmcuIGlmIHggYW5kIHkgcmVzb2x1dGlvbgogICAgICAgICAgICAvLyBhcmUgdmVyeSBkaWZmZXJlbnQpLgogICAgICAgICAgICB2YXIgcGl4ZWxTaXplID0gewogICAgICAgICAgICAgIHg6IDI1NiAvIGltZ1Jlcy54LAogICAgICAgICAgICAgIHk6IDI1NiAvIGltZ1Jlcy55CiAgICAgICAgICAgIH07CgogICAgICAgICAgICAvLyBGb3IgZWFjaCBwaXhlbCBpbiB0aGUgc291cmNlIGltYWdlIHRoYXQgb3ZlcmxhcHMgdGhlIHRpbGUuLi4KICAgICAgICAgICAgZm9yICh2YXIgcm93ID0gc291cmNlU3RhcnQueTsgcm93IDwgc291cmNlRW5kLnk7IHJvdysrKSB7CiAgICAgICAgICAgICAgZm9yICh2YXIgY29sID0gc291cmNlU3RhcnQueDsgY29sIDwgc291cmNlRW5kLng7IGNvbCsrKSB7CiAgICAgICAgICAgICAgICAvLyAuLi5leHRyYWN0IHRoZSBwaXhlbCBkYXRhLi4uCiAgICAgICAgICAgICAgICB2YXIgaSA9IChyb3cgKiB3ICsgY29sKSAqIDQ7CiAgICAgICAgICAgICAgICB2YXIgciA9IGltZ0RhdGFbaV07CiAgICAgICAgICAgICAgICB2YXIgZyA9IGltZ0RhdGFbaSArIDFdOwogICAgICAgICAgICAgICAgdmFyIGIgPSBpbWdEYXRhW2kgKyAyXTsKICAgICAgICAgICAgICAgIHZhciBhID0gaW1nRGF0YVtpICsgM107CiAgICAgICAgICAgICAgICBjdHguZmlsbFN0eWxlID0gInJnYmEoIiArIFtyLCBnLCBiLCBhIC8gMjU1XS5qb2luKCIsIikgKyAiKSI7CgogICAgICAgICAgICAgICAgLy8gLi4uY2FsY3VsYXRlIHRoZSBjb3JyZXNwb25kaW5nIHBpeGVsIGNvb3JkIGluIHRoZSBkZXN0IGltYWdlCiAgICAgICAgICAgICAgICAvLyB3aGVyZSBpdCBzaG91bGQgYmUgZHJhd24uLi4KICAgICAgICAgICAgICAgIHZhciBwaXhlbFBvcyA9IHsKICAgICAgICAgICAgICAgICAgeDogKGNvbCAvIGltZ1Jlcy54ICsgdG9wTGVmdC54IC0gdGlsZVBvaW50LngpICogMjU2LAogICAgICAgICAgICAgICAgICB5OiAocm93IC8gaW1nUmVzLnkgKyB0b3BMZWZ0LnkgLSB0aWxlUG9pbnQueSkgKiAyNTYKICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgLy8gLi4uYW5kIGRyYXcgYSByZWN0YW5nbGUgdGhlcmUuCiAgICAgICAgICAgICAgICBjdHguZmlsbFJlY3QoTWF0aC5yb3VuZChwaXhlbFBvcy54KSwgTWF0aC5yb3VuZChwaXhlbFBvcy55KSwKICAgICAgICAgICAgICAgIC8vIExvb2tzIGNyYXp5LCBidXQgdGhpcyBpcyBuZWNlc3NhcnkgdG8gcHJldmVudCByb3VuZGluZyBmcm9tCiAgICAgICAgICAgICAgICAvLyBjYXVzaW5nIG92ZXJsYXAgYmV0d2VlbiB0aGlzIHJlY3QgYW5kIGl0cyBuZWlnaGJvcnMuIFRoZQogICAgICAgICAgICAgICAgLy8gbWludWVuZCBpcyB0aGUgbG9jYXRpb24gb2YgdGhlIG5leHQgcGl4ZWwsIHdoaWxlIHRoZQogICAgICAgICAgICAgICAgLy8gc3VidHJhaGVuZCBpcyB0aGUgcG9zaXRpb24gb2YgdGhlIGN1cnJlbnQgcGl4ZWwgKHRvIHR1cm4gYW4KICAgICAgICAgICAgICAgIC8vIGFic29sdXRlIGNvb3JkaW5hdGUgdG8gYSB3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cgZ2xvYmFsLmNyb3NzdGFsay5TZWxlY3Rpb25IYW5kbGUoY3RHcm91cCk7CiAgICAgICAgICAgIHNlbGVjdGlvbkhhbmRsZS5vbigiY2hhbmdlIiwgZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgICBpZiAoZS5zZW5kZXIgIT09IHNlbGVjdGlvbkhhbmRsZSkgewogICAgICAgICAgICAgICAgaWYgKF90aGlzOC5fbG9jYXRpb25GaWx0ZXIpIHsKICAgICAgICAgICAgICAgICAgX3RoaXM4Ll9sb2NhdGlvbkZpbHRlci5kaXNhYmxlKCk7CiAgICAgICAgICAgICAgICAgIGJ0bi5zdGF0ZSgic2VsZWN0LWluYWN0aXZlIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIGhhbmRsZXIgPSBmdW5jdGlvbiBoYW5kbGVyKGUpIHsKICAgICAgICAgICAgICBfdGhpczgubGF5ZXJNYW5hZ2VyLmJydXNoKF90aGlzOC5fbG9jYXRpb25GaWx0ZXIuZ2V0Qm91bmRzKCksIHsgc2VuZGVyOiBzZWxlY3Rpb25IYW5kbGUgfSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIF90aGlzOC5fbG9jYXRpb25GaWx0ZXIub24oImVuYWJsZWQiLCBoYW5kbGVyKTsKICAgICAgICAgICAgX3RoaXM4Ll9sb2NhdGlvbkZpbHRlci5vbigiY2hhbmdlIiwgaGFuZGxlcik7CiAgICAgICAgICAgIF90aGlzOC5fbG9jYXRpb25GaWx0ZXIub24oImRpc2FibGVkIiwgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgIHNlbGVjdGlvbkhhbmRsZS5jbG9zZSgpOwogICAgICAgICAgICAgIF90aGlzOC5fbG9jYXRpb25GaWx0ZXIgPSBudWxsOwogICAgICAgICAgICB9KTsKICAgICAgICAgIH0pKCk7CiAgICAgICAgfQoKICAgICAgICBfdGhpczguX2xvY2F0aW9uRml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ICAgIHZhciBfdGhpczIgPSB0aGlzOwoKICAgICAgaWYgKHRoaXMuX2xheWVyc1tpXSkgewogICAgICAgIGNhbGxiYWNrKHRoaXMuX2xheWVyc1tpXSk7CiAgICAgICAgcmV0dXJuOwogICAgICB9CgogICAgICB0aGlzLmdldEJ5SW5kZXgoaSAtIDEsIGZ1bmN0aW9uIChwcmV2SW1nKSB7CiAgICAgICAgaWYgKCFwcmV2SW1nKSB7CiAgICAgICAgICAvLyBwcmV2SW1nIGNvdWxkIG5vdCBiZSBjYWxjdWxhdGVkICh0b28gc21hbGwsIHBvc3NpYmx5KQogICAgICAgICAgY2FsbGJhY2sobnVsbCk7CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGlmIChwcmV2SW1nLndpZHRoIDwgMiB8fCBwcmV2SW1nLmhlaWdodCA8IDIpIHsKICAgICAgICAgIC8vIENhbid0IHJlZHVjZSB0aGlzIGltYWdlIGFueSBmdXJ0aGVyCiAgICAgICAgICBjYWxsYmFjayhudWxsKTsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9CiAgICAgICAgLy8gSWYgcmVkdWNlIGV2ZXIgYmVjb21lcyB0cnVseSBhc3luY2hyb25vdXMsIHdlIHNob3VsZCBzdHVmZiBhIHByb21pc2Ugb3IKICAgICAgICAvLyBzb21ldGhpbmcgaW50byB0aGlzLl9sYXllcnNbaV0gYmVmb3JlIGNhbGxpbmcgdGhpcy5yZWR1Y2UoKSwgdG8gcHJldmVudAogICAgICAgIC8vIHJlZHVuZGFudCByZWR1Y2Ugb3BlcmF0aW9ucyBmcm9tIGhhcHBlbmluZy4KICAgICAgICBfdGhpczIucmVkdWNlKHByZXZJbWcsIGZ1bmN0aW9uIChyZWR1Y2VkSW1nKSB7CiAgICAgICAgICBfdGhpczIuX2xheWVyc1tpXSA9IHJlZHVjZWRJbWc7CiAgICAgICAgICBjYWxsYmFjayhyZWR1Y2VkSW1nKTsKICAgICAgICAgIHJldHVybjsKICAgICAgICB9KTsK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iB2YWx1ZTtlbHNlIHJldHVybiBbdmFsdWVdOwp9CgoKfSx7fV19LHt9LFsxMV0pOwo="></script>
</head>
<body style="background-color:white;">
<div id="htmlwidget_container">
<div id="htmlwidget-c9d915734b9cfb9653c4" class="leaflet html-widget" style="width:100%;height:400px;">
</div>
</div>
<script type="application/json" data-for="htmlwidget-c9d915734b9cfb9653c4">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"maxNativeZoom":null,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"continuousWorld":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":null,"unloadInvisibleTiles":null,"updateWhenIdle":null,"detectRetina":false,"reuseTiles":false,"attribution":"© OpenStreetMap contributors, CC-BY-SA"}]},{"method":"addCircles","args":[[47.3870636363636,47.3667389090909,47.3811195,47.3719829,47.3788706153846,47.376721625,47.3630232222222,47.3878203333333,47.3601364285714,47.3682055,47.3652914444444,47.38317,47.3732482857143,47.3906959166667,47.3890425,47.3552851428571,47.3743245789474,47.3849537777778,47.3577520909091,47.3670183333333,47.3740735,47.375436,47.3696026521739,47.3500725625,47.3531756666667,47.3888327142857,47.3708066,47.3720365,47.3678034666667,47.382334,47.3905625588235,47.391454,47.3771418666667,47.37400825,47.3846378461538,47.3797966666667,47.3778029166667,47.3760484285714,47.38666625,47.3761656666667,47.3693061666667,47.3767588181818],[8.48940145454545,8.540903,8.50385508333333,8.535046,8.51016173076923,8.513848625,8.54934433333333,8.48609475,8.55160371428572,8.5398395,8.54751688888889,8.4995902,8.52901421428571,8.47927041666667,8.48288666666667,8.55657228571429,8.520895,8.49477877777778,8.55413590909091,8.54559556410256,8.525578,8.5175068,8.53872586956522,8.56119225,8.55885066666667,8.52619685714286,8.5316466,8.5428045,8.53512366666667,8.535329,8.52235155882353,8.521444,8.53943506666667,8.5423425,8.53164623076923,8.53764466666667,8.54143683333333,8.537351,8.528893,8.5342475,8.54375683333333,8.54378896969697],150,null,null,{"lineCap":null,"lineJoin":null,"clickable":true,"pointerEvents":null,"className":"","stroke":true,"color":"Black","weight":1,"opacity":0.5,"fill":true,"fillColor":["#FCBBA1","#FEE5D9","#FCBBA1","#FEE5D9","#FCBBA1","#FEE5D9","#FEE5D9","#FCBBA1","#FEE5D9","#FCBBA1","#FEE5D9","#FEE5D9","#FB6A4A","#FCBBA1","#FEE5D9","#FEE5D9","#A50F15","#FEE5D9","#FEE5D9","#FCBBA1","#FEE5D9","#FCBBA1","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9","#FEE5D9"],"fillOpacity":0.8,"dashArray":null},null,null,["GRIM Zürich, Grimselstrasse count = 84","BURK Zürich, Bürkliplatz count = 33","LETG Zürich, Letzigrund count = 99","SIHS Zürich, Sihlstrasse count = 42","ALBP Zürich, Albisriederplatz count = 84","ZYPR Zürich, Zypressenstrasse count = 63","KRES Zürich, Kreuzstrasse count = 36","LIND Zürich, Lindenplatz count = 114","FELD Zürich, Feldeggstrasse count = 42","BOES Zürich, Börsenstrasse count = 81","OPER Zürich, Opernhaus count = 60","FREI Zürich, Freihofstrasse count = 51","STAU Zürich, Stauffacher count = 291","FARB Zürich, Farbhof count = 81","BACH Zürich, Bachmattstrasse count = 33","FROE Zürich, Fröhlichstrasse count = 30","KALK Zürich,Kalkbreite/Bhf.Wiedikon count = 456","KAPP Zürich, Kappeli count = 54","HOES Zürich, Höschgasse count = 51","BELL Zürich, Bellevue count = 87","BEZI Zürich, Bezirksgebäude count = 48","LOCH Zürich, Lochergut count = 123","PARA Zürich, Paradeplatz count = 54","BTIE Zürich, Bahnhof Tiefenbrunnen count = 0","WILD Zürich, Wildbachstrasse count = 9","DAMM Zürich, Dammweg count = 0","BSEL Zürich, Bahnhof Selnau count = 0","RATH Zürich, Rathaus count = 0","STOC Zürich, Stockerstrasse count = 0","MUFG Zürich, Museum für Gestaltung count = 0","EWYS Zürich, Escher-Wyss-Platz count = 0","DEP5 Zürich, Depot 5 Hard count = 9","BPLA Zürich, Bahnhofplatz/HB count = 0","RBRU Zürich, Rudolf-Brun-Brücke count = 0","LIMM Zürich, Limmatplatz count = 0","SIHL Zürich, Sihlquai/HB count = 0","BQUA Zürich, Bahnhofquai/HB count = 0","LOEW Zürich, Löwenplatz count = 0","QUEL Zürich, Quellenstrasse count = 0","SIHP Zürich, Sihlpost / HB count = 0","HELM Zürich, Helmhaus count = 0","CENT Zürich, Central count = 0"],null,null,null]},{"method":"addMarkers","args":[[47.3870636363636,47.3667389090909,47.3811195,47.3719829,47.3788706153846,47.376721625,47.3630232222222,47.3878203333333,47.3601364285714,47.3682055,47.3652914444444,47.38317,47.3732482857143,47.3906959166667,47.3890425,47.3552851428571,47.3743245789474,47.3849537777778,47.3577520909091,47.3670183333333,47.3740735,47.375436,47.3696026521739,47.3500725625,47.3531756666667,47.3888327142857,47.3708066,47.3720365,47.3678034666667,47.382334,47.3905625588235,47.391454,47.3771418666667,47.37400825,47.3846378461538,47.3797966666667,47.3778029166667,47.3760484285714,47.38666625,47.3761656666667,47.3693061666667,47.3767588181818],[8.48940145454545,8.540903,8.50385508333333,8.535046,8.51016173076923,8.513848625,8.54934433333333,8.48609475,8.55160371428572,8.5398395,8.54751688888889,8.4995902,8.52901421428571,8.47927041666667,8.48288666666667,8.55657228571429,8.520895,8.49477877777778,8.55413590909091,8.54559556410256,8.525578,8.5175068,8.53872586956522,8.56119225,8.55885066666667,8.52619685714286,8.5316466,8.5428045,8.53512366666667,8.535329,8.52235155882353,8.521444,8.53943506666667,8.5423425,8.53164623076923,8.53764466666667,8.54143683333333,8.537351,8.528893,8.5342475,8.54375683333333,8.54378896969697],{"iconUrl":{"data":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII=","index":0},"iconWidth":1,"iconHeight":1},null,null,{"clickable":true,"draggable":false,"keyboard":true,"title":"","alt":"","zIndexOffset":0,"opacity":1,"riseOnHover":false,"riseOffset":250},null,null,null,null,["GRIM Zürich, Grimselstrasse count = 84","BURK Zürich, Bürkliplatz count = 33","LETG Zürich, Letzigrund count = 99","SIHS Zürich, Sihlstrasse count = 42","ALBP Zürich, Albisriederplatz count = 84","ZYPR Zürich, Zypressenstrasse count = 63","KRES Zürich, Kreuzstrasse count = 36","LIND Zürich, Lindenplatz count = 114","FELD Zürich, Feldeggstrasse count = 42","BOES Zürich, Börsenstrasse count = 81","OPER Zürich, Opernhaus count = 60","FREI Zürich, Freihofstrasse count = 51","STAU Zürich, Stauffacher count = 291","FARB Zürich, Farbhof count = 81","BACH Zürich, Bachmattstrasse count = 33","FROE Zürich, Fröhlichstrasse count = 30","KALK Zürich,Kalkbreite/Bhf.Wiedikon count = 456","KAPP Zürich, Kappeli count = 54","HOES Zürich, Höschgasse count = 51","BELL Zürich, Bellevue count = 87","BEZI Zürich, Bezirksgebäude count = 48","LOCH Zürich, Lochergut count = 123","PARA Zürich, Paradeplatz count = 54","BTIE Zürich, Bahnhof Tiefenbrunnen count = 0","WILD Zürich, Wildbachstrasse count = 9","DAMM Zürich, Dammweg count = 0","BSEL Zürich, Bahnhof Selnau count = 0","RATH Zürich, Rathaus count = 0","STOC Zürich, Stockerstrasse count = 0","MUFG Zürich, Museum für Gestaltung count = 0","EWYS Zürich, Escher-Wyss-Platz count = 0","DEP5 Zürich, Depot 5 Hard count = 9","BPLA Zürich, Bahnhofplatz/HB count = 0","RBRU Zürich, Rudolf-Brun-Brücke count = 0","LIMM Zürich, Limmatplatz count = 0","SIHL Zürich, Sihlquai/HB count = 0","BQUA Zürich, Bahnhofquai/HB count = 0","LOEW Zürich, Löwenplatz count = 0","QUEL Zürich, Quellenstrasse count = 0","SIHP Zürich, Sihlpost / HB count = 0","HELM Zürich, Helmhaus count = 0","CENT Zürich, Central count = 0"],null,null]},{"method":"addLegend","args":[{"colors":["#FEE5D9","#FCBBA1","#FC9272","#FB6A4A","#DE2D26","#A50F15"],"labels":["0 – 76","76 – 152","152 – 228","228 – 304","304 – 380","380 – 456"],"na_color":null,"na_label":"NA","opacity":0.8,"position":"bottomright","type":"bin","title":"Delays > 1.5 min","extra":null,"layerId":null,"className":"info legend"}]}],"setView":[[47.3778,8.5402],12,[]],"limits":{"lat":[47.3500725625,47.391454],"lng":[8.47927041666667,8.56119225]}},"evals":[],"jsHooks":[]}</script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-c9d915734b9cfb9653c4">{"viewer":{"width":"100%","height":400,"padding":0,"fill":true},"browser":{"width":"100%","height":400,"padding":0,"fill":true}}</script>
</body>
</html>