gis-leaflet-helper 3.2.20 → 3.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gis-leaflet-helper.es.js +21133 -12381
- package/dist/gis-leaflet-helper.umd.js +1 -184
- package/package.json +4 -4
|
@@ -1,184 +1 @@
|
|
|
1
|
-
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode(".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}\n.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();(function(Jt,$t){typeof exports=="object"&&typeof module<"u"?$t(exports,require("gis-common")):typeof define=="function"&&define.amd?define(["exports","gis-common"],$t):(Jt=typeof globalThis<"u"?globalThis:Jt||self,$t(Jt["gis-leaflet-helper"]={},Jt.Gis))})(this,function(Jt,$t){"use strict";var Dp=Object.defineProperty;var Op=(Jt,$t,vn)=>$t in Jt?Dp(Jt,$t,{enumerable:!0,configurable:!0,writable:!0,value:vn}):Jt[$t]=vn;var Lt=(Jt,$t,vn)=>Op(Jt,typeof $t!="symbol"?$t+"":$t,vn);function vn(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,l.get?l:{enumerable:!0,get:()=>t[a]})}}return n.default=t,Object.freeze(n)}const Sl=vn($t);var An=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Dl(t){if(t.__esModule)return t;var n=t.default;if(typeof n=="function"){var a=function l(){return this instanceof l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(t).forEach(function(l){var c=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(a,l,c.get?c:{enumerable:!0,get:function(){return t[l]}})}),a}var ga={exports:{}};/* @preserve
|
|
2
|
-
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
3
|
-
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
4
|
-
*/var mh;function gh(){return mh||(mh=1,function(t,n){(function(a,l){l(n)})(An,function(a){var l="1.9.4";function c(e){var r,u,_,M;for(u=1,_=arguments.length;u<_;u++){M=arguments[u];for(r in M)e[r]=M[r]}return e}var f=Object.create||function(){function e(){}return function(r){return e.prototype=r,new e}}();function p(e,r){var u=Array.prototype.slice;if(e.bind)return e.bind.apply(e,u.call(arguments,1));var _=u.call(arguments,2);return function(){return e.apply(r,_.length?_.concat(u.call(arguments)):arguments)}}var g=0;function A(e){return"_leaflet_id"in e||(e._leaflet_id=++g),e._leaflet_id}function k(e,r,u){var _,M,B,j;return j=function(){_=!1,M&&(B.apply(u,M),M=!1)},B=function(){_?M=arguments:(e.apply(u,arguments),setTimeout(j,r),_=!0)},B}function C(e,r,u){var _=r[1],M=r[0],B=_-M;return e===_&&u?e:((e-M)%B+B)%B+M}function x(){return!1}function b(e,r){if(r===!1)return e;var u=Math.pow(10,r===void 0?6:r);return Math.round(e*u)/u}function T(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function G(e){return T(e).split(/\s+/)}function Z(e,r){Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?f(e.options):{});for(var u in r)e.options[u]=r[u];return e.options}function K(e,r,u){var _=[];for(var M in e)_.push(encodeURIComponent(u?M.toUpperCase():M)+"="+encodeURIComponent(e[M]));return(!r||r.indexOf("?")===-1?"?":"&")+_.join("&")}var at=/\{ *([\w_ -]+) *\}/g;function rt(e,r){return e.replace(at,function(u,_){var M=r[_];if(M===void 0)throw new Error("No value provided for variable "+u);return typeof M=="function"&&(M=M(r)),M})}var ct=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function yt(e,r){for(var u=0;u<e.length;u++)if(e[u]===r)return u;return-1}var mt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function xt(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var Dt=0;function It(e){var r=+new Date,u=Math.max(0,16-(r-Dt));return Dt=r+u,window.setTimeout(e,u)}var zt=window.requestAnimationFrame||xt("RequestAnimationFrame")||It,Yt=window.cancelAnimationFrame||xt("CancelAnimationFrame")||xt("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function Et(e,r,u){if(u&&zt===It)e.call(r);else return zt.call(window,p(e,r))}function Zt(e){e&&Yt.call(window,e)}var be={__proto__:null,extend:c,create:f,bind:p,get lastId(){return g},stamp:A,throttle:k,wrapNum:C,falseFn:x,formatNum:b,trim:T,splitWords:G,setOptions:Z,getParamString:K,template:rt,isArray:ct,indexOf:yt,emptyImageUrl:mt,requestFn:zt,cancelFn:Yt,requestAnimFrame:Et,cancelAnimFrame:Zt};function pe(){}pe.extend=function(e){var r=function(){Z(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},u=r.__super__=this.prototype,_=f(u);_.constructor=r,r.prototype=_;for(var M in this)Object.prototype.hasOwnProperty.call(this,M)&&M!=="prototype"&&M!=="__super__"&&(r[M]=this[M]);return e.statics&&c(r,e.statics),e.includes&&(yo(e.includes),c.apply(null,[_].concat(e.includes))),c(_,e),delete _.statics,delete _.includes,_.options&&(_.options=u.options?f(u.options):{},c(_.options,e.options)),_._initHooks=[],_.callInitHooks=function(){if(!this._initHooksCalled){u.callInitHooks&&u.callInitHooks.call(this),this._initHooksCalled=!0;for(var B=0,j=_._initHooks.length;B<j;B++)_._initHooks[B].call(this)}},r},pe.include=function(e){var r=this.prototype.options;return c(this.prototype,e),e.options&&(this.prototype.options=r,this.mergeOptions(e.options)),this},pe.mergeOptions=function(e){return c(this.prototype.options,e),this},pe.addInitHook=function(e){var r=Array.prototype.slice.call(arguments,1),u=typeof e=="function"?e:function(){this[e].apply(this,r)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(u),this};function yo(e){if(!(typeof L>"u"||!L||!L.Mixin)){e=ct(e)?e:[e];for(var r=0;r<e.length;r++)e[r]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var De={on:function(e,r,u){if(typeof e=="object")for(var _ in e)this._on(_,e[_],r);else{e=G(e);for(var M=0,B=e.length;M<B;M++)this._on(e[M],r,u)}return this},off:function(e,r,u){if(!arguments.length)delete this._events;else if(typeof e=="object")for(var _ in e)this._off(_,e[_],r);else{e=G(e);for(var M=arguments.length===1,B=0,j=e.length;B<j;B++)M?this._off(e[B]):this._off(e[B],r,u)}return this},_on:function(e,r,u,_){if(typeof r!="function"){console.warn("wrong listener type: "+typeof r);return}if(this._listens(e,r,u)===!1){u===this&&(u=void 0);var M={fn:r,ctx:u};_&&(M.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(M)}},_off:function(e,r,u){var _,M,B;if(this._events&&(_=this._events[e],!!_)){if(arguments.length===1){if(this._firingCount)for(M=0,B=_.length;M<B;M++)_[M].fn=x;delete this._events[e];return}if(typeof r!="function"){console.warn("wrong listener type: "+typeof r);return}var j=this._listens(e,r,u);if(j!==!1){var Y=_[j];this._firingCount&&(Y.fn=x,this._events[e]=_=_.slice()),_.splice(j,1)}}},fire:function(e,r,u){if(!this.listens(e,u))return this;var _=c({},r,{type:e,target:this,sourceTarget:r&&r.sourceTarget||this});if(this._events){var M=this._events[e];if(M){this._firingCount=this._firingCount+1||1;for(var B=0,j=M.length;B<j;B++){var Y=M[B],st=Y.fn;Y.once&&this.off(e,st,Y.ctx),st.call(Y.ctx||this,_)}this._firingCount--}}return u&&this._propagateEvent(_),this},listens:function(e,r,u,_){typeof e!="string"&&console.warn('"string" type argument expected');var M=r;typeof r!="function"&&(_=!!r,M=void 0,u=void 0);var B=this._events&&this._events[e];if(B&&B.length&&this._listens(e,M,u)!==!1)return!0;if(_){for(var j in this._eventParents)if(this._eventParents[j].listens(e,r,u,_))return!0}return!1},_listens:function(e,r,u){if(!this._events)return!1;var _=this._events[e]||[];if(!r)return!!_.length;u===this&&(u=void 0);for(var M=0,B=_.length;M<B;M++)if(_[M].fn===r&&_[M].ctx===u)return M;return!1},once:function(e,r,u){if(typeof e=="object")for(var _ in e)this._on(_,e[_],r,!0);else{e=G(e);for(var M=0,B=e.length;M<B;M++)this._on(e[M],r,u,!0)}return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[A(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[A(e)],this},_propagateEvent:function(e){for(var r in this._eventParents)this._eventParents[r].fire(e.type,c({layer:e.target,propagatedFrom:e.target},e),!0)}};De.addEventListener=De.on,De.removeEventListener=De.clearAllEventListeners=De.off,De.addOneTimeEventListener=De.once,De.fireEvent=De.fire,De.hasEventListeners=De.listens;var en=pe.extend(De);function Pt(e,r,u){this.x=u?Math.round(e):e,this.y=u?Math.round(r):r}var Ss=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};Pt.prototype={clone:function(){return new Pt(this.x,this.y)},add:function(e){return this.clone()._add(Ct(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(Ct(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new Pt(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new Pt(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Ss(this.x),this.y=Ss(this.y),this},distanceTo:function(e){e=Ct(e);var r=e.x-this.x,u=e.y-this.y;return Math.sqrt(r*r+u*u)},equals:function(e){return e=Ct(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=Ct(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+b(this.x)+", "+b(this.y)+")"}};function Ct(e,r,u){return e instanceof Pt?e:ct(e)?new Pt(e[0],e[1]):e==null?e:typeof e=="object"&&"x"in e&&"y"in e?new Pt(e.x,e.y):new Pt(e,r,u)}function te(e,r){if(e)for(var u=r?[e,r]:e,_=0,M=u.length;_<M;_++)this.extend(u[_])}te.prototype={extend:function(e){var r,u;if(!e)return this;if(e instanceof Pt||typeof e[0]=="number"||"x"in e)r=u=Ct(e);else if(e=we(e),r=e.min,u=e.max,!r||!u)return this;return!this.min&&!this.max?(this.min=r.clone(),this.max=u.clone()):(this.min.x=Math.min(r.x,this.min.x),this.max.x=Math.max(u.x,this.max.x),this.min.y=Math.min(r.y,this.min.y),this.max.y=Math.max(u.y,this.max.y)),this},getCenter:function(e){return Ct((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return Ct(this.min.x,this.max.y)},getTopRight:function(){return Ct(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var r,u;return typeof e[0]=="number"||e instanceof Pt?e=Ct(e):e=we(e),e instanceof te?(r=e.min,u=e.max):r=u=e,r.x>=this.min.x&&u.x<=this.max.x&&r.y>=this.min.y&&u.y<=this.max.y},intersects:function(e){e=we(e);var r=this.min,u=this.max,_=e.min,M=e.max,B=M.x>=r.x&&_.x<=u.x,j=M.y>=r.y&&_.y<=u.y;return B&&j},overlaps:function(e){e=we(e);var r=this.min,u=this.max,_=e.min,M=e.max,B=M.x>r.x&&_.x<u.x,j=M.y>r.y&&_.y<u.y;return B&&j},isValid:function(){return!!(this.min&&this.max)},pad:function(e){var r=this.min,u=this.max,_=Math.abs(r.x-u.x)*e,M=Math.abs(r.y-u.y)*e;return we(Ct(r.x-_,r.y-M),Ct(u.x+_,u.y+M))},equals:function(e){return e?(e=we(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight())):!1}};function we(e,r){return!e||e instanceof te?e:new te(e,r)}function Ce(e,r){if(e)for(var u=r?[e,r]:e,_=0,M=u.length;_<M;_++)this.extend(u[_])}Ce.prototype={extend:function(e){var r=this._southWest,u=this._northEast,_,M;if(e instanceof Ht)_=e,M=e;else if(e instanceof Ce){if(_=e._southWest,M=e._northEast,!_||!M)return this}else return e?this.extend(Rt(e)||ae(e)):this;return!r&&!u?(this._southWest=new Ht(_.lat,_.lng),this._northEast=new Ht(M.lat,M.lng)):(r.lat=Math.min(_.lat,r.lat),r.lng=Math.min(_.lng,r.lng),u.lat=Math.max(M.lat,u.lat),u.lng=Math.max(M.lng,u.lng)),this},pad:function(e){var r=this._southWest,u=this._northEast,_=Math.abs(r.lat-u.lat)*e,M=Math.abs(r.lng-u.lng)*e;return new Ce(new Ht(r.lat-_,r.lng-M),new Ht(u.lat+_,u.lng+M))},getCenter:function(){return new Ht((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Ht(this.getNorth(),this.getWest())},getSouthEast:function(){return new Ht(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){typeof e[0]=="number"||e instanceof Ht||"lat"in e?e=Rt(e):e=ae(e);var r=this._southWest,u=this._northEast,_,M;return e instanceof Ce?(_=e.getSouthWest(),M=e.getNorthEast()):_=M=e,_.lat>=r.lat&&M.lat<=u.lat&&_.lng>=r.lng&&M.lng<=u.lng},intersects:function(e){e=ae(e);var r=this._southWest,u=this._northEast,_=e.getSouthWest(),M=e.getNorthEast(),B=M.lat>=r.lat&&_.lat<=u.lat,j=M.lng>=r.lng&&_.lng<=u.lng;return B&&j},overlaps:function(e){e=ae(e);var r=this._southWest,u=this._northEast,_=e.getSouthWest(),M=e.getNorthEast(),B=M.lat>r.lat&&_.lat<u.lat,j=M.lng>r.lng&&_.lng<u.lng;return B&&j},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,r){return e?(e=ae(e),this._southWest.equals(e.getSouthWest(),r)&&this._northEast.equals(e.getNorthEast(),r)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ae(e,r){return e instanceof Ce?e:new Ce(e,r)}function Ht(e,r,u){if(isNaN(e)||isNaN(r))throw new Error("Invalid LatLng object: ("+e+", "+r+")");this.lat=+e,this.lng=+r,u!==void 0&&(this.alt=+u)}Ht.prototype={equals:function(e,r){if(!e)return!1;e=Rt(e);var u=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return u<=(r===void 0?1e-9:r)},toString:function(e){return"LatLng("+b(this.lat,e)+", "+b(this.lng,e)+")"},distanceTo:function(e){return fi.distance(this,Rt(e))},wrap:function(){return fi.wrapLatLng(this)},toBounds:function(e){var r=180*e/40075017,u=r/Math.cos(Math.PI/180*this.lat);return ae([this.lat-r,this.lng-u],[this.lat+r,this.lng+u])},clone:function(){return new Ht(this.lat,this.lng,this.alt)}};function Rt(e,r,u){return e instanceof Ht?e:ct(e)&&typeof e[0]!="object"?e.length===3?new Ht(e[0],e[1],e[2]):e.length===2?new Ht(e[0],e[1]):null:e==null?e:typeof e=="object"&&"lat"in e?new Ht(e.lat,"lng"in e?e.lng:e.lon,e.alt):r===void 0?null:new Ht(e,r,u)}var si={latLngToPoint:function(e,r){var u=this.projection.project(e),_=this.scale(r);return this.transformation._transform(u,_)},pointToLatLng:function(e,r){var u=this.scale(r),_=this.transformation.untransform(e,u);return this.projection.unproject(_)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var r=this.projection.bounds,u=this.scale(e),_=this.transformation.transform(r.min,u),M=this.transformation.transform(r.max,u);return new te(_,M)},infinite:!1,wrapLatLng:function(e){var r=this.wrapLng?C(e.lng,this.wrapLng,!0):e.lng,u=this.wrapLat?C(e.lat,this.wrapLat,!0):e.lat,_=e.alt;return new Ht(u,r,_)},wrapLatLngBounds:function(e){var r=e.getCenter(),u=this.wrapLatLng(r),_=r.lat-u.lat,M=r.lng-u.lng;if(_===0&&M===0)return e;var B=e.getSouthWest(),j=e.getNorthEast(),Y=new Ht(B.lat-_,B.lng-M),st=new Ht(j.lat-_,j.lng-M);return new Ce(Y,st)}},fi=c({},si,{wrapLng:[-180,180],R:6371e3,distance:function(e,r){var u=Math.PI/180,_=e.lat*u,M=r.lat*u,B=Math.sin((r.lat-e.lat)*u/2),j=Math.sin((r.lng-e.lng)*u/2),Y=B*B+Math.cos(_)*Math.cos(M)*j*j,st=2*Math.atan2(Math.sqrt(Y),Math.sqrt(1-Y));return this.R*st}}),nn=6378137,Ts={R:nn,MAX_LATITUDE:85.0511287798,project:function(e){var r=Math.PI/180,u=this.MAX_LATITUDE,_=Math.max(Math.min(u,e.lat),-u),M=Math.sin(_*r);return new Pt(this.R*e.lng*r,this.R*Math.log((1+M)/(1-M))/2)},unproject:function(e){var r=180/Math.PI;return new Ht((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*r,e.x*r/this.R)},bounds:function(){var e=nn*Math.PI;return new te([-e,-e],[e,e])}()};function Ds(e,r,u,_){if(ct(e)){this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3];return}this._a=e,this._b=r,this._c=u,this._d=_}Ds.prototype={transform:function(e,r){return this._transform(e.clone(),r)},_transform:function(e,r){return r=r||1,e.x=r*(this._a*e.x+this._b),e.y=r*(this._c*e.y+this._d),e},untransform:function(e,r){return r=r||1,new Pt((e.x/r-this._b)/this._a,(e.y/r-this._d)/this._c)}};function sn(e,r,u,_){return new Ds(e,r,u,_)}var Os=c({},fi,{code:"EPSG:3857",projection:Ts,transformation:function(){var e=.5/(Math.PI*Ts.R);return sn(e,.5,-e,.5)}()}),Ia=c({},Os,{code:"EPSG:900913"});function Ra(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Ga(e,r){var u="",_,M,B,j,Y,st;for(_=0,B=e.length;_<B;_++){for(Y=e[_],M=0,j=Y.length;M<j;M++)st=Y[M],u+=(M?"L":"M")+st.x+" "+st.y;u+=r?Mt.svg?"z":"x":""}return u||"M0 0"}var Tn=document.documentElement.style,Fi="ActiveXObject"in window,Fa=Fi&&!document.addEventListener,za="msLaunchUri"in navigator&&!("documentMode"in document),Is=je("webkit"),Na=je("android"),Ua=je("android 2")||je("android 3"),vo=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ao=Na&&je("Google")&&vo<537&&!("AudioNode"in window),Rs=!!window.opera,Za=!za&&je("chrome"),ja=je("gecko")&&!Is&&!Rs&&!Fi,qa=!Za&&je("safari"),Gs=je("phantom"),Ha="OTransition"in Tn,zi=navigator.platform.indexOf("Win")===0,Va=Fi&&"transition"in Tn,Dn="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Ua,Ni="MozPerspective"in Tn,$a=!window.L_DISABLE_3D&&(Va||Dn||Ni)&&!Ha&&!Gs,xi=typeof orientation<"u"||je("mobile"),Mo=xi&&Is,xo=xi&&Dn,Fs=!window.PointerEvent&&window.MSPointerEvent,Wa=!!(window.PointerEvent||Fs),Ka="ontouchstart"in window||!!window.TouchEvent,Lo=!window.L_NO_TOUCH&&(Ka||Wa),bo=xi&&Rs,Xa=xi&&ja,Ya=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,wo=function(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",x,r),window.removeEventListener("testPassiveEventSupport",x,r)}catch{}return e}(),Co=function(){return!!document.createElement("canvas").getContext}(),zs=!!(document.createElementNS&&Ra("svg").createSVGRect),Ja=!!zs&&function(){var e=document.createElement("div");return e.innerHTML="<svg/>",(e.firstChild&&e.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Eo=!zs&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var r=e.firstChild;return r.style.behavior="url(#default#VML)",r&&typeof r.adj=="object"}catch{return!1}}(),Po=navigator.platform.indexOf("Mac")===0,ko=navigator.platform.indexOf("Linux")===0;function je(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Mt={ie:Fi,ielt9:Fa,edge:za,webkit:Is,android:Na,android23:Ua,androidStock:Ao,opera:Rs,chrome:Za,gecko:ja,safari:qa,phantom:Gs,opera12:Ha,win:zi,ie3d:Va,webkit3d:Dn,gecko3d:Ni,any3d:$a,mobile:xi,mobileWebkit:Mo,mobileWebkit3d:xo,msPointer:Fs,pointer:Wa,touch:Lo,touchNative:Ka,mobileOpera:bo,mobileGecko:Xa,retina:Ya,passiveEvents:wo,canvas:Co,svg:zs,vml:Eo,inlineSvg:Ja,mac:Po,linux:ko},Qa=Mt.msPointer?"MSPointerDown":"pointerdown",tr=Mt.msPointer?"MSPointerMove":"pointermove",Ns=Mt.msPointer?"MSPointerUp":"pointerup",er=Mt.msPointer?"MSPointerCancel":"pointercancel",Us={touchstart:Qa,touchmove:tr,touchend:Ns,touchcancel:er},ir={touchstart:Oo,touchmove:In,touchend:In,touchcancel:In},Ui={},nr=!1;function Bo(e,r,u){return r==="touchstart"&&Zs(),ir[r]?(u=ir[r].bind(this,u),e.addEventListener(Us[r],u,!1),u):(console.warn("wrong event specified:",r),x)}function So(e,r,u){if(!Us[r]){console.warn("wrong event specified:",r);return}e.removeEventListener(Us[r],u,!1)}function To(e){Ui[e.pointerId]=e}function Do(e){Ui[e.pointerId]&&(Ui[e.pointerId]=e)}function On(e){delete Ui[e.pointerId]}function Zs(){nr||(document.addEventListener(Qa,To,!0),document.addEventListener(tr,Do,!0),document.addEventListener(Ns,On,!0),document.addEventListener(er,On,!0),nr=!0)}function In(e,r){if(r.pointerType!==(r.MSPOINTER_TYPE_MOUSE||"mouse")){r.touches=[];for(var u in Ui)r.touches.push(Ui[u]);r.changedTouches=[r],e(r)}}function Oo(e,r){r.MSPOINTER_TYPE_TOUCH&&r.pointerType===r.MSPOINTER_TYPE_TOUCH&&ce(r),In(e,r)}function Io(e){var r={},u,_;for(_ in e)u=e[_],r[_]=u&&u.bind?u.bind(e):u;return e=r,r.type="dblclick",r.detail=2,r.isTrusted=!1,r._simulated=!0,r}var Ro=200;function Go(e,r){e.addEventListener("dblclick",r);var u=0,_;function M(B){if(B.detail!==1){_=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var j=hr(B);if(!(j.some(function(st){return st instanceof HTMLLabelElement&&st.attributes.for})&&!j.some(function(st){return st instanceof HTMLInputElement||st instanceof HTMLSelectElement}))){var Y=Date.now();Y-u<=Ro?(_++,_===2&&r(Io(B))):_=1,u=Y}}}return e.addEventListener("click",M),{dblclick:r,simDblclick:M}}function Fo(e,r){e.removeEventListener("dblclick",r.dblclick),e.removeEventListener("click",r.simDblclick)}var js=Gn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),an=Gn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),sr=an==="webkitTransition"||an==="OTransition"?an+"End":"transitionend";function ar(e){return typeof e=="string"?document.getElementById(e):e}function pi(e,r){var u=e.style[r]||e.currentStyle&&e.currentStyle[r];if((!u||u==="auto")&&document.defaultView){var _=document.defaultView.getComputedStyle(e,null);u=_?_[r]:null}return u==="auto"?null:u}function Nt(e,r,u){var _=document.createElement(e);return _.className=r||"",u&&u.appendChild(_),_}function Qt(e){var r=e.parentNode;r&&r.removeChild(e)}function rn(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Zi(e){var r=e.parentNode;r&&r.lastChild!==e&&r.appendChild(e)}function Li(e){var r=e.parentNode;r&&r.firstChild!==e&&r.insertBefore(e,r.firstChild)}function qs(e,r){if(e.classList!==void 0)return e.classList.contains(r);var u=Rn(e);return u.length>0&&new RegExp("(^|\\s)"+r+"(\\s|$)").test(u)}function Tt(e,r){if(e.classList!==void 0)for(var u=G(r),_=0,M=u.length;_<M;_++)e.classList.add(u[_]);else if(!qs(e,r)){var B=Rn(e);Hs(e,(B?B+" ":"")+r)}}function ne(e,r){e.classList!==void 0?e.classList.remove(r):Hs(e,T((" "+Rn(e)+" ").replace(" "+r+" "," ")))}function Hs(e,r){e.className.baseVal===void 0?e.className=r:e.className.baseVal=r}function Rn(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}function Ne(e,r){"opacity"in e.style?e.style.opacity=r:"filter"in e.style&&zo(e,r)}function zo(e,r){var u=!1,_="DXImageTransform.Microsoft.Alpha";try{u=e.filters.item(_)}catch{if(r===1)return}r=Math.round(r*100),u?(u.Enabled=r!==100,u.Opacity=r):e.style.filter+=" progid:"+_+"(opacity="+r+")"}function Gn(e){for(var r=document.documentElement.style,u=0;u<e.length;u++)if(e[u]in r)return e[u];return!1}function bi(e,r,u){var _=r||new Pt(0,0);e.style[js]=(Mt.ie3d?"translate("+_.x+"px,"+_.y+"px)":"translate3d("+_.x+"px,"+_.y+"px,0)")+(u?" scale("+u+")":"")}function re(e,r){e._leaflet_pos=r,Mt.any3d?bi(e,r):(e.style.left=r.x+"px",e.style.top=r.y+"px")}function wi(e){return e._leaflet_pos||new Pt(0,0)}var on,hn,Vs;if("onselectstart"in document)on=function(){St(window,"selectstart",ce)},hn=function(){Wt(window,"selectstart",ce)};else{var ji=Gn(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);on=function(){if(ji){var e=document.documentElement.style;Vs=e[ji],e[ji]="none"}},hn=function(){ji&&(document.documentElement.style[ji]=Vs,Vs=void 0)}}function $s(){St(window,"dragstart",ce)}function Ws(){Wt(window,"dragstart",ce)}var Fn,Ks;function Xs(e){for(;e.tabIndex===-1;)e=e.parentNode;e.style&&(zn(),Fn=e,Ks=e.style.outlineStyle,e.style.outlineStyle="none",St(window,"keydown",zn))}function zn(){Fn&&(Fn.style.outlineStyle=Ks,Fn=void 0,Ks=void 0,Wt(window,"keydown",zn))}function rr(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function Ys(e){var r=e.getBoundingClientRect();return{x:r.width/e.offsetWidth||1,y:r.height/e.offsetHeight||1,boundingClientRect:r}}var No={__proto__:null,TRANSFORM:js,TRANSITION:an,TRANSITION_END:sr,get:ar,getStyle:pi,create:Nt,remove:Qt,empty:rn,toFront:Zi,toBack:Li,hasClass:qs,addClass:Tt,removeClass:ne,setClass:Hs,getClass:Rn,setOpacity:Ne,testProp:Gn,setTransform:bi,setPosition:re,getPosition:wi,get disableTextSelection(){return on},get enableTextSelection(){return hn},disableImageDrag:$s,enableImageDrag:Ws,preventOutline:Xs,restoreOutline:zn,getSizedParentNode:rr,getScale:Ys};function St(e,r,u,_){if(r&&typeof r=="object")for(var M in r)Qs(e,M,r[M],u);else{r=G(r);for(var B=0,j=r.length;B<j;B++)Qs(e,r[B],u,_)}return this}var $e="_leaflet_events";function Wt(e,r,u,_){if(arguments.length===1)or(e),delete e[$e];else if(r&&typeof r=="object")for(var M in r)_i(e,M,r[M],u);else if(r=G(r),arguments.length===2)or(e,function(Y){return yt(r,Y)!==-1});else for(var B=0,j=r.length;B<j;B++)_i(e,r[B],u,_);return this}function or(e,r){for(var u in e[$e]){var _=u.split(/\d/)[0];(!r||r(_))&&_i(e,_,null,null,u)}}var Js={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Qs(e,r,u,_){var M=r+A(u)+(_?"_"+A(_):"");if(e[$e]&&e[$e][M])return this;var B=function(Y){return u.call(_||e,Y||window.event)},j=B;!Mt.touchNative&&Mt.pointer&&r.indexOf("touch")===0?B=Bo(e,r,B):Mt.touch&&r==="dblclick"?B=Go(e,B):"addEventListener"in e?r==="touchstart"||r==="touchmove"||r==="wheel"||r==="mousewheel"?e.addEventListener(Js[r]||r,B,Mt.passiveEvents?{passive:!1}:!1):r==="mouseenter"||r==="mouseleave"?(B=function(Y){Y=Y||window.event,ea(e,Y)&&j(Y)},e.addEventListener(Js[r],B,!1)):e.addEventListener(r,j,!1):e.attachEvent("on"+r,B),e[$e]=e[$e]||{},e[$e][M]=B}function _i(e,r,u,_,M){M=M||r+A(u)+(_?"_"+A(_):"");var B=e[$e]&&e[$e][M];if(!B)return this;!Mt.touchNative&&Mt.pointer&&r.indexOf("touch")===0?So(e,r,B):Mt.touch&&r==="dblclick"?Fo(e,B):"removeEventListener"in e?e.removeEventListener(Js[r]||r,B,!1):e.detachEvent("on"+r,B),e[$e][M]=null}function Ci(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function ta(e){return Qs(e,"wheel",Ci),this}function ln(e){return St(e,"mousedown touchstart dblclick contextmenu",Ci),e._leaflet_disable_click=!0,this}function ce(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Ei(e){return ce(e),Ci(e),this}function hr(e){if(e.composedPath)return e.composedPath();for(var r=[],u=e.target;u;)r.push(u),u=u.parentNode;return r}function lr(e,r){if(!r)return new Pt(e.clientX,e.clientY);var u=Ys(r),_=u.boundingClientRect;return new Pt((e.clientX-_.left)/u.x-r.clientLeft,(e.clientY-_.top)/u.y-r.clientTop)}var Uo=Mt.linux&&Mt.chrome?window.devicePixelRatio:Mt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ur(e){return Mt.edge?e.wheelDeltaY/2:e.deltaY&&e.deltaMode===0?-e.deltaY/Uo:e.deltaY&&e.deltaMode===1?-e.deltaY*20:e.deltaY&&e.deltaMode===2?-e.deltaY*60:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?-e.detail*20:e.detail?e.detail/-32765*60:0}function ea(e,r){var u=r.relatedTarget;if(!u)return!0;try{for(;u&&u!==e;)u=u.parentNode}catch{return!1}return u!==e}var Nn={__proto__:null,on:St,off:Wt,stopPropagation:Ci,disableScrollPropagation:ta,disableClickPropagation:ln,preventDefault:ce,stop:Ei,getPropagationPath:hr,getMousePosition:lr,getWheelDelta:ur,isExternalTarget:ea,addListener:St,removeListener:Wt},cr=en.extend({run:function(e,r,u,_){this.stop(),this._el=e,this._inProgress=!0,this._duration=u||.25,this._easeOutPower=1/Math.max(_||.5,.2),this._startPos=wi(e),this._offset=r.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Et(this._animate,this),this._step()},_step:function(e){var r=+new Date-this._startTime,u=this._duration*1e3;r<u?this._runFrame(this._easeOut(r/u),e):(this._runFrame(1),this._complete())},_runFrame:function(e,r){var u=this._startPos.add(this._offset.multiplyBy(e));r&&u._round(),re(this._el,u),this.fire("step")},_complete:function(){Zt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),Gt=en.extend({options:{crs:Os,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,r){r=Z(this,r),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=p(this._onResize,this),this._initEvents(),r.maxBounds&&this.setMaxBounds(r.maxBounds),r.zoom!==void 0&&(this._zoom=this._limitZoom(r.zoom)),r.center&&r.zoom!==void 0&&this.setView(Rt(r.center),r.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=an&&Mt.any3d&&!Mt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),St(this._proxy,sr,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,r,u){if(r=r===void 0?this._zoom:this._limitZoom(r),e=this._limitCenter(Rt(e),r,this.options.maxBounds),u=u||{},this._stop(),this._loaded&&!u.reset&&u!==!0){u.animate!==void 0&&(u.zoom=c({animate:u.animate},u.zoom),u.pan=c({animate:u.animate,duration:u.duration},u.pan));var _=this._zoom!==r?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,r,u.zoom):this._tryAnimatedPan(e,u.pan);if(_)return clearTimeout(this._sizeTimer),this}return this._resetView(e,r,u.pan&&u.pan.noMoveStart),this},setZoom:function(e,r){return this._loaded?this.setView(this.getCenter(),e,{zoom:r}):(this._zoom=e,this)},zoomIn:function(e,r){return e=e||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,r)},zoomOut:function(e,r){return e=e||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,r)},setZoomAround:function(e,r,u){var _=this.getZoomScale(r),M=this.getSize().divideBy(2),B=e instanceof Pt?e:this.latLngToContainerPoint(e),j=B.subtract(M).multiplyBy(1-1/_),Y=this.containerPointToLatLng(M.add(j));return this.setView(Y,r,{zoom:u})},_getBoundsCenterZoom:function(e,r){r=r||{},e=e.getBounds?e.getBounds():ae(e);var u=Ct(r.paddingTopLeft||r.padding||[0,0]),_=Ct(r.paddingBottomRight||r.padding||[0,0]),M=this.getBoundsZoom(e,!1,u.add(_));if(M=typeof r.maxZoom=="number"?Math.min(r.maxZoom,M):M,M===1/0)return{center:e.getCenter(),zoom:M};var B=_.subtract(u).divideBy(2),j=this.project(e.getSouthWest(),M),Y=this.project(e.getNorthEast(),M),st=this.unproject(j.add(Y).divideBy(2).add(B),M);return{center:st,zoom:M}},fitBounds:function(e,r){if(e=ae(e),!e.isValid())throw new Error("Bounds are not valid.");var u=this._getBoundsCenterZoom(e,r);return this.setView(u.center,u.zoom,r)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,r){return this.setView(e,this._zoom,{pan:r})},panBy:function(e,r){if(e=Ct(e).round(),r=r||{},!e.x&&!e.y)return this.fire("moveend");if(r.animate!==!0&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new cr,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),r.noMoveStart||this.fire("movestart"),r.animate!==!1){Tt(this._mapPane,"leaflet-pan-anim");var u=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,u,r.duration||.25,r.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,r,u){if(u=u||{},u.animate===!1||!Mt.any3d)return this.setView(e,r,u);this._stop();var _=this.project(this.getCenter()),M=this.project(e),B=this.getSize(),j=this._zoom;e=Rt(e),r=r===void 0?j:r;var Y=Math.max(B.x,B.y),st=Y*this.getZoomScale(j,r),ht=M.distanceTo(_)||1,pt=1.42,wt=pt*pt;function Ot(se){var yn=se?-1:1,lh=se?st:Y,Qe=st*st-Y*Y+yn*wt*wt*ht*ht,uh=2*lh*wt*ht,Xi=Qe/uh,fa=Math.sqrt(Xi*Xi+1)-Xi,ch=fa<1e-9?-18:Math.log(fa);return ch}function xe(se){return(Math.exp(se)-Math.exp(-se))/2}function ue(se){return(Math.exp(se)+Math.exp(-se))/2}function ke(se){return xe(se)/ue(se)}var ee=Ot(0);function Je(se){return Y*(ue(ee)/ue(ee+pt*se))}function da(se){return Y*(ue(ee)*ke(ee+pt*se)-xe(ee))/wt}function os(se){return 1-Math.pow(1-se,1.5)}var Cr=Date.now(),gn=(Ot(1)-ee)/pt,hh=u.duration?1e3*u.duration:1e3*gn*.8;function Er(){var se=(Date.now()-Cr)/hh,yn=os(se)*gn;se<=1?(this._flyToFrame=Et(Er,this),this._move(this.unproject(_.add(M.subtract(_).multiplyBy(da(yn)/ht)),j),this.getScaleZoom(Y/Je(yn),j),{flyTo:!0})):this._move(e,r)._moveEnd(!0)}return this._moveStart(!0,u.noMoveStart),Er.call(this),this},flyToBounds:function(e,r){var u=this._getBoundsCenterZoom(e,r);return this.flyTo(u.center,u.zoom,r)},setMaxBounds:function(e){return e=ae(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var r=this.options.minZoom;return this.options.minZoom=e,this._loaded&&r!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var r=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&r!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,r){this._enforcingBounds=!0;var u=this.getCenter(),_=this._limitCenter(u,this._zoom,ae(e));return u.equals(_)||this.panTo(_,r),this._enforcingBounds=!1,this},panInside:function(e,r){r=r||{};var u=Ct(r.paddingTopLeft||r.padding||[0,0]),_=Ct(r.paddingBottomRight||r.padding||[0,0]),M=this.project(this.getCenter()),B=this.project(e),j=this.getPixelBounds(),Y=we([j.min.add(u),j.max.subtract(_)]),st=Y.getSize();if(!Y.contains(B)){this._enforcingBounds=!0;var ht=B.subtract(Y.getCenter()),pt=Y.extend(B).getSize().subtract(st);M.x+=ht.x<0?-pt.x:pt.x,M.y+=ht.y<0?-pt.y:pt.y,this.panTo(this.unproject(M),r),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=c({animate:!1,pan:!0},e===!0?{animate:!0}:e);var r=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var u=this.getSize(),_=r.divideBy(2).round(),M=u.divideBy(2).round(),B=_.subtract(M);return!B.x&&!B.y?this:(e.animate&&e.pan?this.panBy(B):(e.pan&&this._rawPanBy(B),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(p(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:r,newSize:u}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=c({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var r=p(this._handleGeolocationResponse,this),u=p(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(r,u,e):navigator.geolocation.getCurrentPosition(r,u,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var r=e.code,u=e.message||(r===1?"permission denied":r===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:r,message:"Geolocation error: "+u+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var r=e.coords.latitude,u=e.coords.longitude,_=new Ht(r,u),M=_.toBounds(e.coords.accuracy*2),B=this._locateOptions;if(B.setView){var j=this.getBoundsZoom(M);this.setView(_,B.maxZoom?Math.min(j,B.maxZoom):j)}var Y={latlng:_,bounds:M,timestamp:e.timestamp};for(var st in e.coords)typeof e.coords[st]=="number"&&(Y[st]=e.coords[st]);this.fire("locationfound",Y)}},addHandler:function(e,r){if(!r)return this;var u=this[e]=new r(this);return this._handlers.push(u),this.options[e]&&u.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Qt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Zt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var e;for(e in this._layers)this._layers[e].remove();for(e in this._panes)Qt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,r){var u="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),_=Nt("div",u,r||this._mapPane);return e&&(this._panes[e]=_),_},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),r=this.unproject(e.getBottomLeft()),u=this.unproject(e.getTopRight());return new Ce(r,u)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,r,u){e=ae(e),u=Ct(u||[0,0]);var _=this.getZoom()||0,M=this.getMinZoom(),B=this.getMaxZoom(),j=e.getNorthWest(),Y=e.getSouthEast(),st=this.getSize().subtract(u),ht=we(this.project(Y,_),this.project(j,_)).getSize(),pt=Mt.any3d?this.options.zoomSnap:1,wt=st.x/ht.x,Ot=st.y/ht.y,xe=r?Math.max(wt,Ot):Math.min(wt,Ot);return _=this.getScaleZoom(xe,_),pt&&(_=Math.round(_/(pt/100))*(pt/100),_=r?Math.ceil(_/pt)*pt:Math.floor(_/pt)*pt),Math.max(M,Math.min(B,_))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Pt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,r){var u=this._getTopLeftPoint(e,r);return new te(u,u.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(e===void 0?this.getZoom():e)},getPane:function(e){return typeof e=="string"?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,r){var u=this.options.crs;return r=r===void 0?this._zoom:r,u.scale(e)/u.scale(r)},getScaleZoom:function(e,r){var u=this.options.crs;r=r===void 0?this._zoom:r;var _=u.zoom(e*u.scale(r));return isNaN(_)?1/0:_},project:function(e,r){return r=r===void 0?this._zoom:r,this.options.crs.latLngToPoint(Rt(e),r)},unproject:function(e,r){return r=r===void 0?this._zoom:r,this.options.crs.pointToLatLng(Ct(e),r)},layerPointToLatLng:function(e){var r=Ct(e).add(this.getPixelOrigin());return this.unproject(r)},latLngToLayerPoint:function(e){var r=this.project(Rt(e))._round();return r._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(Rt(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(ae(e))},distance:function(e,r){return this.options.crs.distance(Rt(e),Rt(r))},containerPointToLayerPoint:function(e){return Ct(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return Ct(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var r=this.containerPointToLayerPoint(Ct(e));return this.layerPointToLatLng(r)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Rt(e)))},mouseEventToContainerPoint:function(e){return lr(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var r=this._container=ar(e);if(r){if(r._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");St(r,"scroll",this._onScroll,this),this._containerId=A(r)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mt.any3d,Tt(e,"leaflet-container"+(Mt.touch?" leaflet-touch":"")+(Mt.retina?" leaflet-retina":"")+(Mt.ielt9?" leaflet-oldie":"")+(Mt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var r=pi(e,"position");r!=="absolute"&&r!=="relative"&&r!=="fixed"&&r!=="sticky"&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),re(this._mapPane,new Pt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Tt(e.markerPane,"leaflet-zoom-hide"),Tt(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,r,u){re(this._mapPane,new Pt(0,0));var _=!this._loaded;this._loaded=!0,r=this._limitZoom(r),this.fire("viewprereset");var M=this._zoom!==r;this._moveStart(M,u)._move(e,r)._moveEnd(M),this.fire("viewreset"),_&&this.fire("load")},_moveStart:function(e,r){return e&&this.fire("zoomstart"),r||this.fire("movestart"),this},_move:function(e,r,u,_){r===void 0&&(r=this._zoom);var M=this._zoom!==r;return this._zoom=r,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),_?u&&u.pinch&&this.fire("zoom",u):((M||u&&u.pinch)&&this.fire("zoom",u),this.fire("move",u)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Zt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){re(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[A(this._container)]=this;var r=e?Wt:St;r(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&r(window,"resize",this._onResize,this),Mt.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Zt(this._resizeRequest),this._resizeRequest=Et(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,r){for(var u=[],_,M=r==="mouseout"||r==="mouseover",B=e.target||e.srcElement,j=!1;B;){if(_=this._targets[A(B)],_&&(r==="click"||r==="preclick")&&this._draggableMoved(_)){j=!0;break}if(_&&_.listens(r,!0)&&(M&&!ea(B,e)||(u.push(_),M))||B===this._container)break;B=B.parentNode}return!u.length&&!j&&!M&&this.listens(r,!0)&&(u=[this]),u},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var r=e.target||e.srcElement;if(!(!this._loaded||r._leaflet_disable_events||e.type==="click"&&this._isClickDisabled(r))){var u=e.type;u==="mousedown"&&Xs(r),this._fireDOMEvent(e,u)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,r,u){if(e.type==="click"){var _=c({},e);_.type="preclick",this._fireDOMEvent(_,_.type,u)}var M=this._findEventTargets(e,r);if(u){for(var B=[],j=0;j<u.length;j++)u[j].listens(r,!0)&&B.push(u[j]);M=B.concat(M)}if(M.length){r==="contextmenu"&&ce(e);var Y=M[0],st={originalEvent:e};if(e.type!=="keypress"&&e.type!=="keydown"&&e.type!=="keyup"){var ht=Y.getLatLng&&(!Y._radius||Y._radius<=10);st.containerPoint=ht?this.latLngToContainerPoint(Y.getLatLng()):this.mouseEventToContainerPoint(e),st.layerPoint=this.containerPointToLayerPoint(st.containerPoint),st.latlng=ht?Y.getLatLng():this.layerPointToLatLng(st.layerPoint)}for(j=0;j<M.length;j++)if(M[j].fire(r,st,!0),st.originalEvent._stopped||M[j].options.bubblingMouseEvents===!1&&yt(this._mouseEvents,r)!==-1)return}},_draggableMoved:function(e){return e=e.dragging&&e.dragging.enabled()?e:this,e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,r=this._handlers.length;e<r;e++)this._handlers[e].disable()},whenReady:function(e,r){return this._loaded?e.call(r||this,{target:this}):this.on("load",e,r),this},_getMapPanePos:function(){return wi(this._mapPane)||new Pt(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,r){var u=e&&r!==void 0?this._getNewPixelOrigin(e,r):this.getPixelOrigin();return u.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,r){var u=this.getSize()._divideBy(2);return this.project(e,r)._subtract(u)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,r,u){var _=this._getNewPixelOrigin(u,r);return this.project(e,r)._subtract(_)},_latLngBoundsToNewLayerBounds:function(e,r,u){var _=this._getNewPixelOrigin(u,r);return we([this.project(e.getSouthWest(),r)._subtract(_),this.project(e.getNorthWest(),r)._subtract(_),this.project(e.getSouthEast(),r)._subtract(_),this.project(e.getNorthEast(),r)._subtract(_)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,r,u){if(!u)return e;var _=this.project(e,r),M=this.getSize().divideBy(2),B=new te(_.subtract(M),_.add(M)),j=this._getBoundsOffset(B,u,r);return Math.abs(j.x)<=1&&Math.abs(j.y)<=1?e:this.unproject(_.add(j),r)},_limitOffset:function(e,r){if(!r)return e;var u=this.getPixelBounds(),_=new te(u.min.add(e),u.max.add(e));return e.add(this._getBoundsOffset(_,r))},_getBoundsOffset:function(e,r,u){var _=we(this.project(r.getNorthEast(),u),this.project(r.getSouthWest(),u)),M=_.min.subtract(e.min),B=_.max.subtract(e.max),j=this._rebound(M.x,-B.x),Y=this._rebound(M.y,-B.y);return new Pt(j,Y)},_rebound:function(e,r){return e+r>0?Math.round(e-r)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(r))},_limitZoom:function(e){var r=this.getMinZoom(),u=this.getMaxZoom(),_=Mt.any3d?this.options.zoomSnap:1;return _&&(e=Math.round(e/_)*_),Math.max(r,Math.min(u,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ne(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,r){var u=this._getCenterOffset(e)._trunc();return(r&&r.animate)!==!0&&!this.getSize().contains(u)?!1:(this.panBy(u,r),!0)},_createAnimProxy:function(){var e=this._proxy=Nt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(r){var u=js,_=this._proxy.style[u];bi(this._proxy,this.project(r.center,r.zoom),this.getZoomScale(r.zoom,1)),_===this._proxy.style[u]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Qt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),r=this.getZoom();bi(this._proxy,this.project(e,r),this.getZoomScale(r,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,r,u){if(this._animatingZoom)return!0;if(u=u||{},!this._zoomAnimated||u.animate===!1||this._nothingToAnimate()||Math.abs(r-this._zoom)>this.options.zoomAnimationThreshold)return!1;var _=this.getZoomScale(r),M=this._getCenterOffset(e)._divideBy(1-1/_);return u.animate!==!0&&!this.getSize().contains(M)?!1:(Et(function(){this._moveStart(!0,u.noMoveStart||!1)._animateZoom(e,r,!0)},this),!0)},_animateZoom:function(e,r,u,_){this._mapPane&&(u&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=r,Tt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:r,noUpdate:_}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ne(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function dr(e,r){return new Gt(e,r)}var Bt=pe.extend({options:{position:"topright"},initialize:function(e){Z(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var r=this._map;return r&&r.removeControl(this),this.options.position=e,r&&r.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var r=this._container=this.onAdd(e),u=this.getPosition(),_=e._controlCorners[u];return Tt(r,"leaflet-control"),u.indexOf("bottom")!==-1?_.insertBefore(r,_.firstChild):_.appendChild(r),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Qt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Pi=function(e){return new Bt(e)};Gt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},r="leaflet-",u=this._controlContainer=Nt("div",r+"control-container",this._container);function _(M,B){var j=r+M+" "+r+B;e[M+B]=Nt("div",j,u)}_("top","left"),_("top","right"),_("bottom","left"),_("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)Qt(this._controlCorners[e]);Qt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=Bt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,r,u,_){return u<_?-1:_<u?1:0}},initialize:function(e,r,u){Z(this,u),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var _ in e)this._addLayer(e[_],_);for(_ in r)this._addLayer(r[_],_,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var r=0;r<this._layers.length;r++)this._layers[r].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return Bt.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,r){return this._addLayer(e,r),this._map?this._update():this},addOverlay:function(e,r){return this._addLayer(e,r,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var r=this._getLayer(A(e));return r&&this._layers.splice(this._layers.indexOf(r),1),this._map?this._update():this},expand:function(){Tt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(Tt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):ne(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ne(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",r=this._container=Nt("div",e),u=this.options.collapsed;r.setAttribute("aria-haspopup",!0),ln(r),ta(r);var _=this._section=Nt("section",e+"-list");u&&(this._map.on("click",this.collapse,this),St(r,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var M=this._layersLink=Nt("a",e+"-toggle",r);M.href="#",M.title="Layers",M.setAttribute("role","button"),St(M,{keydown:function(B){B.keyCode===13&&this._expandSafely()},click:function(B){ce(B),this._expandSafely()}},this),u||this.expand(),this._baseLayersList=Nt("div",e+"-base",_),this._separator=Nt("div",e+"-separator",_),this._overlaysList=Nt("div",e+"-overlays",_),r.appendChild(_)},_getLayer:function(e){for(var r=0;r<this._layers.length;r++)if(this._layers[r]&&A(this._layers[r].layer)===e)return this._layers[r]},_addLayer:function(e,r,u){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:r,overlay:u}),this.options.sortLayers&&this._layers.sort(p(function(_,M){return this.options.sortFunction(_.layer,M.layer,_.name,M.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;rn(this._baseLayersList),rn(this._overlaysList),this._layerControlInputs=[];var e,r,u,_,M=0;for(u=0;u<this._layers.length;u++)_=this._layers[u],this._addItem(_),r=r||_.overlay,e=e||!_.overlay,M+=_.overlay?0:1;return this.options.hideSingleBase&&(e=e&&M>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=r&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var r=this._getLayer(A(e.target)),u=r.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;u&&this._map.fire(u,r)},_createRadioElement:function(e,r){var u='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(r?' checked="checked"':"")+"/>",_=document.createElement("div");return _.innerHTML=u,_.firstChild},_addItem:function(e){var r=document.createElement("label"),u=this._map.hasLayer(e.layer),_;e.overlay?(_=document.createElement("input"),_.type="checkbox",_.className="leaflet-control-layers-selector",_.defaultChecked=u):_=this._createRadioElement("leaflet-base-layers_"+A(this),u),this._layerControlInputs.push(_),_.layerId=A(e.layer),St(_,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+e.name;var B=document.createElement("span");r.appendChild(B),B.appendChild(_),B.appendChild(M);var j=e.overlay?this._overlaysList:this._baseLayersList;return j.appendChild(r),this._checkDisabledLayers(),r},_onInputClick:function(){if(!this._preventClick){var e=this._layerControlInputs,r,u,_=[],M=[];this._handlingClick=!0;for(var B=e.length-1;B>=0;B--)r=e[B],u=this._getLayer(r.layerId).layer,r.checked?_.push(u):r.checked||M.push(u);for(B=0;B<M.length;B++)this._map.hasLayer(M[B])&&this._map.removeLayer(M[B]);for(B=0;B<_.length;B++)this._map.hasLayer(_[B])||this._map.addLayer(_[B]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e=this._layerControlInputs,r,u,_=this._map.getZoom(),M=e.length-1;M>=0;M--)r=e[M],u=this._getLayer(r.layerId).layer,r.disabled=u.options.minZoom!==void 0&&_<u.options.minZoom||u.options.maxZoom!==void 0&&_>u.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,St(e,"click",ce),this.expand();var r=this;setTimeout(function(){Wt(e,"click",ce),r._preventClick=!1})}}),Zo=function(e,r,u){return new un(e,r,u)},Un=Bt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var r="leaflet-control-zoom",u=Nt("div",r+" leaflet-bar"),_=this.options;return this._zoomInButton=this._createButton(_.zoomInText,_.zoomInTitle,r+"-in",u,this._zoomIn),this._zoomOutButton=this._createButton(_.zoomOutText,_.zoomOutTitle,r+"-out",u,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),u},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,r,u,_,M){var B=Nt("a",u,_);return B.innerHTML=e,B.href="#",B.title=r,B.setAttribute("role","button"),B.setAttribute("aria-label",r),ln(B),St(B,"click",Ei),St(B,"click",M,this),St(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var e=this._map,r="leaflet-disabled";ne(this._zoomInButton,r),ne(this._zoomOutButton,r),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(Tt(this._zoomOutButton,r),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(Tt(this._zoomInButton,r),this._zoomInButton.setAttribute("aria-disabled","true"))}});Gt.mergeOptions({zoomControl:!0}),Gt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Un,this.addControl(this.zoomControl))});var jo=function(e){return new Un(e)},Zn=Bt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var r="leaflet-control-scale",u=Nt("div",r),_=this.options;return this._addScales(_,r+"-line",u),e.on(_.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),u},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,r,u){e.metric&&(this._mScale=Nt("div",r,u)),e.imperial&&(this._iScale=Nt("div",r,u))},_update:function(){var e=this._map,r=e.getSize().y/2,u=e.distance(e.containerPointToLatLng([0,r]),e.containerPointToLatLng([this.options.maxWidth,r]));this._updateScales(u)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var r=this._getRoundNum(e),u=r<1e3?r+" m":r/1e3+" km";this._updateScale(this._mScale,u,r/e)},_updateImperial:function(e){var r=e*3.2808399,u,_,M;r>5280?(u=r/5280,_=this._getRoundNum(u),this._updateScale(this._iScale,_+" mi",_/u)):(M=this._getRoundNum(r),this._updateScale(this._iScale,M+" ft",M/r))},_updateScale:function(e,r,u){e.style.width=Math.round(this.options.maxWidth*u)+"px",e.innerHTML=r},_getRoundNum:function(e){var r=Math.pow(10,(Math.floor(e)+"").length-1),u=e/r;return u=u>=10?10:u>=5?5:u>=3?3:u>=2?2:1,r*u}}),jn=function(e){return new Zn(e)},qo='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',We=Bt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Mt.inlineSvg?qo+" ":"")+"Leaflet</a>"},initialize:function(e){Z(this,e),this._attributions={}},onAdd:function(e){e.attributionControl=this,this._container=Nt("div","leaflet-control-attribution"),ln(this._container);for(var r in e._layers)e._layers[r].getAttribution&&this.addAttribution(e._layers[r].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var r in this._attributions)this._attributions[r]&&e.push(r);var u=[];this.options.prefix&&u.push(this.options.prefix),e.length&&u.push(e.join(", ")),this._container.innerHTML=u.join(' <span aria-hidden="true">|</span> ')}}});Gt.mergeOptions({attributionControl:!0}),Gt.addInitHook(function(){this.options.attributionControl&&new We().addTo(this)});var fr=function(e){return new We(e)};Bt.Layers=un,Bt.Zoom=Un,Bt.Scale=Zn,Bt.Attribution=We,Pi.layers=Zo,Pi.zoom=jo,Pi.scale=jn,Pi.attribution=fr;var ve=pe.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ve.addTo=function(e,r){return e.addHandler(r,this),this};var Ho={Events:De},pr=Mt.touch?"touchstart mousedown":"mousedown",mi=en.extend({options:{clickTolerance:3},initialize:function(e,r,u,_){Z(this,_),this._element=e,this._dragStartTarget=r||e,this._preventOutline=u},enable:function(){this._enabled||(St(this._dragStartTarget,pr,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(mi._dragging===this&&this.finishDrag(!0),Wt(this._dragStartTarget,pr,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!qs(this._element,"leaflet-zoom-anim"))){if(e.touches&&e.touches.length!==1){mi._dragging===this&&this.finishDrag();return}if(!(mi._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches)&&(mi._dragging=this,this._preventOutline&&Xs(this._element),$s(),on(),!this._moving)){this.fire("down");var r=e.touches?e.touches[0]:e,u=rr(this._element);this._startPoint=new Pt(r.clientX,r.clientY),this._startPos=wi(this._element),this._parentScale=Ys(u);var _=e.type==="mousedown";St(document,_?"mousemove":"touchmove",this._onMove,this),St(document,_?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(e){if(this._enabled){if(e.touches&&e.touches.length>1){this._moved=!0;return}var r=e.touches&&e.touches.length===1?e.touches[0]:e,u=new Pt(r.clientX,r.clientY)._subtract(this._startPoint);!u.x&&!u.y||Math.abs(u.x)+Math.abs(u.y)<this.options.clickTolerance||(u.x/=this._parentScale.x,u.y/=this._parentScale.y,ce(e),this._moved||(this.fire("dragstart"),this._moved=!0,Tt(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Tt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(u),this._moving=!0,this._lastEvent=e,this._updatePosition())}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),re(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){ne(document.body,"leaflet-dragging"),this._lastTarget&&(ne(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Wt(document,"mousemove touchmove",this._onMove,this),Wt(document,"mouseup touchend touchcancel",this._onUp,this),Ws(),hn();var r=this._moved&&this._moving;this._moving=!1,mi._dragging=!1,r&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function _r(e,r,u){var _,M=[1,4,2,8],B,j,Y,st,ht,pt,wt,Ot;for(B=0,pt=e.length;B<pt;B++)e[B]._code=Ee(e[B],r);for(Y=0;Y<4;Y++){for(wt=M[Y],_=[],B=0,pt=e.length,j=pt-1;B<pt;j=B++)st=e[B],ht=e[j],st._code&wt?ht._code&wt||(Ot=gi(ht,st,wt,r,u),Ot._code=Ee(Ot,r),_.push(Ot)):(ht._code&wt&&(Ot=gi(ht,st,wt,r,u),Ot._code=Ee(Ot,r),_.push(Ot)),_.push(st));e=_}return e}function mr(e,r){var u,_,M,B,j,Y,st,ht,pt;if(!e||e.length===0)throw new Error("latlngs not passed");Pe(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var wt=Rt([0,0]),Ot=ae(e),xe=Ot.getNorthWest().distanceTo(Ot.getSouthWest())*Ot.getNorthEast().distanceTo(Ot.getNorthWest());xe<1700&&(wt=ia(e));var ue=e.length,ke=[];for(u=0;u<ue;u++){var ee=Rt(e[u]);ke.push(r.project(Rt([ee.lat-wt.lat,ee.lng-wt.lng])))}for(Y=st=ht=0,u=0,_=ue-1;u<ue;_=u++)M=ke[u],B=ke[_],j=M.y*B.x-B.y*M.x,st+=(M.x+B.x)*j,ht+=(M.y+B.y)*j,Y+=j*3;Y===0?pt=ke[0]:pt=[st/Y,ht/Y];var Je=r.unproject(Ct(pt));return Rt([Je.lat+wt.lat,Je.lng+wt.lng])}function ia(e){for(var r=0,u=0,_=0,M=0;M<e.length;M++){var B=Rt(e[M]);r+=B.lat,u+=B.lng,_++}return Rt([r/_,u/_])}var Vo={__proto__:null,clipPolygon:_r,polygonCenter:mr,centroid:ia};function gr(e,r){if(!r||!e.length)return e.slice();var u=r*r;return e=yr(e,u),e=de(e,u),e}function na(e,r,u){return Math.sqrt(cn(e,r,u,!0))}function $o(e,r,u){return cn(e,r,u)}function de(e,r){var u=e.length,_=typeof Uint8Array<"u"?Uint8Array:Array,M=new _(u);M[0]=M[u-1]=1,_e(e,M,r,0,u-1);var B,j=[];for(B=0;B<u;B++)M[B]&&j.push(e[B]);return j}function _e(e,r,u,_,M){var B=0,j,Y,st;for(Y=_+1;Y<=M-1;Y++)st=cn(e[Y],e[_],e[M],!0),st>B&&(j=Y,B=st);B>u&&(r[j]=1,_e(e,r,u,_,j),_e(e,r,u,j,M))}function yr(e,r){for(var u=[e[0]],_=1,M=0,B=e.length;_<B;_++)Wo(e[_],e[M])>r&&(u.push(e[_]),M=_);return M<B-1&&u.push(e[B-1]),u}var ki;function Bi(e,r,u,_,M){var B=_?ki:Ee(e,u),j=Ee(r,u),Y,st,ht;for(ki=j;;){if(!(B|j))return[e,r];if(B&j)return!1;Y=B||j,st=gi(e,r,Y,u,M),ht=Ee(st,u),Y===B?(e=st,B=ht):(r=st,j=ht)}}function gi(e,r,u,_,M){var B=r.x-e.x,j=r.y-e.y,Y=_.min,st=_.max,ht,pt;return u&8?(ht=e.x+B*(st.y-e.y)/j,pt=st.y):u&4?(ht=e.x+B*(Y.y-e.y)/j,pt=Y.y):u&2?(ht=st.x,pt=e.y+j*(st.x-e.x)/B):u&1&&(ht=Y.x,pt=e.y+j*(Y.x-e.x)/B),new Pt(ht,pt,M)}function Ee(e,r){var u=0;return e.x<r.min.x?u|=1:e.x>r.max.x&&(u|=2),e.y<r.min.y?u|=4:e.y>r.max.y&&(u|=8),u}function Wo(e,r){var u=r.x-e.x,_=r.y-e.y;return u*u+_*_}function cn(e,r,u,_){var M=r.x,B=r.y,j=u.x-M,Y=u.y-B,st=j*j+Y*Y,ht;return st>0&&(ht=((e.x-M)*j+(e.y-B)*Y)/st,ht>1?(M=u.x,B=u.y):ht>0&&(M+=j*ht,B+=Y*ht)),j=e.x-M,Y=e.y-B,_?j*j+Y*Y:new Pt(M,B)}function Pe(e){return!ct(e[0])||typeof e[0][0]!="object"&&typeof e[0][0]<"u"}function Ue(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Pe(e)}function sa(e,r){var u,_,M,B,j,Y,st,ht;if(!e||e.length===0)throw new Error("latlngs not passed");Pe(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var pt=Rt([0,0]),wt=ae(e),Ot=wt.getNorthWest().distanceTo(wt.getSouthWest())*wt.getNorthEast().distanceTo(wt.getNorthWest());Ot<1700&&(pt=ia(e));var xe=e.length,ue=[];for(u=0;u<xe;u++){var ke=Rt(e[u]);ue.push(r.project(Rt([ke.lat-pt.lat,ke.lng-pt.lng])))}for(u=0,_=0;u<xe-1;u++)_+=ue[u].distanceTo(ue[u+1])/2;if(_===0)ht=ue[0];else for(u=0,B=0;u<xe-1;u++)if(j=ue[u],Y=ue[u+1],M=j.distanceTo(Y),B+=M,B>_){st=(B-_)/M,ht=[Y.x-st*(Y.x-j.x),Y.y-st*(Y.y-j.y)];break}var ee=r.unproject(Ct(ht));return Rt([ee.lat+pt.lat,ee.lng+pt.lng])}var qn={__proto__:null,simplify:gr,pointToSegmentDistance:na,closestPointOnSegment:$o,clipSegment:Bi,_getEdgeIntersection:gi,_getBitCode:Ee,_sqClosestPointOnSegment:cn,isFlat:Pe,_flat:Ue,polylineCenter:sa},aa={project:function(e){return new Pt(e.lng,e.lat)},unproject:function(e){return new Ht(e.y,e.x)},bounds:new te([-180,-90],[180,90])},Ze={R:6378137,R_MINOR:6356752314245179e-9,bounds:new te([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(e){var r=Math.PI/180,u=this.R,_=e.lat*r,M=this.R_MINOR/u,B=Math.sqrt(1-M*M),j=B*Math.sin(_),Y=Math.tan(Math.PI/4-_/2)/Math.pow((1-j)/(1+j),B/2);return _=-u*Math.log(Math.max(Y,1e-10)),new Pt(e.lng*r*u,_)},unproject:function(e){for(var r=180/Math.PI,u=this.R,_=this.R_MINOR/u,M=Math.sqrt(1-_*_),B=Math.exp(-e.y/u),j=Math.PI/2-2*Math.atan(B),Y=0,st=.1,ht;Y<15&&Math.abs(st)>1e-7;Y++)ht=M*Math.sin(j),ht=Math.pow((1-ht)/(1+ht),M/2),st=Math.PI/2-2*Math.atan(B*ht)-j,j+=st;return new Ht(j*r,e.x*r/u)}},Ke={__proto__:null,LonLat:aa,Mercator:Ze,SphericalMercator:Ts},Hn=c({},fi,{code:"EPSG:3395",projection:Ze,transformation:function(){var e=.5/(Math.PI*Ze.R);return sn(e,.5,-e,.5)}()}),ra=c({},fi,{code:"EPSG:4326",projection:aa,transformation:sn(1/180,1,-1/180,.5)}),oa=c({},si,{projection:aa,transformation:sn(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,r){var u=r.lng-e.lng,_=r.lat-e.lat;return Math.sqrt(u*u+_*_)},infinite:!0});si.Earth=fi,si.EPSG3395=Hn,si.EPSG3857=Os,si.EPSG900913=Ia,si.EPSG4326=ra,si.Simple=oa;var Ae=en.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[A(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[A(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var r=e.target;if(r.hasLayer(this)){if(this._map=r,this._zoomAnimated=r._zoomAnimated,this.getEvents){var u=this.getEvents();r.on(u,this),this.once("remove",function(){r.off(u,this)},this)}this.onAdd(r),this.fire("add"),r.fire("layeradd",{layer:this})}}});Gt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var r=A(e);return this._layers[r]?this:(this._layers[r]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e),this)},removeLayer:function(e){var r=A(e);return this._layers[r]?(this._loaded&&e.onRemove(this),delete this._layers[r],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return A(e)in this._layers},eachLayer:function(e,r){for(var u in this._layers)e.call(r,this._layers[u]);return this},_addLayers:function(e){e=e?ct(e)?e:[e]:[];for(var r=0,u=e.length;r<u;r++)this.addLayer(e[r])},_addZoomLimit:function(e){(!isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom))&&(this._zoomBoundLayers[A(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var r=A(e);this._zoomBoundLayers[r]&&(delete this._zoomBoundLayers[r],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,r=-1/0,u=this._getZoomSpan();for(var _ in this._zoomBoundLayers){var M=this._zoomBoundLayers[_].options;e=M.minZoom===void 0?e:Math.min(e,M.minZoom),r=M.maxZoom===void 0?r:Math.max(r,M.maxZoom)}this._layersMaxZoom=r===-1/0?void 0:r,this._layersMinZoom=e===1/0?void 0:e,u!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var qi=Ae.extend({initialize:function(e,r){Z(this,r),this._layers={};var u,_;if(e)for(u=0,_=e.length;u<_;u++)this.addLayer(e[u])},addLayer:function(e){var r=this.getLayerId(e);return this._layers[r]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var r=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[r]&&this._map.removeLayer(this._layers[r]),delete this._layers[r],this},hasLayer:function(e){var r=typeof e=="number"?e:this.getLayerId(e);return r in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var r=Array.prototype.slice.call(arguments,1),u,_;for(u in this._layers)_=this._layers[u],_[e]&&_[e].apply(_,r);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,r){for(var u in this._layers)e.call(r,this._layers[u]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return A(e)}}),Ko=function(e,r){return new qi(e,r)},qe=qi.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),qi.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),qi.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new Ce;for(var r in this._layers){var u=this._layers[r];e.extend(u.getBounds?u.getBounds():u.getLatLng())}return e}}),Xo=function(e,r){return new qe(e,r)},Hi=pe.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){Z(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,r){var u=this._getIconUrl(e);if(!u){if(e==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var _=this._createImg(u,r&&r.tagName==="IMG"?r:null);return this._setIconStyles(_,e),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),_},_setIconStyles:function(e,r){var u=this.options,_=u[r+"Size"];typeof _=="number"&&(_=[_,_]);var M=Ct(_),B=Ct(r==="shadow"&&u.shadowAnchor||u.iconAnchor||M&&M.divideBy(2,!0));e.className="leaflet-marker-"+r+" "+(u.className||""),B&&(e.style.marginLeft=-B.x+"px",e.style.marginTop=-B.y+"px"),M&&(e.style.width=M.x+"px",e.style.height=M.y+"px")},_createImg:function(e,r){return r=r||document.createElement("img"),r.src=e,r},_getIconUrl:function(e){return Mt.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function Yo(e){return new Hi(e)}var dn=Hi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return typeof dn.imagePath!="string"&&(dn.imagePath=this._detectIconPath()),(this.options.imagePath||dn.imagePath)+Hi.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var r=function(u,_,M){var B=_.exec(u);return B&&B[M]};return e=r(e,/^url\((['"])?(.+)\1\)$/,2),e&&r(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=Nt("div","leaflet-default-icon-path",document.body),r=pi(e,"background-image")||pi(e,"backgroundImage");if(document.body.removeChild(e),r=this._stripUrl(r),r)return r;var u=document.querySelector('link[href$="leaflet.css"]');return u?u.href.substring(0,u.href.length-11-1):""}}),Vn=ve.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new mi(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Tt(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ne(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var r=this._marker,u=r._map,_=this._marker.options.autoPanSpeed,M=this._marker.options.autoPanPadding,B=wi(r._icon),j=u.getPixelBounds(),Y=u.getPixelOrigin(),st=we(j.min._subtract(Y).add(M),j.max._subtract(Y).subtract(M));if(!st.contains(B)){var ht=Ct((Math.max(st.max.x,B.x)-st.max.x)/(j.max.x-st.max.x)-(Math.min(st.min.x,B.x)-st.min.x)/(j.min.x-st.min.x),(Math.max(st.max.y,B.y)-st.max.y)/(j.max.y-st.max.y)-(Math.min(st.min.y,B.y)-st.min.y)/(j.min.y-st.min.y)).multiplyBy(_);u.panBy(ht,{animate:!1}),this._draggable._newPos._add(ht),this._draggable._startPos._add(ht),re(r._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=Et(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(Zt(this._panRequest),this._panRequest=Et(this._adjustPan.bind(this,e)))},_onDrag:function(e){var r=this._marker,u=r._shadow,_=wi(r._icon),M=r._map.layerPointToLatLng(_);u&&re(u,_),r._latlng=M,e.latlng=M,e.oldLatLng=this._oldLatLng,r.fire("move",e).fire("drag",e)},_onDragEnd:function(e){Zt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),$n=Ae.extend({options:{icon:new dn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,r){Z(this,r),this._latlng=Rt(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var r=this._latlng;return this._latlng=Rt(e),this.update(),this.fire("move",{oldLatLng:r,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,r="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),u=e.icon.createIcon(this._icon),_=!1;u!==this._icon&&(this._icon&&this._removeIcon(),_=!0,e.title&&(u.title=e.title),u.tagName==="IMG"&&(u.alt=e.alt||"")),Tt(u,r),e.keyboard&&(u.tabIndex="0",u.setAttribute("role","button")),this._icon=u,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&St(u,"focus",this._panOnFocus,this);var M=e.icon.createShadow(this._shadow),B=!1;M!==this._shadow&&(this._removeShadow(),B=!0),M&&(Tt(M,r),M.alt=""),this._shadow=M,e.opacity<1&&this._updateOpacity(),_&&this.getPane().appendChild(this._icon),this._initInteraction(),M&&B&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Wt(this._icon,"focus",this._panOnFocus,this),Qt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Qt(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&re(this._icon,e),this._shadow&&re(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var r=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(r)},_initInteraction:function(){if(this.options.interactive&&(Tt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Vn)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Vn(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&Ne(this._icon,e),this._shadow&&Ne(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var r=this.options.icon.options,u=r.iconSize?Ct(r.iconSize):Ct(0,0),_=r.iconAnchor?Ct(r.iconAnchor):Ct(0,0);e.panInside(this._latlng,{paddingTopLeft:_,paddingBottomRight:u.subtract(_)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Jo(e,r){return new $n(e,r)}var ai=Ae.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return Z(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Xe=ai.extend({options:{fill:!0,radius:10},initialize:function(e,r){Z(this,r),this._latlng=Rt(e),this._radius=this.options.radius},setLatLng:function(e){var r=this._latlng;return this._latlng=Rt(e),this.redraw(),this.fire("move",{oldLatLng:r,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var r=e&&e.radius||this._radius;return ai.prototype.setStyle.call(this,e),this.setRadius(r),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,r=this._radiusY||e,u=this._clickTolerance(),_=[e+u,r+u];this._pxBounds=new te(this._point.subtract(_),this._point.add(_))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function vr(e,r){return new Xe(e,r)}var ha=Xe.extend({initialize:function(e,r,u){if(typeof r=="number"&&(r=c({},u,{radius:r})),Z(this,r),this._latlng=Rt(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new Ce(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:ai.prototype.setStyle,_project:function(){var e=this._latlng.lng,r=this._latlng.lat,u=this._map,_=u.options.crs;if(_.distance===fi.distance){var M=Math.PI/180,B=this._mRadius/fi.R/M,j=u.project([r+B,e]),Y=u.project([r-B,e]),st=j.add(Y).divideBy(2),ht=u.unproject(st).lat,pt=Math.acos((Math.cos(B*M)-Math.sin(r*M)*Math.sin(ht*M))/(Math.cos(r*M)*Math.cos(ht*M)))/M;(isNaN(pt)||pt===0)&&(pt=B/Math.cos(Math.PI/180*r)),this._point=st.subtract(u.getPixelOrigin()),this._radius=isNaN(pt)?0:st.x-u.project([ht,e-pt]).x,this._radiusY=st.y-j.y}else{var wt=_.unproject(_.project(this._latlng).subtract([this._mRadius,0]));this._point=u.latLngToLayerPoint(this._latlng),this._radius=this._point.x-u.latLngToLayerPoint(wt).x}this._updateBounds()}});function Si(e,r,u){return new ha(e,r,u)}var ri=ai.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,r){Z(this,r),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var r=1/0,u=null,_=cn,M,B,j=0,Y=this._parts.length;j<Y;j++)for(var st=this._parts[j],ht=1,pt=st.length;ht<pt;ht++){M=st[ht-1],B=st[ht];var wt=_(e,M,B,!0);wt<r&&(r=wt,u=_(e,M,B))}return u&&(u.distance=Math.sqrt(r)),u},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return sa(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,r){return r=r||this._defaultShape(),e=Rt(e),r.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new Ce,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Pe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var r=[],u=Pe(e),_=0,M=e.length;_<M;_++)u?(r[_]=Rt(e[_]),this._bounds.extend(r[_])):r[_]=this._convertLatLngs(e[_]);return r},_project:function(){var e=new te;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),r=new Pt(e,e);this._rawPxBounds&&(this._pxBounds=new te([this._rawPxBounds.min.subtract(r),this._rawPxBounds.max.add(r)]))},_projectLatlngs:function(e,r,u){var _=e[0]instanceof Ht,M=e.length,B,j;if(_){for(j=[],B=0;B<M;B++)j[B]=this._map.latLngToLayerPoint(e[B]),u.extend(j[B]);r.push(j)}else for(B=0;B<M;B++)this._projectLatlngs(e[B],r,u)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}var r=this._parts,u,_,M,B,j,Y,st;for(u=0,M=0,B=this._rings.length;u<B;u++)for(st=this._rings[u],_=0,j=st.length;_<j-1;_++)Y=Bi(st[_],st[_+1],e,_,!0),Y&&(r[M]=r[M]||[],r[M].push(Y[0]),(Y[1]!==st[_+1]||_===j-2)&&(r[M].push(Y[1]),M++))}},_simplifyPoints:function(){for(var e=this._parts,r=this.options.smoothFactor,u=0,_=e.length;u<_;u++)e[u]=gr(e[u],r)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,r){var u,_,M,B,j,Y,st=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(u=0,B=this._parts.length;u<B;u++)for(Y=this._parts[u],_=0,j=Y.length,M=j-1;_<j;M=_++)if(!(!r&&_===0)&&na(e,Y[M],Y[_])<=st)return!0;return!1}});function Qo(e,r){return new ri(e,r)}ri._flat=Ue;var yi=ri.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return mr(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var r=ri.prototype._convertLatLngs.call(this,e),u=r.length;return u>=2&&r[0]instanceof Ht&&r[0].equals(r[u-1])&&r.pop(),r},_setLatLngs:function(e){ri.prototype._setLatLngs.call(this,e),Pe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Pe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,r=this.options.weight,u=new Pt(r,r);if(e=new te(e.min.subtract(u),e.max.add(u)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(e))){if(this.options.noClip){this._parts=this._rings;return}for(var _=0,M=this._rings.length,B;_<M;_++)B=_r(this._rings[_],e,!0),B.length&&this._parts.push(B)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var r=!1,u,_,M,B,j,Y,st,ht;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(B=0,st=this._parts.length;B<st;B++)for(u=this._parts[B],j=0,ht=u.length,Y=ht-1;j<ht;Y=j++)_=u[j],M=u[Y],_.y>e.y!=M.y>e.y&&e.x<(M.x-_.x)*(e.y-_.y)/(M.y-_.y)+_.x&&(r=!r);return r||ri.prototype._containsPoint.call(this,e,!0)}});function fn(e,r){return new yi(e,r)}var oi=qe.extend({initialize:function(e,r){Z(this,r),this._layers={},e&&this.addData(e)},addData:function(e){var r=ct(e)?e:e.features,u,_,M;if(r){for(u=0,_=r.length;u<_;u++)M=r[u],(M.geometries||M.geometry||M.features||M.coordinates)&&this.addData(M);return this}var B=this.options;if(B.filter&&!B.filter(e))return this;var j=Wn(e,B);return j?(j.feature=Qn(e),j.defaultOptions=j.options,this.resetStyle(j),B.onEachFeature&&B.onEachFeature(e,j),this.addLayer(j)):this},resetStyle:function(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=c({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(r){this._setLayerStyle(r,e)},this)},_setLayerStyle:function(e,r){e.setStyle&&(typeof r=="function"&&(r=r(e.feature)),e.setStyle(r))}});function Wn(e,r){var u=e.type==="Feature"?e.geometry:e,_=u?u.coordinates:null,M=[],B=r&&r.pointToLayer,j=r&&r.coordsToLatLng||Kn,Y,st,ht,pt;if(!_&&!u)return null;switch(u.type){case"Point":return Y=j(_),Ar(B,e,Y,r);case"MultiPoint":for(ht=0,pt=_.length;ht<pt;ht++)Y=j(_[ht]),M.push(Ar(B,e,Y,r));return new qe(M);case"LineString":case"MultiLineString":return st=Xn(_,u.type==="LineString"?0:1,j),new ri(st,r);case"Polygon":case"MultiPolygon":return st=Xn(_,u.type==="Polygon"?1:2,j),new yi(st,r);case"GeometryCollection":for(ht=0,pt=u.geometries.length;ht<pt;ht++){var wt=Wn({geometry:u.geometries[ht],type:"Feature",properties:e.properties},r);wt&&M.push(wt)}return new qe(M);case"FeatureCollection":for(ht=0,pt=u.features.length;ht<pt;ht++){var Ot=Wn(u.features[ht],r);Ot&&M.push(Ot)}return new qe(M);default:throw new Error("Invalid GeoJSON object.")}}function Ar(e,r,u,_){return e?e(r,u):new $n(u,_&&_.markersInheritOptions&&_)}function Kn(e){return new Ht(e[1],e[0],e[2])}function Xn(e,r,u){for(var _=[],M=0,B=e.length,j;M<B;M++)j=r?Xn(e[M],r-1,u):(u||Kn)(e[M]),_.push(j);return _}function Yn(e,r){return e=Rt(e),e.alt!==void 0?[b(e.lng,r),b(e.lat,r),b(e.alt,r)]:[b(e.lng,r),b(e.lat,r)]}function Jn(e,r,u,_){for(var M=[],B=0,j=e.length;B<j;B++)M.push(r?Jn(e[B],Pe(e[B])?0:r-1,u,_):Yn(e[B],_));return!r&&u&&M.length>0&&M.push(M[0].slice()),M}function Vi(e,r){return e.feature?c({},e.feature,{geometry:r}):Qn(r)}function Qn(e){return e.type==="Feature"||e.type==="FeatureCollection"?e:{type:"Feature",properties:{},geometry:e}}var ts={toGeoJSON:function(e){return Vi(this,{type:"Point",coordinates:Yn(this.getLatLng(),e)})}};$n.include(ts),ha.include(ts),Xe.include(ts),ri.include({toGeoJSON:function(e){var r=!Pe(this._latlngs),u=Jn(this._latlngs,r?1:0,!1,e);return Vi(this,{type:(r?"Multi":"")+"LineString",coordinates:u})}}),yi.include({toGeoJSON:function(e){var r=!Pe(this._latlngs),u=r&&!Pe(this._latlngs[0]),_=Jn(this._latlngs,u?2:r?1:0,!0,e);return r||(_=[_]),Vi(this,{type:(u?"Multi":"")+"Polygon",coordinates:_})}}),qi.include({toMultiPoint:function(e){var r=[];return this.eachLayer(function(u){r.push(u.toGeoJSON(e).geometry.coordinates)}),Vi(this,{type:"MultiPoint",coordinates:r})},toGeoJSON:function(e){var r=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(r==="MultiPoint")return this.toMultiPoint(e);var u=r==="GeometryCollection",_=[];return this.eachLayer(function(M){if(M.toGeoJSON){var B=M.toGeoJSON(e);if(u)_.push(B.geometry);else{var j=Qn(B);j.type==="FeatureCollection"?_.push.apply(_,j.features):_.push(j)}}}),u?Vi(this,{geometries:_,type:"GeometryCollection"}):{type:"FeatureCollection",features:_}}});function es(e,r){return new oi(e,r)}var Mr=es,$i=Ae.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,r,u){this._url=e,this._bounds=ae(r),Z(this,u)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Tt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Qt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&Zi(this._image),this},bringToBack:function(){return this._map&&Li(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=ae(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e=this._url.tagName==="IMG",r=this._image=e?this._url:Nt("img");if(Tt(r,"leaflet-image-layer"),this._zoomAnimated&&Tt(r,"leaflet-zoom-animated"),this.options.className&&Tt(r,this.options.className),r.onselectstart=x,r.onmousemove=x,r.onload=p(this.fire,this,"load"),r.onerror=p(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(r.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e){this._url=r.src;return}r.src=this._url,r.alt=this.options.alt},_animateZoom:function(e){var r=this._map.getZoomScale(e.zoom),u=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;bi(this._image,u,r)},_reset:function(){var e=this._image,r=new te(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),u=r.getSize();re(e,r.min),e.style.width=u.x+"px",e.style.height=u.y+"px"},_updateOpacity:function(){Ne(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),th=function(e,r,u){return new $i(e,r,u)},pn=$i.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e=this._url.tagName==="VIDEO",r=this._image=e?this._url:Nt("video");if(Tt(r,"leaflet-image-layer"),this._zoomAnimated&&Tt(r,"leaflet-zoom-animated"),this.options.className&&Tt(r,this.options.className),r.onselectstart=x,r.onmousemove=x,r.onloadeddata=p(this.fire,this,"load"),e){for(var u=r.getElementsByTagName("source"),_=[],M=0;M<u.length;M++)_.push(u[M].src);this._url=u.length>0?_:[r.src];return}ct(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(r.style,"objectFit")&&(r.style.objectFit="fill"),r.autoplay=!!this.options.autoplay,r.loop=!!this.options.loop,r.muted=!!this.options.muted,r.playsInline=!!this.options.playsInline;for(var B=0;B<this._url.length;B++){var j=Nt("source");j.src=this._url[B],r.appendChild(j)}}});function xr(e,r,u){return new pn(e,r,u)}var Lr=$i.extend({_initImage:function(){var e=this._image=this._url;Tt(e,"leaflet-image-layer"),this._zoomAnimated&&Tt(e,"leaflet-zoom-animated"),this.options.className&&Tt(e,this.options.className),e.onselectstart=x,e.onmousemove=x}});function eh(e,r,u){return new Lr(e,r,u)}var Ye=Ae.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,r){e&&(e instanceof Ht||ct(e))?(this._latlng=Rt(e),Z(this,r)):(Z(this,e),this._source=r),this.options.content&&(this._content=this.options.content)},openOn:function(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&Ne(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&Ne(this._container,1),this.bringToFront(),this.options.interactive&&(Tt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(Ne(this._container,0),this._removeTimeout=setTimeout(p(Qt,void 0,this._container),200)):Qt(this._container),this.options.interactive&&(ne(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=Rt(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Zi(this._container),this},bringToBack:function(){return this._map&&Li(this._container),this},_prepareOpen:function(e){var r=this._source;if(!r._map)return!1;if(r instanceof qe){r=null;var u=this._source._layers;for(var _ in u)if(u[_]._map){r=u[_];break}if(!r)return!1;this._source=r}if(!e)if(r.getCenter)e=r.getCenter();else if(r.getLatLng)e=r.getLatLng();else if(r.getBounds)e=r.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,r=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof r=="string")e.innerHTML=r;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(r)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),r=Ct(this.options.offset),u=this._getAnchor();this._zoomAnimated?re(this._container,e.add(u)):r=r.add(e).add(u);var _=this._containerBottom=-r.y,M=this._containerLeft=-Math.round(this._containerWidth/2)+r.x;this._container.style.bottom=_+"px",this._container.style.left=M+"px"}},_getAnchor:function(){return[0,0]}});Gt.include({_initOverlay:function(e,r,u,_){var M=r;return M instanceof e||(M=new e(_).setContent(r)),u&&M.setLatLng(u),M}}),Ae.include({_initOverlay:function(e,r,u,_){var M=u;return M instanceof e?(Z(M,_),M._source=this):(M=r&&!_?r:new e(_,this),M.setContent(u)),M}});var vi=Ye.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Ye.prototype.openOn.call(this,e)},onAdd:function(e){Ye.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ai||this._source.on("preclick",Ci))},onRemove:function(e){Ye.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ai||this._source.off("preclick",Ci))},getEvents:function(){var e=Ye.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",r=this._container=Nt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),u=this._wrapper=Nt("div",e+"-content-wrapper",r);if(this._contentNode=Nt("div",e+"-content",u),ln(r),ta(this._contentNode),St(r,"contextmenu",Ci),this._tipContainer=Nt("div",e+"-tip-container",r),this._tip=Nt("div",e+"-tip",this._tipContainer),this.options.closeButton){var _=this._closeButton=Nt("a",e+"-close-button",r);_.setAttribute("role","button"),_.setAttribute("aria-label","Close popup"),_.href="#close",_.innerHTML='<span aria-hidden="true">×</span>',St(_,"click",function(M){ce(M),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,r=e.style;r.width="",r.whiteSpace="nowrap";var u=e.offsetWidth;u=Math.min(u,this.options.maxWidth),u=Math.max(u,this.options.minWidth),r.width=u+1+"px",r.whiteSpace="",r.height="";var _=e.offsetHeight,M=this.options.maxHeight,B="leaflet-popup-scrolled";M&&_>M?(r.height=M+"px",Tt(e,B)):ne(e,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var r=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),u=this._getAnchor();re(this._container,r.add(u))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var e=this._map,r=parseInt(pi(this._container,"marginBottom"),10)||0,u=this._container.offsetHeight+r,_=this._containerWidth,M=new Pt(this._containerLeft,-u-this._containerBottom);M._add(wi(this._container));var B=e.layerPointToContainerPoint(M),j=Ct(this.options.autoPanPadding),Y=Ct(this.options.autoPanPaddingTopLeft||j),st=Ct(this.options.autoPanPaddingBottomRight||j),ht=e.getSize(),pt=0,wt=0;B.x+_+st.x>ht.x&&(pt=B.x+_-ht.x+st.x),B.x-pt-Y.x<0&&(pt=B.x-Y.x),B.y+u+st.y>ht.y&&(wt=B.y+u-ht.y+st.y),B.y-wt-Y.y<0&&(wt=B.y-Y.y),(pt||wt)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([pt,wt]))}},_getAnchor:function(){return Ct(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ih=function(e,r){return new vi(e,r)};Gt.mergeOptions({closePopupOnClick:!0}),Gt.include({openPopup:function(e,r,u){return this._initOverlay(vi,e,r,u).openOn(this),this},closePopup:function(e){return e=arguments.length?e:this._popup,e&&e.close(),this}}),Ae.include({bindPopup:function(e,r){return this._popup=this._initOverlay(vi,this._popup,e,r),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof qe||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(!(!this._popup||!this._map)){Ei(e);var r=e.layer||e.target;if(this._popup._source===r&&!(r instanceof ai)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng);return}this._popup._source=r,this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){e.originalEvent.keyCode===13&&this._openPopup(e)}});var is=Ye.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Ye.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Ye.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Ye.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip",r=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Nt("div",r),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+A(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var r,u,_=this._map,M=this._container,B=_.latLngToContainerPoint(_.getCenter()),j=_.layerPointToContainerPoint(e),Y=this.options.direction,st=M.offsetWidth,ht=M.offsetHeight,pt=Ct(this.options.offset),wt=this._getAnchor();Y==="top"?(r=st/2,u=ht):Y==="bottom"?(r=st/2,u=0):Y==="center"?(r=st/2,u=ht/2):Y==="right"?(r=0,u=ht/2):Y==="left"?(r=st,u=ht/2):j.x<B.x?(Y="right",r=0,u=ht/2):(Y="left",r=st+(pt.x+wt.x)*2,u=ht/2),e=e.subtract(Ct(r,u,!0)).add(pt).add(wt),ne(M,"leaflet-tooltip-right"),ne(M,"leaflet-tooltip-left"),ne(M,"leaflet-tooltip-top"),ne(M,"leaflet-tooltip-bottom"),Tt(M,"leaflet-tooltip-"+Y),re(M,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&Ne(this._container,e)},_animateZoom:function(e){var r=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(r)},_getAnchor:function(){return Ct(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),nh=function(e,r){return new is(e,r)};Gt.include({openTooltip:function(e,r,u){return this._initOverlay(is,e,r,u).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),Ae.include({bindTooltip:function(e,r){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(is,this._tooltip,e,r),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(!(!e&&this._tooltipHandlersAdded)){var r=e?"off":"on",u={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?u.add=this._openTooltip:(u.mouseover=this._openTooltip,u.mouseout=this.closeTooltip,u.click=this._openTooltip,this._map?this._addFocusListeners():u.add=this._addFocusListeners),this._tooltip.options.sticky&&(u.mousemove=this._moveTooltip),this[r](u),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof qe||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var r=typeof e.getElement=="function"&&e.getElement();r&&(St(r,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),St(r,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var r=typeof e.getElement=="function"&&e.getElement();r&&r.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var r=this;this._map.once("moveend",function(){r._openOnceFlag=!1,r._openTooltip(e)});return}this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)}},_moveTooltip:function(e){var r=e.latlng,u,_;this._tooltip.options.sticky&&e.originalEvent&&(u=this._map.mouseEventToContainerPoint(e.originalEvent),_=this._map.containerPointToLayerPoint(u),r=this._map.layerPointToLatLng(_)),this._tooltip.setLatLng(r)}});var br=Hi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var r=e&&e.tagName==="DIV"?e:document.createElement("div"),u=this.options;if(u.html instanceof Element?(rn(r),r.appendChild(u.html)):r.innerHTML=u.html!==!1?u.html:"",u.bgPos){var _=Ct(u.bgPos);r.style.backgroundPosition=-_.x+"px "+-_.y+"px"}return this._setIconStyles(r,"icon"),r},createShadow:function(){return null}});function sh(e){return new br(e)}Hi.Default=dn;var _n=Ae.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Mt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){Z(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),Qt(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Zi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Li(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=k(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof Pt?e:new Pt(e,e)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var r=this.getPane().children,u=-e(-1/0,1/0),_=0,M=r.length,B;_<M;_++)B=r[_].style.zIndex,r[_]!==this._container&&B&&(u=e(u,+B));isFinite(u)&&(this.options.zIndex=u+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Mt.ielt9){Ne(this._container,this.options.opacity);var e=+new Date,r=!1,u=!1;for(var _ in this._tiles){var M=this._tiles[_];if(!(!M.current||!M.loaded)){var B=Math.min(1,(e-M.loaded)/200);Ne(M.el,B),B<1?r=!0:(M.active?u=!0:this._onOpaqueTile(M),M.active=!0)}}u&&!this._noPrune&&this._pruneTiles(),r&&(Zt(this._fadeFrame),this._fadeFrame=Et(this._updateOpacity,this))}},_onOpaqueTile:x,_initContainer:function(){this._container||(this._container=Nt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,r=this.options.maxZoom;if(e!==void 0){for(var u in this._levels)u=Number(u),this._levels[u].el.children.length||u===e?(this._levels[u].el.style.zIndex=r-Math.abs(e-u),this._onUpdateLevel(u)):(Qt(this._levels[u].el),this._removeTilesAtZoom(u),this._onRemoveLevel(u),delete this._levels[u]);var _=this._levels[e],M=this._map;return _||(_=this._levels[e]={},_.el=Nt("div","leaflet-tile-container leaflet-zoom-animated",this._container),_.el.style.zIndex=r,_.origin=M.project(M.unproject(M.getPixelOrigin()),e).round(),_.zoom=e,this._setZoomTransform(_,M.getCenter(),M.getZoom()),x(_.el.offsetWidth),this._onCreateLevel(_)),this._level=_,_}},_onUpdateLevel:x,_onRemoveLevel:x,_onCreateLevel:x,_pruneTiles:function(){if(this._map){var e,r,u=this._map.getZoom();if(u>this.options.maxZoom||u<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles)r=this._tiles[e],r.retain=r.current;for(e in this._tiles)if(r=this._tiles[e],r.current&&!r.active){var _=r.coords;this._retainParent(_.x,_.y,_.z,_.z-5)||this._retainChildren(_.x,_.y,_.z,_.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}},_removeTilesAtZoom:function(e){for(var r in this._tiles)this._tiles[r].coords.z===e&&this._removeTile(r)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)Qt(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,r,u,_){var M=Math.floor(e/2),B=Math.floor(r/2),j=u-1,Y=new Pt(+M,+B);Y.z=+j;var st=this._tileCoordsToKey(Y),ht=this._tiles[st];return ht&&ht.active?(ht.retain=!0,!0):(ht&&ht.loaded&&(ht.retain=!0),j>_?this._retainParent(M,B,j,_):!1)},_retainChildren:function(e,r,u,_){for(var M=2*e;M<2*e+2;M++)for(var B=2*r;B<2*r+2;B++){var j=new Pt(M,B);j.z=u+1;var Y=this._tileCoordsToKey(j),st=this._tiles[Y];if(st&&st.active){st.retain=!0;continue}else st&&st.loaded&&(st.retain=!0);u+1<_&&this._retainChildren(M,B,u+1,_)}},_resetView:function(e){var r=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),r,r)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var r=this.options;return r.minNativeZoom!==void 0&&e<r.minNativeZoom?r.minNativeZoom:r.maxNativeZoom!==void 0&&r.maxNativeZoom<e?r.maxNativeZoom:e},_setView:function(e,r,u,_){var M=Math.round(r);this.options.maxZoom!==void 0&&M>this.options.maxZoom||this.options.minZoom!==void 0&&M<this.options.minZoom?M=void 0:M=this._clampZoom(M);var B=this.options.updateWhenZooming&&M!==this._tileZoom;(!_||B)&&(this._tileZoom=M,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),M!==void 0&&this._update(e),u||this._pruneTiles(),this._noPrune=!!u),this._setZoomTransforms(e,r)},_setZoomTransforms:function(e,r){for(var u in this._levels)this._setZoomTransform(this._levels[u],e,r)},_setZoomTransform:function(e,r,u){var _=this._map.getZoomScale(u,e.zoom),M=e.origin.multiplyBy(_).subtract(this._map._getNewPixelOrigin(r,u)).round();Mt.any3d?bi(e.el,M,_):re(e.el,M)},_resetGrid:function(){var e=this._map,r=e.options.crs,u=this._tileSize=this.getTileSize(),_=this._tileZoom,M=this._map.getPixelWorldBounds(this._tileZoom);M&&(this._globalTileRange=this._pxBoundsToTileRange(M)),this._wrapX=r.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,r.wrapLng[0]],_).x/u.x),Math.ceil(e.project([0,r.wrapLng[1]],_).x/u.y)],this._wrapY=r.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([r.wrapLat[0],0],_).y/u.x),Math.ceil(e.project([r.wrapLat[1],0],_).y/u.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(e){var r=this._map,u=r._animatingZoom?Math.max(r._animateToZoom,r.getZoom()):r.getZoom(),_=r.getZoomScale(u,this._tileZoom),M=r.project(e,this._tileZoom).floor(),B=r.getSize().divideBy(_*2);return new te(M.subtract(B),M.add(B))},_update:function(e){var r=this._map;if(r){var u=this._clampZoom(r.getZoom());if(e===void 0&&(e=r.getCenter()),this._tileZoom!==void 0){var _=this._getTiledPixelBounds(e),M=this._pxBoundsToTileRange(_),B=M.getCenter(),j=[],Y=this.options.keepBuffer,st=new te(M.getBottomLeft().subtract([Y,-Y]),M.getTopRight().add([Y,-Y]));if(!(isFinite(M.min.x)&&isFinite(M.min.y)&&isFinite(M.max.x)&&isFinite(M.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ht in this._tiles){var pt=this._tiles[ht].coords;(pt.z!==this._tileZoom||!st.contains(new Pt(pt.x,pt.y)))&&(this._tiles[ht].current=!1)}if(Math.abs(u-this._tileZoom)>1){this._setView(e,u);return}for(var wt=M.min.y;wt<=M.max.y;wt++)for(var Ot=M.min.x;Ot<=M.max.x;Ot++){var xe=new Pt(Ot,wt);if(xe.z=this._tileZoom,!!this._isValidTile(xe)){var ue=this._tiles[this._tileCoordsToKey(xe)];ue?ue.current=!0:j.push(xe)}}if(j.sort(function(ee,Je){return ee.distanceTo(B)-Je.distanceTo(B)}),j.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ke=document.createDocumentFragment();for(Ot=0;Ot<j.length;Ot++)this._addTile(j[Ot],ke);this._level.el.appendChild(ke)}}}},_isValidTile:function(e){var r=this._map.options.crs;if(!r.infinite){var u=this._globalTileRange;if(!r.wrapLng&&(e.x<u.min.x||e.x>u.max.x)||!r.wrapLat&&(e.y<u.min.y||e.y>u.max.y))return!1}if(!this.options.bounds)return!0;var _=this._tileCoordsToBounds(e);return ae(this.options.bounds).overlaps(_)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var r=this._map,u=this.getTileSize(),_=e.scaleBy(u),M=_.add(u),B=r.unproject(_,e.z),j=r.unproject(M,e.z);return[B,j]},_tileCoordsToBounds:function(e){var r=this._tileCoordsToNwSe(e),u=new Ce(r[0],r[1]);return this.options.noWrap||(u=this._map.wrapLatLngBounds(u)),u},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var r=e.split(":"),u=new Pt(+r[0],+r[1]);return u.z=+r[2],u},_removeTile:function(e){var r=this._tiles[e];r&&(Qt(r.el),delete this._tiles[e],this.fire("tileunload",{tile:r.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){Tt(e,"leaflet-tile");var r=this.getTileSize();e.style.width=r.x+"px",e.style.height=r.y+"px",e.onselectstart=x,e.onmousemove=x,Mt.ielt9&&this.options.opacity<1&&Ne(e,this.options.opacity)},_addTile:function(e,r){var u=this._getTilePos(e),_=this._tileCoordsToKey(e),M=this.createTile(this._wrapCoords(e),p(this._tileReady,this,e));this._initTile(M),this.createTile.length<2&&Et(p(this._tileReady,this,e,null,M)),re(M,u),this._tiles[_]={el:M,coords:e,current:!0},r.appendChild(M),this.fire("tileloadstart",{tile:M,coords:e})},_tileReady:function(e,r,u){r&&this.fire("tileerror",{error:r,tile:u,coords:e});var _=this._tileCoordsToKey(e);u=this._tiles[_],u&&(u.loaded=+new Date,this._map._fadeAnimated?(Ne(u.el,0),Zt(this._fadeFrame),this._fadeFrame=Et(this._updateOpacity,this)):(u.active=!0,this._pruneTiles()),r||(Tt(u.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:u.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mt.ielt9||!this._map._fadeAnimated?Et(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var r=new Pt(this._wrapX?C(e.x,this._wrapX):e.x,this._wrapY?C(e.y,this._wrapY):e.y);return r.z=e.z,r},_pxBoundsToTileRange:function(e){var r=this.getTileSize();return new te(e.min.unscaleBy(r).floor(),e.max.unscaleBy(r).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function ah(e){return new _n(e)}var Wi=_n.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,r){this._url=e,r=Z(this,r),r.detectRetina&&Mt.retina&&r.maxZoom>0?(r.tileSize=Math.floor(r.tileSize/2),r.zoomReverse?(r.zoomOffset--,r.minZoom=Math.min(r.maxZoom,r.minZoom+1)):(r.zoomOffset++,r.maxZoom=Math.max(r.minZoom,r.maxZoom-1)),r.minZoom=Math.max(0,r.minZoom)):r.zoomReverse?r.minZoom=Math.min(r.maxZoom,r.minZoom):r.maxZoom=Math.max(r.minZoom,r.maxZoom),typeof r.subdomains=="string"&&(r.subdomains=r.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,r){return this._url===e&&r===void 0&&(r=!0),this._url=e,r||this.redraw(),this},createTile:function(e,r){var u=document.createElement("img");return St(u,"load",p(this._tileOnLoad,this,r,u)),St(u,"error",p(this._tileOnError,this,r,u)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(u.referrerPolicy=this.options.referrerPolicy),u.alt="",u.src=this.getTileUrl(e),u},getTileUrl:function(e){var r={r:Mt.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var u=this._globalTileRange.max.y-e.y;this.options.tms&&(r.y=u),r["-y"]=u}return rt(this._url,c(r,this.options))},_tileOnLoad:function(e,r){Mt.ielt9?setTimeout(p(e,this,null,r),0):e(null,r)},_tileOnError:function(e,r,u){var _=this.options.errorTileUrl;_&&r.getAttribute("src")!==_&&(r.src=_),e(u,r)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,r=this.options.maxZoom,u=this.options.zoomReverse,_=this.options.zoomOffset;return u&&(e=r-e),e+_},_getSubdomain:function(e){var r=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[r]},_abortLoading:function(){var e,r;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&(r=this._tiles[e].el,r.onload=x,r.onerror=x,!r.complete)){r.src=mt;var u=this._tiles[e].coords;Qt(r),delete this._tiles[e],this.fire("tileabort",{tile:r,coords:u})}},_removeTile:function(e){var r=this._tiles[e];if(r)return r.el.setAttribute("src",mt),_n.prototype._removeTile.call(this,e)},_tileReady:function(e,r,u){if(!(!this._map||u&&u.getAttribute("src")===mt))return _n.prototype._tileReady.call(this,e,r,u)}});function la(e,r){return new Wi(e,r)}var ns=Wi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,r){this._url=e;var u=c({},this.defaultWmsParams);for(var _ in r)_ in this.options||(u[_]=r[_]);r=Z(this,r);var M=r.detectRetina&&Mt.retina?2:1,B=this.getTileSize();u.width=B.x*M,u.height=B.y*M,this.wmsParams=u},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var r=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[r]=this._crs.code,Wi.prototype.onAdd.call(this,e)},getTileUrl:function(e){var r=this._tileCoordsToNwSe(e),u=this._crs,_=we(u.project(r[0]),u.project(r[1])),M=_.min,B=_.max,j=(this._wmsVersion>=1.3&&this._crs===ra?[M.y,M.x,B.y,B.x]:[M.x,M.y,B.x,B.y]).join(","),Y=Wi.prototype.getTileUrl.call(this,e);return Y+K(this.wmsParams,Y,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+j},setParams:function(e,r){return c(this.wmsParams,e),r||this.redraw(),this}});function rh(e,r){return new ns(e,r)}Wi.WMS=ns,la.wms=rh;var hi=Ae.extend({options:{padding:.1},initialize:function(e){Z(this,e),A(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Tt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,r){var u=this._map.getZoomScale(r,this._zoom),_=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,r),B=_.multiplyBy(-u).add(M).subtract(this._map._getNewPixelOrigin(e,r));Mt.any3d?bi(this._container,B,u):re(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var e in this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,r=this._map.getSize(),u=this._map.containerPointToLayerPoint(r.multiplyBy(-e)).round();this._bounds=new te(u,u.add(r.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ua=hi.extend({options:{tolerance:0},getEvents:function(){var e=hi.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){hi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");St(e,"mousemove",this._onMouseMove,this),St(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),St(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){Zt(this._redrawRequest),delete this._ctx,Qt(this._container),Wt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var e;this._redrawBounds=null;for(var r in this._layers)e=this._layers[r],e._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){hi.prototype._update.call(this);var e=this._bounds,r=this._container,u=e.getSize(),_=Mt.retina?2:1;re(r,e.min),r.width=_*u.x,r.height=_*u.y,r.style.width=u.x+"px",r.style.height=u.y+"px",Mt.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){hi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[A(e)]=e;var r=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=r),this._drawLast=r,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var r=e._order,u=r.next,_=r.prev;u?u.prev=_:this._drawLast=_,_?_.next=u:this._drawFirst=u,delete e._order,delete this._layers[A(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if(typeof e.options.dashArray=="string"){var r=e.options.dashArray.split(/[, ]+/),u=[],_,M;for(M=0;M<r.length;M++){if(_=Number(r[M]),isNaN(_))return;u.push(_)}e.options._dashArray=u}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||Et(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var r=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new te,this._redrawBounds.extend(e._pxBounds.min.subtract([r,r])),this._redrawBounds.extend(e._pxBounds.max.add([r,r]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var r=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,r.x,r.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,r=this._redrawBounds;if(this._ctx.save(),r){var u=r.getSize();this._ctx.beginPath(),this._ctx.rect(r.min.x,r.min.y,u.x,u.y),this._ctx.clip()}this._drawing=!0;for(var _=this._drawFirst;_;_=_.next)e=_.layer,(!r||e._pxBounds&&e._pxBounds.intersects(r))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,r){if(this._drawing){var u,_,M,B,j=e._parts,Y=j.length,st=this._ctx;if(Y){for(st.beginPath(),u=0;u<Y;u++){for(_=0,M=j[u].length;_<M;_++)B=j[u][_],st[_?"lineTo":"moveTo"](B.x,B.y);r&&st.closePath()}this._fillStroke(st,e)}}},_updateCircle:function(e){if(!(!this._drawing||e._empty())){var r=e._point,u=this._ctx,_=Math.max(Math.round(e._radius),1),M=(Math.max(Math.round(e._radiusY),1)||_)/_;M!==1&&(u.save(),u.scale(1,M)),u.beginPath(),u.arc(r.x,r.y/M,_,0,Math.PI*2,!1),M!==1&&u.restore(),this._fillStroke(u,e)}},_fillStroke:function(e,r){var u=r.options;u.fill&&(e.globalAlpha=u.fillOpacity,e.fillStyle=u.fillColor||u.color,e.fill(u.fillRule||"evenodd")),u.stroke&&u.weight!==0&&(e.setLineDash&&e.setLineDash(r.options&&r.options._dashArray||[]),e.globalAlpha=u.opacity,e.lineWidth=u.weight,e.strokeStyle=u.color,e.lineCap=u.lineCap,e.lineJoin=u.lineJoin,e.stroke())},_onClick:function(e){for(var r=this._map.mouseEventToLayerPoint(e),u,_,M=this._drawFirst;M;M=M.next)u=M.layer,u.options.interactive&&u._containsPoint(r)&&(!(e.type==="click"||e.type==="preclick")||!this._map._draggableMoved(u))&&(_=u);this._fireEvent(_?[_]:!1,e)},_onMouseMove:function(e){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var r=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,r)}},_handleMouseOut:function(e){var r=this._hoveredLayer;r&&(ne(this._container,"leaflet-interactive"),this._fireEvent([r],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,r){if(!this._mouseHoverThrottled){for(var u,_,M=this._drawFirst;M;M=M.next)u=M.layer,u.options.interactive&&u._containsPoint(r)&&(_=u);_!==this._hoveredLayer&&(this._handleMouseOut(e),_&&(Tt(this._container,"leaflet-interactive"),this._fireEvent([_],e,"mouseover"),this._hoveredLayer=_)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,e),this._mouseHoverThrottled=!0,setTimeout(p(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,r,u){this._map._fireDOMEvent(r,u||r.type,e)},_bringToFront:function(e){var r=e._order;if(r){var u=r.next,_=r.prev;if(u)u.prev=_;else return;_?_.next=u:u&&(this._drawFirst=u),r.prev=this._drawLast,this._drawLast.next=r,r.next=null,this._drawLast=r,this._requestRedraw(e)}},_bringToBack:function(e){var r=e._order;if(r){var u=r.next,_=r.prev;if(_)_.next=u;else return;u?u.prev=_:_&&(this._drawLast=_),r.prev=null,r.next=this._drawFirst,this._drawFirst.prev=r,this._drawFirst=r,this._requestRedraw(e)}}});function ss(e){return Mt.canvas?new ua(e):null}var mn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),oh={_initContainer:function(){this._container=Nt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hi.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var r=e._container=mn("shape");Tt(r,"leaflet-vml-shape "+(this.options.className||"")),r.coordsize="1 1",e._path=mn("path"),r.appendChild(e._path),this._updateStyle(e),this._layers[A(e)]=e},_addPath:function(e){var r=e._container;this._container.appendChild(r),e.options.interactive&&e.addInteractiveTarget(r)},_removePath:function(e){var r=e._container;Qt(r),e.removeInteractiveTarget(r),delete this._layers[A(e)]},_updateStyle:function(e){var r=e._stroke,u=e._fill,_=e.options,M=e._container;M.stroked=!!_.stroke,M.filled=!!_.fill,_.stroke?(r||(r=e._stroke=mn("stroke")),M.appendChild(r),r.weight=_.weight+"px",r.color=_.color,r.opacity=_.opacity,_.dashArray?r.dashStyle=ct(_.dashArray)?_.dashArray.join(" "):_.dashArray.replace(/( *, *)/g," "):r.dashStyle="",r.endcap=_.lineCap.replace("butt","flat"),r.joinstyle=_.lineJoin):r&&(M.removeChild(r),e._stroke=null),_.fill?(u||(u=e._fill=mn("fill")),M.appendChild(u),u.color=_.fillColor||_.color,u.opacity=_.fillOpacity):u&&(M.removeChild(u),e._fill=null)},_updateCircle:function(e){var r=e._point.round(),u=Math.round(e._radius),_=Math.round(e._radiusY||u);this._setPath(e,e._empty()?"M0 0":"AL "+r.x+","+r.y+" "+u+","+_+" 0,"+65535*360)},_setPath:function(e,r){e._path.v=r},_bringToFront:function(e){Zi(e._container)},_bringToBack:function(e){Li(e._container)}},Ki=Mt.vml?mn:Ra,me=hi.extend({_initContainer:function(){this._container=Ki("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ki("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Qt(this._container),Wt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){hi.prototype._update.call(this);var e=this._bounds,r=e.getSize(),u=this._container;(!this._svgSize||!this._svgSize.equals(r))&&(this._svgSize=r,u.setAttribute("width",r.x),u.setAttribute("height",r.y)),re(u,e.min),u.setAttribute("viewBox",[e.min.x,e.min.y,r.x,r.y].join(" ")),this.fire("update")}},_initPath:function(e){var r=e._path=Ki("path");e.options.className&&Tt(r,e.options.className),e.options.interactive&&Tt(r,"leaflet-interactive"),this._updateStyle(e),this._layers[A(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){Qt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[A(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var r=e._path,u=e.options;r&&(u.stroke?(r.setAttribute("stroke",u.color),r.setAttribute("stroke-opacity",u.opacity),r.setAttribute("stroke-width",u.weight),r.setAttribute("stroke-linecap",u.lineCap),r.setAttribute("stroke-linejoin",u.lineJoin),u.dashArray?r.setAttribute("stroke-dasharray",u.dashArray):r.removeAttribute("stroke-dasharray"),u.dashOffset?r.setAttribute("stroke-dashoffset",u.dashOffset):r.removeAttribute("stroke-dashoffset")):r.setAttribute("stroke","none"),u.fill?(r.setAttribute("fill",u.fillColor||u.color),r.setAttribute("fill-opacity",u.fillOpacity),r.setAttribute("fill-rule",u.fillRule||"evenodd")):r.setAttribute("fill","none"))},_updatePoly:function(e,r){this._setPath(e,Ga(e._parts,r))},_updateCircle:function(e){var r=e._point,u=Math.max(Math.round(e._radius),1),_=Math.max(Math.round(e._radiusY),1)||u,M="a"+u+","+_+" 0 1,0 ",B=e._empty()?"M0 0":"M"+(r.x-u)+","+r.y+M+u*2+",0 "+M+-u*2+",0 ";this._setPath(e,B)},_setPath:function(e,r){e._path.setAttribute("d",r)},_bringToFront:function(e){Zi(e._path)},_bringToBack:function(e){Li(e._path)}});Mt.vml&&me.include(oh);function Me(e){return Mt.svg||Mt.vml?new me(e):null}Gt.include({getRenderer:function(e){var r=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return r||(r=this._renderer=this._createRenderer()),this.hasLayer(r)||this.addLayer(r),r},_getPaneRenderer:function(e){if(e==="overlayPane"||e===void 0)return!1;var r=this._paneRenderers[e];return r===void 0&&(r=this._createRenderer({pane:e}),this._paneRenderers[e]=r),r},_createRenderer:function(e){return this.options.preferCanvas&&ss(e)||Me(e)}});var ca=yi.extend({initialize:function(e,r){yi.prototype.initialize.call(this,this._boundsToLatLngs(e),r)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=ae(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function He(e,r){return new ca(e,r)}me.create=Ki,me.pointsToPath=Ga,oi.geometryToLayer=Wn,oi.coordsToLatLng=Kn,oi.coordsToLatLngs=Xn,oi.latLngToCoords=Yn,oi.latLngsToCoords=Jn,oi.getFeature=Vi,oi.asFeature=Qn,Gt.mergeOptions({boxZoom:!0});var kt=ve.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Wt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Qt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||e.which!==1&&e.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),on(),$s(),this._startPoint=this._map.mouseEventToContainerPoint(e),St(document,{contextmenu:Ei,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=Nt("div","leaflet-zoom-box",this._container),Tt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var r=new te(this._point,this._startPoint),u=r.getSize();re(this._box,r.min),this._box.style.width=u.x+"px",this._box.style.height=u.y+"px"},_finish:function(){this._moved&&(Qt(this._box),ne(this._container,"leaflet-crosshair")),hn(),Ws(),Wt(document,{contextmenu:Ei,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if(!(e.which!==1&&e.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0);var r=new Ce(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(r).fire("boxzoomend",{boxZoomBounds:r})}},_onKeyDown:function(e){e.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Gt.addInitHook("addHandler","boxZoom",kt),Gt.mergeOptions({doubleClickZoom:!0});var as=ve.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var r=this._map,u=r.getZoom(),_=r.options.zoomDelta,M=e.originalEvent.shiftKey?u-_:u+_;r.options.doubleClickZoom==="center"?r.setZoom(M):r.setZoomAround(e.containerPoint,M)}});Gt.addInitHook("addHandler","doubleClickZoom",as),Gt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var rs=ve.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new mi(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}Tt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ne(this._map._container,"leaflet-grab"),ne(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var r=ae(this._map.options.maxBounds);this._offsetLimit=we(this._map.latLngToContainerPoint(r.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(r.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var r=this._lastTime=+new Date,u=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(u),this._times.push(r),this._prunePositions(r)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),r=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=r.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,r){return e-(e-r)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var e=this._draggable._newPos.subtract(this._draggable._startPos),r=this._offsetLimit;e.x<r.min.x&&(e.x=this._viscousLimit(e.x,r.min.x)),e.y<r.min.y&&(e.y=this._viscousLimit(e.y,r.min.y)),e.x>r.max.x&&(e.x=this._viscousLimit(e.x,r.max.x)),e.y>r.max.y&&(e.y=this._viscousLimit(e.y,r.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,r=Math.round(e/2),u=this._initialWorldOffset,_=this._draggable._newPos.x,M=(_-r+u)%e+r-u,B=(_+r+u)%e-r-u,j=Math.abs(M+u)<Math.abs(B+u)?M:B;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=j},_onDragEnd:function(e){var r=this._map,u=r.options,_=!u.inertia||e.noInertia||this._times.length<2;if(r.fire("dragend",e),_)r.fire("moveend");else{this._prunePositions(+new Date);var M=this._lastPos.subtract(this._positions[0]),B=(this._lastTime-this._times[0])/1e3,j=u.easeLinearity,Y=M.multiplyBy(j/B),st=Y.distanceTo([0,0]),ht=Math.min(u.inertiaMaxSpeed,st),pt=Y.multiplyBy(ht/st),wt=ht/(u.inertiaDeceleration*j),Ot=pt.multiplyBy(-wt/2).round();!Ot.x&&!Ot.y?r.fire("moveend"):(Ot=r._limitOffset(Ot,r.options.maxBounds),Et(function(){r.panBy(Ot,{duration:wt,easeLinearity:j,noMoveStart:!0,animate:!0})}))}}});Gt.addInitHook("addHandler","dragging",rs),Gt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var li=ve.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),St(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Wt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,r=document.documentElement,u=e.scrollTop||r.scrollTop,_=e.scrollLeft||r.scrollLeft;this._map._container.focus(),window.scrollTo(_,u)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var r=this._panKeys={},u=this.keyCodes,_,M;for(_=0,M=u.left.length;_<M;_++)r[u.left[_]]=[-1*e,0];for(_=0,M=u.right.length;_<M;_++)r[u.right[_]]=[e,0];for(_=0,M=u.down.length;_<M;_++)r[u.down[_]]=[0,e];for(_=0,M=u.up.length;_<M;_++)r[u.up[_]]=[0,-1*e]},_setZoomDelta:function(e){var r=this._zoomKeys={},u=this.keyCodes,_,M;for(_=0,M=u.zoomIn.length;_<M;_++)r[u.zoomIn[_]]=e;for(_=0,M=u.zoomOut.length;_<M;_++)r[u.zoomOut[_]]=-e},_addHooks:function(){St(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Wt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var r=e.keyCode,u=this._map,_;if(r in this._panKeys){if(!u._panAnim||!u._panAnim._inProgress)if(_=this._panKeys[r],e.shiftKey&&(_=Ct(_).multiplyBy(3)),u.options.maxBounds&&(_=u._limitOffset(Ct(_),u.options.maxBounds)),u.options.worldCopyJump){var M=u.wrapLatLng(u.unproject(u.project(u.getCenter()).add(_)));u.panTo(M)}else u.panBy(_)}else if(r in this._zoomKeys)u.setZoom(u.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[r]);else if(r===27&&u._popup&&u._popup.options.closeOnEscapeKey)u.closePopup();else return;Ei(e)}}});Gt.addInitHook("addHandler","keyboard",li),Gt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var le=ve.extend({addHooks:function(){St(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Wt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var r=ur(e),u=this._map.options.wheelDebounceTime;this._delta+=r,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var _=Math.max(u-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(p(this._performZoom,this),_),Ei(e)},_performZoom:function(){var e=this._map,r=e.getZoom(),u=this._map.options.zoomSnap||0;e._stop();var _=this._delta/(this._map.options.wheelPxPerZoomLevel*4),M=4*Math.log(2/(1+Math.exp(-Math.abs(_))))/Math.LN2,B=u?Math.ceil(M/u)*u:M,j=e._limitZoom(r+(this._delta>0?B:-B))-r;this._delta=0,this._startTime=null,j&&(e.options.scrollWheelZoom==="center"?e.setZoom(r+j):e.setZoomAround(this._lastMousePos,r+j))}});Gt.addInitHook("addHandler","scrollWheelZoom",le);var wr=600;Gt.mergeOptions({tapHold:Mt.touchNative&&Mt.safari&&Mt.mobile,tapTolerance:15});var Oe=ve.extend({addHooks:function(){St(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Wt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),e.touches.length===1){var r=e.touches[0];this._startPos=this._newPos=new Pt(r.clientX,r.clientY),this._holdTimeout=setTimeout(p(function(){this._cancel(),this._isTapValid()&&(St(document,"touchend",ce),St(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",r))},this),wr),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Wt(document,"touchend",ce),Wt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Wt(document,"touchend touchcancel contextmenu",this._cancel,this),Wt(document,"touchmove",this._onMove,this)},_onMove:function(e){var r=e.touches[0];this._newPos=new Pt(r.clientX,r.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,r){var u=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:r.screenX,screenY:r.screenY,clientX:r.clientX,clientY:r.clientY});u._simulated=!0,r.target.dispatchEvent(u)}});Gt.addInitHook("addHandler","tapHold",Oe),Gt.mergeOptions({touchZoom:Mt.touch,bounceAtZoomLimits:!0});var Ie=ve.extend({addHooks:function(){Tt(this._map._container,"leaflet-touch-zoom"),St(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ne(this._map._container,"leaflet-touch-zoom"),Wt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var r=this._map;if(!(!e.touches||e.touches.length!==2||r._animatingZoom||this._zooming)){var u=r.mouseEventToContainerPoint(e.touches[0]),_=r.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=r.getSize()._divideBy(2),this._startLatLng=r.containerPointToLatLng(this._centerPoint),r.options.touchZoom!=="center"&&(this._pinchStartLatLng=r.containerPointToLatLng(u.add(_)._divideBy(2))),this._startDist=u.distanceTo(_),this._startZoom=r.getZoom(),this._moved=!1,this._zooming=!0,r._stop(),St(document,"touchmove",this._onTouchMove,this),St(document,"touchend touchcancel",this._onTouchEnd,this),ce(e)}},_onTouchMove:function(e){if(!(!e.touches||e.touches.length!==2||!this._zooming)){var r=this._map,u=r.mouseEventToContainerPoint(e.touches[0]),_=r.mouseEventToContainerPoint(e.touches[1]),M=u.distanceTo(_)/this._startDist;if(this._zoom=r.getScaleZoom(M,this._startZoom),!r.options.bounceAtZoomLimits&&(this._zoom<r.getMinZoom()&&M<1||this._zoom>r.getMaxZoom()&&M>1)&&(this._zoom=r._limitZoom(this._zoom)),r.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var B=u._add(_)._divideBy(2)._subtract(this._centerPoint);if(M===1&&B.x===0&&B.y===0)return;this._center=r.unproject(r.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(r._moveStart(!0,!1),this._moved=!0),Zt(this._animRequest);var j=p(r._move,r,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Et(j,this,!0),ce(e)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Zt(this._animRequest),Wt(document,"touchmove",this._onTouchMove,this),Wt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Gt.addInitHook("addHandler","touchZoom",Ie),Gt.BoxZoom=kt,Gt.DoubleClickZoom=as,Gt.Drag=rs,Gt.Keyboard=li,Gt.ScrollWheelZoom=le,Gt.TapHold=Oe,Gt.TouchZoom=Ie,a.Bounds=te,a.Browser=Mt,a.CRS=si,a.Canvas=ua,a.Circle=ha,a.CircleMarker=Xe,a.Class=pe,a.Control=Bt,a.DivIcon=br,a.DivOverlay=Ye,a.DomEvent=Nn,a.DomUtil=No,a.Draggable=mi,a.Evented=en,a.FeatureGroup=qe,a.GeoJSON=oi,a.GridLayer=_n,a.Handler=ve,a.Icon=Hi,a.ImageOverlay=$i,a.LatLng=Ht,a.LatLngBounds=Ce,a.Layer=Ae,a.LayerGroup=qi,a.LineUtil=qn,a.Map=Gt,a.Marker=$n,a.Mixin=Ho,a.Path=ai,a.Point=Pt,a.PolyUtil=Vo,a.Polygon=yi,a.Polyline=ri,a.Popup=vi,a.PosAnimation=cr,a.Projection=Ke,a.Rectangle=ca,a.Renderer=hi,a.SVG=me,a.SVGOverlay=Lr,a.TileLayer=Wi,a.Tooltip=is,a.Transformation=Ds,a.Util=be,a.VideoOverlay=pn,a.bind=p,a.bounds=we,a.canvas=ss,a.circle=Si,a.circleMarker=vr,a.control=Pi,a.divIcon=sh,a.extend=c,a.featureGroup=Xo,a.geoJSON=es,a.geoJson=Mr,a.gridLayer=ah,a.icon=Yo,a.imageOverlay=th,a.latLng=Rt,a.latLngBounds=ae,a.layerGroup=Ko,a.map=dr,a.marker=Jo,a.point=Ct,a.polygon=fn,a.polyline=Qo,a.popup=ih,a.rectangle=He,a.setOptions=Z,a.stamp=A,a.svg=Me,a.svgOverlay=eh,a.tileLayer=la,a.tooltip=nh,a.transformation=sn,a.version=l,a.videoOverlay=xr;var Ti=window.L;a.noConflict=function(){return window.L=Ti,this},window.L=a})}(ga,ga.exports)),ga.exports}var U=gh();(function(t){typeof define=="function"&&define.amd?define(t):t()})(function(){const t=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(C,x,b,T,G){var Z=x||new L.Point(0,0);if(!T)return x=Z._round(),t.setTransform.apply(this,arguments);Z=Z.rotateFrom(T,G),C.style[L.DomUtil.TRANSFORM]="translate3d("+Z.x+"px,"+Z.y+"px,0)"+(b?" scale("+b+")":"")+" rotate("+T+"rad)"},setPosition:function(C,x,b,T,G){if(!b&&!G)return t.setPosition.apply(this,arguments);C._leaflet_pos=x,L.Browser.any3d?L.DomUtil.setTransform(C,x,G,b,T):(C.style.left=x.x+"px",C.style.top=x.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({}),L.extend(L.Point.prototype,{rotate:function(C){return this.rotateFrom(C,new L.Point(0,0))},rotateFrom:function(C,x){if(!C)return this;var b=Math.sin(C),T=Math.cos(C),G=x.x,Z=x.y,K=this.x-G,at=this.y-Z;return new L.Point(K*T-at*b+G,K*b+at*T+Z)}});const n=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(n.getEvents.apply(this,arguments),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map&&(n._updatePosition.apply(this,arguments),this._map&&this._map._rotate&&this._zoomAnimated)){var C=this._getAnchor(),x=L.DomUtil.getPosition(this._container).subtract(C);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(x).add(C))}}});const a=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(C){if(a._animateZoom.apply(this,arguments),this._map&&this._map._rotate){var x=this._getAnchor(),b=L.DomUtil.getPosition(this._container).subtract(x);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(b).add(x))}},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){if(this._autopanning){this._autopanning=!1;return}var C=this._map,x=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+x,T=this._containerWidth,G=new L.Point(this._containerLeft,-b-this._containerBottom);G._add(L.DomUtil.getPosition(this._container));var Z=G._add(this._map._getMapPanePos()),K=L.point(this.options.autoPanPadding),at=L.point(this.options.autoPanPaddingTopLeft||K),rt=L.point(this.options.autoPanPaddingBottomRight||K),ct=C.getSize(),yt=0,mt=0;Z.x+T+rt.x>ct.x&&(yt=Z.x+T-ct.x+rt.x),Z.x-yt-at.x<0&&(yt=Z.x-at.x),Z.y+b+rt.y>ct.y&&(mt=Z.y+b-ct.y+rt.y),Z.y-mt-at.y<0&&(mt=Z.y-at.y),(yt||mt)&&(this.options.keepInView&&(this._autopanning=!0),C.fire("autopanstart").panBy([yt,mt]))}}});const l=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_animateZoom:function(C){if(!this._map._rotate)return l._animateZoom.apply(this,arguments);var x=this._map._latLngToNewLayerPoint(this._latlng,C.zoom,C.center);x=this._map.rotatedPointToMapPanePoint(x),this._setPosition(x)},_updatePosition:function(){if(!this._map._rotate)return l._updatePosition.apply(this,arguments);var C=this._map.latLngToLayerPoint(this._latlng);C=this._map.rotatedPointToMapPanePoint(C),this._setPosition(C)}}),L.extend({},L.Icon.prototype),L.Icon.include({_setIconStyles:function(C,x){var b=this.options,T=b[x+"Size"];typeof T=="number"&&(T=[T,T]);var G=L.point(T),Z=L.point(x==="shadow"&&b.shadowAnchor||b.iconAnchor||G&&G.divideBy(2,!0));C.className="leaflet-marker-"+x+" "+(b.className||""),Z&&(C.style.marginLeft=-Z.x+"px",C.style.marginTop=-Z.y+"px",C.style[L.DomUtil.TRANSFORM+"Origin"]=Z.x+"px "+Z.y+"px 0px"),G&&(C.style.width=G.x+"px",C.style.height=G.y+"px")}});const c=L.extend({},L.Marker.prototype);L.Marker.mergeOptions({rotation:0,rotateWithView:!1,scale:void 0});var f,p={_onDrag:function(C){var x=this._marker,b=x.options.rotation||x.options.rotateWithView,T=x._shadow,G=L.DomUtil.getPosition(x._icon);!b&&T&&L.DomUtil.setPosition(T,G),x._map._rotate&&(G=x._map.mapPanePointToRotatedPoint(G));var Z=x._map.layerPointToLatLng(G);x._latlng=Z,C.latlng=Z,C.oldLatLng=this._oldLatLng,b?x.setLatLng(Z):x.fire("move",C),x.fire("drag",C)},_onDragEnd:function(C){this._marker._map._rotate&&this._marker.update(),f._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents:function(){return L.extend(c.getEvents.apply(this,arguments),{rotate:this.update})},_initInteraction:function(){var C=c._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(f=f||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:p._onDrag.bind(this.dragging),_onDragEnd:p._onDragEnd.bind(this.dragging)}),this.dragging.enable()),C},_setPos:function(C){this._map._rotate&&(C=this._map.rotatedPointToMapPanePoint(C));var x=this.options.rotation||0;this.options.rotateWithView&&(x+=this._map._bearing),this._icon&&L.DomUtil.setPosition(this._icon,C,x,C,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,C,x,C,this.options.scale),this._zIndex=C.y+this.options.zIndexOffset,this._resetZIndex()},setRotation:function(C){this.options.rotation=C,this.update()}});const g=L.extend({},L.GridLayer.prototype);L.GridLayer.include({getEvents:function(){var C=g.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),C.rotate=this._onRotate),C},_getTiledPixelBounds:function(C){return this._map._rotate?this._map._getNewPixelBounds(C,this._tileZoom):g._getTiledPixelBounds.apply(this,arguments)}});const A=L.extend({},L.Renderer.prototype);L.Renderer.include({getEvents:function(){return L.extend(A.getEvents.apply(this,arguments),{rotate:this._update})},onAdd:function(){A.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform:function(C,x){if(!this._map._rotate)return A._updateTransform.apply(this,arguments);var b=this._map.getZoomScale(x,this._zoom),T=this._map._latLngToNewLayerPoint(this._topLeft,x,C);L.DomUtil.setTransform(this._container,T,b)},_update:function(){if(!this._map._rotate)return A._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const k=L.extend({},L.Map.prototype);L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(C,x){x.rotate&&(this._rotate=!0,this._bearing=0),k.initialize.apply(this,arguments),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(C){return this._rotate?L.point(C).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):k.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint:function(C){return this._rotate?L.point(C).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):k.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint:function(C){return L.point(C).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(C){return L.point(C)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds:function(C){if(!this._rotate&&k.mapBoundsToContainerBounds)return k.mapBoundsToContainerBounds.apply(this,arguments);const x=this.getPixelOrigin(),b=this.layerPointToContainerPoint(this.project(C.getNorthWest())._subtract(x)),T=this.layerPointToContainerPoint(this.project(C.getNorthEast())._subtract(x)),G=this.layerPointToContainerPoint(this.project(C.getSouthWest())._subtract(x)),Z=this.layerPointToContainerPoint(this.project(C.getSouthEast())._subtract(x));return L.bounds([L.point(Math.min(b.x,T.x,Z.x,G.x),Math.min(b.y,T.y,Z.y,G.y)),L.point(Math.max(b.x,T.x,Z.x,G.x),Math.max(b.y,T.y,Z.y,G.y))])},getBounds:function(){if(!this._rotate)return k.getBounds.apply(this,arguments);var C=this.getSize();return new L.LatLngBounds([this.containerPointToLatLng([0,0]),this.containerPointToLatLng([C.x,0]),this.containerPointToLatLng([C.x,C.y]),this.containerPointToLatLng([0,C.y])])},setBearing:function(C){if(!(!L.Browser.any3d||!this._rotate)){var x=L.Util.wrapNum(C,[0,360])*L.DomUtil.DEG_TO_RAD,b=this._getPixelCenter(),T=this._getRotatePanePos().rotateFrom(-this._bearing,b),G=T.rotateFrom(x,b);L.DomUtil.setPosition(this._rotatePane,T,x,b),this._pivot=b,this._bearing=x,this._rotatePanePos=G,this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var C=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(C.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(C.shadowPane,"leaflet-zoom-hide"))},panInside(C,x){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return k.panInside.apply(this,arguments);x=x||{};const b=L.point(x.paddingTopLeft||x.padding||[0,0]),T=L.point(x.paddingBottomRight||x.padding||[0,0]),G=this._container.getBoundingClientRect(),Z=this.latLngToContainerPoint(C),K=L.bounds([L.point(G),L.point(G).add(this.getSize())]),at=K.getCenter(),rt=L.bounds([K.min.add(b),K.max.subtract(T)]),ct=rt.getSize();if(!rt.contains(Z)){this._enforcingBounds=!0;const yt=Z.subtract(rt.getCenter()),mt=rt.extend(Z).getSize().subtract(ct);at.x+=yt.x<0?-mt.x:mt.x,at.y+=yt.y<0?-mt.y:mt.y,this.panTo(this.containerPointToLatLng(at),x),this._enforcingBounds=!1}return this},getBoundsZoom(C,x,b){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return k.getBoundsZoom.apply(this,arguments);C=L.latLngBounds(C),b=L.point(b||[0,0]);let T=this.getZoom()||0;const G=this.getMinZoom(),Z=this.getMaxZoom(),K=this.getSize().subtract(b),at=this.mapBoundsToContainerBounds(C).getSize(),rt=this.options.zoomSnap,ct=K.x/at.x,yt=K.y/at.y,mt=x?Math.max(ct,yt):Math.min(ct,yt);return T=this.getScaleZoom(mt,T),rt&&(T=Math.round(T/(rt/100))*(rt/100),T=x?Math.ceil(T/rt)*rt:Math.floor(T/rt)*rt),Math.max(G,Math.min(Z,T))},_getCenterOffset:function(C){var x=k._getCenterOffset.apply(this,arguments);return this._rotate&&(x=x.rotate(this._bearing)),x},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(C,x){if(!this._rotate)return k._getNewPixelOrigin.apply(this,arguments);var b=this.getSize()._divideBy(2);return this.project(C,x).rotate(this._bearing)._subtract(b)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_getNewPixelBounds:function(C,x){if(C=C||this.getCenter(),x=x||this.getZoom(),!this._rotate&&k._getNewPixelBounds)return k._getNewPixelBounds.apply(this,arguments);var b=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),T=this.getZoomScale(b,x),G=this.project(C,x).floor(),Z=this.getSize(),K=new L.Bounds([this.containerPointToLayerPoint([0,0]).floor(),this.containerPointToLayerPoint([Z.x,0]).floor(),this.containerPointToLayerPoint([0,Z.y]).floor(),this.containerPointToLayerPoint([Z.x,Z.y]).floor()]).getSize().divideBy(T*2);return new L.Bounds(G.subtract(K),G.add(K))},_getPixelCenter:function(){return!this._rotate&&k._getPixelCenter?k._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds:function(C){if(!this._rotate&&k._getPaddedPixelBounds)return k._getPaddedPixelBounds.apply(this,arguments);var x=C,b=this.getSize(),T=b.multiplyBy(-x),G=b.multiplyBy(1+x);return new L.Bounds([this.containerPointToLayerPoint([T.x,T.y]).floor(),this.containerPointToLayerPoint([T.x,G.y]).floor(),this.containerPointToLayerPoint([G.x,T.y]).floor(),this.containerPointToLayerPoint([G.x,G.y]).floor()])},_handleGeolocationResponse:function(C){if(this._container._leaflet_id){var x=C.coords.latitude,b=C.coords.longitude,T=C.coords.heading,G=new L.LatLng(x,b),Z=G.toBounds(C.coords.accuracy),K=this._locateOptions;if(K.setView){var at=this.getBoundsZoom(Z);this.setView(G,K.maxZoom?Math.min(at,K.maxZoom):at)}var rt={latlng:G,bounds:Z,timestamp:C.timestamp,heading:T};for(var ct in C.coords)typeof C.coords[ct]=="number"&&(rt[ct]=C.coords[ct]);this.fire("locationfound",rt)}}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(C){this._map=C,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks:function(){this._map._rotate&&this.__deviceOrientationEvent?L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this):this.disable()},removeHooks:function(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation:function(C){var x=C.webkitCompassHeading||C.alpha,b=0;!C.absolute&&C.webkitCompassHeading&&(x=360-x),!C.absolute&&typeof window.orientation<"u"&&(b=window.orientation),this._map.setBearing(x-b)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks:function(){this._observer.disconnect()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(C){this._map=C,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(C){var x=this._map;if(!(!C.touches||C.touches.length!==2||x._animatingZoom||this._zooming||this._rotating)){var b=x.mouseEventToContainerPoint(C.touches[0]),T=x.mouseEventToContainerPoint(C.touches[1]),G=b.subtract(T);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),this.zoom?(x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(b.add(T)._divideBy(2))),this._startDist=b.distanceTo(T),this._startZoom=x.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(G.x/G.y),this._startBearing=x.getBearing(),G.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,x._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(C)}},_onTouchMove:function(C){if(!(!C.touches||C.touches.length!==2||!(this._zooming||this._rotating))){var x=this._map,b=x.mouseEventToContainerPoint(C.touches[0]),T=x.mouseEventToContainerPoint(C.touches[1]),G=b.subtract(T),Z=b.distanceTo(T)/this._startDist,K;if(this._rotating){var at=Math.atan(G.x/G.y),rt=(at-this._startTheta)*L.DomUtil.RAD_TO_DEG;G.y<0&&(rt+=180),rt&&x.setBearing(this._startBearing-rt)}if(this._zooming)if(this._zoom=x.getScaleZoom(Z,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoom<x.getMinZoom()&&Z<1||this._zoom>x.getMaxZoom()&&Z>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,Z===1)return}else{if(K=b._add(T)._divideBy(2)._subtract(this._centerPoint),Z===1&&K.x===0&&K.y===0)return;var ct=-x.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=x.unproject(x.project(this._pinchStartLatLng).subtract(K.rotate(ct)))}this._moved||(x._moveStart(!0,!1),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var yt=x._move.bind(x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=L.Util.requestAnimFrame(yt,this,!0),L.DomEvent.preventDefault(C)}},_onTouchEnd:function(){if(!this._moved||!(this._zooming||this._rotating)){this._zooming=!1;return}this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(C){C.shiftKey?(C.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+Math.sign(C.deltaY)*5)):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.addInitHook(function(){this.scrollWheelZoom.enabled()&&this.shiftKeyRotate.enabled()&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())}),L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(C){var x=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),b=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");b.style.backgroundImage=`url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")`,b.style.cursor="grab",b.style.display="block",b.style.width="100%",b.style.height="100%",b.style.backgroundRepeat="no-repeat",b.style.backgroundPosition="50%";var T=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",x);return T.appendChild(b),T.href="#",T.title="Rotate map",L.DomEvent.on(T,"dblclick",L.DomEvent.stopPropagation).on(T,"mousedown",this._handleMouseDown,this).on(T,"click",L.DomEvent.stop).on(T,"click",this._cycleState,this).on(T,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(T,"leaflet-disabled"),this._restyle(),C.on("rotate",this._restyle,this),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&C.getBearing()===0&&(x.style.display="none"),x},onRemove:function(C){C.off("rotate",this._restyle,this)},_handleMouseDown:function(C){L.DomEvent.stop(C),this.dragging=!0,this.dragstartX=C.pageX,this.dragstartY=C.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(C){L.DomEvent.stop(C),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(C){if(this.dragging){var x=C.clientX-this.dragstartX;this._map.setBearing(x)}},_cycleState:function(C){if(this._map){var x=this._map;!x.touchRotate.enabled()&&!x.compassBearing.enabled()?x.touchRotate.enable():x.compassBearing.enabled()?(x.compassBearing.disable(),x.setBearing(0),this.options.closeOnZeroBearing&&x.touchRotate.enable()):(x.touchRotate.disable(),(DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission():Promise.resolve("granted")).then(b=>b==="granted"&&x.compassBearing.enable())),this._restyle()}},_restyle:function(){if(!this._map.options.rotate)L.DomUtil.addClass(this._link,"leaflet-disabled");else{var C=this._map,x=C.getBearing();this._arrow.style.transform="rotate("+x+"deg)",x&&this.options.closeOnZeroBearing&&(this._container.style.display="block"),C.compassBearing.enabled()?this._link.style.backgroundColor="orange":C.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",x===0&&this.options.closeOnZeroBearing&&(this._container.style.display="none"))}}}),L.control.rotate=function(C){return new L.Control.Rotate(C)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook(function(){if(this.options.rotateControl){var C=typeof this.options.rotateControl=="object"?this.options.rotateControl:{};this.rotateControl=L.control.rotate(C),this.addControl(this.rotateControl)}})}),(()=>{var Pl,kl;var t=Object.create,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,c=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports),g=(i,s,o,h)=>{if(s&&typeof s=="object"||typeof s=="function")for(let d of l(s))!f.call(i,d)&&d!==o&&n(i,d,{get:()=>s[d],enumerable:!(h=a(s,d))||h.enumerable});return i},A=(i,s,o)=>(o=i!=null?t(c(i)):{},g(s||!i||!i.__esModule?n(o,"default",{value:i,enumerable:!0}):o,i)),k=p((i,s)=>{function o(){this.__data__=[],this.size=0}s.exports=o}),C=p((i,s)=>{function o(h,d){return h===d||h!==h&&d!==d}s.exports=o}),x=p((i,s)=>{var o=C();function h(d,m){for(var y=d.length;y--;)if(o(d[y][0],m))return y;return-1}s.exports=h}),b=p((i,s)=>{var o=x(),h=Array.prototype,d=h.splice;function m(y){var v=this.__data__,w=o(v,y);if(w<0)return!1;var P=v.length-1;return w==P?v.pop():d.call(v,w,1),--this.size,!0}s.exports=m}),T=p((i,s)=>{var o=x();function h(d){var m=this.__data__,y=o(m,d);return y<0?void 0:m[y][1]}s.exports=h}),G=p((i,s)=>{var o=x();function h(d){return o(this.__data__,d)>-1}s.exports=h}),Z=p((i,s)=>{var o=x();function h(d,m){var y=this.__data__,v=o(y,d);return v<0?(++this.size,y.push([d,m])):y[v][1]=m,this}s.exports=h}),K=p((i,s)=>{var o=k(),h=b(),d=T(),m=G(),y=Z();function v(w){var P=-1,N=w==null?0:w.length;for(this.clear();++P<N;){var F=w[P];this.set(F[0],F[1])}}v.prototype.clear=o,v.prototype.delete=h,v.prototype.get=d,v.prototype.has=m,v.prototype.set=y,s.exports=v}),at=p((i,s)=>{var o=K();function h(){this.__data__=new o,this.size=0}s.exports=h}),rt=p((i,s)=>{function o(h){var d=this.__data__,m=d.delete(h);return this.size=d.size,m}s.exports=o}),ct=p((i,s)=>{function o(h){return this.__data__.get(h)}s.exports=o}),yt=p((i,s)=>{function o(h){return this.__data__.has(h)}s.exports=o}),mt=p((i,s)=>{var o=typeof An=="object"&&An&&An.Object===Object&&An;s.exports=o}),xt=p((i,s)=>{var o=mt(),h=typeof self=="object"&&self&&self.Object===Object&&self,d=o||h||Function("return this")();s.exports=d}),Dt=p((i,s)=>{var o=xt(),h=o.Symbol;s.exports=h}),It=p((i,s)=>{var o=Dt(),h=Object.prototype,d=h.hasOwnProperty,m=h.toString,y=o?o.toStringTag:void 0;function v(w){var P=d.call(w,y),N=w[y];try{w[y]=void 0;var F=!0}catch{}var tt=m.call(w);return F&&(P?w[y]=N:delete w[y]),tt}s.exports=v}),zt=p((i,s)=>{var o=Object.prototype,h=o.toString;function d(m){return h.call(m)}s.exports=d}),Yt=p((i,s)=>{var o=Dt(),h=It(),d=zt(),m="[object Null]",y="[object Undefined]",v=o?o.toStringTag:void 0;function w(P){return P==null?P===void 0?y:m:v&&v in Object(P)?h(P):d(P)}s.exports=w}),Et=p((i,s)=>{function o(h){var d=typeof h;return h!=null&&(d=="object"||d=="function")}s.exports=o}),Zt=p((i,s)=>{var o=Yt(),h=Et(),d="[object AsyncFunction]",m="[object Function]",y="[object GeneratorFunction]",v="[object Proxy]";function w(P){if(!h(P))return!1;var N=o(P);return N==m||N==y||N==d||N==v}s.exports=w}),be=p((i,s)=>{var o=xt(),h=o["__core-js_shared__"];s.exports=h}),pe=p((i,s)=>{var o=be(),h=function(){var m=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}();function d(m){return!!h&&h in m}s.exports=d}),yo=p((i,s)=>{var o=Function.prototype,h=o.toString;function d(m){if(m!=null){try{return h.call(m)}catch{}try{return m+""}catch{}}return""}s.exports=d}),De=p((i,s)=>{var o=Zt(),h=pe(),d=Et(),m=yo(),y=/[\\^$.*+?()[\]{}|]/g,v=/^\[object .+?Constructor\]$/,w=Function.prototype,P=Object.prototype,N=w.toString,F=P.hasOwnProperty,tt=RegExp("^"+N.call(F).replace(y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function it(lt){if(!d(lt)||h(lt))return!1;var ft=o(lt)?tt:v;return ft.test(m(lt))}s.exports=it}),en=p((i,s)=>{function o(h,d){return h==null?void 0:h[d]}s.exports=o}),Pt=p((i,s)=>{var o=De(),h=en();function d(m,y){var v=h(m,y);return o(v)?v:void 0}s.exports=d}),Ss=p((i,s)=>{var o=Pt(),h=xt(),d=o(h,"Map");s.exports=d}),Ct=p((i,s)=>{var o=Pt(),h=o(Object,"create");s.exports=h}),te=p((i,s)=>{var o=Ct();function h(){this.__data__=o?o(null):{},this.size=0}s.exports=h}),we=p((i,s)=>{function o(h){var d=this.has(h)&&delete this.__data__[h];return this.size-=d?1:0,d}s.exports=o}),Ce=p((i,s)=>{var o=Ct(),h="__lodash_hash_undefined__",d=Object.prototype,m=d.hasOwnProperty;function y(v){var w=this.__data__;if(o){var P=w[v];return P===h?void 0:P}return m.call(w,v)?w[v]:void 0}s.exports=y}),ae=p((i,s)=>{var o=Ct(),h=Object.prototype,d=h.hasOwnProperty;function m(y){var v=this.__data__;return o?v[y]!==void 0:d.call(v,y)}s.exports=m}),Ht=p((i,s)=>{var o=Ct(),h="__lodash_hash_undefined__";function d(m,y){var v=this.__data__;return this.size+=this.has(m)?0:1,v[m]=o&&y===void 0?h:y,this}s.exports=d}),Rt=p((i,s)=>{var o=te(),h=we(),d=Ce(),m=ae(),y=Ht();function v(w){var P=-1,N=w==null?0:w.length;for(this.clear();++P<N;){var F=w[P];this.set(F[0],F[1])}}v.prototype.clear=o,v.prototype.delete=h,v.prototype.get=d,v.prototype.has=m,v.prototype.set=y,s.exports=v}),si=p((i,s)=>{var o=Rt(),h=K(),d=Ss();function m(){this.size=0,this.__data__={hash:new o,map:new(d||h),string:new o}}s.exports=m}),fi=p((i,s)=>{function o(h){var d=typeof h;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?h!=="__proto__":h===null}s.exports=o}),nn=p((i,s)=>{var o=fi();function h(d,m){var y=d.__data__;return o(m)?y[typeof m=="string"?"string":"hash"]:y.map}s.exports=h}),Ts=p((i,s)=>{var o=nn();function h(d){var m=o(this,d).delete(d);return this.size-=m?1:0,m}s.exports=h}),Ds=p((i,s)=>{var o=nn();function h(d){return o(this,d).get(d)}s.exports=h}),sn=p((i,s)=>{var o=nn();function h(d){return o(this,d).has(d)}s.exports=h}),Os=p((i,s)=>{var o=nn();function h(d,m){var y=o(this,d),v=y.size;return y.set(d,m),this.size+=y.size==v?0:1,this}s.exports=h}),Ia=p((i,s)=>{var o=si(),h=Ts(),d=Ds(),m=sn(),y=Os();function v(w){var P=-1,N=w==null?0:w.length;for(this.clear();++P<N;){var F=w[P];this.set(F[0],F[1])}}v.prototype.clear=o,v.prototype.delete=h,v.prototype.get=d,v.prototype.has=m,v.prototype.set=y,s.exports=v}),Ra=p((i,s)=>{var o=K(),h=Ss(),d=Ia(),m=200;function y(v,w){var P=this.__data__;if(P instanceof o){var N=P.__data__;if(!h||N.length<m-1)return N.push([v,w]),this.size=++P.size,this;P=this.__data__=new d(N)}return P.set(v,w),this.size=P.size,this}s.exports=y}),Ga=p((i,s)=>{var o=K(),h=at(),d=rt(),m=ct(),y=yt(),v=Ra();function w(P){var N=this.__data__=new o(P);this.size=N.size}w.prototype.clear=h,w.prototype.delete=d,w.prototype.get=m,w.prototype.has=y,w.prototype.set=v,s.exports=w}),Tn=p((i,s)=>{var o=Pt(),h=function(){try{var d=o(Object,"defineProperty");return d({},"",{}),d}catch{}}();s.exports=h}),Fi=p((i,s)=>{var o=Tn();function h(d,m,y){m=="__proto__"&&o?o(d,m,{configurable:!0,enumerable:!0,value:y,writable:!0}):d[m]=y}s.exports=h}),Fa=p((i,s)=>{var o=Fi(),h=C();function d(m,y,v){(v!==void 0&&!h(m[y],v)||v===void 0&&!(y in m))&&o(m,y,v)}s.exports=d}),za=p((i,s)=>{function o(h){return function(d,m,y){for(var v=-1,w=Object(d),P=y(d),N=P.length;N--;){var F=P[h?N:++v];if(m(w[F],F,w)===!1)break}return d}}s.exports=o}),Is=p((i,s)=>{var o=za(),h=o();s.exports=h}),Na=p((i,s)=>{var o=xt(),h=typeof i=="object"&&i&&!i.nodeType&&i,d=h&&typeof s=="object"&&s&&!s.nodeType&&s,m=d&&d.exports===h,y=m?o.Buffer:void 0,v=y?y.allocUnsafe:void 0;function w(P,N){if(N)return P.slice();var F=P.length,tt=v?v(F):new P.constructor(F);return P.copy(tt),tt}s.exports=w}),Ua=p((i,s)=>{var o=xt(),h=o.Uint8Array;s.exports=h}),vo=p((i,s)=>{var o=Ua();function h(d){var m=new d.constructor(d.byteLength);return new o(m).set(new o(d)),m}s.exports=h}),Ao=p((i,s)=>{var o=vo();function h(d,m){var y=m?o(d.buffer):d.buffer;return new d.constructor(y,d.byteOffset,d.length)}s.exports=h}),Rs=p((i,s)=>{function o(h,d){var m=-1,y=h.length;for(d||(d=Array(y));++m<y;)d[m]=h[m];return d}s.exports=o}),Za=p((i,s)=>{var o=Et(),h=Object.create,d=function(){function m(){}return function(y){if(!o(y))return{};if(h)return h(y);m.prototype=y;var v=new m;return m.prototype=void 0,v}}();s.exports=d}),ja=p((i,s)=>{function o(h,d){return function(m){return h(d(m))}}s.exports=o}),qa=p((i,s)=>{var o=ja(),h=o(Object.getPrototypeOf,Object);s.exports=h}),Gs=p((i,s)=>{var o=Object.prototype;function h(d){var m=d&&d.constructor,y=typeof m=="function"&&m.prototype||o;return d===y}s.exports=h}),Ha=p((i,s)=>{var o=Za(),h=qa(),d=Gs();function m(y){return typeof y.constructor=="function"&&!d(y)?o(h(y)):{}}s.exports=m}),zi=p((i,s)=>{function o(h){return h!=null&&typeof h=="object"}s.exports=o}),Va=p((i,s)=>{var o=Yt(),h=zi(),d="[object Arguments]";function m(y){return h(y)&&o(y)==d}s.exports=m}),Dn=p((i,s)=>{var o=Va(),h=zi(),d=Object.prototype,m=d.hasOwnProperty,y=d.propertyIsEnumerable,v=o(function(){return arguments}())?o:function(w){return h(w)&&m.call(w,"callee")&&!y.call(w,"callee")};s.exports=v}),Ni=p((i,s)=>{var o=Array.isArray;s.exports=o}),$a=p((i,s)=>{var o=9007199254740991;function h(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=o}s.exports=h}),xi=p((i,s)=>{var o=Zt(),h=$a();function d(m){return m!=null&&h(m.length)&&!o(m)}s.exports=d}),Mo=p((i,s)=>{var o=xi(),h=zi();function d(m){return h(m)&&o(m)}s.exports=d}),xo=p((i,s)=>{function o(){return!1}s.exports=o}),Fs=p((i,s)=>{var o=xt(),h=xo(),d=typeof i=="object"&&i&&!i.nodeType&&i,m=d&&typeof s=="object"&&s&&!s.nodeType&&s,y=m&&m.exports===d,v=y?o.Buffer:void 0,w=v?v.isBuffer:void 0,P=w||h;s.exports=P}),Wa=p((i,s)=>{var o=Yt(),h=qa(),d=zi(),m="[object Object]",y=Function.prototype,v=Object.prototype,w=y.toString,P=v.hasOwnProperty,N=w.call(Object);function F(tt){if(!d(tt)||o(tt)!=m)return!1;var it=h(tt);if(it===null)return!0;var lt=P.call(it,"constructor")&&it.constructor;return typeof lt=="function"&< instanceof lt&&w.call(lt)==N}s.exports=F}),Ka=p((i,s)=>{var o=Yt(),h=$a(),d=zi(),m="[object Arguments]",y="[object Array]",v="[object Boolean]",w="[object Date]",P="[object Error]",N="[object Function]",F="[object Map]",tt="[object Number]",it="[object Object]",lt="[object RegExp]",ft="[object Set]",vt="[object String]",Ft="[object WeakMap]",z="[object ArrayBuffer]",q="[object DataView]",W="[object Float32Array]",nt="[object Float64Array]",X="[object Int8Array]",et="[object Int16Array]",E="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",D="[object Uint16Array]",I="[object Uint32Array]",R={};R[W]=R[nt]=R[X]=R[et]=R[E]=R[S]=R[O]=R[D]=R[I]=!0,R[m]=R[y]=R[z]=R[v]=R[q]=R[w]=R[P]=R[N]=R[F]=R[tt]=R[it]=R[lt]=R[ft]=R[vt]=R[Ft]=!1;function V(H){return d(H)&&h(H.length)&&!!R[o(H)]}s.exports=V}),Lo=p((i,s)=>{function o(h){return function(d){return h(d)}}s.exports=o}),bo=p((i,s)=>{var o=mt(),h=typeof i=="object"&&i&&!i.nodeType&&i,d=h&&typeof s=="object"&&s&&!s.nodeType&&s,m=d&&d.exports===h,y=m&&o.process,v=function(){try{var w=d&&d.require&&d.require("util").types;return w||y&&y.binding&&y.binding("util")}catch{}}();s.exports=v}),Xa=p((i,s)=>{var o=Ka(),h=Lo(),d=bo(),m=d&&d.isTypedArray,y=m?h(m):o;s.exports=y}),Ya=p((i,s)=>{function o(h,d){if(!(d==="constructor"&&typeof h[d]=="function")&&d!="__proto__")return h[d]}s.exports=o}),wo=p((i,s)=>{var o=Fi(),h=C(),d=Object.prototype,m=d.hasOwnProperty;function y(v,w,P){var N=v[w];(!(m.call(v,w)&&h(N,P))||P===void 0&&!(w in v))&&o(v,w,P)}s.exports=y}),Co=p((i,s)=>{var o=wo(),h=Fi();function d(m,y,v,w){var P=!v;v||(v={});for(var N=-1,F=y.length;++N<F;){var tt=y[N],it=w?w(v[tt],m[tt],tt,v,m):void 0;it===void 0&&(it=m[tt]),P?h(v,tt,it):o(v,tt,it)}return v}s.exports=d}),zs=p((i,s)=>{function o(h,d){for(var m=-1,y=Array(h);++m<h;)y[m]=d(m);return y}s.exports=o}),Ja=p((i,s)=>{var o=9007199254740991,h=/^(?:0|[1-9]\d*)$/;function d(m,y){var v=typeof m;return y=y??o,!!y&&(v=="number"||v!="symbol"&&h.test(m))&&m>-1&&m%1==0&&m<y}s.exports=d}),Eo=p((i,s)=>{var o=zs(),h=Dn(),d=Ni(),m=Fs(),y=Ja(),v=Xa(),w=Object.prototype,P=w.hasOwnProperty;function N(F,tt){var it=d(F),lt=!it&&h(F),ft=!it&&!lt&&m(F),vt=!it&&!lt&&!ft&&v(F),Ft=it||lt||ft||vt,z=Ft?o(F.length,String):[],q=z.length;for(var W in F)(tt||P.call(F,W))&&!(Ft&&(W=="length"||ft&&(W=="offset"||W=="parent")||vt&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||y(W,q)))&&z.push(W);return z}s.exports=N}),Po=p((i,s)=>{function o(h){var d=[];if(h!=null)for(var m in Object(h))d.push(m);return d}s.exports=o}),ko=p((i,s)=>{var o=Et(),h=Gs(),d=Po(),m=Object.prototype,y=m.hasOwnProperty;function v(w){if(!o(w))return d(w);var P=h(w),N=[];for(var F in w)F=="constructor"&&(P||!y.call(w,F))||N.push(F);return N}s.exports=v}),je=p((i,s)=>{var o=Eo(),h=ko(),d=xi();function m(y){return d(y)?o(y,!0):h(y)}s.exports=m}),Mt=p((i,s)=>{var o=Co(),h=je();function d(m){return o(m,h(m))}s.exports=d}),Qa=p((i,s)=>{var o=Fa(),h=Na(),d=Ao(),m=Rs(),y=Ha(),v=Dn(),w=Ni(),P=Mo(),N=Fs(),F=Zt(),tt=Et(),it=Wa(),lt=Xa(),ft=Ya(),vt=Mt();function Ft(z,q,W,nt,X,et,E){var S=ft(z,W),O=ft(q,W),D=E.get(O);if(D){o(z,W,D);return}var I=et?et(S,O,W+"",z,q,E):void 0,R=I===void 0;if(R){var V=w(O),H=!V&&N(O),$=!V&&!H&<(O);I=O,V||H||$?w(S)?I=S:P(S)?I=m(S):H?(R=!1,I=h(O,!0)):$?(R=!1,I=d(O,!0)):I=[]:it(O)||v(O)?(I=S,v(S)?I=vt(S):(!tt(S)||F(S))&&(I=y(O))):R=!1}R&&(E.set(O,I),X(I,O,nt,et,E),E.delete(O)),o(z,W,I)}s.exports=Ft}),tr=p((i,s)=>{var o=Ga(),h=Fa(),d=Is(),m=Qa(),y=Et(),v=je(),w=Ya();function P(N,F,tt,it,lt){N!==F&&d(F,function(ft,vt){if(lt||(lt=new o),y(ft))m(N,F,vt,tt,P,it,lt);else{var Ft=it?it(w(N,vt),ft,vt+"",N,F,lt):void 0;Ft===void 0&&(Ft=ft),h(N,vt,Ft)}},v)}s.exports=P}),Ns=p((i,s)=>{function o(h){return h}s.exports=o}),er=p((i,s)=>{function o(h,d,m){switch(m.length){case 0:return h.call(d);case 1:return h.call(d,m[0]);case 2:return h.call(d,m[0],m[1]);case 3:return h.call(d,m[0],m[1],m[2])}return h.apply(d,m)}s.exports=o}),Us=p((i,s)=>{var o=er(),h=Math.max;function d(m,y,v){return y=h(y===void 0?m.length-1:y,0),function(){for(var w=arguments,P=-1,N=h(w.length-y,0),F=Array(N);++P<N;)F[P]=w[y+P];P=-1;for(var tt=Array(y+1);++P<y;)tt[P]=w[P];return tt[y]=v(F),o(m,this,tt)}}s.exports=d}),ir=p((i,s)=>{function o(h){return function(){return h}}s.exports=o}),Ui=p((i,s)=>{var o=ir(),h=Tn(),d=Ns(),m=h?function(y,v){return h(y,"toString",{configurable:!0,enumerable:!1,value:o(v),writable:!0})}:d;s.exports=m}),nr=p((i,s)=>{var o=800,h=16,d=Date.now;function m(y){var v=0,w=0;return function(){var P=d(),N=h-(P-w);if(w=P,N>0){if(++v>=o)return arguments[0]}else v=0;return y.apply(void 0,arguments)}}s.exports=m}),Bo=p((i,s)=>{var o=Ui(),h=nr(),d=h(o);s.exports=d}),So=p((i,s)=>{var o=Ns(),h=Us(),d=Bo();function m(y,v){return d(h(y,v,o),y+"")}s.exports=m}),To=p((i,s)=>{var o=C(),h=xi(),d=Ja(),m=Et();function y(v,w,P){if(!m(P))return!1;var N=typeof w;return(N=="number"?h(P)&&d(w,P.length):N=="string"&&w in P)?o(P[w],v):!1}s.exports=y}),Do=p((i,s)=>{var o=So(),h=To();function d(m){return o(function(y,v){var w=-1,P=v.length,N=P>1?v[P-1]:void 0,F=P>2?v[2]:void 0;for(N=m.length>3&&typeof N=="function"?(P--,N):void 0,F&&h(v[0],v[1],F)&&(N=P<3?void 0:N,P=1),y=Object(y);++w<P;){var tt=v[w];tt&&m(y,tt,w,N)}return y})}s.exports=d}),On=p((i,s)=>{var o=tr(),h=Do(),d=h(function(m,y,v){o(m,y,v)});s.exports=d}),Zs=p((i,s)=>{var o=Yt(),h=zi(),d="[object Symbol]";function m(y){return typeof y=="symbol"||h(y)&&o(y)==d}s.exports=m}),In=p((i,s)=>{var o=Ni(),h=Zs(),d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,m=/^\w*$/;function y(v,w){if(o(v))return!1;var P=typeof v;return P=="number"||P=="symbol"||P=="boolean"||v==null||h(v)?!0:m.test(v)||!d.test(v)||w!=null&&v in Object(w)}s.exports=y}),Oo=p((i,s)=>{var o=Ia(),h="Expected a function";function d(m,y){if(typeof m!="function"||y!=null&&typeof y!="function")throw new TypeError(h);var v=function(){var w=arguments,P=y?y.apply(this,w):w[0],N=v.cache;if(N.has(P))return N.get(P);var F=m.apply(this,w);return v.cache=N.set(P,F)||N,F};return v.cache=new(d.Cache||o),v}d.Cache=o,s.exports=d}),Io=p((i,s)=>{var o=Oo(),h=500;function d(m){var y=o(m,function(w){return v.size===h&&v.clear(),w}),v=y.cache;return y}s.exports=d}),Ro=p((i,s)=>{var o=Io(),h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,m=o(function(y){var v=[];return y.charCodeAt(0)===46&&v.push(""),y.replace(h,function(w,P,N,F){v.push(N?F.replace(d,"$1"):P||w)}),v});s.exports=m}),Go=p((i,s)=>{function o(h,d){for(var m=-1,y=h==null?0:h.length,v=Array(y);++m<y;)v[m]=d(h[m],m,h);return v}s.exports=o}),Fo=p((i,s)=>{var o=Dt(),h=Go(),d=Ni(),m=Zs(),y=o?o.prototype:void 0,v=y?y.toString:void 0;function w(P){if(typeof P=="string")return P;if(d(P))return h(P,w)+"";if(m(P))return v?v.call(P):"";var N=P+"";return N=="0"&&1/P==-1/0?"-0":N}s.exports=w}),js=p((i,s)=>{var o=Fo();function h(d){return d==null?"":o(d)}s.exports=h}),an=p((i,s)=>{var o=Ni(),h=In(),d=Ro(),m=js();function y(v,w){return o(v)?v:h(v,w)?[v]:d(m(v))}s.exports=y}),sr=p((i,s)=>{var o=Zs();function h(d){if(typeof d=="string"||o(d))return d;var m=d+"";return m=="0"&&1/d==-1/0?"-0":m}s.exports=h}),ar=p((i,s)=>{var o=an(),h=sr();function d(m,y){y=o(y,m);for(var v=0,w=y.length;m!=null&&v<w;)m=m[h(y[v++])];return v&&v==w?m:void 0}s.exports=d}),pi=p((i,s)=>{var o=ar();function h(d,m,y){var v=d==null?void 0:o(d,m);return v===void 0?y:v}s.exports=h}),Nt=p((i,s)=>{(function(o,h){typeof i=="object"&&typeof s<"u"?s.exports=h():(o=o||self).RBush=h()})(i,function(){function o(z,q,W,nt,X){(function et(E,S,O,D,I){for(;D>O;){if(D-O>600){var R=D-O+1,V=S-O+1,H=Math.log(R),$=.5*Math.exp(2*H/3),Q=.5*Math.sqrt(H*$*(R-$)/R)*(V-R/2<0?-1:1),J=Math.max(O,Math.floor(S-V*$/R+Q)),ot=Math.min(D,Math.floor(S+(R-V)*$/R+Q));et(E,S,J,ot,I)}var gt=E[S],At=O,bt=D;for(h(E,O,S),I(E[D],gt)>0&&h(E,O,D);At<bt;){for(h(E,At,bt),At++,bt--;I(E[At],gt)<0;)At++;for(;I(E[bt],gt)>0;)bt--}I(E[O],gt)===0?h(E,O,bt):h(E,++bt,D),bt<=S&&(O=bt+1),S<=bt&&(D=bt-1)}})(z,q,W||0,nt||z.length-1,X||d)}function h(z,q,W){var nt=z[q];z[q]=z[W],z[W]=nt}function d(z,q){return z<q?-1:z>q?1:0}var m=function(z){z===void 0&&(z=9),this._maxEntries=Math.max(4,z),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function y(z,q,W){if(!W)return q.indexOf(z);for(var nt=0;nt<q.length;nt++)if(W(z,q[nt]))return nt;return-1}function v(z,q){w(z,0,z.children.length,q,z)}function w(z,q,W,nt,X){X||(X=vt(null)),X.minX=1/0,X.minY=1/0,X.maxX=-1/0,X.maxY=-1/0;for(var et=q;et<W;et++){var E=z.children[et];P(X,z.leaf?nt(E):E)}return X}function P(z,q){return z.minX=Math.min(z.minX,q.minX),z.minY=Math.min(z.minY,q.minY),z.maxX=Math.max(z.maxX,q.maxX),z.maxY=Math.max(z.maxY,q.maxY),z}function N(z,q){return z.minX-q.minX}function F(z,q){return z.minY-q.minY}function tt(z){return(z.maxX-z.minX)*(z.maxY-z.minY)}function it(z){return z.maxX-z.minX+(z.maxY-z.minY)}function lt(z,q){return z.minX<=q.minX&&z.minY<=q.minY&&q.maxX<=z.maxX&&q.maxY<=z.maxY}function ft(z,q){return q.minX<=z.maxX&&q.minY<=z.maxY&&q.maxX>=z.minX&&q.maxY>=z.minY}function vt(z){return{children:z,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ft(z,q,W,nt,X){for(var et=[q,W];et.length;)if(!((W=et.pop())-(q=et.pop())<=nt)){var E=q+Math.ceil((W-q)/nt/2)*nt;o(z,E,q,W,X),et.push(q,E,E,W)}}return m.prototype.all=function(){return this._all(this.data,[])},m.prototype.search=function(z){var q=this.data,W=[];if(!ft(z,q))return W;for(var nt=this.toBBox,X=[];q;){for(var et=0;et<q.children.length;et++){var E=q.children[et],S=q.leaf?nt(E):E;ft(z,S)&&(q.leaf?W.push(E):lt(z,S)?this._all(E,W):X.push(E))}q=X.pop()}return W},m.prototype.collides=function(z){var q=this.data;if(!ft(z,q))return!1;for(var W=[];q;){for(var nt=0;nt<q.children.length;nt++){var X=q.children[nt],et=q.leaf?this.toBBox(X):X;if(ft(z,et)){if(q.leaf||lt(z,et))return!0;W.push(X)}}q=W.pop()}return!1},m.prototype.load=function(z){if(!z||!z.length)return this;if(z.length<this._minEntries){for(var q=0;q<z.length;q++)this.insert(z[q]);return this}var W=this._build(z.slice(),0,z.length-1,0);if(this.data.children.length)if(this.data.height===W.height)this._splitRoot(this.data,W);else{if(this.data.height<W.height){var nt=this.data;this.data=W,W=nt}this._insert(W,this.data.height-W.height-1,!0)}else this.data=W;return this},m.prototype.insert=function(z){return z&&this._insert(z,this.data.height-1),this},m.prototype.clear=function(){return this.data=vt([]),this},m.prototype.remove=function(z,q){if(!z)return this;for(var W,nt,X,et=this.data,E=this.toBBox(z),S=[],O=[];et||S.length;){if(et||(et=S.pop(),nt=S[S.length-1],W=O.pop(),X=!0),et.leaf){var D=y(z,et.children,q);if(D!==-1)return et.children.splice(D,1),S.push(et),this._condense(S),this}X||et.leaf||!lt(et,E)?nt?(W++,et=nt.children[W],X=!1):et=null:(S.push(et),O.push(W),W=0,nt=et,et=et.children[0])}return this},m.prototype.toBBox=function(z){return z},m.prototype.compareMinX=function(z,q){return z.minX-q.minX},m.prototype.compareMinY=function(z,q){return z.minY-q.minY},m.prototype.toJSON=function(){return this.data},m.prototype.fromJSON=function(z){return this.data=z,this},m.prototype._all=function(z,q){for(var W=[];z;)z.leaf?q.push.apply(q,z.children):W.push.apply(W,z.children),z=W.pop();return q},m.prototype._build=function(z,q,W,nt){var X,et=W-q+1,E=this._maxEntries;if(et<=E)return v(X=vt(z.slice(q,W+1)),this.toBBox),X;nt||(nt=Math.ceil(Math.log(et)/Math.log(E)),E=Math.ceil(et/Math.pow(E,nt-1))),(X=vt([])).leaf=!1,X.height=nt;var S=Math.ceil(et/E),O=S*Math.ceil(Math.sqrt(E));Ft(z,q,W,O,this.compareMinX);for(var D=q;D<=W;D+=O){var I=Math.min(D+O-1,W);Ft(z,D,I,S,this.compareMinY);for(var R=D;R<=I;R+=S){var V=Math.min(R+S-1,I);X.children.push(this._build(z,R,V,nt-1))}}return v(X,this.toBBox),X},m.prototype._chooseSubtree=function(z,q,W,nt){for(;nt.push(q),!q.leaf&&nt.length-1!==W;){for(var X=1/0,et=1/0,E=void 0,S=0;S<q.children.length;S++){var O=q.children[S],D=tt(O),I=(R=z,V=O,(Math.max(V.maxX,R.maxX)-Math.min(V.minX,R.minX))*(Math.max(V.maxY,R.maxY)-Math.min(V.minY,R.minY))-D);I<et?(et=I,X=D<X?D:X,E=O):I===et&&D<X&&(X=D,E=O)}q=E||q.children[0]}var R,V;return q},m.prototype._insert=function(z,q,W){var nt=W?z:this.toBBox(z),X=[],et=this._chooseSubtree(nt,this.data,q,X);for(et.children.push(z),P(et,nt);q>=0&&X[q].children.length>this._maxEntries;)this._split(X,q),q--;this._adjustParentBBoxes(nt,X,q)},m.prototype._split=function(z,q){var W=z[q],nt=W.children.length,X=this._minEntries;this._chooseSplitAxis(W,X,nt);var et=this._chooseSplitIndex(W,X,nt),E=vt(W.children.splice(et,W.children.length-et));E.height=W.height,E.leaf=W.leaf,v(W,this.toBBox),v(E,this.toBBox),q?z[q-1].children.push(E):this._splitRoot(W,E)},m.prototype._splitRoot=function(z,q){this.data=vt([z,q]),this.data.height=z.height+1,this.data.leaf=!1,v(this.data,this.toBBox)},m.prototype._chooseSplitIndex=function(z,q,W){for(var nt,X,et,E,S,O,D,I=1/0,R=1/0,V=q;V<=W-q;V++){var H=w(z,0,V,this.toBBox),$=w(z,V,W,this.toBBox),Q=(X=H,et=$,E=void 0,S=void 0,O=void 0,D=void 0,E=Math.max(X.minX,et.minX),S=Math.max(X.minY,et.minY),O=Math.min(X.maxX,et.maxX),D=Math.min(X.maxY,et.maxY),Math.max(0,O-E)*Math.max(0,D-S)),J=tt(H)+tt($);Q<I?(I=Q,nt=V,R=J<R?J:R):Q===I&&J<R&&(R=J,nt=V)}return nt||W-q},m.prototype._chooseSplitAxis=function(z,q,W){var nt=z.leaf?this.compareMinX:N,X=z.leaf?this.compareMinY:F;this._allDistMargin(z,q,W,nt)<this._allDistMargin(z,q,W,X)&&z.children.sort(nt)},m.prototype._allDistMargin=function(z,q,W,nt){z.children.sort(nt);for(var X=this.toBBox,et=w(z,0,q,X),E=w(z,W-q,W,X),S=it(et)+it(E),O=q;O<W-q;O++){var D=z.children[O];P(et,z.leaf?X(D):D),S+=it(et)}for(var I=W-q-1;I>=q;I--){var R=z.children[I];P(E,z.leaf?X(R):R),S+=it(E)}return S},m.prototype._adjustParentBBoxes=function(z,q,W){for(var nt=W;nt>=0;nt--)P(q[nt],z)},m.prototype._condense=function(z){for(var q=z.length-1,W=void 0;q>=0;q--)z[q].children.length===0?q>0?(W=z[q-1].children).splice(W.indexOf(z[q]),1):this.clear():v(z[q],this.toBBox)},m})}),Qt=p(i=>{Object.defineProperty(i,"__esModule",{value:!0}),i.earthRadius=63710088e-1,i.factors={centimeters:i.earthRadius*100,centimetres:i.earthRadius*100,degrees:i.earthRadius/111325,feet:i.earthRadius*3.28084,inches:i.earthRadius*39.37,kilometers:i.earthRadius/1e3,kilometres:i.earthRadius/1e3,meters:i.earthRadius,metres:i.earthRadius,miles:i.earthRadius/1609.344,millimeters:i.earthRadius*1e3,millimetres:i.earthRadius*1e3,nauticalmiles:i.earthRadius/1852,radians:1,yards:i.earthRadius*1.0936},i.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/i.earthRadius,yards:1.0936133},i.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(D,I,R){R===void 0&&(R={});var V={type:"Feature"};return(R.id===0||R.id)&&(V.id=R.id),R.bbox&&(V.bbox=R.bbox),V.properties=I||{},V.geometry=D,V}i.feature=s;function o(D,I,R){switch(D){case"Point":return h(I).geometry;case"LineString":return v(I).geometry;case"Polygon":return m(I).geometry;case"MultiPoint":return F(I).geometry;case"MultiLineString":return N(I).geometry;case"MultiPolygon":return tt(I).geometry;default:throw new Error(D+" is invalid")}}i.geometry=o;function h(D,I,R){if(R===void 0&&(R={}),!D)throw new Error("coordinates is required");if(!Array.isArray(D))throw new Error("coordinates must be an Array");if(D.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!et(D[0])||!et(D[1]))throw new Error("coordinates must contain numbers");var V={type:"Point",coordinates:D};return s(V,I,R)}i.point=h;function d(D,I,R){return R===void 0&&(R={}),P(D.map(function(V){return h(V,I)}),R)}i.points=d;function m(D,I,R){R===void 0&&(R={});for(var V=0,H=D;V<H.length;V++){var $=H[V];if($.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var Q=0;Q<$[$.length-1].length;Q++)if($[$.length-1][Q]!==$[0][Q])throw new Error("First and last Position are not equivalent.")}var J={type:"Polygon",coordinates:D};return s(J,I,R)}i.polygon=m;function y(D,I,R){return R===void 0&&(R={}),P(D.map(function(V){return m(V,I)}),R)}i.polygons=y;function v(D,I,R){if(R===void 0&&(R={}),D.length<2)throw new Error("coordinates must be an array of two or more positions");var V={type:"LineString",coordinates:D};return s(V,I,R)}i.lineString=v;function w(D,I,R){return R===void 0&&(R={}),P(D.map(function(V){return v(V,I)}),R)}i.lineStrings=w;function P(D,I){I===void 0&&(I={});var R={type:"FeatureCollection"};return I.id&&(R.id=I.id),I.bbox&&(R.bbox=I.bbox),R.features=D,R}i.featureCollection=P;function N(D,I,R){R===void 0&&(R={});var V={type:"MultiLineString",coordinates:D};return s(V,I,R)}i.multiLineString=N;function F(D,I,R){R===void 0&&(R={});var V={type:"MultiPoint",coordinates:D};return s(V,I,R)}i.multiPoint=F;function tt(D,I,R){R===void 0&&(R={});var V={type:"MultiPolygon",coordinates:D};return s(V,I,R)}i.multiPolygon=tt;function it(D,I,R){R===void 0&&(R={});var V={type:"GeometryCollection",geometries:D};return s(V,I,R)}i.geometryCollection=it;function lt(D,I){if(I===void 0&&(I=0),I&&!(I>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,I||0);return Math.round(D*R)/R}i.round=lt;function ft(D,I){I===void 0&&(I="kilometers");var R=i.factors[I];if(!R)throw new Error(I+" units is invalid");return D*R}i.radiansToLength=ft;function vt(D,I){I===void 0&&(I="kilometers");var R=i.factors[I];if(!R)throw new Error(I+" units is invalid");return D/R}i.lengthToRadians=vt;function Ft(D,I){return q(vt(D,I))}i.lengthToDegrees=Ft;function z(D){var I=D%360;return I<0&&(I+=360),I}i.bearingToAzimuth=z;function q(D){var I=D%(2*Math.PI);return I*180/Math.PI}i.radiansToDegrees=q;function W(D){var I=D%360;return I*Math.PI/180}i.degreesToRadians=W;function nt(D,I,R){if(I===void 0&&(I="kilometers"),R===void 0&&(R="kilometers"),!(D>=0))throw new Error("length must be a positive number");return ft(vt(D,I),R)}i.convertLength=nt;function X(D,I,R){if(I===void 0&&(I="meters"),R===void 0&&(R="kilometers"),!(D>=0))throw new Error("area must be a positive number");var V=i.areaFactors[I];if(!V)throw new Error("invalid original units");var H=i.areaFactors[R];if(!H)throw new Error("invalid final units");return D/V*H}i.convertArea=X;function et(D){return!isNaN(D)&&D!==null&&!Array.isArray(D)}i.isNumber=et;function E(D){return!!D&&D.constructor===Object}i.isObject=E;function S(D){if(!D)throw new Error("bbox is required");if(!Array.isArray(D))throw new Error("bbox must be an Array");if(D.length!==4&&D.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");D.forEach(function(I){if(!et(I))throw new Error("bbox must only contain numbers")})}i.validateBBox=S;function O(D){if(!D)throw new Error("id is required");if(["string","number"].indexOf(typeof D)===-1)throw new Error("id must be a number or a string")}i.validateId=O}),rn=p(i=>{Object.defineProperty(i,"__esModule",{value:!0});var s=Qt();function o(q,W,nt){if(q!==null)for(var X,et,E,S,O,D,I,R=0,V=0,H,$=q.type,Q=$==="FeatureCollection",J=$==="Feature",ot=Q?q.features.length:1,gt=0;gt<ot;gt++){I=Q?q.features[gt].geometry:J?q.geometry:q,H=I?I.type==="GeometryCollection":!1,O=H?I.geometries.length:1;for(var At=0;At<O;At++){var bt=0,Vt=0;if(S=H?I.geometries[At]:I,S!==null){D=S.coordinates;var Kt=S.type;switch(R=nt&&(Kt==="Polygon"||Kt==="MultiPolygon")?1:0,Kt){case null:break;case"Point":if(W(D,V,gt,bt,Vt)===!1)return!1;V++,bt++;break;case"LineString":case"MultiPoint":for(X=0;X<D.length;X++){if(W(D[X],V,gt,bt,Vt)===!1)return!1;V++,Kt==="MultiPoint"&&bt++}Kt==="LineString"&&bt++;break;case"Polygon":case"MultiLineString":for(X=0;X<D.length;X++){for(et=0;et<D[X].length-R;et++){if(W(D[X][et],V,gt,bt,Vt)===!1)return!1;V++}Kt==="MultiLineString"&&bt++,Kt==="Polygon"&&Vt++}Kt==="Polygon"&&bt++;break;case"MultiPolygon":for(X=0;X<D.length;X++){for(Vt=0,et=0;et<D[X].length;et++){for(E=0;E<D[X][et].length-R;E++){if(W(D[X][et][E],V,gt,bt,Vt)===!1)return!1;V++}Vt++}bt++}break;case"GeometryCollection":for(X=0;X<S.geometries.length;X++)if(o(S.geometries[X],W,nt)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function h(q,W,nt,X){var et=nt;return o(q,function(E,S,O,D,I){S===0&&nt===void 0?et=E:et=W(et,E,S,O,D,I)},X),et}function d(q,W){var nt;switch(q.type){case"FeatureCollection":for(nt=0;nt<q.features.length&&W(q.features[nt].properties,nt)!==!1;nt++);break;case"Feature":W(q.properties,0);break}}function m(q,W,nt){var X=nt;return d(q,function(et,E){E===0&&nt===void 0?X=et:X=W(X,et,E)}),X}function y(q,W){if(q.type==="Feature")W(q,0);else if(q.type==="FeatureCollection")for(var nt=0;nt<q.features.length&&W(q.features[nt],nt)!==!1;nt++);}function v(q,W,nt){var X=nt;return y(q,function(et,E){E===0&&nt===void 0?X=et:X=W(X,et,E)}),X}function w(q){var W=[];return o(q,function(nt){W.push(nt)}),W}function P(q,W){var nt,X,et,E,S,O,D,I,R,V,H=0,$=q.type==="FeatureCollection",Q=q.type==="Feature",J=$?q.features.length:1;for(nt=0;nt<J;nt++){for(O=$?q.features[nt].geometry:Q?q.geometry:q,I=$?q.features[nt].properties:Q?q.properties:{},R=$?q.features[nt].bbox:Q?q.bbox:void 0,V=$?q.features[nt].id:Q?q.id:void 0,D=O?O.type==="GeometryCollection":!1,S=D?O.geometries.length:1,et=0;et<S;et++){if(E=D?O.geometries[et]:O,E===null){if(W(null,H,I,R,V)===!1)return!1;continue}switch(E.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(W(E,H,I,R,V)===!1)return!1;break}case"GeometryCollection":{for(X=0;X<E.geometries.length;X++)if(W(E.geometries[X],H,I,R,V)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}H++}}function N(q,W,nt){var X=nt;return P(q,function(et,E,S,O,D){E===0&&nt===void 0?X=et:X=W(X,et,E,S,O,D)}),X}function F(q,W){P(q,function(nt,X,et,E,S){var O=nt===null?null:nt.type;switch(O){case null:case"Point":case"LineString":case"Polygon":return W(s.feature(nt,et,{bbox:E,id:S}),X,0)===!1?!1:void 0}var D;switch(O){case"MultiPoint":D="Point";break;case"MultiLineString":D="LineString";break;case"MultiPolygon":D="Polygon";break}for(var I=0;I<nt.coordinates.length;I++){var R=nt.coordinates[I],V={type:D,coordinates:R};if(W(s.feature(V,et),X,I)===!1)return!1}})}function tt(q,W,nt){var X=nt;return F(q,function(et,E,S){E===0&&S===0&&nt===void 0?X=et:X=W(X,et,E,S)}),X}function it(q,W){F(q,function(nt,X,et){var E=0;if(nt.geometry){var S=nt.geometry.type;if(!(S==="Point"||S==="MultiPoint")){var O,D=0,I=0,R=0;if(o(nt,function(V,H,$,Q,J){if(O===void 0||X>D||Q>I||J>R){O=V,D=X,I=Q,R=J,E=0;return}var ot=s.lineString([O,V],nt.properties);if(W(ot,X,et,J,E)===!1)return!1;E++,O=V})===!1)return!1}}})}function lt(q,W,nt){var X=nt,et=!1;return it(q,function(E,S,O,D,I){et===!1&&nt===void 0?X=E:X=W(X,E,S,O,D,I),et=!0}),X}function ft(q,W){if(!q)throw new Error("geojson is required");F(q,function(nt,X,et){if(nt.geometry!==null){var E=nt.geometry.type,S=nt.geometry.coordinates;switch(E){case"LineString":if(W(nt,X,et,0,0)===!1)return!1;break;case"Polygon":for(var O=0;O<S.length;O++)if(W(s.lineString(S[O],nt.properties),X,et,O)===!1)return!1;break}}})}function vt(q,W,nt){var X=nt;return ft(q,function(et,E,S,O){E===0&&nt===void 0?X=et:X=W(X,et,E,S,O)}),X}function Ft(q,W){if(W=W||{},!s.isObject(W))throw new Error("options is invalid");var nt=W.featureIndex||0,X=W.multiFeatureIndex||0,et=W.geometryIndex||0,E=W.segmentIndex||0,S=W.properties,O;switch(q.type){case"FeatureCollection":nt<0&&(nt=q.features.length+nt),S=S||q.features[nt].properties,O=q.features[nt].geometry;break;case"Feature":S=S||q.properties,O=q.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=q;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var D=O.coordinates;switch(O.type){case"Point":case"MultiPoint":return null;case"LineString":return E<0&&(E=D.length+E-1),s.lineString([D[E],D[E+1]],S,W);case"Polygon":return et<0&&(et=D.length+et),E<0&&(E=D[et].length+E-1),s.lineString([D[et][E],D[et][E+1]],S,W);case"MultiLineString":return X<0&&(X=D.length+X),E<0&&(E=D[X].length+E-1),s.lineString([D[X][E],D[X][E+1]],S,W);case"MultiPolygon":return X<0&&(X=D.length+X),et<0&&(et=D[X].length+et),E<0&&(E=D[X][et].length-E-1),s.lineString([D[X][et][E],D[X][et][E+1]],S,W)}throw new Error("geojson is invalid")}function z(q,W){if(W=W||{},!s.isObject(W))throw new Error("options is invalid");var nt=W.featureIndex||0,X=W.multiFeatureIndex||0,et=W.geometryIndex||0,E=W.coordIndex||0,S=W.properties,O;switch(q.type){case"FeatureCollection":nt<0&&(nt=q.features.length+nt),S=S||q.features[nt].properties,O=q.features[nt].geometry;break;case"Feature":S=S||q.properties,O=q.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":O=q;break;default:throw new Error("geojson is invalid")}if(O===null)return null;var D=O.coordinates;switch(O.type){case"Point":return s.point(D,S,W);case"MultiPoint":return X<0&&(X=D.length+X),s.point(D[X],S,W);case"LineString":return E<0&&(E=D.length+E),s.point(D[E],S,W);case"Polygon":return et<0&&(et=D.length+et),E<0&&(E=D[et].length+E),s.point(D[et][E],S,W);case"MultiLineString":return X<0&&(X=D.length+X),E<0&&(E=D[X].length+E),s.point(D[X][E],S,W);case"MultiPolygon":return X<0&&(X=D.length+X),et<0&&(et=D[X].length+et),E<0&&(E=D[X][et].length-E),s.point(D[X][et][E],S,W)}throw new Error("geojson is invalid")}i.coordAll=w,i.coordEach=o,i.coordReduce=h,i.featureEach=y,i.featureReduce=v,i.findPoint=z,i.findSegment=Ft,i.flattenEach=F,i.flattenReduce=tt,i.geomEach=P,i.geomReduce=N,i.lineEach=ft,i.lineReduce=vt,i.propEach=d,i.propReduce=m,i.segmentEach=it,i.segmentReduce=lt}),Zi=p(i=>{Object.defineProperty(i,"__esModule",{value:!0});var s=rn();function o(h){var d=[1/0,1/0,-1/0,-1/0];return s.coordEach(h,function(m){d[0]>m[0]&&(d[0]=m[0]),d[1]>m[1]&&(d[1]=m[1]),d[2]<m[0]&&(d[2]=m[0]),d[3]<m[1]&&(d[3]=m[1])}),d}o.default=o,i.default=o}),Li=p((i,s)=>{var o=Nt(),h=Qt(),d=rn(),m=Zi().default,y=d.featureEach;d.coordEach,h.polygon;var v=h.featureCollection;function w(P){var N=new o(P);return N.insert=function(F){if(F.type!=="Feature")throw new Error("invalid feature");return F.bbox=F.bbox?F.bbox:m(F),o.prototype.insert.call(this,F)},N.load=function(F){var tt=[];return Array.isArray(F)?F.forEach(function(it){if(it.type!=="Feature")throw new Error("invalid features");it.bbox=it.bbox?it.bbox:m(it),tt.push(it)}):y(F,function(it){if(it.type!=="Feature")throw new Error("invalid features");it.bbox=it.bbox?it.bbox:m(it),tt.push(it)}),o.prototype.load.call(this,tt)},N.remove=function(F,tt){if(F.type!=="Feature")throw new Error("invalid feature");return F.bbox=F.bbox?F.bbox:m(F),o.prototype.remove.call(this,F,tt)},N.clear=function(){return o.prototype.clear.call(this)},N.search=function(F){var tt=o.prototype.search.call(this,this.toBBox(F));return v(tt)},N.collides=function(F){return o.prototype.collides.call(this,this.toBBox(F))},N.all=function(){var F=o.prototype.all.call(this);return v(F)},N.toJSON=function(){return o.prototype.toJSON.call(this)},N.fromJSON=function(F){return o.prototype.fromJSON.call(this,F)},N.toBBox=function(F){var tt;if(F.bbox)tt=F.bbox;else if(Array.isArray(F)&&F.length===4)tt=F;else if(Array.isArray(F)&&F.length===6)tt=[F[0],F[1],F[3],F[4]];else if(F.type==="Feature")tt=m(F);else if(F.type==="FeatureCollection")tt=m(F);else throw new Error("invalid geojson");return{minX:tt[0],minY:tt[1],maxX:tt[2],maxY:tt[3]}},N}s.exports=w,s.exports.default=w});Array.prototype.findIndex=Array.prototype.findIndex||function(i){if(this===null)throw new TypeError("Array.prototype.findIndex called on null or undefined");if(typeof i!="function")throw new TypeError("callback must be a function");for(var s=Object(this),o=s.length>>>0,h=arguments[1],d=0;d<o;d++)if(i.call(h,s[d],d,s))return d;return-1},Array.prototype.find=Array.prototype.find||function(i){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof i!="function")throw new TypeError("callback must be a function");for(var s=Object(this),o=s.length>>>0,h=arguments[1],d=0;d<o;d++){var m=s[d];if(i.call(h,m,d,s))return m}},typeof Object.assign!="function"&&(Object.assign=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");i=Object(i);for(var s=1;s<arguments.length;s++){var o=arguments[s];if(o!=null)for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(i[h]=o[h])}return i}),function(i){i.forEach(function(s){s.hasOwnProperty("remove")||Object.defineProperty(s,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype]),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(i,s){if(this==null)throw new TypeError('"this" is null or not defined');var o=Object(this),h=o.length>>>0;if(h===0)return!1;var d=s|0,m=Math.max(d>=0?d:h-Math.abs(d),0);function y(v,w){return v===w||typeof v=="number"&&typeof w=="number"&&isNaN(v)&&isNaN(w)}for(;m<h;){if(y(o[m],i))return!0;m++}return!1}});var qs={version:"2.18.3"},Tt=A(On()),ne={tooltips:{placeMarker:"Click to place marker",firstVertex:"Click to place first vertex",continueLine:"Click to continue drawing",finishLine:"Click any existing marker to finish",finishPoly:"Click first marker to finish",finishRect:"Click to finish",startCircle:"Click to place circle center",finishCircle:"Click to finish circle",placeCircleMarker:"Click to place circle marker",placeText:"Click to place text",selectFirstLayerFor:"Select first layer for {action}",selectSecondLayerFor:"Select second layer for {action}"},actions:{finish:"Finish",cancel:"Cancel",removeLastVertex:"Remove Last Vertex"},buttonTitles:{drawMarkerButton:"Draw Marker",drawPolyButton:"Draw Polygons",drawLineButton:"Draw Polyline",drawCircleButton:"Draw Circle",drawRectButton:"Draw Rectangle",editButton:"Edit Layers",dragButton:"Drag Layers",cutButton:"Cut Layers",deleteButton:"Remove Layers",drawCircleMarkerButton:"Draw Circle Marker",snappingButton:"Snap dragged marker to other layers and vertices",pinningButton:"Pin shared vertices together",rotateButton:"Rotate Layers",drawTextButton:"Draw Text",scaleButton:"Scale Layers",autoTracingButton:"Auto trace Line",snapGuidesButton:"Show SnapGuides",unionButton:"Union layers",differenceButton:"Subtract layers"},measurements:{totalLength:"Length",segmentLength:"Segment length",area:"Area",radius:"Radius",perimeter:"Perimeter",height:"Height",width:"Width",coordinates:"Position",coordinatesMarker:"Position Marker"}},Hs={tooltips:{placeMarker:"Platziere den Marker mit Klick",firstVertex:"Platziere den ersten Marker mit Klick",continueLine:"Klicke, um weiter zu zeichnen",finishLine:"Beende mit Klick auf existierenden Marker",finishPoly:"Beende mit Klick auf ersten Marker",finishRect:"Beende mit Klick",startCircle:"Platziere das Kreiszentrum mit Klick",finishCircle:"Beende den Kreis mit Klick",placeCircleMarker:"Platziere den Kreismarker mit Klick",placeText:"Platziere den Text mit Klick"},actions:{finish:"Beenden",cancel:"Abbrechen",removeLastVertex:"Letzten Vertex löschen"},buttonTitles:{drawMarkerButton:"Marker zeichnen",drawPolyButton:"Polygon zeichnen",drawLineButton:"Polyline zeichnen",drawCircleButton:"Kreis zeichnen",drawRectButton:"Rechteck zeichnen",editButton:"Layer editieren",dragButton:"Layer bewegen",cutButton:"Layer schneiden",deleteButton:"Layer löschen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verknüpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"Länge",segmentLength:"Segment Länge",area:"Fläche",radius:"Radius",perimeter:"Umfang",height:"Höhe",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},Rn={tooltips:{placeMarker:"Clicca per posizionare un Marker",firstVertex:"Clicca per posizionare il primo vertice",continueLine:"Clicca per continuare a disegnare",finishLine:"Clicca qualsiasi marker esistente per terminare",finishPoly:"Clicca il primo marker per terminare",finishRect:"Clicca per terminare",startCircle:"Clicca per posizionare il punto centrale del cerchio",finishCircle:"Clicca per terminare il cerchio",placeCircleMarker:"Clicca per posizionare un Marker del cherchio"},actions:{finish:"Termina",cancel:"Annulla",removeLastVertex:"Rimuovi l'ultimo vertice"},buttonTitles:{drawMarkerButton:"Disegna Marker",drawPolyButton:"Disegna Poligoni",drawLineButton:"Disegna Polilinea",drawCircleButton:"Disegna Cerchio",drawRectButton:"Disegna Rettangolo",editButton:"Modifica Livelli",dragButton:"Sposta Livelli",cutButton:"Ritaglia Livelli",deleteButton:"Elimina Livelli",drawCircleMarkerButton:"Disegna Marker del Cerchio",snappingButton:"Snap ha trascinato il pennarello su altri strati e vertici",pinningButton:"Pin condiviso vertici insieme",rotateButton:"Ruota livello"}},Ne={tooltips:{placeMarker:"Klik untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},zo={tooltips:{placeMarker:"Adaugă un punct",firstVertex:"Apasă aici pentru a adăuga primul Vertex",continueLine:"Apasă aici pentru a continua desenul",finishLine:"Apasă pe orice obiect pentru a finisa desenul",finishPoly:"Apasă pe primul obiect pentru a finisa",finishRect:"Apasă pentru a finisa",startCircle:"Apasă pentru a desena un cerc",finishCircle:"Apasă pentru a finisa un cerc",placeCircleMarker:"Adaugă un punct"},actions:{finish:"Termină",cancel:"Anulează",removeLastVertex:"Șterge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaugă o bulină",drawPolyButton:"Desenează un poligon",drawLineButton:"Desenează o linie",drawCircleButton:"Desenează un cerc",drawRectButton:"Desenează un dreptunghi",editButton:"Editează straturile",dragButton:"Mută straturile",cutButton:"Taie straturile",deleteButton:"Șterge straturile",drawCircleMarkerButton:"Desenează marcatorul cercului",snappingButton:"Fixați marcatorul glisat pe alte straturi și vârfuri",pinningButton:"Fixați vârfurile partajate împreună",rotateButton:"Rotiți stratul"}},Gn={tooltips:{placeMarker:"Нажмите, чтобы нанести маркер",firstVertex:"Нажмите, чтобы нанести первый объект",continueLine:"Нажмите, чтобы продолжить рисование",finishLine:"Нажмите любой существующий маркер для завершения",finishPoly:"Выберите первую точку, чтобы закончить",finishRect:"Нажмите, чтобы закончить",startCircle:"Нажмите, чтобы добавить центр круга",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Нажмите, чтобы нанести круговой маркер"},actions:{finish:"Завершить",cancel:"Отменить",removeLastVertex:"Отменить последнее действие"},buttonTitles:{drawMarkerButton:"Добавить маркер",drawPolyButton:"Рисовать полигон",drawLineButton:"Рисовать кривую",drawCircleButton:"Рисовать круг",drawRectButton:"Рисовать прямоугольник",editButton:"Редактировать слой",dragButton:"Перенести слой",cutButton:"Вырезать слой",deleteButton:"Удалить слой",drawCircleMarkerButton:"Добавить круговой маркер",snappingButton:"Привязать перетаскиваемый маркер к другим слоям и вершинам",pinningButton:"Связать общие точки вместе",rotateButton:"Поворот слоя"}},bi={tooltips:{placeMarker:"Presiona para colocar un marcador",firstVertex:"Presiona para colocar el primer vértice",continueLine:"Presiona para continuar dibujando",finishLine:"Presiona cualquier marcador existente para finalizar",finishPoly:"Presiona el primer marcador para finalizar",finishRect:"Presiona para finalizar",startCircle:"Presiona para colocar el centro del círculo",finishCircle:"Presiona para finalizar el círculo",placeCircleMarker:"Presiona para colocar un marcador de círculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar último vértice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Polígono",drawLineButton:"Dibujar Línea",drawCircleButton:"Dibujar Círculo",drawRectButton:"Dibujar Rectángulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de Círculo",snappingButton:"El marcador de Snap arrastrado a otras capas y vértices",pinningButton:"Fijar juntos los vértices compartidos",rotateButton:"Rotar capa"}},re={tooltips:{placeMarker:"Klik om een marker te plaatsen",firstVertex:"Klik om het eerste punt te plaatsen",continueLine:"Klik om te blijven tekenen",finishLine:"Klik op een bestaand punt om te beëindigen",finishPoly:"Klik op het eerst punt om te beëindigen",finishRect:"Klik om te beëindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te beëindigen",placeCircleMarker:"Klik om een marker te plaatsen"},actions:{finish:"Bewaar",cancel:"Annuleer",removeLastVertex:"Verwijder laatste punt"},buttonTitles:{drawMarkerButton:"Plaats Marker",drawPolyButton:"Teken een vlak",drawLineButton:"Teken een lijn",drawCircleButton:"Teken een cirkel",drawRectButton:"Teken een vierkant",editButton:"Bewerk",dragButton:"Verplaats",cutButton:"Knip",deleteButton:"Verwijder",drawCircleMarkerButton:"Plaats Marker",snappingButton:"Snap gesleepte marker naar andere lagen en hoekpunten",pinningButton:"Speld gedeelde hoekpunten samen",rotateButton:"Laag roteren"}},wi={tooltips:{placeMarker:"Cliquez pour placer un marqueur",firstVertex:"Cliquez pour placer le premier sommet",continueLine:"Cliquez pour continuer à dessiner",finishLine:"Cliquez sur n'importe quel marqueur pour terminer",finishPoly:"Cliquez sur le premier marqueur pour terminer",finishRect:"Cliquez pour terminer",startCircle:"Cliquez pour placer le centre du cercle",finishCircle:"Cliquez pour finir le cercle",placeCircleMarker:"Cliquez pour placer le marqueur circulaire"},actions:{finish:"Terminer",cancel:"Annuler",removeLastVertex:"Retirer le dernier sommet"},buttonTitles:{drawMarkerButton:"Placer des marqueurs",drawPolyButton:"Dessiner des polygones",drawLineButton:"Dessiner des polylignes",drawCircleButton:"Dessiner un cercle",drawRectButton:"Dessiner un rectangle",editButton:"Éditer des calques",dragButton:"Déplacer des calques",cutButton:"Couper des calques",deleteButton:"Supprimer des calques",drawCircleMarkerButton:"Dessiner un marqueur circulaire",snappingButton:"Glisser le marqueur vers d'autres couches et sommets",pinningButton:"Épingler ensemble les sommets partagés",rotateButton:"Tourner des calques"}},on={tooltips:{placeMarker:"单击放置标记",firstVertex:"单击放置首个顶点",continueLine:"单击继续绘制",finishLine:"单击任何存在的标记以完成",finishPoly:"单击第一个标记以完成",finishRect:"单击完成",startCircle:"单击放置圆心",finishCircle:"单击完成圆形",placeCircleMarker:"点击放置圆形标记"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最后的顶点"},buttonTitles:{drawMarkerButton:"绘制标记",drawPolyButton:"绘制多边形",drawLineButton:"绘制线段",drawCircleButton:"绘制圆形",drawRectButton:"绘制长方形",editButton:"编辑图层",dragButton:"拖拽图层",cutButton:"剪切图层",deleteButton:"删除图层",drawCircleMarkerButton:"画圆圈标记",snappingButton:"将拖动的标记捕捉到其他图层和顶点",pinningButton:"将共享顶点固定在一起",rotateButton:"旋转图层"}},hn={tooltips:{placeMarker:"單擊放置標記",firstVertex:"單擊放置第一個頂點",continueLine:"單擊繼續繪製",finishLine:"單擊任何存在的標記以完成",finishPoly:"單擊第一個標記以完成",finishRect:"單擊完成",startCircle:"單擊放置圓心",finishCircle:"單擊完成圓形",placeCircleMarker:"點擊放置圓形標記"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最後一個頂點"},buttonTitles:{drawMarkerButton:"放置標記",drawPolyButton:"繪製多邊形",drawLineButton:"繪製線段",drawCircleButton:"繪製圓形",drawRectButton:"繪製方形",editButton:"編輯圖形",dragButton:"移動圖形",cutButton:"裁切圖形",deleteButton:"刪除圖形",drawCircleMarkerButton:"畫圓圈標記",snappingButton:"將拖動的標記對齊到其他圖層和頂點",pinningButton:"將共享頂點固定在一起",rotateButton:"旋轉圖形"}},Vs={tooltips:{placeMarker:"Clique para posicionar o marcador",firstVertex:"Clique para posicionar o primeiro vértice",continueLine:"Clique para continuar desenhando",finishLine:"Clique em qualquer marcador existente para finalizar",finishPoly:"Clique no primeiro marcador para finalizar",finishRect:"Clique para finalizar",startCircle:"Clique para posicionar o centro do círculo",finishCircle:"Clique para finalizar o círculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover último vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},ji={tooltips:{placeMarker:"Clique para colocar marcador",firstVertex:"Clique para colocar primeiro vértice",continueLine:"Clique para continuar a desenhar",finishLine:"Clique num marcador existente para terminar",finishPoly:"Clique no primeiro marcador para terminar",finishRect:"Clique para terminar",startCircle:"Clique para colocar o centro do círculo",finishCircle:"Clique para terminar o círculo",placeCircleMarker:"Clique para colocar marcador de círculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover Último Vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},$s={tooltips:{placeMarker:"Kliknij, aby umieścić znacznik",firstVertex:"Kliknij, aby umieścić pierwszy wierzchołek",continueLine:"Kliknij, aby kontynuować rysowanie",finishLine:"Kliknij dowolny istniejący znacznik, aby zakończyć",finishPoly:"Kliknij pierwszy znacznik, aby zakończyć",finishRect:"Kliknij, aby zakończyć",startCircle:"Kliknij, aby umieścić środek okręgu",finishCircle:"Kliknij, aby zakończyć okrąg",placeCircleMarker:"Kliknij, aby umieścić znacznik okręgu",placeText:"Kliknij, aby umieścić tekst"},actions:{finish:"Zakończ",cancel:"Anuluj",removeLastVertex:"Usuń ostatni wierzchołek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielokąt",drawLineButton:"Rysuj linię",drawCircleButton:"Rysuj okrąg",drawRectButton:"Rysuj prostokąt",editButton:"Edytuj warstwy",dragButton:"Przeciągnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usuń warstwy",drawCircleMarkerButton:"Rysuj znacznik okrągły",snappingButton:"Przyciągnij przenoszony znacznik do innych warstw i wierzchołków",pinningButton:"Przypnij wspólne wierzchołki razem",rotateButton:"Obróć warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne śledzenie linii"},measurements:{totalLength:"Długość",segmentLength:"Długość odcinka",area:"Obszar",radius:"Promień",perimeter:"Obwód",height:"Wysokość",width:"Szerokość",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},Ws={tooltips:{placeMarker:"Klicka för att placera markör",firstVertex:"Klicka för att placera första hörnet",continueLine:"Klicka för att fortsätta rita",finishLine:"Klicka på en existerande punkt för att slutföra",finishPoly:"Klicka på den första punkten för att slutföra",finishRect:"Klicka för att slutföra",startCircle:"Klicka för att placera cirkelns centrum",finishCircle:"Klicka för att slutföra cirkeln",placeCircleMarker:"Klicka för att placera cirkelmarkör"},actions:{finish:"Slutför",cancel:"Avbryt",removeLastVertex:"Ta bort sista hörnet"},buttonTitles:{drawMarkerButton:"Rita Markör",drawPolyButton:"Rita Polygoner",drawLineButton:"Rita Linje",drawCircleButton:"Rita Cirkel",drawRectButton:"Rita Rektangel",editButton:"Redigera Lager",dragButton:"Dra Lager",cutButton:"Klipp i Lager",deleteButton:"Ta bort Lager",drawCircleMarkerButton:"Rita Cirkelmarkör",snappingButton:"Snäpp dra markören till andra lager och hörn",pinningButton:"Fäst delade hörn tillsammans",rotateButton:"Rotera lagret"}},Fn={tooltips:{placeMarker:"Κάντε κλικ για να τοποθετήσετε Δείκτη",firstVertex:"Κάντε κλικ για να τοποθετήσετε το πρώτο σημείο",continueLine:"Κάντε κλικ για να συνεχίσετε να σχεδιάζετε",finishLine:"Κάντε κλικ σε οποιονδήποτε υπάρχον σημείο για να ολοκληρωθεί",finishPoly:"Κάντε κλικ στο πρώτο σημείο για να τελειώσετε",finishRect:"Κάντε κλικ για να τελειώσετε",startCircle:"Κάντε κλικ για να τοποθετήσετε κέντρο Κύκλου",finishCircle:"Κάντε κλικ για να ολοκληρώσετε τον Κύκλο",placeCircleMarker:"Κάντε κλικ για να τοποθετήσετε Κυκλικό Δείκτη"},actions:{finish:"Τέλος",cancel:"Ακύρωση",removeLastVertex:"Κατάργηση τελευταίου σημείου"},buttonTitles:{drawMarkerButton:"Σχεδίαση Δείκτη",drawPolyButton:"Σχεδίαση Πολυγώνου",drawLineButton:"Σχεδίαση Γραμμής",drawCircleButton:"Σχεδίαση Κύκλου",drawRectButton:"Σχεδίαση Ορθογωνίου",editButton:"Επεξεργασία Επιπέδων",dragButton:"Μεταφορά Επιπέδων",cutButton:"Αποκοπή Επιπέδων",deleteButton:"Κατάργηση Επιπέδων",drawCircleMarkerButton:"Σχεδίαση Κυκλικού Δείκτη",snappingButton:"Προσκόλληση του Δείκτη μεταφοράς σε άλλα Επίπεδα και Κορυφές",pinningButton:"Περικοπή κοινών κορυφών μαζί",rotateButton:"Περιστρέψτε το στρώμα"}},Ks={tooltips:{placeMarker:"Kattintson a jelölő elhelyezéséhez",firstVertex:"Kattintson az első pont elhelyezéséhez",continueLine:"Kattintson a következő pont elhelyezéséhez",finishLine:"A befejezéshez kattintson egy meglévő pontra",finishPoly:"A befejezéshez kattintson az első pontra",finishRect:"Kattintson a befejezéshez",startCircle:"Kattintson a kör középpontjának elhelyezéséhez",finishCircle:"Kattintson a kör befejezéséhez",placeCircleMarker:"Kattintson a körjelölő elhelyezéséhez"},actions:{finish:"Befejezés",cancel:"Mégse",removeLastVertex:"Utolsó pont eltávolítása"},buttonTitles:{drawMarkerButton:"Jelölő rajzolása",drawPolyButton:"Poligon rajzolása",drawLineButton:"Vonal rajzolása",drawCircleButton:"Kör rajzolása",drawRectButton:"Négyzet rajzolása",editButton:"Elemek szerkesztése",dragButton:"Elemek mozgatása",cutButton:"Elemek vágása",deleteButton:"Elemek törlése",drawCircleMarkerButton:"Kör jelölő rajzolása",snappingButton:"Kapcsolja a jelöltőt másik elemhez vagy ponthoz",pinningButton:"Közös pontok összekötése",rotateButton:"Fólia elforgatása"}},Xs={tooltips:{placeMarker:"Tryk for at placere en markør",firstVertex:"Tryk for at placere det første punkt",continueLine:"Tryk for at fortsætte linjen",finishLine:"Tryk på et eksisterende punkt for at afslutte",finishPoly:"Tryk på det første punkt for at afslutte",finishRect:"Tryk for at afslutte",startCircle:"Tryk for at placere cirklens center",finishCircle:"Tryk for at afslutte cirklen",placeCircleMarker:"Tryk for at placere en cirkelmarkør"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer markør",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Træk",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmarkør",snappingButton:"Fastgør trukket markør til andre elementer",pinningButton:"Sammenlæg delte elementer",rotateButton:"Roter laget"}},zn={tooltips:{placeMarker:"Klikk for å plassere punkt",firstVertex:"Klikk for å plassere første punkt",continueLine:"Klikk for å tegne videre",finishLine:"Klikk på et eksisterende punkt for å fullføre",finishPoly:"Klikk første punkt for å fullføre",finishRect:"Klikk for å fullføre",startCircle:"Klikk for å sette sirkel midtpunkt",finishCircle:"Klikk for å fullføre sirkel",placeCircleMarker:"Klikk for å plassere sirkel",placeText:"Klikk for å plassere tekst"},actions:{finish:"Fullfør",cancel:"Kanseller",removeLastVertex:"Fjern forrige punkt"},buttonTitles:{drawMarkerButton:"Tegn punkt",drawPolyButton:"Tegn flate",drawLineButton:"Tegn linje",drawCircleButton:"Tegn sirkel",drawRectButton:"Tegn rektangel",editButton:"Rediger objekter",dragButton:"Dra objekter",cutButton:"Kutt objekter",deleteButton:"Fjern objekter",drawCircleMarkerButton:"Tegn sirkel-punkt",snappingButton:"Fest dratt punkt til andre objekter og punkt",pinningButton:"Pin delte punkter sammen",rotateButton:"Rotér objekter",drawTextButton:"Tegn tekst",scaleButton:"Skalér objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Område",radius:"Radius",perimeter:"Omriss",height:"Høyde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmarkør"}},rr={tooltips:{placeMarker:"کلیک برای جانمایی نشان",firstVertex:"کلیک برای رسم اولین رأس",continueLine:"کلیک برای ادامه رسم",finishLine:"کلیک روی هر نشان موجود برای پایان",finishPoly:"کلیک روی اولین نشان برای پایان",finishRect:"کلیک برای پایان",startCircle:"کلیک برای رسم مرکز دایره",finishCircle:"کلیک برای پایان رسم دایره",placeCircleMarker:"کلیک برای رسم نشان دایره",placeText:"کلیک برای نوشتن متن"},actions:{finish:"پایان",cancel:"لفو",removeLastVertex:"حذف آخرین رأس"},buttonTitles:{drawMarkerButton:"درج نشان",drawPolyButton:"رسم چندضلعی",drawLineButton:"رسم خط",drawCircleButton:"رسم دایره",drawRectButton:"رسم چهارضلعی",editButton:"ویرایش لایهها",dragButton:"جابجایی لایهها",cutButton:"برش لایهها",deleteButton:"حذف لایهها",drawCircleMarkerButton:"رسم نشان دایره",snappingButton:"نشانگر را به لایهها و رئوس دیگر بکشید",pinningButton:"رئوس مشترک را با هم پین کنید",rotateButton:"چرخش لایه",drawTextButton:"رسم متن",scaleButton:"مقیاسگذاری",autoTracingButton:"ردیاب خودکار"},measurements:{totalLength:"طول",segmentLength:"طول بخش",area:"ناحیه",radius:"شعاع",perimeter:"محیط",height:"ارتفاع",width:"عرض",coordinates:"موقعیت",coordinatesMarker:"موقعیت نشان"}},Ys={tooltips:{placeMarker:"Натисніть, щоб нанести маркер",firstVertex:"Натисніть, щоб нанести першу вершину",continueLine:"Натисніть, щоб продовжити малювати",finishLine:"Натисніть будь-який існуючий маркер для завершення",finishPoly:"Виберіть перший маркер, щоб завершити",finishRect:"Натисніть, щоб завершити",startCircle:"Натисніть, щоб додати центр кола",finishCircle:"Натисніть, щоб завершити коло",placeCircleMarker:"Натисніть, щоб нанести круговий маркер"},actions:{finish:"Завершити",cancel:"Відмінити",removeLastVertex:"Видалити попередню вершину"},buttonTitles:{drawMarkerButton:"Малювати маркер",drawPolyButton:"Малювати полігон",drawLineButton:"Малювати криву",drawCircleButton:"Малювати коло",drawRectButton:"Малювати прямокутник",editButton:"Редагувати шари",dragButton:"Перенести шари",cutButton:"Вирізати шари",deleteButton:"Видалити шари",drawCircleMarkerButton:"Малювати круговий маркер",snappingButton:"Прив’язати перетягнутий маркер до інших шарів та вершин",pinningButton:"Зв'язати спільні вершини разом",rotateButton:"Повернути шар"}},No={tooltips:{placeMarker:"İşaretçi yerleştirmek için tıklayın",firstVertex:"İlk tepe noktasını yerleştirmek için tıklayın",continueLine:"Çizime devam etmek için tıklayın",finishLine:"Bitirmek için mevcut herhangi bir işaretçiyi tıklayın",finishPoly:"Bitirmek için ilk işaretçiyi tıklayın",finishRect:"Bitirmek için tıklayın",startCircle:"Daire merkezine yerleştirmek için tıklayın",finishCircle:"Daireyi bitirmek için tıklayın",placeCircleMarker:"Daire işaretçisi yerleştirmek için tıklayın"},actions:{finish:"Bitir",cancel:"İptal",removeLastVertex:"Son köşeyi kaldır"},buttonTitles:{drawMarkerButton:"Çizim İşaretçisi",drawPolyButton:"Çokgenler çiz",drawLineButton:"Çoklu çizgi çiz",drawCircleButton:"Çember çiz",drawRectButton:"Dikdörtgen çiz",editButton:"Katmanları düzenle",dragButton:"Katmanları sürükle",cutButton:"Katmanları kes",deleteButton:"Katmanları kaldır",drawCircleMarkerButton:"Daire işaretçisi çiz",snappingButton:"Sürüklenen işaretçiyi diğer katmanlara ve köşelere yapıştır",pinningButton:"Paylaşılan köşeleri birbirine sabitle",rotateButton:"Katmanı döndür"}},St={tooltips:{placeMarker:"Kliknutím vytvoříte značku",firstVertex:"Kliknutím vytvoříte první objekt",continueLine:"Kliknutím pokračujte v kreslení",finishLine:"Kliknutí na libovolnou existující značku pro dokončení",finishPoly:"Vyberte první bod pro dokončení",finishRect:"Klikněte pro dokončení",startCircle:"Kliknutím přidejte střed kruhu",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Kliknutím nastavte poloměr"},actions:{finish:"Dokončit",cancel:"Zrušit",removeLastVertex:"Zrušit poslední akci"},buttonTitles:{drawMarkerButton:"Přidat značku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit křivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obdélník",editButton:"Upravit vrstvu",dragButton:"Přeneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"Přidat kruhovou značku",snappingButton:"Navázat tažnou značku k dalším vrstvám a vrcholům",pinningButton:"Spojit společné body dohromady",rotateButton:"Otočte vrstvu"}},$e={tooltips:{placeMarker:"クリックしてマーカーを配置",firstVertex:"クリックして最初の頂点を配置",continueLine:"クリックして描画を続ける",finishLine:"任意のマーカーをクリックして終了",finishPoly:"最初のマーカーをクリックして終了",finishRect:"クリックして終了",startCircle:"クリックして円の中心を配置",finishCircle:"クリックして円の描画を終了",placeCircleMarker:"クリックして円マーカーを配置",placeText:"クリックしてテキストを配置"},actions:{finish:"終了",cancel:"キャンセル",removeLastVertex:"最後の頂点を削除"},buttonTitles:{drawMarkerButton:"マーカーを描画",drawPolyButton:"ポリゴンを描画",drawLineButton:"折れ線を描画",drawCircleButton:"円を描画",drawRectButton:"矩形を描画",editButton:"レイヤーを編集",dragButton:"レイヤーをドラッグ",cutButton:"レイヤーを切り取り",deleteButton:"レイヤーを削除",drawCircleMarkerButton:"円マーカーを描画",snappingButton:"ドラッグしたマーカーを他のレイヤーや頂点にスナップする",pinningButton:"共有する頂点を同時に動かす",rotateButton:"レイヤーを回転",drawTextButton:"テキストを描画"}},Wt={tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimmäisen osuuden",continueLine:"Klikkaa jatkaaksesi piirtämistä",finishLine:"Klikkaa olemassa olevaa merkkiä lopettaaksesi",finishPoly:"Klikkaa ensimmäistä merkkiä lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyrän keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyrän",placeCircleMarker:"Klikkaa asettaaksesi ympyrämerkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirrä merkkejä",drawPolyButton:"Piirrä monikulmioita",drawLineButton:"Piirrä viivoja",drawCircleButton:"Piirrä ympyrä",drawRectButton:"Piirrä neliskulmioita",editButton:"Muokkaa",dragButton:"Siirrä",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirrä ympyrämerkki",snappingButton:"Kiinnitä siirrettävä merkki toisiin muotoihin",pinningButton:"Kiinnitä jaetut muodot yhteen",rotateButton:"Käännä",drawTextButton:"Piirrä tekstiä"}},or={tooltips:{placeMarker:"마커 위치를 클릭하세요",firstVertex:"첫번째 꼭지점 위치을 클릭하세요",continueLine:"계속 그리려면 클릭하세요",finishLine:"끝내려면 기존 마커를 클릭하세요",finishPoly:"끝내려면 처음 마커를 클릭하세요",finishRect:"끝내려면 클릭하세요",startCircle:"원의 중심이 될 위치를 클릭하세요",finishCircle:"원을 끝내려면 클릭하세요",placeCircleMarker:"원 마커 위치를 클릭하세요",placeText:"텍스트 위치를 클릭하세요"},actions:{finish:"끝내기",cancel:"취소",removeLastVertex:"마지막 꼭지점 제거"},buttonTitles:{drawMarkerButton:"마커 그리기",drawPolyButton:"다각형 그리기",drawLineButton:"다각선 그리기",drawCircleButton:"원 그리기",drawRectButton:"직사각형 그리기",editButton:"레이어 편집하기",dragButton:"레이어 끌기",cutButton:"레이어 자르기",deleteButton:"레이어 제거하기",drawCircleMarkerButton:"원 마커 그리기",snappingButton:"잡아끈 마커를 다른 레이어 및 꼭지점에 들러붙게 하기",pinningButton:"공유 꼭지점을 함께 찍기",rotateButton:"레이어 회전하기",drawTextButton:"텍스트 그리기"}},Js={tooltips:{placeMarker:"Маркерди жайгаштыруу үчүн басыңыз",firstVertex:"Биринчи чокуну жайгаштырууну үчүн басыңыз",continueLine:"Сүрөт тартууну улантуу үчүн басыңыз",finishLine:"Аяктоо үчүн учурдагы маркерди басыңыз",finishPoly:"Бүтүрүү үчүн биринчи маркерди басыңыз",finishRect:"Бүтүрүү үчүн басыңыз",startCircle:"Айлананын борборун жайгаштырууну үчүн басыңыз",finishCircle:"Айлананы бүтүрүү үчүн басыңыз",placeCircleMarker:"Тегерек маркерди жайгаштыруу үчүн басыңыз",placeText:"Текстти жайгаштыруу үчүн басыңыз"},actions:{finish:"Аягы",cancel:"Жок кылуу",removeLastVertex:"Акыркы чокуну өчүрүү"},buttonTitles:{drawMarkerButton:"Маркерди чизуу",drawPolyButton:"Полигон чизуу",drawLineButton:"Полилиния чизуу",drawCircleButton:"Дайынды чизуу",drawRectButton:"Прямоугольник чизуу",editButton:"Слоопту түзөтүү",dragButton:"Слоопту карап сүйлөү",cutButton:"Слооптун башын кесүү",deleteButton:"Слооптун өчүрүү",drawCircleMarkerButton:"Дайынды маркерди чизуу",snappingButton:"Башка слооптордун жана вертекстердин арасына чекилдөө",pinningButton:"Бөлүшкөн вертекстерди бирге тутуштуруу",rotateButton:"Слооптун өзгөртүү",drawTextButton:"Текст чизуу",scaleButton:"Слооптун өлчөмүн өзгөртүү",autoTracingButton:"Автоматтык тизмеги чизуу"},measurements:{totalLength:"Узундук",segmentLength:"Сегмент узундугу",area:"Аймак",radius:"Радиус",perimeter:"Периметр",height:"Диаметр",width:"Кенчилик",coordinates:"Координаттар",coordinatesMarker:"Маркердин координаттары"}},Qs=ji,_i={en:ne,de:Hs,it:Rn,id:Ne,ro:zo,ru:Gn,es:bi,nl:re,fr:wi,pt:Qs,pt_br:Vs,pt_pt:ji,zh:on,zh_tw:hn,pl:$s,sv:Ws,el:Fn,hu:Ks,da:Xs,no:zn,fa:rr,ua:Ys,tr:No,cz:St,ja:$e,fi:Wt,ko:or,ky:Js},Ci={_globalEditModeEnabled:!1,enableGlobalEditMode(i){let s={...i};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(o=>{this._isRelevantForEdit(o)&&o.pm.enable(s)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(i=>{i.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(i=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(i)},handleLayerAdditionInGlobalEditMode(){let i=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let s in i){let o=i[s];this._isRelevantForEdit(o)&&o.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:i}){this._addedLayersEdit[L.stamp(i)]=i},_isRelevantForEdit(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowEditing}},ta=Ci,ln={_globalDragModeEnabled:!1,enableGlobalDragMode(){let i=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},i.forEach(s=>{this._isRelevantForDrag(s)&&s.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let i=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,i.forEach(s=>{s.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let i=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let s in i){let o=i[s];this._isRelevantForDrag(o)&&o.pm.enableLayerDrag()}},_layerAddedDrag({layer:i}){this._addedLayersDrag[L.stamp(i)]=i},_isRelevantForDrag(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.draggable}},ce=ln,Ei={_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(i=>{this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(i=>{i.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(i){let s=i.target;this._isRelevantForRemoval(s)&&!s.pm.dragging()&&(s.removeFrom(this.map.pm._getContainingLayer()),s.remove(),s instanceof L.LayerGroup?(this._fireRemoveLayerGroup(s),this._fireRemoveLayerGroup(this.map,s)):(s.pm._fireRemove(s),s.pm._fireRemove(this.map,s)))},_isRelevantForRemoval(i){return i.pm&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowRemoval},handleLayerAdditionInGlobalRemovalMode(){let i=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let s in i){let o=i[s];this._isRelevantForRemoval(o)&&(o.pm.enabled()&&o.pm.disable(),o.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:i}){this._addedLayersRemoval[L.stamp(i)]=i}},hr=Ei,lr={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(i=>i instanceof L.Polyline).forEach(i=>{this._isRelevantForRotate(i)&&i.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(i=>i instanceof L.Polyline).forEach(i=>{i.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate(i){return i.pm&&i instanceof L.Polyline&&!(i instanceof L.LayerGroup)&&(!L.PM.optIn&&!i.options.pmIgnore||L.PM.optIn&&i.options.pmIgnore===!1)&&!i._pmTempLayer&&i.pm.options.allowRotation},handleLayerAdditionInGlobalRotateMode(){let i=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let s in i){let o=i[s];this._isRelevantForRemoval(o)&&o.pm.enableRotate()}},_layerAddedRotate({layer:i}){this._addedLayersRotate[L.stamp(i)]=i}},Uo=lr,ur=A(On()),ea={_fireDrawStart(i="Draw",s={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},i,s)},_fireDrawEnd(i="Draw",s={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},i,s)},_fireCreate(i,s="Draw",o={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:i,layer:i},s,o)},_fireCenterPlaced(i="Draw",s={}){let o=i==="Draw"?this._layer:void 0,h=i!=="Draw"?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:o,layer:h,latlng:this._layer.getLatLng()},i,s)},_fireCut(i,s,o,h="Draw",d={}){this.__fire(i,"pm:cut",{shape:this._shape,layer:s,originalLayer:o},h,d)},_fireEdit(i=this._layer,s="Edit",o={}){this.__fire(i,"pm:edit",{layer:this._layer,shape:this.getShape()},s,o)},_fireEnable(i="Edit",s={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},i,s)},_fireDisable(i="Edit",s={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},i,s)},_fireUpdate(i="Edit",s={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},i,s)},_fireMarkerDragStart(i,s=void 0,o="Edit",h={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s},o,h)},_fireMarkerDrag(i,s=void 0,o="Edit",h={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s},o,h)},_fireMarkerDragEnd(i,s=void 0,o=void 0,h="Edit",d={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:i,shape:this.getShape(),indexPath:s,intersectionReset:o},h,d)},_fireDragStart(i="Edit",s={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},i,s)},_fireDrag(i,s="Edit",o={}){this.__fire(this._layer,"pm:drag",{...i,shape:this.getShape()},s,o)},_fireDragEnd(i="Edit",s={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},i,s)},_fireDragEnable(i="Edit",s={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},i,s)},_fireDragDisable(i="Edit",s={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},i,s)},_fireRemove(i,s=i,o="Edit",h={}){this.__fire(i,"pm:remove",{layer:s,shape:this.getShape()},o,h)},_fireVertexAdded(i,s,o,h="Edit",d={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:i,indexPath:s,latlng:o,shape:this.getShape()},h,d)},_fireVertexRemoved(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:i,indexPath:s,shape:this.getShape()},o,h)},_fireVertexClick(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:i,indexPath:s,shape:this.getShape()},o,h)},_fireIntersect(i,s=this._layer,o="Edit",h={}){this.__fire(s,"pm:intersect",{layer:this._layer,intersection:i,shape:this.getShape()},o,h)},_fireLayerReset(i,s,o="Edit",h={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:i,indexPath:s,shape:this.getShape()},o,h)},_fireChange(i,s="Edit",o={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:i,shape:this.getShape()},s,o)},_fireTextChange(i,s="Edit",o={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:i,shape:this.getShape()},s,o)},_fireTextFocus(i="Edit",s={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},i,s)},_fireTextBlur(i="Edit",s={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},i,s)},_fireSnapDrag(i,s,o="Snapping",h={}){this.__fire(i,"pm:snapdrag",s,o,h)},_fireSnap(i,s,o="Snapping",h={}){this.__fire(i,"pm:snap",s,o,h)},_fireUnsnap(i,s,o="Snapping",h={}){this.__fire(i,"pm:unsnap",s,o,h)},_fireRotationEnable(i,s,o="Rotation",h={}){this.__fire(i,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},o,h)},_fireRotationDisable(i,s="Rotation",o={}){this.__fire(i,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},s,o)},_fireRotationStart(i,s,o="Rotation",h={}){this.__fire(i,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:s},o,h)},_fireRotation(i,s,o,h=this._rotationLayer,d="Rotation",m={}){this.__fire(i,"pm:rotate",{layer:h,helpLayer:this._layer,startAngle:this._startAngle,angle:h.pm.getAngle(),angleDiff:s,oldLatLngs:o,newLatLngs:h.getLatLngs()},d,m)},_fireRotationEnd(i,s,o,h="Rotation",d={}){this.__fire(i,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:s,angle:this._rotationLayer.pm.getAngle(),originLatLngs:o,newLatLngs:this._rotationLayer.getLatLngs()},h,d)},_fireActionClick(i,s,o,h="Toolbar",d={}){this.__fire(this._map,"pm:actionclick",{text:i.text,action:i,btnName:s,button:o},h,d)},_fireButtonClick(i,s,o="Toolbar",h={}){this.__fire(this._map,"pm:buttonclick",{btnName:i,button:s},o,h)},_fireLangChange(i,s,o,h,d="Global",m={}){this.__fire(this.map,"pm:langchange",{oldLang:i,activeLang:s,fallback:o,translations:h},d,m)},_fireGlobalDragModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalEditModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalRemovalModeToggled(i,s="Global",o={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:i,map:this.map},s,o)},_fireGlobalCutModeToggled(i="Global",s={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},i,s)},_fireGlobalDrawModeToggled(i="Global",s={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},i,s)},_fireGlobalRotateModeToggled(i="Global",s={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},i,s)},_fireRemoveLayerGroup(i,s=i,o="Edit",h={}){this.__fire(i,"pm:remove",{layer:s,shape:void 0},o,h)},_fireKeyeventEvent(i,s,o,h="Global",d={}){this.__fire(this.map,"pm:keyevent",{event:i,eventType:s,focusOn:o},h,d)},__fire(i,s,o,h,d={}){o=(0,ur.default)(o,d,{source:h}),L.PM.Utils._fireEvent(i,s,o)}},Nn=ea,cr=()=>({_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(i){this.map=i,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),i.once("unload",this._unbindKeyListenerEvents,this)},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(i){let s="document";this.map.getContainer().contains(i.target)&&(s="map");let o={event:i,eventType:i.type,focusOn:s};this._lastEvents[i.type]=o,this._lastEvents.current=o,this.map.pm._fireKeyeventEvent(i,i.type,s)},_onBlur(i){i.altKey=!1;let s={event:i,eventType:i.type,focusOn:"document"};this._lastEvents[i.type]=s,this._lastEvents.current=s},getLastKeyEvent(i="current"){return this._lastEvents[i]},isShiftKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.shiftKey},isAltKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.altKey},isCtrlKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.ctrlKey},isMetaKeyPressed(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.metaKey},getPressedKey(){var i;return(i=this._lastEvents.current)==null?void 0:i.event.key}}),Gt=cr,dr=A(pi());function Bt(i){let s=L.PM.activeLang;return(0,dr.default)(_i[s],i)||(0,dr.default)(_i.en,i)||i}function Pi(i){for(let s=0;s<i.length;s+=1){let o=i[s];if(Array.isArray(o)){if(Pi(o))return!0}else if(o!=null&&o!=="")return!0}return!1}function un(i){return i.reduce((s,o)=>{if(o.length!==0){let h=Array.isArray(o)?un(o):o;Array.isArray(h)?h.length!==0&&s.push(h):s.push(h)}return s},[])}function Zo(i,s,o){let h={a:L.CRS.Earth.R,b:63567523142e-4,f:.0033528106647474805},{a:d,b:m,f:y}=h,v=i.lng,w=i.lat,P=o,N=Math.PI,F=s*N/180,tt=Math.sin(F),it=Math.cos(F),lt=(1-y)*Math.tan(w*N/180),ft=1/Math.sqrt(1+lt*lt),vt=lt*ft,Ft=Math.atan2(lt,it),z=ft*tt,q=1-z*z,W=q*(d*d-m*m)/(m*m),nt=1+W/16384*(4096+W*(-768+W*(320-175*W))),X=W/1024*(256+W*(-128+W*(74-47*W))),et=P/(m*nt),E=2*Math.PI,S,O,D;for(;Math.abs(et-E)>1e-12;){S=Math.cos(2*Ft+et),O=Math.sin(et),D=Math.cos(et);let ot=X*O*(S+X/4*(D*(-1+2*S*S)-X/6*S*(-3+4*O*O)*(-3+4*S*S)));E=et,et=P/(m*nt)+ot}let I=vt*O-ft*D*it,R=Math.atan2(vt*D+ft*O*it,(1-y)*Math.sqrt(z*z+I*I)),V=Math.atan2(O*tt,ft*D-vt*O*it),H=y/16*q*(4+y*(4-3*q)),$=V-(1-H)*y*z*(et+H*O*(S+H*D*(-1+2*S*S))),Q=v+$*180/N,J=R*180/N;return L.latLng(Q,J)}function Un(i,s,o,h,d=!0){let m,y,v,w=[];for(let P=0;P<o;P+=1){if(d)m=P*360/o+h,y=Zo(i,m,s),v=L.latLng(y.lng,y.lat);else{let N=i.lat+Math.cos(2*P*Math.PI/o)*s,F=i.lng+Math.sin(2*P*Math.PI/o)*s;v=L.latLng(N,F)}w.push(v)}return w}function jo(i,s,o){s=(s+360)%360;let h=Math.PI/180,d=180/Math.PI,{R:m}=L.CRS.Earth,y=i.lng*h,v=i.lat*h,w=s*h,P=Math.sin(v),N=Math.cos(v),F=Math.cos(o/m),tt=Math.sin(o/m),it=Math.asin(P*F+N*tt*Math.cos(w)),lt=y+Math.atan2(Math.sin(w)*tt*N,F-P*Math.sin(it));lt*=d;let ft=lt-360,vt=lt<-180?lt+360:lt;return lt=lt>180?ft:vt,L.latLng([it*d,lt])}function Zn(i,s,o){let h=i.latLngToContainerPoint(s),d=i.latLngToContainerPoint(o),m=Math.atan2(d.y-h.y,d.x-h.x)*180/Math.PI+90;return m+=m<0?360:0,m}function jn(i,s,o,h){let d=Zn(i,s,o);return jo(s,d,h)}function qo(i,s,o="asc"){if(!s||Object.keys(s).length===0)return(w,P)=>w-P;let h=Object.keys(s),d,m=h.length-1,y={};for(;m>=0;)d=h[m],y[d.toLowerCase()]=s[d],m-=1;function v(w){if(w instanceof L.Marker)return"Marker";if(w instanceof L.Circle)return"Circle";if(w instanceof L.CircleMarker)return"CircleMarker";if(w instanceof L.Rectangle)return"Rectangle";if(w instanceof L.Polygon)return"Polygon";if(w instanceof L.Polyline)return"Line"}return(w,P)=>{let N,F;if(N=v(w.layer).toLowerCase(),F=v(P.layer).toLowerCase(),!N||!F)return 0;let tt=N in y?y[N]:Number.MAX_SAFE_INTEGER,it=F in y?y[F]:Number.MAX_SAFE_INTEGER,lt=0;return tt<it?lt=-1:tt>it&&(lt=1),o==="desc"?lt*-1:lt}}function We(i,s=i.getLatLngs()){return i instanceof L.Polygon?L.polygon(s).getLatLngs():L.polyline(s).getLatLngs()}function fr(i,s){var o,h,d,m;if((h=(o=s.options.crs)==null?void 0:o.projection)!=null&&h.MAX_LATITUDE){let y=(m=(d=s.options.crs)==null?void 0:d.projection)==null?void 0:m.MAX_LATITUDE;i.lat=Math.max(Math.min(y,i.lat),-y)}return i}function ve(i){return i.options.renderer||i._map&&(i._map._getPaneRenderer(i.options.pane)||i._map.options.renderer||i._map._renderer)||i._renderer}var Ho=L.Class.extend({includes:[ta,ce,hr,Uo,Nn],initialize(i){this.map=i,this.Draw=new L.PM.Draw(i),this.Toolbar=new L.PM.Toolbar(i),this.Keyboard=Gt(),this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0},this.Keyboard._initKeyListener(i)},setLang(i="en",s,o="en"){if(i=i.trim().toLowerCase(),!/^[a-z]{2}$/.test(i)){let d=i.replace(/[-_\s]/g,"-").replace(/^(\w{2})$/,"$1-").match(/([a-z]{2})-?([a-z]{2})?/);if(d){let m=[`${d[1]}_${d[2]}`,`${d[1]}`];for(let y of m)if(_i[y]){i=y;break}}}let h=L.PM.activeLang;s&&(_i[i]=(0,Tt.default)(_i[o],s)),L.PM.activeLang=i,this.map.pm.Toolbar.reinit(),this._fireLangChange(h,i,o,_i[i])},addControls(i){this.Toolbar.addControls(i)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(i="Polygon",s){i==="Poly"&&(i="Polygon"),this.Draw.enable(i,s)},disableDraw(i="Polygon"){i==="Poly"&&(i="Polygon"),this.Draw.disable(i)},setPathOptions(i,s={}){let o=s.ignoreShapes||[],h=s.merge||!1;this.map.pm.Draw.shapes.forEach(d=>{o.indexOf(d)===-1&&this.map.pm.Draw[d].setPathOptions(i,h)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(i){let s=(0,Tt.default)(this.globalOptions,i);s.editable&&(s.resizeableCircleMarker=s.editable,delete s.editable);let o=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!s.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),o=!0);let h=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!s.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),h=!0),this.map.pm.Draw.shapes.forEach(d=>{this.map.pm.Draw[d].setOptions(s)}),o&&this.map.pm.Draw.CircleMarker.enable(),h&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(d=>{d.pm.setOptions(s)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=s,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(i=>{i.pm.enabled()&&i.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(i){return this.Draw.Cut.enable(i)},toggleGlobalCutMode(i){return this.Draw.Cut.toggle(i)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(i=!1){let s=L.PM.Utils.findLayers(this.map);if(!i)return s;let o=L.featureGroup();return o._pmTempLayer=!0,s.forEach(h=>{o.addLayer(h)}),o},getGeomanDrawLayers(i=!1){let s=L.PM.Utils.findLayers(this.map).filter(h=>h._drawnByGeoman===!0);if(!i)return s;let o=L.featureGroup();return o._pmTempLayer=!0,s.forEach(h=>{o.addLayer(h)}),o},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(i){this._touchEventCounter===0&&(L.DomEvent.on(i,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(i,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(i){this._touchEventCounter===1&&(L.DomEvent.off(i,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(i,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(i){ve(this.map)._onMouseMove(this._createMouseEvent("mousemove",i))},_canvasTouchClick(i){let s="";i.type==="touchstart"||i.type==="pointerdown"?s="mousedown":(i.type==="touchend"||i.type==="pointerup"||i.type==="touchcancel"||i.type==="pointercancel")&&(s="mouseup"),s&&ve(this.map)._onClick(this._createMouseEvent(s,i))},_createMouseEvent(i,s){let o,h=s.touches[0]||s.changedTouches[0];try{o=new MouseEvent(i,{bubbles:s.bubbles,cancelable:s.cancelable,view:s.view,detail:h.detail,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY,ctrlKey:s.ctrlKey,altKey:s.altKey,shiftKey:s.shiftKey,metaKey:s.metaKey,button:s.button,relatedTarget:s.relatedTarget})}catch{o=document.createEvent("MouseEvents"),o.initMouseEvent(i,s.bubbles,s.cancelable,s.view,h.detail,h.screenX,h.screenY,h.clientX,h.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget)}return o}}),pr=Ho,mi=L.Control.extend({includes:[Nn],options:{position:"topleft",disableByOtherButtons:!0},initialize(i){this._button=L.Util.extend({},this.options,i)},onAdd(i){return this._map=i,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):this._button.tool==="edit"?this._container=this._map.pm.Toolbar.editContainer:this._button.tool==="options"?this._container=this._map.pm.Toolbar.optionsContainer:this._button.tool==="custom"?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let i=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),i?i.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(i){return typeof i=="boolean"?this._button.toggleStatus=i:this._button.toggleStatus=!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(i){i&&i.preventDefault(),!this._button.disabled&&(this._button.onClick(i,{button:this,event:i}),this._clicked(i),this._button.afterClick(i,{button:this,event:i}))},_makeButton(i){let s=this.options.position.indexOf("right")>-1?"pos-right":"",o=L.DomUtil.create("div",`button-container ${s}`,this._container);i.title&&o.setAttribute("title",i.title);let h=L.DomUtil.create("a","leaflet-buttons-control-button",o);h.setAttribute("role","button"),h.setAttribute("tabindex","0"),h.href="#";let d=L.DomUtil.create("div",`leaflet-pm-actions-container ${s}`,o),m=i.actions,y={cancel:{text:Bt("actions.cancel"),title:Bt("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:Bt("actions.finish"),title:Bt("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:Bt("actions.removeLastVertex"),title:Bt("actions.removeLastVertex"),onClick(){this._map.pm.Draw[i.jsClass]._removeLastVertex()}},finish:{text:Bt("actions.finish"),title:Bt("actions.finish"),onClick(w){this._map.pm.Draw[i.jsClass]._finishShape(w)}}};i._preparedActions=m.map(w=>{let P=typeof w=="string"?w:w.name,N;if(y[P])N=y[P];else if(w.text)N=w;else return N;let F=L.DomUtil.create("a",`leaflet-pm-action ${s} action-${P}`,d);if(F.setAttribute("role","button"),F.setAttribute("tabindex","0"),F.href="#",N.title&&(F.title=N.title),F.innerHTML=N.text,L.DomEvent.disableClickPropagation(F),L.DomEvent.on(F,"click",L.DomEvent.stop),N._node=F,!i.disabled&&N.onClick){let tt=it=>{it.preventDefault();let lt="",{buttons:ft}=this._map.pm.Toolbar;for(let vt in ft)if(ft[vt]._button===i){lt=vt;break}this._fireActionClick(N,lt,i)};L.DomEvent.addListener(F,"click",tt,this),L.DomEvent.addListener(F,"click",N.onClick,this),L.DomEvent.addListener(F,"click",()=>this._updateActiveAction(i))}return N}),this._updateActiveAction(i),i.toggleStatus&&L.DomUtil.addClass(o,"active");let v=L.DomUtil.create("div","control-icon",h);return i.iconUrl&&v.setAttribute("src",i.iconUrl),i.className&&L.DomUtil.addClass(v,i.className),L.DomEvent.disableClickPropagation(h),L.DomEvent.on(h,"click",L.DomEvent.stop),i.disabled||(L.DomEvent.addListener(h,"click",this._onBtnClick,this),L.DomEvent.addListener(h,"click",this._triggerClick,this)),i.disabled&&(L.DomUtil.addClass(h,"pm-disabled"),h.setAttribute("aria-disabled","true")),o},_applyStyleClasses(){this._container&&(!this._button.toggleStatus||this._button.cssToggle===!1?(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")):(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let i="",{buttons:s}=this._map.pm.Toolbar;for(let o in s)if(s[o]._button===this._button){i=o;break}this._fireButtonClick(i,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let i="pm-disabled",s=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(s,i),s.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(s,i),s.setAttribute("aria-disabled","false"))},_updateActiveAction(i){var s;(s=i._preparedActions)==null||s.forEach(o=>{o!=null&&o._node&&(o.isActive&&o.isActive.call(this)?L.DomUtil.addClass(o._node,"active-action"):L.DomUtil.removeClass(o._node,"active-action"))})}}),_r=mi;L.Control.PMButton=_r;var mr=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(i){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(i)},reinit(){let i=this.isVisible;this.removeControls(),this._defineButtons(),i&&this.addControls()},init(i){this.map=i,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(i){let s=`${i}Container`;return this[s]||(this[s]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${i} leaflet-bar leaflet-control`)),this[s]},getButtons(){return this.buttons},addControls(i=this.options){typeof i.editPolygon<"u"&&(i.editMode=i.editPolygon),typeof i.deleteLayer<"u"&&(i.removalMode=i.deleteLayer),L.Util.setOptions(this,i),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let i=this.getButtons(),s={geomanIcons:{drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"}};for(let o in i){let h=i[o];L.Util.setOptions(h,{className:s.geomanIcons[o]})}},removeControls(){let i=this.getButtons();for(let s in i)i[s].remove();this.isVisible=!1},toggleControls(i=this.options){this.isVisible?this.removeControls():this.addControls(i)},_addButton(i,s){return this.buttons[i]=s,this.options[i]=!!this.options[i]||!1,this.buttons[i]},triggerClickOnToggledButtons(i){for(let s in this.buttons){let o=this.buttons[s];o._button.disableByOtherButtons&&o!==i&&o.toggled()&&o._triggerClick()}},toggleButton(i,s,o=!0){i==="editPolygon"&&(i="editMode"),i==="deleteLayer"&&(i="removalMode");let h=i;return o&&this.triggerClickOnToggledButtons(this.buttons[h]),this.buttons[h]?this.buttons[h].toggle(s):!1},_defineButtons(){let i={className:"control-icon leaflet-pm-icon-marker",title:Bt("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:Bt("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},o={className:"control-icon leaflet-pm-icon-polyline",title:Bt("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},h={title:Bt("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},d={title:Bt("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},m={title:Bt("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},y={title:Bt("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},v={title:Bt("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},w={title:Bt("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},P={title:Bt("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},N={title:Bt("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},F={className:"control-icon leaflet-pm-icon-text",title:Bt("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(tt,it)=>{this.map.pm.Draw[it.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(i)),this._addButton("drawPolyline",new L.Control.PMButton(o)),this._addButton("drawRectangle",new L.Control.PMButton(m)),this._addButton("drawPolygon",new L.Control.PMButton(s)),this._addButton("drawCircle",new L.Control.PMButton(h)),this._addButton("drawCircleMarker",new L.Control.PMButton(d)),this._addButton("drawText",new L.Control.PMButton(F)),this._addButton("editMode",new L.Control.PMButton(y)),this._addButton("dragMode",new L.Control.PMButton(v)),this._addButton("cutPolygon",new L.Control.PMButton(w)),this._addButton("removalMode",new L.Control.PMButton(P)),this._addButton("rotateMode",new L.Control.PMButton(N))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let i=this.getButtons(),s=[];this.options.drawControls===!1&&(s=s.concat(Object.keys(i).filter(o=>!i[o]._button.tool))),this.options.editControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="edit"))),this.options.optionsControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="options"))),this.options.customControls===!1&&(s=s.concat(Object.keys(i).filter(o=>i[o]._button.tool==="custom")));for(let o in i)if(this.options[o]&&s.indexOf(o)===-1){let h=i[o]._button.tool;h||(h="draw"),i[o].setPosition(this._getBtnPosition(h)),i[o].addTo(this.map)}},_getBtnPosition(i){return this.options.positions&&this.options.positions[i]?this.options.positions[i]:this.options.position},setBlockPosition(i,s){this.options.positions[i]=s,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(i,s){if(s)typeof s!="object"&&(s={name:s});else throw new TypeError("Button has no name");let o=this._btnNameMapping(i);if(!s.name)throw new TypeError("Button has no name");if(this.buttons[s.name])throw new TypeError("Button with this name already exists");let h=this.map.pm.Draw.createNewDrawInstance(s.name,o);s={...this.buttons[o]._button,...s};let d=this.createCustomControl(s);return{drawInstance:h,control:d}},createCustomControl(i){if(!i.name)throw new TypeError("Button has no name");if(this.buttons[i.name])throw new TypeError("Button with this name already exists");i.onClick||(i.onClick=()=>{}),i.afterClick||(i.afterClick=()=>{}),i.toggle!==!1&&(i.toggle=!0),i.block&&(i.block=i.block.toLowerCase()),(!i.block||i.block==="draw")&&(i.block=""),i.className?i.className.indexOf("control-icon")===-1&&(i.className=`control-icon ${i.className}`):i.className="control-icon";let s={tool:i.block,className:i.className,title:i.title||"",jsClass:i.name,onClick:i.onClick,afterClick:i.afterClick,doToggle:i.toggle,toggleStatus:!1,disableOtherButtons:i.disableOtherButtons??!0,disableByOtherButtons:i.disableByOtherButtons??!0,cssToggle:i.toggle,position:this.options.position,actions:i.actions||[],disabled:!!i.disabled};this.options[i.name]!==!1&&(this.options[i.name]=!0);let o=this._addButton(i.name,new L.Control.PMButton(s));return this.changeControlOrder(),o},controlExists(i){return!!this.getButton(i)},getButton(i){return this.getButtons()[i]},getButtonsInBlock(i){let s={};if(i)for(let o in this.getButtons()){let h=this.getButtons()[o];(h._button.tool===i||i==="draw"&&!h._button.tool)&&(s[o]=h)}return s},changeControlOrder(i=[]){let s=this._shapeMapping(),o=[];i.forEach(m=>{s[m]?o.push(s[m]):o.push(m)});let h=this.getButtons(),d={};o.forEach(m=>{h[m]&&(d[m]=h[m])}),Object.keys(h).filter(m=>!h[m]._button.tool||h[m]._button.tool==="draw").forEach(m=>{o.indexOf(m)===-1&&(d[m]=h[m])}),Object.keys(h).filter(m=>h[m]._button.tool==="edit").forEach(m=>{o.indexOf(m)===-1&&(d[m]=h[m])}),Object.keys(h).filter(m=>h[m]._button.tool==="options").forEach(m=>{o.indexOf(m)===-1&&(d[m]=h[m])}),Object.keys(h).filter(m=>h[m]._button.tool==="custom").forEach(m=>{o.indexOf(m)===-1&&(d[m]=h[m])}),Object.keys(h).forEach(m=>{o.indexOf(m)===-1&&(d[m]=h[m])}),this.map.pm.Toolbar.buttons=d,this._showHideButtons()},getControlOrder(){let i=this.getButtons(),s=[];for(let o in i)s.push(o);return s},changeActionsOfControl(i,s){let o=this._btnNameMapping(i);if(!o)throw new TypeError("No name passed");if(!s)throw new TypeError("No actions passed");if(!this.buttons[o])throw new TypeError("Button with this name not exists");this.buttons[o]._button.actions=s,this.changeControlOrder()},setButtonDisabled(i,s){let o=this._btnNameMapping(i);s?this.buttons[o].disable():this.buttons[o].enable()},_shapeMapping(){return{Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}},_btnNameMapping(i){let s=this._shapeMapping();return s[i]?s[i]:i}}),ia=mr,Vo=A(On()),gr={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(i){i.forEach(s=>{if(Array.isArray(s)){this._assignEvents(s);return}s.off("drag",this._handleSnapping,this),s.on("drag",this._handleSnapping,this),s.off("dragend",this._cleanupSnapping,this),s.on("dragend",this._cleanupSnapping,this)})},_cleanupSnapping(i){if(i){let s=i.target;s._snapped=!1}delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(s=>{s.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(i){var v,w,P;let s=i.target;if(s._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),((v=i==null?void 0:i.originalEvent)==null?void 0:v.altKey)||((P=(w=this._map)==null?void 0:w.pm)==null?void 0:P.Keyboard.isAltKeyPressed())||(this._snapList===void 0&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),this._snapList.length<=0))return!1;let o=this._calcClosestLayer(s.getLatLng(),this._snapList);if(Object.keys(o).length===0)return!1;let h=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment,d;h?d=o.latlng:d=this._checkPrioritiySnapping(o);let m=this.options.snapDistance,y={marker:s,shape:this._shape,snapLatLng:d,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(y.marker,y),this._fireSnapDrag(this._layer,y),o.distance<m){s._orgLatLng=s.getLatLng(),s.setLatLng(d),s._snapped=!0,s._snapInfo=y;let N=()=>{this._snapLatLng=d,this._fireSnap(s,y),this._fireSnap(this._layer,y)},F=this._snapLatLng||{},tt=d||{};(F.lat!==tt.lat||F.lng!==tt.lng)&&N()}else this._snapLatLng&&(this._unsnap(y),s._snapped=!1,s._snapInfo=void 0,this._fireUnsnap(y.marker,y),this._fireUnsnap(this._layer,y));return!0},_createSnapList(){let i=[],s=[],o=this._map;o.off("layerremove",this._handleSnapLayerRemoval,this),o.on("layerremove",this._handleSnapLayerRemoval,this),o.eachLayer(h=>{if((h instanceof L.Polyline||h instanceof L.Marker||h instanceof L.CircleMarker||h instanceof L.ImageOverlay)&&h.options.snapIgnore!==!0){if(h.options.snapIgnore===void 0&&(!L.PM.optIn&&h.options.pmIgnore===!0||L.PM.optIn&&h.options.pmIgnore!==!1))return;(h instanceof L.Circle||h instanceof L.CircleMarker)&&h.pm&&h.pm._hiddenPolyCircle?i.push(h.pm._hiddenPolyCircle):h instanceof L.ImageOverlay&&(h=L.rectangle(h.getBounds())),i.push(h);let d=L.polyline([],{color:"red",pmIgnore:!0});d._pmTempLayer=!0,s.push(d),(h instanceof L.Circle||h instanceof L.CircleMarker)&&s.push(d)}}),i=i.filter(h=>this._layer!==h),i=i.filter(h=>h._latlng||h._latlngs&&Pi(h._latlngs)),i=i.filter(h=>!h._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let h=L.polyline([],{color:"red",pmIgnore:!0});h._pmTempLayer=!0,s.push(h)}),this._snapList=i.concat(this._otherSnapLayers)):this._snapList=i,this.debugIndicatorLines=s},_handleSnapLayerRemoval({layer:i}){if(!i._leaflet_id)return;let s=this._snapList.findIndex(o=>o._leaflet_id===i._leaflet_id);s>-1&&this._snapList.splice(s,1)},_calcClosestLayer(i,s){return this._calcClosestLayers(i,s,1)[0]},_calcClosestLayers(i,s,o=1){let h=[],d={};s.forEach((y,v)=>{var P;if(y._parentCopy&&y._parentCopy===this._layer||((P=y.getLatLngs)==null?void 0:P.call(y).flat(5).length)<2)return;let w=this._calcLayerDistances(i,y);if(w.distance=Math.floor(w.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[v]){let N=L.polyline([],{color:"red",pmIgnore:!0});N._pmTempLayer=!0,this.debugIndicatorLines[v]=N}this.debugIndicatorLines[v].setLatLngs([i,w.latlng])}o===1&&(d.distance===void 0||w.distance-5<=d.distance)?(w.distance+5<d.distance&&(h=[]),d=w,d.layer=y,h.push(d)):o!==1&&(d={},d=w,d.layer=y,h.push(d))}),o!==1&&(h=h.sort((y,v)=>y.distance-v.distance)),o===-1&&(o=h.length);let m=this._getClosestLayerByPriority(h,o);return L.Util.isArray(m)?m:[m]},_calcLayerDistances(i,s){let o=this._map,h=s instanceof L.Marker||s instanceof L.CircleMarker,d=s instanceof L.Polygon,m=i;if(h){let y=s.getLatLng();return{latlng:{...y},distance:this._getDistance(o,y,m)}}return this._calcLatLngDistances(m,s.getLatLngs(),o,d)},_calcLatLngDistances(i,s,o,h=!1){let d,m,y,v=w=>{w.forEach((P,N)=>{if(Array.isArray(P)){v(P);return}if(this.options.snapSegment){let F=P,tt;h?tt=N+1===w.length?0:N+1:tt=N+1===w.length?void 0:N+1;let it=w[tt];if(it){let lt=this._getDistanceToSegment(o,i,F,it);(m===void 0||lt<m)&&(m=lt,y=[F,it])}}else{let F=this._getDistance(o,i,P);(m===void 0||F<m)&&(m=F,d=P)}})};return v(s),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(o,i,y[0],y[1])},segment:y,distance:m}:{latlng:d,distance:m}},_getClosestLayerByPriority(i,s=1){i=i.sort((y,v)=>y._leaflet_id-v._leaflet_id);let o=["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],h=this._map.pm.globalOptions.snappingOrder||[],d=0,m={};return h.concat(o).forEach(y=>{m[y]||(d+=1,m[y]=d)}),i.sort(qo("instanceofShape",m)),s===1?i[0]||{}:i.slice(0,s)},_checkPrioritiySnapping(i){let s=this._map,o=i.segment[0],h=i.segment[1],d=i.latlng,m=d;if(this.options.snapVertex){let y=this._getDistance(s,o,d),v=this._getDistance(s,h,d),w=y<v?o:h,P=y<v?y:v;if(this.options.snapMiddle){let F=L.PM.Utils.calcMiddleLatLng(s,o,h),tt=this._getDistance(s,F,d);tt<y&&tt<v&&(w=F,P=tt)}let N=this.options.snapDistance;P<N&&(m=w)}return{...m}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(i,s,o,h){let d=i.getMaxZoom();d===1/0&&(d=i.getZoom());let m=i.project(s,d),y=i.project(o,d),v=i.project(h,d),w=L.LineUtil.closestPointOnSegment(m,y,v);return i.unproject(w,d)},_getDistanceToSegment(i,s,o,h){let d=i.latLngToContainerPoint(s),m=i.latLngToContainerPoint(o),y=i.latLngToContainerPoint(h);return L.LineUtil.pointToSegmentDistance(d,m,y)},_getDistance(i,s,o){return i.latLngToContainerPoint(s).distanceTo(i.latLngToContainerPoint(o))}},na=gr,$o=L.Class.extend({includes:[na,Nn],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(i){L.Util.setOptions(this,i),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(i){let s=new L.Icon.Default;s.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=s,this._map=i,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(o=>{this[o]=new L.PM.Draw[o](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(i,s=!1){s?this.options.pathOptions=(0,Vo.default)(this.options.pathOptions,i):this.options.pathOptions=i},getShapes(){return this.shapes},getShape(){return this._shape},enable(i,s){if(!i)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[i].enable(s)},disable(){this.shapes.forEach(i=>{this[i].disable()})},addControls(){this.shapes.forEach(i=>{this[i].addButton()})},getActiveShape(){let i;return this.shapes.forEach(s=>{this[s]._enabled&&(i=s)}),i},_setGlobalDrawMode(){this._shape==="Cut"?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let i=[];this._map.eachLayer(s=>{(s instanceof L.Polyline||s instanceof L.Marker||s instanceof L.Circle||s instanceof L.CircleMarker||s instanceof L.ImageOverlay)&&(s._pmTempLayer||i.push(s))}),this._enabled?i.forEach(s=>{L.PM.Utils.disablePopup(s)}):i.forEach(s=>{L.PM.Utils.enablePopup(s)})},createNewDrawInstance(i,s){let o=this._getShapeFromBtnName(s);if(this[i])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[o])throw new TypeError(`There is no class L.PM.Draw.${o}`);return this[i]=new L.PM.Draw[o](this._map),this[i].toolbarButtonName=i,this[i]._shape=i,this.shapes.push(i),this[s]&&this[i].setOptions(this[s].options),this[i].setOptions(this[i].options),this[i]},_getShapeFromBtnName(i){let s={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return s[i]?s[i]:this[i]?this[i]._shape:i},_finishLayer(i){i.pm&&(i.pm.setOptions(this.options),i.pm._shape=this._shape,i.pm._map=this._map),this._addDrawnLayerProp(i)},_addDrawnLayerProp(i){i._drawnByGeoman=!0},_setPane(i,s){s==="layerPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":s==="vertexPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":s==="markerPane"&&(i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return(this._map||this._layer._map).pm.getGeomanLayers().length===0}}),de=$o;de.Marker=de.extend({initialize(i){this._map=i,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(Bt("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer(s=>{this.isRelevantMarker(s)&&s.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this),this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},isRelevantMarker(i){return i instanceof L.Marker&&i.pm&&!i._pmTempLayer&&!i.pm._initTextMarker},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let s=i;s.target=this._hintMarker,this._handleSnapping(s)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(i){if(!i.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=new L.Marker(s,this.options.markerStyle);this._setPane(o,"markerPane"),this._finishLayer(o),o.pm||(o.options.draggable=!1),o.addTo(this._map.pm._getContainingLayer()),o.pm&&this.options.markerEditable?o.pm.enable():o.dragging&&o.dragging.disable(),this._fireCreate(o),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){var i,s;(i=this.options.markerStyle)!=null&&i.icon&&((s=this._hintMarker)==null||s.setIcon(this.options.markerStyle.icon))}});var _e=63710088e-1,yr={centimeters:_e*100,centimetres:_e*100,degrees:_e/111325,feet:_e*3.28084,inches:_e*39.37,kilometers:_e/1e3,kilometres:_e/1e3,meters:_e,metres:_e,miles:_e/1609.344,millimeters:_e*1e3,millimetres:_e*1e3,nauticalmiles:_e/1852,radians:1,yards:_e*1.0936};function ki(i,s,o){o===void 0&&(o={});var h={type:"Feature"};return(o.id===0||o.id)&&(h.id=o.id),o.bbox&&(h.bbox=o.bbox),h.properties=s||{},h.geometry=i,h}function Bi(i,s,o){if(o===void 0&&(o={}),!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!sa(i[0])||!sa(i[1]))throw new Error("coordinates must contain numbers");var h={type:"Point",coordinates:i};return ki(h,s,o)}function gi(i,s,o){if(o===void 0&&(o={}),i.length<2)throw new Error("coordinates must be an array of two or more positions");var h={type:"LineString",coordinates:i};return ki(h,s,o)}function Ee(i,s){s===void 0&&(s={});var o={type:"FeatureCollection"};return s.id&&(o.id=s.id),s.bbox&&(o.bbox=s.bbox),o.features=i,o}function Wo(i,s){s===void 0&&(s="kilometers");var o=yr[s];if(!o)throw new Error(s+" units is invalid");return i*o}function cn(i,s){s===void 0&&(s="kilometers");var o=yr[s];if(!o)throw new Error(s+" units is invalid");return i/o}function Pe(i){var s=i%(2*Math.PI);return s*180/Math.PI}function Ue(i){var s=i%360;return s*Math.PI/180}function sa(i){return!isNaN(i)&&i!==null&&!Array.isArray(i)}function qn(i){var s,o,h={type:"FeatureCollection",features:[]};if(i.type==="Feature"?o=i.geometry:o=i,o.type==="LineString")s=[o.coordinates];else if(o.type==="MultiLineString")s=o.coordinates;else if(o.type==="MultiPolygon")s=[].concat.apply([],o.coordinates);else if(o.type==="Polygon")s=o.coordinates;else throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return s.forEach(function(d){s.forEach(function(m){for(var y=0;y<d.length-1;y++)for(var v=y;v<m.length-1;v++)if(!(d===m&&(Math.abs(y-v)===1||y===0&&v===d.length-2&&d[y][0]===d[d.length-1][0]&&d[y][1]===d[d.length-1][1]))){var w=aa(d[y][0],d[y][1],d[y+1][0],d[y+1][1],m[v][0],m[v][1],m[v+1][0],m[v+1][1]);w&&h.features.push(Bi([w[0],w[1]]))}})}),h}function aa(i,s,o,h,d,m,y,v){var w,P,N,F,tt,it={x:null,y:null,onLine1:!1,onLine2:!1};return w=(v-m)*(o-i)-(y-d)*(h-s),w===0?it.x!==null&&it.y!==null?it:!1:(P=s-m,N=i-d,F=(y-d)*P-(v-m)*N,tt=(o-i)*P-(h-s)*N,P=F/w,N=tt/w,it.x=i+P*(o-i),it.y=s+P*(h-s),P>=0&&P<=1&&(it.onLine1=!0),N>=0&&N<=1&&(it.onLine2=!0),it.onLine1&&it.onLine2?[it.x,it.y]:!1)}de.Line=de.extend({initialize(i){this._map=i,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Bt("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&this.options.finishOn!=="snap"&&this._map.on(this.options.finishOn,this._finishShape,this),this.options.finishOn==="dblclick"&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&this.options.finishOn!=="snap"&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_syncHintLine(){let i=this._layer.getLatLngs();if(i.length>0){let s=i[i.length-1];this._hintline.setLatLngs([s,this._hintMarker.getLatLng()])}},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let s=this._layer._defaultShape().slice();s.push(this._hintMarker.getLatLng()),this._change(s)},hasSelfIntersection(){return qn(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(i,s){let o=L.polyline(this._layer.getLatLngs());i&&(s||(s=this._hintMarker.getLatLng()),o.addLatLng(s));let h=qn(o.toGeoJSON(15));this._doesSelfIntersect=h.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(h,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(i){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,i.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=this._layer.getLatLngs(),h=o[o.length-1];if(s.equals(o[0])||o.length>0&&s.equals(h)){this._finishShape();return}this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:s,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(s);let d=this._createMarker(s);this._setTooltipText(),this._setHintLineAfterNewVertex(s),this._fireVertexAdded(d,void 0,s,"Draw"),this._change(this._layer.getLatLngs()),this.options.finishOn==="snap"&&this._hintMarker._snapped&&this._finishShape(i)},_setHintLineAfterNewVertex(i){this._hintline.setLatLngs([i,i])},_removeLastVertex(){let i=this._markers;if(i.length<=1){this.disable();return}let s=this._layer.getLatLngs(),o=i[i.length-1],{indexPath:h}=L.PM.Utils.findDeepMarkerIndex(i,o);i.pop(),this._layerGroup.removeLayer(o);let d=i[i.length-1],m=s.indexOf(d.getLatLng());s=s.slice(0,m+1),this._layer.setLatLngs(s),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(o,h,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=1)return;let s=L.polyline(i,this.options.pathOptions);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),this._fireCreate(s),this.options.snappable&&this._cleanupSnapping();let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_createMarker(i){let s=new L.Marker(i,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this._layerGroup.addLayer(s),this._markers.push(s),s.on("click",this._finishShape,this),s},_setTooltipText(){let{length:i}=this._layer.getLatLngs().flat(),s="";i<=1?s=Bt("tooltips.continueLine"):s=Bt("tooltips.finishLine"),this._hintMarker.setTooltipContent(s)},_change(i){this._fireChange(i,"Draw")},setStyle(){var i,s;(i=this._layer)==null||i.setStyle(this.options.templineStyle),(s=this._hintline)==null||s.setStyle(this.options.hintlineStyle)}}),de.Polygon=de.Line.extend({initialize(i){this._map=i,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(i){L.PM.Draw.Line.prototype.enable.call(this,i),this._layer.pm._shape="Polygon"},_createMarker(i){let s=new L.Marker(i,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this._layerGroup.addLayer(s),this._markers.push(s),this._layer.getLatLngs().flat().length===1?(s.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(s)-1,this.options.snappable&&this._cleanupSnapping()):s.on("click",()=>1),s},_setTooltipText(){let{length:i}=this._layer.getLatLngs().flat(),s="";i<=2?s=Bt("tooltips.continueLine"):s=Bt("tooltips.finishPoly"),this._hintMarker.setTooltipContent(s)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=2)return;let s=L.polygon(i,this.options.pathOptions);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),this._fireCreate(s),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))}}),de.Rectangle=de.extend({initialize(i){this._map=i,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(i){if(L.Util.setOptions(this,i),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:this.options.cursorMarker?1:0}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Bt("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let s=0;s<2;s+=1){let o=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(o,"vertexPane"),o._pmTempLayer=!0,this._layerGroup.addLayer(o),this._styleMarkers.push(o)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_placeStartingMarkers(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(s),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(o=>{L.DomUtil.addClass(o._icon,"visible"),o.setLatLng(s)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(Bt("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let i=this._startMarker.getLatLng();i&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([i,i]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}let s=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(s,"Draw")},_syncRectangleSize(){let i=fr(this._startMarker.getLatLng(),this._map),s=fr(this._hintMarker.getLatLng(),this._map),o=L.PM.Utils._getRotatedRectangle(i,s,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(o),this.options.cursorMarker&&this._styleMarkers){let h=[];o.forEach(d=>{!d.equals(i,1e-8)&&!d.equals(s,1e-8)&&h.push(d)}),h.forEach((d,m)=>{try{this._styleMarkers[m].setLatLng(d)}catch{}})}},_findCorners(){let i=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(i[0],i[2],this.options.rectangleAngle||0,this._map)},_finishShape(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||o.equals(s))return;let h=L.rectangle([o,s],this.options.pathOptions);if(this.options.rectangleAngle){let m=L.PM.Utils._getRotatedRectangle(o,s,this.options.rectangleAngle||0,this._map);h.setLatLngs(m),h.pm&&h.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(h,"layerPane"),this._finishLayer(h),h.addTo(this._map.pm._getContainingLayer()),this._fireCreate(h);let d=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(d))},setStyle(){var i;(i=this._layer)==null||i.setStyle(this.options.pathOptions)}}),de.CircleMarker=de.extend({initialize(i){this._map=i,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(i){if(L.Util.setOptions(this,i),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let s={};L.extend(s,this.options.templineStyle),s.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),s),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Bt("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(Bt("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(i=>{this.isRelevantMarker(i)&&i.pm.disable()})},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_placeCenterMarker(i){this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let s=this._hintMarker.getLatLng();this._centerMarker.setLatLng(s),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let i=this._centerMarker.getLatLng();i&&(this._layer.setLatLng(i),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(Bt("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let i=this._centerMarker.getLatLng(),s=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([i,s])},_syncCircleRadius(){let i=this._centerMarker.getLatLng(),s=this._hintMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(o)},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let o=i;o.target=this._hintMarker,this._handleSnapping(o)}this._handleHintMarkerSnapping();let s=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(s,"Draw")},isRelevantMarker(i){return i instanceof L.CircleMarker&&!(i instanceof L.Circle)&&i.pm&&!i._pmTempLayer},_createMarker(i){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!i.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng(),o=new this._BaseCircleClass(s,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(o,"layerPane"),this._finishLayer(o),o.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(o),this._fireCreate(o),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(i){i.pm&&this.options.markerEditable&&i.pm.enable()},_finishShape(i){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._centerMarker.getLatLng(),o=this._defaultRadius;if(this.options[this._editableOption]){let y=this._hintMarker.getLatLng();o=this._distanceCalculation(s,y),this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?o=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(o=this.options[this._maxRadiusOption])}let h={...this.options.pathOptions,radius:o},d=new this._BaseCircleClass(s,h);this._setPane(d,"layerPane"),this._finishLayer(d),d.addTo(this._map.pm._getContainingLayer()),d.pm&&d.pm._updateHiddenPolyCircle(),this._fireCreate(d);let m=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(m))},_getNewDestinationOfHintMarker(){let i=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return i;let s=this._centerMarker.getLatLng(),o=this._distanceCalculation(s,i);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?i=jn(this._map,s,i,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(i=jn(this._map,s,i,this._getMaxDistanceInMeter()))}return i},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let i=this._centerMarker.getLatLng(),s=this._hintMarker.getLatLng(),o=this._distanceCalculation(i,s);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._hintMarker.setLatLng(this._hintMarker._orgLatLng):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){var s,o;let i={};L.extend(i,this.options.templineStyle),this.options[this._editableOption]&&(i.radius=0),(s=this._layer)==null||s.setStyle(i),(o=this._hintline)==null||o.setStyle(this.options.hintlineStyle)},_distanceCalculation(i,s){return this._map.project(i).distanceTo(this._map.project(s))}}),de.Circle=de.CircleMarker.extend({initialize(i){this._map=i,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(i,s){return this._map.distance(i,s)}});function Ze(i){if(!i)throw new Error("coord is required");if(!Array.isArray(i)){if(i.type==="Feature"&&i.geometry!==null&&i.geometry.type==="Point")return i.geometry.coordinates;if(i.type==="Point")return i.coordinates}if(Array.isArray(i)&&i.length>=2&&!Array.isArray(i[0])&&!Array.isArray(i[1]))return i;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ke(i){if(Array.isArray(i))return i;if(i.type==="Feature"){if(i.geometry!==null)return i.geometry.coordinates}else if(i.coordinates)return i.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Hn(i){return i.type==="Feature"?i.geometry:i}function ra(i,s){return i.type==="FeatureCollection"?"FeatureCollection":i.type==="GeometryCollection"?"GeometryCollection":i.type==="Feature"&&i.geometry!==null?i.geometry.type:i.type}function oa(i,s,o){if(i!==null)for(var h,d,m,y,v,w,P,N=0,F=0,tt,it=i.type,lt=it==="FeatureCollection",ft=it==="Feature",vt=lt?i.features.length:1,Ft=0;Ft<vt;Ft++){P=lt?i.features[Ft].geometry:ft?i.geometry:i,tt=P?P.type==="GeometryCollection":!1,v=tt?P.geometries.length:1;for(var z=0;z<v;z++){var q=0,W=0;if(y=tt?P.geometries[z]:P,y!==null){w=y.coordinates;var nt=y.type;switch(N=0,nt){case null:break;case"Point":if(s(w,F,Ft,q,W)===!1)return!1;F++,q++;break;case"LineString":case"MultiPoint":for(h=0;h<w.length;h++){if(s(w[h],F,Ft,q,W)===!1)return!1;F++,nt==="MultiPoint"&&q++}nt==="LineString"&&q++;break;case"Polygon":case"MultiLineString":for(h=0;h<w.length;h++){for(d=0;d<w[h].length-N;d++){if(s(w[h][d],F,Ft,q,W)===!1)return!1;F++}nt==="MultiLineString"&&q++,nt==="Polygon"&&W++}nt==="Polygon"&&q++;break;case"MultiPolygon":for(h=0;h<w.length;h++){for(W=0,d=0;d<w[h].length;d++){for(m=0;m<w[h][d].length-N;m++){if(s(w[h][d][m],F,Ft,q,W)===!1)return!1;F++}W++}q++}break;case"GeometryCollection":for(h=0;h<y.geometries.length;h++)if(oa(y.geometries[h],s)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Ae(i,s){if(i.type==="Feature")s(i,0);else if(i.type==="FeatureCollection")for(var o=0;o<i.features.length&&s(i.features[o],o)!==!1;o++);}function qi(i,s,o){var h=o;return Ae(i,function(d,m){m===0&&o===void 0?h=d:h=s(h,d,m)}),h}function Ko(i,s){var o,h,d,m,y,v,w,P,N,F,tt=0,it=i.type==="FeatureCollection",lt=i.type==="Feature",ft=it?i.features.length:1;for(o=0;o<ft;o++){for(v=it?i.features[o].geometry:lt?i.geometry:i,P=it?i.features[o].properties:lt?i.properties:{},N=it?i.features[o].bbox:lt?i.bbox:void 0,F=it?i.features[o].id:lt?i.id:void 0,w=v?v.type==="GeometryCollection":!1,y=w?v.geometries.length:1,d=0;d<y;d++){if(m=w?v.geometries[d]:v,m===null){if(s(null,tt,P,N,F)===!1)return!1;continue}switch(m.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(s(m,tt,P,N,F)===!1)return!1;break}case"GeometryCollection":{for(h=0;h<m.geometries.length;h++)if(s(m.geometries[h],tt,P,N,F)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}tt++}}function qe(i,s){Ko(i,function(o,h,d,m,y){var v=o===null?null:o.type;switch(v){case null:case"Point":case"LineString":case"Polygon":return s(ki(o,d,{bbox:m,id:y}),h,0)===!1?!1:void 0}var w;switch(v){case"MultiPoint":w="Point";break;case"MultiLineString":w="LineString";break;case"MultiPolygon":w="Polygon";break}for(var P=0;P<o.coordinates.length;P++){var N=o.coordinates[P],F={type:w,coordinates:N};if(s(ki(F,d),h,P)===!1)return!1}})}function Xo(i){if(!i)throw new Error("geojson is required");var s=[];return qe(i,function(o){Hi(o,s)}),Ee(s)}function Hi(i,s){var o=[],h=i.geometry;if(h!==null){switch(h.type){case"Polygon":o=Ke(h);break;case"LineString":o=[Ke(h)]}o.forEach(function(d){var m=Yo(d,i.properties);m.forEach(function(y){y.id=s.length,s.push(y)})})}}function Yo(i,s){var o=[];return i.reduce(function(h,d){var m=gi([h,d],s);return m.bbox=dn(h,d),o.push(m),d}),o}function dn(i,s){var o=i[0],h=i[1],d=s[0],m=s[1],y=o<d?o:d,v=h<m?h:m,w=o>d?o:d,P=h>m?h:m;return[y,v,w,P]}var Vn=Xo,$n=A(Li(),1);function Jo(i,s){var o={},h=[];if(i.type==="LineString"&&(i=ki(i)),s.type==="LineString"&&(s=ki(s)),i.type==="Feature"&&s.type==="Feature"&&i.geometry!==null&&s.geometry!==null&&i.geometry.type==="LineString"&&s.geometry.type==="LineString"&&i.geometry.coordinates.length===2&&s.geometry.coordinates.length===2){var d=ai(i,s);return d&&h.push(d),Ee(h)}var m=(0,$n.default)();return m.load(Vn(s)),Ae(Vn(i),function(y){Ae(m.search(y),function(v){var w=ai(y,v);if(w){var P=Ke(w).join(",");o[P]||(o[P]=!0,h.push(w))}})}),Ee(h)}function ai(i,s){var o=Ke(i),h=Ke(s);if(o.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(h.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var d=o[0][0],m=o[0][1],y=o[1][0],v=o[1][1],w=h[0][0],P=h[0][1],N=h[1][0],F=h[1][1],tt=(F-P)*(y-d)-(N-w)*(v-m),it=(N-w)*(m-P)-(F-P)*(d-w),lt=(y-d)*(m-P)-(v-m)*(d-w);if(tt===0)return null;var ft=it/tt,vt=lt/tt;if(ft>=0&&ft<=1&&vt>=0&&vt<=1){var Ft=d+ft*(y-d),z=m+ft*(v-m);return Bi([Ft,z])}return null}var Xe=Jo,vr=A(Li(),1);function ha(i,s,o){o===void 0&&(o={});var h=Ze(i),d=Ze(s),m=Ue(d[1]-h[1]),y=Ue(d[0]-h[0]),v=Ue(h[1]),w=Ue(d[1]),P=Math.pow(Math.sin(m/2),2)+Math.pow(Math.sin(y/2),2)*Math.cos(v)*Math.cos(w);return Wo(2*Math.atan2(Math.sqrt(P),Math.sqrt(1-P)),o.units)}var Si=ha;function ri(i){var s=i[0],o=i[1],h=i[2],d=i[3],m=Si(i.slice(0,2),[h,o]),y=Si(i.slice(0,2),[s,d]);if(m>=y){var v=(o+d)/2;return[s,v-(h-s)/2,h,v+(h-s)/2]}else{var w=(s+h)/2;return[w-(d-o)/2,o,w+(d-o)/2,d]}}var Qo=ri;function yi(i){var s=[1/0,1/0,-1/0,-1/0];return oa(i,function(o){s[0]>o[0]&&(s[0]=o[0]),s[1]>o[1]&&(s[1]=o[1]),s[2]<o[0]&&(s[2]=o[0]),s[3]<o[1]&&(s[3]=o[1])}),s}yi.default=yi;var fn=yi;function oi(i,s){s===void 0&&(s={});var o=s.precision,h=s.coordinates,d=s.mutate;if(o=o==null||isNaN(o)?6:o,h=h==null||isNaN(h)?3:h,!i)throw new Error("<geojson> is required");if(typeof o!="number")throw new Error("<precision> must be a number");if(typeof h!="number")throw new Error("<coordinates> must be a number");(d===!1||d===void 0)&&(i=JSON.parse(JSON.stringify(i)));var m=Math.pow(10,o);return oa(i,function(y){Wn(y,m,h)}),i}function Wn(i,s,o){i.length>o&&i.splice(o,i.length);for(var h=0;h<i.length;h++)i[h]=Math.round(i[h]*s)/s;return i}var Ar=oi;function Kn(i,s,o){if(o===void 0&&(o={}),o.final===!0)return Xn(i,s);var h=Ze(i),d=Ze(s),m=Ue(h[0]),y=Ue(d[0]),v=Ue(h[1]),w=Ue(d[1]),P=Math.sin(y-m)*Math.cos(w),N=Math.cos(v)*Math.sin(w)-Math.sin(v)*Math.cos(w)*Math.cos(y-m);return Pe(Math.atan2(P,N))}function Xn(i,s){var o=Kn(s,i);return o=(o+180)%360,o}function Yn(i,s,o,h){h===void 0&&(h={});var d=Ze(i),m=Ue(d[0]),y=Ue(d[1]),v=Ue(o),w=cn(s,h.units),P=Math.asin(Math.sin(y)*Math.cos(w)+Math.cos(y)*Math.sin(w)*Math.cos(v)),N=m+Math.atan2(Math.sin(v)*Math.sin(w)*Math.cos(y),Math.cos(w)-Math.sin(y)*Math.sin(P)),F=Pe(N),tt=Pe(P);return Bi([F,tt],h.properties)}function Jn(i,s,o){o===void 0&&(o={});var h=Bi([1/0,1/0],{dist:1/0}),d=0;return qe(i,function(m){for(var y=Ke(m),v=0;v<y.length-1;v++){var w=Bi(y[v]);w.properties.dist=Si(s,w,o);var P=Bi(y[v+1]);P.properties.dist=Si(s,P,o);var N=Si(w,P,o),F=Math.max(w.properties.dist,P.properties.dist),tt=Kn(w,P),it=Yn(s,F,tt+90,o),lt=Yn(s,F,tt-90,o),ft=Xe(gi([it.geometry.coordinates,lt.geometry.coordinates]),gi([w.geometry.coordinates,P.geometry.coordinates])),vt=null;ft.features.length>0&&(vt=ft.features[0],vt.properties.dist=Si(s,vt,o),vt.properties.location=d+Si(w,vt,o)),w.properties.dist<h.properties.dist&&(h=w,h.properties.index=v,h.properties.location=d),P.properties.dist<h.properties.dist&&(h=P,h.properties.index=v+1,h.properties.location=d+N),vt&&vt.properties.dist<h.properties.dist&&(h=vt,h.properties.index=v),d+=N}}),h}var Vi=Jn;function Qn(i,s){if(!i)throw new Error("line is required");if(!s)throw new Error("splitter is required");var o=ra(i),h=ra(s);if(o!=="LineString")throw new Error("line must be LineString");if(h==="FeatureCollection")throw new Error("splitter cannot be a FeatureCollection");if(h==="GeometryCollection")throw new Error("splitter cannot be a GeometryCollection");var d=Ar(s,{precision:7});switch(h){case"Point":return es(i,d);case"MultiPoint":return ts(i,d);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return ts(i,Xe(i,d))}}function ts(i,s){var o=[],h=(0,vr.default)();return qe(s,function(d){if(o.forEach(function(v,w){v.id=w}),!o.length)o=es(i,d).features,o.forEach(function(v){v.bbox||(v.bbox=Qo(fn(v)))}),h.load(Ee(o));else{var m=h.search(d);if(m.features.length){var y=Mr(d,m);o=o.filter(function(v){return v.id!==y.id}),h.remove(y),Ae(es(y,d),function(v){o.push(v),h.insert(v)})}}}),Ee(o)}function es(i,s){var o=[],h=Ke(i)[0],d=Ke(i)[i.geometry.coordinates.length-1];if($i(h,Ze(s))||$i(d,Ze(s)))return Ee([i]);var m=(0,vr.default)(),y=Vn(i);m.load(y);var v=m.search(s);if(!v.features.length)return Ee([i]);var w=Mr(s,v),P=[h],N=qi(y,function(F,tt,it){var lt=Ke(tt)[1],ft=Ze(s);return it===w.id?(F.push(ft),o.push(gi(F)),$i(ft,lt)?[ft]:[ft,lt]):(F.push(lt),F)},P);return N.length>1&&o.push(gi(N)),Ee(o)}function Mr(i,s){if(!s.features.length)throw new Error("lines must contain features");if(s.features.length===1)return s.features[0];var o,h=1/0;return Ae(s,function(d){var m=Vi(d,i),y=m.properties.dist;y<h&&(o=d,h=y)}),o}function $i(i,s){return i[0]===s[0]&&i[1]===s[1]}var th=Qn;function pn(i,s,o){if(o===void 0&&(o={}),!i)throw new Error("point is required");if(!s)throw new Error("polygon is required");var h=Ze(i),d=Hn(s),m=d.type,y=s.bbox,v=d.coordinates;if(y&&Lr(h,y)===!1)return!1;m==="Polygon"&&(v=[v]);for(var w=!1,P=0;P<v.length&&!w;P++)if(xr(h,v[P][0],o.ignoreBoundary)){for(var N=!1,F=1;F<v[P].length&&!N;)xr(h,v[P][F],!o.ignoreBoundary)&&(N=!0),F++;N||(w=!0)}return w}function xr(i,s,o){var h=!1;s[0][0]===s[s.length-1][0]&&s[0][1]===s[s.length-1][1]&&(s=s.slice(0,s.length-1));for(var d=0,m=s.length-1;d<s.length;m=d++){var y=s[d][0],v=s[d][1],w=s[m][0],P=s[m][1],N=i[1]*(y-w)+v*(w-i[0])+P*(i[0]-y)===0&&(y-i[0])*(w-i[0])<=0&&(v-i[1])*(P-i[1])<=0;if(N)return!o;var F=v>i[1]!=P>i[1]&&i[0]<(w-y)*(i[1]-v)/(P-v)+y;F&&(h=!h)}return h}function Lr(i,s){return s[0]<=i[0]&&s[1]<=i[1]&&s[2]>=i[0]&&s[3]>=i[1]}function eh(i,s,o){o===void 0&&(o={});for(var h=Ze(i),d=Ke(s),m=0;m<d.length-1;m++){var y=!1;if(o.ignoreEndVertices&&(m===0&&(y="start"),m===d.length-2&&(y="end"),m===0&&m+1===d.length-1&&(y="both")),Ye(d[m],d[m+1],h,y,typeof o.epsilon>"u"?null:o.epsilon))return!0}return!1}function Ye(i,s,o,h,d){var m=o[0],y=o[1],v=i[0],w=i[1],P=s[0],N=s[1],F=o[0]-v,tt=o[1]-w,it=P-v,lt=N-w,ft=F*lt-tt*it;if(d!==null){if(Math.abs(ft)>d)return!1}else if(ft!==0)return!1;if(h){if(h==="start")return Math.abs(it)>=Math.abs(lt)?it>0?v<m&&m<=P:P<=m&&m<v:lt>0?w<y&&y<=N:N<=y&&y<w;if(h==="end")return Math.abs(it)>=Math.abs(lt)?it>0?v<=m&&m<P:P<m&&m<=v:lt>0?w<=y&&y<N:N<y&&y<=w;if(h==="both")return Math.abs(it)>=Math.abs(lt)?it>0?v<m&&m<P:P<m&&m<v:lt>0?w<y&&y<N:N<y&&y<w}else return Math.abs(it)>=Math.abs(lt)?it>0?v<=m&&m<=P:P<=m&&m<=v:lt>0?w<=y&&y<=N:N<=y&&y<=w;return!1}var vi=eh;function ih(i,s){var o=Hn(i),h=Hn(s),d=o.type,m=h.type,y=o.coordinates,v=h.coordinates;switch(d){case"Point":switch(m){case"Point":return ns(y,v);default:throw new Error("feature2 "+m+" geometry not supported")}case"MultiPoint":switch(m){case"Point":return is(o,h);case"MultiPoint":return nh(o,h);default:throw new Error("feature2 "+m+" geometry not supported")}case"LineString":switch(m){case"Point":return vi(h,o,{ignoreEndVertices:!0});case"LineString":return _n(o,h);case"MultiPoint":return br(o,h);default:throw new Error("feature2 "+m+" geometry not supported")}case"Polygon":switch(m){case"Point":return pn(h,o,{ignoreBoundary:!0});case"LineString":return ah(o,h);case"Polygon":return Wi(o,h);case"MultiPoint":return sh(o,h);default:throw new Error("feature2 "+m+" geometry not supported")}default:throw new Error("feature1 "+d+" geometry not supported")}}function is(i,s){var o,h=!1;for(o=0;o<i.coordinates.length;o++)if(ns(i.coordinates[o],s.coordinates)){h=!0;break}return h}function nh(i,s){for(var o=0,h=s.coordinates;o<h.length;o++){for(var d=h[o],m=!1,y=0,v=i.coordinates;y<v.length;y++){var w=v[y];if(ns(d,w)){m=!0;break}}if(!m)return!1}return!0}function br(i,s){for(var o=!1,h=0,d=s.coordinates;h<d.length;h++){var m=d[h];if(vi(m,i,{ignoreEndVertices:!0})&&(o=!0),!vi(m,i))return!1}return!!o}function sh(i,s){for(var o=0,h=s.coordinates;o<h.length;o++){var d=h[o];if(!pn(d,i,{ignoreBoundary:!0}))return!1}return!0}function _n(i,s){for(var o=!1,h=0,d=s.coordinates;h<d.length;h++){var m=d[h];if(vi({type:"Point",coordinates:m},i,{ignoreEndVertices:!0})&&(o=!0),!vi({type:"Point",coordinates:m},i,{ignoreEndVertices:!1}))return!1}return o}function ah(i,s){var o=!1,h=0,d=fn(i),m=fn(s);if(!la(d,m))return!1;for(h;h<s.coordinates.length-1;h++){var y=rh(s.coordinates[h],s.coordinates[h+1]);if(pn({type:"Point",coordinates:y},i,{ignoreBoundary:!0})){o=!0;break}}return o}function Wi(i,s){if(i.type==="Feature"&&i.geometry===null||s.type==="Feature"&&s.geometry===null)return!1;var o=fn(i),h=fn(s);if(!la(o,h))return!1;for(var d=Hn(s).coordinates,m=0,y=d;m<y.length;m++)for(var v=y[m],w=0,P=v;w<P.length;w++){var N=P[w];if(!pn(N,i))return!1}return!0}function la(i,s){return!(i[0]>s[0]||i[2]<s[2]||i[1]>s[1]||i[3]<s[3])}function ns(i,s){return i[0]===s[0]&&i[1]===s[1]}function rh(i,s){return[(i[0]+s[0])/2,(i[1]+s[1])/2]}var hi=A(pi()),ua=i=>()=>i,ss=i=>{let s=i?(o,h)=>h.minus(o).abs().isLessThanOrEqualTo(i):ua(!1);return(o,h)=>s(o,h)?0:o.comparedTo(h)};function mn(i){let s=i?(o,h,d,m,y)=>o.exponentiatedBy(2).isLessThanOrEqualTo(m.minus(h).exponentiatedBy(2).plus(y.minus(d).exponentiatedBy(2)).times(i)):ua(!1);return(o,h,d)=>{let m=o.x,y=o.y,v=d.x,w=d.y,P=y.minus(w).times(h.x.minus(v)).minus(m.minus(v).times(h.y.minus(w)));return s(P,m,y,v,w)?0:P.comparedTo(0)}}var oh=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Ki=Math.ceil,me=Math.floor,Me="[BigNumber Error] ",ca=Me+"Number primitive has more than 15 significant digits: ",He=1e14,kt=14,as=9007199254740991,rs=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],li=1e7,le=1e9;function wr(i){var s,o,h,d=z.prototype={constructor:z,toString:null,valueOf:null},m=new z(1),y=20,v=4,w=-7,P=21,N=-1e7,F=1e7,tt=!1,it=1,lt=0,ft={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},vt="0123456789abcdefghijklmnopqrstuvwxyz",Ft=!0;function z(E,S){var O,D,I,R,V,H,$,Q,J=this;if(!(J instanceof z))return new z(E,S);if(S==null){if(E&&E._isBigNumber===!0){J.s=E.s,!E.c||E.e>F?J.c=J.e=null:E.e<N?J.c=[J.e=0]:(J.e=E.e,J.c=E.c.slice());return}if((H=typeof E=="number")&&E*0==0){if(J.s=1/E<0?(E=-E,-1):1,E===~~E){for(R=0,V=E;V>=10;V/=10,R++);R>F?J.c=J.e=null:(J.e=R,J.c=[E]);return}Q=String(E)}else{if(!oh.test(Q=String(E)))return h(J,Q,H);J.s=Q.charCodeAt(0)==45?(Q=Q.slice(1),-1):1}(R=Q.indexOf("."))>-1&&(Q=Q.replace(".","")),(V=Q.search(/e/i))>0?(R<0&&(R=V),R+=+Q.slice(V+1),Q=Q.substring(0,V)):R<0&&(R=Q.length)}else{if(e(S,2,vt.length,"Base"),S==10&&Ft)return J=new z(E),X(J,y+J.e+1,v);if(Q=String(E),H=typeof E=="number"){if(E*0!=0)return h(J,Q,H,S);if(J.s=1/E<0?(Q=Q.slice(1),-1):1,z.DEBUG&&Q.replace(/^0\.0*|\./,"").length>15)throw Error(ca+E)}else J.s=Q.charCodeAt(0)===45?(Q=Q.slice(1),-1):1;for(O=vt.slice(0,S),R=V=0,$=Q.length;V<$;V++)if(O.indexOf(D=Q.charAt(V))<0){if(D=="."){if(V>R){R=$;continue}}else if(!I&&(Q==Q.toUpperCase()&&(Q=Q.toLowerCase())||Q==Q.toLowerCase()&&(Q=Q.toUpperCase()))){I=!0,V=-1,R=0;continue}return h(J,String(E),H,S)}H=!1,Q=o(Q,S,10,J.s),(R=Q.indexOf("."))>-1?Q=Q.replace(".",""):R=Q.length}for(V=0;Q.charCodeAt(V)===48;V++);for($=Q.length;Q.charCodeAt(--$)===48;);if(Q=Q.slice(V,++$)){if($-=V,H&&z.DEBUG&&$>15&&(E>as||E!==me(E)))throw Error(ca+J.s*E);if((R=R-V-1)>F)J.c=J.e=null;else if(R<N)J.c=[J.e=0];else{if(J.e=R,J.c=[],V=(R+1)%kt,R<0&&(V+=kt),V<$){for(V&&J.c.push(+Q.slice(0,V)),$-=kt;V<$;)J.c.push(+Q.slice(V,V+=kt));V=kt-(Q=Q.slice(V)).length}else V-=$;for(;V--;Q+="0");J.c.push(+Q)}}else J.c=[J.e=0]}z.clone=wr,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(E){var S,O;if(E!=null)if(typeof E=="object"){if(E.hasOwnProperty(S="DECIMAL_PLACES")&&(O=E[S],e(O,0,le,S),y=O),E.hasOwnProperty(S="ROUNDING_MODE")&&(O=E[S],e(O,0,8,S),v=O),E.hasOwnProperty(S="EXPONENTIAL_AT")&&(O=E[S],O&&O.pop?(e(O[0],-le,0,S),e(O[1],0,le,S),w=O[0],P=O[1]):(e(O,-le,le,S),w=-(P=O<0?-O:O))),E.hasOwnProperty(S="RANGE"))if(O=E[S],O&&O.pop)e(O[0],-le,-1,S),e(O[1],1,le,S),N=O[0],F=O[1];else if(e(O,-le,le,S),O)N=-(F=O<0?-O:O);else throw Error(Me+S+" cannot be zero: "+O);if(E.hasOwnProperty(S="CRYPTO"))if(O=E[S],O===!!O)if(O)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))tt=O;else throw tt=!O,Error(Me+"crypto unavailable");else tt=O;else throw Error(Me+S+" not true or false: "+O);if(E.hasOwnProperty(S="MODULO_MODE")&&(O=E[S],e(O,0,9,S),it=O),E.hasOwnProperty(S="POW_PRECISION")&&(O=E[S],e(O,0,le,S),lt=O),E.hasOwnProperty(S="FORMAT"))if(O=E[S],typeof O=="object")ft=O;else throw Error(Me+S+" not an object: "+O);if(E.hasOwnProperty(S="ALPHABET"))if(O=E[S],typeof O=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(O))Ft=O.slice(0,10)=="0123456789",vt=O;else throw Error(Me+S+" invalid: "+O)}else throw Error(Me+"Object expected: "+E);return{DECIMAL_PLACES:y,ROUNDING_MODE:v,EXPONENTIAL_AT:[w,P],RANGE:[N,F],CRYPTO:tt,MODULO_MODE:it,POW_PRECISION:lt,FORMAT:ft,ALPHABET:vt}},z.isBigNumber=function(E){if(!E||E._isBigNumber!==!0)return!1;if(!z.DEBUG)return!0;var S,O,D=E.c,I=E.e,R=E.s;t:if({}.toString.call(D)=="[object Array]"){if((R===1||R===-1)&&I>=-le&&I<=le&&I===me(I)){if(D[0]===0){if(I===0&&D.length===1)return!0;break t}if(S=(I+1)%kt,S<1&&(S+=kt),String(D[0]).length==S){for(S=0;S<D.length;S++)if(O=D[S],O<0||O>=He||O!==me(O))break t;if(O!==0)return!0}}}else if(D===null&&I===null&&(R===null||R===1||R===-1))return!0;throw Error(Me+"Invalid BigNumber: "+E)},z.maximum=z.max=function(){return W(arguments,-1)},z.minimum=z.min=function(){return W(arguments,1)},z.random=function(){var E=9007199254740992,S=Math.random()*E&2097151?function(){return me(Math.random()*E)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(O){var D,I,R,V,H,$=0,Q=[],J=new z(m);if(O==null?O=y:e(O,0,le),V=Ki(O/kt),tt)if(crypto.getRandomValues){for(D=crypto.getRandomValues(new Uint32Array(V*=2));$<V;)H=D[$]*131072+(D[$+1]>>>11),H>=9e15?(I=crypto.getRandomValues(new Uint32Array(2)),D[$]=I[0],D[$+1]=I[1]):(Q.push(H%1e14),$+=2);$=V/2}else if(crypto.randomBytes){for(D=crypto.randomBytes(V*=7);$<V;)H=(D[$]&31)*281474976710656+D[$+1]*1099511627776+D[$+2]*4294967296+D[$+3]*16777216+(D[$+4]<<16)+(D[$+5]<<8)+D[$+6],H>=9e15?crypto.randomBytes(7).copy(D,$):(Q.push(H%1e14),$+=7);$=V/7}else throw tt=!1,Error(Me+"crypto unavailable");if(!tt)for(;$<V;)H=S(),H<9e15&&(Q[$++]=H%1e14);for(V=Q[--$],O%=kt,V&&O&&(H=rs[kt-O],Q[$]=me(V/H)*H);Q[$]===0;Q.pop(),$--);if($<0)Q=[R=0];else{for(R=-1;Q[0]===0;Q.splice(0,1),R-=kt);for($=1,H=Q[0];H>=10;H/=10,$++);$<kt&&(R-=kt-$)}return J.e=R,J.c=Q,J}}(),z.sum=function(){for(var E=1,S=arguments,O=new z(S[0]);E<S.length;)O=O.plus(S[E++]);return O},o=function(){var E="0123456789";function S(O,D,I,R){for(var V,H=[0],$,Q=0,J=O.length;Q<J;){for($=H.length;$--;H[$]*=D);for(H[0]+=R.indexOf(O.charAt(Q++)),V=0;V<H.length;V++)H[V]>I-1&&(H[V+1]==null&&(H[V+1]=0),H[V+1]+=H[V]/I|0,H[V]%=I)}return H.reverse()}return function(O,D,I,R,V){var H,$,Q,J,ot,gt,At,bt,Vt=O.indexOf("."),Kt=y,Ut=v;for(Vt>=0&&(J=lt,lt=0,O=O.replace(".",""),bt=new z(D),gt=bt.pow(O.length-Vt),lt=J,bt.c=S(_(Ie(gt.c),gt.e,"0"),10,I,E),bt.e=bt.c.length),At=S(O,D,I,V?(H=vt,E):(H=E,vt)),Q=J=At.length;At[--J]==0;At.pop());if(!At[0])return H.charAt(0);if(Vt<0?--Q:(gt.c=At,gt.e=Q,gt.s=R,gt=s(gt,bt,Kt,Ut,I),At=gt.c,ot=gt.r,Q=gt.e),$=Q+Kt+1,Vt=At[$],J=I/2,ot=ot||$<0||At[$+1]!=null,ot=Ut<4?(Vt!=null||ot)&&(Ut==0||Ut==(gt.s<0?3:2)):Vt>J||Vt==J&&(Ut==4||ot||Ut==6&&At[$-1]&1||Ut==(gt.s<0?8:7)),$<1||!At[0])O=ot?_(H.charAt(1),-Kt,H.charAt(0)):H.charAt(0);else{if(At.length=$,ot)for(--I;++At[--$]>I;)At[$]=0,$||(++Q,At=[1].concat(At));for(J=At.length;!At[--J];);for(Vt=0,O="";Vt<=J;O+=H.charAt(At[Vt++]));O=_(O,Q,H.charAt(0))}return O}}(),s=function(){function E(D,I,R){var V,H,$,Q,J=0,ot=D.length,gt=I%li,At=I/li|0;for(D=D.slice();ot--;)$=D[ot]%li,Q=D[ot]/li|0,V=At*$+Q*gt,H=gt*$+V%li*li+J,J=(H/R|0)+(V/li|0)+At*Q,D[ot]=H%R;return J&&(D=[J].concat(D)),D}function S(D,I,R,V){var H,$;if(R!=V)$=R>V?1:-1;else for(H=$=0;H<R;H++)if(D[H]!=I[H]){$=D[H]>I[H]?1:-1;break}return $}function O(D,I,R,V){for(var H=0;R--;)D[R]-=H,H=D[R]<I[R]?1:0,D[R]=H*V+D[R]-I[R];for(;!D[0]&&D.length>1;D.splice(0,1));}return function(D,I,R,V,H){var $,Q,J,ot,gt,At,bt,Vt,Kt,Ut,Xt,Be,Tr,fh,ph,Ai,_a,ti=D.s==I.s?1:-1,Re=D.c,oe=I.c;if(!Re||!Re[0]||!oe||!oe[0])return new z(!D.s||!I.s||(Re?oe&&Re[0]==oe[0]:!oe)?NaN:Re&&Re[0]==0||!oe?ti*0:ti/0);for(Vt=new z(ti),Kt=Vt.c=[],Q=D.e-I.e,ti=R+Q+1,H||(H=He,Q=Oe(D.e/kt)-Oe(I.e/kt),ti=ti/kt|0),J=0;oe[J]==(Re[J]||0);J++);if(oe[J]>(Re[J]||0)&&Q--,ti<0)Kt.push(1),ot=!0;else{for(fh=Re.length,Ai=oe.length,J=0,ti+=2,gt=me(H/(oe[0]+1)),gt>1&&(oe=E(oe,gt,H),Re=E(Re,gt,H),Ai=oe.length,fh=Re.length),Tr=Ai,Ut=Re.slice(0,Ai),Xt=Ut.length;Xt<Ai;Ut[Xt++]=0);_a=oe.slice(),_a=[0].concat(_a),ph=oe[0],oe[1]>=H/2&&ph++;do{if(gt=0,$=S(oe,Ut,Ai,Xt),$<0){if(Be=Ut[0],Ai!=Xt&&(Be=Be*H+(Ut[1]||0)),gt=me(Be/ph),gt>1)for(gt>=H&&(gt=H-1),At=E(oe,gt,H),bt=At.length,Xt=Ut.length;S(At,Ut,bt,Xt)==1;)gt--,O(At,Ai<bt?_a:oe,bt,H),bt=At.length,$=1;else gt==0&&($=gt=1),At=oe.slice(),bt=At.length;if(bt<Xt&&(At=[0].concat(At)),O(Ut,At,Xt,H),Xt=Ut.length,$==-1)for(;S(oe,Ut,Ai,Xt)<1;)gt++,O(Ut,Ai<Xt?_a:oe,Xt,H),Xt=Ut.length}else $===0&&(gt++,Ut=[0]);Kt[J++]=gt,Ut[0]?Ut[Xt++]=Re[Tr]||0:(Ut=[Re[Tr]],Xt=1)}while((Tr++<fh||Ut[0]!=null)&&ti--);ot=Ut[0]!=null,Kt[0]||Kt.splice(0,1)}if(H==He){for(J=1,ti=Kt[0];ti>=10;ti/=10,J++);X(Vt,R+(Vt.e=J+Q*kt-1)+1,V,ot)}else Vt.e=Q,Vt.r=+ot;return Vt}}();function q(E,S,O,D){var I,R,V,H,$;if(O==null?O=v:e(O,0,8),!E.c)return E.toString();if(I=E.c[0],V=E.e,S==null)$=Ie(E.c),$=D==1||D==2&&(V<=w||V>=P)?u($,V):_($,V,"0");else if(E=X(new z(E),S,O),R=E.e,$=Ie(E.c),H=$.length,D==1||D==2&&(S<=R||R<=w)){for(;H<S;$+="0",H++);$=u($,R)}else if(S-=V,$=_($,R,"0"),R+1>H){if(--S>0)for($+=".";S--;$+="0");}else if(S+=R-H,S>0)for(R+1==H&&($+=".");S--;$+="0");return E.s<0&&I?"-"+$:$}function W(E,S){for(var O,D,I=1,R=new z(E[0]);I<E.length;I++)D=new z(E[I]),(!D.s||(O=Ti(R,D))===S||O===0&&R.s===S)&&(R=D);return R}function nt(E,S,O){for(var D=1,I=S.length;!S[--I];S.pop());for(I=S[0];I>=10;I/=10,D++);return(O=D+O*kt-1)>F?E.c=E.e=null:O<N?E.c=[E.e=0]:(E.e=O,E.c=S),E}h=function(){var E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,O=/^\.([^.]+)$/,D=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(R,V,H,$){var Q,J=H?V:V.replace(I,"");if(D.test(J))R.s=isNaN(J)?null:J<0?-1:1;else{if(!H&&(J=J.replace(E,function(ot,gt,At){return Q=(At=At.toLowerCase())=="x"?16:At=="b"?2:8,!$||$==Q?gt:ot}),$&&(Q=$,J=J.replace(S,"$1").replace(O,"0.$1")),V!=J))return new z(J,Q);if(z.DEBUG)throw Error(Me+"Not a"+($?" base "+$:"")+" number: "+V);R.s=null}R.c=R.e=null}}();function X(E,S,O,D){var I,R,V,H,$,Q,J,ot=E.c,gt=rs;if(ot){t:{for(I=1,H=ot[0];H>=10;H/=10,I++);if(R=S-I,R<0)R+=kt,V=S,$=ot[Q=0],J=me($/gt[I-V-1]%10);else if(Q=Ki((R+1)/kt),Q>=ot.length)if(D){for(;ot.length<=Q;ot.push(0));$=J=0,I=1,R%=kt,V=R-kt+1}else break t;else{for($=H=ot[Q],I=1;H>=10;H/=10,I++);R%=kt,V=R-kt+I,J=V<0?0:me($/gt[I-V-1]%10)}if(D=D||S<0||ot[Q+1]!=null||(V<0?$:$%gt[I-V-1]),D=O<4?(J||D)&&(O==0||O==(E.s<0?3:2)):J>5||J==5&&(O==4||D||O==6&&(R>0?V>0?$/gt[I-V]:0:ot[Q-1])%10&1||O==(E.s<0?8:7)),S<1||!ot[0])return ot.length=0,D?(S-=E.e+1,ot[0]=gt[(kt-S%kt)%kt],E.e=-S||0):ot[0]=E.e=0,E;if(R==0?(ot.length=Q,H=1,Q--):(ot.length=Q+1,H=gt[kt-R],ot[Q]=V>0?me($/gt[I-V]%gt[V])*H:0),D)for(;;)if(Q==0){for(R=1,V=ot[0];V>=10;V/=10,R++);for(V=ot[0]+=H,H=1;V>=10;V/=10,H++);R!=H&&(E.e++,ot[0]==He&&(ot[0]=1));break}else{if(ot[Q]+=H,ot[Q]!=He)break;ot[Q--]=0,H=1}for(R=ot.length;ot[--R]===0;ot.pop());}E.e>F?E.c=E.e=null:E.e<N&&(E.c=[E.e=0])}return E}function et(E){var S,O=E.e;return O===null?E.toString():(S=Ie(E.c),S=O<=w||O>=P?u(S,O):_(S,O,"0"),E.s<0?"-"+S:S)}return d.absoluteValue=d.abs=function(){var E=new z(this);return E.s<0&&(E.s=1),E},d.comparedTo=function(E,S){return Ti(this,new z(E,S))},d.decimalPlaces=d.dp=function(E,S){var O,D,I,R=this;if(E!=null)return e(E,0,le),S==null?S=v:e(S,0,8),X(new z(R),E+R.e+1,S);if(!(O=R.c))return null;if(D=((I=O.length-1)-Oe(this.e/kt))*kt,I=O[I])for(;I%10==0;I/=10,D--);return D<0&&(D=0),D},d.dividedBy=d.div=function(E,S){return s(this,new z(E,S),y,v)},d.dividedToIntegerBy=d.idiv=function(E,S){return s(this,new z(E,S),0,1)},d.exponentiatedBy=d.pow=function(E,S){var O,D,I,R,V,H,$,Q,J,ot=this;if(E=new z(E),E.c&&!E.isInteger())throw Error(Me+"Exponent not an integer: "+et(E));if(S!=null&&(S=new z(S)),H=E.e>14,!ot.c||!ot.c[0]||ot.c[0]==1&&!ot.e&&ot.c.length==1||!E.c||!E.c[0])return J=new z(Math.pow(+et(ot),H?E.s*(2-r(E)):+et(E))),S?J.mod(S):J;if($=E.s<0,S){if(S.c?!S.c[0]:!S.s)return new z(NaN);D=!$&&ot.isInteger()&&S.isInteger(),D&&(ot=ot.mod(S))}else{if(E.e>9&&(ot.e>0||ot.e<-1||(ot.e==0?ot.c[0]>1||H&&ot.c[1]>=24e7:ot.c[0]<8e13||H&&ot.c[0]<=9999975e7)))return R=ot.s<0&&r(E)?-0:0,ot.e>-1&&(R=1/R),new z($?1/R:R);lt&&(R=Ki(lt/kt+2))}for(H?(O=new z(.5),$&&(E.s=1),Q=r(E)):(I=Math.abs(+et(E)),Q=I%2),J=new z(m);;){if(Q){if(J=J.times(ot),!J.c)break;R?J.c.length>R&&(J.c.length=R):D&&(J=J.mod(S))}if(I){if(I=me(I/2),I===0)break;Q=I%2}else if(E=E.times(O),X(E,E.e+1,1),E.e>14)Q=r(E);else{if(I=+et(E),I===0)break;Q=I%2}ot=ot.times(ot),R?ot.c&&ot.c.length>R&&(ot.c.length=R):D&&(ot=ot.mod(S))}return D?J:($&&(J=m.div(J)),S?J.mod(S):R?X(J,lt,v,V):J)},d.integerValue=function(E){var S=new z(this);return E==null?E=v:e(E,0,8),X(S,S.e+1,E)},d.isEqualTo=d.eq=function(E,S){return Ti(this,new z(E,S))===0},d.isFinite=function(){return!!this.c},d.isGreaterThan=d.gt=function(E,S){return Ti(this,new z(E,S))>0},d.isGreaterThanOrEqualTo=d.gte=function(E,S){return(S=Ti(this,new z(E,S)))===1||S===0},d.isInteger=function(){return!!this.c&&Oe(this.e/kt)>this.c.length-2},d.isLessThan=d.lt=function(E,S){return Ti(this,new z(E,S))<0},d.isLessThanOrEqualTo=d.lte=function(E,S){return(S=Ti(this,new z(E,S)))===-1||S===0},d.isNaN=function(){return!this.s},d.isNegative=function(){return this.s<0},d.isPositive=function(){return this.s>0},d.isZero=function(){return!!this.c&&this.c[0]==0},d.minus=function(E,S){var O,D,I,R,V=this,H=V.s;if(E=new z(E,S),S=E.s,!H||!S)return new z(NaN);if(H!=S)return E.s=-S,V.plus(E);var $=V.e/kt,Q=E.e/kt,J=V.c,ot=E.c;if(!$||!Q){if(!J||!ot)return J?(E.s=-S,E):new z(ot?V:NaN);if(!J[0]||!ot[0])return ot[0]?(E.s=-S,E):new z(J[0]?V:v==3?-0:0)}if($=Oe($),Q=Oe(Q),J=J.slice(),H=$-Q){for((R=H<0)?(H=-H,I=J):(Q=$,I=ot),I.reverse(),S=H;S--;I.push(0));I.reverse()}else for(D=(R=(H=J.length)<(S=ot.length))?H:S,H=S=0;S<D;S++)if(J[S]!=ot[S]){R=J[S]<ot[S];break}if(R&&(I=J,J=ot,ot=I,E.s=-E.s),S=(D=ot.length)-(O=J.length),S>0)for(;S--;J[O++]=0);for(S=He-1;D>H;){if(J[--D]<ot[D]){for(O=D;O&&!J[--O];J[O]=S);--J[O],J[D]+=He}J[D]-=ot[D]}for(;J[0]==0;J.splice(0,1),--Q);return J[0]?nt(E,J,Q):(E.s=v==3?-1:1,E.c=[E.e=0],E)},d.modulo=d.mod=function(E,S){var O,D,I=this;return E=new z(E,S),!I.c||!E.s||E.c&&!E.c[0]?new z(NaN):!E.c||I.c&&!I.c[0]?new z(I):(it==9?(D=E.s,E.s=1,O=s(I,E,0,3),E.s=D,O.s*=D):O=s(I,E,0,it),E=I.minus(O.times(E)),!E.c[0]&&it==1&&(E.s=I.s),E)},d.multipliedBy=d.times=function(E,S){var O,D,I,R,V,H,$,Q,J,ot,gt,At,bt,Vt,Kt,Ut=this,Xt=Ut.c,Be=(E=new z(E,S)).c;if(!Xt||!Be||!Xt[0]||!Be[0])return!Ut.s||!E.s||Xt&&!Xt[0]&&!Be||Be&&!Be[0]&&!Xt?E.c=E.e=E.s=null:(E.s*=Ut.s,!Xt||!Be?E.c=E.e=null:(E.c=[0],E.e=0)),E;for(D=Oe(Ut.e/kt)+Oe(E.e/kt),E.s*=Ut.s,$=Xt.length,ot=Be.length,$<ot&&(bt=Xt,Xt=Be,Be=bt,I=$,$=ot,ot=I),I=$+ot,bt=[];I--;bt.push(0));for(Vt=He,Kt=li,I=ot;--I>=0;){for(O=0,gt=Be[I]%Kt,At=Be[I]/Kt|0,V=$,R=I+V;R>I;)Q=Xt[--V]%Kt,J=Xt[V]/Kt|0,H=At*Q+J*gt,Q=gt*Q+H%Kt*Kt+bt[R]+O,O=(Q/Vt|0)+(H/Kt|0)+At*J,bt[R--]=Q%Vt;bt[R]=O}return O?++D:bt.splice(0,1),nt(E,bt,D)},d.negated=function(){var E=new z(this);return E.s=-E.s||null,E},d.plus=function(E,S){var O,D=this,I=D.s;if(E=new z(E,S),S=E.s,!I||!S)return new z(NaN);if(I!=S)return E.s=-S,D.minus(E);var R=D.e/kt,V=E.e/kt,H=D.c,$=E.c;if(!R||!V){if(!H||!$)return new z(I/0);if(!H[0]||!$[0])return $[0]?E:new z(H[0]?D:I*0)}if(R=Oe(R),V=Oe(V),H=H.slice(),I=R-V){for(I>0?(V=R,O=$):(I=-I,O=H),O.reverse();I--;O.push(0));O.reverse()}for(I=H.length,S=$.length,I-S<0&&(O=$,$=H,H=O,S=I),I=0;S;)I=(H[--S]=H[S]+$[S]+I)/He|0,H[S]=He===H[S]?0:H[S]%He;return I&&(H=[I].concat(H),++V),nt(E,H,V)},d.precision=d.sd=function(E,S){var O,D,I,R=this;if(E!=null&&E!==!!E)return e(E,1,le),S==null?S=v:e(S,0,8),X(new z(R),E,S);if(!(O=R.c))return null;if(I=O.length-1,D=I*kt+1,I=O[I]){for(;I%10==0;I/=10,D--);for(I=O[0];I>=10;I/=10,D++);}return E&&R.e+1>D&&(D=R.e+1),D},d.shiftedBy=function(E){return e(E,-as,as),this.times("1e"+E)},d.squareRoot=d.sqrt=function(){var E,S,O,D,I,R=this,V=R.c,H=R.s,$=R.e,Q=y+4,J=new z("0.5");if(H!==1||!V||!V[0])return new z(!H||H<0&&(!V||V[0])?NaN:V?R:1/0);if(H=Math.sqrt(+et(R)),H==0||H==1/0?(S=Ie(V),(S.length+$)%2==0&&(S+="0"),H=Math.sqrt(+S),$=Oe(($+1)/2)-($<0||$%2),H==1/0?S="5e"+$:(S=H.toExponential(),S=S.slice(0,S.indexOf("e")+1)+$),O=new z(S)):O=new z(H+""),O.c[0]){for($=O.e,H=$+Q,H<3&&(H=0);;)if(I=O,O=J.times(I.plus(s(R,I,Q,1))),Ie(I.c).slice(0,H)===(S=Ie(O.c)).slice(0,H))if(O.e<$&&--H,S=S.slice(H-3,H+1),S=="9999"||!D&&S=="4999"){if(!D&&(X(I,I.e+y+2,0),I.times(I).eq(R))){O=I;break}Q+=4,H+=4,D=1}else{(!+S||!+S.slice(1)&&S.charAt(0)=="5")&&(X(O,O.e+y+2,1),E=!O.times(O).eq(R));break}}return X(O,O.e+y+1,v,E)},d.toExponential=function(E,S){return E!=null&&(e(E,0,le),E++),q(this,E,S,1)},d.toFixed=function(E,S){return E!=null&&(e(E,0,le),E=E+this.e+1),q(this,E,S)},d.toFormat=function(E,S,O){var D,I=this;if(O==null)E!=null&&S&&typeof S=="object"?(O=S,S=null):E&&typeof E=="object"?(O=E,E=S=null):O=ft;else if(typeof O!="object")throw Error(Me+"Argument not an object: "+O);if(D=I.toFixed(E,S),I.c){var R,V=D.split("."),H=+O.groupSize,$=+O.secondaryGroupSize,Q=O.groupSeparator||"",J=V[0],ot=V[1],gt=I.s<0,At=gt?J.slice(1):J,bt=At.length;if($&&(R=H,H=$,$=R,bt-=R),H>0&&bt>0){for(R=bt%H||H,J=At.substr(0,R);R<bt;R+=H)J+=Q+At.substr(R,H);$>0&&(J+=Q+At.slice(R)),gt&&(J="-"+J)}D=ot?J+(O.decimalSeparator||"")+(($=+O.fractionGroupSize)?ot.replace(new RegExp("\\d{"+$+"}\\B","g"),"$&"+(O.fractionGroupSeparator||"")):ot):J}return(O.prefix||"")+D+(O.suffix||"")},d.toFraction=function(E){var S,O,D,I,R,V,H,$,Q,J,ot,gt,At=this,bt=At.c;if(E!=null&&(H=new z(E),!H.isInteger()&&(H.c||H.s!==1)||H.lt(m)))throw Error(Me+"Argument "+(H.isInteger()?"out of range: ":"not an integer: ")+et(H));if(!bt)return new z(At);for(S=new z(m),Q=O=new z(m),D=$=new z(m),gt=Ie(bt),R=S.e=gt.length-At.e-1,S.c[0]=rs[(V=R%kt)<0?kt+V:V],E=!E||H.comparedTo(S)>0?R>0?S:Q:H,V=F,F=1/0,H=new z(gt),$.c[0]=0;J=s(H,S,0,1),I=O.plus(J.times(D)),I.comparedTo(E)!=1;)O=D,D=I,Q=$.plus(J.times(I=Q)),$=I,S=H.minus(J.times(I=S)),H=I;return I=s(E.minus(O),D,0,1),$=$.plus(I.times(Q)),O=O.plus(I.times(D)),$.s=Q.s=At.s,R=R*2,ot=s(Q,D,R,v).minus(At).abs().comparedTo(s($,O,R,v).minus(At).abs())<1?[Q,D]:[$,O],F=V,ot},d.toNumber=function(){return+et(this)},d.toPrecision=function(E,S){return E!=null&&e(E,1,le),q(this,E,S,2)},d.toString=function(E){var S,O=this,D=O.s,I=O.e;return I===null?D?(S="Infinity",D<0&&(S="-"+S)):S="NaN":(E==null?S=I<=w||I>=P?u(Ie(O.c),I):_(Ie(O.c),I,"0"):E===10&&Ft?(O=X(new z(O),y+I+1,v),S=_(Ie(O.c),O.e,"0")):(e(E,2,vt.length,"Base"),S=o(_(Ie(O.c),I,"0"),10,E,D,!0)),D<0&&O.c[0]&&(S="-"+S)),S},d.valueOf=d.toJSON=function(){return et(this)},d._isBigNumber=!0,d[Symbol.toStringTag]="BigNumber",d[Symbol.for("nodejs.util.inspect.custom")]=d.valueOf,i!=null&&z.set(i),z}function Oe(i){var s=i|0;return i>0||i===s?s:s-1}function Ie(i){for(var s,o,h=1,d=i.length,m=i[0]+"";h<d;){for(s=i[h++]+"",o=kt-s.length;o--;s="0"+s);m+=s}for(d=m.length;m.charCodeAt(--d)===48;);return m.slice(0,d+1||1)}function Ti(i,s){var o,h,d=i.c,m=s.c,y=i.s,v=s.s,w=i.e,P=s.e;if(!y||!v)return null;if(o=d&&!d[0],h=m&&!m[0],o||h)return o?h?0:-v:y;if(y!=v)return y;if(o=y<0,h=w==P,!d||!m)return h?0:!d^o?1:-1;if(!h)return w>P^o?1:-1;for(v=(w=d.length)<(P=m.length)?w:P,y=0;y<v;y++)if(d[y]!=m[y])return d[y]>m[y]^o?1:-1;return w==P?0:w>P^o?1:-1}function e(i,s,o,h){if(i<s||i>o||i!==me(i))throw Error(Me+(h||"Argument")+(typeof i=="number"?i<s||i>o?" out of range: ":" not an integer: ":" not a primitive number: ")+String(i))}function r(i){var s=i.c.length-1;return Oe(i.e/kt)==s&&i.c[s]%2!=0}function u(i,s){return(i.length>1?i.charAt(0)+"."+i.slice(1):i)+(s<0?"e":"e+")+s}function _(i,s,o){var h,d;if(s<0){for(d=o+".";++s;d+=o);i=d+i}else if(h=i.length,++s>h){for(d=o,s-=h;--s;d+=o);i+=d}else s<h&&(i=i.slice(0,s)+"."+i.slice(s));return i}var M=wr(),B=M,j=class{constructor(i){Lt(this,"key");Lt(this,"left",null);Lt(this,"right",null);this.key=i}},Y=class extends j{constructor(i){super(i)}},st=class{constructor(){Lt(this,"size",0);Lt(this,"modificationCount",0);Lt(this,"splayCount",0)}splay(i){let s=this.root;if(s==null)return this.compare(i,i),-1;let o=null,h=null,d=null,m=null,y=s,v=this.compare,w;for(;;)if(w=v(y.key,i),w>0){let P=y.left;if(P==null||(w=v(P.key,i),w>0&&(y.left=P.right,P.right=y,y=P,P=y.left,P==null)))break;o==null?h=y:o.left=y,o=y,y=P}else if(w<0){let P=y.right;if(P==null||(w=v(P.key,i),w<0&&(y.right=P.left,P.left=y,y=P,P=y.right,P==null)))break;d==null?m=y:d.right=y,d=y,y=P}else break;return d!=null&&(d.right=y.left,y.left=m),o!=null&&(o.left=y.right,y.right=h),this.root!==y&&(this.root=y,this.splayCount++),w}splayMin(i){let s=i,o=s.left;for(;o!=null;){let h=o;s.left=h.right,h.right=s,s=h,o=s.left}return s}splayMax(i){let s=i,o=s.right;for(;o!=null;){let h=o;s.right=h.left,h.left=s,s=h,o=s.right}return s}_delete(i){if(this.root==null||this.splay(i)!=0)return null;let s=this.root,o=s,h=s.left;if(this.size--,h==null)this.root=s.right;else{let d=s.right;s=this.splayMax(h),s.right=d,this.root=s}return this.modificationCount++,o}addNewRoot(i,s){this.size++,this.modificationCount++;let o=this.root;if(o==null){this.root=i;return}s<0?(i.left=o,i.right=o.right,o.right=null):(i.right=o,i.left=o.left,o.left=null),this.root=i}_first(){let i=this.root;return i==null?null:(this.root=this.splayMin(i),this.root)}_last(){let i=this.root;return i==null?null:(this.root=this.splayMax(i),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(i){return this.validKey(i)&&this.splay(i)==0}defaultCompare(){return(i,s)=>i<s?-1:i>s?1:0}wrap(){return{getRoot:()=>this.root,setRoot:i=>{this.root=i},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:i=>{this.splayCount=i},splay:i=>this.splay(i),has:i=>this.has(i)}}},ht=class ma extends st{constructor(o,h){super();Lt(this,"root",null);Lt(this,"compare");Lt(this,"validKey");Lt(this,Pl,"[object Set]");this.compare=o??this.defaultCompare(),this.validKey=h??(d=>d!=null&&d!=null)}delete(o){return this.validKey(o)?this._delete(o)!=null:!1}deleteAll(o){for(let h of o)this.delete(h)}forEach(o){let h=this[Symbol.iterator](),d;for(;d=h.next(),!d.done;)o(d.value,d.value,this)}add(o){let h=this.splay(o);return h!=0&&this.addNewRoot(new Y(o),h),this}addAndReturn(o){let h=this.splay(o);return h!=0&&this.addNewRoot(new Y(o),h),this.root.key}addAll(o){for(let h of o)this.add(h)}isEmpty(){return this.root==null}isNotEmpty(){return this.root!=null}single(){if(this.size==0)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(this.size==0)throw"Bad state: No element";return this._first().key}last(){if(this.size==0)throw"Bad state: No element";return this._last().key}lastBefore(o){if(o==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(o)<0)return this.root.key;let h=this.root.left;if(h==null)return null;let d=h.right;for(;d!=null;)h=d,d=h.right;return h.key}firstAfter(o){if(o==null)throw"Invalid arguments(s)";if(this.root==null)return null;if(this.splay(o)>0)return this.root.key;let h=this.root.right;if(h==null)return null;let d=h.left;for(;d!=null;)h=d,d=h.left;return h.key}retainAll(o){let h=new ma(this.compare,this.validKey),d=this.modificationCount;for(let m of o){if(d!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(m)&&this.splay(m)==0&&h.add(this.root.key)}h.size!=this.size&&(this.root=h.root,this.size=h.size,this.modificationCount++)}lookup(o){return!this.validKey(o)||this.splay(o)!=0?null:this.root.key}intersection(o){let h=new ma(this.compare,this.validKey);for(let d of this)o.has(d)&&h.add(d);return h}difference(o){let h=new ma(this.compare,this.validKey);for(let d of this)o.has(d)||h.add(d);return h}union(o){let h=this.clone();return h.addAll(o),h}clone(){let o=new ma(this.compare,this.validKey);return o.size=this.size,o.root=this.copyNode(this.root),o}copyNode(o){if(o==null)return null;function h(m,y){let v,w;do{if(v=m.left,w=m.right,v!=null){let P=new Y(v.key);y.left=P,h(v,P)}if(w!=null){let P=new Y(w.key);y.right=P,m=w,y=P}}while(w!=null)}let d=new Y(o.key);return h(o,d),d}toSet(){return this.clone()}entries(){return new Ot(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(kl=Symbol.iterator,Pl=Symbol.toStringTag,kl)](){return new wt(this.wrap())}},pt=class{constructor(i){Lt(this,"tree");Lt(this,"path",new Array);Lt(this,"modificationCount",null);Lt(this,"splayCount");this.tree=i,this.splayCount=i.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let i=this.path[this.path.length-1];return this.getValue(i)}rebuildPath(i){this.path.splice(0,this.path.length),this.tree.splay(i),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(i){for(;i!=null;)this.path.push(i),i=i.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(this.modificationCount==null){this.modificationCount=this.tree.getModificationCount();let o=this.tree.getRoot();for(;o!=null;)this.path.push(o),o=o.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let i=this.path[this.path.length-1],s=i.right;if(s!=null){for(;s!=null;)this.path.push(s),s=s.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===i;)i=this.path.pop();return this.path.length>0}},wt=class extends pt{getValue(i){return i.key}},Ot=class extends pt{getValue(i){return[i.key,i.key]}},xe=i=>i,ue=i=>{if(i){let s=new ht(ss(i)),o=new ht(ss(i)),h=(m,y)=>y.addAndReturn(m),d=m=>({x:h(m.x,s),y:h(m.y,o)});return d({x:new B(0),y:new B(0)}),d}return xe},ke=i=>({set:s=>{ee=ke(s)},reset:()=>ke(i),compare:ss(i),snap:ue(i),orient:mn(i)}),ee=ke(),Je=(i,s)=>i.ll.x.isLessThanOrEqualTo(s.x)&&s.x.isLessThanOrEqualTo(i.ur.x)&&i.ll.y.isLessThanOrEqualTo(s.y)&&s.y.isLessThanOrEqualTo(i.ur.y),da=(i,s)=>{if(s.ur.x.isLessThan(i.ll.x)||i.ur.x.isLessThan(s.ll.x)||s.ur.y.isLessThan(i.ll.y)||i.ur.y.isLessThan(s.ll.y))return null;let o=i.ll.x.isLessThan(s.ll.x)?s.ll.x:i.ll.x,h=i.ur.x.isLessThan(s.ur.x)?i.ur.x:s.ur.x,d=i.ll.y.isLessThan(s.ll.y)?s.ll.y:i.ll.y,m=i.ur.y.isLessThan(s.ur.y)?i.ur.y:s.ur.y;return{ll:{x:o,y:d},ur:{x:h,y:m}}},os=(i,s)=>i.x.times(s.y).minus(i.y.times(s.x)),Cr=(i,s)=>i.x.times(s.x).plus(i.y.times(s.y)),gn=i=>Cr(i,i).sqrt(),hh=(i,s,o)=>{let h={x:s.x.minus(i.x),y:s.y.minus(i.y)},d={x:o.x.minus(i.x),y:o.y.minus(i.y)};return os(d,h).div(gn(d)).div(gn(h))},Er=(i,s,o)=>{let h={x:s.x.minus(i.x),y:s.y.minus(i.y)},d={x:o.x.minus(i.x),y:o.y.minus(i.y)};return Cr(d,h).div(gn(d)).div(gn(h))},se=(i,s,o)=>s.y.isZero()?null:{x:i.x.plus(s.x.div(s.y).times(o.minus(i.y))),y:o},yn=(i,s,o)=>s.x.isZero()?null:{x:o,y:i.y.plus(s.y.div(s.x).times(o.minus(i.x)))},lh=(i,s,o,h)=>{if(s.x.isZero())return yn(o,h,i.x);if(h.x.isZero())return yn(i,s,o.x);if(s.y.isZero())return se(o,h,i.y);if(h.y.isZero())return se(i,s,o.y);let d=os(s,h);if(d.isZero())return null;let m={x:o.x.minus(i.x),y:o.y.minus(i.y)},y=os(m,s).div(d),v=os(m,h).div(d),w=i.x.plus(v.times(s.x)),P=o.x.plus(y.times(h.x)),N=i.y.plus(v.times(s.y)),F=o.y.plus(y.times(h.y)),tt=w.plus(P).div(2),it=N.plus(F).div(2);return{x:tt,y:it}},Qe=class Bl{constructor(s,o){Lt(this,"point");Lt(this,"isLeft");Lt(this,"segment");Lt(this,"otherSE");Lt(this,"consumedBy");s.events===void 0?s.events=[this]:s.events.push(this),this.point=s,this.isLeft=o}static compare(s,o){let h=Bl.comparePoints(s.point,o.point);return h!==0?h:(s.point!==o.point&&s.link(o),s.isLeft!==o.isLeft?s.isLeft?1:-1:Xi.compare(s.segment,o.segment))}static comparePoints(s,o){return s.x.isLessThan(o.x)?-1:s.x.isGreaterThan(o.x)?1:s.y.isLessThan(o.y)?-1:s.y.isGreaterThan(o.y)?1:0}link(s){if(s.point===this.point)throw new Error("Tried to link already linked events");let o=s.point.events;for(let h=0,d=o.length;h<d;h++){let m=o[h];this.point.events.push(m),m.point=this.point}this.checkForConsuming()}checkForConsuming(){let s=this.point.events.length;for(let o=0;o<s;o++){let h=this.point.events[o];if(h.segment.consumedBy===void 0)for(let d=o+1;d<s;d++){let m=this.point.events[d];m.consumedBy===void 0&&h.otherSE.point.events===m.otherSE.point.events&&h.segment.consume(m.segment)}}}getAvailableLinkedEvents(){let s=[];for(let o=0,h=this.point.events.length;o<h;o++){let d=this.point.events[o];d!==this&&!d.segment.ringOut&&d.segment.isInResult()&&s.push(d)}return s}getLeftmostComparator(s){let o=new Map,h=d=>{let m=d.otherSE;o.set(d,{sine:hh(this.point,s.point,m.point),cosine:Er(this.point,s.point,m.point)})};return(d,m)=>{o.has(d)||h(d),o.has(m)||h(m);let{sine:y,cosine:v}=o.get(d),{sine:w,cosine:P}=o.get(m);return y.isGreaterThanOrEqualTo(0)&&w.isGreaterThanOrEqualTo(0)?v.isLessThan(P)?1:v.isGreaterThan(P)?-1:0:y.isLessThan(0)&&w.isLessThan(0)?v.isLessThan(P)?-1:v.isGreaterThan(P)?1:0:w.isLessThan(y)?-1:w.isGreaterThan(y)?1:0}}},uh=0,Xi=class Dr{constructor(s,o,h,d){Lt(this,"id");Lt(this,"leftSE");Lt(this,"rightSE");Lt(this,"rings");Lt(this,"windings");Lt(this,"ringOut");Lt(this,"consumedBy");Lt(this,"prev");Lt(this,"_prevInResult");Lt(this,"_beforeState");Lt(this,"_afterState");Lt(this,"_isInResult");this.id=++uh,this.leftSE=s,s.segment=this,s.otherSE=o,this.rightSE=o,o.segment=this,o.otherSE=s,this.rings=h,this.windings=d}static compare(s,o){let h=s.leftSE.point.x,d=o.leftSE.point.x,m=s.rightSE.point.x,y=o.rightSE.point.x;if(y.isLessThan(h))return 1;if(m.isLessThan(d))return-1;let v=s.leftSE.point.y,w=o.leftSE.point.y,P=s.rightSE.point.y,N=o.rightSE.point.y;if(h.isLessThan(d)){if(w.isLessThan(v)&&w.isLessThan(P))return 1;if(w.isGreaterThan(v)&&w.isGreaterThan(P))return-1;let F=s.comparePoint(o.leftSE.point);if(F<0)return 1;if(F>0)return-1;let tt=o.comparePoint(s.rightSE.point);return tt!==0?tt:-1}if(h.isGreaterThan(d)){if(v.isLessThan(w)&&v.isLessThan(N))return-1;if(v.isGreaterThan(w)&&v.isGreaterThan(N))return 1;let F=o.comparePoint(s.leftSE.point);if(F!==0)return F;let tt=s.comparePoint(o.rightSE.point);return tt<0?1:tt>0?-1:1}if(v.isLessThan(w))return-1;if(v.isGreaterThan(w))return 1;if(m.isLessThan(y)){let F=o.comparePoint(s.rightSE.point);if(F!==0)return F}if(m.isGreaterThan(y)){let F=s.comparePoint(o.rightSE.point);if(F<0)return 1;if(F>0)return-1}if(!m.eq(y)){let F=P.minus(v),tt=m.minus(h),it=N.minus(w),lt=y.minus(d);if(F.isGreaterThan(tt)&&it.isLessThan(lt))return 1;if(F.isLessThan(tt)&&it.isGreaterThan(lt))return-1}return m.isGreaterThan(y)?1:m.isLessThan(y)||P.isLessThan(N)?-1:P.isGreaterThan(N)?1:s.id<o.id?-1:s.id>o.id?1:0}static fromRing(s,o,h){let d,m,y,v=Qe.comparePoints(s,o);if(v<0)d=s,m=o,y=1;else if(v>0)d=o,m=s,y=-1;else throw new Error(`Tried to create degenerate segment at [${s.x}, ${s.y}]`);let w=new Qe(d,!0),P=new Qe(m,!1);return new Dr(w,P,[h],[y])}replaceRightSE(s){this.rightSE=s,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let s=this.leftSE.point.y,o=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:s.isLessThan(o)?s:o},ur:{x:this.rightSE.point.x,y:s.isGreaterThan(o)?s:o}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(s){return s.x.eq(this.leftSE.point.x)&&s.y.eq(this.leftSE.point.y)||s.x.eq(this.rightSE.point.x)&&s.y.eq(this.rightSE.point.y)}comparePoint(s){return ee.orient(this.leftSE.point,s,this.rightSE.point)}getIntersection(s){let o=this.bbox(),h=s.bbox(),d=da(o,h);if(d===null)return null;let m=this.leftSE.point,y=this.rightSE.point,v=s.leftSE.point,w=s.rightSE.point,P=Je(o,v)&&this.comparePoint(v)===0,N=Je(h,m)&&s.comparePoint(m)===0,F=Je(o,w)&&this.comparePoint(w)===0,tt=Je(h,y)&&s.comparePoint(y)===0;if(N&&P)return tt&&!F?y:!tt&&F?w:null;if(N)return F&&m.x.eq(w.x)&&m.y.eq(w.y)?null:m;if(P)return tt&&y.x.eq(v.x)&&y.y.eq(v.y)?null:v;if(tt&&F)return null;if(tt)return y;if(F)return w;let it=lh(m,this.vector(),v,s.vector());return it===null||!Je(d,it)?null:ee.snap(it)}split(s){let o=[],h=s.events!==void 0,d=new Qe(s,!0),m=new Qe(s,!1),y=this.rightSE;this.replaceRightSE(m),o.push(m),o.push(d);let v=new Dr(d,y,this.rings.slice(),this.windings.slice());return Qe.comparePoints(v.leftSE.point,v.rightSE.point)>0&&v.swapEvents(),Qe.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),h&&(d.checkForConsuming(),m.checkForConsuming()),o}swapEvents(){let s=this.rightSE;this.rightSE=this.leftSE,this.leftSE=s,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let o=0,h=this.windings.length;o<h;o++)this.windings[o]*=-1}consume(s){let o=this,h=s;for(;o.consumedBy;)o=o.consumedBy;for(;h.consumedBy;)h=h.consumedBy;let d=Dr.compare(o,h);if(d!==0){if(d>0){let m=o;o=h,h=m}if(o.prev===h){let m=o;o=h,h=m}for(let m=0,y=h.rings.length;m<y;m++){let v=h.rings[m],w=h.windings[m],P=o.rings.indexOf(v);P===-1?(o.rings.push(v),o.windings.push(w)):o.windings[P]+=w}h.rings=null,h.windings=null,h.consumedBy=o,h.leftSE.consumedBy=o.leftSE,h.rightSE.consumedBy=o.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let s=this.prev.consumedBy||this.prev;this._beforeState=s.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let s=this.beforeState();this._afterState={rings:s.rings.slice(0),windings:s.windings.slice(0),multiPolys:[]};let o=this._afterState.rings,h=this._afterState.windings,d=this._afterState.multiPolys;for(let v=0,w=this.rings.length;v<w;v++){let P=this.rings[v],N=this.windings[v],F=o.indexOf(P);F===-1?(o.push(P),h.push(N)):h[F]+=N}let m=[],y=[];for(let v=0,w=o.length;v<w;v++){if(h[v]===0)continue;let P=o[v],N=P.poly;if(y.indexOf(N)===-1)if(P.isExterior)m.push(N);else{y.indexOf(N)===-1&&y.push(N);let F=m.indexOf(P.poly);F!==-1&&m.splice(F,1)}}for(let v=0,w=m.length;v<w;v++){let P=m[v].multiPoly;d.indexOf(P)===-1&&d.push(P)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let s=this.beforeState().multiPolys,o=this.afterState().multiPolys;switch(Pr.type){case"union":{let h=s.length===0,d=o.length===0;this._isInResult=h!==d;break}case"intersection":{let h,d;s.length<o.length?(h=s.length,d=o.length):(h=o.length,d=s.length),this._isInResult=d===Pr.numMultiPolys&&h<d;break}case"xor":{let h=Math.abs(s.length-o.length);this._isInResult=h%2===1;break}case"difference":{let h=d=>d.length===1&&d[0].isSubject;this._isInResult=h(s)!==h(o);break}}return this._isInResult}},fa=class{constructor(i,s,o){Lt(this,"poly");Lt(this,"isExterior");Lt(this,"segments");Lt(this,"bbox");if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=s,this.isExterior=o,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let h=ee.snap({x:new B(i[0][0]),y:new B(i[0][1])});this.bbox={ll:{x:h.x,y:h.y},ur:{x:h.x,y:h.y}};let d=h;for(let m=1,y=i.length;m<y;m++){if(typeof i[m][0]!="number"||typeof i[m][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let v=ee.snap({x:new B(i[m][0]),y:new B(i[m][1])});v.x.eq(d.x)&&v.y.eq(d.y)||(this.segments.push(Xi.fromRing(d,v,this)),v.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=v.x),v.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=v.y),v.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=v.x),v.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=v.y),d=v)}(!h.x.eq(d.x)||!h.y.eq(d.y))&&this.segments.push(Xi.fromRing(d,h,this))}getSweepEvents(){let i=[];for(let s=0,o=this.segments.length;s<o;s++){let h=this.segments[s];i.push(h.leftSE),i.push(h.rightSE)}return i}},ch=class{constructor(i,s){Lt(this,"multiPoly");Lt(this,"exteriorRing");Lt(this,"interiorRings");Lt(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new fa(i[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let o=1,h=i.length;o<h;o++){let d=new fa(i[o],this,!1);d.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=d.bbox.ll.x),d.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=d.bbox.ll.y),d.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=d.bbox.ur.x),d.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=d.bbox.ur.y),this.interiorRings.push(d)}this.multiPoly=s}getSweepEvents(){let i=this.exteriorRing.getSweepEvents();for(let s=0,o=this.interiorRings.length;s<o;s++){let h=this.interiorRings[s].getSweepEvents();for(let d=0,m=h.length;d<m;d++)i.push(h[d])}return i}},Ml=class{constructor(i,s){Lt(this,"isSubject");Lt(this,"polys");Lt(this,"bbox");if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:new B(Number.POSITIVE_INFINITY),y:new B(Number.POSITIVE_INFINITY)},ur:{x:new B(Number.NEGATIVE_INFINITY),y:new B(Number.NEGATIVE_INFINITY)}};for(let o=0,h=i.length;o<h;o++){let d=new ch(i[o],this);d.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=d.bbox.ll.x),d.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=d.bbox.ll.y),d.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=d.bbox.ur.x),d.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=d.bbox.ur.y),this.polys.push(d)}this.isSubject=s}getSweepEvents(){let i=[];for(let s=0,o=this.polys.length;s<o;s++){let h=this.polys[s].getSweepEvents();for(let d=0,m=h.length;d<m;d++)i.push(h[d])}return i}},lp=class _h{constructor(s){Lt(this,"events");Lt(this,"poly");Lt(this,"_isExteriorRing");Lt(this,"_enclosingRing");this.events=s;for(let o=0,h=s.length;o<h;o++)s[o].segment.ringOut=this;this.poly=null}static factory(s){let o=[];for(let h=0,d=s.length;h<d;h++){let m=s[h];if(!m.isInResult()||m.ringOut)continue;let y=null,v=m.leftSE,w=m.rightSE,P=[v],N=v.point,F=[];for(;y=v,v=w,P.push(v),v.point!==N;)for(;;){let tt=v.getAvailableLinkedEvents();if(tt.length===0){let ft=P[0].point,vt=P[P.length-1].point;throw new Error(`Unable to complete output ring starting at [${ft.x}, ${ft.y}]. Last matching segment found ends at [${vt.x}, ${vt.y}].`)}if(tt.length===1){w=tt[0].otherSE;break}let it=null;for(let ft=0,vt=F.length;ft<vt;ft++)if(F[ft].point===v.point){it=ft;break}if(it!==null){let ft=F.splice(it)[0],vt=P.splice(ft.index);vt.unshift(vt[0].otherSE),o.push(new _h(vt.reverse()));continue}F.push({index:P.length,point:v.point});let lt=v.getLeftmostComparator(y);w=tt.sort(lt)[0].otherSE;break}o.push(new _h(P))}return o}getGeom(){let s=this.events[0].point,o=[s];for(let P=1,N=this.events.length-1;P<N;P++){let F=this.events[P].point,tt=this.events[P+1].point;ee.orient(F,s,tt)!==0&&(o.push(F),s=F)}if(o.length===1)return null;let h=o[0],d=o[1];ee.orient(h,s,d)===0&&o.shift(),o.push(o[0]);let m=this.isExteriorRing()?1:-1,y=this.isExteriorRing()?0:o.length-1,v=this.isExteriorRing()?o.length:-1,w=[];for(let P=y;P!=v;P+=m)w.push([o[P].x.toNumber(),o[P].y.toNumber()]);return w}isExteriorRing(){if(this._isExteriorRing===void 0){let s=this.enclosingRing();this._isExteriorRing=s?!s.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var d,m;let s=this.events[0];for(let y=1,v=this.events.length;y<v;y++){let w=this.events[y];Qe.compare(s,w)>0&&(s=w)}let o=s.segment.prevInResult(),h=o?o.prevInResult():null;for(;;){if(!o)return null;if(!h)return o.ringOut;if(h.ringOut!==o.ringOut)return((d=h.ringOut)==null?void 0:d.enclosingRing())!==o.ringOut?o.ringOut:(m=o.ringOut)==null?void 0:m.enclosingRing();o=h.prevInResult(),h=o?o.prevInResult():null}}},xl=class{constructor(i){Lt(this,"exteriorRing");Lt(this,"interiorRings");this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){let i=this.exteriorRing.getGeom();if(i===null)return null;let s=[i];for(let o=0,h=this.interiorRings.length;o<h;o++){let d=this.interiorRings[o].getGeom();d!==null&&s.push(d)}return s}},up=class{constructor(i){Lt(this,"rings");Lt(this,"polys");this.rings=i,this.polys=this._composePolys(i)}getGeom(){let i=[];for(let s=0,o=this.polys.length;s<o;s++){let h=this.polys[s].getGeom();h!==null&&i.push(h)}return i}_composePolys(i){var o;let s=[];for(let h=0,d=i.length;h<d;h++){let m=i[h];if(!m.poly)if(m.isExteriorRing())s.push(new xl(m));else{let y=m.enclosingRing();y!=null&&y.poly||s.push(new xl(y)),(o=y==null?void 0:y.poly)==null||o.addInterior(m)}}return s}},cp=class{constructor(i,s=Xi.compare){Lt(this,"queue");Lt(this,"tree");Lt(this,"segments");this.queue=i,this.tree=new ht(s),this.segments=[]}process(i){let s=i.segment,o=[];if(i.consumedBy)return i.isLeft?this.queue.delete(i.otherSE):this.tree.delete(s),o;i.isLeft&&this.tree.add(s);let h=s,d=s;do h=this.tree.lastBefore(h);while(h!=null&&h.consumedBy!=null);do d=this.tree.firstAfter(d);while(d!=null&&d.consumedBy!=null);if(i.isLeft){let m=null;if(h){let v=h.getIntersection(s);if(v!==null&&(s.isAnEndpoint(v)||(m=v),!h.isAnEndpoint(v))){let w=this._splitSafely(h,v);for(let P=0,N=w.length;P<N;P++)o.push(w[P])}}let y=null;if(d){let v=d.getIntersection(s);if(v!==null&&(s.isAnEndpoint(v)||(y=v),!d.isAnEndpoint(v))){let w=this._splitSafely(d,v);for(let P=0,N=w.length;P<N;P++)o.push(w[P])}}if(m!==null||y!==null){let v=null;m===null?v=y:y===null?v=m:v=Qe.comparePoints(m,y)<=0?m:y,this.queue.delete(s.rightSE),o.push(s.rightSE);let w=s.split(v);for(let P=0,N=w.length;P<N;P++)o.push(w[P])}o.length>0?(this.tree.delete(s),o.push(i)):(this.segments.push(s),s.prev=h)}else{if(h&&d){let m=h.getIntersection(d);if(m!==null){if(!h.isAnEndpoint(m)){let y=this._splitSafely(h,m);for(let v=0,w=y.length;v<w;v++)o.push(y[v])}if(!d.isAnEndpoint(m)){let y=this._splitSafely(d,m);for(let v=0,w=y.length;v<w;v++)o.push(y[v])}}}this.tree.delete(s)}return o}_splitSafely(i,s){this.tree.delete(i);let o=i.rightSE;this.queue.delete(o);let h=i.split(s);return h.push(o),i.consumedBy===void 0&&this.tree.add(i),h}},dp=class{constructor(){Lt(this,"type");Lt(this,"numMultiPolys")}run(i,s,o){pa.type=i;let h=[new Ml(s,!0)];for(let w=0,P=o.length;w<P;w++)h.push(new Ml(o[w],!1));if(pa.numMultiPolys=h.length,pa.type==="difference"){let w=h[0],P=1;for(;P<h.length;)da(h[P].bbox,w.bbox)!==null?P++:h.splice(P,1)}if(pa.type==="intersection")for(let w=0,P=h.length;w<P;w++){let N=h[w];for(let F=w+1,tt=h.length;F<tt;F++)if(da(N.bbox,h[F].bbox)===null)return[]}let d=new ht(Qe.compare);for(let w=0,P=h.length;w<P;w++){let N=h[w].getSweepEvents();for(let F=0,tt=N.length;F<tt;F++)d.add(N[F])}let m=new cp(d),y=null;for(d.size!=0&&(y=d.first(),d.delete(y));y;){let w=m.process(y);for(let P=0,N=w.length;P<N;P++){let F=w[P];F.consumedBy===void 0&&d.add(F)}d.size!=0?(y=d.first(),d.delete(y)):y=null}ee.reset();let v=lp.factory(m.segments);return new up(v).getGeom()}},pa=new dp,Pr=pa,fp=(i,...s)=>Pr.run("intersection",i,s),pp=(i,...s)=>Pr.run("difference",i,s);ee.set;function kr(i){let s={type:"Feature"};return s.geometry=i,s}function Br(i){return i.type==="Feature"?i.geometry:i}function Ll(i){return i&&i.geometry&&i.geometry.coordinates?i.geometry.coordinates:i}function _p(i){return kr({type:"LineString",coordinates:i})}function mp(i){return kr({type:"MultiLineString",coordinates:i})}function bl(i){return kr({type:"Polygon",coordinates:i})}function wl(i){return kr({type:"MultiPolygon",coordinates:i})}function gp(i,s){let o=Br(i),h=Br(s),d=fp(o.coordinates,h.coordinates);return d.length===0?null:d.length===1?bl(d[0]):wl(d)}function yp(i,s){let o=Br(i),h=Br(s),d=pp(o.coordinates,h.coordinates);return d.length===0?null:d.length===1?bl(d[0]):wl(d)}function Cl(i){return Array.isArray(i)?1+Cl(i[0]):-1}function vp(i){i instanceof L.Polyline&&(i=i.toGeoJSON(15));let s=Ll(i),o=Cl(s),h=[];return o>1?s.forEach(d=>{h.push(_p(d))}):h.push(i),h}function Ap(i){let s=[];return i.eachLayer(o=>{s.push(Ll(o.toGeoJSON(15)))}),mp(s)}de.Cut=de.Polygon.extend({initialize(i){this._map=i,this._shape="Cut",this.toolbarButtonName="cutPolygon"},_finishShape(){if(this._editedLayers=[],!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let i=this._layer.getLatLngs();if(i.length<=2)return;let s=L.polygon(i,this.options.pathOptions);s._latlngInfos=this._layer._latlngInfo,this.cut(s),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:h,originalLayer:d})=>{this._fireCut(d,h,d),this._fireCut(this._map,h,d),d.pm._fireEdit()}),this._editedLayers=[];let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},cut(i){let s=this._map._layers,o=i._latlngInfos||[];Object.keys(s).map(h=>s[h]).filter(h=>h.pm).filter(h=>!h._pmTempLayer).filter(h=>!L.PM.optIn&&!h.options.pmIgnore||L.PM.optIn&&h.options.pmIgnore===!1).filter(h=>h instanceof L.Polyline).filter(h=>h!==i).filter(h=>h.pm.options.allowCutting).filter(h=>this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0?this.options.layersToCut.indexOf(h)>-1:!0).filter(h=>!this._layerGroup.hasLayer(h)).filter(h=>{try{let d=!!Xe(i.toGeoJSON(15),h.toGeoJSON(15)).features.length>0;return d||h instanceof L.Polyline&&!(h instanceof L.Polygon)?d:!!gp(i.toGeoJSON(15),h.toGeoJSON(15))}catch{return h instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(h=>{let d;if(h instanceof L.Polygon){d=L.polygon(h.getLatLngs());let w=d.getLatLngs();o.forEach(P=>{if(P&&P.snapInfo){let{latlng:N}=P,F=this._calcClosestLayer(N,[d]);if(F&&F.segment&&F.distance<this.options.snapDistance){let{segment:tt}=F;if(tt&&tt.length===2){let{indexPath:it,parentPath:lt,newIndex:ft}=L.PM.Utils._getIndexFromSegment(w,tt);(it.length>1?(0,hi.default)(w,lt):w).splice(ft,0,N)}}}})}else d=h;let m=this._cutLayer(i,d),y=L.geoJSON(m,h.options);y.getLayers().length===1&&([y]=y.getLayers()),this._setPane(y,"layerPane");let v=y.addTo(this._map.pm._getContainingLayer());if(v.pm.enable(h.pm.options),v.pm.disable(),h._pmTempLayer=!0,i._pmTempLayer=!0,h.remove(),h.removeFrom(this._map.pm._getContainingLayer()),i.remove(),i.removeFrom(this._map.pm._getContainingLayer()),v.getLayers&&v.getLayers().length===0&&this._map.pm.removeLayer({target:v}),v instanceof L.LayerGroup?(v.eachLayer(w=>{this._addDrawnLayerProp(w)}),this._addDrawnLayerProp(v)):this._addDrawnLayerProp(v),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let w=this.options.layersToCut.indexOf(h);w>-1&&this.options.layersToCut.splice(w,1)}this._editedLayers.push({layer:v,originalLayer:h})})},_cutLayer(i,s){let o=L.geoJSON(),h;if(s instanceof L.Polygon)h=yp(s.toGeoJSON(15),i.toGeoJSON(15));else{let d=vp(s);d.forEach(m=>{let y=th(m,i.toGeoJSON(15)),v;y&&y.features.length>0?v=L.geoJSON(y):v=L.geoJSON(m),v.getLayers().forEach(w=>{ih(i.toGeoJSON(15),w.toGeoJSON(15))||w.addTo(o)})}),d.length>1?h=Ap(o):h=o.toGeoJSON(15)}return h},_change:L.Util.falseFn}),de.Text=de.extend({initialize(i){this._map=i,this._shape="Text",this.toolbarButtonName="drawText"},enable(i){L.Util.setOptions(this,i),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Bt("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){var i;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),(i=this._hintMarker)==null||i.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(i){this.enabled()?this.disable():this.enable(i)},_syncHintMarker(i){if(this._hintMarker.setLatLng(i.latlng),this.options.snappable){let s=i;s.target=this._hintMarker,this._handleSnapping(s)}},_createMarker(i){var d,m,y,v;if(!i.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(i.latlng);let s=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),(d=this.options.textOptions)==null?void 0:d.className){let w=this.options.textOptions.className.split(" ");this.textArea.classList.add(...w)}let o=this._createTextIcon(this.textArea),h=new L.Marker(s,{textMarker:!0,_textMarkerOverPM:!0,icon:o});if(this._setPane(h,"markerPane"),this._finishLayer(h),h.pm||(h.options.draggable=!1),h.addTo(this._map.pm._getContainingLayer()),h.pm){h.pm.textArea=this.textArea,L.setOptions(h.pm,{removeIfEmpty:((m=this.options.textOptions)==null?void 0:m.removeIfEmpty)??!0});let w=((y=this.options.textOptions)==null?void 0:y.focusAfterDraw)??!0;h.pm._createTextMarker(w),(v=this.options.textOptions)!=null&&v.text&&h.pm.setText(this.options.textOptions.text)}this._fireCreate(h),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(i){this.enable(),this._hintMarker.setLatLng(i.latlng)},_createTextArea(){let i=document.createElement("textarea");return i.readOnly=!0,i.classList.add("pm-textarea","pm-disabled"),i},_createTextIcon(i){return L.divIcon({className:"pm-text-marker",html:i})}});var Mp={enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,ve(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let i=this._getDOMElem();i&&(ve(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(i)):L.DomEvent.on(i,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,ve(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let i=this._getDOMElem();i&&(ve(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(i)):L.DomEvent.off(i,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(i){let s=i.touches?i.touches[0]:i,o={originalEvent:s,target:this._layer};return o.containerPoint=this._map.mouseEventToContainerPoint(s),o.latlng=this._map.containerPointToLatLng(o.containerPoint),this._dragMixinOnMouseDown(o),!1},_simulateMouseMoveEvent(i){let s=i.touches?i.touches[0]:i,o={originalEvent:s,target:this._layer};return o.containerPoint=this._map.mouseEventToContainerPoint(s),o.latlng=this._map.containerPointToLatLng(o.containerPoint),this._dragMixinOnMouseMove(o),!1},_simulateMouseUpEvent(i){let s={originalEvent:i.touches?i.touches[0]:i,target:this._layer};return i.type.indexOf("touch")===-1&&(s.containerPoint=this._map.mouseEventToContainerPoint(i),s.latlng=this._map.containerPointToLatLng(s.containerPoint)),this._dragMixinOnMouseUp(s),!1},_dragMixinOnMouseDown(i){if(i.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(i);let s=i._fromLayerSync,o=this._syncLayers("_dragMixinOnMouseDown",i);if(this._layer instanceof L.Marker&&(this.options.snappable&&!s&&!o?this._initSnappableMarkers():this._disableSnapping()),this._layer instanceof L.CircleMarker){let h="resizeableCircleMarker";this._layer instanceof L.Circle&&(h="resizeableCircle"),this.options.snappable&&!s&&!o?this._layer.pm.options[h]||this._initSnappableMarkersDrag():this._layer.pm.options[h]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=i.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(i){this._overwriteEventIfItComesFromMarker(i);let s=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",i),this._dragging||(this._dragging=!0,L.DomUtil.addClass(s,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=i.latlng),this._onLayerDrag(i),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(i){let s=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",i),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),this._dragging?(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,s&&L.DomUtil.removeClass(s,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0):!1},_onLayerDrag(i){let{latlng:s}=i,o={lat:s.lat-this._tempDragCoord.lat,lng:s.lng-this._tempDragCoord.lng},h=d=>d.map(m=>{if(Array.isArray(m))return h(m);let y={lat:m.lat+o.lat,lng:m.lng+o.lng};return(m.alt||m.alt===0)&&(y.alt=m.alt),y});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let d=h([this._layer.getLatLng()]);this._layer.setLatLng(d[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let d=this._layer.getLatLng();this._layer._snapped&&(d=this._layer._orgLatLng);let m=h([d]);this._layer.setLatLng(m[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let d=h([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(d),this._fireChange(this._layer.getBounds(),"Edit")}else{let d=h(this._layer.getLatLngs());this._layer.setLatLngs(d),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=s,i.layer=this._layer,this._fireDrag(i)},addDraggingClass(){let i=this._getDOMElem();i&&L.DomUtil.addClass(i,"leaflet-pm-draggable")},removeDraggingClass(){let i=this._getDOMElem();i&&L.DomUtil.removeClass(i,"leaflet-pm-draggable")},_getDOMElem(){let i=null;return this._layer._path?i=this._layer._path:this._layer._renderer&&this._layer._renderer._container?i=this._layer._renderer._container:this._layer._image?i=this._layer._image:this._layer._icon&&(i=this._layer._icon),i},_overwriteEventIfItComesFromMarker(i){i.target.getLatLng&&(!i.target._radius||i.target._radius<=10)&&(i.containerPoint=this._map.mouseEventToContainerPoint(i.originalEvent),i.latlng=this._map.containerPointToLatLng(i.containerPoint))},_syncLayers(i,s){if(this.enabled())return!1;if(!s._fromLayerSync&&this._layer===s.target&&this.options.syncLayersOnDrag){s._fromLayerSync=!0;let o=[];if(L.Util.isArray(this.options.syncLayersOnDrag))o=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(h=>{h instanceof L.LayerGroup&&(o=o.concat(h.pm.getLayers(!0)))});else if(this.options.syncLayersOnDrag===!0&&this._parentLayerGroup)for(let h in this._parentLayerGroup){let d=this._parentLayerGroup[h];d.pm&&(o=d.pm.getLayers(!0))}return L.Util.isArray(o)&&o.length>0&&(o=o.filter(h=>!!h.pm).filter(h=>!!h.pm.options.draggable),o.forEach(h=>{h!==this._layer&&h.pm[i]&&(h._snapped=!1,h.pm[i](s))})),o.length>0}return!1},_stopDOMImageDrag(i){return i.preventDefault(),!1}},xp=Mp,Lp=A(pi());function bp(i,s,o,h){return o.unproject(s.transform(o.project(i,h)),h)}function El(i,s,o){let h=o.getMaxZoom();if(h===1/0&&(h=o.getZoom()),L.Util.isArray(i)){let d=[];return i.forEach(m=>{d.push(El(m,s,o))}),d}return i instanceof L.LatLng?bp(i,s,o,h):null}function hs(i,s){s instanceof L.Layer&&(s=s.getLatLng());let o=i.getMaxZoom();return o===1/0&&(o=i.getZoom()),i.project(s,o)}function Sr(i,s){let o=i.getMaxZoom();return o===1/0&&(o=i.getZoom()),i.unproject(s,o)}var wp={_onRotateStart(i){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=hs(this._map,this._rotationOriginLatLng),this._rotationStartPoint=hs(this._map,i.target.getLatLng()),this._initialRotateLatLng=We(this._layer),this._startAngle=this.getAngle();let s=We(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,s),this._fireRotationStart(this._map,s)},_onRotate(i){let s=hs(this._map,i.target.getLatLng()),o=this._rotationStartPoint,h=this._rotationOriginPoint,d=Math.atan2(s.y-h.y,s.x-h.x)-Math.atan2(o.y-h.y,o.x-h.x);this._layer.setLatLngs(this._rotateLayer(d,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let m=this;function y(N,F=[],tt=-1){if(tt>-1&&F.push(tt),L.Util.isArray(N[0]))N.forEach((it,lt)=>y(it,F.slice(),lt));else{let it=F.length>0?(0,Lp.default)(m._markers,F):m._markers[0];N.forEach((lt,ft)=>{it[ft].setLatLng(lt)})}}y(this._layer.getLatLngs());let v=We(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(d,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let w=d*180/Math.PI;w=w<0?w+360:w;let P=w+this._startAngle;this._setAngle(P),this._rotationLayer.pm._setAngle(P),this._fireRotation(this._rotationLayer,w,v),this._fireRotation(this._map,w,v),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let i=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let s=We(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=We(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,i,s),this._fireRotationEnd(this._map,i,s),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(i,s,o,h,d){let m=hs(d,o);return this._matrix=h.clone().rotate(i,m).flip(),El(s,this._matrix,d)},_setAngle(i){i=i<0?i+360:i,this._angle=i%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let i=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),s=i.getCenter();return i.removeFrom(this._layer._map),s},enableRotate(){if(!this.options.allowRotation){this.disableRotate();return}this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&this._angle===void 0&&this.setInitAngle(Zn(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let i={fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0};this._rotatePoly=L.polygon(this._layer.getLatLngs(),i),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=We(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(i){let s=this.getAngle(),o=this._layer.getLatLngs(),h=i*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(h,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+i),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(h,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let d=this.getAngle()-s;d=d<0?d+360:d,this._startAngle=s,this._fireRotation(this._layer,d,o,this._layer),this._fireRotation(this._map||this._layer._map,d,o,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(i){let s=i-this.getAngle();this.rotateLayer(s)},getAngle(){return this._angle||0},setInitAngle(i){this._setAngle(i)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(i){this._rotationCenter=i,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(i)}},Cp=wp,Ep=L.Class.extend({includes:[xp,na,Cp,Nn],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(i){L.Util.setOptions(this,i)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(i,s){s==="layerPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":s==="vertexPane"?i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":s==="markerPane"&&(i.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(i,s){let o=s.target,h={layer:this._layer,marker:o,event:s},d="";return i==="move"?d="moveVertexValidation":i==="add"?d="addVertexValidation":i==="remove"&&(d="removeVertexValidation"),this.options[d]&&typeof this.options[d]=="function"&&!this.options[d](h)?(i==="move"&&(o._cancelDragEventChain=o.getLatLng()),!1):(o._cancelDragEventChain=null,!0)},_vertexValidationDrag(i){return i._cancelDragEventChain?(i._latlng=i._cancelDragEventChain,i.update(),!1):!0},_vertexValidationDragEnd(i){return i._cancelDragEventChain?(i._cancelDragEventChain=null,!1):!0}}),ge=Ep;ge.LayerGroup=L.Class.extend({initialize(i){this._layerGroup=i,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(h=>this._initLayer(h));let s=h=>{if(h.layer._pmTempLayer)return;this._layers=this.getLayers();let d=this._layers.filter(m=>!m.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in m.pm._parentLayerGroup));d.forEach(m=>{this._initLayer(m)}),d.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(s,100,this),this),this._layerGroup.on("layerremove",h=>{this._removeLayerFromGroup(h.target)},this);let o=h=>{h.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(o,100,this),this)},enable(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this._options=i,this._layers.forEach(o=>{o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.enable(i,s)):o.pm.enable(i)})},disable(i=[]){i.length===0&&(this._layers=this.getLayers()),this._layers.forEach(s=>{s instanceof L.LayerGroup?i.indexOf(s._leaflet_id)===-1&&(i.push(s._leaflet_id),s.pm.disable(i)):s.pm.disable()})},enabled(i=[]){return i.length===0&&(this._layers=this.getLayers()),!!this._layers.find(s=>s instanceof L.LayerGroup?i.indexOf(s._leaflet_id)===-1?(i.push(s._leaflet_id),s.pm.enabled(i)):!1:s.pm.enabled())},toggleEdit(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this._options=i,this._layers.forEach(o=>{o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.toggleEdit(i,s)):o.pm.toggleEdit(i)})},_initLayer(i){let s=L.Util.stamp(this._layerGroup);i.pm._parentLayerGroup||(i.pm._parentLayerGroup={}),i.pm._parentLayerGroup[s]=this._layerGroup},_removeLayerFromGroup(i){if(i.pm&&i.pm._layerGroup){let s=L.Util.stamp(this._layerGroup);delete i.pm._layerGroup[s]}},dragging(){return this._layers=this.getLayers(),this._layers?!!this._layers.find(i=>i.pm.dragging()):!1},getOptions(){return this.options},_getMap(){var i;return this._map||((i=this._layers.find(s=>!!s._map))==null?void 0:i._map)||null},getLayers(i=!1,s=!0,o=!0,h=[]){let d=[];return i?this._layerGroup.getLayers().forEach(m=>{d.push(m),m instanceof L.LayerGroup&&h.indexOf(m._leaflet_id)===-1&&(h.push(m._leaflet_id),d=d.concat(m.pm.getLayers(!0,!0,!0,h)))}):d=this._layerGroup.getLayers(),o&&(d=d.filter(m=>!(m instanceof L.LayerGroup))),s&&(d=d.filter(m=>!!m.pm),d=d.filter(m=>!m._pmTempLayer),d=d.filter(m=>!L.PM.optIn&&!m.options.pmIgnore||L.PM.optIn&&m.options.pmIgnore===!1)),d},setOptions(i,s=[]){s.length===0&&(this._layers=this.getLayers()),this.options=i,this._layers.forEach(o=>{o.pm&&(o instanceof L.LayerGroup?s.indexOf(o._leaflet_id)===-1&&(s.push(o._leaflet_id),o.pm.setOptions(i,s)):o.pm.setOptions(i))})}}),ge.Marker=ge.extend({_shape:"Marker",initialize(i){this._layer=i,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(i={draggable:!0}){if(L.Util.setOptions(this,i),!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._fireEnable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(i){let s=i.target;s.remove(),this._fireRemove(s),this._fireRemove(this._map,s)},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)}});var Yi=A(pi()),Pp={filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let i=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=i.filter((s,o,h)=>h.indexOf(s)===o)},_removeFromCache(i){let s=this.markerCache.indexOf(i);s>-1&&this.markerCache.splice(s,1)},renderLimits(i){this.markerCache.forEach(s=>{i.includes(s)?this._markerGroup.addLayer(s):this._markerGroup.removeLayer(s)})},applyLimitFilters({latlng:i={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let s=[...this._filterClosestMarkers(i)];this.renderLimits(s)},_filterClosestMarkers(i){let s=[...this.markerCache],o=this.options.limitMarkersToCount;return o===-1?s:(s.sort((h,d)=>{let m=h._latlng.distanceTo(i),y=d._latlng.distanceTo(i);return m-y}),s.filter((h,d)=>o>-1?d<o:!0))},_preventRenderMarkers:!1,_preventRenderingMarkers(i){this._preventRenderMarkers=!!i}},kp=Pp;ge.Line=ge.extend({includes:[kp],_shape:"Line",initialize(i){this._layer=i,this._enabled=!1},enable(i){if(L.Util.setOptions(this,i),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}this.enabled()&&this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.on("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this),this.options.allowSelfIntersection?this.cachedColor=void 0:(this._layer.options.color!=="#f00000ff"?(this.cachedColor=this._layer.options.color,this.isRed=!1):this.isRed=!0,this._handleLayerStyle()),this._fireEnable()}},disable(){if(!this.enabled()||this._dragging)return;this._enabled=!1,this._markerGroup.clearLayers(),this._markerGroup.removeFrom(this._map),this._layer.off("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);let i=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(i,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(i){return this.enabled()?this.disable():this.enable(i),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let i=this._map,s=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(i),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let o=h=>{if(Array.isArray(h[0]))return h.map(o,this);let d=h.map(this._createMarker,this);return this.options.hideMiddleMarkers!==!0&&h.map((m,y)=>{let v=this.isPolygon()?(y+1)%h.length:y+1;return this._createMiddleMarker(d[y],d[v])}),d};this._markers=o(s),this.filterMarkerGroup(),i.addLayer(this._markerGroup)},_createMarker(i){let s=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._pmTempLayer=!0,this.options.rotate?(s.on("dragstart",this._onRotateStart,this),s.on("drag",this._onRotate,this),s.on("dragend",this._onRotateEnd,this)):(s.on("click",this._onVertexClick,this),s.on("dragstart",this._onMarkerDragStart,this),s.on("move",this._onMarkerDrag,this),s.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||s.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(s),s},_createMiddleMarker(i,s){if(!i||!s)return!1;let o=L.PM.Utils.calcMiddleLatLng(this._map,i.getLatLng(),s.getLatLng()),h=this._createMarker(o),d=L.divIcon({className:"marker-icon marker-icon-middle"});return h.setIcon(d),h.leftM=i,h.rightM=s,i._middleMarkerNext=h,s._middleMarkerPrev=h,h.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),h.on("movestart",this._onMiddleMarkerMoveStart,this),h},_onMiddleMarkerClick(i){let s=i.target;if(!this._vertexValidation("add",i))return;let o=L.divIcon({className:"marker-icon"});s.setIcon(o),this._addMarker(s,s.leftM,s.rightM)},_onMiddleMarkerMoveStart(i){let s=i.target;if(s.on("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidation("add",i)){s.on("move",this._onMiddleMarkerMovePrevent,this);return}s._dragging=!0,this._addMarker(s,s.leftM,s.rightM)},_onMiddleMarkerMovePrevent(i){let s=i.target;this._vertexValidationDrag(s)},_onMiddleMarkerMoveEnd(i){let s=i.target;if(s.off("move",this._onMiddleMarkerMovePrevent,this),s.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(s))return;let o=L.divIcon({className:"marker-icon"});s.setIcon(o),setTimeout(()=>{delete s._dragging},100)},_addMarker(i,s,o){i.off("movestart",this._onMiddleMarkerMoveStart,this),i.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let h=i.getLatLng(),d=this._layer._latlngs;delete i.leftM,delete i.rightM;let{indexPath:m,index:y,parentPath:v}=L.PM.Utils.findDeepMarkerIndex(this._markers,s),w=m.length>1?(0,Yi.default)(d,v):d,P=m.length>1?(0,Yi.default)(this._markers,v):this._markers;w.splice(y+1,0,h),P.splice(y+1,0,i),this._layer.setLatLngs(d),this.options.hideMiddleMarkers!==!0&&(this._createMiddleMarker(s,i),this._createMiddleMarker(i,o)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(i,L.PM.Utils.findDeepMarkerIndex(this._markers,i).indexPath,h),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return qn(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(i){let s=this._layer,o,h;if(this.options.allowSelfIntersection?o=!1:(h=qn(this._layer.toGeoJSON(15)),o=h.features.length>0),o){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return o;i?this._flashLayer():(s.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(h)}else s.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return o},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(i,s){i.forEach(o=>{Array.isArray(o)?this._updateDisabledMarkerStyle(o,s):o._icon&&(s&&!this._checkMarkerAllowedToDrag(o)?L.DomUtil.addClass(o._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(o._icon,"vertexmarker-disabled"))})},_removeMarker(i){let s=i.target;if(!this._vertexValidation("remove",i))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=We(this._layer,this._layer.getLatLngs()));let o=this._layer.getLatLngs(),{indexPath:h,index:d,parentPath:m}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);if(!h)return;let y=h.length>1?(0,Yi.default)(o,m):o,v=h.length>1?(0,Yi.default)(this._markers,m):this._markers,w=m[m.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!w&&(y.length<=2||this.isPolygon()&&y.length<=3)){this._flashLayer();return}y.splice(d,1),this._layer.setLatLngs(o),this.isPolygon()&&y.length<=2&&y.splice(0,y.length);let P=!1;if(y.length<=1&&(y.splice(0,y.length),m.length>1&&h.length>1&&(o=un(o)),this._layer.setLatLngs(o),this._initMarkers(),P=!0),Pi(o)||this._layer.remove(),o=un(o),this._layer.setLatLngs(o),this._markers=un(this._markers),!P&&(v=h.length>1?(0,Yi.default)(this._markers,m):this._markers,s._middleMarkerPrev&&(this._markerGroup.removeLayer(s._middleMarkerPrev),this._removeFromCache(s._middleMarkerPrev)),s._middleMarkerNext&&(this._markerGroup.removeLayer(s._middleMarkerNext),this._removeFromCache(s._middleMarkerNext)),this._markerGroup.removeLayer(s),this._removeFromCache(s),v)){let N,F;if(this.isPolygon()?(N=(d+1)%v.length,F=(d+(v.length-1))%v.length):(F=d-1<0?void 0:d-1,N=d+1>=v.length?void 0:d+1),N!==F){let tt=v[F],it=v[N];this.options.hideMiddleMarkers!==!0&&this._createMiddleMarker(tt,it)}v.splice(d,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(s,h),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(i){let s=this._layer.getLatLngs(),o=i.getLatLng(),{indexPath:h,index:d,parentPath:m}=L.PM.Utils.findDeepMarkerIndex(this._markers,i);(h.length>1?(0,Yi.default)(s,m):s).splice(d,1,o),this._layer.setLatLngs(s)},_getNeighborMarkers(i){let{indexPath:s,index:o,parentPath:h}=L.PM.Utils.findDeepMarkerIndex(this._markers,i),d=s.length>1?(0,Yi.default)(this._markers,h):this._markers,m=(o+1)%d.length,y=(o+(d.length-1))%d.length,v=d[y],w=d[m];return{prevMarker:v,nextMarker:w}},_checkMarkerAllowedToDrag(i){let{prevMarker:s,nextMarker:o}=this._getNeighborMarkers(i),h=L.polyline([s.getLatLng(),i.getLatLng()]),d=L.polyline([i.getLatLng(),o.getLatLng()]),m=Xe(this._layer.toGeoJSON(15),h.toGeoJSON(15)).features.length,y=Xe(this._layer.toGeoJSON(15),d.toGeoJSON(15)).features.length;return i.getLatLng()===this._markers[0][0].getLatLng()?y+=1:i.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(m+=1),!(m<=2&&y<=2)},_onMarkerDragStart(i){let s=i.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",i))return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragStart(i,o),this.options.allowSelfIntersection||(this._coordsBeforeEdit=We(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(s):this._markerAllowedToDrag=null},_onMarkerDrag(i){let s=i.target;if(!this._vertexValidationDrag(s))return;let{indexPath:o,index:h,parentPath:d}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);if(!o)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&this._markerAllowedToDrag===!1){this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),this._handleLayerStyle();return}this.updatePolygonCoordsFromMarkerDrag(s);let m=o.length>1?(0,Yi.default)(this._markers,d):this._markers,y=(h+1)%m.length,v=(h+(m.length-1))%m.length,w=s.getLatLng(),P=m[v].getLatLng(),N=m[y].getLatLng();if(s._middleMarkerNext){let F=L.PM.Utils.calcMiddleLatLng(this._map,w,N);s._middleMarkerNext.setLatLng(F)}if(s._middleMarkerPrev){let F=L.PM.Utils.calcMiddleLatLng(this._map,w,P);s._middleMarkerPrev.setLatLng(F)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(i,o),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(i){let s=i.target;if(!this._vertexValidationDragEnd(s))return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s),h=!this.options.allowSelfIntersection&&this.hasSelfIntersection();h&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(h=!1);let d=!this.options.allowSelfIntersection&&h;if(this._fireMarkerDragEnd(i,o,d),d){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(i,o);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(i){let s=i.target;if(s._dragging)return;let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireVertexClick(i,o)}}),ge.Polygon=ge.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(i){let{prevMarker:s,nextMarker:o}=this._getNeighborMarkers(i),h=L.polyline([s.getLatLng(),i.getLatLng()]),d=L.polyline([i.getLatLng(),o.getLatLng()]),m=Xe(this._layer.toGeoJSON(15),h.toGeoJSON(15)).features.length,y=Xe(this._layer.toGeoJSON(15),d.toGeoJSON(15)).features.length;return!(m<=2&&y<=2)}}),ge.Rectangle=ge.Polygon.extend({_shape:"Rectangle",_initMarkers(){let i=this._map,s=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,i.addLayer(this._markerGroup),this._markers=[],this._markers[0]=s.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((o,h)=>{let d=this._cornerMarkers.find(m=>m._index===h);d&&d.setLatLng(o)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(i,s){let o=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(o,"vertexPane"),o._origLatLng=i,o._index=s,o._pmTempLayer=!0,o.on("click",this._onVertexClick,this),this._markerGroup.addLayer(o),o},_addMarkerEvents(){this._markers[0].forEach(i=>{i.on("dragstart",this._onMarkerDragStart,this),i.on("drag",this._onMarkerDrag,this),i.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||i.on("contextmenu",this._removeMarker,this)})},_removeMarker(){return null},_onMarkerDragStart(i){if(!this._vertexValidation("move",i))return;let s=i.target,o=this._cornerMarkers;s._oppositeCornerLatLng=o.find(d=>d._index===(s._index+2)%4).getLatLng(),s._snapped=!1;let{indexPath:h}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragStart(i,h)},_onMarkerDrag(i){let s=i.target;if(!this._vertexValidationDrag(s)||s._index===void 0)return;this._adjustRectangleForMarkerMove(s);let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDrag(i,o),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(i){let s=i.target;if(!this._vertexValidationDragEnd(s))return;this._cornerMarkers.forEach(h=>{delete h._oppositeCornerLatLng});let{indexPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,s);this._fireMarkerDragEnd(i,o),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(i){L.extend(i._origLatLng,i._latlng);let s=L.PM.Utils._getRotatedRectangle(i.getLatLng(),i._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(s),this._adjustAllMarkers(i),this._layer.redraw()},_adjustAllMarkers(i){let s=this._layer.getLatLngs()[0];if(s&&s.length!==4&&s.length>0)s.forEach((o,h)=>{this._cornerMarkers[h].setLatLng(o)}),this._cornerMarkers.slice(s.length).forEach(o=>{o.setLatLng(s[0])});else if(!s||!s.length)console.error("The layer has no LatLngs");else{let o=s.findIndex(h=>i.getLatLng().equals(h));o>-1?(this._cornerMarkers[(i._index+1)%4].setLatLng(s[(o+1)%4]),this._cornerMarkers[(i._index+2)%4].setLatLng(s[(o+2)%4]),this._cornerMarkers[(i._index+3)%4].setLatLng(s[(o+3)%4])):this._cornerMarkers.forEach(h=>{h.setLatLng(s[h._index])})}},_findCorners(){this._angle===void 0&&this.setInitAngle(Zn(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let i=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(i[0],i[2],this.getAngle(),this._map||this)}}),ge.CircleMarker=ge.extend({_shape:"CircleMarker",initialize(i){this._layer=i,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(i={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,i),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let i=this._map;this._helperLayers&&(this._helperLayers.removeFrom(i),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(i);let s=this._layer.getLatLng(),o=this._layer._radius,h=this._getLatLngOnCircle(s,o);this._centerMarker=this._createCenterMarker(s),this._outerMarker=this._createOuterMarker(h),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(i,s){let o=this._map.project(i),h=L.point(o.x+s,o.y);return this._map.unproject(h)},_createHintLine(i,s){let o=i.getLatLng(),h=s.getLatLng();this._hintline=L.polyline([o,h],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(i){let s=this._createMarker(i);return this.options.draggable?(L.DomUtil.addClass(s._icon,"leaflet-pm-draggable"),s.on("move",this._moveCircle,this)):s.dragging.disable(),s},_createOuterMarker(i){let s=this._createMarker(i);return s.on("drag",this._resizeCircle,this),s},_createMarker(i){let s=new L.Marker(i,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(s,"vertexPane"),s._origLatLng=i,s._pmTempLayer=!0,s.on("dragstart",this._onMarkerDragStart,this),s.on("drag",this._onMarkerDrag,this),s.on("dragend",this._onMarkerDragEnd,this),s.on("click",this._onVertexClick,this),this._helperLayers.addLayer(s),s},_moveCircle(i){if(i.target._cancelDragEventChain)return;let s=this._centerMarker.getLatLng();this._layer.setLatLng(s);let o=this._layer._radius,h=this._getLatLngOnCircle(s,o);this._outerMarker._latlng=h,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let i=this._layer.getLatLng(),s=this._layer._radius,o=this._getLatLngOnCircle(i,s);this._outerMarker.setLatLng(o),this._centerMarker.setLatLng(i),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(o),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng();this._hintline.setLatLngs([i,s])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(i){this._vertexValidation("move",i)&&this._fireMarkerDragStart(i)},_onMarkerDrag(i){let s=i.target;s instanceof L.Marker&&!this._vertexValidationDrag(s)||this._fireMarkerDrag(i)},_onMarkerDragEnd(i){this._extedingMarkerDragEnd();let s=i.target;this._vertexValidationDragEnd(s)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(i))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let i=this._layer._map||this._map;if(i){let s=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),i,this._layer.getLatLng()),o=L.circle(this._layer.getLatLng(),this._layer.options);o.setRadius(s);let h=i&&i.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(o,200,!h).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(o,200,!h),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);return this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?s=jn(this._map,i,s,this._getMinDistanceInMeter(i)):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&(s=jn(this._map,i,s,this._getMaxDistanceInMeter(i))),s},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let i=this._centerMarker.getLatLng(),s=this._outerMarker.getLatLng(),o=this._distanceCalculation(i,s);this.options[this._minRadiusOption]&&o<this.options[this._minRadiusOption]?this._outerMarker.setLatLng(this._outerMarker._orgLatLng):this.options[this._maxRadiusOption]&&o>this.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(i,s){return this._map.project(i).distanceTo(this._map.project(s))},_getMinDistanceInMeter(i){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,i)},_getMaxDistanceInMeter(i){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,i)},_onVertexClick(i){i.target._dragging||this._fireVertexClick(i,void 0)}}),ge.Circle=ge.CircleMarker.extend({_shape:"Circle",initialize(i){this._layer=i,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(i){L.PM.Edit.CircleMarker.prototype.enable.call(this,i||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let i=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(i,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let i=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!i).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!i),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(i,s){return this._map.distance(i,s)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(i){i.target._dragging||this._fireVertexClick(i,void 0)}}),ge.ImageOverlay=ge.extend({_shape:"ImageOverlay",initialize(i){this._layer=i,this._enabled=!1},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},enabled(){return this._enabled},enable(i={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,i),this._map=this._layer._map,!!this._map){if(!this.options.allowEditing){this.disable();return}this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let i=this._layer.getBounds(),s=i.getNorthWest(),o=i.getNorthEast(),h=i.getSouthEast(),d=i.getSouthWest();return[s,o,h,d]}}),ge.Text=ge.extend({_shape:"Text",initialize(i){this._layer=i,this._enabled=!1},enable(i){if(L.Util.setOptions(this,i),!!this.textArea){if(!this.options.allowEditing||!this._layer._map){this.disable();return}this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),L.DomEvent.off(document,"click",this._documentClick,this),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let i=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),i.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(i){this.enabled()?this.disable():this.enable(i)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let i=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=this.options.snapSegment===void 0?!0:this.options.snapSegment,i.off("pm:drag",this._handleSnapping,this),i.on("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.on("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this),i.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let i=this._layer;i.off("pm:drag",this._handleSnapping,this),i.off("pm:dragend",this._cleanupSnapping,this),i.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let i=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,s=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${i}px`,this.textArea.style.width=`${s}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&L.DomEvent.on(document,"click",this._documentClick,this)},100)},_documentClick(i){i.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(i={}){let s=this._hasFocus;this._hasFocus=i.type==="focus",!s!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(i){i&&(this.textArea.value=i),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let s=this.options.className.split(" ");this.textArea.classList.add(...s)}let i=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(i),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(i=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),i===!0&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(i){i.preventDefault()}});var dh=function(i,s,o,h,d,m){this._matrix=[i,s,o,h,d,m]};dh.init=()=>new L.PM.Matrix(1,0,0,1,0,0),dh.prototype={transform(i){return this._transform(i.clone())},_transform(i){let s=this._matrix,{x:o,y:h}=i;return i.x=s[0]*o+s[1]*h+s[4],i.y=s[2]*o+s[3]*h+s[5],i},untransform(i){let s=this._matrix;return new L.Point((i.x/s[0]-s[4])/s[0],(i.y/s[2]-s[5])/s[2])},clone(){let i=this._matrix;return new L.PM.Matrix(i[0],i[1],i[2],i[3],i[4],i[5])},translate(i){if(i===void 0)return new L.Point(this._matrix[4],this._matrix[5]);let s,o;return typeof i=="number"?(s=i,o=i):(s=i.x,o=i.y),this._add(1,0,0,1,s,o)},scale(i,s){if(i===void 0)return new L.Point(this._matrix[0],this._matrix[3]);let o,h;return s=s||L.point(0,0),typeof i=="number"?(o=i,h=i):(o=i.x,h=i.y),this._add(o,0,0,h,s.x,s.y)._add(1,0,0,1,-s.x,-s.y)},rotate(i,s){let o=Math.cos(i),h=Math.sin(i);return s=s||new L.Point(0,0),this._add(o,h,-h,o,s.x,s.y)._add(1,0,0,1,-s.x,-s.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(i,s,o,h,d,m){let y=[[],[],[]],v=this._matrix,w=[[v[0],v[2],v[4]],[v[1],v[3],v[5]],[0,0,1]],P=[[i,o,d],[s,h,m],[0,0,1]],N;i&&i instanceof L.PM.Matrix&&(v=i._matrix,P=[[v[0],v[2],v[4]],[v[1],v[3],v[5]],[0,0,1]]);for(let F=0;F<3;F+=1)for(let tt=0;tt<3;tt+=1){N=0;for(let it=0;it<3;it+=1)N+=w[F][it]*P[it][tt];y[F][tt]=N}return this._matrix=[y[0][0],y[1][0],y[0][1],y[1][1],y[0][2],y[1][2]],this}};var Bp=dh,Sp={calcMiddleLatLng(i,s,o){let h=i.project(s),d=i.project(o);return i.unproject(h._add(d)._divideBy(2))},findLayers(i){let s=[];return i.eachLayer(o=>{(o instanceof L.Polyline||o instanceof L.Marker||o instanceof L.Circle||o instanceof L.CircleMarker||o instanceof L.ImageOverlay)&&s.push(o)}),s=s.filter(o=>!!o.pm),s=s.filter(o=>!o._pmTempLayer),s=s.filter(o=>!L.PM.optIn&&!o.options.pmIgnore||L.PM.optIn&&o.options.pmIgnore===!1),s},circleToPolygon(i,s=60,o=!0){let h=i.getLatLng(),d=i.getRadius(),m=Un(h,d,s,0,o),y=[];for(let v=0;v<m.length;v+=1){let w=[m[v].lat,m[v].lng];y.push(w)}return L.polygon(y,i.options)},disablePopup(i){i.getPopup()&&(i._tempPopupCopy=i.getPopup(),i.unbindPopup())},enablePopup(i){i._tempPopupCopy&&(i.bindPopup(i._tempPopupCopy),delete i._tempPopupCopy)},_fireEvent(i,s,o,h=!1){i.fire(s,o,h);let{groups:d}=this.getAllParentGroups(i);d.forEach(m=>{m.fire(s,o,h)})},getAllParentGroups(i){let s=[],o=[],h=d=>{for(let m in d._eventParents)if(s.indexOf(m)===-1){s.push(m);let y=d._eventParents[m];o.push(y),h(y)}};return!i._pmLastGroupFetch||!i._pmLastGroupFetch.time||new Date().getTime()-i._pmLastGroupFetch.time>1e3?(h(i),i._pmLastGroupFetch={time:new Date().getTime(),groups:o,groupIds:s},{groupIds:s,groups:o}):{groups:i._pmLastGroupFetch.groups,groupIds:i._pmLastGroupFetch.groupIds}},createGeodesicPolygon:Un,getTranslation:Bt,findDeepCoordIndex(i,s,o=!0){let h,d=y=>(v,w)=>{let P=y.concat(w);if(o){if(v.lat&&v.lat===s.lat&&v.lng===s.lng)return h=P,!0}else if(v.lat&&L.latLng(v).equals(s))return h=P,!0;return Array.isArray(v)&&v.some(d(P))};i.some(d([]));let m={};return h&&(m={indexPath:h,index:h[h.length-1],parentPath:h.slice(0,h.length-1)}),m},findDeepMarkerIndex(i,s){let o,h=m=>(y,v)=>{let w=m.concat(v);return y._leaflet_id===s._leaflet_id?(o=w,!0):Array.isArray(y)&&y.some(h(w))};i.some(h([]));let d={};return o&&(d={indexPath:o,index:o[o.length-1],parentPath:o.slice(0,o.length-1)}),d},_getIndexFromSegment(i,s){if(s&&s.length===2){let o=this.findDeepCoordIndex(i,s[0]),h=this.findDeepCoordIndex(i,s[1]),d=Math.max(o.index,h.index);return(o.index===0||h.index===0)&&d!==1&&(d+=1),{indexA:o,indexB:h,newIndex:d,indexPath:o.indexPath,parentPath:o.parentPath}}return null},_getRotatedRectangle(i,s,o,h){let d=hs(h,i),m=hs(h,s),y=o*Math.PI/180,v=Math.cos(y),w=Math.sin(y),P=(m.x-d.x)*v+(m.y-d.y)*w,N=(m.y-d.y)*v-(m.x-d.x)*w,F=P*v+d.x,tt=P*w+d.y,it=-N*w+d.x,lt=N*v+d.y,ft=Sr(h,d),vt=Sr(h,{x:F,y:tt}),Ft=Sr(h,m),z=Sr(h,{x:it,y:lt});return[ft,vt,Ft,z]},pxRadiusToMeterRadius(i,s,o){let h=s.project(o),d=L.point(h.x+i,h.y);return s.distance(s.unproject(d),o)}},Tp=Sp;L.PM=L.PM||{version:qs.version,Map:pr,Toolbar:ia,Draw:de,Edit:ge,Utils:Tp,Matrix:Bp,activeLang:"en",optIn:!1,initialize(i){this.addInitHooks(i)},setOptIn(i){this.optIn=!!i},addInitHooks(){function i(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}L.Map.addInitHook(i);function s(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}L.LayerGroup.addInitHook(s);function o(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}L.Marker.addInitHook(o);function h(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}L.CircleMarker.addInitHook(h);function d(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}L.Polyline.addInitHook(d);function m(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}L.Polygon.addInitHook(m);function y(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}L.Rectangle.addInitHook(y);function v(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}L.Circle.addInitHook(v);function w(){this.pm=void 0,L.PM.optIn?this.options.pmIgnore===!1&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))}L.ImageOverlay.addInitHook(w)},reInitLayer(i){i instanceof L.LayerGroup&&i.eachLayer(s=>{this.reInitLayer(s)}),i.pm||L.PM.optIn&&i.options.pmIgnore!==!1||i.options.pmIgnore||(i instanceof L.Map?i.pm=new L.PM.Map(i):i instanceof L.Marker?i.options.textMarker?(i.pm=new L.PM.Edit.Text(i),i.pm._initTextMarker(),i.pm._createTextMarker(!1)):i.pm=new L.PM.Edit.Marker(i):i instanceof L.Circle?i.pm=new L.PM.Edit.Circle(i):i instanceof L.CircleMarker?i.pm=new L.PM.Edit.CircleMarker(i):i instanceof L.Rectangle?i.pm=new L.PM.Edit.Rectangle(i):i instanceof L.Polygon?i.pm=new L.PM.Edit.Polygon(i):i instanceof L.Polyline?i.pm=new L.PM.Edit.Line(i):i instanceof L.LayerGroup?i.pm=new L.PM.Edit.LayerGroup(i):i instanceof L.ImageOverlay&&(i.pm=new L.PM.Edit.ImageOverlay(i)))}},L.version==="1.7.1"&&L.Canvas.include({_onClick(i){let s=this._map.mouseEventToLayerPoint(i),o,h;for(let d=this._drawFirst;d;d=d.next)o=d.layer,o.options.interactive&&o._containsPoint(s)&&(!(i.type==="click"||i.type==="preclick")||!this._map._draggableMoved(o))&&(h=o);h&&(L.DomEvent.fakeStop(i),this._fireEvent([h],i))}}),L.PM.initialize()})();const Ol={en_US:{showEagle:"Show Eagle Map",hideEagle:"Hide Eagle Map"},zh_CN:{showEagle:"显示鹰眼图",hideEagle:"隐藏鹰眼图"}},Il={en_US:{coordinate:"Coordinate",zoomLevel:"Zoom Level",FPS:"FPS"},zh_CN:{coordinate:"坐标",zoomLevel:"层级",FPS:"每秒帧数"}},Or={en_US:{home:"Go Home",capture:"Screen Capture",center:"View Full",north:"Move North",south:"Move South",east:"Move East",west:"Move West",zoomIn:"Zoom In",zoomOut:"Zoom Out",zoom:"Zoom to this level",dragZoom:"Drag to zoom",more:"More",draw:"Plot",layer:"Layer Manager",lng:"Longitude",lat:"Latitude"},zh_CN:{home:"回到初始位置",capture:"截屏",center:"查看全图",north:"向上平移",south:"向下平移",east:"向右平移",west:"向左平移",zoomIn:"放大一级",zoomOut:"缩小一级",zoom:"缩放到此级别",dragZoom:"拖动缩放",more:"更多",draw:"标绘",layer:"图层管理",lng:"经度",lat:"纬度"}},Ir=U.Control.extend({options:{position:"bottomleft",coordinateUnit:"decimal",showCoordinate:!0,showLevel:!0,showFPS:!0,precision:6},initialize(t){U.setOptions(this,t),this.lastTime=+new Date,this.frames=0,U.Control.prototype.initialize.call(this,this.options)},onAdd(t){this.map=t,this.lang=t.lang,this.langDic=Il,this._container=U.DomUtil.create("div",`${t.clsPrefix}-statusbar`),this.zoom=t.getZoom();const n=t.getCenter();return this.lng=n.lng,this.lat=n.lat,this.options.showCoordinate&&(this._latlngContainer=U.DomUtil.create("div",`${t.clsPrefix}-statusbar-item coordinate`,this._container),this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng)},${this.getCoordinate(this.lat)}`),this.options.showLevel&&(this._levelContainer=U.DomUtil.create("div",`${t.clsPrefix}-statusbar-item level`,this._container),this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`),this.options.showFPS&&(this._fpsContainer=U.DomUtil.create("div",`${t.clsPrefix}-statusbar-item fps`,this._container),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b>60`),this.initEvt(),this._container},initEvt(){this.map.on("mousemove",t=>{this.lat=t.latlng.lat,this.lng=t.latlng.lng,this._latlngContainer&&(this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng,"lng")},${this.getCoordinate(this.lat,"lat")}`)}),this.map.on("zoomend",()=>{this.zoom=this.map.getZoom(),this._levelContainer&&(this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`)}),this.options.showFPS&&this.calcFPS()},getCoordinate(t,n="lng"){switch(this.options.coordinateUnit){case"decimal":return t.toFixed(this.options.precision);case"radian":return(t*Math.PI/180).toFixed(this.options.precision);case"degrees":return this._formatDeg(t,n)}},_formatDeg(t,n){const a=parseFloat(t),l=parseInt(a);let c="";n==="lng"?c=l>0?"E":"W":n==="lat"&&(c=l>0?"N":"S");let f=parseInt((a-l)*60),p=(a-l)*3600-f*60;return l+"°"+f+"′"+p.toFixed(2)+"″"+c},calcFPS(){if(this.frames++,this.frames>=30){const t=Date.now()-this.lastTime,n=Math.round(1e3/(t/this.frames));this._fpsContainer&&(this.frames=0,this.lastTime=Date.now(),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b><span>${n}</span>`)}requestAnimationFrame(this.calcFPS.bind(this))}}),Rr=U.Control.extend({includes:U.Evented?U.Evented.prototype:U.Mixin.Events,options:{position:"bottomright",toggleDisplay:!0,zoomLevelOffset:5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:100,height:100,collapsedWidth:22,collapsedHeight:22,aimingRectOptions:{color:"#ff7800",weight:1,interactive:!1},shadowRectOptions:{color:"#000000",weight:1,interactive:!1,opacity:0,fillOpacity:0},strings:{},mapOptions:{rotate:!0,rotateControl:!1}},initialize(t,n){U.Util.setOptions(this,n),this.options.aimingRectOptions.interactive=!1,this.options.shadowRectOptions.interactive=!1,this._layer=t},onAdd(t){this._mainMap=t,this.lang=t.options.lang??this.options.lang??"zh_CN",this.langDic=Ol,this.options.strings={hideText:this.langDic[this.lang].hideEagle,showText:this.langDic[this.lang].showEagle},this._container=U.DomUtil.create("div",`${t.clsPrefix}-eaglemap`),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",U.DomEvent.disableClickPropagation(this._container),U.DomEvent.on(this._container,"mousewheel",U.DomEvent.stopPropagation);let n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:t.options.crs,rotateControl:t.options.rotateControl,rotate:t.options.rotate,bearing:t.options.bearing,lang:this.lang};return n=U.Util.extend(this.options.mapOptions,n),this._eagleMap=new U.Map(this._container,n),this._layer instanceof U.Layer&&this._eagleMap.addLayer(this._layer),this._mainMapMoving=!1,this._eagleMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._eagleMap.whenReady(U.Util.bind(function(){this._aimingRect=new U.Rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._eagleMap),this._shadowRect=new U.Rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._eagleMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._eagleMap.on("movestart",this._onEagleMapMoveStarted,this),this._eagleMap.on("move",this._onEagleMapMoving,this),this._eagleMap.on("moveend",this._onEagleMapMoved,this)},this)),this._container},addTo(t){U.Control.prototype.addTo.call(this,t);const n=this.options.centerFixed||this._mainMap.getCenter();return this._eagleMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._eagleMap.off("moveend",this._onEagleMapMoved,this),this._eagleMap.removeLayer(this._layer)},changeLayer(t){this._eagleMap.removeLayer(this._layer),this._layer=t,this._eagleMap.addLayer(this._layer)},_addToggleButton(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),`${this._mainMap.clsPrefix}-eaglemap-toggle-display ${this._mainMap.clsPrefix}-eaglemap-toggle-display-`+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText(){return this.options.minimized?this.langDic[this.lang].showEagle:this.langDic[this.lang].hideEagle},_createButton(t,n,a,l,c,f){const p=U.DomUtil.create("a",a,l);p.innerHTML=t,p.href="#",p.title=n;const g=U.DomEvent.stopPropagation;return U.DomEvent.on(p,"click",g).on(p,"mousedown",g).on(p,"dblclick",g).on(p,"click",U.DomEvent.preventDefault).on(p,"click",c,f),p},_toggleDisplayButtonClicked(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved(t){if(this._eagleMapMoving)this._eagleMapMoving=!1;else{const n=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._eagleMap.setView(n,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onEagleMapMoveStarted(t){if(!this.options.centerFixed){const n=this._aimingRect.getBounds(),a=this._eagleMap.latLngToContainerPoint(n.getSouthWest()),l=this._eagleMap.latLngToContainerPoint(n.getNorthEast());this._lastAimingRectPosition={sw:a,ne:l}}},_onEagleMapMoving(t){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new U.LatLngBounds(this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onEagleMapMoved(t){this._mainMapMoving?this._mainMapMoving=!1:(this._eagleMapMoving=!0,this._mainMap.setView(this._eagleMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed(){const t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()-this.options.zoomLevelOffset;{const n=this._eagleMap.getZoom()-this._mainMap.getZoom(),a=this._eagleMap.getZoom()+this.options.zoomLevelOffset;let l;return n<this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._eagleMap.getMinZoom()+this.options.zoomLevelOffset?this._eagleMap.getZoom()>this._lastEagleMapZoom?(l=this._mainMap.getZoom()+1,this._eagleMap.setZoom(this._eagleMap.getZoom()-1)):l=this._mainMap.getZoom():l=a,this._lastEagleMapZoom=this._eagleMap.getZoom(),l}},_decideMinimized(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._eagleMap.getBounds()):this._minimized},_isInteger(t){return typeof t=="number"},_isDefined(t){return typeof t<"u"},_onToggle(){U.Util.requestAnimFrame(function(){U.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),U.Browser.any3d||U.Util.requestAnimFrame(this._fireToggleEvents,this)},this)},_fireToggleEvents(){U.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);const t={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",t),this.fire("toggle",t)}}),Gr=L.FeatureGroup.extend({initialize(t,n){this.markers=[],L.Util.setOptions(this,n);const a=typeof this.options.cssClass=="string"?this.options.cssClass:"vertex-marker",l=this.options.iconSize!==void 0?this.options.iconSize:[24,24],c=this.options.iconAnchor!==void 0?this.options.iconAnchor:[12,12],f=this.options.textFn,p=typeof this.options.firstVertex=="boolean"?this.options.firstVertex:!0,g=typeof this.options.lastVertex=="boolean"?this.options.lastVertex:!0;this.dragable=this.options.dragable||!1;let A=t;typeof t.getLatLngs=="function"&&(A=t.getLatLngs());for(let b=p?0:1,T=A.length-(g?0:1);b<T;b++){const G=A[b];var k=typeof f=="function"?f.call(this,b,A):f||"",C=L.divIcon({className:a,html:k,iconSize:l,iconAnchor:c}),x=L.marker(G,{icon:C,pmIgnore:!0,index:b});this.markers.push(x)}L.FeatureGroup.prototype.initialize.call(this,this.markers)},onAdd(t){this.markers.forEach(n=>{L.FeatureGroup.prototype.addLayer.call(this,n)}),L.FeatureGroup.prototype.onAdd.call(this,t)},onRemove(t){this.markers.forEach(n=>{L.FeatureGroup.prototype.removeLayer.call(this,n)}),L.FeatureGroup.prototype.onRemove.call(this,t)}});class ls extends L[L.Layer?"Layer":"Class"]{constructor(n,a,l,c,f){super(),L.setOptions(this,f),this._latlng=n,this._measurement=a,this._title=l,this._rotation=c,this.MEASUREDDATA=null,this.tempAcCurrDrawPoints=null}addTo(n){return n.addLayer(this),this}onAdd(n){this._map=n;const a=this.getPane?this.getPane():n.getPanes().markerPane,l=this._element=L.DomUtil.create("div","leaflet-zoom-animated leaflet-measure-path-measurement",a),c=L.DomUtil.create("div","",l);c.title=this._title,c.innerHTML=this._measurement,n.on("zoomanim",this._animateZoom,this),this._setPosition()}onRemove(n){n.off("zoomanim",this._animateZoom,this),(this.getPane?this.getPane():n.getPanes().markerPane).removeChild(this._element),this._map=null}_setPosition(){L.DomUtil.setPosition(this._element,this._map.latLngToLayerPoint(this._latlng)),this._element.style.transform+=" rotate("+this._rotation+"rad)"}_animateZoom(n){const a=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();L.DomUtil.setPosition(this._element,a),this._element.style.transform+=" rotate("+this._rotation+"rad)"}}U.Map.addInitHook(function(){var t,n,a;this.pm&&this.pm.setLang(this.options.lang.split("_")[0]),(t=this.options.eagleMapControl)!=null&&t.show&&(this.eagleMapControl=new Rr(this.options.eagleMapControl),this.addControl(this.eagleMapControl)),(n=this.options.statusBarControl)!=null&&n.show&&(this.statusBarControl=new Ir(this.options.statusBarControl),this.addControl(this.statusBarControl)),(a=this.options.scaleControl)!=null&&a.show&&(this.scaleControl=new U.Control.Scale(Object.assign({position:"bottomleft",maxWidth:100,metric:!0,imperial:!1},this.options.scaleControl)),this.addControl(this.scaleControl))}),U.Marker.addInitHook(function(){let n=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;n&&(n=n[0]+"px "+n[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||n||"center bottom",this.on("drag",a=>{a.target._applyRotation()})}),U.Marker.mergeOptions({scale:1,rotation:0,minZoom:0,maxZoom:16,hideOnMinZoom:!0,minificationScale:.6}),U.Marker.include({_setPos(t){this._icon.style.display="initial";const{rotation:n,minZoom:a,maxZoom:l,hideOnMinZoom:c,minificationScale:f}=this.options;if(a&&l&&l-a>0){const p=parseFloat(((1-f)/(l-a)).toFixed(2));this._map._zoom>=l?this.options.scale=1:this._map._zoom>a&this._map._zoom<l?this.options.scale=1-(l-this._map._zoom)*p:this._map._zoom<=a&&c?this._icon.style.display="none":this._map._zoom<=a&&!c&&(this.options.scale=f)}this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),this._icon&&U.DomUtil.setPosition(this._icon,t,n,t,this.options.scale),this._shadow&&U.DomUtil.setPosition(this._shadow,t,n,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_applyRotation(){this.options.rotation&&(this._icon.style[U.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,U.DomUtil.TRANSFORM==="msTransform"?this._icon.style[U.DomUtil.TRANSFORM]="rotate("+this.options.rotation+"deg)":this._icon.style[U.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotation+"deg)")},startTwinkle(t,n){this.twinkle(t,n)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(t=200,n=1/0){let a=!1,l=0;const c=()=>{l++,n&&t&&l>Math.floor(n/t)?(this.setOpacity(1),this.twinkleTimer=void 0):(a?(this.setOpacity(0),a=!1):(this.setOpacity(1),a=!0),this.twinkleTimer=setTimeout(c,t))};c()}}),U.Map.include({hasLayer:function(t){return t&&U.Util.stamp(t)in this._layers},removeLayerById:function(t){const n=this.getLayer(t);n&&this.removeLayer(n)}}),U.Path.addInitHook(function(){this.options.color&&(this.color=$t.Color.from(this.options.color)),this.options.fillColor&&(this.fillColor=$t.Color.from(this.options.fillColor))}),U.Polyline.addInitHook(function(){this.options.showMeasurements&&this.showMeasurements()}),U.Circle.include({toGeoJSON(){return{type:"Feature",properties:{},geometry:{type:"Circle",radius:this.getRadius(),coordinates:[this._latlng.lng,this._latlng.lat]}}}}),U.Layer.addInitHook(function(){this._leaflet_id=this.options.id||U.stamp({})}),U.LayerGroup.include({getLayerId(t){return t._leaflet_id},hasLayer(t){return t?(["number","string"].includes(typeof t)?t:this.getLayerId(t))in this._layers:!1}}),U.GridLayer.include({_setZoomTransform:function(t,l,a){var c=l,l=(c!=null&&this.options&&(this.options.corrdType=="gcj02"?c=$t.CoordsUtil.gcjEncrypt(l.lat,l.lng):this.options.corrdType=="bd09"&&(l=$t.CoordsUtil.gcjEncrypt(l.lat,l.lng),c=$t.CoordsUtil.bdEncrypt(l.lat,l.lng))),this._map.getZoomScale(a,t.zoom)),c=t.origin.multiplyBy(l).subtract(this._map._getNewPixelOrigin(c,a)).round();U.Browser.any3d?U.DomUtil.setTransform(t.el,c,l):U.DomUtil.setPosition(t.el,c)},_getTiledPixelBounds:function(l){var a=l,l=(a!=null&&this.options&&(this.options.corrdType=="gcj02"?a=$t.CoordsUtil.gcjEncrypt(l.lat,l.lng):this.options.corrdType=="bd09"&&(l=$t.CoordsUtil.gcjEncrypt(l.lat,l.lng),a=$t.CoordsUtil.bdEncrypt(l.lat,l.lng))),this._map),n=l._animatingZoom?Math.max(l._animateToZoom,l.getZoom()):l.getZoom(),n=l.getZoomScale(n,this._tileZoom),a=l.project(a,this._tileZoom).floor(),l=l.getSize().divideBy(2*n);return new U.Bounds(a.subtract(l),a.add(l))}}),U.TileLayer.addInitHook(function(){this.on("add",function(t){this._container.style.filter=Object.keys(this.options.style||{}).map(n=>`${n}(${this.options.style[n]})`).join(" ")})}),U.Polyline.include({_originalOnAdd:U.Polyline.prototype.onAdd,_originalOnRemove:U.Polyline.prototype.onRemove,_originalSetLatLngs:U.Polyline.prototype.setLatLngs,_originalAddLatLng:U.Polyline.prototype.addLatLng,setLatLngs:function(t){var n=this._map&&this._vertexMarkers&&this._latlngs.length!==t.length;this._originalSetLatLngs(t),n&&(this.removeVertexMarkers(),this.destroyVertexMarkers(),this.createVertexMarkers()),this.options.showMeasurements&&this.updateMeasurements()},removeVertexMarkers:function(){this._map&&this._vertexMarkers&&(this._map.removeLayer(this._vertexMarkers),this._vertexMarkers=void 0)},onAdd:function(t){this._originalOnAdd(t),this.createVertexMarkers(),this.options.showMeasurements&&this.showMeasurements(this.options.measurementOptions)},createVertexMarkers:function(){if(this._map){var t=this.options.vertexMarkers||{};this._vertexMarkers===void 0&&this.options.vertexMarkers&&(this._vertexMarkers=new Gr(this,t).addTo(this._map))}},destroyVertexMarkers:function(){this._vertexMarkers&&(this._vertexMarkers=void 0)},onRemove:function(t){this.removeVertexMarkers(),this._originalOnRemove(t),this.options.showMeasurements&&this.hideMeasurements()},showMeasurements(t){return!this._map||this._measurementLayer?this:(this._measurementOptions=U.extend({showCloseButton:!1,minPixelDistance:30,showDistances:!0,showArea:!0,showAggregate:!0,lang:{totalLength:"Total length",totalArea:"Total area",segmentLength:"Segment length"},map:this._map},t||{}),this._measurementLayer=new U.LayerGroup().addTo(this._map),this.updateMeasurements(),this._map.on("zoomend",this.updateMeasurements,this),this)},hideMeasurements(){return this._map.off("zoomend",this.updateMeasurements,this),this._measurementLayer?(this._map.removeLayer(this._measurementLayer),this._measurementLayer=null,this):this},tempFormatDistance(t){const n=this._map.options.crs,a=new Array;for(let T=0;T<t.length;T++){const G=n.project(t[T]);a.push(G)}const l=a.length;let c=0,f,p,g,A,k,C;for(let T=0;T<l-1;T++)f=a[T],g=f.x,A=f.y,p=a[T+1],k=p.x,C=p.y,c+=Math.sqrt((g-k)*(g-k)+(A-C)*(A-C));const x=c;let b="";return x>1e3?b="总长:"+Number(x/1e3).toFixed(1)+"公里":b="总长:"+Math.round(x)+"米",b},tempMoveFormatDistance(t,n){const a=this._map.options.crs;t=a.project(t),t=new Array(t),n=a.project(n),t.push(n);const l=t.length;let c=0,f,p,g,A,k,C;for(let T=0;T<l-1;T++)f=t[T],g=f.x,A=f.y,p=t[T+1],k=p.x,C=p.y,c+=Math.sqrt((g-k)*(g-k)+(A-C)*(A-C));const x=c;let b="";return x>1e3?b=Number(x/1e3).toFixed(1)+"公里":b=Math.round(x)+"米",b},tempFormatArea(t){const n=this._map.options.crs,a=new Array;for(let Z=0;Z<t.length;Z++){const K=n.project(t[Z]);a.push(K)}let l=!0;for(var c=0;c<a.length-1;c++){a[c].x>180?l=!0:l=!1;break}const f=a.length;let p=0,g,A,k=0,C=0,x=0,b=0;if(a!=null){let Z;if(l)for(var c=0;c<f;c++)Z=(c+1)%f,g=a[c],A=a[Z],p+=g.x*A.y,p-=g.y*A.x;else{let at,rt=0,ct=0;for(var c=0;c<f;c++)g=a[c],at=g.x,c==0?(rt=at,ct=at):(at<rt&&(rt=at),at>ct&&(ct=at));const yt=parseInt(((rt+ct)/2+3)/6);for(var c=0;c<f;c++)Z=(c+1)%f,c==0?(g=a[c],k=widget.LonLatToXA80N(yt,g.x,g.y)[0],C=widget.LonLatToXA80N(yt,g.x,g.y)[1]):(k=x,C=b),A=a[Z],x=widget.LonLatToXA80N(yt,A.x,A.y)[0],b=widget.LonLatToXA80N(yt,A.x,A.y)[1],p+=k*b,p-=x*C}}const T=Math.abs(p/2);let G="";return T>1e6?G="总面积:"+Number(T/1e6).toFixed(4)+`平方公里
|
|
5
|
-
(约:`+Number(T*.0015).toFixed(3)+"亩)":G="总面积:"+T.toFixed(0)+`平方米
|
|
6
|
-
(约:`+Number(T*.0015).toFixed(3)+"亩)",G},updateMeasurements(){if(!this._measurementLayer)return this;const t=this.getLatLngs();new Array().push(t);let a=this.getLatLngs();const l=this instanceof U.Polygon,c=this._measurementOptions;let f,p,g,A,k;if(a&&a.length&&U.Util.isArray(a[0])&&(a=a[0]),this._measurementLayer.clearLayers(),this._measurementOptions.showDistances&&a.length>1){t.length-1;for(let C=1,x=a.length;l&&C<=x||C<x;C++)if(f=a[C-1],p=a[C%x],f.distanceTo(p),g=this._map.latLngToLayerPoint(f),A=this._map.latLngToLayerPoint(p),k=g.distanceTo(A),k>=c.minPixelDistance){const b=this.tempMoveFormatDistance(f,p);new ls(this._map.layerPointToLatLng([(g.x+A.x)/2,(g.y+A.y)/2]),b,c.lang.segmentLength,this._getRotation(f,p),c).addTo(this._measurementLayer)}!l&&this._measurementOptions.showAggregate&&(new ls(p,this.tempFormatDistance(t),c.lang.totalLength,0,c).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatDistance(t))}return l&&c.showArea&&a.length>2&&(new ls(this.getBounds().getCenter(),this.tempFormatArea(t[0]),c.lang.totalArea,0,c).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatArea(t[0])),this},_getRotation(t,n){const a=this._map.project(t),l=this._map.project(n);return Math.atan((l.y-a.y)/(l.x-a.x))}}),U.LatLng.prototype.toArray=function(){return[this.lat,this.lng]},U.Path.include({startTwinkle(t,n,a={}){this.twinkle(t,n,a)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(t=200,n=1/0,a){let l=!1,c=0;const f=this.options,p=()=>{c++,n&&t&&c>Math.floor(n/t)?(this.setStyle({...f,fill:!0,stroke:!0}),this.twinkleTimer=void 0):(l?(this.setStyle({...a,fill:!1,stroke:!1}),l=!1):(this.setStyle({...a,fill:!0,stroke:!0}),l=!0),this.twinkleTimer=setTimeout(p,t))};p()},getArea(t){if(this instanceof U.Polyline){var n,a=this._latlngs[0],l=(t||this._map).options.crs,c=a.length;let f=0,p,g;if(a!=null)for(let A=0;A<c;A++)n=(A+1)%c,p=180<a[A].lng&&90<a[A].lat?{x:a[A].lat,y:a[A].lng}:l.project(a[A]),g=180<a[n].lng&&90<a[n].lat?{x:a[n].lat,y:a[n].lng}:l.project(a[n]),f=(f+=p.x*g.y)-p.y*g.x;return Math.abs(f/2)}else return this instanceof U.Circle?2*Math.PI*this.getRadius():null},getLength(t){if(this instanceof U.Polyline){for(var n=[],a=(t||this._map).options.crs,l=this._latlngs,c=0;c<l.length;c++)this instanceof U.Polygon?n.push(...l[c]):this instanceof U.Polyline&&n.push(l[c]);let k=0,C,x;for(let b=0,T=n.length-1;b<T;b++){C=180<n[b][0]&&90<n[b][1]?{x:n[b].lat,y:n[b].lng}:a.project(n[b]),x=180<n[b+1][0]&&90<n[b+1][1]?{x:n[b+1].lat,y:n[b+1].lng}:a.project(n[b+1]);var f=C.x,p=C.y,g=x.x,A=x.y;k+=Math.sqrt((f-g)*(f-g)+(p-A)*(p-A))}return k}else return this instanceof U.Circle?Math.PI*Math.pow(this.getRadius(),2):null}}),U.Control.mergeOptions({offset:[0,0]}),U.Control.addInitHook(function(){const{className:t,offset:[n,a]}=this.options;(n||a)&&setTimeout(()=>{const l=this.getContainer();l&&(l.style.transform=`translate(${n}px, ${a}px)`,t&&l.classList.add(t))},200)}),U.Canvas.include({_fillStroke:function(t,n){var a=n.options;if(a.fill&&(t.globalAlpha=a.fillOpacity,t.fillStyle=a.fillColor||a.color,t.fill(a.fillRule||"evenodd")),a.stroke&&a.weight!==0&&(t.setLineDash&&t.setLineDash(n.options&&n.options._dashArray||[]),t.globalAlpha=a.opacity,t.lineWidth=a.weight,t.strokeStyle=a.color,t.lineCap=a.lineCap,t.lineJoin=a.lineJoin,t.stroke(),a.img)){const l=new Image;l.src=a.img,l.onload=function(){t.save(),t.clip();var c=n instanceof U.Circle?n._pxBounds:n._rawPxBounds,f=c.getSize(),p=t.createPattern(l,"repeat");t.fillStyle=p,t.fillRect(c.min.x,c.min.y,f.x,f.y),t.restore()}}}}),U.SVG.include({_updateStyle:function(t){var n=t._path,a=t.options;n&&(a.stroke?(n.setAttribute("stroke",a.color),n.setAttribute("stroke-opacity",a.opacity),n.setAttribute("stroke-width",a.weight),n.setAttribute("stroke-linecap",a.lineCap),n.setAttribute("stroke-linejoin",a.lineJoin),a.dashArray?n.setAttribute("stroke-dasharray",a.dashArray):n.removeAttribute("stroke-dasharray"),a.dashOffset?n.setAttribute("stroke-dashoffset",a.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),a.img?(typeof a.img=="string"&&a.img.match(/^url\(/)?this.__fillPattern(t):n.setAttribute("fill",a.fillColor||a.color),n.setAttribute("fill-opacity",a.fillOpacity),n.setAttribute("fill-rule",a.fillRule||"evenodd")):(n.setAttribute("fill",a.fillColor),n.setAttribute("fill-opacity",t instanceof U.Polygon||t instanceof L.Circle||t instanceof L.CircleMarker?a.fillOpacity:0)))},__fillPattern:function(t){var n=t._path,a=t.options;this._defs||(this._defs=L.SVG.create("defs"),this._container.appendChild(this._defs));var l=a.img.substring(4,a.img.length-1),c=l+(Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17));c+=new Date().getUTCMilliseconds();var f=document.getElementById(c);if(!f){var p=new Image;p.src=l,f=L.SVG.create("pattern"),f.setAttribute("id",c),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("patternUnits","userSpaceOnUse"),f.setAttribute("width","24"),f.setAttribute("height","24");var g=L.SVG.create("rect");g.setAttribute("width",24),g.setAttribute("height",24),g.setAttribute("x",0),g.setAttribute("x",0),g.setAttribute("fill",a.fillColor||a.color),f.appendChild(g),this._defs.appendChild(f);var A=L.SVG.create("image");A.setAttribute("x","0"),A.setAttribute("y","0"),A.setAttributeNS("http://www.w3.org/1999/xlink","href",l),A.setAttribute("width","24"),A.setAttribute("height","24"),f.appendChild(A),p.onload=function(){f.setAttribute("width",p.width),f.setAttribute("height",p.height),A.setAttribute("width",p.width),A.setAttribute("height",p.height)}}n.setAttribute("fill","url(#"+c+")")}});var Rl={exports:{}};function Gl(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var n=1;n<=60;++n)t("EPSG:"+(32600+n),"+proj=utm +zone="+n+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+n),"+proj=utm +zone="+n+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}var Ji=1,Qi=2,Mn=3,Fl=4,Fr=5,yh=6378137,zl=6356752314e-3,vh=.0066943799901413165,us=484813681109536e-20,ut=Math.PI/2,Nl=.16666666666666666,Ul=.04722222222222222,Zl=.022156084656084655,dt=1e-10,ye=.017453292519943295,ui=57.29577951308232,jt=Math.PI/4,cs=Math.PI*2,he=3.14159265359,Ge={};Ge.greenwich=0,Ge.lisbon=-9.131906111111,Ge.paris=2.337229166667,Ge.bogota=-74.080916666667,Ge.madrid=-3.687938888889,Ge.rome=12.452333333333,Ge.bern=7.439583333333,Ge.jakarta=106.807719444444,Ge.ferro=-17.666666666667,Ge.brussels=4.367975,Ge.stockholm=18.058277777778,Ge.athens=23.7163375,Ge.oslo=10.722916666667;const jl={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var Ah=/[\s_\-\/\(\)]/g;function Di(t,n){if(t[n])return t[n];for(var a=Object.keys(t),l=n.toLowerCase().replace(Ah,""),c=-1,f,p;++c<a.length;)if(f=a[c],p=f.toLowerCase().replace(Ah,""),p===l)return t[f]}function zr(t){var n={},a=t.split("+").map(function(g){return g.trim()}).filter(function(g){return g}).reduce(function(g,A){var k=A.split("=");return k.push(!0),g[k[0].toLowerCase()]=k[1],g},{}),l,c,f,p={proj:"projName",datum:"datumCode",rf:function(g){n.rf=parseFloat(g)},lat_0:function(g){n.lat0=g*ye},lat_1:function(g){n.lat1=g*ye},lat_2:function(g){n.lat2=g*ye},lat_ts:function(g){n.lat_ts=g*ye},lon_0:function(g){n.long0=g*ye},lon_1:function(g){n.long1=g*ye},lon_2:function(g){n.long2=g*ye},alpha:function(g){n.alpha=parseFloat(g)*ye},gamma:function(g){n.rectified_grid_angle=parseFloat(g)*ye},lonc:function(g){n.longc=g*ye},x_0:function(g){n.x0=parseFloat(g)},y_0:function(g){n.y0=parseFloat(g)},k_0:function(g){n.k0=parseFloat(g)},k:function(g){n.k0=parseFloat(g)},a:function(g){n.a=parseFloat(g)},b:function(g){n.b=parseFloat(g)},r:function(g){n.a=n.b=parseFloat(g)},r_a:function(){n.R_A=!0},zone:function(g){n.zone=parseInt(g,10)},south:function(){n.utmSouth=!0},towgs84:function(g){n.datum_params=g.split(",").map(function(A){return parseFloat(A)})},to_meter:function(g){n.to_meter=parseFloat(g)},units:function(g){n.units=g;var A=Di(jl,g);A&&(n.to_meter=A.to_meter)},from_greenwich:function(g){n.from_greenwich=g*ye},pm:function(g){var A=Di(Ge,g);n.from_greenwich=(A||parseFloat(g))*ye},nadgrids:function(g){g==="@null"?n.datumCode="none":n.nadgrids=g},axis:function(g){var A="ewnsud";g.length===3&&A.indexOf(g.substr(0,1))!==-1&&A.indexOf(g.substr(1,1))!==-1&&A.indexOf(g.substr(2,1))!==-1&&(n.axis=g)},approx:function(){n.approx=!0}};for(l in a)c=a[l],l in p?(f=p[l],typeof f=="function"?f(c):n[f]=c):n[l]=c;return typeof n.datumCode=="string"&&n.datumCode!=="WGS84"&&(n.datumCode=n.datumCode.toLowerCase()),n}class Mh{static getId(n){const a=n.find(l=>Array.isArray(l)&&l[0]==="ID");return a&&a.length>=3?{authority:a[1],code:parseInt(a[2],10)}:null}static convertUnit(n,a="unit"){if(!n||n.length<3)return{type:a,name:"unknown",conversion_factor:null};const l=n[1],c=parseFloat(n[2])||null,f=n.find(g=>Array.isArray(g)&&g[0]==="ID"),p=f?{authority:f[1],code:parseInt(f[2],10)}:null;return{type:a,name:l,conversion_factor:c,id:p}}static convertAxis(n){const a=n[1]||"Unknown";let l;const c=a.match(/^\((.)\)$/);if(c){const k=c[1].toUpperCase();if(k==="E")l="east";else if(k==="N")l="north";else if(k==="U")l="up";else throw new Error(`Unknown axis abbreviation: ${k}`)}else l=n[2]?n[2].toLowerCase():"unknown";const f=n.find(k=>Array.isArray(k)&&k[0]==="ORDER"),p=f?parseInt(f[1],10):null,g=n.find(k=>Array.isArray(k)&&(k[0]==="LENGTHUNIT"||k[0]==="ANGLEUNIT"||k[0]==="SCALEUNIT")),A=this.convertUnit(g);return{name:a,direction:l,unit:A,order:p}}static extractAxes(n){return n.filter(a=>Array.isArray(a)&&a[0]==="AXIS").map(a=>this.convertAxis(a)).sort((a,l)=>(a.order||0)-(l.order||0))}static convert(n,a={}){switch(n[0]){case"PROJCRS":a.type="ProjectedCRS",a.name=n[1],a.base_crs=n.find(b=>Array.isArray(b)&&b[0]==="BASEGEOGCRS")?this.convert(n.find(b=>Array.isArray(b)&&b[0]==="BASEGEOGCRS")):null,a.conversion=n.find(b=>Array.isArray(b)&&b[0]==="CONVERSION")?this.convert(n.find(b=>Array.isArray(b)&&b[0]==="CONVERSION")):null;const l=n.find(b=>Array.isArray(b)&&b[0]==="CS");l&&(a.coordinate_system={type:l[1],axis:this.extractAxes(n)});const c=n.find(b=>Array.isArray(b)&&b[0]==="LENGTHUNIT");if(c){const b=this.convertUnit(c);a.coordinate_system.unit=b}a.id=this.getId(n);break;case"BASEGEOGCRS":case"GEOGCRS":a.type="GeographicCRS",a.name=n[1];const f=n.find(b=>Array.isArray(b)&&(b[0]==="DATUM"||b[0]==="ENSEMBLE"));if(f){const b=this.convert(f);f[0]==="ENSEMBLE"?a.datum_ensemble=b:a.datum=b;const T=n.find(G=>Array.isArray(G)&&G[0]==="PRIMEM");T&&T[1]!=="Greenwich"&&(b.prime_meridian={name:T[1],longitude:parseFloat(T[2])})}a.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(n)},a.id=this.getId(n);break;case"DATUM":a.type="GeodeticReferenceFrame",a.name=n[1],a.ellipsoid=n.find(b=>Array.isArray(b)&&b[0]==="ELLIPSOID")?this.convert(n.find(b=>Array.isArray(b)&&b[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":a.type="DatumEnsemble",a.name=n[1],a.members=n.filter(b=>Array.isArray(b)&&b[0]==="MEMBER").map(b=>({type:"DatumEnsembleMember",name:b[1],id:this.getId(b)}));const p=n.find(b=>Array.isArray(b)&&b[0]==="ENSEMBLEACCURACY");p&&(a.accuracy=parseFloat(p[1]));const g=n.find(b=>Array.isArray(b)&&b[0]==="ELLIPSOID");g&&(a.ellipsoid=this.convert(g)),a.id=this.getId(n);break;case"ELLIPSOID":a.type="Ellipsoid",a.name=n[1],a.semi_major_axis=parseFloat(n[2]),a.inverse_flattening=parseFloat(n[3]),n.find(b=>Array.isArray(b)&&b[0]==="LENGTHUNIT")&&this.convert(n.find(b=>Array.isArray(b)&&b[0]==="LENGTHUNIT"),a);break;case"CONVERSION":a.type="Conversion",a.name=n[1],a.method=n.find(b=>Array.isArray(b)&&b[0]==="METHOD")?this.convert(n.find(b=>Array.isArray(b)&&b[0]==="METHOD")):null,a.parameters=n.filter(b=>Array.isArray(b)&&b[0]==="PARAMETER").map(b=>this.convert(b));break;case"METHOD":a.type="Method",a.name=n[1],a.id=this.getId(n);break;case"PARAMETER":a.type="Parameter",a.name=n[1],a.value=parseFloat(n[2]),a.unit=this.convertUnit(n.find(b=>Array.isArray(b)&&(b[0]==="LENGTHUNIT"||b[0]==="ANGLEUNIT"||b[0]==="SCALEUNIT"))),a.id=this.getId(n);break;case"BOUNDCRS":a.type="BoundCRS";const A=n.find(b=>Array.isArray(b)&&b[0]==="SOURCECRS");if(A){const b=A.find(T=>Array.isArray(T));a.source_crs=b?this.convert(b):null}const k=n.find(b=>Array.isArray(b)&&b[0]==="TARGETCRS");if(k){const b=k.find(T=>Array.isArray(T));a.target_crs=b?this.convert(b):null}const C=n.find(b=>Array.isArray(b)&&b[0]==="ABRIDGEDTRANSFORMATION");C?a.transformation=this.convert(C):a.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(a.type="Transformation",a.name=n[1],a.method=n.find(b=>Array.isArray(b)&&b[0]==="METHOD")?this.convert(n.find(b=>Array.isArray(b)&&b[0]==="METHOD")):null,a.parameters=n.filter(b=>Array.isArray(b)&&(b[0]==="PARAMETER"||b[0]==="PARAMETERFILE")).map(b=>{if(b[0]==="PARAMETER")return this.convert(b);if(b[0]==="PARAMETERFILE")return{name:b[1],value:b[2],id:{authority:"EPSG",code:8656}}}),a.parameters.length===7){const b=a.parameters[6];b.name==="Scale difference"&&(b.value=Math.round((b.value-1)*1e12)/1e6)}a.id=this.getId(n);break;case"AXIS":a.coordinate_system||(a.coordinate_system={type:"unspecified",axis:[]}),a.coordinate_system.axis.push(this.convertAxis(n));break;case"LENGTHUNIT":const x=this.convertUnit(n,"LinearUnit");a.coordinate_system&&a.coordinate_system.axis&&a.coordinate_system.axis.forEach(b=>{b.unit||(b.unit=x)}),x.conversion_factor&&x.conversion_factor!==1&&a.semi_major_axis&&(a.semi_major_axis={value:a.semi_major_axis,unit:x});break;default:a.keyword=n[0];break}return a}}class ql extends Mh{static convert(n,a={}){return super.convert(n,a),a.coordinate_system&&a.coordinate_system.subtype==="Cartesian"&&delete a.coordinate_system,a.usage&&delete a.usage,a}}class Hl extends Mh{static convert(n,a={}){super.convert(n,a);const l=n.find(f=>Array.isArray(f)&&f[0]==="CS");l&&(a.coordinate_system={subtype:l[1],axis:this.extractAxes(n)});const c=n.find(f=>Array.isArray(f)&&f[0]==="USAGE");if(c){const f=c.find(A=>Array.isArray(A)&&A[0]==="SCOPE"),p=c.find(A=>Array.isArray(A)&&A[0]==="AREA"),g=c.find(A=>Array.isArray(A)&&A[0]==="BBOX");a.usage={},f&&(a.usage.scope=f[1]),p&&(a.usage.area=p[1]),g&&(a.usage.bbox=g.slice(1))}return a}}function Vl(t){return t.find(n=>Array.isArray(n)&&n[0]==="USAGE")?"2019":(t.find(n=>Array.isArray(n)&&n[0]==="CS")||t[0]==="BOUNDCRS"||t[0]==="PROJCRS"||t[0]==="GEOGCRS","2015")}function $l(t){return(Vl(t)==="2019"?Hl:ql).convert(t)}function Wl(t){const n=t.toUpperCase();return n.includes("PROJCRS")||n.includes("GEOGCRS")||n.includes("BOUNDCRS")||n.includes("VERTCRS")||n.includes("LENGTHUNIT")||n.includes("ANGLEUNIT")||n.includes("SCALEUNIT")?"WKT2":(n.includes("PROJCS")||n.includes("GEOGCS")||n.includes("LOCAL_CS")||n.includes("VERT_CS")||n.includes("UNIT"),"WKT1")}var ds=1,xh=2,Lh=3,ya=4,bh=5,Nr=-1,Kl=/\s/,Xl=/[A-Za-z]/,Yl=/[A-Za-z84_]/,va=/[,\]]/,wh=/[\d\.E\-\+]/;function Mi(t){if(typeof t!="string")throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=ds}Mi.prototype.readCharicter=function(){var t=this.text[this.place++];if(this.state!==ya)for(;Kl.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case ds:return this.neutral(t);case xh:return this.keyword(t);case ya:return this.quoted(t);case bh:return this.afterquote(t);case Lh:return this.number(t);case Nr:return}},Mi.prototype.afterquote=function(t){if(t==='"'){this.word+='"',this.state=ya;return}if(va.test(t)){this.word=this.word.trim(),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in afterquote yet, index '+this.place)},Mi.prototype.afterItem=function(t){if(t===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ds;return}if(t==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ds,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Nr);return}},Mi.prototype.number=function(t){if(wh.test(t)){this.word+=t;return}if(va.test(t)){this.word=parseFloat(this.word),this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in number yet, index '+this.place)},Mi.prototype.quoted=function(t){if(t==='"'){this.state=bh;return}this.word+=t},Mi.prototype.keyword=function(t){if(Yl.test(t)){this.word+=t;return}if(t==="["){var n=[];n.push(this.word),this.level++,this.root===null?this.root=n:this.currentObject.push(n),this.stack.push(this.currentObject),this.currentObject=n,this.state=ds;return}if(va.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in keyword yet, index '+this.place)},Mi.prototype.neutral=function(t){if(Xl.test(t)){this.word=t,this.state=xh;return}if(t==='"'){this.word="",this.state=ya;return}if(wh.test(t)){this.word=t,this.state=Lh;return}if(va.test(t)){this.afterItem(t);return}throw new Error(`havn't handled "`+t+'" in neutral yet, index '+this.place)},Mi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Nr)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Jl(t){var n=new Mi(t);return n.output()}function Ur(t,n,a){Array.isArray(n)&&(a.unshift(n),n=null);var l=n?{}:t,c=a.reduce(function(f,p){return xn(p,f),f},l);n&&(t[n]=c)}function xn(t,n){if(!Array.isArray(t)){n[t]=!0;return}var a=t.shift();if(a==="PARAMETER"&&(a=t.shift()),t.length===1){if(Array.isArray(t[0])){n[a]={},xn(t[0],n[a]);return}n[a]=t[0];return}if(!t.length){n[a]=!0;return}if(a==="TOWGS84"){n[a]=t;return}if(a==="AXIS"){a in n||(n[a]=[]),n[a].push(t);return}Array.isArray(a)||(n[a]={});var l;switch(a){case"UNIT":case"PRIMEM":case"VERT_DATUM":n[a]={name:t[0].toLowerCase(),convert:t[1]},t.length===3&&xn(t[2],n[a]);return;case"SPHEROID":case"ELLIPSOID":n[a]={name:t[0],a:t[1],rf:t[2]},t.length===4&&xn(t[3],n[a]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":t[0]=["name",t[0]],Ur(n,a,t);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":t[0]=["name",t[0]],Ur(n,a,t),n[a].type=a;return;default:for(l=-1;++l<t.length;)if(!Array.isArray(t[l]))return xn(t,n[a]);return Ur(n,a,t)}}var Ql=.017453292519943295;function ei(t){return t*Ql}function Ch(t){const n=(t.projName||"").toLowerCase().replace(/_/g," ");!t.long0&&t.longc&&(n==="albers conic equal area"||n==="lambert azimuthal equal area")&&(t.long0=t.longc),!t.lat_ts&&t.lat1&&(n==="stereographic south pole"||n==="polar stereographic (variant b)")?(t.lat0=ei(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1):!t.lat_ts&&t.lat0&&(n==="polar stereographic"||n==="polar stereographic (variant a)")&&(t.lat_ts=t.lat0,t.lat0=ei(t.lat0>0?90:-90),delete t.lat1)}function Eh(t){let n={units:null,to_meter:void 0};return typeof t=="string"?(n.units=t.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.units==="meter"&&(n.to_meter=1)):t&&t.name&&(n.units=t.name.toLowerCase(),n.units==="metre"&&(n.units="meter"),n.to_meter=t.conversion_factor),n}function Ph(t){return typeof t=="object"?t.value*t.unit.conversion_factor:t}function kh(t,n){t.ellipsoid.radius?(n.a=t.ellipsoid.radius,n.rf=0):(n.a=Ph(t.ellipsoid.semi_major_axis),t.ellipsoid.inverse_flattening!==void 0?n.rf=t.ellipsoid.inverse_flattening:t.ellipsoid.semi_major_axis!==void 0&&t.ellipsoid.semi_minor_axis!==void 0&&(n.rf=n.a/(n.a-Ph(t.ellipsoid.semi_minor_axis))))}function Aa(t,n={}){return!t||typeof t!="object"?t:t.type==="BoundCRS"?(Aa(t.source_crs,n),t.transformation&&(t.transformation.method&&t.transformation.method.name==="NTv2"?n.nadgrids=t.transformation.parameters[0].value:n.datum_params=t.transformation.parameters.map(a=>a.value)),n):(Object.keys(t).forEach(a=>{const l=t[a];if(l!==null)switch(a){case"name":if(n.srsCode)break;n.name=l,n.srsCode=l;break;case"type":l==="GeographicCRS"?n.projName="longlat":l==="ProjectedCRS"&&t.conversion&&t.conversion.method&&(n.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":l.ellipsoid&&(n.ellps=l.ellipsoid.name,kh(l,n)),l.prime_meridian&&(n.from_greenwich=l.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":n.ellps=l.name,kh(l,n);break;case"prime_meridian":n.long0=(l.longitude||0)*Math.PI/180;break;case"coordinate_system":if(l.axis){if(n.axis=l.axis.map(c=>{const f=c.direction;if(f==="east")return"e";if(f==="north")return"n";if(f==="west")return"w";if(f==="south")return"s";throw new Error(`Unknown axis direction: ${f}`)}).join("")+"u",l.unit){const{units:c,to_meter:f}=Eh(l.unit);n.units=c,n.to_meter=f}else if(l.axis[0]&&l.axis[0].unit){const{units:c,to_meter:f}=Eh(l.axis[0].unit);n.units=c,n.to_meter=f}}break;case"id":l.authority&&l.code&&(n.title=l.authority+":"+l.code);break;case"conversion":l.method&&l.method.name&&(n.projName=l.method.name),l.parameters&&l.parameters.forEach(c=>{const f=c.name.toLowerCase().replace(/\s+/g,"_"),p=c.value;c.unit&&c.unit.conversion_factor?n[f]=p*c.unit.conversion_factor:c.unit==="degree"?n[f]=p*Math.PI/180:n[f]=p});break;case"unit":l.name&&(n.units=l.name.toLowerCase(),n.units==="metre"&&(n.units="meter")),l.conversion_factor&&(n.to_meter=l.conversion_factor);break;case"base_crs":Aa(l,n),n.datumCode=l.id?l.id.authority+"_"+l.id.code:l.name;break}}),n.latitude_of_false_origin!==void 0&&(n.lat0=n.latitude_of_false_origin),n.longitude_of_false_origin!==void 0&&(n.long0=n.longitude_of_false_origin),n.latitude_of_standard_parallel!==void 0&&(n.lat0=n.latitude_of_standard_parallel,n.lat1=n.latitude_of_standard_parallel),n.latitude_of_1st_standard_parallel!==void 0&&(n.lat1=n.latitude_of_1st_standard_parallel),n.latitude_of_2nd_standard_parallel!==void 0&&(n.lat2=n.latitude_of_2nd_standard_parallel),n.latitude_of_projection_centre!==void 0&&(n.lat0=n.latitude_of_projection_centre),n.longitude_of_projection_centre!==void 0&&(n.longc=n.longitude_of_projection_centre),n.easting_at_false_origin!==void 0&&(n.x0=n.easting_at_false_origin),n.northing_at_false_origin!==void 0&&(n.y0=n.northing_at_false_origin),n.latitude_of_natural_origin!==void 0&&(n.lat0=n.latitude_of_natural_origin),n.longitude_of_natural_origin!==void 0&&(n.long0=n.longitude_of_natural_origin),n.longitude_of_origin!==void 0&&(n.long0=n.longitude_of_origin),n.false_easting!==void 0&&(n.x0=n.false_easting),n.easting_at_projection_centre&&(n.x0=n.easting_at_projection_centre),n.false_northing!==void 0&&(n.y0=n.false_northing),n.northing_at_projection_centre&&(n.y0=n.northing_at_projection_centre),n.standard_parallel_1!==void 0&&(n.lat1=n.standard_parallel_1),n.standard_parallel_2!==void 0&&(n.lat2=n.standard_parallel_2),n.scale_factor_at_natural_origin!==void 0&&(n.k0=n.scale_factor_at_natural_origin),n.scale_factor_at_projection_centre!==void 0&&(n.k0=n.scale_factor_at_projection_centre),n.scale_factor_on_pseudo_standard_parallel!==void 0&&(n.k0=n.scale_factor_on_pseudo_standard_parallel),n.azimuth!==void 0&&(n.alpha=n.azimuth),n.azimuth_at_projection_centre!==void 0&&(n.alpha=n.azimuth_at_projection_centre),n.angle_from_rectified_to_skew_grid&&(n.rectified_grid_angle=n.angle_from_rectified_to_skew_grid),Ch(n),n)}var tu=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function eu(t,n){var a=n[0],l=n[1];!(a in t)&&l in t&&(t[a]=t[l],n.length===3&&(t[a]=n[2](t[a])))}function Bh(t){for(var n=Object.keys(t),a=0,l=n.length;a<l;++a){var c=n[a];tu.indexOf(c)!==-1&&iu(t[c]),typeof t[c]=="object"&&Bh(t[c])}}function iu(t){if(t.AUTHORITY){var n=Object.keys(t.AUTHORITY)[0];n&&n in t.AUTHORITY&&(t.title=n+":"+t.AUTHORITY[n])}if(t.type==="GEOGCS"?t.projName="longlat":t.type==="LOCAL_CS"?(t.projName="identity",t.local=!0):typeof t.PROJECTION=="object"?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var a="",l=0,c=t.AXIS.length;l<c;++l){var f=[t.AXIS[l][0].toLowerCase(),t.AXIS[l][1].toLowerCase()];f[0].indexOf("north")!==-1||(f[0]==="y"||f[0]==="lat")&&f[1]==="north"?a+="n":f[0].indexOf("south")!==-1||(f[0]==="y"||f[0]==="lat")&&f[1]==="south"?a+="s":f[0].indexOf("east")!==-1||(f[0]==="x"||f[0]==="lon")&&f[1]==="east"?a+="e":(f[0].indexOf("west")!==-1||(f[0]==="x"||f[0]==="lon")&&f[1]==="west")&&(a+="w")}a.length===2&&(a+="u"),a.length===3&&(t.axis=a)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.UNIT.convert&&(t.type==="GEOGCS"?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var p=t.GEOGCS;t.type==="GEOGCS"&&(p=t),p&&(p.DATUM?t.datumCode=p.DATUM.name.toLowerCase():t.datumCode=p.name.toLowerCase(),t.datumCode.slice(0,2)==="d_"&&(t.datumCode=t.datumCode.slice(2)),t.datumCode==="new_zealand_1949"&&(t.datumCode="nzgd49"),(t.datumCode==="wgs_1984"||t.datumCode==="world_geodetic_system_1984")&&(t.PROJECTION==="Mercator_Auxiliary_Sphere"&&(t.sphere=!0),t.datumCode="wgs84"),t.datumCode==="belge_1972"&&(t.datumCode="rnb72"),p.DATUM&&p.DATUM.SPHEROID&&(t.ellps=p.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),t.ellps.toLowerCase().slice(0,13)==="international"&&(t.ellps="intl"),t.a=p.DATUM.SPHEROID.a,t.rf=parseFloat(p.DATUM.SPHEROID.rf,10)),p.DATUM&&p.DATUM.TOWGS84&&(t.datum_params=p.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),t.datumCode==="ch1903+"&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=ei(t.rectified_grid_angle));function g(C){var x=t.to_meter||1;return C*x}var A=function(C){return eu(t,C)},k=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",ei],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ei],["x0","false_easting",g],["y0","false_northing",g],["long0","central_meridian",ei],["lat0","latitude_of_origin",ei],["lat0","standard_parallel_1",ei],["lat1","standard_parallel_1",ei],["lat2","standard_parallel_2",ei],["azimuth","Azimuth"],["alpha","azimuth",ei],["srsCode","name"]];k.forEach(A),Ch(t)}function Zr(t){if(typeof t=="object")return Aa(t);const n=Wl(t);var a=Jl(t);if(n==="WKT2"){const f=$l(a);return Aa(f)}var l=a[0],c={};return xn(a,c),Bh(c),c[l]}function Se(t){var n=this;if(arguments.length===2){var a=arguments[1];typeof a=="string"?a.charAt(0)==="+"?Se[t]=zr(arguments[1]):Se[t]=Zr(arguments[1]):Se[t]=a}else if(arguments.length===1){if(Array.isArray(t))return t.map(function(l){return Array.isArray(l)?Se.apply(n,l):Se(l)});if(typeof t=="string"){if(t in Se)return Se[t]}else"EPSG"in t?Se["EPSG:"+t.EPSG]=t:"ESRI"in t?Se["ESRI:"+t.ESRI]=t:"IAU2000"in t?Se["IAU2000:"+t.IAU2000]=t:console.log(t);return}}Gl(Se);function nu(t){return typeof t=="string"}function su(t){return t in Se}function au(t){return t.indexOf("+")!==0&&t.indexOf("[")!==-1||typeof t=="object"&&!("srsCode"in t)}var ru=["3857","900913","3785","102113"];function ou(t){var n=Di(t,"authority");if(n){var a=Di(n,"epsg");return a&&ru.indexOf(a)>-1}}function hu(t){var n=Di(t,"extension");if(n)return Di(n,"proj4")}function lu(t){return t[0]==="+"}function uu(t){if(nu(t)){if(su(t))return Se[t];if(au(t)){var n=Zr(t);if(ou(n))return Se["EPSG:3857"];var a=hu(n);return a?zr(a):n}if(lu(t))return zr(t)}else return"projName"in t?t:Zr(t)}function Sh(t,n){t=t||{};var a,l;if(!n)return t;for(l in n)a=n[l],a!==void 0&&(t[l]=a);return t}function ci(t,n,a){var l=t*n;return a/Math.sqrt(1-l*l)}function fs(t){return t<0?-1:1}function _t(t){return Math.abs(t)<=he?t:t-fs(t)*cs}function ii(t,n,a){var l=t*a,c=.5*t;return l=Math.pow((1-l)/(1+l),c),Math.tan(.5*(ut-n))/l}function ps(t,n){for(var a=.5*t,l,c,f=ut-2*Math.atan(n),p=0;p<=15;p++)if(l=t*Math.sin(f),c=ut-2*Math.atan(n*Math.pow((1-l)/(1+l),a))-f,f+=c,Math.abs(c)<=1e-10)return f;return-9999}function cu(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function du(t){var n=t.x,a=t.y;if(a*ui>90&&a*ui<-90&&n*ui>180&&n*ui<-180)return null;var l,c;if(Math.abs(Math.abs(a)-ut)<=dt)return null;if(this.sphere)l=this.x0+this.a*this.k0*_t(n-this.long0),c=this.y0+this.a*this.k0*Math.log(Math.tan(jt+.5*a));else{var f=Math.sin(a),p=ii(this.e,a,f);l=this.x0+this.a*this.k0*_t(n-this.long0),c=this.y0-this.a*this.k0*Math.log(p)}return t.x=l,t.y=c,t}function fu(t){var n=t.x-this.x0,a=t.y-this.y0,l,c;if(this.sphere)c=ut-2*Math.atan(Math.exp(-a/(this.a*this.k0)));else{var f=Math.exp(-a/(this.a*this.k0));if(c=ps(this.e,f),c===-9999)return null}return l=_t(this.long0+n/(this.a*this.k0)),t.x=l,t.y=c,t}var pu=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const _u={init:cu,forward:du,inverse:fu,names:pu};function mu(){}function Th(t){return t}var gu=["longlat","identity"],yu=[_u,{init:mu,forward:Th,inverse:Th,names:gu}],tn={},Ln=[];function Dh(t,n){var a=Ln.length;return t.names?(Ln[a]=t,t.names.forEach(function(l){tn[l.toLowerCase()]=a}),this):(console.log(n),!0)}function Oh(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function vu(t){if(!t)return!1;var n=t.toLowerCase();if(typeof tn[n]<"u"&&Ln[tn[n]]||(n=Oh(n),n in tn&&Ln[tn[n]]))return Ln[tn[n]]}function Au(){yu.forEach(Dh)}const Mu={start:Au,add:Dh,get:vu};var Ih={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const xu=Ih.WGS84;function Lu(t,n,a,l){var c=t*t,f=n*n,p=(c-f)/c,g=0;l?(t*=1-p*(Nl+p*(Ul+p*Zl)),c=t*t,p=0):g=Math.sqrt(p);var A=(c-f)/f;return{es:p,e:g,ep2:A}}function bu(t,n,a,l,c){if(!t){var f=Di(Ih,l);f||(f=xu),t=f.a,n=f.b,a=f.rf}return a&&!n&&(n=(1-1/a)*t),(a===0||Math.abs(t-n)<dt)&&(c=!0,n=t),{a:t,b:n,rf:a,sphere:c}}var Ma={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var wu in Ma){var jr=Ma[wu];jr.datumName&&(Ma[jr.datumName]=jr)}function Cu(t,n,a,l,c,f,p){var g={};return t===void 0||t==="none"?g.datum_type=Fr:g.datum_type=Fl,n&&(g.datum_params=n.map(parseFloat),(g.datum_params[0]!==0||g.datum_params[1]!==0||g.datum_params[2]!==0)&&(g.datum_type=Ji),g.datum_params.length>3&&(g.datum_params[3]!==0||g.datum_params[4]!==0||g.datum_params[5]!==0||g.datum_params[6]!==0)&&(g.datum_type=Qi,g.datum_params[3]*=us,g.datum_params[4]*=us,g.datum_params[5]*=us,g.datum_params[6]=g.datum_params[6]/1e6+1)),p&&(g.datum_type=Mn,g.grids=p),g.a=a,g.b=l,g.es=c,g.ep2=f,g}var qr={};function Eu(t,n,a){return n instanceof ArrayBuffer?Pu(t,n,a):{ready:ku(t,n)}}function Pu(t,n,a){var l=!0;a!==void 0&&a.includeErrorFields===!1&&(l=!1);var c=new DataView(n),f=Tu(c),p=Du(c,f),g=Ou(c,p,f,l),A={header:p,subgrids:g};return qr[t]=A,A}async function ku(t,n){for(var a=[],l=await n.getImageCount(),c=l-1;c>=0;c--){var f=await n.getImage(c),p=await f.readRasters(),g=p,A=[f.getWidth(),f.getHeight()],k=f.getBoundingBox().map(Rh),C=[f.fileDirectory.ModelPixelScale[0],f.fileDirectory.ModelPixelScale[1]].map(Rh),x=k[0]+(A[0]-1)*C[0],b=k[3]-(A[1]-1)*C[1],T=g[0],G=g[1],Z=[];for(let rt=A[1]-1;rt>=0;rt--)for(let ct=A[0]-1;ct>=0;ct--){var K=rt*A[0]+ct;Z.push([-Oi(G[K]),Oi(T[K])])}a.push({del:C,lim:A,ll:[-x,b],cvs:Z})}var at={header:{nSubgrids:l},subgrids:a};return qr[t]=at,at}function Bu(t){if(t===void 0)return null;var n=t.split(",");return n.map(Su)}function Su(t){if(t.length===0)return null;var n=t[0]==="@";return n&&(t=t.slice(1)),t==="null"?{name:"null",mandatory:!n,grid:null,isNull:!0}:{name:t,mandatory:!n,grid:qr[t]||null,isNull:!1}}function Rh(t){return t*Math.PI/180}function Oi(t){return t/3600*Math.PI/180}function Tu(t){var n=t.getInt32(8,!1);return n===11?!1:(n=t.getInt32(8,!0),n!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function Du(t,n){return{nFields:t.getInt32(8,n),nSubgridFields:t.getInt32(24,n),nSubgrids:t.getInt32(40,n),shiftType:Hr(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,n),fromSemiMinorAxis:t.getFloat64(136,n),toSemiMajorAxis:t.getFloat64(152,n),toSemiMinorAxis:t.getFloat64(168,n)}}function Hr(t,n,a){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(n,a)))}function Ou(t,n,a,l){for(var c=176,f=[],p=0;p<n.nSubgrids;p++){var g=Ru(t,c,a),A=Gu(t,c,g,a,l),k=Math.round(1+(g.upperLongitude-g.lowerLongitude)/g.longitudeInterval),C=Math.round(1+(g.upperLatitude-g.lowerLatitude)/g.latitudeInterval);f.push({ll:[Oi(g.lowerLongitude),Oi(g.lowerLatitude)],del:[Oi(g.longitudeInterval),Oi(g.latitudeInterval)],lim:[k,C],count:g.gridNodeCount,cvs:Iu(A)});var x=16;l===!1&&(x=8),c+=176+g.gridNodeCount*x}return f}function Iu(t){return t.map(function(n){return[Oi(n.longitudeShift),Oi(n.latitudeShift)]})}function Ru(t,n,a){return{name:Hr(t,n+8,n+16).trim(),parent:Hr(t,n+24,n+24+8).trim(),lowerLatitude:t.getFloat64(n+72,a),upperLatitude:t.getFloat64(n+88,a),lowerLongitude:t.getFloat64(n+104,a),upperLongitude:t.getFloat64(n+120,a),latitudeInterval:t.getFloat64(n+136,a),longitudeInterval:t.getFloat64(n+152,a),gridNodeCount:t.getInt32(n+168,a)}}function Gu(t,n,a,l,c){var f=n+176,p=16;c===!1&&(p=8);for(var g=[],A=0;A<a.gridNodeCount;A++){var k={latitudeShift:t.getFloat32(f+A*p,l),longitudeShift:t.getFloat32(f+A*p+4,l)};c!==!1&&(k.latitudeAccuracy=t.getFloat32(f+A*p+8,l),k.longitudeAccuracy=t.getFloat32(f+A*p+12,l)),g.push(k)}return g}function ni(t,n){if(!(this instanceof ni))return new ni(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,n=n||function(k){if(k)throw k};var a=uu(t);if(typeof a!="object"){n("Could not parse to valid json: "+t);return}var l=ni.projections.get(a.projName);if(!l){n("Could not get projection name from: "+t);return}if(a.datumCode&&a.datumCode!=="none"){var c=Di(Ma,a.datumCode);c&&(a.datum_params=a.datum_params||(c.towgs84?c.towgs84.split(","):null),a.ellps=c.ellipse,a.datumName=c.datumName?c.datumName:a.datumCode)}a.k0=a.k0||1,a.axis=a.axis||"enu",a.ellps=a.ellps||"wgs84",a.lat1=a.lat1||a.lat0;var f=bu(a.a,a.b,a.rf,a.ellps,a.sphere),p=Lu(f.a,f.b,f.rf,a.R_A),g=Bu(a.nadgrids),A=a.datum||Cu(a.datumCode,a.datum_params,f.a,f.b,p.es,p.ep2,g);Sh(this,a),Sh(this,l),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=A,"init"in this&&typeof this.init=="function"&&this.init(),n(null,this)}ni.projections=Mu,ni.projections.start();function Fu(t,n){return t.datum_type!==n.datum_type||t.a!==n.a||Math.abs(t.es-n.es)>5e-11?!1:t.datum_type===Ji?t.datum_params[0]===n.datum_params[0]&&t.datum_params[1]===n.datum_params[1]&&t.datum_params[2]===n.datum_params[2]:t.datum_type===Qi?t.datum_params[0]===n.datum_params[0]&&t.datum_params[1]===n.datum_params[1]&&t.datum_params[2]===n.datum_params[2]&&t.datum_params[3]===n.datum_params[3]&&t.datum_params[4]===n.datum_params[4]&&t.datum_params[5]===n.datum_params[5]&&t.datum_params[6]===n.datum_params[6]:!0}function Gh(t,n,a){var l=t.x,c=t.y,f=t.z?t.z:0,p,g,A,k;if(c<-ut&&c>-1.001*ut)c=-ut;else if(c>ut&&c<1.001*ut)c=ut;else{if(c<-ut)return{x:-1/0,y:-1/0,z:t.z};if(c>ut)return{x:1/0,y:1/0,z:t.z}}return l>Math.PI&&(l-=2*Math.PI),g=Math.sin(c),k=Math.cos(c),A=g*g,p=a/Math.sqrt(1-n*A),{x:(p+f)*k*Math.cos(l),y:(p+f)*k*Math.sin(l),z:(p*(1-n)+f)*g}}function Fh(t,n,a,l){var c=1e-12,f=c*c,p=30,g,A,k,C,x,b,T,G,Z,K,at,rt,ct,yt=t.x,mt=t.y,xt=t.z?t.z:0,Dt,It,zt;if(g=Math.sqrt(yt*yt+mt*mt),A=Math.sqrt(yt*yt+mt*mt+xt*xt),g/a<c){if(Dt=0,A/a<c)return It=ut,zt=-l,{x:t.x,y:t.y,z:t.z}}else Dt=Math.atan2(mt,yt);k=xt/A,C=g/A,x=1/Math.sqrt(1-n*(2-n)*C*C),G=C*(1-n)*x,Z=k*x,ct=0;do ct++,T=a/Math.sqrt(1-n*Z*Z),zt=g*G+xt*Z-T*(1-n*Z*Z),b=n*T/(T+zt),x=1/Math.sqrt(1-b*(2-b)*C*C),K=C*(1-b)*x,at=k*x,rt=at*G-K*Z,G=K,Z=at;while(rt*rt>f&&ct<p);return It=Math.atan(at/Math.abs(K)),{x:Dt,y:It,z:zt}}function zu(t,n,a){if(n===Ji)return{x:t.x+a[0],y:t.y+a[1],z:t.z+a[2]};if(n===Qi){var l=a[0],c=a[1],f=a[2],p=a[3],g=a[4],A=a[5],k=a[6];return{x:k*(t.x-A*t.y+g*t.z)+l,y:k*(A*t.x+t.y-p*t.z)+c,z:k*(-g*t.x+p*t.y+t.z)+f}}}function Nu(t,n,a){if(n===Ji)return{x:t.x-a[0],y:t.y-a[1],z:t.z-a[2]};if(n===Qi){var l=a[0],c=a[1],f=a[2],p=a[3],g=a[4],A=a[5],k=a[6],C=(t.x-l)/k,x=(t.y-c)/k,b=(t.z-f)/k;return{x:C+A*x-g*b,y:-A*C+x+p*b,z:g*C-p*x+b}}}function xa(t){return t===Ji||t===Qi}function Uu(t,n,a){if(Fu(t,n)||t.datum_type===Fr||n.datum_type===Fr)return a;var l=t.a,c=t.es;if(t.datum_type===Mn){var f=zh(t,!1,a);if(f!==0)return;l=yh,c=vh}var p=n.a,g=n.b,A=n.es;if(n.datum_type===Mn&&(p=yh,g=zl,A=vh),c===A&&l===p&&!xa(t.datum_type)&&!xa(n.datum_type))return a;if(a=Gh(a,c,l),xa(t.datum_type)&&(a=zu(a,t.datum_type,t.datum_params)),xa(n.datum_type)&&(a=Nu(a,n.datum_type,n.datum_params)),a=Fh(a,A,p,g),n.datum_type===Mn){var k=zh(n,!0,a);if(k!==0)return}return a}function zh(t,n,a){if(t.grids===null||t.grids.length===0)return console.log("Grid shift grids not found"),-1;var l={x:-a.x,y:a.y},c={x:Number.NaN,y:Number.NaN},f=[];t:for(var p=0;p<t.grids.length;p++){var g=t.grids[p];if(f.push(g.name),g.isNull){c=l;break}if(g.grid===null){if(g.mandatory)return console.log("Unable to find mandatory grid '"+g.name+"'"),-1;continue}for(var A=g.grid.subgrids,k=0,C=A.length;k<C;k++){var x=A[k],b=(Math.abs(x.del[1])+Math.abs(x.del[0]))/1e4,T=x.ll[0]-b,G=x.ll[1]-b,Z=x.ll[0]+(x.lim[0]-1)*x.del[0]+b,K=x.ll[1]+(x.lim[1]-1)*x.del[1]+b;if(!(G>l.y||T>l.x||K<l.y||Z<l.x)&&(c=Zu(l,n,x),!isNaN(c.x)))break t}}return isNaN(c.x)?(console.log("Failed to find a grid shift table for location '"+-l.x*ui+" "+l.y*ui+" tried: '"+f+"'"),-1):(a.x=-c.x,a.y=c.y,0)}function Zu(t,n,a){var l={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return l;var c={x:t.x,y:t.y};c.x-=a.ll[0],c.y-=a.ll[1],c.x=_t(c.x-Math.PI)+Math.PI;var f=Nh(c,a);if(n){if(isNaN(f.x))return l;f.x=c.x-f.x,f.y=c.y-f.y;var p=9,g=1e-12,A,k;do{if(k=Nh(f,a),isNaN(k.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}A={x:c.x-(k.x+f.x),y:c.y-(k.y+f.y)},f.x+=A.x,f.y+=A.y}while(p--&&Math.abs(A.x)>g&&Math.abs(A.y)>g);if(p<0)return console.log("Inverse grid shift iterator failed to converge."),l;l.x=_t(f.x+a.ll[0]),l.y=f.y+a.ll[1]}else isNaN(f.x)||(l.x=t.x+f.x,l.y=t.y+f.y);return l}function Nh(t,n){var a={x:t.x/n.del[0],y:t.y/n.del[1]},l={x:Math.floor(a.x),y:Math.floor(a.y)},c={x:a.x-1*l.x,y:a.y-1*l.y},f={x:Number.NaN,y:Number.NaN},p;if(l.x<0||l.x>=n.lim[0]||l.y<0||l.y>=n.lim[1])return f;p=l.y*n.lim[0]+l.x;var g={x:n.cvs[p][0],y:n.cvs[p][1]};p++;var A={x:n.cvs[p][0],y:n.cvs[p][1]};p+=n.lim[0];var k={x:n.cvs[p][0],y:n.cvs[p][1]};p--;var C={x:n.cvs[p][0],y:n.cvs[p][1]},x=c.x*c.y,b=c.x*(1-c.y),T=(1-c.x)*(1-c.y),G=(1-c.x)*c.y;return f.x=T*g.x+b*A.x+G*C.x+x*k.x,f.y=T*g.y+b*A.y+G*C.y+x*k.y,f}function Uh(t,n,a){var l=a.x,c=a.y,f=a.z||0,p,g,A,k={};for(A=0;A<3;A++)if(!(n&&A===2&&a.z===void 0))switch(A===0?(p=l,"ew".indexOf(t.axis[A])!==-1?g="x":g="y"):A===1?(p=c,"ns".indexOf(t.axis[A])!==-1?g="y":g="x"):(p=f,g="z"),t.axis[A]){case"e":k[g]=p;break;case"w":k[g]=-p;break;case"n":k[g]=p;break;case"s":k[g]=-p;break;case"u":a[g]!==void 0&&(k.z=p);break;case"d":a[g]!==void 0&&(k.z=-p);break;default:return null}return k}function Zh(t){var n={x:t[0],y:t[1]};return t.length>2&&(n.z=t[2]),t.length>3&&(n.m=t[3]),n}function ju(t){jh(t.x),jh(t.y)}function jh(t){if(typeof Number.isFinite=="function"){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if(typeof t!="number"||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function qu(t,n){return(t.datum.datum_type===Ji||t.datum.datum_type===Qi||t.datum.datum_type===Mn)&&n.datumCode!=="WGS84"||(n.datum.datum_type===Ji||n.datum.datum_type===Qi||n.datum.datum_type===Mn)&&t.datumCode!=="WGS84"}function La(t,n,a,l){var c;Array.isArray(a)?a=Zh(a):a={x:a.x,y:a.y,z:a.z,m:a.m};var f=a.z!==void 0;if(ju(a),t.datum&&n.datum&&qu(t,n)&&(c=new ni("WGS84"),a=La(t,c,a,l),t=c),l&&t.axis!=="enu"&&(a=Uh(t,!1,a)),t.projName==="longlat")a={x:a.x*ye,y:a.y*ye,z:a.z||0};else if(t.to_meter&&(a={x:a.x*t.to_meter,y:a.y*t.to_meter,z:a.z||0}),a=t.inverse(a),!a)return;if(t.from_greenwich&&(a.x+=t.from_greenwich),a=Uu(t.datum,n.datum,a),!!a)return a=a,n.from_greenwich&&(a={x:a.x-n.from_greenwich,y:a.y,z:a.z||0}),n.projName==="longlat"?a={x:a.x*ui,y:a.y*ui,z:a.z||0}:(a=n.forward(a),n.to_meter&&(a={x:a.x/n.to_meter,y:a.y/n.to_meter,z:a.z||0})),l&&n.axis!=="enu"?Uh(n,!0,a):(a&&!f&&delete a.z,a)}var qh=ni("WGS84");function Vr(t,n,a,l){var c,f,p;return Array.isArray(a)?(c=La(t,n,a,l)||{x:NaN,y:NaN},a.length>2?typeof t.name<"u"&&t.name==="geocent"||typeof n.name<"u"&&n.name==="geocent"?typeof c.z=="number"?[c.x,c.y,c.z].concat(a.slice(3)):[c.x,c.y,a[2]].concat(a.slice(3)):[c.x,c.y].concat(a.slice(2)):[c.x,c.y]):(f=La(t,n,a,l),p=Object.keys(a),p.length===2||p.forEach(function(g){if(typeof t.name<"u"&&t.name==="geocent"||typeof n.name<"u"&&n.name==="geocent"){if(g==="x"||g==="y"||g==="z")return}else if(g==="x"||g==="y")return;f[g]=a[g]}),f)}function ba(t){return t instanceof ni?t:typeof t=="object"&&"oProj"in t?t.oProj:ni(t)}function Hu(t,n,a){var l,c,f=!1,p;return typeof n>"u"?(c=ba(t),l=qh,f=!0):(typeof n.x<"u"||Array.isArray(n))&&(a=n,c=ba(t),l=qh,f=!0),l||(l=ba(t)),c||(c=ba(n)),a?Vr(l,c,a):(p={forward:function(g,A){return Vr(l,c,g,A)},inverse:function(g,A){return Vr(c,l,g,A)}},f&&(p.oProj=c),p)}var Hh=6,Vh="AJSAJS",$h="AFAFAF",bn=65,Fe=73,Ve=79,_s=86,ms=90;const Vu={forward:Wh,inverse:$u,toPoint:Kh};function Wh(t,n){return n=n||5,Xu(Wu({lat:t[1],lon:t[0]}),n)}function $u(t){var n=Wr(Jh(t.toUpperCase()));return n.lat&&n.lon?[n.lon,n.lat,n.lon,n.lat]:[n.left,n.bottom,n.right,n.top]}function Kh(t){var n=Wr(Jh(t.toUpperCase()));return n.lat&&n.lon?[n.lon,n.lat]:[(n.left+n.right)/2,(n.top+n.bottom)/2]}function $r(t){return t*(Math.PI/180)}function Xh(t){return 180*(t/Math.PI)}function Wu(t){var n=t.lat,a=t.lon,l=6378137,c=.00669438,f=.9996,p,g,A,k,C,x,b,T=$r(n),G=$r(a),Z,K;K=Math.floor((a+180)/6)+1,a===180&&(K=60),n>=56&&n<64&&a>=3&&a<12&&(K=32),n>=72&&n<84&&(a>=0&&a<9?K=31:a>=9&&a<21?K=33:a>=21&&a<33?K=35:a>=33&&a<42&&(K=37)),p=(K-1)*6-180+3,Z=$r(p),g=c/(1-c),A=l/Math.sqrt(1-c*Math.sin(T)*Math.sin(T)),k=Math.tan(T)*Math.tan(T),C=g*Math.cos(T)*Math.cos(T),x=Math.cos(T)*(G-Z),b=l*((1-c/4-3*c*c/64-5*c*c*c/256)*T-(3*c/8+3*c*c/32+45*c*c*c/1024)*Math.sin(2*T)+(15*c*c/256+45*c*c*c/1024)*Math.sin(4*T)-35*c*c*c/3072*Math.sin(6*T));var at=f*A*(x+(1-k+C)*x*x*x/6+(5-18*k+k*k+72*C-58*g)*x*x*x*x*x/120)+5e5,rt=f*(b+A*Math.tan(T)*(x*x/2+(5-k+9*C+4*C*C)*x*x*x*x/24+(61-58*k+k*k+600*C-330*g)*x*x*x*x*x*x/720));return n<0&&(rt+=1e7),{northing:Math.round(rt),easting:Math.round(at),zoneNumber:K,zoneLetter:Ku(n)}}function Wr(t){var n=t.northing,a=t.easting,l=t.zoneLetter,c=t.zoneNumber;if(c<0||c>60)return null;var f=.9996,p=6378137,g=.00669438,A,k=(1-Math.sqrt(1-g))/(1+Math.sqrt(1-g)),C,x,b,T,G,Z,K,at,rt,ct=a-5e5,yt=n;l<"N"&&(yt-=1e7),K=(c-1)*6-180+3,A=g/(1-g),Z=yt/f,at=Z/(p*(1-g/4-3*g*g/64-5*g*g*g/256)),rt=at+(3*k/2-27*k*k*k/32)*Math.sin(2*at)+(21*k*k/16-55*k*k*k*k/32)*Math.sin(4*at)+151*k*k*k/96*Math.sin(6*at),C=p/Math.sqrt(1-g*Math.sin(rt)*Math.sin(rt)),x=Math.tan(rt)*Math.tan(rt),b=A*Math.cos(rt)*Math.cos(rt),T=p*(1-g)/Math.pow(1-g*Math.sin(rt)*Math.sin(rt),1.5),G=ct/(C*f);var mt=rt-C*Math.tan(rt)/T*(G*G/2-(5+3*x+10*b-4*b*b-9*A)*G*G*G*G/24+(61+90*x+298*b+45*x*x-252*A-3*b*b)*G*G*G*G*G*G/720);mt=Xh(mt);var xt=(G-(1+2*x+b)*G*G*G/6+(5-2*b+28*x-3*b*b+8*A+24*x*x)*G*G*G*G*G/120)/Math.cos(rt);xt=K+Xh(xt);var Dt;if(t.accuracy){var It=Wr({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});Dt={top:It.lat,right:It.lon,bottom:mt,left:xt}}else Dt={lat:mt,lon:xt};return Dt}function Ku(t){var n="Z";return 84>=t&&t>=72?n="X":72>t&&t>=64?n="W":64>t&&t>=56?n="V":56>t&&t>=48?n="U":48>t&&t>=40?n="T":40>t&&t>=32?n="S":32>t&&t>=24?n="R":24>t&&t>=16?n="Q":16>t&&t>=8?n="P":8>t&&t>=0?n="N":0>t&&t>=-8?n="M":-8>t&&t>=-16?n="L":-16>t&&t>=-24?n="K":-24>t&&t>=-32?n="J":-32>t&&t>=-40?n="H":-40>t&&t>=-48?n="G":-48>t&&t>=-56?n="F":-56>t&&t>=-64?n="E":-64>t&&t>=-72?n="D":-72>t&&t>=-80&&(n="C"),n}function Xu(t,n){var a="00000"+t.easting,l="00000"+t.northing;return t.zoneNumber+t.zoneLetter+Yu(t.easting,t.northing,t.zoneNumber)+a.substr(a.length-5,n)+l.substr(l.length-5,n)}function Yu(t,n,a){var l=Yh(a),c=Math.floor(t/1e5),f=Math.floor(n/1e5)%20;return Ju(c,f,l)}function Yh(t){var n=t%Hh;return n===0&&(n=Hh),n}function Ju(t,n,a){var l=a-1,c=Vh.charCodeAt(l),f=$h.charCodeAt(l),p=c+t-1,g=f+n,A=!1;p>ms&&(p=p-ms+bn-1,A=!0),(p===Fe||c<Fe&&p>Fe||(p>Fe||c<Fe)&&A)&&p++,(p===Ve||c<Ve&&p>Ve||(p>Ve||c<Ve)&&A)&&(p++,p===Fe&&p++),p>ms&&(p=p-ms+bn-1),g>_s?(g=g-_s+bn-1,A=!0):A=!1,(g===Fe||f<Fe&&g>Fe||(g>Fe||f<Fe)&&A)&&g++,(g===Ve||f<Ve&&g>Ve||(g>Ve||f<Ve)&&A)&&(g++,g===Fe&&g++),g>_s&&(g=g-_s+bn-1);var k=String.fromCharCode(p)+String.fromCharCode(g);return k}function Jh(t){if(t&&t.length===0)throw"MGRSPoint coverting from nothing";for(var n=t.length,a=null,l="",c,f=0;!/[A-Z]/.test(c=t.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+t;l+=c,f++}var p=parseInt(l,10);if(f===0||f+3>n)throw"MGRSPoint bad conversion from: "+t;var g=t.charAt(f++);if(g<="A"||g==="B"||g==="Y"||g>="Z"||g==="I"||g==="O")throw"MGRSPoint zone letter "+g+" not handled: "+t;a=t.substring(f,f+=2);for(var A=Yh(p),k=Qu(a.charAt(0),A),C=tc(a.charAt(1),A);C<ec(g);)C+=2e6;var x=n-f;if(x%2!==0)throw`MGRSPoint has to have an even number
|
|
7
|
-
of digits after the zone letter and two 100km letters - front
|
|
8
|
-
half for easting meters, second half for
|
|
9
|
-
northing meters`+t;var b=x/2,T=0,G=0,Z,K,at,rt,ct;return b>0&&(Z=1e5/Math.pow(10,b),K=t.substring(f,f+b),T=parseFloat(K)*Z,at=t.substring(f+b),G=parseFloat(at)*Z),rt=T+k,ct=G+C,{easting:rt,northing:ct,zoneLetter:g,zoneNumber:p,accuracy:Z}}function Qu(t,n){for(var a=Vh.charCodeAt(n-1),l=1e5,c=!1;a!==t.charCodeAt(0);){if(a++,a===Fe&&a++,a===Ve&&a++,a>ms){if(c)throw"Bad character: "+t;a=bn,c=!0}l+=1e5}return l}function tc(t,n){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var a=$h.charCodeAt(n-1),l=0,c=!1;a!==t.charCodeAt(0);){if(a++,a===Fe&&a++,a===Ve&&a++,a>_s){if(c)throw"Bad character: "+t;a=bn,c=!0}l+=1e5}return l}function ec(t){var n;switch(t){case"C":n=11e5;break;case"D":n=2e6;break;case"E":n=28e5;break;case"F":n=37e5;break;case"G":n=46e5;break;case"H":n=55e5;break;case"J":n=64e5;break;case"K":n=73e5;break;case"L":n=82e5;break;case"M":n=91e5;break;case"N":n=0;break;case"P":n=8e5;break;case"Q":n=17e5;break;case"R":n=26e5;break;case"S":n=35e5;break;case"T":n=44e5;break;case"U":n=53e5;break;case"V":n=62e5;break;case"W":n=7e6;break;case"X":n=79e5;break;default:n=-1}if(n>=0)return n;throw"Invalid zone letter: "+t}function wn(t,n,a){if(!(this instanceof wn))return new wn(t,n,a);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if(typeof t=="object")this.x=t.x,this.y=t.y,this.z=t.z||0;else if(typeof t=="string"&&typeof n>"u"){var l=t.split(",");this.x=parseFloat(l[0]),this.y=parseFloat(l[1]),this.z=parseFloat(l[2])||0}else this.x=t,this.y=n,this.z=a||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}wn.fromMGRS=function(t){return new wn(Kh(t))},wn.prototype.toMGRS=function(t){return Wh([this.x,this.y],t)};var ic=1,nc=.25,Qh=.046875,tl=.01953125,el=.01068115234375,sc=.75,ac=.46875,rc=.013020833333333334,oc=.007120768229166667,hc=.3645833333333333,lc=.005696614583333333,uc=.3076171875;function Kr(t){var n=[];n[0]=ic-t*(nc+t*(Qh+t*(tl+t*el))),n[1]=t*(sc-t*(Qh+t*(tl+t*el)));var a=t*t;return n[2]=a*(ac-t*(rc+t*oc)),a*=t,n[3]=a*(hc-t*lc),n[4]=a*t*uc,n}function Cn(t,n,a,l){return a*=n,n*=n,l[0]*t-a*(l[1]+n*(l[2]+n*(l[3]+n*l[4])))}var cc=20;function Xr(t,n,a){for(var l=1/(1-n),c=t,f=cc;f;--f){var p=Math.sin(c),g=1-n*p*p;if(g=(Cn(c,p,Math.cos(c),a)-t)*(g*Math.sqrt(g))*l,c-=g,Math.abs(g)<dt)return c}return c}function dc(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Kr(this.es),this.ml0=Cn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function fc(t){var n=t.x,a=t.y,l=_t(n-this.long0),c,f,p,g=Math.sin(a),A=Math.cos(a);if(this.es){var C=A*l,x=Math.pow(C,2),b=this.ep2*Math.pow(A,2),T=Math.pow(b,2),G=Math.abs(A)>dt?Math.tan(a):0,Z=Math.pow(G,2),K=Math.pow(Z,2);c=1-this.es*Math.pow(g,2),C=C/Math.sqrt(c);var at=Cn(a,g,A,this.en);f=this.a*(this.k0*C*(1+x/6*(1-Z+b+x/20*(5-18*Z+K+14*b-58*Z*b+x/42*(61+179*K-K*Z-479*Z)))))+this.x0,p=this.a*(this.k0*(at-this.ml0+g*l*C/2*(1+x/12*(5-Z+9*b+4*T+x/30*(61+K-58*Z+270*b-330*Z*b+x/56*(1385+543*K-K*Z-3111*Z))))))+this.y0}else{var k=A*Math.sin(l);if(Math.abs(Math.abs(k)-1)<dt)return 93;if(f=.5*this.a*this.k0*Math.log((1+k)/(1-k))+this.x0,p=A*Math.cos(l)/Math.sqrt(1-Math.pow(k,2)),k=Math.abs(p),k>=1){if(k-1>dt)return 93;p=0}else p=Math.acos(p);a<0&&(p=-p),p=this.a*this.k0*(p-this.lat0)+this.y0}return t.x=f,t.y=p,t}function pc(t){var n,a,l,c,f=(t.x-this.x0)*(1/this.a),p=(t.y-this.y0)*(1/this.a);if(this.es)if(n=this.ml0+p/this.k0,a=Xr(n,this.es,this.en),Math.abs(a)<ut){var x=Math.sin(a),b=Math.cos(a),T=Math.abs(b)>dt?Math.tan(a):0,G=this.ep2*Math.pow(b,2),Z=Math.pow(G,2),K=Math.pow(T,2),at=Math.pow(K,2);n=1-this.es*Math.pow(x,2);var rt=f*Math.sqrt(n)/this.k0,ct=Math.pow(rt,2);n=n*T,l=a-n*ct/(1-this.es)*.5*(1-ct/12*(5+3*K-9*G*K+G-4*Z-ct/30*(61+90*K-252*G*K+45*at+46*G-ct/56*(1385+3633*K+4095*at+1574*at*K)))),c=_t(this.long0+rt*(1-ct/6*(1+2*K+G-ct/20*(5+28*K+24*at+8*G*K+6*G-ct/42*(61+662*K+1320*at+720*at*K))))/b)}else l=ut*fs(p),c=0;else{var g=Math.exp(f/this.k0),A=.5*(g-1/g),k=this.lat0+p/this.k0,C=Math.cos(k);n=Math.sqrt((1-Math.pow(C,2))/(1+Math.pow(A,2))),l=Math.asin(n),p<0&&(l=-l),A===0&&C===0?c=0:c=_t(Math.atan2(A,C)+this.long0)}return t.x=c,t.y=l,t}var _c=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const wa={init:dc,forward:fc,inverse:pc,names:_c};function il(t){var n=Math.exp(t);return n=(n-1/n)/2,n}function ze(t,n){t=Math.abs(t),n=Math.abs(n);var a=Math.max(t,n),l=Math.min(t,n)/(a||1);return a*Math.sqrt(1+Math.pow(l,2))}function mc(t){var n=1+t,a=n-1;return a===0?t:t*Math.log(n)/a}function gc(t){var n=Math.abs(t);return n=mc(n*(1+n/(ze(1,n)+1))),t<0?-n:n}function Yr(t,n){for(var a=2*Math.cos(2*n),l=t.length-1,c=t[l],f=0,p;--l>=0;)p=-f+a*c+t[l],f=c,c=p;return n+p*Math.sin(2*n)}function yc(t,n){for(var a=2*Math.cos(n),l=t.length-1,c=t[l],f=0,p;--l>=0;)p=-f+a*c+t[l],f=c,c=p;return Math.sin(n)*p}function vc(t){var n=Math.exp(t);return n=(n+1/n)/2,n}function nl(t,n,a){for(var l=Math.sin(n),c=Math.cos(n),f=il(a),p=vc(a),g=2*c*p,A=-2*l*f,k=t.length-1,C=t[k],x=0,b=0,T=0,G,Z;--k>=0;)G=b,Z=x,b=C,x=T,C=-G+g*b-A*x+t[k],T=-Z+A*b+g*x;return g=l*p,A=c*f,[g*C-A*T,g*T+A*C]}function Ac(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(wa.init.apply(this),this.forward=wa.forward,this.inverse=wa.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),n=t/(2-t),a=n;this.cgb[0]=n*(2+n*(-2/3+n*(-2+n*(116/45+n*(26/45+n*(-2854/675)))))),this.cbg[0]=n*(-2+n*(2/3+n*(4/3+n*(-82/45+n*(32/45+n*(4642/4725)))))),a=a*n,this.cgb[1]=a*(7/3+n*(-8/5+n*(-227/45+n*(2704/315+n*(2323/945))))),this.cbg[1]=a*(5/3+n*(-16/15+n*(-13/9+n*(904/315+n*(-1522/945))))),a=a*n,this.cgb[2]=a*(56/15+n*(-136/35+n*(-1262/105+n*(73814/2835)))),this.cbg[2]=a*(-26/15+n*(34/21+n*(8/5+n*(-12686/2835)))),a=a*n,this.cgb[3]=a*(4279/630+n*(-332/35+n*(-399572/14175))),this.cbg[3]=a*(1237/630+n*(-12/5+n*(-24832/14175))),a=a*n,this.cgb[4]=a*(4174/315+n*(-144838/6237)),this.cbg[4]=a*(-734/315+n*(109598/31185)),a=a*n,this.cgb[5]=a*(601676/22275),this.cbg[5]=a*(444337/155925),a=Math.pow(n,2),this.Qn=this.k0/(1+n)*(1+a*(1/4+a*(1/64+a/256))),this.utg[0]=n*(-.5+n*(2/3+n*(-37/96+n*(1/360+n*(81/512+n*(-96199/604800)))))),this.gtu[0]=n*(.5+n*(-2/3+n*(5/16+n*(41/180+n*(-127/288+n*(7891/37800)))))),this.utg[1]=a*(-1/48+n*(-1/15+n*(437/1440+n*(-46/105+n*(1118711/3870720))))),this.gtu[1]=a*(13/48+n*(-3/5+n*(557/1440+n*(281/630+n*(-1983433/1935360))))),a=a*n,this.utg[2]=a*(-17/480+n*(37/840+n*(209/4480+n*(-5569/90720)))),this.gtu[2]=a*(61/240+n*(-103/140+n*(15061/26880+n*(167603/181440)))),a=a*n,this.utg[3]=a*(-4397/161280+n*(11/504+n*(830251/7257600))),this.gtu[3]=a*(49561/161280+n*(-179/168+n*(6601661/7257600))),a=a*n,this.utg[4]=a*(-4583/161280+n*(108847/3991680)),this.gtu[4]=a*(34729/80640+n*(-3418889/1995840)),a=a*n,this.utg[5]=a*(-20648693/638668800),this.gtu[5]=a*(212378941/319334400);var l=Yr(this.cbg,this.lat0);this.Zb=-this.Qn*(l+yc(this.gtu,2*l))}function Mc(t){var n=_t(t.x-this.long0),a=t.y;a=Yr(this.cbg,a);var l=Math.sin(a),c=Math.cos(a),f=Math.sin(n),p=Math.cos(n);a=Math.atan2(l,p*c),n=Math.atan2(f*c,ze(l,c*p)),n=gc(Math.tan(n));var g=nl(this.gtu,2*a,2*n);a=a+g[0],n=n+g[1];var A,k;return Math.abs(n)<=2.623395162778?(A=this.a*(this.Qn*n)+this.x0,k=this.a*(this.Qn*a+this.Zb)+this.y0):(A=1/0,k=1/0),t.x=A,t.y=k,t}function xc(t){var n=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);a=(a-this.Zb)/this.Qn,n=n/this.Qn;var l,c;if(Math.abs(n)<=2.623395162778){var f=nl(this.utg,2*a,2*n);a=a+f[0],n=n+f[1],n=Math.atan(il(n));var p=Math.sin(a),g=Math.cos(a),A=Math.sin(n),k=Math.cos(n);a=Math.atan2(p*k,ze(A,k*g)),n=Math.atan2(A,k*g),l=_t(n+this.long0),c=Yr(this.cgb,a)}else l=1/0,c=1/0;return t.x=l,t.y=c,t}var Lc=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Ca={init:Ac,forward:Mc,inverse:xc,names:Lc};function bc(t,n){if(t===void 0){if(t=Math.floor((_t(n)+Math.PI)*30/Math.PI)+1,t<0)return 0;if(t>60)return 60}return t}var wc="etmerc";function Cc(){var t=bc(this.zone,this.long0);if(t===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*ye,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ca.init.apply(this),this.forward=Ca.forward,this.inverse=Ca.inverse}var Ec=["Universal Transverse Mercator System","utm"];const Pc={init:Cc,names:Ec,dependsOn:wc};function Jr(t,n){return Math.pow((1-t)/(1+t),n)}var kc=20;function Bc(){var t=Math.sin(this.lat0),n=Math.cos(this.lat0);n*=n,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*n*n/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+jt)/(Math.pow(Math.tan(.5*this.lat0+jt),this.C)*Jr(this.e*t,this.ratexp))}function Sc(t){var n=t.x,a=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*a+jt),this.C)*Jr(this.e*Math.sin(a),this.ratexp))-ut,t.x=this.C*n,t}function Tc(t){for(var n=1e-14,a=t.x/this.C,l=t.y,c=Math.pow(Math.tan(.5*l+jt)/this.K,1/this.C),f=kc;f>0&&(l=2*Math.atan(c*Jr(this.e*Math.sin(t.y),-.5*this.e))-ut,!(Math.abs(l-t.y)<n));--f)t.y=l;return f?(t.x=a,t.y=l,t):null}const Qr={init:Bc,forward:Sc,inverse:Tc};function Dc(){Qr.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function Oc(t){var n,a,l,c;return t.x=_t(t.x-this.long0),Qr.forward.apply(this,[t]),n=Math.sin(t.y),a=Math.cos(t.y),l=Math.cos(t.x),c=this.k0*this.R2/(1+this.sinc0*n+this.cosc0*a*l),t.x=c*a*Math.sin(t.x),t.y=c*(this.cosc0*n-this.sinc0*a*l),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function Ic(t){var n,a,l,c,f;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,f=ze(t.x,t.y)){var p=2*Math.atan2(f,this.R2);n=Math.sin(p),a=Math.cos(p),c=Math.asin(a*this.sinc0+t.y*n*this.cosc0/f),l=Math.atan2(t.x*n,f*this.cosc0*a-t.y*this.sinc0*n)}else c=this.phic0,l=0;return t.x=l,t.y=c,Qr.inverse.apply(this,[t]),t.x=_t(t.x+this.long0),t}var Rc=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const Gc={init:Dc,forward:Oc,inverse:Ic,names:Rc};function to(t,n,a){return n*=a,Math.tan(.5*(ut+t))*Math.pow((1-n)/(1+n),.5*a)}function Fc(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dt&&(this.k0=.5*(1+fs(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=dt&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dt&&Math.abs(Math.cos(this.lat_ts))>dt&&(this.k0=.5*this.cons*ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ii(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ci(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(to(this.lat0,this.sinlat0,this.e))-ut,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function zc(t){var n=t.x,a=t.y,l=Math.sin(a),c=Math.cos(a),f,p,g,A,k,C,x=_t(n-this.long0);return Math.abs(Math.abs(n-this.long0)-Math.PI)<=dt&&Math.abs(a+this.lat0)<=dt?(t.x=NaN,t.y=NaN,t):this.sphere?(f=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(x)),t.x=this.a*f*c*Math.sin(x)+this.x0,t.y=this.a*f*(this.coslat0*l-this.sinlat0*c*Math.cos(x))+this.y0,t):(p=2*Math.atan(to(a,l,this.e))-ut,A=Math.cos(p),g=Math.sin(p),Math.abs(this.coslat0)<=dt?(k=ii(this.e,a*this.con,this.con*l),C=2*this.a*this.k0*k/this.cons,t.x=this.x0+C*Math.sin(n-this.long0),t.y=this.y0-this.con*C*Math.cos(n-this.long0),t):(Math.abs(this.sinlat0)<dt?(f=2*this.a*this.k0/(1+A*Math.cos(x)),t.y=f*g):(f=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*g+this.cosX0*A*Math.cos(x))),t.y=f*(this.cosX0*g-this.sinX0*A*Math.cos(x))+this.y0),t.x=f*A*Math.sin(x)+this.x0,t))}function Nc(t){t.x-=this.x0,t.y-=this.y0;var n,a,l,c,f,p=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var g=2*Math.atan(p/(2*this.a*this.k0));return n=this.long0,a=this.lat0,p<=dt?(t.x=n,t.y=a,t):(a=Math.asin(Math.cos(g)*this.sinlat0+t.y*Math.sin(g)*this.coslat0/p),Math.abs(this.coslat0)<dt?this.lat0>0?n=_t(this.long0+Math.atan2(t.x,-1*t.y)):n=_t(this.long0+Math.atan2(t.x,t.y)):n=_t(this.long0+Math.atan2(t.x*Math.sin(g),p*this.coslat0*Math.cos(g)-t.y*this.sinlat0*Math.sin(g))),t.x=n,t.y=a,t)}else if(Math.abs(this.coslat0)<=dt){if(p<=dt)return a=this.lat0,n=this.long0,t.x=n,t.y=a,t;t.x*=this.con,t.y*=this.con,l=p*this.cons/(2*this.a*this.k0),a=this.con*ps(this.e,l),n=this.con*_t(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else c=2*Math.atan(p*this.cosX0/(2*this.a*this.k0*this.ms1)),n=this.long0,p<=dt?f=this.X0:(f=Math.asin(Math.cos(c)*this.sinX0+t.y*Math.sin(c)*this.cosX0/p),n=_t(this.long0+Math.atan2(t.x*Math.sin(c),p*this.cosX0*Math.cos(c)-t.y*this.sinX0*Math.sin(c)))),a=-1*ps(this.e,Math.tan(.5*(ut+f)));return t.x=n,t.y=a,t}var Uc=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const Zc={init:Fc,forward:zc,inverse:Nc,names:Uc,ssfn_:to};function jc(){var t=this.lat0;this.lambda0=this.long0;var n=Math.sin(t),a=this.a,l=this.rf,c=1/l,f=2*c-Math.pow(c,2),p=this.e=Math.sqrt(f);this.R=this.k0*a*Math.sqrt(1-f)/(1-f*Math.pow(n,2)),this.alpha=Math.sqrt(1+f/(1-f)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(n/this.alpha);var g=Math.log(Math.tan(Math.PI/4+this.b0/2)),A=Math.log(Math.tan(Math.PI/4+t/2)),k=Math.log((1+p*n)/(1-p*n));this.K=g-this.alpha*A+this.alpha*p/2*k}function qc(t){var n=Math.log(Math.tan(Math.PI/4-t.y/2)),a=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),l=-this.alpha*(n+a)+this.K,c=2*(Math.atan(Math.exp(l))-Math.PI/4),f=this.alpha*(t.x-this.lambda0),p=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(c)+Math.cos(this.b0)*Math.cos(f))),g=Math.asin(Math.cos(this.b0)*Math.sin(c)-Math.sin(this.b0)*Math.cos(c)*Math.cos(f));return t.y=this.R/2*Math.log((1+Math.sin(g))/(1-Math.sin(g)))+this.y0,t.x=this.R*p+this.x0,t}function Hc(t){for(var n=t.x-this.x0,a=t.y-this.y0,l=n/this.R,c=2*(Math.atan(Math.exp(a/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(c)+Math.sin(this.b0)*Math.cos(c)*Math.cos(l)),p=Math.atan(Math.sin(l)/(Math.cos(this.b0)*Math.cos(l)-Math.sin(this.b0)*Math.tan(c))),g=this.lambda0+p/this.alpha,A=0,k=f,C=-1e3,x=0;Math.abs(k-C)>1e-7;){if(++x>20)return;A=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(k))/2)),C=k,k=2*Math.atan(Math.exp(A))-Math.PI/2}return t.x=g,t.y=k,t}var Vc=["somerc"];const $c={init:jc,forward:qc,inverse:Hc,names:Vc};var En=1e-7;function Wc(t){var n=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],a=typeof t.projName=="object"?Object.keys(t.projName)[0]:t.projName;return"no_uoff"in t||"no_off"in t||n.indexOf(a)!==-1||n.indexOf(Oh(a))!==-1}function Kc(){var t,n,a,l,c,f,p,g,A,k,C=0,x,b=0,T=0,G=0,Z=0,K=0,at=0;this.no_off=Wc(this),this.no_rot="no_rot"in this;var rt=!1;"alpha"in this&&(rt=!0);var ct=!1;if("rectified_grid_angle"in this&&(ct=!0),rt&&(at=this.alpha),ct&&(C=this.rectified_grid_angle),rt||ct)b=this.longc;else if(T=this.long1,Z=this.lat1,G=this.long2,K=this.lat2,Math.abs(Z-K)<=En||(t=Math.abs(Z))<=En||Math.abs(t-ut)<=En||Math.abs(Math.abs(this.lat0)-ut)<=En||Math.abs(Math.abs(K)-ut)<=En)throw new Error;var yt=1-this.es;n=Math.sqrt(yt),Math.abs(this.lat0)>dt?(g=Math.sin(this.lat0),a=Math.cos(this.lat0),t=1-this.es*g*g,this.B=a*a,this.B=Math.sqrt(1+this.es*this.B*this.B/yt),this.A=this.B*this.k0*n/t,l=this.B*n/(a*Math.sqrt(t)),c=l*l-1,c<=0?c=0:(c=Math.sqrt(c),this.lat0<0&&(c=-c)),this.E=c+=l,this.E*=Math.pow(ii(this.e,this.lat0,g),this.B)):(this.B=1/n,this.A=this.k0,this.E=l=c=1),rt||ct?(rt?(x=Math.asin(Math.sin(at)/l),ct||(C=at)):(x=C,at=Math.asin(l*Math.sin(x))),this.lam0=b-Math.asin(.5*(c-1/c)*Math.tan(x))/this.B):(f=Math.pow(ii(this.e,Z,Math.sin(Z)),this.B),p=Math.pow(ii(this.e,K,Math.sin(K)),this.B),c=this.E/f,A=(p-f)/(p+f),k=this.E*this.E,k=(k-p*f)/(k+p*f),t=T-G,t<-Math.PI?G-=cs:t>Math.PI&&(G+=cs),this.lam0=_t(.5*(T+G)-Math.atan(k*Math.tan(.5*this.B*(T-G))/A)/this.B),x=Math.atan(2*Math.sin(this.B*_t(T-this.lam0))/(c-1/c)),C=at=Math.asin(l*Math.sin(x))),this.singam=Math.sin(x),this.cosgam=Math.cos(x),this.sinrot=Math.sin(C),this.cosrot=Math.cos(C),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(l*l-1)/Math.cos(at))),this.lat0<0&&(this.u_0=-this.u_0)),c=.5*x,this.v_pole_n=this.ArB*Math.log(Math.tan(jt-c)),this.v_pole_s=this.ArB*Math.log(Math.tan(jt+c))}function Xc(t){var n={},a,l,c,f,p,g,A,k;if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-ut)>dt){if(p=this.E/Math.pow(ii(this.e,t.y,Math.sin(t.y)),this.B),g=1/p,a=.5*(p-g),l=.5*(p+g),f=Math.sin(this.B*t.x),c=(a*this.singam-f*this.cosgam)/l,Math.abs(Math.abs(c)-1)<dt)throw new Error;k=.5*this.ArB*Math.log((1-c)/(1+c)),g=Math.cos(this.B*t.x),Math.abs(g)<En?A=this.A*t.x:A=this.ArB*Math.atan2(a*this.cosgam+f*this.singam,g)}else k=t.y>0?this.v_pole_n:this.v_pole_s,A=this.ArB*t.y;return this.no_rot?(n.x=A,n.y=k):(A-=this.u_0,n.x=k*this.cosrot+A*this.sinrot,n.y=A*this.cosrot-k*this.sinrot),n.x=this.a*n.x+this.x0,n.y=this.a*n.y+this.y0,n}function Yc(t){var n,a,l,c,f,p,g,A={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(a=t.y,n=t.x):(a=t.x*this.cosrot-t.y*this.sinrot,n=t.y*this.cosrot+t.x*this.sinrot+this.u_0),l=Math.exp(-this.BrA*a),c=.5*(l-1/l),f=.5*(l+1/l),p=Math.sin(this.BrA*n),g=(p*this.cosgam+c*this.singam)/f,Math.abs(Math.abs(g)-1)<dt)A.x=0,A.y=g<0?-ut:ut;else{if(A.y=this.E/Math.sqrt((1+g)/(1-g)),A.y=ps(this.e,Math.pow(A.y,1/this.B)),A.y===1/0)throw new Error;A.x=-this.rB*Math.atan2(c*this.cosgam-p*this.singam,Math.cos(this.BrA*n))}return A.x+=this.lam0,A}var Jc=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const Qc={init:Kc,forward:Xc,inverse:Yc,names:Jc};function td(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<dt)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var n=Math.sin(this.lat1),a=Math.cos(this.lat1),l=ci(this.e,n,a),c=ii(this.e,this.lat1,n),f=Math.sin(this.lat2),p=Math.cos(this.lat2),g=ci(this.e,f,p),A=ii(this.e,this.lat2,f),k=Math.abs(Math.abs(this.lat0)-ut)<dt?0:ii(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>dt?this.ns=Math.log(l/g)/Math.log(c/A):this.ns=n,isNaN(this.ns)&&(this.ns=n),this.f0=l/(this.ns*Math.pow(c,this.ns)),this.rh=this.a*this.f0*Math.pow(k,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function ed(t){var n=t.x,a=t.y;Math.abs(2*Math.abs(a)-Math.PI)<=dt&&(a=fs(a)*(ut-2*dt));var l=Math.abs(Math.abs(a)-ut),c,f;if(l>dt)c=ii(this.e,a,Math.sin(a)),f=this.a*this.f0*Math.pow(c,this.ns);else{if(l=a*this.ns,l<=0)return null;f=0}var p=this.ns*_t(n-this.long0);return t.x=this.k0*(f*Math.sin(p))+this.x0,t.y=this.k0*(this.rh-f*Math.cos(p))+this.y0,t}function id(t){var n,a,l,c,f,p=(t.x-this.x0)/this.k0,g=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(n=Math.sqrt(p*p+g*g),a=1):(n=-Math.sqrt(p*p+g*g),a=-1);var A=0;if(n!==0&&(A=Math.atan2(a*p,a*g)),n!==0||this.ns>0){if(a=1/this.ns,l=Math.pow(n/(this.a*this.f0),a),c=ps(this.e,l),c===-9999)return null}else c=-ut;return f=_t(A/this.ns+this.long0),t.x=f,t.y=c,t}var nd=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const sd={init:td,forward:ed,inverse:id,names:nd};function ad(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function rd(t){var n,a,l,c,f,p,g,A=t.x,k=t.y,C=_t(A-this.long0);return n=Math.pow((1+this.e*Math.sin(k))/(1-this.e*Math.sin(k)),this.alfa*this.e/2),a=2*(Math.atan(this.k*Math.pow(Math.tan(k/2+this.s45),this.alfa)/n)-this.s45),l=-C*this.alfa,c=Math.asin(Math.cos(this.ad)*Math.sin(a)+Math.sin(this.ad)*Math.cos(a)*Math.cos(l)),f=Math.asin(Math.cos(a)*Math.sin(l)/Math.cos(c)),p=this.n*f,g=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(c/2+this.s45),this.n),t.y=g*Math.cos(p)/1,t.x=g*Math.sin(p)/1,this.czech||(t.y*=-1,t.x*=-1),t}function od(t){var n,a,l,c,f,p,g,A,k=t.x;t.x=t.y,t.y=k,this.czech||(t.y*=-1,t.x*=-1),p=Math.sqrt(t.x*t.x+t.y*t.y),f=Math.atan2(t.y,t.x),c=f/Math.sin(this.s0),l=2*(Math.atan(Math.pow(this.ro0/p,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),n=Math.asin(Math.cos(this.ad)*Math.sin(l)-Math.sin(this.ad)*Math.cos(l)*Math.cos(c)),a=Math.asin(Math.cos(l)*Math.sin(c)/Math.cos(n)),t.x=this.long0-a/this.alfa,g=n,A=0;var C=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(n/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(g))/(1-this.e*Math.sin(g)),this.e/2))-this.s45),Math.abs(g-t.y)<1e-10&&(A=1),g=t.y,C+=1;while(A===0&&C<15);return C>=15?null:t}var hd=["Krovak","krovak"];const ld={init:ad,forward:rd,inverse:od,names:hd};function Te(t,n,a,l,c){return t*c-n*Math.sin(2*c)+a*Math.sin(4*c)-l*Math.sin(6*c)}function gs(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function ys(t){return .375*t*(1+.25*t*(1+.46875*t))}function vs(t){return .05859375*t*t*(1+.75*t)}function As(t){return t*t*t*(35/3072)}function eo(t,n,a){var l=n*a;return t/Math.sqrt(1-l*l)}function Ii(t){return Math.abs(t)<ut?t:t-fs(t)*Math.PI}function Ea(t,n,a,l,c){var f,p;f=t/n;for(var g=0;g<15;g++)if(p=(t-(n*f-a*Math.sin(2*f)+l*Math.sin(4*f)-c*Math.sin(6*f)))/(n-2*a*Math.cos(2*f)+4*l*Math.cos(4*f)-6*c*Math.cos(6*f)),f+=p,Math.abs(p)<=1e-10)return f;return NaN}function ud(){this.sphere||(this.e0=gs(this.es),this.e1=ys(this.es),this.e2=vs(this.es),this.e3=As(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function cd(t){var n,a,l=t.x,c=t.y;if(l=_t(l-this.long0),this.sphere)n=this.a*Math.asin(Math.cos(c)*Math.sin(l)),a=this.a*(Math.atan2(Math.tan(c),Math.cos(l))-this.lat0);else{var f=Math.sin(c),p=Math.cos(c),g=eo(this.a,this.e,f),A=Math.tan(c)*Math.tan(c),k=l*Math.cos(c),C=k*k,x=this.es*p*p/(1-this.es),b=this.a*Te(this.e0,this.e1,this.e2,this.e3,c);n=g*k*(1-C*A*(1/6-(8-A+8*x)*C/120)),a=b-this.ml0+g*f/p*C*(.5+(5-A+6*x)*C/24)}return t.x=n+this.x0,t.y=a+this.y0,t}function dd(t){t.x-=this.x0,t.y-=this.y0;var n=t.x/this.a,a=t.y/this.a,l,c;if(this.sphere){var f=a+this.lat0;l=Math.asin(Math.sin(f)*Math.cos(n)),c=Math.atan2(Math.tan(n),Math.cos(f))}else{var p=this.ml0/this.a+a,g=Ea(p,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(g)-ut)<=dt)return t.x=this.long0,t.y=ut,a<0&&(t.y*=-1),t;var A=eo(this.a,this.e,Math.sin(g)),k=A*A*A/this.a/this.a*(1-this.es),C=Math.pow(Math.tan(g),2),x=n*this.a/A,b=x*x;l=g-A*Math.tan(g)/k*x*x*(.5-(1+3*C)*x*x/24),c=x*(1-b*(C/3+(1+3*C)*C*b/15))/Math.cos(g)}return t.x=_t(c+this.long0),t.y=Ii(l),t}var fd=["Cassini","Cassini_Soldner","cass"];const pd={init:ud,forward:cd,inverse:dd,names:fd};function Ri(t,n){var a;return t>1e-7?(a=t*n,(1-t*t)*(n/(1-a*a)-.5/t*Math.log((1-a)/(1+a)))):2*n}var io=1,no=2,so=3,Pa=4;function _d(){var t=Math.abs(this.lat0);if(Math.abs(t-ut)<dt?this.mode=this.lat0<0?io:no:Math.abs(t)<dt?this.mode=so:this.mode=Pa,this.es>0){var n;switch(this.qp=Ri(this.e,1),this.mmf=.5/(1-this.es),this.apa=bd(this.es),this.mode){case no:this.dd=1;break;case io:this.dd=1;break;case so:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case Pa:this.rq=Math.sqrt(.5*this.qp),n=Math.sin(this.lat0),this.sinb1=Ri(this.e,n)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*n*n)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===Pa&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function md(t){var n,a,l,c,f,p,g,A,k,C,x=t.x,b=t.y;if(x=_t(x-this.long0),this.sphere){if(f=Math.sin(b),C=Math.cos(b),l=Math.cos(x),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(a=this.mode===this.EQUIT?1+C*l:1+this.sinph0*f+this.cosph0*C*l,a<=dt)return null;a=Math.sqrt(2/a),n=a*C*Math.sin(x),a*=this.mode===this.EQUIT?f:this.cosph0*f-this.sinph0*C*l}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(l=-l),Math.abs(b+this.lat0)<dt)return null;a=jt-b*.5,a=2*(this.mode===this.S_POLE?Math.cos(a):Math.sin(a)),n=a*Math.sin(x),a*=l}}else{switch(g=0,A=0,k=0,l=Math.cos(x),c=Math.sin(x),f=Math.sin(b),p=Ri(this.e,f),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(g=p/this.qp,A=Math.sqrt(1-g*g)),this.mode){case this.OBLIQ:k=1+this.sinb1*g+this.cosb1*A*l;break;case this.EQUIT:k=1+A*l;break;case this.N_POLE:k=ut+b,p=this.qp-p;break;case this.S_POLE:k=b-ut,p=this.qp+p;break}if(Math.abs(k)<dt)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:k=Math.sqrt(2/k),this.mode===this.OBLIQ?a=this.ymf*k*(this.cosb1*g-this.sinb1*A*l):a=(k=Math.sqrt(2/(1+A*l)))*g*this.ymf,n=this.xmf*k*A*c;break;case this.N_POLE:case this.S_POLE:p>=0?(n=(k=Math.sqrt(p))*c,a=l*(this.mode===this.S_POLE?k:-k)):n=a=0;break}}return t.x=this.a*n+this.x0,t.y=this.a*a+this.y0,t}function gd(t){t.x-=this.x0,t.y-=this.y0;var n=t.x/this.a,a=t.y/this.a,l,c,f,p,g,A,k;if(this.sphere){var C=0,x,b=0;if(x=Math.sqrt(n*n+a*a),c=x*.5,c>1)return null;switch(c=2*Math.asin(c),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(b=Math.sin(c),C=Math.cos(c)),this.mode){case this.EQUIT:c=Math.abs(x)<=dt?0:Math.asin(a*b/x),n*=b,a=C*x;break;case this.OBLIQ:c=Math.abs(x)<=dt?this.lat0:Math.asin(C*this.sinph0+a*b*this.cosph0/x),n*=b*this.cosph0,a=(C-Math.sin(c)*this.sinph0)*x;break;case this.N_POLE:a=-a,c=ut-c;break;case this.S_POLE:c-=ut;break}l=a===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(n,a)}else{if(k=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(n/=this.dd,a*=this.dd,A=Math.sqrt(n*n+a*a),A<dt)return t.x=this.long0,t.y=this.lat0,t;p=2*Math.asin(.5*A/this.rq),f=Math.cos(p),n*=p=Math.sin(p),this.mode===this.OBLIQ?(k=f*this.sinb1+a*p*this.cosb1/A,g=this.qp*k,a=A*this.cosb1*f-a*this.sinb1*p):(k=a*p/A,g=this.qp*k,a=A*f)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),g=n*n+a*a,!g)return t.x=this.long0,t.y=this.lat0,t;k=1-g/this.qp,this.mode===this.S_POLE&&(k=-k)}l=Math.atan2(n,a),c=wd(Math.asin(k),this.apa)}return t.x=_t(this.long0+l),t.y=c,t}var yd=.3333333333333333,vd=.17222222222222222,Ad=.10257936507936508,Md=.06388888888888888,xd=.0664021164021164,Ld=.016415012942191543;function bd(t){var n,a=[];return a[0]=t*yd,n=t*t,a[0]+=n*vd,a[1]=n*Md,n*=t,a[0]+=n*Ad,a[1]+=n*xd,a[2]=n*Ld,a}function wd(t,n){var a=t+t;return t+n[0]*Math.sin(a)+n[1]*Math.sin(a+a)+n[2]*Math.sin(a+a+a)}var Cd=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const Ed={init:_d,forward:md,inverse:gd,names:Cd,S_POLE:io,N_POLE:no,EQUIT:so,OBLIQ:Pa};function Gi(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}function Pd(){Math.abs(this.lat1+this.lat2)<dt||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ci(this.e3,this.sin_po,this.cos_po),this.qs1=Ri(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ci(this.e3,this.sin_po,this.cos_po),this.qs2=Ri(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ri(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>dt?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function kd(t){var n=t.x,a=t.y;this.sin_phi=Math.sin(a),this.cos_phi=Math.cos(a);var l=Ri(this.e3,this.sin_phi),c=this.a*Math.sqrt(this.c-this.ns0*l)/this.ns0,f=this.ns0*_t(n-this.long0),p=c*Math.sin(f)+this.x0,g=this.rh-c*Math.cos(f)+this.y0;return t.x=p,t.y=g,t}function Bd(t){var n,a,l,c,f,p;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),l=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),l=-1),c=0,n!==0&&(c=Math.atan2(l*t.x,l*t.y)),l=n*this.ns0/this.a,this.sphere?p=Math.asin((this.c-l*l)/(2*this.ns0)):(a=(this.c-l*l)/this.ns0,p=this.phi1z(this.e3,a)),f=_t(c/this.ns0+this.long0),t.x=f,t.y=p,t}function Sd(t,n){var a,l,c,f,p,g=Gi(.5*n);if(t<dt)return g;for(var A=t*t,k=1;k<=25;k++)if(a=Math.sin(g),l=Math.cos(g),c=t*a,f=1-c*c,p=.5*f*f/l*(n/(1-A)-a/f+.5/t*Math.log((1-c)/(1+c))),g=g+p,Math.abs(p)<=1e-7)return g;return null}var Td=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const Dd={init:Pd,forward:kd,inverse:Bd,names:Td,phi1z:Sd};function Od(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Id(t){var n,a,l,c,f,p,g,A,k=t.x,C=t.y;return l=_t(k-this.long0),n=Math.sin(C),a=Math.cos(C),c=Math.cos(l),p=this.sin_p14*n+this.cos_p14*a*c,f=1,p>0||Math.abs(p)<=dt?(g=this.x0+this.a*f*a*Math.sin(l)/p,A=this.y0+this.a*f*(this.cos_p14*n-this.sin_p14*a*c)/p):(g=this.x0+this.infinity_dist*a*Math.sin(l),A=this.y0+this.infinity_dist*(this.cos_p14*n-this.sin_p14*a*c)),t.x=g,t.y=A,t}function Rd(t){var n,a,l,c,f,p;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(n=Math.sqrt(t.x*t.x+t.y*t.y))?(c=Math.atan2(n,this.rc),a=Math.sin(c),l=Math.cos(c),p=Gi(l*this.sin_p14+t.y*a*this.cos_p14/n),f=Math.atan2(t.x*a,n*this.cos_p14*l-t.y*this.sin_p14*a),f=_t(this.long0+f)):(p=this.phic0,f=0),t.x=f,t.y=p,t}var Gd=["gnom"];const Fd={init:Od,forward:Id,inverse:Rd,names:Gd};function zd(t,n){var a=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(n)-a)<1e-6)return n<0?-1*ut:ut;for(var l=Math.asin(.5*n),c,f,p,g,A=0;A<30;A++)if(f=Math.sin(l),p=Math.cos(l),g=t*f,c=Math.pow(1-g*g,2)/(2*p)*(n/(1-t*t)-f/(1-g*g)+.5/t*Math.log((1-g)/(1+g))),l+=c,Math.abs(c)<=1e-10)return l;return NaN}function Nd(){this.sphere||(this.k0=ci(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Ud(t){var n=t.x,a=t.y,l,c,f=_t(n-this.long0);if(this.sphere)l=this.x0+this.a*f*Math.cos(this.lat_ts),c=this.y0+this.a*Math.sin(a)/Math.cos(this.lat_ts);else{var p=Ri(this.e,Math.sin(a));l=this.x0+this.a*this.k0*f,c=this.y0+this.a*p*.5/this.k0}return t.x=l,t.y=c,t}function Zd(t){t.x-=this.x0,t.y-=this.y0;var n,a;return this.sphere?(n=_t(this.long0+t.x/this.a/Math.cos(this.lat_ts)),a=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(a=zd(this.e,2*t.y*this.k0/this.a),n=_t(this.long0+t.x/(this.a*this.k0))),t.x=n,t.y=a,t}var jd=["cea"];const qd={init:Nd,forward:Ud,inverse:Zd,names:jd};function Hd(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Vd(t){var n=t.x,a=t.y,l=_t(n-this.long0),c=Ii(a-this.lat0);return t.x=this.x0+this.a*l*this.rc,t.y=this.y0+this.a*c,t}function $d(t){var n=t.x,a=t.y;return t.x=_t(this.long0+(n-this.x0)/(this.a*this.rc)),t.y=Ii(this.lat0+(a-this.y0)/this.a),t}var Wd=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const Kd={init:Hd,forward:Vd,inverse:$d,names:Wd};var sl=20;function Xd(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=gs(this.es),this.e1=ys(this.es),this.e2=vs(this.es),this.e3=As(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Yd(t){var n=t.x,a=t.y,l,c,f,p=_t(n-this.long0);if(f=p*Math.sin(a),this.sphere)Math.abs(a)<=dt?(l=this.a*p,c=-1*this.a*this.lat0):(l=this.a*Math.sin(f)/Math.tan(a),c=this.a*(Ii(a-this.lat0)+(1-Math.cos(f))/Math.tan(a)));else if(Math.abs(a)<=dt)l=this.a*p,c=-1*this.ml0;else{var g=eo(this.a,this.e,Math.sin(a))/Math.tan(a);l=g*Math.sin(f),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+g*(1-Math.cos(f))}return t.x=l+this.x0,t.y=c+this.y0,t}function Jd(t){var n,a,l,c,f,p,g,A,k;if(l=t.x-this.x0,c=t.y-this.y0,this.sphere)if(Math.abs(c+this.a*this.lat0)<=dt)n=_t(l/this.a+this.long0),a=0;else{p=this.lat0+c/this.a,g=l*l/this.a/this.a+p*p,A=p;var C;for(f=sl;f;--f)if(C=Math.tan(A),k=-1*(p*(A*C+1)-A-.5*(A*A+g)*C)/((A-p)/C-1),A+=k,Math.abs(k)<=dt){a=A;break}n=_t(this.long0+Math.asin(l*Math.tan(A)/this.a)/Math.sin(a))}else if(Math.abs(c+this.ml0)<=dt)a=0,n=_t(this.long0+l/this.a);else{p=(this.ml0+c)/this.a,g=l*l/this.a/this.a+p*p,A=p;var x,b,T,G,Z;for(f=sl;f;--f)if(Z=this.e*Math.sin(A),x=Math.sqrt(1-Z*Z)*Math.tan(A),b=this.a*Te(this.e0,this.e1,this.e2,this.e3,A),T=this.e0-2*this.e1*Math.cos(2*A)+4*this.e2*Math.cos(4*A)-6*this.e3*Math.cos(6*A),G=b/this.a,k=(p*(x*G+1)-G-.5*x*(G*G+g))/(this.es*Math.sin(2*A)*(G*G+g-2*p*G)/(4*x)+(p-G)*(x*T-2/Math.sin(2*A))-T),A-=k,Math.abs(k)<=dt){a=A;break}x=Math.sqrt(1-this.es*Math.pow(Math.sin(a),2))*Math.tan(a),n=_t(this.long0+Math.asin(l*x/this.a)/Math.sin(a))}return t.x=n,t.y=a,t}var Qd=["Polyconic","American_Polyconic","poly"];const tf={init:Xd,forward:Yd,inverse:Jd,names:Qd};function ef(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function nf(t){var n,a=t.x,l=t.y,c=l-this.lat0,f=a-this.long0,p=c/us*1e-5,g=f,A=1,k=0;for(n=1;n<=10;n++)A=A*p,k=k+this.A[n]*A;var C=k,x=g,b=1,T=0,G,Z,K=0,at=0;for(n=1;n<=6;n++)G=b*C-T*x,Z=T*C+b*x,b=G,T=Z,K=K+this.B_re[n]*b-this.B_im[n]*T,at=at+this.B_im[n]*b+this.B_re[n]*T;return t.x=at*this.a+this.x0,t.y=K*this.a+this.y0,t}function sf(t){var n,a=t.x,l=t.y,c=a-this.x0,f=l-this.y0,p=f/this.a,g=c/this.a,A=1,k=0,C,x,b=0,T=0;for(n=1;n<=6;n++)C=A*p-k*g,x=k*p+A*g,A=C,k=x,b=b+this.C_re[n]*A-this.C_im[n]*k,T=T+this.C_im[n]*A+this.C_re[n]*k;for(var G=0;G<this.iterations;G++){var Z=b,K=T,at,rt,ct=p,yt=g;for(n=2;n<=6;n++)at=Z*b-K*T,rt=K*b+Z*T,Z=at,K=rt,ct=ct+(n-1)*(this.B_re[n]*Z-this.B_im[n]*K),yt=yt+(n-1)*(this.B_im[n]*Z+this.B_re[n]*K);Z=1,K=0;var mt=this.B_re[1],xt=this.B_im[1];for(n=2;n<=6;n++)at=Z*b-K*T,rt=K*b+Z*T,Z=at,K=rt,mt=mt+n*(this.B_re[n]*Z-this.B_im[n]*K),xt=xt+n*(this.B_im[n]*Z+this.B_re[n]*K);var Dt=mt*mt+xt*xt;b=(ct*mt+yt*xt)/Dt,T=(yt*mt-ct*xt)/Dt}var It=b,zt=T,Yt=1,Et=0;for(n=1;n<=9;n++)Yt=Yt*It,Et=Et+this.D[n]*Yt;var Zt=this.lat0+Et*us*1e5,be=this.long0+zt;return t.x=be,t.y=Zt,t}var af=["New_Zealand_Map_Grid","nzmg"];const rf={init:ef,forward:nf,inverse:sf,names:af};function of(){}function hf(t){var n=t.x,a=t.y,l=_t(n-this.long0),c=this.x0+this.a*l,f=this.y0+this.a*Math.log(Math.tan(Math.PI/4+a/2.5))*1.25;return t.x=c,t.y=f,t}function lf(t){t.x-=this.x0,t.y-=this.y0;var n=_t(this.long0+t.x/this.a),a=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=n,t.y=a,t}var uf=["Miller_Cylindrical","mill"];const cf={init:of,forward:hf,inverse:lf,names:uf};var df=20;function ff(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Kr(this.es)}function pf(t){var n,a,l=t.x,c=t.y;if(l=_t(l-this.long0),this.sphere){if(!this.m)c=this.n!==1?Math.asin(this.n*Math.sin(c)):c;else for(var f=this.n*Math.sin(c),p=df;p;--p){var g=(this.m*c+Math.sin(c)-f)/(this.m+Math.cos(c));if(c-=g,Math.abs(g)<dt)break}n=this.a*this.C_x*l*(this.m+Math.cos(c)),a=this.a*this.C_y*c}else{var A=Math.sin(c),k=Math.cos(c);a=this.a*Cn(c,A,k,this.en),n=this.a*l*k/Math.sqrt(1-this.es*A*A)}return t.x=n,t.y=a,t}function _f(t){var n,a,l,c;return t.x-=this.x0,l=t.x/this.a,t.y-=this.y0,n=t.y/this.a,this.sphere?(n/=this.C_y,l=l/(this.C_x*(this.m+Math.cos(n))),this.m?n=Gi((this.m*n+Math.sin(n))/this.n):this.n!==1&&(n=Gi(Math.sin(n)/this.n)),l=_t(l+this.long0),n=Ii(n)):(n=Xr(t.y/this.a,this.es,this.en),c=Math.abs(n),c<ut?(c=Math.sin(n),a=this.long0+t.x*Math.sqrt(1-this.es*c*c)/(this.a*Math.cos(n)),l=_t(a)):c-dt<ut&&(l=this.long0)),t.x=l,t.y=n,t}var mf=["Sinusoidal","sinu"];const gf={init:ff,forward:pf,inverse:_f,names:mf};function yf(){}function vf(t){for(var n=t.x,a=t.y,l=_t(n-this.long0),c=a,f=Math.PI*Math.sin(a);;){var p=-(c+Math.sin(c)-f)/(1+Math.cos(c));if(c+=p,Math.abs(p)<dt)break}c/=2,Math.PI/2-Math.abs(a)<dt&&(l=0);var g=.900316316158*this.a*l*Math.cos(c)+this.x0,A=1.4142135623731*this.a*Math.sin(c)+this.y0;return t.x=g,t.y=A,t}function Af(t){var n,a;t.x-=this.x0,t.y-=this.y0,a=t.y/(1.4142135623731*this.a),Math.abs(a)>.999999999999&&(a=.999999999999),n=Math.asin(a);var l=_t(this.long0+t.x/(.900316316158*this.a*Math.cos(n)));l<-Math.PI&&(l=-Math.PI),l>Math.PI&&(l=Math.PI),a=(2*n+Math.sin(2*n))/Math.PI,Math.abs(a)>1&&(a=1);var c=Math.asin(a);return t.x=l,t.y=c,t}var Mf=["Mollweide","moll"];const xf={init:yf,forward:vf,inverse:Af,names:Mf};function Lf(){Math.abs(this.lat1+this.lat2)<dt||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=gs(this.es),this.e1=ys(this.es),this.e2=vs(this.es),this.e3=As(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=ci(this.e,this.sin_phi,this.cos_phi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<dt?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=ci(this.e,this.sin_phi,this.cos_phi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function bf(t){var n=t.x,a=t.y,l;if(this.sphere)l=this.a*(this.g-a);else{var c=Te(this.e0,this.e1,this.e2,this.e3,a);l=this.a*(this.g-c)}var f=this.ns*_t(n-this.long0),p=this.x0+l*Math.sin(f),g=this.y0+this.rh-l*Math.cos(f);return t.x=p,t.y=g,t}function wf(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var n,a,l,c;this.ns>=0?(a=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(a=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1);var f=0;if(a!==0&&(f=Math.atan2(n*t.x,n*t.y)),this.sphere)return c=_t(this.long0+f/this.ns),l=Ii(this.g-a/this.a),t.x=c,t.y=l,t;var p=this.g-a/this.a;return l=Ea(p,this.e0,this.e1,this.e2,this.e3),c=_t(this.long0+f/this.ns),t.x=c,t.y=l,t}var Cf=["Equidistant_Conic","eqdc"];const Ef={init:Lf,forward:bf,inverse:wf,names:Cf};function Pf(){this.R=this.a}function kf(t){var n=t.x,a=t.y,l=_t(n-this.long0),c,f;Math.abs(a)<=dt&&(c=this.x0+this.R*l,f=this.y0);var p=Gi(2*Math.abs(a/Math.PI));(Math.abs(l)<=dt||Math.abs(Math.abs(a)-ut)<=dt)&&(c=this.x0,a>=0?f=this.y0+Math.PI*this.R*Math.tan(.5*p):f=this.y0+Math.PI*this.R*-Math.tan(.5*p));var g=.5*Math.abs(Math.PI/l-l/Math.PI),A=g*g,k=Math.sin(p),C=Math.cos(p),x=C/(k+C-1),b=x*x,T=x*(2/k-1),G=T*T,Z=Math.PI*this.R*(g*(x-G)+Math.sqrt(A*(x-G)*(x-G)-(G+A)*(b-G)))/(G+A);l<0&&(Z=-Z),c=this.x0+Z;var K=A+x;return Z=Math.PI*this.R*(T*K-g*Math.sqrt((G+A)*(A+1)-K*K))/(G+A),a>=0?f=this.y0+Z:f=this.y0-Z,t.x=c,t.y=f,t}function Bf(t){var n,a,l,c,f,p,g,A,k,C,x,b,T;return t.x-=this.x0,t.y-=this.y0,x=Math.PI*this.R,l=t.x/x,c=t.y/x,f=l*l+c*c,p=-Math.abs(c)*(1+f),g=p-2*c*c+l*l,A=-2*p+1+2*c*c+f*f,T=c*c/A+(2*g*g*g/A/A/A-9*p*g/A/A)/27,k=(p-g*g/3/A)/A,C=2*Math.sqrt(-k/3),x=3*T/k/C,Math.abs(x)>1&&(x>=0?x=1:x=-1),b=Math.acos(x)/3,t.y>=0?a=(-C*Math.cos(b+Math.PI/3)-g/3/A)*Math.PI:a=-(-C*Math.cos(b+Math.PI/3)-g/3/A)*Math.PI,Math.abs(l)<dt?n=this.long0:n=_t(this.long0+Math.PI*(f-1+Math.sqrt(1+2*(l*l-c*c)+f*f))/2/l),t.x=n,t.y=a,t}var Sf=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const Tf={init:Pf,forward:kf,inverse:Bf,names:Sf};function Df(t,n,a,l,c,f){const p=l-n,g=Math.atan((1-f)*Math.tan(t)),A=Math.atan((1-f)*Math.tan(a)),k=Math.sin(g),C=Math.cos(g),x=Math.sin(A),b=Math.cos(A);let T=p,G,Z=100,K,at,rt,ct,yt,mt,xt,Dt,It,zt,Yt,Et,Zt,be;do{if(K=Math.sin(T),at=Math.cos(T),rt=Math.sqrt(b*K*(b*K)+(C*x-k*b*at)*(C*x-k*b*at)),rt===0)return{azi1:0,s12:0};ct=k*x+C*b*at,yt=Math.atan2(rt,ct),mt=C*b*K/rt,xt=1-mt*mt,Dt=xt!==0?ct-2*k*x/xt:0,It=f/16*xt*(4+f*(4-3*xt)),G=T,T=p+(1-It)*f*mt*(yt+It*rt*(Dt+It*ct*(-1+2*Dt*Dt)))}while(Math.abs(T-G)>1e-12&&--Z>0);return Z===0?{azi1:NaN,s12:NaN}:(zt=xt*(c*c-c*(1-f)*(c*(1-f)))/(c*(1-f)*(c*(1-f))),Yt=1+zt/16384*(4096+zt*(-768+zt*(320-175*zt))),Et=zt/1024*(256+zt*(-128+zt*(74-47*zt))),Zt=Et*rt*(Dt+Et/4*(ct*(-1+2*Dt*Dt)-Et/6*Dt*(-3+4*rt*rt)*(-3+4*Dt*Dt))),be=c*(1-f)*Yt*(yt-Zt),{azi1:Math.atan2(b*K,C*x-k*b*at),s12:be})}function Of(t,n,a,l,c,f){const p=Math.atan((1-f)*Math.tan(t)),g=Math.sin(p),A=Math.cos(p),k=Math.sin(a),C=Math.cos(a),x=Math.atan2(g,A*C),b=A*k,T=1-b*b,G=T*(c*c-c*(1-f)*(c*(1-f)))/(c*(1-f)*(c*(1-f))),Z=1+G/16384*(4096+G*(-768+G*(320-175*G))),K=G/1024*(256+G*(-128+G*(74-47*G)));let at=l/(c*(1-f)*Z),rt,ct=100,yt,mt,xt,Dt;do yt=Math.cos(2*x+at),mt=Math.sin(at),xt=Math.cos(at),Dt=K*mt*(yt+K/4*(xt*(-1+2*yt*yt)-K/6*yt*(-3+4*mt*mt)*(-3+4*yt*yt))),rt=at,at=l/(c*(1-f)*Z)+Dt;while(Math.abs(at-rt)>1e-12&&--ct>0);if(ct===0)return{lat2:NaN,lon2:NaN};const It=g*mt-A*xt*C,zt=Math.atan2(g*xt+A*mt*C,(1-f)*Math.sqrt(b*b+It*It)),Yt=Math.atan2(mt*k,A*xt-g*mt*C),Et=f/16*T*(4+f*(4-3*T)),Zt=Yt-(1-Et)*f*b*(at+Et*mt*(yt+Et*xt*(-1+2*yt*yt))),be=n+Zt;return{lat2:zt,lon2:be}}function If(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))}function Rf(t){var n=t.x,a=t.y,l=Math.sin(t.y),c=Math.cos(t.y),f=_t(n-this.long0),p,g,A,k,C,x,b,T,G,Z,K;return this.sphere?Math.abs(this.sin_p12-1)<=dt?(t.x=this.x0+this.a*(ut-a)*Math.sin(f),t.y=this.y0-this.a*(ut-a)*Math.cos(f),t):Math.abs(this.sin_p12+1)<=dt?(t.x=this.x0+this.a*(ut+a)*Math.sin(f),t.y=this.y0+this.a*(ut+a)*Math.cos(f),t):(G=this.sin_p12*l+this.cos_p12*c*Math.cos(f),b=Math.acos(G),T=b?b/Math.sin(b):1,t.x=this.x0+this.a*T*c*Math.sin(f),t.y=this.y0+this.a*T*(this.cos_p12*l-this.sin_p12*c*Math.cos(f)),t):(p=gs(this.es),g=ys(this.es),A=vs(this.es),k=As(this.es),Math.abs(this.sin_p12-1)<=dt?(C=this.a*Te(p,g,A,k,ut),x=this.a*Te(p,g,A,k,a),t.x=this.x0+(C-x)*Math.sin(f),t.y=this.y0-(C-x)*Math.cos(f),t):Math.abs(this.sin_p12+1)<=dt?(C=this.a*Te(p,g,A,k,ut),x=this.a*Te(p,g,A,k,a),t.x=this.x0+(C+x)*Math.sin(f),t.y=this.y0+(C+x)*Math.cos(f),t):Math.abs(n)<dt&&Math.abs(a-this.lat0)<dt?(t.x=t.y=0,t):(Z=Df(this.lat0,this.long0,a,n,this.a,this.f),K=Z.azi1,t.x=Z.s12*Math.sin(K),t.y=Z.s12*Math.cos(K),t))}function Gf(t){t.x-=this.x0,t.y-=this.y0;var n,a,l,c,f,p,g,A,k,C,x,b,T,G,Z,K;return this.sphere?(n=Math.sqrt(t.x*t.x+t.y*t.y),n>2*ut*this.a?void 0:(a=n/this.a,l=Math.sin(a),c=Math.cos(a),f=this.long0,Math.abs(n)<=dt?p=this.lat0:(p=Gi(c*this.sin_p12+t.y*l*this.cos_p12/n),g=Math.abs(this.lat0)-ut,Math.abs(g)<=dt?this.lat0>=0?f=_t(this.long0+Math.atan2(t.x,-t.y)):f=_t(this.long0-Math.atan2(-t.x,t.y)):f=_t(this.long0+Math.atan2(t.x*l,n*this.cos_p12*c-t.y*this.sin_p12*l))),t.x=f,t.y=p,t)):(A=gs(this.es),k=ys(this.es),C=vs(this.es),x=As(this.es),Math.abs(this.sin_p12-1)<=dt?(b=this.a*Te(A,k,C,x,ut),n=Math.sqrt(t.x*t.x+t.y*t.y),T=b-n,p=Ea(T/this.a,A,k,C,x),f=_t(this.long0+Math.atan2(t.x,-1*t.y)),t.x=f,t.y=p,t):Math.abs(this.sin_p12+1)<=dt?(b=this.a*Te(A,k,C,x,ut),n=Math.sqrt(t.x*t.x+t.y*t.y),T=n-b,p=Ea(T/this.a,A,k,C,x),f=_t(this.long0+Math.atan2(t.x,t.y)),t.x=f,t.y=p,t):(G=Math.atan2(t.x,t.y),Z=Math.sqrt(t.x*t.x+t.y*t.y),K=Of(this.lat0,this.long0,G,Z,this.a,this.f),t.x=K.lon2,t.y=K.lat2,t))}var Ff=["Azimuthal_Equidistant","aeqd"];const zf={init:If,forward:Rf,inverse:Gf,names:Ff};function Nf(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Uf(t){var n,a,l,c,f,p,g,A,k=t.x,C=t.y;return l=_t(k-this.long0),n=Math.sin(C),a=Math.cos(C),c=Math.cos(l),p=this.sin_p14*n+this.cos_p14*a*c,f=1,(p>0||Math.abs(p)<=dt)&&(g=this.a*f*a*Math.sin(l),A=this.y0+this.a*f*(this.cos_p14*n-this.sin_p14*a*c)),t.x=g,t.y=A,t}function Zf(t){var n,a,l,c,f,p,g;return t.x-=this.x0,t.y-=this.y0,n=Math.sqrt(t.x*t.x+t.y*t.y),a=Gi(n/this.a),l=Math.sin(a),c=Math.cos(a),p=this.long0,Math.abs(n)<=dt?(g=this.lat0,t.x=p,t.y=g,t):(g=Gi(c*this.sin_p14+t.y*l*this.cos_p14/n),f=Math.abs(this.lat0)-ut,Math.abs(f)<=dt?(this.lat0>=0?p=_t(this.long0+Math.atan2(t.x,-t.y)):p=_t(this.long0-Math.atan2(-t.x,t.y)),t.x=p,t.y=g,t):(p=_t(this.long0+Math.atan2(t.x*l,n*this.cos_p14*c-t.y*this.sin_p14*l)),t.x=p,t.y=g,t))}var jf=["ortho"];const qf={init:Nf,forward:Uf,inverse:Zf,names:jf};var ie={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},qt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Hf(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ut-jt/2?this.face=ie.TOP:this.lat0<=-(ut-jt/2)?this.face=ie.BOTTOM:Math.abs(this.long0)<=jt?this.face=ie.FRONT:Math.abs(this.long0)<=ut+jt?this.face=this.long0>0?ie.RIGHT:ie.LEFT:this.face=ie.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function Vf(t){var n={x:0,y:0},a,l,c,f,p,g,A={value:0};if(t.x-=this.long0,this.es!==0?a=Math.atan(this.one_minus_f_squared*Math.tan(t.y)):a=t.y,l=t.x,this.face===ie.TOP)f=ut-a,l>=jt&&l<=ut+jt?(A.value=qt.AREA_0,c=l-ut):l>ut+jt||l<=-(ut+jt)?(A.value=qt.AREA_1,c=l>0?l-he:l+he):l>-(ut+jt)&&l<=-jt?(A.value=qt.AREA_2,c=l+ut):(A.value=qt.AREA_3,c=l);else if(this.face===ie.BOTTOM)f=ut+a,l>=jt&&l<=ut+jt?(A.value=qt.AREA_0,c=-l+ut):l<jt&&l>=-jt?(A.value=qt.AREA_1,c=-l):l<-jt&&l>=-(ut+jt)?(A.value=qt.AREA_2,c=-l-ut):(A.value=qt.AREA_3,c=l>0?-l+he:-l-he);else{var k,C,x,b,T,G,Z;this.face===ie.RIGHT?l=Pn(l,+ut):this.face===ie.BACK?l=Pn(l,+he):this.face===ie.LEFT&&(l=Pn(l,-ut)),b=Math.sin(a),T=Math.cos(a),G=Math.sin(l),Z=Math.cos(l),k=T*Z,C=T*G,x=b,this.face===ie.FRONT?(f=Math.acos(k),c=ka(f,x,C,A)):this.face===ie.RIGHT?(f=Math.acos(C),c=ka(f,x,-k,A)):this.face===ie.BACK?(f=Math.acos(-k),c=ka(f,x,-C,A)):this.face===ie.LEFT?(f=Math.acos(-C),c=ka(f,x,k,A)):(f=c=0,A.value=qt.AREA_0)}return g=Math.atan(12/he*(c+Math.acos(Math.sin(c)*Math.cos(jt))-ut)),p=Math.sqrt((1-Math.cos(f))/(Math.cos(g)*Math.cos(g))/(1-Math.cos(Math.atan(1/Math.cos(c))))),A.value===qt.AREA_1?g+=ut:A.value===qt.AREA_2?g+=he:A.value===qt.AREA_3&&(g+=1.5*he),n.x=p*Math.cos(g),n.y=p*Math.sin(g),n.x=n.x*this.a+this.x0,n.y=n.y*this.a+this.y0,t.x=n.x,t.y=n.y,t}function $f(t){var n={lam:0,phi:0},a,l,c,f,p,g,A,k,C,x={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,l=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),a=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?x.value=qt.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(x.value=qt.AREA_1,a-=ut):t.x<0&&-t.x>=Math.abs(t.y)?(x.value=qt.AREA_2,a=a<0?a+he:a-he):(x.value=qt.AREA_3,a+=ut),C=he/12*Math.tan(a),p=Math.sin(C)/(Math.cos(C)-1/Math.sqrt(2)),g=Math.atan(p),c=Math.cos(a),f=Math.tan(l),A=1-c*c*f*f*(1-Math.cos(Math.atan(1/Math.cos(g)))),A<-1?A=-1:A>1&&(A=1),this.face===ie.TOP)k=Math.acos(A),n.phi=ut-k,x.value===qt.AREA_0?n.lam=g+ut:x.value===qt.AREA_1?n.lam=g<0?g+he:g-he:x.value===qt.AREA_2?n.lam=g-ut:n.lam=g;else if(this.face===ie.BOTTOM)k=Math.acos(A),n.phi=k-ut,x.value===qt.AREA_0?n.lam=-g+ut:x.value===qt.AREA_1?n.lam=-g:x.value===qt.AREA_2?n.lam=-g-ut:n.lam=g<0?-g-he:-g+he;else{var b,T,G;b=A,C=b*b,C>=1?G=0:G=Math.sqrt(1-C)*Math.sin(g),C+=G*G,C>=1?T=0:T=Math.sqrt(1-C),x.value===qt.AREA_1?(C=T,T=-G,G=C):x.value===qt.AREA_2?(T=-T,G=-G):x.value===qt.AREA_3&&(C=T,T=G,G=-C),this.face===ie.RIGHT?(C=b,b=-T,T=C):this.face===ie.BACK?(b=-b,T=-T):this.face===ie.LEFT&&(C=b,b=T,T=-C),n.phi=Math.acos(-G)-ut,n.lam=Math.atan2(T,b),this.face===ie.RIGHT?n.lam=Pn(n.lam,-ut):this.face===ie.BACK?n.lam=Pn(n.lam,-he):this.face===ie.LEFT&&(n.lam=Pn(n.lam,+ut))}if(this.es!==0){var Z,K,at;Z=n.phi<0?1:0,K=Math.tan(n.phi),at=this.b/Math.sqrt(K*K+this.one_minus_f_squared),n.phi=Math.atan(Math.sqrt(this.a*this.a-at*at)/(this.one_minus_f*at)),Z&&(n.phi=-n.phi)}return n.lam+=this.long0,t.x=n.lam,t.y=n.phi,t}function ka(t,n,a,l){var c;return t<dt?(l.value=qt.AREA_0,c=0):(c=Math.atan2(n,a),Math.abs(c)<=jt?l.value=qt.AREA_0:c>jt&&c<=ut+jt?(l.value=qt.AREA_1,c-=ut):c>ut+jt||c<=-(ut+jt)?(l.value=qt.AREA_2,c=c>=0?c-he:c+he):(l.value=qt.AREA_3,c+=ut)),c}function Pn(t,n){var a=t+n;return a<-he?a+=cs:a>+he&&(a-=cs),a}var Wf=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const Kf={init:Hf,forward:Vf,inverse:$f,names:Wf};var ao=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ms=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],al=.8487,rl=1.3523,ol=ui/5,Xf=1/ol,kn=18,Ba=function(t,n){return t[0]+n*(t[1]+n*(t[2]+n*t[3]))},Yf=function(t,n){return t[1]+n*(2*t[2]+n*3*t[3])};function Jf(t,n,a,l){for(var c=n;l;--l){var f=t(c);if(c-=f,Math.abs(f)<a)break}return c}function Qf(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function t0(t){var n=_t(t.x-this.long0),a=Math.abs(t.y),l=Math.floor(a*ol);l<0?l=0:l>=kn&&(l=kn-1),a=ui*(a-Xf*l);var c={x:Ba(ao[l],a)*n,y:Ba(Ms[l],a)};return t.y<0&&(c.y=-c.y),c.x=c.x*this.a*al+this.x0,c.y=c.y*this.a*rl+this.y0,c}function e0(t){var n={x:(t.x-this.x0)/(this.a*al),y:Math.abs(t.y-this.y0)/(this.a*rl)};if(n.y>=1)n.x/=ao[kn][0],n.y=t.y<0?-ut:ut;else{var a=Math.floor(n.y*kn);for(a<0?a=0:a>=kn&&(a=kn-1);;)if(Ms[a][0]>n.y)--a;else if(Ms[a+1][0]<=n.y)++a;else break;var l=Ms[a],c=5*(n.y-l[0])/(Ms[a+1][0]-l[0]);c=Jf(function(f){return(Ba(l,f)-n.y)/Yf(l,f)},c,dt,100),n.x/=Ba(ao[a],c),n.y=(5*a+c)*ye,t.y<0&&(n.y=-n.y)}return n.x=_t(n.x+this.long0),n}var i0=["Robinson","robin"];const n0={init:Qf,forward:t0,inverse:e0,names:i0};function s0(){this.name="geocent"}function a0(t){var n=Gh(t,this.es,this.a);return n}function r0(t){var n=Fh(t,this.es,this.a,this.b);return n}var o0=["Geocentric","geocentric","geocent","Geocent"];const h0={init:s0,forward:a0,inverse:r0,names:o0};var Le={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},xs={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function l0(){if(Object.keys(xs).forEach((function(a){if(typeof this[a]>"u")this[a]=xs[a].def;else{if(xs[a].num&&isNaN(this[a]))throw new Error("Invalid parameter value, must be numeric "+a+" = "+this[a]);xs[a].num&&(this[a]=parseFloat(this[a]))}xs[a].degrees&&(this[a]=this[a]*ye)}).bind(this)),Math.abs(Math.abs(this.lat0)-ut)<dt?this.mode=this.lat0<0?Le.S_POLE:Le.N_POLE:Math.abs(this.lat0)<dt?this.mode=Le.EQUIT:(this.mode=Le.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,n=this.azi;this.cg=Math.cos(n),this.sg=Math.sin(n),this.cw=Math.cos(t),this.sw=Math.sin(t)}function u0(t){t.x-=this.long0;var n=Math.sin(t.y),a=Math.cos(t.y),l=Math.cos(t.x),c,f;switch(this.mode){case Le.OBLIQ:f=this.sinph0*n+this.cosph0*a*l;break;case Le.EQUIT:f=a*l;break;case Le.S_POLE:f=-n;break;case Le.N_POLE:f=n;break}switch(f=this.pn1/(this.p-f),c=f*a*Math.sin(t.x),this.mode){case Le.OBLIQ:f*=this.cosph0*n-this.sinph0*a*l;break;case Le.EQUIT:f*=n;break;case Le.N_POLE:f*=-(a*l);break;case Le.S_POLE:f*=a*l;break}var p,g;return p=f*this.cg+c*this.sg,g=1/(p*this.sw*this.h1+this.cw),c=(c*this.cg-f*this.sg)*this.cw*g,f=p*g,t.x=c*this.a,t.y=f*this.a,t}function c0(t){t.x/=this.a,t.y/=this.a;var n={x:t.x,y:t.y},a,l,c;c=1/(this.pn1-t.y*this.sw),a=this.pn1*t.x*c,l=this.pn1*t.y*this.cw*c,t.x=a*this.cg+l*this.sg,t.y=l*this.cg-a*this.sg;var f=ze(t.x,t.y);if(Math.abs(f)<dt)n.x=0,n.y=t.y;else{var p,g;switch(g=1-f*f*this.pfact,g=(this.p-Math.sqrt(g))/(this.pn1/f+f/this.pn1),p=Math.sqrt(1-g*g),this.mode){case Le.OBLIQ:n.y=Math.asin(p*this.sinph0+t.y*g*this.cosph0/f),t.y=(p-this.sinph0*Math.sin(n.y))*f,t.x*=g*this.cosph0;break;case Le.EQUIT:n.y=Math.asin(t.y*g/f),t.y=p*f,t.x*=g;break;case Le.N_POLE:n.y=Math.asin(p),t.y=-t.y;break;case Le.S_POLE:n.y=-Math.asin(p);break}n.x=Math.atan2(t.x,t.y)}return t.x=n.x+this.long0,t.y=n.y,t}var d0=["Tilted_Perspective","tpers"];const f0={init:l0,forward:u0,inverse:c0,names:d0};function p0(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var t=1-this.es,n=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=n,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function _0(t){var n=t.x,a=t.y,l,c,f,p;if(n=n-this.long0,this.shape==="ellipse"){a=Math.atan(this.radius_p2*Math.tan(a));var g=this.radius_p/ze(this.radius_p*Math.cos(a),Math.sin(a));if(c=g*Math.cos(n)*Math.cos(a),f=g*Math.sin(n)*Math.cos(a),p=g*Math.sin(a),(this.radius_g-c)*c-f*f-p*p*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;l=this.radius_g-c,this.flip_axis?(t.x=this.radius_g_1*Math.atan(f/ze(p,l)),t.y=this.radius_g_1*Math.atan(p/l)):(t.x=this.radius_g_1*Math.atan(f/l),t.y=this.radius_g_1*Math.atan(p/ze(f,l)))}else this.shape==="sphere"&&(l=Math.cos(a),c=Math.cos(n)*l,f=Math.sin(n)*l,p=Math.sin(a),l=this.radius_g-c,this.flip_axis?(t.x=this.radius_g_1*Math.atan(f/ze(p,l)),t.y=this.radius_g_1*Math.atan(p/l)):(t.x=this.radius_g_1*Math.atan(f/l),t.y=this.radius_g_1*Math.atan(p/ze(f,l))));return t.x=t.x*this.a,t.y=t.y*this.a,t}function m0(t){var n=-1,a=0,l=0,c,f,p,g;if(t.x=t.x/this.a,t.y=t.y/this.a,this.shape==="ellipse"){this.flip_axis?(l=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*ze(1,l)):(a=Math.tan(t.x/this.radius_g_1),l=Math.tan(t.y/this.radius_g_1)*ze(1,a));var A=l/this.radius_p;if(c=a*a+A*A+n*n,f=2*this.radius_g*n,p=f*f-4*c*this.C,p<0)return t.x=Number.NaN,t.y=Number.NaN,t;g=(-f-Math.sqrt(p))/(2*c),n=this.radius_g+g*n,a*=g,l*=g,t.x=Math.atan2(a,n),t.y=Math.atan(l*Math.cos(t.x)/n),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if(this.shape==="sphere"){if(this.flip_axis?(l=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+l*l)):(a=Math.tan(t.x/this.radius_g_1),l=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),c=a*a+l*l+n*n,f=2*this.radius_g*n,p=f*f-4*c*this.C,p<0)return t.x=Number.NaN,t.y=Number.NaN,t;g=(-f-Math.sqrt(p))/(2*c),n=this.radius_g+g*n,a*=g,l*=g,t.x=Math.atan2(a,n),t.y=Math.atan(l*Math.cos(t.x)/n)}return t.x=t.x+this.long0,t}var g0=["Geostationary Satellite View","Geostationary_Satellite","geos"];const y0={init:p0,forward:_0,inverse:m0,names:g0};var Ls=1.340264,bs=-.081106,ws=893e-6,Cs=.003796,Sa=Math.sqrt(3)/2;function v0(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function A0(t){var n=_t(t.x-this.long0),a=t.y,l=Math.asin(Sa*Math.sin(a)),c=l*l,f=c*c*c;return t.x=n*Math.cos(l)/(Sa*(Ls+3*bs*c+f*(7*ws+9*Cs*c))),t.y=l*(Ls+bs*c+f*(ws+Cs*c)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function M0(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var n=1e-9,a=12,l=t.y,c,f,p,g,A,k;for(k=0;k<a&&(c=l*l,f=c*c*c,p=l*(Ls+bs*c+f*(ws+Cs*c))-t.y,g=Ls+3*bs*c+f*(7*ws+9*Cs*c),l-=A=p/g,!(Math.abs(A)<n));++k);return c=l*l,f=c*c*c,t.x=Sa*t.x*(Ls+3*bs*c+f*(7*ws+9*Cs*c))/Math.cos(l),t.y=Math.asin(Math.sin(l)/Sa),t.x=_t(t.x+this.long0),t}var x0=["eqearth","Equal Earth","Equal_Earth"];const L0={init:v0,forward:A0,inverse:M0,names:x0};var Es=1e-10;function b0(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Es)throw new Error;this.es?(this.en=Kr(this.es),this.m1=Cn(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=C0,this.forward=w0):(Math.abs(this.phi1)+Es>=ut?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=P0,this.forward=E0)}function w0(t){var n=_t(t.x-(this.long0||0)),a=t.y,l,c,f;return l=this.am1+this.m1-Cn(a,c=Math.sin(a),f=Math.cos(a),this.en),c=f*n/(l*Math.sqrt(1-this.es*c*c)),t.x=l*Math.sin(c),t.y=this.am1-l*Math.cos(c),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function C0(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n,a,l,c;if(a=ze(t.x,t.y=this.am1-t.y),c=Xr(this.am1+this.m1-a,this.es,this.en),(n=Math.abs(c))<ut)n=Math.sin(c),l=a*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*n*n)/Math.cos(c);else if(Math.abs(n-ut)<=Es)l=0;else throw new Error;return t.x=_t(l+(this.long0||0)),t.y=Ii(c),t}function E0(t){var n=_t(t.x-(this.long0||0)),a=t.y,l,c;return c=this.cphi1+this.phi1-a,Math.abs(c)>Es?(t.x=c*Math.sin(l=n*Math.cos(a)/c),t.y=this.cphi1-c*Math.cos(l)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function P0(t){t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n,a,l=ze(t.x,t.y=this.cphi1-t.y);if(a=this.cphi1+this.phi1-l,Math.abs(a)>ut)throw new Error;return Math.abs(Math.abs(a)-ut)<=Es?n=0:n=l*Math.atan2(t.x,t.y)/Math.cos(a),t.x=_t(n+(this.long0||0)),t.y=Ii(a),t}var k0=["bonne","Bonne (Werner lat_1=90)"];const B0={init:b0,names:k0};function S0(t){t.Proj.projections.add(wa),t.Proj.projections.add(Ca),t.Proj.projections.add(Pc),t.Proj.projections.add(Gc),t.Proj.projections.add(Zc),t.Proj.projections.add($c),t.Proj.projections.add(Qc),t.Proj.projections.add(sd),t.Proj.projections.add(ld),t.Proj.projections.add(pd),t.Proj.projections.add(Ed),t.Proj.projections.add(Dd),t.Proj.projections.add(Fd),t.Proj.projections.add(qd),t.Proj.projections.add(Kd),t.Proj.projections.add(tf),t.Proj.projections.add(rf),t.Proj.projections.add(cf),t.Proj.projections.add(gf),t.Proj.projections.add(xf),t.Proj.projections.add(Ef),t.Proj.projections.add(Tf),t.Proj.projections.add(zf),t.Proj.projections.add(qf),t.Proj.projections.add(Kf),t.Proj.projections.add(n0),t.Proj.projections.add(h0),t.Proj.projections.add(f0),t.Proj.projections.add(y0),t.Proj.projections.add(L0),t.Proj.projections.add(B0)}const hl=Object.assign(Hu,{defaultDatum:"WGS84",Proj:ni,WGS84:new ni("WGS84"),Point:wn,toPoint:Zh,defs:Se,nadgrid:Eu,transform:La,mgrs:Vu,version:"__VERSION__"});S0(hl);const T0=Dl(Object.freeze(Object.defineProperty({__proto__:null,default:hl},Symbol.toStringTag,{value:"Module"})));(function(t){(function(n){var a,l;a=gh(),l=T0,t.exports=n(a,l)})(function(n,a){return a.__esModule&&a.default&&(a=a.default),n.Proj={},n.Proj._isProj4Obj=function(l){return typeof l.inverse<"u"&&typeof l.forward<"u"},n.Proj.Projection=n.Class.extend({initialize:function(l,c,f){var p=n.Proj._isProj4Obj(l);this._proj=p?l:this._projFromCodeDef(l,c),this.bounds=p?c:f},project:function(l){var c=this._proj.forward([l.lng,l.lat]);return new n.Point(c[0],c[1])},unproject:function(l,c){var f=this._proj.inverse([l.x,l.y]);return new n.LatLng(f[1],f[0],c)},_projFromCodeDef:function(l,c){if(c)a.defs(l,c);else if(a.defs[l]===void 0){var f=l.split(":");if(f.length>3&&(l=f[f.length-3]+":"+f[f.length-1]),a.defs[l]===void 0)throw"No projection definition for code "+l}return a(l)}}),n.Proj.CRS=n.Class.extend({includes:n.CRS,options:{transformation:new n.Transformation(1,0,-1,0)},initialize:function(l,c,f){var p,g,A,k;if(n.Proj._isProj4Obj(l)?(g=l,p=g.srsCode,k=c||{},this.projection=new n.Proj.Projection(g,k.bounds)):(p=l,A=c,k=f||{},this.projection=new n.Proj.Projection(p,A,k.bounds)),n.Util.setOptions(this,k),this.code=p,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new n.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var C=this.options.resolutions.length-1;C>=0;C--)this.options.resolutions[C]&&(this._scales[C]=1/this.options.resolutions[C])}this.infinite=!this.options.bounds},scale:function(l){var c=Math.floor(l),f,p,g,A;return l===c?this._scales[l]:(f=this._scales[c],p=this._scales[c+1],g=p-f,A=l-c,f+g*A)},zoom:function(l){var c=this._closestElement(this._scales,l),f=this._scales.indexOf(c),p,g,A;return l===c?f:c===void 0?-1/0:(g=f+1,p=this._scales[g],p===void 0?1/0:(A=p-c,(l-c)/A+f))},distance:n.CRS.Earth.distance,R:n.CRS.Earth.R,_closestElement:function(l,c){for(var f,p=l.length;p--;)l[p]<=c&&(f===void 0||f<l[p])&&(f=l[p]);return f}}),n.Proj.GeoJSON=n.GeoJSON.extend({initialize:function(l,c){this._callLevel=0,n.GeoJSON.prototype.initialize.call(this,l,c)},addData:function(l){var c;l&&(l.crs&&l.crs.type==="name"?c=new n.Proj.CRS(l.crs.properties.name):l.crs&&l.crs.type&&(c=new n.Proj.CRS(l.crs.type+":"+l.crs.properties.code)),c!==void 0&&(this.options.coordsToLatLng=function(f){var p=n.point(f[0],f[1]);return c.projection.unproject(p)})),this._callLevel++;try{n.GeoJSON.prototype.addData.call(this,l)}finally{this._callLevel--,this._callLevel===0&&delete this.options.coordsToLatLng}}}),n.Proj.geoJson=function(l,c){return new n.Proj.GeoJSON(l,c)},n.Proj.ImageOverlay=n.ImageOverlay.extend({initialize:function(l,c,f){n.ImageOverlay.prototype.initialize.call(this,l,null,f),this._projectedBounds=c},_animateZoom:function(l){var c=this._map.getZoomScale(l.zoom),f=n.point(this._projectedBounds.min.x,this._projectedBounds.max.y),p=this._projectedToNewLayerPoint(f,l.zoom,l.center);n.DomUtil.setTransform(this._image,p,c)},_reset:function(){var l=this._map.getZoom(),c=this._map.getPixelOrigin(),f=n.bounds(this._transform(this._projectedBounds.min,l)._subtract(c),this._transform(this._projectedBounds.max,l)._subtract(c)),p=f.getSize();n.DomUtil.setPosition(this._image,f.min),this._image.style.width=p.x+"px",this._image.style.height=p.y+"px"},_projectedToNewLayerPoint:function(l,c,f){var p=this._map.getSize()._divideBy(2),g=this._map.project(f,c)._subtract(p)._round(),A=g.add(this._map._getMapPanePos());return this._transform(l,c)._subtract(A)},_transform:function(l,c){var f=this._map.options.crs,p=f.transformation,g=f.scale(c);return p.transform(l,g)}}),n.Proj.imageOverlay=function(l,c,f){return new n.Proj.ImageOverlay(l,c,f)},n.Proj})})(Rl);const ro=new U.Proj.CRS("EPSG:900913","+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",{resolutions:function(){var t=[];t[0]=Math.pow(2,18);for(var n=1;n<21;n++)t[n]=Math.pow(2,18-n);return t}(),origin:[0,0],bounds:U.bounds([20037508342789244e-9,0],[0,20037508342789244e-9])}),ll=U.Marker.extend({options:{fontSize:"12px",color:"#f00",fontShadowColor:"none",fontWeight:"normal",background:"rgba(0, 0, 0, 0)",minZoom:void 0,maxZoom:void 0,clsName:"leaflet-text",offset:[6,6]},initialize(t,n,a={}){this._latlng=t,this._enabled=!1,this.options.id=a.id||"text_"+$t.Util.guid(),this.options.text=n||"",a=Object.assign(this.options,a),U.setOptions(this,a);const{id:l,fontSize:c,color:f,fontWeight:p,background:g,fontShadowColor:A,clsName:k,offset:C}=this.options;this.options.icon=new U.DivIcon({html:`<span id=${l} class="leaflet-text-label" style="font-weight:${p};font-size:${c};color:${f};background:${g};text-shadow:${A} 1px 0px 2px">${n||""}</span>`,className:k,iconAnchor:C}),U.Marker.prototype.initialize.call(this,t,this.options)},setStyle(t){const n=document.getElementById(this.options.id),{text:a,color:l,fontSize:c,fontShadowColor:f,fontWeight:p}=t,g=t.background||"none";return n&&(l&&(this.options.color=l,n.style.color=l),p&&(this.options.fontWeight=p,n.style.fontWeight=p),c&&(this.options.fontSize=c,n.style.fontSize=c),this.options.background=g,n.style.background=g,a&&(this.options.text=a,n.textContent=a),f?(this.options.fontShadowColor=f,n.style["text-shadow"]=f+" 1px 0px 2px"):(this.options.fontShadowColor="none",n.style["text-shadow"]="none")),this},enableEdit(t){const{fontSize:n,color:a,text:l}=this.options;if(!this._enabled){this._enabled=!0;const c=new U.DivIcon({html:`<input type="text" id="text-input-icon" style="font-size:${n};color:${a};" value=${l}></input>`,className:"leaflet-text"});return this.setIcon(c),document.getElementById("text-input-icon").onblur=f=>{this.options.text=f.target.value,setTimeout(()=>{this.disableEdit(),t&&t(this)},100)},document.getElementById("text-input-icon").onkeydown=function(f){f.keyCode===13&&(this.options.text=f.target.value,this.blur(f))},this}},disableEdit(t){if(this._enabled){this._enabled=!1;const{id:n,color:a,fontSize:l,fontWeight:c,fontShadowColor:f}=this.options,p=new U.DivIcon({html:`<span id=${n} style="padding:2px 4px;white-space:nowrap;font-weight:${c};font-size:${l};color:${a};text-shadow:${f} 1px 2px 3px">${this.options.text}</span>`,className:"leaflet-text"});return this.setIcon(p),t&&t(this),this}}}),ul=U.Marker.extend({options:{color:"#f00",diveColor:"#f00",iconSize:[14,14],level:0,speedTime:2,animation:!0},initialize(t,n){U.setOptions(this,n);const{clsPrefix:a}=this.options;this.tempDivEle=document.createElement("div"),this.spanEl=$t.DomUtil.create("span",`${a}-pulse-icon`),this.aEl=$t.DomUtil.create("a",`${a}-dive-icon`),this.tempDivEle.append(this.spanEl),this.spanEl.append(this.aEl),this._init(),U.Marker.prototype.initialize.call(this,t,this.options)},_init(){const{color:t,iconSize:n,diveColor:a,level:l,speedTime:c,animation:f,clsPrefix:p}=this.options;t&&(this.spanEl.style.backgroundColor=t,a||(this.aEl.style.boxShadow="0 0 6px 2px "+t)),n&&(this.spanEl.style.width=n[0]+"px",this.spanEl.style.height=n[1]+"px"),f&&c?(this.aEl.style.setProperty("animation","pulsate "+c+"s infinite"),l?a?this.aEl.style.boxShadow="0 0 "+l*3+"px "+l+"px "+a:t&&(this.aEl.style.boxShadow="0 0 "+l*3+"px "+l+"px "+t):a&&(l?this.aEl.style.boxShadow="0 0 "+l*3+"px "+l+"px "+a:this.aEl.style.boxShadow="0 0 6px 2px "+a)):(this.aEl.style.removeProperty("animation"),this.aEl.style.removeProperty("box-shadow"));const g=L.divIcon({iconSize:n,iconAnchor:n.map(A=>A/2),className:`${p}-blink-marker`,html:this.tempDivEle.innerHTML});this.options.icon?this.setIcon(g):this.options.icon=g},setOptions(t){U.setOptions(this,t),this._init()},start(t){U.setOptions(this,t),this.options.animation=!0,this._init()},stop(t){U.setOptions(this,t),this.options.animation=!1,this._init()}}),cl=U.Layer.extend({initialize:function(t){L.setOptions(this,t),this._onClickListeners=[],this._onHoverListeners=[]},setOptions:function(t){return L.setOptions(this,t),this.redraw()},redraw:function(){this._redraw(!0)},addMarkers:function(t){var n=this,a=[],l=[];t.forEach(function(c){if(!(c.options.pane=="markerPane"&&c.options.icon)){console.error("Layer isn't a marker");return}var f=c.getLatLng(),p=n._map.getBounds().contains(f),g=n._addMarker(c,f,p);p===!0&&a.push(g[0]),l.push(g[1])}),n._markers.load(a),n._latlngMarkers.load(l)},addMarker:function(t){var n=this,a=t.getLatLng(),l=n._map.getBounds().contains(a),c=n._addMarker(t,a,l);l===!0&&n._markers.insert(c[0]),n._latlngMarkers.insert(c[1])},addLayer:function(t){t.options.pane=="markerPane"&&t.options.icon?this.addMarker(t):console.error("Layer isn't a marker")},addLayers:function(t){this.addMarkers(t)},removeLayer:function(t){this.removeMarker(t,!0)},removeMarker:function(t,n){var a=this;t.minX&&(t=t.data);var l=t.getLatLng(),c=a._map.getBounds().contains(l),f={minX:l.lng,minY:l.lat,maxX:l.lng,maxY:l.lat,data:t};a._latlngMarkers.remove(f,function(p,g){return p.data._leaflet_id===g.data._leaflet_id}),a._latlngMarkers.total--,a._latlngMarkers.dirty++,c===!0&&n===!0&&a._redraw(!0)},onAdd:function(t){this._map=t,this._canvas||this._initCanvas(),this.options.pane?this.getPane().appendChild(this._canvas):t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.on("resize",this._reset,this),t.on("click",this._executeListeners,this),t.on("mousemove",this._executeListeners,this)},onRemove:function(t){this.options.pane?this.getPane().removeChild(this._canvas):t.getPanes().overlayPane.removeChild(this._canvas),t.off("click",this._executeListeners,this),t.off("mousemove",this._executeListeners,this),t.off("moveend",this._reset,this),t.off("resize",this._reset,this)},addTo:function(t){return t.addLayer(this),this},clearLayers:function(){this._latlngMarkers=null,this._markers=null,this._redraw(!0)},_addMarker:function(t,n,a){var l=this;t._map=l._map,l._markers||(l._markers=new rbush),l._latlngMarkers||(l._latlngMarkers=new rbush,l._latlngMarkers.dirty=0,l._latlngMarkers.total=0),L.Util.stamp(t);var c=l._map.latLngToContainerPoint(n),f=t.options.icon.options.iconSize,p=f[0]/2,g=f[1]/2,A=[{minX:c.x-p,minY:c.y-g,maxX:c.x+p,maxY:c.y+g,data:t},{minX:n.lng,minY:n.lat,maxX:n.lng,maxY:n.lat,data:t}];return l._latlngMarkers.dirty++,l._latlngMarkers.total++,a===!0&&l._drawMarker(t,c),A},_drawMarker:function(t,n){var a=this;this._imageLookup||(this._imageLookup={}),n||(n=a._map.latLngToContainerPoint(t.getLatLng()));var l=t.options.icon.options.iconUrl;if(t.canvas_img)a._drawImage(t,n);else if(a._imageLookup[l])t.canvas_img=a._imageLookup[l][0],a._imageLookup[l][1]===!1?a._imageLookup[l][2].push([t,n]):a._drawImage(t,n);else{var c=new Image;c.src=l,t.canvas_img=c,a._imageLookup[l]=[c,!1,[[t,n]]],c.onload=function(){a._imageLookup[l][1]=!0,a._imageLookup[l][2].forEach(function(f){a._drawImage(f[0],f[1])})}}},_drawImage:function(t,n){var a=t.options.icon.options;this._context.drawImage(t.canvas_img,n.x-a.iconAnchor[0],n.y-a.iconAnchor[1],a.iconSize[0],a.iconSize[1])},_reset:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t);var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y,this._redraw()},_redraw:function(t){var n=this;if(t&&this._context.clearRect(0,0,this._canvas.width,this._canvas.height),!(!this._map||!this._latlngMarkers)){var a=[];n._latlngMarkers.dirty/n._latlngMarkers.total>=.1&&(n._latlngMarkers.all().forEach(function(f){a.push(f)}),n._latlngMarkers.clear(),n._latlngMarkers.load(a),n._latlngMarkers.dirty=0,a=[]);var l=n._map.getBounds(),c={minX:l.getWest(),minY:l.getSouth(),maxX:l.getEast(),maxY:l.getNorth()};n._latlngMarkers.search(c).forEach(function(f){var p=n._map.latLngToContainerPoint(f.data.getLatLng()),g=f.data.options.icon.options.iconSize,A=g[0]/2,k=g[1]/2,C={minX:p.x-A,minY:p.y-k,maxX:p.x+A,maxY:p.y+k,data:f.data};a.push(C),n._drawMarker(f.data,p)}),this._markers.clear(),this._markers.load(a)}},_initCanvas:function(){this._canvas=L.DomUtil.create("canvas","leaflet-canvas-icon-layer leaflet-layer");var t=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this._canvas.style[t]="50% 50%";var n=this._map.getSize();this._canvas.width=n.x,this._canvas.height=n.y,this._context=this._canvas.getContext("2d");var a=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(a?"animated":"hide"))},addOnClickListener:function(t){this._onClickListeners.push(t)},addOnHoverListener:function(t){this._onHoverListeners.push(t)},_executeListeners:function(t){if(this._markers){var n=this,a=t.containerPoint.x,l=t.containerPoint.y;n._openToolTip&&(n._openToolTip.closeTooltip(),delete n._openToolTip);var c=this._markers.search({minX:a,minY:l,maxX:a,maxY:l});if(c&&c.length>0){if(n._map._container.style.cursor="pointer",t.type==="click"){var f=c[0].data.getPopup();f&&c[0].data.openPopup(),n._onClickListeners.forEach(function(g){g(t,c)})}if(t.type==="mousemove"){var p=c[0].data.getTooltip();p&&(n._openToolTip=c[0].data,c[0].data.openTooltip()),n._onHoverListeners.forEach(function(g){g(t,c)})}}else n._map._container.style.cursor=""}}});function D0(t,n,a,l,c){dl(t,n,a||0,l||t.length-1,c||O0)}function dl(t,n,a,l,c){for(;l>a;){if(l-a>600){var f=l-a+1,p=n-a+1,g=Math.log(f),A=.5*Math.exp(2*g/3),k=.5*Math.sqrt(g*A*(f-A)/f)*(p-f/2<0?-1:1),C=Math.max(a,Math.floor(n-p*A/f+k)),x=Math.min(l,Math.floor(n+(f-p)*A/f+k));dl(t,n,C,x,c)}var b=t[n],T=a,G=l;for(Ps(t,a,n),c(t[l],b)>0&&Ps(t,a,l);T<G;){for(Ps(t,T,G),T++,G--;c(t[T],b)<0;)T++;for(;c(t[G],b)>0;)G--}c(t[a],b)===0?Ps(t,a,G):(G++,Ps(t,G,l)),G<=n&&(a=G+1),n<=G&&(l=G-1)}}function Ps(t,n,a){var l=t[n];t[n]=t[a],t[a]=l}function O0(t,n){return t<n?-1:t>n?1:0}class fl{constructor(n=9){this._maxEntries=Math.max(4,n),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(n){let a=this.data;const l=[];if(!Da(n,a))return l;const c=this.toBBox,f=[];for(;a;){for(let p=0;p<a.children.length;p++){const g=a.children[p],A=a.leaf?c(g):g;Da(n,A)&&(a.leaf?l.push(g):ho(n,A)?this._all(g,l):f.push(g))}a=f.pop()}return l}collides(n){let a=this.data;if(!Da(n,a))return!1;const l=[];for(;a;){for(let c=0;c<a.children.length;c++){const f=a.children[c],p=a.leaf?this.toBBox(f):f;if(Da(n,p)){if(a.leaf||ho(n,p))return!0;l.push(f)}}a=l.pop()}return!1}load(n){if(!(n&&n.length))return this;if(n.length<this._minEntries){for(let l=0;l<n.length;l++)this.insert(n[l]);return this}let a=this._build(n.slice(),0,n.length-1,0);if(!this.data.children.length)this.data=a;else if(this.data.height===a.height)this._splitRoot(this.data,a);else{if(this.data.height<a.height){const l=this.data;this.data=a,a=l}this._insert(a,this.data.height-a.height-1,!0)}return this}insert(n){return n&&this._insert(n,this.data.height-1),this}clear(){return this.data=Sn([]),this}remove(n,a){if(!n)return this;let l=this.data;const c=this.toBBox(n),f=[],p=[];let g,A,k;for(;l||f.length;){if(l||(l=f.pop(),A=f[f.length-1],g=p.pop(),k=!0),l.leaf){const C=I0(n,l.children,a);if(C!==-1)return l.children.splice(C,1),f.push(l),this._condense(f),this}!k&&!l.leaf&&ho(l,c)?(f.push(l),p.push(g),g=0,A=l,l=l.children[0]):A?(g++,l=A.children[g],k=!1):l=null}return this}toBBox(n){return n}compareMinX(n,a){return n.minX-a.minX}compareMinY(n,a){return n.minY-a.minY}toJSON(){return this.data}fromJSON(n){return this.data=n,this}_all(n,a){const l=[];for(;n;)n.leaf?a.push(...n.children):l.push(...n.children),n=l.pop();return a}_build(n,a,l,c){const f=l-a+1;let p=this._maxEntries,g;if(f<=p)return g=Sn(n.slice(a,l+1)),Bn(g,this.toBBox),g;c||(c=Math.ceil(Math.log(f)/Math.log(p)),p=Math.ceil(f/Math.pow(p,c-1))),g=Sn([]),g.leaf=!1,g.height=c;const A=Math.ceil(f/p),k=A*Math.ceil(Math.sqrt(p));pl(n,a,l,k,this.compareMinX);for(let C=a;C<=l;C+=k){const x=Math.min(C+k-1,l);pl(n,C,x,A,this.compareMinY);for(let b=C;b<=x;b+=A){const T=Math.min(b+A-1,x);g.children.push(this._build(n,b,T,c-1))}}return Bn(g,this.toBBox),g}_chooseSubtree(n,a,l,c){for(;c.push(a),!(a.leaf||c.length-1===l);){let f=1/0,p=1/0,g;for(let A=0;A<a.children.length;A++){const k=a.children[A],C=oo(k),x=F0(n,k)-C;x<p?(p=x,f=C<f?C:f,g=k):x===p&&C<f&&(f=C,g=k)}a=g||a.children[0]}return a}_insert(n,a,l){const c=l?n:this.toBBox(n),f=[],p=this._chooseSubtree(c,this.data,a,f);for(p.children.push(n),Bs(p,c);a>=0&&f[a].children.length>this._maxEntries;)this._split(f,a),a--;this._adjustParentBBoxes(c,f,a)}_split(n,a){const l=n[a],c=l.children.length,f=this._minEntries;this._chooseSplitAxis(l,f,c);const p=this._chooseSplitIndex(l,f,c),g=Sn(l.children.splice(p,l.children.length-p));g.height=l.height,g.leaf=l.leaf,Bn(l,this.toBBox),Bn(g,this.toBBox),a?n[a-1].children.push(g):this._splitRoot(l,g)}_splitRoot(n,a){this.data=Sn([n,a]),this.data.height=n.height+1,this.data.leaf=!1,Bn(this.data,this.toBBox)}_chooseSplitIndex(n,a,l){let c,f=1/0,p=1/0;for(let g=a;g<=l-a;g++){const A=ks(n,0,g,this.toBBox),k=ks(n,g,l,this.toBBox),C=z0(A,k),x=oo(A)+oo(k);C<f?(f=C,c=g,p=x<p?x:p):C===f&&x<p&&(p=x,c=g)}return c||l-a}_chooseSplitAxis(n,a,l){const c=n.leaf?this.compareMinX:R0,f=n.leaf?this.compareMinY:G0,p=this._allDistMargin(n,a,l,c),g=this._allDistMargin(n,a,l,f);p<g&&n.children.sort(c)}_allDistMargin(n,a,l,c){n.children.sort(c);const f=this.toBBox,p=ks(n,0,a,f),g=ks(n,l-a,l,f);let A=Ta(p)+Ta(g);for(let k=a;k<l-a;k++){const C=n.children[k];Bs(p,n.leaf?f(C):C),A+=Ta(p)}for(let k=l-a-1;k>=a;k--){const C=n.children[k];Bs(g,n.leaf?f(C):C),A+=Ta(g)}return A}_adjustParentBBoxes(n,a,l){for(let c=l;c>=0;c--)Bs(a[c],n)}_condense(n){for(let a=n.length-1,l;a>=0;a--)n[a].children.length===0?a>0?(l=n[a-1].children,l.splice(l.indexOf(n[a]),1)):this.clear():Bn(n[a],this.toBBox)}}function I0(t,n,a){if(!a)return n.indexOf(t);for(let l=0;l<n.length;l++)if(a(t,n[l]))return l;return-1}function Bn(t,n){ks(t,0,t.children.length,n,t)}function ks(t,n,a,l,c){c||(c=Sn(null)),c.minX=1/0,c.minY=1/0,c.maxX=-1/0,c.maxY=-1/0;for(let f=n;f<a;f++){const p=t.children[f];Bs(c,t.leaf?l(p):p)}return c}function Bs(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function R0(t,n){return t.minX-n.minX}function G0(t,n){return t.minY-n.minY}function oo(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Ta(t){return t.maxX-t.minX+(t.maxY-t.minY)}function F0(t,n){return(Math.max(n.maxX,t.maxX)-Math.min(n.minX,t.minX))*(Math.max(n.maxY,t.maxY)-Math.min(n.minY,t.minY))}function z0(t,n){const a=Math.max(t.minX,n.minX),l=Math.max(t.minY,n.minY),c=Math.min(t.maxX,n.maxX),f=Math.min(t.maxY,n.maxY);return Math.max(0,c-a)*Math.max(0,f-l)}function ho(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function Da(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function Sn(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function pl(t,n,a,l,c){const f=[n,a];for(;f.length;){if(a=f.pop(),n=f.pop(),a-n<=l)continue;const p=n+Math.ceil((a-n)/l/2)*l;D0(t,p,n,a,c),f.push(n,p,p,a)}}var _l=!("getComputedStyle"in window&&typeof window.getComputedStyle=="function");function lo(t){return{initialize:function(n){t.prototype.initialize.call(this,n),this._originalLayers=[],this._visibleLayers=[],this._staticLayers=[],this._rbush=[],this._cachedRelativeBoxes=[],this._margin=n.margin||0,this._rbush=null},addLayer:function(n){if(!("options"in n)||!("icon"in n.options)){this._staticLayers.push(n),t.prototype.addLayer.call(this,n);return}this._originalLayers.push(n),this._map&&this._maybeAddLayerToRBush(n)},removeLayer:function(n){this._rbush.remove(this._cachedRelativeBoxes[n._leaflet_id]),delete this._cachedRelativeBoxes[n._leaflet_id],t.prototype.removeLayer.call(this,n);var a;a=this._originalLayers.indexOf(n),a!==-1&&this._originalLayers.splice(a,1),a=this._visibleLayers.indexOf(n),a!==-1&&this._visibleLayers.splice(a,1),a=this._staticLayers.indexOf(n),a!==-1&&this._staticLayers.splice(a,1)},clearLayers:function(){this._rbush=fl(),this._originalLayers=[],this._visibleLayers=[],this._staticLayers=[],this._cachedRelativeBoxes=[],t.prototype.clearLayers.call(this)},onAdd:function(n){this._map=n;for(let a=0,l=this._staticLayers.length;a<l;a++)n.addLayer(this._staticLayers[a]);this._onZoomEnd(),n.on("zoomend",this._onZoomEnd,this)},onRemove:function(n){for(let a=0,l=this._staticLayers.length;a<l;a++)n.removeLayer(this._staticLayers[a]);n.off("zoomend",this._onZoomEnd,this),t.prototype.onRemove.call(this,n)},_maybeAddLayerToRBush:function(n){this._map.getZoom();var a=this._rbush,l=this._cachedRelativeBoxes[n._leaflet_id],c=!1;if(!l){t.prototype.addLayer.call(this,n);var c=!0,f=this._getIconBox(n._icon);l=this._getRelativeBoxes(n._icon.children,f),l.push(f),this._cachedRelativeBoxes[n._leaflet_id]=l}l=this._positionBoxes(this._map.latLngToLayerPoint(n.getLatLng()),l);for(var p=!1,g=0;g<l.length&&!p;g++)p=a.search(l[g]).length>0;p?t.prototype.removeLayer.call(this,n):(c||t.prototype.addLayer.call(this,n),this._visibleLayers.push(n),a.load(l))},_getIconBox:function(n){if(_l)return[0,0,n.offsetWidth,n.offsetHeight];var a=window.getComputedStyle(n);return[parseInt(a.marginLeft),parseInt(a.marginTop),parseInt(a.marginLeft)+parseInt(a.width),parseInt(a.marginTop)+parseInt(a.height)]},_getRelativeBoxes:function(n,a){for(var l=[],c=0;c<n.length;c++){var f=n[c],p=[f.offsetLeft,f.offsetTop,f.offsetLeft+f.offsetWidth,f.offsetTop+f.offsetHeight];if(p=this._offsetBoxes(p,a),l.push(p),f.children.length){var g=a;if(!_l){var A=window.getComputedStyle(f).position;(A==="absolute"||A==="relative")&&(g=p)}l=l.concat(this._getRelativeBoxes(f.children,g))}}return l},_offsetBoxes:function(n,a){return[n[0]+a[0],n[1]+a[1],n[2]+a[0],n[3]+a[1]]},_positionBoxes:function(n,a){for(var l=[],c=0;c<a.length;c++)l.push(this._positionBox(n,a[c]));return l},_positionBox:function(n,a){return[a[0]+n.x-this._margin,a[1]+n.y-this._margin,a[2]+n.x+this._margin,a[3]+n.y+this._margin]},_onZoomEnd:function(){for(var n=0;n<this._visibleLayers.length;n++)t.prototype.removeLayer.call(this,this._visibleLayers[n]);this._rbush=fl();for(var n=0;n<this._originalLayers.length;n++)this._maybeAddLayerToRBush(this._originalLayers[n])}}}const N0={LayerGroup:U.LayerGroup.extend(lo(U.LayerGroup)),FeatureGroup:U.FeatureGroup.extend(lo(U.FeatureGroup)),GeoJSON:U.GeoJSON.extend(lo(U.GeoJSON))},U0=U.Layer.extend({provide:{TDT:"tdt",BAIDU:"bd",GAODE:"gd",YANDEX:"yandex"},source:{VECTOR:"vec",SATELITE:"img",ANNO:"cia",VEC_NO_ANNO:"vec_no_anno",SATELITE_NO_ANNO:"img_no_anno"},style:{NORMAL:"normal",GRAY:"gray",DARK:"dark",BROWN:"brown",BLUR:"blur"},options:{provide:"tdt",source:"img",style:"normal",accessToken:"016b31f15f25e1365e85aec7e7b0464e"},initialize(t){t=$t.Util.deleteEmptyProperty(t),U.Util.setOptions(this,t)},onAdd(t){this.map=t,this.replaceProjection(),this.tileLayers=this.getLayerGroup(),t.addLayer(this.tileLayers)},onRemove(t){t.removeLayer(this.tileLayers)},replaceProjection(){const t=this.map.getCenter(),n=this.map.getZoom();this.options.provide===this.provide.BAIDU?this.map.options.crs=ro:this.options.provide===this.provide.YANDEX?this.map.options.crs=U.CRS.EPSG3395:this.map.options.crs=U.CRS.EPSG3857,this._resetMapStatus(t,n)},_resetMapStatus(t,n){this.map.setView(t),this.map._resetView(t,n,!0)},getLayerGroup(){let t={},n={};switch(this.options.style&&this.options.style.split(",").forEach(a=>{switch(a){case this.style.DARK:t.invert=1;break;case this.style.GRAY:t.grayscale=1;break;case this.style.BROWN:t.sepia=1;break;case this.style.BLUR:t.blur="1px";break}}),this.options.provide){case this.provide.TDT:n={subdomains:$t.ArrayUtil.create(8),maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.BAIDU:n={subdomains:$t.ArrayUtil.create(10),tms:!0,corrdType:"bd09",maxNativeZoom:19,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.GAODE:n={subdomains:$t.ArrayUtil.create(4).map(a=>a+1),corrdType:"gcj02",maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.YANDEX:n={maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break}if(this.options.opacity>=0&&(t.opacity=this.options.opacity),this.options.url)return new U.TileLayer(this.options.url,{...n,style:t});switch(this.options.provide){case this.provide.TDT:let a;switch(n.maxNativeZoom=18,this.options.source){case this.source.VECTOR:a=["vec_w","cva_w"];break;case this.source.SATELITE:a=["img_w","cia_w"];break;case this.source.ANNO:a=["cva_w"];break;case this.source.VEC_NO_ANNO:a=["vec_w"];break;case this.source.SATELITE_NO_ANNO:a=["img_w"];break}return new U.LayerGroup(a.map(l=>new U.TileLayer(`http://t{s}.tianditu.gov.cn/DataServer?T=${l}&x={x}&y={y}&l={z}&tk=${this.options.accessToken}`,{...n,style:t})));case this.provide.BAIDU:switch(this.options.source){case this.source.VECTOR:return n.maxNativeZoom=19,new U.TileLayer("http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1",{...n,style:t});case this.source.ANNO:return n.maxNativeZoom=19,new U.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...n,style:t});case this.source.SATELITE:return n.maxNativeZoom=17,new U.LayerGroup([new U.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...n,style:t}),new U.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...n,style:t})]);case this.source.SATELITE_NO_ANNO:return n.maxNativeZoom=19,new U.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...n,style:t})}break;case this.provide.GAODE:switch(this.options.source){case this.source.VECTOR:return n.maxNativeZoom=18,new U.TileLayer("http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:t});case this.source.ANNO:return n.maxNativeZoom=18,new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:t});case this.source.SATELITE:return n.maxNativeZoom=16,new U.LayerGroup([new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...n,style:t}),new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...n,style:t})]);case this.source.SATELITE_NO_ANNO:return n.maxNativeZoom=18,new U.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...n,style:t})}break;case this.provide.YANDEX:switch(this.options.source){case this.source.ANNO:return new U.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...n,style:t});case this.source.SATELITE:return new U.LayerGroup([new U.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...n,subdomains:["01","02","03","04"],style:t}),new U.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...n,style:t})]);case this.source.SATELITE_NO_ANNO:return new U.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...n,subdomains:["01","02","03","04"],style:t})}break}},setOptions(t){U.Util.setOptions(this,t);const n=this.getLayerGroup();this.map.removeLayer(this.tileLayers),setTimeout(()=>{this.replaceProjection(),this.tileLayers=n.addTo(this.map)},500)}}),Z0=U.ImageOverlay.extend({initialize(t,n={},a=new U.Marker,l=new U.Marker){typeof t=="string"?this._url=t:this._rawImage=t,this.topRightMarker=a,this.bottomLeftMarker=l,this.angle=0,U.setOptions(this,n),this._topLeft=new U.LatLng(n.corners[0]),this._topRight=new U.LatLng(n.corners[1]),this._bottomLeft=new U.LatLng(n.corners[3]),a.on("drag dragend",this.reposition,this),l.on("drag dragend",this.reposition,this)},onAdd(t){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(U.DomUtil.addClass(this._rawImage,"leaflet-interactive"),this.addInteractiveTarget(this._rawImage)),t.on("zoomend resetview",this._reset,this),this.getPane().appendChild(this._image),this._reset()},onRemove(t){t.off("zoomend resetview",this._reset,this),U.ImageOverlay.prototype.onRemove.call(this,t)},_initImage(){let t=this._rawImage;this._url&&(t=U.DomUtil.create("img"),t.style.display="none",this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,this._rawImage=t),U.DomUtil.addClass(t,"leaflet-image-layer");const n=this._image=U.DomUtil.create("div","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));this._updateZIndex&&this._updateZIndex(),n.appendChild(t),n.onselectstart=U.Util.falseFn,n.onmousemove=U.Util.falseFn,t.onload=(function(){this._reset(),t.style.display="block",this.options.w=this._rawImage.width,this.options.h=this._rawImage.height,this.boundsRectBottomLeft=new U.Point(0,0),this.boundsRectTopRight=new U.Point(this.options.w,this.options.h),this.diagonalVector=this.boundsRectTopRight.subtract(this.boundsRectBottomLeft),this.fire("load")}).bind(this),t.alt=this.options.alt},_reset(){const t=this._image,n=this._map.latLngToLayerPoint(this._topLeft),a=this._map.latLngToLayerPoint(this._topRight),l=this._map.latLngToLayerPoint(this._bottomLeft),c=a.subtract(n).add(l),f=new U.Bounds([n,a,l,c]),p=f.getSize(),g=n.subtract(f.min),A=a.subtract(n),k=l.subtract(n),C=Math.atan2(A.y,A.x),x=Math.atan2(k.x,k.y);this.angle=((Math.abs(C)+Math.abs(x))/2*180).toFixed(2),this._bounds=new U.LatLngBounds(this._map.layerPointToLatLng(f.min),this._map.layerPointToLatLng(f.max)),U.DomUtil.setPosition(t,f.min),t.pxBounds=f,t.style.width=p.x+"px",t.style.height=p.y+"px";const b=this._rawImage.width,T=this._rawImage.height;if(!b||!T)return;const G=n.distanceTo(a)/b*Math.cos(C),Z=n.distanceTo(l)/T*Math.cos(x);this._rawImage.style.transformOrigin="0 0",this._rawImage.style.transform="translate("+g.x+"px, "+g.y+"px)skew("+x+"rad, "+C+"rad) scale("+G+", "+Z+") "},_animateZoom(t){const n=this._map.getZoomScale(t.zoom),l=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;U.DomUtil.setTransform(this._image,l,n)},reposition(){const t=this.topRightMarker.getLatLng(),n=this.bottomLeftMarker.getLatLng(),a=this.options.w,l=this.options.h,c=this.getCornerLatLng(new U.Point(0,l),n,t),f=this.getCornerLatLng(new U.Point(a,l),n,t),p=this.getCornerLatLng(new U.Point(0,0),n,t),g=this.getCornerLatLng(new U.Point(a,0),n,t);this.options.corners=[c,f,g,p],this._topLeft=new U.LatLng(c),this._topRight=new U.LatLng(f),this._bottomLeft=new U.LatLng(p),this._reset()},getCornerLatLng(t,n,a){const l=this.boundsRectBottomLeft,c=this.diagonalVector,f=t.subtract(l),p=this.getClockWiseRotate90DegreePoint(c),g=this.getDotProduction(c,f)/this.getDotProduction(c,c),A=-this.getDotProduction(p,f)/this.getDotProduction(p,p),k=new U.Projection.SphericalMercator.project(n),C=new U.Projection.SphericalMercator.project(a),x=k.add(C.subtract(k).multiplyBy(g)),b=this.getClockWiseRotate90DegreePoint(k.subtract(C)).multiplyBy(A),T=x.add(b);return new U.Projection.SphericalMercator.unproject(T)},setUrl(t){return this._url=t,this._rawImage&&(this._rawImage.src=t),this},getDotProduction(t,n){return t.x*n.x+t.y*n.y},getClockWiseRotate90DegreePoint(t){return new U.Point([t.y,-t.x])}});var ml={exports:{}};(function(t){(function(n,a,l){t.exports?t.exports=l():a[n]=l()})("h337",An,function(){var n={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},a=function(){var k=function(b){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=b.xField||b.defaultXField,this._yField=b.yField||b.defaultYField,this._valueField=b.valueField||b.defaultValueField,b.radius&&(this._cfgRadius=b.radius)},C=n.defaultRadius;return k.prototype={_organiseData:function(x,b){var T=x[this._xField],G=x[this._yField],Z=this._radi,K=this._data,at=this._max,rt=this._min,ct=x[this._valueField]||1,yt=x.radius||this._cfgRadius||C;K[T]||(K[T]=[],Z[T]=[]),K[T][G]?K[T][G]+=ct:(K[T][G]=ct,Z[T][G]=yt);var mt=K[T][G];return mt>at?(b?this.setDataMax(mt):this._max=mt,!1):mt<rt?(b?this.setDataMin(mt):this._min=mt,!1):{x:T,y:G,value:ct,radius:yt,min:rt,max:at}},_unOrganizeData:function(){var x=[],b=this._data,T=this._radi;for(var G in b)for(var Z in b[G])x.push({x:G,y:Z,radius:T[G][Z],value:b[G][Z]});return{min:this._min,max:this._max,data:x}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var x=arguments[0],b=x.length;b--;)this.addData.call(this,x[b]);else{var T=this._organiseData(arguments[0],!0);T&&(this._data.length===0&&(this._min=this._max=T.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[T]}))}return this},setData:function(x){var b=x.data,T=b.length;this._data=[],this._radi=[];for(var G=0;G<T;G++)this._organiseData(b[G],!1);return this._max=x.max,this._min=x.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(x){return this._max=x,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(x){return this._min=x,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(x){this._coordinator=x},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},k}(),l=function(){var k=function(T){var G=T.gradient||T.defaultGradient,Z=document.createElement("canvas"),K=Z.getContext("2d");Z.width=256,Z.height=1;var at=K.createLinearGradient(0,0,256,1);for(var rt in G)at.addColorStop(rt,G[rt]);return K.fillStyle=at,K.fillRect(0,0,256,1),K.getImageData(0,0,256,1).data},C=function(T,G){var Z=document.createElement("canvas"),K=Z.getContext("2d"),at=T,rt=T;if(Z.width=Z.height=T*2,G==1)K.beginPath(),K.arc(at,rt,T,0,2*Math.PI,!1),K.fillStyle="rgba(0,0,0,1)",K.fill();else{var ct=K.createRadialGradient(at,rt,T*G,at,rt,T);ct.addColorStop(0,"rgba(0,0,0,1)"),ct.addColorStop(1,"rgba(0,0,0,0)"),K.fillStyle=ct,K.fillRect(0,0,2*T,2*T)}return Z},x=function(rt){for(var G=[],Z=rt.min,K=rt.max,at=rt.radi,rt=rt.data,ct=Object.keys(rt),yt=ct.length;yt--;)for(var mt=ct[yt],xt=Object.keys(rt[mt]),Dt=xt.length;Dt--;){var It=xt[Dt],zt=rt[mt][It],Yt=at[mt][It];G.push({x:mt,y:It,value:zt,radius:Yt})}return{min:Z,max:K,data:G}};function b(T){var G=T.container,Z=this.shadowCanvas=document.createElement("canvas"),K=this.canvas=T.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var at=getComputedStyle(T.container)||{};K.className="heatmap-canvas",this._width=K.width=Z.width=T.width||+at.width.replace(/px/,""),this._height=K.height=Z.height=T.height||+at.height.replace(/px/,""),this.shadowCtx=Z.getContext("2d"),this.ctx=K.getContext("2d"),K.style.cssText=Z.style.cssText="position:absolute;left:0;top:0;",G.style.position="relative",G.appendChild(K),this._palette=k(T),this._templates={},this._setStyles(T)}return b.prototype={renderPartial:function(T){T.data.length>0&&(this._drawAlpha(T),this._colorize())},renderAll:function(T){this._clear(),T.data.length>0&&(this._drawAlpha(x(T)),this._colorize())},_updateGradient:function(T){this._palette=k(T)},updateConfig:function(T){T.gradient&&this._updateGradient(T),this._setStyles(T)},setDimensions:function(T,G){this._width=T,this._height=G,this.canvas.width=this.shadowCanvas.width=T,this.canvas.height=this.shadowCanvas.height=G},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(T){this._blur=T.blur==0?0:T.blur||T.defaultBlur,T.backgroundColor&&(this.canvas.style.backgroundColor=T.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=T.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=T.height||this._height,this._opacity=(T.opacity||0)*255,this._maxOpacity=(T.maxOpacity||T.defaultMaxOpacity)*255,this._minOpacity=(T.minOpacity||T.defaultMinOpacity)*255,this._useGradientOpacity=!!T.useGradientOpacity},_drawAlpha:function(K){for(var G=this._min=K.min,Z=this._max=K.max,K=K.data||[],at=K.length,rt=1-this._blur;at--;){var ct=K[at],yt=ct.x,mt=ct.y,xt=ct.radius,Dt=Math.min(ct.value,Z),It=yt-xt,zt=mt-xt,Yt=this.shadowCtx,Et;this._templates[xt]?Et=this._templates[xt]:this._templates[xt]=Et=C(xt,rt);var Zt=(Dt-G)/(Z-G);Yt.globalAlpha=Zt<.01?.01:Zt,Yt.drawImage(Et,It,zt),It<this._renderBoundaries[0]&&(this._renderBoundaries[0]=It),zt<this._renderBoundaries[1]&&(this._renderBoundaries[1]=zt),It+2*xt>this._renderBoundaries[2]&&(this._renderBoundaries[2]=It+2*xt),zt+2*xt>this._renderBoundaries[3]&&(this._renderBoundaries[3]=zt+2*xt)}},_colorize:function(){var T=this._renderBoundaries[0],G=this._renderBoundaries[1],Z=this._renderBoundaries[2]-T,K=this._renderBoundaries[3]-G,at=this._width,rt=this._height,ct=this._opacity,yt=this._maxOpacity,mt=this._minOpacity,xt=this._useGradientOpacity;T<0&&(T=0),G<0&&(G=0),T+Z>at&&(Z=at-T),G+K>rt&&(K=rt-G);for(var Dt=this.shadowCtx.getImageData(T,G,Z,K),It=Dt.data,zt=It.length,Yt=this._palette,Et=3;Et<zt;Et+=4){var Zt=It[Et],be=Zt*4;if(be){var pe;ct>0?pe=ct:Zt<yt?Zt<mt?pe=mt:pe=Zt:pe=yt,It[Et-3]=Yt[be],It[Et-2]=Yt[be+1],It[Et-1]=Yt[be+2],It[Et]=xt?Yt[be+3]:pe}}Dt.data=It,this.ctx.putImageData(Dt,T,G),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(T){var G,Z=this.shadowCtx,K=Z.getImageData(T.x,T.y,1,1),at=K.data[3],rt=this._max,ct=this._min;return G=Math.abs(rt-ct)*(at/255)>>0,G},getDataURL:function(){return this.canvas.toDataURL()}},b}(),c=function(){var k=!1;return n.defaultRenderer==="canvas2d"&&(k=l),k}(),f={merge:function(){for(var A={},k=arguments.length,C=0;C<k;C++){var x=arguments[C];for(var b in x)A[b]=x[b]}return A}},p=function(){var k=function(){function T(){this.cStore={}}return T.prototype={on:function(G,Z,K){var at=this.cStore;at[G]||(at[G]=[]),at[G].push(function(rt){return Z.call(K,rt)})},emit:function(G,Z){var K=this.cStore;if(K[G])for(var at=K[G].length,rt=0;rt<at;rt++){var ct=K[G][rt];ct(Z)}}},T}(),C=function(b){var T=b._renderer,G=b._coordinator,Z=b._store;G.on("renderpartial",T.renderPartial,T),G.on("renderall",T.renderAll,T),G.on("extremachange",function(K){b._config.onExtremaChange&&b._config.onExtremaChange({min:K.min,max:K.max,gradient:b._config.gradient||b._config.defaultGradient})}),Z.setCoordinator(G)};function x(){var b=this._config=f.merge(n,arguments[0]||{});if(this._coordinator=new k,b.plugin){var T=b.plugin;if(n.plugins[T]){var G=n.plugins[T];this._renderer=new G.renderer(b),this._store=new G.store(b)}else throw new Error("Plugin '"+T+"' not found. Maybe it was not registered.")}else this._renderer=new c(b),this._store=new a(b);C(this)}return x.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(b){return this._config=f.merge(this._config,b),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(b){return this._store.getValueAt?this._store.getValueAt(b):this._renderer.getValueAt?this._renderer.getValueAt(b):null}},x}(),g={create:function(A){return new p(A)},register:function(A,k){n.plugins[A]=k}};return g})})(ml);var j0=ml.exports;const q0=Tl(j0);var uo=L.Layer.extend({initialize:function(t){this.cfg=t,this._el=L.DomUtil.create("div","leaflet-zoom-hide"),this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var n=t.getSize();this._map=t,this._width=n.x,this._height=n.y,this._el.style.width=n.x+"px",this._el.style.height=n.y+"px",this._el.style.position="absolute",this._resetOrigin(),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=q0.create(this.cfg)),t.on("moveend",this._resetOrigin,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._resetOrigin,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane,n=t._leaflet_pos;this._el.style[uo.CSS_TRANSFORM]="translate("+-Math.round(n.x)+"px,"+-Math.round(n.y)+"px)",this._update()}},_update:function(){var t,n,a,l={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),n=this._map.getZoom(),a=Math.pow(2,n),this._data.length==0){this._heatmap&&this._heatmap.setData(l);return}for(var c=[],f=this.cfg.scaleRadius?a:1,p=0,g=0,A=this.cfg.valueField,k=this._data.length;k--;){var C=this._data[k],x=C[A],b=C.latlng;if(t.contains(b)){p=Math.max(x,p),g=Math.min(x,g);var T=this._map.latLngToContainerPoint(b),G={x:Math.round(T.x),y:Math.round(T.y)};G[A]=x;var Z;C.radius?Z=C.radius*f:Z=(this.cfg.radius||2)*f,G.radius=Z,c.push(G)}}this.cfg.useLocalExtrema&&(l.max=p,l.min=g),l.data=c,this._heatmap.setData(l)},setData:function(c){this._max=c.max||this._max,this._min=c.min||this._min;for(var n=this.cfg.latField||"lat",a=this.cfg.lngField||"lng",l=this.cfg.valueField||"value",c=c.data,f=c.length,p=[];f--;){var g=c[f],A=new L.LatLng(g[n],g[a]),k={latlng:A};k[l]=g[l],g.radius&&(k.radius=g.radius),p.push(k)}this._data=p,this._draw()},addData:function(t){if(t.length>0)for(var n=t.length;n--;)this.addData(t[n]);else{var a=this.cfg.latField||"lat",l=this.cfg.lngField||"lng",c=this.cfg.valueField||"value",f=t,p=new L.LatLng(f[a],f[l]),g={latlng:p};g[c]=f[c],this._max=Math.max(this._max,g[c]),this._min=Math.min(this._min,g[c]),f.radius&&(g.radius=f.radius),this._data.push(g),this._draw()}},_resetOrigin:function(){this._origin=this._map.layerPointToLatLng(new L.Point(0,0));var t=this._map.getSize();(this._width!==t.x||this._height!==t.y)&&(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px"),this._draw()}});uo.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),n=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],a=0;a<n.length;a++){var l=n[a];if(t.style[l]!==void 0)return l}return n[0]}();const H0=L.TileLayer.extend({defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"",format:"image/jpeg"},initialize:function(t,n){this._url=t;var a={},l=Object.keys(n);l.forEach(g=>{a[g.toLowerCase()]=n[g]});var c=L.extend({},this.defaultWmtsParams),f=a.tileSize||this.options.tileSize;a.detectRetina&&L.Browser.retina?c.width=c.height=f*2:c.width=c.height=f;for(var p in a)c.hasOwnProperty(p)&&p!="matrixIds"&&(c[p]=a[p]);this.wmtsParams=c,this.matrixIds=n.matrixIds||this.getDefaultMatrix(),L.setOptions(this,n)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,L.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this.options.tileSize,a=t.multiplyBy(n);a.x+=1,a.y-=1;var l=a.add(new L.Point(n,n)),c=this._tileZoom,f=this._crs.project(this._map.unproject(a,c)),p=this._crs.project(this._map.unproject(l,c));tilewidth=p.x-f.x;var g=this.matrixIds[c].identifier,A=this.wmtsParams.tilematrixset+":"+g,k=this.matrixIds[c].topLeftCorner.lng,C=this.matrixIds[c].topLeftCorner.lat,x=Math.floor((f.x-k)/tilewidth),b=-Math.floor((f.y-C)/tilewidth),T=L.Util.template(this._url,{s:this._getSubdomain(t)});return T+L.Util.getParamString(this.wmtsParams,T)+"&tilematrix="+A+"&tilerow="+b+"&tilecol="+x},setParams:function(t,n){return L.extend(this.wmtsParams,t),n||this.redraw(),this},getDefaultMatrix:function(){for(var t=new Array(22),n=0;n<22;n++)t[n]={identifier:""+n,topLeftCorner:new L.LatLng(200375083428e-4,-200375083428e-4)};return t}});var fe={};fe.Source=L.Layer.extend({options:{untiled:!0,identify:!0},initialize:function(t,n){L.setOptions(this,n),this.options.tiled&&(this.options.untiled=!1),this._url=t,this._subLayers={},this._overlay=this.createOverlay(this.options.untiled)},createOverlay:function(t){var n={};for(var a in this.options)a!="untiled"&&a!="identify"&&(n[a]=this.options[a]);return t?fe.overlay(this._url,n):fe.tileLayer(this._url,n)},onAdd:function(){this.refreshOverlay()},getEvents:function(){return this.options.identify?{click:this.identify}:{}},setOpacity:function(t){this.options.opacity=t,this._overlay&&this._overlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._overlay&&this._overlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._overlay&&this._overlay.bringToFront()},getLayer:function(t){return fe.layer(this,t)},addSubLayer:function(t){this._subLayers[t]=!0,this.refreshOverlay()},removeSubLayer:function(t){delete this._subLayers[t],this.refreshOverlay()},refreshOverlay:function(){var t=Object.keys(this._subLayers).join(",");this._map&&(t?(this._overlay.setParams({layers:t}),this._overlay.addTo(this._map)):this._overlay.remove())},identify:function(t){var n=this.getIdentifyLayers();n.length&&this.getFeatureInfo(t.containerPoint,t.latlng,n,this.showFeatureInfo)},getFeatureInfo:function(t,n,a,l){var c=this.getFeatureInfoParams(t,a),f=this._url+L.Util.getParamString(c,this._url);this.showWaiting(),this.ajax(f,p);function p(g){this.hideWaiting();var A=this.parseFeatureInfo(g,f);l.call(this,n,A)}},ajax:function(t,n){V0.call(this,t,n)},getIdentifyLayers:function(){return this.options.identifyLayers?this.options.identifyLayers:Object.keys(this._subLayers)},getFeatureInfoParams:function(t,n){var a,l;this.options.untiled?a=this._overlay.wmsParams:(l=this.createOverlay(!0),l.updateWmsParams(this._map),a=l.wmsParams,a.layers=n.join(","));var c={request:"GetFeatureInfo",query_layers:n.join(","),X:Math.round(t.x),Y:Math.round(t.y)};return L.extend({},a,c)},parseFeatureInfo:function(t,n){return t=="error"&&(t="<iframe src='"+n+"' style='border:none'>"),t},showFeatureInfo:function(t,n){this._map&&this._map.openPopup(n,t)},showWaiting:function(){this._map&&(this._map._container.style.cursor="progress")},hideWaiting:function(){this._map&&(this._map._container.style.cursor="default")}}),fe.source=function(t,n){return new fe.Source(t,n)},fe.Layer=L.Layer.extend({initialize:function(t,n,a){L.setOptions(this,a),t.addSubLayer||(t=fe.getSourceForUrl(t,a)),this._source=t,this._name=n},onAdd:function(){this._source._map||this._source.addTo(this._map),this._source.addSubLayer(this._name)},onRemove:function(){this._source.removeSubLayer(this._name)},setOpacity:function(t){this._source.setOpacity(t)},bringToBack:function(){this._source.bringToBack()},bringToFront:function(){this._source.bringToFront()}}),fe.layer=function(t,n){return new fe.Layer(t,n)};var co={};fe.getSourceForUrl=function(t,n){return co[t]||(co[t]=fe.source(t,n)),co[t]},fe.TileLayer=L.TileLayer.WMS,fe.tileLayer=L.tileLayer.wms,fe.Overlay=L.Layer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,maxZoom:18},initialize:function(t,n){this._url=t;var a={},l={};for(var c in n)c in this.options?l[c]=n[c]:a[c]=n[c];L.setOptions(this,l),this.wmsParams=L.extend({},this.defaultWmsParams,a)},setParams:function(t){L.extend(this.wmsParams,t),this.update()},getAttribution:function(){return this.options.attribution},onAdd:function(){this.update()},onRemove:function(t){this._currentOverlay&&(t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl},getEvents:function(){return{moveend:this.update}},update:function(){if(!this._map)return;this.updateWmsParams();var t=this.getImageUrl();if(this._currentUrl==t)return;this._currentUrl=t;var n=this._map.getBounds(),a=L.imageOverlay(t,n,{opacity:0});a.addTo(this._map),a.once("load",l,this);function l(){if(this._map){if(a._url!=this._currentUrl){this._map.removeLayer(a);return}else this._currentOverlay&&this._map.removeLayer(this._currentOverlay);this._currentOverlay=a,a.setOpacity(this.options.opacity?this.options.opacity:1),this.options.isBack===!0&&a.bringToBack(),this.options.isBack===!1&&a.bringToFront()}}(this._map.getZoom()<this.options.minZoom||this._map.getZoom()>this.options.maxZoom)&&this._map.removeLayer(a)},setOpacity:function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},updateWmsParams:function(t){t||(t=this._map);var n=t.getBounds(),a=t.getSize(),l=parseFloat(this.wmsParams.version),c=this.options.crs||t.options.crs,f=l>=1.3?"crs":"srs",p=c.project(n.getNorthWest()),g=c.project(n.getSouthEast()),A={width:a.x,height:a.y};A[f]=c.code,A.bbox=(l>=1.3&&c===L.CRS.EPSG4326?[g.y,p.x,p.y,g.x]:[p.x,g.y,g.x,p.y]).join(","),L.extend(this.wmsParams,A)},getImageUrl:function(){var t=this.options.uppercase||!1,n=L.Util.getParamString(this.wmsParams,this._url,t);return this._url+n}}),fe.overlay=function(t,n){return new fe.Overlay(t,n)};function V0(t,n){var a=this,l=new XMLHttpRequest;l.onreadystatechange=c,l.open("GET",t),l.send();function c(){l.readyState===4&&(l.status===200?n.call(a,l.responseText):n.call(a,"error"))}}const gl=U.Draggable.extend({initialize(t,n,a){U.Draggable.prototype.initialize.call(this,t,t),this._element=t,this._stepHeight=n??5.45,this._knobHeight=a??10,this.on("predrag",function(){this._newPos.x=0,this._newPos.y=this._adjust(this._newPos.y)},this)},_adjust(t){let n=Math.round(this._toValue(t));return n=Math.max(0,Math.min(this._maxValue,n)),this._toY(n)},_toY(t){return this._k*t+this._m},_toValue(t){return(t-this._m)/this._k},setSteps(t){this._maxValue=t-1,this._k=-this._stepHeight,this._m=0},setPosition(t){U.DomUtil.setPosition(this._element,L.point(0,this._adjust(t)))},setValue(t){this.setPosition(this._toY(t))},getValue(){return this._toValue(U.DomUtil.getPosition(this._element).y)}}),Oa=U.Handler.extend({options:{color:"#f00",weight:2,fillColor:"#ff0",fillOpacity:.7,radius:5,continue:!1,showCloseButton:!1,showMeasurements:!1},PointEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):(this.tooltip.setContent("点击开始绘制"),this.geometry=new U.CircleMarker(t.latlng,this.options).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},CircleEvents:{_mouseMove(t){if(this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)){const n=this.latlng?this._map.distance(t.latlng,this.latlng):0;this.geometry.setRadius(n),n!==0?this.tooltip.setContent(`半径:<b>${n.toFixed(2)}m</b><br/>继续点击完成绘制`):this.tooltip.setContent("点击开始绘制")}this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlng=t.latlng,this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry&&this.geometry.getRadius()!==0?(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null):this.geometry=new U.Circle(this.latlng,0,this.options).addTo(this._map)},_mouseDblClick(t){}},PolylineEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Polyline([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},RectangleEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setBounds([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("继续点击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Rectangle([t.latlng,t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setBounds(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry),this.latlngs.length===2&&(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null)},_mouseDblClick(t){}},PolygonEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new U.Polygon([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},addHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.on("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.on("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.on("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},removeHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.off("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.off("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.off("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},setOptions(t){return U.Util.setOptions(this,t),this},enable(t,n={}){return U.Util.setOptions(this,n),this.onFinish=n.onFinish||new Function,this.onDrawing=n.onDrawing||new Function,this.onVertexAdd=n.onVertexAdd||new Function,this.drawType=$t.StringUtil.changeCase(t,1),this.latlngs=n.latlngs||[],this._map.setCursor("data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA="),this.tempPoint=new U.CircleMarker([0,0],{weight:1,radius:5,color:"#3388ff",fillColor:"#fff",fillOpacity:1}).addTo(this._map),this.tooltip=new U.Tooltip({offset:[10,-10]}).setContent("点击开始绘制"),U.Handler.prototype.enable.call(this),this},disable(){if(this._map.setCursor(),this.removeHooks(),this.tooltip&&this._map.closeTooltip(this.tooltip),this.tempPoint&&this._map.removeLayer(this.tempPoint),this.options.showCloseButton&&this.options.showMeasurements){const t=this.geometry._measurementLayer;let n;this.geometry instanceof U.Path?n=this.geometry._latlngs.flat().at(-1):n=this.geometry._latlng;const a=this.geometry._leaflet_id;new U.Marker(n,{icon:new U.Icon({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAFRJREFUKFOlklEKACAIQ7f7H9rQkJYFFUVfY49NiwBgcc+HABlmu/K7HQMge0SFVd8CCqU5tQlwUQ06UqYuwA7Siv/AU6U6YK3n1f7Wen7onvD6NRqqukP5oM7XCQAAAABJRU5ErkJggg==",iconSize:[12,12],iconAnchor:[6,6]})}).on("click",l=>{this._map.removeLayerById(a),t==null||t.clearLayers()}).addTo(t)}return U.Util.setOptions(this,Oa.prototype.options),U.Handler.prototype.disable.call(this),this}});U.Map.addInitHook("addHandler","drawHandler",Oa);const di=U.Handler.extend({_touchstart:U.Browser.msPointer?"MSPointerDown":U.Browser.pointer?"pointerdown":"touchstart",initialize(t){U.Handler.prototype.initialize.call(this,t),this._items=[],this._visible=!1,di.BASE_CLS=`${t.clsPrefix}-contextmenu`;const n=this._container=U.DomUtil.create("div",`${t.clsPrefix}-contextmenu`,t._container);n.style.zIndex=1e4,n.style.position="absolute",t.options.contextmenuWidth&&(n.style.width=t.options.contextmenuWidth+"px"),this._createItems(),U.DomEvent.on(n,"click",U.DomEvent.stop).on(n,"mousedown",U.DomEvent.stop).on(n,"dblclick",U.DomEvent.stop).on(n,"contextmenu",U.DomEvent.stop)},addHooks(){const t=this._map.getContainer();U.DomEvent.on(t,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),U.Browser.touch&&U.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},removeHooks(){const t=this._map.getContainer();U.DomEvent.off(t,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),U.Browser.touch&&U.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},showAt(t,n){t instanceof U.LatLng&&(t=this._map.latLngToContainerPoint(t)),this._showAtPoint(t,n)},hide(){this._hide()},addItem(t){return this.insertItem(t)},insertItem(t,n){n=n!==void 0?n:this._items.length;const a=this._createItem(this._container,t,n);return this._items.push(a),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:a.el,index:n}),a.el},removeItem(t){const n=this._container;return isNaN(t)||(t=n.children[t]),t?(this._removeItem(U.Util.stamp(t)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:t}),t):null},removeAllItems(){const t=this._container.children;let n;for(;t.length;)n=t[0],this._removeItem(U.Util.stamp(n));return t},hideAllItems(){let t,n,a;for(n=0,a=this._items.length;n<a;n++)t=this._items[n],t.el.style.display="none"},showAllItems(){let t,n,a;for(n=0,a=this._items.length;n<a;n++)t=this._items[n],t.el.style.display=""},setDisabled(t,n){const a=this._container,l=di.BASE_CLS+"-item";isNaN(t)||(t=a.children[t]),t&&U.DomUtil.hasClass(t,l)&&(n?(U.DomUtil.addClass(t,l+"-disabled"),this._map.fire("contextmenu.disableitem",{contextmenu:this,el:t})):(U.DomUtil.removeClass(t,l+"-disabled"),this._map.fire("contextmenu.enableitem",{contextmenu:this,el:t})))},isVisible(){return this._visible},_createItems(){const t=this._map.options.contextmenuItems;let n,a;for(n=0,a=t.length;n<a;n++)this._items.push(this._createItem(this._container,t[n]))},_createItem(t,n,a){if(n.separator||n==="-")return this._createSeparator(t,a);const l=di.BASE_CLS+"-item",c=n.disabled?l+" "+l+"-disabled":l,f=this._insertElementAt("a",c,t,a),p=this._createEventHandler(f,n.callback,n.context,n.hideOnSelect),g=this._getIcon(n),A=this._getIconCls(n);let k="";return g?k='<img class="'+di.BASE_CLS+'-icon" src="'+g+'"/>':A&&(k='<span class="'+di.BASE_CLS+"-icon "+A+'"></span>'),f.innerHTML=k+n.text,f.href="#",U.DomEvent.on(f,"mouseover",this._onItemMouseOver,this).on(f,"mouseout",this._onItemMouseOut,this).on(f,"mousedown",U.DomEvent.stopPropagation).on(f,"click",p),U.Browser.touch&&U.DomEvent.on(f,this._touchstart,U.DomEvent.stopPropagation),U.Browser.pointer||U.DomEvent.on(f,"click",this._onItemMouseOut,this),{id:U.Util.stamp(f),el:f,callback:p}},_removeItem(t){let n,a,l,c,f;for(l=0,c=this._items.length;l<c;l++)if(n=this._items[l],n.id===t)return a=n.el,f=n.callback,f&&(U.DomEvent.off(a,"mouseover",this._onItemMouseOver,this).off(a,"mouseover",this._onItemMouseOut,this).off(a,"mousedown",U.DomEvent.stopPropagation).off(a,"click",f),U.Browser.touch&&U.DomEvent.off(a,this._touchstart,U.DomEvent.stopPropagation),U.Browser.pointer||U.DomEvent.on(a,"click",this._onItemMouseOut,this)),this._container.removeChild(a),this._items.splice(l,1),n;return null},_createSeparator(t,n){const a=this._insertElementAt("div",di.BASE_CLS+"-separator",t,n);return{id:U.Util.stamp(a),el:a}},_createEventHandler(t,n,a,p){const c=this;this._map;const f=di.BASE_CLS+"-item-disabled";var p=p!==void 0?p:!0;return function(g){if(U.DomUtil.hasClass(t,f))return;const A=c._map,k=c._showLocation.containerPoint,C=A.containerPointToLayerPoint(k),x=A.layerPointToLatLng(C),b=c._showLocation.relatedTarget,T={containerPoint:k,layerPoint:C,latlng:x,relatedTarget:b};p&&c._hide(),n&&n.call(a||A,T),c._map.fire("contextmenu.select",{contextmenu:c,el:t})}},_insertElementAt(t,n,a,l){let c;const f=document.createElement(t);return f.className=n,l!==void 0&&(c=a.children[l]),c?a.insertBefore(f,c):a.appendChild(f),f},_show(t){this._showAtPoint(t.containerPoint,t)},_showAtPoint(t,n){if(this._items.length){this._map;const a=U.extend(n||{},{contextmenu:this});this._showLocation={containerPoint:t},n&&n.relatedTarget&&(this._showLocation.relatedTarget=n.relatedTarget),this._setPosition(t),this._visible||(this._container.style.display="block",this._visible=!0),this._map.fire("contextmenu.show",a)}},_hide(){this._visible&&(this._visible=!1,this._container.style.display="none",this._map.fire("contextmenu.hide",{contextmenu:this}))},_getIcon(t){return U.Browser.retina&&t.retinaIcon||t.icon},_getIconCls(t){return U.Browser.retina&&t.retinaIconCls||t.iconCls},_setPosition(t){const n=this._map.getSize(),a=this._container,l=this._getElementSize(a);let c;this._map.options.contextmenuAnchor&&(c=new U.Point(this._map.options.contextmenuAnchor),t=t.add(c)),a._leaflet_pos=t,t.x+l.x>n.x?(a.style.left="auto",a.style.right=Math.min(Math.max(n.x-t.x,0),n.x-l.x-1)+"px"):(a.style.left=Math.max(t.x,0)+"px",a.style.right="auto"),t.y+l.y>n.y?(a.style.top="auto",a.style.bottom=Math.min(Math.max(n.y-t.y,0),n.y-l.y-1)+"px"):(a.style.top=Math.max(t.y,0)+"px",a.style.bottom="auto")},_getElementSize(t){let n=this._size;const a=t.style.display;return(!n||this._sizeChanged)&&(n={},t.style.left="-999999px",t.style.right="auto",t.style.display="block",n.x=t.offsetWidth,n.y=t.offsetHeight,t.style.left="auto",t.style.display=a,this._sizeChanged=!1),n},_onKeyDown(t){t.keyCode===27&&this._hide()},_onItemMouseOver(t){U.DomUtil.addClass(t.target||t.srcElement,"over")},_onItemMouseOut(t){U.DomUtil.removeClass(t.target||t.srcElement,"over")}});U.Map.mergeOptions({contextmenuItems:[]}),U.Map.addInitHook("addHandler","contextmenu",di);const $0={bindContextMenu(t){return L.setOptions(this,t),this._initContextMenu(),this},unbindContextMenu(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem(t){this.options.contextmenuItems.push(t)},removeContextMenuItemWithIndex(t){const n=[];for(let l=0;l<this.options.contextmenuItems.length;l++)this.options.contextmenuItems[l].index==t&&n.push(l);let a=n.pop();for(;a!==void 0;)this.options.contextmenuItems.splice(a,1),a=n.pop()},replaceContextMenuItem(t){this.removeContextMenuItemWithIndex(t.index),this.addContextMenuItem(t)},_initContextMenu(){this._items=[],this.on("contextmenu",this._showContextMenu,this)},_showContextMenu(t){let n,a,l,c,f;if(this._items=[],this._map.contextmenu){for(a=L.extend({relatedTarget:this},t),l=this._map.mouseEventToContainerPoint(t.originalEvent),this.options.contextmenuInheritItems||this._map.contextmenu.hideAllItems(),c=0,f=this.options.contextmenuItems.length;c<f;c++)n=this.options.contextmenuItems[c],this._items.push(this._map.contextmenu.insertItem(n,n.index));this._map.once("contextmenu.hide",this._hideContextMenu,this),this._map.contextmenu.showAt(l,a)}},_hideContextMenu(){let t,n;if(this._items){for(t=0,n=this._items.length;t<n;t++)this._map.contextmenu.removeItem(this._items[t]);this._items.length=0,this.options.contextmenuInheritItems||this._map.contextmenu.showAllItems()}}},yl=[U.Marker,U.Path],vl={contextmenu:!1,contextmenuItems:[],contextmenuInheritItems:!1};for(let t=0,n=yl.length;t<n;t++){const a=yl[t];a.prototype.options?a.mergeOptions(vl):a.prototype.options=vl,a.addInitHook(function(){this.options.contextmenu&&this._initContextMenu()}),a.include($0)}const fo=U.Handler.extend({options:{moveStep:10,zoomSnap:1,moveKeyCodeMap:{65:"left",68:"right",87:"top",83:"bottom"},zoomKeyCodeMap:{69:"add",81:"minus"}},enable(t){U.Util.setOptions(this,t),U.Handler.prototype.enable.call(this)},addHooks(){this._map.on("keydown",this._keyDownEvent,this)},removeHooks(){this._map.off("keydown",this._keyDownEvent,this)},_keyDownEvent(t){let n=this.options.moveKeyCodeMap[t.originalEvent.keyCode],a=this.options.zoomKeyCodeMap[t.originalEvent.keyCode];n&&this.moveByMeters(n,this.options.moveStep),a&&this.setZoom(a)},moveByMeters(t,n){let a=this._map.project(this._map.getCenter());switch(t){case"left":a.x-=n;break;case"right":a.x+=n;break;case"bottom":a.y+=n;break;case"top":a.y-=n;break}a=this._map.unproject(a),this._map.panTo(a)},setZoom(t){let n=this._map.getZoom();switch(t){case"add":n+=this.options.zoomSnap;break;case"minus":n-=this.options.zoomSnap;break}this._map.setZoom(n)}});U.Map.addInitHook("addHandler","keyboard",fo);const Al=U.LayerGroup.extend({initialize(t){U.Util.setOptions(this,t),U.LayerGroup.prototype.initialize.call(this,t)},getRasterLayers(){const t={},n=a=>{if(a._layers&&a.getLayer)for(const l in a._layers){const c=a._layers[l];c._layers&&c.getLayer?n(c):t[c._leaflet_id]=c}else t[a._leaflet_id]=a};return n(this),t},removeRasterLayer(t){const n=function(a){if(a._layers&&a.getLayer&&a.getLayer(t)){const l=a.getLayer(t);a.removeLayer(l)}else if(a._layers)for(const l in a._layers){const c=a._layers[l];if(c._layers&&c.getLayer&&c.getLayer(t)){const f=c.getLayer(t);c.removeLayer(f)}else c._layers&&n(c)}};n(this)},getRasterTop(){const t=Object.values(this.getRasterLayers());return t.length?Math.max(...t.map(n=>n.options.zIndex))+1:null}}),W0=L.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,n,a,l,c){const f=this.options,p=Math.PI/180;if(f.pixelSize<=1)return L.polyline([t.latLng,t.latLng],f.pathOptions);const g=a.project(t.latLng),A=-(t.heading-90)*p,k=L.point(g.x+f.pixelSize*Math.cos(A+Math.PI)/2,g.y+f.pixelSize*Math.sin(A)/2),C=g.add(g.subtract(k));return L.polyline([a.unproject(k),a.unproject(C)],f.pathOptions)}}),K0=L.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,n,a,l,c){return this.options.polygon?L.polygon(this._buildArrowPath(t,a),this.options.pathOptions):L.polyline(this._buildArrowPath(t,a),this.options.pathOptions)},_buildArrowPath:function(t,n){const a=Math.PI/180,l=n.project(t.latLng),c=-(t.heading-90)*a,f=this.options.headAngle/2*a,p=c+f,g=c-f,A=L.point(l.x-this.options.pixelSize*Math.cos(p),l.y+this.options.pixelSize*Math.sin(p)),k=L.point(l.x-this.options.pixelSize*Math.cos(g),l.y+this.options.pixelSize*Math.sin(g));return[n.unproject(A),t.latLng,n.unproject(k)]}}),X0=L.Class.extend({options:{markerOptions:{},rotation:!1},initialize:function(t){L.Util.setOptions(this,t),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(t,n,a,l,c){return this.options.rotation&&(this.options.markerOptions.rotationAngle=t.heading+(this.options.angleCorrection||0)),L.marker(t.latLng,this.options.markerOptions)}}),Y0={Dash:W0,ArrowHead:K0,Marker:X0};function J0(t,n){const a=n.x-t.x,l=n.y-t.y;return Math.sqrt(a*a+l*l)}const Q0=(t,n)=>(Math.atan2(n.y-t.y,n.x-t.x)*180/Math.PI+90+360)%360,po=({value:t,isInPixels:n},a)=>n?t/a:t;function _o(t){if(typeof t=="string"&&t.indexOf("%")!==-1)return{value:parseFloat(t)/100,isInPixels:!1};const n=t?parseFloat(t):0;return{value:n,isInPixels:n>0}}const tp=(t,n)=>t.x===n.x&&t.y===n.y;function ep(t){return t.reduce((n,a,l,c)=>{if(l>0&&!tp(a,c[l-1])){const f=c[l-1],p=n.length>0?n[n.length-1].distB:0,g=J0(f,a);n.push({a:f,b:a,distA:p,distB:p+g,heading:Q0(f,a)})}return n},[])}function ip(t,n){const a=ep(t),l=a.length;if(l===0)return[];const c=a[l-1].distB,f=po(n.offset,c),p=po(n.endOffset,c),g=po(n.repeat,c),A=c*g,k=f>0?c*f:0,C=p>0?c*p:0,x=[];let b=k;do x.push(b),b+=A;while(A>0&&b<c-C);let T=0,G=a[0];return x.map(Z=>{for(;Z>G.distB&&T<l-1;)T++,G=a[T];const K=(Z-G.distA)/(G.distB-G.distA);return{pt:np(G.a,G.b,K),heading:G.heading}})}function np(t,n,a){return n.x!==t.x?{x:t.x+a*(n.x-t.x),y:t.y+a*(n.y-t.y)}:{x:t.x,y:t.y+(n.y-t.y)*a}}const sp=t=>t instanceof L.LatLng||Array.isArray(t)&&t.length===2&&typeof t[0]=="number",ap=t=>Array.isArray(t)&&sp(t[0]),rp=L.FeatureGroup.extend({options:{patterns:[]},initialize:function(t,n){L.FeatureGroup.prototype.initialize.call(this),L.Util.setOptions(this,n),this._map=null,this._paths=this._initPaths(t),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(t,n){return ap(t)?[n?t.concat([t[0]]):t]:t instanceof L.Polyline?this._initPaths(t.getLatLngs(),t instanceof L.Polygon):Array.isArray(t)?t.reduce((a,l)=>a.concat(this._initPaths(l,n)),[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,n){return{symbolFactory:t.symbol,offset:_o(t.offset),endOffset:_o(t.endOffset),repeat:_o(t.repeat)}},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(t){this._map.off("moveend",this.redraw,this),this._map=null,L.FeatureGroup.prototype.onRemove.call(this,t)},_initBounds:function(){const t=this._paths.reduce((n,a)=>n.concat(a),[]);return L.latLngBounds(t)},getBounds:function(){return this._bounds},_buildSymbols:function(t,n,a){return a.map((l,c)=>n.buildSymbol(l,t,this._map,c,a.length))},_getDirectionPoints:function(t,n){if(t.length<2)return[];const a=t.map(l=>this._map.project(l));return ip(a,n).map(l=>({latLng:this._map.unproject(L.point(l.pt)),heading:l.heading}))},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(t){const n=this._map.getBounds().pad(.1);return this._paths.map(a=>{const l=this._getDirectionPoints(a,t).filter(c=>n.contains(c.latLng));return L.featureGroup(this._buildSymbols(a,t.symbolFactory,l))})},_draw:function(){this._patterns.map(t=>this._getPatternLayers(t)).forEach(t=>{this.addLayer(L.featureGroup(t))})}});function op(t){const n=document.createElement("style"),a=document.head||document.documentElement;n.innerHTML=`
|
|
10
|
-
.${t}-statusbar {
|
|
11
|
-
display: flex;
|
|
12
|
-
color: #fff;
|
|
13
|
-
height: 26px;
|
|
14
|
-
padding: 0 10px;
|
|
15
|
-
line-height: 26px;
|
|
16
|
-
margin: 0;
|
|
17
|
-
letter-spacing: 1px;
|
|
18
|
-
text-shadow: 0 0 2px #fff;
|
|
19
|
-
border: 1px solid #999;
|
|
20
|
-
border-top: none;
|
|
21
|
-
white-space: nowrap;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
}
|
|
24
|
-
.${t}-statusbar-item + .${t}-statusbar-item {
|
|
25
|
-
margin-left: 10px
|
|
26
|
-
}
|
|
27
|
-
.${t}-eaglemap {
|
|
28
|
-
border: solid rgba(13, 59, 54, 0.85) 1px;
|
|
29
|
-
box-shadow: 0 1px 7px #999;
|
|
30
|
-
background: rgba(13, 59, 54, 0.85);
|
|
31
|
-
-moz-border-radius: 8px;
|
|
32
|
-
-webkit-border-radius: 8px;
|
|
33
|
-
border-radius: 3px;
|
|
34
|
-
transition: all 0.5s;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.${t}-eaglemap a {
|
|
38
|
-
background-color: rgba(13, 59, 54, 0.85);
|
|
39
|
-
background-position: -1px -1px;
|
|
40
|
-
background-repeat: no-repeat;
|
|
41
|
-
display: block;
|
|
42
|
-
outline: none;
|
|
43
|
-
z-index: 99999;
|
|
44
|
-
transition: all 0.2s;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.${t}-eaglemap a.minimized {
|
|
48
|
-
-webkit-transform: rotate(180deg);
|
|
49
|
-
transform: rotate(180deg);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.${t}-eaglemap a.minimized-bottomright {
|
|
53
|
-
-webkit-transform: rotate(180deg);
|
|
54
|
-
transform: rotate(180deg);
|
|
55
|
-
border-radius: 0px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.${t}-eaglemap a.minimized-topleft {
|
|
59
|
-
-webkit-transform: rotate(0deg);
|
|
60
|
-
transform: rotate(0deg);
|
|
61
|
-
border-radius: 0px;
|
|
62
|
-
}
|
|
63
|
-
.${t}-eaglemap a.minimized-bottomleft {
|
|
64
|
-
-webkit-transform: rotate(270deg);
|
|
65
|
-
transform: rotate(270deg);
|
|
66
|
-
border-radius: 0px;
|
|
67
|
-
}
|
|
68
|
-
.${t}-eaglemap a.minimized-topright {
|
|
69
|
-
-webkit-transform: rotate(90deg);
|
|
70
|
-
transform: rotate(90deg);
|
|
71
|
-
border-radius: 0px;
|
|
72
|
-
}
|
|
73
|
-
.${t}-eaglemap-toggle-display {
|
|
74
|
-
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAMdJREFUOE/V0zEOQVEQheH/hMQqVDahREMreonKApCgUYkE67ANOhWJxga0WoXqyEuehBeP+0Lj1iffzNzMiB89/cjhTyDbOSAv6Ro6+svRbLeALtCUdElitgvJImnQFigDO6Ah6XzHbJeAiaT2Y4E0aAYM4+AeqEeY7SKwBk6Sqh+hKGB7Cozj8BHoACsg6mgTDMXYAJi/+PBsUIxFo1QSWDbI9hLofdWR7QXQT9mjsI5s14DRm2U8SHoq8ie3FnpfQQuZFbsB4idCE9J/7MkAAAAASUVORK5CYII=');
|
|
75
|
-
background-size: cover;
|
|
76
|
-
position: absolute;
|
|
77
|
-
border-radius: 3px 0px 0px 0px;
|
|
78
|
-
}
|
|
79
|
-
.${t}-eaglemap-toggle-display-bottomright {
|
|
80
|
-
bottom: 0;
|
|
81
|
-
right: 0;
|
|
82
|
-
}
|
|
83
|
-
.${t}-eaglemap-toggle-display-topleft {
|
|
84
|
-
top: 0;
|
|
85
|
-
left: 0;
|
|
86
|
-
-webkit-transform: rotate(180deg);
|
|
87
|
-
transform: rotate(180deg);
|
|
88
|
-
}
|
|
89
|
-
.${t}-eaglemap-toggle-display-bottomleft {
|
|
90
|
-
bottom: 0;
|
|
91
|
-
left: 0;
|
|
92
|
-
-webkit-transform: rotate(90deg);
|
|
93
|
-
transform: rotate(90deg);
|
|
94
|
-
}
|
|
95
|
-
.${t}-eaglemap-toggle-display-topright {
|
|
96
|
-
top: 0;
|
|
97
|
-
right: 0;
|
|
98
|
-
-webkit-transform: rotate(270deg);
|
|
99
|
-
transform: rotate(270deg);
|
|
100
|
-
}
|
|
101
|
-
.${t}-contextmenu {
|
|
102
|
-
display: none;
|
|
103
|
-
box-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);
|
|
104
|
-
-webkit-border-radius: 4px;
|
|
105
|
-
border-radius: 4px;
|
|
106
|
-
padding: 4px 0;
|
|
107
|
-
background-color: #fff;
|
|
108
|
-
cursor: default;
|
|
109
|
-
-webkit-user-select: none;
|
|
110
|
-
-moz-user-select: none;
|
|
111
|
-
user-select: none;
|
|
112
|
-
}
|
|
113
|
-
.${t}-contextmenu a.${t}-contextmenu-item {
|
|
114
|
-
display: block;
|
|
115
|
-
color: #222;
|
|
116
|
-
font-size: 12px;
|
|
117
|
-
line-height: 20px;
|
|
118
|
-
text-decoration: none;
|
|
119
|
-
padding: 0 12px;
|
|
120
|
-
border-top: 1px solid transparent;
|
|
121
|
-
border-bottom: 1px solid transparent;
|
|
122
|
-
cursor: default;
|
|
123
|
-
outline: none;
|
|
124
|
-
}
|
|
125
|
-
.${t}-contextmenu a.${t}-contextmenu-item-disabled {
|
|
126
|
-
opacity: 0.5;
|
|
127
|
-
}
|
|
128
|
-
.${t}-contextmenu a.${t}-contextmenu-item.over {
|
|
129
|
-
background-color: #f4f4f4;
|
|
130
|
-
border-top: 1px solid #f0f0f0;
|
|
131
|
-
border-bottom: 1px solid #f0f0f0;
|
|
132
|
-
}
|
|
133
|
-
.${t}-contextmenu a.${t}-contextmenu-item-disabled.over {
|
|
134
|
-
background-color: inherit;
|
|
135
|
-
border-top: 1px solid transparent;
|
|
136
|
-
border-bottom: 1px solid transparent;
|
|
137
|
-
}
|
|
138
|
-
.${t}-contextmenu-icon {
|
|
139
|
-
margin: 2px 8px 0 0;
|
|
140
|
-
width: 16px;
|
|
141
|
-
height: 16px;
|
|
142
|
-
float: left;
|
|
143
|
-
border: 0;
|
|
144
|
-
}
|
|
145
|
-
.${t}-contextmenu-separator {
|
|
146
|
-
border-bottom: 1px solid #ccc;
|
|
147
|
-
margin: 5px 0;
|
|
148
|
-
}
|
|
149
|
-
.${t}-pulse-icon {
|
|
150
|
-
display: inline-block;
|
|
151
|
-
width: 100%;
|
|
152
|
-
height: 100%;
|
|
153
|
-
border-radius: 100%;
|
|
154
|
-
position: relative;
|
|
155
|
-
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1);
|
|
156
|
-
}
|
|
157
|
-
.${t}-dive-icon {
|
|
158
|
-
content: '';
|
|
159
|
-
border-radius: 100%;
|
|
160
|
-
height: 200%;
|
|
161
|
-
width: 200%;
|
|
162
|
-
position: absolute;
|
|
163
|
-
margin: -50% 0 0 -50%;
|
|
164
|
-
}
|
|
165
|
-
@keyframes pulsate {
|
|
166
|
-
0% {
|
|
167
|
-
transform: scale(0.1, 0.1);
|
|
168
|
-
opacity: 0;
|
|
169
|
-
-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';
|
|
170
|
-
filter: alpha(opacity=0);
|
|
171
|
-
}
|
|
172
|
-
50% {
|
|
173
|
-
opacity: 1;
|
|
174
|
-
-ms-filter: none;
|
|
175
|
-
filter: none;
|
|
176
|
-
}
|
|
177
|
-
100% {
|
|
178
|
-
transform: scale(1.2, 1.2);
|
|
179
|
-
opacity: 0;
|
|
180
|
-
-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';
|
|
181
|
-
filter: alpha(opacity=0);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
`,a.appendChild(n)}(t=>{const n=Object.create(L)||{};return n.LANG=Or,n.BaseMap=L.Map.extend({options:{doubleClickZoom:!1,closePopupOnClick:!1,zoomControl:!1,attributionControl:!1,scaleControl:{show:!0},minZoom:5,maxZoom:19,contextmenu:!0,center:[0,0],zoom:17},initialize(a,l={},c){var f;if(typeof a=="string"&&(a=document.getElementById(a)),!a instanceof HTMLElement||!a.clientWidth||!a.clientHeight)throw new Error("地图容器不存在或元素尺寸为0");this.lang=typeof l.lang=="string"?l.lang:"zh_CN",this.clsPrefix=typeof l.clsPrefix=="string"?l.clsPrefix:"gis2d",op(this.clsPrefix),L.Util.setOptions(this,l),L.Layer.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.Zoom.mergeOptions({position:((f=this.options.zoomControl)==null?void 0:f.position)||"topleft",zoomInTitle:Or[this.lang].zoomIn,zoomOutTitle:Or[this.lang].zoomOut}),L.Control.Attribution.mergeOptions({prefix:`<a href="http://www.${this.clsPrefix}.com" target="_blank">Guo.Yan</a>`}),L.Map.prototype.initialize.call(this,a,this.options),L.DomEvent.on(this._container,"click",p=>{var A;const g=this._container.querySelector(".add");g&&(g.style.display="none"),(A=this.contextmenu)==null||A.hide()},this),l.debug?(document.onselectstart=()=>l.debug.allowSelect,a.oncontextmenu=()=>l.debug.allowContextmenu,document.onkeydown=function(p){if(p&&p.keyCode===123)return l.debug.allowDevtool}):process.env.NODE_ENV!=="development"&&(document.onkeydown=function(p){if(p&&p.keyCode===123)return!1},a.oncontextmenu=()=>!1),t[c||"$m"]=this},getCursor(){return this.getContainer().style.cursor||"default"},setCursor(a="default"){const l=this.getContainer();["auto","pointer","crosshair","move","text","wait","help","grab","default"].includes(a)?l.style.cursor=`${a}`:a==="draw"?l.style.cursor="url(data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA=), auto":l.style.cursor=`url(${a}), auto`},flyTo(a,l=0,c={animate:!1}){a instanceof L.Marker?(a=a._latlng,L.Map.prototype.flyTo.call(this,a,l||this.getZoom(),c)):a instanceof L.Path||a instanceof L.FeatureGroup?(a=a.getBounds(),L.Map.prototype.flyToBounds.call(this,a,c)):L.Map.prototype.flyTo.call(this,a,l||this.getZoom(),c)},getLayer(a){return this._layers[a]},getLayers(){return Object.values(this._layers)},openWidget(a,l={},c={}){this.fire("widget-mount",{name:a,options:l,events:c})},closeWidget(a){this.fire("widget-unmount",{name:a})},closeAllWidget(){this.view.fire("widget-destory")}}),n.StatusBar=Ir,n.CRS.BaiDu=ro,n.WebMercatorTiledLayer=U0,n.BlinkMarker=ul,n.CanvasMarker=cl,n.HeatLayer=uo,n.WMTS=H0,n.WMS=fe,n.Knob=gl,n.Draw=Oa,n.ContextMenu=di,n.KeyBoard=fo,n.EagleMap=Rr,n.LayerManager=Al,n.ImageOverlay.Rotated=Z0,n.Text=ll,n.VertexMarkers=Gr,n.Measurement=ls,n.Collision=N0,n.Symbol=Y0,n.PolylineDecorator=rp,t.L=n})(window);function mo(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("未找到全局对象")}const go=function(t,n={}){go.installed||(mo().Gis=Sl)};mo().Vue&&go(mo().Vue);const hp={install:go};Jt.BaiDuCRS=ro,Jt.BlinkMarker=ul,Jt.CanvasMarker=cl,Jt.ContextMenu=di,Jt.Draw=Oa,Jt.EagleMap=Rr,Jt.KeyBoard=fo,Jt.Knob=gl,Jt.LayerManager=Al,Jt.MeasureMent=ls,Jt.StatusBar=Ir,Jt.TextMarker=ll,Jt.VertexMarker=Gr,Jt.default=hp,Object.defineProperties(Jt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode(".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}\n.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.marker-icon{background-color:#fff;border:1px solid #3388ff;border-radius:50%;margin:-8px 0 0 -8px!important;width:14px!important;height:14px!important;outline:0;transition:opacity ease .3s}.marker-icon-middle{opacity:.7;margin:-6px 0 0 -6px!important;width:10px!important;height:10px!important}.leaflet-pm-draggable{cursor:move!important}.cursor-marker{cursor:crosshair;pointer-events:none;opacity:0}.cursor-marker.visible{opacity:1!important}.geoman-draw-cursor,.geoman-draw-cursor .leaflet-interactive{cursor:crosshair}.rect-style-marker,.rect-start-marker{opacity:0}.rect-style-marker.visible,.rect-start-marker.visible{opacity:1!important}.vertexmarker-disabled{opacity:.7}.pm-text-marker{width:0;height:0}.pm-textarea{box-sizing:content-box;background-color:#fff;color:#000;resize:none;border:none;outline:0;cursor:pointer;border-radius:3px;padding-left:7px;padding-bottom:0;padding-top:4px}.leaflet-pm-draggable .pm-textarea{cursor:move}.pm-textarea:focus,.pm-textarea:focus-within,.pm-textarea:focus-visible,.pm-textarea:active{border:2px solid #000;outline:0}.pm-textarea.pm-disabled{border:none;-webkit-user-select:none;user-select:none}.pm-textarea.pm-hasfocus{cursor:auto}.leaflet-pm-toolbar .leaflet-buttons-control-button{padding:5px;box-sizing:border-box;position:relative;z-index:3}.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:first-child:not(.pos-right),.leaflet-pm-toolbar .leaflet-pm-actions-container a.leaflet-pm-action:last-child.pos-right{border-radius:0}.leaflet-pm-toolbar .button-container a.leaflet-buttons-control-button{border-radius:0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-radius:0 0 2px 2px}.leaflet-pm-toolbar .button-container:first-child a.leaflet-buttons-control-button{border-radius:2px 2px 0 0}.leaflet-pm-toolbar .button-container:last-child a.leaflet-buttons-control-button{border-bottom:none}.leaflet-pm-toolbar .control-fa-icon{font-size:19px;line-height:24px}.leaflet-pm-toolbar .control-icon{width:100%;height:100%;box-sizing:border-box;background-size:contain;background-repeat:no-repeat;background-position:center center}.leaflet-pm-toolbar .leaflet-pm-icon-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Marker</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M15.5,24.8782959 C15.2909201,24.8772219 15.1744857,24.8467817 14.6590866,24.2354163 C10.2196955,19.4118054 8,15.5014392 8,12.5043177 C8,8.35979746 11.3578644,5 15.5,5 C19.6421356,5 23,8.35979746 23,12.5043177 C23,17 18.2878217,21.9268378 16.3336601,24.2440186 C15.8224622,24.8501802 15.7090799,24.8793699 15.5,24.8782959 Z M15.5,15.5326948 C17.275201,15.5326948 18.7142857,14.1180004 18.7142857,12.3728864 C18.7142857,10.6277723 17.275201,9.21307792 15.5,9.21307792 C13.724799,9.21307792 12.2857143,10.6277723 12.2857143,12.3728864 C12.2857143,14.1180004 13.724799,15.5326948 15.5,15.5326948 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Marker\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-polygon{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"polygon-a\" d=\"M19.4206892,9.16509725 C19.1523681,8.66992914 19,8.10275831 19,7.5 C19,5.56700338 20.5670034,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 L19.4206892,9.16509725 Z M20.8349073,10.5793063 L10.5793108,20.8349027 C10.6086731,20.8890888 10.6366469,20.9441372 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 C20.9441372,10.6366469 20.8890888,10.6086731 20.8349027,10.5793108 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"polygon-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23polygon-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23polygon-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23polygon-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-polyline{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"line-a\" d=\"M9.16509725,19.4206892 L18.4206892,10.1650973 C18.1523681,9.66992914 18,9.10275831 18,8.5 C18,6.56700338 19.5670034,5 21.5,5 C23.4329966,5 25,6.56700338 25,8.5 C25,10.4329966 23.4329966,12 21.5,12 C20.8972417,12 20.3300709,11.8476319 19.8349027,11.5793108 L10.5793108,20.8349027 C10.8476319,21.3300709 11,21.8972417 11,22.5 C11,24.4329966 9.43299662,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.5670034 5.56700338,19 7.5,19 C8.10275831,19 8.66992914,19.1523681 9.16509725,19.4206892 Z M21.5,10 C22.3284271,10 23,9.32842712 23,8.5 C23,7.67157288 22.3284271,7 21.5,7 C20.6715729,7 20,7.67157288 20,8.5 C20,9.32842712 20.6715729,10 21.5,10 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"line-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23line-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23line-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23line-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-circle{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Circle</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M18.2897751,6.78602275 C18.8924131,6.29464981 19.661797,6 20.5,6 C22.4329966,6 24,7.56700338 24,9.5 C24,10.338203 23.7053502,11.1075869 23.2139772,11.7102249 C23.719599,12.8712053 24,14.1528571 24,15.5 C24,20.7467051 19.7467051,25 14.5,25 C9.25329488,25 5,20.7467051 5,15.5 C5,10.2532949 9.25329488,6 14.5,6 C15.8471429,6 17.1287947,6.28040098 18.2897751,6.78602275 Z M17.1504228,8.4817586 C16.3263581,8.17039236 15.4330777,8 14.5,8 C10.3578644,8 7,11.3578644 7,15.5 C7,19.6421356 10.3578644,23 14.5,23 C18.6421356,23 22,19.6421356 22,15.5 C22,14.5669223 21.8296076,13.6736419 21.5182414,12.8495772 C21.1960383,12.9473968 20.8541622,13 20.5,13 C18.5670034,13 17,11.4329966 17,9.5 C17,9.14583778 17.0526032,8.80396169 17.1504228,8.4817586 Z M14.5,17 C13.6715729,17 13,16.3284271 13,15.5 C13,14.6715729 13.6715729,14 14.5,14 C15.3284271,14 16,14.6715729 16,15.5 C16,16.3284271 15.3284271,17 14.5,17 Z M20.5,11 C21.3284271,11 22,10.3284271 22,9.5 C22,8.67157288 21.3284271,8 20.5,8 C19.6715729,8 19,8.67157288 19,9.5 C19,10.3284271 19.6715729,11 20.5,11 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Circle\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A <g id=\"Atoms/Color/Grey\" mask=\"url(%23mask-2)\" fill=\"%235B5B5B\">%0A <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"30\" height=\"30\"></rect>%0A </g>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-circle-marker{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A%0A<svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"%235B5B5B\" stroke-width=\"8\"%0A fill=\"none\">%0A<circle cx=\"50\" cy=\"50\" r=\"35\"/>%0A <circle cx=\"50\" cy=\"50\" r=\"3\" fill=\"%235B5B5B\"/>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rectangle{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rectangle-a\" d=\"M23,10.9645556 L23,19.0354444 C24.6961471,19.2780593 26,20.736764 26,22.5 C26,24.4329966 24.4329966,26 22.5,26 C20.736764,26 19.2780593,24.6961471 19.0354444,23 L10.9645556,23 C10.7219407,24.6961471 9.26323595,26 7.5,26 C5.56700338,26 4,24.4329966 4,22.5 C4,20.736764 5.30385293,19.2780593 7,19.0354444 L7,10.9645556 C5.30385293,10.7219407 4,9.26323595 4,7.5 C4,5.56700338 5.56700338,4 7.5,4 C9.26323595,4 10.7219407,5.30385293 10.9645556,7 L19.0354444,7 C19.2780593,5.30385293 20.736764,4 22.5,4 C24.4329966,4 26,5.56700338 26,7.5 C26,9.26323595 24.6961471,10.7219407 23,10.9645556 Z M21,10.6631844 C20.272154,10.3174225 19.6825775,9.72784598 19.3368156,9 L10.6631844,9 C10.3174225,9.72784598 9.72784598,10.3174225 9,10.6631844 L9,19.3368156 C9.72784598,19.6825775 10.3174225,20.272154 10.6631844,21 L19.3368156,21 C19.6825775,20.272154 20.272154,19.6825775 21,19.3368156 L21,10.6631844 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z M22.5,9 C23.3284271,9 24,8.32842712 24,7.5 C24,6.67157288 23.3284271,6 22.5,6 C21.6715729,6 21,6.67157288 21,7.5 C21,8.32842712 21.6715729,9 22.5,9 Z M22.5,24 C23.3284271,24 24,23.3284271 24,22.5 C24,21.6715729 23.3284271,21 22.5,21 C21.6715729,21 21,21.6715729 21,22.5 C21,23.3284271 21.6715729,24 22.5,24 Z M7.5,24 C8.32842712,24 9,23.3284271 9,22.5 C9,21.6715729 8.32842712,21 7.5,21 C6.67157288,21 6,21.6715729 6,22.5 C6,23.3284271 6.67157288,24 7.5,24 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"rectangle-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rectangle-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rectangle-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rectangle-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-delete{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Eraser</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M17.7874219,18.4812552 L11.6480079,13.3498184 L6.40466009,19.3816001 L10.5539156,22.9884929 L13.86934,22.9884929 L17.7874219,18.4812552 Z M16.5074252,22.9884929 L26.0000002,22.9884929 L26.0000002,24.9884929 L10.0000002,24.9884929 L9.80708313,24.9884929 L5.09254204,20.8910192 C4.25891285,20.1663564 4.17057814,18.9031112 4.89524093,18.069482 L16.0482444,5.23941916 C16.7729072,4.40578998 18.0361525,4.31745526 18.8697816,5.04211806 L24.9074583,10.2905903 C25.7410875,11.0152531 25.8294222,12.2784983 25.1047594,13.1121275 L16.5074252,22.9884929 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Eraser\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Combined-Shape\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-edit{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"edit_anchor-a\" d=\"M13.5,11 C11.5670034,11 10,9.43299662 10,7.5 C10,5.56700338 11.5670034,4 13.5,4 C15.4329966,4 17,5.56700338 17,7.5 C17,9.43299662 15.4329966,11 13.5,11 Z M13.5,9 C14.3284271,9 15,8.32842712 15,7.5 C15,6.67157288 14.3284271,6 13.5,6 C12.6715729,6 12,6.67157288 12,7.5 C12,8.32842712 12.6715729,9 13.5,9 Z M12.0002889,7.52973893 C12.0125983,8.16273672 12.4170197,8.6996643 12.9807111,8.90767966 L3,15 L3,13 L12.0002889,7.52973893 Z M14.2172722,6.18228472 L19.453125,3 L22.6589355,3 L14.989102,7.68173885 C14.9962971,7.62216459 15,7.56151472 15,7.5 C15,6.93138381 14.6836098,6.4366645 14.2172722,6.18228472 Z M23.4434042,19.2851736 L20.1282799,19.2851736 L21.8729983,23.5349525 C21.9945296,23.8295773 21.8556546,24.1599209 21.5778734,24.2849208 L20.0414675,24.9545142 C19.7550613,25.0795141 19.4338738,24.9366704 19.3123426,24.6509518 L17.6544367,20.6154541 L14.9461873,23.4010151 C14.5852811,23.7721711 14,23.4860463 14,22.9992653 L14,9.57183533 C14,9.05933561 14.6225311,8.809492 14.946156,9.17008555 L23.8340292,18.3120179 C24.1925291,18.6613615 23.9279979,19.2851736 23.4434042,19.2851736 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"edit_anchor-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23edit_anchor-a\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23edit_anchor-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23edit_anchor-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-drag{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"move-a\" d=\"M21,14 L21,10 L27,15 L21,20 L21,16 L16,16 L16,21 L20,21 L15,27 L10,21 L14,21 L14,16 L9,16 L9,20 L3,15 L9,10 L9,14 L14,14 L14,9 L10,9 L15,3 L20,9 L16,9 L16,14 L21,14 Z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-3 -3)\">%0A <mask id=\"move-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23move-a\"/>%0A </mask>%0A <use fill=\"%23D8D8D8\" xlink:href=\"%23move-a\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23move-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-cut{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->%0A <title>Atoms/Icons/Tools/Scissors</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M12.9691574,13.4939435 L21.0317032,5.54167013 L23.4649499,5.67722957 L17.0470713,14.5106816 L27.5660336,17.1333535 L25.7891944,18.8012588 L14.5854951,17.8987506 L13.6487955,19.188007 C13.794639,19.2650958 13.9367985,19.3534417 14.0741377,19.4532245 C15.6379648,20.5894114 15.9846357,22.7782052 14.8484488,24.3420324 C13.7122619,25.9058595 11.5234681,26.2525304 9.95964096,25.1163435 C8.39581384,23.9801565 8.04914296,21.7913627 9.18532986,20.2275356 C9.74587276,19.4560145 10.5626188,18.9807475 11.4341218,18.8336407 L12.6805656,17.1180579 L12.5239724,16.3747216 L11.9506932,15.3012391 L9.89310646,14.7882251 C9.13093796,15.2357261 8.19977854,15.3966447 7.27445355,15.1659352 C5.39887519,14.698301 4.25751094,12.7987519 4.72514515,10.9231736 C5.19277935,9.04759519 7.09232846,7.90623094 8.96790682,8.37386515 C10.8434852,8.84149935 11.9848494,10.7410485 11.5172152,12.6166268 C11.4761464,12.7813449 11.4240335,12.9404001 11.3618627,13.0931999 L12.9691574,13.4939435 Z M7.75829735,13.2253438 C8.56211664,13.4257584 9.37620912,12.9366023 9.57662378,12.132783 C9.77703844,11.3289637 9.28788233,10.5148713 8.48406303,10.3144566 C7.68024373,10.1140419 6.86615126,10.603198 6.6657366,11.4070173 C6.46532194,12.2108366 6.95447805,13.0249291 7.75829735,13.2253438 Z M10.8033639,21.4031061 C10.3164266,22.0733177 10.4649998,23.0113722 11.1352115,23.4983095 C11.8054231,23.9852467 12.7434776,23.8366735 13.2304148,23.1664619 C13.7173521,22.4962502 13.5687788,21.5581957 12.8985672,21.0712585 C12.2283556,20.5843212 11.2903011,20.7328945 10.8033639,21.4031061 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Scissors\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(16.093194, 15.663351) rotate(-32.000000) translate(-16.093194, -15.663351) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-snapping{background-image:url('data:image/svg+xml,<?xml version=\"1.0\" encoding=\"UTF-8\"?>%0A<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">%0A <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->%0A <title>Atoms/Icons/Tools/Magnet</title>%0A <desc>Created with Sketch.</desc>%0A <defs>%0A <path d=\"M21.9994759,10.9428183 L21.9999985,16.3710417 C22,16.6872007 22,17.0058278 22,17.3269411 C22,21.5646545 18.6421356,25 14.5,25 C10.3578644,25 7,21.5646545 7,17.3269411 L7.00087508,10.9907507 L11.0022808,10.9984125 C11.0017033,11.6980114 11.001247,12.4168248 11.0008992,13.1554887 L11,17.3269411 C11,19.3756809 12.5876841,21 14.5,21 C16.4123159,21 18,19.3756809 18,17.3269411 C18,15.0702032 17.9995696,12.9619668 17.998539,10.9910032 L21.9994759,10.9428183 Z M10,7 C10.5522847,7 11,7.44771525 11,8 L11,10 L7,10 L7,8 C7,7.44771525 7.44771525,7 8,7 L10,7 Z M21,7 C21.5522847,7 22,7.44771525 22,8 L22,10 L18,10 L18,8 C18,7.44771525 18.4477153,7 19,7 L21,7 Z\" id=\"path-1\"></path>%0A </defs>%0A <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">%0A <g id=\"Atoms/Icons/Tools/Magnet\" transform=\"translate(-3.000000, -3.000000)\">%0A <mask id=\"mask-2\" fill=\"white\">%0A <use xlink:href=\"%23path-1\"></use>%0A </mask>%0A <use id=\"Mask\" fill=\"%235B5B5B\" fill-rule=\"nonzero\" transform=\"translate(14.500000, 16.000000) rotate(45.000000) translate(-14.500000, -16.000000) \" xlink:href=\"%23path-1\"></use>%0A </g>%0A </g>%0A</svg>')}.leaflet-pm-toolbar .leaflet-pm-icon-rotate{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">%0A <defs>%0A <path id=\"rotate\" d=\"M21.2,5.8c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.3-0.5l-0.1-0.2c-0.1-0.2-0.2-0.3-0.4-0.5l-0.2-0.3l2.8-3.1L18,0.6l-4.6,0.1l0.5,4.5l0.5,4.5l3.2-3.6v0.1l0.1,0.2c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.2C18,7,18,7.1,18.1,7.2c0.3,0.7,0.6,1.4,0.7,2.1c0.2,1.4,0,2.9-0.6,4.2L18,13.9L17.9,14l-0.3,0.5l-0.1,0.2c-0.2,0.2-0.4,0.5-0.6,0.7c-0.5,0.5-1.1,1-1.7,1.3c-0.6,0.4-1.3,0.6-2.1,0.8c-0.7,0.1-1.5,0.2-2.2,0.1c-0.8-0.1-1.5-0.3-2.2-0.5c-0.7-0.3-1.3-0.7-1.9-1.2l-0.4-0.4l-0.2-0.3L6,15c-0.1-0.1-0.2-0.2-0.2-0.3l-0.3-0.4l-0.1-0.1l-0.2-0.4c0-0.1-0.1-0.1-0.1-0.2l-0.3-0.5l-0.1-0.2c-0.1-0.3-0.2-0.6-0.3-0.9c-0.2-0.8-0.3-1.6-0.3-2.4c0-0.2,0-0.3,0-0.5V8.9c0-0.2,0-0.3,0.1-0.4l0.1-0.6l0.2-0.6c0.3-0.8,0.7-1.5,1.2-2.2c0.5-0.7,1.1-1.3,1.8-1.8c0.2-0.1,0.3-0.4,0.1-0.6C7.5,2.6,7.4,2.5,7.3,2.5H7.1L7,2.6C6.1,3,5.4,3.6,4.7,4.2C4,4.9,3.5,5.7,3,6.6c-0.9,1.8-1.2,3.8-0.8,5.8c0.1,0.5,0.2,0.9,0.3,1.4l0.3,0.8C2.9,14.7,3,14.8,3,15l0.2,0.4c0,0.1,0.1,0.2,0.1,0.2l0.3,0.5c0.1,0.2,0.2,0.3,0.3,0.5l0.1,0.2c0.1,0.1,0.2,0.3,0.3,0.4L5,17.8c0.7,0.7,1.6,1.3,2.5,1.8c0.9,0.5,1.9,0.8,3,0.9c0.5,0.1,1,0.1,1.5,0.1c0.6,0,1.1,0,1.6-0.1c1-0.2,2.1-0.5,3-1l0.2-0.1c0.2-0.1,0.3-0.2,0.5-0.3l0.7-0.4c0.2-0.1,0.3-0.2,0.4-0.3l0.2-0.2c0.2-0.1,0.4-0.3,0.5-0.5l0.1-0.1c0.3-0.3,0.7-0.7,0.9-1l0.6-0.9l0.4-0.6c1-1.9,1.4-4.1,1.1-6.2C22,7.8,21.7,6.7,21.2,5.8z\"/>%0A </defs>%0A <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 2)\">%0A <mask id=\"rotate-b\" fill=\"%23fff\">%0A <use xlink:href=\"%23rotate\"/>%0A </mask>%0A <use fill=\"%235B5B5B\" fill-rule=\"nonzero\" xlink:href=\"%23rotate\"/>%0A <g fill=\"%235B5B5B\" mask=\"url(%23rotate-b)\">%0A <rect width=\"30\" height=\"30\"/>%0A </g>%0A </g>%0A</svg>%0A')}.leaflet-pm-toolbar .leaflet-pm-icon-text{background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><defs><style>.cls-1{fill:none;stroke:%235b5b5b;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5px;}<\\/style></defs><title>Text</title><g id=\"Ebene_2\" data-name=\"Ebene 2\"><polyline class=\"cls-1\" points=\"19.64 7.27 19.64 4 12 4 12 20 15.91 20 8.09 20 12 20 12 4 4.36 4 4.36 7.27\"/></g></svg>')}.leaflet-buttons-control-button:hover,.leaflet-buttons-control-button:focus{cursor:pointer;background-color:#f4f4f4}.active>.leaflet-buttons-control-button{box-shadow:inset 0 -1px 5px 2px #514d4d4f}.leaflet-buttons-control-text-hide{display:none}.button-container{position:relative}.button-container .leaflet-pm-actions-container{z-index:2;position:absolute;top:0;left:100%;display:none;white-space:nowrap;direction:ltr}.leaflet-right .leaflet-pm-toolbar .button-container .leaflet-pm-actions-container{right:100%;left:auto}.button-container.active .leaflet-pm-actions-container{display:block}.button-container .leaflet-pm-actions-container:not(.pos-right) a.leaflet-pm-action:last-child{border-radius:0 3px 3px 0;border-right:0}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:first-child{border-radius:3px 0 0 3px}.button-container .leaflet-pm-actions-container.pos-right a.leaflet-pm-action:last-child{border-right:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action{padding:0 10px;background-color:#666;color:#fff;display:inline-block;width:auto;border-right:1px solid #eee;-webkit-user-select:none;user-select:none;border-bottom:none;height:29px;line-height:29px;vertical-align:middle}.leaflet-pm-toolbar .button-container:first-child.pos-right.active a.leaflet-buttons-control-button{border-top-left-radius:0}.leaflet-pm-toolbar .button-container:first-child.active:not(.pos-right) a.leaflet-buttons-control-button{border-top-right-radius:0}.button-container .leaflet-pm-actions-container .leaflet-pm-action:hover,.button-container .leaflet-pm-actions-container .leaflet-pm-action:focus{cursor:pointer;background-color:#777}.button-container .leaflet-pm-actions-container .leaflet-pm-action.active-action{background-color:#8e8e8e}.leaflet-pm-toolbar.activeChild{z-index:801}.leaflet-buttons-control-button.pm-disabled{background-color:#f4f4f4}.leaflet-buttons-control-button.pm-disabled>.control-icon{filter:opacity(.6)}.button-container .leaflet-pm-actions-container .pm-action-button-mode.control-icon{filter:brightness(0) invert(1);width:18px}body{height:100%;margin:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-family:Microsoft YaHei,Arial,sans-serif}label{font-weight:700}html{height:100%;box-sizing:border-box}#app{height:100%}*,*:before,*:after{box-sizing:inherit}a:focus,a:active{outline:none}a,a:focus,a:hover{cursor:pointer;text-decoration:none}div:focus{outline:none}.clearfix:after{visibility:hidden;display:block;font-size:0;content:\" \";clear:both;height:0}.leaflet-left .leaflet-control{margin-left:5px}.leaflet-right .leaflet-control{margin-right:5px}.leaflet-top .leaflet-control{margin-top:5px}.leaflet-bottom .leaflet-control{margin-bottom:5px}.leaflet-div-icon{border:none!important;background:transparent!important;text-align:center}.leaflet-measure-path-measurement{position:absolute;left:0;top:0;font-size:13px;font-weight:700;color:red;text-shadow:-1px 0 0 white,-1px -1px 0 white,0 -1px 0 white,1px -1px 0 white,1px 0 0 white,1px 1px 0 white,0 1px 0 white,-1px 1px 0 white;white-space:nowrap;transform-origin:0;pointer-events:none;z-index:9999}.leaflet-measure-path-measurement>div{position:relative;margin-top:-50%;left:-50%}.leaflet-control-scale-line{border:1px solid #999;border-top:none;padding:0;text-align:center;white-space:nowrap;overflow:hidden;color:#fff;height:26px;line-height:26px;text-shadow:0 0 2px #fff}.leaflet-control-container>div{display:flex;align-items:flex-end}.leaflet-text-label{position:absolute;transform:translate(calc(-50% + 4px),-6px);padding:2px 4px;white-space:nowrap;cursor:default}")); document.head.appendChild(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("gis-common")):"function"==typeof define&&define.amd?define(["exports","gis-common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["gis-leaflet-helper"]={},t.Gis)}(this,function(t,e){"use strict";var i=Object.defineProperty,n=(t,e,n)=>((t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}),i}var r,h={exports:{}};function l(){return r||(r=1,function(t){var e="1.9.4";function i(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++)for(e in s=arguments[i])t[e]=s[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function s(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var o=0;function a(t){return"_leaflet_id"in t||(t._leaflet_id=++o),t._leaflet_id}function r(t,e,i){var n,s,o,a;return a=function(){n=!1,s&&(o.apply(i,s),s=!1)},o=function(){n?s=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)},o}function h(t,e,i){var n=e[1],s=e[0],o=n-s;return t===n&&i?t:((t-s)%o+o)%o+s}function l(){return!1}function u(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function d(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function _(t,e,i){var n=[];for(var s in t)n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function g(t,e){return t.replace(m,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var A="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function v(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var M=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-M));return M=e+i,window.setTimeout(t,i)}var b=window.requestAnimationFrame||v("RequestAnimationFrame")||x,w=window.cancelAnimationFrame||v("CancelAnimationFrame")||v("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function P(t,e,i){if(!i||b!==x)return b.call(window,s(t,e));t.call(e)}function k(t){t&&w.call(window,t)}var E={__proto__:null,extend:i,create:n,bind:s,get lastId(){return o},stamp:a,throttle:r,wrapNum:h,falseFn:l,formatNum:u,trim:c,splitWords:p,setOptions:d,getParamString:_,template:g,isArray:f,indexOf:y,emptyImageUrl:A,requestFn:b,cancelFn:w,requestAnimFrame:P,cancelAnimFrame:k};function C(){}function S(t){if("undefined"!=typeof L&&L&&L.Mixin){t=f(t)?t:[t];for(var e=0;e<t.length;e++)t[e],L.Mixin.Events}}C.extend=function(t){var e=function(){d(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=e.__super__=this.prototype,o=n(s);for(var a in o.constructor=e,e.prototype=o,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&i(e,t.statics),t.includes&&(S(t.includes),i.apply(null,[o].concat(t.includes))),i(o,t),delete o.statics,delete o.includes,o.options&&(o.options=s.options?n(s.options):{},i(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},C.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},C.mergeOptions=function(t){return i(this.prototype.options,t),this},C.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var T={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var s=0,o=(t=p(t)).length;s<o;s++)this._on(t[s],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=p(t);for(var s=1===arguments.length,o=0,a=t.length;o<a;o++)s?this._off(t[o]):this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i,n){if("function"==typeof e&&!1===this._listens(t,e,i)){i===this&&(i=void 0);var s={fn:e,ctx:i};n&&(s.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(s)}},_off:function(t,e,i){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length){if("function"==typeof e){var a=this._listens(t,e,i);if(!1!==a){var r=n[a];this._firingCount&&(r.fn=l,this._events[t]=n=n.slice()),n.splice(a,1)}}}else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=l;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var s=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var h=o[a],l=h.fn;h.once&&this.off(t,l,h.ctx),l.call(h.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,e,i,n){var s=e;"function"!=typeof e&&(n=!!e,s=void 0,i=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,s,i))return!0;if(n)for(var a in this._eventParents)if(this._eventParents[a].listens(t,e,i,n))return!0;return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var s=0,o=n.length;s<o;s++)if(n[s].fn===e&&n[s].ctx===i)return s;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else for(var s=0,o=(t=p(t)).length;s<o;s++)this._on(t[s],e,i,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens;var B=C.extend(T);function O(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function R(t,e,i){return t instanceof O?t:f(t)?new O(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,i)}function I(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function z(t,e){return!t||t instanceof I?t:new I(t,e)}function G(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function N(t,e){return t instanceof G?t:new G(t,e)}function j(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function F(t,e,i){return t instanceof j?t:f(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(R(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(R(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=D(this.x),this.y=D(this.y),this},distanceTo:function(t){var e=(t=R(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=R(t)).x===this.x&&t.y===this.y},contains:function(t){return t=R(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},I.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof O||"number"==typeof t[0]||"x"in t)e=i=R(t);else if(e=(t=z(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return R((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return R(this.min.x,this.max.y)},getTopRight:function(){return R(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof O?R(t):z(t))instanceof I?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>=e.x&&n.x<=i.x,a=s.y>=e.y&&n.y<=i.y;return o&&a},overlaps:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>e.x&&n.x<i.x,a=s.y>e.y&&n.y<i.y;return o&&a},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,s=Math.abs(e.y-i.y)*t;return z(R(e.x-n,e.y-s),R(i.x+n,i.y+s))},equals:function(t){return!!t&&(t=z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},G.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof j)e=t,i=t;else{if(!(t instanceof G))return t?this.extend(F(t)||N(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new G(new j(e.lat-n,e.lng-s),new j(i.lat+n,i.lng+s))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof j||"lat"in t?F(t):N(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof G?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>=e.lat&&n.lat<=i.lat,a=s.lng>=e.lng&&n.lng<=i.lng;return o&&a},overlaps:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>e.lat&&n.lat<i.lat,a=s.lng>e.lng&&n.lng<i.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.prototype={equals:function(t,e){return!!t&&(t=F(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return q.distance(this,F(t))},wrap:function(){return q.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return N([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var U,Z={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new I(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,s=e.lng-i.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new G(new j(o.lat-n,o.lng-s),new j(a.lat-n,a.lng-s))}},q=i({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,s=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),r=o*o+Math.cos(n)*Math.cos(s)*a*a,h=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*h}}),H=6378137,V={R:H,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new O(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=H*Math.PI,new I([-U,-U],[U,U]))};function K(t,e,i,n){if(f(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function W(t,e,i,n){return new K(t,e,i,n)}K.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var X,$=i({},q,{code:"EPSG:3857",projection:V,transformation:(X=.5/(Math.PI*V.R),W(X,.5,-X,.5))}),Y=i({},$,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var i,n,s,o,a,r,h="";for(i=0,s=t.length;i<s;i++){for(n=0,o=(a=t[i]).length;n<o;n++)h+=(n?"L":"M")+(r=a[n]).x+" "+r.y;h+=e?Nt.svg?"z":"x":""}return h||"M0 0"}var tt,et=document.documentElement.style,it="ActiveXObject"in window,nt=it&&!document.addEventListener,st="msLaunchUri"in navigator&&!("documentMode"in document),ot=Gt("webkit"),at=Gt("android"),rt=Gt("android 2")||Gt("android 3"),ht=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=at&&Gt("Google")&&ht<537&&!("AudioNode"in window),ut=!!window.opera,ct=!st&&Gt("chrome"),pt=Gt("gecko")&&!ot&&!ut&&!it,dt=!ct&&Gt("safari"),_t=Gt("phantom"),mt="OTransition"in et,gt=0===navigator.platform.indexOf("Win"),ft=it&&"transition"in et,yt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,At="MozPerspective"in et,vt=!window.L_DISABLE_3D&&(ft||yt||At)&&!mt&&!_t,Mt="undefined"!=typeof orientation||Gt("mobile"),Lt=Mt&&ot,xt=Mt&&yt,bt=!window.PointerEvent&&window.MSPointerEvent,wt=!(!window.PointerEvent&&!bt),Pt="ontouchstart"in window||!!window.TouchEvent,kt=!window.L_NO_TOUCH&&(Pt||wt),Et=Mt&&ut,Ct=Mt&&pt,St=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Tt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(i){}return t}(),Bt=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!J("svg").createSVGRect),Dt=!!Ot&&((tt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(tt.firstChild&&tt.firstChild.namespaceURI)),Rt=!Ot&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(i){return!1}}(),It=0===navigator.platform.indexOf("Mac"),zt=0===navigator.platform.indexOf("Linux");function Gt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:it,ielt9:nt,edge:st,webkit:ot,android:at,android23:rt,androidStock:lt,opera:ut,chrome:ct,gecko:pt,safari:dt,phantom:_t,opera12:mt,win:gt,ie3d:ft,webkit3d:yt,gecko3d:At,any3d:vt,mobile:Mt,mobileWebkit:Lt,mobileWebkit3d:xt,msPointer:bt,pointer:wt,touch:kt,touchNative:Pt,mobileOpera:Et,mobileGecko:Ct,retina:St,passiveEvents:Tt,canvas:Bt,svg:Ot,vml:Rt,inlineSvg:Dt,mac:It,linux:zt},jt=Nt.msPointer?"MSPointerDown":"pointerdown",Ft=Nt.msPointer?"MSPointerMove":"pointermove",Ut=Nt.msPointer?"MSPointerUp":"pointerup",Zt=Nt.msPointer?"MSPointerCancel":"pointercancel",qt={touchstart:jt,touchmove:Ft,touchend:Ut,touchcancel:Zt},Ht={touchstart:ee,touchmove:te,touchend:te,touchcancel:te},Vt={},Kt=!1;function Wt(t,e,i){return"touchstart"===e&&Qt(),Ht[e]?(i=Ht[e].bind(this,i),t.addEventListener(qt[e],i,!1),i):l}function Xt(t,e,i){qt[e]&&t.removeEventListener(qt[e],i,!1)}function $t(t){Vt[t.pointerId]=t}function Yt(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function Jt(t){delete Vt[t.pointerId]}function Qt(){Kt||(document.addEventListener(jt,$t,!0),document.addEventListener(Ft,Yt,!0),document.addEventListener(Ut,Jt,!0),document.addEventListener(Zt,Jt,!0),Kt=!0)}function te(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Vt)e.touches.push(Vt[i]);e.changedTouches=[e],t(e)}}function ee(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&$e(e),te(t,e)}function ie(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var ne=200;function se(t,e){t.addEventListener("dblclick",e);var i,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Je(t);if(!s.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||s.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var o=Date.now();o-n<=ne?2===++i&&e(ie(t)):i=1,n=o}}}else i=t.detail}return t.addEventListener("click",s),{dblclick:e,simDblclick:s}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var ae,re,he,le,ue,ce=Ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),pe=Ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===pe||"OTransition"===pe?pe+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function me(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function ge(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function fe(t){var e=t.parentNode;e&&e.removeChild(t)}function ye(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ae(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ve(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=we(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function Le(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,s=i.length;n<s;n++)t.classList.add(i[n]);else if(!Me(t,e)){var o=we(t);be(t,(o?o+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):be(t,c((" "+we(t)+" ").replace(" "+e+" "," ")))}function be(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function we(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&ke(t,e)}function ke(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(s){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function Ee(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Ce(t,e,i){var n=e||new O(0,0);t.style[ce]=(Nt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Se(t,e){t._leaflet_pos=e,Nt.any3d?Ce(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Te(t){return t._leaflet_pos||new O(0,0)}if("onselectstart"in document)ae=function(){je(window,"selectstart",$e)},re=function(){Ue(window,"selectstart",$e)};else{var Be=Ee(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ae=function(){if(Be){var t=document.documentElement.style;he=t[Be],t[Be]="none"}},re=function(){Be&&(document.documentElement.style[Be]=he,he=void 0)}}function Oe(){je(window,"dragstart",$e)}function De(){Ue(window,"dragstart",$e)}function Re(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ie(),le=t,ue=t.style.outlineStyle,t.style.outlineStyle="none",je(window,"keydown",Ie))}function Ie(){le&&(le.style.outlineStyle=ue,le=void 0,ue=void 0,Ue(window,"keydown",Ie))}function ze(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ge(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={__proto__:null,TRANSFORM:ce,TRANSITION:pe,TRANSITION_END:de,get:_e,getStyle:me,create:ge,remove:fe,empty:ye,toFront:Ae,toBack:ve,hasClass:Me,addClass:Le,removeClass:xe,setClass:be,getClass:we,setOpacity:Pe,testProp:Ee,setTransform:Ce,setPosition:Se,getPosition:Te,get disableTextSelection(){return ae},get enableTextSelection(){return re},disableImageDrag:Oe,enableImageDrag:De,preventOutline:Re,restoreOutline:Ie,getSizedParentNode:ze,getScale:Ge};function je(t,e,i,n){if(e&&"object"==typeof e)for(var s in e)He(t,s,e[s],i);else for(var o=0,a=(e=p(e)).length;o<a;o++)He(t,e[o],i,n);return this}var Fe="_leaflet_events";function Ue(t,e,i,n){if(1===arguments.length)Ze(t),delete t[Fe];else if(e&&"object"==typeof e)for(var s in e)Ve(t,s,e[s],i);else if(e=p(e),2===arguments.length)Ze(t,function(t){return-1!==y(e,t)});else for(var o=0,a=e.length;o<a;o++)Ve(t,e[o],i,n);return this}function Ze(t,e){for(var i in t[Fe]){var n=i.split(/\d/)[0];e&&!e(n)||Ve(t,n,null,null,i)}}var qe={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function He(t,e,i,n){var s=e+a(i)+(n?"_"+a(n):"");if(t[Fe]&&t[Fe][s])return this;var o=function(e){return i.call(n||t,e||window.event)},r=o;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?o=Wt(t,e,o):Nt.touch&&"dblclick"===e?o=se(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(qe[e]||e,o,!!Nt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(o=function(e){e=e||window.event,ii(t,e)&&r(e)},t.addEventListener(qe[e],o,!1)):t.addEventListener(e,r,!1):t.attachEvent("on"+e,o),t[Fe]=t[Fe]||{},t[Fe][s]=o}function Ve(t,e,i,n,s){s=s||e+a(i)+(n?"_"+a(n):"");var o=t[Fe]&&t[Fe][s];if(!o)return this;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?Xt(t,e,o):Nt.touch&&"dblclick"===e?oe(t,o):"removeEventListener"in t?t.removeEventListener(qe[e]||e,o,!1):t.detachEvent("on"+e,o),t[Fe][s]=null}function Ke(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function We(t){return He(t,"wheel",Ke),this}function Xe(t){return je(t,"mousedown touchstart dblclick contextmenu",Ke),t._leaflet_disable_click=!0,this}function $e(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ye(t){return $e(t),Ke(t),this}function Je(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Qe(t,e){if(!e)return new O(t.clientX,t.clientY);var i=Ge(e),n=i.boundingClientRect;return new O((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var ti=Nt.linux&&Nt.chrome?window.devicePixelRatio:Nt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ei(t){return Nt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ti:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function ii(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t}var ni={__proto__:null,on:je,off:Ue,stopPropagation:Ke,disableScrollPropagation:We,disableClickPropagation:Xe,preventDefault:$e,stop:Ye,getPropagationPath:Je,getMousePosition:Qe,getWheelDelta:ei,isExternalTarget:ii,addListener:je,removeListener:Ue},si=B.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Te(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=P(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Se(this._el,i),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),oi=B.extend({options:{crs:$,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(F(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=pe&&Nt.any3d&&!Nt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),je(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(F(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,n.pan&&n.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),o=(t instanceof O?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),a=this.containerPointToLatLng(s.add(o));return this.setView(a,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():N(t);var i=R(e.paddingTopLeft||e.padding||[0,0]),n=R(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));if((s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),s),r=this.project(t.getNorthEast(),s);return{center:this.unproject(a.add(r).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,e){if(!(t=N(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=R(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new si,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){Le(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!Nt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),a=this._zoom;t=F(t),e=void 0===e?a:e;var r=Math.max(o.x,o.y),h=r*this.getZoomScale(a,e),l=s.distanceTo(n)||1,u=1.42,c=u*u;function p(t){var e=(h*h-r*r+(t?-1:1)*c*c*l*l)/(2*(t?h:r)*c*l),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function _(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/_(t)}var g=p(0);function f(t){return r*(_(g)/_(g+u*t))}function y(t){return r*(_(g)*m(g+u*t)-d(g))/c}function A(t){return 1-Math.pow(1-t,1.5)}var v=Date.now(),M=(p(1)-g)/u,L=i.duration?1e3*i.duration:1e3*M*.8;function x(){var i=(Date.now()-v)/L,o=A(i)*M;i<=1?(this._flyToFrame=P(x,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(y(o)/l)),a),this.getScaleZoom(r/f(o),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),x.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=N(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,N(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=R((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=R(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),a=this.getPixelBounds(),r=z([a.min.add(i),a.max.subtract(n)]),h=r.getSize();if(!r.contains(o)){this._enforcingBounds=!0;var l=o.subtract(r.getCenter()),u=r.extend(o).getSize().subtract(h);s.x+=l.x<0?-u.x:u.x,s.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(s),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),o=e.divideBy(2).round(),a=n.divideBy(2).round(),r=o.subtract(a);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=s(this._handleGeolocationResponse,this),n=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new j(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),fe(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)fe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=ge("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new G(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=N(t),i=R(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),h=this.getSize().subtract(i),l=z(this.project(r,n),this.project(a,n)).getSize(),u=Nt.any3d?this.options.zoomSnap:1,c=h.x/l.x,p=h.y/l.y,d=e?Math.max(c,p):Math.min(c,p);return n=this.getScaleZoom(d,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new I(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(F(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(R(t),e)},layerPointToLatLng:function(t){var e=R(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(F(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(N(t))},distance:function(t,e){return this.options.crs.distance(F(t),F(e))},containerPointToLayerPoint:function(t){return R(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return R(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(R(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(F(t)))},mouseEventToContainerPoint:function(t){return Qe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=_e(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");je(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Nt.any3d,Le(t,"leaflet-container"+(Nt.touch?" leaflet-touch":"")+(Nt.retina?" leaflet-retina":"")+(Nt.ielt9?" leaflet-oldie":"")+(Nt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=me(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Se(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Le(t.markerPane,"leaflet-zoom-hide"),Le(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Se(this._mapPane,new O(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var s=this._zoom!==e;this._moveStart(s,i)._move(t,e)._moveEnd(s),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((s||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Se(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Ue:je;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Nt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=P(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,r=!1;o;){if((i=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(s&&!ii(o,t))break;if(n.push(i),s)break}if(o===this._container)break;o=o.parentNode}return n.length||r||s||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&Re(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}var o=this._findEventTargets(t,e);if(n){for(var a=[],r=0;r<n.length;r++)n[r].listens(e,!0)&&a.push(n[r]);o=a.concat(o)}if(o.length){"contextmenu"===e&&$e(t);var h=o[0],l={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=h.getLatLng&&(!h._radius||h._radius<=10);l.containerPoint=u?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=u?h.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(r=0;r<o.length;r++)if(o[r].fire(e,l,!0),l.originalEvent._stopped||!1===o[r].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Te(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return z([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),o=new I(n.subtract(s),n.add(s)),a=this._getBoundsOffset(o,i,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new I(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new O(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=Nt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=ge("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ce,i=this._proxy.style[e];Ce(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){fe(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ce(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(s)||(P(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,Le(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function ai(t,e){return new oi(t,e)}var ri=C.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return Le(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(fe(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),hi=function(t){return new ri(t)};oi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=ge("div",e+"control-container",this._container);function n(n,s){var o=e+n+" "+e+s;t[n+s]=ge("div",o,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)fe(this._controlCorners[t]);fe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=ri.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ri.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){Le(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(Le(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ge("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Xe(e),We(e);var n=this._section=ge("section",t+"-list");i&&(this._map.on("click",this.collapse,this),je(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var s=this._layersLink=ge("a",t+"-toggle",e);s.href="#",s.title="Layers",s.setAttribute("role","button"),je(s,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){$e(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=ge("div",t+"-base",n),this._separator=ge("div",t+"-separator",n),this._overlaysList=ge("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(s(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ye(this._baseLayersList),ye(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+a(this),n),this._layerControlInputs.push(e),e.layerId=a(t.layer),je(e,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var o=document.createElement("span");return i.appendChild(o),o.appendChild(e),o.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,je(t,"click",$e),this.expand();var e=this;setTimeout(function(){Ue(t,"click",$e),e._preventClick=!1})}}),ui=function(t,e,i){return new li(t,e,i)},ci=ri.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ge("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,s){var o=ge("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Xe(o),je(o,"click",Ye),je(o,"click",s,this),je(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Le(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Le(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});oi.mergeOptions({zoomControl:!0}),oi.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ci,this.addControl(this.zoomControl))});var pi=function(t){return new ci(t)},di=ri.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ge("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=ge("div",e,i)),t.imperial&&(this._iScale=ge("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,s=3.2808399*t;s>5280?(e=s/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),_i=function(t){return new di(t)},mi='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gi=ri.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Nt.inlineSvg?mi+" ":"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ge("div","leaflet-control-attribution"),Xe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});oi.mergeOptions({attributionControl:!0}),oi.addInitHook(function(){this.options.attributionControl&&(new gi).addTo(this)});var fi=function(t){return new gi(t)};ri.Layers=li,ri.Zoom=ci,ri.Scale=di,ri.Attribution=gi,hi.layers=ui,hi.zoom=pi,hi.scale=_i,hi.attribution=fi;var yi=C.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yi.addTo=function(t,e){return t.addHandler(e,this),this};var Ai={Events:T},vi=Nt.touch?"touchstart mousedown":"mousedown",Mi=B.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(je(this._dragStartTarget,vi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Mi._dragging===this&&this.finishDrag(!0),Ue(this._dragStartTarget,vi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Me(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)Mi._dragging===this&&this.finishDrag();else if(!(Mi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Mi._dragging=this,this._preventOutline&&Re(this._element),Oe(),ae(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ze(this._element);this._startPoint=new O(e.clientX,e.clientY),this._startPos=Te(this._element),this._parentScale=Ge(i);var n="mousedown"===t.type;je(document,n?"mousemove":"touchmove",this._onMove,this),je(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new O(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,$e(t),this._moved||(this.fire("dragstart"),this._moved=!0,Le(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Le(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Se(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ue(document,"mousemove touchmove",this._onMove,this),Ue(document,"mouseup touchend touchcancel",this._onUp,this),De(),re();var e=this._moved&&this._moving;this._moving=!1,Mi._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Li(t,e,i){var n,s,o,a,r,h,l,u,c,p=[1,4,2,8];for(s=0,l=t.length;s<l;s++)t[s]._code=Ri(t[s],e);for(a=0;a<4;a++){for(u=p[a],n=[],s=0,o=(l=t.length)-1;s<l;o=s++)r=t[s],h=t[o],r._code&u?h._code&u||((c=Di(h,r,u,e,i))._code=Ri(c,e),n.push(c)):(h._code&u&&((c=Di(h,r,u,e,i))._code=Ri(c,e),n.push(c)),n.push(r));t=n}return t}function xi(t,e){var i,n,s,o,a,r,h,l,u;if(!t||0===t.length)throw new Error("latlngs not passed");Gi(t)||(t=t[0]);var c=F([0,0]),p=N(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(c=bi(t));var d=t.length,_=[];for(i=0;i<d;i++){var m=F(t[i]);_.push(e.project(F([m.lat-c.lat,m.lng-c.lng])))}for(r=h=l=0,i=0,n=d-1;i<d;n=i++)s=_[i],o=_[n],a=s.y*o.x-o.y*s.x,h+=(s.x+o.x)*a,l+=(s.y+o.y)*a,r+=3*a;u=0===r?_[0]:[h/r,l/r];var g=e.unproject(R(u));return F([g.lat+c.lat,g.lng+c.lng])}function bi(t){for(var e=0,i=0,n=0,s=0;s<t.length;s++){var o=F(t[s]);e+=o.lat,i+=o.lng,n++}return F([e/n,i/n])}var wi,Pi={__proto__:null,clipPolygon:Li,polygonCenter:xi,centroid:bi};function ki(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Si(t=Bi(t,i),i)}function Ei(t,e,i){return Math.sqrt(zi(t,e,i,!0))}function Ci(t,e,i){return zi(t,e,i)}function Si(t,e){var i=t.length,n=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(i);n[0]=n[i-1]=1,Ti(t,n,e,0,i-1);var s,o=[];for(s=0;s<i;s++)n[s]&&o.push(t[s]);return o}function Ti(t,e,i,n,s){var o,a,r,h=0;for(a=n+1;a<=s-1;a++)(r=zi(t[a],t[n],t[s],!0))>h&&(o=a,h=r);h>i&&(e[o]=1,Ti(t,e,i,n,o),Ti(t,e,i,o,s))}function Bi(t,e){for(var i=[t[0]],n=1,s=0,o=t.length;n<o;n++)Ii(t[n],t[s])>e&&(i.push(t[n]),s=n);return s<o-1&&i.push(t[o-1]),i}function Oi(t,e,i,n,s){var o,a,r,h=n?wi:Ri(t,i),l=Ri(e,i);for(wi=l;;){if(!(h|l))return[t,e];if(h&l)return!1;r=Ri(a=Di(t,e,o=h||l,i,s),i),o===h?(t=a,h=r):(e=a,l=r)}}function Di(t,e,i,n,s){var o,a,r=e.x-t.x,h=e.y-t.y,l=n.min,u=n.max;return 8&i?(o=t.x+r*(u.y-t.y)/h,a=u.y):4&i?(o=t.x+r*(l.y-t.y)/h,a=l.y):2&i?(o=u.x,a=t.y+h*(u.x-t.x)/r):1&i&&(o=l.x,a=t.y+h*(l.x-t.x)/r),new O(o,a,s)}function Ri(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Ii(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function zi(t,e,i,n){var s,o=e.x,a=e.y,r=i.x-o,h=i.y-a,l=r*r+h*h;return l>0&&((s=((t.x-o)*r+(t.y-a)*h)/l)>1?(o=i.x,a=i.y):s>0&&(o+=r*s,a+=h*s)),r=t.x-o,h=t.y-a,n?r*r+h*h:new O(o,a)}function Gi(t){return!f(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ni(t){return Gi(t)}function ji(t,e){var i,n,s,o,a,r,h,l;if(!t||0===t.length)throw new Error("latlngs not passed");Gi(t)||(t=t[0]);var u=F([0,0]),c=N(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(u=bi(t));var p=t.length,d=[];for(i=0;i<p;i++){var _=F(t[i]);d.push(e.project(F([_.lat-u.lat,_.lng-u.lng])))}for(i=0,n=0;i<p-1;i++)n+=d[i].distanceTo(d[i+1])/2;if(0===n)l=d[0];else for(i=0,o=0;i<p-1;i++)if(a=d[i],r=d[i+1],(o+=s=a.distanceTo(r))>n){h=(o-n)/s,l=[r.x-h*(r.x-a.x),r.y-h*(r.y-a.y)];break}var m=e.unproject(R(l));return F([m.lat+u.lat,m.lng+u.lng])}var Fi={__proto__:null,simplify:ki,pointToSegmentDistance:Ei,closestPointOnSegment:Ci,clipSegment:Oi,_getEdgeIntersection:Di,_getBitCode:Ri,_sqClosestPointOnSegment:zi,isFlat:Gi,_flat:Ni,polylineCenter:ji},Ui={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new I([-180,-90],[180,90])},Zi={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),a=o*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),o/2);return n=-i*Math.log(Math.max(r,1e-10)),new O(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),a=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(a),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)e=o*Math.sin(r),e=Math.pow((1-e)/(1+e),o/2),r+=l=Math.PI/2-2*Math.atan(a*e)-r;return new j(r*i,t.x*i/n)}},qi={__proto__:null,LonLat:Ui,Mercator:Zi,SphericalMercator:V},Hi=i({},q,{code:"EPSG:3395",projection:Zi,transformation:function(){var t=.5/(Math.PI*Zi.R);return W(t,.5,-t,.5)}()}),Vi=i({},q,{code:"EPSG:4326",projection:Ui,transformation:W(1/180,1,-1/180,.5)}),Ki=i({},Z,{projection:Ui,transformation:W(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});Z.Earth=q,Z.EPSG3395=Hi,Z.EPSG3857=$,Z.EPSG900913=Y,Z.EPSG4326=Vi,Z.Simple=Ki;var Wi=B.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});oi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return a(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?f(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),e=void 0===s.maxZoom?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Xi=Wi.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return a(t)}}),$i=function(t,e){return new Xi(t,e)},Yi=Xi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Xi.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Xi.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new G;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ji=function(t,e){return new Yi(t,e)},Qi=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=R(n),o=R("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Nt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function tn(t){return new Qi(t)}var en=Qi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof en.imagePath&&(en.imagePath=this._detectIconPath()),(this.options.imagePath||en.imagePath)+Qi.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ge("div","leaflet-default-icon-path",document.body),e=me(t,"background-image")||me(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),nn=yi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Mi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Le(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=Te(e._icon),a=i.getPixelBounds(),r=i.getPixelOrigin(),h=z(a.min._subtract(r).add(s),a.max._subtract(r).subtract(s));if(!h.contains(o)){var l=R((Math.max(h.max.x,o.x)-h.max.x)/(a.max.x-h.max.x)-(Math.min(h.min.x,o.x)-h.min.x)/(a.min.x-h.min.x),(Math.max(h.max.y,o.y)-h.max.y)/(a.max.y-h.max.y)-(Math.min(h.min.y,o.y)-h.min.y)/(a.min.y-h.min.y)).multiplyBy(n);i.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),Se(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=P(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=P(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Te(e._icon),s=e._map.layerPointToLatLng(n);i&&Se(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),sn=Wi.extend({options:{icon:new en,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=F(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),Le(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&je(i,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(Le(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ue(this._icon,"focus",this._panOnFocus,this),fe(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&fe(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Se(this._icon,t),this._shadow&&Se(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(Le(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),nn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new nn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&Pe(this._icon,t),this._shadow&&Pe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?R(e.iconSize):R(0,0),n=e.iconAnchor?R(e.iconAnchor):R(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function on(t,e){return new sn(t,e)}var an=Wi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),rn=an.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=F(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=F(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return an.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new I(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function hn(t,e){return new rn(t,e)}var ln=rn.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),d(this,e),this._latlng=F(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new G(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:an.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===q.distance){var s=Math.PI/180,o=this._mRadius/q.R/s,a=i.project([e+o,t]),r=i.project([e-o,t]),h=a.add(r).divideBy(2),l=i.unproject(h).lat,u=Math.acos((Math.cos(o*s)-Math.sin(e*s)*Math.sin(l*s))/(Math.cos(e*s)*Math.cos(l*s)))/s;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*e)),this._point=h.subtract(i.getPixelOrigin()),this._radius=isNaN(u)?0:h.x-i.project([l,t-u]).x,this._radiusY=h.y-a.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}});function un(t,e,i){return new ln(t,e,i)}var cn=an.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,s=null,o=zi,a=0,r=this._parts.length;a<r;a++)for(var h=this._parts[a],l=1,u=h.length;l<u;l++){var c=o(t,e=h[l-1],i=h[l],!0);c<n&&(n=c,s=o(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ji(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=F(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new G,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Gi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Gi(t),n=0,s=t.length;n<s;n++)i?(e[n]=F(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new O(t,t);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,s,o=t[0]instanceof j,a=t.length;if(o){for(s=[],n=0;n<a;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,s,o,a,r,h=this._parts;for(e=0,n=0,s=this._rings.length;e<s;e++)for(i=0,o=(r=this._rings[e]).length;i<o-1;i++)(a=Oi(r[i],r[i+1],t,i,!0))&&(h[n]=h[n]||[],h[n].push(a[0]),a[1]===r[i+1]&&i!==o-2||(h[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=ki(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,s,o,a,r,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,s=(a=(r=this._parts[i]).length)-1;n<a;s=n++)if((e||0!==n)&&Ei(t,r[s],r[n])<=h)return!0;return!1}});function pn(t,e){return new cn(t,e)}cn._flat=Ni;var dn=cn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return xi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=cn.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){cn.prototype._setLatLngs.call(this,t),Gi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new O(e,e);if(t=new I(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=Li(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,s,o,a,r,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,r=this._parts.length;s<r;s++)for(o=0,a=(h=(e=this._parts[s]).length)-1;o<h;a=o++)i=e[o],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||cn.prototype._containsPoint.call(this,t,!0)}});function _n(t,e){return new dn(t,e)}var mn=Yi.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=f(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)((n=s[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=gn(t,o);return a?(a.feature=xn(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function gn(t,e){var i,n,s,o,a="Feature"===t.type?t.geometry:t,r=a?a.coordinates:null,h=[],l=e&&e.pointToLayer,u=e&&e.coordsToLatLng||yn;if(!r&&!a)return null;switch(a.type){case"Point":return fn(l,t,i=u(r),e);case"MultiPoint":for(s=0,o=r.length;s<o;s++)i=u(r[s]),h.push(fn(l,t,i,e));return new Yi(h);case"LineString":case"MultiLineString":return n=An(r,"LineString"===a.type?0:1,u),new cn(n,e);case"Polygon":case"MultiPolygon":return n=An(r,"Polygon"===a.type?1:2,u),new dn(n,e);case"GeometryCollection":for(s=0,o=a.geometries.length;s<o;s++){var c=gn({geometry:a.geometries[s],type:"Feature",properties:t.properties},e);c&&h.push(c)}return new Yi(h);case"FeatureCollection":for(s=0,o=a.features.length;s<o;s++){var p=gn(a.features[s],e);p&&h.push(p)}return new Yi(h);default:throw new Error("Invalid GeoJSON object.")}}function fn(t,e,i,n){return t?t(e,i):new sn(i,n&&n.markersInheritOptions&&n)}function yn(t){return new j(t[1],t[0],t[2])}function An(t,e,i){for(var n,s=[],o=0,a=t.length;o<a;o++)n=e?An(t[o],e-1,i):(i||yn)(t[o]),s.push(n);return s}function vn(t,e){return void 0!==(t=F(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Mn(t,e,i,n){for(var s=[],o=0,a=t.length;o<a;o++)s.push(e?Mn(t[o],Gi(t[o])?0:e-1,i,n):vn(t[o],n));return!e&&i&&s.length>0&&s.push(s[0].slice()),s}function Ln(t,e){return t.feature?i({},t.feature,{geometry:e}):xn(e)}function xn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var bn={toGeoJSON:function(t){return Ln(this,{type:"Point",coordinates:vn(this.getLatLng(),t)})}};function wn(t,e){return new mn(t,e)}sn.include(bn),ln.include(bn),rn.include(bn),cn.include({toGeoJSON:function(t){var e=!Gi(this._latlngs);return Ln(this,{type:(e?"Multi":"")+"LineString",coordinates:Mn(this._latlngs,e?1:0,!1,t)})}}),dn.include({toGeoJSON:function(t){var e=!Gi(this._latlngs),i=e&&!Gi(this._latlngs[0]),n=Mn(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ln(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Xi.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ln(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var s=e.toGeoJSON(t);if(i)n.push(s.geometry);else{var o=xn(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i?Ln(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Pn=wn,kn=Wi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=N(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Le(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){fe(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Ae(this._image),this},bringToBack:function(){return this._map&&ve(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ge("img");Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=s(this.fire,this,"load"),e.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ce(this._image,i,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Se(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),En=function(t,e,i){return new kn(t,e,i)},Cn=kn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ge("video");if(Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=s(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=i.length>0?n:[e.src]}else{f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var r=ge("source");r.src=this._url[a],e.appendChild(r)}}}});function Sn(t,e,i){return new Cn(t,e,i)}var Tn=kn.extend({_initImage:function(){var t=this._image=this._url;Le(t,"leaflet-image-layer"),this._zoomAnimated&&Le(t,"leaflet-zoom-animated"),this.options.className&&Le(t,this.options.className),t.onselectstart=l,t.onmousemove=l}});function Bn(t,e,i){return new Tn(t,e,i)}var On=Wi.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof j||f(t))?(this._latlng=F(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Pe(this._container,1),this.bringToFront(),this.options.interactive&&(Le(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Pe(this._container,0),this._removeTimeout=setTimeout(s(fe,void 0,this._container),200)):fe(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=F(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Ae(this._container),this},bringToBack:function(){return this._map&&ve(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Yi){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=R(this.options.offset),i=this._getAnchor();this._zoomAnimated?Se(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});oi.include({_initOverlay:function(t,e,i,n){var s=e;return s instanceof t||(s=new t(n).setContent(e)),i&&s.setLatLng(i),s}}),Wi.include({_initOverlay:function(t,e,i,n){var s=i;return s instanceof t?(d(s,n),s._source=this):(s=e&&!n?e:new t(n,this)).setContent(i),s}});var Dn=On.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,On.prototype.openOn.call(this,t)},onAdd:function(t){On.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof an||this._source.on("preclick",Ke))},onRemove:function(t){On.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof an||this._source.off("preclick",Ke))},getEvents:function(){var t=On.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=ge("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ge("div",t+"-content-wrapper",e);if(this._contentNode=ge("div",t+"-content",i),Xe(e),We(this._contentNode),je(e,"contextmenu",Ke),this._tipContainer=ge("div",t+"-tip-container",e),this._tip=ge("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ge("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',je(n,"click",function(t){$e(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",Le(t,o)):xe(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Se(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(me(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new O(this._containerLeft,-i-this._containerBottom);s._add(Te(this._container));var o=t.layerPointToContainerPoint(s),a=R(this.options.autoPanPadding),r=R(this.options.autoPanPaddingTopLeft||a),h=R(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;o.x+n+h.x>l.x&&(u=o.x+n-l.x+h.x),o.x-u-r.x<0&&(u=o.x-r.x),o.y+i+h.y>l.y&&(c=o.y+i-l.y+h.y),o.y-c-r.y<0&&(c=o.y-r.y),(u||c)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}},_getAnchor:function(){return R(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Rn=function(t,e){return new Dn(t,e)};oi.mergeOptions({closePopupOnClick:!0}),oi.include({openPopup:function(t,e,i){return this._initOverlay(Dn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Wi.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Dn,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Yi||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ye(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof an?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var In=On.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){On.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){On.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=On.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ge("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),a=n.layerPointToContainerPoint(t),r=this.options.direction,h=s.offsetWidth,l=s.offsetHeight,u=R(this.options.offset),c=this._getAnchor();"top"===r?(e=h/2,i=l):"bottom"===r?(e=h/2,i=0):"center"===r?(e=h/2,i=l/2):"right"===r?(e=0,i=l/2):"left"===r?(e=h,i=l/2):a.x<o.x?(r="right",e=0,i=l/2):(r="left",e=h+2*(u.x+c.x),i=l/2),t=t.subtract(R(e,i,!0)).add(u).add(c),xe(s,"leaflet-tooltip-right"),xe(s,"leaflet-tooltip-left"),xe(s,"leaflet-tooltip-top"),xe(s,"leaflet-tooltip-bottom"),Le(s,"leaflet-tooltip-"+r),Se(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return R(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zn=function(t,e){return new In(t,e)};oi.include({openTooltip:function(t,e,i){return this._initOverlay(In,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Wi.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(In,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Yi||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(je(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),je(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var Gn=Qi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(ye(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=R(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Nn(t){return new Gn(t)}Qi.Default=en;var jn=Wi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Nt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),fe(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ae(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof O?t:new O(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),s=0,o=i.length;s<o;s++)e=i[s].style.zIndex,i[s]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Nt.ielt9){Pe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);Pe(s.el,o),o<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=ge("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(fe(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=ge("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),l(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)fe(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var s=Math.floor(t/2),o=Math.floor(e/2),a=i-1,r=new O(+s,+o);r.z=+a;var h=this._tileCoordsToKey(r),l=this._tiles[h];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),a>n&&this._retainParent(s,o,a,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var a=new O(s,o);a.z=i+1;var r=this._tileCoordsToKey(a),h=this._tiles[r];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),i+1<n&&this._retainChildren(s,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var s=Math.round(e);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s);var o=this.options.updateWhenZooming&&s!==this._tileZoom;n&&!o||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Nt.any3d?Ce(t.el,s,n):Se(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new I(s.subtract(o),s.add(o))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),a=[],r=this.options.keepBuffer,h=new I(s.getBottomLeft().subtract([r,-r]),s.getTopRight().add([r,-r]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var u=this._tiles[l].coords;u.z===this._tileZoom&&h.contains(new O(u.x,u.y))||(this._tiles[l].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var c=s.min.y;c<=s.max.y;c++)for(var p=s.min.x;p<=s.max.x;p++){var d=new O(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var _=this._tiles[this._tileCoordsToKey(d)];_?_.current=!0:a.push(d)}}if(a.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i);return[e.unproject(n,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new G(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new O(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(fe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Le(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,Nt.ielt9&&this.options.opacity<1&&Pe(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&P(s(this._tileReady,this,t,null,o)),Se(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(Pe(i.el,0),k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(Le(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Nt.ielt9||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Fn(t){return new jn(t)}var Un=jn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Nt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return je(i,"load",s(this._tileOnLoad,this,e,i)),je(i,"error",s(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Nt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return g(this._url,i(e,this.options))},_tileOnLoad:function(t,e){Nt.ielt9?setTimeout(s(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=l,e.onerror=l,!e.complete)){e.src=A;var i=this._tiles[t].coords;fe(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",A),jn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==A))return jn.prototype._tileReady.call(this,t,e,i)}});function Zn(t,e){return new Un(t,e)}var qn=Un.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var s in e)s in this.options||(n[s]=e[s]);var o=(e=d(this,e)).detectRetina&&Nt.retina?2:1,a=this.getTileSize();n.width=a.x*o,n.height=a.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Un.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=z(i.project(e[0]),i.project(e[1])),s=n.min,o=n.max,a=(this._wmsVersion>=1.3&&this._crs===Vi?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),r=Un.prototype.getTileUrl.call(this,t);return r+_(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Hn(t,e){return new qn(t,e)}Un.WMS=qn,Zn.wms=Hn;var Vn=Wi.extend({options:{padding:.1},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Le(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),o=n.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));Nt.any3d?Ce(this._container,o,i):Se(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new I(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Kn=Vn.extend({options:{tolerance:0},getEvents:function(){var t=Vn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Vn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");je(t,"mousemove",this._onMouseMove,this),je(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),je(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,fe(this._container),Ue(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Nt.retina?2:1;Se(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Nt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Vn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),s=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;s.push(e)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||P(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,s,o,a=t._parts,r=a.length,h=this._ctx;if(r){for(h.beginPath(),i=0;i<r;i++){for(n=0,s=a[i].length;n<s;n++)o=a[i][n],h[n?"lineTo":"moveTo"](o.x,o.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,n,0,2*Math.PI,!1),1!==s&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(Le(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(s(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Wn(t){return Nt.canvas?new Kn(t):null}var Xn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),$n={_initContainer:function(){this._container=ge("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Vn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Xn("shape");Le(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Xn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;fe(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Xn("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=f(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Xn("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ae(t._container)},_bringToBack:function(t){ve(t._container)}},Yn=Nt.vml?Xn:J,Jn=Vn.extend({_initContainer:function(){this._container=Yn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){fe(this._container),Ue(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Vn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Se(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Yn("path");t.options.className&&Le(e,t.options.className),t.options.interactive&&Le(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){fe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ae(t._path)},_bringToBack:function(t){ve(t._path)}});function Qn(t){return Nt.svg||Nt.vml?new Jn(t):null}Nt.vml&&Jn.include($n),oi.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Wn(t)||Qn(t)}});var ts=dn.extend({initialize:function(t,e){dn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function es(t,e){return new ts(t,e)}Jn.create=Yn,Jn.pointsToPath=Q,mn.geometryToLayer=gn,mn.coordsToLatLng=yn,mn.coordsToLatLngs=An,mn.latLngToCoords=vn,mn.latLngsToCoords=Mn,mn.getFeature=Ln,mn.asFeature=xn,oi.mergeOptions({boxZoom:!0});var is=yi.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){je(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ue(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){fe(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),ae(),Oe(),this._startPoint=this._map.mouseEventToContainerPoint(t),je(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ge("div","leaflet-zoom-box",this._container),Le(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),i=e.getSize();Se(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(fe(this._box),xe(this._container,"leaflet-crosshair")),re(),De(),Ue(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var e=new G(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});oi.addInitHook("addHandler","boxZoom",is),oi.mergeOptions({doubleClickZoom:!0});var ns=yi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});oi.addInitHook("addHandler","doubleClickZoom",ns),oi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ss=yi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Mi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}Le(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=N(this._map.options.maxBounds);this._offsetLimit=z(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,a=Math.abs(s+i)<Math.abs(o+i)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,r=s.multiplyBy(a/o),h=r.distanceTo([0,0]),l=Math.min(i.inertiaMaxSpeed,h),u=r.multiplyBy(l/h),c=l/(i.inertiaDeceleration*a),p=u.multiplyBy(-c/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),P(function(){e.panBy(p,{duration:c,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});oi.addInitHook("addHandler","dragging",ss),oi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var os=yi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),je(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ue(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},s=this.keyCodes;for(e=0,i=s.left.length;e<i;e++)n[s.left[e]]=[-1*t,0];for(e=0,i=s.right.length;e<i;e++)n[s.right[e]]=[t,0];for(e=0,i=s.down.length;e<i;e++)n[s.down[e]]=[0,t];for(e=0,i=s.up.length;e<i;e++)n[s.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},s=this.keyCodes;for(e=0,i=s.zoomIn.length;e<i;e++)n[s.zoomIn[e]]=t;for(e=0,i=s.zoomOut.length;e<i;e++)n[s.zoomOut[e]]=-t},_addHooks:function(){je(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ue(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=R(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(R(e),n.options.maxBounds)),n.options.worldCopyJump){var s=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(s)}else n.panBy(e)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ye(t)}}});oi.addInitHook("addHandler","keyboard",os),oi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var as=yi.extend({addHooks:function(){je(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ue(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ei(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),n),Ye(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(s/i)*i:s,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});oi.addInitHook("addHandler","scrollWheelZoom",as);var rs=600;oi.mergeOptions({tapHold:Nt.touchNative&&Nt.safari&&Nt.mobile,tapTolerance:15});var hs=yi.extend({addHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ue(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new O(e.clientX,e.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(je(document,"touchend",$e),je(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),rs),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ue(document,"touchend",$e),Ue(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ue(document,"touchend touchcancel contextmenu",this._cancel,this),Ue(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});oi.addInitHook("addHandler","tapHold",hs),oi.mergeOptions({touchZoom:Nt.touch,bounceAtZoomLimits:!0});var ls=yi.extend({addHooks:function(){Le(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),Ue(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),je(document,"touchmove",this._onTouchMove,this),je(document,"touchend touchcancel",this._onTouchEnd,this),$e(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var r=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=P(r,this,!0),$e(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Ue(document,"touchmove",this._onTouchMove,this),Ue(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});oi.addInitHook("addHandler","touchZoom",ls),oi.BoxZoom=is,oi.DoubleClickZoom=ns,oi.Drag=ss,oi.Keyboard=os,oi.ScrollWheelZoom=as,oi.TapHold=hs,oi.TouchZoom=ls,t.Bounds=I,t.Browser=Nt,t.CRS=Z,t.Canvas=Kn,t.Circle=ln,t.CircleMarker=rn,t.Class=C,t.Control=ri,t.DivIcon=Gn,t.DivOverlay=On,t.DomEvent=ni,t.DomUtil=Ne,t.Draggable=Mi,t.Evented=B,t.FeatureGroup=Yi,t.GeoJSON=mn,t.GridLayer=jn,t.Handler=yi,t.Icon=Qi,t.ImageOverlay=kn,t.LatLng=j,t.LatLngBounds=G,t.Layer=Wi,t.LayerGroup=Xi,t.LineUtil=Fi,t.Map=oi,t.Marker=sn,t.Mixin=Ai,t.Path=an,t.Point=O,t.PolyUtil=Pi,t.Polygon=dn,t.Polyline=cn,t.Popup=Dn,t.PosAnimation=si,t.Projection=qi,t.Rectangle=ts,t.Renderer=Vn,t.SVG=Jn,t.SVGOverlay=Tn,t.TileLayer=Un,t.Tooltip=In,t.Transformation=K,t.Util=E,t.VideoOverlay=Cn,t.bind=s,t.bounds=z,t.canvas=Wn,t.circle=un,t.circleMarker=hn,t.control=hi,t.divIcon=Nn,t.extend=i,t.featureGroup=Ji,t.geoJSON=wn,t.geoJson=Pn,t.gridLayer=Fn,t.icon=tn,t.imageOverlay=En,t.latLng=F,t.latLngBounds=N,t.layerGroup=$i,t.map=ai,t.marker=on,t.point=R,t.polygon=_n,t.polyline=pn,t.popup=Rn,t.rectangle=es,t.setOptions=d,t.stamp=a,t.svg=Qn,t.svgOverlay=Bn,t.tileLayer=Zn,t.tooltip=zn,t.transformation=W,t.version=e,t.videoOverlay=Sn;var us=window.L;t.noConflict=function(){return window.L=us,this},window.L=t}(h.exports)),h.exports}var u,c=l();u=function(){const t=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(e,i,n,s,o){var a=i||new L.Point(0,0);if(!s)return i=a._round(),t.setTransform.apply(this,arguments);a=a.rotateFrom(s,o),e.style[L.DomUtil.TRANSFORM]="translate3d("+a.x+"px,"+a.y+"px,0)"+(n?" scale("+n+")":"")+" rotate("+s+"rad)"},setPosition:function(e,i,n,s,o){if(!n&&!o)return t.setPosition.apply(this,arguments);e._leaflet_pos=i,L.Browser.any3d?L.DomUtil.setTransform(e,i,o,n,s):(e.style.left=i.x+"px",e.style.top=i.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({}),L.extend(L.Point.prototype,{rotate:function(t){return this.rotateFrom(t,new L.Point(0,0))},rotateFrom:function(t,e){if(!t)return this;var i=Math.sin(t),n=Math.cos(t),s=e.x,o=e.y,a=this.x-s,r=this.y-o;return new L.Point(a*n-r*i+s,a*i+r*n+o)}});const e=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(e.getEvents.apply(this,arguments),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map&&(e._updatePosition.apply(this,arguments),this._map&&this._map._rotate&&this._zoomAnimated)){var t=this._getAnchor(),i=L.DomUtil.getPosition(this._container).subtract(t);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(i).add(t))}}});const i=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(t){if(i._animateZoom.apply(this,arguments),this._map&&this._map._rotate){var e=this._getAnchor(),n=L.DomUtil.getPosition(this._container).subtract(e);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(n).add(e))}},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress))if(this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new L.Point(this._containerLeft,-i-this._containerBottom);s._add(L.DomUtil.getPosition(this._container));var o=s._add(this._map._getMapPanePos()),a=L.point(this.options.autoPanPadding),r=L.point(this.options.autoPanPaddingTopLeft||a),h=L.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;o.x+n+h.x>l.x&&(u=o.x+n-l.x+h.x),o.x-u-r.x<0&&(u=o.x-r.x),o.y+i+h.y>l.y&&(c=o.y+i-l.y+h.y),o.y-c-r.y<0&&(c=o.y-r.y),(u||c)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}}});const n=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_animateZoom:function(t){if(!this._map._rotate)return n._animateZoom.apply(this,arguments);var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);e=this._map.rotatedPointToMapPanePoint(e),this._setPosition(e)},_updatePosition:function(){if(!this._map._rotate)return n._updatePosition.apply(this,arguments);var t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)}}),L.extend({},L.Icon.prototype),L.Icon.include({_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=L.point(n),o=L.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px",t.style[L.DomUtil.TRANSFORM+"Origin"]=o.x+"px "+o.y+"px 0px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")}});const s=L.extend({},L.Marker.prototype);var o;L.Marker.mergeOptions({rotation:0,rotateWithView:!1,scale:void 0});var a={_onDrag:function(t){var e=this._marker,i=e.options.rotation||e.options.rotateWithView,n=e._shadow,s=L.DomUtil.getPosition(e._icon);!i&&n&&L.DomUtil.setPosition(n,s),e._map._rotate&&(s=e._map.mapPanePointToRotatedPoint(s));var o=e._map.layerPointToLatLng(s);e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i?e.setLatLng(o):e.fire("move",t),e.fire("drag",t)},_onDragEnd:function(t){this._marker._map._rotate&&this._marker.update(),o._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents:function(){return L.extend(s.getEvents.apply(this,arguments),{rotate:this.update})},_initInteraction:function(){var t=s._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(o=o||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:a._onDrag.bind(this.dragging),_onDragEnd:a._onDragEnd.bind(this.dragging)}),this.dragging.enable()),t},_setPos:function(t){this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t));var e=this.options.rotation||0;this.options.rotateWithView&&(e+=this._map._bearing),this._icon&&L.DomUtil.setPosition(this._icon,t,e,t,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,t,e,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},setRotation:function(t){this.options.rotation=t,this.update()}});const r=L.extend({},L.GridLayer.prototype);L.GridLayer.include({getEvents:function(){var t=r.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.rotate=this._onRotate),t},_getTiledPixelBounds:function(t){return this._map._rotate?this._map._getNewPixelBounds(t,this._tileZoom):r._getTiledPixelBounds.apply(this,arguments)}});const h=L.extend({},L.Renderer.prototype);L.Renderer.include({getEvents:function(){return L.extend(h.getEvents.apply(this,arguments),{rotate:this._update})},onAdd:function(){h.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform:function(t,e){if(!this._map._rotate)return h._updateTransform.apply(this,arguments);var i=this._map.getZoomScale(e,this._zoom),n=this._map._latLngToNewLayerPoint(this._topLeft,e,t);L.DomUtil.setTransform(this._container,n,i)},_update:function(){if(!this._map._rotate)return h._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const l=L.extend({},L.Map.prototype);L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(t,e){e.rotate&&(this._rotate=!0,this._bearing=0),l.initialize.apply(this,arguments),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(t){return this._rotate?L.point(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):l.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint:function(t){return this._rotate?L.point(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):l.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint:function(t){return L.point(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(t){return L.point(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds:function(t){if(!this._rotate&&l.mapBoundsToContainerBounds)return l.mapBoundsToContainerBounds.apply(this,arguments);const e=this.getPixelOrigin(),i=this.layerPointToContainerPoint(this.project(t.getNorthWest())._subtract(e)),n=this.layerPointToContainerPoint(this.project(t.getNorthEast())._subtract(e)),s=this.layerPointToContainerPoint(this.project(t.getSouthWest())._subtract(e)),o=this.layerPointToContainerPoint(this.project(t.getSouthEast())._subtract(e));return L.bounds([L.point(Math.min(i.x,n.x,o.x,s.x),Math.min(i.y,n.y,o.y,s.y)),L.point(Math.max(i.x,n.x,o.x,s.x),Math.max(i.y,n.y,o.y,s.y))])},getBounds:function(){if(!this._rotate)return l.getBounds.apply(this,arguments);var t=this.getSize();return new L.LatLngBounds([this.containerPointToLatLng([0,0]),this.containerPointToLatLng([t.x,0]),this.containerPointToLatLng([t.x,t.y]),this.containerPointToLatLng([0,t.y])])},setBearing:function(t){if(L.Browser.any3d&&this._rotate){var e=L.Util.wrapNum(t,[0,360])*L.DomUtil.DEG_TO_RAD,i=this._getPixelCenter(),n=this._getRotatePanePos().rotateFrom(-this._bearing,i),s=n.rotateFrom(e,i);L.DomUtil.setPosition(this._rotatePane,n,e,i),this._pivot=i,this._bearing=e,this._rotatePanePos=s,this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},panInside(t,e){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return l.panInside.apply(this,arguments);e=e||{};const i=L.point(e.paddingTopLeft||e.padding||[0,0]),n=L.point(e.paddingBottomRight||e.padding||[0,0]),s=this._container.getBoundingClientRect(),o=this.latLngToContainerPoint(t),a=L.bounds([L.point(s),L.point(s).add(this.getSize())]),r=a.getCenter(),h=L.bounds([a.min.add(i),a.max.subtract(n)]),u=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;const t=o.subtract(h.getCenter()),i=h.extend(o).getSize().subtract(u);r.x+=t.x<0?-i.x:i.x,r.y+=t.y<0?-i.y:i.y,this.panTo(this.containerPointToLatLng(r),e),this._enforcingBounds=!1}return this},getBoundsZoom(t,e,i){if(!this._rotate||Math.abs(this._bearing).toFixed(1)<.1)return l.getBoundsZoom.apply(this,arguments);t=L.latLngBounds(t),i=L.point(i||[0,0]);let n=this.getZoom()||0;const s=this.getMinZoom(),o=this.getMaxZoom(),a=this.getSize().subtract(i),r=this.mapBoundsToContainerBounds(t).getSize(),h=this.options.zoomSnap,u=a.x/r.x,c=a.y/r.y,p=e?Math.max(u,c):Math.min(u,c);return n=this.getScaleZoom(p,n),h&&(n=Math.round(n/(h/100))*(h/100),n=e?Math.ceil(n/h)*h:Math.floor(n/h)*h),Math.max(s,Math.min(o,n))},_getCenterOffset:function(t){var e=l._getCenterOffset.apply(this,arguments);return this._rotate&&(e=e.rotate(this._bearing)),e},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(t,e){if(!this._rotate)return l._getNewPixelOrigin.apply(this,arguments);var i=this.getSize()._divideBy(2);return this.project(t,e).rotate(this._bearing)._subtract(i)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_getNewPixelBounds:function(t,e){if(t=t||this.getCenter(),e=e||this.getZoom(),!this._rotate&&l._getNewPixelBounds)return l._getNewPixelBounds.apply(this,arguments);var i=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),n=this.getZoomScale(i,e),s=this.project(t,e).floor(),o=this.getSize(),a=new L.Bounds([this.containerPointToLayerPoint([0,0]).floor(),this.containerPointToLayerPoint([o.x,0]).floor(),this.containerPointToLayerPoint([0,o.y]).floor(),this.containerPointToLayerPoint([o.x,o.y]).floor()]).getSize().divideBy(2*n);return new L.Bounds(s.subtract(a),s.add(a))},_getPixelCenter:function(){return!this._rotate&&l._getPixelCenter?l._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds:function(t){if(!this._rotate&&l._getPaddedPixelBounds)return l._getPaddedPixelBounds.apply(this,arguments);var e=t,i=this.getSize(),n=i.multiplyBy(-e),s=i.multiplyBy(1+e);return new L.Bounds([this.containerPointToLayerPoint([n.x,n.y]).floor(),this.containerPointToLayerPoint([n.x,s.y]).floor(),this.containerPointToLayerPoint([s.x,n.y]).floor(),this.containerPointToLayerPoint([s.x,s.y]).floor()])},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=t.coords.heading,s=new L.LatLng(e,i),o=s.toBounds(t.coords.accuracy),a=this._locateOptions;if(a.setView){var r=this.getBoundsZoom(o);this.setView(s,a.maxZoom?Math.min(r,a.maxZoom):r)}var h={latlng:s,bounds:o,timestamp:t.timestamp,heading:n};for(var l in t.coords)"number"==typeof t.coords[l]&&(h[l]=t.coords[l]);this.fire("locationfound",h)}}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(t){this._map=t,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks:function(){this._map._rotate&&this.__deviceOrientationEvent?L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this):this.disable()},removeHooks:function(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation:function(t){var e=t.webkitCompassHeading||t.alpha,i=0;!t.absolute&&t.webkitCompassHeading&&(e=360-e),t.absolute||void 0===window.orientation||(i=window.orientation),this._map.setBearing(e-i)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks:function(){this._observer.disconnect()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(t){this._map=t,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming&&!this._rotating){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.subtract(n);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),this.zoom?("center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(s.x/s.y),this._startBearing=e.getBearing(),s.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,e._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&(this._zooming||this._rotating)){var e,i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=n.subtract(s),a=n.distanceTo(s)/this._startDist;if(this._rotating){var r=(Math.atan(o.x/o.y)-this._startTheta)*L.DomUtil.RAD_TO_DEG;o.y<0&&(r+=180),r&&i.setBearing(this._startBearing-r)}if(this._zooming)if(this._zoom=i.getScaleZoom(a,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&a<1||this._zoom>i.getMaxZoom()&&a>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===a)return}else{if(e=n._add(s)._divideBy(2)._subtract(this._centerPoint),1===a&&0===e.x&&0===e.y)return;var h=-i.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=i.unproject(i.project(this._pinchStartLatLng).subtract(e.rotate(h)))}this._moved||(i._moveStart(!0,!1),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var l=i._move.bind(i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=L.Util.requestAnimFrame(l,this,!0),L.DomEvent.preventDefault(t)}},_onTouchEnd:function(){this._moved&&(this._zooming||this._rotating)?(this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))):this._zooming=!1}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(t){t.shiftKey?(t.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+5*Math.sign(t.deltaY))):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.addInitHook(function(){this.scrollWheelZoom.enabled()&&this.shiftKeyRotate.enabled()&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())}),L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(t){var e=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),i=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");i.style.backgroundImage="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")",i.style.cursor="grab",i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.backgroundRepeat="no-repeat",i.style.backgroundPosition="50%";var n=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",e);return n.appendChild(i),n.href="#",n.title="Rotate map",L.DomEvent.on(n,"dblclick",L.DomEvent.stopPropagation).on(n,"mousedown",this._handleMouseDown,this).on(n,"click",L.DomEvent.stop).on(n,"click",this._cycleState,this).on(n,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(n,"leaflet-disabled"),this._restyle(),t.on("rotate",this._restyle,this),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&0===t.getBearing()&&(e.style.display="none"),e},onRemove:function(t){t.off("rotate",this._restyle,this)},_handleMouseDown:function(t){L.DomEvent.stop(t),this.dragging=!0,this.dragstartX=t.pageX,this.dragstartY=t.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(t){L.DomEvent.stop(t),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(t){if(this.dragging){var e=t.clientX-this.dragstartX;this._map.setBearing(e)}},_cycleState:function(t){if(this._map){var e=this._map;e.touchRotate.enabled()||e.compassBearing.enabled()?e.compassBearing.enabled()?(e.compassBearing.disable(),e.setBearing(0),this.options.closeOnZeroBearing&&e.touchRotate.enable()):(e.touchRotate.disable(),(DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission():Promise.resolve("granted")).then(t=>"granted"===t&&e.compassBearing.enable())):e.touchRotate.enable(),this._restyle()}},_restyle:function(){if(this._map.options.rotate){var t=this._map,e=t.getBearing();this._arrow.style.transform="rotate("+e+"deg)",e&&this.options.closeOnZeroBearing&&(this._container.style.display="block"),t.compassBearing.enabled()?this._link.style.backgroundColor="orange":t.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",0===e&&this.options.closeOnZeroBearing&&(this._container.style.display="none"))}else L.DomUtil.addClass(this._link,"leaflet-disabled")}}),L.control.rotate=function(t){return new L.Control.Rotate(t)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook(function(){if(this.options.rotateControl){var t="object"==typeof this.options.rotateControl?this.options.rotateControl:{};this.rotateControl=L.control.rotate(t),this.addControl(this.rotateControl)}})},"function"==typeof define&&define.amd?define(u):u(),(()=>{var t,e,i=Object.create,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,h=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),c=(t,e,n)=>(n=null!=t?i(h(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let s of r(e))!l.call(t,s)&&s!==i&&o(t,s,{get:()=>e[s],enumerable:!(n=a(e,s))||n.enumerable});return t})(!e&&t&&t.__esModule?n:o(n,"default",{value:t,enumerable:!0}),t)),p=u((t,e)=>{e.exports=function(){this.__data__=[],this.size=0}}),d=u((t,e)=>{e.exports=function(t,e){return t===e||t!=t&&e!=e}}),_=u((t,e)=>{var i=d();e.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}}),m=u((t,e)=>{var i=_(),n=Array.prototype.splice;e.exports=function(t){var e=this.__data__,s=i(e,t);return!(s<0)&&(s==e.length-1?e.pop():n.call(e,s,1),--this.size,!0)}}),g=u((t,e)=>{var i=_();e.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}}),f=u((t,e)=>{var i=_();e.exports=function(t){return i(this.__data__,t)>-1}}),y=u((t,e)=>{var i=_();e.exports=function(t,e){var n=this.__data__,s=i(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}}),A=u((t,e)=>{var i=p(),n=m(),s=g(),o=f(),a=y();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),v=u((t,e)=>{var i=A();e.exports=function(){this.__data__=new i,this.size=0}}),M=u((t,e)=>{e.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}}),x=u((t,e)=>{e.exports=function(t){return this.__data__.get(t)}}),b=u((t,e)=>{e.exports=function(t){return this.__data__.has(t)}}),w=u((t,e)=>{var i="object"==typeof s&&s&&s.Object===Object&&s;e.exports=i}),P=u((t,e)=>{var i=w(),n="object"==typeof self&&self&&self.Object===Object&&self,s=i||n||Function("return this")();e.exports=s}),k=u((t,e)=>{var i=P().Symbol;e.exports=i}),E=u((t,e)=>{var i=k(),n=Object.prototype,s=n.hasOwnProperty,o=n.toString,a=i?i.toStringTag:void 0;e.exports=function(t){var e=s.call(t,a),i=t[a];try{t[a]=void 0;var n=!0}catch{}var r=o.call(t);return n&&(e?t[a]=i:delete t[a]),r}}),C=u((t,e)=>{var i=Object.prototype.toString;e.exports=function(t){return i.call(t)}}),S=u((t,e)=>{var i=k(),n=E(),s=C(),o=i?i.toStringTag:void 0;e.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):s(t)}}),T=u((t,e)=>{e.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}),B=u((t,e)=>{var i=S(),n=T();e.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}),O=u((t,e)=>{var i=P()["__core-js_shared__"];e.exports=i}),D=u((t,e)=>{var i,n=O(),s=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(t){return!!s&&s in t}}),R=u((t,e)=>{var i=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return i.call(t)}catch{}try{return t+""}catch{}}return""}}),I=u((t,e)=>{var i=B(),n=D(),s=T(),o=R(),a=/^\[object .+?Constructor\]$/,r=Function.prototype,h=Object.prototype,l=r.toString,u=h.hasOwnProperty,c=RegExp("^"+l.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!s(t)||n(t))&&(i(t)?c:a).test(o(t))}}),z=u((t,e)=>{e.exports=function(t,e){return null==t?void 0:t[e]}}),G=u((t,e)=>{var i=I(),n=z();e.exports=function(t,e){var s=n(t,e);return i(s)?s:void 0}}),N=u((t,e)=>{var i=G()(P(),"Map");e.exports=i}),j=u((t,e)=>{var i=G()(Object,"create");e.exports=i}),F=u((t,e)=>{var i=j();e.exports=function(){this.__data__=i?i(null):{},this.size=0}}),U=u((t,e)=>{e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}}),Z=u((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(i){var s=e[t];return"__lodash_hash_undefined__"===s?void 0:s}return n.call(e,t)?e[t]:void 0}}),q=u((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}}),H=u((t,e)=>{var i=j();e.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}}),V=u((t,e)=>{var i=F(),n=U(),s=Z(),o=q(),a=H();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),K=u((t,e)=>{var i=V(),n=A(),s=N();e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(s||n),string:new i}}}),W=u((t,e)=>{e.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}}),X=u((t,e)=>{var i=W();e.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}}),$=u((t,e)=>{var i=X();e.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}}),Y=u((t,e)=>{var i=X();e.exports=function(t){return i(this,t).get(t)}}),J=u((t,e)=>{var i=X();e.exports=function(t){return i(this,t).has(t)}}),Q=u((t,e)=>{var i=X();e.exports=function(t,e){var n=i(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}}),tt=u((t,e)=>{var i=K(),n=$(),s=Y(),o=J(),a=Q();function r(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}r.prototype.clear=i,r.prototype.delete=n,r.prototype.get=s,r.prototype.has=o,r.prototype.set=a,e.exports=r}),et=u((t,e)=>{var i=A(),n=N(),s=tt();e.exports=function(t,e){var o=this.__data__;if(o instanceof i){var a=o.__data__;if(!n||a.length<199)return a.push([t,e]),this.size=++o.size,this;o=this.__data__=new s(a)}return o.set(t,e),this.size=o.size,this}}),it=u((t,e)=>{var i=A(),n=v(),s=M(),o=x(),a=b(),r=et();function h(t){var e=this.__data__=new i(t);this.size=e.size}h.prototype.clear=n,h.prototype.delete=s,h.prototype.get=o,h.prototype.has=a,h.prototype.set=r,e.exports=h}),nt=u((t,e)=>{var i=G(),n=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch{}}();e.exports=n}),st=u((t,e)=>{var i=nt();e.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}}),ot=u((t,e)=>{var i=st(),n=d();e.exports=function(t,e,s){(void 0!==s&&!n(t[e],s)||void 0===s&&!(e in t))&&i(t,e,s)}}),at=u((t,e)=>{e.exports=function(t){return function(e,i,n){for(var s=-1,o=Object(e),a=n(e),r=a.length;r--;){var h=a[t?r:++s];if(!1===i(o[h],h,o))break}return e}}}),rt=u((t,e)=>{var i=at()();e.exports=i}),ht=u((t,e)=>{var i=P(),n="object"==typeof t&&t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n?i.Buffer:void 0,a=o?o.allocUnsafe:void 0;e.exports=function(t,e){if(e)return t.slice();var i=t.length,n=a?a(i):new t.constructor(i);return t.copy(n),n}}),lt=u((t,e)=>{var i=P().Uint8Array;e.exports=i}),ut=u((t,e)=>{var i=lt();e.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}}),ct=u((t,e)=>{var i=ut();e.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}}),pt=u((t,e)=>{e.exports=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}}),dt=u((t,e)=>{var i=T(),n=Object.create,s=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var s=new t;return t.prototype=void 0,s}}();e.exports=s}),_t=u((t,e)=>{e.exports=function(t,e){return function(i){return t(e(i))}}}),mt=u((t,e)=>{var i=_t()(Object.getPrototypeOf,Object);e.exports=i}),gt=u((t,e)=>{var i=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}}),ft=u((t,e)=>{var i=dt(),n=mt(),s=gt();e.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:i(n(t))}}),yt=u((t,e)=>{e.exports=function(t){return null!=t&&"object"==typeof t}}),At=u((t,e)=>{var i=S(),n=yt();e.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}}),vt=u((t,e)=>{var i=At(),n=yt(),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,r=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!a.call(t,"callee")};e.exports=r}),Mt=u((t,e)=>{var i=Array.isArray;e.exports=i}),Lt=u((t,e)=>{e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}),xt=u((t,e)=>{var i=B(),n=Lt();e.exports=function(t){return null!=t&&n(t.length)&&!i(t)}}),bt=u((t,e)=>{var i=xt(),n=yt();e.exports=function(t){return n(t)&&i(t)}}),wt=u((t,e)=>{e.exports=function(){return!1}}),Pt=u((t,e)=>{var i=P(),n=wt(),s="object"==typeof t&&t&&!t.nodeType&&t,o=s&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===s?i.Buffer:void 0,r=(a?a.isBuffer:void 0)||n;e.exports=r}),kt=u((t,e)=>{var i=S(),n=mt(),s=yt(),o=Function.prototype,a=Object.prototype,r=o.toString,h=a.hasOwnProperty,l=r.call(Object);e.exports=function(t){if(!s(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var o=h.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&r.call(o)==l}}),Et=u((t,e)=>{var i=S(),n=Lt(),s=yt(),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(t){return s(t)&&n(t.length)&&!!o[i(t)]}}),Ct=u((t,e)=>{e.exports=function(t){return function(e){return t(e)}}}),St=u((t,e)=>{var i=w(),n="object"==typeof t&&t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n&&i.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a}),Tt=u((t,e)=>{var i=Et(),n=Ct(),s=St(),o=s&&s.isTypedArray,a=o?n(o):i;e.exports=a}),Bt=u((t,e)=>{e.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}),Ot=u((t,e)=>{var i=st(),n=d(),s=Object.prototype.hasOwnProperty;e.exports=function(t,e,o){var a=t[e];(!s.call(t,e)||!n(a,o)||void 0===o&&!(e in t))&&i(t,e,o)}}),Dt=u((t,e)=>{var i=Ot(),n=st();e.exports=function(t,e,s,o){var a=!s;s||(s={});for(var r=-1,h=e.length;++r<h;){var l=e[r],u=o?o(s[l],t[l],l,s,t):void 0;void 0===u&&(u=t[l]),a?n(s,l,u):i(s,l,u)}return s}}),Rt=u((t,e)=>{e.exports=function(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}}),It=u((t,e)=>{var i=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}}),zt=u((t,e)=>{var i=Rt(),n=vt(),s=Mt(),o=Pt(),a=It(),r=Tt(),h=Object.prototype.hasOwnProperty;e.exports=function(t,e){var l=s(t),u=!l&&n(t),c=!l&&!u&&o(t),p=!l&&!u&&!c&&r(t),d=l||u||c||p,_=d?i(t.length,String):[],m=_.length;for(var g in t)(e||h.call(t,g))&&(!d||!("length"==g||c&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&_.push(g);return _}}),Gt=u((t,e)=>{e.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}}),Nt=u((t,e)=>{var i=T(),n=gt(),s=Gt(),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!i(t))return s(t);var e=n(t),a=[];for(var r in t)"constructor"==r&&(e||!o.call(t,r))||a.push(r);return a}}),jt=u((t,e)=>{var i=zt(),n=Nt(),s=xt();e.exports=function(t){return s(t)?i(t,!0):n(t)}}),Ft=u((t,e)=>{var i=Dt(),n=jt();e.exports=function(t){return i(t,n(t))}}),Ut=u((t,e)=>{var i=ot(),n=ht(),s=ct(),o=pt(),a=ft(),r=vt(),h=Mt(),l=bt(),u=Pt(),c=B(),p=T(),d=kt(),_=Tt(),m=Bt(),g=Ft();e.exports=function(t,e,f,y,A,v,M){var L=m(t,f),x=m(e,f),b=M.get(x);if(b)i(t,f,b);else{var w=v?v(L,x,f+"",t,e,M):void 0,P=void 0===w;if(P){var k=h(x),E=!k&&u(x),C=!k&&!E&&_(x);w=x,k||E||C?h(L)?w=L:l(L)?w=o(L):E?(P=!1,w=n(x,!0)):C?(P=!1,w=s(x,!0)):w=[]:d(x)||r(x)?(w=L,r(L)?w=g(L):(!p(L)||c(L))&&(w=a(x))):P=!1}P&&(M.set(x,w),A(w,x,y,v,M),M.delete(x)),i(t,f,w)}}}),Zt=u((t,e)=>{var i=it(),n=ot(),s=rt(),o=Ut(),a=T(),r=jt(),h=Bt();e.exports=function t(e,l,u,c,p){e!==l&&s(l,function(s,r){if(p||(p=new i),a(s))o(e,l,r,u,t,c,p);else{var d=c?c(h(e,r),s,r+"",e,l,p):void 0;void 0===d&&(d=s),n(e,r,d)}},r)}}),qt=u((t,e)=>{e.exports=function(t){return t}}),Ht=u((t,e)=>{e.exports=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}}),Vt=u((t,e)=>{var i=Ht(),n=Math.max;e.exports=function(t,e,s){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,r=n(o.length-e,0),h=Array(r);++a<r;)h[a]=o[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=o[a];return l[e]=s(h),i(t,this,l)}}}),Kt=u((t,e)=>{e.exports=function(t){return function(){return t}}}),Wt=u((t,e)=>{var i=Kt(),n=nt(),s=qt(),o=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:s;e.exports=o}),Xt=u((t,e)=>{var i=Date.now;e.exports=function(t){var e=0,n=0;return function(){var s=i(),o=16-(s-n);if(n=s,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}}),$t=u((t,e)=>{var i=Wt(),n=Xt()(i);e.exports=n}),Yt=u((t,e)=>{var i=qt(),n=Vt(),s=$t();e.exports=function(t,e){return s(n(t,e,i),t+"")}}),Jt=u((t,e)=>{var i=d(),n=xt(),s=It(),o=T();e.exports=function(t,e,a){if(!o(a))return!1;var r=typeof e;return!!("number"==r?n(a)&&s(e,a.length):"string"==r&&e in a)&&i(a[e],t)}}),Qt=u((t,e)=>{var i=Yt(),n=Jt();e.exports=function(t){return i(function(e,i){var s=-1,o=i.length,a=o>1?i[o-1]:void 0,r=o>2?i[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,r&&n(i[0],i[1],r)&&(a=o<3?void 0:a,o=1),e=Object(e);++s<o;){var h=i[s];h&&t(e,h,s,a)}return e})}}),te=u((t,e)=>{var i=Zt(),n=Qt()(function(t,e,n){i(t,e,n)});e.exports=n}),ee=u((t,e)=>{var i=S(),n=yt();e.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==i(t)}}),ie=u((t,e)=>{var i=Mt(),n=ee(),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(t,e){if(i(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!n(t))||(o.test(t)||!s.test(t)||null!=e&&t in Object(e))}}),ne=u((t,e)=>{var i=tt();function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var s=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=s.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return s.cache=o.set(n,a)||o,a};return s.cache=new(n.Cache||i),s}n.Cache=i,e.exports=n}),se=u((t,e)=>{var i=ne();e.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}}),oe=u((t,e)=>{var i=se(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n,function(t,i,n,o){e.push(n?o.replace(s,"$1"):i||t)}),e});e.exports=o}),ae=u((t,e)=>{e.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,s=Array(n);++i<n;)s[i]=e(t[i],i,t);return s}}),re=u((t,e)=>{var i=k(),n=ae(),s=Mt(),o=ee(),a=i?i.prototype:void 0,r=a?a.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(s(e))return n(e,t)+"";if(o(e))return r?r.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i}}),he=u((t,e)=>{var i=re();e.exports=function(t){return null==t?"":i(t)}}),le=u((t,e)=>{var i=Mt(),n=ie(),s=oe(),o=he();e.exports=function(t,e){return i(t)?t:n(t,e)?[t]:s(o(t))}}),ue=u((t,e)=>{var i=ee();e.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}}),ce=u((t,e)=>{var i=le(),n=ue();e.exports=function(t,e){for(var s=0,o=(e=i(e,t)).length;null!=t&&s<o;)t=t[n(e[s++])];return s&&s==o?t:void 0}}),pe=u((t,e)=>{var i=ce();e.exports=function(t,e,n){var s=null==t?void 0:i(t,e);return void 0===s?n:s}}),de=u((t,e)=>{var i,n;i=t,n=function(){function t(t,n,s,o,a){!function t(i,n,s,o,a){for(;o>s;){if(o-s>600){var r=o-s+1,h=n-s+1,l=Math.log(r),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(r-u)/r)*(h-r/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-h*u/r+c)),Math.min(o,Math.floor(n+(r-h)*u/r+c)),a)}var p=i[n],d=s,_=o;for(e(i,s,n),a(i[o],p)>0&&e(i,s,o);d<_;){for(e(i,d,_),d++,_--;a(i[d],p)<0;)d++;for(;a(i[_],p)>0;)_--}0===a(i[s],p)?e(i,s,_):e(i,++_,o),_<=n&&(s=_+1),n<=_&&(o=_-1)}}(t,n,s||0,o||t.length-1,a||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,s){s||(s=_(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var o=e;o<i;o++){var a=t.children[o];r(s,t.leaf?n(a):a)}return s}function r(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,i,n,s,o){for(var a=[i,n];a.length;)if(!((n=a.pop())-(i=a.pop())<=s)){var r=i+Math.ceil((n-i)/s/2)*s;t(e,r,i,n,o),a.push(i,r,r,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!d(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],r=e.leaf?n(a):a;d(t,r)&&(e.leaf?i.push(a):p(t,r)?this._all(a,i):s.push(a))}e=s.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!d(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var s=e.children[n],o=e.leaf?this.toBBox(s):s;if(d(t,o)){if(e.leaf||p(t,o))return!0;i.push(s)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=_([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,o,a=this.data,r=this.toBBox(t),h=[],l=[];a||h.length;){if(a||(a=h.pop(),n=h[h.length-1],i=l.pop(),o=!0),a.leaf){var u=s(t,a.children,e);if(-1!==u)return a.children.splice(u,1),h.push(a),this._condense(h),this}o||a.leaf||!p(a,r)?n?(i++,a=n.children[i],o=!1):a=null:(h.push(a),l.push(i),i=0,n=a,a=a.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var s,a=i-e+1,r=this._maxEntries;if(a<=r)return o(s=_(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(a)/Math.log(r)),r=Math.ceil(a/Math.pow(r,n-1))),(s=_([])).leaf=!1,s.height=n;var h=Math.ceil(a/r),l=h*Math.ceil(Math.sqrt(r));m(t,e,i,l,this.compareMinX);for(var u=e;u<=i;u+=l){var c=Math.min(u+l-1,i);m(t,u,c,h,this.compareMinY);for(var p=u;p<=c;p+=h){var d=Math.min(p+h-1,c);s.children.push(this._build(t,p,d,n-1))}}return o(s,this.toBBox),s},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var s=1/0,o=1/0,a=void 0,r=0;r<e.children.length;r++){var h=e.children[r],l=u(h),c=(p=t,d=h,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-l);c<o?(o=c,s=l<s?l:s,a=h):c===o&&l<s&&(s=l,a=h)}e=a||e.children[0]}var p,d;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),s=[],o=this._chooseSubtree(n,this.data,e,s);for(o.children.push(t),r(o,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var a=this._chooseSplitIndex(i,s,n),r=_(i.children.splice(a,i.children.length-a));r.height=i.height,r.leaf=i.leaf,o(i,this.toBBox),o(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(i,r)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,o,r,h,l,c,p=1/0,d=1/0,_=e;_<=i-e;_++){var m=a(t,0,_,this.toBBox),g=a(t,_,i,this.toBBox),f=(s=m,o=g,r=Math.max(s.minX,o.minX),h=Math.max(s.minY,o.minY),l=Math.min(s.maxX,o.maxX),c=Math.min(s.maxY,o.maxY),Math.max(0,l-r)*Math.max(0,c-h)),y=u(m)+u(g);f<p?(p=f,n=_,d=y<d?y:d):f===p&&y<d&&(d=y,n=_)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:h,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,o=a(t,0,e,s),h=a(t,i-e,i,s),l=c(o)+c(h),u=e;u<i-e;u++){var p=t.children[u];r(o,t.leaf?s(p):p),l+=c(o)}for(var d=i-e-1;d>=e;d--){var _=t.children[d];r(h,t.leaf?s(_):_),l+=c(h)}return l},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)r(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n},"object"==typeof t&&typeof e<"u"?e.exports=n():(i=i||self).RBush=n()}),_e=u(t=>{function e(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function i(t,i,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return e({type:"Point",coordinates:t},i,n)}function n(t,i,n){void 0===n&&(n={});for(var s=0,o=t;s<o.length;s++){var a=o[s];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var r=0;r<a[a.length-1].length;r++)if(a[a.length-1][r]!==a[0][r])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:t},i,n)}function s(t,i,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:t},i,n)}function o(t,e){void 0===e&&(e={});var i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function a(t,i,n){return void 0===n&&(n={}),e({type:"MultiLineString",coordinates:t},i,n)}function r(t,i,n){return void 0===n&&(n={}),e({type:"MultiPoint",coordinates:t},i,n)}function h(t,i,n){return void 0===n&&(n={}),e({type:"MultiPolygon",coordinates:t},i,n)}function l(e,i){void 0===i&&(i="kilometers");var n=t.factors[i];if(!n)throw new Error(i+" units is invalid");return e*n}function u(e,i){void 0===i&&(i="kilometers");var n=t.factors[i];if(!n)throw new Error(i+" units is invalid");return e/n}function c(t){return 180*(t%(2*Math.PI))/Math.PI}function p(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:1.0936*t.earthRadius},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1.0936133},t.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},t.feature=e,t.geometry=function(t,e,o){switch(t){case"Point":return i(e).geometry;case"LineString":return s(e).geometry;case"Polygon":return n(e).geometry;case"MultiPoint":return r(e).geometry;case"MultiLineString":return a(e).geometry;case"MultiPolygon":return h(e).geometry;default:throw new Error(t+" is invalid")}},t.point=i,t.points=function(t,e,n){return void 0===n&&(n={}),o(t.map(function(t){return i(t,e)}),n)},t.polygon=n,t.polygons=function(t,e,i){return void 0===i&&(i={}),o(t.map(function(t){return n(t,e)}),i)},t.lineString=s,t.lineStrings=function(t,e,i){return void 0===i&&(i={}),o(t.map(function(t){return s(t,e)}),i)},t.featureCollection=o,t.multiLineString=a,t.multiPoint=r,t.multiPolygon=h,t.geometryCollection=function(t,i,n){return void 0===n&&(n={}),e({type:"GeometryCollection",geometries:t},i,n)},t.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var i=Math.pow(10,e||0);return Math.round(t*i)/i},t.radiansToLength=l,t.lengthToRadians=u,t.lengthToDegrees=function(t,e){return c(u(t,e))},t.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},t.radiansToDegrees=c,t.degreesToRadians=function(t){return t%360*Math.PI/180},t.convertLength=function(t,e,i){if(void 0===e&&(e="kilometers"),void 0===i&&(i="kilometers"),!(t>=0))throw new Error("length must be a positive number");return l(u(t,e),i)},t.convertArea=function(e,i,n){if(void 0===i&&(i="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var s=t.areaFactors[i];if(!s)throw new Error("invalid original units");var o=t.areaFactors[n];if(!o)throw new Error("invalid final units");return e/s*o},t.isNumber=p,t.isObject=function(t){return!!t&&t.constructor===Object},t.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!p(t))throw new Error("bbox must only contain numbers")})},t.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}}),me=u(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=_e();function i(t,e,n){if(null!==t)for(var s,o,a,r,h,l,u,c,p=0,d=0,_=t.type,m="FeatureCollection"===_,g="Feature"===_,f=m?t.features.length:1,y=0;y<f;y++){h=(c=!!(u=m?t.features[y].geometry:g?t.geometry:t)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var A=0;A<h;A++){var v=0,M=0;if(null!==(r=c?u.geometries[A]:u)){l=r.coordinates;var L=r.type;switch(p=!n||"Polygon"!==L&&"MultiPolygon"!==L?0:1,L){case null:break;case"Point":if(!1===e(l,d,y,v,M))return!1;d++,v++;break;case"LineString":case"MultiPoint":for(s=0;s<l.length;s++){if(!1===e(l[s],d,y,v,M))return!1;d++,"MultiPoint"===L&&v++}"LineString"===L&&v++;break;case"Polygon":case"MultiLineString":for(s=0;s<l.length;s++){for(o=0;o<l[s].length-p;o++){if(!1===e(l[s][o],d,y,v,M))return!1;d++}"MultiLineString"===L&&v++,"Polygon"===L&&M++}"Polygon"===L&&v++;break;case"MultiPolygon":for(s=0;s<l.length;s++){for(M=0,o=0;o<l[s].length;o++){for(a=0;a<l[s][o].length-p;a++){if(!1===e(l[s][o][a],d,y,v,M))return!1;d++}M++}v++}break;case"GeometryCollection":for(s=0;s<r.geometries.length;s++)if(!1===i(r.geometries[s],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(t,e){var i;switch(t.type){case"FeatureCollection":for(i=0;i<t.features.length&&!1!==e(t.features[i].properties,i);i++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length&&!1!==e(t.features[i],i);i++);}function o(t,e){var i,n,s,o,a,r,h,l,u,c,p=0,d="FeatureCollection"===t.type,_="Feature"===t.type,m=d?t.features.length:1;for(i=0;i<m;i++){for(r=d?t.features[i].geometry:_?t.geometry:t,l=d?t.features[i].properties:_?t.properties:{},u=d?t.features[i].bbox:_?t.bbox:void 0,c=d?t.features[i].id:_?t.id:void 0,a=(h=!!r&&"GeometryCollection"===r.type)?r.geometries.length:1,s=0;s<a;s++)if(null!==(o=h?r.geometries[s]:r))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,l,u,c))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],p,l,u,c))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,l,u,c))return!1;p++}}function a(t,i){o(t,function(t,n,s,o,a){var r,h=null===t?null:t.type;switch(h){case null:case"Point":case"LineString":case"Polygon":return!1!==i(e.feature(t,s,{bbox:o,id:a}),n,0)&&void 0}switch(h){case"MultiPoint":r="Point";break;case"MultiLineString":r="LineString";break;case"MultiPolygon":r="Polygon"}for(var l=0;l<t.coordinates.length;l++){var u={type:r,coordinates:t.coordinates[l]};if(!1===i(e.feature(u,s),n,l))return!1}})}function r(t,n){a(t,function(t,s,o){var a=0;if(t.geometry){var r=t.geometry.type;if("Point"!==r&&"MultiPoint"!==r){var h,l=0,u=0,c=0;if(!1===i(t,function(i,r,p,d,_){if(void 0===h||s>l||d>u||_>c)return h=i,l=s,u=d,c=_,void(a=0);var m=e.lineString([h,i],t.properties);if(!1===n(m,s,o,_,a))return!1;a++,h=i}))return!1}}})}function h(t,i){if(!t)throw new Error("geojson is required");a(t,function(t,n,s){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===i(t,n,s,0,0))return!1;break;case"Polygon":for(var r=0;r<a.length;r++)if(!1===i(e.lineString(a[r],t.properties),n,s,r))return!1}}})}t.coordAll=function(t){var e=[];return i(t,function(t){e.push(t)}),e},t.coordEach=i,t.coordReduce=function(t,e,n,s){var o=n;return i(t,function(t,i,s,a,r){o=0===i&&void 0===n?t:e(o,t,i,s,a,r)},s),o},t.featureEach=s,t.featureReduce=function(t,e,i){var n=i;return s(t,function(t,s){n=0===s&&void 0===i?t:e(n,t,s)}),n},t.findPoint=function(t,i){if(i=i||{},!e.isObject(i))throw new Error("options is invalid");var n,s=i.featureIndex||0,o=i.multiFeatureIndex||0,a=i.geometryIndex||0,r=i.coordIndex||0,h=i.properties;switch(t.type){case"FeatureCollection":s<0&&(s=t.features.length+s),h=h||t.features[s].properties,n=t.features[s].geometry;break;case"Feature":h=h||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return e.point(l,h,i);case"MultiPoint":return o<0&&(o=l.length+o),e.point(l[o],h,i);case"LineString":return r<0&&(r=l.length+r),e.point(l[r],h,i);case"Polygon":return a<0&&(a=l.length+a),r<0&&(r=l[a].length+r),e.point(l[a][r],h,i);case"MultiLineString":return o<0&&(o=l.length+o),r<0&&(r=l[o].length+r),e.point(l[o][r],h,i);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),r<0&&(r=l[o][a].length-r),e.point(l[o][a][r],h,i)}throw new Error("geojson is invalid")},t.findSegment=function(t,i){if(i=i||{},!e.isObject(i))throw new Error("options is invalid");var n,s=i.featureIndex||0,o=i.multiFeatureIndex||0,a=i.geometryIndex||0,r=i.segmentIndex||0,h=i.properties;switch(t.type){case"FeatureCollection":s<0&&(s=t.features.length+s),h=h||t.features[s].properties,n=t.features[s].geometry;break;case"Feature":h=h||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return r<0&&(r=l.length+r-1),e.lineString([l[r],l[r+1]],h,i);case"Polygon":return a<0&&(a=l.length+a),r<0&&(r=l[a].length+r-1),e.lineString([l[a][r],l[a][r+1]],h,i);case"MultiLineString":return o<0&&(o=l.length+o),r<0&&(r=l[o].length+r-1),e.lineString([l[o][r],l[o][r+1]],h,i);case"MultiPolygon":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),r<0&&(r=l[o][a].length-r-1),e.lineString([l[o][a][r],l[o][a][r+1]],h,i)}throw new Error("geojson is invalid")},t.flattenEach=a,t.flattenReduce=function(t,e,i){var n=i;return a(t,function(t,s,o){n=0===s&&0===o&&void 0===i?t:e(n,t,s,o)}),n},t.geomEach=o,t.geomReduce=function(t,e,i){var n=i;return o(t,function(t,s,o,a,r){n=0===s&&void 0===i?t:e(n,t,s,o,a,r)}),n},t.lineEach=h,t.lineReduce=function(t,e,i){var n=i;return h(t,function(t,s,o,a){n=0===s&&void 0===i?t:e(n,t,s,o,a)}),n},t.propEach=n,t.propReduce=function(t,e,i){var s=i;return n(t,function(t,n){s=0===n&&void 0===i?t:e(s,t,n)}),s},t.segmentEach=r,t.segmentReduce=function(t,e,i){var n=i,s=!1;return r(t,function(t,o,a,r,h){n=!1===s&&void 0===i?t:e(n,t,o,a,r,h),s=!0}),n}}),ge=u(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=me();function i(t){var i=[1/0,1/0,-1/0,-1/0];return e.coordEach(t,function(t){i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]<t[0]&&(i[2]=t[0]),i[3]<t[1]&&(i[3]=t[1])}),i}i.default=i,t.default=i}),fe=u((t,e)=>{var i=de(),n=_e(),s=me(),o=ge().default,a=s.featureEach;s.coordEach,n.polygon;var r=n.featureCollection;function h(t){var e=new i(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),i.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)}):a(t,function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)}),i.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),i.prototype.remove.call(this,t,e)},e.clear=function(){return i.prototype.clear.call(this)},e.search=function(t){var e=i.prototype.search.call(this,this.toBBox(t));return r(e)},e.collides=function(t){return i.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=i.prototype.all.call(this);return r(t)},e.toJSON=function(){return i.prototype.toJSON.call(this)},e.fromJSON=function(t){return i.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=o(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=o(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}e.exports=h,e.exports.default=h});Array.prototype.findIndex=Array.prototype.findIndex||function(t){if(null===this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],s=0;s<i;s++)if(t.call(n,e[s],s,e))return s;return-1},Array.prototype.find=Array.prototype.find||function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],s=0;s<i;s++){var o=e[s];if(t.call(n,o,s,e))return o}},"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");t=Object(t);for(var e=1;e<arguments.length;e++){var i=arguments[e];if(null!=i)for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),n=i.length>>>0;if(0===n)return!1;var s=0|e,o=Math.max(s>=0?s:n-Math.abs(s),0);function a(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}for(;o<n;){if(a(i[o],t))return!0;o++}return!1}});var ye=c(te()),Ae={tooltips:{placeMarker:"Clique para colocar marcador",firstVertex:"Clique para colocar primeiro vértice",continueLine:"Clique para continuar a desenhar",finishLine:"Clique num marcador existente para terminar",finishPoly:"Clique no primeiro marcador para terminar",finishRect:"Clique para terminar",startCircle:"Clique para colocar o centro do círculo",finishCircle:"Clique para terminar o círculo",placeCircleMarker:"Clique para colocar marcador de círculo",placeText:"Clique para colocar texto"},actions:{finish:"Terminar",cancel:"Cancelar",removeLastVertex:"Remover Último Vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Polilinha",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Cortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices partilhados",rotateButton:"Rodar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Escalar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},ve={en:{tooltips:{placeMarker:"Click to place marker",firstVertex:"Click to place first vertex",continueLine:"Click to continue drawing",finishLine:"Click any existing marker to finish",finishPoly:"Click first marker to finish",finishRect:"Click to finish",startCircle:"Click to place circle center",finishCircle:"Click to finish circle",placeCircleMarker:"Click to place circle marker",placeText:"Click to place text",selectFirstLayerFor:"Select first layer for {action}",selectSecondLayerFor:"Select second layer for {action}"},actions:{finish:"Finish",cancel:"Cancel",removeLastVertex:"Remove Last Vertex"},buttonTitles:{drawMarkerButton:"Draw Marker",drawPolyButton:"Draw Polygons",drawLineButton:"Draw Polyline",drawCircleButton:"Draw Circle",drawRectButton:"Draw Rectangle",editButton:"Edit Layers",dragButton:"Drag Layers",cutButton:"Cut Layers",deleteButton:"Remove Layers",drawCircleMarkerButton:"Draw Circle Marker",snappingButton:"Snap dragged marker to other layers and vertices",pinningButton:"Pin shared vertices together",rotateButton:"Rotate Layers",drawTextButton:"Draw Text",scaleButton:"Scale Layers",autoTracingButton:"Auto trace Line",snapGuidesButton:"Show SnapGuides",unionButton:"Union layers",differenceButton:"Subtract layers"},measurements:{totalLength:"Length",segmentLength:"Segment length",area:"Area",radius:"Radius",perimeter:"Perimeter",height:"Height",width:"Width",coordinates:"Position",coordinatesMarker:"Position Marker"}},de:{tooltips:{placeMarker:"Platziere den Marker mit Klick",firstVertex:"Platziere den ersten Marker mit Klick",continueLine:"Klicke, um weiter zu zeichnen",finishLine:"Beende mit Klick auf existierenden Marker",finishPoly:"Beende mit Klick auf ersten Marker",finishRect:"Beende mit Klick",startCircle:"Platziere das Kreiszentrum mit Klick",finishCircle:"Beende den Kreis mit Klick",placeCircleMarker:"Platziere den Kreismarker mit Klick",placeText:"Platziere den Text mit Klick"},actions:{finish:"Beenden",cancel:"Abbrechen",removeLastVertex:"Letzten Vertex löschen"},buttonTitles:{drawMarkerButton:"Marker zeichnen",drawPolyButton:"Polygon zeichnen",drawLineButton:"Polyline zeichnen",drawCircleButton:"Kreis zeichnen",drawRectButton:"Rechteck zeichnen",editButton:"Layer editieren",dragButton:"Layer bewegen",cutButton:"Layer schneiden",deleteButton:"Layer löschen",drawCircleMarkerButton:"Kreismarker zeichnen",snappingButton:"Bewegter Layer an andere Layer oder Vertexe einhacken",pinningButton:"Vertexe an der gleichen Position verknüpfen",rotateButton:"Layer drehen",drawTextButton:"Text zeichnen",scaleButton:"Layer skalieren",autoTracingButton:"Linie automatisch nachzeichen"},measurements:{totalLength:"Länge",segmentLength:"Segment Länge",area:"Fläche",radius:"Radius",perimeter:"Umfang",height:"Höhe",width:"Breite",coordinates:"Position",coordinatesMarker:"Position Marker"}},it:{tooltips:{placeMarker:"Clicca per posizionare un Marker",firstVertex:"Clicca per posizionare il primo vertice",continueLine:"Clicca per continuare a disegnare",finishLine:"Clicca qualsiasi marker esistente per terminare",finishPoly:"Clicca il primo marker per terminare",finishRect:"Clicca per terminare",startCircle:"Clicca per posizionare il punto centrale del cerchio",finishCircle:"Clicca per terminare il cerchio",placeCircleMarker:"Clicca per posizionare un Marker del cherchio"},actions:{finish:"Termina",cancel:"Annulla",removeLastVertex:"Rimuovi l'ultimo vertice"},buttonTitles:{drawMarkerButton:"Disegna Marker",drawPolyButton:"Disegna Poligoni",drawLineButton:"Disegna Polilinea",drawCircleButton:"Disegna Cerchio",drawRectButton:"Disegna Rettangolo",editButton:"Modifica Livelli",dragButton:"Sposta Livelli",cutButton:"Ritaglia Livelli",deleteButton:"Elimina Livelli",drawCircleMarkerButton:"Disegna Marker del Cerchio",snappingButton:"Snap ha trascinato il pennarello su altri strati e vertici",pinningButton:"Pin condiviso vertici insieme",rotateButton:"Ruota livello"}},id:{tooltips:{placeMarker:"Klik untuk menempatkan marker",firstVertex:"Klik untuk menempatkan vertex pertama",continueLine:"Klik untuk meneruskan digitasi",finishLine:"Klik pada sembarang marker yang ada untuk mengakhiri",finishPoly:"Klik marker pertama untuk mengakhiri",finishRect:"Klik untuk mengakhiri",startCircle:"Klik untuk menempatkan titik pusat lingkaran",finishCircle:"Klik untuk mengakhiri lingkaran",placeCircleMarker:"Klik untuk menempatkan penanda lingkarann"},actions:{finish:"Selesai",cancel:"Batal",removeLastVertex:"Hilangkan Vertex Terakhir"},buttonTitles:{drawMarkerButton:"Digitasi Marker",drawPolyButton:"Digitasi Polygon",drawLineButton:"Digitasi Polyline",drawCircleButton:"Digitasi Lingkaran",drawRectButton:"Digitasi Segi Empat",editButton:"Edit Layer",dragButton:"Geser Layer",cutButton:"Potong Layer",deleteButton:"Hilangkan Layer",drawCircleMarkerButton:"Digitasi Penanda Lingkaran",snappingButton:"Jepretkan penanda yang ditarik ke lapisan dan simpul lain",pinningButton:"Sematkan simpul bersama bersama",rotateButton:"Putar lapisan"}},ro:{tooltips:{placeMarker:"Adaugă un punct",firstVertex:"Apasă aici pentru a adăuga primul Vertex",continueLine:"Apasă aici pentru a continua desenul",finishLine:"Apasă pe orice obiect pentru a finisa desenul",finishPoly:"Apasă pe primul obiect pentru a finisa",finishRect:"Apasă pentru a finisa",startCircle:"Apasă pentru a desena un cerc",finishCircle:"Apasă pentru a finisa un cerc",placeCircleMarker:"Adaugă un punct"},actions:{finish:"Termină",cancel:"Anulează",removeLastVertex:"Șterge ultimul Vertex"},buttonTitles:{drawMarkerButton:"Adaugă o bulină",drawPolyButton:"Desenează un poligon",drawLineButton:"Desenează o linie",drawCircleButton:"Desenează un cerc",drawRectButton:"Desenează un dreptunghi",editButton:"Editează straturile",dragButton:"Mută straturile",cutButton:"Taie straturile",deleteButton:"Șterge straturile",drawCircleMarkerButton:"Desenează marcatorul cercului",snappingButton:"Fixați marcatorul glisat pe alte straturi și vârfuri",pinningButton:"Fixați vârfurile partajate împreună",rotateButton:"Rotiți stratul"}},ru:{tooltips:{placeMarker:"Нажмите, чтобы нанести маркер",firstVertex:"Нажмите, чтобы нанести первый объект",continueLine:"Нажмите, чтобы продолжить рисование",finishLine:"Нажмите любой существующий маркер для завершения",finishPoly:"Выберите первую точку, чтобы закончить",finishRect:"Нажмите, чтобы закончить",startCircle:"Нажмите, чтобы добавить центр круга",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Нажмите, чтобы нанести круговой маркер"},actions:{finish:"Завершить",cancel:"Отменить",removeLastVertex:"Отменить последнее действие"},buttonTitles:{drawMarkerButton:"Добавить маркер",drawPolyButton:"Рисовать полигон",drawLineButton:"Рисовать кривую",drawCircleButton:"Рисовать круг",drawRectButton:"Рисовать прямоугольник",editButton:"Редактировать слой",dragButton:"Перенести слой",cutButton:"Вырезать слой",deleteButton:"Удалить слой",drawCircleMarkerButton:"Добавить круговой маркер",snappingButton:"Привязать перетаскиваемый маркер к другим слоям и вершинам",pinningButton:"Связать общие точки вместе",rotateButton:"Поворот слоя"}},es:{tooltips:{placeMarker:"Presiona para colocar un marcador",firstVertex:"Presiona para colocar el primer vértice",continueLine:"Presiona para continuar dibujando",finishLine:"Presiona cualquier marcador existente para finalizar",finishPoly:"Presiona el primer marcador para finalizar",finishRect:"Presiona para finalizar",startCircle:"Presiona para colocar el centro del círculo",finishCircle:"Presiona para finalizar el círculo",placeCircleMarker:"Presiona para colocar un marcador de círculo"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Eliminar último vértice"},buttonTitles:{drawMarkerButton:"Dibujar Marcador",drawPolyButton:"Dibujar Polígono",drawLineButton:"Dibujar Línea",drawCircleButton:"Dibujar Círculo",drawRectButton:"Dibujar Rectángulo",editButton:"Editar Capas",dragButton:"Arrastrar Capas",cutButton:"Cortar Capas",deleteButton:"Eliminar Capas",drawCircleMarkerButton:"Dibujar Marcador de Círculo",snappingButton:"El marcador de Snap arrastrado a otras capas y vértices",pinningButton:"Fijar juntos los vértices compartidos",rotateButton:"Rotar capa"}},nl:{tooltips:{placeMarker:"Klik om een marker te plaatsen",firstVertex:"Klik om het eerste punt te plaatsen",continueLine:"Klik om te blijven tekenen",finishLine:"Klik op een bestaand punt om te beëindigen",finishPoly:"Klik op het eerst punt om te beëindigen",finishRect:"Klik om te beëindigen",startCircle:"Klik om het middelpunt te plaatsen",finishCircle:"Klik om de cirkel te beëindigen",placeCircleMarker:"Klik om een marker te plaatsen"},actions:{finish:"Bewaar",cancel:"Annuleer",removeLastVertex:"Verwijder laatste punt"},buttonTitles:{drawMarkerButton:"Plaats Marker",drawPolyButton:"Teken een vlak",drawLineButton:"Teken een lijn",drawCircleButton:"Teken een cirkel",drawRectButton:"Teken een vierkant",editButton:"Bewerk",dragButton:"Verplaats",cutButton:"Knip",deleteButton:"Verwijder",drawCircleMarkerButton:"Plaats Marker",snappingButton:"Snap gesleepte marker naar andere lagen en hoekpunten",pinningButton:"Speld gedeelde hoekpunten samen",rotateButton:"Laag roteren"}},fr:{tooltips:{placeMarker:"Cliquez pour placer un marqueur",firstVertex:"Cliquez pour placer le premier sommet",continueLine:"Cliquez pour continuer à dessiner",finishLine:"Cliquez sur n'importe quel marqueur pour terminer",finishPoly:"Cliquez sur le premier marqueur pour terminer",finishRect:"Cliquez pour terminer",startCircle:"Cliquez pour placer le centre du cercle",finishCircle:"Cliquez pour finir le cercle",placeCircleMarker:"Cliquez pour placer le marqueur circulaire"},actions:{finish:"Terminer",cancel:"Annuler",removeLastVertex:"Retirer le dernier sommet"},buttonTitles:{drawMarkerButton:"Placer des marqueurs",drawPolyButton:"Dessiner des polygones",drawLineButton:"Dessiner des polylignes",drawCircleButton:"Dessiner un cercle",drawRectButton:"Dessiner un rectangle",editButton:"Éditer des calques",dragButton:"Déplacer des calques",cutButton:"Couper des calques",deleteButton:"Supprimer des calques",drawCircleMarkerButton:"Dessiner un marqueur circulaire",snappingButton:"Glisser le marqueur vers d'autres couches et sommets",pinningButton:"Épingler ensemble les sommets partagés",rotateButton:"Tourner des calques"}},pt:Ae,pt_br:{tooltips:{placeMarker:"Clique para posicionar o marcador",firstVertex:"Clique para posicionar o primeiro vértice",continueLine:"Clique para continuar desenhando",finishLine:"Clique em qualquer marcador existente para finalizar",finishPoly:"Clique no primeiro marcador para finalizar",finishRect:"Clique para finalizar",startCircle:"Clique para posicionar o centro do círculo",finishCircle:"Clique para finalizar o círculo",placeCircleMarker:"Clique para posicionar o marcador circular",placeText:"Clique para inserir texto"},actions:{finish:"Finalizar",cancel:"Cancelar",removeLastVertex:"Remover último vértice"},buttonTitles:{drawMarkerButton:"Desenhar Marcador",drawPolyButton:"Desenhar Polígonos",drawLineButton:"Desenhar Linha Poligonal",drawCircleButton:"Desenhar Círculo",drawRectButton:"Desenhar Retângulo",editButton:"Editar Camadas",dragButton:"Arrastar Camadas",cutButton:"Recortar Camadas",deleteButton:"Remover Camadas",drawCircleMarkerButton:"Desenhar Marcador de Círculo",snappingButton:"Ajustar marcador arrastado a outras camadas e vértices",pinningButton:"Unir vértices compartilhados",rotateButton:"Rotacionar Camadas",drawTextButton:"Desenhar Texto",scaleButton:"Redimensionar Camadas",autoTracingButton:"Traçado Automático de Linha"},measurements:{totalLength:"Comprimento",segmentLength:"Comprimento do Segmento",area:"Área",radius:"Raio",perimeter:"Perímetro",height:"Altura",width:"Largura",coordinates:"Posição",coordinatesMarker:"Marcador de Posição"}},pt_pt:Ae,zh:{tooltips:{placeMarker:"单击放置标记",firstVertex:"单击放置首个顶点",continueLine:"单击继续绘制",finishLine:"单击任何存在的标记以完成",finishPoly:"单击第一个标记以完成",finishRect:"单击完成",startCircle:"单击放置圆心",finishCircle:"单击完成圆形",placeCircleMarker:"点击放置圆形标记"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最后的顶点"},buttonTitles:{drawMarkerButton:"绘制标记",drawPolyButton:"绘制多边形",drawLineButton:"绘制线段",drawCircleButton:"绘制圆形",drawRectButton:"绘制长方形",editButton:"编辑图层",dragButton:"拖拽图层",cutButton:"剪切图层",deleteButton:"删除图层",drawCircleMarkerButton:"画圆圈标记",snappingButton:"将拖动的标记捕捉到其他图层和顶点",pinningButton:"将共享顶点固定在一起",rotateButton:"旋转图层"}},zh_tw:{tooltips:{placeMarker:"單擊放置標記",firstVertex:"單擊放置第一個頂點",continueLine:"單擊繼續繪製",finishLine:"單擊任何存在的標記以完成",finishPoly:"單擊第一個標記以完成",finishRect:"單擊完成",startCircle:"單擊放置圓心",finishCircle:"單擊完成圓形",placeCircleMarker:"點擊放置圓形標記"},actions:{finish:"完成",cancel:"取消",removeLastVertex:"移除最後一個頂點"},buttonTitles:{drawMarkerButton:"放置標記",drawPolyButton:"繪製多邊形",drawLineButton:"繪製線段",drawCircleButton:"繪製圓形",drawRectButton:"繪製方形",editButton:"編輯圖形",dragButton:"移動圖形",cutButton:"裁切圖形",deleteButton:"刪除圖形",drawCircleMarkerButton:"畫圓圈標記",snappingButton:"將拖動的標記對齊到其他圖層和頂點",pinningButton:"將共享頂點固定在一起",rotateButton:"旋轉圖形"}},pl:{tooltips:{placeMarker:"Kliknij, aby umieścić znacznik",firstVertex:"Kliknij, aby umieścić pierwszy wierzchołek",continueLine:"Kliknij, aby kontynuować rysowanie",finishLine:"Kliknij dowolny istniejący znacznik, aby zakończyć",finishPoly:"Kliknij pierwszy znacznik, aby zakończyć",finishRect:"Kliknij, aby zakończyć",startCircle:"Kliknij, aby umieścić środek okręgu",finishCircle:"Kliknij, aby zakończyć okrąg",placeCircleMarker:"Kliknij, aby umieścić znacznik okręgu",placeText:"Kliknij, aby umieścić tekst"},actions:{finish:"Zakończ",cancel:"Anuluj",removeLastVertex:"Usuń ostatni wierzchołek"},buttonTitles:{drawMarkerButton:"Rysuj znacznik",drawPolyButton:"Rysuj wielokąt",drawLineButton:"Rysuj linię",drawCircleButton:"Rysuj okrąg",drawRectButton:"Rysuj prostokąt",editButton:"Edytuj warstwy",dragButton:"Przeciągnij warstwy",cutButton:"Wytnij warstwy",deleteButton:"Usuń warstwy",drawCircleMarkerButton:"Rysuj znacznik okrągły",snappingButton:"Przyciągnij przenoszony znacznik do innych warstw i wierzchołków",pinningButton:"Przypnij wspólne wierzchołki razem",rotateButton:"Obróć warstwy",drawTextButton:"Rysuj tekst",scaleButton:"Skaluj warstwy",autoTracingButton:"Automatyczne śledzenie linii"},measurements:{totalLength:"Długość",segmentLength:"Długość odcinka",area:"Obszar",radius:"Promień",perimeter:"Obwód",height:"Wysokość",width:"Szerokość",coordinates:"Pozycja",coordinatesMarker:"Znacznik pozycji"}},sv:{tooltips:{placeMarker:"Klicka för att placera markör",firstVertex:"Klicka för att placera första hörnet",continueLine:"Klicka för att fortsätta rita",finishLine:"Klicka på en existerande punkt för att slutföra",finishPoly:"Klicka på den första punkten för att slutföra",finishRect:"Klicka för att slutföra",startCircle:"Klicka för att placera cirkelns centrum",finishCircle:"Klicka för att slutföra cirkeln",placeCircleMarker:"Klicka för att placera cirkelmarkör"},actions:{finish:"Slutför",cancel:"Avbryt",removeLastVertex:"Ta bort sista hörnet"},buttonTitles:{drawMarkerButton:"Rita Markör",drawPolyButton:"Rita Polygoner",drawLineButton:"Rita Linje",drawCircleButton:"Rita Cirkel",drawRectButton:"Rita Rektangel",editButton:"Redigera Lager",dragButton:"Dra Lager",cutButton:"Klipp i Lager",deleteButton:"Ta bort Lager",drawCircleMarkerButton:"Rita Cirkelmarkör",snappingButton:"Snäpp dra markören till andra lager och hörn",pinningButton:"Fäst delade hörn tillsammans",rotateButton:"Rotera lagret"}},el:{tooltips:{placeMarker:"Κάντε κλικ για να τοποθετήσετε Δείκτη",firstVertex:"Κάντε κλικ για να τοποθετήσετε το πρώτο σημείο",continueLine:"Κάντε κλικ για να συνεχίσετε να σχεδιάζετε",finishLine:"Κάντε κλικ σε οποιονδήποτε υπάρχον σημείο για να ολοκληρωθεί",finishPoly:"Κάντε κλικ στο πρώτο σημείο για να τελειώσετε",finishRect:"Κάντε κλικ για να τελειώσετε",startCircle:"Κάντε κλικ για να τοποθετήσετε κέντρο Κύκλου",finishCircle:"Κάντε κλικ για να ολοκληρώσετε τον Κύκλο",placeCircleMarker:"Κάντε κλικ για να τοποθετήσετε Κυκλικό Δείκτη"},actions:{finish:"Τέλος",cancel:"Ακύρωση",removeLastVertex:"Κατάργηση τελευταίου σημείου"},buttonTitles:{drawMarkerButton:"Σχεδίαση Δείκτη",drawPolyButton:"Σχεδίαση Πολυγώνου",drawLineButton:"Σχεδίαση Γραμμής",drawCircleButton:"Σχεδίαση Κύκλου",drawRectButton:"Σχεδίαση Ορθογωνίου",editButton:"Επεξεργασία Επιπέδων",dragButton:"Μεταφορά Επιπέδων",cutButton:"Αποκοπή Επιπέδων",deleteButton:"Κατάργηση Επιπέδων",drawCircleMarkerButton:"Σχεδίαση Κυκλικού Δείκτη",snappingButton:"Προσκόλληση του Δείκτη μεταφοράς σε άλλα Επίπεδα και Κορυφές",pinningButton:"Περικοπή κοινών κορυφών μαζί",rotateButton:"Περιστρέψτε το στρώμα"}},hu:{tooltips:{placeMarker:"Kattintson a jelölő elhelyezéséhez",firstVertex:"Kattintson az első pont elhelyezéséhez",continueLine:"Kattintson a következő pont elhelyezéséhez",finishLine:"A befejezéshez kattintson egy meglévő pontra",finishPoly:"A befejezéshez kattintson az első pontra",finishRect:"Kattintson a befejezéshez",startCircle:"Kattintson a kör középpontjának elhelyezéséhez",finishCircle:"Kattintson a kör befejezéséhez",placeCircleMarker:"Kattintson a körjelölő elhelyezéséhez"},actions:{finish:"Befejezés",cancel:"Mégse",removeLastVertex:"Utolsó pont eltávolítása"},buttonTitles:{drawMarkerButton:"Jelölő rajzolása",drawPolyButton:"Poligon rajzolása",drawLineButton:"Vonal rajzolása",drawCircleButton:"Kör rajzolása",drawRectButton:"Négyzet rajzolása",editButton:"Elemek szerkesztése",dragButton:"Elemek mozgatása",cutButton:"Elemek vágása",deleteButton:"Elemek törlése",drawCircleMarkerButton:"Kör jelölő rajzolása",snappingButton:"Kapcsolja a jelöltőt másik elemhez vagy ponthoz",pinningButton:"Közös pontok összekötése",rotateButton:"Fólia elforgatása"}},da:{tooltips:{placeMarker:"Tryk for at placere en markør",firstVertex:"Tryk for at placere det første punkt",continueLine:"Tryk for at fortsætte linjen",finishLine:"Tryk på et eksisterende punkt for at afslutte",finishPoly:"Tryk på det første punkt for at afslutte",finishRect:"Tryk for at afslutte",startCircle:"Tryk for at placere cirklens center",finishCircle:"Tryk for at afslutte cirklen",placeCircleMarker:"Tryk for at placere en cirkelmarkør"},actions:{finish:"Afslut",cancel:"Afbryd",removeLastVertex:"Fjern sidste punkt"},buttonTitles:{drawMarkerButton:"Placer markør",drawPolyButton:"Tegn polygon",drawLineButton:"Tegn linje",drawCircleButton:"Tegn cirkel",drawRectButton:"Tegn firkant",editButton:"Rediger",dragButton:"Træk",cutButton:"Klip",deleteButton:"Fjern",drawCircleMarkerButton:"Tegn cirkelmarkør",snappingButton:"Fastgør trukket markør til andre elementer",pinningButton:"Sammenlæg delte elementer",rotateButton:"Roter laget"}},no:{tooltips:{placeMarker:"Klikk for å plassere punkt",firstVertex:"Klikk for å plassere første punkt",continueLine:"Klikk for å tegne videre",finishLine:"Klikk på et eksisterende punkt for å fullføre",finishPoly:"Klikk første punkt for å fullføre",finishRect:"Klikk for å fullføre",startCircle:"Klikk for å sette sirkel midtpunkt",finishCircle:"Klikk for å fullføre sirkel",placeCircleMarker:"Klikk for å plassere sirkel",placeText:"Klikk for å plassere tekst"},actions:{finish:"Fullfør",cancel:"Kanseller",removeLastVertex:"Fjern forrige punkt"},buttonTitles:{drawMarkerButton:"Tegn punkt",drawPolyButton:"Tegn flate",drawLineButton:"Tegn linje",drawCircleButton:"Tegn sirkel",drawRectButton:"Tegn rektangel",editButton:"Rediger objekter",dragButton:"Dra objekter",cutButton:"Kutt objekter",deleteButton:"Fjern objekter",drawCircleMarkerButton:"Tegn sirkel-punkt",snappingButton:"Fest dratt punkt til andre objekter og punkt",pinningButton:"Pin delte punkter sammen",rotateButton:"Rotér objekter",drawTextButton:"Tegn tekst",scaleButton:"Skalér objekter",autoTracingButton:"Automatisk sporing av linje"},measurements:{totalLength:"Lengde",segmentLength:"Segmentlengde",area:"Område",radius:"Radius",perimeter:"Omriss",height:"Høyde",width:"Bredde",coordinates:"Posisjon",coordinatesMarker:"Posisjonsmarkør"}},fa:{tooltips:{placeMarker:"کلیک برای جانمایی نشان",firstVertex:"کلیک برای رسم اولین رأس",continueLine:"کلیک برای ادامه رسم",finishLine:"کلیک روی هر نشان موجود برای پایان",finishPoly:"کلیک روی اولین نشان برای پایان",finishRect:"کلیک برای پایان",startCircle:"کلیک برای رسم مرکز دایره",finishCircle:"کلیک برای پایان رسم دایره",placeCircleMarker:"کلیک برای رسم نشان دایره",placeText:"کلیک برای نوشتن متن"},actions:{finish:"پایان",cancel:"لفو",removeLastVertex:"حذف آخرین رأس"},buttonTitles:{drawMarkerButton:"درج نشان",drawPolyButton:"رسم چندضلعی",drawLineButton:"رسم خط",drawCircleButton:"رسم دایره",drawRectButton:"رسم چهارضلعی",editButton:"ویرایش لایهها",dragButton:"جابجایی لایهها",cutButton:"برش لایهها",deleteButton:"حذف لایهها",drawCircleMarkerButton:"رسم نشان دایره",snappingButton:"نشانگر را به لایهها و رئوس دیگر بکشید",pinningButton:"رئوس مشترک را با هم پین کنید",rotateButton:"چرخش لایه",drawTextButton:"رسم متن",scaleButton:"مقیاسگذاری",autoTracingButton:"ردیاب خودکار"},measurements:{totalLength:"طول",segmentLength:"طول بخش",area:"ناحیه",radius:"شعاع",perimeter:"محیط",height:"ارتفاع",width:"عرض",coordinates:"موقعیت",coordinatesMarker:"موقعیت نشان"}},ua:{tooltips:{placeMarker:"Натисніть, щоб нанести маркер",firstVertex:"Натисніть, щоб нанести першу вершину",continueLine:"Натисніть, щоб продовжити малювати",finishLine:"Натисніть будь-який існуючий маркер для завершення",finishPoly:"Виберіть перший маркер, щоб завершити",finishRect:"Натисніть, щоб завершити",startCircle:"Натисніть, щоб додати центр кола",finishCircle:"Натисніть, щоб завершити коло",placeCircleMarker:"Натисніть, щоб нанести круговий маркер"},actions:{finish:"Завершити",cancel:"Відмінити",removeLastVertex:"Видалити попередню вершину"},buttonTitles:{drawMarkerButton:"Малювати маркер",drawPolyButton:"Малювати полігон",drawLineButton:"Малювати криву",drawCircleButton:"Малювати коло",drawRectButton:"Малювати прямокутник",editButton:"Редагувати шари",dragButton:"Перенести шари",cutButton:"Вирізати шари",deleteButton:"Видалити шари",drawCircleMarkerButton:"Малювати круговий маркер",snappingButton:"Прив’язати перетягнутий маркер до інших шарів та вершин",pinningButton:"Зв'язати спільні вершини разом",rotateButton:"Повернути шар"}},tr:{tooltips:{placeMarker:"İşaretçi yerleştirmek için tıklayın",firstVertex:"İlk tepe noktasını yerleştirmek için tıklayın",continueLine:"Çizime devam etmek için tıklayın",finishLine:"Bitirmek için mevcut herhangi bir işaretçiyi tıklayın",finishPoly:"Bitirmek için ilk işaretçiyi tıklayın",finishRect:"Bitirmek için tıklayın",startCircle:"Daire merkezine yerleştirmek için tıklayın",finishCircle:"Daireyi bitirmek için tıklayın",placeCircleMarker:"Daire işaretçisi yerleştirmek için tıklayın"},actions:{finish:"Bitir",cancel:"İptal",removeLastVertex:"Son köşeyi kaldır"},buttonTitles:{drawMarkerButton:"Çizim İşaretçisi",drawPolyButton:"Çokgenler çiz",drawLineButton:"Çoklu çizgi çiz",drawCircleButton:"Çember çiz",drawRectButton:"Dikdörtgen çiz",editButton:"Katmanları düzenle",dragButton:"Katmanları sürükle",cutButton:"Katmanları kes",deleteButton:"Katmanları kaldır",drawCircleMarkerButton:"Daire işaretçisi çiz",snappingButton:"Sürüklenen işaretçiyi diğer katmanlara ve köşelere yapıştır",pinningButton:"Paylaşılan köşeleri birbirine sabitle",rotateButton:"Katmanı döndür"}},cz:{tooltips:{placeMarker:"Kliknutím vytvoříte značku",firstVertex:"Kliknutím vytvoříte první objekt",continueLine:"Kliknutím pokračujte v kreslení",finishLine:"Kliknutí na libovolnou existující značku pro dokončení",finishPoly:"Vyberte první bod pro dokončení",finishRect:"Klikněte pro dokončení",startCircle:"Kliknutím přidejte střed kruhu",finishCircle:"Нажмите, чтобы задать радиус",placeCircleMarker:"Kliknutím nastavte poloměr"},actions:{finish:"Dokončit",cancel:"Zrušit",removeLastVertex:"Zrušit poslední akci"},buttonTitles:{drawMarkerButton:"Přidat značku",drawPolyButton:"Nakreslit polygon",drawLineButton:"Nakreslit křivku",drawCircleButton:"Nakreslit kruh",drawRectButton:"Nakreslit obdélník",editButton:"Upravit vrstvu",dragButton:"Přeneste vrstvu",cutButton:"Vyjmout vrstvu",deleteButton:"Smazat vrstvu",drawCircleMarkerButton:"Přidat kruhovou značku",snappingButton:"Navázat tažnou značku k dalším vrstvám a vrcholům",pinningButton:"Spojit společné body dohromady",rotateButton:"Otočte vrstvu"}},ja:{tooltips:{placeMarker:"クリックしてマーカーを配置",firstVertex:"クリックして最初の頂点を配置",continueLine:"クリックして描画を続ける",finishLine:"任意のマーカーをクリックして終了",finishPoly:"最初のマーカーをクリックして終了",finishRect:"クリックして終了",startCircle:"クリックして円の中心を配置",finishCircle:"クリックして円の描画を終了",placeCircleMarker:"クリックして円マーカーを配置",placeText:"クリックしてテキストを配置"},actions:{finish:"終了",cancel:"キャンセル",removeLastVertex:"最後の頂点を削除"},buttonTitles:{drawMarkerButton:"マーカーを描画",drawPolyButton:"ポリゴンを描画",drawLineButton:"折れ線を描画",drawCircleButton:"円を描画",drawRectButton:"矩形を描画",editButton:"レイヤーを編集",dragButton:"レイヤーをドラッグ",cutButton:"レイヤーを切り取り",deleteButton:"レイヤーを削除",drawCircleMarkerButton:"円マーカーを描画",snappingButton:"ドラッグしたマーカーを他のレイヤーや頂点にスナップする",pinningButton:"共有する頂点を同時に動かす",rotateButton:"レイヤーを回転",drawTextButton:"テキストを描画"}},fi:{tooltips:{placeMarker:"Klikkaa asettaaksesi merkin",firstVertex:"Klikkaa asettaakseni ensimmäisen osuuden",continueLine:"Klikkaa jatkaaksesi piirtämistä",finishLine:"Klikkaa olemassa olevaa merkkiä lopettaaksesi",finishPoly:"Klikkaa ensimmäistä merkkiä lopettaaksesi",finishRect:"Klikkaa lopettaaksesi",startCircle:"Klikkaa asettaaksesi ympyrän keskipisteen",finishCircle:"Klikkaa lopettaaksesi ympyrän",placeCircleMarker:"Klikkaa asettaaksesi ympyrämerkin",placeText:"Klikkaa asettaaksesi tekstin"},actions:{finish:"Valmis",cancel:"Peruuta",removeLastVertex:"Poista viimeinen osuus"},buttonTitles:{drawMarkerButton:"Piirrä merkkejä",drawPolyButton:"Piirrä monikulmioita",drawLineButton:"Piirrä viivoja",drawCircleButton:"Piirrä ympyrä",drawRectButton:"Piirrä neliskulmioita",editButton:"Muokkaa",dragButton:"Siirrä",cutButton:"Leikkaa",deleteButton:"Poista",drawCircleMarkerButton:"Piirrä ympyrämerkki",snappingButton:"Kiinnitä siirrettävä merkki toisiin muotoihin",pinningButton:"Kiinnitä jaetut muodot yhteen",rotateButton:"Käännä",drawTextButton:"Piirrä tekstiä"}},ko:{tooltips:{placeMarker:"마커 위치를 클릭하세요",firstVertex:"첫번째 꼭지점 위치을 클릭하세요",continueLine:"계속 그리려면 클릭하세요",finishLine:"끝내려면 기존 마커를 클릭하세요",finishPoly:"끝내려면 처음 마커를 클릭하세요",finishRect:"끝내려면 클릭하세요",startCircle:"원의 중심이 될 위치를 클릭하세요",finishCircle:"원을 끝내려면 클릭하세요",placeCircleMarker:"원 마커 위치를 클릭하세요",placeText:"텍스트 위치를 클릭하세요"},actions:{finish:"끝내기",cancel:"취소",removeLastVertex:"마지막 꼭지점 제거"},buttonTitles:{drawMarkerButton:"마커 그리기",drawPolyButton:"다각형 그리기",drawLineButton:"다각선 그리기",drawCircleButton:"원 그리기",drawRectButton:"직사각형 그리기",editButton:"레이어 편집하기",dragButton:"레이어 끌기",cutButton:"레이어 자르기",deleteButton:"레이어 제거하기",drawCircleMarkerButton:"원 마커 그리기",snappingButton:"잡아끈 마커를 다른 레이어 및 꼭지점에 들러붙게 하기",pinningButton:"공유 꼭지점을 함께 찍기",rotateButton:"레이어 회전하기",drawTextButton:"텍스트 그리기"}},ky:{tooltips:{placeMarker:"Маркерди жайгаштыруу үчүн басыңыз",firstVertex:"Биринчи чокуну жайгаштырууну үчүн басыңыз",continueLine:"Сүрөт тартууну улантуу үчүн басыңыз",finishLine:"Аяктоо үчүн учурдагы маркерди басыңыз",finishPoly:"Бүтүрүү үчүн биринчи маркерди басыңыз",finishRect:"Бүтүрүү үчүн басыңыз",startCircle:"Айлананын борборун жайгаштырууну үчүн басыңыз",finishCircle:"Айлананы бүтүрүү үчүн басыңыз",placeCircleMarker:"Тегерек маркерди жайгаштыруу үчүн басыңыз",placeText:"Текстти жайгаштыруу үчүн басыңыз"},actions:{finish:"Аягы",cancel:"Жок кылуу",removeLastVertex:"Акыркы чокуну өчүрүү"},buttonTitles:{drawMarkerButton:"Маркерди чизуу",drawPolyButton:"Полигон чизуу",drawLineButton:"Полилиния чизуу",drawCircleButton:"Дайынды чизуу",drawRectButton:"Прямоугольник чизуу",editButton:"Слоопту түзөтүү",dragButton:"Слоопту карап сүйлөү",cutButton:"Слооптун башын кесүү",deleteButton:"Слооптун өчүрүү",drawCircleMarkerButton:"Дайынды маркерди чизуу",snappingButton:"Башка слооптордун жана вертекстердин арасына чекилдөө",pinningButton:"Бөлүшкөн вертекстерди бирге тутуштуруу",rotateButton:"Слооптун өзгөртүү",drawTextButton:"Текст чизуу",scaleButton:"Слооптун өлчөмүн өзгөртүү",autoTracingButton:"Автоматтык тизмеги чизуу"},measurements:{totalLength:"Узундук",segmentLength:"Сегмент узундугу",area:"Аймак",radius:"Радиус",perimeter:"Периметр",height:"Диаметр",width:"Кенчилик",coordinates:"Координаттар",coordinatesMarker:"Маркердин координаттары"}}},Me={_globalEditModeEnabled:!1,enableGlobalEditMode(t){let e={...t};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(t=>{this._isRelevantForEdit(t)&&t.pm.enable(e)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(t=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(t)},handleLayerAdditionInGlobalEditMode(){let t=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let e in t){let i=t[e];this._isRelevantForEdit(i)&&i.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:t}){this._addedLayersEdit[L.stamp(t)]=t},_isRelevantForEdit:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowEditing},Le={_globalDragModeEnabled:!1,enableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},t.forEach(t=>{this._isRelevantForDrag(t)&&t.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,t.forEach(t=>{t.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let t=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let e in t){let i=t[e];this._isRelevantForDrag(i)&&i.pm.enableLayerDrag()}},_layerAddedDrag({layer:t}){this._addedLayersDrag[L.stamp(t)]=t},_isRelevantForDrag:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.draggable},xe={_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(t=>{this._isRelevantForRemoval(t)&&(t.pm.enabled()&&t.pm.disable(),t.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(t=>{t.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(t){let e=t.target;this._isRelevantForRemoval(e)&&!e.pm.dragging()&&(e.removeFrom(this.map.pm._getContainingLayer()),e.remove(),e instanceof L.LayerGroup?(this._fireRemoveLayerGroup(e),this._fireRemoveLayerGroup(this.map,e)):(e.pm._fireRemove(e),e.pm._fireRemove(this.map,e)))},_isRelevantForRemoval:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRemoval,handleLayerAdditionInGlobalRemovalMode(){let t=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:t}){this._addedLayersRemoval[L.stamp(t)]=t}},be={_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{this._isRelevantForRotate(t)&&t.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{t.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate:t=>t.pm&&t instanceof L.Polyline&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRotation,handleLayerAdditionInGlobalRotateMode(){let t=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&i.pm.enableRotate()}},_layerAddedRotate({layer:t}){this._addedLayersRotate[L.stamp(t)]=t}},we=c(te()),Pe={_fireDrawStart(t="Draw",e={}){this.__fire(this._map,"pm:drawstart",{shape:this._shape,workingLayer:this._layer},t,e)},_fireDrawEnd(t="Draw",e={}){this.__fire(this._map,"pm:drawend",{shape:this._shape},t,e)},_fireCreate(t,e="Draw",i={}){this.__fire(this._map,"pm:create",{shape:this._shape,marker:t,layer:t},e,i)},_fireCenterPlaced(t="Draw",e={}){let i="Draw"===t?this._layer:void 0,n="Draw"!==t?this._layer:void 0;this.__fire(this._layer,"pm:centerplaced",{shape:this._shape,workingLayer:i,layer:n,latlng:this._layer.getLatLng()},t,e)},_fireCut(t,e,i,n="Draw",s={}){this.__fire(t,"pm:cut",{shape:this._shape,layer:e,originalLayer:i},n,s)},_fireEdit(t=this._layer,e="Edit",i={}){this.__fire(t,"pm:edit",{layer:this._layer,shape:this.getShape()},e,i)},_fireEnable(t="Edit",e={}){this.__fire(this._layer,"pm:enable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDisable(t="Edit",e={}){this.__fire(this._layer,"pm:disable",{layer:this._layer,shape:this.getShape()},t,e)},_fireUpdate(t="Edit",e={}){this.__fire(this._layer,"pm:update",{layer:this._layer,shape:this.getShape()},t,e)},_fireMarkerDragStart(t,e=void 0,i="Edit",n={}){this.__fire(this._layer,"pm:markerdragstart",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDrag(t,e=void 0,i="Edit",n={}){this.__fire(this._layer,"pm:markerdrag",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e},i,n)},_fireMarkerDragEnd(t,e=void 0,i=void 0,n="Edit",s={}){this.__fire(this._layer,"pm:markerdragend",{layer:this._layer,markerEvent:t,shape:this.getShape(),indexPath:e,intersectionReset:i},n,s)},_fireDragStart(t="Edit",e={}){this.__fire(this._layer,"pm:dragstart",{layer:this._layer,shape:this.getShape()},t,e)},_fireDrag(t,e="Edit",i={}){this.__fire(this._layer,"pm:drag",{...t,shape:this.getShape()},e,i)},_fireDragEnd(t="Edit",e={}){this.__fire(this._layer,"pm:dragend",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragEnable(t="Edit",e={}){this.__fire(this._layer,"pm:dragenable",{layer:this._layer,shape:this.getShape()},t,e)},_fireDragDisable(t="Edit",e={}){this.__fire(this._layer,"pm:dragdisable",{layer:this._layer,shape:this.getShape()},t,e)},_fireRemove(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:this.getShape()},i,n)},_fireVertexAdded(t,e,i,n="Edit",s={}){this.__fire(this._layer,"pm:vertexadded",{layer:this._layer,workingLayer:this._layer,marker:t,indexPath:e,latlng:i,shape:this.getShape()},n,s)},_fireVertexRemoved(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexremoved",{layer:this._layer,marker:t,indexPath:e,shape:this.getShape()},i,n)},_fireVertexClick(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:vertexclick",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireIntersect(t,e=this._layer,i="Edit",n={}){this.__fire(e,"pm:intersect",{layer:this._layer,intersection:t,shape:this.getShape()},i,n)},_fireLayerReset(t,e,i="Edit",n={}){this.__fire(this._layer,"pm:layerreset",{layer:this._layer,markerEvent:t,indexPath:e,shape:this.getShape()},i,n)},_fireChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:change",{layer:this._layer,latlngs:t,shape:this.getShape()},e,i)},_fireTextChange(t,e="Edit",i={}){this.__fire(this._layer,"pm:textchange",{layer:this._layer,text:t,shape:this.getShape()},e,i)},_fireTextFocus(t="Edit",e={}){this.__fire(this._layer,"pm:textfocus",{layer:this._layer,shape:this.getShape()},t,e)},_fireTextBlur(t="Edit",e={}){this.__fire(this._layer,"pm:textblur",{layer:this._layer,shape:this.getShape()},t,e)},_fireSnapDrag(t,e,i="Snapping",n={}){this.__fire(t,"pm:snapdrag",e,i,n)},_fireSnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:snap",e,i,n)},_fireUnsnap(t,e,i="Snapping",n={}){this.__fire(t,"pm:unsnap",e,i,n)},_fireRotationEnable(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotateenable",{layer:this._layer,helpLayer:this._rotatePoly,shape:this.getShape()},i,n)},_fireRotationDisable(t,e="Rotation",i={}){this.__fire(t,"pm:rotatedisable",{layer:this._layer,shape:this.getShape()},e,i)},_fireRotationStart(t,e,i="Rotation",n={}){this.__fire(t,"pm:rotatestart",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:this._startAngle,originLatLngs:e},i,n)},_fireRotation(t,e,i,n=this._rotationLayer,s="Rotation",o={}){this.__fire(t,"pm:rotate",{layer:n,helpLayer:this._layer,startAngle:this._startAngle,angle:n.pm.getAngle(),angleDiff:e,oldLatLngs:i,newLatLngs:n.getLatLngs()},s,o)},_fireRotationEnd(t,e,i,n="Rotation",s={}){this.__fire(t,"pm:rotateend",{layer:this._rotationLayer,helpLayer:this._layer,startAngle:e,angle:this._rotationLayer.pm.getAngle(),originLatLngs:i,newLatLngs:this._rotationLayer.getLatLngs()},n,s)},_fireActionClick(t,e,i,n="Toolbar",s={}){this.__fire(this._map,"pm:actionclick",{text:t.text,action:t,btnName:e,button:i},n,s)},_fireButtonClick(t,e,i="Toolbar",n={}){this.__fire(this._map,"pm:buttonclick",{btnName:t,button:e},i,n)},_fireLangChange(t,e,i,n,s="Global",o={}){this.__fire(this.map,"pm:langchange",{oldLang:t,activeLang:e,fallback:i,translations:n},s,o)},_fireGlobalDragModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaldragmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalEditModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globaleditmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalRemovalModeToggled(t,e="Global",i={}){this.__fire(this.map,"pm:globalremovalmodetoggled",{enabled:t,map:this.map},e,i)},_fireGlobalCutModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globalcutmodetoggled",{enabled:!!this._enabled,map:this._map},t,e)},_fireGlobalDrawModeToggled(t="Global",e={}){this.__fire(this._map,"pm:globaldrawmodetoggled",{enabled:this._enabled,shape:this._shape,map:this._map},t,e)},_fireGlobalRotateModeToggled(t="Global",e={}){this.__fire(this.map,"pm:globalrotatemodetoggled",{enabled:this.globalRotateModeEnabled(),map:this.map},t,e)},_fireRemoveLayerGroup(t,e=t,i="Edit",n={}){this.__fire(t,"pm:remove",{layer:e,shape:void 0},i,n)},_fireKeyeventEvent(t,e,i,n="Global",s={}){this.__fire(this.map,"pm:keyevent",{event:t,eventType:e,focusOn:i},n,s)},__fire(t,e,i,n,s={}){i=(0,we.default)(i,s,{source:n}),L.PM.Utils._fireEvent(t,e,i)}},ke=()=>({_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(t){this.map=t,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),t.once("unload",this._unbindKeyListenerEvents,this)},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(t){let e="document";this.map.getContainer().contains(t.target)&&(e="map");let i={event:t,eventType:t.type,focusOn:e};this._lastEvents[t.type]=i,this._lastEvents.current=i,this.map.pm._fireKeyeventEvent(t,t.type,e)},_onBlur(t){t.altKey=!1;let e={event:t,eventType:t.type,focusOn:"document"};this._lastEvents[t.type]=e,this._lastEvents.current=e},getLastKeyEvent(t="current"){return this._lastEvents[t]},isShiftKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.shiftKey},isAltKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.altKey},isCtrlKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.ctrlKey},isMetaKeyPressed(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.metaKey},getPressedKey(){var t;return null==(t=this._lastEvents.current)?void 0:t.event.key}}),Ee=c(pe());function Ce(t){let e=L.PM.activeLang;return(0,Ee.default)(ve[e],t)||(0,Ee.default)(ve.en,t)||t}function Se(t){for(let e=0;e<t.length;e+=1){let i=t[e];if(Array.isArray(i)){if(Se(i))return!0}else if(null!=i&&""!==i)return!0}return!1}function Te(t){return t.reduce((t,e)=>{if(0!==e.length){let i=Array.isArray(e)?Te(e):e;Array.isArray(i)?0!==i.length&&t.push(i):t.push(i)}return t},[])}function Be(t,e,i){let n,s,o,a={a:L.CRS.Earth.R,b:6356752.3142,f:.0033528106647474805},{a:r,b:h,f:l}=a,u=t.lng,c=t.lat,p=i,d=Math.PI,_=e*d/180,m=Math.sin(_),g=Math.cos(_),f=(1-l)*Math.tan(c*d/180),y=1/Math.sqrt(1+f*f),A=f*y,v=Math.atan2(f,g),M=y*m,x=1-M*M,b=x*(r*r-h*h)/(h*h),w=1+b/16384*(4096+b*(b*(320-175*b)-768)),P=b/1024*(256+b*(b*(74-47*b)-128)),k=p/(h*w),E=2*Math.PI;for(;Math.abs(k-E)>1e-12;){n=Math.cos(2*v+k),s=Math.sin(k),o=Math.cos(k),E=k,k=p/(h*w)+P*s*(n+P/4*(o*(2*n*n-1)-P/6*n*(4*s*s-3)*(4*n*n-3)))}let C=A*s-y*o*g,S=Math.atan2(A*o+y*s*g,(1-l)*Math.sqrt(M*M+C*C)),T=l/16*x*(4+l*(4-3*x)),B=u+180*(Math.atan2(s*m,y*o-A*s*g)-(1-T)*l*M*(k+T*s*(n+T*o*(2*n*n-1))))/d,O=180*S/d;return L.latLng(B,O)}function Oe(t,e,i,n,s=!0){let o,a,r,h=[];for(let l=0;l<i;l+=1){if(s)o=360*l/i+n,a=Be(t,o,e),r=L.latLng(a.lng,a.lat);else{let n=t.lat+Math.cos(2*l*Math.PI/i)*e,s=t.lng+Math.sin(2*l*Math.PI/i)*e;r=L.latLng(n,s)}h.push(r)}return h}function De(t,e,i){let n=t.latLngToContainerPoint(e),s=t.latLngToContainerPoint(i),o=180*Math.atan2(s.y-n.y,s.x-n.x)/Math.PI+90;return o+=o<0?360:0,o}function Re(t,e,i,n){return function(t,e,i){e=(e+360)%360;let n=Math.PI/180,s=180/Math.PI,{R:o}=L.CRS.Earth,a=t.lng*n,r=t.lat*n,h=e*n,l=Math.sin(r),u=Math.cos(r),c=Math.cos(i/o),p=Math.sin(i/o),d=Math.asin(l*c+u*p*Math.cos(h)),_=a+Math.atan2(Math.sin(h)*p*u,c-l*Math.sin(d));return _*=s,_=_>180?_-360:_<-180?_+360:_,L.latLng([d*s,_])}(e,De(t,e,i),n)}function Ie(t,e=t.getLatLngs()){return t instanceof L.Polygon?L.polygon(e).getLatLngs():L.polyline(e).getLatLngs()}function ze(t,e){var i,n,s,o;if(null==(n=null==(i=e.options.crs)?void 0:i.projection)?void 0:n.MAX_LATITUDE){let i=null==(o=null==(s=e.options.crs)?void 0:s.projection)?void 0:o.MAX_LATITUDE;t.lat=Math.max(Math.min(i,t.lat),-i)}return t}function Ge(t){return t.options.renderer||t._map&&(t._map._getPaneRenderer(t.options.pane)||t._map.options.renderer||t._map._renderer)||t._renderer}var Ne=L.Class.extend({includes:[Me,Le,xe,be,Pe],initialize(t){this.map=t,this.Draw=new L.PM.Draw(t),this.Toolbar=new L.PM.Toolbar(t),this.Keyboard=ke(),this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0},this.Keyboard._initKeyListener(t)},setLang(t="en",e,i="en"){if(t=t.trim().toLowerCase(),!/^[a-z]{2}$/.test(t)){let e=t.replace(/[-_\s]/g,"-").replace(/^(\w{2})$/,"$1-").match(/([a-z]{2})-?([a-z]{2})?/);if(e){let i=[`${e[1]}_${e[2]}`,`${e[1]}`];for(let e of i)if(ve[e]){t=e;break}}}let n=L.PM.activeLang;e&&(ve[t]=(0,ye.default)(ve[i],e)),L.PM.activeLang=t,this.map.pm.Toolbar.reinit(),this._fireLangChange(n,t,i,ve[t])},addControls(t){this.Toolbar.addControls(t)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(t="Polygon",e){"Poly"===t&&(t="Polygon"),this.Draw.enable(t,e)},disableDraw(t="Polygon"){"Poly"===t&&(t="Polygon"),this.Draw.disable(t)},setPathOptions(t,e={}){let i=e.ignoreShapes||[],n=e.merge||!1;this.map.pm.Draw.shapes.forEach(e=>{-1===i.indexOf(e)&&this.map.pm.Draw[e].setPathOptions(t,n)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(t){let e=(0,ye.default)(this.globalOptions,t);e.editable&&(e.resizeableCircleMarker=e.editable,delete e.editable);let i=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!e.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),i=!0);let n=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!e.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),n=!0),this.map.pm.Draw.shapes.forEach(t=>{this.map.pm.Draw[t].setOptions(e)}),i&&this.map.pm.Draw.CircleMarker.enable(),n&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.setOptions(e)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=e,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.enabled()&&t.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(t){return this.Draw.Cut.enable(t)},toggleGlobalCutMode(t){return this.Draw.Cut.toggle(t)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(t=!1){let e=L.PM.Utils.findLayers(this.map);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},getGeomanDrawLayers(t=!1){let e=L.PM.Utils.findLayers(this.map).filter(t=>!0===t._drawnByGeoman);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(t){0===this._touchEventCounter&&(L.DomEvent.on(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(t){1===this._touchEventCounter&&(L.DomEvent.off(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(t){Ge(this.map)._onMouseMove(this._createMouseEvent("mousemove",t))},_canvasTouchClick(t){let e="";"touchstart"===t.type||"pointerdown"===t.type?e="mousedown":("touchend"===t.type||"pointerup"===t.type||"touchcancel"===t.type||"pointercancel"===t.type)&&(e="mouseup"),e&&Ge(this.map)._onClick(this._createMouseEvent(e,t))},_createMouseEvent(t,e){let i,n=e.touches[0]||e.changedTouches[0];try{i=new MouseEvent(t,{bubbles:e.bubbles,cancelable:e.cancelable,view:e.view,detail:n.detail,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,relatedTarget:e.relatedTarget})}catch{i=document.createEvent("MouseEvents"),i.initMouseEvent(t,e.bubbles,e.cancelable,e.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}return i}}),je=L.Control.extend({includes:[Pe],options:{position:"topleft",disableByOtherButtons:!0},initialize(t){this._button=L.Util.extend({},this.options,t)},onAdd(t){return this._map=t,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):"edit"===this._button.tool?this._container=this._map.pm.Toolbar.editContainer:"options"===this._button.tool?this._container=this._map.pm.Toolbar.optionsContainer:"custom"===this._button.tool?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let t=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),t?t.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(t){return this._button.toggleStatus="boolean"==typeof t?t:!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(t){t&&t.preventDefault(),!this._button.disabled&&(this._button.onClick(t,{button:this,event:t}),this._clicked(t),this._button.afterClick(t,{button:this,event:t}))},_makeButton(t){let e=this.options.position.indexOf("right")>-1?"pos-right":"",i=L.DomUtil.create("div",`button-container ${e}`,this._container);t.title&&i.setAttribute("title",t.title);let n=L.DomUtil.create("a","leaflet-buttons-control-button",i);n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.href="#";let s=L.DomUtil.create("div",`leaflet-pm-actions-container ${e}`,i),o=t.actions,a={cancel:{text:Ce("actions.cancel"),title:Ce("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:Ce("actions.finish"),title:Ce("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:Ce("actions.removeLastVertex"),title:Ce("actions.removeLastVertex"),onClick(){this._map.pm.Draw[t.jsClass]._removeLastVertex()}},finish:{text:Ce("actions.finish"),title:Ce("actions.finish"),onClick(e){this._map.pm.Draw[t.jsClass]._finishShape(e)}}};t._preparedActions=o.map(i=>{let n,o="string"==typeof i?i:i.name;if(a[o])n=a[o];else{if(!i.text)return n;n=i}let r=L.DomUtil.create("a",`leaflet-pm-action ${e} action-${o}`,s);if(r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.href="#",n.title&&(r.title=n.title),r.innerHTML=n.text,L.DomEvent.disableClickPropagation(r),L.DomEvent.on(r,"click",L.DomEvent.stop),n._node=r,!t.disabled&&n.onClick){let e=e=>{e.preventDefault();let i="",{buttons:s}=this._map.pm.Toolbar;for(let n in s)if(s[n]._button===t){i=n;break}this._fireActionClick(n,i,t)};L.DomEvent.addListener(r,"click",e,this),L.DomEvent.addListener(r,"click",n.onClick,this),L.DomEvent.addListener(r,"click",()=>this._updateActiveAction(t))}return n}),this._updateActiveAction(t),t.toggleStatus&&L.DomUtil.addClass(i,"active");let r=L.DomUtil.create("div","control-icon",n);return t.iconUrl&&r.setAttribute("src",t.iconUrl),t.className&&L.DomUtil.addClass(r,t.className),L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"click",L.DomEvent.stop),t.disabled||(L.DomEvent.addListener(n,"click",this._onBtnClick,this),L.DomEvent.addListener(n,"click",this._triggerClick,this)),t.disabled&&(L.DomUtil.addClass(n,"pm-disabled"),n.setAttribute("aria-disabled","true")),i},_applyStyleClasses(){this._container&&(this._button.toggleStatus&&!1!==this._button.cssToggle?(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")):(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let t="",{buttons:e}=this._map.pm.Toolbar;for(let i in e)if(e[i]._button===this._button){t=i;break}this._fireButtonClick(t,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let t="pm-disabled",e=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(e,t),e.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(e,t),e.setAttribute("aria-disabled","false"))},_updateActiveAction(t){var e;null==(e=t._preparedActions)||e.forEach(t=>{(null==t?void 0:t._node)&&(t.isActive&&t.isActive.call(this)?L.DomUtil.addClass(t._node,"active-action"):L.DomUtil.removeClass(t._node,"active-action"))})}});L.Control.PMButton=je;var Fe=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(t){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(t)},reinit(){let t=this.isVisible;this.removeControls(),this._defineButtons(),t&&this.addControls()},init(t){this.map=t,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(t){let e=`${t}Container`;return this[e]||(this[e]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${t} leaflet-bar leaflet-control`)),this[e]},getButtons(){return this.buttons},addControls(t=this.options){typeof t.editPolygon<"u"&&(t.editMode=t.editPolygon),typeof t.deleteLayer<"u"&&(t.removalMode=t.deleteLayer),L.Util.setOptions(this,t),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let t=this.getButtons(),e={geomanIcons:{drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"}};for(let i in t){let n=t[i];L.Util.setOptions(n,{className:e.geomanIcons[i]})}},removeControls(){let t=this.getButtons();for(let e in t)t[e].remove();this.isVisible=!1},toggleControls(t=this.options){this.isVisible?this.removeControls():this.addControls(t)},_addButton(t,e){return this.buttons[t]=e,this.options[t]=!!this.options[t]||!1,this.buttons[t]},triggerClickOnToggledButtons(t){for(let e in this.buttons){let i=this.buttons[e];i._button.disableByOtherButtons&&i!==t&&i.toggled()&&i._triggerClick()}},toggleButton(t,e,i=!0){"editPolygon"===t&&(t="editMode"),"deleteLayer"===t&&(t="removalMode");let n=t;return i&&this.triggerClickOnToggledButtons(this.buttons[n]),!!this.buttons[n]&&this.buttons[n].toggle(e)},_defineButtons(){let t={className:"control-icon leaflet-pm-icon-marker",title:Ce("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},e={title:Ce("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={className:"control-icon leaflet-pm-icon-polyline",title:Ce("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},n={title:Ce("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:Ce("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},o={title:Ce("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},a={title:Ce("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},r={title:Ce("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},h={title:Ce("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},l={title:Ce("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},u={title:Ce("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},c={className:"control-icon leaflet-pm-icon-text",title:Ce("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(t)),this._addButton("drawPolyline",new L.Control.PMButton(i)),this._addButton("drawRectangle",new L.Control.PMButton(o)),this._addButton("drawPolygon",new L.Control.PMButton(e)),this._addButton("drawCircle",new L.Control.PMButton(n)),this._addButton("drawCircleMarker",new L.Control.PMButton(s)),this._addButton("drawText",new L.Control.PMButton(c)),this._addButton("editMode",new L.Control.PMButton(a)),this._addButton("dragMode",new L.Control.PMButton(r)),this._addButton("cutPolygon",new L.Control.PMButton(h)),this._addButton("removalMode",new L.Control.PMButton(l)),this._addButton("rotateMode",new L.Control.PMButton(u))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let t=this.getButtons(),e=[];!1===this.options.drawControls&&(e=e.concat(Object.keys(t).filter(e=>!t[e]._button.tool))),!1===this.options.editControls&&(e=e.concat(Object.keys(t).filter(e=>"edit"===t[e]._button.tool))),!1===this.options.optionsControls&&(e=e.concat(Object.keys(t).filter(e=>"options"===t[e]._button.tool))),!1===this.options.customControls&&(e=e.concat(Object.keys(t).filter(e=>"custom"===t[e]._button.tool)));for(let i in t)if(this.options[i]&&-1===e.indexOf(i)){let e=t[i]._button.tool;e||(e="draw"),t[i].setPosition(this._getBtnPosition(e)),t[i].addTo(this.map)}},_getBtnPosition(t){return this.options.positions&&this.options.positions[t]?this.options.positions[t]:this.options.position},setBlockPosition(t,e){this.options.positions[t]=e,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(t,e){if(!e)throw new TypeError("Button has no name");"object"!=typeof e&&(e={name:e});let i=this._btnNameMapping(t);if(!e.name)throw new TypeError("Button has no name");if(this.buttons[e.name])throw new TypeError("Button with this name already exists");let n=this.map.pm.Draw.createNewDrawInstance(e.name,i);return e={...this.buttons[i]._button,...e},{drawInstance:n,control:this.createCustomControl(e)}},createCustomControl(t){if(!t.name)throw new TypeError("Button has no name");if(this.buttons[t.name])throw new TypeError("Button with this name already exists");t.onClick||(t.onClick=()=>{}),t.afterClick||(t.afterClick=()=>{}),!1!==t.toggle&&(t.toggle=!0),t.block&&(t.block=t.block.toLowerCase()),(!t.block||"draw"===t.block)&&(t.block=""),t.className?-1===t.className.indexOf("control-icon")&&(t.className=`control-icon ${t.className}`):t.className="control-icon";let e={tool:t.block,className:t.className,title:t.title||"",jsClass:t.name,onClick:t.onClick,afterClick:t.afterClick,doToggle:t.toggle,toggleStatus:!1,disableOtherButtons:t.disableOtherButtons??!0,disableByOtherButtons:t.disableByOtherButtons??!0,cssToggle:t.toggle,position:this.options.position,actions:t.actions||[],disabled:!!t.disabled};!1!==this.options[t.name]&&(this.options[t.name]=!0);let i=this._addButton(t.name,new L.Control.PMButton(e));return this.changeControlOrder(),i},controlExists(t){return!!this.getButton(t)},getButton(t){return this.getButtons()[t]},getButtonsInBlock(t){let e={};if(t)for(let i in this.getButtons()){let n=this.getButtons()[i];(n._button.tool===t||"draw"===t&&!n._button.tool)&&(e[i]=n)}return e},changeControlOrder(t=[]){let e=this._shapeMapping(),i=[];t.forEach(t=>{e[t]?i.push(e[t]):i.push(t)});let n=this.getButtons(),s={};i.forEach(t=>{n[t]&&(s[t]=n[t])}),Object.keys(n).filter(t=>!n[t]._button.tool||"draw"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"edit"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"options"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).filter(t=>"custom"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),Object.keys(n).forEach(t=>{-1===i.indexOf(t)&&(s[t]=n[t])}),this.map.pm.Toolbar.buttons=s,this._showHideButtons()},getControlOrder(){let t=this.getButtons(),e=[];for(let i in t)e.push(i);return e},changeActionsOfControl(t,e){let i=this._btnNameMapping(t);if(!i)throw new TypeError("No name passed");if(!e)throw new TypeError("No actions passed");if(!this.buttons[i])throw new TypeError("Button with this name not exists");this.buttons[i]._button.actions=e,this.changeControlOrder()},setButtonDisabled(t,e){let i=this._btnNameMapping(t);e?this.buttons[i].disable():this.buttons[i].enable()},_shapeMapping:()=>({Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}),_btnNameMapping(t){let e=this._shapeMapping();return e[t]?e[t]:t}}),Ue=c(te()),Ze={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(t){t.forEach(t=>{Array.isArray(t)?this._assignEvents(t):(t.off("drag",this._handleSnapping,this),t.on("drag",this._handleSnapping,this),t.off("dragend",this._cleanupSnapping,this),t.on("dragend",this._cleanupSnapping,this))})},_cleanupSnapping(t){if(t){t.target._snapped=!1}delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(t=>{t.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(t){var e,i,n;let s=t.target;if(s._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),(null==(e=null==t?void 0:t.originalEvent)?void 0:e.altKey)||(null==(n=null==(i=this._map)?void 0:i.pm)?void 0:n.Keyboard.isAltKeyPressed())||(void 0===this._snapList&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),this._snapList.length<=0))return!1;let o=this._calcClosestLayer(s.getLatLng(),this._snapList);if(0===Object.keys(o).length)return!1;let a,r=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment;a=r?o.latlng:this._checkPrioritiySnapping(o);let h=this.options.snapDistance,l={marker:s,shape:this._shape,snapLatLng:a,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(l.marker,l),this._fireSnapDrag(this._layer,l),o.distance<h){s._orgLatLng=s.getLatLng(),s.setLatLng(a),s._snapped=!0,s._snapInfo=l;let t=()=>{this._snapLatLng=a,this._fireSnap(s,l),this._fireSnap(this._layer,l)},e=this._snapLatLng||{},i=a||{};(e.lat!==i.lat||e.lng!==i.lng)&&t()}else this._snapLatLng&&(this._unsnap(l),s._snapped=!1,s._snapInfo=void 0,this._fireUnsnap(l.marker,l),this._fireUnsnap(this._layer,l));return!0},_createSnapList(){let t=[],e=[],i=this._map;i.off("layerremove",this._handleSnapLayerRemoval,this),i.on("layerremove",this._handleSnapLayerRemoval,this),i.eachLayer(i=>{if((i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&!0!==i.options.snapIgnore){if(void 0===i.options.snapIgnore&&(!L.PM.optIn&&!0===i.options.pmIgnore||L.PM.optIn&&!1!==i.options.pmIgnore))return;(i instanceof L.Circle||i instanceof L.CircleMarker)&&i.pm&&i.pm._hiddenPolyCircle?t.push(i.pm._hiddenPolyCircle):i instanceof L.ImageOverlay&&(i=L.rectangle(i.getBounds())),t.push(i);let n=L.polyline([],{color:"red",pmIgnore:!0});n._pmTempLayer=!0,e.push(n),(i instanceof L.Circle||i instanceof L.CircleMarker)&&e.push(n)}}),t=t.filter(t=>this._layer!==t),t=t.filter(t=>t._latlng||t._latlngs&&Se(t._latlngs)),t=t.filter(t=>!t._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,e.push(t)}),this._snapList=t.concat(this._otherSnapLayers)):this._snapList=t,this.debugIndicatorLines=e},_handleSnapLayerRemoval({layer:t}){if(!t._leaflet_id)return;let e=this._snapList.findIndex(e=>e._leaflet_id===t._leaflet_id);e>-1&&this._snapList.splice(e,1)},_calcClosestLayer(t,e){return this._calcClosestLayers(t,e,1)[0]},_calcClosestLayers(t,e,i=1){let n=[],s={};e.forEach((e,o)=>{var a;if(e._parentCopy&&e._parentCopy===this._layer||(null==(a=e.getLatLngs)?void 0:a.call(e).flat(5).length)<2)return;let r=this._calcLayerDistances(t,e);if(r.distance=Math.floor(r.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[o]){let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,this.debugIndicatorLines[o]=t}this.debugIndicatorLines[o].setLatLngs([t,r.latlng])}1===i&&(void 0===s.distance||r.distance-5<=s.distance)?(r.distance+5<s.distance&&(n=[]),s=r,s.layer=e,n.push(s)):1!==i&&(s={},s=r,s.layer=e,n.push(s))}),1!==i&&(n=n.sort((t,e)=>t.distance-e.distance)),-1===i&&(i=n.length);let o=this._getClosestLayerByPriority(n,i);return L.Util.isArray(o)?o:[o]},_calcLayerDistances(t,e){let i=this._map,n=e instanceof L.Marker||e instanceof L.CircleMarker,s=e instanceof L.Polygon,o=t;if(n){let t=e.getLatLng();return{latlng:{...t},distance:this._getDistance(i,t,o)}}return this._calcLatLngDistances(o,e.getLatLngs(),i,s)},_calcLatLngDistances(t,e,i,n=!1){let s,o,a,r=e=>{e.forEach((h,l)=>{if(Array.isArray(h))r(h);else if(this.options.snapSegment){let s,r=h;s=n?l+1===e.length?0:l+1:l+1===e.length?void 0:l+1;let u=e[s];if(u){let e=this._getDistanceToSegment(i,t,r,u);(void 0===o||e<o)&&(o=e,a=[r,u])}}else{let e=this._getDistance(i,t,h);(void 0===o||e<o)&&(o=e,s=h)}})};return r(e),this.options.snapSegment?{latlng:{...this._getClosestPointOnSegment(i,t,a[0],a[1])},segment:a,distance:o}:{latlng:s,distance:o}},_getClosestLayerByPriority(t,e=1){t=t.sort((t,e)=>t._leaflet_id-e._leaflet_id);let i=this._map.pm.globalOptions.snappingOrder||[],n=0,s={};return i.concat(["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"]).forEach(t=>{s[t]||(n+=1,s[t]=n)}),t.sort(function(t,e,i="asc"){if(!e||0===Object.keys(e).length)return(t,e)=>t-e;let n,s=Object.keys(e),o=s.length-1,a={};for(;o>=0;)n=s[o],a[n.toLowerCase()]=e[n],o-=1;function r(t){return t instanceof L.Marker?"Marker":t instanceof L.Circle?"Circle":t instanceof L.CircleMarker?"CircleMarker":t instanceof L.Rectangle?"Rectangle":t instanceof L.Polygon?"Polygon":t instanceof L.Polyline?"Line":void 0}return(t,e)=>{let n,s;if(n=r(t.layer).toLowerCase(),s=r(e.layer).toLowerCase(),!n||!s)return 0;let o=n in a?a[n]:Number.MAX_SAFE_INTEGER,h=s in a?a[s]:Number.MAX_SAFE_INTEGER,l=0;return o<h?l=-1:o>h&&(l=1),"desc"===i?-1*l:l}}(0,s)),1===e?t[0]||{}:t.slice(0,e)},_checkPrioritiySnapping(t){let e=this._map,i=t.segment[0],n=t.segment[1],s=t.latlng,o=s;if(this.options.snapVertex){let t=this._getDistance(e,i,s),a=this._getDistance(e,n,s),r=t<a?i:n,h=t<a?t:a;if(this.options.snapMiddle){let o=L.PM.Utils.calcMiddleLatLng(e,i,n),l=this._getDistance(e,o,s);l<t&&l<a&&(r=o,h=l)}h<this.options.snapDistance&&(o=r)}return{...o}},_unsnap(){delete this._snapLatLng},_getClosestPointOnSegment(t,e,i,n){let s=t.getMaxZoom();s===1/0&&(s=t.getZoom());let o=t.project(e,s),a=t.project(i,s),r=t.project(n,s),h=L.LineUtil.closestPointOnSegment(o,a,r);return t.unproject(h,s)},_getDistanceToSegment(t,e,i,n){let s=t.latLngToContainerPoint(e),o=t.latLngToContainerPoint(i),a=t.latLngToContainerPoint(n);return L.LineUtil.pointToSegmentDistance(s,o,a)},_getDistance:(t,e,i)=>t.latLngToContainerPoint(e).distanceTo(t.latLngToContainerPoint(i))},qe=L.Class.extend({includes:[Ze,Pe],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(t){L.Util.setOptions(this,t),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(t){let e=new L.Icon.Default;e.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=e,this._map=t,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(t=>{this[t]=new L.PM.Draw[t](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(t,e=!1){this.options.pathOptions=e?(0,Ue.default)(this.options.pathOptions,t):t},getShapes(){return this.shapes},getShape(){return this._shape},enable(t,e){if(!t)throw new Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[t].enable(e)},disable(){this.shapes.forEach(t=>{this[t].disable()})},addControls(){this.shapes.forEach(t=>{this[t].addButton()})},getActiveShape(){let t;return this.shapes.forEach(e=>{this[e]._enabled&&(t=e)}),t},_setGlobalDrawMode(){"Cut"===this._shape?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let t=[];this._map.eachLayer(e=>{(e instanceof L.Polyline||e instanceof L.Marker||e instanceof L.Circle||e instanceof L.CircleMarker||e instanceof L.ImageOverlay)&&(e._pmTempLayer||t.push(e))}),this._enabled?t.forEach(t=>{L.PM.Utils.disablePopup(t)}):t.forEach(t=>{L.PM.Utils.enablePopup(t)})},createNewDrawInstance(t,e){let i=this._getShapeFromBtnName(e);if(this[t])throw new TypeError("Draw Type already exists");if(!L.PM.Draw[i])throw new TypeError(`There is no class L.PM.Draw.${i}`);return this[t]=new L.PM.Draw[i](this._map),this[t].toolbarButtonName=t,this[t]._shape=t,this.shapes.push(t),this[e]&&this[t].setOptions(this[e].options),this[t].setOptions(this[t].options),this[t]},_getShapeFromBtnName(t){let e={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return e[t]?e[t]:this[t]?this[t]._shape:t},_finishLayer(t){t.pm&&(t.pm.setOptions(this.options),t.pm._shape=this._shape,t.pm._map=this._map),this._addDrawnLayerProp(t)},_addDrawnLayerProp(t){t._drawnByGeoman=!0},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return 0===(this._map||this._layer._map).pm.getGeomanLayers().length}});qe.Marker=qe.extend({initialize(t){this._map=t,this._shape="Marker",this.toolbarButtonName="drawMarker"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this),this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},isRelevantMarker:t=>t instanceof L.Marker&&t.pm&&!t._pmTempLayer&&!t.pm._initTextMarker,_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(t){if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new L.Marker(e,this.options.markerStyle);this._setPane(i,"markerPane"),this._finishLayer(i),i.pm||(i.options.draggable=!1),i.addTo(this._map.pm._getContainingLayer()),i.pm&&this.options.markerEditable?i.pm.enable():i.dragging&&i.dragging.disable(),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){var t,e;(null==(t=this.options.markerStyle)?void 0:t.icon)&&(null==(e=this._hintMarker)||e.setIcon(this.options.markerStyle.icon))}});var He=6371008.8,Ve={centimeters:100*He,centimetres:100*He,degrees:He/111325,feet:3.28084*He,inches:39.37*He,kilometers:He/1e3,kilometres:He/1e3,meters:He,metres:He,miles:He/1609.344,millimeters:1e3*He,millimetres:1e3*He,nauticalmiles:He/1852,radians:1,yards:1.0936*He};function Ke(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function We(t,e,i){if(void 0===i&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Qe(t[0])||!Qe(t[1]))throw new Error("coordinates must contain numbers");return Ke({type:"Point",coordinates:t},e,i)}function Xe(t,e,i){if(void 0===i&&(i={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return Ke({type:"LineString",coordinates:t},e,i)}function $e(t,e){void 0===e&&(e={});var i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function Ye(t){return 180*(t%(2*Math.PI))/Math.PI}function Je(t){return t%360*Math.PI/180}function Qe(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function ti(t){var e,i,n={type:"FeatureCollection",features:[]};if("LineString"===(i="Feature"===t.type?t.geometry:t).type)e=[i.coordinates];else if("MultiLineString"===i.type)e=i.coordinates;else if("MultiPolygon"===i.type)e=[].concat.apply([],i.coordinates);else{if("Polygon"!==i.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=i.coordinates}return e.forEach(function(t){e.forEach(function(e){for(var i=0;i<t.length-1;i++)for(var s=i;s<e.length-1;s++)if(t!==e||1!==Math.abs(i-s)&&(0!==i||s!==t.length-2||t[i][0]!==t[t.length-1][0]||t[i][1]!==t[t.length-1][1])){var o=ei(t[i][0],t[i][1],t[i+1][0],t[i+1][1],e[s][0],e[s][1],e[s+1][0],e[s+1][1]);o&&n.features.push(We([o[0],o[1]]))}})}),n}function ei(t,e,i,n,s,o,a,r){var h,l,u,c,p={x:null,y:null,onLine1:!1,onLine2:!1};return 0===(h=(r-o)*(i-t)-(a-s)*(n-e))?null!==p.x&&null!==p.y&&p:(c=(i-t)*(l=e-o)-(n-e)*(u=t-s),l=((a-s)*l-(r-o)*u)/h,u=c/h,p.x=t+l*(i-t),p.y=e+l*(n-e),l>=0&&l<=1&&(p.onLine1=!0),u>=0&&u<=1&&(p.onLine2=!0),!(!p.onLine1||!p.onLine2)&&[p.x,p.y])}function ii(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function ni(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function si(t){return"Feature"===t.type?t.geometry:t}function oi(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}function ai(t,e,i){if(null!==t)for(var n,s,o,a,r,h,l,u,c=0,p=0,d=t.type,_="FeatureCollection"===d,m="Feature"===d,g=_?t.features.length:1,f=0;f<g;f++){r=(u=!!(l=_?t.features[f].geometry:m?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var y=0;y<r;y++){var A=0,v=0;if(null!==(a=u?l.geometries[y]:l)){h=a.coordinates;var M=a.type;switch(c=0,M){case null:break;case"Point":if(!1===e(h,p,f,A,v))return!1;p++,A++;break;case"LineString":case"MultiPoint":for(n=0;n<h.length;n++){if(!1===e(h[n],p,f,A,v))return!1;p++,"MultiPoint"===M&&A++}"LineString"===M&&A++;break;case"Polygon":case"MultiLineString":for(n=0;n<h.length;n++){for(s=0;s<h[n].length-c;s++){if(!1===e(h[n][s],p,f,A,v))return!1;p++}"MultiLineString"===M&&A++,"Polygon"===M&&v++}"Polygon"===M&&A++;break;case"MultiPolygon":for(n=0;n<h.length;n++){for(v=0,s=0;s<h[n].length;s++){for(o=0;o<h[n][s].length-c;o++){if(!1===e(h[n][s][o],p,f,A,v))return!1;p++}v++}A++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===ai(a.geometries[n],e))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ri(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length&&!1!==e(t.features[i],i);i++);}function hi(t,e){!function(t,e){var i,n,s,o,a,r,h,l,u,c,p=0,d="FeatureCollection"===t.type,_="Feature"===t.type,m=d?t.features.length:1;for(i=0;i<m;i++){for(r=d?t.features[i].geometry:_?t.geometry:t,l=d?t.features[i].properties:_?t.properties:{},u=d?t.features[i].bbox:_?t.bbox:void 0,c=d?t.features[i].id:_?t.id:void 0,a=(h=!!r&&"GeometryCollection"===r.type)?r.geometries.length:1,s=0;s<a;s++)if(null!==(o=h?r.geometries[s]:r))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,l,u,c))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],p,l,u,c))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,l,u,c))return!1;p++}}(t,function(t,i,n,s,o){var a,r=null===t?null:t.type;switch(r){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Ke(t,n,{bbox:s,id:o}),i,0)&&void 0}switch(r){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var h=0;h<t.coordinates.length;h++){var l=t.coordinates[h];if(!1===e(Ke({type:a,coordinates:l},n),i,h))return!1}})}qe.Line=qe.extend({initialize(t){this._map=t,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.on(this.options.finishOn,this._finishShape,this),"dblclick"===this.options.finishOn&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintLine(){let t=this._layer.getLatLngs();if(t.length>0){let e=t[t.length-1];this._hintline.setLatLngs([e,this._hintMarker.getLatLng()])}},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let e=this._layer._defaultShape().slice();e.push(this._hintMarker.getLatLng()),this._change(e)},hasSelfIntersection(){return ti(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(t,e){let i=L.polyline(this._layer.getLatLngs());t&&(e||(e=this._hintMarker.getLatLng()),i.addLatLng(e));let n=ti(i.toGeoJSON(15));this._doesSelfIntersect=n.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(n,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(t){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,t.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._layer.getLatLngs(),n=i[i.length-1];if(e.equals(i[0])||i.length>0&&e.equals(n))return void this._finishShape();this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:e,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(e);let s=this._createMarker(e);this._setTooltipText(),this._setHintLineAfterNewVertex(e),this._fireVertexAdded(s,void 0,e,"Draw"),this._change(this._layer.getLatLngs()),"snap"===this.options.finishOn&&this._hintMarker._snapped&&this._finishShape(t)},_setHintLineAfterNewVertex(t){this._hintline.setLatLngs([t,t])},_removeLastVertex(){let t=this._markers;if(t.length<=1)return void this.disable();let e=this._layer.getLatLngs(),i=t[t.length-1],{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(t,i);t.pop(),this._layerGroup.removeLayer(i);let s=t[t.length-1],o=e.indexOf(s.getLatLng());e=e.slice(0,o+1),this._layer.setLatLngs(e),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(i,n,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=1)return;let e=L.polyline(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this.options.snappable&&this._cleanupSnapping();let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),e.on("click",this._finishShape,this),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=Ce(t<=1?"tooltips.continueLine":"tooltips.finishLine"),this._hintMarker.setTooltipContent(e)},_change(t){this._fireChange(t,"Draw")},setStyle(){var t,e;null==(t=this._layer)||t.setStyle(this.options.templineStyle),null==(e=this._hintline)||e.setStyle(this.options.hintlineStyle)}}),qe.Polygon=qe.Line.extend({initialize(t){this._map=t,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(t){L.PM.Draw.Line.prototype.enable.call(this,t),this._layer.pm._shape="Polygon"},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),1===this._layer.getLatLngs().flat().length?(e.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(e)-1,this.options.snappable&&this._cleanupSnapping()):e.on("click",()=>1),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=Ce(t<=2?"tooltips.continueLine":"tooltips.finishPoly"),this._hintMarker.setTooltipContent(e)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))}}),qe.Rectangle=qe.extend({initialize(t){this._map=t,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(t){if(L.Util.setOptions(this,t),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:this.options.cursorMarker?1:0}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let t=0;t<2;t+=1){let t=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._styleMarkers.push(t)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeStartingMarkers(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(e),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(t=>{L.DomUtil.addClass(t._icon,"visible"),t.setLatLng(e)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(Ce("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let t=this._startMarker.getLatLng();t&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([t,t]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}let e=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(e,"Draw")},_syncRectangleSize(){let t=ze(this._startMarker.getLatLng(),this._map),e=ze(this._hintMarker.getLatLng(),this._map),i=L.PM.Utils._getRotatedRectangle(t,e,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(i),this.options.cursorMarker&&this._styleMarkers){let n=[];i.forEach(i=>{!i.equals(t,1e-8)&&!i.equals(e,1e-8)&&n.push(i)}),n.forEach((t,e)=>{try{this._styleMarkers[e].setLatLng(t)}catch{}})}},_findCorners(){let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.options.rectangleAngle||0,this._map)},_finishShape(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||i.equals(e))return;let n=L.rectangle([i,e],this.options.pathOptions);if(this.options.rectangleAngle){let t=L.PM.Utils._getRotatedRectangle(i,e,this.options.rectangleAngle||0,this._map);n.setLatLngs(t),n.pm&&n.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),this._fireCreate(n);let s=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(s))},setStyle(){var t;null==(t=this._layer)||t.setStyle(this.options.pathOptions)}}),qe.CircleMarker=qe.extend({initialize(t){this._map=t,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(t){if(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let t={};L.extend(t,this.options.templineStyle),t.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),t),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()})},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeCenterMarker(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let e=this._hintMarker.getLatLng();this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(Ce("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i)},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}this._handleHintMarkerSnapping();let e=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(e,"Draw")},isRelevantMarker:t=>t instanceof L.CircleMarker&&!(t instanceof L.Circle)&&t.pm&&!t._pmTempLayer,_createMarker(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!t.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new this._BaseCircleClass(e,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(i),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(t){t.pm&&this.options.markerEditable&&t.pm.enable()},_finishShape(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._centerMarker.getLatLng(),i=this._defaultRadius;if(this.options[this._editableOption]){let t=this._hintMarker.getLatLng();i=this._distanceCalculation(e,t),this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?i=this.options[this._minRadiusOption]:this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(i=this.options[this._maxRadiusOption])}let n={...this.options.pathOptions,radius:i},s=new this._BaseCircleClass(e,n);this._setPane(s,"layerPane"),this._finishLayer(s),s.addTo(this._map.pm._getContainingLayer()),s.pm&&s.pm._updateHiddenPolyCircle(),this._fireCreate(s);let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_getNewDestinationOfHintMarker(){let t=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return t;let e=this._centerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?t=Re(this._map,e,t,this._getMinDistanceInMeter()):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(t=Re(this._map,e,t,this._getMaxDistanceInMeter()))}return t},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]||this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption])&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng)}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){var t,e;let i={};L.extend(i,this.options.templineStyle),this.options[this._editableOption]&&(i.radius=0),null==(t=this._layer)||t.setStyle(i),null==(e=this._hintline)||e.setStyle(this.options.hintlineStyle)},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))}}),qe.Circle=qe.CircleMarker.extend({initialize(t){this._map=t,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(t,e){return this._map.distance(t,e)}});var li=function(t){if(!t)throw new Error("geojson is required");var e=[];return hi(t,function(t){!function(t,e){var i=[],n=t.geometry;if(null!==n){switch(n.type){case"Polygon":i=ni(n);break;case"LineString":i=[ni(n)]}i.forEach(function(i){var n=function(t,e){var i=[];return t.reduce(function(t,n){var s=Xe([t,n],e);return s.bbox=function(t,e){var i=t[0],n=t[1],s=e[0],o=e[1],a=i<s?i:s,r=n<o?n:o,h=i>s?i:s,l=n>o?n:o;return[a,r,h,l]}(t,n),i.push(s),n}),i}(i,t.properties);n.forEach(function(t){t.id=e.length,e.push(t)})})}}(t,e)}),$e(e)},ui=c(fe(),1);function ci(t,e){var i=ni(t),n=ni(e);if(2!==i.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var s=i[0][0],o=i[0][1],a=i[1][0],r=i[1][1],h=n[0][0],l=n[0][1],u=n[1][0],c=n[1][1],p=(c-l)*(a-s)-(u-h)*(r-o);if(0===p)return null;var d=((u-h)*(o-l)-(c-l)*(s-h))/p,_=((a-s)*(o-l)-(r-o)*(s-h))/p;return d>=0&&d<=1&&_>=0&&_<=1?We([s+d*(a-s),o+d*(r-o)]):null}var pi=function(t,e){var i={},n=[];if("LineString"===t.type&&(t=Ke(t)),"LineString"===e.type&&(e=Ke(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var s=ci(t,e);return s&&n.push(s),$e(n)}var o=(0,ui.default)();return o.load(li(e)),ri(li(t),function(t){ri(o.search(t),function(e){var s=ci(t,e);if(s){var o=ni(s).join(",");i[o]||(i[o]=!0,n.push(s))}})}),$e(n)},di=c(fe(),1);var _i=function(t,e,i){void 0===i&&(i={});var n=ii(t),s=ii(e),o=Je(s[1]-n[1]),a=Je(s[0]-n[0]),r=Je(n[1]),h=Je(s[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(r)*Math.cos(h);return function(t,e){void 0===e&&(e="kilometers");var i=Ve[e];if(!i)throw new Error(e+" units is invalid");return t*i}(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),i.units)};var mi=function(t){var e=t[0],i=t[1],n=t[2],s=t[3];if(_i(t.slice(0,2),[n,i])>=_i(t.slice(0,2),[e,s])){var o=(i+s)/2;return[e,o-(n-e)/2,n,o+(n-e)/2]}var a=(e+n)/2;return[a-(s-i)/2,i,a+(s-i)/2,s]};function gi(t){var e=[1/0,1/0,-1/0,-1/0];return ai(t,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}gi.default=gi;var fi=gi;var yi=function(t,e){void 0===e&&(e={});var i=e.precision,n=e.coordinates,s=e.mutate;if(i=null==i||isNaN(i)?6:i,n=null==n||isNaN(n)?3:n,!t)throw new Error("<geojson> is required");if("number"!=typeof i)throw new Error("<precision> must be a number");if("number"!=typeof n)throw new Error("<coordinates> must be a number");(!1===s||void 0===s)&&(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,i);return ai(t,function(t){!function(t,e,i){t.length>i&&t.splice(i,t.length);for(var n=0;n<t.length;n++)t[n]=Math.round(t[n]*e)/e}(t,o,n)}),t};function Ai(t,e,i){if(void 0===i&&(i={}),!0===i.final)return function(t,e){var i=Ai(e,t);return i=(i+180)%360,i}(t,e);var n=ii(t),s=ii(e),o=Je(n[0]),a=Je(s[0]),r=Je(n[1]),h=Je(s[1]),l=Math.sin(a-o)*Math.cos(h),u=Math.cos(r)*Math.sin(h)-Math.sin(r)*Math.cos(h)*Math.cos(a-o);return Ye(Math.atan2(l,u))}function vi(t,e,i,n){void 0===n&&(n={});var s=ii(t),o=Je(s[0]),a=Je(s[1]),r=Je(i),h=function(t,e){void 0===e&&(e="kilometers");var i=Ve[e];if(!i)throw new Error(e+" units is invalid");return t/i}(e,n.units),l=Math.asin(Math.sin(a)*Math.cos(h)+Math.cos(a)*Math.sin(h)*Math.cos(r));return We([Ye(o+Math.atan2(Math.sin(r)*Math.sin(h)*Math.cos(a),Math.cos(h)-Math.sin(a)*Math.sin(l))),Ye(l)],n.properties)}var Mi=function(t,e,i){void 0===i&&(i={});var n=We([1/0,1/0],{dist:1/0}),s=0;return hi(t,function(t){for(var o=ni(t),a=0;a<o.length-1;a++){var r=We(o[a]);r.properties.dist=_i(e,r,i);var h=We(o[a+1]);h.properties.dist=_i(e,h,i);var l=_i(r,h,i),u=Math.max(r.properties.dist,h.properties.dist),c=Ai(r,h),p=vi(e,u,c+90,i),d=vi(e,u,c-90,i),_=pi(Xe([p.geometry.coordinates,d.geometry.coordinates]),Xe([r.geometry.coordinates,h.geometry.coordinates])),m=null;_.features.length>0&&((m=_.features[0]).properties.dist=_i(e,m,i),m.properties.location=s+_i(r,m,i)),r.properties.dist<n.properties.dist&&((n=r).properties.index=a,n.properties.location=s),h.properties.dist<n.properties.dist&&((n=h).properties.index=a+1,n.properties.location=s+l),m&&m.properties.dist<n.properties.dist&&((n=m).properties.index=a),s+=l}}),n};function Li(t,e){var i=[],n=(0,di.default)();return hi(e,function(e){if(i.forEach(function(t,e){t.id=e}),i.length){var s=n.search(e);if(s.features.length){var o=bi(e,s);i=i.filter(function(t){return t.id!==o.id}),n.remove(o),ri(xi(o,e),function(t){i.push(t),n.insert(t)})}}else(i=xi(t,e).features).forEach(function(t){t.bbox||(t.bbox=mi(fi(t)))}),n.load($e(i))}),$e(i)}function xi(t,e){var i=[],n=ni(t)[0],s=ni(t)[t.geometry.coordinates.length-1];if(wi(n,ii(e))||wi(s,ii(e)))return $e([t]);var o=(0,di.default)(),a=li(t);o.load(a);var r=o.search(e);if(!r.features.length)return $e([t]);var h=bi(e,r),l=function(t,e,i){var n=i;return ri(t,function(t,s){n=0===s&&void 0===i?t:e(n,t,s)}),n}(a,function(t,n,s){var o=ni(n)[1],a=ii(e);return s===h.id?(t.push(a),i.push(Xe(t)),wi(a,o)?[a]:[a,o]):(t.push(o),t)},[n]);return l.length>1&&i.push(Xe(l)),$e(i)}function bi(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var i,n=1/0;return ri(e,function(e){var s=Mi(e,t).properties.dist;s<n&&(i=e,n=s)}),i}function wi(t,e){return t[0]===e[0]&&t[1]===e[1]}var Pi=function(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var i=oi(t),n=oi(e);if("LineString"!==i)throw new Error("line must be LineString");if("FeatureCollection"===n)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===n)throw new Error("splitter cannot be a GeometryCollection");var s=yi(e,{precision:7});switch(n){case"Point":return xi(t,s);case"MultiPoint":return Li(t,s);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return Li(t,pi(t,s))}};function ki(t,e,i){if(void 0===i&&(i={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n=ii(t),s=si(e),o=s.type,a=e.bbox,r=s.coordinates;if(a&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(n,a))return!1;"Polygon"===o&&(r=[r]);for(var h=!1,l=0;l<r.length&&!h;l++)if(Ei(n,r[l][0],i.ignoreBoundary)){for(var u=!1,c=1;c<r[l].length&&!u;)Ei(n,r[l][c],!i.ignoreBoundary)&&(u=!0),c++;u||(h=!0)}return h}function Ei(t,e,i){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var s=0,o=e.length-1;s<e.length;o=s++){var a=e[s][0],r=e[s][1],h=e[o][0],l=e[o][1];if(t[1]*(a-h)+r*(h-t[0])+l*(t[0]-a)===0&&(a-t[0])*(h-t[0])<=0&&(r-t[1])*(l-t[1])<=0)return!i;r>t[1]!=l>t[1]&&t[0]<(h-a)*(t[1]-r)/(l-r)+a&&(n=!n)}return n}function Ci(t,e,i,n,s){var o=i[0],a=i[1],r=t[0],h=t[1],l=e[0],u=e[1],c=l-r,p=u-h,d=(i[0]-r)*p-(i[1]-h)*c;if(null!==s){if(Math.abs(d)>s)return!1}else if(0!==d)return!1;return n?"start"===n?Math.abs(c)>=Math.abs(p)?c>0?r<o&&o<=l:l<=o&&o<r:p>0?h<a&&a<=u:u<=a&&a<h:"end"===n?Math.abs(c)>=Math.abs(p)?c>0?r<=o&&o<l:l<o&&o<=r:p>0?h<=a&&a<u:u<a&&a<=h:"both"===n&&(Math.abs(c)>=Math.abs(p)?c>0?r<o&&o<l:l<o&&o<r:p>0?h<a&&a<u:u<a&&a<h):Math.abs(c)>=Math.abs(p)?c>0?r<=o&&o<=l:l<=o&&o<=r:p>0?h<=a&&a<=u:u<=a&&a<=h}var Si=function(t,e,i){void 0===i&&(i={});for(var n=ii(t),s=ni(e),o=0;o<s.length-1;o++){var a=!1;if(i.ignoreEndVertices&&(0===o&&(a="start"),o===s.length-2&&(a="end"),0===o&&o+1===s.length-1&&(a="both")),Ci(s[o],s[o+1],n,a,typeof i.epsilon>"u"?null:i.epsilon))return!0}return!1};function Ti(t,e){var i=si(t),n=si(e),s=i.type,o=n.type,a=i.coordinates,r=n.coordinates;switch(s){case"Point":if("Point"===o)return Oi(a,r);throw new Error("feature2 "+o+" geometry not supported");case"MultiPoint":switch(o){case"Point":return function(t,e){var i,n=!1;for(i=0;i<t.coordinates.length;i++)if(Oi(t.coordinates[i],e.coordinates)){n=!0;break}return n}(i,n);case"MultiPoint":return function(t,e){for(var i=0,n=e.coordinates;i<n.length;i++){for(var s=n[i],o=!1,a=0,r=t.coordinates;a<r.length;a++){if(Oi(s,r[a])){o=!0;break}}if(!o)return!1}return!0}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"Point":return Si(n,i,{ignoreEndVertices:!0});case"LineString":return function(t,e){for(var i=!1,n=0,s=e.coordinates;n<s.length;n++){var o=s[n];if(Si({type:"Point",coordinates:o},t,{ignoreEndVertices:!0})&&(i=!0),!Si({type:"Point",coordinates:o},t,{ignoreEndVertices:!1}))return!1}return i}(i,n);case"MultiPoint":return function(t,e){for(var i=!1,n=0,s=e.coordinates;n<s.length;n++){var o=s[n];if(Si(o,t,{ignoreEndVertices:!0})&&(i=!0),!Si(o,t))return!1}return!!i}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Point":return ki(n,i,{ignoreBoundary:!0});case"LineString":return function(t,e){var i=!1,n=0,s=fi(t),o=fi(e);if(!Bi(s,o))return!1;for(;n<e.coordinates.length-1;n++){if(ki({type:"Point",coordinates:Di(e.coordinates[n],e.coordinates[n+1])},t,{ignoreBoundary:!0})){i=!0;break}}return i}(i,n);case"Polygon":return function(t,e){if("Feature"===t.type&&null===t.geometry||"Feature"===e.type&&null===e.geometry)return!1;var i=fi(t),n=fi(e);if(!Bi(i,n))return!1;for(var s=si(e).coordinates,o=0,a=s;o<a.length;o++)for(var r=a[o],h=0,l=r;h<l.length;h++){if(!ki(l[h],t))return!1}return!0}(i,n);case"MultiPoint":return function(t,e){for(var i=0,n=e.coordinates;i<n.length;i++){if(!ki(n[i],t,{ignoreBoundary:!0}))return!1}return!0}(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+s+" geometry not supported")}}function Bi(t,e){return!(t[0]>e[0]||t[2]<e[2]||t[1]>e[1]||t[3]<e[3])}function Oi(t,e){return t[0]===e[0]&&t[1]===e[1]}function Di(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}var Ri=c(pe()),Ii=t=>()=>t,zi=t=>{let e=t?(e,i)=>i.minus(e).abs().isLessThanOrEqualTo(t):Ii(!1);return(t,i)=>e(t,i)?0:t.comparedTo(i)};function Gi(t){let e=t?(e,i,n,s,o)=>e.exponentiatedBy(2).isLessThanOrEqualTo(s.minus(i).exponentiatedBy(2).plus(o.minus(n).exponentiatedBy(2)).times(t)):Ii(!1);return(t,i,n)=>{let s=t.x,o=t.y,a=n.x,r=n.y,h=o.minus(r).times(i.x.minus(a)).minus(s.minus(a).times(i.y.minus(r)));return e(h,s,o,a,r)?0:h.comparedTo(0)}}var Ni=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ji=Math.ceil,Fi=Math.floor,Ui="[BigNumber Error] ",Zi=Ui+"Number primitive has more than 15 significant digits: ",qi=1e14,Hi=14,Vi=9007199254740991,Ki=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Wi=1e7,Xi=1e9;function $i(t){var e=0|t;return t>0||t===e?e:e-1}function Yi(t){for(var e,i,n=1,s=t.length,o=t[0]+"";n<s;){for(e=t[n++]+"",i=Hi-e.length;i--;e="0"+e);o+=e}for(s=o.length;48===o.charCodeAt(--s););return o.slice(0,s+1||1)}function Ji(t,e){var i,n,s=t.c,o=e.c,a=t.s,r=e.s,h=t.e,l=e.e;if(!a||!r)return null;if(i=s&&!s[0],n=o&&!o[0],i||n)return i?n?0:-r:a;if(a!=r)return a;if(i=a<0,n=h==l,!s||!o)return n?0:!s^i?1:-1;if(!n)return h>l^i?1:-1;for(r=(h=s.length)<(l=o.length)?h:l,a=0;a<r;a++)if(s[a]!=o[a])return s[a]>o[a]^i?1:-1;return h==l?0:h>l^i?1:-1}function Qi(t,e,i,n){if(t<e||t>i||t!==Fi(t))throw Error(Ui+(n||"Argument")+("number"==typeof t?t<e||t>i?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function tn(t){var e=t.c.length-1;return $i(t.e/Hi)==e&&t.c[e]%2!=0}function en(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function nn(t,e,i){var n,s;if(e<0){for(s=i+".";++e;s+=i);t=s+t}else if(++e>(n=t.length)){for(s=i,e-=n;--e;s+=i);t+=s}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}var sn=function t(e){var i,n,s,o,a,r=M.prototype={constructor:M,toString:null,valueOf:null},h=new M(1),l=20,u=4,c=-7,p=21,d=-1e7,_=1e7,m=!1,g=1,f=0,y={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",v=!0;function M(t,e){var i,o,a,r,h,c,p,m,g=this;if(!(g instanceof M))return new M(t,e);if(null==e){if(t&&!0===t._isBigNumber)return g.s=t.s,void(!t.c||t.e>_?g.c=g.e=null:t.e<d?g.c=[g.e=0]:(g.e=t.e,g.c=t.c.slice()));if((c="number"==typeof t)&&0*t==0){if(g.s=1/t<0?(t=-t,-1):1,t===~~t){for(r=0,h=t;h>=10;h/=10,r++);return void(r>_?g.c=g.e=null:(g.e=r,g.c=[t]))}m=String(t)}else{if(!Ni.test(m=String(t)))return s(g,m,c);g.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(r=m.indexOf("."))>-1&&(m=m.replace(".","")),(h=m.search(/e/i))>0?(r<0&&(r=h),r+=+m.slice(h+1),m=m.substring(0,h)):r<0&&(r=m.length)}else{if(Qi(e,2,A.length,"Base"),10==e&&v)return w(g=new M(t),l+g.e+1,u);if(m=String(t),c="number"==typeof t){if(0*t!=0)return s(g,m,c,e);if(g.s=1/t<0?(m=m.slice(1),-1):1,M.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(Zi+t)}else g.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(i=A.slice(0,e),r=h=0,p=m.length;h<p;h++)if(i.indexOf(o=m.charAt(h))<0){if("."==o){if(h>r){r=p;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,h=-1,r=0;continue}return s(g,String(t),c,e)}c=!1,(r=(m=n(m,e,10,g.s)).indexOf("."))>-1?m=m.replace(".",""):r=m.length}for(h=0;48===m.charCodeAt(h);h++);for(p=m.length;48===m.charCodeAt(--p););if(m=m.slice(h,++p)){if(p-=h,c&&M.DEBUG&&p>15&&(t>Vi||t!==Fi(t)))throw Error(Zi+g.s*t);if((r=r-h-1)>_)g.c=g.e=null;else if(r<d)g.c=[g.e=0];else{if(g.e=r,g.c=[],h=(r+1)%Hi,r<0&&(h+=Hi),h<p){for(h&&g.c.push(+m.slice(0,h)),p-=Hi;h<p;)g.c.push(+m.slice(h,h+=Hi));h=Hi-(m=m.slice(h)).length}else h-=p;for(;h--;m+="0");g.c.push(+m)}}else g.c=[g.e=0]}function L(t,e,i,n){var s,o,a,r,h;if(null==i?i=u:Qi(i,0,8),!t.c)return t.toString();if(s=t.c[0],a=t.e,null==e)h=Yi(t.c),h=1==n||2==n&&(a<=c||a>=p)?en(h,a):nn(h,a,"0");else if(o=(t=w(new M(t),e,i)).e,r=(h=Yi(t.c)).length,1==n||2==n&&(e<=o||o<=c)){for(;r<e;h+="0",r++);h=en(h,o)}else if(e-=a,h=nn(h,o,"0"),o+1>r){if(--e>0)for(h+=".";e--;h+="0");}else if((e+=o-r)>0)for(o+1==r&&(h+=".");e--;h+="0");return t.s<0&&s?"-"+h:h}function x(t,e){for(var i,n,s=1,o=new M(t[0]);s<t.length;s++)(!(n=new M(t[s])).s||(i=Ji(o,n))===e||0===i&&o.s===e)&&(o=n);return o}function b(t,e,i){for(var n=1,s=e.length;!e[--s];e.pop());for(s=e[0];s>=10;s/=10,n++);return(i=n+i*Hi-1)>_?t.c=t.e=null:i<d?t.c=[t.e=0]:(t.e=i,t.c=e),t}function w(t,e,i,n){var s,o,a,r,h,l,u,c=t.c,p=Ki;if(c){t:{for(s=1,r=c[0];r>=10;r/=10,s++);if((o=e-s)<0)o+=Hi,a=e,h=c[l=0],u=Fi(h/p[s-a-1]%10);else if((l=ji((o+1)/Hi))>=c.length){if(!n)break t;for(;c.length<=l;c.push(0));h=u=0,s=1,a=(o%=Hi)-Hi+1}else{for(h=r=c[l],s=1;r>=10;r/=10,s++);u=(a=(o%=Hi)-Hi+s)<0?0:Fi(h/p[s-a-1]%10)}if(n=n||e<0||null!=c[l+1]||(a<0?h:h%p[s-a-1]),n=i<4?(u||n)&&(0==i||i==(t.s<0?3:2)):u>5||5==u&&(4==i||n||6==i&&(o>0?a>0?h/p[s-a]:0:c[l-1])%10&1||i==(t.s<0?8:7)),e<1||!c[0])return c.length=0,n?(e-=t.e+1,c[0]=p[(Hi-e%Hi)%Hi],t.e=-e||0):c[0]=t.e=0,t;if(0==o?(c.length=l,r=1,l--):(c.length=l+1,r=p[Hi-o],c[l]=a>0?Fi(h/p[s-a]%p[a])*r:0),n)for(;;){if(0==l){for(o=1,a=c[0];a>=10;a/=10,o++);for(a=c[0]+=r,r=1;a>=10;a/=10,r++);o!=r&&(t.e++,c[0]==qi&&(c[0]=1));break}if(c[l]+=r,c[l]!=qi)break;c[l--]=0,r=1}for(o=c.length;0===c[--o];c.pop());}t.e>_?t.c=t.e=null:t.e<d&&(t.c=[t.e=0])}return t}function P(t){var e,i=t.e;return null===i?t.toString():(e=Yi(t.c),e=i<=c||i>=p?en(e,i):nn(e,i,"0"),t.s<0?"-"+e:e)}return M.clone=t,M.ROUND_UP=0,M.ROUND_DOWN=1,M.ROUND_CEIL=2,M.ROUND_FLOOR=3,M.ROUND_HALF_UP=4,M.ROUND_HALF_DOWN=5,M.ROUND_HALF_EVEN=6,M.ROUND_HALF_CEIL=7,M.ROUND_HALF_FLOOR=8,M.EUCLID=9,M.config=M.set=function(t){var e,i;if(null!=t){if("object"!=typeof t)throw Error(Ui+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(Qi(i=t[e],0,Xi,e),l=i),t.hasOwnProperty(e="ROUNDING_MODE")&&(Qi(i=t[e],0,8,e),u=i),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((i=t[e])&&i.pop?(Qi(i[0],-Xi,0,e),Qi(i[1],0,Xi,e),c=i[0],p=i[1]):(Qi(i,-Xi,Xi,e),c=-(p=i<0?-i:i))),t.hasOwnProperty(e="RANGE"))if((i=t[e])&&i.pop)Qi(i[0],-Xi,-1,e),Qi(i[1],1,Xi,e),d=i[0],_=i[1];else{if(Qi(i,-Xi,Xi,e),!i)throw Error(Ui+e+" cannot be zero: "+i);d=-(_=i<0?-i:i)}if(t.hasOwnProperty(e="CRYPTO")){if((i=t[e])!==!!i)throw Error(Ui+e+" not true or false: "+i);if(i){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw m=!i,Error(Ui+"crypto unavailable");m=i}else m=i}if(t.hasOwnProperty(e="MODULO_MODE")&&(Qi(i=t[e],0,9,e),g=i),t.hasOwnProperty(e="POW_PRECISION")&&(Qi(i=t[e],0,Xi,e),f=i),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(i=t[e]))throw Error(Ui+e+" not an object: "+i);y=i}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(i=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(i))throw Error(Ui+e+" invalid: "+i);v="0123456789"==i.slice(0,10),A=i}}return{DECIMAL_PLACES:l,ROUNDING_MODE:u,EXPONENTIAL_AT:[c,p],RANGE:[d,_],CRYPTO:m,MODULO_MODE:g,POW_PRECISION:f,FORMAT:y,ALPHABET:A}},M.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!M.DEBUG)return!0;var e,i,n=t.c,s=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&s>=-Xi&&s<=Xi&&s===Fi(s)){if(0===n[0]){if(0===s&&1===n.length)return!0;break t}if((e=(s+1)%Hi)<1&&(e+=Hi),String(n[0]).length==e){for(e=0;e<n.length;e++)if((i=n[e])<0||i>=qi||i!==Fi(i))break t;if(0!==i)return!0}}}else if(null===n&&null===s&&(null===o||1===o||-1===o))return!0;throw Error(Ui+"Invalid BigNumber: "+t)},M.maximum=M.max=function(){return x(arguments,-1)},M.minimum=M.min=function(){return x(arguments,1)},M.random=(o=9007199254740992,a=Math.random()*o&2097151?function(){return Fi(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,i,n,s,o,r=0,u=[],c=new M(h);if(null==t?t=l:Qi(t,0,Xi),s=ji(t/Hi),m)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(s*=2));r<s;)(o=131072*e[r]+(e[r+1]>>>11))>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),e[r]=i[0],e[r+1]=i[1]):(u.push(o%1e14),r+=2);r=s/2}else{if(!crypto.randomBytes)throw m=!1,Error(Ui+"crypto unavailable");for(e=crypto.randomBytes(s*=7);r<s;)(o=281474976710656*(31&e[r])+1099511627776*e[r+1]+4294967296*e[r+2]+16777216*e[r+3]+(e[r+4]<<16)+(e[r+5]<<8)+e[r+6])>=9e15?crypto.randomBytes(7).copy(e,r):(u.push(o%1e14),r+=7);r=s/7}if(!m)for(;r<s;)(o=a())<9e15&&(u[r++]=o%1e14);for(s=u[--r],t%=Hi,s&&t&&(o=Ki[Hi-t],u[r]=Fi(s/o)*o);0===u[r];u.pop(),r--);if(r<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=Hi);for(r=1,o=u[0];o>=10;o/=10,r++);r<Hi&&(n-=Hi-r)}return c.e=n,c.c=u,c}),M.sum=function(){for(var t=1,e=arguments,i=new M(e[0]);t<e.length;)i=i.plus(e[t++]);return i},n=function(){var t="0123456789";function e(t,e,i,n){for(var s,o,a=[0],r=0,h=t.length;r<h;){for(o=a.length;o--;a[o]*=e);for(a[0]+=n.indexOf(t.charAt(r++)),s=0;s<a.length;s++)a[s]>i-1&&(null==a[s+1]&&(a[s+1]=0),a[s+1]+=a[s]/i|0,a[s]%=i)}return a.reverse()}return function(n,s,o,a,r){var h,c,p,d,_,m,g,y,v=n.indexOf("."),L=l,x=u;for(v>=0&&(d=f,f=0,n=n.replace(".",""),m=(y=new M(s)).pow(n.length-v),f=d,y.c=e(nn(Yi(m.c),m.e,"0"),10,o,t),y.e=y.c.length),p=d=(g=e(n,s,o,r?(h=A,t):(h=t,A))).length;0==g[--d];g.pop());if(!g[0])return h.charAt(0);if(v<0?--p:(m.c=g,m.e=p,m.s=a,g=(m=i(m,y,L,x,o)).c,_=m.r,p=m.e),v=g[c=p+L+1],d=o/2,_=_||c<0||null!=g[c+1],_=x<4?(null!=v||_)&&(0==x||x==(m.s<0?3:2)):v>d||v==d&&(4==x||_||6==x&&1&g[c-1]||x==(m.s<0?8:7)),c<1||!g[0])n=_?nn(h.charAt(1),-L,h.charAt(0)):h.charAt(0);else{if(g.length=c,_)for(--o;++g[--c]>o;)g[c]=0,c||(++p,g=[1].concat(g));for(d=g.length;!g[--d];);for(v=0,n="";v<=d;n+=h.charAt(g[v++]));n=nn(n,p,h.charAt(0))}return n}}(),i=function(){function t(t,e,i){var n,s,o,a,r=0,h=t.length,l=e%Wi,u=e/Wi|0;for(t=t.slice();h--;)r=((s=l*(o=t[h]%Wi)+(n=u*o+(a=t[h]/Wi|0)*l)%Wi*Wi+r)/i|0)+(n/Wi|0)+u*a,t[h]=s%i;return r&&(t=[r].concat(t)),t}function e(t,e,i,n){var s,o;if(i!=n)o=i>n?1:-1;else for(s=o=0;s<i;s++)if(t[s]!=e[s]){o=t[s]>e[s]?1:-1;break}return o}function i(t,e,i,n){for(var s=0;i--;)t[i]-=s,s=t[i]<e[i]?1:0,t[i]=s*n+t[i]-e[i];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,s,o,a,r){var h,l,u,c,p,d,_,m,g,f,y,A,v,L,x,b,P,k=n.s==s.s?1:-1,E=n.c,C=s.c;if(!(E&&E[0]&&C&&C[0]))return new M(n.s&&s.s&&(E?!C||E[0]!=C[0]:C)?E&&0==E[0]||!C?0*k:k/0:NaN);for(g=(m=new M(k)).c=[],k=o+(l=n.e-s.e)+1,r||(r=qi,l=$i(n.e/Hi)-$i(s.e/Hi),k=k/Hi|0),u=0;C[u]==(E[u]||0);u++);if(C[u]>(E[u]||0)&&l--,k<0)g.push(1),c=!0;else{for(L=E.length,b=C.length,u=0,k+=2,(p=Fi(r/(C[0]+1)))>1&&(C=t(C,p,r),E=t(E,p,r),b=C.length,L=E.length),v=b,y=(f=E.slice(0,b)).length;y<b;f[y++]=0);P=C.slice(),P=[0].concat(P),x=C[0],C[1]>=r/2&&x++;do{if(p=0,(h=e(C,f,b,y))<0){if(A=f[0],b!=y&&(A=A*r+(f[1]||0)),(p=Fi(A/x))>1)for(p>=r&&(p=r-1),_=(d=t(C,p,r)).length,y=f.length;1==e(d,f,_,y);)p--,i(d,b<_?P:C,_,r),_=d.length,h=1;else 0==p&&(h=p=1),_=(d=C.slice()).length;if(_<y&&(d=[0].concat(d)),i(f,d,y,r),y=f.length,-1==h)for(;e(C,f,b,y)<1;)p++,i(f,b<y?P:C,y,r),y=f.length}else 0===h&&(p++,f=[0]);g[u++]=p,f[0]?f[y++]=E[v]||0:(f=[E[v]],y=1)}while((v++<L||null!=f[0])&&k--);c=null!=f[0],g[0]||g.splice(0,1)}if(r==qi){for(u=1,k=g[0];k>=10;k/=10,u++);w(m,o+(m.e=u+l*Hi-1)+1,a,c)}else m.e=l,m.r=+c;return m}}(),s=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,i=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,s=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,r,h){var l,u=r?a:a.replace(s,"");if(n.test(u))o.s=isNaN(u)?null:u<0?-1:1;else{if(!r&&(u=u.replace(t,function(t,e,i){return l="x"==(i=i.toLowerCase())?16:"b"==i?2:8,h&&h!=l?t:e}),h&&(l=h,u=u.replace(e,"$1").replace(i,"0.$1")),a!=u))return new M(u,l);if(M.DEBUG)throw Error(Ui+"Not a"+(h?" base "+h:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),r.absoluteValue=r.abs=function(){var t=new M(this);return t.s<0&&(t.s=1),t},r.comparedTo=function(t,e){return Ji(this,new M(t,e))},r.decimalPlaces=r.dp=function(t,e){var i,n,s,o=this;if(null!=t)return Qi(t,0,Xi),null==e?e=u:Qi(e,0,8),w(new M(o),t+o.e+1,e);if(!(i=o.c))return null;if(n=((s=i.length-1)-$i(this.e/Hi))*Hi,s=i[s])for(;s%10==0;s/=10,n--);return n<0&&(n=0),n},r.dividedBy=r.div=function(t,e){return i(this,new M(t,e),l,u)},r.dividedToIntegerBy=r.idiv=function(t,e){return i(this,new M(t,e),0,1)},r.exponentiatedBy=r.pow=function(t,e){var i,n,s,o,a,r,l,c,p=this;if((t=new M(t)).c&&!t.isInteger())throw Error(Ui+"Exponent not an integer: "+P(t));if(null!=e&&(e=new M(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return c=new M(Math.pow(+P(p),a?t.s*(2-tn(t)):+P(t))),e?c.mod(e):c;if(r=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new M(NaN);(n=!r&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&tn(t)?-0:0,p.e>-1&&(o=1/o),new M(r?1/o:o);f&&(o=ji(f/Hi+2))}for(a?(i=new M(.5),r&&(t.s=1),l=tn(t)):l=(s=Math.abs(+P(t)))%2,c=new M(h);;){if(l){if(!(c=c.times(p)).c)break;o?c.c.length>o&&(c.c.length=o):n&&(c=c.mod(e))}if(s){if(0===(s=Fi(s/2)))break;l=s%2}else if(w(t=t.times(i),t.e+1,1),t.e>14)l=tn(t);else{if(0===(s=+P(t)))break;l=s%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?c:(r&&(c=h.div(c)),e?c.mod(e):o?w(c,f,u,undefined):c)},r.integerValue=function(t){var e=new M(this);return null==t?t=u:Qi(t,0,8),w(e,e.e+1,t)},r.isEqualTo=r.eq=function(t,e){return 0===Ji(this,new M(t,e))},r.isFinite=function(){return!!this.c},r.isGreaterThan=r.gt=function(t,e){return Ji(this,new M(t,e))>0},r.isGreaterThanOrEqualTo=r.gte=function(t,e){return 1===(e=Ji(this,new M(t,e)))||0===e},r.isInteger=function(){return!!this.c&&$i(this.e/Hi)>this.c.length-2},r.isLessThan=r.lt=function(t,e){return Ji(this,new M(t,e))<0},r.isLessThanOrEqualTo=r.lte=function(t,e){return-1===(e=Ji(this,new M(t,e)))||0===e},r.isNaN=function(){return!this.s},r.isNegative=function(){return this.s<0},r.isPositive=function(){return this.s>0},r.isZero=function(){return!!this.c&&0==this.c[0]},r.minus=function(t,e){var i,n,s,o,a=this,r=a.s;if(e=(t=new M(t,e)).s,!r||!e)return new M(NaN);if(r!=e)return t.s=-e,a.plus(t);var h=a.e/Hi,l=t.e/Hi,c=a.c,p=t.c;if(!h||!l){if(!c||!p)return c?(t.s=-e,t):new M(p?a:NaN);if(!c[0]||!p[0])return p[0]?(t.s=-e,t):new M(c[0]?a:3==u?-0:0)}if(h=$i(h),l=$i(l),c=c.slice(),r=h-l){for((o=r<0)?(r=-r,s=c):(l=h,s=p),s.reverse(),e=r;e--;s.push(0));s.reverse()}else for(n=(o=(r=c.length)<(e=p.length))?r:e,r=e=0;e<n;e++)if(c[e]!=p[e]){o=c[e]<p[e];break}if(o&&(s=c,c=p,p=s,t.s=-t.s),(e=(n=p.length)-(i=c.length))>0)for(;e--;c[i++]=0);for(e=qi-1;n>r;){if(c[--n]<p[n]){for(i=n;i&&!c[--i];c[i]=e);--c[i],c[n]+=qi}c[n]-=p[n]}for(;0==c[0];c.splice(0,1),--l);return c[0]?b(t,c,l):(t.s=3==u?-1:1,t.c=[t.e=0],t)},r.modulo=r.mod=function(t,e){var n,s,o=this;return t=new M(t,e),!o.c||!t.s||t.c&&!t.c[0]?new M(NaN):!t.c||o.c&&!o.c[0]?new M(o):(9==g?(s=t.s,t.s=1,n=i(o,t,0,3),t.s=s,n.s*=s):n=i(o,t,0,g),!(t=o.minus(n.times(t))).c[0]&&1==g&&(t.s=o.s),t)},r.multipliedBy=r.times=function(t,e){var i,n,s,o,a,r,h,l,u,c,p,d,_,m,g,f=this,y=f.c,A=(t=new M(t,e)).c;if(!(y&&A&&y[0]&&A[0]))return!f.s||!t.s||y&&!y[0]&&!A||A&&!A[0]&&!y?t.c=t.e=t.s=null:(t.s*=f.s,y&&A?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=$i(f.e/Hi)+$i(t.e/Hi),t.s*=f.s,(h=y.length)<(c=A.length)&&(_=y,y=A,A=_,s=h,h=c,c=s),s=h+c,_=[];s--;_.push(0));for(m=qi,g=Wi,s=c;--s>=0;){for(i=0,p=A[s]%g,d=A[s]/g|0,o=s+(a=h);o>s;)i=((l=p*(l=y[--a]%g)+(r=d*l+(u=y[a]/g|0)*p)%g*g+_[o]+i)/m|0)+(r/g|0)+d*u,_[o--]=l%m;_[o]=i}return i?++n:_.splice(0,1),b(t,_,n)},r.negated=function(){var t=new M(this);return t.s=-t.s||null,t},r.plus=function(t,e){var i,n=this,s=n.s;if(e=(t=new M(t,e)).s,!s||!e)return new M(NaN);if(s!=e)return t.s=-e,n.minus(t);var o=n.e/Hi,a=t.e/Hi,r=n.c,h=t.c;if(!o||!a){if(!r||!h)return new M(s/0);if(!r[0]||!h[0])return h[0]?t:new M(r[0]?n:0*s)}if(o=$i(o),a=$i(a),r=r.slice(),s=o-a){for(s>0?(a=o,i=h):(s=-s,i=r),i.reverse();s--;i.push(0));i.reverse()}for((s=r.length)-(e=h.length)<0&&(i=h,h=r,r=i,e=s),s=0;e;)s=(r[--e]=r[e]+h[e]+s)/qi|0,r[e]=qi===r[e]?0:r[e]%qi;return s&&(r=[s].concat(r),++a),b(t,r,a)},r.precision=r.sd=function(t,e){var i,n,s,o=this;if(null!=t&&t!==!!t)return Qi(t,1,Xi),null==e?e=u:Qi(e,0,8),w(new M(o),t,e);if(!(i=o.c))return null;if(n=(s=i.length-1)*Hi+1,s=i[s]){for(;s%10==0;s/=10,n--);for(s=i[0];s>=10;s/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},r.shiftedBy=function(t){return Qi(t,-Vi,Vi),this.times("1e"+t)},r.squareRoot=r.sqrt=function(){var t,e,n,s,o,a=this,r=a.c,h=a.s,c=a.e,p=l+4,d=new M("0.5");if(1!==h||!r||!r[0])return new M(!h||h<0&&(!r||r[0])?NaN:r?a:1/0);if(0==(h=Math.sqrt(+P(a)))||h==1/0?(((e=Yi(r)).length+c)%2==0&&(e+="0"),h=Math.sqrt(+e),c=$i((c+1)/2)-(c<0||c%2),h==1/0?e="5e"+c:e=(e=h.toExponential()).slice(0,e.indexOf("e")+1)+c,n=new M(e)):n=new M(h+""),n.c[0])for((h=(c=n.e)+p)<3&&(h=0);;)if(o=n,n=d.times(o.plus(i(a,o,p,1))),Yi(o.c).slice(0,h)===(e=Yi(n.c)).slice(0,h)){if(n.e<c&&--h,"9999"!=(e=e.slice(h-3,h+1))&&(s||"4999"!=e)){(!+e||!+e.slice(1)&&"5"==e.charAt(0))&&(w(n,n.e+l+2,1),t=!n.times(n).eq(a));break}if(!s&&(w(o,o.e+l+2,0),o.times(o).eq(a))){n=o;break}p+=4,h+=4,s=1}return w(n,n.e+l+1,u,t)},r.toExponential=function(t,e){return null!=t&&(Qi(t,0,Xi),t++),L(this,t,e,1)},r.toFixed=function(t,e){return null!=t&&(Qi(t,0,Xi),t=t+this.e+1),L(this,t,e)},r.toFormat=function(t,e,i){var n,s=this;if(null==i)null!=t&&e&&"object"==typeof e?(i=e,e=null):t&&"object"==typeof t?(i=t,t=e=null):i=y;else if("object"!=typeof i)throw Error(Ui+"Argument not an object: "+i);if(n=s.toFixed(t,e),s.c){var o,a=n.split("."),r=+i.groupSize,h=+i.secondaryGroupSize,l=i.groupSeparator||"",u=a[0],c=a[1],p=s.s<0,d=p?u.slice(1):u,_=d.length;if(h&&(o=r,r=h,h=o,_-=o),r>0&&_>0){for(o=_%r||r,u=d.substr(0,o);o<_;o+=r)u+=l+d.substr(o,r);h>0&&(u+=l+d.slice(o)),p&&(u="-"+u)}n=c?u+(i.decimalSeparator||"")+((h=+i.fractionGroupSize)?c.replace(new RegExp("\\d{"+h+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):c):u}return(i.prefix||"")+n+(i.suffix||"")},r.toFraction=function(t){var e,n,s,o,a,r,l,c,p,d,m,g,f=this,y=f.c;if(null!=t&&(!(l=new M(t)).isInteger()&&(l.c||1!==l.s)||l.lt(h)))throw Error(Ui+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+P(l));if(!y)return new M(f);for(e=new M(h),p=n=new M(h),s=c=new M(h),g=Yi(y),a=e.e=g.length-f.e-1,e.c[0]=Ki[(r=a%Hi)<0?Hi+r:r],t=!t||l.comparedTo(e)>0?a>0?e:p:l,r=_,_=1/0,l=new M(g),c.c[0]=0;d=i(l,e,0,1),1!=(o=n.plus(d.times(s))).comparedTo(t);)n=s,s=o,p=c.plus(d.times(o=p)),c=o,e=l.minus(d.times(o=e)),l=o;return o=i(t.minus(n),s,0,1),c=c.plus(o.times(p)),n=n.plus(o.times(s)),c.s=p.s=f.s,m=i(p,s,a*=2,u).minus(f).abs().comparedTo(i(c,n,a,u).minus(f).abs())<1?[p,s]:[c,n],_=r,m},r.toNumber=function(){return+P(this)},r.toPrecision=function(t,e){return null!=t&&Qi(t,1,Xi),L(this,t,e,2)},r.toString=function(t){var e,i=this,s=i.s,o=i.e;return null===o?s?(e="Infinity",s<0&&(e="-"+e)):e="NaN":(null==t?e=o<=c||o>=p?en(Yi(i.c),o):nn(Yi(i.c),o,"0"):10===t&&v?e=nn(Yi((i=w(new M(i),l+o+1,u)).c),i.e,"0"):(Qi(t,2,A.length,"Base"),e=n(nn(Yi(i.c),o,"0"),10,t,s,!0)),s<0&&i.c[0]&&(e="-"+e)),e},r.valueOf=r.toJSON=function(){return P(this)},r._isBigNumber=!0,r[Symbol.toStringTag]="BigNumber",r[Symbol.for("nodejs.util.inspect.custom")]=r.valueOf,null!=e&&M.set(e),M}(),on=sn,an=class{constructor(t){n(this,"key"),n(this,"left",null),n(this,"right",null),this.key=t}},rn=class extends an{constructor(t){super(t)}},hn=class{constructor(){n(this,"size",0),n(this,"modificationCount",0),n(this,"splayCount",0)}splay(t){let e=this.root;if(null==e)return this.compare(t,t),-1;let i,n=null,s=null,o=null,a=null,r=e,h=this.compare;for(;;)if(i=h(r.key,t),i>0){let e=r.left;if(null==e||(i=h(e.key,t),i>0&&(r.left=e.right,e.right=r,r=e,e=r.left,null==e)))break;null==n?s=r:n.left=r,n=r,r=e}else{if(!(i<0))break;{let e=r.right;if(null==e||(i=h(e.key,t),i<0&&(r.right=e.left,e.left=r,r=e,e=r.right,null==e)))break;null==o?a=r:o.right=r,o=r,r=e}}return null!=o&&(o.right=r.left,r.left=a),null!=n&&(n.left=r.right,r.right=s),this.root!==r&&(this.root=r,this.splayCount++),i}splayMin(t){let e=t,i=e.left;for(;null!=i;){let t=i;e.left=t.right,t.right=e,e=t,i=e.left}return e}splayMax(t){let e=t,i=e.right;for(;null!=i;){let t=i;e.right=t.left,t.left=e,e=t,i=e.right}return e}_delete(t){if(null==this.root||0!=this.splay(t))return null;let e=this.root,i=e,n=e.left;if(this.size--,null==n)this.root=e.right;else{let t=e.right;e=this.splayMax(n),e.right=t,this.root=e}return this.modificationCount++,i}addNewRoot(t,e){this.size++,this.modificationCount++;let i=this.root;null!=i?(e<0?(t.left=i,t.right=i.right,i.right=null):(t.right=i,t.left=i.left,i.left=null),this.root=t):this.root=t}_first(){let t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){let t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>t<e?-1:t>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},ln=class i extends hn{constructor(e,i){super(),n(this,"root",null),n(this,"compare"),n(this,"validKey"),n(this,t,"[object Set]"),this.compare=e??this.defaultCompare(),this.validKey=i??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(let e of t)this.delete(e)}forEach(t){let e,i=this[Symbol.iterator]();for(;e=i.next(),!e.done;)t(e.value,e.value,this)}add(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new rn(t),e),this}addAndReturn(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new rn(t),e),this.root.key}addAll(t){for(let e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)<0)return this.root.key;let e=this.root.left;if(null==e)return null;let i=e.right;for(;null!=i;)e=i,i=e.right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let i=e.left;for(;null!=i;)e=i,i=e.left;return e.key}retainAll(t){let e=new i(this.compare,this.validKey),n=this.modificationCount;for(let i of t){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(i)&&0==this.splay(i)&&e.add(this.root.key)}e.size!=this.size&&(this.root=e.root,this.size=e.size,this.modificationCount++)}lookup(t){return this.validKey(t)&&0==this.splay(t)?this.root.key:null}intersection(t){let e=new i(this.compare,this.validKey);for(let i of this)t.has(i)&&e.add(i);return e}difference(t){let e=new i(this.compare,this.validKey);for(let i of this)t.has(i)||e.add(i);return e}union(t){let e=this.clone();return e.addAll(t),e}clone(){let t=new i(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}copyNode(t){if(null==t)return null;let e=new rn(t.key);return function t(e,i){let n,s;do{if(n=e.left,s=e.right,null!=n){let e=new rn(n.key);i.left=e,t(n,e)}if(null!=s){let t=new rn(s.key);i.right=t,e=s,i=t}}while(null!=s)}(t,e),e}toSet(){return this.clone()}entries(){return new pn(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[(e=Symbol.iterator,t=Symbol.toStringTag,e)](){return new cn(this.wrap())}},un=class{constructor(t){n(this,"tree"),n(this,"path",new Array),n(this,"modificationCount",null),n(this,"splayCount"),this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},cn=class extends un{getValue(t){return t.key}},pn=class extends un{getValue(t){return[t.key,t.key]}},dn=t=>t,_n=t=>{if(t){let e=new ln(zi(t)),i=new ln(zi(t)),n=(t,e)=>e.addAndReturn(t),s=t=>({x:n(t.x,e),y:n(t.y,i)});return s({x:new on(0),y:new on(0)}),s}return dn},mn=t=>({set:t=>{gn=mn(t)},reset:()=>mn(t),compare:zi(t),snap:_n(t),orient:Gi(t)}),gn=mn(),fn=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),yn=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;let i=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,n=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},An=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),vn=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),Mn=t=>vn(t,t).sqrt(),Ln=(t,e,i)=>{let n={x:e.x.minus(t.x),y:e.y.minus(t.y)},s={x:i.x.minus(t.x),y:i.y.minus(t.y)};return An(s,n).div(Mn(s)).div(Mn(n))},xn=(t,e,i)=>{let n={x:e.x.minus(t.x),y:e.y.minus(t.y)},s={x:i.x.minus(t.x),y:i.y.minus(t.y)};return vn(s,n).div(Mn(s)).div(Mn(n))},bn=(t,e,i)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(i.minus(t.y))),y:i},wn=(t,e,i)=>e.x.isZero()?null:{x:i,y:t.y.plus(e.y.div(e.x).times(i.minus(t.x)))},Pn=class t{constructor(t,e){n(this,"point"),n(this,"isLeft"),n(this,"segment"),n(this,"otherSE"),n(this,"consumedBy"),void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}static compare(e,i){let n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:En.compare(e.segment,i.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:t.y.isGreaterThan(e.y)?1:0}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");let e=t.point.events;for(let i=0,n=e.length;i<n;i++){let t=e[i];this.point.events.push(t),t.point=this.point}this.checkForConsuming()}checkForConsuming(){let t=this.point.events.length;for(let e=0;e<t;e++){let i=this.point.events[e];if(void 0===i.segment.consumedBy)for(let n=e+1;n<t;n++){let t=this.point.events[n];void 0===t.consumedBy&&i.otherSE.point.events===t.otherSE.point.events&&i.segment.consume(t.segment)}}}getAvailableLinkedEvents(){let t=[];for(let e=0,i=this.point.events.length;e<i;e++){let i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){let e=new Map,i=i=>{let n=i.otherSE;e.set(i,{sine:Ln(this.point,t.point,n.point),cosine:xn(this.point,t.point,n.point)})};return(t,n)=>{e.has(t)||i(t),e.has(n)||i(n);let{sine:s,cosine:o}=e.get(t),{sine:a,cosine:r}=e.get(n);return s.isGreaterThanOrEqualTo(0)&&a.isGreaterThanOrEqualTo(0)?o.isLessThan(r)?1:o.isGreaterThan(r)?-1:0:s.isLessThan(0)&&a.isLessThan(0)?o.isLessThan(r)?-1:o.isGreaterThan(r)?1:0:a.isLessThan(s)?-1:a.isGreaterThan(s)?1:0}}},kn=0,En=class t{constructor(t,e,i,s){n(this,"id"),n(this,"leftSE"),n(this,"rightSE"),n(this,"rings"),n(this,"windings"),n(this,"ringOut"),n(this,"consumedBy"),n(this,"prev"),n(this,"_prevInResult"),n(this,"_beforeState"),n(this,"_afterState"),n(this,"_isInResult"),this.id=++kn,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=i,this.windings=s}static compare(t,e){let i=t.leftSE.point.x,n=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o.isLessThan(i))return 1;if(s.isLessThan(n))return-1;let a=t.leftSE.point.y,r=e.leftSE.point.y,h=t.rightSE.point.y,l=e.rightSE.point.y;if(i.isLessThan(n)){if(r.isLessThan(a)&&r.isLessThan(h))return 1;if(r.isGreaterThan(a)&&r.isGreaterThan(h))return-1;let i=t.comparePoint(e.leftSE.point);if(i<0)return 1;if(i>0)return-1;let n=e.comparePoint(t.rightSE.point);return 0!==n?n:-1}if(i.isGreaterThan(n)){if(a.isLessThan(r)&&a.isLessThan(l))return-1;if(a.isGreaterThan(r)&&a.isGreaterThan(l))return 1;let i=e.comparePoint(t.leftSE.point);if(0!==i)return i;let n=t.comparePoint(e.rightSE.point);return n<0?1:n>0?-1:1}if(a.isLessThan(r))return-1;if(a.isGreaterThan(r))return 1;if(s.isLessThan(o)){let i=e.comparePoint(t.rightSE.point);if(0!==i)return i}if(s.isGreaterThan(o)){let i=t.comparePoint(e.rightSE.point);if(i<0)return 1;if(i>0)return-1}if(!s.eq(o)){let t=h.minus(a),e=s.minus(i),u=l.minus(r),c=o.minus(n);if(t.isGreaterThan(e)&&u.isLessThan(c))return 1;if(t.isLessThan(e)&&u.isGreaterThan(c))return-1}return s.isGreaterThan(o)?1:s.isLessThan(o)||h.isLessThan(l)?-1:h.isGreaterThan(l)?1:t.id<e.id?-1:t.id>e.id?1:0}static fromRing(e,i,n){let s,o,a,r=Pn.comparePoints(e,i);if(r<0)s=e,o=i,a=1;else{if(!(r>0))throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);s=i,o=e,a=-1}let h=new Pn(s,!0),l=new Pn(o,!1);return new t(h,l,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return gn.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let e=this.bbox(),i=t.bbox(),n=yn(e,i);if(null===n)return null;let s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,r=t.rightSE.point,h=fn(e,a)&&0===this.comparePoint(a),l=fn(i,s)&&0===t.comparePoint(s),u=fn(e,r)&&0===this.comparePoint(r),c=fn(i,o)&&0===t.comparePoint(o);if(l&&h)return c&&!u?o:!c&&u?r:null;if(l)return u&&s.x.eq(r.x)&&s.y.eq(r.y)?null:s;if(h)return c&&o.x.eq(a.x)&&o.y.eq(a.y)?null:a;if(c&&u)return null;if(c)return o;if(u)return r;let p=((t,e,i,n)=>{if(e.x.isZero())return wn(i,n,t.x);if(n.x.isZero())return wn(t,e,i.x);if(e.y.isZero())return bn(i,n,t.y);if(n.y.isZero())return bn(t,e,i.y);let s=An(e,n);if(s.isZero())return null;let o={x:i.x.minus(t.x),y:i.y.minus(t.y)},a=An(o,e).div(s),r=An(o,n).div(s),h=t.x.plus(r.times(e.x)),l=i.x.plus(a.times(n.x)),u=t.y.plus(r.times(e.y)),c=i.y.plus(a.times(n.y));return{x:h.plus(l).div(2),y:u.plus(c).div(2)}})(s,this.vector(),a,t.vector());return null!==p&&fn(n,p)?gn.snap(p):null}split(e){let i=[],n=void 0!==e.events,s=new Pn(e,!0),o=new Pn(e,!1),a=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(s);let r=new t(s,a,this.rings.slice(),this.windings.slice());return Pn.comparePoints(r.leftSE.point,r.rightSE.point)>0&&r.swapEvents(),Pn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(s.checkForConsuming(),o.checkForConsuming()),i}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,i=this.windings.length;e<i;e++)this.windings[e]*=-1}consume(e){let i=this,n=e;for(;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;let s=t.compare(i,n);if(0!==s){if(s>0){let t=i;i=n,n=t}if(i.prev===n){let t=i;i=n,n=t}for(let t=0,e=n.rings.length;t<e;t++){let e=n.rings[t],s=n.windings[t],o=i.rings.indexOf(e);-1===o?(i.rings.push(e),i.windings.push(s)):i.windings[o]+=s}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}prevInResult(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){let t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;let t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};let e=this._afterState.rings,i=this._afterState.windings,n=this._afterState.multiPolys;for(let a=0,r=this.rings.length;a<r;a++){let t=this.rings[a],n=this.windings[a],s=e.indexOf(t);-1===s?(e.push(t),i.push(n)):i[s]+=n}let s=[],o=[];for(let a=0,r=e.length;a<r;a++){if(0===i[a])continue;let t=e[a],n=t.poly;if(-1===o.indexOf(n))if(t.isExterior)s.push(n);else{-1===o.indexOf(n)&&o.push(n);let e=s.indexOf(t.poly);-1!==e&&s.splice(e,1)}}for(let a=0,r=s.length;a<r;a++){let t=s[a].multiPoly;-1===n.indexOf(t)&&n.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;let t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(zn.type){case"union":{let i=0===t.length,n=0===e.length;this._isInResult=i!==n;break}case"intersection":{let i,n;t.length<e.length?(i=t.length,n=e.length):(i=e.length,n=t.length),this._isInResult=n===zn.numMultiPolys&&i<n;break}case"xor":{let i=Math.abs(t.length-e.length);this._isInResult=i%2==1;break}case"difference":{let i=t=>1===t.length&&t[0].isSubject;this._isInResult=i(t)!==i(e);break}}return this._isInResult}},Cn=class{constructor(t,e,i){if(n(this,"poly"),n(this,"isExterior"),n(this,"segments"),n(this,"bbox"),!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=i,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let s=gn.snap({x:new on(t[0][0]),y:new on(t[0][1])});this.bbox={ll:{x:s.x,y:s.y},ur:{x:s.x,y:s.y}};let o=s;for(let n=1,a=t.length;n<a;n++){if("number"!=typeof t[n][0]||"number"!=typeof t[n][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let e=gn.snap({x:new on(t[n][0]),y:new on(t[n][1])});e.x.eq(o.x)&&e.y.eq(o.y)||(this.segments.push(En.fromRing(o,e,this)),e.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.x),e.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.y),e.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.x),e.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.y),o=e)}(!s.x.eq(o.x)||!s.y.eq(o.y))&&this.segments.push(En.fromRing(o,s,this))}getSweepEvents(){let t=[];for(let e=0,i=this.segments.length;e<i;e++){let i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}},Sn=class{constructor(t,e){if(n(this,"multiPoly"),n(this,"exteriorRing"),n(this,"interiorRings"),n(this,"bbox"),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Cn(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let i=1,n=t.length;i<n;i++){let e=new Cn(t[i],this,!1);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.interiorRings.push(e)}this.multiPoly=e}getSweepEvents(){let t=this.exteriorRing.getSweepEvents();for(let e=0,i=this.interiorRings.length;e<i;e++){let i=this.interiorRings[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}},Tn=class{constructor(t,e){if(n(this,"isSubject"),n(this,"polys"),n(this,"bbox"),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof t[0][0][0]&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:new on(Number.POSITIVE_INFINITY),y:new on(Number.POSITIVE_INFINITY)},ur:{x:new on(Number.NEGATIVE_INFINITY),y:new on(Number.NEGATIVE_INFINITY)}};for(let i=0,n=t.length;i<n;i++){let e=new Sn(t[i],this);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.polys.push(e)}this.isSubject=e}getSweepEvents(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getSweepEvents();for(let e=0,n=i.length;e<n;e++)t.push(i[e])}return t}},Bn=class t{constructor(t){n(this,"events"),n(this,"poly"),n(this,"_isExteriorRing"),n(this,"_enclosingRing"),this.events=t;for(let e=0,i=t.length;e<i;e++)t[e].segment.ringOut=this;this.poly=null}static factory(e){let i=[];for(let n=0,s=e.length;n<s;n++){let s=e[n];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,r=s.rightSE,h=[a],l=a.point,u=[];for(;o=a,a=r,h.push(a),a.point!==l;)for(;;){let e=a.getAvailableLinkedEvents();if(0===e.length){let t=h[0].point,e=h[h.length-1].point;throw new Error(`Unable to complete output ring starting at [${t.x}, ${t.y}]. Last matching segment found ends at [${e.x}, ${e.y}].`)}if(1===e.length){r=e[0].otherSE;break}let n=null;for(let t=0,i=u.length;t<i;t++)if(u[t].point===a.point){n=t;break}if(null!==n){let e=u.splice(n)[0],s=h.splice(e.index);s.unshift(s[0].otherSE),i.push(new t(s.reverse()));continue}u.push({index:h.length,point:a.point});let s=a.getLeftmostComparator(o);r=e.sort(s)[0].otherSE;break}i.push(new t(h))}return i}getGeom(){let t=this.events[0].point,e=[t];for(let h=1,l=this.events.length-1;h<l;h++){let i=this.events[h].point,n=this.events[h+1].point;0!==gn.orient(i,t,n)&&(e.push(i),t=i)}if(1===e.length)return null;let i=e[0],n=e[1];0===gn.orient(i,t,n)&&e.shift(),e.push(e[0]);let s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,r=[];for(let h=o;h!=a;h+=s)r.push([e[h].x.toNumber(),e[h].y.toNumber()]);return r}isExteriorRing(){if(void 0===this._isExteriorRing){let t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){var t,e;let i=this.events[0];for(let o=1,a=this.events.length;o<a;o++){let t=this.events[o];Pn.compare(i,t)>0&&(i=t)}let n=i.segment.prevInResult(),s=n?n.prevInResult():null;for(;;){if(!n)return null;if(!s)return n.ringOut;if(s.ringOut!==n.ringOut)return(null==(t=s.ringOut)?void 0:t.enclosingRing())!==n.ringOut?n.ringOut:null==(e=n.ringOut)?void 0:e.enclosingRing();n=s.prevInResult(),s=n?n.prevInResult():null}}},On=class{constructor(t){n(this,"exteriorRing"),n(this,"interiorRings"),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){let t=this.exteriorRing.getGeom();if(null===t)return null;let e=[t];for(let i=0,n=this.interiorRings.length;i<n;i++){let t=this.interiorRings[i].getGeom();null!==t&&e.push(t)}return e}},Dn=class{constructor(t){n(this,"rings"),n(this,"polys"),this.rings=t,this.polys=this._composePolys(t)}getGeom(){let t=[];for(let e=0,i=this.polys.length;e<i;e++){let i=this.polys[e].getGeom();null!==i&&t.push(i)}return t}_composePolys(t){var e;let i=[];for(let n=0,s=t.length;n<s;n++){let s=t[n];if(!s.poly)if(s.isExteriorRing())i.push(new On(s));else{let t=s.enclosingRing();(null==t?void 0:t.poly)||i.push(new On(t)),null==(e=null==t?void 0:t.poly)||e.addInterior(s)}}return i}},Rn=class{constructor(t,e=En.compare){n(this,"queue"),n(this,"tree"),n(this,"segments"),this.queue=t,this.tree=new ln(e),this.segments=[]}process(t){let e=t.segment,i=[];if(t.consumedBy)return t.isLeft?this.queue.delete(t.otherSE):this.tree.delete(e),i;t.isLeft&&this.tree.add(e);let n=e,s=e;do{n=this.tree.lastBefore(n)}while(null!=n&&null!=n.consumedBy);do{s=this.tree.firstAfter(s)}while(null!=s&&null!=s.consumedBy);if(t.isLeft){let o=null;if(n){let t=n.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(o=t),!n.isAnEndpoint(t))){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}let a=null;if(s){let t=s.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(a=t),!s.isAnEndpoint(t))){let e=this._splitSafely(s,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}if(null!==o||null!==a){let t=null;t=null===o?a:null===a||Pn.comparePoints(o,a)<=0?o:a,this.queue.delete(e.rightSE),i.push(e.rightSE);let n=e.split(t);for(let e=0,s=n.length;e<s;e++)i.push(n[e])}i.length>0?(this.tree.delete(e),i.push(t)):(this.segments.push(e),e.prev=n)}else{if(n&&s){let t=n.getIntersection(s);if(null!==t){if(!n.isAnEndpoint(t)){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}if(!s.isAnEndpoint(t)){let e=this._splitSafely(s,t);for(let t=0,n=e.length;t<n;t++)i.push(e[t])}}}this.tree.delete(e)}return i}_splitSafely(t,e){this.tree.delete(t);let i=t.rightSE;this.queue.delete(i);let n=t.split(e);return n.push(i),void 0===t.consumedBy&&this.tree.add(t),n}},In=new class{constructor(){n(this,"type"),n(this,"numMultiPolys")}run(t,e,i){In.type=t;let n=[new Tn(e,!0)];for(let h=0,l=i.length;h<l;h++)n.push(new Tn(i[h],!1));if(In.numMultiPolys=n.length,"difference"===In.type){let t=n[0],e=1;for(;e<n.length;)null!==yn(n[e].bbox,t.bbox)?e++:n.splice(e,1)}if("intersection"===In.type)for(let h=0,l=n.length;h<l;h++){let t=n[h];for(let e=h+1,i=n.length;e<i;e++)if(null===yn(t.bbox,n[e].bbox))return[]}let s=new ln(Pn.compare);for(let h=0,l=n.length;h<l;h++){let t=n[h].getSweepEvents();for(let e=0,i=t.length;e<i;e++)s.add(t[e])}let o=new Rn(s),a=null;for(0!=s.size&&(a=s.first(),s.delete(a));a;){let t=o.process(a);for(let e=0,i=t.length;e<i;e++){let i=t[e];void 0===i.consumedBy&&s.add(i)}0!=s.size?(a=s.first(),s.delete(a)):a=null}gn.reset();let r=Bn.factory(o.segments);return new Dn(r).getGeom()}},zn=In;function Gn(t){let e={type:"Feature"};return e.geometry=t,e}function Nn(t){return"Feature"===t.type?t.geometry:t}function jn(t){return t&&t.geometry&&t.geometry.coordinates?t.geometry.coordinates:t}function Fn(t){return Gn({type:"Polygon",coordinates:t})}function Un(t){return Gn({type:"MultiPolygon",coordinates:t})}function Zn(t,e){let i=Nn(t),n=Nn(e),s=((t,...e)=>zn.run("intersection",t,e))(i.coordinates,n.coordinates);return 0===s.length?null:1===s.length?Fn(s[0]):Un(s)}function qn(t,e){let i=Nn(t),n=Nn(e),s=((t,...e)=>zn.run("difference",t,e))(i.coordinates,n.coordinates);return 0===s.length?null:1===s.length?Fn(s[0]):Un(s)}function Hn(t){return Array.isArray(t)?1+Hn(t[0]):-1}function Vn(t){t instanceof L.Polyline&&(t=t.toGeoJSON(15));let e=jn(t),i=Hn(e),n=[];return i>1?e.forEach(t=>{n.push(function(t){return Gn({type:"LineString",coordinates:t})}(t))}):n.push(t),n}function Kn(t){let e=[];return t.eachLayer(t=>{e.push(jn(t.toGeoJSON(15)))}),function(t){return Gn({type:"MultiLineString",coordinates:t})}(e)}gn.set,qe.Cut=qe.Polygon.extend({initialize(t){this._map=t,this._shape="Cut",this.toolbarButtonName="cutPolygon"},_finishShape(){if(this._editedLayers=[],!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);e._latlngInfos=this._layer._latlngInfo,this.cut(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex,this._editedLayers.forEach(({layer:t,originalLayer:e})=>{this._fireCut(e,t,e),this._fireCut(this._map,t,e),e.pm._fireEdit()}),this._editedLayers=[];let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},cut(t){let e=this._map._layers,i=t._latlngInfos||[];Object.keys(e).map(t=>e[t]).filter(t=>t.pm).filter(t=>!t._pmTempLayer).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore).filter(t=>t instanceof L.Polyline).filter(e=>e!==t).filter(t=>t.pm.options.allowCutting).filter(t=>!(this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0)||this.options.layersToCut.indexOf(t)>-1).filter(t=>!this._layerGroup.hasLayer(t)).filter(e=>{try{let i=!!pi(t.toGeoJSON(15),e.toGeoJSON(15)).features.length>0;return i||e instanceof L.Polyline&&!(e instanceof L.Polygon)?i:!!Zn(t.toGeoJSON(15),e.toGeoJSON(15))}catch{return L.Polygon,!1}}).forEach(e=>{let n;if(e instanceof L.Polygon){n=L.polygon(e.getLatLngs());let t=n.getLatLngs();i.forEach(e=>{if(e&&e.snapInfo){let{latlng:i}=e,s=this._calcClosestLayer(i,[n]);if(s&&s.segment&&s.distance<this.options.snapDistance){let{segment:e}=s;if(e&&2===e.length){let{indexPath:n,parentPath:s,newIndex:o}=L.PM.Utils._getIndexFromSegment(t,e);(n.length>1?(0,Ri.default)(t,s):t).splice(o,0,i)}}}})}else n=e;let s=this._cutLayer(t,n),o=L.geoJSON(s,e.options);1===o.getLayers().length&&([o]=o.getLayers()),this._setPane(o,"layerPane");let a=o.addTo(this._map.pm._getContainingLayer());if(a.pm.enable(e.pm.options),a.pm.disable(),e._pmTempLayer=!0,t._pmTempLayer=!0,e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),t.remove(),t.removeFrom(this._map.pm._getContainingLayer()),a.getLayers&&0===a.getLayers().length&&this._map.pm.removeLayer({target:a}),a instanceof L.LayerGroup?(a.eachLayer(t=>{this._addDrawnLayerProp(t)}),this._addDrawnLayerProp(a)):this._addDrawnLayerProp(a),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let t=this.options.layersToCut.indexOf(e);t>-1&&this.options.layersToCut.splice(t,1)}this._editedLayers.push({layer:a,originalLayer:e})})},_cutLayer(t,e){let i,n=L.geoJSON();if(e instanceof L.Polygon)i=qn(e.toGeoJSON(15),t.toGeoJSON(15));else{let s=Vn(e);s.forEach(e=>{let i,s=Pi(e,t.toGeoJSON(15));i=s&&s.features.length>0?L.geoJSON(s):L.geoJSON(e),i.getLayers().forEach(e=>{Ti(t.toGeoJSON(15),e.toGeoJSON(15))||e.addTo(n)})}),i=s.length>1?Kn(n):n.toGeoJSON(15)}return i},_change:L.Util.falseFn}),qe.Text=qe.extend({initialize(t){this._map=t,this._shape="Text",this.toolbarButtonName="drawText"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(Ce("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){var t;this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),null==(t=this._hintMarker)||t.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintMarker(t){if(this._hintMarker.setLatLng(t.latlng),this.options.snappable){let e=t;e.target=this._hintMarker,this._handleSnapping(e)}},_createMarker(t){var e,i,n,s;if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let o=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),null==(e=this.options.textOptions)?void 0:e.className){let t=this.options.textOptions.className.split(" ");this.textArea.classList.add(...t)}let a=this._createTextIcon(this.textArea),r=new L.Marker(o,{textMarker:!0,_textMarkerOverPM:!0,icon:a});if(this._setPane(r,"markerPane"),this._finishLayer(r),r.pm||(r.options.draggable=!1),r.addTo(this._map.pm._getContainingLayer()),r.pm){r.pm.textArea=this.textArea,L.setOptions(r.pm,{removeIfEmpty:(null==(i=this.options.textOptions)?void 0:i.removeIfEmpty)??!0});let t=(null==(n=this.options.textOptions)?void 0:n.focusAfterDraw)??!0;r.pm._createTextMarker(t),(null==(s=this.options.textOptions)?void 0:s.text)&&r.pm.setText(this.options.textOptions.text)}this._fireCreate(r),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(t){this.enable(),this._hintMarker.setLatLng(t.latlng)},_createTextArea(){let t=document.createElement("textarea");return t.readOnly=!0,t.classList.add("pm-textarea","pm-disabled"),t},_createTextIcon:t=>L.divIcon({className:"pm-text-marker",html:t})});var Wn={enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,Ge(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let t=this._getDOMElem();t&&(Ge(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(t)):L.DomEvent.on(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,Ge(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let t=this._getDOMElem();t&&(Ge(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(t)):L.DomEvent.off(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseDown(i),!1},_simulateMouseMoveEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseMove(i),!1},_simulateMouseUpEvent(t){let e={originalEvent:t.touches?t.touches[0]:t,target:this._layer};return-1===t.type.indexOf("touch")&&(e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint)),this._dragMixinOnMouseUp(e),!1},_dragMixinOnMouseDown(t){if(t.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(t);let e=t._fromLayerSync,i=this._syncLayers("_dragMixinOnMouseDown",t);if(this._layer instanceof L.Marker&&(!this.options.snappable||e||i?this._disableSnapping():this._initSnappableMarkers()),this._layer instanceof L.CircleMarker){let t="resizeableCircleMarker";this._layer instanceof L.Circle&&(t="resizeableCircle"),!this.options.snappable||e||i?this._layer.pm.options[t]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag():this._layer.pm.options[t]||this._initSnappableMarkersDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=t.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(t){this._overwriteEventIfItComesFromMarker(t);let e=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",t),this._dragging||(this._dragging=!0,L.DomUtil.addClass(e,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=t.latlng),this._onLayerDrag(t),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(t){let e=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",t),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),!!this._dragging&&(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,e&&L.DomUtil.removeClass(e,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0)},_onLayerDrag(t){let{latlng:e}=t,i=e.lat-this._tempDragCoord.lat,n=e.lng-this._tempDragCoord.lng,s=t=>t.map(t=>{if(Array.isArray(t))return s(t);let e={lat:t.lat+i,lng:t.lng+n};return(t.alt||0===t.alt)&&(e.alt=t.alt),e});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let t=s([this._layer.getLatLng()]);this._layer.setLatLng(t[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let t=this._layer.getLatLng();this._layer._snapped&&(t=this._layer._orgLatLng);let e=s([t]);this._layer.setLatLng(e[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let t=s([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(t),this._fireChange(this._layer.getBounds(),"Edit")}else{let t=s(this._layer.getLatLngs());this._layer.setLatLngs(t),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=e,t.layer=this._layer,this._fireDrag(t)},addDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.addClass(t,"leaflet-pm-draggable")},removeDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_getDOMElem(){let t=null;return this._layer._path?t=this._layer._path:this._layer._renderer&&this._layer._renderer._container?t=this._layer._renderer._container:this._layer._image?t=this._layer._image:this._layer._icon&&(t=this._layer._icon),t},_overwriteEventIfItComesFromMarker(t){t.target.getLatLng&&(!t.target._radius||t.target._radius<=10)&&(t.containerPoint=this._map.mouseEventToContainerPoint(t.originalEvent),t.latlng=this._map.containerPointToLatLng(t.containerPoint))},_syncLayers(t,e){if(this.enabled())return!1;if(!e._fromLayerSync&&this._layer===e.target&&this.options.syncLayersOnDrag){e._fromLayerSync=!0;let i=[];if(L.Util.isArray(this.options.syncLayersOnDrag))i=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(t=>{t instanceof L.LayerGroup&&(i=i.concat(t.pm.getLayers(!0)))});else if(!0===this.options.syncLayersOnDrag&&this._parentLayerGroup)for(let t in this._parentLayerGroup){let e=this._parentLayerGroup[t];e.pm&&(i=e.pm.getLayers(!0))}return L.Util.isArray(i)&&i.length>0&&(i=i.filter(t=>!!t.pm).filter(t=>!!t.pm.options.draggable),i.forEach(i=>{i!==this._layer&&i.pm[t]&&(i._snapped=!1,i.pm[t](e))})),i.length>0}return!1},_stopDOMImageDrag:t=>(t.preventDefault(),!1)},Xn=c(pe());function $n(t,e,i){let n=i.getMaxZoom();if(n===1/0&&(n=i.getZoom()),L.Util.isArray(t)){let n=[];return t.forEach(t=>{n.push($n(t,e,i))}),n}return t instanceof L.LatLng?function(t,e,i,n){return i.unproject(e.transform(i.project(t,n)),n)}(t,e,i,n):null}function Yn(t,e){e instanceof L.Layer&&(e=e.getLatLng());let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.project(e,i)}function Jn(t,e){let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.unproject(e,i)}var Qn={_onRotateStart(t){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=Yn(this._map,this._rotationOriginLatLng),this._rotationStartPoint=Yn(this._map,t.target.getLatLng()),this._initialRotateLatLng=Ie(this._layer),this._startAngle=this.getAngle();let e=Ie(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,e),this._fireRotationStart(this._map,e)},_onRotate(t){let e=Yn(this._map,t.target.getLatLng()),i=this._rotationStartPoint,n=this._rotationOriginPoint,s=Math.atan2(e.y-n.y,e.x-n.x)-Math.atan2(i.y-n.y,i.x-n.x);this._layer.setLatLngs(this._rotateLayer(s,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let o=this;!function t(e,i=[],n=-1){if(n>-1&&i.push(n),L.Util.isArray(e[0]))e.forEach((e,n)=>t(e,i.slice(),n));else{let t=i.length>0?(0,Xn.default)(o._markers,i):o._markers[0];e.forEach((e,i)=>{t[i].setLatLng(e)})}}(this._layer.getLatLngs());let a=Ie(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(s,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let r=180*s/Math.PI;r=r<0?r+360:r;let h=r+this._startAngle;this._setAngle(h),this._rotationLayer.pm._setAngle(h),this._fireRotation(this._rotationLayer,r,a),this._fireRotation(this._map,r,a),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let t=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let e=Ie(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=Ie(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,t,e),this._fireRotationEnd(this._map,t,e),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(t,e,i,n,s){let o=Yn(s,i);return this._matrix=n.clone().rotate(t,o).flip(),$n(e,this._matrix,s)},_setAngle(t){t=t<0?t+360:t,this._angle=t%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let t=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),e=t.getCenter();return t.removeFrom(this._layer._map),e},enableRotate(){if(!this.options.allowRotation)return void this.disableRotate();this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&void 0===this._angle&&this.setInitAngle(De(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);this._rotatePoly=L.polygon(this._layer.getLatLngs(),{fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0}),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=Ie(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(t){let e=this.getAngle(),i=this._layer.getLatLngs(),n=t*(Math.PI/180);this._layer.setLatLngs(this._rotateLayer(n,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+t),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(n,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let s=this.getAngle()-e;s=s<0?s+360:s,this._startAngle=e,this._fireRotation(this._layer,s,i,this._layer),this._fireRotation(this._map||this._layer._map,s,i,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(t){let e=t-this.getAngle();this.rotateLayer(e)},getAngle(){return this._angle||0},setInitAngle(t){this._setAngle(t)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(t){this._rotationCenter=t,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(t)}},ts=L.Class.extend({includes:[Wn,Ze,Qn,Pe],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(t){L.Util.setOptions(this,t)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(t,e){let i=e.target,n={layer:this._layer,marker:i,event:e},s="";return"move"===t?s="moveVertexValidation":"add"===t?s="addVertexValidation":"remove"===t&&(s="removeVertexValidation"),this.options[s]&&"function"==typeof this.options[s]&&!this.options[s](n)?("move"===t&&(i._cancelDragEventChain=i.getLatLng()),!1):(i._cancelDragEventChain=null,!0)},_vertexValidationDrag:t=>!t._cancelDragEventChain||(t._latlng=t._cancelDragEventChain,t.update(),!1),_vertexValidationDragEnd:t=>!t._cancelDragEventChain||(t._cancelDragEventChain=null,!1)});ts.LayerGroup=L.Class.extend({initialize(t){this._layerGroup=t,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(t=>this._initLayer(t));this._layerGroup.on("layeradd",L.Util.throttle(t=>{if(t.layer._pmTempLayer)return;this._layers=this.getLayers();let e=this._layers.filter(t=>!t.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in t.pm._parentLayerGroup));e.forEach(t=>{this._initLayer(t)}),e.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())},100,this),this),this._layerGroup.on("layerremove",t=>{this._removeLayerFromGroup(t.target)},this);this._layerGroup.on("layerremove",L.Util.throttle(t=>{t.target._pmTempLayer||(this._layers=this.getLayers())},100,this),this)},enable(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.enable(t,e)):i.pm.enable(t)})},disable(t=[]){0===t.length&&(this._layers=this.getLayers()),this._layers.forEach(e=>{e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.disable(t)):e.pm.disable()})},enabled(t=[]){return 0===t.length&&(this._layers=this.getLayers()),!!this._layers.find(e=>e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.enabled(t)):e.pm.enabled())},toggleEdit(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.toggleEdit(t,e)):i.pm.toggleEdit(t)})},_initLayer(t){let e=L.Util.stamp(this._layerGroup);t.pm._parentLayerGroup||(t.pm._parentLayerGroup={}),t.pm._parentLayerGroup[e]=this._layerGroup},_removeLayerFromGroup(t){if(t.pm&&t.pm._layerGroup){let e=L.Util.stamp(this._layerGroup);delete t.pm._layerGroup[e]}},dragging(){return this._layers=this.getLayers(),!!this._layers&&!!this._layers.find(t=>t.pm.dragging())},getOptions(){return this.options},_getMap(){var t;return this._map||(null==(t=this._layers.find(t=>!!t._map))?void 0:t._map)||null},getLayers(t=!1,e=!0,i=!0,n=[]){let s=[];return t?this._layerGroup.getLayers().forEach(t=>{s.push(t),t instanceof L.LayerGroup&&-1===n.indexOf(t._leaflet_id)&&(n.push(t._leaflet_id),s=s.concat(t.pm.getLayers(!0,!0,!0,n)))}):s=this._layerGroup.getLayers(),i&&(s=s.filter(t=>!(t instanceof L.LayerGroup))),e&&(s=s.filter(t=>!!t.pm),s=s.filter(t=>!t._pmTempLayer),s=s.filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)),s},setOptions(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this.options=t,this._layers.forEach(i=>{i.pm&&(i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.setOptions(t,e)):i.pm.setOptions(t))})}}),ts.Marker=ts.extend({_shape:"Marker",initialize(t){this._layer=t,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(t={draggable:!0}){L.Util.setOptions(this,t),this.options.allowEditing&&this._layer._map?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._fireEnable()):this.disable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(t){let e=t.target;e.remove(),this._fireRemove(e),this._fireRemove(this._map,e)},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)}});var es=c(pe()),is={filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let t=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=t.filter((t,e,i)=>i.indexOf(t)===e)},_removeFromCache(t){let e=this.markerCache.indexOf(t);e>-1&&this.markerCache.splice(e,1)},renderLimits(t){this.markerCache.forEach(e=>{t.includes(e)?this._markerGroup.addLayer(e):this._markerGroup.removeLayer(e)})},applyLimitFilters({latlng:t={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let e=[...this._filterClosestMarkers(t)];this.renderLimits(e)},_filterClosestMarkers(t){let e=[...this.markerCache],i=this.options.limitMarkersToCount;return-1===i?e:(e.sort((e,i)=>e._latlng.distanceTo(t)-i._latlng.distanceTo(t)),e.filter((t,e)=>!(i>-1)||e<i))},_preventRenderMarkers:!1,_preventRenderingMarkers(t){this._preventRenderMarkers=!!t}};ts.Line=ts.extend({includes:[is],_shape:"Line",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()&&this.disable(),this._enabled=!0,this._initMarkers(),this.applyOptions(),this._layer.on("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.on("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this),this.options.allowSelfIntersection?this.cachedColor=void 0:("#f00000ff"!==this._layer.options.color?(this.cachedColor=this._layer.options.color,this.isRed=!1):this.isRed=!0,this._handleLayerStyle()),this._fireEnable()}},disable(){if(!this.enabled()||this._dragging)return;this._enabled=!1,this._markerGroup.clearLayers(),this._markerGroup.removeFrom(this._map),this._layer.off("remove",this.disable,this),this.options.allowSelfIntersection||this._layer.off("pm:vertexremoved",this._handleSelfIntersectionOnVertexRemoval,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable"),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()},enabled(){return this._enabled},toggleEdit(t){return this.enabled()?this.disable():this.enable(t),this.enabled()},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initMarkers(){let t=this._map,e=this._layer.getLatLngs();this._markerGroup&&(this._markerGroup.removeFrom(t),this._markerGroup.clearLayers()),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0;let i=t=>{if(Array.isArray(t[0]))return t.map(i,this);let e=t.map(this._createMarker,this);return!0!==this.options.hideMiddleMarkers&&t.map((i,n)=>{let s=this.isPolygon()?(n+1)%t.length:n+1;return this._createMiddleMarker(e[n],e[s])}),e};this._markers=i(e),this.filterMarkerGroup(),t.addLayer(this._markerGroup)},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this.options.rotate?(e.on("dragstart",this._onRotateStart,this),e.on("drag",this._onRotate,this),e.on("dragend",this._onRotateEnd,this)):(e.on("click",this._onVertexClick,this),e.on("dragstart",this._onMarkerDragStart,this),e.on("move",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(e),e},_createMiddleMarker(t,e){if(!t||!e)return!1;let i=L.PM.Utils.calcMiddleLatLng(this._map,t.getLatLng(),e.getLatLng()),n=this._createMarker(i),s=L.divIcon({className:"marker-icon marker-icon-middle"});return n.setIcon(s),n.leftM=t,n.rightM=e,t._middleMarkerNext=n,e._middleMarkerPrev=n,n.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),n.on("movestart",this._onMiddleMarkerMoveStart,this),n},_onMiddleMarkerClick(t){let e=t.target;if(!this._vertexValidation("add",t))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),this._addMarker(e,e.leftM,e.rightM)},_onMiddleMarkerMoveStart(t){let e=t.target;e.on("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidation("add",t)?(e._dragging=!0,this._addMarker(e,e.leftM,e.rightM)):e.on("move",this._onMiddleMarkerMovePrevent,this)},_onMiddleMarkerMovePrevent(t){let e=t.target;this._vertexValidationDrag(e)},_onMiddleMarkerMoveEnd(t){let e=t.target;if(e.off("move",this._onMiddleMarkerMovePrevent,this),e.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(e))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),setTimeout(()=>{delete e._dragging},100)},_addMarker(t,e,i){t.off("movestart",this._onMiddleMarkerMoveStart,this),t.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let n=t.getLatLng(),s=this._layer._latlngs;delete t.leftM,delete t.rightM;let{indexPath:o,index:a,parentPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),h=o.length>1?(0,es.default)(s,r):s,l=o.length>1?(0,es.default)(this._markers,r):this._markers;h.splice(a+1,0,n),l.splice(a+1,0,t),this._layer.setLatLngs(s),!0!==this.options.hideMiddleMarkers&&(this._createMiddleMarker(e,t),this._createMiddleMarker(t,i)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(t,L.PM.Utils.findDeepMarkerIndex(this._markers,t).indexPath,n),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return ti(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(t){let e,i,n=this._layer;if(this.options.allowSelfIntersection?e=!1:(i=ti(this._layer.toGeoJSON(15)),e=i.features.length>0),e){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return e;t?this._flashLayer():(n.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(i)}else n.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return e},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(t,e){t.forEach(t=>{Array.isArray(t)?this._updateDisabledMarkerStyle(t,e):t._icon&&(e&&!this._checkMarkerAllowedToDrag(t)?L.DomUtil.addClass(t._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(t._icon,"vertexmarker-disabled"))})},_removeMarker(t){let e=t.target;if(!this._vertexValidation("remove",t))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=Ie(this._layer,this._layer.getLatLngs()));let i=this._layer.getLatLngs(),{indexPath:n,index:s,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!n)return;let a=n.length>1?(0,es.default)(i,o):i,r=n.length>1?(0,es.default)(this._markers,o):this._markers,h=o[o.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!h&&(a.length<=2||this.isPolygon()&&a.length<=3))return void this._flashLayer();a.splice(s,1),this._layer.setLatLngs(i),this.isPolygon()&&a.length<=2&&a.splice(0,a.length);let l=!1;if(a.length<=1&&(a.splice(0,a.length),o.length>1&&n.length>1&&(i=Te(i)),this._layer.setLatLngs(i),this._initMarkers(),l=!0),Se(i)||this._layer.remove(),i=Te(i),this._layer.setLatLngs(i),this._markers=Te(this._markers),!l&&(r=n.length>1?(0,es.default)(this._markers,o):this._markers,e._middleMarkerPrev&&(this._markerGroup.removeLayer(e._middleMarkerPrev),this._removeFromCache(e._middleMarkerPrev)),e._middleMarkerNext&&(this._markerGroup.removeLayer(e._middleMarkerNext),this._removeFromCache(e._middleMarkerNext)),this._markerGroup.removeLayer(e),this._removeFromCache(e),r)){let t,e;if(this.isPolygon()?(t=(s+1)%r.length,e=(s+(r.length-1))%r.length):(e=s-1<0?void 0:s-1,t=s+1>=r.length?void 0:s+1),t!==e){let i=r[e],n=r[t];!0!==this.options.hideMiddleMarkers&&this._createMiddleMarker(i,n)}r.splice(s,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(e,n),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(t){let e=this._layer.getLatLngs(),i=t.getLatLng(),{indexPath:n,index:s,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,t);(n.length>1?(0,es.default)(e,o):e).splice(s,1,i),this._layer.setLatLngs(e)},_getNeighborMarkers(t){let{indexPath:e,index:i,parentPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),s=e.length>1?(0,es.default)(this._markers,n):this._markers,o=(i+1)%s.length;return{prevMarker:s[(i+(s.length-1))%s.length],nextMarker:s[o]}},_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),s=L.polyline([t.getLatLng(),i.getLatLng()]),o=pi(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length,a=pi(this._layer.toGeoJSON(15),s.toGeoJSON(15)).features.length;return t.getLatLng()===this._markers[0][0].getLatLng()?a+=1:t.getLatLng()===this._markers[0][this._markers[0].length-1].getLatLng()&&(o+=1),!(o<=2&&a<=2)},_onMarkerDragStart(t){let e=t.target;if(this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",t))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i),this.options.allowSelfIntersection||(this._coordsBeforeEdit=Ie(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(e):this._markerAllowedToDrag=null},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e))return;let{indexPath:i,index:n,parentPath:s}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!i)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&!1===this._markerAllowedToDrag)return this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),void this._handleLayerStyle();this.updatePolygonCoordsFromMarkerDrag(e);let o=i.length>1?(0,es.default)(this._markers,s):this._markers,a=(n+1)%o.length,r=(n+(o.length-1))%o.length,h=e.getLatLng(),l=o[r].getLatLng(),u=o[a].getLatLng();if(e._middleMarkerNext){let t=L.PM.Utils.calcMiddleLatLng(this._map,h,u);e._middleMarkerNext.setLatLng(t)}if(e._middleMarkerPrev){let t=L.PM.Utils.calcMiddleLatLng(this._map,h,l);e._middleMarkerPrev.setLatLng(t)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),n=!this.options.allowSelfIntersection&&this.hasSelfIntersection();n&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(n=!1);let s=!this.options.allowSelfIntersection&&n;if(this._fireMarkerDragEnd(t,i,s),s)return this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),void this._fireLayerReset(t,i);!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(t){let e=t.target;if(e._dragging)return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireVertexClick(t,i)}}),ts.Polygon=ts.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),s=L.polyline([t.getLatLng(),i.getLatLng()]),o=pi(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.length,a=pi(this._layer.toGeoJSON(15),s.toGeoJSON(15)).features.length;return!(o<=2&&a<=2)}}),ts.Rectangle=ts.Polygon.extend({_shape:"Rectangle",_initMarkers(){let t=this._map,e=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,t.addLayer(this._markerGroup),this._markers=[],this._markers[0]=e.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((t,e)=>{let i=this._cornerMarkers.find(t=>t._index===e);i&&i.setLatLng(t)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(t,e){let i=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=t,i._index=e,i._pmTempLayer=!0,i.on("click",this._onVertexClick,this),this._markerGroup.addLayer(i),i},_addMarkerEvents(){this._markers[0].forEach(t=>{t.on("dragstart",this._onMarkerDragStart,this),t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||t.on("contextmenu",this._removeMarker,this)})},_removeMarker:()=>null,_onMarkerDragStart(t){if(!this._vertexValidation("move",t))return;let e=t.target,i=this._cornerMarkers;e._oppositeCornerLatLng=i.find(t=>t._index===(e._index+2)%4).getLatLng(),e._snapped=!1;let{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,n)},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e)||void 0===e._index)return;this._adjustRectangleForMarkerMove(e);let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;this._cornerMarkers.forEach(t=>{delete t._oppositeCornerLatLng});let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragEnd(t,i),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(t){L.extend(t._origLatLng,t._latlng);let e=L.PM.Utils._getRotatedRectangle(t.getLatLng(),t._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(e),this._adjustAllMarkers(t),this._layer.redraw()},_adjustAllMarkers(t){let e=this._layer.getLatLngs()[0];if(e&&4!==e.length&&e.length>0)e.forEach((t,e)=>{this._cornerMarkers[e].setLatLng(t)}),this._cornerMarkers.slice(e.length).forEach(t=>{t.setLatLng(e[0])});else if(e&&e.length){let i=e.findIndex(e=>t.getLatLng().equals(e));i>-1?(this._cornerMarkers[(t._index+1)%4].setLatLng(e[(i+1)%4]),this._cornerMarkers[(t._index+2)%4].setLatLng(e[(i+2)%4]),this._cornerMarkers[(t._index+3)%4].setLatLng(e[(i+3)%4])):this._cornerMarkers.forEach(t=>{t.setLatLng(e[t._index])})}else;},_findCorners(){void 0===this._angle&&this.setInitAngle(De(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.getAngle(),this._map||this)}}),ts.CircleMarker=ts.extend({_shape:"CircleMarker",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(t={draggable:!0,snappable:!0}){L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this.options.allowEditing&&this._layer._map?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let t=this._map;this._helperLayers&&(this._helperLayers.removeFrom(t),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);let e=this._layer.getLatLng(),i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(n),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(t,e){let i=this._map.project(t),n=L.point(i.x+e,i.y);return this._map.unproject(n)},_createHintLine(t,e){let i=t.getLatLng(),n=e.getLatLng();this._hintline=L.polyline([i,n],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(t){let e=this._createMarker(t);return this.options.draggable?(L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"),e.on("move",this._moveCircle,this)):e.dragging.disable(),e},_createOuterMarker(t){let e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),e.on("click",this._onVertexClick,this),this._helperLayers.addLayer(e),e},_moveCircle(t){if(t.target._cancelDragEventChain)return;let e=this._centerMarker.getLatLng();this._layer.setLatLng(e);let i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._outerMarker._latlng=n,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let t=this._layer.getLatLng(),e=this._layer._radius,i=this._getLatLngOnCircle(t,e);this._outerMarker.setLatLng(i),this._centerMarker.setLatLng(t),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?this._layer.setRadius(this.options[this._minRadiusOption]):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag(t){let e=t.target;e instanceof L.Marker&&!this._vertexValidationDrag(e)||this._fireMarkerDrag(t)},_onMarkerDragEnd(t){this._extedingMarkerDragEnd();let e=t.target;this._vertexValidationDragEnd(e)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(t))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let t=this._layer._map||this._map;if(t){let e=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),t,this._layer.getLatLng()),i=L.circle(this._layer.getLatLng(),this._layer.options);i.setRadius(e);let n=t&&t.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(i,200,!n).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(i,200,!n),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);return this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]?e=Re(this._map,t,e,this._getMinDistanceInMeter(t)):this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption]&&(e=Re(this._map,t,e,this._getMaxDistanceInMeter(t))),e},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);(this.options[this._minRadiusOption]&&i<this.options[this._minRadiusOption]||this.options[this._maxRadiusOption]&&i>this.options[this._maxRadiusOption])&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))},_getMinDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,t)},_getMaxDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,t)},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),ts.Circle=ts.CircleMarker.extend({_shape:"Circle",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(t){L.PM.Edit.CircleMarker.prototype.enable.call(this,t||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let t=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!t).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!t),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(t,e){return this._map.distance(t,e)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),ts.ImageOverlay=ts.extend({_shape:"ImageOverlay",initialize(t){this._layer=t,this._enabled=!1},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},enabled(){return this._enabled},enable(t={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]}}),ts.Text=ts.extend({_shape:"Text",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this.textArea){if(!this.options.allowEditing||!this._layer._map)return void this.disable();this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),L.DomEvent.off(document,"click",this._documentClick,this),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let t=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),t.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let t=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,e=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${t}px`,this.textArea.style.width=`${e}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&L.DomEvent.on(document,"click",this._documentClick,this)},100)},_documentClick(t){t.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(t={}){let e=this._hasFocus;this._hasFocus="focus"===t.type,!e!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw new TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(t){t&&(this.textArea.value=t),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let t=this.options.className.split(" ");this.textArea.classList.add(...t)}let t=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(t),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(t=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),!0===t&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(t){t.preventDefault()}});var ns=function(t,e,i,n,s,o){this._matrix=[t,e,i,n,s,o]};ns.init=()=>new L.PM.Matrix(1,0,0,1,0,0),ns.prototype={transform(t){return this._transform(t.clone())},_transform(t){let e=this._matrix,{x:i,y:n}=t;return t.x=e[0]*i+e[1]*n+e[4],t.y=e[2]*i+e[3]*n+e[5],t},untransform(t){let e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone(){let t=this._matrix;return new L.PM.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate(t){if(void 0===t)return new L.Point(this._matrix[4],this._matrix[5]);let e,i;return"number"==typeof t?(e=t,i=t):(e=t.x,i=t.y),this._add(1,0,0,1,e,i)},scale(t,e){if(void 0===t)return new L.Point(this._matrix[0],this._matrix[3]);let i,n;return e=e||L.point(0,0),"number"==typeof t?(i=t,n=t):(i=t.x,n=t.y),this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},rotate(t,e){let i=Math.cos(t),n=Math.sin(t);return e=e||new L.Point(0,0),this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(t,e,i,n,s,o){let a,r=[[],[],[]],h=this._matrix,l=[[h[0],h[2],h[4]],[h[1],h[3],h[5]],[0,0,1]],u=[[t,i,s],[e,n,o],[0,0,1]];t&&t instanceof L.PM.Matrix&&(h=t._matrix,u=[[h[0],h[2],h[4]],[h[1],h[3],h[5]],[0,0,1]]);for(let c=0;c<3;c+=1)for(let t=0;t<3;t+=1){a=0;for(let e=0;e<3;e+=1)a+=l[c][e]*u[e][t];r[c][t]=a}return this._matrix=[r[0][0],r[1][0],r[0][1],r[1][1],r[0][2],r[1][2]],this}};var ss=ns,os={calcMiddleLatLng(t,e,i){let n=t.project(e),s=t.project(i);return t.unproject(n._add(s)._divideBy(2))},findLayers(t){let e=[];return t.eachLayer(t=>{(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&e.push(t)}),e=e.filter(t=>!!t.pm),e=e.filter(t=>!t._pmTempLayer),e=e.filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore),e},circleToPolygon(t,e=60,i=!0){let n=Oe(t.getLatLng(),t.getRadius(),e,0,i),s=[];for(let o=0;o<n.length;o+=1){let t=[n[o].lat,n[o].lng];s.push(t)}return L.polygon(s,t.options)},disablePopup(t){t.getPopup()&&(t._tempPopupCopy=t.getPopup(),t.unbindPopup())},enablePopup(t){t._tempPopupCopy&&(t.bindPopup(t._tempPopupCopy),delete t._tempPopupCopy)},_fireEvent(t,e,i,n=!1){t.fire(e,i,n);let{groups:s}=this.getAllParentGroups(t);s.forEach(t=>{t.fire(e,i,n)})},getAllParentGroups(t){let e=[],i=[],n=t=>{for(let s in t._eventParents)if(-1===e.indexOf(s)){e.push(s);let o=t._eventParents[s];i.push(o),n(o)}};return!t._pmLastGroupFetch||!t._pmLastGroupFetch.time||(new Date).getTime()-t._pmLastGroupFetch.time>1e3?(n(t),t._pmLastGroupFetch={time:(new Date).getTime(),groups:i,groupIds:e},{groupIds:e,groups:i}):{groups:t._pmLastGroupFetch.groups,groupIds:t._pmLastGroupFetch.groupIds}},createGeodesicPolygon:Oe,getTranslation:Ce,findDeepCoordIndex(t,e,i=!0){let n,s=t=>(o,a)=>{let r=t.concat(a);if(i){if(o.lat&&o.lat===e.lat&&o.lng===e.lng)return n=r,!0}else if(o.lat&&L.latLng(o).equals(e))return n=r,!0;return Array.isArray(o)&&o.some(s(r))};t.some(s([]));let o={};return n&&(o={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),o},findDeepMarkerIndex(t,e){let i,n=t=>(s,o)=>{let a=t.concat(o);return s._leaflet_id===e._leaflet_id?(i=a,!0):Array.isArray(s)&&s.some(n(a))};t.some(n([]));let s={};return i&&(s={indexPath:i,index:i[i.length-1],parentPath:i.slice(0,i.length-1)}),s},_getIndexFromSegment(t,e){if(e&&2===e.length){let i=this.findDeepCoordIndex(t,e[0]),n=this.findDeepCoordIndex(t,e[1]),s=Math.max(i.index,n.index);return(0===i.index||0===n.index)&&1!==s&&(s+=1),{indexA:i,indexB:n,newIndex:s,indexPath:i.indexPath,parentPath:i.parentPath}}return null},_getRotatedRectangle(t,e,i,n){let s=Yn(n,t),o=Yn(n,e),a=i*Math.PI/180,r=Math.cos(a),h=Math.sin(a),l=(o.x-s.x)*r+(o.y-s.y)*h,u=(o.y-s.y)*r-(o.x-s.x)*h,c=l*r+s.x,p=l*h+s.y,d=-u*h+s.x,_=u*r+s.y;return[Jn(n,s),Jn(n,{x:c,y:p}),Jn(n,o),Jn(n,{x:d,y:_})]},pxRadiusToMeterRadius(t,e,i){let n=e.project(i),s=L.point(n.x+t,n.y);return e.distance(e.unproject(s),i)}};L.PM=L.PM||{version:"2.18.3",Map:Ne,Toolbar:Fe,Draw:qe,Edit:ts,Utils:os,Matrix:ss,activeLang:"en",optIn:!1,initialize(t){this.addInitHooks(t)},setOptIn(t){this.optIn=!!t},addInitHooks(){L.Map.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}),L.LayerGroup.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}),L.Marker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}),L.CircleMarker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}),L.Polyline.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}),L.Polygon.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}),L.Rectangle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}),L.Circle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}),L.ImageOverlay.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))})},reInitLayer(t){t instanceof L.LayerGroup&&t.eachLayer(t=>{this.reInitLayer(t)}),t.pm||L.PM.optIn&&!1!==t.options.pmIgnore||t.options.pmIgnore||(t instanceof L.Map?t.pm=new L.PM.Map(t):t instanceof L.Marker?t.options.textMarker?(t.pm=new L.PM.Edit.Text(t),t.pm._initTextMarker(),t.pm._createTextMarker(!1)):t.pm=new L.PM.Edit.Marker(t):t instanceof L.Circle?t.pm=new L.PM.Edit.Circle(t):t instanceof L.CircleMarker?t.pm=new L.PM.Edit.CircleMarker(t):t instanceof L.Rectangle?t.pm=new L.PM.Edit.Rectangle(t):t instanceof L.Polygon?t.pm=new L.PM.Edit.Polygon(t):t instanceof L.Polyline?t.pm=new L.PM.Edit.Line(t):t instanceof L.LayerGroup?t.pm=new L.PM.Edit.LayerGroup(t):t instanceof L.ImageOverlay&&(t.pm=new L.PM.Edit.ImageOverlay(t)))}},"1.7.1"===L.version&&L.Canvas.include({_onClick(t){let e,i,n=this._map.mouseEventToLayerPoint(t);for(let s=this._drawFirst;s;s=s.next)e=s.layer,e.options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);i&&(L.DomEvent.fakeStop(t),this._fireEvent([i],t))}}),L.PM.initialize()})();const p={en_US:{showEagle:"Show Eagle Map",hideEagle:"Hide Eagle Map"},zh_CN:{showEagle:"显示鹰眼图",hideEagle:"隐藏鹰眼图"}},d={en_US:{coordinate:"Coordinate",zoomLevel:"Zoom Level",FPS:"FPS"},zh_CN:{coordinate:"坐标",zoomLevel:"层级",FPS:"每秒帧数"}},_={en_US:{home:"Go Home",capture:"Screen Capture",center:"View Full",north:"Move North",south:"Move South",east:"Move East",west:"Move West",zoomIn:"Zoom In",zoomOut:"Zoom Out",zoom:"Zoom to this level",dragZoom:"Drag to zoom",more:"More",draw:"Plot",layer:"Layer Manager",lng:"Longitude",lat:"Latitude"},zh_CN:{home:"回到初始位置",capture:"截屏",center:"查看全图",north:"向上平移",south:"向下平移",east:"向右平移",west:"向左平移",zoomIn:"放大一级",zoomOut:"缩小一级",zoom:"缩放到此级别",dragZoom:"拖动缩放",more:"更多",draw:"标绘",layer:"图层管理",lng:"经度",lat:"纬度"}},m=c.Control.extend({options:{position:"bottomleft",coordinateUnit:"decimal",showCoordinate:!0,showLevel:!0,showFPS:!0,precision:6},initialize(t){c.setOptions(this,t),this.lastTime=+new Date,this.frames=0,c.Control.prototype.initialize.call(this,this.options)},onAdd(t){this.map=t,this.lang=t.lang,this.langDic=d,this._container=c.DomUtil.create("div",`${t.clsPrefix}-statusbar`),this.zoom=t.getZoom();const e=t.getCenter();return this.lng=e.lng,this.lat=e.lat,this.options.showCoordinate&&(this._latlngContainer=c.DomUtil.create("div",`${t.clsPrefix}-statusbar-item coordinate`,this._container),this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng)},${this.getCoordinate(this.lat)}`),this.options.showLevel&&(this._levelContainer=c.DomUtil.create("div",`${t.clsPrefix}-statusbar-item level`,this._container),this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`),this.options.showFPS&&(this._fpsContainer=c.DomUtil.create("div",`${t.clsPrefix}-statusbar-item fps`,this._container),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b>60`),this.initEvt(),this._container},initEvt(){this.map.on("mousemove",t=>{this.lat=t.latlng.lat,this.lng=t.latlng.lng,this._latlngContainer&&(this._latlngContainer.innerHTML=`<b>${this.langDic[this.lang].coordinate}:</b>${this.getCoordinate(this.lng,"lng")},${this.getCoordinate(this.lat,"lat")}`)}),this.map.on("zoomend",()=>{this.zoom=this.map.getZoom(),this._levelContainer&&(this._levelContainer.innerHTML=`<b>${this.langDic[this.lang].zoomLevel}:</b>${this.zoom+1}`)}),this.options.showFPS&&this.calcFPS()},getCoordinate(t,e="lng"){switch(this.options.coordinateUnit){case"decimal":return t.toFixed(this.options.precision);case"radian":return(t*Math.PI/180).toFixed(this.options.precision);case"degrees":return this._formatDeg(t,e)}},_formatDeg(t,e){const i=parseFloat(t),n=parseInt(i);let s="";"lng"===e?s=n>0?"E":"W":"lat"===e&&(s=n>0?"N":"S");let o=parseInt(60*(i-n));return n+"°"+o+"′"+(3600*(i-n)-60*o).toFixed(2)+"″"+s},calcFPS(){if(this.frames++,this.frames>=30){const t=Date.now()-this.lastTime,e=Math.round(1e3/(t/this.frames));this._fpsContainer&&(this.frames=0,this.lastTime=Date.now(),this._fpsContainer.innerHTML=`<b>${this.langDic[this.lang].FPS}:</b><span>${e}</span>`)}requestAnimationFrame(this.calcFPS.bind(this))}}),g=c.Control.extend({includes:c.Evented?c.Evented.prototype:c.Mixin.Events,options:{position:"bottomright",toggleDisplay:!0,zoomLevelOffset:5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:100,height:100,collapsedWidth:22,collapsedHeight:22,aimingRectOptions:{color:"#ff7800",weight:1,interactive:!1},shadowRectOptions:{color:"#000000",weight:1,interactive:!1,opacity:0,fillOpacity:0},strings:{},mapOptions:{rotate:!0,rotateControl:!1}},initialize(t,e){c.Util.setOptions(this,e),this.options.aimingRectOptions.interactive=!1,this.options.shadowRectOptions.interactive=!1,this._layer=t},onAdd(t){this._mainMap=t,this.lang=t.options.lang??this.options.lang??"zh_CN",this.langDic=p,this.options.strings={hideText:this.langDic[this.lang].hideEagle,showText:this.langDic[this.lang].showEagle},this._container=c.DomUtil.create("div",`${t.clsPrefix}-eaglemap`),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",c.DomEvent.disableClickPropagation(this._container),c.DomEvent.on(this._container,"mousewheel",c.DomEvent.stopPropagation);let e={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:t.options.crs,rotateControl:t.options.rotateControl,rotate:t.options.rotate,bearing:t.options.bearing,lang:this.lang};return e=c.Util.extend(this.options.mapOptions,e),this._eagleMap=new c.Map(this._container,e),this._layer instanceof c.Layer&&this._eagleMap.addLayer(this._layer),this._mainMapMoving=!1,this._eagleMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._eagleMap.whenReady(c.Util.bind(function(){this._aimingRect=new c.Rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._eagleMap),this._shadowRect=new c.Rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._eagleMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._eagleMap.on("movestart",this._onEagleMapMoveStarted,this),this._eagleMap.on("move",this._onEagleMapMoving,this),this._eagleMap.on("moveend",this._onEagleMapMoved,this)},this)),this._container},addTo(t){c.Control.prototype.addTo.call(this,t);const e=this.options.centerFixed||this._mainMap.getCenter();return this._eagleMap.setView(e,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._eagleMap.off("moveend",this._onEagleMapMoved,this),this._eagleMap.removeLayer(this._layer)},changeLayer(t){this._eagleMap.removeLayer(this._layer),this._layer=t,this._eagleMap.addLayer(this._layer)},_addToggleButton(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),`${this._mainMap.clsPrefix}-eaglemap-toggle-display ${this._mainMap.clsPrefix}-eaglemap-toggle-display-`+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText(){return this.options.minimized?this.langDic[this.lang].showEagle:this.langDic[this.lang].hideEagle},_createButton(t,e,i,n,s,o){const a=c.DomUtil.create("a",i,n);a.innerHTML=t,a.href="#",a.title=e;const r=c.DomEvent.stopPropagation;return c.DomEvent.on(a,"click",r).on(a,"mousedown",r).on(a,"dblclick",r).on(a,"click",c.DomEvent.preventDefault).on(a,"click",s,o),a},_toggleDisplayButtonClicked(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved(t){if(this._eagleMapMoving)this._eagleMapMoving=!1;else{const t=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._eagleMap.setView(t,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onEagleMapMoveStarted(t){if(!this.options.centerFixed){const t=this._aimingRect.getBounds(),e=this._eagleMap.latLngToContainerPoint(t.getSouthWest()),i=this._eagleMap.latLngToContainerPoint(t.getNorthEast());this._lastAimingRectPosition={sw:e,ne:i}}},_onEagleMapMoving(t){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new c.LatLngBounds(this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._eagleMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onEagleMapMoved(t){this._mainMapMoving?this._mainMapMoving=!1:(this._eagleMapMoving=!0,this._mainMap.setView(this._eagleMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed(){const t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()-this.options.zoomLevelOffset;{const t=this._eagleMap.getZoom()-this._mainMap.getZoom(),e=this._eagleMap.getZoom()+this.options.zoomLevelOffset;let i;return t<this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._eagleMap.getMinZoom()+this.options.zoomLevelOffset?this._eagleMap.getZoom()>this._lastEagleMapZoom?(i=this._mainMap.getZoom()+1,this._eagleMap.setZoom(this._eagleMap.getZoom()-1)):i=this._mainMap.getZoom():i=e,this._lastEagleMapZoom=this._eagleMap.getZoom(),i}},_decideMinimized(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._eagleMap.getBounds()):this._minimized},_isInteger:t=>"number"==typeof t,_isDefined:t=>void 0!==t,_onToggle(){c.Util.requestAnimFrame(function(){c.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),c.Browser.any3d||c.Util.requestAnimFrame(this._fireToggleEvents,this)},this)},_fireToggleEvents(){c.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);const t={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",t),this.fire("toggle",t)}}),f=L.FeatureGroup.extend({initialize(t,e){this.markers=[],L.Util.setOptions(this,e);const i="string"==typeof this.options.cssClass?this.options.cssClass:"vertex-marker",n=void 0!==this.options.iconSize?this.options.iconSize:[24,24],s=void 0!==this.options.iconAnchor?this.options.iconAnchor:[12,12],o=this.options.textFn,a="boolean"!=typeof this.options.firstVertex||this.options.firstVertex,r="boolean"!=typeof this.options.lastVertex||this.options.lastVertex;this.dragable=this.options.dragable||!1;let h=t;"function"==typeof t.getLatLngs&&(h=t.getLatLngs());for(let p=a?0:1,d=h.length-(r?0:1);p<d;p++){const t=h[p];var l="function"==typeof o?o.call(this,p,h):o||"",u=L.divIcon({className:i,html:l,iconSize:n,iconAnchor:s}),c=L.marker(t,{icon:u,pmIgnore:!0,index:p});this.markers.push(c)}L.FeatureGroup.prototype.initialize.call(this,this.markers)},onAdd(t){this.markers.forEach(t=>{L.FeatureGroup.prototype.addLayer.call(this,t)}),L.FeatureGroup.prototype.onAdd.call(this,t)},onRemove(t){this.markers.forEach(t=>{L.FeatureGroup.prototype.removeLayer.call(this,t)}),L.FeatureGroup.prototype.onRemove.call(this,t)}});class y extends L[L.Layer?"Layer":"Class"]{constructor(t,e,i,n,s){super(),L.setOptions(this,s),this._latlng=t,this._measurement=e,this._title=i,this._rotation=n,this.MEASUREDDATA=null,this.tempAcCurrDrawPoints=null}addTo(t){return t.addLayer(this),this}onAdd(t){this._map=t;const e=this.getPane?this.getPane():t.getPanes().markerPane,i=this._element=L.DomUtil.create("div","leaflet-zoom-animated leaflet-measure-path-measurement",e),n=L.DomUtil.create("div","",i);n.title=this._title,n.innerHTML=this._measurement,t.on("zoomanim",this._animateZoom,this),this._setPosition()}onRemove(t){t.off("zoomanim",this._animateZoom,this);(this.getPane?this.getPane():t.getPanes().markerPane).removeChild(this._element),this._map=null}_setPosition(){L.DomUtil.setPosition(this._element,this._map.latLngToLayerPoint(this._latlng)),this._element.style.transform+=" rotate("+this._rotation+"rad)"}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();L.DomUtil.setPosition(this._element,e),this._element.style.transform+=" rotate("+this._rotation+"rad)"}}c.Map.addInitHook(function(){var t,e,i;this.pm&&this.pm.setLang(this.options.lang.split("_")[0]),(null==(t=this.options.eagleMapControl)?void 0:t.show)&&(this.eagleMapControl=new g(this.options.eagleMapControl),this.addControl(this.eagleMapControl)),(null==(e=this.options.statusBarControl)?void 0:e.show)&&(this.statusBarControl=new m(this.options.statusBarControl),this.addControl(this.statusBarControl)),(null==(i=this.options.scaleControl)?void 0:i.show)&&(this.scaleControl=new c.Control.Scale(Object.assign({position:"bottomleft",maxWidth:100,metric:!0,imperial:!1},this.options.scaleControl)),this.addControl(this.scaleControl))}),c.Marker.addInitHook(function(){let t=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;t&&(t=t[0]+"px "+t[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||t||"center bottom",this.on("drag",t=>{t.target._applyRotation()})}),c.Marker.mergeOptions({scale:1,rotation:0,minZoom:0,maxZoom:16,hideOnMinZoom:!0,minificationScale:.6}),c.Marker.include({_setPos(t){this._icon.style.display="initial";const{rotation:e,minZoom:i,maxZoom:n,hideOnMinZoom:s,minificationScale:o}=this.options;if(i&&n&&n-i>0){const t=parseFloat(((1-o)/(n-i)).toFixed(2));this._map._zoom>=n?this.options.scale=1:this._map._zoom>i&this._map._zoom<n?this.options.scale=1-(n-this._map._zoom)*t:this._map._zoom<=i&&s?this._icon.style.display="none":this._map._zoom<=i&&!s&&(this.options.scale=o)}this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),this._icon&&c.DomUtil.setPosition(this._icon,t,e,t,this.options.scale),this._shadow&&c.DomUtil.setPosition(this._shadow,t,e,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_applyRotation(){this.options.rotation&&(this._icon.style[c.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,"msTransform"===c.DomUtil.TRANSFORM?this._icon.style[c.DomUtil.TRANSFORM]="rotate("+this.options.rotation+"deg)":this._icon.style[c.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotation+"deg)")},startTwinkle(t,e){this.twinkle(t,e)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(t=200,e=1/0){let i=!1,n=0;const s=()=>{n++,e&&t&&n>Math.floor(e/t)?(this.setOpacity(1),this.twinkleTimer=void 0):(i?(this.setOpacity(0),i=!1):(this.setOpacity(1),i=!0),this.twinkleTimer=setTimeout(s,t))};s()}}),c.Map.include({hasLayer:function(t){return t&&c.Util.stamp(t)in this._layers},removeLayerById:function(t){const e=this.getLayer(t);e&&this.removeLayer(e)}}),c.Path.addInitHook(function(){this.options.color&&(this.color=e.Color.from(this.options.color)),this.options.fillColor&&(this.fillColor=e.Color.from(this.options.fillColor))}),c.Polyline.addInitHook(function(){this.options.showMeasurements&&this.showMeasurements()}),c.Circle.include({toGeoJSON(){return{type:"Feature",properties:{},geometry:{type:"Circle",radius:this.getRadius(),coordinates:[this._latlng.lng,this._latlng.lat]}}}}),c.Layer.addInitHook(function(){this._leaflet_id=this.options.id||c.stamp({})}),c.LayerGroup.include({getLayerId:t=>t._leaflet_id,hasLayer(t){if(!t)return!1;return(["number","string"].includes(typeof t)?t:this.getLayerId(t))in this._layers}}),c.GridLayer.include({_setZoomTransform:function(t,i,n){null!=(s=i)&&this.options&&("gcj02"==this.options.corrdType?s=e.CoordsUtil.gcjEncrypt(i.lat,i.lng):"bd09"==this.options.corrdType&&(i=e.CoordsUtil.gcjEncrypt(i.lat,i.lng),s=e.CoordsUtil.bdEncrypt(i.lat,i.lng))),i=this._map.getZoomScale(n,t.zoom);var s=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(s,n)).round();c.Browser.any3d?c.DomUtil.setTransform(t.el,s,i):c.DomUtil.setPosition(t.el,s)},_getTiledPixelBounds:function(t){var i=(t=(null!=(n=t)&&this.options&&("gcj02"==this.options.corrdType?n=e.CoordsUtil.gcjEncrypt(t.lat,t.lng):"bd09"==this.options.corrdType&&(t=e.CoordsUtil.gcjEncrypt(t.lat,t.lng),n=e.CoordsUtil.bdEncrypt(t.lat,t.lng))),this._map))._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),n=(i=t.getZoomScale(i,this._tileZoom),t.project(n,this._tileZoom).floor());t=t.getSize().divideBy(2*i);return new c.Bounds(n.subtract(t),n.add(t))}}),c.TileLayer.addInitHook(function(){this.on("add",function(t){this._container.style.filter=Object.keys(this.options.style||{}).map(t=>`${t}(${this.options.style[t]})`).join(" ")})}),c.Polyline.include({_originalOnAdd:c.Polyline.prototype.onAdd,_originalOnRemove:c.Polyline.prototype.onRemove,_originalSetLatLngs:c.Polyline.prototype.setLatLngs,_originalAddLatLng:c.Polyline.prototype.addLatLng,setLatLngs:function(t){var e=this._map&&this._vertexMarkers&&this._latlngs.length!==t.length;this._originalSetLatLngs(t),e&&(this.removeVertexMarkers(),this.destroyVertexMarkers(),this.createVertexMarkers()),this.options.showMeasurements&&this.updateMeasurements()},removeVertexMarkers:function(){this._map&&this._vertexMarkers&&(this._map.removeLayer(this._vertexMarkers),this._vertexMarkers=void 0)},onAdd:function(t){this._originalOnAdd(t),this.createVertexMarkers(),this.options.showMeasurements&&this.showMeasurements(this.options.measurementOptions)},createVertexMarkers:function(){if(this._map){var t=this.options.vertexMarkers||{};void 0===this._vertexMarkers&&this.options.vertexMarkers&&(this._vertexMarkers=new f(this,t).addTo(this._map))}},destroyVertexMarkers:function(){this._vertexMarkers&&(this._vertexMarkers=void 0)},onRemove:function(t){this.removeVertexMarkers(),this._originalOnRemove(t),this.options.showMeasurements&&this.hideMeasurements()},showMeasurements(t){return!this._map||this._measurementLayer||(this._measurementOptions=c.extend({showCloseButton:!1,minPixelDistance:30,showDistances:!0,showArea:!0,showAggregate:!0,lang:{totalLength:"Total length",totalArea:"Total area",segmentLength:"Segment length"},map:this._map},t||{}),this._measurementLayer=(new c.LayerGroup).addTo(this._map),this.updateMeasurements(),this._map.on("zoomend",this.updateMeasurements,this)),this},hideMeasurements(){return this._map.off("zoomend",this.updateMeasurements,this),this._measurementLayer?(this._map.removeLayer(this._measurementLayer),this._measurementLayer=null,this):this},tempFormatDistance(t){const e=this._map.options.crs,i=new Array;for(let d=0;d<t.length;d++){const n=e.project(t[d]);i.push(n)}const n=i.length;let s,o,a,r,h,l,u=0;for(let d=0;d<n-1;d++)s=i[d],a=s.x,r=s.y,o=i[d+1],h=o.x,l=o.y,u+=Math.sqrt((a-h)*(a-h)+(r-l)*(r-l));const c=u;let p="";return p=c>1e3?"总长:"+Number(c/1e3).toFixed(1)+"公里":"总长:"+Math.round(c)+"米",p},tempMoveFormatDistance(t,e){const i=this._map.options.crs;t=i.project(t),t=new Array(t),e=i.project(e),t.push(e);const n=t.length;let s,o,a,r,h,l,u=0;for(let d=0;d<n-1;d++)s=t[d],a=s.x,r=s.y,o=t[d+1],h=o.x,l=o.y,u+=Math.sqrt((a-h)*(a-h)+(r-l)*(r-l));const c=u;let p="";return p=c>1e3?Number(c/1e3).toFixed(1)+"公里":Math.round(c)+"米",p},tempFormatArea(t){const e=this._map.options.crs,i=new Array;for(let m=0;m<t.length;m++){const n=e.project(t[m]);i.push(n)}let n=!0;for(var s=0;s<i.length-1;s++){n=i[s].x>180;break}const o=i.length;let a,r,h=0,l=0,u=0,c=0,p=0;if(null!=i){let t;if(n)for(s=0;s<o;s++)t=(s+1)%o,a=i[s],r=i[t],h+=a.x*r.y,h-=a.y*r.x;else{let e,n=0,d=0;for(s=0;s<o;s++)a=i[s],e=a.x,0==s?(n=e,d=e):(e<n&&(n=e),e>d&&(d=e));const _=parseInt(((n+d)/2+3)/6);for(s=0;s<o;s++)t=(s+1)%o,0==s?(a=i[s],l=widget.LonLatToXA80N(_,a.x,a.y)[0],u=widget.LonLatToXA80N(_,a.x,a.y)[1]):(l=c,u=p),r=i[t],c=widget.LonLatToXA80N(_,r.x,r.y)[0],p=widget.LonLatToXA80N(_,r.x,r.y)[1],h+=l*p,h-=c*u}}const d=Math.abs(h/2);let _="";return _=d>1e6?"总面积:"+Number(d/1e6).toFixed(4)+"平方公里\n(约:"+Number(.0015*d).toFixed(3)+"亩)":"总面积:"+d.toFixed(0)+"平方米\n(约:"+Number(.0015*d).toFixed(3)+"亩)",_},updateMeasurements(){if(!this._measurementLayer)return this;const t=this.getLatLngs();(new Array).push(t);let e=this.getLatLngs();const i=this instanceof c.Polygon,n=this._measurementOptions;let s,o,a,r,h;if(e&&e.length&&c.Util.isArray(e[0])&&(e=e[0]),this._measurementLayer.clearLayers(),this._measurementOptions.showDistances&&e.length>1){t.length;for(let t=1,l=e.length;i&&t<=l||t<l;t++)if(s=e[t-1],o=e[t%l],s.distanceTo(o),a=this._map.latLngToLayerPoint(s),r=this._map.latLngToLayerPoint(o),h=a.distanceTo(r),h>=n.minPixelDistance){const t=this.tempMoveFormatDistance(s,o);new y(this._map.layerPointToLatLng([(a.x+r.x)/2,(a.y+r.y)/2]),t,n.lang.segmentLength,this._getRotation(s,o),n).addTo(this._measurementLayer)}!i&&this._measurementOptions.showAggregate&&(new y(o,this.tempFormatDistance(t),n.lang.totalLength,0,n).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatDistance(t))}return i&&n.showArea&&e.length>2&&(new y(this.getBounds().getCenter(),this.tempFormatArea(t[0]),n.lang.totalArea,0,n).addTo(this._measurementLayer),this.MEASUREDDATA=this.tempFormatArea(t[0])),this},_getRotation(t,e){const i=this._map.project(t),n=this._map.project(e);return Math.atan((n.y-i.y)/(n.x-i.x))}}),c.LatLng.prototype.toArray=function(){return[this.lat,this.lng]},c.Path.include({startTwinkle(t,e,i={}){this.twinkle(t,e,i)},endTwinkle(){clearTimeout(this.twinkleTimer)},twinkle(t=200,e=1/0,i){let n=!1,s=0;const o=this.options,a=()=>{s++,e&&t&&s>Math.floor(e/t)?(this.setStyle({...o,fill:!0,stroke:!0}),this.twinkleTimer=void 0):(n?(this.setStyle({...i,fill:!1,stroke:!1}),n=!1):(this.setStyle({...i,fill:!0,stroke:!0}),n=!0),this.twinkleTimer=setTimeout(a,t))};a()},getArea(t){if(this instanceof c.Polyline){var e,i=this._latlngs[0],n=(t||this._map).options.crs,s=i.length;let o,a,r=0;if(null!=i)for(let t=0;t<s;t++)e=(t+1)%s,o=180<i[t].lng&&90<i[t].lat?{x:i[t].lat,y:i[t].lng}:n.project(i[t]),a=180<i[e].lng&&90<i[e].lat?{x:i[e].lat,y:i[e].lng}:n.project(i[e]),r=(r+=o.x*a.y)-o.y*a.x;return Math.abs(r/2)}return this instanceof c.Circle?2*Math.PI*this.getRadius():null},getLength(t){if(this instanceof c.Polyline){for(var e=[],i=(t||this._map).options.crs,n=this._latlngs,s=0;s<n.length;s++)this instanceof c.Polygon?e.push(...n[s]):this instanceof c.Polyline&&e.push(n[s]);let l,u,p=0;for(let t=0,n=e.length-1;t<n;t++){l=180<e[t][0]&&90<e[t][1]?{x:e[t].lat,y:e[t].lng}:i.project(e[t]),u=180<e[t+1][0]&&90<e[t+1][1]?{x:e[t+1].lat,y:e[t+1].lng}:i.project(e[t+1]);var o=l.x,a=l.y,r=u.x,h=u.y;p+=Math.sqrt((o-r)*(o-r)+(a-h)*(a-h))}return p}return this instanceof c.Circle?Math.PI*Math.pow(this.getRadius(),2):null}}),c.Control.mergeOptions({offset:[0,0]}),c.Control.addInitHook(function(){const{className:t,offset:[e,i]}=this.options;(e||i)&&setTimeout(()=>{const n=this.getContainer();n&&(n.style.transform=`translate(${e}px, ${i}px)`,t&&n.classList.add(t))},200)}),c.Canvas.include({_fillStroke:function(t,e){var i=e.options;if(i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke(),i.img)){const n=new Image;n.src=i.img,n.onload=function(){t.save(),t.clip();var i=e instanceof c.Circle?e._pxBounds:e._rawPxBounds,s=i.getSize(),o=t.createPattern(n,"repeat");t.fillStyle=o,t.fillRect(i.min.x,i.min.y,s.x,s.y),t.restore()}}}}),c.SVG.include({_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.img?("string"==typeof i.img&&i.img.match(/^url\(/)?this.__fillPattern(t):e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):(e.setAttribute("fill",i.fillColor),e.setAttribute("fill-opacity",t instanceof c.Polygon||t instanceof L.Circle||t instanceof L.CircleMarker?i.fillOpacity:0)))},__fillPattern:function(t){var e=t._path,i=t.options;this._defs||(this._defs=L.SVG.create("defs"),this._container.appendChild(this._defs));var n=i.img.substring(4,i.img.length-1),s=n+(Math.random()*Math.pow(10,17)+Math.random()*Math.pow(10,17));s+=(new Date).getUTCMilliseconds();var o=document.getElementById(s);if(!o){var a=new Image;a.src=n,(o=L.SVG.create("pattern")).setAttribute("id",s),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("patternUnits","userSpaceOnUse"),o.setAttribute("width","24"),o.setAttribute("height","24");var r=L.SVG.create("rect");r.setAttribute("width",24),r.setAttribute("height",24),r.setAttribute("x",0),r.setAttribute("x",0),r.setAttribute("fill",i.fillColor||i.color),o.appendChild(r),this._defs.appendChild(o);var h=L.SVG.create("image");h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttributeNS("http://www.w3.org/1999/xlink","href",n),h.setAttribute("width","24"),h.setAttribute("height","24"),o.appendChild(h),a.onload=function(){o.setAttribute("width",a.width),o.setAttribute("height",a.height),h.setAttribute("width",a.width),h.setAttribute("height",a.height)}}e.setAttribute("fill","url(#"+s+")")}});var A=6378137,v=.0066943799901413165,M=484813681109536e-20,x=Math.PI/2,b=1e-10,w=.017453292519943295,P=57.29577951308232,k=Math.PI/4,E=2*Math.PI,C=3.14159265359,S={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const T={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var B=/[\s_\-\/\(\)]/g;function O(t,e){if(t[e])return t[e];for(var i,n=Object.keys(t),s=e.toLowerCase().replace(B,""),o=-1;++o<n.length;)if((i=n[o]).toLowerCase().replace(B,"")===s)return t[i]}function D(t){var e,i,n,s={},o=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var i=e.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),a={proj:"projName",datum:"datumCode",rf:function(t){s.rf=parseFloat(t)},lat_0:function(t){s.lat0=t*w},lat_1:function(t){s.lat1=t*w},lat_2:function(t){s.lat2=t*w},lat_ts:function(t){s.lat_ts=t*w},lon_0:function(t){s.long0=t*w},lon_1:function(t){s.long1=t*w},lon_2:function(t){s.long2=t*w},alpha:function(t){s.alpha=parseFloat(t)*w},gamma:function(t){s.rectified_grid_angle=parseFloat(t)*w},lonc:function(t){s.longc=t*w},x_0:function(t){s.x0=parseFloat(t)},y_0:function(t){s.y0=parseFloat(t)},k_0:function(t){s.k0=parseFloat(t)},k:function(t){s.k0=parseFloat(t)},a:function(t){s.a=parseFloat(t)},b:function(t){s.b=parseFloat(t)},r:function(t){s.a=s.b=parseFloat(t)},r_a:function(){s.R_A=!0},zone:function(t){s.zone=parseInt(t,10)},south:function(){s.utmSouth=!0},towgs84:function(t){s.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){s.to_meter=parseFloat(t)},units:function(t){s.units=t;var e=O(T,t);e&&(s.to_meter=e.to_meter)},from_greenwich:function(t){s.from_greenwich=t*w},pm:function(t){var e=O(S,t);s.from_greenwich=(e||parseFloat(t))*w},nadgrids:function(t){"@null"===t?s.datumCode="none":s.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(s.axis=t)},approx:function(){s.approx=!0}};for(e in o)i=o[e],e in a?"function"==typeof(n=a[e])?n(i):s[n]=i:s[e]=i;return"string"==typeof s.datumCode&&"WGS84"!==s.datumCode&&(s.datumCode=s.datumCode.toLowerCase()),s}class R{static getId(t){const e=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const i=t[1],n=parseFloat(t[2])||null,s=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return{type:e,name:i,conversion_factor:n,id:s?{authority:s[1],code:parseInt(s[2],10)}:null}}static convertAxis(t){const e=t[1]||"Unknown";let i;const n=e.match(/^\((.)\)$/);if(n){const t=n[1].toUpperCase();if("E"===t)i="east";else if("N"===t)i="north";else{if("U"!==t)throw new Error(`Unknown axis abbreviation: ${t}`);i="up"}}else i=t[2]?t[2].toLowerCase():"unknown";const s=t.find(t=>Array.isArray(t)&&"ORDER"===t[0]),o=s?parseInt(s[1],10):null,a=t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]));return{name:e,direction:i,unit:this.convertUnit(a),order:o}}static extractAxes(t){return t.filter(t=>Array.isArray(t)&&"AXIS"===t[0]).map(t=>this.convertAxis(t)).sort((t,e)=>(t.order||0)-(e.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])):null,e.conversion=t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])):null;const i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={type:i[1],axis:this.extractAxes(t)});const n=t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]);if(n){const t=this.convertUnit(n);e.coordinate_system.unit=t}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0]));if(s){const i=this.convert(s);"ENSEMBLE"===s[0]?e.datum_ensemble=i:e.datum=i;const n=t.find(t=>Array.isArray(t)&&"PRIMEM"===t[0]);n&&"Greenwich"!==n[1]&&(i.prime_meridian={name:n[1],longitude:parseFloat(n[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(t=>Array.isArray(t)&&"MEMBER"===t[0]).map(t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)}));const o=t.find(t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]);o&&(e.accuracy=parseFloat(o[1]));const a=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0]);a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])&&this.convert(t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&"PARAMETER"===t[0]).map(t=>this.convert(t));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const r=t.find(t=>Array.isArray(t)&&"SOURCECRS"===t[0]);if(r){const t=r.find(t=>Array.isArray(t));e.source_crs=t?this.convert(t):null}const h=t.find(t=>Array.isArray(t)&&"TARGETCRS"===t[0]);if(h){const t=h.find(t=>Array.isArray(t));e.target_crs=t?this.convert(t):null}const l=t.find(t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]);e.transformation=l?this.convert(l):null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0])).map(t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0),7===e.parameters.length){const t=e.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(t=>{t.unit||(t.unit=u)}),u.conversion_factor&&1!==u.conversion_factor&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:u});break;default:e.keyword=t[0]}return e}}class I extends R{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&"Cartesian"===e.coordinate_system.subtype&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class z extends R{static convert(t,e={}){super.convert(t,e);const i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});const n=t.find(t=>Array.isArray(t)&&"USAGE"===t[0]);if(n){const t=n.find(t=>Array.isArray(t)&&"SCOPE"===t[0]),i=n.find(t=>Array.isArray(t)&&"AREA"===t[0]),s=n.find(t=>Array.isArray(t)&&"BBOX"===t[0]);e.usage={},t&&(e.usage.scope=t[1]),i&&(e.usage.area=i[1]),s&&(e.usage.bbox=s.slice(1))}return e}}function G(t){const e=function(t){return t.find(t=>Array.isArray(t)&&"USAGE"===t[0])?"2019":(t.find(t=>Array.isArray(t)&&"CS"===t[0])||"BOUNDCRS"===t[0]||"PROJCRS"===t[0]||t[0],"2015")}(t);return("2019"===e?z:I).convert(t)}var N=/\s/,j=/[A-Za-z]/,F=/[A-Za-z84_]/,U=/[,\]]/,Z=/[\d\.E\-\+]/;function q(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function H(t,e,i){Array.isArray(e)&&(i.unshift(e),e=null);var n=e?{}:t,s=i.reduce(function(t,e){return V(e,t),t},n);e&&(t[e]=s)}function V(t,e){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(e[i]={},void V(t[0],e[i])):void(e[i]=t[0]);if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in e||(e[i]=[]),void e[i].push(t);var n;switch(Array.isArray(i)||(e[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&V(t[2],e[i]));case"SPHEROID":case"ELLIPSOID":return e[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&V(t[3],e[i]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void H(e,i,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],H(e,i,t),void(e[i].type=i);default:for(n=-1;++n<t.length;)if(!Array.isArray(t[n]))return V(t,e[i]);return H(e,i,t)}}else e[i]=t;else e[i]=!0}else e[t]=!0}q.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;N.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},q.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(U.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},q.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},q.prototype.number=function(t){if(!Z.test(t)){if(U.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},q.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},q.prototype.keyword=function(t){if(F.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!U.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},q.prototype.neutral=function(t){if(j.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(Z.test(t))return this.word=t,void(this.state=3);if(!U.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},q.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function K(t){return.017453292519943295*t}function W(t){const e=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==e&&"lambert azimuthal equal area"!==e||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==e&&"polar stereographic (variant b)"!==e?t.lat_ts||!t.lat0||"polar stereographic"!==e&&"polar stereographic (variant a)"!==e||(t.lat_ts=t.lat0,t.lat0=K(t.lat0>0?90:-90),delete t.lat1):(t.lat0=K(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function X(t){let e={units:null,to_meter:void 0};return"string"==typeof t?(e.units=t.toLowerCase(),"metre"===e.units&&(e.units="meter"),"meter"===e.units&&(e.to_meter=1)):t&&t.name&&(e.units=t.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.to_meter=t.conversion_factor),e}function $(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function Y(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=$(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?e.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(e.rf=e.a/(e.a-$(t.ellipsoid.semi_minor_axis))))}function J(t,e={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(J(t.source_crs,e),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?e.nadgrids=t.transformation.parameters[0].value:e.datum_params=t.transformation.parameters.map(t=>t.value)),e):(Object.keys(t).forEach(i=>{const n=t[i];if(null!==n)switch(i){case"name":if(e.srsCode)break;e.name=n,e.srsCode=n;break;case"type":"GeographicCRS"===n?e.projName="longlat":"ProjectedCRS"===n&&t.conversion&&t.conversion.method&&(e.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(e.ellps=n.ellipsoid.name,Y(n,e)),n.prime_meridian&&(e.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=n.name,Y(n,e);break;case"prime_meridian":e.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis)if(e.axis=n.axis.map(t=>{const e=t.direction;if("east"===e)return"e";if("north"===e)return"n";if("west"===e)return"w";if("south"===e)return"s";throw new Error(`Unknown axis direction: ${e}`)}).join("")+"u",n.unit){const{units:t,to_meter:i}=X(n.unit);e.units=t,e.to_meter=i}else if(n.axis[0]&&n.axis[0].unit){const{units:t,to_meter:i}=X(n.axis[0].unit);e.units=t,e.to_meter=i}break;case"id":n.authority&&n.code&&(e.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(e.projName=n.method.name),n.parameters&&n.parameters.forEach(t=>{const i=t.name.toLowerCase().replace(/\s+/g,"_"),n=t.value;t.unit&&t.unit.conversion_factor?e[i]=n*t.unit.conversion_factor:"degree"===t.unit?e[i]=n*Math.PI/180:e[i]=n});break;case"unit":n.name&&(e.units=n.name.toLowerCase(),"metre"===e.units&&(e.units="meter")),n.conversion_factor&&(e.to_meter=n.conversion_factor);break;case"base_crs":J(n,e),e.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name}}),void 0!==e.latitude_of_false_origin&&(e.lat0=e.latitude_of_false_origin),void 0!==e.longitude_of_false_origin&&(e.long0=e.longitude_of_false_origin),void 0!==e.latitude_of_standard_parallel&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),void 0!==e.latitude_of_1st_standard_parallel&&(e.lat1=e.latitude_of_1st_standard_parallel),void 0!==e.latitude_of_2nd_standard_parallel&&(e.lat2=e.latitude_of_2nd_standard_parallel),void 0!==e.latitude_of_projection_centre&&(e.lat0=e.latitude_of_projection_centre),void 0!==e.longitude_of_projection_centre&&(e.longc=e.longitude_of_projection_centre),void 0!==e.easting_at_false_origin&&(e.x0=e.easting_at_false_origin),void 0!==e.northing_at_false_origin&&(e.y0=e.northing_at_false_origin),void 0!==e.latitude_of_natural_origin&&(e.lat0=e.latitude_of_natural_origin),void 0!==e.longitude_of_natural_origin&&(e.long0=e.longitude_of_natural_origin),void 0!==e.longitude_of_origin&&(e.long0=e.longitude_of_origin),void 0!==e.false_easting&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),void 0!==e.false_northing&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),void 0!==e.standard_parallel_1&&(e.lat1=e.standard_parallel_1),void 0!==e.standard_parallel_2&&(e.lat2=e.standard_parallel_2),void 0!==e.scale_factor_at_natural_origin&&(e.k0=e.scale_factor_at_natural_origin),void 0!==e.scale_factor_at_projection_centre&&(e.k0=e.scale_factor_at_projection_centre),void 0!==e.scale_factor_on_pseudo_standard_parallel&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),void 0!==e.azimuth&&(e.alpha=e.azimuth),void 0!==e.azimuth_at_projection_centre&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),W(e),e):t}var Q=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function tt(t){for(var e=Object.keys(t),i=0,n=e.length;i<n;++i){var s=e[i];-1!==Q.indexOf(s)&&et(t[s]),"object"==typeof t[s]&&tt(t[s])}}function et(t){if(t.AUTHORITY){var e=Object.keys(t.AUTHORITY)[0];e&&e in t.AUTHORITY&&(t.title=e+":"+t.AUTHORITY[e])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var i="",n=0,s=t.AXIS.length;n<s;++n){var o=[t.AXIS[n][0].toLowerCase(),t.AXIS[n][1].toLowerCase()];-1!==o[0].indexOf("north")||("y"===o[0]||"lat"===o[0])&&"north"===o[1]?i+="n":-1!==o[0].indexOf("south")||("y"===o[0]||"lat"===o[0])&&"south"===o[1]?i+="s":-1!==o[0].indexOf("east")||("x"===o[0]||"lon"===o[0])&&"east"===o[1]?i+="e":-1===o[0].indexOf("west")&&("x"!==o[0]&&"lon"!==o[0]||"west"!==o[1])||(i+="w")}2===i.length&&(i+="u"),3===i.length&&(t.axis=i)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var a=t.GEOGCS;function r(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(a=t),a&&(a.DATUM?t.datumCode=a.DATUM.name.toLowerCase():t.datumCode=a.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(t.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=a.DATUM.SPHEROID.a,t.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(t.datum_params=a.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=K(t.rectified_grid_angle));[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",K],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",K],["x0","false_easting",r],["y0","false_northing",r],["long0","central_meridian",K],["lat0","latitude_of_origin",K],["lat0","standard_parallel_1",K],["lat1","standard_parallel_1",K],["lat2","standard_parallel_2",K],["azimuth","Azimuth"],["alpha","azimuth",K],["srsCode","name"]].forEach(function(e){return i=t,s=(n=e)[0],o=n[1],void(!(s in i)&&o in i&&(i[s]=i[o],3===n.length&&(i[s]=n[2](i[s]))));var i,n,s,o}),W(t)}function it(t){if("object"==typeof t)return J(t);const e=function(t){const e=t.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}(t);var i=new q(t).output();if("WKT2"===e){return J(G(i))}var n=i[0],s={};return V(i,s),tt(s),s[n]}function nt(t){var e=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?nt[t]=D(arguments[1]):nt[t]=it(arguments[1]):nt[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){return Array.isArray(t)?nt.apply(e,t):nt(t)});if("string"==typeof t){if(t in nt)return nt[t]}else"EPSG"in t?nt["EPSG:"+t.EPSG]=t:"ESRI"in t?nt["ESRI:"+t.ESRI]=t:"IAU2000"in t&&(nt["IAU2000:"+t.IAU2000]=t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)t("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(nt);var st=["3857","900913","3785","102113"];function ot(t){if(!function(t){return"string"==typeof t}(t))return"projName"in t?t:it(t);if(function(t){return t in nt}(t))return nt[t];if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){var e=it(t);if(function(t){var e=O(t,"authority");if(e){var i=O(e,"epsg");return i&&st.indexOf(i)>-1}}(e))return nt["EPSG:3857"];var i=function(t){var e=O(t,"extension");if(e)return O(e,"proj4")}(e);return i?D(i):e}return function(t){return"+"===t[0]}(t)?D(t):void 0}function at(t,e){var i,n;if(t=t||{},!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t}function rt(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)}function ht(t){return t<0?-1:1}function lt(t){return Math.abs(t)<=C?t:t-ht(t)*E}function ut(t,e,i){var n=t*i,s=.5*t;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(x-e))/n}function ct(t,e){for(var i,n,s=.5*t,o=x-2*Math.atan(e),a=0;a<=15;a++)if(i=t*Math.sin(o),o+=n=x-2*Math.atan(e*Math.pow((1-i)/(1+i),s))-o,Math.abs(n)<=1e-10)return o;return-9999}function pt(t){return t}var dt=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,i,n=t.x,s=t.y;if(s*P>90&&s*P<-90&&n*P>180&&n*P<-180)return null;if(Math.abs(Math.abs(s)-x)<=b)return null;if(this.sphere)e=this.x0+this.a*this.k0*lt(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(k+.5*s));else{var o=Math.sin(s),a=ut(this.e,s,o);e=this.x0+this.a*this.k0*lt(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n=t.x-this.x0,s=t.y-this.y0;if(this.sphere)i=x-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var o=Math.exp(-s/(this.a*this.k0));if(-9999===(i=ct(this.e,o)))return null}return e=lt(this.long0+n/(this.a*this.k0)),t.x=e,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:pt,inverse:pt,names:["longlat","identity"]}],_t={},mt=[];function gt(t,e){var i=mt.length;return!t.names||(mt[i]=t,t.names.forEach(function(t){_t[t.toLowerCase()]=i}),this)}function ft(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}const yt={start:function(){dt.forEach(gt)},add:gt,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==_t[e]&&mt[_t[e]]||(e=ft(e))in _t&&mt[_t[e]]?mt[_t[e]]:void 0}};var At={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const vt=At.WGS84;var Mt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var Lt in Mt){var xt=Mt[Lt];xt.datumName&&(Mt[xt.datumName]=xt)}var bt={};async function wt(t,e){for(var i=[],n=await e.getImageCount(),s=n-1;s>=0;s--){var o=await e.getImage(s),a=await o.readRasters(),r=[o.getWidth(),o.getHeight()],h=o.getBoundingBox().map(kt),l=[o.fileDirectory.ModelPixelScale[0],o.fileDirectory.ModelPixelScale[1]].map(kt),u=h[0]+(r[0]-1)*l[0],c=h[3]-(r[1]-1)*l[1],p=a[0],d=a[1],_=[];for(let t=r[1]-1;t>=0;t--)for(let e=r[0]-1;e>=0;e--){var m=t*r[0]+e;_.push([-Et(d[m]),Et(p[m])])}i.push({del:l,lim:r,ll:[-u,c],cvs:_})}var g={header:{nSubgrids:n},subgrids:i};return bt[t]=g,g}function Pt(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:bt[t]||null,isNull:!1}}function kt(t){return t*Math.PI/180}function Et(t){return t/3600*Math.PI/180}function Ct(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function St(t){return t.map(function(t){return[Et(t.longitudeShift),Et(t.latitudeShift)]})}function Tt(t,e,i){return{name:Ct(t,e+8,e+16).trim(),parent:Ct(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,i),upperLatitude:t.getFloat64(e+88,i),lowerLongitude:t.getFloat64(e+104,i),upperLongitude:t.getFloat64(e+120,i),latitudeInterval:t.getFloat64(e+136,i),longitudeInterval:t.getFloat64(e+152,i),gridNodeCount:t.getInt32(e+168,i)}}function Bt(t,e,i,n,s){var o=e+176,a=16;!1===s&&(a=8);for(var r=[],h=0;h<i.gridNodeCount;h++){var l={latitudeShift:t.getFloat32(o+h*a,n),longitudeShift:t.getFloat32(o+h*a+4,n)};!1!==s&&(l.latitudeAccuracy=t.getFloat32(o+h*a+8,n),l.longitudeAccuracy=t.getFloat32(o+h*a+12,n)),r.push(l)}return r}function Ot(t,e){if(!(this instanceof Ot))return new Ot(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.names=null,this.title,e=e||function(t){if(t)throw t};var i=ot(t);if("object"==typeof i){var n=Ot.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var s=O(Mt,i.datumCode);s&&(i.datum_params=i.datum_params||(s.towgs84?s.towgs84.split(","):null),i.ellps=s.ellipse,i.datumName=s.datumName?s.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var o,a,r,h,l,u,c,p=function(t,e,i,n,s){if(!t){var o=O(At,n);o||(o=vt),t=o.a,e=o.b,i=o.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<b)&&(s=!0,e=t),{a:t,b:e,rf:i,sphere:s}}(i.a,i.b,i.rf,i.ellps,i.sphere),d=(o=p.a,a=p.b,p.rf,r=i.R_A,u=((h=o*o)-(l=a*a))/h,c=0,r?(h=(o*=1-u*(.16666666666666666+u*(.04722222222222222+.022156084656084655*u)))*o,u=0):c=Math.sqrt(u),{es:u,e:c,ep2:(h-l)/l}),_=function(t){return void 0===t?null:t.split(",").map(Pt)}(i.nadgrids),m=i.datum||function(t,e,i,n,s,o,a){var r={};return r.datum_type=void 0===t||"none"===t?5:4,e&&(r.datum_params=e.map(parseFloat),0===r.datum_params[0]&&0===r.datum_params[1]&&0===r.datum_params[2]||(r.datum_type=1),r.datum_params.length>3&&(0===r.datum_params[3]&&0===r.datum_params[4]&&0===r.datum_params[5]&&0===r.datum_params[6]||(r.datum_type=2,r.datum_params[3]*=M,r.datum_params[4]*=M,r.datum_params[5]*=M,r.datum_params[6]=r.datum_params[6]/1e6+1))),a&&(r.datum_type=3,r.grids=a),r.a=i,r.b=n,r.es=s,r.ep2=o,r}(i.datumCode,i.datum_params,p.a,p.b,d.es,d.ep2,_);at(this,i),at(this,n),this.a=p.a,this.b=p.b,this.rf=p.rf,this.sphere=p.sphere,this.es=d.es,this.e=d.e,this.ep2=d.ep2,this.datum=m,"init"in this&&"function"==typeof this.init&&this.init(),e(null,this)}else e("Could not get projection name from: "+t)}else e("Could not parse to valid json: "+t)}function Dt(t,e,i){var n,s,o,a,r=t.x,h=t.y,l=t.z?t.z:0;if(h<-x&&h>-1.001*x)h=-x;else if(h>x&&h<1.001*x)h=x;else{if(h<-x)return{x:-1/0,y:-1/0,z:t.z};if(h>x)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),s=Math.sin(h),a=Math.cos(h),o=s*s,{x:((n=i/Math.sqrt(1-e*o))+l)*a*Math.cos(r),y:(n+l)*a*Math.sin(r),z:(n*(1-e)+l)*s}}function Rt(t,e,i,n){var s,o,a,r,h,l,u,c,p,d,_,m,g,f,y,A=1e-12,v=t.x,M=t.y,L=t.z?t.z:0;if(s=Math.sqrt(v*v+M*M),o=Math.sqrt(v*v+M*M+L*L),s/i<A){if(f=0,o/i<A)return y=-n,{x:t.x,y:t.y,z:t.z}}else f=Math.atan2(M,v);a=L/o,c=(r=s/o)*(1-e)*(h=1/Math.sqrt(1-e*(2-e)*r*r)),p=a*h,g=0;do{g++,l=e*(u=i/Math.sqrt(1-e*p*p))/(u+(y=s*c+L*p-u*(1-e*p*p))),m=(_=a*(h=1/Math.sqrt(1-l*(2-l)*r*r)))*c-(d=r*(1-l)*h)*p,c=d,p=_}while(m*m>1e-24&&g<30);return{x:f,y:Math.atan(_/Math.abs(d)),z:y}}function It(t){return 1===t||2===t}function zt(t,e,i){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return i;if(5===t.datum_type||5===e.datum_type)return i;var n=t.a,s=t.es;if(3===t.datum_type){if(0!==Gt(t,!1,i))return;n=A,s=v}var o=e.a,a=e.b,r=e.es;if(3===e.datum_type&&(o=A,a=6356752.314,r=v),s===r&&n===o&&!It(t.datum_type)&&!It(e.datum_type))return i;if((i=Dt(i,s,n),It(t.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],s=i[1],o=i[2],a=i[3],r=i[4],h=i[5],l=i[6];return{x:l*(t.x-h*t.y+r*t.z)+n,y:l*(h*t.x+t.y-a*t.z)+s,z:l*(-r*t.x+a*t.y+t.z)+o}}}(i,t.datum_type,t.datum_params)),It(e.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],s=i[1],o=i[2],a=i[3],r=i[4],h=i[5],l=i[6],u=(t.x-n)/l,c=(t.y-s)/l,p=(t.z-o)/l;return{x:u+h*c-r*p,y:-h*u+c+a*p,z:r*u-a*c+p}}}(i,e.datum_type,e.datum_params)),i=Rt(i,r,o,a),3===e.datum_type)&&0!==Gt(e,!0,i))return;return i}function Gt(t,e,i){if(null===t.grids||0===t.grids.length)return-1;var n={x:-i.x,y:i.y},s={x:Number.NaN,y:Number.NaN},o=[];t:for(var a=0;a<t.grids.length;a++){var r=t.grids[a];if(o.push(r.name),r.isNull){s=n;break}if(null!==r.grid)for(var h=r.grid.subgrids,l=0,u=h.length;l<u;l++){var c=h[l],p=(Math.abs(c.del[1])+Math.abs(c.del[0]))/1e4,d=c.ll[0]-p,_=c.ll[1]-p,m=c.ll[0]+(c.lim[0]-1)*c.del[0]+p,g=c.ll[1]+(c.lim[1]-1)*c.del[1]+p;if(!(_>n.y||d>n.x||g<n.y||m<n.x)&&(s=Nt(n,e,c),!isNaN(s.x)))break t}else if(r.mandatory)return-1}return isNaN(s.x)?-1:(i.x=-s.x,i.y=s.y,0)}function Nt(t,e,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return n;var s={x:t.x,y:t.y};s.x-=i.ll[0],s.y-=i.ll[1],s.x=lt(s.x-Math.PI)+Math.PI;var o=jt(s,i);if(e){if(isNaN(o.x))return n;o.x=s.x-o.x,o.y=s.y-o.y;var a,r,h=9;do{if(r=jt(o,i),isNaN(r.x))break;a={x:s.x-(r.x+o.x),y:s.y-(r.y+o.y)},o.x+=a.x,o.y+=a.y}while(h--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(h<0)return n;n.x=lt(o.x+i.ll[0]),n.y=o.y+i.ll[1]}else isNaN(o.x)||(n.x=t.x+o.x,n.y=t.y+o.y);return n}function jt(t,e){var i,n={x:t.x/e.del[0],y:t.y/e.del[1]},s=Math.floor(n.x),o=Math.floor(n.y),a=n.x-1*s,r=n.y-1*o,h={x:Number.NaN,y:Number.NaN};if(s<0||s>=e.lim[0])return h;if(o<0||o>=e.lim[1])return h;i=o*e.lim[0]+s;var l=e.cvs[i][0],u=e.cvs[i][1];i++;var c=e.cvs[i][0],p=e.cvs[i][1];i+=e.lim[0];var d=e.cvs[i][0],_=e.cvs[i][1];i--;var m=e.cvs[i][0],g=e.cvs[i][1],f=a*r,y=a*(1-r),A=(1-a)*(1-r),v=(1-a)*r;return h.x=A*l+y*c+v*m+f*d,h.y=A*u+y*p+v*g+f*_,h}function Ft(t,e,i){var n,s,o,a=i.x,r=i.y,h=i.z||0,l={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==i.z)switch(0===o?(n=a,s=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(n=r,s=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(n=h,s="z"),t.axis[o]){case"e":case"n":l[s]=n;break;case"w":case"s":l[s]=-n;break;case"u":void 0!==i[s]&&(l.z=n);break;case"d":void 0!==i[s]&&(l.z=-n);break;default:return null}return l}function Ut(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function Zt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function qt(t,e,i,n){var s,o=void 0!==(i=Array.isArray(i)?Ut(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(function(t){Zt(t.x),Zt(t.y)}(i),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type||3===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(i=qt(t,s=new Ot("WGS84"),i,n),t=s),n&&"enu"!==t.axis&&(i=Ft(t,!1,i)),"longlat"===t.projName)i={x:i.x*w,y:i.y*w,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=zt(t.datum,e.datum,i))return e.from_greenwich&&(i={x:i.x-e.from_greenwich,y:i.y,z:i.z||0}),"longlat"===e.projName?i={x:i.x*P,y:i.y*P,z:i.z||0}:(i=e.forward(i),e.to_meter&&(i={x:i.x/e.to_meter,y:i.y/e.to_meter,z:i.z||0})),n&&"enu"!==e.axis?Ft(e,!0,i):(i&&!o&&delete i.z,i)}Ot.projections=yt,Ot.projections.start();var Ht=Ot("WGS84");function Vt(t,e,i,n){var s,o,a;return Array.isArray(i)?(s=qt(t,e,i,n)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof s.z?[s.x,s.y,s.z].concat(i.slice(3)):[s.x,s.y,i[2]].concat(i.slice(3)):[s.x,s.y].concat(i.slice(2)):[s.x,s.y]):(o=qt(t,e,i,n),2===(a=Object.keys(i)).length||a.forEach(function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;o[n]=i[n]}),o)}function Kt(t){return t instanceof Ot?t:"object"==typeof t&&"oProj"in t?t.oProj:Ot(t)}var Wt="AJSAJS",Xt="AFAFAF",$t=65,Yt=73,Jt=79,Qt=86,te=90;const ee={forward:ie,inverse:function(t){var e=ae(le(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:ne};function ie(t,e){return e=e||5,function(t,e){var i="00000"+t.easting,n="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(d=t.easting,_=t.northing,m=t.zoneNumber,g=he(m),f=Math.floor(d/1e5),y=Math.floor(_/1e5)%20,s=f,o=y,a=g,r=a-1,h=Wt.charCodeAt(r),l=Xt.charCodeAt(r),u=h+s-1,c=l+o,p=!1,u>te&&(u=u-te+$t-1,p=!0),(u===Yt||h<Yt&&u>Yt||(u>Yt||h<Yt)&&p)&&u++,(u===Jt||h<Jt&&u>Jt||(u>Jt||h<Jt)&&p)&&++u===Yt&&u++,u>te&&(u=u-te+$t-1),c>Qt?(c=c-Qt+$t-1,p=!0):p=!1,(c===Yt||l<Yt&&c>Yt||(c>Yt||l<Yt)&&p)&&c++,(c===Jt||l<Jt&&c>Jt||(c>Jt||l<Jt)&&p)&&++c===Yt&&c++,c>Qt&&(c=c-Qt+$t-1),String.fromCharCode(u)+String.fromCharCode(c))+i.substr(i.length-5,e)+n.substr(n.length-5,e);var s,o,a,r,h,l,u,c,p;var d,_,m,g,f,y}(function(t){var e,i,n,s,o,a,r,h,l=t.lat,u=t.lon,c=6378137,p=.00669438,d=.9996,_=se(l),m=se(u);h=Math.floor((u+180)/6)+1,180===u&&(h=60);l>=56&&l<64&&u>=3&&u<12&&(h=32);l>=72&&l<84&&(u>=0&&u<9?h=31:u>=9&&u<21?h=33:u>=21&&u<33?h=35:u>=33&&u<42&&(h=37));r=se(6*(h-1)-180+3),e=p/(1-p),i=c/Math.sqrt(1-p*Math.sin(_)*Math.sin(_)),n=Math.tan(_)*Math.tan(_),s=e*Math.cos(_)*Math.cos(_),o=Math.cos(_)*(m-r),a=c*((1-p/4-3*p*p/64-5*p*p*p/256)*_-(3*p/8+3*p*p/32+45*p*p*p/1024)*Math.sin(2*_)+(15*p*p/256+45*p*p*p/1024)*Math.sin(4*_)-35*p*p*p/3072*Math.sin(6*_));var g=d*i*(o+(1-n+s)*o*o*o/6+(5-18*n+n*n+72*s-58*e)*o*o*o*o*o/120)+5e5,f=d*(a+i*Math.tan(_)*(o*o/2+(5-n+9*s+4*s*s)*o*o*o*o/24+(61-58*n+n*n+600*s-330*e)*o*o*o*o*o*o/720));l<0&&(f+=1e7);return{northing:Math.round(f),easting:Math.round(g),zoneNumber:h,zoneLetter:re(l)}}({lat:t[1],lon:t[0]}),e)}function ne(t){var e=ae(le(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function se(t){return t*(Math.PI/180)}function oe(t){return t/Math.PI*180}function ae(t){var e=t.northing,i=t.easting,n=t.zoneLetter,s=t.zoneNumber;if(s<0||s>60)return null;var o,a,r,h,l,u,c,p,d,_=.9996,m=6378137,g=.00669438,f=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=i-5e5,A=e;n<"N"&&(A-=1e7),c=6*(s-1)-180+3,o=.006739496752268451,d=(p=A/_/6367449.145945056)+(3*f/2-27*f*f*f/32)*Math.sin(2*p)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*p)+151*f*f*f/96*Math.sin(6*p),a=m/Math.sqrt(1-g*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),h=o*Math.cos(d)*Math.cos(d),l=.99330562*m/Math.pow(1-g*Math.sin(d)*Math.sin(d),1.5),u=y/(a*_);var v=d-a*Math.tan(d)/l*(u*u/2-(5+3*r+10*h-4*h*h-9*o)*u*u*u*u/24+(61+90*r+298*h+45*r*r-1.6983531815716497-3*h*h)*u*u*u*u*u*u/720);v=oe(v);var M,L=(u-(1+2*r+h)*u*u*u/6+(5-2*h+28*r-3*h*h+8*o+24*r*r)*u*u*u*u*u/120)/Math.cos(d);if(L=c+oe(L),t.accuracy){var x=ae({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});M={top:x.lat,right:x.lon,bottom:v,left:L}}else M={lat:v,lon:L};return M}function re(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function he(t){var e=t%6;return 0===e&&(e=6),e}function le(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,n=null,s="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;s+=e,o++}var a=parseInt(s,10);if(0===o||o+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(o++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;n=t.substring(o,o+=2);for(var h=he(a),l=function(t,e){var i=Wt.charCodeAt(e-1),n=1e5,s=!1;for(;i!==t.charCodeAt(0);){if(++i===Yt&&i++,i===Jt&&i++,i>te){if(s)throw"Bad character: "+t;i=$t,s=!0}n+=1e5}return n}(n.charAt(0),h),u=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var i=Xt.charCodeAt(e-1),n=0,s=!1;for(;i!==t.charCodeAt(0);){if(++i===Yt&&i++,i===Jt&&i++,i>Qt){if(s)throw"Bad character: "+t;i=$t,s=!0}n+=1e5}return n}(n.charAt(1),h);u<ue(r);)u+=2e6;var c=i-o;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var p,d,_,m=c/2,g=0,f=0;return m>0&&(p=1e5/Math.pow(10,m),d=t.substring(o,o+m),g=parseFloat(d)*p,_=t.substring(o+m),f=parseFloat(_)*p),{easting:g+l,northing:f+u,zoneLetter:r,zoneNumber:a,accuracy:p}}function ue(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function ce(t,e,i){if(!(this instanceof ce))return new ce(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0]),this.y=parseFloat(n[1]),this.z=parseFloat(n[2])||0}else this.x=t,this.y=e,this.z=i||0}ce.fromMGRS=function(t){return new ce(ne(t))},ce.prototype.toMGRS=function(t){return ie([this.x,this.y],t)};var pe=.046875,de=.01953125,_e=.01068115234375;function me(t){var e=[];e[0]=1-t*(.25+t*(pe+t*(de+t*_e))),e[1]=t*(.75-t*(pe+t*(de+t*_e)));var i=t*t;return e[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,e[3]=i*(.3645833333333333-.005696614583333333*t),e[4]=i*t*.3076171875,e}function ge(t,e,i,n){return i*=e,e*=e,n[0]*t-i*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}function fe(t,e,i){for(var n=1/(1-e),s=t,o=20;o;--o){var a=Math.sin(s),r=1-e*a*a;if(s-=r=(ge(s,a,Math.cos(s),i)-t)*(r*Math.sqrt(r))*n,Math.abs(r)<b)return s}return s}const ye={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=me(this.es),this.ml0=ge(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,i,n,s=t.x,o=t.y,a=lt(s-this.long0),r=Math.sin(o),h=Math.cos(o);if(this.es){var l=h*a,u=Math.pow(l,2),c=this.ep2*Math.pow(h,2),p=Math.pow(c,2),d=Math.abs(h)>b?Math.tan(o):0,_=Math.pow(d,2),m=Math.pow(_,2);e=1-this.es*Math.pow(r,2),l/=Math.sqrt(e);var g=ge(o,r,h,this.en);i=this.a*(this.k0*l*(1+u/6*(1-_+c+u/20*(5-18*_+m+14*c-58*_*c+u/42*(61+179*m-m*_-479*_)))))+this.x0,n=this.a*(this.k0*(g-this.ml0+r*a*l/2*(1+u/12*(5-_+9*c+4*p+u/30*(61+m-58*_+270*c-330*_*c+u/56*(1385+543*m-m*_-3111*_))))))+this.y0}else{var f=h*Math.sin(a);if(Math.abs(Math.abs(f)-1)<b)return 93;if(i=.5*this.a*this.k0*Math.log((1+f)/(1-f))+this.x0,n=h*Math.cos(a)/Math.sqrt(1-Math.pow(f,2)),(f=Math.abs(n))>=1){if(f-1>b)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=i,t.y=n,t},inverse:function(t){var e,i,n,s,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(i=fe(e=this.ml0+a/this.k0,this.es,this.en),Math.abs(i)<x){var r=Math.sin(i),h=Math.cos(i),l=Math.abs(h)>b?Math.tan(i):0,u=this.ep2*Math.pow(h,2),c=Math.pow(u,2),p=Math.pow(l,2),d=Math.pow(p,2);e=1-this.es*Math.pow(r,2);var _=o*Math.sqrt(e)/this.k0,m=Math.pow(_,2);n=i-(e*=l)*m/(1-this.es)*.5*(1-m/12*(5+3*p-9*u*p+u-4*c-m/30*(61+90*p-252*u*p+45*d+46*u-m/56*(1385+3633*p+4095*d+1574*d*p)))),s=lt(this.long0+_*(1-m/6*(1+2*p+u-m/20*(5+28*p+24*d+8*u*p+6*u-m/42*(61+662*p+1320*d+720*d*p))))/h)}else n=x*ht(a),s=0;else{var g=Math.exp(o/this.k0),f=.5*(g-1/g),y=this.lat0+a/this.k0,A=Math.cos(y);e=Math.sqrt((1-Math.pow(A,2))/(1+Math.pow(f,2))),n=Math.asin(e),a<0&&(n=-n),s=0===f&&0===A?0:lt(Math.atan2(f,A)+this.long0)}return t.x=s,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Ae(t){var e=Math.exp(t);return e=(e-1/e)/2}function ve(t,e){t=Math.abs(t),e=Math.abs(e);var i=Math.max(t,e),n=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function Me(t){var e=Math.abs(t);return e=function(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}(e*(1+e/(ve(1,e)+1))),t<0?-e:e}function Le(t,e){for(var i,n=2*Math.cos(2*e),s=t.length-1,o=t[s],a=0;--s>=0;)i=n*o-a+t[s],a=o,o=i;return e+i*Math.sin(2*e)}function xe(t,e,i){for(var n,s,o=Math.sin(e),a=Math.cos(e),r=Ae(i),h=function(t){var e=Math.exp(t);return(e+1/e)/2}(i),l=2*a*h,u=-2*o*r,c=t.length-1,p=t[c],d=0,_=0,m=0;--c>=0;)n=_,s=d,p=l*(_=p)-n-u*(d=m)+t[c],m=u*_-s+l*d;return[(l=o*h)*p-(u=a*r)*m,l*m+u*p]}const be={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(ye.init.apply(this),this.forward=ye.forward,this.inverse=ye.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),i=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),i*=e,this.cgb[1]=i*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),i*=e,this.cgb[2]=i*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=i*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),i*=e,this.cgb[3]=i*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=i*(1237/630+e*(e*(-24832/14175)-2.4)),i*=e,this.cgb[4]=i*(4174/315+e*(-144838/6237)),this.cbg[4]=i*(-734/315+e*(109598/31185)),i*=e,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=i*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=i*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),i*=e,this.utg[2]=i*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=i*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),i*=e,this.utg[3]=i*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=i*(49561/161280+e*(-179/168+e*(6601661/7257600))),i*=e,this.utg[4]=i*(-4583/161280+e*(108847/3991680)),this.gtu[4]=i*(34729/80640+e*(-3418889/1995840)),i*=e,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=Le(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var i,n=2*Math.cos(e),s=t.length-1,o=t[s],a=0;--s>=0;)i=n*o-a+t[s],a=o,o=i;return Math.sin(e)*i}(this.gtu,2*n))},forward:function(t){var e=lt(t.x-this.long0),i=t.y;i=Le(this.cbg,i);var n=Math.sin(i),s=Math.cos(i),o=Math.sin(e),a=Math.cos(e);i=Math.atan2(n,a*s),e=Math.atan2(o*s,ve(n,s*a)),e=Me(Math.tan(e));var r,h,l=xe(this.gtu,2*i,2*e);return i+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(r=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*i+this.Zb)+this.y0):(r=1/0,h=1/0),t.x=r,t.y=h,t},inverse:function(t){var e,i,n=(t.x-this.x0)*(1/this.a),s=(t.y-this.y0)*(1/this.a);if(s=(s-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var o=xe(this.utg,2*s,2*n);s+=o[0],n+=o[1],n=Math.atan(Ae(n));var a=Math.sin(s),r=Math.cos(s),h=Math.sin(n),l=Math.cos(n);s=Math.atan2(a*l,ve(h,l*r)),e=lt((n=Math.atan2(h,l*r))+this.long0),i=Le(this.cgb,s)}else e=1/0,i=1/0;return t.x=e,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};const we={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(lt(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*w,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,be.init.apply(this),this.forward=be.forward,this.inverse=be.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function Pe(t,e){return Math.pow((1-t)/(1+t),e)}const ke={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+k)/(Math.pow(Math.tan(.5*this.lat0+k),this.C)*Pe(this.e*t,this.ratexp))},forward:function(t){var e=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+k),this.C)*Pe(this.e*Math.sin(i),this.ratexp))-x,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,i=t.y,n=Math.pow(Math.tan(.5*i+k)/this.K,1/this.C),s=20;s>0&&(i=2*Math.atan(n*Pe(this.e*Math.sin(t.y),-.5*this.e))-x,!(Math.abs(i-t.y)<1e-14));--s)t.y=i;return s?(t.x=e,t.y=i,t):null}};const Ee={init:function(){ke.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,n,s;return t.x=lt(t.x-this.long0),ke.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),n=Math.cos(t.x),s=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*n),t.x=s*i*Math.sin(t.x),t.y=s*(this.cosc0*e-this.sinc0*i*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,n,s,o;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,o=ve(t.x,t.y)){var a=2*Math.atan2(o,this.R2);e=Math.sin(a),i=Math.cos(a),s=Math.asin(i*this.sinc0+t.y*e*this.cosc0/o),n=Math.atan2(t.x*e,o*this.cosc0*i-t.y*this.sinc0*e)}else s=this.phic0,n=0;return t.x=n,t.y=s,ke.inverse.apply(this,[t]),t.x=lt(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function Ce(t,e,i){return e*=i,Math.tan(.5*(x+t))*Math.pow((1-e)/(1+e),.5*i)}const Se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=b&&(this.k0=.5*(1+ht(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=b&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=b&&Math.abs(Math.cos(this.lat_ts))>b&&(this.k0=.5*this.cons*rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/ut(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=rt(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(Ce(this.lat0,this.sinlat0,this.e))-x,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,i,n,s,o,a,r=t.x,h=t.y,l=Math.sin(h),u=Math.cos(h),c=lt(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=b&&Math.abs(h+this.lat0)<=b?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*u*Math.cos(c)),t.x=this.a*e*u*Math.sin(c)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*u*Math.cos(c))+this.y0,t):(i=2*Math.atan(Ce(h,l,this.e))-x,s=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=b?(o=ut(this.e,h*this.con,this.con*l),a=2*this.a*this.k0*o/this.cons,t.x=this.x0+a*Math.sin(r-this.long0),t.y=this.y0-this.con*a*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)<b?(e=2*this.a*this.k0/(1+s*Math.cos(c)),t.y=e*n):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*s*Math.cos(c))),t.y=e*(this.cosX0*n-this.sinX0*s*Math.cos(c))+this.y0),t.x=e*s*Math.sin(c)+this.x0,t))},inverse:function(t){var e,i,n,s,o;t.x-=this.x0,t.y-=this.y0;var a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var r=2*Math.atan(a/(2*this.a*this.k0));return e=this.long0,i=this.lat0,a<=b?(t.x=e,t.y=i,t):(i=Math.asin(Math.cos(r)*this.sinlat0+t.y*Math.sin(r)*this.coslat0/a),e=Math.abs(this.coslat0)<b?this.lat0>0?lt(this.long0+Math.atan2(t.x,-1*t.y)):lt(this.long0+Math.atan2(t.x,t.y)):lt(this.long0+Math.atan2(t.x*Math.sin(r),a*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=e,t.y=i,t)}if(Math.abs(this.coslat0)<=b){if(a<=b)return i=this.lat0,e=this.long0,t.x=e,t.y=i,t;t.x*=this.con,t.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*ct(this.e,n),e=this.con*lt(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=b?o=this.X0:(o=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/a),e=lt(this.long0+Math.atan2(t.x*Math.sin(s),a*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),i=-1*ct(this.e,Math.tan(.5*(x+o)));return t.x=e,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:Ce};const Te={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,n=1/this.rf,s=2*n-Math.pow(n,2),o=this.e=Math.sqrt(s);this.R=this.k0*i*Math.sqrt(1-s)/(1-s*Math.pow(e,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+o*e)/(1-o*e));this.K=a-this.alpha*r+this.alpha*o/2*h},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+i)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(o))),r=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,n=e/this.R,s=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),r=this.lambda0+a/this.alpha,h=0,l=o,u=-1e3,c=0;Math.abs(l-u)>1e-7;){if(++c>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]};var Be=1e-7;const Oe={init:function(){var t,e,i,n,s,o,a,r,h,l,u,c,p,d,_=0,m=0,g=0,f=0,y=0,A=0,v=0;this.no_off=(p=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],d="object"==typeof(c=this).projName?Object.keys(c.projName)[0]:c.projName,"no_uoff"in c||"no_off"in c||-1!==p.indexOf(d)||-1!==p.indexOf(ft(d))),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var L=!1;if("rectified_grid_angle"in this&&(L=!0),M&&(v=this.alpha),L&&(_=this.rectified_grid_angle),M||L)m=this.longc;else if(g=this.long1,y=this.lat1,f=this.long2,A=this.lat2,Math.abs(y-A)<=Be||(t=Math.abs(y))<=Be||Math.abs(t-x)<=Be||Math.abs(Math.abs(this.lat0)-x)<=Be||Math.abs(Math.abs(A)-x)<=Be)throw new Error;var w=1-this.es;e=Math.sqrt(w),Math.abs(this.lat0)>b?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/w),this.A=this.B*this.k0*e/t,(s=(n=this.B*e/(i*Math.sqrt(t)))*n-1)<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(ut(this.e,this.lat0,r),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=s=1),M||L?(M?(u=Math.asin(Math.sin(v)/n),L||(_=v)):(u=_,v=Math.asin(n*Math.sin(u))),this.lam0=m-Math.asin(.5*(s-1/s)*Math.tan(u))/this.B):(o=Math.pow(ut(this.e,y,Math.sin(y)),this.B),a=Math.pow(ut(this.e,A,Math.sin(A)),this.B),s=this.E/o,h=(a-o)/(a+o),l=((l=this.E*this.E)-a*o)/(l+a*o),(t=g-f)<-Math.PI?f-=E:t>Math.PI&&(f+=E),this.lam0=lt(.5*(g+f)-Math.atan(l*Math.tan(.5*this.B*(g-f))/h)/this.B),u=Math.atan(2*Math.sin(this.B*lt(g-this.lam0))/(s-1/s)),_=v=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(_),this.cosrot=Math.cos(_),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(k-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(k+s))},forward:function(t){var e,i,n,s,o,a,r,h,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-x)>b){if(e=.5*((o=this.E/Math.pow(ut(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/o)),i=.5*(o+a),s=Math.sin(this.B*t.x),n=(e*this.singam-s*this.cosgam)/i,Math.abs(Math.abs(n)-1)<b)throw new Error;h=.5*this.ArB*Math.log((1-n)/(1+n)),a=Math.cos(this.B*t.x),r=Math.abs(a)<Be?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+s*this.singam,a)}else h=t.y>0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(l.x=r,l.y=h):(r-=this.u_0,l.x=h*this.cosrot+r*this.sinrot,l.y=r*this.cosrot-h*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var e,i,n,s,o,a,r,h={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,e=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=.5*((n=Math.exp(-this.BrA*i))-1/n),o=.5*(n+1/n),r=((a=Math.sin(this.BrA*e))*this.cosgam+s*this.singam)/o,Math.abs(Math.abs(r)-1)<b)h.x=0,h.y=r<0?-x:x;else{if(h.y=this.E/Math.sqrt((1+r)/(1-r)),h.y=ct(this.e,Math.pow(h.y,1/this.B)),h.y===1/0)throw new Error;h.x=-this.rB*Math.atan2(s*this.cosgam-a*this.singam,Math.cos(this.BrA*e))}return h.x+=this.lam0,h},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};const De={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<b)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),i=Math.cos(this.lat1),n=rt(this.e,e,i),s=ut(this.e,this.lat1,e),o=Math.sin(this.lat2),a=Math.cos(this.lat2),r=rt(this.e,o,a),h=ut(this.e,this.lat2,o),l=Math.abs(Math.abs(this.lat0)-x)<b?0:ut(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>b?this.ns=Math.log(n/r)/Math.log(s/h):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=b&&(i=ht(i)*(x-2e-10));var n,s,o=Math.abs(Math.abs(i)-x);if(o>b)n=ut(this.e,i,Math.sin(i)),s=this.a*this.f0*Math.pow(n,this.ns);else{if((o=i*this.ns)<=0)return null;s=0}var a=this.ns*lt(e-this.long0);return t.x=this.k0*(s*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,t},inverse:function(t){var e,i,n,s,o,a=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+r*r),i=1):(e=-Math.sqrt(a*a+r*r),i=-1);var h=0;if(0!==e&&(h=Math.atan2(i*a,i*r)),0!==e||this.ns>0){if(i=1/this.ns,n=Math.pow(e/(this.a*this.f0),i),-9999===(s=ct(this.e,n)))return null}else s=-x;return o=lt(h/this.ns+this.long0),t.x=o,t.y=s,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};const Re={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y,u=lt(h-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),o=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(s)),a=this.n*o,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),t.y=r*Math.cos(a)/1,t.x=r*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,n,s,o,a,r,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),i=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(e)),t.x=this.long0-i/this.alfa,a=e,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(r=1),a=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function Ie(t,e,i,n,s){return t*s-e*Math.sin(2*s)+i*Math.sin(4*s)-n*Math.sin(6*s)}function ze(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Ge(t){return.375*t*(1+.25*t*(1+.46875*t))}function Ne(t){return.05859375*t*t*(1+.75*t)}function je(t){return t*t*t*(35/3072)}function Fe(t,e,i){var n=e*i;return t/Math.sqrt(1-n*n)}function Ue(t){return Math.abs(t)<x?t:t-ht(t)*Math.PI}function Ze(t,e,i,n,s){var o,a;o=t/e;for(var r=0;r<15;r++)if(o+=a=(t-(e*o-i*Math.sin(2*o)+n*Math.sin(4*o)-s*Math.sin(6*o)))/(e-2*i*Math.cos(2*o)+4*n*Math.cos(4*o)-6*s*Math.cos(6*o)),Math.abs(a)<=1e-10)return o;return NaN}const qe={init:function(){this.sphere||(this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.ml0=this.a*Ie(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,i,n=t.x,s=t.y;if(n=lt(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(s)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(s),Math.cos(n))-this.lat0);else{var o=Math.sin(s),a=Math.cos(s),r=Fe(this.a,this.e,o),h=Math.tan(s)*Math.tan(s),l=n*Math.cos(s),u=l*l,c=this.es*a*a/(1-this.es);e=r*l*(1-u*h*(1/6-(8-h+8*c)*u/120)),i=this.a*Ie(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+r*o/a*u*(.5+(5-h+6*c)*u/24)}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n=t.x/this.a,s=t.y/this.a;if(this.sphere){var o=s+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=Ze(this.ml0/this.a+s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-x)<=b)return t.x=this.long0,t.y=x,s<0&&(t.y*=-1),t;var r=Fe(this.a,this.e,Math.sin(a)),h=r*r*r/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(a),2),u=n*this.a/r,c=u*u;e=a-r*Math.tan(a)/h*u*u*(.5-(1+3*l)*u*u/24),i=u*(1-c*(l/3+(1+3*l)*l*c/15))/Math.cos(a)}return t.x=lt(i+this.long0),t.y=Ue(e),t},names:["Cassini","Cassini_Soldner","cass"]};function He(t,e){var i;return t>1e-7?(1-t*t)*(e/(1-(i=t*e)*i)-.5/t*Math.log((1-i)/(1+i))):2*e}var Ve=.3333333333333333,Ke=.17222222222222222,We=.10257936507936508,Xe=.06388888888888888,$e=.0664021164021164,Ye=.016415012942191543;const Je={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-x)<b?this.mode=this.lat0<0?1:2:Math.abs(e)<b?this.mode=3:this.mode=4,this.es>0)switch(this.qp=He(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,i=[];return i[0]=t*Ve,e=t*t,i[0]+=e*Ke,i[1]=e*Xe,e*=t,i[0]+=e*We,i[1]+=e*$e,i[2]=e*Ye,i}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=He(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,i,n,s,o,a,r,h,l,u,c=t.x,p=t.y;if(c=lt(c-this.long0),this.sphere){if(o=Math.sin(p),u=Math.cos(p),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+u*n:1+this.sinph0*o+this.cosph0*u*n)<=b)return null;e=(i=Math.sqrt(2/i))*u*Math.sin(c),i*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)<b)return null;i=k-.5*p,e=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(c),i*=n}}else{switch(r=0,h=0,l=0,n=Math.cos(c),s=Math.sin(c),o=Math.sin(p),a=He(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(r=a/this.qp,h=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:l=1+this.sinb1*r+this.cosb1*h*n;break;case this.EQUIT:l=1+h*n;break;case this.N_POLE:l=x+p,a=this.qp-a;break;case this.S_POLE:l=p-x,a=this.qp+a}if(Math.abs(l)<b)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),i=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*r-this.sinb1*h*n):(l=Math.sqrt(2/(1+h*n)))*r*this.ymf,e=this.xmf*l*h*s;break;case this.N_POLE:case this.S_POLE:a>=0?(e=(l=Math.sqrt(a))*s,i=n*(this.mode===this.S_POLE?l:-l)):e=i=0}}return t.x=this.a*e+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n,s,o,a,r,h,l,u,c=t.x/this.a,p=t.y/this.a;if(this.sphere){var d,_=0,m=0;if((i=.5*(d=Math.sqrt(c*c+p*p)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(i),_=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(d)<=b?0:Math.asin(p*m/d),c*=m,p=_*d;break;case this.OBLIQ:i=Math.abs(d)<=b?this.lat0:Math.asin(_*this.sinph0+p*m*this.cosph0/d),c*=m*this.cosph0,p=(_-Math.sin(i)*this.sinph0)*d;break;case this.N_POLE:p=-p,i=x-i;break;case this.S_POLE:i-=x}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(c,p):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,p*=this.dd,(a=Math.sqrt(c*c+p*p))<b)return t.x=this.long0,t.y=this.lat0,t;s=2*Math.asin(.5*a/this.rq),n=Math.cos(s),c*=s=Math.sin(s),this.mode===this.OBLIQ?(r=n*this.sinb1+p*s*this.cosb1/a,o=this.qp*r,p=a*this.cosb1*n-p*this.sinb1*s):(r=p*s/a,o=this.qp*r,p=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),!(o=c*c+p*p))return t.x=this.long0,t.y=this.lat0,t;r=1-o/this.qp,this.mode===this.S_POLE&&(r=-r)}e=Math.atan2(c,p),h=Math.asin(r),l=this.apa,u=h+h,i=h+l[0]*Math.sin(u)+l[1]*Math.sin(u+u)+l[2]*Math.sin(u+u+u)}return t.x=lt(this.long0+e),t.y=i,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Qe(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}const ti={init:function(){Math.abs(this.lat1+this.lat2)<b||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=rt(this.e3,this.sin_po,this.cos_po),this.qs1=He(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=rt(this.e3,this.sin_po,this.cos_po),this.qs2=He(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=He(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>b?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=He(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*lt(e-this.long0),a=s*Math.sin(o)+this.x0,r=this.rh-s*Math.cos(o)+this.y0;return t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),s=0,0!==e&&(s=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),o=lt(s/this.ns0+this.long0),t.x=o,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,n,s,o,a=Qe(.5*e);if(t<b)return a;for(var r=t*t,h=1;h<=25;h++)if(a+=o=.5*(s=1-(n=t*(i=Math.sin(a)))*n)*s/Math.cos(a)*(e/(1-r)-i/s+.5/t*Math.log((1-n)/(1+n))),Math.abs(o)<=1e-7)return a;return null}};const ei={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y;return n=lt(h-this.long0),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),(o=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(o)<=b?(a=this.x0+1*this.a*i*Math.sin(n)/o,r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)/o):(a=this.x0+this.infinity_dist*i*Math.sin(n),r=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*s)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(s=Math.atan2(e,this.rc),i=Math.sin(s),a=Qe((n=Math.cos(s))*this.sin_p14+t.y*i*this.cos_p14/e),o=Math.atan2(t.x*i,e*this.cos_p14*n-t.y*this.sin_p14*i),o=lt(this.long0+o)):(a=this.phic0,o=0),t.x=o,t.y=a,t},names:["gnom"]};const ii={init:function(){this.sphere||(this.k0=rt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,n=t.x,s=t.y,o=lt(n-this.long0);if(this.sphere)e=this.x0+this.a*o*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts);else{var a=He(this.e,Math.sin(s));e=this.x0+this.a*this.k0*o,i=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var e,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=lt(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,e){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-i)<1e-6)return e<0?-1*x:x;for(var n,s,o,a,r=Math.asin(.5*e),h=0;h<30;h++)if(s=Math.sin(r),o=Math.cos(r),a=t*s,r+=n=Math.pow(1-a*a,2)/(2*o)*(e/(1-t*t)-s/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return r;return NaN}(this.e,2*t.y*this.k0/this.a),e=lt(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=i,t},names:["cea"]};const ni={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,n=lt(e-this.long0),s=Ue(i-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*s,t},inverse:function(t){var e=t.x,i=t.y;return t.x=lt(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Ue(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]};const si={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.ml0=this.a*Ie(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,n,s=t.x,o=t.y,a=lt(s-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=b?(e=this.a*a,i=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(o),i=this.a*(Ue(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=b)e=this.a*a,i=-1*this.ml0;else{var r=Fe(this.a,this.e,Math.sin(o))/Math.tan(o);e=r*Math.sin(n),i=this.a*Ie(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+r*(1-Math.cos(n))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,n,s,o,a,r,h,l;if(n=t.x-this.x0,s=t.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=b)e=lt(n/this.a+this.long0),i=0;else{var u;for(a=this.lat0+s/this.a,r=n*n/this.a/this.a+a*a,h=a,o=20;o;--o)if(h+=l=-1*(a*(h*(u=Math.tan(h))+1)-h-.5*(h*h+r)*u)/((h-a)/u-1),Math.abs(l)<=b){i=h;break}e=lt(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(i))}else if(Math.abs(s+this.ml0)<=b)i=0,e=lt(this.long0+n/this.a);else{var c,p,d,_,m;for(a=(this.ml0+s)/this.a,r=n*n/this.a/this.a+a*a,h=a,o=20;o;--o)if(m=this.e*Math.sin(h),c=Math.sqrt(1-m*m)*Math.tan(h),p=this.a*Ie(this.e0,this.e1,this.e2,this.e3,h),d=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=l=(a*(c*(_=p/this.a)+1)-_-.5*c*(_*_+r))/(this.es*Math.sin(2*h)*(_*_+r-2*a*_)/(4*c)+(a-_)*(c*d-2/Math.sin(2*h))-d),Math.abs(l)<=b){i=h;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=lt(this.long0+Math.asin(n*c/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},names:["Polyconic","American_Polyconic","poly"]};const oi={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,i=t.x,n=t.y-this.lat0,s=i-this.long0,o=n/M*1e-5,a=s,r=1,h=0;for(e=1;e<=10;e++)r*=o,h+=this.A[e]*r;var l,u=h,c=a,p=1,d=0,_=0,m=0;for(e=1;e<=6;e++)l=d*u+p*c,p=p*u-d*c,d=l,_=_+this.B_re[e]*p-this.B_im[e]*d,m=m+this.B_im[e]*p+this.B_re[e]*d;return t.x=m*this.a+this.x0,t.y=_*this.a+this.y0,t},inverse:function(t){var e,i,n=t.x,s=t.y,o=n-this.x0,a=(s-this.y0)/this.a,r=o/this.a,h=1,l=0,u=0,c=0;for(e=1;e<=6;e++)i=l*a+h*r,h=h*a-l*r,l=i,u=u+this.C_re[e]*h-this.C_im[e]*l,c=c+this.C_im[e]*h+this.C_re[e]*l;for(var p=0;p<this.iterations;p++){var d,_=u,m=c,g=a,f=r;for(e=2;e<=6;e++)d=m*u+_*c,_=_*u-m*c,m=d,g+=(e-1)*(this.B_re[e]*_-this.B_im[e]*m),f+=(e-1)*(this.B_im[e]*_+this.B_re[e]*m);_=1,m=0;var y=this.B_re[1],A=this.B_im[1];for(e=2;e<=6;e++)d=m*u+_*c,_=_*u-m*c,m=d,y+=e*(this.B_re[e]*_-this.B_im[e]*m),A+=e*(this.B_im[e]*_+this.B_re[e]*m);var v=y*y+A*A;u=(g*y+f*A)/v,c=(f*y-g*A)/v}var L=u,x=c,b=1,w=0;for(e=1;e<=9;e++)b*=L,w+=this.D[e]*b;var P=this.lat0+w*M*1e5,k=this.long0+x;return t.x=k,t.y=P,t},names:["New_Zealand_Map_Grid","nzmg"]};const ai={init:function(){},forward:function(t){var e=t.x,i=t.y,n=lt(e-this.long0),s=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=s,t.y=o,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=lt(this.long0+t.x/this.a),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=i,t},names:["Miller_Cylindrical","mill"]};const ri={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=me(this.es)},forward:function(t){var e,i,n=t.x,s=t.y;if(n=lt(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(s),a=20;a;--a){var r=(this.m*s+Math.sin(s)-o)/(this.m+Math.cos(s));if(s-=r,Math.abs(r)<b)break}else s=1!==this.n?Math.asin(this.n*Math.sin(s)):s;e=this.a*this.C_x*n*(this.m+Math.cos(s)),i=this.a*this.C_y*s}else{var h=Math.sin(s),l=Math.cos(s);i=this.a*ge(s,h,l,this.en),e=this.a*n*l/Math.sqrt(1-this.es*h*h)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n;return t.x-=this.x0,i=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,i/=this.C_x*(this.m+Math.cos(e)),this.m?e=Qe((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Qe(Math.sin(e)/this.n)),i=lt(i+this.long0),e=Ue(e)):(e=fe(t.y/this.a,this.es,this.en),(n=Math.abs(e))<x?(n=Math.sin(e),i=lt(this.long0+t.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(e)))):n-b<x&&(i=this.long0)),t.x=i,t.y=e,t},names:["Sinusoidal","sinu"]};const hi={init:function(){},forward:function(t){for(var e=t.x,i=t.y,n=lt(e-this.long0),s=i,o=Math.PI*Math.sin(i);;){var a=-(s+Math.sin(s)-o)/(1+Math.cos(s));if(s+=a,Math.abs(a)<b)break}s/=2,Math.PI/2-Math.abs(i)<b&&(n=0);var r=.900316316158*this.a*n*Math.cos(s)+this.x0,h=1.4142135623731*this.a*Math.sin(s)+this.y0;return t.x=r,t.y=h,t},inverse:function(t){var e,i;t.x-=this.x0,t.y-=this.y0,i=t.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),e=Math.asin(i);var n=lt(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*e+Math.sin(2*e))/Math.PI,Math.abs(i)>1&&(i=1);var s=Math.asin(i);return t.x=n,t.y=s,t},names:["Mollweide","moll"]};const li={init:function(){Math.abs(this.lat1+this.lat2)<b||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ze(this.es),this.e1=Ge(this.es),this.e2=Ne(this.es),this.e3=je(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=rt(this.e,this.sin_phi,this.cos_phi),this.ml1=Ie(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<b?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=rt(this.e,this.sin_phi,this.cos_phi),this.ml2=Ie(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Ie(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,i=t.x,n=t.y;if(this.sphere)e=this.a*(this.g-n);else{var s=Ie(this.e0,this.e1,this.e2,this.e3,n);e=this.a*(this.g-s)}var o=this.ns*lt(i-this.long0),a=this.x0+e*Math.sin(o),r=this.y0+this.rh-e*Math.cos(o);return t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;return 0!==i&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere?(s=lt(this.long0+o/this.ns),n=Ue(this.g-i/this.a),t.x=s,t.y=n,t):(n=Ze(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),s=lt(this.long0+o/this.ns),t.x=s,t.y=n,t)},names:["Equidistant_Conic","eqdc"]};const ui={init:function(){this.R=this.a},forward:function(t){var e,i,n=t.x,s=t.y,o=lt(n-this.long0);Math.abs(s)<=b&&(e=this.x0+this.R*o,i=this.y0);var a=Qe(2*Math.abs(s/Math.PI));(Math.abs(o)<=b||Math.abs(Math.abs(s)-x)<=b)&&(e=this.x0,i=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var r=.5*Math.abs(Math.PI/o-o/Math.PI),h=r*r,l=Math.sin(a),u=Math.cos(a),c=u/(l+u-1),p=c*c,d=c*(2/l-1),_=d*d,m=Math.PI*this.R*(r*(c-_)+Math.sqrt(h*(c-_)*(c-_)-(_+h)*(p-_)))/(_+h);o<0&&(m=-m),e=this.x0+m;var g=h+c;return m=Math.PI*this.R*(d*g-r*Math.sqrt((_+h)*(h+1)-g*g))/(_+h),i=s>=0?this.y0+m:this.y0-m,t.x=e,t.y=i,t},inverse:function(t){var e,i,n,s,o,a,r,h,l,u,c,p;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,o=(n=t.x/c)*n+(s=t.y/c)*s,c=3*(s*s/(h=-2*(a=-Math.abs(s)*(1+o))+1+2*s*s+o*o)+(2*(r=a-2*s*s+n*n)*r*r/h/h/h-9*a*r/h/h)/27)/(l=(a-r*r/3/h)/h)/(u=2*Math.sqrt(-l/3)),Math.abs(c)>1&&(c=c>=0?1:-1),p=Math.acos(c)/3,i=t.y>=0?(-u*Math.cos(p+Math.PI/3)-r/3/h)*Math.PI:-(-u*Math.cos(p+Math.PI/3)-r/3/h)*Math.PI,e=Math.abs(n)<b?this.long0:lt(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-s*s)+o*o))/2/n),t.x=e,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]};const ci={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var e,i,n,s,o,a,r,h,l,u,c,p=t.x,d=t.y,_=Math.sin(t.y),m=Math.cos(t.y),g=lt(p-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=b?(t.x=this.x0+this.a*(x-d)*Math.sin(g),t.y=this.y0-this.a*(x-d)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=b?(t.x=this.x0+this.a*(x+d)*Math.sin(g),t.y=this.y0+this.a*(x+d)*Math.cos(g),t):(l=this.sin_p12*_+this.cos_p12*m*Math.cos(g),h=(r=Math.acos(l))?r/Math.sin(r):1,t.x=this.x0+this.a*h*m*Math.sin(g),t.y=this.y0+this.a*h*(this.cos_p12*_-this.sin_p12*m*Math.cos(g)),t):(e=ze(this.es),i=Ge(this.es),n=Ne(this.es),s=je(this.es),Math.abs(this.sin_p12-1)<=b?(o=this.a*Ie(e,i,n,s,x),a=this.a*Ie(e,i,n,s,d),t.x=this.x0+(o-a)*Math.sin(g),t.y=this.y0-(o-a)*Math.cos(g),t):Math.abs(this.sin_p12+1)<=b?(o=this.a*Ie(e,i,n,s,x),a=this.a*Ie(e,i,n,s,d),t.x=this.x0+(o+a)*Math.sin(g),t.y=this.y0+(o+a)*Math.cos(g),t):Math.abs(p)<b&&Math.abs(d-this.lat0)<b?(t.x=t.y=0,t):(c=(u=function(t,e,i,n,s,o){const a=n-e,r=Math.atan((1-o)*Math.tan(t)),h=Math.atan((1-o)*Math.tan(i)),l=Math.sin(r),u=Math.cos(r),c=Math.sin(h),p=Math.cos(h);let d,_,m,g,f,y,A,v,M,L,x,b,w,P,k,E=a,C=100;do{if(_=Math.sin(E),m=Math.cos(E),g=Math.sqrt(p*_*(p*_)+(u*c-l*p*m)*(u*c-l*p*m)),0===g)return{azi1:0,s12:0};f=l*c+u*p*m,y=Math.atan2(g,f),A=u*p*_/g,v=1-A*A,M=0!==v?f-2*l*c/v:0,L=o/16*v*(4+o*(4-3*v)),d=E,E=a+(1-L)*o*A*(y+L*g*(M+L*f*(2*M*M-1)))}while(Math.abs(E-d)>1e-12&&--C>0);return 0===C?{azi1:NaN,s12:NaN}:(x=v*(s*s-s*(1-o)*(s*(1-o)))/(s*(1-o)*(s*(1-o))),b=1+x/16384*(4096+x*(x*(320-175*x)-768)),w=x/1024*(256+x*(x*(74-47*x)-128)),P=w*g*(M+w/4*(f*(2*M*M-1)-w/6*M*(4*g*g-3)*(4*M*M-3))),k=s*(1-o)*b*(y-P),{azi1:Math.atan2(p*_,u*c-l*p*m),s12:k})}(this.lat0,this.long0,d,p,this.a,this.f)).azi1,t.x=u.s12*Math.sin(c),t.y=u.s12*Math.cos(c),t))},inverse:function(t){var e,i,n,s,o,a,r,h,l,u,c,p,d,_,m;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*x*this.a)return;return i=e/this.a,n=Math.sin(i),s=Math.cos(i),o=this.long0,Math.abs(e)<=b?a=this.lat0:(a=Qe(s*this.sin_p12+t.y*n*this.cos_p12/e),r=Math.abs(this.lat0)-x,o=Math.abs(r)<=b?this.lat0>=0?lt(this.long0+Math.atan2(t.x,-t.y)):lt(this.long0-Math.atan2(-t.x,t.y)):lt(this.long0+Math.atan2(t.x*n,e*this.cos_p12*s-t.y*this.sin_p12*n))),t.x=o,t.y=a,t}return h=ze(this.es),l=Ge(this.es),u=Ne(this.es),c=je(this.es),Math.abs(this.sin_p12-1)<=b?(a=Ze(((p=this.a*Ie(h,l,u,c,x))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,h,l,u,c),o=lt(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=a,t):Math.abs(this.sin_p12+1)<=b?(p=this.a*Ie(h,l,u,c,x),a=Ze(((e=Math.sqrt(t.x*t.x+t.y*t.y))-p)/this.a,h,l,u,c),o=lt(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=a,t):(d=Math.atan2(t.x,t.y),_=Math.sqrt(t.x*t.x+t.y*t.y),m=function(t,e,i,n,s,o){const a=Math.atan((1-o)*Math.tan(t)),r=Math.sin(a),h=Math.cos(a),l=Math.sin(i),u=Math.cos(i),c=Math.atan2(r,h*u),p=h*l,d=1-p*p,_=d*(s*s-s*(1-o)*(s*(1-o)))/(s*(1-o)*(s*(1-o))),m=1+_/16384*(4096+_*(_*(320-175*_)-768)),g=_/1024*(256+_*(_*(74-47*_)-128));let f,y,A,v,M,L=n/(s*(1-o)*m),x=100;do{y=Math.cos(2*c+L),A=Math.sin(L),v=Math.cos(L),M=g*A*(y+g/4*(v*(2*y*y-1)-g/6*y*(4*A*A-3)*(4*y*y-3))),f=L,L=n/(s*(1-o)*m)+M}while(Math.abs(L-f)>1e-12&&--x>0);if(0===x)return{lat2:NaN,lon2:NaN};const b=r*A-h*v*u,w=o/16*d*(4+o*(4-3*d));return{lat2:Math.atan2(r*v+h*A*u,(1-o)*Math.sqrt(p*p+b*b)),lon2:e+(Math.atan2(A*l,h*v-r*A*u)-(1-w)*o*p*(L+w*A*(y+w*v*(2*y*y-1))))}}(this.lat0,this.long0,d,_,this.a,this.f),t.x=m.lon2,t.y=m.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]};const pi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,i,n,s,o,a,r,h=t.x,l=t.y;return n=lt(h-this.long0),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),((o=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(o)<=b)&&(a=1*this.a*i*Math.sin(n),r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,s,o,a,r;return t.x-=this.x0,t.y-=this.y0,i=Qe((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(i),s=Math.cos(i),a=this.long0,Math.abs(e)<=b?(r=this.lat0,t.x=a,t.y=r,t):(r=Qe(s*this.sin_p14+t.y*n*this.cos_p14/e),o=Math.abs(this.lat0)-x,Math.abs(o)<=b?(a=this.lat0>=0?lt(this.long0+Math.atan2(t.x,-t.y)):lt(this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=r,t):(a=lt(this.long0+Math.atan2(t.x*n,e*this.cos_p14*s-t.y*this.sin_p14*n)),t.x=a,t.y=r,t))},names:["ortho"]};var di=1,_i=2,mi=3,gi=4,fi=5,yi=6,Ai=1,vi=2,Mi=3,Li=4;function xi(t,e,i,n){var s;return t<b?(n.value=Ai,s=0):(s=Math.atan2(e,i),Math.abs(s)<=k?n.value=Ai:s>k&&s<=x+k?(n.value=vi,s-=x):s>x+k||s<=-(x+k)?(n.value=Mi,s=s>=0?s-C:s+C):(n.value=Li,s+=x)),s}function bi(t,e){var i=t+e;return i<-C?i+=E:i>+C&&(i-=E),i}const wi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=x-k/2?this.face=fi:this.lat0<=-(x-k/2)?this.face=yi:Math.abs(this.long0)<=k?this.face=di:Math.abs(this.long0)<=x+k?this.face=this.long0>0?_i:gi:this.face=mi,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,i,n,s,o,a,r={x:0,y:0},h={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===fi)s=x-e,i>=k&&i<=x+k?(h.value=Ai,n=i-x):i>x+k||i<=-(x+k)?(h.value=vi,n=i>0?i-C:i+C):i>-(x+k)&&i<=-k?(h.value=Mi,n=i+x):(h.value=Li,n=i);else if(this.face===yi)s=x+e,i>=k&&i<=x+k?(h.value=Ai,n=-i+x):i<k&&i>=-k?(h.value=vi,n=-i):i<-k&&i>=-(x+k)?(h.value=Mi,n=-i-x):(h.value=Li,n=i>0?-i+C:-i-C);else{var l,u,c,p,d,_;this.face===_i?i=bi(i,+x):this.face===mi?i=bi(i,+C):this.face===gi&&(i=bi(i,-x)),p=Math.sin(e),d=Math.cos(e),_=Math.sin(i),l=d*Math.cos(i),u=d*_,c=p,this.face===di?n=xi(s=Math.acos(l),c,u,h):this.face===_i?n=xi(s=Math.acos(u),c,-l,h):this.face===mi?n=xi(s=Math.acos(-l),c,-u,h):this.face===gi?n=xi(s=Math.acos(-u),c,l,h):(s=n=0,h.value=Ai)}return a=Math.atan(12/C*(n+Math.acos(Math.sin(n)*Math.cos(k))-x)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),h.value===vi?a+=x:h.value===Mi?a+=C:h.value===Li&&(a+=1.5*C),r.x=o*Math.cos(a),r.y=o*Math.sin(a),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var e,i,n,s,o,a,r,h,l,u,c,p,d={lam:0,phi:0},_={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?_.value=Ai:t.y>=0&&t.y>=Math.abs(t.x)?(_.value=vi,e-=x):t.x<0&&-t.x>=Math.abs(t.y)?(_.value=Mi,e=e<0?e+C:e-C):(_.value=Li,e+=x),l=C/12*Math.tan(e),o=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(o),(r=1-(n=Math.cos(e))*n*(s=Math.tan(i))*s*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?r=-1:r>1&&(r=1),this.face===fi)h=Math.acos(r),d.phi=x-h,_.value===Ai?d.lam=a+x:_.value===vi?d.lam=a<0?a+C:a-C:_.value===Mi?d.lam=a-x:d.lam=a;else if(this.face===yi)h=Math.acos(r),d.phi=h-x,_.value===Ai?d.lam=-a+x:_.value===vi?d.lam=-a:_.value===Mi?d.lam=-a-x:d.lam=a<0?-a-C:-a+C;else{var m,g,f;l=(m=r)*m,g=(l+=(f=l>=1?0:Math.sqrt(1-l)*Math.sin(a))*f)>=1?0:Math.sqrt(1-l),_.value===vi?(l=g,g=-f,f=l):_.value===Mi?(g=-g,f=-f):_.value===Li&&(l=g,g=f,f=-l),this.face===_i?(l=m,m=-g,g=l):this.face===mi?(m=-m,g=-g):this.face===gi&&(l=m,m=g,g=-l),d.phi=Math.acos(-f)-x,d.lam=Math.atan2(g,m),this.face===_i?d.lam=bi(d.lam,-x):this.face===mi?d.lam=bi(d.lam,-C):this.face===gi&&(d.lam=bi(d.lam,+x))}return 0!==this.es&&(u=d.phi<0?1:0,c=Math.tan(d.phi),p=this.b/Math.sqrt(c*c+this.one_minus_f_squared),d.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),u&&(d.phi=-d.phi)),d.lam+=this.long0,t.x=d.lam,t.y=d.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Pi=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ki=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ei=.8487,Ci=1.3523,Si=P/5,Ti=1/Si,Bi=18,Oi=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const Di={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=lt(t.x-this.long0),i=Math.abs(t.y),n=Math.floor(i*Si);n<0?n=0:n>=Bi&&(n=17);var s={x:Oi(Pi[n],i=P*(i-Ti*n))*e,y:Oi(ki[n],i)};return t.y<0&&(s.y=-s.y),s.x=s.x*this.a*Ei+this.x0,s.y=s.y*this.a*Ci+this.y0,s},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*Ei),y:Math.abs(t.y-this.y0)/(this.a*Ci)};if(e.y>=1)e.x/=Pi[18][0],e.y=t.y<0?-x:x;else{var i=Math.floor(e.y*Bi);for(i<0?i=0:i>=Bi&&(i=17);;)if(ki[i][0]>e.y)--i;else{if(!(ki[i+1][0]<=e.y))break;++i}var n=ki[i],s=5*(e.y-n[0])/(ki[i+1][0]-n[0]);s=function(t,e,i,n){for(var s=e;n;--n){var o=t(s);if(s-=o,Math.abs(o)<i)break}return s}(function(t){return(Oi(n,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(n,t)},s,b,100),e.x/=Oi(Pi[i],s),e.y=(5*i+s)*w,t.y<0&&(e.y=-e.y)}return e.x=lt(e.x+this.long0),e},names:["Robinson","robin"]};const Ri={init:function(){this.name="geocent"},forward:function(t){return Dt(t,this.es,this.a)},inverse:function(t){return Rt(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var Ii=0,zi=1,Gi=2,Ni=3,ji={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const Fi={init:function(){if(Object.keys(ji).forEach(function(t){if(void 0===this[t])this[t]=ji[t].def;else{if(ji[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);ji[t].num&&(this[t]=parseFloat(this[t]))}ji[t].degrees&&(this[t]=this[t]*w)}.bind(this)),Math.abs(Math.abs(this.lat0)-x)<b?this.mode=this.lat0<0?zi:Ii:Math.abs(this.lat0)<b?this.mode=Gi:(this.mode=Ni,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,i,n,s,o=Math.sin(t.y),a=Math.cos(t.y),r=Math.cos(t.x);switch(this.mode){case Ni:i=this.sinph0*o+this.cosph0*a*r;break;case Gi:i=a*r;break;case zi:i=-o;break;case Ii:i=o}switch(e=(i=this.pn1/(this.p-i))*a*Math.sin(t.x),this.mode){case Ni:i*=this.cosph0*o-this.sinph0*a*r;break;case Gi:i*=o;break;case Ii:i*=-a*r;break;case zi:i*=a*r}return s=1/((n=i*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-i*this.sg)*this.cw*s,i=n*s,t.x=e*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,i,n,s={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,i=this.pn1*t.y*this.cw*n,t.x=e*this.cg+i*this.sg,t.y=i*this.cg-e*this.sg;var o=ve(t.x,t.y);if(Math.abs(o)<b)s.x=0,s.y=t.y;else{var a,r;switch(r=1-o*o*this.pfact,r=(this.p-Math.sqrt(r))/(this.pn1/o+o/this.pn1),a=Math.sqrt(1-r*r),this.mode){case Ni:s.y=Math.asin(a*this.sinph0+t.y*r*this.cosph0/o),t.y=(a-this.sinph0*Math.sin(s.y))*o,t.x*=r*this.cosph0;break;case Gi:s.y=Math.asin(t.y*r/o),t.y=a*o,t.x*=r;break;case Ii:s.y=Math.asin(a),t.y=-t.y;break;case zi:s.y=-Math.asin(a)}s.x=Math.atan2(t.x,t.y)}return t.x=s.x+this.long0,t.y=s.y,t},names:["Tilted_Perspective","tpers"]};const Ui={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,i,n,s,o=t.x,a=t.y;if(o-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var r=this.radius_p/ve(this.radius_p*Math.cos(a),Math.sin(a));if(i=r*Math.cos(o)*Math.cos(a),n=r*Math.sin(o)*Math.cos(a),s=r*Math.sin(a),(this.radius_g-i)*i-n*n-s*s*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ve(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/ve(n,e)))}else"sphere"===this.shape&&(e=Math.cos(a),i=Math.cos(o)*e,n=Math.sin(o)*e,s=Math.sin(a),e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ve(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/ve(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,i,n,s,o=-1,a=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*ve(1,r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*ve(1,a));var h=r/this.radius_p;if(e=a*a+h*h+o*o,(n=(i=2*this.radius_g*o)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+r*r+o*o,(n=(i=2*this.radius_g*o)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var Zi=1.340264,qi=-.081106,Hi=893e-6,Vi=.003796,Ki=Math.sqrt(3)/2;const Wi={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var e=lt(t.x-this.long0),i=t.y,n=Math.asin(Ki*Math.sin(i)),s=n*n,o=s*s*s;return t.x=e*Math.cos(n)/(Ki*(Zi+3*qi*s+o*(7*Hi+9*Vi*s))),t.y=n*(Zi+qi*s+o*(Hi+Vi*s)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,i,n,s,o=t.y;for(s=0;s<12&&(o-=n=(o*(Zi+qi*(e=o*o)+(i=e*e*e)*(Hi+Vi*e))-t.y)/(Zi+3*qi*e+i*(7*Hi+9*Vi*e)),!(Math.abs(n)<1e-9));++s);return i=(e=o*o)*e*e,t.x=Ki*t.x*(Zi+3*qi*e+i*(7*Hi+9*Vi*e))/Math.cos(o),t.y=Math.asin(Math.sin(o)/Ki),t.x=lt(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var Xi=1e-10;function $i(t){var e,i,n,s=lt(t.x-(this.long0||0)),o=t.y;return e=this.am1+this.m1-ge(o,i=Math.sin(o),n=Math.cos(o),this.en),i=n*s/(e*Math.sqrt(1-this.es*i*i)),t.x=e*Math.sin(i),t.y=this.am1-e*Math.cos(i),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Yi(t){var e,i,n,s;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,i=ve(t.x,t.y=this.am1-t.y),s=fe(this.am1+this.m1-i,this.es,this.en),(e=Math.abs(s))<x)e=Math.sin(s),n=i*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(s);else{if(!(Math.abs(e-x)<=Xi))throw new Error;n=0}return t.x=lt(n+(this.long0||0)),t.y=Ue(s),t}function Ji(t){var e,i,n=lt(t.x-(this.long0||0)),s=t.y;return i=this.cphi1+this.phi1-s,Math.abs(i)>Xi?(t.x=i*Math.sin(e=n*Math.cos(s)/i),t.y=this.cphi1-i*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Qi(t){var e,i;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n=ve(t.x,t.y=this.cphi1-t.y);if(i=this.cphi1+this.phi1-n,Math.abs(i)>x)throw new Error;return e=Math.abs(Math.abs(i)-x)<=Xi?0:n*Math.atan2(t.x,t.y)/Math.cos(i),t.x=lt(e+(this.long0||0)),t.y=Ue(i),t}const tn={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<Xi)throw new Error;this.es?(this.en=me(this.es),this.m1=ge(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=Yi,this.forward=$i):(Math.abs(this.phi1)+Xi>=x?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Qi,this.forward=Ji)},names:["bonne","Bonne (Werner lat_1=90)"]};const en=Object.assign(function(t,e,i){var n,s,o,a=!1;return void 0===e?(s=Kt(t),n=Ht,a=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,s=Kt(t),n=Ht,a=!0),n||(n=Kt(t)),s||(s=Kt(e)),i?Vt(n,s,i):(o={forward:function(t,e){return Vt(n,s,t,e)},inverse:function(t,e){return Vt(s,n,t,e)}},a&&(o.oProj=s),o)},{defaultDatum:"WGS84",Proj:Ot,WGS84:new Ot("WGS84"),Point:ce,toPoint:Ut,defs:nt,nadgrid:function(t,e,i){return e instanceof ArrayBuffer?function(t,e,i){var n=!0;void 0!==i&&!1===i.includeErrorFields&&(n=!1);var s=new DataView(e),o=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;e=t.getInt32(8,!0);return!0}(s),a=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:Ct(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(s,o),r=function(t,e,i,n){for(var s=176,o=[],a=0;a<e.nSubgrids;a++){var r=Tt(t,s,i),h=Bt(t,s,r,i,n),l=Math.round(1+(r.upperLongitude-r.lowerLongitude)/r.longitudeInterval),u=Math.round(1+(r.upperLatitude-r.lowerLatitude)/r.latitudeInterval);o.push({ll:[Et(r.lowerLongitude),Et(r.lowerLatitude)],del:[Et(r.longitudeInterval),Et(r.latitudeInterval)],lim:[l,u],count:r.gridNodeCount,cvs:St(h)});var c=16;!1===n&&(c=8),s+=176+r.gridNodeCount*c}return o}(s,a,o,n),h={header:a,subgrids:r};return bt[t]=h,h}(t,e,i):{ready:wt(t,e)}},transform:qt,mgrs:ee,version:"__VERSION__"});var nn;(nn=en).Proj.projections.add(ye),nn.Proj.projections.add(be),nn.Proj.projections.add(we),nn.Proj.projections.add(Ee),nn.Proj.projections.add(Se),nn.Proj.projections.add(Te),nn.Proj.projections.add(Oe),nn.Proj.projections.add(De),nn.Proj.projections.add(Re),nn.Proj.projections.add(qe),nn.Proj.projections.add(Je),nn.Proj.projections.add(ti),nn.Proj.projections.add(ei),nn.Proj.projections.add(ii),nn.Proj.projections.add(ni),nn.Proj.projections.add(si),nn.Proj.projections.add(oi),nn.Proj.projections.add(ai),nn.Proj.projections.add(ri),nn.Proj.projections.add(hi),nn.Proj.projections.add(li),nn.Proj.projections.add(ui),nn.Proj.projections.add(ci),nn.Proj.projections.add(pi),nn.Proj.projections.add(wi),nn.Proj.projections.add(Di),nn.Proj.projections.add(Ri),nn.Proj.projections.add(Fi),nn.Proj.projections.add(Ui),nn.Proj.projections.add(Wi),nn.Proj.projections.add(tn);const sn=a(Object.freeze(Object.defineProperty({__proto__:null,default:en},Symbol.toStringTag,{value:"Module"})));var on;on={exports:{}},function(){var t,e;t=l(),e=sn,on.exports=function(t,e){return e.__esModule&&e.default&&(e=e.default),t.Proj={},t.Proj._isProj4Obj=function(t){return void 0!==t.inverse&&void 0!==t.forward},t.Proj.Projection=t.Class.extend({initialize:function(e,i,n){var s=t.Proj._isProj4Obj(e);this._proj=s?e:this._projFromCodeDef(e,i),this.bounds=s?i:n},project:function(e){var i=this._proj.forward([e.lng,e.lat]);return new t.Point(i[0],i[1])},unproject:function(e,i){var n=this._proj.inverse([e.x,e.y]);return new t.LatLng(n[1],n[0],i)},_projFromCodeDef:function(t,i){if(i)e.defs(t,i);else if(void 0===e.defs[t]){var n=t.split(":");if(n.length>3&&(t=n[n.length-3]+":"+n[n.length-1]),void 0===e.defs[t])throw"No projection definition for code "+t}return e(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(e,i,n){var s,o,a,r;if(t.Proj._isProj4Obj(e)?(s=(o=e).srsCode,r=i||{},this.projection=new t.Proj.Projection(o,r.bounds)):(s=e,a=i,r=n||{},this.projection=new t.Proj.Projection(s,a,r.bounds)),t.Util.setOptions(this,r),this.code=s,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var h=this.options.resolutions.length-1;h>=0;h--)this.options.resolutions[h]&&(this._scales[h]=1/this.options.resolutions[h])}this.infinite=!this.options.bounds},scale:function(t){var e,i=Math.floor(t);return t===i?this._scales[t]:(e=this._scales[i])+(this._scales[i+1]-e)*(t-i)},zoom:function(t){var e,i,n=this._closestElement(this._scales,t),s=this._scales.indexOf(n);return t===n?s:void 0===n?-1/0:(i=s+1,void 0===(e=this._scales[i])?1/0:(t-n)/(e-n)+s)},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,e){for(var i,n=t.length;n--;)t[n]<=e&&(void 0===i||i<t[n])&&(i=t[n]);return i}}),t.Proj.GeoJSON=t.GeoJSON.extend({initialize:function(e,i){this._callLevel=0,t.GeoJSON.prototype.initialize.call(this,e,i)},addData:function(e){var i;e&&(e.crs&&"name"===e.crs.type?i=new t.Proj.CRS(e.crs.properties.name):e.crs&&e.crs.type&&(i=new t.Proj.CRS(e.crs.type+":"+e.crs.properties.code)),void 0!==i&&(this.options.coordsToLatLng=function(e){var n=t.point(e[0],e[1]);return i.projection.unproject(n)})),this._callLevel++;try{t.GeoJSON.prototype.addData.call(this,e)}finally{this._callLevel--,0===this._callLevel&&delete this.options.coordsToLatLng}}}),t.Proj.geoJson=function(e,i){return new t.Proj.GeoJSON(e,i)},t.Proj.ImageOverlay=t.ImageOverlay.extend({initialize:function(e,i,n){t.ImageOverlay.prototype.initialize.call(this,e,null,n),this._projectedBounds=i},_animateZoom:function(e){var i=this._map.getZoomScale(e.zoom),n=t.point(this._projectedBounds.min.x,this._projectedBounds.max.y),s=this._projectedToNewLayerPoint(n,e.zoom,e.center);t.DomUtil.setTransform(this._image,s,i)},_reset:function(){var e=this._map.getZoom(),i=this._map.getPixelOrigin(),n=t.bounds(this._transform(this._projectedBounds.min,e)._subtract(i),this._transform(this._projectedBounds.max,e)._subtract(i)),s=n.getSize();t.DomUtil.setPosition(this._image,n.min),this._image.style.width=s.x+"px",this._image.style.height=s.y+"px"},_projectedToNewLayerPoint:function(t,e,i){var n=this._map.getSize()._divideBy(2),s=this._map.project(i,e)._subtract(n)._round().add(this._map._getMapPanePos());return this._transform(t,e)._subtract(s)},_transform:function(t,e){var i=this._map.options.crs,n=i.transformation,s=i.scale(e);return n.transform(t,s)}}),t.Proj.imageOverlay=function(e,i,n){return new t.Proj.ImageOverlay(e,i,n)},t.Proj}(t,e)}();const an=new c.Proj.CRS("EPSG:900913","+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",{resolutions:function(){var t=[];t[0]=Math.pow(2,18);for(var e=1;e<21;e++)t[e]=Math.pow(2,18-e);return t}(),origin:[0,0],bounds:c.bounds([20037508.342789244,0],[0,20037508.342789244])}),rn=c.Marker.extend({options:{fontSize:"12px",color:"#f00",fontShadowColor:"none",fontWeight:"normal",background:"rgba(0, 0, 0, 0)",minZoom:void 0,maxZoom:void 0,clsName:"leaflet-text",offset:[6,6]},initialize(t,i,n={}){this._latlng=t,this._enabled=!1,this.options.id=n.id||"text_"+e.Util.guid(),this.options.text=i||"",n=Object.assign(this.options,n),c.setOptions(this,n);const{id:s,fontSize:o,color:a,fontWeight:r,background:h,fontShadowColor:l,clsName:u,offset:p}=this.options;this.options.icon=new c.DivIcon({html:`<span id=${s} class="leaflet-text-label" style="font-weight:${r};font-size:${o};color:${a};background:${h};text-shadow:${l} 1px 0px 2px">${i||""}</span>`,className:u,iconAnchor:p}),c.Marker.prototype.initialize.call(this,t,this.options)},setStyle(t){const e=document.getElementById(this.options.id),{text:i,color:n,fontSize:s,fontShadowColor:o,fontWeight:a}=t,r=t.background||"none";return e&&(n&&(this.options.color=n,e.style.color=n),a&&(this.options.fontWeight=a,e.style.fontWeight=a),s&&(this.options.fontSize=s,e.style.fontSize=s),this.options.background=r,e.style.background=r,i&&(this.options.text=i,e.textContent=i),o?(this.options.fontShadowColor=o,e.style["text-shadow"]=o+" 1px 0px 2px"):(this.options.fontShadowColor="none",e.style["text-shadow"]="none")),this},enableEdit(t){const{fontSize:e,color:i,text:n}=this.options;if(!this._enabled){this._enabled=!0;const s=new c.DivIcon({html:`<input type="text" id="text-input-icon" style="font-size:${e};color:${i};" value=${n}></input>`,className:"leaflet-text"});return this.setIcon(s),document.getElementById("text-input-icon").onblur=e=>{this.options.text=e.target.value,setTimeout(()=>{this.disableEdit(),t&&t(this)},100)},document.getElementById("text-input-icon").onkeydown=function(t){13===t.keyCode&&(this.options.text=t.target.value,this.blur(t))},this}},disableEdit(t){if(this._enabled){this._enabled=!1;const{id:e,color:i,fontSize:n,fontWeight:s,fontShadowColor:o}=this.options,a=new c.DivIcon({html:`<span id=${e} style="padding:2px 4px;white-space:nowrap;font-weight:${s};font-size:${n};color:${i};text-shadow:${o} 1px 2px 3px">${this.options.text}</span>`,className:"leaflet-text"});return this.setIcon(a),t&&t(this),this}}}),hn=c.Marker.extend({options:{color:"#f00",diveColor:"#f00",iconSize:[14,14],level:0,speedTime:2,animation:!0},initialize(t,i){c.setOptions(this,i);const{clsPrefix:n}=this.options;this.tempDivEle=document.createElement("div"),this.spanEl=e.DomUtil.create("span",`${n}-pulse-icon`),this.aEl=e.DomUtil.create("a",`${n}-dive-icon`),this.tempDivEle.append(this.spanEl),this.spanEl.append(this.aEl),this._init(),c.Marker.prototype.initialize.call(this,t,this.options)},_init(){const{color:t,iconSize:e,diveColor:i,level:n,speedTime:s,animation:o,clsPrefix:a}=this.options;t&&(this.spanEl.style.backgroundColor=t,i||(this.aEl.style.boxShadow="0 0 6px 2px "+t)),e&&(this.spanEl.style.width=e[0]+"px",this.spanEl.style.height=e[1]+"px"),o&&s?(this.aEl.style.setProperty("animation","pulsate "+s+"s infinite"),n?i?this.aEl.style.boxShadow="0 0 "+3*n+"px "+n+"px "+i:t&&(this.aEl.style.boxShadow="0 0 "+3*n+"px "+n+"px "+t):i&&(this.aEl.style.boxShadow=n?"0 0 "+3*n+"px "+n+"px "+i:"0 0 6px 2px "+i)):(this.aEl.style.removeProperty("animation"),this.aEl.style.removeProperty("box-shadow"));const r=L.divIcon({iconSize:e,iconAnchor:e.map(t=>t/2),className:`${a}-blink-marker`,html:this.tempDivEle.innerHTML});this.options.icon?this.setIcon(r):this.options.icon=r},setOptions(t){c.setOptions(this,t),this._init()},start(t){c.setOptions(this,t),this.options.animation=!0,this._init()},stop(t){c.setOptions(this,t),this.options.animation=!1,this._init()}}),ln=c.Layer.extend({initialize:function(t){L.setOptions(this,t),this._onClickListeners=[],this._onHoverListeners=[]},setOptions:function(t){return L.setOptions(this,t),this.redraw()},redraw:function(){this._redraw(!0)},addMarkers:function(t){var e=this,i=[],n=[];t.forEach(function(t){if("markerPane"==t.options.pane&&t.options.icon){var s=t.getLatLng(),o=e._map.getBounds().contains(s),a=e._addMarker(t,s,o);!0===o&&i.push(a[0]),n.push(a[1])}}),e._markers.load(i),e._latlngMarkers.load(n)},addMarker:function(t){var e=this,i=t.getLatLng(),n=e._map.getBounds().contains(i),s=e._addMarker(t,i,n);!0===n&&e._markers.insert(s[0]),e._latlngMarkers.insert(s[1])},addLayer:function(t){"markerPane"==t.options.pane&&t.options.icon&&this.addMarker(t)},addLayers:function(t){this.addMarkers(t)},removeLayer:function(t){this.removeMarker(t,!0)},removeMarker:function(t,e){var i=this;t.minX&&(t=t.data);var n=t.getLatLng(),s=i._map.getBounds().contains(n),o={minX:n.lng,minY:n.lat,maxX:n.lng,maxY:n.lat,data:t};i._latlngMarkers.remove(o,function(t,e){return t.data._leaflet_id===e.data._leaflet_id}),i._latlngMarkers.total--,i._latlngMarkers.dirty++,!0===s&&!0===e&&i._redraw(!0)},onAdd:function(t){this._map=t,this._canvas||this._initCanvas(),this.options.pane?this.getPane().appendChild(this._canvas):t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.on("resize",this._reset,this),t.on("click",this._executeListeners,this),t.on("mousemove",this._executeListeners,this)},onRemove:function(t){this.options.pane?this.getPane().removeChild(this._canvas):t.getPanes().overlayPane.removeChild(this._canvas),t.off("click",this._executeListeners,this),t.off("mousemove",this._executeListeners,this),t.off("moveend",this._reset,this),t.off("resize",this._reset,this)},addTo:function(t){return t.addLayer(this),this},clearLayers:function(){this._latlngMarkers=null,this._markers=null,this._redraw(!0)},_addMarker:function(t,e,i){var n=this;t._map=n._map,n._markers||(n._markers=new rbush),n._latlngMarkers||(n._latlngMarkers=new rbush,n._latlngMarkers.dirty=0,n._latlngMarkers.total=0),L.Util.stamp(t);var s=n._map.latLngToContainerPoint(e),o=t.options.icon.options.iconSize,a=o[0]/2,r=o[1]/2,h=[{minX:s.x-a,minY:s.y-r,maxX:s.x+a,maxY:s.y+r,data:t},{minX:e.lng,minY:e.lat,maxX:e.lng,maxY:e.lat,data:t}];return n._latlngMarkers.dirty++,n._latlngMarkers.total++,!0===i&&n._drawMarker(t,s),h},_drawMarker:function(t,e){var i=this;this._imageLookup||(this._imageLookup={}),e||(e=i._map.latLngToContainerPoint(t.getLatLng()));var n=t.options.icon.options.iconUrl;if(t.canvas_img)i._drawImage(t,e);else if(i._imageLookup[n])t.canvas_img=i._imageLookup[n][0],!1===i._imageLookup[n][1]?i._imageLookup[n][2].push([t,e]):i._drawImage(t,e);else{var s=new Image;s.src=n,t.canvas_img=s,i._imageLookup[n]=[s,!1,[[t,e]]],s.onload=function(){i._imageLookup[n][1]=!0,i._imageLookup[n][2].forEach(function(t){i._drawImage(t[0],t[1])})}}},_drawImage:function(t,e){var i=t.options.icon.options;this._context.drawImage(t.canvas_img,e.x-i.iconAnchor[0],e.y-i.iconAnchor[1],i.iconSize[0],i.iconSize[1])},_reset:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t);var e=this._map.getSize();this._canvas.width=e.x,this._canvas.height=e.y,this._redraw()},_redraw:function(t){var e=this;if(t&&this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._map&&this._latlngMarkers){var i=[];e._latlngMarkers.dirty/e._latlngMarkers.total>=.1&&(e._latlngMarkers.all().forEach(function(t){i.push(t)}),e._latlngMarkers.clear(),e._latlngMarkers.load(i),e._latlngMarkers.dirty=0,i=[]);var n=e._map.getBounds(),s={minX:n.getWest(),minY:n.getSouth(),maxX:n.getEast(),maxY:n.getNorth()};e._latlngMarkers.search(s).forEach(function(t){var n=e._map.latLngToContainerPoint(t.data.getLatLng()),s=t.data.options.icon.options.iconSize,o=s[0]/2,a=s[1]/2,r={minX:n.x-o,minY:n.y-a,maxX:n.x+o,maxY:n.y+a,data:t.data};i.push(r),e._drawMarker(t.data,n)}),this._markers.clear(),this._markers.load(i)}},_initCanvas:function(){this._canvas=L.DomUtil.create("canvas","leaflet-canvas-icon-layer leaflet-layer");var t=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this._canvas.style[t]="50% 50%";var e=this._map.getSize();this._canvas.width=e.x,this._canvas.height=e.y,this._context=this._canvas.getContext("2d");var i=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(this._canvas,"leaflet-zoom-"+(i?"animated":"hide"))},addOnClickListener:function(t){this._onClickListeners.push(t)},addOnHoverListener:function(t){this._onHoverListeners.push(t)},_executeListeners:function(t){if(this._markers){var e=this,i=t.containerPoint.x,n=t.containerPoint.y;e._openToolTip&&(e._openToolTip.closeTooltip(),delete e._openToolTip);var s=this._markers.search({minX:i,minY:n,maxX:i,maxY:n});if(s&&s.length>0){if(e._map._container.style.cursor="pointer","click"===t.type)s[0].data.getPopup()&&s[0].data.openPopup(),e._onClickListeners.forEach(function(e){e(t,s)});if("mousemove"===t.type)s[0].data.getTooltip()&&(e._openToolTip=s[0].data,s[0].data.openTooltip()),e._onHoverListeners.forEach(function(e){e(t,s)})}else e._map._container.style.cursor=""}}}),un=c.Layer.extend({provide:{TDT:"tdt",BAIDU:"bd",GAODE:"gd",YANDEX:"yandex"},source:{VECTOR:"vec",SATELITE:"img",ANNO:"cia",VEC_NO_ANNO:"vec_no_anno",SATELITE_NO_ANNO:"img_no_anno"},style:{NORMAL:"normal",GRAY:"gray",DARK:"dark",BROWN:"brown",BLUR:"blur"},options:{provide:"tdt",source:"img",style:"normal",accessToken:"016b31f15f25e1365e85aec7e7b0464e"},initialize(t){t=e.Util.deleteEmptyProperty(t),c.Util.setOptions(this,t)},onAdd(t){this.map=t,this.replaceProjection(),this.tileLayers=this.getLayerGroup(),t.addLayer(this.tileLayers)},onRemove(t){t.removeLayer(this.tileLayers)},replaceProjection(){const t=this.map.getCenter(),e=this.map.getZoom();this.options.provide===this.provide.BAIDU?this.map.options.crs=an:this.options.provide===this.provide.YANDEX?this.map.options.crs=c.CRS.EPSG3395:this.map.options.crs=c.CRS.EPSG3857,this._resetMapStatus(t,e)},_resetMapStatus(t,e){this.map.setView(t),this.map._resetView(t,e,!0)},getLayerGroup(){let t={},i={};switch(this.options.style&&this.options.style.split(",").forEach(e=>{switch(e){case this.style.DARK:t.invert=1;break;case this.style.GRAY:t.grayscale=1;break;case this.style.BROWN:t.sepia=1;break;case this.style.BLUR:t.blur="1px"}}),this.options.provide){case this.provide.TDT:i={subdomains:e.ArrayUtil.create(8),maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.BAIDU:i={subdomains:e.ArrayUtil.create(10),tms:!0,corrdType:"bd09",maxNativeZoom:19,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.GAODE:i={subdomains:e.ArrayUtil.create(4).map(t=>t+1),corrdType:"gcj02",maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()};break;case this.provide.YANDEX:i={maxNativeZoom:18,minZoom:0,maxZoom:this.map.getMaxZoom()}}if(this.options.opacity>=0&&(t.opacity=this.options.opacity),this.options.url)return new c.TileLayer(this.options.url,{...i,style:t});switch(this.options.provide){case this.provide.TDT:let e;switch(i.maxNativeZoom=18,this.options.source){case this.source.VECTOR:e=["vec_w","cva_w"];break;case this.source.SATELITE:e=["img_w","cia_w"];break;case this.source.ANNO:e=["cva_w"];break;case this.source.VEC_NO_ANNO:e=["vec_w"];break;case this.source.SATELITE_NO_ANNO:e=["img_w"]}return new c.LayerGroup(e.map(e=>new c.TileLayer(`http://t{s}.tianditu.gov.cn/DataServer?T=${e}&x={x}&y={y}&l={z}&tk=${this.options.accessToken}`,{...i,style:t})));case this.provide.BAIDU:switch(this.options.source){case this.source.VECTOR:return i.maxNativeZoom=19,new c.TileLayer("http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1",{...i,style:t});case this.source.ANNO:return i.maxNativeZoom=19,new c.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...i,style:t});case this.source.SATELITE:return i.maxNativeZoom=17,new c.LayerGroup([new c.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...i,style:t}),new c.TileLayer("http://online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return i.maxNativeZoom=19,new c.TileLayer("http://shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",{...i,style:t})}break;case this.provide.GAODE:switch(this.options.source){case this.source.VECTOR:return i.maxNativeZoom=18,new c.TileLayer("http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t});case this.source.ANNO:return i.maxNativeZoom=18,new c.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t});case this.source.SATELITE:return i.maxNativeZoom=16,new c.LayerGroup([new c.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...i,style:t}),new c.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return i.maxNativeZoom=18,new c.TileLayer("http://webst0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=6",{...i,style:t})}break;case this.provide.YANDEX:switch(this.options.source){case this.source.ANNO:return new c.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...i,style:t});case this.source.SATELITE:return new c.LayerGroup([new c.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...i,subdomains:["01","02","03","04"],style:t}),new c.TileLayer("https://core-renderer-tiles.maps.yandex.net/tiles?l=skl&v=24.05.19-0-b240515214430&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps&experimental_ranking_mode_name=default-web-ranking&experimental_data_hd=vegetation_model_exp",{...i,style:t})]);case this.source.SATELITE_NO_ANNO:return new c.TileLayer("https://sat{s}.maps.yandex.net/tiles?l=sat&v=3.1238.0&x={x}&y={y}&z={z}&scale=1&lang=en_US&client_id=yandex-web-maps",{...i,subdomains:["01","02","03","04"],style:t})}}},setOptions(t){c.Util.setOptions(this,t);const e=this.getLayerGroup();this.map.removeLayer(this.tileLayers),setTimeout(()=>{this.replaceProjection(),this.tileLayers=e.addTo(this.map)},500)}}),cn=c.ImageOverlay.extend({initialize(t,e={},i=new c.Marker,n=new c.Marker){"string"==typeof t?this._url=t:this._rawImage=t,this.topRightMarker=i,this.bottomLeftMarker=n,this.angle=0,c.setOptions(this,e),this._topLeft=new c.LatLng(e.corners[0]),this._topRight=new c.LatLng(e.corners[1]),this._bottomLeft=new c.LatLng(e.corners[3]),i.on("drag dragend",this.reposition,this),n.on("drag dragend",this.reposition,this)},onAdd(t){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(c.DomUtil.addClass(this._rawImage,"leaflet-interactive"),this.addInteractiveTarget(this._rawImage)),t.on("zoomend resetview",this._reset,this),this.getPane().appendChild(this._image),this._reset()},onRemove(t){t.off("zoomend resetview",this._reset,this),c.ImageOverlay.prototype.onRemove.call(this,t)},_initImage(){let t=this._rawImage;this._url&&(t=c.DomUtil.create("img"),t.style.display="none",this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,this._rawImage=t),c.DomUtil.addClass(t,"leaflet-image-layer");const e=this._image=c.DomUtil.create("div","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));this._updateZIndex&&this._updateZIndex(),e.appendChild(t),e.onselectstart=c.Util.falseFn,e.onmousemove=c.Util.falseFn,t.onload=function(){this._reset(),t.style.display="block",this.options.w=this._rawImage.width,this.options.h=this._rawImage.height,this.boundsRectBottomLeft=new c.Point(0,0),this.boundsRectTopRight=new c.Point(this.options.w,this.options.h),this.diagonalVector=this.boundsRectTopRight.subtract(this.boundsRectBottomLeft),this.fire("load")}.bind(this),t.alt=this.options.alt},_reset(){const t=this._image,e=this._map.latLngToLayerPoint(this._topLeft),i=this._map.latLngToLayerPoint(this._topRight),n=this._map.latLngToLayerPoint(this._bottomLeft),s=i.subtract(e).add(n),o=new c.Bounds([e,i,n,s]),a=o.getSize(),r=e.subtract(o.min),h=i.subtract(e),l=n.subtract(e),u=Math.atan2(h.y,h.x),p=Math.atan2(l.x,l.y);this.angle=((Math.abs(u)+Math.abs(p))/2*180).toFixed(2),this._bounds=new c.LatLngBounds(this._map.layerPointToLatLng(o.min),this._map.layerPointToLatLng(o.max)),c.DomUtil.setPosition(t,o.min),t.pxBounds=o,t.style.width=a.x+"px",t.style.height=a.y+"px";const d=this._rawImage.width,_=this._rawImage.height;if(!d||!_)return;const m=e.distanceTo(i)/d*Math.cos(u),g=e.distanceTo(n)/_*Math.cos(p);this._rawImage.style.transformOrigin="0 0",this._rawImage.style.transform="translate("+r.x+"px, "+r.y+"px)skew("+p+"rad, "+u+"rad) scale("+m+", "+g+") "},_animateZoom(t){const e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;c.DomUtil.setTransform(this._image,i,e)},reposition(){const t=this.topRightMarker.getLatLng(),e=this.bottomLeftMarker.getLatLng(),i=this.options.w,n=this.options.h,s=this.getCornerLatLng(new c.Point(0,n),e,t),o=this.getCornerLatLng(new c.Point(i,n),e,t),a=this.getCornerLatLng(new c.Point(0,0),e,t),r=this.getCornerLatLng(new c.Point(i,0),e,t);this.options.corners=[s,o,r,a],this._topLeft=new c.LatLng(s),this._topRight=new c.LatLng(o),this._bottomLeft=new c.LatLng(a),this._reset()},getCornerLatLng(t,e,i){const n=this.boundsRectBottomLeft,s=this.diagonalVector,o=t.subtract(n),a=this.getClockWiseRotate90DegreePoint(s),r=this.getDotProduction(s,o)/this.getDotProduction(s,s),h=-this.getDotProduction(a,o)/this.getDotProduction(a,a),l=new c.Projection.SphericalMercator.project(e),u=new c.Projection.SphericalMercator.project(i),p=l.add(u.subtract(l).multiplyBy(r)),d=this.getClockWiseRotate90DegreePoint(l.subtract(u)).multiplyBy(h),_=p.add(d);return new c.Projection.SphericalMercator.unproject(_)},setUrl(t){return this._url=t,this._rawImage&&(this._rawImage.src=t),this},getDotProduction:(t,e)=>t.x*e.x+t.y*e.y,getClockWiseRotate90DegreePoint:t=>new c.Point([t.y,-t.x])});var pn={exports:{}};!function(t){!function(e,i,n){t.exports?t.exports=n():i.h337=n()}(0,s,function(){var t,e,i,n={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},s=(t=function(t){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=t.xField||t.defaultXField,this._yField=t.yField||t.defaultYField,this._valueField=t.valueField||t.defaultValueField,t.radius&&(this._cfgRadius=t.radius)},e=n.defaultRadius,t.prototype={_organiseData:function(t,i){var n=t[this._xField],s=t[this._yField],o=this._radi,a=this._data,r=this._max,h=this._min,l=t[this._valueField]||1,u=t.radius||this._cfgRadius||e;a[n]||(a[n]=[],o[n]=[]),a[n][s]?a[n][s]+=l:(a[n][s]=l,o[n][s]=u);var c=a[n][s];return c>r?(i?this.setDataMax(c):this._max=c,!1):c<h?(i?this.setDataMin(c):this._min=c,!1):{x:n,y:s,value:l,radius:u,min:h,max:r}},_unOrganizeData:function(){var t=[],e=this._data,i=this._radi;for(var n in e)for(var s in e[n])t.push({x:n,y:s,radius:i[n][s],value:e[n][s]});return{min:this._min,max:this._max,data:t}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var t=arguments[0],e=t.length;e--;)this.addData.call(this,t[e]);else{var i=this._organiseData(arguments[0],!0);i&&(0===this._data.length&&(this._min=this._max=i.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[i]}))}return this},setData:function(t){var e=t.data,i=e.length;this._data=[],this._radi=[];for(var n=0;n<i;n++)this._organiseData(e[n],!1);return this._max=t.max,this._min=t.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(t){return this._max=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(t){return this._min=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(t){this._coordinator=t},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},t),o=function(){var t=function(t){var e=t.gradient||t.defaultGradient,i=document.createElement("canvas"),n=i.getContext("2d");i.width=256,i.height=1;var s=n.createLinearGradient(0,0,256,1);for(var o in e)s.addColorStop(o,e[o]);return n.fillStyle=s,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data},e=function(t,e){var i=document.createElement("canvas"),n=i.getContext("2d"),s=t,o=t;if(i.width=i.height=2*t,1==e)n.beginPath(),n.arc(s,o,t,0,2*Math.PI,!1),n.fillStyle="rgba(0,0,0,1)",n.fill();else{var a=n.createRadialGradient(s,o,t*e,s,o,t);a.addColorStop(0,"rgba(0,0,0,1)"),a.addColorStop(1,"rgba(0,0,0,0)"),n.fillStyle=a,n.fillRect(0,0,2*t,2*t)}return i};function i(e){var i=e.container,n=this.shadowCanvas=document.createElement("canvas"),s=this.canvas=e.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var o=getComputedStyle(e.container)||{};s.className="heatmap-canvas",this._width=s.width=n.width=e.width||+o.width.replace(/px/,""),this._height=s.height=n.height=e.height||+o.height.replace(/px/,""),this.shadowCtx=n.getContext("2d"),this.ctx=s.getContext("2d"),s.style.cssText=n.style.cssText="position:absolute;left:0;top:0;",i.style.position="relative",i.appendChild(s),this._palette=t(e),this._templates={},this._setStyles(e)}return i.prototype={renderPartial:function(t){t.data.length>0&&(this._drawAlpha(t),this._colorize())},renderAll:function(t){this._clear(),t.data.length>0&&(this._drawAlpha(function(t){for(var e=[],i=t.min,n=t.max,s=t.radi,o=(t=t.data,Object.keys(t)),a=o.length;a--;)for(var r=o[a],h=Object.keys(t[r]),l=h.length;l--;){var u=h[l],c=t[r][u],p=s[r][u];e.push({x:r,y:u,value:c,radius:p})}return{min:i,max:n,data:e}}(t)),this._colorize())},_updateGradient:function(e){this._palette=t(e)},updateConfig:function(t){t.gradient&&this._updateGradient(t),this._setStyles(t)},setDimensions:function(t,e){this._width=t,this._height=e,this.canvas.width=this.shadowCanvas.width=t,this.canvas.height=this.shadowCanvas.height=e},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(t){this._blur=0==t.blur?0:t.blur||t.defaultBlur,t.backgroundColor&&(this.canvas.style.backgroundColor=t.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=t.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=t.height||this._height,this._opacity=255*(t.opacity||0),this._maxOpacity=255*(t.maxOpacity||t.defaultMaxOpacity),this._minOpacity=255*(t.minOpacity||t.defaultMinOpacity),this._useGradientOpacity=!!t.useGradientOpacity},_drawAlpha:function(t){for(var i=this._min=t.min,n=this._max=t.max,s=(t=t.data||[]).length,o=1-this._blur;s--;){var a,r=t[s],h=r.x,l=r.y,u=r.radius,c=Math.min(r.value,n),p=h-u,d=l-u,_=this.shadowCtx;this._templates[u]?a=this._templates[u]:this._templates[u]=a=e(u,o);var m=(c-i)/(n-i);_.globalAlpha=m<.01?.01:m,_.drawImage(a,p,d),p<this._renderBoundaries[0]&&(this._renderBoundaries[0]=p),d<this._renderBoundaries[1]&&(this._renderBoundaries[1]=d),p+2*u>this._renderBoundaries[2]&&(this._renderBoundaries[2]=p+2*u),d+2*u>this._renderBoundaries[3]&&(this._renderBoundaries[3]=d+2*u)}},_colorize:function(){var t=this._renderBoundaries[0],e=this._renderBoundaries[1],i=this._renderBoundaries[2]-t,n=this._renderBoundaries[3]-e,s=this._width,o=this._height,a=this._opacity,r=this._maxOpacity,h=this._minOpacity,l=this._useGradientOpacity;t<0&&(t=0),e<0&&(e=0),t+i>s&&(i=s-t),e+n>o&&(n=o-e);for(var u=this.shadowCtx.getImageData(t,e,i,n),c=u.data,p=c.length,d=this._palette,_=3;_<p;_+=4){var m,g=c[_],f=4*g;if(f)m=a>0?a:g<r?g<h?h:g:r,c[_-3]=d[f],c[_-2]=d[f+1],c[_-1]=d[f+2],c[_]=l?d[f+3]:m}u.data=c,this.ctx.putImageData(u,t,e),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(t){var e=this.shadowCtx.getImageData(t.x,t.y,1,1).data[3],i=this._max,n=this._min;return Math.abs(i-n)*(e/255)|0},getDataURL:function(){return this.canvas.toDataURL()}},i}(),a=(i=!1,"canvas2d"===n.defaultRenderer&&(i=o),i),r=function(){for(var t={},e=arguments.length,i=0;i<e;i++){var n=arguments[i];for(var s in n)t[s]=n[s]}return t},h=function(){var t=function(){function t(){this.cStore={}}return t.prototype={on:function(t,e,i){var n=this.cStore;n[t]||(n[t]=[]),n[t].push(function(t){return e.call(i,t)})},emit:function(t,e){var i=this.cStore;if(i[t])for(var n=i[t].length,s=0;s<n;s++){(0,i[t][s])(e)}}},t}();function e(){var e,i,o,h,l=this._config=r(n,arguments[0]||{});if(this._coordinator=new t,l.plugin){var u=l.plugin;if(!n.plugins[u])throw new Error("Plugin '"+u+"' not found. Maybe it was not registered.");var c=n.plugins[u];this._renderer=new c.renderer(l),this._store=new c.store(l)}else this._renderer=new a(l),this._store=new s(l);i=(e=this)._renderer,o=e._coordinator,h=e._store,o.on("renderpartial",i.renderPartial,i),o.on("renderall",i.renderAll,i),o.on("extremachange",function(t){e._config.onExtremaChange&&e._config.onExtremaChange({min:t.min,max:t.max,gradient:e._config.gradient||e._config.defaultGradient})}),h.setCoordinator(o)}return e.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(t){return this._config=r(this._config,t),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(t){return this._store.getValueAt?this._store.getValueAt(t):this._renderer.getValueAt?this._renderer.getValueAt(t):null}},e}();return{create:function(t){return new h(t)},register:function(t,e){n.plugins[t]=e}}})}(pn);const dn=o(pn.exports);var _n=L.Layer.extend({initialize:function(t){this.cfg=t,this._el=L.DomUtil.create("div","leaflet-zoom-hide"),this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var e=t.getSize();this._map=t,this._width=e.x,this._height=e.y,this._el.style.width=e.x+"px",this._el.style.height=e.y+"px",this._el.style.position="absolute",this._resetOrigin(),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=dn.create(this.cfg)),t.on("moveend",this._resetOrigin,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._resetOrigin,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane._leaflet_pos;this._el.style[_n.CSS_TRANSFORM]="translate("+-Math.round(t.x)+"px,"+-Math.round(t.y)+"px)",this._update()}},_update:function(){var t,e,i,n={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),e=this._map.getZoom(),i=Math.pow(2,e),0!=this._data.length){for(var s=[],o=this.cfg.scaleRadius?i:1,a=0,r=0,h=this.cfg.valueField,l=this._data.length;l--;){var u=this._data[l],c=u[h],p=u.latlng;if(t.contains(p)){a=Math.max(c,a),r=Math.min(c,r);var d,_=this._map.latLngToContainerPoint(p),m={x:Math.round(_.x),y:Math.round(_.y)};m[h]=c,d=u.radius?u.radius*o:(this.cfg.radius||2)*o,m.radius=d,s.push(m)}}this.cfg.useLocalExtrema&&(n.max=a,n.min=r),n.data=s,this._heatmap.setData(n)}else this._heatmap&&this._heatmap.setData(n)},setData:function(t){this._max=t.max||this._max,this._min=t.min||this._min;for(var e=this.cfg.latField||"lat",i=this.cfg.lngField||"lng",n=this.cfg.valueField||"value",s=(t=t.data).length,o=[];s--;){var a=t[s],r={latlng:new L.LatLng(a[e],a[i])};r[n]=a[n],a.radius&&(r.radius=a.radius),o.push(r)}this._data=o,this._draw()},addData:function(t){if(t.length>0)for(var e=t.length;e--;)this.addData(t[e]);else{var i=this.cfg.latField||"lat",n=this.cfg.lngField||"lng",s=this.cfg.valueField||"value",o=t,a={latlng:new L.LatLng(o[i],o[n])};a[s]=o[s],this._max=Math.max(this._max,a[s]),this._min=Math.min(this._min,a[s]),o.radius&&(a.radius=o.radius),this._data.push(a),this._draw()}},_resetOrigin:function(){this._origin=this._map.layerPointToLatLng(new L.Point(0,0));var t=this._map.getSize();this._width===t.x&&this._height===t.y||(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px"),this._draw()}});_n.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i<e.length;i++){var n=e[i];if(void 0!==t.style[n])return n}return e[0]}();const mn=L.TileLayer.extend({defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"",format:"image/jpeg"},initialize:function(t,e){this._url=t;var i={};Object.keys(e).forEach(t=>{i[t.toLowerCase()]=e[t]});var n=L.extend({},this.defaultWmtsParams),s=i.tileSize||this.options.tileSize;for(var o in i.detectRetina&&L.Browser.retina?n.width=n.height=2*s:n.width=n.height=s,i)n.hasOwnProperty(o)&&"matrixIds"!=o&&(n[o]=i[o]);this.wmtsParams=n,this.matrixIds=e.matrixIds||this.getDefaultMatrix(),L.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,L.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this.options.tileSize,i=t.multiplyBy(e);i.x+=1,i.y-=1;var n=i.add(new L.Point(e,e)),s=this._tileZoom,o=this._crs.project(this._map.unproject(i,s)),a=this._crs.project(this._map.unproject(n,s));tilewidth=a.x-o.x;var r=this.matrixIds[s].identifier,h=this.wmtsParams.tilematrixset+":"+r,l=this.matrixIds[s].topLeftCorner.lng,u=this.matrixIds[s].topLeftCorner.lat,c=Math.floor((o.x-l)/tilewidth),p=-Math.floor((o.y-u)/tilewidth),d=L.Util.template(this._url,{s:this._getSubdomain(t)});return d+L.Util.getParamString(this.wmtsParams,d)+"&tilematrix="+h+"&tilerow="+p+"&tilecol="+c},setParams:function(t,e){return L.extend(this.wmtsParams,t),e||this.redraw(),this},getDefaultMatrix:function(){for(var t=new Array(22),e=0;e<22;e++)t[e]={identifier:""+e,topLeftCorner:new L.LatLng(20037508.3428,-20037508.3428)};return t}});var gn={};gn.Source=L.Layer.extend({options:{untiled:!0,identify:!0},initialize:function(t,e){L.setOptions(this,e),this.options.tiled&&(this.options.untiled=!1),this._url=t,this._subLayers={},this._overlay=this.createOverlay(this.options.untiled)},createOverlay:function(t){var e={};for(var i in this.options)"untiled"!=i&&"identify"!=i&&(e[i]=this.options[i]);return t?gn.overlay(this._url,e):gn.tileLayer(this._url,e)},onAdd:function(){this.refreshOverlay()},getEvents:function(){return this.options.identify?{click:this.identify}:{}},setOpacity:function(t){this.options.opacity=t,this._overlay&&this._overlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._overlay&&this._overlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._overlay&&this._overlay.bringToFront()},getLayer:function(t){return gn.layer(this,t)},addSubLayer:function(t){this._subLayers[t]=!0,this.refreshOverlay()},removeSubLayer:function(t){delete this._subLayers[t],this.refreshOverlay()},refreshOverlay:function(){var t=Object.keys(this._subLayers).join(",");this._map&&(t?(this._overlay.setParams({layers:t}),this._overlay.addTo(this._map)):this._overlay.remove())},identify:function(t){var e=this.getIdentifyLayers();e.length&&this.getFeatureInfo(t.containerPoint,t.latlng,e,this.showFeatureInfo)},getFeatureInfo:function(t,e,i,n){var s=this.getFeatureInfoParams(t,i),o=this._url+L.Util.getParamString(s,this._url);this.showWaiting(),this.ajax(o,function(t){this.hideWaiting();var i=this.parseFeatureInfo(t,o);n.call(this,e,i)})},ajax:function(t,e){yn.call(this,t,e)},getIdentifyLayers:function(){return this.options.identifyLayers?this.options.identifyLayers:Object.keys(this._subLayers)},getFeatureInfoParams:function(t,e){var i,n;this.options.untiled?i=this._overlay.wmsParams:((n=this.createOverlay(!0)).updateWmsParams(this._map),(i=n.wmsParams).layers=e.join(","));var s={request:"GetFeatureInfo",query_layers:e.join(","),X:Math.round(t.x),Y:Math.round(t.y)};return L.extend({},i,s)},parseFeatureInfo:function(t,e){return"error"==t&&(t="<iframe src='"+e+"' style='border:none'>"),t},showFeatureInfo:function(t,e){this._map&&this._map.openPopup(e,t)},showWaiting:function(){this._map&&(this._map._container.style.cursor="progress")},hideWaiting:function(){this._map&&(this._map._container.style.cursor="default")}}),gn.source=function(t,e){return new gn.Source(t,e)},gn.Layer=L.Layer.extend({initialize:function(t,e,i){L.setOptions(this,i),t.addSubLayer||(t=gn.getSourceForUrl(t,i)),this._source=t,this._name=e},onAdd:function(){this._source._map||this._source.addTo(this._map),this._source.addSubLayer(this._name)},onRemove:function(){this._source.removeSubLayer(this._name)},setOpacity:function(t){this._source.setOpacity(t)},bringToBack:function(){this._source.bringToBack()},bringToFront:function(){this._source.bringToFront()}}),gn.layer=function(t,e){return new gn.Layer(t,e)};var fn={};function yn(t,e){var i=this,n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status?e.call(i,n.responseText):e.call(i,"error"))},n.open("GET",t),n.send()}gn.getSourceForUrl=function(t,e){return fn[t]||(fn[t]=gn.source(t,e)),fn[t]},gn.TileLayer=L.TileLayer.WMS,gn.tileLayer=L.tileLayer.wms,gn.Overlay=L.Layer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},options:{crs:null,uppercase:!1,attribution:"",opacity:1,isBack:!1,minZoom:0,maxZoom:18},initialize:function(t,e){this._url=t;var i={},n={};for(var s in e)s in this.options?n[s]=e[s]:i[s]=e[s];L.setOptions(this,n),this.wmsParams=L.extend({},this.defaultWmsParams,i)},setParams:function(t){L.extend(this.wmsParams,t),this.update()},getAttribution:function(){return this.options.attribution},onAdd:function(){this.update()},onRemove:function(t){this._currentOverlay&&(t.removeLayer(this._currentOverlay),delete this._currentOverlay),this._currentUrl&&delete this._currentUrl},getEvents:function(){return{moveend:this.update}},update:function(){if(this._map){this.updateWmsParams();var t=this.getImageUrl();if(this._currentUrl!=t){this._currentUrl=t;var e=this._map.getBounds(),i=L.imageOverlay(t,e,{opacity:0});i.addTo(this._map),i.once("load",function(){if(!this._map)return;if(i._url!=this._currentUrl)return void this._map.removeLayer(i);this._currentOverlay&&this._map.removeLayer(this._currentOverlay);this._currentOverlay=i,i.setOpacity(this.options.opacity?this.options.opacity:1),!0===this.options.isBack&&i.bringToBack();!1===this.options.isBack&&i.bringToFront()},this),(this._map.getZoom()<this.options.minZoom||this._map.getZoom()>this.options.maxZoom)&&this._map.removeLayer(i)}}},setOpacity:function(t){this.options.opacity=t,this._currentOverlay&&this._currentOverlay.setOpacity(t)},bringToBack:function(){this.options.isBack=!0,this._currentOverlay&&this._currentOverlay.bringToBack()},bringToFront:function(){this.options.isBack=!1,this._currentOverlay&&this._currentOverlay.bringToFront()},updateWmsParams:function(t){t||(t=this._map);var e=t.getBounds(),i=t.getSize(),n=parseFloat(this.wmsParams.version),s=this.options.crs||t.options.crs,o=n>=1.3?"crs":"srs",a=s.project(e.getNorthWest()),r=s.project(e.getSouthEast()),h={width:i.x,height:i.y};h[o]=s.code,h.bbox=(n>=1.3&&s===L.CRS.EPSG4326?[r.y,a.x,a.y,r.x]:[a.x,r.y,r.x,a.y]).join(","),L.extend(this.wmsParams,h)},getImageUrl:function(){var t=this.options.uppercase||!1,e=L.Util.getParamString(this.wmsParams,this._url,t);return this._url+e}}),gn.overlay=function(t,e){return new gn.Overlay(t,e)};const An=c.Draggable.extend({initialize(t,e,i){c.Draggable.prototype.initialize.call(this,t,t),this._element=t,this._stepHeight=e??5.45,this._knobHeight=i??10,this.on("predrag",function(){this._newPos.x=0,this._newPos.y=this._adjust(this._newPos.y)},this)},_adjust(t){let e=Math.round(this._toValue(t));return e=Math.max(0,Math.min(this._maxValue,e)),this._toY(e)},_toY(t){return this._k*t+this._m},_toValue(t){return(t-this._m)/this._k},setSteps(t){this._maxValue=t-1,this._k=-this._stepHeight,this._m=0},setPosition(t){c.DomUtil.setPosition(this._element,L.point(0,this._adjust(t)))},setValue(t){this.setPosition(this._toY(t))},getValue(){return this._toValue(c.DomUtil.getPosition(this._element).y)}}),vn=c.Handler.extend({options:{color:"#f00",weight:2,fillColor:"#ff0",fillOpacity:.7,radius:5,continue:!1,showCloseButton:!1,showMeasurements:!1},PointEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?this.geometry.setLatLng(t.latlng):(this.tooltip.setContent("点击开始绘制"),this.geometry=new c.CircleMarker(t.latlng,this.options).addTo(this._map)),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),!this.options.continue&&this.disable(),this.geometry=null}},CircleEvents:{_mouseMove(t){if(this.tooltip.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)){const e=this.latlng?this._map.distance(t.latlng,this.latlng):0;this.geometry.setRadius(e),0!==e?this.tooltip.setContent(`半径:<b>${e.toFixed(2)}m</b><br/>继续点击完成绘制`):this.tooltip.setContent("点击开始绘制")}this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlng=t.latlng,this.onVertexAdd&&this.onVertexAdd(this.geometry),this.geometry&&0!==this.geometry.getRadius()?(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null):this.geometry=new c.Circle(this.latlng,0,this.options).addTo(this._map)},_mouseDblClick(t){}},PolylineEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new c.Polyline([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},RectangleEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setBounds([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("继续点击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new c.Rectangle([t.latlng,t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setBounds(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry),2===this.latlngs.length&&(this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null)},_mouseDblClick(t){}},PolygonEvents:{_mouseMove(t){this.tooltip.setLatLng(t.latlng),this.tempPoint.setLatLng(t.latlng),this._map.openTooltip(this.tooltip),this.geometry&&this._map.hasLayer(this.geometry)?(this.geometry.setLatLngs([...this.latlngs,t.latlng]),this.latlngs.length?this.tooltip.setContent("点击继续绘制,双击完成绘制"):this.tooltip.setContent("点击开始绘制")):this.geometry=new c.Polygon([t.latlng],this.options).addTo(this._map),this.onDrawing&&this.onDrawing(this.geometry)},_mouseClick(t){this.latlngs.push(t.latlng),String(this.latlngs.at(-1))===String(this.latlngs.at(-2))&&(this.latlngs=this.latlngs.slice(0,this.latlngs.length-1)),this.geometry.setLatLngs(this.latlngs),this.onVertexAdd&&this.onVertexAdd(this.geometry)},_mouseDblClick(t){this.onFinish&&this.geometry&&this.onFinish(this.geometry),this.latlngs=[],!this.options.continue&&this.disable(),this.geometry=null}},addHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.on("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.on("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.on("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},removeHooks(){this[this.drawType+"Events"]&&(this[this.drawType+"Events"]._mouseMove&&this._map.off("mousemove",this[this.drawType+"Events"]._mouseMove,this),this[this.drawType+"Events"]._mouseClick&&this._map.off("click",this[this.drawType+"Events"]._mouseClick,this),this[this.drawType+"Events"]._mouseDblClick&&this._map.off("dblclick",this[this.drawType+"Events"]._mouseDblClick,this))},setOptions(t){return c.Util.setOptions(this,t),this},enable(t,i={}){return c.Util.setOptions(this,i),this.onFinish=i.onFinish||new Function,this.onDrawing=i.onDrawing||new Function,this.onVertexAdd=i.onVertexAdd||new Function,this.drawType=e.StringUtil.changeCase(t,1),this.latlngs=i.latlngs||[],this._map.setCursor("data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA="),this.tempPoint=new c.CircleMarker([0,0],{weight:1,radius:5,color:"#3388ff",fillColor:"#fff",fillOpacity:1}).addTo(this._map),this.tooltip=new c.Tooltip({offset:[10,-10]}).setContent("点击开始绘制"),c.Handler.prototype.enable.call(this),this},disable(){if(this._map.setCursor(),this.removeHooks(),this.tooltip&&this._map.closeTooltip(this.tooltip),this.tempPoint&&this._map.removeLayer(this.tempPoint),this.options.showCloseButton&&this.options.showMeasurements){const t=this.geometry._measurementLayer;let e;e=this.geometry instanceof c.Path?this.geometry._latlngs.flat().at(-1):this.geometry._latlng;const i=this.geometry._leaflet_id;new c.Marker(e,{icon:new c.Icon({iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAAXNSR0IArs4c6QAAAFRJREFUKFOlklEKACAIQ7f7H9rQkJYFFUVfY49NiwBgcc+HABlmu/K7HQMge0SFVd8CCqU5tQlwUQ06UqYuwA7Siv/AU6U6YK3n1f7Wen7onvD6NRqqukP5oM7XCQAAAABJRU5ErkJggg==",iconSize:[12,12],iconAnchor:[6,6]})}).on("click",e=>{this._map.removeLayerById(i),null==t||t.clearLayers()}).addTo(t)}return c.Util.setOptions(this,vn.prototype.options),c.Handler.prototype.disable.call(this),this}});c.Map.addInitHook("addHandler","drawHandler",vn);const Mn=c.Handler.extend({_touchstart:c.Browser.msPointer?"MSPointerDown":c.Browser.pointer?"pointerdown":"touchstart",initialize(t){c.Handler.prototype.initialize.call(this,t),this._items=[],this._visible=!1,Mn.BASE_CLS=`${t.clsPrefix}-contextmenu`;const e=this._container=c.DomUtil.create("div",`${t.clsPrefix}-contextmenu`,t._container);e.style.zIndex=1e4,e.style.position="absolute",t.options.contextmenuWidth&&(e.style.width=t.options.contextmenuWidth+"px"),this._createItems(),c.DomEvent.on(e,"click",c.DomEvent.stop).on(e,"mousedown",c.DomEvent.stop).on(e,"dblclick",c.DomEvent.stop).on(e,"contextmenu",c.DomEvent.stop)},addHooks(){const t=this._map.getContainer();c.DomEvent.on(t,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),c.Browser.touch&&c.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},removeHooks(){const t=this._map.getContainer();c.DomEvent.off(t,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),c.Browser.touch&&c.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,zoomstart:this._hide},this)},showAt(t,e){t instanceof c.LatLng&&(t=this._map.latLngToContainerPoint(t)),this._showAtPoint(t,e)},hide(){this._hide()},addItem(t){return this.insertItem(t)},insertItem(t,e){e=void 0!==e?e:this._items.length;const i=this._createItem(this._container,t,e);return this._items.push(i),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:i.el,index:e}),i.el},removeItem(t){const e=this._container;return isNaN(t)||(t=e.children[t]),t?(this._removeItem(c.Util.stamp(t)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:t}),t):null},removeAllItems(){const t=this._container.children;let e;for(;t.length;)e=t[0],this._removeItem(c.Util.stamp(e));return t},hideAllItems(){let t,e,i;for(e=0,i=this._items.length;e<i;e++)t=this._items[e],t.el.style.display="none"},showAllItems(){let t,e,i;for(e=0,i=this._items.length;e<i;e++)t=this._items[e],t.el.style.display=""},setDisabled(t,e){const i=this._container,n=Mn.BASE_CLS+"-item";isNaN(t)||(t=i.children[t]),t&&c.DomUtil.hasClass(t,n)&&(e?(c.DomUtil.addClass(t,n+"-disabled"),this._map.fire("contextmenu.disableitem",{contextmenu:this,el:t})):(c.DomUtil.removeClass(t,n+"-disabled"),this._map.fire("contextmenu.enableitem",{contextmenu:this,el:t})))},isVisible(){return this._visible},_createItems(){const t=this._map.options.contextmenuItems;let e,i;for(e=0,i=t.length;e<i;e++)this._items.push(this._createItem(this._container,t[e]))},_createItem(t,e,i){if(e.separator||"-"===e)return this._createSeparator(t,i);const n=Mn.BASE_CLS+"-item",s=e.disabled?n+" "+n+"-disabled":n,o=this._insertElementAt("a",s,t,i),a=this._createEventHandler(o,e.callback,e.context,e.hideOnSelect),r=this._getIcon(e),h=this._getIconCls(e);let l="";return r?l='<img class="'+Mn.BASE_CLS+'-icon" src="'+r+'"/>':h&&(l='<span class="'+Mn.BASE_CLS+"-icon "+h+'"></span>'),o.innerHTML=l+e.text,o.href="#",c.DomEvent.on(o,"mouseover",this._onItemMouseOver,this).on(o,"mouseout",this._onItemMouseOut,this).on(o,"mousedown",c.DomEvent.stopPropagation).on(o,"click",a),c.Browser.touch&&c.DomEvent.on(o,this._touchstart,c.DomEvent.stopPropagation),c.Browser.pointer||c.DomEvent.on(o,"click",this._onItemMouseOut,this),{id:c.Util.stamp(o),el:o,callback:a}},_removeItem(t){let e,i,n,s,o;for(n=0,s=this._items.length;n<s;n++)if(e=this._items[n],e.id===t)return i=e.el,o=e.callback,o&&(c.DomEvent.off(i,"mouseover",this._onItemMouseOver,this).off(i,"mouseover",this._onItemMouseOut,this).off(i,"mousedown",c.DomEvent.stopPropagation).off(i,"click",o),c.Browser.touch&&c.DomEvent.off(i,this._touchstart,c.DomEvent.stopPropagation),c.Browser.pointer||c.DomEvent.on(i,"click",this._onItemMouseOut,this)),this._container.removeChild(i),this._items.splice(n,1),e;return null},_createSeparator(t,e){const i=this._insertElementAt("div",Mn.BASE_CLS+"-separator",t,e);return{id:c.Util.stamp(i),el:i}},_createEventHandler(t,e,i,n){const s=this;this._map;const o=Mn.BASE_CLS+"-item-disabled";n=void 0===n||n;return function(a){if(c.DomUtil.hasClass(t,o))return;const r=s._map,h=s._showLocation.containerPoint,l=r.containerPointToLayerPoint(h),u={containerPoint:h,layerPoint:l,latlng:r.layerPointToLatLng(l),relatedTarget:s._showLocation.relatedTarget};n&&s._hide(),e&&e.call(i||r,u),s._map.fire("contextmenu.select",{contextmenu:s,el:t})}},_insertElementAt(t,e,i,n){let s;const o=document.createElement(t);return o.className=e,void 0!==n&&(s=i.children[n]),s?i.insertBefore(o,s):i.appendChild(o),o},_show(t){this._showAtPoint(t.containerPoint,t)},_showAtPoint(t,e){if(this._items.length){this._map;const i=c.extend(e||{},{contextmenu:this});this._showLocation={containerPoint:t},e&&e.relatedTarget&&(this._showLocation.relatedTarget=e.relatedTarget),this._setPosition(t),this._visible||(this._container.style.display="block",this._visible=!0),this._map.fire("contextmenu.show",i)}},_hide(){this._visible&&(this._visible=!1,this._container.style.display="none",this._map.fire("contextmenu.hide",{contextmenu:this}))},_getIcon:t=>c.Browser.retina&&t.retinaIcon||t.icon,_getIconCls:t=>c.Browser.retina&&t.retinaIconCls||t.iconCls,_setPosition(t){const e=this._map.getSize(),i=this._container,n=this._getElementSize(i);let s;this._map.options.contextmenuAnchor&&(s=new c.Point(this._map.options.contextmenuAnchor),t=t.add(s)),i._leaflet_pos=t,t.x+n.x>e.x?(i.style.left="auto",i.style.right=Math.min(Math.max(e.x-t.x,0),e.x-n.x-1)+"px"):(i.style.left=Math.max(t.x,0)+"px",i.style.right="auto"),t.y+n.y>e.y?(i.style.top="auto",i.style.bottom=Math.min(Math.max(e.y-t.y,0),e.y-n.y-1)+"px"):(i.style.top=Math.max(t.y,0)+"px",i.style.bottom="auto")},_getElementSize(t){let e=this._size;const i=t.style.display;return e&&!this._sizeChanged||(e={},t.style.left="-999999px",t.style.right="auto",t.style.display="block",e.x=t.offsetWidth,e.y=t.offsetHeight,t.style.left="auto",t.style.display=i,this._sizeChanged=!1),e},_onKeyDown(t){27===t.keyCode&&this._hide()},_onItemMouseOver(t){c.DomUtil.addClass(t.target||t.srcElement,"over")},_onItemMouseOut(t){c.DomUtil.removeClass(t.target||t.srcElement,"over")}});c.Map.mergeOptions({contextmenuItems:[]}),c.Map.addInitHook("addHandler","contextmenu",Mn);const Ln={bindContextMenu(t){return L.setOptions(this,t),this._initContextMenu(),this},unbindContextMenu(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem(t){this.options.contextmenuItems.push(t)},removeContextMenuItemWithIndex(t){const e=[];for(let n=0;n<this.options.contextmenuItems.length;n++)this.options.contextmenuItems[n].index==t&&e.push(n);let i=e.pop();for(;void 0!==i;)this.options.contextmenuItems.splice(i,1),i=e.pop()},replaceContextMenuItem(t){this.removeContextMenuItemWithIndex(t.index),this.addContextMenuItem(t)},_initContextMenu(){this._items=[],this.on("contextmenu",this._showContextMenu,this)},_showContextMenu(t){let e,i,n,s,o;if(this._items=[],this._map.contextmenu){for(i=L.extend({relatedTarget:this},t),n=this._map.mouseEventToContainerPoint(t.originalEvent),this.options.contextmenuInheritItems||this._map.contextmenu.hideAllItems(),s=0,o=this.options.contextmenuItems.length;s<o;s++)e=this.options.contextmenuItems[s],this._items.push(this._map.contextmenu.insertItem(e,e.index));this._map.once("contextmenu.hide",this._hideContextMenu,this),this._map.contextmenu.showAt(n,i)}},_hideContextMenu(){let t,e;if(this._items){for(t=0,e=this._items.length;t<e;t++)this._map.contextmenu.removeItem(this._items[t]);this._items.length=0,this.options.contextmenuInheritItems||this._map.contextmenu.showAllItems()}}},xn=[c.Marker,c.Path],bn={contextmenu:!1,contextmenuItems:[],contextmenuInheritItems:!1};for(let L=0,Rn=xn.length;L<Rn;L++){const t=xn[L];t.prototype.options?t.mergeOptions(bn):t.prototype.options=bn,t.addInitHook(function(){this.options.contextmenu&&this._initContextMenu()}),t.include(Ln)}const wn=c.Handler.extend({options:{moveStep:10,zoomSnap:1,moveKeyCodeMap:{65:"left",68:"right",87:"top",83:"bottom"},zoomKeyCodeMap:{69:"add",81:"minus"}},enable(t){c.Util.setOptions(this,t),c.Handler.prototype.enable.call(this)},addHooks(){this._map.on("keydown",this._keyDownEvent,this)},removeHooks(){this._map.off("keydown",this._keyDownEvent,this)},_keyDownEvent(t){let e=this.options.moveKeyCodeMap[t.originalEvent.keyCode],i=this.options.zoomKeyCodeMap[t.originalEvent.keyCode];e&&this.moveByMeters(e,this.options.moveStep),i&&this.setZoom(i)},moveByMeters(t,e){let i=this._map.project(this._map.getCenter());switch(t){case"left":i.x-=e;break;case"right":i.x+=e;break;case"bottom":i.y+=e;break;case"top":i.y-=e}i=this._map.unproject(i),this._map.panTo(i)},setZoom(t){let e=this._map.getZoom();switch(t){case"add":e+=this.options.zoomSnap;break;case"minus":e-=this.options.zoomSnap}this._map.setZoom(e)}});c.Map.addInitHook("addHandler","keyboard",wn);const Pn=c.LayerGroup.extend({initialize(t){c.Util.setOptions(this,t),c.LayerGroup.prototype.initialize.call(this,t)},getRasterLayers(){const t={},e=i=>{if(i._layers&&i.getLayer)for(const n in i._layers){const s=i._layers[n];s._layers&&s.getLayer?e(s):t[s._leaflet_id]=s}else t[i._leaflet_id]=i};return e(this),t},removeRasterLayer(t){const e=function(i){if(i._layers&&i.getLayer&&i.getLayer(t)){const e=i.getLayer(t);i.removeLayer(e)}else if(i._layers)for(const n in i._layers){const s=i._layers[n];if(s._layers&&s.getLayer&&s.getLayer(t)){const e=s.getLayer(t);s.removeLayer(e)}else s._layers&&e(s)}};e(this)},getRasterTop(){const t=Object.values(this.getRasterLayers());return t.length?Math.max(...t.map(t=>t.options.zIndex))+1:null}}),kn={Dash:L.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,e,i,n,s){const o=this.options,a=Math.PI/180;if(o.pixelSize<=1)return L.polyline([t.latLng,t.latLng],o.pathOptions);const r=i.project(t.latLng),h=-(t.heading-90)*a,l=L.point(r.x+o.pixelSize*Math.cos(h+Math.PI)/2,r.y+o.pixelSize*Math.sin(h)/2),u=r.add(r.subtract(l));return L.polyline([i.unproject(l),i.unproject(u)],o.pathOptions)}}),ArrowHead:L.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(t){L.Util.setOptions(this,t),this.options.pathOptions.clickable=!1},buildSymbol:function(t,e,i,n,s){return this.options.polygon?L.polygon(this._buildArrowPath(t,i),this.options.pathOptions):L.polyline(this._buildArrowPath(t,i),this.options.pathOptions)},_buildArrowPath:function(t,e){const i=Math.PI/180,n=e.project(t.latLng),s=-(t.heading-90)*i,o=this.options.headAngle/2*i,a=s+o,r=s-o,h=L.point(n.x-this.options.pixelSize*Math.cos(a),n.y+this.options.pixelSize*Math.sin(a)),l=L.point(n.x-this.options.pixelSize*Math.cos(r),n.y+this.options.pixelSize*Math.sin(r));return[e.unproject(h),t.latLng,e.unproject(l)]}}),Marker:L.Class.extend({options:{markerOptions:{},rotation:!1},initialize:function(t){L.Util.setOptions(this,t),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(t,e,i,n,s){return this.options.rotation&&(this.options.markerOptions.rotationAngle=t.heading+(this.options.angleCorrection||0)),L.marker(t.latLng,this.options.markerOptions)}})};const En=(t,e)=>(180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI+90+360)%360,Cn=({value:t,isInPixels:e},i)=>e?t/i:t;function Sn(t){if("string"==typeof t&&-1!==t.indexOf("%"))return{value:parseFloat(t)/100,isInPixels:!1};const e=t?parseFloat(t):0;return{value:e,isInPixels:e>0}}function Tn(t){return t.reduce((t,e,i,n)=>{if(i>0&&!((t,e)=>t.x===e.x&&t.y===e.y)(e,n[i-1])){const s=n[i-1],o=t.length>0?t[t.length-1].distB:0,a=function(t,e){const i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}(s,e);t.push({a:s,b:e,distA:o,distB:o+a,heading:En(s,e)})}return t},[])}function Bn(t,e,i){return e.x!==t.x?{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}:{x:t.x,y:t.y+(e.y-t.y)*i}}const On=t=>{return Array.isArray(t)&&((e=t[0])instanceof L.LatLng||Array.isArray(e)&&2===e.length&&"number"==typeof e[0]);var e},Dn=L.FeatureGroup.extend({options:{patterns:[]},initialize:function(t,e){L.FeatureGroup.prototype.initialize.call(this),L.Util.setOptions(this,e),this._map=null,this._paths=this._initPaths(t),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(t,e){if(On(t)){return[e?t.concat([t[0]]):t]}return t instanceof L.Polyline?this._initPaths(t.getLatLngs(),t instanceof L.Polygon):Array.isArray(t)?t.reduce((t,i)=>t.concat(this._initPaths(i,e)),[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,e){return{symbolFactory:t.symbol,offset:Sn(t.offset),endOffset:Sn(t.endOffset),repeat:Sn(t.repeat)}},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(t){this._map.off("moveend",this.redraw,this),this._map=null,L.FeatureGroup.prototype.onRemove.call(this,t)},_initBounds:function(){const t=this._paths.reduce((t,e)=>t.concat(e),[]);return L.latLngBounds(t)},getBounds:function(){return this._bounds},_buildSymbols:function(t,e,i){return i.map((n,s)=>e.buildSymbol(n,t,this._map,s,i.length))},_getDirectionPoints:function(t,e){if(t.length<2)return[];return function(t,e){const i=Tn(t),n=i.length;if(0===n)return[];const s=i[n-1].distB,o=Cn(e.offset,s),a=Cn(e.endOffset,s),r=s*Cn(e.repeat,s),h=a>0?s*a:0,l=[];let u=o>0?s*o:0;do{l.push(u),u+=r}while(r>0&&u<s-h);let c=0,p=i[0];return l.map(t=>{for(;t>p.distB&&c<n-1;)c++,p=i[c];const e=(t-p.distA)/(p.distB-p.distA);return{pt:Bn(p.a,p.b,e),heading:p.heading}})}(t.map(t=>this._map.project(t)),e).map(t=>({latLng:this._map.unproject(L.point(t.pt)),heading:t.heading}))},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(t){const e=this._map.getBounds().pad(.1);return this._paths.map(i=>{const n=this._getDirectionPoints(i,t).filter(t=>e.contains(t.latLng));return L.featureGroup(this._buildSymbols(i,t.symbolFactory,n))})},_draw:function(){this._patterns.map(t=>this._getPatternLayers(t)).forEach(t=>{this.addLayer(L.featureGroup(t))})}});(t=>{const e=Object.create(L)||{};e.LANG=_,e.BaseMap=L.Map.extend({options:{doubleClickZoom:!1,closePopupOnClick:!1,zoomControl:!1,attributionControl:!1,scaleControl:{show:!0},minZoom:5,maxZoom:19,contextmenu:!0,center:[0,0],zoom:17},initialize(e,i={},n){var s;if("string"==typeof e&&(e=document.getElementById(e)),!e instanceof HTMLElement||!e.clientWidth||!e.clientHeight)throw new Error("地图容器不存在或元素尺寸为0");this.lang="string"==typeof i.lang?i.lang:"zh_CN",this.clsPrefix="string"==typeof i.clsPrefix?i.clsPrefix:"gis2d",function(t){const e=document.createElement("style"),i=document.head||document.documentElement;e.innerHTML=`\n\t.${t}-statusbar {\n\t\tdisplay: flex;\n\t\tcolor: #fff;\n\t\theight: 26px;\n\t\tpadding: 0 10px;\n\t\tline-height: 26px;\n\t\tmargin: 0;\n\t\tletter-spacing: 1px;\n\t\ttext-shadow: 0 0 2px #fff;\n\t\tborder: 1px solid #999;\n\t\tborder-top: none;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t}\n\t.${t}-statusbar-item + .${t}-statusbar-item {\n\t\tmargin-left: 10px\n\t}\n\t.${t}-eaglemap {\n\t\tborder: solid rgba(13, 59, 54, 0.85) 1px;\n\t\tbox-shadow: 0 1px 7px #999;\n\t\tbackground: rgba(13, 59, 54, 0.85);\n\t\t-moz-border-radius: 8px;\n\t\t-webkit-border-radius: 8px;\n\t\tborder-radius: 3px;\n\t\ttransition: all 0.5s;\n\t}\n\n\t.${t}-eaglemap a {\n\t\tbackground-color: rgba(13, 59, 54, 0.85);\n\t\tbackground-position: -1px -1px;\n\t\tbackground-repeat: no-repeat;\n\t\tdisplay: block;\n\t\toutline: none;\n\t\tz-index: 99999;\n\t\ttransition: all 0.2s;\n\t}\n\n\t.${t}-eaglemap a.minimized {\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t}\n\n\t.${t}-eaglemap a.minimized-bottomright {\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t\tborder-radius: 0px;\n\t}\n\n\t.${t}-eaglemap a.minimized-topleft {\n\t\t-webkit-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap a.minimized-bottomleft {\n\t\t-webkit-transform: rotate(270deg);\n\t\ttransform: rotate(270deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap a.minimized-topright {\n\t\t-webkit-transform: rotate(90deg);\n\t\ttransform: rotate(90deg);\n\t\tborder-radius: 0px;\n\t}\n\t.${t}-eaglemap-toggle-display {\n\t\tbackground-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAMdJREFUOE/V0zEOQVEQheH/hMQqVDahREMreonKApCgUYkE67ANOhWJxga0WoXqyEuehBeP+0Lj1iffzNzMiB89/cjhTyDbOSAv6Ro6+svRbLeALtCUdElitgvJImnQFigDO6Ah6XzHbJeAiaT2Y4E0aAYM4+AeqEeY7SKwBk6Sqh+hKGB7Cozj8BHoACsg6mgTDMXYAJi/+PBsUIxFo1QSWDbI9hLofdWR7QXQT9mjsI5s14DRm2U8SHoq8ie3FnpfQQuZFbsB4idCE9J/7MkAAAAASUVORK5CYII=');\n\t\tbackground-size: cover;\n\t\tposition: absolute;\n\t\tborder-radius: 3px 0px 0px 0px;\n\t}\n\t.${t}-eaglemap-toggle-display-bottomright {\n\t\tbottom: 0;\n\t\tright: 0;\n\t}\n\t.${t}-eaglemap-toggle-display-topleft {\n\t\ttop: 0;\n\t\tleft: 0;\n\t\t-webkit-transform: rotate(180deg);\n\t\ttransform: rotate(180deg);\n\t}\n\t.${t}-eaglemap-toggle-display-bottomleft {\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\t-webkit-transform: rotate(90deg);\n\t\ttransform: rotate(90deg);\n\t}\n\t.${t}-eaglemap-toggle-display-topright {\n\t\ttop: 0;\n\t\tright: 0;\n\t\t-webkit-transform: rotate(270deg);\n\t\ttransform: rotate(270deg);\n\t}\n\t.${t}-contextmenu {\n\t\tdisplay: none;\n\t\tbox-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);\n\t\t-webkit-border-radius: 4px;\n\t\tborder-radius: 4px;\n\t\tpadding: 4px 0;\n\t\tbackground-color: #fff;\n\t\tcursor: default;\n\t\t-webkit-user-select: none;\n\t\t-moz-user-select: none;\n\t\tuser-select: none;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item {\n\t\tdisplay: block;\n\t\tcolor: #222;\n\t\tfont-size: 12px;\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tpadding: 0 12px;\n\t\tborder-top: 1px solid transparent;\n\t\tborder-bottom: 1px solid transparent;\n\t\tcursor: default;\n\t\toutline: none;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item-disabled {\n\t\topacity: 0.5;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item.over {\n\t\tbackground-color: #f4f4f4;\n\t\tborder-top: 1px solid #f0f0f0;\n\t\tborder-bottom: 1px solid #f0f0f0;\n\t}\n\t.${t}-contextmenu a.${t}-contextmenu-item-disabled.over {\n\t\tbackground-color: inherit;\n\t\tborder-top: 1px solid transparent;\n\t\tborder-bottom: 1px solid transparent;\n\t}\n\t.${t}-contextmenu-icon {\n\t\tmargin: 2px 8px 0 0;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tfloat: left;\n\t\tborder: 0;\n\t}\n\t.${t}-contextmenu-separator {\n\t\tborder-bottom: 1px solid #ccc;\n\t\tmargin: 5px 0;\n\t}\n\t.${t}-pulse-icon {\n\t\tdisplay: inline-block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 100%;\n\t\tposition: relative;\n\t\tbox-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1);\n\t}\n\t.${t}-dive-icon {\n\t\tcontent: '';\n\t\tborder-radius: 100%;\n\t\theight: 200%;\n\t\twidth: 200%;\n\t\tposition: absolute;\n\t\tmargin: -50% 0 0 -50%;\n\t}\n\t@keyframes pulsate {\n\t\t0% {\n\t\t\ttransform: scale(0.1, 0.1);\n\t\t\topacity: 0;\n\t\t\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';\n\t\t\tfilter: alpha(opacity=0);\n\t\t}\n\t\t50% {\n\t\t\topacity: 1;\n\t\t\t-ms-filter: none;\n\t\t\tfilter: none;\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1.2, 1.2);\n\t\t\topacity: 0;\n\t\t\t-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)';\n\t\t\tfilter: alpha(opacity=0);\n\t\t}\n\t}\n\t`,i.appendChild(e)}(this.clsPrefix),L.Util.setOptions(this,i),L.Layer.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.mergeOptions({clsPrefix:this.clsPrefix}),L.Control.Zoom.mergeOptions({position:(null==(s=this.options.zoomControl)?void 0:s.position)||"topleft",zoomInTitle:_[this.lang].zoomIn,zoomOutTitle:_[this.lang].zoomOut}),L.Control.Attribution.mergeOptions({prefix:`<a href="http://www.${this.clsPrefix}.com" target="_blank">Guo.Yan</a>`}),L.Map.prototype.initialize.call(this,e,this.options),L.DomEvent.on(this._container,"click",t=>{var e;const i=this._container.querySelector(".add");i&&(i.style.display="none"),null==(e=this.contextmenu)||e.hide()},this),i.debug?(document.onselectstart=()=>i.debug.allowSelect,e.oncontextmenu=()=>i.debug.allowContextmenu,document.onkeydown=function(t){if(t&&123===t.keyCode)return i.debug.allowDevtool}):"development"!==process.env.NODE_ENV&&(document.onkeydown=function(t){if(t&&123===t.keyCode)return!1},e.oncontextmenu=()=>!1),t[n||"$m"]=this},getCursor(){return this.getContainer().style.cursor||"default"},setCursor(t="default"){const e=this.getContainer();["auto","pointer","crosshair","move","text","wait","help","grab","default"].includes(t)?e.style.cursor=`${t}`:e.style.cursor="draw"===t?"url(data:application/octet-stream;base64,AAACAAEAEBAAAAMABgBoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AACxAAAs6/oAAIKEAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQUAAAAAAAAAAAAAAAAAAAUFBQAAAAAAAAAAAAAAAAAFAwQAAAAAAAAAAAAAAAAAAAMDBAAAAAAAAAEBAQAAAAADAwQAAAAAAAABAQEAAAAAAAMDBAQAAAAAAQEBAAAAAAADAwIAAAAAAAAAAAAAAAAAAAIBAQAAAAAAAAAAAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA/v8AAP4/AAD+HwAA/g8AAP4PAAD+BwAAxwcAAMcDAADHgwAA/8EAAP/BAAD/5wAA//8AAP//AAA=), auto":`url(${t}), auto`},flyTo(t,e=0,i={animate:!1}){t instanceof L.Marker?(t=t._latlng,L.Map.prototype.flyTo.call(this,t,e||this.getZoom(),i)):t instanceof L.Path||t instanceof L.FeatureGroup?(t=t.getBounds(),L.Map.prototype.flyToBounds.call(this,t,i)):L.Map.prototype.flyTo.call(this,t,e||this.getZoom(),i)},getLayer(t){return this._layers[t]},getLayers(){return Object.values(this._layers)},openWidget(t,e={},i={},n={}){this.fire("widget-mount",{name:t,options:e,events:{onClose:()=>this.closeWidget(t),...i},config:n})},closeWidget(t){this.fire("widget-unmount",{name:t})},closeAllWidget(){this.view.fire("widget-destory")}}),e.StatusBar=m,e.CRS.BaiDu=an,e.WebMercatorTiledLayer=un,e.BlinkMarker=hn,e.CanvasMarker=ln,e.HeatLayer=_n,e.WMTS=mn,e.WMS=gn,e.Knob=An,e.Draw=vn,e.ContextMenu=Mn,e.KeyBoard=wn,e.EagleMap=g,e.LayerManager=Pn,e.ImageOverlay.Rotated=cn,e.Text=rn,e.VertexMarkers=f,e.Measurement=y,e.Symbol=kn,e.PolylineDecorator=Dn,t.L=e})(window),t.BaiDuCRS=an,t.BlinkMarker=hn,t.CanvasMarker=ln,t.ContextMenu=Mn,t.Draw=vn,t.EagleMap=g,t.KeyBoard=wn,t.Knob=An,t.LayerManager=Pn,t.MeasureMent=y,t.StatusBar=m,t.TextMarker=rn,t.VertexMarker=f,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|