Skip to content

Instantly share code, notes, and snippets.

@aoles
Created May 14, 2018 13:24
Show Gist options
  • Save aoles/36bb92a04ef3aac80085ae5b88009501 to your computer and use it in GitHub Desktop.
Save aoles/36bb92a04ef3aac80085ae5b88009501 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="data:application/x-javascript;base64,KGZ1bmN0aW9uKCkgewogIC8vIElmIHdpbmRvdy5IVE1MV2lkZ2V0cyBpcyBhbHJlYWR5IGRlZmluZWQsIHRoZW4gdXNlIGl0OyBvdGhlcndpc2UgY3JlYXRlIGEKICAvLyBuZXcgb2JqZWN0LiBUaGlzIGFsbG93cyBwcmVjZWRpbmcgY29kZSB0byBzZXQgb3B0aW9ucyB0aGF0IGFmZmVjdCB0aGUKICAvLyBpbml0aWFsaXphdGlvbiBwcm9jZXNzICh0aG91Z2ggbm9uZSBjdXJyZW50bHkgZXhpc3QpLgogIHdpbmRvdy5IVE1MV2lkZ2V0cyA9IHdpbmRvdy5IVE1MV2lkZ2V0cyB8fCB7fTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gYSB2aWV3ZXIgcGFuZS4gSWYgbm90LCB3ZSdyZSBpbiBhIHdlYiBicm93c2VyLgogIHZhciB2aWV3ZXJNb2RlID0gd2luZG93LkhUTUxXaWRnZXRzLnZpZXdlck1vZGUgPQogICAgICAvXGJ2aWV3ZXJfcGFuZT0xXGIvLnRlc3Qod2luZG93LmxvY2F0aW9uKTsKCiAgLy8gU2VlIGlmIHdlJ3JlIHJ1bm5pbmcgaW4gU2hpbnkgbW9kZS4gSWYgbm90LCBpdCdzIGEgc3RhdGljIGRvY3VtZW50LgogIC8vIE5vdGUgdGhhdCBzdGF0aWMgd2lkZ2V0cyBjYW4gYXBwZWFyIGluIGJvdGggU2hpbnkgYW5kIHN0YXRpYyBtb2RlcywgYnV0CiAgLy8gb2J2aW91c2x5LCBTaGlueSB3aWRnZXRzIGNhbiBvbmx5IG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W5jID0gZXZhbCgiKCIgKyB0YXNrICsgIikiKTsKICAgICAgICBpZiAodHlwZW9mKHRhc2tGdW5jKSAhPT0gImZ1bmN0aW9uIikgewogICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJUYXNrIG11c3QgYmUgYSBmdW5jdGlvbiEgU291cmNlOlxuIiArIHRhc2spOwogICAgICAgIH0KICAgICAgICB0YXNrRnVuYy5hcHBseSh0YXJnZXQsIHRoZXNlQXJncyk7CiAgICAgIH0pOwogICAgfQogIH0KCiAgZnVuY3Rpb24gaW5pdFNpemluZyhlbCkgewogICAgdmFyIHNpemluZyA9IHNpemluZ1BvbGljeShlbCk7CiAgICBpZiAoIXNpemluZykKICAgICAgcmV0dXJuOwoKICAgIHZhciBjZWwgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiaHRtbHdpZGdldF9jb250YWluZXIiKTsKICAgIGlmICghY2VsKQogICAgICByZXR1cm47CgogICAgaWYgKHR5cGVvZihzaXppbmcucGFkZGluZykgIT09ICJ1bmRlZmluZWQiKSB7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUubWFyZ2luID0gIjAiOwogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLnBhZGRpbmcgPSBwYWRkaW5nVG9Dc3ModW5wYWNrUGFkZGluZyhzaXppbmcucGFkZGluZykpOwogICAgfQoKICAgIGlmIChzaXppbmcuZmlsbCkgewogICAgICBkb2N1bWVudC5ib2R5LnN0eWxlLm92ZXJmbG93ID0gImhpZGRlbiI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUud2lkdGggPSAiMTAwJSI7CiAgICAgIGRvY3VtZW50LmJvZHkuc3R5bGUuaGVpZ2h0ID0gIjEwMCUiOwogICAgICBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuc3R5bGUud2lkdGggPSAiMTAwJSI7CiAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5zdHlsZS5oZWlnaHQgPSAiMTAwJSI7CiAgIC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gdG8gc2hyaW5rOyBzbyB1c2UgbWF4LXdpZHRoIGluc3RlYWQKICAgICAgICAgICAgLmNzcygibWF4V2lkdGgiLCBlbC5vZmZzZXRXaWR0aCkKICAgICAgICAgICAgLmNzcygiaGVpZ2h0IiwgZWwub2Zmc2V0SGVpZ2h0KTsKICAgICAgICAgIGVycm9yRGl2LnRleHQoZXJyLm1lc3NhZ2UpOwogICAgICAgICAgJGVsLmFmdGVyKGVycm9yRGl2KTsKCiAgICAgICAgICAvLyBSZWFsbHkgZHVtYiB3YXkgdG8ga2VlcCB0aGUgc2l6ZS9wb3NpdGlvbiBvZiB0aGUgZXJyb3IgaW4gc3luYyB3aXRoCiAgICAgICAgICAvLyB0aGUgcGFyZW50IGVsZW1lbnQgYXMgdGhlIHdpbmRvdyBpcyByZXNpemVkIG9yIHdoYXRldmVyLgogICAgICAgICAgdmFyIGludElkID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmICghZXJyb3JEaXZbMF0ucGFyZW50RWxlbWVudCkgewogICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW50SWQpOwogICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvckRpdgogICAgICAgICAgICAgIC5jc3MoInRvcCIsIGVsLm9mZnNldFRvcCkKICAgICAgICAgICAgICAuY3NzKCJsZWZ0IiwgZWwub2Zmc2V0TGVmdCkKICAgICAgICAgICAgICAuY3NzKCJtYXhXaWR0aCIsIGVsLm9mZnNldFdpZHRoKQogICAgICAgICAgICAgIC5jc3MoImhlaWdodCIsIGVsLm9mZnNldEhlaWdodCk7CiAgICAgICAgICB9LCA1MDApOwogICAgICAgIH0KICAgICAgfQogICAgfSwKICAgIGNsZWFyRXJyb3I6IGZ1bmN0aW9uKGVsKSB7CiAgICAgIHZhciAkZWwgPSAkKGVsKTsKICAgICAgdmFyIGRpc3BsYXkgPSAkZWwuZGF0YSgicmVzdG9yZS1kaXNw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GF0YS5ldmFscyA9IFtkYXRhLmV2YWxzXTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgZGF0YS5ldmFscyAmJiBpIDwgZGF0YS5ldmFscy5sZW5ndGg7IGkrKykgewogICAgICAgICAgd2luZG93LkhUTUxXaWRnZXRzLmV2YWx1YXRlU3RyaW5nTWVtYmVyKGRhdGEueCwgZGF0YS5ldmFsc1tpXSk7CiAgICAgICAgfQogICAgICAgIGlmICghYmluZGluZ0RlZi5yZW5kZXJPbk51bGxWYWx1ZSkgewogICAgICAgICAgaWYgKGRhdGEueCA9PT0gbnVsbCkgewogICAgICAgICAgICBlbC5zdHlsZS52aXNpYmlsaXR5ID0gImhpZGRlbiI7CiAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGVsLnN0eWxlLnZpc2liaWxpdHkgPSAiaW5oZXJpdCI7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmICghZWxlbWVudERhdGEoZWwsICJpbml0aWFsaXplZCIpKSB7CiAgICAgICAgICBpbml0U2l6aW5nKGVsKTsKCiAgICAgICAgICBlbGVtZW50RGF0YShlbCwgImluaXRpYWxpemVkIiwgdHJ1ZSk7CiAgICAgICAgICBpZiAoYmluZGluZ0RlZi5pbml0aWFsaXplKSB7CiAgICAgICAgICAgIHZhciByZXN1bHQgPSBiaW5kaW5nRGVmLmluaXRpYWxpemUoZWwsIGVsLm9mZnNldFdpZHRoLAogICAgICAgICAgICAgIGVsLm9mZnNldEhlaWdodCk7CiAgICAgICAgICAgIGVsZW1lbnREYXRhKGVsLCAiaW5pdF9yZXN1bHQiLCByZXN1bHQpOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBiaW5kaW5nRGVmLnJlbmRlclZhbHVlKGVsLCBkYXRhLngsIGVsZW1lbnREYXRhKGVsLCAiaW5pdF9yZXN1bHQiKSk7CiAgICAgICAgZXZhbEFuZFJ1bihkYXRhLmpzSG9va3MucmVuZGVyLCBl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ICApOwogICAgICAgICAgZWxlbWVudERhdGEoZWwsICJpbml0X3Jlc3VsdCIsIGluaXRSZXN1bHQpOwogICAgICAgIH0KCiAgICAgICAgaWYgKGJpbmRpbmcucmVzaXplKSB7CiAgICAgICAgICB2YXIgbGFzdFNpemUgPSB7fTsKICAgICAgICAgIHZhciByZXNpemVIYW5kbGVyID0gZnVuY3Rpb24oZSkgewogICAgICAgICAgICB2YXIgc2l6ZSA9IHsKICAgICAgICAgICAgICB3OiBzaXplT2JqID8gc2l6ZU9iai5nZXRXaWR0aCgpIDogZWwub2Zmc2V0V2lkdGgsCiAgICAgICAgICAgICAgaDogc2l6ZU9iaiA/IHNpemVPYmouZ2V0SGVpZ2h0KCkgOiBlbC5vZmZzZXRIZWlnaHQKICAgICAgICAgICAgfTsKICAgICAgICAgICAgaWYgKHNpemUudyA9PT0gMCAmJiBzaXplLmggPT09IDApCiAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICBpZiAoc2l6ZS53ID09PSBsYXN0U2l6ZS53ICYmIHNpemUuaCA9PT0gbGFzdFNpemUuaCkKICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgIGxhc3RTaXplID0gc2l6ZTsKICAgICAgICAgICAgYmluZGluZy5yZXNpemUoZWwsIHNpemUudywgc2l6ZS5oLCBpbml0UmVzdWx0KTsKICAgICAgICAgIH07CgogICAgICAgICAgb24od2luZG93LCAicmVzaXplIiwgcmVzaXplSGFuZGxlcik7CgogICAgICAgICAgLy8gVGhpcyBpcyBuZWVkZWQgZm9yIGNhc2VzIHdoZXJlIHdlJ3JlIHJ1bm5pbmcgaW4gYSBTaGlueQogICAgICAgICAgLy8gYXBwLCBidXQgdGhlIHdpZGdldCBpdHNlbGYgaXMgbm90IGEgU2hpbnkgb3V0cHV0LCBidXQKICAgICAgICAgIC8vIHJhdGhlciBhIHNpbXBsZSBzdGF0aWMgd2lkZ2V0LiBPbmUgZXhhbXBsZSBvZiB0aGlzIGlzCiAgICAgICAgICAvL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IHdpZHRoLCBoZWlnaHQpIHsKICAgICAgICByZXR1cm4gZGVmbi5mYWN0b3J5KGVsLCB3aWR0aCwgaGVpZ2h0KTsKICAgICAgfSwKICAgICAgcmVuZGVyVmFsdWU6IGZ1bmN0aW9uKGVsLCB4LCBpbnN0YW5jZSkgewogICAgICAgIHJldHVybiBpbnN0YW5jZS5yZW5kZXJWYWx1ZSh4KTsKICAgICAgfSwKICAgICAgcmVzaXplOiBmdW5jdGlvbihlbCwgd2lkdGgsIGhlaWdodCwgaW5zdGFuY2UpIHsKICAgICAgICByZXR1cm4gaW5zdGFuY2UucmVzaXplKHdpZHRoLCBoZWlnaHQpOwogICAgICB9CiAgICB9OwoKICAgIGlmIChkZWZuLmZpbmQpCiAgICAgIHJlc3VsdC5maW5kID0gZGVmbi5maW5kOwogICAgaWYgKGRlZm4ucmVuZGVyRXJyb3IpCiAgICAgIHJlc3VsdC5yZW5kZXJFcnJvciA9IGRlZm4ucmVuZGVyRXJyb3I7CiAgICBpZiAoZGVmbi5jbGVhckVycm9yKQogICAgICByZXN1bHQuY2xlYXJFcnJvciA9IGRlZm4uY2xlYXJFcnJvcjsKCiAgICByZXR1cm4gcmVzdWx0OwogIH0KfSkoKTsKCg=="></script>
<script src="data:application/x-javascript;base64,LyohIGpRdWVyeSB2MS4xMi40IHwgKGMpIGpRdWVyeSBGb3VuZGF0aW9uIHwganF1ZXJ5Lm9yZy9saWNlbnNlICovCiFmdW5jdGlvbihhLGIpeyJvYmplY3QiPT10eXBlb2YgbW9kdWxlJiYib2JqZWN0Ij09dHlwZW9mIG1vZHVsZS5leHBvcnRzP21vZHVsZS5leHBvcnRzPWEuZG9jdW1lbnQ/YihhLCEwKTpmdW5jdGlvbihhKXtpZighYS5kb2N1bWVudCl0aHJvdyBuZXcgRXJyb3IoImpRdWVyeSByZXF1aXJlcyBhIHdpbmRvdyB3aXRoIGEgZG9jdW1lbnQiKTtyZXR1cm4gYihhKX06YihhKX0oInVuZGVmaW5lZCIhPXR5c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cnk9PT1uJiYoYS5qUXVlcnk9bmMpLG59LGJ8fChhLmpRdWVyeT1hLiQ9biksbn0pOwo="></script>
<link href="data:text/css;charset=utf-8,%0A%2Eleaflet%2Dpane%2C%0A%2Eleaflet%2Dtile%2C%0A%2Eleaflet%2Dmarker%2Dicon%2C%0A%2Eleaflet%2Dmarker%2Dshadow%2C%0A%2Eleaflet%2Dtile%2Dcontainer%2C%0A%2Eleaflet%2Dpane%20%3E%20svg%2C%0A%2Eleaflet%2Dpane%20%3E%20canvas%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%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%0A%2Eleaflet%2Dsafari%20%2Eleaflet%2Dtile%20%7B%0Aimage%2Drendering%3A%20%2Dwebkit%2Doptimize%2Dcontrast%3B%0A%7D%0A%0A%2Eleaflet%2Dsafari%20%2Eleaflet%2Dtile%2Dcontainer%20%7B%0Awidth%3A%201600px%3B%0Aheight%3A%201600px%3B%0A%2Dwebkit%2Dtransform%2Dorigin%3A%200%200%3B%0A%7D%0A%2Eleaflet%2Dmarker%2Dicon%2C%0A%2Eleaflet%2Dmarker%2Dshadow%20%7B%0Adisplay%3A%20block%3B%0A%7D%0A%0A%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Doverlay%2Dpane%20svg%2C%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dmarker%2Dpane%20img%2C%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dshadow%2Dpane%20img%2C%0A%2Eleaflet%2Dcontainer%20%2Eleaflet%2Dtile%2Dpane%20img%2C%0A%2Eleaflet%2Dcontainer%20img%2Eleaflet%2Dimage%2Dlayer%20%7B%0Amax%2Dwidth%3A%20none%20%21important%3B%0Amax%2Dheight%3A%20none%20%21important%3B%0A%7D%0A%2Eleaflet%2Dcontainer%2Eleaflet%2Dtouch%2Dzoom%20%7B%0A%2Dms%2Dtouch%2Daction%3A%20pan%2Dx%20pan%2Dy%3B%0Atouch%2Daction%3A%20pan%2Dx%20pan%2Dy%3B%0A%7D%0A%2Eleaflet%2Dcontainer%2Eleaflet%2Dtouch%2Ddrag%20%7B%0A%2Dms%2Dtouch%2Daction%3A%20pinch%2Dzoom%3B%0A%0Atouch%2Daction%3A%20none%3B%0Atouch%2Daction%3A%20pinch%2Dzoom%3B%0A%7D%0A%2Eleaflet%2Dcontainer%2Eleaflet%2Dtouch%2Ddrag%2Eleaflet%2Dtouch%2Dzoom%20%7B%0A%2Dms%2Dtouch%2Daction%3A%20none%3B%0Atouch%2Daction%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20%7B%0A%2Dwebkit%2Dtap%2Dhighlight%2Dcolor%3A%20transparent%3B%0A%7D%0A%2Eleaflet%2Dcontainer%20a%20%7B%0A%2Dwebkit%2Dtap%2Dhighlight%2Dcolor%3A%20rgba%2851%2C%20181%2C%20229%2C%200%2E4%29%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%2Dmoz%2Dbox%2Dsizing%3A%20border%2Dbox%3B%0Abox%2Dsizing%3A%20border%2Dbox%3B%0Az%2Dindex%3A%20800%3B%0A%7D%0A%0A%2Eleaflet%2Doverlay%2Dpane%20svg%20%7B%0A%2Dmoz%2Duser%2Dselect%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dpane%20%7B%20z%2Dindex%3A%20400%3B%20%7D%0A%2Eleaflet%2Dtile%2Dpane%20%7B%20z%2Dindex%3A%20200%3B%20%7D%0A%2Eleaflet%2Doverlay%2Dpane%20%7B%20z%2Dindex%3A%20400%3B%20%7D%0A%2Eleaflet%2Dshadow%2Dpane%20%7B%20z%2Dindex%3A%20500%3B%20%7D%0A%2Eleaflet%2Dmarker%2Dpane%20%7B%20z%2Dindex%3A%20600%3B%20%7D%0A%2Eleaflet%2Dtooltip%2Dpane%20%7B%20z%2Dindex%3A%20650%3B%20%7D%0A%2Eleaflet%2Dpopup%2Dpane%20%7B%20z%2Dindex%3A%20700%3B%20%7D%0A%2Eleaflet%2Dmap%2Dpane%20canvas%20%7B%20z%2Dindex%3A%20100%3B%20%7D%0A%2Eleaflet%2Dmap%2Dpane%20svg%20%7B%20z%2Dindex%3A%20200%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%20800%3B%0Apointer%2Devents%3A%20visiblePainted%3B%20%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%20%7B%0Awill%2Dchange%3A%20opacity%3B%0A%7D%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%2Dmap%2Dpane%20%2Eleaflet%2Dpopup%20%7B%0Aopacity%3A%201%3B%0A%7D%0A%2Eleaflet%2Dzoom%2Danimated%20%7B%0A%2Dwebkit%2Dtransform%2Dorigin%3A%200%200%3B%0A%2Dms%2Dtransform%2Dorigin%3A%200%200%3B%0Atransform%2Dorigin%3A%200%200%3B%0A%7D%0A%2Eleaflet%2Dzoom%2Danim%20%2Eleaflet%2Dzoom%2Danimated%20%7B%0Awill%2Dchange%3A%20transform%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%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%2Dinteractive%20%7B%0Acursor%3A%20pointer%3B%0A%7D%0A%2Eleaflet%2Dgrab%20%7B%0Acursor%3A%20%2Dwebkit%2Dgrab%3B%0Acursor%3A%20%2Dmoz%2Dgrab%3B%0A%7D%0A%2Eleaflet%2Dcrosshair%2C%0A%2Eleaflet%2Dcrosshair%20%2Eleaflet%2Dinteractive%20%7B%0Acursor%3A%20crosshair%3B%0A%7D%0A%2Eleaflet%2Dpopup%2Dpane%2C%0A%2Eleaflet%2Dcontrol%20%7B%0Acursor%3A%20auto%3B%0A%7D%0A%2Eleaflet%2Ddragging%20%2Eleaflet%2Dgrab%2C%0A%2Eleaflet%2Ddragging%20%2Eleaflet%2Dgrab%20%2Eleaflet%2Dinteractive%2C%0A%2Eleaflet%2Ddragging%20%2Eleaflet%2Dmarker%2Ddraggable%20%7B%0Acursor%3A%20move%3B%0Acursor%3A%20%2Dwebkit%2Dgrabbing%3B%0Acursor%3A%20%2Dmoz%2Dgrabbing%3B%0A%7D%0A%0A%2Eleaflet%2Dmarker%2Dicon%2C%0A%2Eleaflet%2Dmarker%2Dshadow%2C%0A%2Eleaflet%2Dimage%2Dlayer%2C%0A%2Eleaflet%2Dpane%20%3E%20svg%20path%2C%0A%2Eleaflet%2Dtile%2Dcontainer%20%7B%0Apointer%2Devents%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dmarker%2Dicon%2Eleaflet%2Dinteractive%2C%0A%2Eleaflet%2Dimage%2Dlayer%2Eleaflet%2Dinteractive%2C%0A%2Eleaflet%2Dpane%20%3E%20svg%20path%2Eleaflet%2Dinteractive%20%7B%0Apointer%2Devents%3A%20visiblePainted%3B%20%0Apointer%2Devents%3A%20auto%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%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20a%3Afirst%2Dchild%20%7B%0Aborder%2Dtop%2Dleft%2Dradius%3A%202px%3B%0Aborder%2Dtop%2Dright%2Dradius%3A%202px%3B%0A%7D%0A%2Eleaflet%2Dtouch%20%2Eleaflet%2Dbar%20a%3Alast%2Dchild%20%7B%0Aborder%2Dbottom%2Dleft%2Dradius%3A%202px%3B%0Aborder%2Dbottom%2Dright%2Dradius%3A%202px%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%2Dtouch%20%2Eleaflet%2Dcontrol%2Dzoom%2Din%2C%20%2Eleaflet%2Dtouch%20%2Eleaflet%2Dcontrol%2Dzoom%2Dout%20%7B%0Afont%2Dsize%3A%2022px%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%2CiVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc%2BqTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6%2Fee%2FXeCQ4D3ykPtL5tHno4n0d%2Fh3%2BxfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi%2FIOB0v7rVC7q45Q3Gr5K6jt%2B3Gl5nCoDD4MtO%2Bj96Wu8atmhGqcNGHObuf8OM%2Fx3AMx38%2B4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp%2BPfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a%2FPG2yutpS%2FVol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7q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APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo%2FUEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc%2F0PstHHcfEdQ%2BUAAAAASUVORK5CYII%3D%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%2Dscrollbar%20%7B%0Aoverflow%2Dy%3A%20scroll%3B%0Aoverflow%2Dx%3A%20hidden%3B%0Apadding%2Dright%3A%205px%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%2Ddefault%2Dicon%2Dpath%20%7B%0Abackground%2Dimage%3A%20url%28data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq%2FbXZtrp%2FlWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq%2FRBpykd8oZUb%2FkaJutow8r1aP9II0WmLKLIsJyv1w%2Fkqw9Ch2MYdB%2B%2B12Onxee%2FQMwvf4%2FDk%2FLfp%2Fi4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg%2FFm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B%2BOadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7%2FXZKNH%2B9%2BhBLOHYozuKQPxyMPUKkrX%2FK0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz%2BbXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U%2Bw7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue%2FuDivd3fkWRbS6%2FIA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7%2F6U%2BqH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts%2BHEa73u6dT3FNWwflY86eMHPk%2BYu%2Bi6pzUpRrW7SNDg5JHR4KapmM5W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IjweHQS4%2FpduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON%2BdfNbM%2BGgIwYdwAAAAASUVORK5CYII%3D%29%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%20border%2Dbox%3B%0Abox%2Dsizing%3A%20border%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%0Amargin%2Dbottom%3A%2020px%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%0Awidth%3A%2040px%3B%0Aheight%3A%2020px%3B%0Aposition%3A%20absolute%3B%0Aleft%3A%2050%25%3B%0Amargin%2Dleft%3A%20%2D20px%3B%0Aoverflow%3A%20hidden%3B%0Apointer%2Devents%3A%20none%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%0Acolor%3A%20%23333%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%0Aborder%3A%20none%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%0A%0A%0A%2Eleaflet%2Dtooltip%20%7B%0Aposition%3A%20absolute%3B%0Apadding%3A%206px%3B%0Abackground%2Dcolor%3A%20%23fff%3B%0Aborder%3A%201px%20solid%20%23fff%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23222%3B%0Awhite%2Dspace%3A%20nowrap%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%0Abox%2Dshadow%3A%200%201px%203px%20rgba%280%2C0%2C0%2C0%2E4%29%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dclickable%20%7B%0Acursor%3A%20pointer%3B%0Apointer%2Devents%3A%20auto%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dtop%3Abefore%2C%0A%2Eleaflet%2Dtooltip%2Dbottom%3Abefore%2C%0A%2Eleaflet%2Dtooltip%2Dleft%3Abefore%2C%0A%2Eleaflet%2Dtooltip%2Dright%3Abefore%20%7B%0Aposition%3A%20absolute%3B%0Apointer%2Devents%3A%20none%3B%0Aborder%3A%206px%20solid%20transparent%3B%0Abackground%3A%20transparent%3B%0Acontent%3A%20%22%22%3B%0A%7D%0A%0A%2Eleaflet%2Dtooltip%2Dbottom%20%7B%0Amargin%2Dtop%3A%206px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dtop%20%7B%0Amargin%2Dtop%3A%20%2D6px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dbottom%3Abefore%2C%0A%2Eleaflet%2Dtooltip%2Dtop%3Abefore%20%7B%0Aleft%3A%2050%25%3B%0Amargin%2Dleft%3A%20%2D6px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dtop%3Abefore%20%7B%0Abottom%3A%200%3B%0Amargin%2Dbottom%3A%20%2D12px%3B%0Aborder%2Dtop%2Dcolor%3A%20%23fff%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dbottom%3Abefore%20%7B%0Atop%3A%200%3B%0Amargin%2Dtop%3A%20%2D12px%3B%0Amargin%2Dleft%3A%20%2D6px%3B%0Aborder%2Dbottom%2Dcolor%3A%20%23fff%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dleft%20%7B%0Amargin%2Dleft%3A%20%2D6px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dright%20%7B%0Amargin%2Dleft%3A%206px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dleft%3Abefore%2C%0A%2Eleaflet%2Dtooltip%2Dright%3Abefore%20%7B%0Atop%3A%2050%25%3B%0Amargin%2Dtop%3A%20%2D6px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dleft%3Abefore%20%7B%0Aright%3A%200%3B%0Amargin%2Dright%3A%20%2D12px%3B%0Aborder%2Dleft%2Dcolor%3A%20%23fff%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Dright%3Abefore%20%7B%0Aleft%3A%200%3B%0Amargin%2Dleft%3A%20%2D12px%3B%0Aborder%2Dright%2Dcolor%3A%20%23fff%3B%0A%7D%0A" rel="stylesheet" />
<script src="data:application/x-javascript;base64,LyogQHByZXNlcnZlCiAqIExlYWZsZXQgMS4zLjErRGV0YWNoZWQ6IGJhNmY5N2ZmZjg2NDdlNzI0ZTRkZmU2NmQyZWQ3ZGExMWY5MDg5ODkuYmE2Zjk3ZiwgYSBKUyBsaWJyYXJ5IGZvciBpbnRlcmFjdGl2ZSBtYXBzLiBodHRwOi8vbGVhZmxldGpzLmNvbQogKiAoYykgMjAxMC0yMDE3IFZsYWRpbWlyIEFnYWZvbmtpbiwgKGMpIDIwMTAtMjAxMSBDbG91ZE1hZGUKICovCiFmdW5jdGlvbih0LGkpeyJvYmplY3QiPT10eXBlb2YgZXhwb3J0cyYmInVuZGVmaW5lZCIhPXR5cGVvZiBtb2R1bGU/aShleHBvcnRzKToiZnVuY3Rpb24iPT10eXBlb2YgZGVmaW5lJiZkZWZpbmUuYW1kP2RlZmluZShbImV4cG9ydHMiXSxpKTppKHQuTD17fSl9KHRoaXMsZnVuY3Rpb24odCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIGkodCl7dmFyIGksZSxuLG87Zm9yKGU9MSxuPWFyZ3VtZW50cy5sZW5ndGg7ZTxuO2UrKyl7bz1hcmd1bWVudHNb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Dradius%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%0Amargin%2Dright%3A%204px%3B%0Aopacity%3A%200%2E7%3B%0Adisplay%3A%20inline%2Dblock%3B%0Avertical%2Dalign%3A%20top%3B%0A%0Azoom%3A%201%3B%0A%2Adisplay%3A%20inline%3B%0A%7D%0A" rel="stylesheet" />
<script src="data:application/x-javascript;base64,IWZ1bmN0aW9uKGEpe2lmKCJvYmplY3QiPT10eXBlb2YgZXhwb3J0cyltb2R1bGUuZXhwb3J0cz1hKCk7ZWxzZSBpZigiZnVuY3Rpb24iPT10eXBlb2YgZGVmaW5lJiZkZWZpbmUuYW1kKWRlZmluZShhKTtlbHNle3ZhciBiOyJ1bmRlZmluZWQiIT10eXBlb2Ygd2luZG93P2I9d2luZG93OiJ1bmRlZmluZWQiIT10eXBlb2YgZ2xvYmFsP2I9Z2xvYmFsOiJ1bmRlZmluZWQiIT10eXBlb2Ygc2VsZiYmKGI9c2VsZiksYi5wcm9qND1hKCl9fShmdW5jdGlvbigpe3JldHVybiBmdW5jdGlvbiBhKGIsYyxkKXtmdW5jdGlvbiBlKGcsaCl7aWYoIWNbZ10pe2lmKCFiW2ddKXt2YXIgaT0iZnVuY3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FyIHNjYWxlID0gY3JzLnNjYWxlKHpvb20pOw0KDQoJCQlyZXR1cm4gdHJhbnNmb3JtYXRpb24udHJhbnNmb3JtKHBvaW50LCBzY2FsZSk7DQoJCX0NCgl9KTsNCg0KCUwuUHJvai5pbWFnZU92ZXJsYXkgPSBmdW5jdGlvbiAodXJsLCBib3VuZHMsIG9wdGlvbnMpIHsNCgkJcmV0dXJuIG5ldyBMLlByb2ouSW1hZ2VPdmVybGF5KHVybCwgYm91bmRzLCBvcHRpb25zKTsNCgl9Ow0KDQoJcmV0dXJuIEwuUHJvajsNCn0pKTsNCg=="></script>
<link href="data:text/css;charset=utf-8,%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%2C%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%3Abefore%2C%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%3Aafter%20%7B%0Abackground%3A%20none%3B%0Aborder%3A%20none%3B%0Abox%2Dshadow%3A%20none%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%2Eleaflet%2Dtooltip%2Dleft%20%7B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%2Eleaflet%2Dtooltip%2Dtext%2Donly%2Eleaflet%2Dtooltip%2Dright%20%7B%0Amargin%2Dleft%3A%20%2D5px%3B%0A%7D%0A%2Eleaflet%2Dtooltip%3Aafter%20%7B%0Aborder%2Dright%3A%206px%20solid%20transparent%3B%0A%0A%7D%0A%2Eleaflet%2Dpopup%2Dpane%20%2Eleaflet%2Dpopup%2Dtip%2Dcontainer%20%7B%0A%0Apointer%2Devents%3A%20all%3B%0A%0Acursor%3A%20pointer%3B%0A%7D%0A" rel="stylesheet" />
<script src="data:application/x-javascript;base64,KGZ1bmN0aW9uIGUodCxuLHIpe2Z1bmN0aW9uIHMobyx1KXtpZighbltvXSl7aWYoIXRb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dG9yZShtYXApIHsKICAgIF9jbGFzc0NhbGxDaGVjayh0aGlzLCBDb250cm9sU3RvcmUpOwoKICAgIHRoaXMuX2NvbnRyb2xzTm9JZCA9IFtdOwogICAgdGhpcy5fY29udHJvbHNCeUlkID0ge307CiAgICB0aGlzLl9tYXAgPSBtYXA7CiAgfQoKICBfY3JlYXRlQ2xhc3MoQ29udHJvbFN0b3JlLCBbewogICAga2V5OiAiYWRkIiwKICAgIHZhbHVlOiBmdW5jdGlvbiBhZGQoY29udHJvbCwgaWQsIGh0bWwpIHsKICAgICAgaWYgKHR5cGVvZiBpZCAhPT0gInVuZGVmaW5lZCIgJiYgaWQgIT09IG51bGwpIHsKICAgICAgICBpZiAodGhpcy5fY29udHJvbHNCeUlkW2lkXSkgewogICAgICAgICAgdGhpcy5fbWFwLnJlbW92ZUNvbnRyb2wodGhpcy5fY29udHJvbHNCeUlkW2lkXSk7CiAgICAgICAgfQogICAgICAgIHRoaXMuX2NvbnRyb2xzQnlJZFtpZF0gPSBjb250cm9sOwogICAgICB9IGVsc2UgewogICAgICAgIHRoaXMuX2NvbnRyb2xzTm9JZC5wdXNoKGNvbnRyb2wpOwogICAgICB9CiAgICAgIHRoaXMuX21hcC5hZGRDb250cm9sKGNvbnRyb2wpOwogICAgfQogIH0sIHsKICAgIGtleTogImdldCIsCiAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0KGlkKSB7CiAgICAgIHZhciBjb250cm9sID0gbnVsbDsKICAgICAgaWYgKHRoaXMuX2NvbnRyb2xzQnlJZFtpZF0pIHsKICAgICAgICBjb250cm9sID0gdGhpcy5fY29udHJvbHNCeUlkW2lkXTsKICAgICAgfQogICAgICByZXR1cm4gY29udHJvbDsKICAgIH0KICB9LCB7CiAgICBrZXk6ICJyZW1vdmUiLAogICAgdmFsdWU6IGZ1bmN0aW9uIHJlbW92ZShpZCkgewogICAgICBpZiAodGhpcy5fY29udHJvbHNCeUlkW2lkXSkgewogICAgICAgIHZhciBjb250cm9sID0gdG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B0aGlzOwogICAgfQogIH0sIHsKICAgIGtleTogImNiaW5kIiwKICAgIHZhbHVlOiBmdW5jdGlvbiBjYmluZChvYmosIHN0cmljdCkgewogICAgICB2YXIgX3RoaXMyID0gdGhpczsKCiAgICAgIE9iamVjdC5rZXlzKG9iaikuZm9yRWFjaChmdW5jdGlvbiAobmFtZSkgewogICAgICAgIHZhciBjb2xkYXRhID0gb2JqW25hbWVdOwogICAgICAgIF90aGlzMi5jb2wobmFtZSwgY29sZGF0YSk7CiAgICAgIH0pOwogICAgICByZXR1cm4gdGhpczsKICAgIH0KICB9LCB7CiAgICBrZXk6ICJnZXQiLAogICAgdmFsdWU6IGZ1bmN0aW9uIGdldChyb3csIGNvbCwgbWlzc2luZ09LKSB7CiAgICAgIHZhciBfdGhpczMgPSB0aGlzOwoKICAgICAgaWYgKHJvdyA+IHRoaXMuZWZmZWN0aXZlTGVuZ3RoKSB0aHJvdyBuZXcgRXJyb3IoIlJvdyBhcmd1bWVudCB3YXMgb3V0IG9mIGJvdW5kczogIiArIHJvdyArICIgPiAiICsgdGhpcy5lZmZlY3RpdmVMZW5ndGgpOwoKICAgICAgdmFyIGNvbEluZGV4ID0gLTE7CiAgICAgIGlmICh0eXBlb2YgY29sID09PSAidW5kZWZpbmVkIikgewogICAgICAgIHZhciBfcmV0ID0gZnVuY3Rpb24gKCkgewogICAgICAgICAgdmFyIHJvd0RhdGEgPSB7fTsKICAgICAgICAgIF90aGlzMy5jb2xuYW1lcy5mb3JFYWNoKGZ1bmN0aW9uIChuYW1lLCBpKSB7CiAgICAgICAgICAgIHJvd0RhdGFbbmFtZV0gPSBfdGhpczMuY29sdW1uc1tpXVtyb3cgJSBfdGhpczMuY29sdW1uc1tpXS5sZW5ndGhdOwogICAgICAgICAgfSk7CiAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICB2OiByb3dEYXRhCiAgICAgICAgICB9OwogICAgICAgIH0oKTsKCiAgICAgICAgaWYgKCh0eXBlb2YgX3JldCA9PT0gInV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WVySWQgPSBudWxsOwoKICAgICAgICAgICAgbWFwLm9uKCJtb3ZlZW5kIiwgZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgICB1cGRhdGVCb3VuZHMoZS50YXJnZXQpOwogICAgICAgICAgICB9KS5vbigibGF5ZXJhZGQgbGF5ZXJyZW1vdmUiLCBmdW5jdGlvbiAoZSkgewogICAgICAgICAgICAgIC8vIElmIHRoZSBsYXllciB0aGF0J3MgY29taW5nIG9yIGdvaW5nIGlzIGEgZ3JvdXAgd2UgY3JlYXRlZCwgdGVsbAogICAgICAgICAgICAgIC8vIHRoZSBzZXJ2ZXIuCiAgICAgICAgICAgICAgaWYgKG1hcC5sYXllck1hbmFnZXIuZ2V0R3JvdXBOYW1lRnJvbUxheWVyR3JvdXAoZS5sYXllcikpIHsKICAgICAgICAgICAgICAgIC8vIEJ1dCB0byBhdm9pZCBjaGF0dGluZXNzLCBjb2FsZXNjZSBldmVudHMKICAgICAgICAgICAgICAgIGlmIChncm91cFRpbWVySWQpIHsKICAgICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KGdyb3VwVGltZXJJZCk7CiAgICAgICAgICAgICAgICAgIGdyb3VwVGltZXJJZCA9IG51bGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBncm91cFRpbWVySWQgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgZ3JvdXBUaW1lcklkID0gbnVsbDsKICAgICAgICAgICAgICAgICAgX3NoaW55Mi5kZWZhdWx0Lm9uSW5wdXRDaGFuZ2UobWFwLmlkICsgIl9ncm91cHMiLCBtYXAubGF5ZXJNYW5hZ2VyLmdldFZpc2libGVHcm91cHMoKSk7CiAgICAgICAgICAgICAgICB9LCAxMDApOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICB9KSgpOwogICAgICAgIH0KICAgICAgICB0aGlzLmRvUmVuZGVyVmFsdWUoZGF0YSwgbWFwKTs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BkYXRhLmxpbWl0cy5sYXRbMF0gPSBkYXRhLmxpbWl0cy5sYXRbMF0gLSBwYWQ7CiAgICAgICAgICAgICAgZGF0YS5saW1pdHMubGF0WzFdID0gZGF0YS5saW1pdHMubGF0WzFdICsgcGFkOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChkYXRhLmxpbWl0cy5sbmdbMF0gPT09IGRhdGEubGltaXRzLmxuZ1sxXSkgewogICAgICAgICAgICAgIGRhdGEubGltaXRzLmxuZ1swXSA9IGRhdGEubGltaXRzLmxuZ1swXSAtIHBhZDsKICAgICAgICAgICAgICBkYXRhLmxpbWl0cy5sbmdbMV0gPSBkYXRhLmxpbWl0cy5sbmdbMV0gKyBwYWQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbWFwLmZpdEJvdW5kcyhbW2RhdGEubGltaXRzLmxhdFswXSwgZGF0YS5saW1pdHMubG5nWzBdXSwgW2RhdGEubGltaXRzLmxhdFsxXSwgZGF0YS5saW1pdHMubG5nWzFdXV0pOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgbWFwLmZpdFdvcmxkKCk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICBmb3IgKHZhciBpID0gMDsgZGF0YS5jYWxscyAmJiBpIDwgZGF0YS5jYWxscy5sZW5ndGg7IGkrKykgewogICAgICAgICAgdmFyIGNhbGwgPSBkYXRhLmNhbGxzW2ldOwogICAgICAgICAgaWYgKG1ldGhvZHNbY2FsbC5tZXRob2RdKSBtZXRob2RzW2NhbGwubWV0aG9kXS5hcHBseShtYXAsIGNhbGwuYXJncyk7ZWxzZSAoMCwgX3V0aWwubG9nKSgiVW5rbm93biBtZXRob2QgIiArIGNhbGwubWV0aG9kKTsKICAgICAgICB9CgogICAgICAgIG1hcC5sZWFmbGV0ci5oYXNSZW5kZXJlZCA9IHRydWU7CgogICAgICAgIGlmIChfaHRtbHdpZGdldHMyLmRlZmF1bHQuc2hpbnlNb2RlKSB7CiAgICAgICA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Ly8gYWxyZWFkeSBleGlzdC4KICAgICAgICBjb250YWluZXIgPSB0aGlzLmdldExheWVyR3JvdXAoZ3JvdXAsIHRydWUpOwogICAgICB9CgogICAgICAvLyBVcGRhdGUgY2F0ZWdvcnkgaW5kZXgKICAgICAgdGhpcy5fYnlDYXRlZ29yeVtjYXRlZ29yeV0gPSB0aGlzLl9ieUNhdGVnb3J5W2NhdGVnb3J5XSB8fCB7fTsKICAgICAgdGhpcy5fYnlDYXRlZ29yeVtjYXRlZ29yeV1bc3RhbXBdID0gbGF5ZXI7CgogICAgICAvLyBVcGRhdGUgc3RhbXAgaW5kZXgKICAgICAgdmFyIGxheWVySW5mbyA9IHRoaXMuX2J5U3RhbXBbc3RhbXBdID0gewogICAgICAgIGxheWVyOiBsYXllciwKICAgICAgICBncm91cDogZ3JvdXAsCiAgICAgICAgY3RHcm91cDogY3RHcm91cCwKICAgICAgICBjdEtleTogY3RLZXksCiAgICAgICAgbGF5ZXJJZDogbGF5ZXJJZCwKICAgICAgICBjYXRlZ29yeTogY2F0ZWdvcnksCiAgICAgICAgY29udGFpbmVyOiBjb250YWluZXIsCiAgICAgICAgaGlkZGVuOiBmYWxzZQogICAgICB9OwoKICAgICAgLy8gVXBkYXRlIGNyb3NzdGFsayBncm91cCBpbmRleAogICAgICBpZiAoY3RHcm91cCkgewogICAgICAgIChmdW5jdGlvbiAoKSB7CiAgICAgICAgICBpZiAobGF5ZXIuc2V0U3R5bGUpIHsKICAgICAgICAgICAgLy8gTmVlZCB0byBzYXZlIHRoaXMgaW5mbyBzbyB3ZSBrbm93IHdoYXQgdG8gc2V0IG9wYWNpdHkgdG8gbGF0ZXIKICAgICAgICAgICAgbGF5ZXIub3B0aW9ucy5vcmlnT3BhY2l0eSA9IHR5cGVvZiBsYXllci5vcHRpb25zLm9wYWNpdHkgIT09ICJ1bmRlZmluZWQiID8gbGF5ZXIub3B0aW9ucy5vcGFjaXR5IDogMC41OwogICAgICAgICAgICBsYXllci5vcHRpb25zLm9yaWdGaWxsT3BhY2l0eSA9IHR5cGVvZiBsYXllci5vcHRpb25zLmZpbGxPcGFjaXR5ICE9PSAidW5kZWZpbmVkIiA/IGxheWVyLm9wdGlvbnMuZmlsbE9wYWNpdHkgOiAwLjI7CiAgICAgICAgICB9CgogICAgICAgICAgdmFyIGN0ZyA9IF90aGlzLl9ieUNyb3NzdGFsa0dyb3VwW2N0R3JvdXBdOwogICAgICAgICAgaWYgKCFjdGcpIHsKICAgICAgICAgICAgKGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICBjdGcgPSBfdGhpcy5fYnlDcm9zc3RhbGtHcm91cFtjdEdyb3VwXSA9IHt9OwogICAgICAgICAgICAgIHZhciBjcm9zc3RhbGsgPSBnbG9iYWwuY3Jvc3N0YWxrOwoKICAgICAgICAgICAgICB2YXIgaGFuZGxlRmlsdGVyID0gZnVuY3Rpb24gaGFuZGxlRmlsdGVyKGUpIHsKICAgICAgICAgICAgICAgIGlmICghZS52YWx1ZSkgewogICAgICAgICAgICAgICAgICB2YXIgZ3JvdXBLZXlzID0gT2JqZWN0LmtleXMoY3RnKTsKICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBncm91cEtleXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICB2YXIga2V5ID0gZ3JvdXBLZXlzW2ldOwogICAgICAgICAgICAgICAgICAgIHZhciBfbGF5ZXJJbmZvID0gX3RoaXMuX2J5U3RhbXBbY3RnW2tleV1dOwogICAgICAgICAgICAgICAgICAgIF90aGlzLl9zZXRWaXNpYmlsaXR5KF9sYXllckluZm8sIHRydWUpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICB2YXIgc2VsZWN0ZWRLZXlzID0ge307CiAgICAgICAgICAgICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBlLnZhbHVlLmxlbmd0aDsgX2krKykgewogICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkS2V5c1tlLnZhbHVlW19pXV0gPSB0cnVlOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIHZhciBfZ3JvdXBLZXlzID0gT2JqZWN0LmtleXMoY3RnKTsKICAgICAgICAgICAgICAgICAgZm9yICh2YXIgX2kyID0gMDsgX2kyIDwgX2dyb3VwS2V5cy5sZW5ndGg7IF9pMisrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIF9rZXkgPSBfZ3JvdXBLZXlzW19pMl07CiAgICAgICAgICAgICAgICAgICAgdmFyIF9sYXllckluZm8yID0gX3RoaXMuX2J5U3RhbXBbY3RnW19rZXldXTsKICAgICAgICAgICAgICAgICAgICBfdGhpcy5fc2V0VmlzaWJpbGl0eShfbGF5ZXJJbmZvMiwgc2VsZWN0ZWRLZXlzW19ncm91cEtleXNbX2kyXV0pOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICB2YXIgZmlsdGVySGFuZGxlID0gbmV3IGNyb3NzdGFsay5GaWx0ZXJIYW5kbGUoY3RHcm91cCk7CiAgICAgICAgICAgICAgZmlsdGVySGFuZGxlLm9uKCJjaGFuZ2UiLCBoYW5kbGVGaWx0ZXIpOwoKICAgICAgICAgICAgICB2YXIgaGFuZGxlU2VsZWN0aW9uID0gZnVuY3Rpb24gaGFuZGxlU2VsZWN0aW9uKGUpIHsKICAgICAgICAgICAgICAgIGlmICghZS52YWx1ZSB8fCAhZS52YWx1ZS5sZW5ndGgpIHsKICAgICAgICAgICAgICAgICAgdmFyIGdyb3VwS2V5cyA9IE9iamVjdC5rZXlzKGN0Zyk7CiAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZ3JvdXBLZXlzLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgdmFyIGtleSA9IGdyb3VwS2V5c1tpXTsKICAgICAgICAgICAgICAgICAgICB2YXIgX2xheWVySW5mbzMgPSBfdGhpcy5fYnlTdGFtcFtjdGdba2V5XV07CiAgICAgICAgICAgICAgICAgICAgX3RoaXMuX3NldE9wYWNpdHkoX2xheWVySW5mbzMsIDEuMCk7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgIHZhciBzZWxlY3RlZEtleXMgPSB7fTsKICAgICAgICAgICAgICAgICAgZm9yICh2YXIgX2kzID0gMDsgX2kzIDwgZS52YWx1ZS5sZW5ndGg7IF9pMysrKSB7CiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRLZXlzW2UudmFsdWVbX2kzXV0gPSB0cnVlOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIHZhciBfZ3JvdXBLZXlzMiA9IE9iamVjdC5rZXlzKGN0Zyk7CiAgICAgICAgICAgICAgICAgIGZvciAodmFyIF9pNCA9IDA7IF9pNCA8IF9ncm91cEtleXMyLmxlbmd0aDsgX2k0KyspIHsKICAgICAgICAgICAgICAgICAgICB2YXIgX2tleTIgPSBfZ3JvdXBLZXlzMltfaTRdOwogICAgICAgICAgICAgICAgICAgIHZhciBfbGF5ZXJJbmZvNCA9IF90aGlzLl9ieVN0YW1wW2N0Z1tfa2V5Ml1dOwogICAgICAgICAgICAgICAgICAgIF90aGlzLl9zZXRPcGFjaXR5KF9sYXllckluZm80LCBzZWxlY3RlZEtleXNbX2dyb3VwS2V5czJbX2k0XV0gPyAxLjAgOiAwLjIpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICB2YXIgc2VsSGFuZGxlID0gbmV3IGNyb3NzdGFsay5TZWxlY3Rpb25IYW5kbGUoY3RHcm91cCk7CiAgICAgICAgICAgICAgc2VsSGFuZGxlLm9uKCJjaGFuZ2UiLCBoYW5kbGVTZWxlY3Rpb24pOwoKICAgICAgICAgICAgICBzZXRUa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WVycykuLi4KICAgICAgICBPYmplY3Qua2V5cyhjdGcpLmZvckVhY2goZnVuY3Rpb24gKGN0S2V5KSB7CiAgICAgICAgICAvLyAuLi5hbmQgZm9yIGVhY2ggbGF5ZXIuLi4KICAgICAgICAgIGN0Z1tjdEtleV0uZm9yRWFjaChmdW5jdGlvbiAoc3RhbXApIHsKICAgICAgICAgICAgdmFyIGxheWVySW5mbyA9IF90aGlzMi5fYnlTdGFtcFtzdGFtcF07CiAgICAgICAgICAgIC8vIC4uLmlmIGl0J3Mgc29tZXRoaW5nIHdpdGggYSBwb2ludC4uLgogICAgICAgICAgICBpZiAobGF5ZXJJbmZvLmxheWVyLmdldExhdExuZykgewogICAgICAgICAgICAgIC8vIC4uLiBhbmQgaXQncyBpbnNpZGUgdGhlIHNlbGVjdGlvbiBib3VuZHMuLi4KICAgICAgICAgICAgICAvLyBUT0RPOiBVc2UgcGl4ZWwgY29udGFpbm1lbnQsIG5vdCBsYXQvbG5nIGNvbnRhaW5tZW50CiAgICAgICAgICAgICAgaWYgKGJvdW5kcy5jb250YWlucyhsYXllckluZm8ubGF5ZXIuZ2V0TGF0TG5nKCkpKSB7CiAgICAgICAgICAgICAgICAvLyAuLi5hZGQgdGhlIGtleSB0byB0aGUgc2VsZWN0aW9uLgogICAgICAgICAgICAgICAgc2VsZWN0aW9uLnB1c2goY3RLZXkpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfSk7CiAgICAgICAgfSk7CiAgICAgICAgbmV3IGdsb2JhbC5jcm9zc3RhbGsuU2VsZWN0aW9uSGFuZGxlKGN0R3JvdXBOYW1lKS5zZXQoc2VsZWN0aW9uLCBleHRyYUluZm8pOwogICAgICB9KTsKICAgIH0KICB9LCB7CiAgICBrZXk6ICJ1bmJydXNoIiwKICAgIHZhbHVlOiBmdW5jdGlvbiB1bmJydXNoKGV4dHJhSW5mbykgewogICAgICBPYmplY3Qua2V5cyh0aGlzLl9ieUNyb3NzdGFsa0dyb3VwKS5mb3JFYWNoKGZ1bmN0aW9uIChjdEdyb3VwTmFtZSkgewogICAgICAgIG5ldyBnbG9iYWwuY3Jvc3N0YWxrLlNlbGVjdGlvbkhhbmRsZShjdEdyb3VwTmFtZSkuY2xlYXIoZXh0cmFJbmZvKTsKICAgICAgfSk7CiAgICB9CiAgfSwgewogICAga2V5OiAiX3NldFZpc2liaWxpdHkiLAogICAgdmFsdWU6IGZ1bmN0aW9uIF9zZXRWaXNpYmlsaXR5KGxheWVySW5mbywgdmlzaWJsZSkgewogICAgICBpZiAobGF5ZXJJbmZvLmhpZGRlbiBeIHZpc2libGUpIHsKICAgICAgICByZXR1cm47CiAgICAgIH0gZWxzZSBpZiAodmlzaWJsZSkgewogICAgICAgIGxheWVySW5mby5jb250YWluZXIuYWRkTGF5ZXIobGF5ZXJJbmZvLmxheWVyKTsKICAgICAgICBsYXllckluZm8uaGlkZGVuID0gZmFsc2U7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgbGF5ZXJJbmZvLmNvbnRhaW5lci5yZW1vdmVMYXllcihsYXllckluZm8ubGF5ZXIpOwogICAgICAgIGxheWVySW5mby5oaWRkZW4gPSB0cnVlOwogICAgICB9CiAgICB9CiAgfSwgewogICAga2V5OiAiX3NldE9wYWNpdHkiLAogICAgdmFsdWU6IGZ1bmN0aW9uIF9zZXRPcGFjaXR5KGxheWVySW5mbywgb3BhY2l0eSkgewogICAgICBpZiAobGF5ZXJJbmZvLmxheWVyLnNldE9wYWNpdHkpIHsKICAgICAgICBsYXllckluZm8ubGF5ZXIuc2V0T3BhY2l0eShvcGFjaXR5KTsKICAgICAgfSBlbHNlIGlmIChsYXllckluZm8ubGF5ZXIuc2V0U3R5bGUpIHsKICAgICAgICBsYXllckluZm8ubGF5ZXIuc2V0U3R5bGUoewogICAgICAgICAgb3BhY2l0eTogb3BhY2l0eSAqIGxheWVySW5mby5sYXllci5vcHRpb25zLm9yaWdPcGFjaXR5LAogICAgICAgICAgZmlsbE9wYWNpdHk6IG9w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YXVsdC5lYWNoKHRoaXMuX2dyb3VwQ29udGFpbmVycywgY2xlYXJMYXllckdyb3VwKTsKICAgICAgdGhpcy5fZ3JvdXBDb250YWluZXJzID0ge307CiAgICB9CiAgfSwgewogICAga2V5OiAiX3JlbW92ZUxheWVyIiwKICAgIHZhbHVlOiBmdW5jdGlvbiBfcmVtb3ZlTGF5ZXIobGF5ZXIpIHsKICAgICAgdmFyIHN0YW1wID0gdm9pZCAwOwogICAgICBpZiAodHlwZW9mIGxheWVyID09PSAic3RyaW5nIikgewogICAgICAgIHN0YW1wID0gbGF5ZXI7CiAgICAgIH0gZWxzZSB7CiAgICAgICAgc3RhbXAgPSBfbGVhZmxldDIuZGVmYXVsdC5VdGlsLnN0YW1wKGxheWVyKTsKICAgICAgfQoKICAgICAgdmFyIGxheWVySW5mbyA9IHRoaXMuX2J5U3RhbXBbc3RhbXBdOwogICAgICBpZiAoIWxheWVySW5mbykgewogICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgfQoKICAgICAgbGF5ZXJJbmZvLmNvbnRhaW5lci5yZW1vdmVMYXllcihzdGFtcCk7CiAgICAgIGlmICh0eXBlb2YgbGF5ZXJJbmZvLmdyb3VwID09PSAic3RyaW5nIikgewogICAgICAgIGRlbGV0ZSB0aGlzLl9ieUdyb3VwW2xheWVySW5mby5ncm91cF1bc3RhbXBdOwogICAgICB9CiAgICAgIGlmICh0eXBlb2YgbGF5ZXJJbmZvLmxheWVySWQgPT09ICJzdHJpbmciKSB7CiAgICAgICAgZGVsZXRlIHRoaXMuX2J5TGF5ZXJJZFt0aGlzLl9sYXllcklkS2V5KGxheWVySW5mby5jYXRlZ29yeSwgbGF5ZXJJbmZvLmxheWVySWQpXTsKICAgICAgfQogICAgICBkZWxldGUgdGhpcy5fYnlDYXRlZ29yeVtsYXllckluZm8uY2F0ZWdvcnldW3N0YW1wXTsKICAgICAgZGVsZXRlIHRoaXMuX2J5U3RhbXBbc3RhbXBdOwogICAgICBpZiAobGF5ZXJJbmZ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aGlzSWQpOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdGhpcy5sYXllck1hbmFnZXIuYWRkTGF5ZXIobWFya2VyLCAibWFya2VyIiwgdGhpc0lkLCB0aGlzR3JvdXAsIGRmLmdldChpLCAiY3RHcm91cCIsIHRydWUpLCBkZi5nZXQoaSwgImN0S2V5IiwgdHJ1ZSkpOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHBvcHVwID0gZGYuZ2V0KGksICJwb3B1cCIpOwogICAgICAgICAgdmFyIHBvcHVwT3B0aW9ucyA9IGRmLmdldChpLCAicG9wdXBPcHRpb25zIik7CiAgICAgICAgICBpZiAocG9wdXAgIT09IG51bGwpIHsKICAgICAgICAgICAgaWYgKHBvcHVwT3B0aW9ucyAhPT0gbnVsbCkgewogICAgICAgICAgICAgIG1hcmtlci5iaW5kUG9wdXAocG9wdXAsIHBvcHVwT3B0aW9ucyk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgbWFya2VyLmJpbmRQb3B1cChwb3B1cCk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHZhciBsYWJlbCA9IGRmLmdldChpLCAibGFiZWwiKTsKICAgICAgICAgIHZhciBsYWJlbE9wdGlvbnMgPSBkZi5nZXQoaSwgImxhYmVsT3B0aW9ucyIpOwogICAgICAgICAgaWYgKGxhYmVsICE9PSBudWxsKSB7CiAgICAgICAgICAgIGlmIChsYWJlbE9wdGlvbnMgIT09IG51bGwpIHsKICAgICAgICAgICAgICBpZiAobGFiZWxPcHRpb25zLnBlcm1hbmVudCkgewogICAgICAgICAgICAgICAgbWFya2VyLmJpbmRUb29sdGlwKGxhYmVsLCBsYWJlbE9wdGlvbnMpLm9wZW5Ub29sdGlwKCk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIG1hcmtlci5iaW5kVG9vbHRpcChsYWJlbCwgbGFiZWxPcHRpb25zKTsKICAgICAgICAgICAgICB9Ci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SWQgPSBkZi5nZXQoaSwgImxheWVySWQiKTsKICAgICAgICAgIHZhciB0aGlzR3JvdXAgPSBkZi5nZXQoaSwgImdyb3VwIik7CiAgICAgICAgICBfdGhpczQubGF5ZXJNYW5hZ2VyLmFkZExheWVyKGxheWVyLCBjYXRlZ29yeSwgdGhpc0lkLCB0aGlzR3JvdXAsIGRmLmdldChpLCAiY3RHcm91cCIsIHRydWUpLCBkZi5nZXQoaSwgImN0S2V5IiwgdHJ1ZSkpOwogICAgICAgICAgaWYgKGxheWVyLmJpbmRQb3B1cCkgewogICAgICAgICAgICB2YXIgcG9wdXAgPSBkZi5nZXQoaSwgInBvcHVwIik7CiAgICAgICAgICAgIHZhciBwb3B1cE9wdGlvbnMgPSBkZi5nZXQoaSwgInBvcHVwT3B0aW9ucyIpOwogICAgICAgICAgICBpZiAocG9wdXAgIT09IG51bGwpIHsKICAgICAgICAgICAgICBpZiAocG9wdXBPcHRpb25zICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgICBsYXllci5iaW5kUG9wdXAocG9wdXAsIHBvcHVwT3B0aW9ucyk7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGxheWVyLmJpbmRQb3B1cChwb3B1cCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAobGF5ZXIuYmluZFRvb2x0aXApIHsKICAgICAgICAgICAgdmFyIGxhYmVsID0gZGYuZ2V0KGksICJsYWJlbCIpOwogICAgICAgICAgICB2YXIgbGFiZWxPcHRpb25zID0gZGYuZ2V0KGksICJsYWJlbE9wdGlvbnMiKTsKICAgICAgICAgICAgaWYgKGxhYmVsICE9PSBudWxsKSB7CiAgICAgICAgICAgICAgaWYgKGxhYmVsT3B0aW9ucyAhPT0gbnVsbCkgewogICAgICAgICAgICAgICAgbGF5ZXIuYmluZFRvb2x0aXAobGFiZWwsIGxhYmVsT3B0aW9ucyk7CiAgICAgICAgICAgICAgfSBlb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B9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgIGxheWVyLm9uKCJtb3VzZW92ZXIiLCBmdW5jdGlvbiAoZSkgewogICAgICAgICAgICAgICAgdGhpcy5zZXRTdHlsZShoaWdobGlnaHRTdHlsZSk7CiAgICAgICAgICAgICAgICBpZiAoaGlnaGxpZ2h0U3R5bGUuYnJpbmdUb0Zyb250KSB7CiAgICAgICAgICAgICAgICAgIHRoaXMuYnJpbmdUb0Zyb250KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgbGF5ZXIub24oIm1vdXNlb3V0IiwgZnVuY3Rpb24gKGUpIHsKICAgICAgICAgICAgICAgIHRoaXMuc2V0U3R5bGUoZGVmYXVsdFN0eWxlKTsKICAgICAgICAgICAgICAgIGlmIChoaWdobGlnaHRTdHlsZS5zZW5kVG9CYWNrKSB7CiAgICAgICAgICAgICAgICAgIHRoaXMuYnJpbmdUb0JhY2soKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSkoKTsKICAgICAgICAgIH0KICAgICAgICB9KSgpOwogICAgICB9CiAgICB9KS5jYWxsKG1hcCk7CiAgfTsKCiAgZm9yICh2YXIgaSA9IDA7IGkgPCBkZi5ucm93KCk7IGkrKykgewogICAgX2xvb3AzKGkpOwogIH0KfQoKbWV0aG9kcy5hZGRHZW5lcmljTGF5ZXJzID0gYWRkTGF5ZXJzOwoKbWV0aG9kcy5hZGRDaXJjbGVzID0gZnVuY3Rpb24gKGxhdCwgbG5nLCByYWRpdXMsIGxheWVySWQsIGdyb3VwLCBvcHRpb25zLCBwb3B1cCwgcG9wdXBPcHRpb25zLCBsYWJlbCwgbGFiZWxPcHRpb25zLCBoaWdobGlnaHRPcHRpb25zLCBjcm9zc3RhbGtPcHRpb25zKSB7CiAgaWYgKCEoX2pxdWVyeTIuZGVmYXVsdC5pc0VtcHR5T2JqZW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8YnI+IjsKICAgICAgfQogICAgICBkaXYuaW5uZXJIVE1MID0gbGVnZW5kSFRNTDsKICAgIH0KICAgIGlmIChvcHRpb25zLnRpdGxlKSAoMCwgX2pxdWVyeTIuZGVmYXVsdCkoZGl2KS5wcmVwZW5kKCI8ZGl2IHN0eWxlPVwibWFyZ2luLWJvdHRvbTozcHhcIj48c3Ryb25nPiIgKyBvcHRpb25zLnRpdGxlICsgIjwvc3Ryb25nPjwvZGl2PiIpOwogICAgcmV0dXJuIGRpdjsKICB9OwoKICBpZiAob3B0aW9ucy5ncm91cCkgewogICAgKGZ1bmN0aW9uICgpIHsKICAgICAgLy8gQXV0byBnZW5lcmF0ZSBhIGxheWVySUQgaWYgbm90IHByb3ZpZGVkCiAgICAgIGlmICghb3B0aW9ucy5sYXllcklkKSB7CiAgICAgICAgb3B0aW9ucy5sYXllcklkID0gX2xlYWZsZXQyLmRlZmF1bHQuVXRpbC5zdGFtcChsZWdlbmQpOwogICAgICB9CgogICAgICB2YXIgbWFwID0gX3RoaXM1OwogICAgICBtYXAub24oIm92ZXJsYXlhZGQiLCBmdW5jdGlvbiAoZSkgewogICAgICAgIGlmIChlLm5hbWUgPT09IG9wdGlvbnMuZ3JvdXApIHsKICAgICAgICAgIG1hcC5jb250cm9scy5hZGQobGVnZW5kLCBvcHRpb25zLmxheWVySWQpOwogICAgICAgIH0KICAgICAgfSk7CiAgICAgIG1hcC5vbigib3ZlcmxheXJlbW92ZSIsIGZ1bmN0aW9uIChlKSB7CiAgICAgICAgaWYgKGUubmFtZSA9PT0gb3B0aW9ucy5ncm91cCkgewogICAgICAgICAgbWFwLmNvbnRyb2xzLnJlbW92ZShvcHRpb25zLmxheWVySWQpOwogICAgICAgIH0KICAgICAgfSk7CiAgICAgIG1hcC5vbigiZ3JvdXBhZGQiLCBmdW5jdGlvbiAoZSkgewogICAgICAgIGlmIChlLm5hbWUgPT09IG9wdGlvbnMuZ3JvdXApIHsKICAgICAgICAgIG1hcC5jb250cm9scy5hZ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ICAgICAgICAgICAgZXh0ZW50LnggKiAyNTYsIGV4dGVudC55ICogMjU2KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAvLyBVc2UgbWFudWFsIG5lYXJlc3QtbmVpZ2hib3IgaW50ZXJwb2xhdGlvbgoKICAgICAgICAgICAgLy8gQ2FsY3VsYXRlIHRoZSBzb3VyY2UgaW1hZ2UgcGl4ZWwgY29vcmRpbmF0ZXMgdGhhdCBjb3JyZXNwb25kIHdpdGgKICAgICAgICAgICAgLy8gdGhlIHRvcC1sZWZ0IGFuZCBib3R0b20tcmlnaHQgb2YgdGhpcyB0aWxlLiAoSWYgdGhlIHNvdXJjZSBpbWFnZQogICAgICAgICAgICAvLyBvbmx5IHBhcnRpYWxseSBvdmVybGFwcyB0aGUgdGlsZSwgd2UgdXNlIG1heC9taW4gdG8gbGltaXQgdGhlCiAgICAgICAgICAgIC8vIHNvdXJjZVN0YXJ0L0VuZCB0byBvbmx5IHJlZmxlY3QgdGhlIG92ZXJsYXBwaW5nIHBvcnRpb24uKQogICAgICAgICAgICB2YXIgc291cmNlU3RhcnQgPSB7CiAgICAgICAgICAgICAgeDogTWF0aC5tYXgoMCwgTWF0aC5mbG9vcigodGlsZVBvaW50LnggLSB0b3BMZWZ0LngpICogaW1nUmVzLngpKSwKICAgICAgICAgICAgICB5OiBNYXRoLm1heCgwLCBNYXRoLmZsb29yKCh0aWxlUG9pbnQueSAtIHRvcExlZnQueSkgKiBpbWdSZXMueSkpCiAgICAgICAgICAgIH07CiAgICAgICAgICAgIHZhciBzb3VyY2VFbmQgPSB7CiAgICAgICAgICAgICAgeDogTWF0aC5taW4odywgTWF0aC5jZWlsKCh0aWxlUG9pbnQueCArIDEgLSB0b3BMZWZ0LngpICogaW1nUmVzLngpKSwKICAgICAgICAgICAgICB5OiBNYXRoLm1pbihoLCBNYXRoLmNlaWwoKHRpbGVQb2ludC55ICsgMSAtIHRvcExlZnQueSkgKiBpbWdSZXMueSkpCiAgICAgICAgICAgIH07CgogICAgICAgICAgICAvLyBUaGUgc2l6ZSwgaW4gZGVzdCBwaXhlbHMsIHRoYXQgZWFjaCBzb3VyY2UgcGl4ZWwgc2hvdWxkIG9jY3VweS4KICAgICAgICAgICAgLy8gVGhpcyBtaWdodCBiZSBncmVhdGVyIG9yIGxlc3MgdGhhbiAxIChlLmcuIGlmIHggYW5kIHkgcmVzb2x1dGlvbgogICAgICAgICAgICAvLyBhcmUgdmVyeSBkaWZmZXJlbnQpLgogICAgICAgICAgICB2YXIgcGl4ZWxTaXplID0gewogICAgICAgICAgICAgIHg6IDI1NiAvIGltZ1Jlcy54LAogICAgICAgICAgICAgIHk6IDI1NiAvIGltZ1Jlcy55CiAgICAgICAgICAgIH07CgogICAgICAgICAgICAvLyBGb3IgZWFjaCBwaXhlbCBpbiB0aGUgc291cmNlIGltYWdlIHRoYXQgb3ZlcmxhcHMgdGhlIHRpbGUuLi4KICAgICAgICAgICAgZm9yICh2YXIgcm93ID0gc291cmNlU3RhcnQueTsgcm93IDwgc291cmNlRW5kLnk7IHJvdysrKSB7CiAgICAgICAgICAgICAgZm9yICh2YXIgY29sID0gc291cmNlU3RhcnQueDsgY29sIDwgc291cmNlRW5kLng7IGNvbCsrKSB7CiAgICAgICAgICAgICAgICAvLyAuLi5leHRyYWN0IHRoZSBwaXhlbCBkYXRhLi4uCiAgICAgICAgICAgICAgICB2YXIgaSA9IChyb3cgKiB3ICsgY29sKSAqIDQ7CiAgICAgICAgICAgICAgICB2YXIgciA9IGltZ0RhdGFbaV07CiAgICAgICAgICAgICAgICB2YXIgZyA9IGltZ0RhdGFbaSArIDFdOwogICAgICAgICAgICAgICAgdmFyIGIgPSBpbWdEYXRhW2kgKyAyXTsKICAgICAgICAgICAgICAgIHZhciBhID0gaW1nRGF0YVtpICsgM107CiAgICAgICAgICAgICAgICBjdHguZmlsbFN0eWxlID0gInJnYmEoIiArIFtyLCBnLCBiLCBhIC8gMjU1XS5qb2luKCIsIikgKyAiKSI7CgogICAgICAgICAgICAgICAgLy8gLi4uY2FsY3VsYXRlIHRoZSBjb3JyZXNwb25kaW5nIHBpeGVsIGNvb3JkIGluIHRoZSBkZXN0IGltYWdlCiAgICAgICAgICAgICAgICAvLyB3aGVyZSBpdCBzaG91bGQgYmUgZHJhd24uLi4KICAgICAgICAgICAgICAgIHZhciBwaXhlbFBvcyA9IHsKICAgICAgICAgICAgICAgICAgeDogKGNvbCAvIGltZ1Jlcy54ICsgdG9wTGVmdC54IC0gdGlsZVBvaW50LngpICogMjU2LAogICAgICAgICAgICAgICAgICB5OiAocm93IC8gaW1nUmVzLnkgKyB0b3BMZWZ0LnkgLSB0aWxlUG9pbnQueSkgKiAyNTYKICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgLy8gLi4uYW5kIGRyYXcgYSByZWN0YW5nbGUgdGhlcmUuCiAgICAgICAgICAgICAgICBjdHguZmlsbFJlY3QoTWF0aC5yb3VuZChwaXhlbFBvcy54KSwgTWF0aC5yb3VuZChwaXhlbFBvcy55KSwKICAgICAgICAgICAgICAgIC8vIExvb2tzIGNyYXp5LCBidXQgdGhpcyBpcyBuZWNlc3NhcnkgdG8gcHJldmVudCByb3VuZGluZyBmcm9tCiAgICAgICAgICAgICAgICAvLyBjYXVzaW5nIG92ZXJsYXAgYmV0d2VlbiB0aGlzIHJlY3QgYW5kIGl0cyBuZWlnaGJvcnMuIFRoZQogICAgICAgICAgICAgICAgLy8gbWludWVuZCBpcyB0aGUgbG9jYXRpb24gb2YgdGhlIG5leHQgcGl4ZWwsIHdoaWxlIHRoZQogICAgICAgICAgICAgICAgLy8gc3VidHJhaGVuZCBpcyB0aGUgcG9zaXRpb24gb2YgdGhlIGN1cnJlbnQgcGl4ZWwgKHRvIHR1cm4gYW4KICAgICAgICAgICAgICAgIC8vIGFic29sdXRlIGNvb3JkaW5hdGUgdG8gYSB3aWR0aC9oZWlnaHQpLiBZZXMsIEkgaGFkIHRvIGxvb2sKICAgICAgICAgIC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bG9iYWwuY3Jvc3N0YWxrLlNlbGVjdGlvbkhhbmRsZShjdEdyb3VwKTsKICAgICAgICAgICAgc2VsZWN0aW9uSGFuZGxlLm9uKCJjaGFuZ2UiLCBmdW5jdGlvbiAoZSkgewogICAgICAgICAgICAgIGlmIChlLnNlbmRlciAhPT0gc2VsZWN0aW9uSGFuZGxlKSB7CiAgICAgICAgICAgICAgICBpZiAoX3RoaXMxMC5fbG9jYXRpb25GaWx0ZXIpIHsKICAgICAgICAgICAgICAgICAgX3RoaXMxMC5fbG9jYXRpb25GaWx0ZXIuZGlzYWJsZSgpOwogICAgICAgICAgICAgICAgICBidG4uc3RhdGUoInNlbGVjdC1pbmFjdGl2ZSIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBoYW5kbGVyID0gZnVuY3Rpb24gaGFuZGxlcihlKSB7CiAgICAgICAgICAgICAgX3RoaXMxMC5sYXllck1hbmFnZXIuYnJ1c2goX3RoaXMxMC5fbG9jYXRpb25GaWx0ZXIuZ2V0Qm91bmRzKCksIHsgc2VuZGVyOiBzZWxlY3Rpb25IYW5kbGUgfSk7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIF90aGlzMTAuX2xvY2F0aW9uRmlsdGVyLm9uKCJlbmFibGVkIiwgaGFuZGxlcik7CiAgICAgICAgICAgIF90aGlzMTAuX2xvY2F0aW9uRmlsdGVyLm9uKCJjaGFuZ2UiLCBoYW5kbGVyKTsKICAgICAgICAgICAgX3RoaXMxMC5fbG9jYXRpb25GaWx0ZXIub24oImRpc2FibGVkIiwgZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgIHNlbGVjdGlvbkhhbmRsZS5jbG9zZSgpOwogICAgICAgICAgICAgIF90aGlzMTAuX2xvY2F0aW9uRmlsdGVyID0gbnVsbDsKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9KSgpOwogICAgICAgIH0KCiAgICAgICAgX3RoaXMxMC5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KCmZ1bmN0aW9uIGFzQXJyYXkodmFsdWUpIHsKICBpZiAodmFsdWUgaW5zdGFuY2VvZiBBcnJheSkgcmV0dXJuIHZhbHVlO2Vsc2UgcmV0dXJuIFt2YWx1ZV07Cn0KCgp9LHt9XX0se30sWzEzXSk7Cg=="></script>
</head>
<body style="background-color:white;">
<div id="htmlwidget_container">
<div id="htmlwidget-1f54fa774954b965853f" style="width:100%;height:400px;" class="leaflet html-widget"></div>
</div>
<script type="application/json" data-for="htmlwidget-1f54fa774954b965853f">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"http://openstreetmap.org\">OpenStreetMap<\/a> contributors, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA<\/a>"}]},{"method":"addMarkers","args":[[-20.42,-20.62,-26,-17.97,-20.42,-19.68,-11.7,-28.11,-28.74,-17.47,-21.44,-12.26,-18.54,-21,-20.7,-15.94,-13.64,-17.83,-23.5,-22.63],[181.62,181.03,184.1,181.66,181.96,184.31,166.1,181.93,181.74,179.59,180.69,167,182.11,181.66,169.92,184.95,165.96,181.5,179.78,180.31],null,null,null,{"interactive":true,"draggable":false,"keyboard":true,"title":"","alt":"","zIndexOffset":0,"opacity":1,"riseOnHover":false,"riseOffset":250},["4.8","4.2","5.4","4.1","4","4","4.8","4.4","4.7","4.3","4.4","4.6","4.4","4.4","6.1","4.3","6","4.5","4.4","4.4"],null,null,null,["4.8","4.2","5.4","4.1","4","4","4.8","4.4","4.7","4.3","4.4","4.6","4.4","4.4","6.1","4.3","6","4.5","4.4","4.4"],{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"className":"","sticky":true},null]}],"limits":{"lat":[-28.74,-11.7],"lng":[165.96,184.95]}},"evals":[],"jsHooks":[]}</script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-1f54fa774954b965853f">{"viewer":{"width":"100%","height":400,"padding":0,"fill":true},"browser":{"width":"100%","height":400,"padding":0,"fill":true}}</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment